From f089cf0d2c6ae1ad715524c40f5efc6aeb40bf14 Mon Sep 17 00:00:00 2001 From: Zachary Watts Date: Thu, 30 Apr 2026 00:57:04 -0400 Subject: [PATCH] single character sheet improvements --- __pycache__/adventurers.cpython-312.pyc | Bin 25342 -> 32578 bytes __pycache__/app.cpython-312.pyc | Bin 5105 -> 4734 bytes __pycache__/main.cpython-312.pyc | Bin 7275 -> 7319 bytes __pycache__/spells.cpython-312.pyc | Bin 738 -> 1849 bytes adventurers.py | 312 +++++++++++++++--------- app.py | 7 - main.py | 14 +- spells.py | 13 +- templates/character.html | 76 +++++- templates/index.html | 37 ++- templates/party_sheet.html | 13 +- 11 files changed, 308 insertions(+), 164 deletions(-) diff --git a/__pycache__/adventurers.cpython-312.pyc b/__pycache__/adventurers.cpython-312.pyc index 494437dc80a7e86441b84c1981cfbaa5af7351ac..551c3eed382e15fdc48eed17f228654a7ef1d2ff 100644 GIT binary patch literal 32578 zcmeHwdvF`~o!>5A1V9oX2?7Kkk|0tqNF?>9Et=GmvMkx6^@?QEmLP}=QK0$K0+cL- zblBF@qY`B-HFqbvR%$ABE2?%9=Fv0Vq%}R4^psw%#Trb&L3uN7&vR2wr*pET%q5!s z(a-m{*u{ejO7ufXnkAtPwDMr_&XFmO_T$@41?coH&tDInbTPK&%W@K?D#N`Ey zZ|jq>CKhW(tR*crkHuOMo1YeIX0Zi`Eli8Guvi;n?P;-A7F&ea;RdaOATuE@(F%*d$P%_i6*$z*t=Wd{0V=R3-c@<&M<$P7x-7r;pD?`+yM7>lG?(( zolK_09Ok^b)^;^BsMNa~@ppG0oIm5A=6Lk+0C&8C;|BRuHJ$0rK}xy=?xIfV*+1v6 z@;rB`%D`RVzpX#ddv&u^ORHCxFp2&ip|?AcNB3Y)*sD+I>enTBU&0s)3V~3FTJG@- z-QT{pJ0Jx8Ya{;lm)3^Dy`sM(u(n0)?K{=`@>(HqZf$QUP}hFOFZ$cV0kN(l(6iPr zoD1}X`^A75s_(mS-_nH0z{`E&)<~7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qp1#O&cINlTf^YO5Uat!P|H)p zlcfn(;lakks|`1a2dF!dO_o=Sg`tMIhA|tcwn%vLLN0(=d$~AbJef` zWm#%i*Kkih&hE)5FooHmtXp6I042Kj6%q z9KhAW##&I6nOCy;GS^;4#)iogdDihhD>!5q1;Kfm^Q`!?(k>6)_rCA@{oe2Q@%=mYTW$Nu zaS?#elNbBukLY^adx99H(H1dGk`}BoWC|wV+JeXMPCon$HZllo5oM_Bu~?(_$9x1m zq;g~&0CYJjqg{$)N(KUN?FfGU>paWtMCt zhwoHZ!*3w`fOO_=h!tw>y>+$^{bU~GcKBE=uGabVwwPGCvMHu_q-5>L(Aw~tT9ZfX z(%5#_;65N@{VU{7BDFGGPh`+Cn;Z+`)?Nrm$=0U^TS|SA)X$PyOOL$neHW`s7d_$e zO;PoP<$=1CMO*B-@L?6>Hej*(of{%hl0QmVIW)pg!bx2qo;;6@oex!FawCr@ zNElr`4@^C}1RqSIo{^!FL6g<*7JFJ|dPYfVQ59=qN|~-5E*_S6E~qGTNQmS6IX#Y@JS>t1RM^mr6S^=1qPft;AS3nOnw1hL=&| dgB$}3Pe;`yX33i@9Ib92m>F24id2EN0RVYzW;6lLa>6iI*tKprlN1rnO9w*-KiQu9hmi&Bf?3lfV;DvKgP zvPnSV7FS7XaY=k~PGWI!Q8GgW14A*$Zweq#Bn(o(lAD;BSCk86RseA^NK*sD9dV@< zi8}(Xh}&Oa5xK!Hf1O|ZBER-021Zud4(2-?ydBB?xt+OJIb=RC1BIUOOHMA3)?vQN hB0Kq_v=d|QWDyx9#)8S_GA^v_jB+1@CO6240|2n_UNHaw diff --git a/__pycache__/spells.cpython-312.pyc b/__pycache__/spells.cpython-312.pyc index 87a152ecef8cef9c5d8240e1da637a00c1d0e424..d2e053ae069e20a0637ebfbf6a8678e9162a9bfa 100644 GIT binary patch literal 1849 zcmZuxJ+s_26y1;PzWuN_yCiQW9pYmqxOiDoP{B|E6)>65Fkyy_)|S`G%93+szs;&( zhTlLzlPVp51sZA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Yl=C{rLNU_XB=2d=a0W5B}_}u5R|GJgoX^&`z{p_%#MUyqJ$ygP&u%K+t~yJ->ol delta 213 zcmdnV_lPy}G%qg~0}#|3e#~rQVqka-;=lk4l<`>x$e7NM&XB^eh!IFKf=Q-Dj48}> zn4=gfSu|NSxvO}RGZKq(6$(;|iu3cTCiZJGR!!Wg03>d?3RUqZ=jWAV=9MPqDCA_O zXOvV;He_^SteRZHSPCRxFyIula!tjzANcd?o-V)4BOwUY?FD*_j in%u}1#w7|A2dOHSpZt(biuWTsizw4Y2Eig>pcnw*i#93% diff --git a/adventurers.py b/adventurers.py index b059c14..a4c6ce4 100755 --- a/adventurers.py +++ b/adventurers.py @@ -21,7 +21,9 @@ class Adventurer: self.dexterity = attributes.get('dexterity', roll_dice(3,6)) self.constitution = attributes.get('constitution', roll_dice(3,6)) self.charisma = attributes.get('charisma', roll_dice(3,6)) + self.hp_rolls = [] self.hp = 1 + self.atk = 0 self.gold= roll_dice(3,6) self.torches = roll_dice(1,6) self.rations = roll_dice(1,6) @@ -87,6 +89,22 @@ class Adventurer: sheet = [ line + "|" for line in sheet ] return sheet + def full_sheet(self): + sheet = { 1: [], 2 : [] } + sheet[1].append('{0: <60}'.format(f"| Character Name:")) + sheet[1].append('{0: <60}'.format(f"| Player Name :")) + sheet[1].append('{0: <60}'.format(f"| Class: {self.player_class.title()} Alignment:")) + sheet[1].append('{0: <60}'.format(f"| Title: Level {self.level}")) + sheet[1].append('| ------------------------------------------ ') + sheet[1].append('{0: <60}'.format(f"| ABILITY SCORES\t\t\tSAVING THROWS")) + sheet[1].append('{0: <60}'.format(f"| Strength:\t{self.strength} Death: {self.ac}")) + sheet[1].append('{0: <60}'.format(f"| Intelligence:{self.intelligence} Wands: {self.ac}")) + sheet[1].append('{0: <60}'.format(f"| Wisdom:\t {self.wisdom} Para: {self.ac}")) + sheet[1].append('{0: <60}'.format(f"| Dexterity:\t{self.dexterity} Breath: {self.ac}")) + sheet[1].append('{0: <60}'.format(f"| Constitution: {self.constitution} Spells: {self.ac}")) + sheet[1].append('{0: <60}'.format(f"| Charisma:\t{self.charisma} SpellMod: {self.ac}")) + return sheet + def get_attributes(self): attribute_list = ['strength', 'intelligence', 'wisdom', 'dexterity', 'constitution', 'charisma'] return {k: self.__dict__[k] for k in attribute_list} @@ -106,68 +124,99 @@ class Adventurer: equipment.append("") return equipment - def select_spells(self): + def select_spells(self, spell_list): spell_book = [] for spell_level, count in self.spells.items(): if count != "-": for i in range(count): - random_spell = "" - while random_spell not in spell_book: - random_spell = random.choice(magic_user_spells[spell_level]) - spell_book.append(random_spell) + new_spell = "" + while new_spell not in spell_book: + new_spell = random.choice(spell_list[spell_level]) + spell_book.append(new_spell) return spell_book - def set_level(self, new_level): - self.level = new_level - + def roll_all_hit_points(self): + hp_list = [] + prev_hit_dice = 0 + for i in range(self.__class__.max_level): + new_hit_dice = self.__class__.progression[i]['hit-dice'] + hp_mod = self.__class__.progression[i]['hp-mod'] + hit_dice = new_hit_dice - prev_hit_dice + prev_hit_dice = new_hit_dice + # check for constitution bonus to hp + if hp_mod == 0 and self.constitution >= 13: hp_mod = 1 + if hp_mod == 0 and self.constitution >= 16: hp_mod = 2 + if hp_mod == 0 and self.constitution >= 18: hp_mod = 3 + hp_roll = roll_dice(hit_dice,self.__class__.hit_die) + hp_mod + hp_list.append(hp_roll) + return hp_list + def get_class_progression_for_level(self): + return list(filter(lambda d: d['level'] == self.level, self.__class__.progression))[0] + + def set_level(self, new_level): + print('setting level') + self.level = new_level + self.hp = sum(self.hp_rolls[:self.level]) + + def set_attack_bonus(self): + prog = self.get_class_progression_for_level() + thac0 = prog['thac0'] + atk = 19 - thac0 + return atk class Fighter(Adventurer): adv_class = "fighter" - prime_requisite = "strength" requirements = None + prime_requisite = "strength" + hit_die = 8 + max_level = 14 progression = [ - { "level" : 1, "xp" : 0, "hit-dice" : 1, "thac0" : 19, "saves" : { "death / poison" : 12, "wands" : 13, "paralysis / petrify" : 14, "breath attack" : 15, "spells / rods / staves" : 16 }}, - { "level" : 2, "xp" : 2000, "hit-dice" : 2, "thac0" : 19, "saves" : { "death / poison" : 12, "wands" : 13, "paralysis / petrify" : 14, "breath attack" : 15, "spells / rods / staves" : 16 }}, - { "level" : 3, "xp" : 4000, "hit-dice" : 3, "thac0" : 19, "saves" : { "death / poison" : 12, "wands" : 13, "paralysis / petrify" : 14, "breath attack" : 15, "spells / rods / staves" : 16 }}, - { "level" : 4, "xp" : 8000, "hit-dice" : 4, "thac0" : 17, "saves" : { "death / poison" : 10, "wands" : 11, "paralysis / petrify" : 12, "breath attack" : 13, "spells / rods / staves" : 14 }}, - { "level" : 5, "xp" : 16000, "hit-dice" : 5, "thac0" : 17, "saves" : { "death / poison" : 10, "wands" : 11, "paralysis / petrify" : 12, "breath attack" : 13, "spells / rods / staves" : 14 }}, - { "level" : 6, "xp" : 32000, "hit-dice" : 6, "thac0" : 17, "saves" : { "death / poison" : 10, "wands" : 11, "paralysis / petrify" : 12, "breath attack" : 13, "spells / rods / staves" : 14 }}, - { "level" : 7, "xp" : 64000, "hit-dice" : 7, "thac0" : 14, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 10, "breath attack" : 10, "spells / rods / staves" : 12 }}, - { "level" : 8, "xp" : 120000, "hit-dice" : 8, "thac0" : 14, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 10, "breath attack" : 10, "spells / rods / staves" : 12 }}, - { "level" : 9, "xp" : 240000, "hit-dice" : 9, "thac0" : 14, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 10, "breath attack" : 10, "spells / rods / staves" : 12 }}, - { "level" : 10, "xp" : 360000, "hit-dice" : 9, "thac0" : 12, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 8, "breath attack" : 8, "spells / rods / staves" : 10 }}, - { "level" : 11, "xp" : 480000, "hit-dice" : 9, "thac0" : 12, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 8, "breath attack" : 8, "spells / rods / staves" : 10 }}, - { "level" : 12, "xp" : 600000, "hit-dice" : 9, "thac0" : 12, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 8, "breath attack" : 8, "spells / rods / staves" : 10 }}, - { "level" : 13, "xp" : 720000, "hit-dice" : 9, "thac0" : 10, "saves" : { "death / poison" : 4, "wands" : 5, "paralysis / petrify" : 6, "breath attack" : 5, "spells / rods / staves" : 8 }}, - { "level" : 14, "xp" : 840000, "hit-dice" : 9, "thac0" : 10, "saves" : { "death / poison" : 4, "wands" : 5, "paralysis / petrify" : 6, "breath attack" : 5, "spells / rods / staves" : 8 }} + { "level" : 1, "xp" : 0, "hit-dice" : 1, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 12, "wands" : 13, "paralysis / petrify" : 14, "breath attack" : 15, "spells / rods / staves" : 16 }}, + { "level" : 2, "xp" : 2000, "hit-dice" : 2, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 12, "wands" : 13, "paralysis / petrify" : 14, "breath attack" : 15, "spells / rods / staves" : 16 }}, + { "level" : 3, "xp" : 4000, "hit-dice" : 3, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 12, "wands" : 13, "paralysis / petrify" : 14, "breath attack" : 15, "spells / rods / staves" : 16 }}, + { "level" : 4, "xp" : 8000, "hit-dice" : 4, "hp-mod" : 0, "thac0" : 17, "saves" : { "death / poison" : 10, "wands" : 11, "paralysis / petrify" : 12, "breath attack" : 13, "spells / rods / staves" : 14 }}, + { "level" : 5, "xp" : 16000, "hit-dice" : 5, "hp-mod" : 0, "thac0" : 17, "saves" : { "death / poison" : 10, "wands" : 11, "paralysis / petrify" : 12, "breath attack" : 13, "spells / rods / staves" : 14 }}, + { "level" : 6, "xp" : 32000, "hit-dice" : 6, "hp-mod" : 0, "thac0" : 17, "saves" : { "death / poison" : 10, "wands" : 11, "paralysis / petrify" : 12, "breath attack" : 13, "spells / rods / staves" : 14 }}, + { "level" : 7, "xp" : 64000, "hit-dice" : 7, "hp-mod" : 0, "thac0" : 14, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 10, "breath attack" : 10, "spells / rods / staves" : 12 }}, + { "level" : 8, "xp" : 120000, "hit-dice" : 8, "hp-mod" : 0, "thac0" : 14, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 10, "breath attack" : 10, "spells / rods / staves" : 12 }}, + { "level" : 9, "xp" : 240000, "hit-dice" : 9, "hp-mod" : 0, "thac0" : 14, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 10, "breath attack" : 10, "spells / rods / staves" : 12 }}, + { "level" : 10, "xp" : 360000, "hit-dice" : 9, "hp-mod" : 2, "thac0" : 12, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 8, "breath attack" : 8, "spells / rods / staves" : 10 }}, + { "level" : 11, "xp" : 480000, "hit-dice" : 9, "hp-mod" : 4, "thac0" : 12, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 8, "breath attack" : 8, "spells / rods / staves" : 10 }}, + { "level" : 12, "xp" : 600000, "hit-dice" : 9, "hp-mod" : 6, "thac0" : 12, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 8, "breath attack" : 8, "spells / rods / staves" : 10 }}, + { "level" : 13, "xp" : 720000, "hit-dice" : 9, "hp-mod" : 8, "thac0" : 10, "saves" : { "death / poison" : 4, "wands" : 5, "paralysis / petrify" : 6, "breath attack" : 5, "spells / rods / staves" : 8 }}, + { "level" : 14, "xp" : 840000, "hit-dice" : 9, "hp-mod" : 10, "thac0" : 10, "saves" : { "death / poison" : 4, "wands" : 5, "paralysis / petrify" : 6, "breath attack" : 5, "spells / rods / staves" : 8 }} ] def __init__(self, c_id, level, attributes={}) -> None: Adventurer.__init__(self, c_id, level, attributes) self.player_class = Fighter.adv_class self.progression = Fighter.progression - self.hp = roll_dice(self.level, 8) + self.hp_rolls = self.roll_all_hit_points() + self.hp = sum(self.hp_rolls[:self.level]) self.ac = armor[self.armor] + self.atk = self.set_attack_bonus() class MagicUser(Adventurer): adv_class = "magic user" - prime_requisite = "intelligence" requirements = None + prime_requisite = "intelligence" + hit_die = 4 + max_level = 14 progression = [ - { "level" : 1, "xp" : 0, "hit-dice" : 1, "thac0" : 19, "saves" : { "death / poison" : 13, "wands" : 14, "paralysis / petrify" : 13, "breath attack" : 16, "spells / rods / staves" : 15 }}, - { "level" : 2, "xp" : 2500, "hit-dice" : 2, "thac0" : 19, "saves" : { "death / poison" : 13, "wands" : 14, "paralysis / petrify" : 13, "breath attack" : 16, "spells / rods / staves" : 15 }}, - { "level" : 3, "xp" : 5000, "hit-dice" : 3, "thac0" : 19, "saves" : { "death / poison" : 13, "wands" : 14, "paralysis / petrify" : 13, "breath attack" : 16, "spells / rods / staves" : 15 }}, - { "level" : 4, "xp" : 10000, "hit-dice" : 4, "thac0" : 19, "saves" : { "death / poison" : 13, "wands" : 14, "paralysis / petrify" : 13, "breath attack" : 16, "spells / rods / staves" : 15 }}, - { "level" : 5, "xp" : 20000, "hit-dice" : 5, "thac0" : 19, "saves" : { "death / poison" : 13, "wands" : 14, "paralysis / petrify" : 13, "breath attack" : 16, "spells / rods / staves" : 15 }}, - { "level" : 6, "xp" : 40000, "hit-dice" : 6, "thac0" : 17, "saves" : { "death / poison" : 11, "wands" : 12, "paralysis / petrify" : 11, "breath attack" : 11, "spells / rods / staves" : 12 }}, - { "level" : 7, "xp" : 80000, "hit-dice" : 7, "thac0" : 17, "saves" : { "death / poison" : 11, "wands" : 12, "paralysis / petrify" : 11, "breath attack" : 11, "spells / rods / staves" : 12 }}, - { "level" : 8, "xp" : 150000, "hit-dice" : 8, "thac0" : 17, "saves" : { "death / poison" : 11, "wands" : 12, "paralysis / petrify" : 11, "breath attack" : 11, "spells / rods / staves" : 12 }}, - { "level" : 9, "xp" : 300000, "hit-dice" : 9, "thac0" : 17, "saves" : { "death / poison" : 11, "wands" : 12, "paralysis / petrify" : 11, "breath attack" : 11, "spells / rods / staves" : 12 }}, - { "level" : 10, "xp" : 450000, "hit-dice" : 9, "thac0" : 17, "saves" : { "death / poison" : 11, "wands" : 12, "paralysis / petrify" : 11, "breath attack" : 11, "spells / rods / staves" : 12 }}, - { "level" : 11, "xp" : 600000, "hit-dice" : 9, "thac0" : 14, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 8, "breath attack" : 8, "spells / rods / staves" : 8 }}, - { "level" : 12, "xp" : 750000, "hit-dice" : 9, "thac0" : 14, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 8, "breath attack" : 8, "spells / rods / staves" : 8 }}, - { "level" : 13, "xp" : 900000, "hit-dice" : 9, "thac0" : 14, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 8, "breath attack" : 8, "spells / rods / staves" : 8 }}, - { "level" : 14, "xp" : 1050000, "hit-dice" : 9, "thac0" : 14, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 8, "breath attack" : 8, "spells / rods / staves" : 8 }} + { "level" : 1, "xp" : 0, "hit-dice" : 1, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 13, "wands" : 14, "paralysis / petrify" : 13, "breath attack" : 16, "spells / rods / staves" : 15 }}, + { "level" : 2, "xp" : 2500, "hit-dice" : 2, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 13, "wands" : 14, "paralysis / petrify" : 13, "breath attack" : 16, "spells / rods / staves" : 15 }}, + { "level" : 3, "xp" : 5000, "hit-dice" : 3, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 13, "wands" : 14, "paralysis / petrify" : 13, "breath attack" : 16, "spells / rods / staves" : 15 }}, + { "level" : 4, "xp" : 10000, "hit-dice" : 4, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 13, "wands" : 14, "paralysis / petrify" : 13, "breath attack" : 16, "spells / rods / staves" : 15 }}, + { "level" : 5, "xp" : 20000, "hit-dice" : 5, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 13, "wands" : 14, "paralysis / petrify" : 13, "breath attack" : 16, "spells / rods / staves" : 15 }}, + { "level" : 6, "xp" : 40000, "hit-dice" : 6, "hp-mod" : 0, "thac0" : 17, "saves" : { "death / poison" : 11, "wands" : 12, "paralysis / petrify" : 11, "breath attack" : 11, "spells / rods / staves" : 12 }}, + { "level" : 7, "xp" : 80000, "hit-dice" : 7, "hp-mod" : 0, "thac0" : 17, "saves" : { "death / poison" : 11, "wands" : 12, "paralysis / petrify" : 11, "breath attack" : 11, "spells / rods / staves" : 12 }}, + { "level" : 8, "xp" : 150000, "hit-dice" : 8, "hp-mod" : 0, "thac0" : 17, "saves" : { "death / poison" : 11, "wands" : 12, "paralysis / petrify" : 11, "breath attack" : 11, "spells / rods / staves" : 12 }}, + { "level" : 9, "xp" : 300000, "hit-dice" : 9, "hp-mod" : 0, "thac0" : 17, "saves" : { "death / poison" : 11, "wands" : 12, "paralysis / petrify" : 11, "breath attack" : 11, "spells / rods / staves" : 12 }}, + { "level" : 10, "xp" : 450000, "hit-dice" : 9, "hp-mod" : 1, "thac0" : 17, "saves" : { "death / poison" : 11, "wands" : 12, "paralysis / petrify" : 11, "breath attack" : 11, "spells / rods / staves" : 12 }}, + { "level" : 11, "xp" : 600000, "hit-dice" : 9, "hp-mod" : 2, "thac0" : 14, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 8, "breath attack" : 8, "spells / rods / staves" : 8 }}, + { "level" : 12, "xp" : 750000, "hit-dice" : 9, "hp-mod" : 3, "thac0" : 14, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 8, "breath attack" : 8, "spells / rods / staves" : 8 }}, + { "level" : 13, "xp" : 900000, "hit-dice" : 9, "hp-mod" : 4, "thac0" : 14, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 8, "breath attack" : 8, "spells / rods / staves" : 8 }}, + { "level" : 14, "xp" : 1050000, "hit-dice" : 9, "hp-mod" : 5, "thac0" : 14, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 8, "breath attack" : 8, "spells / rods / staves" : 8 }} ] spells = { 1: { 1: 1, 2: '-', 3: '-', 4: '-', 5: '-', 6: '-'}, @@ -189,32 +238,36 @@ class MagicUser(Adventurer): Adventurer.__init__(self, c_id, level, attributes) self.player_class = MagicUser.adv_class self.progression = MagicUser.progression - self.hp = roll_dice(self.level, 4) + self.hp_rolls = self.roll_all_hit_points() + self.hp = sum(self.hp_rolls[:self.level]) self.armor = "None" self.ac = armor[self.armor] self.weapons = [ list(filter(lambda d: 'silver dagger' in d['name'],weapons))[0], { "name" : "" } ] self.spells = MagicUser.spells[self.level] - self.spell_book = self.select_spells() + self.spell_book = self.select_spells(magic_user_spells) + self.atk = self.set_attack_bonus() class Cleric(Adventurer): adv_class = "cleric" - prime_requisite = "wisdom" requirements = None + prime_requisite = "wisdom" + hit_die = 6 + max_level = 14 progression = [ - { "level" : 1, "xp" : 0, "hit-dice" : 1, "thac0" : 19, "saves" : { "death / poison" : 11, "wands" : 12, "paralysis / petrify" : 14, "breath attack" : 16, "spells / rods / staves" : 15 }}, - { "level" : 2, "xp" : 1500, "hit-dice" : 2, "thac0" : 19, "saves" : { "death / poison" : 11, "wands" : 12, "paralysis / petrify" : 14, "breath attack" : 16, "spells / rods / staves" : 15 }}, - { "level" : 3, "xp" : 3000, "hit-dice" : 3, "thac0" : 19, "saves" : { "death / poison" : 11, "wands" : 12, "paralysis / petrify" : 14, "breath attack" : 16, "spells / rods / staves" : 15 }}, - { "level" : 4, "xp" : 6000, "hit-dice" : 4, "thac0" : 19, "saves" : { "death / poison" : 11, "wands" : 12, "paralysis / petrify" : 14, "breath attack" : 16, "spells / rods / staves" : 15 }}, - { "level" : 5, "xp" : 12000, "hit-dice" : 5, "thac0" : 17, "saves" : { "death / poison" : 9, "wands" : 10, "paralysis / petrify" : 12, "breath attack" : 14, "spells / rods / staves" : 12 }}, - { "level" : 6, "xp" : 25000, "hit-dice" : 6, "thac0" : 17, "saves" : { "death / poison" : 9, "wands" : 10, "paralysis / petrify" : 12, "breath attack" : 14, "spells / rods / staves" : 12 }}, - { "level" : 7, "xp" : 50000, "hit-dice" : 7, "thac0" : 17, "saves" : { "death / poison" : 9, "wands" : 10, "paralysis / petrify" : 12, "breath attack" : 14, "spells / rods / staves" : 12 }}, - { "level" : 8, "xp" : 100000, "hit-dice" : 8, "thac0" : 17, "saves" : { "death / poison" : 9, "wands" : 10, "paralysis / petrify" : 12, "breath attack" : 14, "spells / rods / staves" : 12 }}, - { "level" : 9, "xp" : 200000, "hit-dice" : 9, "thac0" : 14, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 9, "breath attack" : 14, "spells / rods / staves" : 9 }}, - { "level" : 10, "xp" : 300000, "hit-dice" : 9, "thac0" : 14, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 9, "breath attack" : 11, "spells / rods / staves" : 9 }}, - { "level" : 11, "xp" : 400000, "hit-dice" : 9, "thac0" : 14, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 9, "breath attack" : 11, "spells / rods / staves" : 9 }}, - { "level" : 12, "xp" : 500000, "hit-dice" : 9, "thac0" : 14, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 9, "breath attack" : 11, "spells / rods / staves" : 9 }}, - { "level" : 13, "xp" : 600000, "hit-dice" : 9, "thac0" : 12, "saves" : { "death / poison" : 3, "wands" : 5, "paralysis / petrify" : 7, "breath attack" : 8, "spells / rods / staves" : 7 }}, - { "level" : 14, "xp" : 700000, "hit-dice" : 9, "thac0" : 12, "saves" : { "death / poison" : 3, "wands" : 5, "paralysis / petrify" : 7, "breath attack" : 8, "spells / rods / staves" : 7 }} + { "level" : 1, "xp" : 0, "hit-dice" : 1, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 11, "wands" : 12, "paralysis / petrify" : 14, "breath attack" : 16, "spells / rods / staves" : 15 }}, + { "level" : 2, "xp" : 1500, "hit-dice" : 2, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 11, "wands" : 12, "paralysis / petrify" : 14, "breath attack" : 16, "spells / rods / staves" : 15 }}, + { "level" : 3, "xp" : 3000, "hit-dice" : 3, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 11, "wands" : 12, "paralysis / petrify" : 14, "breath attack" : 16, "spells / rods / staves" : 15 }}, + { "level" : 4, "xp" : 6000, "hit-dice" : 4, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 11, "wands" : 12, "paralysis / petrify" : 14, "breath attack" : 16, "spells / rods / staves" : 15 }}, + { "level" : 5, "xp" : 12000, "hit-dice" : 5, "hp-mod" : 0, "thac0" : 17, "saves" : { "death / poison" : 9, "wands" : 10, "paralysis / petrify" : 12, "breath attack" : 14, "spells / rods / staves" : 12 }}, + { "level" : 6, "xp" : 25000, "hit-dice" : 6, "hp-mod" : 0, "thac0" : 17, "saves" : { "death / poison" : 9, "wands" : 10, "paralysis / petrify" : 12, "breath attack" : 14, "spells / rods / staves" : 12 }}, + { "level" : 7, "xp" : 50000, "hit-dice" : 7, "hp-mod" : 0, "thac0" : 17, "saves" : { "death / poison" : 9, "wands" : 10, "paralysis / petrify" : 12, "breath attack" : 14, "spells / rods / staves" : 12 }}, + { "level" : 8, "xp" : 100000, "hit-dice" : 8, "hp-mod" : 0, "thac0" : 17, "saves" : { "death / poison" : 9, "wands" : 10, "paralysis / petrify" : 12, "breath attack" : 14, "spells / rods / staves" : 12 }}, + { "level" : 9, "xp" : 200000, "hit-dice" : 9, "hp-mod" : 0, "thac0" : 14, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 9, "breath attack" : 14, "spells / rods / staves" : 9 }}, + { "level" : 10, "xp" : 300000, "hit-dice" : 9, "hp-mod" : 1, "thac0" : 14, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 9, "breath attack" : 11, "spells / rods / staves" : 9 }}, + { "level" : 11, "xp" : 400000, "hit-dice" : 9, "hp-mod" : 2, "thac0" : 14, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 9, "breath attack" : 11, "spells / rods / staves" : 9 }}, + { "level" : 12, "xp" : 500000, "hit-dice" : 9, "hp-mod" : 3, "thac0" : 14, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 9, "breath attack" : 11, "spells / rods / staves" : 9 }}, + { "level" : 13, "xp" : 600000, "hit-dice" : 9, "hp-mod" : 4, "thac0" : 12, "saves" : { "death / poison" : 3, "wands" : 5, "paralysis / petrify" : 7, "breath attack" : 8, "spells / rods / staves" : 7 }}, + { "level" : 14, "xp" : 700000, "hit-dice" : 9, "hp-mod" : 5, "thac0" : 12, "saves" : { "death / poison" : 3, "wands" : 5, "paralysis / petrify" : 7, "breath attack" : 8, "spells / rods / staves" : 7 }} ] spells = { 1: { 1: '-', 2: '-', 3: '-', 4: '-', 5: '-'}, @@ -232,11 +285,28 @@ class Cleric(Adventurer): 13: { 1: 5, 2: 5, 3: 4, 4: 4, 5: 4 }, 14: { 1: 6, 2: 5, 3: 5, 4: 5, 5: 4 } } + turn_undead = { + 1: { '1': '7', '2': '9', '2*': '11', 3: '-', 4: '-', 5: '-', '6' : '-', '7-9' : '-' }, + 2: { '1': 'T', '2': '7', '2*': '9', 3: '11', 4: '-', 5: '-', '6' : '-', '7-9' : '-' }, + 3: { '1': 'T', '2': 'T', '2*': '7', 3: '9', 4: '11', 5: '-', '6' : '-', '7-9' : '-' }, + 4: { '1': 'D', '2': 'T', '2*': 'T', 3: '7', 4: '9', 5: '11', '6' : '-', '7-9' : '-' }, + 5: { '1': 'D', '2': 'D', '2*': 'T', 3: 'T', 4: '7', 5: '9', '6' : '11', '7-9' : '-' }, + 6: { '1': 'D', '2': 'D', '2*': 'D', 3: 'T', 4: 'T', 5: '7', '6' : '9', '7-9' : '11'}, + 7: { '1': 'D', '2': 'D', '2*': 'D', 3: 'D', 4: 'T', 5: 'T', '6' : '7', '7-9' : '9' }, + 8: { '1': 'D', '2': 'D', '2*': 'D', 3: 'D', 4: 'D', 5: 'T', '6' : 'T', '7-9' : '7' }, + 9: { '1': 'D', '2': 'D', '2*': 'D', 3: 'D', 4: 'D', 5: 'D', '6' : 'D', '7-9' : 'T' }, + 11: { '1': 'D', '2': 'D', '2*': 'D', 3: 'D', 4: 'D', 5: 'D', '6' : 'D', '7-9' : 'T' }, + 12: { '1': 'D', '2': 'D', '2*': 'D', 3: 'D', 4: 'D', 5: 'D', '6' : 'D', '7-9' : 'D' }, + 13: { '1': 'D', '2': 'D', '2*': 'D', 3: 'D', 4: 'D', 5: 'D', '6' : 'D', '7-9' : 'D' }, + 14: { '1': 'D', '2': 'D', '2*': 'D', 3: 'D', 4: 'D', 5: 'D', '6' : 'D', '7-9' : 'D' } + } + def __init__(self,c_id, level, attributes={}) -> None: Adventurer.__init__(self, c_id, level, attributes) self.player_class = Cleric.adv_class self.progression = Cleric.progression - self.hp = roll_dice(self.level, 6) + self.hp_rolls = self.roll_all_hit_points() + self.hp = sum(self.hp_rolls[:self.level]) self.armor = random.choice(list(armor.keys())) self.ac = armor[self.armor] # clerics can only wield blunt weapons @@ -244,79 +314,91 @@ class Cleric(Adventurer): self.possible_weapons = list(filter(lambda d: 'blunt' in d['traits'], weapons)) self.weapons = [ random.choice(self.possible_melee_weapons), random.choice(self.possible_weapons) ] self.spells = Cleric.spells[self.level] - self.spell_book = self.select_spells() + self.spell_book = self.select_spells(cleric_spells) + self.atk = self.set_attack_bonus() + self.turn_undead = self.__class__.turn_undead class Thief(Adventurer): adv_class = "thief" prime_requisite = "dexterity" requirements = None + hit_die = 4 + max_level = 14 progression = [ - { "level" : 1, "xp" : 0, "hit-dice" : 1, "thac0" : 19, "saves" : { "death / poison" : 13, "wands" : 14, "paralysis / petrify" : 13, "breath attack" : 16, "spells / rods / staves" : 15 }}, - { "level" : 2, "xp" : 1200, "hit-dice" : 2, "thac0" : 19, "saves" : { "death / poison" : 13, "wands" : 14, "paralysis / petrify" : 13, "breath attack" : 16, "spells / rods / staves" : 15 }}, - { "level" : 3, "xp" : 2400, "hit-dice" : 3, "thac0" : 19, "saves" : { "death / poison" : 13, "wands" : 14, "paralysis / petrify" : 13, "breath attack" : 16, "spells / rods / staves" : 15 }}, - { "level" : 4, "xp" : 4800, "hit-dice" : 4, "thac0" : 19, "saves" : { "death / poison" : 13, "wands" : 14, "paralysis / petrify" : 13, "breath attack" : 16, "spells / rods / staves" : 15 }}, - { "level" : 5, "xp" : 9600, "hit-dice" : 5, "thac0" : 17, "saves" : { "death / poison" : 12, "wands" : 13, "paralysis / petrify" : 11, "breath attack" : 14, "spells / rods / staves" : 13 }}, - { "level" : 6, "xp" : 20000, "hit-dice" : 6, "thac0" : 17, "saves" : { "death / poison" : 12, "wands" : 13, "paralysis / petrify" : 11, "breath attack" : 14, "spells / rods / staves" : 13 }}, - { "level" : 7, "xp" : 40000, "hit-dice" : 7, "thac0" : 17, "saves" : { "death / poison" : 12, "wands" : 13, "paralysis / petrify" : 11, "breath attack" : 14, "spells / rods / staves" : 13 }}, - { "level" : 8, "xp" : 80000, "hit-dice" : 8, "thac0" : 17, "saves" : { "death / poison" : 12, "wands" : 13, "paralysis / petrify" : 11, "breath attack" : 14, "spells / rods / staves" : 13 }}, - { "level" : 9, "xp" : 160000, "hit-dice" : 9, "thac0" : 14, "saves" : { "death / poison" : 10, "wands" : 11, "paralysis / petrify" : 9, "breath attack" : 11, "spells / rods / staves" : 10 }}, - { "level" : 10, "xp" : 280000, "hit-dice" : 9, "thac0" : 14, "saves" : { "death / poison" : 10, "wands" : 11, "paralysis / petrify" : 9, "breath attack" : 11, "spells / rods / staves" : 10 }}, - { "level" : 11, "xp" : 400000, "hit-dice" : 9, "thac0" : 14, "saves" : { "death / poison" : 10, "wands" : 11, "paralysis / petrify" : 9, "breath attack" : 11, "spells / rods / staves" : 10 }}, - { "level" : 12, "xp" : 520000, "hit-dice" : 9, "thac0" : 14, "saves" : { "death / poison" : 10, "wands" : 11, "paralysis / petrify" : 9, "breath attack" : 11, "spells / rods / staves" : 10 }}, - { "level" : 13, "xp" : 640000, "hit-dice" : 9, "thac0" : 12, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 7, "breath attack" : 10, "spells / rods / staves" : 8 }}, - { "level" : 14, "xp" : 760000, "hit-dice" : 9, "thac0" : 12, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 7, "breath attack" : 10, "spells / rods / staves" : 8 }} + { "level" : 1, "xp" : 0, "hit-dice" : 1, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 13, "wands" : 14, "paralysis / petrify" : 13, "breath attack" : 16, "spells / rods / staves" : 15 }}, + { "level" : 2, "xp" : 1200, "hit-dice" : 2, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 13, "wands" : 14, "paralysis / petrify" : 13, "breath attack" : 16, "spells / rods / staves" : 15 }}, + { "level" : 3, "xp" : 2400, "hit-dice" : 3, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 13, "wands" : 14, "paralysis / petrify" : 13, "breath attack" : 16, "spells / rods / staves" : 15 }}, + { "level" : 4, "xp" : 4800, "hit-dice" : 4, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 13, "wands" : 14, "paralysis / petrify" : 13, "breath attack" : 16, "spells / rods / staves" : 15 }}, + { "level" : 5, "xp" : 9600, "hit-dice" : 5, "hp-mod" : 0, "thac0" : 17, "saves" : { "death / poison" : 12, "wands" : 13, "paralysis / petrify" : 11, "breath attack" : 14, "spells / rods / staves" : 13 }}, + { "level" : 6, "xp" : 20000, "hit-dice" : 6, "hp-mod" : 0, "thac0" : 17, "saves" : { "death / poison" : 12, "wands" : 13, "paralysis / petrify" : 11, "breath attack" : 14, "spells / rods / staves" : 13 }}, + { "level" : 7, "xp" : 40000, "hit-dice" : 7, "hp-mod" : 0, "thac0" : 17, "saves" : { "death / poison" : 12, "wands" : 13, "paralysis / petrify" : 11, "breath attack" : 14, "spells / rods / staves" : 13 }}, + { "level" : 8, "xp" : 80000, "hit-dice" : 8, "hp-mod" : 0, "thac0" : 17, "saves" : { "death / poison" : 12, "wands" : 13, "paralysis / petrify" : 11, "breath attack" : 14, "spells / rods / staves" : 13 }}, + { "level" : 9, "xp" : 160000, "hit-dice" : 9, "hp-mod" : 0, "thac0" : 14, "saves" : { "death / poison" : 10, "wands" : 11, "paralysis / petrify" : 9, "breath attack" : 11, "spells / rods / staves" : 10 }}, + { "level" : 10, "xp" : 280000, "hit-dice" : 9, "hp-mod" : 2, "thac0" : 14, "saves" : { "death / poison" : 10, "wands" : 11, "paralysis / petrify" : 9, "breath attack" : 11, "spells / rods / staves" : 10 }}, + { "level" : 11, "xp" : 400000, "hit-dice" : 9, "hp-mod" : 4, "thac0" : 14, "saves" : { "death / poison" : 10, "wands" : 11, "paralysis / petrify" : 9, "breath attack" : 11, "spells / rods / staves" : 10 }}, + { "level" : 12, "xp" : 520000, "hit-dice" : 9, "hp-mod" : 6, "thac0" : 14, "saves" : { "death / poison" : 10, "wands" : 11, "paralysis / petrify" : 9, "breath attack" : 11, "spells / rods / staves" : 10 }}, + { "level" : 13, "xp" : 640000, "hit-dice" : 9, "hp-mod" : 8, "thac0" : 12, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 7, "breath attack" : 10, "spells / rods / staves" : 8 }}, + { "level" : 14, "xp" : 760000, "hit-dice" : 9, "hp-mod" : 10, "thac0" : 12, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 7, "breath attack" : 10, "spells / rods / staves" : 8 }} ] def __init__(self,c_id, level, attributes={}) -> None: Adventurer.__init__(self, c_id, level, attributes) self.player_class = Thief.adv_class self.progression = Thief.progression - self.hp = roll_dice(self.level, 4) + self.hp_rolls = self.roll_all_hit_points() + self.hp = sum(self.hp_rolls[:self.level]) self.armor = random.choice(list(armor.keys())) self.ac = armor[self.armor] + self.atk = self.set_attack_bonus() class Dwarf(Adventurer): adv_class = "dwarf" - prime_requisite = "strength" requirements = {'constitution' : 9 } + prime_requisite = "strength" + hit_die = 8 + max_level = 12 progression = [ - { "level" : 1, "xp" : 0, "hit-dice" : 1, "thac0" : 19, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 10, "breath attack" : 13, "spells / rods / staves" : 12 }}, - { "level" : 2, "xp" : 2200, "hit-dice" : 2, "thac0" : 19, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 10, "breath attack" : 13, "spells / rods / staves" : 12 }}, - { "level" : 3, "xp" : 4400, "hit-dice" : 3, "thac0" : 19, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 10, "breath attack" : 13, "spells / rods / staves" : 12 }}, - { "level" : 4, "xp" : 8800, "hit-dice" : 4, "thac0" : 17, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 8, "breath attack" : 10, "spells / rods / staves" : 10 }}, - { "level" : 5, "xp" : 17000, "hit-dice" : 5, "thac0" : 17, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 8, "breath attack" : 10, "spells / rods / staves" : 10 }}, - { "level" : 6, "xp" : 35000, "hit-dice" : 6, "thac0" : 17, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 8, "breath attack" : 10, "spells / rods / staves" : 10 }}, - { "level" : 7, "xp" : 70000, "hit-dice" : 7, "thac0" : 14, "saves" : { "death / poison" : 4, "wands" : 5, "paralysis / petrify" : 6, "breath attack" : 7, "spells / rods / staves" : 8 }}, - { "level" : 8, "xp" : 140000, "hit-dice" : 8, "thac0" : 14, "saves" : { "death / poison" : 4, "wands" : 5, "paralysis / petrify" : 6, "breath attack" : 7, "spells / rods / staves" : 8 }}, - { "level" : 9, "xp" : 270000, "hit-dice" : 9, "thac0" : 14, "saves" : { "death / poison" : 4, "wands" : 5, "paralysis / petrify" : 6, "breath attack" : 7, "spells / rods / staves" : 8 }}, - { "level" : 10, "xp" : 400000, "hit-dice" : 9, "thac0" : 12, "saves" : { "death / poison" : 2, "wands" : 3, "paralysis / petrify" : 4, "breath attack" : 4, "spells / rods / staves" : 6 }}, - { "level" : 11, "xp" : 530000, "hit-dice" : 9, "thac0" : 12, "saves" : { "death / poison" : 2, "wands" : 3, "paralysis / petrify" : 4, "breath attack" : 4, "spells / rods / staves" : 6 }}, - { "level" : 12, "xp" : 660000, "hit-dice" : 9, "thac0" : 12, "saves" : { "death / poison" : 2, "wands" : 3, "paralysis / petrify" : 4, "breath attack" : 4, "spells / rods / staves" : 6 }} + { "level" : 1, "xp" : 0, "hit-dice" : 1, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 10, "breath attack" : 13, "spells / rods / staves" : 12 }}, + { "level" : 2, "xp" : 2200, "hit-dice" : 2, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 10, "breath attack" : 13, "spells / rods / staves" : 12 }}, + { "level" : 3, "xp" : 4400, "hit-dice" : 3, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 10, "breath attack" : 13, "spells / rods / staves" : 12 }}, + { "level" : 4, "xp" : 8800, "hit-dice" : 4, "hp-mod" : 0, "thac0" : 17, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 8, "breath attack" : 10, "spells / rods / staves" : 10 }}, + { "level" : 5, "xp" : 17000, "hit-dice" : 5, "hp-mod" : 0, "thac0" : 17, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 8, "breath attack" : 10, "spells / rods / staves" : 10 }}, + { "level" : 6, "xp" : 35000, "hit-dice" : 6, "hp-mod" : 0, "thac0" : 17, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 8, "breath attack" : 10, "spells / rods / staves" : 10 }}, + { "level" : 7, "xp" : 70000, "hit-dice" : 7, "hp-mod" : 0, "thac0" : 14, "saves" : { "death / poison" : 4, "wands" : 5, "paralysis / petrify" : 6, "breath attack" : 7, "spells / rods / staves" : 8 }}, + { "level" : 8, "xp" : 140000, "hit-dice" : 8, "hp-mod" : 0, "thac0" : 14, "saves" : { "death / poison" : 4, "wands" : 5, "paralysis / petrify" : 6, "breath attack" : 7, "spells / rods / staves" : 8 }}, + { "level" : 9, "xp" : 270000, "hit-dice" : 9, "hp-mod" : 0, "thac0" : 14, "saves" : { "death / poison" : 4, "wands" : 5, "paralysis / petrify" : 6, "breath attack" : 7, "spells / rods / staves" : 8 }}, + { "level" : 10, "xp" : 400000, "hit-dice" : 9, "hp-mod" : 3, "thac0" : 12, "saves" : { "death / poison" : 2, "wands" : 3, "paralysis / petrify" : 4, "breath attack" : 4, "spells / rods / staves" : 6 }}, + { "level" : 11, "xp" : 530000, "hit-dice" : 9, "hp-mod" : 6, "thac0" : 12, "saves" : { "death / poison" : 2, "wands" : 3, "paralysis / petrify" : 4, "breath attack" : 4, "spells / rods / staves" : 6 }}, + { "level" : 12, "xp" : 660000, "hit-dice" : 9, "hp-mod" : 9, "thac0" : 12, "saves" : { "death / poison" : 2, "wands" : 3, "paralysis / petrify" : 4, "breath attack" : 4, "spells / rods / staves" : 6 }} ] def __init__(self,c_id, level, attributes={}) -> None: Adventurer.__init__(self, c_id, level, attributes) self.player_class = Dwarf.adv_class self.progression = Dwarf.progression - self.hp = roll_dice(self.level, 8) + self.hp_rolls = self.roll_all_hit_points() + self.hp = sum(self.hp_rolls[:self.level]) self.armor = random.choice(list(armor.keys())) self.ac = armor[self.armor] + self.atk = self.set_attack_bonus() class Elf(Adventurer): adv_class = "elf" - prime_requisite = "intellgence" requirements = {'intelligence' : 9 } + prime_requisite = "intellgence" + hit_die = 6 + max_level = 10 progression = [ - { "level" : 1, "xp" : 0, "hit-dice" : 1, "thac0" : 19, "saves" : { "death / poison" : 12, "wands" : 13, "paralysis / petrify" : 13, "breath attack" : 15, "spells / rods / staves" : 15 }}, - { "level" : 2, "xp" : 4000, "hit-dice" : 2, "thac0" : 19, "saves" : { "death / poison" : 12, "wands" : 13, "paralysis / petrify" : 13, "breath attack" : 15, "spells / rods / staves" : 15 }}, - { "level" : 3, "xp" : 8000, "hit-dice" : 3, "thac0" : 19, "saves" : { "death / poison" : 12, "wands" : 13, "paralysis / petrify" : 13, "breath attack" : 15, "spells / rods / staves" : 15 }}, - { "level" : 4, "xp" : 16000, "hit-dice" : 4, "thac0" : 17, "saves" : { "death / poison" : 10, "wands" : 11, "paralysis / petrify" : 11, "breath attack" : 13, "spells / rods / staves" : 12 }}, - { "level" : 5, "xp" : 32000, "hit-dice" : 5, "thac0" : 17, "saves" : { "death / poison" : 10, "wands" : 11, "paralysis / petrify" : 11, "breath attack" : 13, "spells / rods / staves" : 12 }}, - { "level" : 6, "xp" : 64000, "hit-dice" : 6, "thac0" : 17, "saves" : { "death / poison" : 10, "wands" : 11, "paralysis / petrify" : 11, "breath attack" : 13, "spells / rods / staves" : 12 }}, - { "level" : 7, "xp" : 120000, "hit-dice" : 7, "thac0" : 14, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 9, "breath attack" : 10, "spells / rods / staves" : 10 }}, - { "level" : 8, "xp" : 250000, "hit-dice" : 8, "thac0" : 14, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 9, "breath attack" : 10, "spells / rods / staves" : 10 }}, - { "level" : 9, "xp" : 400000, "hit-dice" : 9, "thac0" : 14, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 9, "breath attack" : 10, "spells / rods / staves" : 10 }}, - { "level" : 10, "xp" : 600000, "hit-dice" : 9, "thac0" : 12, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 8, "breath attack" : 8, "spells / rods / staves" : 8 }} - ] - spells = { + { "level" : 1, "xp" : 0, "hit-dice" : 1, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 12, "wands" : 13, "paralysis / petrify" : 13, "breath attack" : 15, "spells / rods / staves" : 15 }}, + { "level" : 2, "xp" : 4000, "hit-dice" : 2, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 12, "wands" : 13, "paralysis / petrify" : 13, "breath attack" : 15, "spells / rods / staves" : 15 }}, + { "level" : 3, "xp" : 8000, "hit-dice" : 3, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 12, "wands" : 13, "paralysis / petrify" : 13, "breath attack" : 15, "spells / rods / staves" : 15 }}, + { "level" : 4, "xp" : 16000, "hit-dice" : 4, "hp-mod" : 0, "thac0" : 17, "saves" : { "death / poison" : 10, "wands" : 11, "paralysis / petrify" : 11, "breath attack" : 13, "spells / rods / staves" : 12 }}, + { "level" : 5, "xp" : 32000, "hit-dice" : 5, "hp-mod" : 0, "thac0" : 17, "saves" : { "death / poison" : 10, "wands" : 11, "paralysis / petrify" : 11, "breath attack" : 13, "spells / rods / staves" : 12 }}, + { "level" : 6, "xp" : 64000, "hit-dice" : 6, "hp-mod" : 0, "thac0" : 17, "saves" : { "death / poison" : 10, "wands" : 11, "paralysis / petrify" : 11, "breath attack" : 13, "spells / rods / staves" : 12 }}, + { "level" : 7, "xp" : 120000, "hit-dice" : 7, "hp-mod" : 0, "thac0" : 14, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 9, "breath attack" : 10, "spells / rods / staves" : 10 }}, + { "level" : 8, "xp" : 250000, "hit-dice" : 8, "hp-mod" : 0, "thac0" : 14, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 9, "breath attack" : 10, "spells / rods / staves" : 10 }}, + { "level" : 9, "xp" : 400000, "hit-dice" : 9, "hp-mod" : 0, "thac0" : 14, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 9, "breath attack" : 10, "spells / rods / staves" : 10 }}, + { "level" : 10, "xp" : 600000, "hit-dice" : 9, "hp-mod" : 2, "thac0" : 12, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 8, "breath attack" : 8, "spells / rods / staves" : 8 }} + ] + spells = { 1: { 1: 1, 2: '-', 3: '-', 4: '-', 5: '-', 6: '-'}, 2: { 1: 2, 2: '-', 3: '-', 4: '-', 5: '-', 6: '-'}, 3: { 1: 2, 2: 1, 3: '-', 4: '-', 5: '-', 6: '-'}, @@ -332,30 +414,36 @@ class Elf(Adventurer): Adventurer.__init__(self, c_id, level, attributes) self.player_class = Elf.adv_class self.progression = Elf.progression - self.hp = roll_dice(self.level, 6) + self.hp_rolls = self.roll_all_hit_points() + self.hp = sum(self.hp_rolls[:self.level]) self.armor = random.choice(list(armor.keys())) self.ac = armor[self.armor] self.spells = Elf.spells[self.level] - self.spell_book = self.select_spells() + self.spell_book = self.select_spells(magic_user_spells) + self.atk = self.set_attack_bonus() class Halfling(Adventurer): adv_class = "halfling" - prime_requisite = "dexterity" requirements = {'constitution' : 9, 'dexterity' : 9 } + prime_requisite = "dexterity" + hit_die = 6 + max_level = 8 progression = [ - { "level" : 1, "xp" : 0, "hit-dice" : 1, "thac0" : 19, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 10, "breath attack" : 13, "spells / rods / staves" : 12 }}, - { "level" : 2, "xp" : 2000, "hit-dice" : 2, "thac0" : 19, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 10, "breath attack" : 13, "spells / rods / staves" : 12 }}, - { "level" : 3, "xp" : 4000, "hit-dice" : 3, "thac0" : 19, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 10, "breath attack" : 13, "spells / rods / staves" : 12 }}, - { "level" : 4, "xp" : 8000, "hit-dice" : 4, "thac0" : 17, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 8, "breath attack" : 10, "spells / rods / staves" : 10 }}, - { "level" : 5, "xp" : 16000, "hit-dice" : 5, "thac0" : 17, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 8, "breath attack" : 10, "spells / rods / staves" : 10 }}, - { "level" : 6, "xp" : 32000, "hit-dice" : 6, "thac0" : 17, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 8, "breath attack" : 10, "spells / rods / staves" : 10 }}, - { "level" : 7, "xp" : 64000, "hit-dice" : 7, "thac0" : 14, "saves" : { "death / poison" : 4, "wands" : 5, "paralysis / petrify" : 6, "breath attack" : 7, "spells / rods / staves" : 8 }}, - { "level" : 8, "xp" : 120000, "hit-dice" : 8, "thac0" : 14, "saves" : { "death / poison" : 4, "wands" : 5, "paralysis / petrify" : 6, "breath attack" : 7, "spells / rods / staves" : 8 }}, + { "level" : 1, "xp" : 0, "hit-dice" : 1, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 10, "breath attack" : 13, "spells / rods / staves" : 12 }}, + { "level" : 2, "xp" : 2000, "hit-dice" : 2, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 10, "breath attack" : 13, "spells / rods / staves" : 12 }}, + { "level" : 3, "xp" : 4000, "hit-dice" : 3, "hp-mod" : 0, "thac0" : 19, "saves" : { "death / poison" : 8, "wands" : 9, "paralysis / petrify" : 10, "breath attack" : 13, "spells / rods / staves" : 12 }}, + { "level" : 4, "xp" : 8000, "hit-dice" : 4, "hp-mod" : 0, "thac0" : 17, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 8, "breath attack" : 10, "spells / rods / staves" : 10 }}, + { "level" : 5, "xp" : 16000, "hit-dice" : 5, "hp-mod" : 0, "thac0" : 17, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 8, "breath attack" : 10, "spells / rods / staves" : 10 }}, + { "level" : 6, "xp" : 32000, "hit-dice" : 6, "hp-mod" : 0, "thac0" : 17, "saves" : { "death / poison" : 6, "wands" : 7, "paralysis / petrify" : 8, "breath attack" : 10, "spells / rods / staves" : 10 }}, + { "level" : 7, "xp" : 64000, "hit-dice" : 7, "hp-mod" : 0, "thac0" : 14, "saves" : { "death / poison" : 4, "wands" : 5, "paralysis / petrify" : 6, "breath attack" : 7, "spells / rods / staves" : 8 }}, + { "level" : 8, "xp" : 120000, "hit-dice" : 8, "hp-mod" : 0, "thac0" : 14, "saves" : { "death / poison" : 4, "wands" : 5, "paralysis / petrify" : 6, "breath attack" : 7, "spells / rods / staves" : 8 }}, ] def __init__(self,c_id, level, attributes={}) -> None: Adventurer.__init__(self, c_id, level, attributes) self.player_class = Halfling.adv_class self.progression = Halfling.progression - self.hp = roll_dice(self.level, 6) + self.hp_rolls = self.roll_all_hit_points() + self.hp = sum(self.hp_rolls[:self.level]) self.armor = random.choice(list(armor.keys())) self.ac = armor[self.armor] + self.atk = self.set_attack_bonus() diff --git a/app.py b/app.py index f439c63..32254d6 100644 --- a/app.py +++ b/app.py @@ -29,7 +29,6 @@ def party(): adv_party = returnParty(count, level) # check for cookies present if request.cookies: - print('there are cookies') stored_count = len(request.cookies) #print(request.cookies) for c in request.cookies: @@ -42,24 +41,18 @@ def party(): stored_adv_party.append(new_char) # if request arguments match the adventure party count & level stored in the cookies, just use the cookies if cache == 'true': - print('caching is true') if level != stored_level: - print(f'change party level to {level}') for adv in stored_adv_party: - print('...editing') adv.set_level(level) print(adv.level) if count == stored_count: - print('counts and levels are the same') adv_party.set_party(stored_adv_party, count, level) if count > stored_count: - print('extend the party!') extension = count - stored_count more_party_members = returnParty(extension,level).adventurers extended_party = stored_adv_party + more_party_members adv_party.set_party(extended_party, count, level) if count < stored_count: - print('reduce the party!') reduction = count - stored_count reduced_party = stored_adv_party[:reduction] adv_party.set_party(reduced_party, count, level) diff --git a/main.py b/main.py index e05c87d..a8884dd 100755 --- a/main.py +++ b/main.py @@ -118,13 +118,19 @@ def createCharacterWithDict(character_dict): def main(): - adventurer_party = returnParty(party_size=2, party_level=2) - for adv in adventurer_party.adventurers: - print(adv.adv_class) + #adventurer_party = returnParty(party_size=2, party_level=2) + #for adv in adventurer_party.adventurers: + # print(adv.adv_class, adv.level) + # adv.set_level(10) + # print(adv.adv_class, adv.level) adv_dict = Adventurer.get_subclass_dict() test_class = adv_dict['fighter'] - new_char = test_class(c_id="adv-1",level=1) + new_char = test_class(c_id="adv-1",level=5) print(new_char.adv_class) + print(new_char.level) + print(new_char.hp_rolls) + print(new_char.hp) + print(new_char.atk) if __name__ == "__main__": main() diff --git a/spells.py b/spells.py index b3fd27f..a4ef2e2 100644 --- a/spells.py +++ b/spells.py @@ -3,5 +3,16 @@ magic_user_spells = { 1 : [ "charm person", "detect magic", "floating disc", "hold portal", "light (darkness)", "magic missile", "protection from evil", "read languages", "shield", "sleep", "ventriloquism" ], 2 : [ "continual light", "detect evil", "detect invisible", "ESP", "invisibility", "knock", "levitate", "locate object", "mirror image", "phantasmal force", "web", "wizard lock" ], - 3 : [ "clairvoyance", "dispel magic", "fire ball", "fly", "haste", "hold person", "infravision", "invisibility 10'", "lightning bolt", "protection from evil 10'", "protection from normal missiles", "water breathing" ] + 3 : [ "clairvoyance", "dispel magic", "fire ball", "fly", "haste", "hold person", "infravision", "invisibility 10'", "lightning bolt", "protection from evil 10'", "protection from normal missiles", "water breathing" ], + 4 : [ "charm monster", "confusion", "dimension door", "growth of plants", "hallucinatory terrain", "massmorph", "polymorph others", "polymorph self", "remove curse", "wall of fire", "wall of ice", "wizard eye" ], + 5 : [ "animate dead", "cloudkill", "conjure elemental", "contact higher plane", "feeblemind", "hold monster", "magic jar", "pass-wall", "telekinesis", "teleport", "transmute rock to mud", "wall of stone" ], + 6 : [ "anti-magic shell", "control weather", "death spell", "disintegrate", "geas", "invisible stalker", "lower water", "move earth", "part water", "project image", "reincarnation", "stone to flesh" ] +} + +cleric_spells = { + 1 : [ "cure light wounds", "detect evil", "detect magic", "light (darkness)", "protection from evil", "purify food and water", "remove fear", "resist cold"], + 2 : [ "bless", "find traps", "hold person", "know alignment", "resist fire", "silence 15'", "snake charm", "speak with animals" ], + 3 : [ "continual light", "cure disease", "growth of animal", "locate object", "remove curse", "striking" ], + 4 : [ "create water", "cure serious wounds", "neutralize poison", "protection from evil 10'", "speak with plants", "sticks to snakes" ], + 5 : [ "commune", "create food", "dispel evil", "insect plague", "quest", "raise dead" ] } diff --git a/templates/character.html b/templates/character.html index 2042ee2..ee18ac9 100644 --- a/templates/character.html +++ b/templates/character.html @@ -22,12 +22,9 @@ @@ -37,12 +34,71 @@
-

