Replace all relative imports with absolute ones

This commit is contained in:
Tomáš Heger
2020-05-05 23:00:17 +02:00
parent 7019199020
commit 5a9bb96dd9
66 changed files with 3101 additions and 3094 deletions
+16 -17
View File
@@ -1,17 +1,16 @@
from .features import Feature, create_feature
from .barbarian import *
from .bard import *
from .cleric import *
from .druid import *
from .fighter import *
from .monk import *
from .paladin import *
from .ranger import *
from .rogue import *
from .sorceror import *
from .warlock import *
from .wizard import *
from .races import *
from .backgrounds import *
from .feats import *
from dungeonsheets.features.backgrounds import *
from dungeonsheets.features.barbarian import *
from dungeonsheets.features.bard import *
from dungeonsheets.features.cleric import *
from dungeonsheets.features.druid import *
from dungeonsheets.features.feats import *
from dungeonsheets.features.features import Feature, create_feature
from dungeonsheets.features.fighter import *
from dungeonsheets.features.monk import *
from dungeonsheets.features.paladin import *
from dungeonsheets.features.races import *
from dungeonsheets.features.ranger import *
from dungeonsheets.features.rogue import *
from dungeonsheets.features.sorceror import *
from dungeonsheets.features.warlock import *
from dungeonsheets.features.wizard import *
+1 -1
View File
@@ -1,4 +1,4 @@
from .features import Feature
from dungeonsheets.features.features import Feature
class ShelterOfTheFaithful(Feature):
+2 -3
View File
@@ -1,5 +1,5 @@
from .features import Feature, FeatureSelector
from .. import (weapons, armor)
from dungeonsheets import armor, weapons
from dungeonsheets.features.features import Feature, FeatureSelector
# PHB
@@ -864,4 +864,3 @@ class RageBeyondDeath(Feature):
"""
name = "Rage Beyond Death"
source = "Barbarian (Zealot)"
+3 -2
View File
@@ -1,5 +1,6 @@
from .features import Feature, FeatureSelector
from .ranger import Dueling, TwoWeaponFighting
from dungeonsheets.features.features import Feature, FeatureSelector
from dungeonsheets.features.ranger import Dueling, TwoWeaponFighting
# PHB
class BardicInspiration(Feature):
+32 -32
View File
@@ -1,5 +1,5 @@
from .features import Feature
from .. import spells
from dungeonsheets import spells
from dungeonsheets.features.features import Feature
# Cleric Features
@@ -33,7 +33,7 @@ class ChannelDivinity(Feature):
return "Channel Divinity (2x/SR)"
else:
return "Channel Divinity (3x/SR)"
class TurnUndead(Feature):
"""As an action, you present your holy symbol and speak a prayer censuring the
@@ -76,7 +76,7 @@ class DestroyUndead(Feature):
name = self._name + ' (CR 4)'
return name
class DivineIntervention(Feature):
"""Beginning at 10th level, you can call on your deity to intervene on your
behalf when your need is great.
@@ -104,7 +104,7 @@ class DivineStrike(Feature):
"""
_name = "Divine Strike"
source = "Cleric"
@property
def name(self):
level = self.owner.Cleric.level
@@ -112,7 +112,7 @@ class DivineStrike(Feature):
if level >= 14:
damage = ' (2d8)'
return self._name + damage
# Knowledge Domain
class BlessingsOfKnowledge(Feature):
@@ -349,7 +349,7 @@ class DampenElements(Feature):
name = "Dampen Elements"
source = "Cleric (Nature Domain)"
class DivineStrikeNature(DivineStrike):
"""At 8th level, you gain the ability to infuse your weapon strikes with
divine energy. Once on each of your turns when you hit a creature with a
@@ -359,7 +359,7 @@ class DivineStrikeNature(DivineStrike):
"""
source = "Cleric (Nature Domain)"
class MasterOfNature(Feature):
"""At 17th level, you gain the ability to command animals and plant
@@ -403,7 +403,7 @@ class DestructiveWrath(ChannelDivinity):
"""
name = "Channel Divinity: Destructive Wrath"
source = "Cleric (Tempest Domain)"
class ThunderboltStrike(Feature):
"""At 6th level, when you deal lightning damage to a Large or smaller
@@ -687,7 +687,7 @@ class SaintOfForgeAndFire(Feature):
powerful:
• You gain immunity to fire damage.
• While wearing heavy armor, you have resistance to bludgeoning, piercing,
and slashing damage from non-magical attacks
@@ -780,50 +780,50 @@ class KeeperOfSouls(Feature):
source = "Cleric (Grave Domain)"
class Reaper(Feature):
"""At 1st level, you learn one necromancy cantrip of your choice from any
spell list. When you cast a necromancy cantrip that normally targets only
one creature, the spell can instead target two creatures within range and
"""At 1st level, you learn one necromancy cantrip of your choice from any
spell list. When you cast a necromancy cantrip that normally targets only
one creature, the spell can instead target two creatures within range and
within 5 feet of each other.
"""
name = "Reaper"
source = "Cleric (Death Domain)"
class TouchOfDeathCleric(Feature):
"""Starting at 2nd level, you can use Channel Divinity to destroy another
creature's life force by touch. When you hit a creature with a melee
attack, you can use Channel Divinity to deal extra necrotic damage to
the target. The damage equals 5 + twice your cleric level.
"""Starting at 2nd level, you can use Channel Divinity to destroy another
creature's life force by touch. When you hit a creature with a melee
attack, you can use Channel Divinity to deal extra necrotic damage to
the target. The damage equals 5 + twice your cleric level.
"""
name = "Channel Divinity: Touch of Death"
source = "Cleric (Death Domain)"
class InescapableDestruction(Feature):
"""Starting at 6th level, your ability to channel negative energy becomes
more potent. Necrotic damage dealt by your cleric spells and Channel
"""Starting at 6th level, your ability to channel negative energy becomes
more potent. Necrotic damage dealt by your cleric spells and Channel
Divinity options ignores resistance to necrotic damage
"""
name = "Inescapable Destruction"
source = "Cleric (Death Domain)"
class DivineStrikeDeath(DivineStrike):
"""At 8th level, you gain the ability to infuse your weapon strikes with
necrotic energy. Once on each of your turns when you hit a creature with
a weapon attack, you can cause the attack to deal an a 1d8 necrotic
damage to the target. When you reach 14th level, the extra damage
"""At 8th level, you gain the ability to infuse your weapon strikes with
necrotic energy. Once on each of your turns when you hit a creature with
a weapon attack, you can cause the attack to deal an a 1d8 necrotic
damage to the target. When you reach 14th level, the extra damage
increases to 2d8.
"""
source = "Cleric (Death Domain)"
class ImprovedReaper(Feature):
"""Starting at 17th level, when you cast a necromancy spell of 1st through
5th level that targets only one creature, the spell can instead target two
creatures within range and within 5 feet of each other. If the spell
"""Starting at 17th level, when you cast a necromancy spell of 1st through
5th level that targets only one creature, the spell can instead target two
creatures within range and within 5 feet of each other. If the spell
consumes its material components, you must provide them for each target.
"""
name = "Improved Reaper"
source = "Cleric (Death Domain)"
source = "Cleric (Death Domain)"
+2 -3
View File
@@ -1,5 +1,5 @@
from .features import Feature, FeatureSelector
from .. import spells
from dungeonsheets import spells
from dungeonsheets.features.features import Feature, FeatureSelector
# PHB
@@ -695,4 +695,3 @@ class FungalBody(Feature):
name = "Fungal Body"
source = "Druid (Circle of Spores)"
+1 -1
View File
@@ -1,4 +1,4 @@
from .features import Feature
from dungeonsheets.features.features import Feature
# PHB
+5 -5
View File
@@ -1,17 +1,17 @@
from .. import weapons
from dungeonsheets import weapons
def create_feature(**params):
"""Create a new subclass of ``Feature`` with given default parameters.
Useful for features that haven't been entered into the ``features.py``
file yet.
Parameters
----------
params : optional
Saved as attributes of the new class.
Returns
-------
NewFeature
@@ -48,7 +48,7 @@ class Feature():
def __repr__(self):
return "\"{:s}\"".format(self.name)
def weapon_func(self, weapon: weapons.Weapon, **kwargs):
"""
Updates weapon based on the Feature property
+4 -3
View File
@@ -1,6 +1,7 @@
from .ranger import Archery, Defense, Dueling, TwoWeaponFighting
from .features import Feature, FeatureSelector
from .. import (weapons, armor)
from dungeonsheets import armor, weapons
from dungeonsheets.features.features import Feature, FeatureSelector
from dungeonsheets.features.ranger import (Archery, Defense, Dueling,
TwoWeaponFighting)
# Features added for all PHB classes
# SCAG and XGTE needed
+14 -15
View File
@@ -1,5 +1,5 @@
from .features import Feature
from .. import (weapons, armor, spells)
from dungeonsheets import armor, spells, weapons
from dungeonsheets.features.features import Feature
class UnarmoredDefenseMonk(Feature):
@@ -78,7 +78,7 @@ class Ki(Feature):
class. When you spend a ki point, it is unavailable until you finish a
short or long rest, at the end of which you draw all of your expended ki
back into yourself. You must spend at least 30 minutes of the rest
meditating to regain your ki points.
meditating to regain your ki points.
Some of your ki features require your target to make a saving throw to
resist the feature's effects. The saving throw DC is calculated as follows:
@@ -103,7 +103,7 @@ class FlurryOfBlows(Feature):
name = "Flurry of Blows"
source = "Monk"
class PatientDefense(Feature):
"""You can spend 1 ki point to take the Dodge action as a bonus action on your
turn
@@ -213,7 +213,7 @@ class KiEmpoweredStrikes(Feature):
name = "Ki-Empowered Strikes"
source = "Monk"
class StillnessOfMind(Feature):
"""Starting at 7th level, you can use your action to end one effect on
yourself that is causing you to be charmed or frightened
@@ -272,7 +272,7 @@ class EmptyBody(Feature):
"""
name = "Empty Body"
source = "Monk"
class PerfectSelf(Feature):
"""At 20th level, when you roll for initiative and have no ki points
@@ -399,10 +399,10 @@ class DiscipleOfTheElements(Feature):
You learn one additional elemental discipline of your choice at 6th, 11th,
and 17th level. Whenever you learn a new elemental discipline, you can also
replace one elemental discipline that you already know with a different
discipline.
discipline.
Add your chosen disciplines under "features" in your .py file
**Casting Elemental Spells**: Some elemental disciplines allow you to cast
spells. See chapter 10 for the general rules of spellcasting. To cast one o
f these spells, you use its casting time and other rules, but you don't
@@ -467,7 +467,7 @@ class BreathOfWinter(Feature):
class ClenchOfTheNorthWind(Feature):
"""You can spend 3 ki points to cast hold person.
**Prerequisite**: 6th Level
"""
@@ -485,7 +485,7 @@ class EternalMountainDefense(Feature):
source = "Monk (Way of the Four Elements)"
spells_known = (spells.Stoneskin,)
class FangsOfTheFireSnake(Feature):
"""When you use the Attack action on your turn, you can spend 1 ki point to
cause tendrils of flame to stretch out from your fists and feet. Your reach
@@ -672,7 +672,7 @@ class MasteryOfDeath(Feature):
"""
name = "Mastery of Death"
source = "Monk (Way of the Sun Soul)"
class TouchOfTheLongDeath(Feature):
"""Starting at 17th level, your touch can channel the energy of death into a
@@ -684,7 +684,7 @@ class TouchOfTheLongDeath(Feature):
"""
name = "Touch of the Long Death"
source = "Monk (Way of the Sun Soul)"
# Way of the Sun Soul
class RadiantSunBolt(Feature):
@@ -706,7 +706,7 @@ class RadiantSunBolt(Feature):
def __init__(self, owner=None):
super().__init__(owner=owner)
self.owner.wield_weapon("sun bolt")
class SearingArcStrike(Feature):
"""At 6th level, you gain the ability to channel your ki into searing waves of
@@ -751,7 +751,7 @@ class SunShield(Feature):
"""
name = "Sun Shield"
source = "Monk (Way of the Sun Soul)"
# Way of the Drunken Master
class DrunkenTechnique(Feature):
@@ -883,4 +883,3 @@ class UnerringAccuracy(Feature):
"""
name = "Unerring Accuracy"
source = "Monk (Way of the Kensei)"
+4 -4
View File
@@ -1,7 +1,7 @@
from .features import Feature, FeatureSelector
from .ranger import Defense, Dueling
from .fighter import GreatWeaponFighting, Protection
from .. import (weapons, armor)
from dungeonsheets import armor, weapons
from dungeonsheets.features.features import Feature, FeatureSelector
from dungeonsheets.features.fighter import GreatWeaponFighting, Protection
from dungeonsheets.features.ranger import Defense, Dueling
# PHB
+2 -2
View File
@@ -1,5 +1,5 @@
from .features import Feature
from .. import armor, spells
from dungeonsheets import armor, spells
from dungeonsheets.features.features import Feature
# Many Classes
+20 -21
View File
@@ -1,6 +1,6 @@
from .features import Feature, FeatureSelector
from .. import (weapons, armor)
from .rogue import UncannyDodge, Evasion
from dungeonsheets import armor, weapons
from dungeonsheets.features.features import Feature, FeatureSelector
from dungeonsheets.features.rogue import Evasion, UncannyDodge
# PHB
@@ -42,9 +42,9 @@ class NaturalExplorer(Feature):
• Difficult terrain doesn't slow your group's travel.
• Your group can't become lost except by magical means.
• Even when you are engaged in another activity while traveling
(such as foraging, navigating, or tracking), you remain alert to danger.
(such as foraging, navigating, or tracking), you remain alert to danger.
• If you are traveling alone, you can move stealthily at a normal pace.
@@ -73,16 +73,16 @@ class Archery(Feature):
if isinstance(weapon, weapons.RangedWeapon):
weapon.attack_bonus += 2
class Defense(Feature):
"""
While you are wearing armor, you gain a +1 bonus to AC (included in
While you are wearing armor, you gain a +1 bonus to AC (included in
stats on Character Sheet).
"""
name = "Fighting Style (Defense)"
source = "Ranger"
class Dueling(Feature):
"""When you are wielding a melee weapon in one hand and no other weapons, you
gain a +2 bonus to damage rolls with that weapon.
@@ -99,7 +99,7 @@ class Dueling(Feature):
and "two-handed" not in weapon.properties.lower()):
weapon.damage_bonus += 2
class TwoWeaponFighting(Feature):
"""When you engage in two-weapon fighting, you can add your ability modifier
to the damage of the second attack.
@@ -114,7 +114,7 @@ class RangerFightingStyle(FeatureSelector):
Select a Fighting Style by choosing in feature_choices:
archery
defense
dueling
@@ -205,7 +205,7 @@ class FoeSlayer(Feature):
name = "Foe Slayer"
source = "Ranger"
# Hunter
class ColossusSlayer(Feature):
"""Your tenacity can wear down the most potent foes. When you hit a creature
@@ -253,7 +253,7 @@ class HuntersPrey(FeatureSelector):
'horde breaker': HordeBreaker}
name = "Hunter's Prey (Select One)"
source = "Ranger (Hunter)"
class EscapeTheHorde(Feature):
"""Opportunity attacks against you are made with disadvantage
@@ -348,7 +348,7 @@ class SuperiorHuntersDefense(FeatureSelector):
file from one of:
evasion
stand against the tide
uncanny dodge
@@ -515,7 +515,7 @@ class PlanarWarrior(Feature):
else:
return self._name + " (2d8/f)"
class EtherealStep(Feature):
"""At 7th level, you learn to step through the Ethereal Plane. As a bonus
action, you can cast the etherealncss spell with this feature, without
@@ -584,7 +584,7 @@ class SlayersPrey(Feature):
name = "Slayer's Prey"
source = "Ranger (Monster Slayer)"
class SupernaturalDefense(Feature):
"""At 7th level, you gain extra resilience against your prey's assaults on
your mind and body. Whenever the target of your Slayer's Prey forces you to
@@ -620,7 +620,7 @@ class SlayersCounter(Feature):
"""
name = "Slayer's Counter"
source = "Ranger (Monster Slayer)"
# Revised Ranger
class FavoredEnemyRevised(Feature):
@@ -660,14 +660,14 @@ class NaturalExplorerRevised(Feature):
--Difficult terrain doesn't slow your group's travel.
--Your group can't become lost except by magical means.
--Even when you are engaged in another activity while traveling (such as
foraging, navigating, or tracking), you remain alert to danger.
--If you are traveling alone, you can move stealthily at a normal pace.
--When you forage, you find twice as much food as you normally would.
--While tracking other creatures, you also learn their exact number, their
sizes, and how long ago they passed through the area.
@@ -675,7 +675,7 @@ class NaturalExplorerRevised(Feature):
name = "Natural Explorer"
source = "Revised Ranger"
class PrimevalAwarenessRevised(Feature):
"""Beginning at 3rd level, your mastery of ranger lore allows you to establish
a powerful link to beasts and to the land around you.
@@ -720,7 +720,7 @@ class GreaterFavoredEnemy(Feature):
name = "Greated Favored Enemy"
source = "Revised Ranger"
class FleetOfFoot(Feature):
"""Beginning at 8th level, you can use the Dash action as a bonus action on
your turn.
@@ -880,4 +880,3 @@ class StalkersDodge(Feature):
"""
name = "Stalker's Dodge"
source = "Revised Ranger (Deep Stalker Conclave)"
+10 -10
View File
@@ -1,13 +1,14 @@
from .features import Feature
from math import ceil
from dungeonsheets.features.features import Feature
# PHB
class RogueExpertise(Feature):
"""At 1st level, choose two of your skill proficiencies, or one of your skill
proficiencies and your proficiency with thieves' tools. Your proficiency
bonus is doubled for any ability check you make that uses either of the
chosen proficiencies.
chosen proficiencies.
At 6th level, you can choose two more of your
proficiencies (in skills or with thieves' tools) to gain this benefit.
@@ -136,7 +137,7 @@ class FastHands(Feature):
name = "Fast Hands"
source = "Rogue (Thief)"
class SecondStoryWork(Feature):
"""When you choose this archetype at 3rd level, you gain the ability to climb
faster than normal; climbing no longer costs you extra movement. In
@@ -237,10 +238,10 @@ class DeathStrike(Feature):
class MageHandLegerdemain(Feature):
"""Starting at 3rd level, when you cast mage hand, you can make the spectral
hand invisible, and you can perform the following additional tasks with it:
• You can stow one object the hand is holding in a container worn or
carried by another creature.
• You can retrieve an object in a container worn or carried by another
creature.
@@ -342,7 +343,7 @@ class SteadyEye(Feature):
name = "Steady Eye"
source = "Rogue (Inquisitive)"
class UnerringEye(Feature):
"""Beginning at 13th level, your senses are almost im« possible to foil. As an
action, you sense the presence of illusions, shapechangers not in their
@@ -393,7 +394,7 @@ class MasterOfTactics(Feature):
name = "Master of Tactics"
source = "Rogue (Mastermind)"
class InsightfulManipulator(Feature):
"""Starting at 9th level, if you spend at least 1 minute observing or
interacting with another creature outside combat, you can learn certain
@@ -460,7 +461,7 @@ class Survivalist(Feature):
pro- ficiencies
"""
def __init__(self, owner=None):
super().__init__(owner=owner)
self.owner.skill_expertise += ("nature", "survival")
@@ -486,7 +487,7 @@ class AmbushMaster(Feature):
"""
name = "Ambush Master"
source = "Rogue (Scout)"
class SuddenStrike(Feature):
"""Starting at 17th level, you can strike with deadly speed. If you take the
@@ -566,5 +567,4 @@ class MasterDuelist(Feature):
"""
name = "Master Duelist"
source = "Rogue (Swashbuckler)"
+12 -12
View File
@@ -1,5 +1,5 @@
from .features import Feature
from .. import spells
from dungeonsheets import spells
from dungeonsheets.features.features import Feature
# PHB
@@ -218,9 +218,9 @@ class DragonAncestor(Feature):
type associated with each dragon is used by features you gain later
Dragon : Damage
Black : Acid
Blue : Lightning
Brass : Fire
@@ -236,7 +236,7 @@ class DragonAncestor(Feature):
Red : Fire
Silver : Cold
White : Cold
You can speak, read, and write Draconic. Additionally, whenever you make a
@@ -271,7 +271,7 @@ class ElementalAdept(Feature):
name = "Elemental Adept"
source = "Sorceror (Feats)"
class DragonWings(Feature):
"""At 14th level, you gain the ability to sprout a pair of dragon wings from
your back, gaining a flying speed equal to your current speed. You can
@@ -395,7 +395,7 @@ class EyesOfTheDark(Feature):
spells_known = (spells.Darkness,)
spells_prepared = (spells.Darkness,)
class StrengthOfTheGrave(Feature):
"""Starting at lst level, your existence in a twilight state between life
and death makes you difficult to defeat. When damage reduces you to 0 hit
@@ -419,18 +419,18 @@ class HoundOfIllOmen(Feature):
following changes:
• The hound is size Medium, not Large, and it counts as a monstrosity, not
a beast.
a beast.
• It appears with a number of temporary hit points equal to half your
sorcerer level.
sorcerer level.
• It can move through other creatures and objects as if they were
difficult terrain. The bound takes 5 force damage if it ends its turn
inside an object.
inside an object.
• At the start of its turn, the hound automatically knows its target's
location. If the target was hidden, it is no longer hidden from the hound.
The hound appears in an unoccupied space of your choice within 30 feet of
the target. Roll initiative for the hound. On its turn, it can move only
toward its target by the most direct route, and it can use its action only
@@ -469,7 +469,7 @@ class UmbralForm(Feature):
name = "Umbral Form"
source = "Sorceror (Shadow Magic)"
# Storm Sorcery
class TempestuousMagic(Feature):
"""Starting at 1st level, you can use a bonus action on your turn to cause
+2 -3
View File
@@ -1,5 +1,5 @@
from .features import (Feature, FeatureSelector)
from .. import spells, weapons
from dungeonsheets import spells, weapons
from dungeonsheets.features.features import Feature, FeatureSelector
# Features
@@ -1029,4 +1029,3 @@ class TrickstersEscape(Invocation):
"""
name = "Tricksters Escape"
+9 -9
View File
@@ -1,5 +1,5 @@
from .features import (Feature, FeatureSelector)
from .. import spells, weapons
from dungeonsheets import spells, weapons
from dungeonsheets.features.features import Feature, FeatureSelector
# PHB
@@ -114,7 +114,7 @@ class ConjurationSavant(Feature):
"""
name = "Conjuration Savant"
source = "Wizard (School of Conjuration)"
class MinorIllusion(Feature):
"""Starting at 2nd level when you select this school, you can use your action
@@ -320,7 +320,7 @@ class EvocationSavant(Feature):
name = "Evocation Savant"
source = "Wizard (School of Evocation)"
class SculptSpells(Feature):
"""Beginning at 2nd level, you can create pockets of relative safety within the
effects of your evocation spells. When you cast an evocation spell that
@@ -456,7 +456,7 @@ class UndeadThralls(Feature):
there already. When you cast animate dead, you can target one additional
corpse or pile of bones, creating another zombie or skeleton, as
appropriate. Whenever you create an undead using a necromancy spell, it has
additional benefits:
additional benefits:
• The creature's hit point maximum is increased by an amount equal to your
wizard level.
@@ -478,7 +478,7 @@ class InuredToUndeath(Feature):
"""
name = "Inured to Undeath"
source = "Wizard (School of Necromancy)"
class CommandUndead(Feature):
"""Starting at 14th level, you can use magic to bring undead under your
@@ -534,7 +534,7 @@ class TransmutersStone(Feature):
• Darkvision out to a range of 60 feet, as described in chapter 8
• An increase to speed of 10 feet while the creature is unencumbered
• Proficiency in Constitution saving throws
• Resistance to acid, cold, fire, lightning, or thunder damage (your
@@ -581,7 +581,7 @@ class MasterTransmuter(Feature):
**Restore Life**: You cast the raise dead spell on a creature you touch
with the transmuter's stone, without expending a spell slot or needing to
have the spell in your spellbook.
have the spell in your spellbook.
**Restore Youth**: You touch the transmuter's stone to a willing creature,
and that creature's apparent age is reduced by 3d10 years, to a minimum of
@@ -613,7 +613,7 @@ class Bladesong(Feature):
• You gain a bonus to any Constitution saving throw you make to maintain
your concentration on a spell. The bonus equals your Intelligence modifier
(minimum of +l).
(minimum of +l).
You can use this feature twice. You regain all expended uses of it when
you finish a short or long rest.