mirror of
https://github.com/Threnklyn/dungeon-sheets.git
synced 2026-05-19 04:33:26 +02:00
Added all racial features in PHB, EEPC, VGTM
This commit is contained in:
@@ -29,6 +29,9 @@ class CharClass():
|
||||
self.subclass = subclass
|
||||
for k, v in params.items():
|
||||
setattr(self, k, v)
|
||||
# Instantiate the features
|
||||
for i in range(1, 21):
|
||||
self.features_by_level[i] = [f() for f in self.features_by_level[i]]
|
||||
|
||||
@property
|
||||
def features(self):
|
||||
|
||||
@@ -17,13 +17,14 @@ class Monk(CharClass):
|
||||
'Religion', 'Stealth')
|
||||
subclasses_available = ('SunSoul', 'OpenHand')
|
||||
features_by_level = defaultdict(list)
|
||||
martial_arts = features.MartialArts()
|
||||
features_by_level[1] = [features.UnarmoredDefense(),
|
||||
martial_arts]
|
||||
features_by_level[1] = [features.UnarmoredDefense,
|
||||
features.MartialArts]
|
||||
|
||||
def __init__(self, level, subclass=None, **params):
|
||||
super().__init__(level, subclass=subclass, **params)
|
||||
self.martial_arts.level = self.class_level
|
||||
for f in self.features_by_level[1]:
|
||||
if isinstance(f, features.MartialArts):
|
||||
f.level = self.class_level
|
||||
if subclass == 'sunsoul':
|
||||
self.subclass = SunSoul(level=self.class_level)
|
||||
else:
|
||||
|
||||
@@ -38,24 +38,7 @@ char_classes = {
|
||||
'Wizard': classes.Wizard
|
||||
}
|
||||
|
||||
races = {
|
||||
'Hill Dwarf': race.HillDwarf,
|
||||
'Mountain Dwarf': race.MountainDwarf,
|
||||
'High Elf': race.HighElf,
|
||||
'Wood Elf': race.WoodElf,
|
||||
'Dark Elf': race.DarkElf,
|
||||
'Lightfoot Halfling': race.LightfootHalfling,
|
||||
'Stout Halfling': race.StoutHalfling,
|
||||
'Human': race.Human,
|
||||
'Dragonborn': race.Dragonborn,
|
||||
'Gnome': race.Gnome,
|
||||
'Forest Gnome': race.ForestGnome,
|
||||
'Rock Gnome': race.RockGnome,
|
||||
'Half-Elf': race.HalfElf,
|
||||
'Half-Orc': race.HalfOrc,
|
||||
'Tiefling': race.Tiefling,
|
||||
'Fallen Aasimar': race.FallenAasimar,
|
||||
}
|
||||
races = race.race_dict
|
||||
|
||||
|
||||
backgrounds = background.available_backgrounds
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
from .features import Feature
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ class UnarmoredDefense(Feature):
|
||||
name = "Unarmored Defense"
|
||||
source = 'Monk'
|
||||
|
||||
def AC_func(self, char):
|
||||
def AC_func(self, char, **kwargs):
|
||||
no_armor = ((char.armor is None)
|
||||
or (isinstance(char.armor, armor.NoAmor)))
|
||||
no_shield = ((char.shield is None)
|
||||
|
||||
@@ -0,0 +1,715 @@
|
||||
from .features import Feature
|
||||
from .. import armor
|
||||
|
||||
|
||||
# Many Classes
|
||||
class Darkvision(Feature):
|
||||
"""Accustomed to life underground, you have superior vision in dark and dim
|
||||
conditions. You can see in dim light within 60 feet of you as if it were
|
||||
bright light, and in darkness as if it were dim light. You can’t discern
|
||||
color in darkness, only shades of gray.
|
||||
|
||||
"""
|
||||
name = "Darkvision (60')"
|
||||
source = "Race"
|
||||
|
||||
|
||||
class SuperiorDarkvision(Feature):
|
||||
"""Accustomed to life underground, you have superior vision in dark and dim
|
||||
conditions. You can see in dim light within 120 feet of you as if it were
|
||||
bright light, and in darkness as if it were dim light. You can’t discern
|
||||
color in darkness, only shades of gray.
|
||||
|
||||
"""
|
||||
name = "Darkvision (120')"
|
||||
source = "Race"
|
||||
|
||||
|
||||
class PowerfulBuild(Feature):
|
||||
"""
|
||||
You count as one size larger when determining your carrying capacity and the weight you can push, drag, or lift.
|
||||
"""
|
||||
name = "Powerful Build"
|
||||
source = "Race"
|
||||
|
||||
|
||||
class Amphibious(Feature):
|
||||
"""
|
||||
You can breath air and water
|
||||
|
||||
"""
|
||||
name = "Amphibious"
|
||||
source = "Race"
|
||||
|
||||
|
||||
# Dwarves
|
||||
class DwarvenResilience(Feature):
|
||||
"""You have advantage on saving throws against poison, and you have resistance
|
||||
against poison damage
|
||||
|
||||
"""
|
||||
name = "Dwarven Resilience"
|
||||
source = "Race (Dwarf)"
|
||||
|
||||
|
||||
class Stonecunning(Feature):
|
||||
"""Whenever you make an Intelligence (History) check related to the origin of
|
||||
stonework, you are considered proficient in the History skill and add
|
||||
double your proficiency bonus to the check, instead of your normal
|
||||
proficiency bonus. Languages.
|
||||
|
||||
"""
|
||||
name = "Stonecunning"
|
||||
source = "Race (Dwarf)"
|
||||
|
||||
|
||||
class DwarvenToughness(Feature):
|
||||
"""
|
||||
Your hit point maximum
|
||||
increases by 1, and it increases by 1 every time you gain a level.
|
||||
|
||||
"""
|
||||
name = "DwarvenToughness"
|
||||
source = "Race (Hill Dwarf)"
|
||||
needs_implementation = True
|
||||
|
||||
|
||||
# Elves
|
||||
class FeyAncestry(Feature):
|
||||
"""You have advantage on saving throws against being charmed, and magic can’t
|
||||
put you to sleep.
|
||||
|
||||
"""
|
||||
name = "Fey Ancestry"
|
||||
source = "Race (Elf)"
|
||||
|
||||
|
||||
class Trance(Feature):
|
||||
"""Elves don’t need to sleep. Instead, they meditate deeply, remaining
|
||||
semiconscious, for 4 hours a day. (The Common word for such meditation is
|
||||
“trance.”) While meditating, you can dream after a fashion; such dreams are
|
||||
actually mental exercises that have become reflexive through years of
|
||||
practice. After resting in this way, you gain the same benefit that a human
|
||||
does from 8 hours of sleep.
|
||||
|
||||
"""
|
||||
name = "Trance"
|
||||
source = "Race (Elf)"
|
||||
|
||||
|
||||
class ElfCantrip(Feature):
|
||||
"""You know one cantrip of your choice from the wizard spell
|
||||
list. Intelligence is your spellcasting ability for it.
|
||||
|
||||
"""
|
||||
name = "Cantrip"
|
||||
source = "Race (High-Elf)"
|
||||
needs_implementation = True
|
||||
|
||||
|
||||
class MaskOfTheWild(Feature):
|
||||
"""You can attempt to hide even when you are only lightly obscured by foliage,
|
||||
heavy rain, falling snow, mist, and other natural phenomena.
|
||||
|
||||
"""
|
||||
name = "Mask of the Wild"
|
||||
source = "Race (Wood Elf)"
|
||||
|
||||
|
||||
class SunlightSensitivity(Feature):
|
||||
"""You have disadvantage on attack rolls and on Wisdom (Perception) checks
|
||||
that rely on sight when you, the target of your attack, or whatever you are
|
||||
trying to perceive is in direct sunlight.
|
||||
|
||||
"""
|
||||
name = "Sunlight Sensitivity"
|
||||
source = "Race (Dark Elf)"
|
||||
|
||||
class DrowMagic(Feature):
|
||||
"""You know the dancing lights cantrip. When you reach 3rd level, you can
|
||||
cast the faerie fire spell once per day. When you reach 5th level, you can
|
||||
also cast the darkness spell once per day. Charisma is your spellcasting
|
||||
ability for these spells. Drow
|
||||
|
||||
"""
|
||||
name = "Drow Magic"
|
||||
source = "Race (Dark Elf)"
|
||||
needs_implementation = True
|
||||
|
||||
|
||||
# Halflings
|
||||
class Lucky(Feature):
|
||||
"""When you roll a 1 on an attack roll, ability check, or saving throw, you can
|
||||
reroll the die and must use the new roll.
|
||||
|
||||
"""
|
||||
name = "Lucky"
|
||||
source = "Race (Halfling)"
|
||||
|
||||
|
||||
class Brave(Feature):
|
||||
"""You have advantage on saving throws against being frightened.
|
||||
|
||||
"""
|
||||
name = "Brave"
|
||||
source = "Race (Halfling)"
|
||||
|
||||
|
||||
class HalflingNimbleness(Feature):
|
||||
"""
|
||||
You can move through the space of any creature that is of a size larger than yours.
|
||||
"""
|
||||
name = "Halfling Nimbleness"
|
||||
source = "Race (Halfling)"
|
||||
|
||||
|
||||
class NaturallyStealthy(Feature):
|
||||
"""You can attempt to hide even when you are obscured only by a creature that
|
||||
is at least one size larger than you.
|
||||
|
||||
"""
|
||||
name = "Naturally Stealthy"
|
||||
source = "Race (Lightfoot Halfling)"
|
||||
|
||||
|
||||
class StoutResilience(Feature):
|
||||
"""You have advantage on saving throws against poison, and you have resistance
|
||||
against poison damage.
|
||||
|
||||
"""
|
||||
name = "Stout Resilience"
|
||||
source = "Race (Stout Halfling)"
|
||||
|
||||
|
||||
# Humans
|
||||
|
||||
# Dragonborn
|
||||
class DraconicAncestry(Feature):
|
||||
"""You have draconic ancestry. Choose one type of dragon from the Draconic
|
||||
Ancestry table. Your breath weapon and damage resistance are determined by the
|
||||
dragon type.
|
||||
|
||||
Dragon -- Damage Type -- Breath Weapon
|
||||
|
||||
Black -- Acid -- 5 by 30 ft. line (DEX save)
|
||||
|
||||
Blue -- Lightning -- 5 by 30 ft. line (DEX save)
|
||||
|
||||
Brass -- Fire -- 5 by 30 ft. line (DEX save)
|
||||
|
||||
Bronze -- Lightning -- 5 by 30 ft. line (DEX save)
|
||||
|
||||
Copper -- Acid -- 5 by 30 ft. line (DEX save)
|
||||
|
||||
Gold -- Fire -- 15 ft. cone (DEX save)
|
||||
|
||||
Green -- Poison -- 15 ft. cone (CON save)
|
||||
|
||||
Red -- Fire -- 15 ft. cone (DEX save)
|
||||
|
||||
Silver -- Cold -- 15 ft. cone (CON save)
|
||||
|
||||
White -- White -- 15 ft. cone (CON save)
|
||||
|
||||
"""
|
||||
name = "Draconic Ancestry"
|
||||
source = "Race (Dragonborn)"
|
||||
|
||||
|
||||
class BreathWeapon(Feature):
|
||||
"""You can use your action to exhale destructive energy. Your draconic ancestry
|
||||
determines the size, shape, and damage type of the exhalation. When you use
|
||||
your breath weapon, each creature in the area of the exhalation must make a
|
||||
saving throw, the type of which is determined by your draconic
|
||||
ancestry. The DC for this saving throw equals 8 + your Constitution
|
||||
modifier + your proficiency bonus. A creature takes 2d6 damage on a failed
|
||||
save, and half as much damage on a successful one. The damage increases to
|
||||
3d6 at 6th level, 4d6 at 11th level, and 5d6 at 16th level. After you use
|
||||
your breath weapon, you can’t use it again until you complete a short or
|
||||
long rest. Damage
|
||||
|
||||
"""
|
||||
name = "Breath Weapon"
|
||||
source = "Race (Dragonborn)"
|
||||
|
||||
|
||||
class DraconicResistance(Feature):
|
||||
"""You have resistance to the damage type associated with your draconic
|
||||
ancestry. Languages.
|
||||
|
||||
"""
|
||||
name = "Damage Resistance"
|
||||
source = "Race (Dragonborn)"
|
||||
|
||||
|
||||
# Gnomes
|
||||
class GnomeCunning(Feature):
|
||||
"""You have advantage on all Intelligence, Wisdom, and Charisma saving throws
|
||||
against magic.
|
||||
|
||||
"""
|
||||
name = "Gnome Cunning"
|
||||
source = "Race (Gnome)"
|
||||
|
||||
|
||||
class NaturalIllusionist(Feature):
|
||||
"""You know the minor illusion cantrip. Intelligence is your spellcasting
|
||||
ability for it.
|
||||
|
||||
"""
|
||||
name = "Natural Illusionist"
|
||||
source = "Race (Forest Gnome)"
|
||||
needs_implementation = True
|
||||
|
||||
|
||||
class SpeakWithSmallBeasts(Feature):
|
||||
"""Through sounds and gestures, you can communicate simple ideas with Small or
|
||||
smaller beasts. Forest gnomes love animals and often keep squirrels,
|
||||
badgers, rabbits, moles, woodpeckers, and other creatures as beloved pets.
|
||||
|
||||
|
||||
"""
|
||||
name = "Speak with Small Beasts"
|
||||
source = "Race (Forest Gnome)"
|
||||
|
||||
|
||||
class ArtificersLore(Feature):
|
||||
"""Whenever you make an Intelligence (History) check related to magic items,
|
||||
alchemical objects, or technological devices, you can add twice your
|
||||
proficiency bonus, instead of any proficiency bonus you normally
|
||||
apply. Tinker.
|
||||
|
||||
"""
|
||||
name = "Artificer's Lore"
|
||||
source = "Race (Rock Gnome)"
|
||||
|
||||
|
||||
class Tinker(Feature):
|
||||
"""You have proficiency with artisan’s tools (tinker’s tools). Using those
|
||||
tools, you can spend 1 hour and 10 gp worth of materials to construct a
|
||||
Tiny clockwork device (AC 5, 1 hp). The device ceases to function after 24
|
||||
hours (unless you spend 1 hour repairing it to keep the device
|
||||
functioning), or when you use your action to dismantle it; at that time,
|
||||
you can reclaim the materials used to create it. You can have up to three
|
||||
such devices active at a time. When you create a device, choose one of the
|
||||
following options:
|
||||
|
||||
*Clockwork Toy*: This toy is a clockwork animal, monster, or person, such as
|
||||
a frog, mouse, bird, dragon, or soldier. When placed on the ground, the toy
|
||||
moves 5 feet across the ground on each of your turns in a random
|
||||
direction. It makes noises as appropriate to the creature it represents.
|
||||
|
||||
*Fire Starter*: The device produces a miniature flame, which you can use to
|
||||
light a candle, torch, or campfire. Using the device requires your action.
|
||||
|
||||
*Music Box*: When opened, this music box plays a single song at a moderate
|
||||
volume. The box stops playing when it reaches the song’s end or when
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class StoneCamouflage(Feature):
|
||||
"""
|
||||
You have advantage on Dexterity (stealth) checks to hide in rocky terrain.
|
||||
"""
|
||||
name = "Stone Camouflage"
|
||||
source = "Race (Deep Gnome)"
|
||||
|
||||
|
||||
# Half-Elves
|
||||
|
||||
# Half-Orcs
|
||||
class RelentlessEndurance(Feature):
|
||||
"""When you are reduced to 0 hit points but not killed outright, you can drop
|
||||
to 1 hit point instead. You can’t use this feature again until you finish a
|
||||
long rest.
|
||||
|
||||
"""
|
||||
name = "Relentless Endurance"
|
||||
source = "Race (Half-Orc)"
|
||||
|
||||
|
||||
class SavageAttacks(Feature):
|
||||
"""When you score a critical hit with a melee weapon attack, you can roll one
|
||||
of the weapon’s damage dice one additional time and add it to the extra
|
||||
damage of the critical hit.
|
||||
|
||||
"""
|
||||
name = "Savage Attacks"
|
||||
source = "Race (Half-Orc)"
|
||||
|
||||
|
||||
# Tiefling
|
||||
class HellishResistance(Feature):
|
||||
"""You have resistance to fire damage.
|
||||
|
||||
"""
|
||||
name = "Hellish Resistance"
|
||||
source = "Race (Tiefling)"
|
||||
|
||||
|
||||
class InfernalLegacy(Feature):
|
||||
"""You know the thaumaturgy cantrip. Once you reach 3rd level, you can cast
|
||||
the hellish rebuke spell once per day as a 2nd-level spell. Once you reach
|
||||
5th level, you can also cast the darkness spell once per day. Charisma is
|
||||
your spellcasting ability for these spells.
|
||||
|
||||
"""
|
||||
name = "Infernal Legacy"
|
||||
source = "Race (Tiefling)"
|
||||
|
||||
|
||||
# Aasimar
|
||||
class CelestialResistance(Feature):
|
||||
"""
|
||||
You have resistance to necrotic damage and radiant damage.
|
||||
|
||||
"""
|
||||
name = "Celestial Resistance"
|
||||
source = "Race (Aasimar)"
|
||||
|
||||
|
||||
class HealingHands(Feature):
|
||||
"""As an action, you can touch a creature and cause it to regain a number of
|
||||
hit points equal to your level. Once you use this trait, you can't use it
|
||||
again until you finish a long rest.
|
||||
|
||||
"""
|
||||
name = "Healing Hands"
|
||||
source = "Race (Aasimar)"
|
||||
|
||||
|
||||
class LightBearer(Feature):
|
||||
"""You know the light cantrip. Charisma is your spellcasting ability for it.
|
||||
|
||||
"""
|
||||
name = "Light Bearer"
|
||||
source = "Race (Aasimar)"
|
||||
needs_implementation = True
|
||||
|
||||
|
||||
class RadiantSoul(Feature):
|
||||
"""Starting at 3rd level, you can use your action to unleash the divine energy
|
||||
within yourself, causing your eyes to glimmer and two luminous, incor-
|
||||
poreal wings to sprout from your back.
|
||||
|
||||
Your transformation lasts for 1 minute or until you end it as a bonus
|
||||
action. During it, you have a flying speed of 30 feet, and once on each of
|
||||
your turns, you can deal ex- tra radiant damage to one target when you deal
|
||||
damage to it with an attack or a spell. The extra radiant damage equals
|
||||
your level.
|
||||
|
||||
Once you use this trait, you can't use it again until you finish a long
|
||||
rest.
|
||||
|
||||
"""
|
||||
name = "Radiant Soul"
|
||||
source = "Race (Protector Aasimar)"
|
||||
|
||||
|
||||
class RadiantConsumption(Feature):
|
||||
"""Starting at 3rd level, you can use your action to unleash the divine energy
|
||||
within your- self, causing a searing light to radiate from you, pour out of
|
||||
your eyes and mouth, and threaten to char you.
|
||||
|
||||
Your transformation lasts for 1 minute or until you end ii as a bonus
|
||||
action. During it, you shed bright light in a 10-foot radius and dim light
|
||||
for an additional 10 feet,and at the end of each of your turns, you and
|
||||
each crea- ture within 10 feet of you take radiant damage equal to half
|
||||
your level (rounded up). In addition, once on each of your turns, you can
|
||||
deal extra radiant damage to one target when you deal damage to it with an
|
||||
attack or a spell. The extra radiant damage equals your level.
|
||||
|
||||
Once you use this trait, you can't use it again until you finish a long
|
||||
rest.
|
||||
|
||||
"""
|
||||
name = "Radiant Consumption"
|
||||
source = "Race (Scourge Aasimar)"
|
||||
|
||||
|
||||
class NecroticShroud(Feature):
|
||||
"""Starting at 3rd level, you can use your action to unleash the divine energy
|
||||
within yourself, causing your eyes to turn into pools of darkness and two
|
||||
skeletal, ghostly, flightless wings to sprout from your back. The instant
|
||||
you transform, other creatures within 10 feet of you that can see you must
|
||||
each succeed on a Charisma saving throw (DC 8 + your proficiency bonus +
|
||||
your Charisma modifier) or become frightened of you until the end of your
|
||||
next turn.
|
||||
|
||||
Your transformation lasts for 1 minute or until you end it as a bonus
|
||||
action. During it, once on each of your turns, you can deal extra ne-
|
||||
crotic damage to one target when you deal damage to it with an attack or a
|
||||
spell. The extra necrotic damage equals your level.
|
||||
|
||||
Once you use this trait, you can't use it again until you finish a long
|
||||
rest.
|
||||
|
||||
"""
|
||||
name = "Necrotic Shroud"
|
||||
source = "Race (Fallen Aasimar)"
|
||||
|
||||
|
||||
# Firbolg
|
||||
class FirbolgMagic(Feature):
|
||||
"""You can cast detect magic and disguise self with this trait, using Wisdom
|
||||
as your spellcasting ability for them. Once you cast either spell, you
|
||||
can't cast it again with this trait until you finish a short or long
|
||||
rest. When you use this version of disguise self, you can seem up to 3 feet
|
||||
shorter than normal, allowing you to more easily blend in with humans and
|
||||
elves.
|
||||
|
||||
"""
|
||||
name = "Firbolg Magic"
|
||||
source = "Race (Firbolg)"
|
||||
needs_implementation = True
|
||||
|
||||
|
||||
class HiddenStep(Feature):
|
||||
"""As a bonus action, you can magically turn invisible until the start of your
|
||||
next turn or until you attack, make a damage roll, or force someone to make
|
||||
a saving throw. Once you use this trait, you can't use it again until you
|
||||
finish a short or long rest.
|
||||
|
||||
"""
|
||||
name = "Hidden Step"
|
||||
source = "Race (Firbolg)"
|
||||
|
||||
|
||||
class SpeechOfBeastAndLeaf(Feature):
|
||||
"""You have the ability to communicate in a limited manner with beasts and
|
||||
plants. They can understand the meaning of your words, though you have no
|
||||
special ability to understand them in return. You have advantage on all
|
||||
Charisma checks you make to influence them.
|
||||
|
||||
"""
|
||||
name = "Speech of Beast and Leaf"
|
||||
source = "Race (Firbolg)"
|
||||
|
||||
|
||||
# Goliath
|
||||
class StonesEndurance(Feature):
|
||||
"""You can focus yourself to occa- sionally shrug off injury. When you take
|
||||
damage, you can use your reaction to roll a dl2. Add your Constitution
|
||||
modifier to the number rolled, and reduce the damage by that total. After
|
||||
you use this trait, you can't use it again until you finish a short or long
|
||||
rest.
|
||||
|
||||
"""
|
||||
name = "Stones Endurance"
|
||||
source = "Race (Goliath)"
|
||||
|
||||
|
||||
class MountainBorn(Feature):
|
||||
"""You're acclimated to high altitude, including elevations above 20,000
|
||||
feet. You're also naturally adapted to cold climates, as described in
|
||||
chapter 5 of the Dungeon Master's Guide.
|
||||
|
||||
"""
|
||||
name = "Mountain Born"
|
||||
source = "Race (Goliath)"
|
||||
|
||||
|
||||
# Kenku
|
||||
class ExpertForgery(Feature):
|
||||
"""You can duplicate other creatures' handwriting and craftwork. You have
|
||||
advantage on all checks made to produce forgeries or duplicates of existing
|
||||
objects.
|
||||
|
||||
"""
|
||||
name = "Expert Forgery"
|
||||
source = "Race (Kenku)"
|
||||
|
||||
|
||||
class Mimicry(Feature):
|
||||
"""You can mimic sounds you have heard, including voices. A creature that
|
||||
hears the sounds you make can tell they are imitations with a successful
|
||||
Wisdom (Insight) check opposed by your Charisma (Deception) check.
|
||||
|
||||
"""
|
||||
name = "Mimicry"
|
||||
source = "Race (Kenku)"
|
||||
|
||||
|
||||
# Lizardfolk
|
||||
class CunningArtisan(Feature):
|
||||
"""As part of a short rest, you can harvest bone and hide from a slain
|
||||
beast, construct, dragon, monstrosity, or plant creature of size Small or
|
||||
larger to create one of the following items: a shield, a club, a javelin,
|
||||
or ld4 darts or blowgun needles. To use this trait, you need a blade, such
|
||||
as a dagger, or appropriate artisan's tools, such as leatherworker's
|
||||
tools.
|
||||
|
||||
"""
|
||||
name = "Cunning Artisan"
|
||||
source = "Race (Lizardfolk)"
|
||||
|
||||
|
||||
class HoldBreath(Feature):
|
||||
"""
|
||||
You can hold your breath for up to 15 minutes at a time.
|
||||
"""
|
||||
name = "Hold Breath"
|
||||
source = "Race (Lizardfolk)"
|
||||
|
||||
|
||||
class NaturalArmor(Feature):
|
||||
"""You have tough, scaly skin. When you aren't wearing armor, your AC is 13 +
|
||||
your Dexterity modifier. You can use your natural armor to determine your
|
||||
AC if the armor you wear would leave you with a lower AC. A shield's
|
||||
benefits apply as normal while you use your natural armor.
|
||||
|
||||
"""
|
||||
name = "Natural Armor"
|
||||
source = "Race (Lizardfolk)"
|
||||
|
||||
def AC_func(self, char, **kwargs):
|
||||
"""
|
||||
Implement the Natural Armor AC option
|
||||
"""
|
||||
ac = 13 + char.dexterity.modifier
|
||||
if ((char.shield is not None)):
|
||||
ac += char.shield.base_armor_class
|
||||
return ac
|
||||
|
||||
|
||||
class HungryJaws(Feature):
|
||||
"""In battle, you can throw yourself into a vicious feeding frenzy. As a bonus
|
||||
action, you can make a special attack with your bite. If the attack hits,
|
||||
it deals its normal damage, and you gain temporary hit points (minimum of
|
||||
1) equal to your Constitution modifier, and you can't use this trait again
|
||||
until you finish a short or long rest.
|
||||
|
||||
"""
|
||||
name = "Hungry Jaws"
|
||||
source = "Race (Lizardfolk)"
|
||||
|
||||
|
||||
# Tabaxi
|
||||
class FelineAgility(Feature):
|
||||
"""Your reflexes and agility allow you to meve with a burst of speed. When you
|
||||
move on your turn in combat, you can double your speed until the end of the
|
||||
turn. Once you use this trait, you can't use it again until you move O feet
|
||||
on one of your turns.
|
||||
|
||||
"""
|
||||
name = "Feline Agility"
|
||||
source = "Race (Tabaxi)"
|
||||
|
||||
|
||||
# Triton
|
||||
|
||||
class ControlAirAndWater(Feature):
|
||||
"""A child of the sea, you can call on the magic of elemental air and
|
||||
water. You can cast fog cloud with this trait. Starting at 3rd level, you
|
||||
can cast gust of wind with it, and starting at 5th level, you can also cast
|
||||
wall of water with it (see the spell in the sidebar). Once you cast a spell
|
||||
with this trait, you can't do so again until you finish a long
|
||||
rest. Charisma is your spellcasting ability for these spells.
|
||||
|
||||
"""
|
||||
name = "Control Air and Water"
|
||||
source = "Race (Triton)"
|
||||
needs_implementation = True
|
||||
|
||||
|
||||
class EmissaryOfTheSea(Feature):
|
||||
"""Aquatic beasts have an extraor- dinary affinity with your people. You can
|
||||
communicate simple ideas with beasts that can breathe water. They can
|
||||
understand the meaning of your words, though you have no special ability to
|
||||
understand them in return.
|
||||
|
||||
"""
|
||||
name = "Emissary Of The Sea"
|
||||
source = "Race (Triton)"
|
||||
|
||||
|
||||
class GuardiansOfTheDepths(Feature):
|
||||
"""Adapted to even the most extreme ocean depths, you have resistance to cold
|
||||
damage, and you ignore any of the drawbacks caused by a deep, underwater
|
||||
environment.
|
||||
|
||||
"""
|
||||
name = "Guardians of the Depths"
|
||||
source = "Race (Triton)"
|
||||
|
||||
|
||||
# Aarakocra
|
||||
|
||||
# Genasi
|
||||
class UnendingBreath(Feature):
|
||||
"""You can hold your breath indefinitely while you’re not incapacitated.
|
||||
|
||||
"""
|
||||
name = "Unending Breath"
|
||||
source = "Race (Air Genasi)"
|
||||
|
||||
|
||||
class MingleWithTheWind(Feature):
|
||||
"""You can cast the levitate spell once with this trait, requiring no material
|
||||
components, and you regain the ability to cast it this way when you finish
|
||||
a long rest. Constitution is your spellcasting ability for this spell.
|
||||
|
||||
"""
|
||||
name = "Mingle with the Wind"
|
||||
source = "Race (Air Genasi)"
|
||||
|
||||
|
||||
class EarthWalk(Feature):
|
||||
"""You can move across difficult terrain made of earth or stone without
|
||||
expending extra movement.
|
||||
|
||||
"""
|
||||
name = "Earth Walk"
|
||||
source = "Race (Earth Genasi)"
|
||||
|
||||
|
||||
class MergeWithStone(Feature):
|
||||
"""You can cast the pass without trace spell once with this trait, requiring
|
||||
no material components, and you regain the ability to cast it this way when
|
||||
you finish a long rest. Constitution is your spellcasting ability for this
|
||||
spell.
|
||||
|
||||
"""
|
||||
name = "Merge with Stone"
|
||||
source = "Race (Earth Genasi)"
|
||||
|
||||
|
||||
class FireResistance(Feature):
|
||||
"""
|
||||
You have resistance to fire damage.
|
||||
"""
|
||||
name = "Fire Resistance"
|
||||
source = "Race (Fire Genasi)"
|
||||
|
||||
|
||||
class ReachToTheBlaze(Feature):
|
||||
"""You know the produce flame cantrip. Once you reach 3rd level, you can cast
|
||||
the burning hands spell once with this trait as a 1st-level spell, and you
|
||||
regain the ability to cast it this way when you finish a long
|
||||
rest. Constitution is your spellcasting ability for these spells.
|
||||
|
||||
"""
|
||||
name = "Reach to the Blaze"
|
||||
source = "Race (Fire Genasi)"
|
||||
|
||||
|
||||
class AcidResistance(Feature):
|
||||
"""
|
||||
You have resistance to acid damage.
|
||||
|
||||
"""
|
||||
name = "Acid Resistance"
|
||||
source = "Race (Water Genasi)"
|
||||
|
||||
|
||||
class CallToTheWave(Feature):
|
||||
"""You know the shape water cantrip (see chapter 2 EEPC). When you reach 3rd level,
|
||||
you can cast the create or destroy water spell as a 2nd-level spell once
|
||||
with this trait, and you regain the ability to cast it this way when you
|
||||
finish a long rest. Constitution is your spellcasting ability for these
|
||||
spells.
|
||||
|
||||
"""
|
||||
name = "Call to the Wave"
|
||||
source = "Race (Water Genasi)"
|
||||
|
||||
@@ -97,7 +97,8 @@ def create_latex_pdf(char, basename, template):
|
||||
f'{basename_}.log']
|
||||
for filename in filenames:
|
||||
if os.path.exists(filename):
|
||||
os.remove(filename)
|
||||
pass
|
||||
#os.remove(filename)
|
||||
# Compile the PDF
|
||||
pdf_file = f'{basename}.pdf'
|
||||
output_dir = os.path.abspath(os.path.dirname(pdf_file))
|
||||
|
||||
+198
-13
@@ -1,12 +1,6 @@
|
||||
from . import weapons
|
||||
from . import features as feats
|
||||
|
||||
|
||||
__all__ = ('Dwarf', 'HillDwarf', 'MountainDwarf', 'Elf', 'HighElf',
|
||||
'WoodElf', 'DarkElf', 'Halfling', 'LightfootHalfling',
|
||||
'StoutHalfling', 'Human', 'Dragonborn', 'Gnome', 'ForestGnome',
|
||||
'RockGnome', 'HalfElf', 'HalfOrc', 'Tiefling', 'Aasimar',
|
||||
'FallenAasimar', 'Lizardfolk', 'Kenku', 'Aarakocra')
|
||||
from collections import defaultdict
|
||||
|
||||
|
||||
class Race():
|
||||
@@ -20,6 +14,7 @@ class Race():
|
||||
skill_choices = ()
|
||||
num_skill_choices = 0
|
||||
features = tuple()
|
||||
features_by_level = defaultdict(list)
|
||||
strength_bonus = 0
|
||||
dexterity_bonus = 0
|
||||
constitution_bonus = 0
|
||||
@@ -27,6 +22,11 @@ class Race():
|
||||
wisdom_bonus = 0
|
||||
charisma_bonus = 0
|
||||
hit_point_bonus = 0
|
||||
|
||||
def __init__(self):
|
||||
self.features = tuple([f() for f in self.features])
|
||||
for i in range(1, 21):
|
||||
self.features_by_level[i] = [f() for f in self.features_by_level[i]]
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
@@ -42,15 +42,18 @@ class Dwarf(Race):
|
||||
speed = 25
|
||||
languages = ("Common", "Dwarvish")
|
||||
constitution_bonus = 2
|
||||
proficiencies_text = ('battleaxes', 'handaxes', 'throwing hammers', 'warhammers')
|
||||
proficiencies_text = ('battleaxes', 'handaxes', 'throwing hammers',
|
||||
'warhammers')
|
||||
weapon_proficiences = (weapons.Battleaxe, weapons.Handaxe,
|
||||
weapons.ThrowingHammer, weapons.Warhammer)
|
||||
features = (feats.Darkvision, feats.DwarvenResilience, feats.Stonecunning)
|
||||
|
||||
|
||||
class HillDwarf(Dwarf):
|
||||
name = "Hill Dwarf"
|
||||
wisdom_bonus = 1
|
||||
hit_point_bonus = 1
|
||||
features = Dwarf.features + (feats.DwarvenToughness,)
|
||||
|
||||
|
||||
class MountainDwarf(Dwarf):
|
||||
@@ -66,6 +69,7 @@ class Elf(Race):
|
||||
dexterity_bonus = 2
|
||||
skill_proficiencies = ('perception',)
|
||||
languages = ('Common', 'Elvish')
|
||||
features = (feats.Darkvision, feats.FeyAncestry, feats.Trance)
|
||||
|
||||
|
||||
class HighElf(Elf):
|
||||
@@ -75,6 +79,7 @@ class HighElf(Elf):
|
||||
proficiencies_text = ('longswords', 'shortswords', 'shortbows', 'longbows')
|
||||
intelligence_bonus = 1
|
||||
languages = ('Common', 'Elvish', '[choose one]')
|
||||
features = Elf.features + (feats.ElfCantrip,)
|
||||
|
||||
|
||||
class WoodElf(Elf):
|
||||
@@ -83,6 +88,8 @@ class WoodElf(Elf):
|
||||
weapons.Shortbow, weapons.Longbow)
|
||||
proficiencies_text = ('longswords', 'shortswords', 'shortbows', 'longbows')
|
||||
wisdom_bonus = 1
|
||||
speed = 35
|
||||
features = Elf.features + (feats.MaskOfTheWild,)
|
||||
|
||||
|
||||
class DarkElf(Elf):
|
||||
@@ -90,6 +97,8 @@ class DarkElf(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)
|
||||
|
||||
|
||||
# Halflings
|
||||
@@ -99,16 +108,19 @@ class Halfling(Race):
|
||||
speed = 25
|
||||
dexterity_bonus = 2
|
||||
languages = ('Common', 'Halfling')
|
||||
features = (feats.Lucky, feats.Brave, feats.HalflingNimbleness)
|
||||
|
||||
|
||||
class LightfootHalfling(Halfling):
|
||||
name = "Lightfoot Halfling"
|
||||
charisma_bonus = 1
|
||||
|
||||
features = Halfling.features + (feats.NaturallyStealthy,)
|
||||
|
||||
|
||||
class StoutHalfling(Halfling):
|
||||
name = "Stout Halfling"
|
||||
constitution_bonus = 1
|
||||
features = Halfling.features + (feats.StoutResilience,)
|
||||
|
||||
|
||||
# Humans
|
||||
@@ -133,6 +145,8 @@ class Dragonborn(Race):
|
||||
strength_bonus = 2
|
||||
charisma_bonus = 1
|
||||
languages = ("Common", "Draconic")
|
||||
features = (feats.DraconicAncestry, feats.BreathWeapon,
|
||||
feats.DraconicResistance)
|
||||
|
||||
|
||||
# Gnomes
|
||||
@@ -142,25 +156,44 @@ class Gnome(Race):
|
||||
speed = 25
|
||||
intelligence_bonus = 2
|
||||
languages = ("Common", "Gnomish")
|
||||
features = (feats.Darkvision, feats.GnomeCunning)
|
||||
|
||||
|
||||
class ForestGnome(Gnome):
|
||||
name = "Forest Gnome"
|
||||
dexterity_bonus = 1
|
||||
|
||||
features = Gnome.features + (feats.NaturalIllusionist,
|
||||
feats.SpeakWithSmallBeasts)
|
||||
|
||||
|
||||
class RockGnome(Gnome):
|
||||
name = "Rock Gnome"
|
||||
constitution_bonus = 1
|
||||
features = Gnome.features + (feats.ArtificersLore,
|
||||
feats.Tinker)
|
||||
|
||||
|
||||
class DeepGnome(Gnome):
|
||||
name = "Deep Gnome"
|
||||
dexterity_bonus = 1
|
||||
languages = ("Common", "Gnomish", "Undercommon")
|
||||
features = (feats.SuperiorDarkvision, feats.GnomeCunning,
|
||||
feats.StoneCamouflage)
|
||||
|
||||
# Half-elves
|
||||
class HalfElf(Race):
|
||||
name = "Half-Elf"
|
||||
size = "medium"
|
||||
speed = 30
|
||||
charisma_bonus = 2
|
||||
skill_choices = ('acrobatics', 'animal handling', 'arcana',
|
||||
'athletics', 'deception', 'history', 'insight',
|
||||
'intimidation', 'investigation', 'medicine', 'nature',
|
||||
'perception', 'performance', 'persuasion', 'religion',
|
||||
'sleight of hand', 'stealth', 'survival')
|
||||
num_skill_choices = 2
|
||||
languages = ("Common", "Elvish", "[choose one]")
|
||||
features = (feats.Darkvision, feats.FeyAncestry)
|
||||
|
||||
|
||||
# Half-Orcs
|
||||
@@ -170,7 +203,10 @@ class HalfOrc(Race):
|
||||
speed = 30
|
||||
strength_bonus = 2
|
||||
constitution_bonus = 1
|
||||
skill_proficiencies = ('intimidation',)
|
||||
languages = ("Common", "Orc")
|
||||
features = (feats.Darkvision, feats.RelentlessEndurance,
|
||||
feats.SavageAttacks)
|
||||
|
||||
|
||||
# Tielflings
|
||||
@@ -181,6 +217,8 @@ class Tiefling(Race):
|
||||
intelligence_bonus = 1
|
||||
charisma_bonus = 2
|
||||
languages = ("Common", "Infernal")
|
||||
features = (feats.Darkvision, feats.HellishResistance,
|
||||
feats.InfernalLegacy)
|
||||
|
||||
|
||||
# Aassimar
|
||||
@@ -190,24 +228,71 @@ class Aasimar(Race):
|
||||
speed = 30
|
||||
charisma_bonus = 2
|
||||
languages = ("Common", "Celestial")
|
||||
features = (feats.Darkvision, feats.CelestialResistance,
|
||||
feats.HealingHands, feats.LightBearer)
|
||||
|
||||
|
||||
# Protector Aasimar
|
||||
class ProtectorAasimar(Aasimar):
|
||||
name = "Protector Aasimar"
|
||||
wisdom_bonus = 1
|
||||
features_by_level = defaultdict(list)
|
||||
features_by_level[3] += [feats.RadiantSoul]
|
||||
|
||||
|
||||
# Fallen Aasimar
|
||||
class ScourgeAasimar(Aasimar):
|
||||
name = "Scourge Aasimar"
|
||||
constitution_bonus = 1
|
||||
features_by_level = defaultdict(list)
|
||||
features_by_level[3] += [feats.RadiantConsumption]
|
||||
|
||||
|
||||
# Fallen Aasimar
|
||||
class FallenAasimar(Aasimar):
|
||||
name = "Fallen Aasimar"
|
||||
strength_bonus = 1
|
||||
features_by_level = defaultdict(list)
|
||||
features_by_level[3] += [feats.NecroticShroud]
|
||||
|
||||
|
||||
# Firbolg
|
||||
class Firbolg(Race):
|
||||
name = "Firbolg"
|
||||
size = "medium"
|
||||
speed = 30
|
||||
wisdom_bonus = 2
|
||||
strength_bonus = 1
|
||||
features = (feats.FirbolgMagic, feats.HiddenStep,
|
||||
feats.PowerfulBuild, feats.SpeechOfBeastAndLeaf)
|
||||
languages = ("Common", "Elvish", "Giant")
|
||||
|
||||
|
||||
# Goliath
|
||||
class Goliath(Race):
|
||||
name = "Goliath"
|
||||
size = "Medium"
|
||||
speed = 30
|
||||
skill_proficiencies = ("athletics",)
|
||||
languages = ("Common", "Giant")
|
||||
features = (feats.StonesEndurance, feats.PowerfulBuild,
|
||||
feats.MountainBorn)
|
||||
|
||||
|
||||
|
||||
# Lizardfolk
|
||||
class Lizardfolk(Race):
|
||||
name = 'Lizardfolk'
|
||||
size = 'medium'
|
||||
speed = """30 (+swim)"""
|
||||
speed = """30 (30 swim)"""
|
||||
constitution_bonus = 2
|
||||
wisdom_bonus = 1
|
||||
languages = ('Common', 'Draconic')
|
||||
weapon_proficiencies = (weapons.Bite,)
|
||||
proficiencies_text = ('bite',)
|
||||
features = (feats.CunningArtisan, feats.HoldBreath,
|
||||
feats.NaturalArmor, feats.HungryJaws)
|
||||
skill_choices = ('animal handling', 'nature', 'perception',
|
||||
'stealth', 'survival')
|
||||
|
||||
|
||||
# Kenku
|
||||
@@ -218,6 +303,37 @@ class Kenku(Race):
|
||||
dexterity_bonus = 2
|
||||
wisdom_bonus = 1
|
||||
languages = ('Common', 'Auran')
|
||||
skill_choices = ('acrobatics', 'deception', 'stealth',
|
||||
'sleight of hand')
|
||||
num_skill_choices = 2
|
||||
features = (feats.ExpertForgery, feats.Mimicry,)
|
||||
|
||||
|
||||
# Tabaxi
|
||||
class Tabaxi(Race):
|
||||
name = 'Tabaxi'
|
||||
size = 'medium'
|
||||
dexterity_bonus = 2
|
||||
charisma_bonus = 1
|
||||
speed = "30 (20 climb)"
|
||||
languages = ("Common", "[Choose One]")
|
||||
weapon_proficiencies = (weapons.Claws,)
|
||||
proficiences_text = ('Claws',)
|
||||
skill_proficiencies = ('perception', 'stealth')
|
||||
features = (feats.Darkvision, feats.FelineAgility,)
|
||||
|
||||
|
||||
# Triton
|
||||
class Triton(Race):
|
||||
name = "Triton"
|
||||
size = "medium"
|
||||
strength_bonus = 1
|
||||
constitution_bonus = 1
|
||||
charisma_bonus = 1
|
||||
speed = "30 (30 swim)"
|
||||
features = (feats.Amphibious, feats.ControlAirAndWater,
|
||||
feats.EmissaryOfTheSea, feats.GuardiansOfTheDepths)
|
||||
languages = ("Common", "Primordial")
|
||||
|
||||
|
||||
# Aarakocra
|
||||
@@ -229,4 +345,73 @@ class Aarakocra(Race):
|
||||
wisdom_bonus = 1
|
||||
languages = ('Common', 'Aarakocra', 'Auran')
|
||||
weapon_proficiencies = (weapons.Talons,)
|
||||
proficiences_text = ('talons',)
|
||||
proficiences_text = ('Talons',)
|
||||
|
||||
|
||||
# Genasi
|
||||
class Genasi(Race):
|
||||
constitution_bonus = 2
|
||||
size = 'medium'
|
||||
speed = 30
|
||||
languages = ("Common", 'Primoridal')
|
||||
|
||||
|
||||
class AirGenasi(Genasi):
|
||||
dexterity_bonus = 1
|
||||
features = (feats.UnendingBreath,
|
||||
feats.MingleWithTheWind)
|
||||
|
||||
|
||||
class EarthGenasi(Genasi):
|
||||
strength_bonus = 1
|
||||
features = (feats.EarthWalk, feats.MergeWithStone)
|
||||
|
||||
|
||||
class FireGenasi(Genasi):
|
||||
intelligence_bonus = 1
|
||||
features = (feats.Darkvision, feats.FireResistance,
|
||||
feats.ReachToTheBlaze)
|
||||
|
||||
|
||||
class WaterGenasi(Genasi):
|
||||
wisdom_bonus = 1
|
||||
speed = "30 (30 swim)"
|
||||
features = (feats.AcidResistance, feats.Amphibious,
|
||||
feats.CallToTheWave)
|
||||
|
||||
|
||||
race_dict = {
|
||||
"Hill Dwarf": HillDwarf,
|
||||
'Mountain Dwarf': MountainDwarf,
|
||||
'High Elf': HighElf,
|
||||
'Wood Elf': WoodElf,
|
||||
'Dark Elf': DarkElf,
|
||||
'Lightfoot Halfling': LightfootHalfling,
|
||||
'Stout Halfling': StoutHalfling,
|
||||
'Human': Human,
|
||||
'Dragonborn': Dragonborn,
|
||||
'Forest Gnome': ForestGnome,
|
||||
'Rock Gnome': RockGnome,
|
||||
'Deep Gnome': DeepGnome,
|
||||
'Half-Elf': HalfElf,
|
||||
'Half-Orc': HalfOrc,
|
||||
'Tiefling': Tiefling,
|
||||
'Fallen Aasimar': FallenAasimar,
|
||||
'Protector Aasimar': ProtectorAasimar,
|
||||
'Scourge Aasimar': ScourgeAasimar,
|
||||
'Firbolg': Firbolg,
|
||||
'Goliath': Goliath,
|
||||
'Lizardfolk': Lizardfolk,
|
||||
'Kenku': Kenku,
|
||||
'Tabaxi': Tabaxi,
|
||||
'Triton': Triton,
|
||||
'Aarakocra': Aarakocra,
|
||||
'Fire Genasi': FireGenasi,
|
||||
'Earth Genasi': EarthGenasi,
|
||||
'Water Genasi': WaterGenasi,
|
||||
'Air Genasi': AirGenasi,
|
||||
}
|
||||
|
||||
__all__ = tuple(race_dict.keys())
|
||||
|
||||
|
||||
|
||||
@@ -464,6 +464,16 @@ class Talons(Weapon):
|
||||
ability = 'strength'
|
||||
|
||||
|
||||
class Claws(Weapon):
|
||||
name = 'Claws'
|
||||
base_damage = '1d4'
|
||||
damage_type = 's'
|
||||
cost = '0 gp'
|
||||
weight = 0
|
||||
properties = ''
|
||||
ability = 'strength'
|
||||
|
||||
|
||||
class Firearm(Weapon):
|
||||
name = 'Firearm'
|
||||
ability = 'dexterity'
|
||||
|
||||
Reference in New Issue
Block a user