Welcome to the Dungeon

-
+
+

{{character.adv_class.title()}} - Level {{character.level}}

-
-
{{character.vertical_sheet() | join("\n")}}
+
+ + + + + + + + +
Ability ScoresSaving Throws
Strength{{character.strength}}Death / Poison{{character.progression[character.level]['saves']['death / poison']}}
Intelligence{{character.intelligence}}Magic Wands{{character.progression[character.level]['saves']['wands']}}
Wisdom{{character.wisdom}}Paralysis / Petrification{{character.progression[character.level]['saves']['paralysis / petrify']}}
Dexterity{{character.dexterity}}Breath Attacks{{character.progression[character.level]['saves']['breath attack']}}
Constitution{{character.constitution}}Spells, Rods, Staves{{character.progression[character.level]['saves']['spells / rods / staves']}}
Charisma{{character.charisma}}Wisdom Mod. to Saves v. Magic+1
+
+ + + + + +
CombatDungeon Gear
Hit Points{{character.hp}}Torches{{character.torches}}
Armor Class{{character.ac}}Rations{{character.rations}}
Attack Bonus{{character.atk}}Gold{{character.gold}}
+
+
+
+
+ + + {% for e in character.equipment %} + + {% endfor %} +
Equipment
{{e}}
+
+ {% if character.spells %} +
+
Spellbook
+ + + {%for spell in character.spell_book %} + + {%endfor%} +
Spellname
{{spell}}
+
+ {% endif %} + {% if character.turn_undead %} +
+
Turn Undead
+ + + {%for k,v in character.turn_undead['1'].items() %} + + {%endfor%} +
Monster Hit DieRoll to Turn
{{k}} Hit Die{{v}}
+
+ {% endif %} + {% if character.thief_skills %} +
+
Thief Skills
+ + + {%for spell in character.spell_book %} + + {%endfor%} +
Thief Skills
{{spell}}
+
+ {% endif %}
diff --git a/templates/index.html b/templates/index.html index 158f3d1..c7b4e95 100644 --- a/templates/index.html +++ b/templates/index.html @@ -12,29 +12,22 @@
diff --git a/templates/party_sheet.html b/templates/party_sheet.html index 0dfb86c..3df7ae2 100644 --- a/templates/party_sheet.html +++ b/templates/party_sheet.html @@ -23,12 +23,9 @@ @@ -66,10 +63,10 @@
-

Change character preservation? {{cache}}

+

Preserve adventurers?

{% if cache == 'true' %} - are cached + cached not cached {% else %} are cached