single character sheet improvements
This commit is contained in:
312
adventurers.py
312
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()
|
||||
|
||||
Reference in New Issue
Block a user