added new spell functions and custom weapons

This commit is contained in:
Ben Cook
2018-12-19 14:33:24 -05:00
parent e9d3bf989c
commit db76a1924a
5 changed files with 39 additions and 5 deletions
+3 -1
View File
@@ -81,7 +81,7 @@ class Character():
nature = Skill(ability='intelligence') nature = Skill(ability='intelligence')
perception = Skill(ability='wisdom') perception = Skill(ability='wisdom')
performance = Skill(ability='charisma') performance = Skill(ability='charisma')
persuasian = Skill(ability='charisma') persuasion = Skill(ability='charisma')
religion = Skill(ability='intelligence') religion = Skill(ability='intelligence')
sleight_of_hand = Skill(ability='dexterity') sleight_of_hand = Skill(ability='dexterity')
stealth = Skill(ability='dexterity') stealth = Skill(ability='dexterity')
@@ -411,6 +411,8 @@ class Character():
"""Armor class, including contributions from worn armor and shield.""" """Armor class, including contributions from worn armor and shield."""
# ## TODO: # ## TODO:
# Implement AC functions by class # Implement AC functions by class
if hasattr(self, 'force_AC'):
return self.force_AC
# Retrieve current armor (or a generic armor substitute) # Retrieve current armor (or a generic armor substitute)
armor = self.armor if self.armor is not None else NoArmor() armor = self.armor if self.armor is not None else NoArmor()
shield = self.shield if self.shield is not None else NoShield() shield = self.shield if self.shield is not None else NoShield()
+2 -2
View File
@@ -231,7 +231,7 @@ def create_character_pdf(char, basename, flatten=False):
'Nature': mod_str(char.nature), 'Nature': mod_str(char.nature),
'Perception ': mod_str(char.perception), 'Perception ': mod_str(char.perception),
'Performance': mod_str(char.performance), 'Performance': mod_str(char.performance),
'Persuasion': mod_str(char.persuasian), 'Persuasion': mod_str(char.persuasion),
'Religion': mod_str(char.religion), 'Religion': mod_str(char.religion),
'SleightofHand': mod_str(char.sleight_of_hand), 'SleightofHand': mod_str(char.sleight_of_hand),
'Stealth ': mod_str(char.stealth), 'Stealth ': mod_str(char.stealth),
@@ -279,7 +279,7 @@ def create_character_pdf(char, basename, flatten=False):
'nature': 'Check Box 33', 'nature': 'Check Box 33',
'perception': 'Check Box 34', 'perception': 'Check Box 34',
'performance': 'Check Box 35', 'performance': 'Check Box 35',
'persuasian': 'Check Box 36', 'persuasion': 'Check Box 36',
'religion': 'Check Box 37', 'religion': 'Check Box 37',
'sleight_of_hand': 'Check Box 38', 'sleight_of_hand': 'Check Box 38',
'stealth': 'Check Box 39', 'stealth': 'Check Box 39',
+23 -1
View File
@@ -5,7 +5,7 @@ __all__ = ('Dwarf', 'HillDwarf', 'MountainDwarf', 'Elf', 'HighElf',
'WoodElf', 'DarkElf', 'Halfling', 'LightfootHalfling', 'WoodElf', 'DarkElf', 'Halfling', 'LightfootHalfling',
'StoutHalfling', 'Human', 'Dragonborn', 'Gnome', 'ForestGnome', 'StoutHalfling', 'Human', 'Dragonborn', 'Gnome', 'ForestGnome',
'RockGnome', 'HalfElf', 'HalfOrc', 'Tiefling', 'Aasimar', 'RockGnome', 'HalfElf', 'HalfOrc', 'Tiefling', 'Aasimar',
'FallenAasimar') 'FallenAasimar', 'Lizardfolk', 'Kenku')
class Race(): class Race():
@@ -192,3 +192,25 @@ class Aasimar(Race):
class FallenAasimar(Aasimar): class FallenAasimar(Aasimar):
name = "Fallen Aasimar" name = "Fallen Aasimar"
strength_bonus = 1 strength_bonus = 1
# Lizardfolk
class Lizardfolk(Race):
name = 'Lizardfolk'
size = 'medium'
speed = """30 (+swim)"""
constitution_bonus = 2
wisdom_bonus = 1
languages = ('Common', 'Draconic')
weapon_proficiencies = (weapons.Bite,)
proficiencies_text = ('bite',)
# Kenku
class Kenku(Race):
name = 'Kenku'
size = 'medium'
speed = 30
dexterity_bonus = 2
wisdom_bonus = 1
languages = ('Common', 'Auran')
+1 -1
View File
@@ -24,7 +24,7 @@ class Spell():
name = "Unknown spell" name = "Unknown spell"
casting_time = "1 action" casting_time = "1 action"
casting_range = "60 ft" casting_range = "60 ft"
components = ("V", "S") components = ()
materials = "" materials = ""
duration = "instantaneous" duration = "instantaneous"
ritual = False ritual = False
+10
View File
@@ -435,6 +435,16 @@ class HeavyLeft(MonkUnarmed):
attack_bonus = -5 # Heavy weapon master attack_bonus = -5 # Heavy weapon master
class Bite(Weapon):
name = "Bite"
base_damage = "1d4"
damage_type = 'p'
cost = "0 gp"
weight = 0
properties = ""
ability = "strength"
# Some lists of weapons for easy proficiency resolution # Some lists of weapons for easy proficiency resolution
simple_melee_weapons = (Club, Dagger, Greatclub, Handaxe, Javelin, simple_melee_weapons = (Club, Dagger, Greatclub, Handaxe, Javelin,
LightHammer, Mace, Quarterstaff, Sickle, Spear) LightHammer, Mace, Quarterstaff, Sickle, Spear)