testing all new class features

This commit is contained in:
Ben Cook
2019-01-01 16:17:00 -05:00
parent 73cb2b5e16
commit 708a39403c
52 changed files with 2117 additions and 213 deletions
+1 -1
View File
@@ -574,7 +574,7 @@ class VengefulAncestors(Feature):
that your Spirit Shield prevents.
"""
name = "VengefulAncestors"
name = "Vengeful Ancestors"
source = "Barbarian (Ancestral Guardian)"
+73 -15
View File
@@ -148,27 +148,35 @@ class _CircleSpells(Feature):
"""
_name = "Select One"
source = "Druid (Circle of the Land)"
_spells = {3: [], 5: [], 7: [], 9: []}
_spells = {3: [spells.MirrorImage, spells.MistyStep],
5: [spells.WaterBreathing, spells.WaterWalk],
7: [spells.ControlWater, spells.FreedomOfMovement],
9: [spells.ConjureElemental, spells.Scrying]}
spells_known = []
spells_prepared = []
@property
def name(self):
return "Circle Spells ({:s})".format(self._name)
@property
def spells_prepared(self):
level = self.owner.Druid.level
my_spells = []
for lvl, sps in self._spells.items():
if level >= lvl:
my_spells.extend(sps)
return my_spells
def __init__(self, owner=None):
if owner is not None:
level = owner.Druid.level
for lvl, sps in self._spells.items():
if level >= lvl:
self.spells_known.extend(sps)
self.spells_prepared.extend(sps)
super().__init__(owner=owner)
@property
def spells_known(self):
return self.spells_prepared
class ArcticSpells(_CircleSpells):
"""Your mystical connection to the land infuses you with the ability to cast
certain spells.
These spells are included in your Spell Sheet
"""
_name = 'Arctic'
_spells = {3: [spells.HoldPerson, spells.SpikeGrowth],
5: [spells.SleetStorm, spells.Slow],
7: [spells.FreedomOfMovement, spells.IceStorm],
@@ -176,6 +184,13 @@ class ArcticSpells(_CircleSpells):
class CoastSpells(_CircleSpells):
"""Your mystical connection to the land infuses you with the ability to cast
certain spells.
These spells are included in your Spell Sheet
"""
_name = 'Coast'
_spells = {3: [spells.MirrorImage, spells.MistyStep],
5: [spells.WaterBreathing, spells.WaterWalk],
7: [spells.ControlWater, spells.FreedomOfMovement],
@@ -183,6 +198,13 @@ class CoastSpells(_CircleSpells):
class DesertSpells(_CircleSpells):
"""Your mystical connection to the land infuses you with the ability to cast
certain spells.
These spells are included in your Spell Sheet
"""
_name = 'Desert'
_spells = {3: [spells.Blur, spells.Silence],
5: [spells.CreateFoodAndWater, spells.ProtectionFromEnergy],
7: [spells.Blight, spells.HallucinatoryTerrain],
@@ -190,6 +212,13 @@ class DesertSpells(_CircleSpells):
class ForestSpells(_CircleSpells):
"""Your mystical connection to the land infuses you with the ability to cast
certain spells.
These spells are included in your Spell Sheet
"""
_name = 'Forest'
_spells = {3: [spells.Barkskin, spells.SpiderClimb],
5: [spells.CallLightning, spells.PlantGrowth],
7: [spells.Divination, spells.FreedomOfMovement],
@@ -197,6 +226,13 @@ class ForestSpells(_CircleSpells):
class GrasslandSpells(_CircleSpells):
"""Your mystical connection to the land infuses you with the ability to cast
certain spells.
These spells are included in your Spell Sheet
"""
_name = 'Grassland'
_spells = {3: [spells.Invisibility, spells.PassWithoutTrace],
5: [spells.Daylight, spells.Haste],
7: [spells.Divination, spells.FreedomOfMovement],
@@ -204,6 +240,13 @@ class GrasslandSpells(_CircleSpells):
class MountainSpells(_CircleSpells):
"""Your mystical connection to the land infuses you with the ability to cast
certain spells.
These spells are included in your Spell Sheet
"""
_name = 'Mountain'
_spells = {3: [spells.SpiderClimb, spells.SpikeGrowth],
5: [spells.LightningBolt, spells.MeldIntoStone],
7: [spells.StoneShape, spells.Stoneskin],
@@ -211,6 +254,13 @@ class MountainSpells(_CircleSpells):
class SwampSpells(_CircleSpells):
"""Your mystical connection to the land infuses you with the ability to cast
certain spells.
These spells are included in your Spell Sheet
"""
_name = 'Swamp'
_spells = {3: [spells.Darkness, spells.MelfsAcidArrow],
5: [spells.WaterWalk, spells.StinkingCloud],
7: [spells.FreedomOfMovement, spells.LocateCreature],
@@ -218,6 +268,13 @@ class SwampSpells(_CircleSpells):
class UnderdarkSpells(_CircleSpells):
"""Your mystical connection to the land infuses you with the ability to cast
certain spells.
These spells are included in your Spell Sheet
"""
_name = 'Underdark'
_spells = {3: [spells.SpiderClimb, spells.Web],
5: [spells.GaseousForm, spells.StinkingCloud],
7: [spells.GreaterInvisibility, spells.StoneShape],
@@ -253,7 +310,8 @@ class CircleSpells(FeatureSelector, _CircleSpells):
'mountain': MountainSpells,
'swamp': SwampSpells,
'underdark': UnderdarkSpells}
_name = "(Select One)"
name = "Circle Spells (Select One)"
source = "Druid (Circle of the Land)"
class LandsStride(Feature):
+3 -3
View File
@@ -34,9 +34,8 @@ class Feature():
def __init__(self, owner=None):
self.owner = owner
cls = type(self)
self.spells_known = [S() for S in cls.spells_known]
self.spells_prepared = [S() for S in cls.spells_prepared]
self.spells_known = [S() for S in self.spells_known]
self.spells_prepared = [S() for S in self.spells_prepared]
def __eq__(self, other):
return (self.name == other.name) and (self.source == other.source)
@@ -84,6 +83,7 @@ class FeatureSelector(Feature):
new_feat.__doc__ = t.__doc__
new_feat.name = t.name
new_feat.source = t.source
new_feat.needs_implementation = True
for selection in feature_choices:
if selection.lower() in t.options:
new_feat = t.options[selection.lower()](owner=owner)
+2 -2
View File
@@ -298,7 +298,7 @@ class CommandersStrike(Maneuver):
name = "Commander's Strike"
class DisarmingStrike(Maneuver):
class DisarmingAttack(Maneuver):
"""When you hit a creature with a weapon attack, you can expend one
superiority die to attempt to disarm the target, forcing it to drop one
item o f your choice that its holding. You add the superiority die to the
@@ -307,7 +307,7 @@ class DisarmingStrike(Maneuver):
feet.
"""
name = "Disarming Strike"
name = "Disarming Attack"
class DistractingStrike(Maneuver):
+4 -6
View File
@@ -1,5 +1,5 @@
from .features import Feature
from .. import armor
from .. import armor, spells
# Many Classes
@@ -130,12 +130,12 @@ 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
ability for these spells.
"""
name = "Drow Magic"
source = "Race (Dark Elf)"
needs_implementation = True
spells_known = spells_prepared = (spells.DancingLights,)
# Halflings
@@ -357,7 +357,7 @@ class InfernalLegacy(Feature):
"""
name = "Infernal Legacy"
source = "Race (Tiefling)"
needs_implementation = True
spells_known = spells_prepared = (spells.Thaumaturgy,)
# Aasimar
@@ -462,7 +462,6 @@ class FirbolgMagic(Feature):
"""
name = "Firbolg Magic"
source = "Race (Firbolg)"
needs_implementation = True
class HiddenStep(Feature):
@@ -610,7 +609,6 @@ class ControlAirAndWater(Feature):
"""
name = "Control Air and Water"
source = "Race (Triton)"
needs_implementation = True
class EmissaryOfTheSea(Feature):
+3 -119
View File
@@ -1,5 +1,5 @@
from .features import Feature, FeatureSelector
from .. import (weapons, armor, spells)
from .. import (weapons, armor)
from .rogue import UncannyDodge, Evasion
@@ -97,8 +97,8 @@ class Dueling(Feature):
+2 attack roll bonus if melee weapon is not two handed
"""
if (isinstance(weapon, weapons.MeleeWeapon)
and "two-handed" in weapon.properties.lower()):
weapon.attack_bonus += 2
and "two-handed" not in weapon.properties.lower()):
weapon.bonus_damage += 2
return weapon
@@ -422,35 +422,6 @@ class ShareSpells(Feature):
# Gloom Stalker
class GloomStalkerMagic(Feature):
"""Starting at 3rd level, you learn an additional spell when you reach certain
levels in this class, as shown in the Gloom Stalker Spells table. The spell
counts as a ranger spell for you, but it doesn't count against the number
of ranger spells you know
"""
name = "Gloom Stalker Magic"
source = "Ranger (Gloom Stalker)"
_spells = {3: [spells.DisguiseSelf],
5: [spells.RopeTrick],
9: [spells.Fear],
13: [spells.GreaterInvisibility],
17: [spells.Seeming]}
@property
def spells_prepared(self):
level = self.owner.Ranger.level
my_spells = []
for lvl, sps in self._spells.items():
if level >= lvl:
my_spells.extend(sps)
return my_spells
@property
def spells_known(self):
return self.spells_prepared
class DreadAmbusher(Feature):
"""At 3rd level, you master the art of the ambush. You can give yourself a
bonus to your initiative rolls equal to your Wisdom modifier. At the start
@@ -519,35 +490,6 @@ class ShadowyDodge(Feature):
# Horizon Walker
class HorizonWalkerMagic(Feature):
"""Starting at 3rd level, you learn an additional spell when you reach certain
levels in this class, as shown in the Horizon Walker Spells table. The spell
counts as a ranger spell for you, but it doesn't count against the number
of ranger spells you know
"""
name = "Horizon Walker Magic"
source = "Ranger (Horizon Walker)"
_spells = {3: [spells.ProtectionFromEvilAndGood],
5: [spells.MistyStep],
9: [spells.Haste],
13: [spells.Banishment],
17: [spells.TeleportationCircle]}
@property
def spells_prepared(self):
level = self.owner.Ranger.level
my_spells = []
for lvl, sps in self._spells.items():
if level >= lvl:
my_spells.extend(sps)
return my_spells
@property
def spells_known(self):
return self.spells_prepared
class DetectPortal(Feature):
"""At 3rd level, you gain the ability to magically sense the presence of a
planar portal. As an action, you detect the distance and direction to the
@@ -615,35 +557,6 @@ class SpectralDefense(Feature):
# Monster Slayer
class MonsterSlayerMagic(Feature):
"""Starting at 3rd level, you learn an additional spell when you reach certain
levels in this class, as shown in the Monster Slayer Spells table. The
spell counts as a ranger spell for you, but it doesn't count against the
number of ranger spells you know
"""
name = "Monster Slayer Magic"
source = "Ranger (Monster Slayer)"
_spells = {3: [spells.ProtectionFromEvilAndGood],
5: [spells.ZoneOfTruth],
9: [spells.MagicCircle],
13: [spells.Banishment],
17: [spells.HoldMonster]}
@property
def spells_prepared(self):
level = self.owner.Ranger.level
my_spells = []
for lvl, sps in self._spells.items():
if level >= lvl:
my_spells.extend(sps)
return my_spells
@property
def spells_known(self):
return self.spells_prepared
class HuntersSense(Feature):
"""At 3rd level, you gain the ability to peer at a creature and magically
discern how best to hurt it. As an action, choose one creature you can see
@@ -963,35 +876,6 @@ class UnderdarkScout(Feature):
source = "Revised Ranger (Deep Stalker Conclave)"
class DeepStalkerMagic(Feature):
"""Starting at 3rd level, you learn an additional spell when you reach certain
levels in this class, as shown in the Deep Stalker Spells table. The spell
counts as a ranger spell for you, but it doesn't count against the number
of ranger spells you know
"""
name = "Deep Stalker Magic"
source = "Revised Ranger (Deep Stalker Conclave)"
_spells = {3: [spells.DisguiseSelf],
5: [spells.RopeTrick],
9: [spells.GlyphOfWarding],
13: [spells.GreaterInvisibility],
17: [spells.Seeming]}
@property
def spells_prepared(self):
level = self.owner.Ranger.level
my_spells = []
for lvl, sps in self._spells.items():
if level >= lvl:
my_spells.extend(sps)
return my_spells
@property
def spells_known(self):
return self.spells_prepared
class StalkersDodge(Feature):
"""At 15th level, whenever a creature attacks you and does not have advantage,
you can use your reaction to impose disadvantage on the creatures attack