single character sheet improvements
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
304
adventurers.py
304
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 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,77 +314,89 @@ 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 }}
|
||||
{ "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: '-'},
|
||||
@@ -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()
|
||||
|
||||
7
app.py
7
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)
|
||||
|
||||
14
main.py
14
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()
|
||||
|
||||
13
spells.py
13
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" ]
|
||||
}
|
||||
|
||||
@@ -22,12 +22,9 @@
|
||||
|
||||
<div id="navbarBasicExample" class="navbar-menu">
|
||||
<div class="navbar-start">
|
||||
<a class="navbar-item" href="party?cache=true">
|
||||
Generate Adventurer Party
|
||||
</a>
|
||||
<a class="navbar-item" href="character">
|
||||
Generate Single Adventurer
|
||||
</a>
|
||||
<a class="navbar-item" href="/">Home</a>
|
||||
<a class="navbar-item" href="party?cache=true">Generate Adventurer Party</a>
|
||||
<a class="navbar-item" href="character">Generate Single Adventurer</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -37,12 +34,71 @@
|
||||
<div class="content">
|
||||
<div class="card-content">
|
||||
<div class="content">
|
||||
<h2>Welcome to the Dungeon</h2>
|
||||
<div class="block has-text-centered">
|
||||
<div class="block">
|
||||
<h3>{{character.adv_class.title()}} - Level {{character.level}}</h3>
|
||||
<div class="columns">
|
||||
<div class="column" >
|
||||
<pre>{{character.vertical_sheet() | join("\n")}}</pre>
|
||||
<div class="column">
|
||||
<table class="table">
|
||||
<thead><tr><th>Ability Scores</th><th></th><th>Saving Throws</th><th></th></tr></thead>
|
||||
<tbody><tr><th>Strength</th><td>{{character.strength}}</td><th>Death / Poison</th><td>{{character.progression[character.level]['saves']['death / poison']}}</tr></tbody>
|
||||
<tbody><tr><th>Intelligence</th><td>{{character.intelligence}}</td><th>Magic Wands</th><td>{{character.progression[character.level]['saves']['wands']}}</tr></tbody>
|
||||
<tbody><tr><th>Wisdom</th><td>{{character.wisdom}}</td><th>Paralysis / Petrification</th><td>{{character.progression[character.level]['saves']['paralysis / petrify']}}</tr></tbody>
|
||||
<tbody><tr><th>Dexterity</th><td>{{character.dexterity}}</td><th>Breath Attacks</th><td>{{character.progression[character.level]['saves']['breath attack']}}</tr></tbody>
|
||||
<tbody><tr><th>Constitution</th><td>{{character.constitution}}</td><th>Spells, Rods, Staves</th><td>{{character.progression[character.level]['saves']['spells / rods / staves']}}</tr></tbody>
|
||||
<tbody><tr><th>Charisma</th><td>{{character.charisma}}</td><th>Wisdom Mod. to Saves v. Magic</th><td>+1</tr></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="column">
|
||||
<table class="table">
|
||||
<thead><tr><th>Combat</th><th></th><th>Dungeon Gear</th><th></th></thead>
|
||||
<tbody><tr><th>Hit Points</th><td>{{character.hp}}</td><th>Torches</th><td>{{character.torches}}</td></tr></tbody>
|
||||
<tbody><tr><th>Armor Class</th><td>{{character.ac}}</td><th>Rations</th><td>{{character.rations}}</td></tr></tbody>
|
||||
<tbody><tr><th>Attack Bonus</th><td>{{character.atk}}</td><th>Gold</th><td>{{character.gold}}</td></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<table class="table">
|
||||
<thead><tr><th>Equipment</th><th></th><th></th><th></th></tr></thead>
|
||||
{% for e in character.equipment %}
|
||||
<tbody><tr><th>{{e}}</th></tr></tbody>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% if character.spells %}
|
||||
<div class="column">
|
||||
<h5>Spellbook</h5>
|
||||
<table class="table">
|
||||
<thead><tr><th>Spellname</th><th></th><th></th><th></th></thead>
|
||||
{%for spell in character.spell_book %}
|
||||
<tbody><tr><th>{{spell}}</th><td></td><th></th><td></td></tr></tbody>
|
||||
{%endfor%}
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if character.turn_undead %}
|
||||
<div class="column">
|
||||
<h5>Turn Undead</h5>
|
||||
<table class="table">
|
||||
<thead><tr><th>Monster Hit Die</th><th>Roll to Turn</th><th></th><th></th></thead>
|
||||
{%for k,v in character.turn_undead['1'].items() %}
|
||||
<tbody><tr><th>{{k}} Hit Die</th><td>{{v}}</td><th></th><td></td></tr></tbody>
|
||||
{%endfor%}
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if character.thief_skills %}
|
||||
<div class="column">
|
||||
<h5>Thief Skills</h5>
|
||||
<table class="table">
|
||||
<thead><tr><th>Thief Skills</th><th></th><th></th><th></th></thead>
|
||||
{%for spell in character.spell_book %}
|
||||
<tbody><tr><th>{{spell}}</th><td></td><th></th><td></td></tr></tbody>
|
||||
{%endfor%}
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -23,18 +23,11 @@
|
||||
|
||||
<div id="navbarBasicExample" class="navbar-menu">
|
||||
<div class="navbar-start">
|
||||
<a class="navbar-item" href="party?cache=true">
|
||||
Generate Adventurer Party
|
||||
</a>
|
||||
|
||||
<a class="navbar-item" href="character">
|
||||
Generate Single Adventurer
|
||||
</a>
|
||||
|
||||
<a class="navbar-item" href="/">Home</a>
|
||||
<a class="navbar-item" href="party?cache=true">Generate Adventurer Party</a>
|
||||
<a class="navbar-item" href="character">Generate Single Adventurer</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="card">
|
||||
|
||||
@@ -23,12 +23,9 @@
|
||||
|
||||
<div id="navbarBasicExample" class="navbar-menu">
|
||||
<div class="navbar-start">
|
||||
<a class="navbar-item" href="party?cache=true">
|
||||
Generate Adventurer Party
|
||||
</a>
|
||||
<a class="navbar-item" href="character">
|
||||
Generate Single Adventurer
|
||||
</a>
|
||||
<a class="navbar-item" href="/">Home</a>
|
||||
<a class="navbar-item" href="party?cache=true">Generate Adventurer Party</a>
|
||||
<a class="navbar-item" href="character">Generate Single Adventurer</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -66,10 +63,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="column" >
|
||||
<p>Change character preservation? {{cache}}</p>
|
||||
<p>Preserve adventurers?</p>
|
||||
<div class="buttons">
|
||||
{% if cache == 'true' %}
|
||||
<a class="button is-primary">are cached</a>
|
||||
<a class="button is-primary">cached</a>
|
||||
<a class="button is-danger is-outlined" href="{{ '/party?count={}&level={}&cache=false'.format(count,level) }}">not cached</a>
|
||||
{% else %}
|
||||
<a class="button is-primary is-outlined" href="{{ '/party?count={}&level={}&cache=true'.format(count,level) }}">are cached</a>
|
||||
|
||||
Reference in New Issue
Block a user