Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
speed = "30 (30 swim)"
features = (feats.Amphibious, feats.ControlAirAndWater,
feats.EmissaryOfTheSea, feats.GuardiansOfTheDepths)
languages = ("Common", "Primordial")
spells_known = (spells.FogCloud,)
# Aarakocra
class Aarakocra(Race):
name = 'Aarakocra'
size = 'medium'
speed = "25 (50 fly)"
dexterity_bonus = 2
wisdom_bonus = 1
languages = ('Common', 'Aarakocra', 'Auran')
weapon_proficiencies = (weapons.Talons,)
proficiences_text = ('Talons',)
def __init__(self, owner=None):
super().__init__(owner=owner)
self.owner.wield_weapon("talons")
# Genasi
class _Genasi(Race):
name = "Genasi"
constitution_bonus = 2
size = 'medium'
speed = 30
languages = ("Common", 'Primoridal')
class_name = 'Druid'
circle = "" # moon, land
_wild_shapes = ()
hit_dice_faces = 8
saving_throw_proficiencies = ('intelligence', 'wisdom')
spellcasting_ability = 'wisdom'
languages = 'Druidic'
_proficiencies_text = (
'Light armor', 'medium armor',
'shields (druids will not wear armor or use shields made of metal)',
'clubs', 'daggers', 'darts', 'javelins', 'maces', 'quarterstaffs',
'scimitars', 'sickles', 'slings', 'spears')
weapon_proficiencies = (weapons.Club, weapons.Dagger, weapons.Dart,
weapons.Javelin, weapons.Mace,
weapons.Quarterstaff, weapons.Scimitar,
weapons.Sickle, weapons.Sling, weapons.Spear)
class_skill_choices = ('Arcana', 'Animal Handling', 'Insight',
'Medicine', 'Nature', 'Perception', 'Religion',
'Survival')
spell_slots_by_level = {
1: (2, 2, 0, 0, 0, 0, 0, 0, 0, 0),
2: (2, 3, 0, 0, 0, 0, 0, 0, 0, 0),
3: (2, 4, 2, 0, 0, 0, 0, 0, 0, 0),
4: (3, 4, 3, 0, 0, 0, 0, 0, 0, 0),
5: (3, 4, 3, 2, 0, 0, 0, 0, 0, 0),
6: (3, 4, 3, 3, 0, 0, 0, 0, 0, 0),
7: (3, 4, 3, 3, 1, 0, 0, 0, 0, 0),
8: (3, 4, 3, 3, 2, 0, 0, 0, 0, 0),
9: (3, 4, 3, 3, 3, 1, 0, 0, 0, 0),
10: (4, 4, 3, 3, 3, 2, 0, 0, 0, 0),
11: (4, 4, 3, 3, 3, 2, 1, 0, 0, 0),
12: (4, 4, 3, 3, 3, 2, 1, 0, 0, 0),
features_by_level[6] = [features.MantleOfWhispers]
features_by_level[14] = [features.ShadowLore]
class Bard(CharClass):
name = 'Bard'
hit_dice_faces = 8
subclass_select_level = 3
saving_throw_proficiencies = ('dexterity', 'charisma')
primary_abilities = ('charisma',)
_proficiencies_text = (
'Light armor', 'simple weapons', 'hand crossbows', 'longswords',
'rapiers', 'shortswords', 'three musical instruments of your choice')
weapon_proficiencies = (weapons.HandCrossbow, weapons.Longsword,
weapons.Rapier, weapons.Shortsword,
weapons.SimpleWeapon)
class_skill_choices = ('Acrobatics', 'Animal Handling', 'Arcana',
'Athletics', 'Deception', 'History', 'Insight',
'Intimidation', 'Investigation', 'Medicine',
'Nature', 'Perception', 'Performance', 'Persuasion',
'Religion', 'Sleight of Hand', 'Stealth',
'Survival')
multiclass_weapon_proficiencies = ()
_multiclass_proficiencies_text = ('Light Armor', '[choose one skill]',
'[choose one musical instrument]')
num_skill_choices = 3
subclasses_available = (CollegeOfLore, CollegeOfValor, CollegeOfGlamour,
CollegeOfSwords, CollegeOfWhispers)
features_by_level = defaultdict(list)
features_by_level[1] = [features.BardicInspiration]
features_by_level[2] = [features.SongOfRest, features.JackOfAllTrades]
features_by_level[3] = [features.BardExpertise]
weapon_proficiencies = weapons.simple_weapons + (
weapons.HandCrossbow, weapons.Longsword, weapons.Rapier,
weapons.Shortsword)
class_skill_choices = ('Acrobatics', 'Athletics', 'Deception',
'Insight', 'Intimidation', 'Investigation',
'Perception', 'Performance', 'Persuasion',
'Sleight of Hand', 'Stealth')
class Sorceror(CharClass):
class_name = 'Sorceror'
hit_dice_faces = 6
saving_throw_proficiencies = ('constitution', 'charisma')
_proficiencies_text = ('daggers', 'darts', 'slings',
'quarterstaffs', 'light crossbows')
weapon_proficiencies = (weapons.Dagger, weapons.Dart,
weapons.Sling, weapons.Quarterstaff,
weapons.LightCrossbow)
class_skill_choices = ('Arcana', 'Deception', 'Insight',
'Intimidation', 'Persuasion', 'Religion')
class Warlock(CharClass):
class_name = 'Warlock'
hit_dice_faces = 8
saving_throw_proficiencies = ('wisdom', 'charisma')
_proficiencies_text = ("light Armor", "simple weapons")
class_skill_choices = ('Arcana', 'Deception', 'History',
'Intimidation', 'Investigation', 'Nature',
'Religion')
weapon_proficiencies = weapons.simple_weapons
spellcasting_ability = 'charisma'
features_by_level[3] = [features.PathOfTheKensei]
features_by_level[6] = [features.OneWithTheBlade]
features_by_level[11] = [features.SharpenTheBlade]
features_by_level[17] = [features.UnerringAccuracy]
class Monk(CharClass):
name = 'Monk'
hit_dice_faces = 8
subclass_select_level = 3
saving_throw_proficiencies = ('strength', 'dexterity')
primary_abilities = ('dexterity', 'wisdom')
_proficiencies_text = (
'simple weapons', 'shortswords', 'unarmed',
"one type of artisan's tools or one musical instrument")
weapon_proficiencies = (weapons.Shortsword, weapons.Unarmed,
weapons.SimpleWeapon)
multiclass_weapon_proficiencies = weapon_proficiencies
_multiclass_proficiencies_text = ('simple weapons', 'shortswords',
'unarmed')
class_skill_choices = ('Acrobatics', 'Athletics', 'History', 'Insight',
'Religion', 'Stealth')
subclasses_available = (OpenHandWay, ShadowWay,
FourElementsWay, SunSoulWay,
LongDeathWay, DrunkenMasterWay,
KenseiWay)
features_by_level = defaultdict(list)
features_by_level[1] = [features.UnarmoredDefenseMonk,
features.MartialArts]
features_by_level[2] = [features.Ki, features.FlurryOfBlows,
features.PatientDefense, features.StepOfTheWind,
features.UnarmoredMovement]
def wield_weapon(self, weapon):
"""Accepts a string and adds it to the list of wielded weapons.
Parameters
----------
weapon : str
Case-insensitive string with a name of the weapon.
"""
# Retrieve the weapon class from the weapons module
if isinstance(weapon, weapons.Weapon):
weapon_ = type(weapon)(wielder=self)
elif isinstance(weapon, str):
try:
NewWeapon = findattr(weapons, weapon)
except AttributeError:
raise AttributeError(f'Weapon "{weapon}" is not defined')
weapon_ = NewWeapon(wielder=self)
elif issubclass(weapon, weapons.Weapon):
weapon_ = weapon(wielder=self)
else:
raise AttributeError(f'Weapon "{weapon}" is not defined')
# Save it to the array
self.weapons.append(weapon_)
class HighElf(_Elf):
name = "High Elf"
weapon_proficiencies = (weapons.Longsword, weapons.Shortsword,
weapons.Shortbow, weapons.Longbow)
proficiencies_text = ('longswords', 'shortswords', 'shortbows', 'longbows')
intelligence_bonus = 1
languages = ('Common', 'Elvish', '[choose one]')
features = _Elf.features + (feats.ElfCantrip,)
class WoodElf(_Elf):
name = "Wood Elf"
weapon_proficiencies = (weapons.Longsword, weapons.Shortsword,
weapons.Shortbow, weapons.Longbow)
proficiencies_text = ('longswords', 'shortswords', 'shortbows', 'longbows')
wisdom_bonus = 1
speed = 35
features = _Elf.features + (feats.MaskOfTheWild,)
class DarkElf(_Elf):
name = "Dark Elf"
weapon_proficiencies = (weapons.Rapier, weapons.Shortsword,
weapons.HandCrossbow)
proficiencies_text = ('rapiers', 'shortswords', 'hand crossbows')
charisma_bonus = 1
features = (feats.SuperiorDarkvision, feats.FeyAncestry, feats.Trance,
feats.SunlightSensitivity, feats.DrowMagic)
spells_known = (spells.DancingLights,)
features_by_level = defaultdict(list)
features_by_level[3] = [features.PsychicBlades, features.WordsOfTerror]
features_by_level[6] = [features.MantleOfWhispers]
features_by_level[14] = [features.ShadowLore]
class Bard(CharClass):
name = 'Bard'
hit_dice_faces = 8
subclass_select_level = 3
saving_throw_proficiencies = ('dexterity', 'charisma')
primary_abilities = ('charisma',)
_proficiencies_text = (
'Light armor', 'simple weapons', 'hand crossbows', 'longswords',
'rapiers', 'shortswords', 'three musical instruments of your choice')
weapon_proficiencies = (weapons.HandCrossbow, weapons.Longsword,
weapons.Rapier, weapons.Shortsword,
weapons.SimpleWeapon)
class_skill_choices = ('Acrobatics', 'Animal Handling', 'Arcana',
'Athletics', 'Deception', 'History', 'Insight',
'Intimidation', 'Investigation', 'Medicine',
'Nature', 'Perception', 'Performance', 'Persuasion',
'Religion', 'Sleight of Hand', 'Stealth',
'Survival')
multiclass_weapon_proficiencies = ()
_multiclass_proficiencies_text = ('Light Armor', '[choose one skill]',
'[choose one musical instrument]')
num_skill_choices = 3
subclasses_available = (CollegeOfLore, CollegeOfValor, CollegeOfGlamour,
CollegeOfSwords, CollegeOfWhispers)
features_by_level = defaultdict(list)
features_by_level[1] = [features.BardicInspiration]
features_by_level[3] = [features.EmissaryOfPeace,
features.RebukeTheViolent]
features_by_level[7] = [features.AuraOfTheGuardian]
features_by_level[15] = [features.ProtectiveSpirit]
features_by_level[20] = [features.EmissaryOfRedemption]
class Paladin(CharClass):
name = 'Paladin'
hit_dice_faces = 10
subclass_select_level = 3
saving_throw_proficiencies = ('wisdom', 'charisma')
primary_abilities = ('strength', 'charisma')
_proficiencies_text = ('All armor', 'shields', 'simple weapons',
'martial weapons')
weapon_proficiencies = (weapons.SimpleWeapon, weapons.MartialWeapon)
multiclass_weapon_proficiencies = weapon_proficiencies
_multiclass_proficiencies_text = ('light armor', 'medium armor', 'shields',
'simple weapons', 'martial weapons')
class_skill_choices = ("Athletics", 'Insight', 'Intimidation',
'Medicine', 'Persuasion', 'Religion')
features_by_level = defaultdict(list)
features_by_level[1] = [features.DivineSense, features.LayOnHands]
features_by_level[2] = [features.PaladinFightingStyle,
features.DivineSmite]
features_by_level[3] = [features.DivineHealth,
features.ChannelDivinityPaladin]
features_by_level[5] = [features.ExtraAttackPaladin]
features_by_level[6] = [features.AuraOfProtection]
features_by_level[10] = [features.AuraOfCourage]
features_by_level[11] = [features.ImprovedDivineSmite]
features_by_level[14] = [features.CleansingTouch]
17: (0, 4, 3, 3, 3, 1, 0, 0, 0, 0),
18: (0, 4, 3, 3, 3, 1, 0, 0, 0, 0),
19: (0, 4, 3, 3, 3, 2, 0, 0, 0, 0),
20: (0, 4, 3, 3, 3, 2, 0, 0, 0, 0),
}
class Rogue(CharClass):
class_name = 'Rogue'
hit_dice_faces = 8
saving_throw_proficiencies = ('dexterity', 'intelligence')
_proficiencies_text = (
'light armor', 'simple weapons', 'hand crossbows', 'longswords',
'rapiers', 'shortswords', "thieves' tools")
weapon_proficiencies = weapons.simple_weapons + (
weapons.HandCrossbow, weapons.Longsword, weapons.Rapier,
weapons.Shortsword)
class_skill_choices = ('Acrobatics', 'Athletics', 'Deception',
'Insight', 'Intimidation', 'Investigation',
'Perception', 'Performance', 'Persuasion',
'Sleight of Hand', 'Stealth')
class Sorceror(CharClass):
class_name = 'Sorceror'
hit_dice_faces = 6
saving_throw_proficiencies = ('constitution', 'charisma')
_proficiencies_text = ('daggers', 'darts', 'slings',
'quarterstaffs', 'light crossbows')
weapon_proficiencies = (weapons.Dagger, weapons.Dart,
weapons.Sling, weapons.Quarterstaff,
weapons.LightCrossbow)