added new spells and weapons

This commit is contained in:
Ben Cook
2019-03-11 17:13:22 -04:00
parent be39860060
commit 575d7ee703
7 changed files with 177 additions and 7 deletions
+5
View File
@@ -15,6 +15,11 @@ class WoodenShield(Shield):
name = 'Wooden shield' name = 'Wooden shield'
class ShieldOfFaces(Shield):
name = "Shield +1"
base_armor_class = 3
class NoShield(Shield): class NoShield(Shield):
"""If a character is carrying no shield.""" """If a character is carrying no shield."""
name = "No shield" name = "No shield"
+37
View File
@@ -0,0 +1,37 @@
from .features import Feature
# PHB
class GreatWeaponMaster(Feature):
"""Youve learned to put the weight of a weapon to your advantage, letting its
momentum empower your strikes. You gain the following benefits:
-- On your turn, when you score a critical hit with a melee weapon or
reduce a creature to 0 hit points with one, you can make one melee weapon
attack as a bonus action.
-- Before you make a melee attack with a heavy weapon that you are
proficient with, you can choose to take a -5 penalty to the attack
roll. If the attack hits, you add +10 to the attacks damage
"""
name = "Great Weapon Master"
source = "Feats"
class Actor(Feature):
"""Skilled at mimicry and dramatics, you gain the following benefits:
-- Increase your Charisma score by 1, to a maximum of 20.
-- You have an advantage on Charisma (Deception) and Charisma (Performance) checks when trying to pass yourself off as a different person.
--You can mimic the speech of another person or the sounds made by other
creatures. You must have heard the person speaking, or heard the creature
make the sound, for at least 1 minute. A successful Wisdom (Insight) check
contested by your Charisma (Deception) check allows a listener to determine
that the effect is faked.
"""
name = "Actor"
source = "Feats"
+2 -3
View File
@@ -661,7 +661,6 @@ class EldritchSpear(Invocation):
""" """
name = "Eldritch Spear" name = "Eldritch Spear"
needs_implementation = True
class EyesOfTheRuneKeeper(Invocation): class EyesOfTheRuneKeeper(Invocation):
@@ -957,9 +956,9 @@ class ImprovedPactWeapon(Invocation):
""" """
Add +1 to attack and damage if magic is not already magic Add +1 to attack and damage if magic is not already magic
""" """
if (weapon.attack_bonus == 0) or (weapon.bonus_damage == 0): if (weapon.attack_bonus == 0) or (weapon.damage_bonus == 0):
weapon.attack_bonus += 1 weapon.attack_bonus += 1
weapon.bonus_damage += 1 weapon.damage_bonus += 1
class LanceOfLethargy(Invocation): class LanceOfLethargy(Invocation):
+62
View File
@@ -89,6 +89,7 @@ class CapeOfTheMountebank(MagicItem):
""" """
name = "Cape of the Mountebank" name = "Cape of the Mountebank"
rarity = "Rare" rarity = "Rare"
requires_attunement = True
class EyesOfCharming(MagicItem): class EyesOfCharming(MagicItem):
@@ -148,3 +149,64 @@ class FlameTongue(MagicItem):
""" """
name = "Flame Tongue" name = "Flame Tongue"
rarity = "Rare" rarity = "Rare"
requires_attunement = True
class SpearOfLightning(MagicItem):
"""When you hurl it and speak its Command Word, it transforms into a bolt of
lightning, forming a line 5 feet wide that extends out from you to a target
within 120 feet. Each creature in the line excluding you and the target
must make a DC 13 Dexterity saving throw, taking 4d6 lightning damage on a
failed save, and half as much damage on a successful one. The Lightning
Bolt turns back into a spear when it reaches the target.
Make a ranged weapon Attack against the target. On a hit, the target takes
damage from the spear plus 4d6 lightning damage.
The spear's property can't be used again until the next dawn. In the
meantime, the spear can still be used as a Magic Weapon.
"""
requires_attunement = True
name = "Lightning Spear"
class AmuletOfTheEel(MagicItem):
"""While holding this amulet, you can breath water and air, and have a
swimming speed of 20'."""
name = "Amulet of the Eel"
class BracersOfMagnetism(MagicItem):
"""When wearing these bracers, you can use a bonus action to speak their
command word, causing them to become magnetically attractive to each other.
While active, the wearer's arms are secured together, requiring a succesful DC 25
STR (Athletics) check to separate them by six inches. The wearer has advantage
on all STR (Athletics) checks made to grapple, but disadvantage on all
weapon attacks and DEX (Sleight of Hand) checks.
The wearer can use another bonus action to speak the command word and
deactivate the magnetic effect.
The magnetic effect fails if the bracers are more than 10' apart.
"""
requires_attunement = True
name = "Bracers of Magnetism"
class ShieldOfFaces(MagicItem):
"""This +1 metallic shield has a detailed face chisled into its front surface.
As a bonus action, the wielder can use a bonus action to mentally command
the shield to adopt a new emotional state (such as "smiling", "laughing",
"crying", etc.)
"""
requires_attunement = True
name = "Shield of Faces"
class GlowingSword(MagicItem):
"""
This strange longsword glows at odd times.
"""
name = "Glowing Sword"
+58
View File
@@ -2063,3 +2063,61 @@ class WitchBolt(Spell):
classes = ('Sorcerer', 'Warlock', 'Wizard') classes = ('Sorcerer', 'Warlock', 'Wizard')
class EnhanceAbility(Spell):
"""You touch a creature and bestow upon it a magical enhancement. Choose one of the
following effects: the target gains the effect until the spell ends.
- Bears Endurance. The target has advantage on Constitution checks. It
also gains 2d6 temporary hit points, which are lost when the spell ends.
- Bulls Strength. The target has advantage on Strength checks, and his or
her carrying capacity doubles.
- Cats Grace. The target has advantage on Dexterity checks. It also
doesnt take damage from falling 20 feet or less if it isnt incapacitated.
- Eagles Splendor. The target has advantage on Charisma checks.
- Foxs Cunning. The target thas advantage on Intelligence checks.
- Owls Wisdom. The target has advantage on Wisdom checks.
At Higher Levels: When you cast this spell using a spell slot of 3rd level
or higher, you can target one additional creature for each slot level
above 2nd.
"""
name = "Enhance Ability"
level = 2
casting_time = "1 action"
casting_range = "Touch"
components = ('V', 's', 'm')
materials = """Fur or a feather from a beast"""
duration = "Concentration, up to 1 hour"
ritual = False
magic_school = "Transmutation"
classes = ('Bard', 'Cleric', 'Druid', 'Sorcerer')
class Mending(Spell):
"""This spell repairs a single break or tear in an object you touch, such as broken
chain link, two halves of a broken key, a torn cloack, or a leaking wineskin.
As long as the break or tear is no larger than 1 foot in any dimension, you mend
it, leaving no trace of the former damage.
This spell can physically repair a
magic item or construct, but the spell cant restore magic to such an object.
"""
name = "Mending"
level = 0
casting_time = "1 minute"
casting_range = "Touch"
components = ('V', 's', 'm')
materials = """Two lodestones"""
duration = "Instantaneous"
ritual = False
magic_school = "Transmutation"
classes = ('Bard', 'Cleric', 'Druid', 'Sorcerer', 'Wizard')
+6 -3
View File
@@ -6,7 +6,8 @@ from .features import (UnarmoredDefenseMonk, UnarmoredDefenseBarbarian,
UnarmoredMovement, GiftOfTheDepths, RemarkableAthelete, UnarmoredMovement, GiftOfTheDepths, RemarkableAthelete,
SeaSoul, JackOfAllTrades, SoulOfTheForge, QuickDraw, SeaSoul, JackOfAllTrades, SoulOfTheForge, QuickDraw,
NaturalExplorerRevised, FeralInstinct, DreadAmbusher, NaturalExplorerRevised, FeralInstinct, DreadAmbusher,
SuperiorMobility, AmbushMaster, RakishAudacity) SuperiorMobility, AmbushMaster, RakishAudacity,
NaturalArmor)
from math import ceil from math import ceil
@@ -120,13 +121,15 @@ class ArmorClass():
def __get__(self, char, Character): def __get__(self, char, Character):
armor = char.armor or NoArmor() armor = char.armor or NoArmor()
ac = armor.base_armor_class ac = armor.base_armor_class
shield = char.shield or NoShield()
ac += shield.base_armor_class
# calculate and apply modifiers # calculate and apply modifiers
if armor.dexterity_mod_max is None: if armor.dexterity_mod_max is None:
ac += char.dexterity.modifier ac += char.dexterity.modifier
else: else:
ac += min(char.dexterity.modifier, armor.dexterity_mod_max) ac += min(char.dexterity.modifier, armor.dexterity_mod_max)
if char.has_feature(NaturalArmor):
ac = max(ac, 13 + char.dexterity.modifier)
shield = char.shield or NoShield()
ac += shield.base_armor_class
# Compute feature-specific additions # Compute feature-specific additions
if char.has_feature(UnarmoredDefenseMonk): if char.has_feature(UnarmoredDefenseMonk):
if (isinstance(armor, NoArmor) and isinstance(shield, NoShield)): if (isinstance(armor, NoArmor) and isinstance(shield, NoShield)):
+7 -1
View File
@@ -488,7 +488,7 @@ class HeavyPunch(MeleeWeapon):
base_damage = "1d4" base_damage = "1d4"
name = "Heavy Punch" name = "Heavy Punch"
damage_type = 'b' damage_type = 'b'
bonus_damage = 10 + 2 # Heavy weapon master + Dueling damage_bonus = 10 # Heavy weapon master
attack_bonus = -5 # Heavy weapon master attack_bonus = -5 # Heavy weapon master
@@ -561,6 +561,12 @@ class FlameTongue(Greatsword):
damage_type = 'f' damage_type = 'f'
class SpearOfLightning(Spear):
name = "Spear +1"
damage_bonus = 1
attack_bonus = 1
# 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)