-
-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #508 wand of the war mage missing bonuses #512
Changes from all commits
3e1e63a
c884eeb
3a2914d
4d206c1
6df59b4
b8937d2
aed6c41
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -215,7 +215,8 @@ | |
::subtypes | ||
::rarity | ||
::description | ||
::attunementb | ||
;::attunementb ;typo? | ||
::attunement | ||
::magical-damage-bonus | ||
::magical-attack-bonus | ||
::magical-ac-bonus | ||
|
@@ -260,8 +261,8 @@ | |
|
||
(def weapon-not-ammunition? (complement ammunition?)) | ||
|
||
(defn heavy-metal-armor? [a] | ||
(and (#{:medium :heavy} (:type a)) | ||
(defn heavy-metal-armor? [a] | ||
(and (#{:medium :heavy} (:type a)) | ||
(not= :hide (:key a)))) | ||
|
||
(defn not-shield? [a] (#{:light :medium :heavy} (:type a))) | ||
|
@@ -285,7 +286,7 @@ They return to Valhalla after 1 hour or when they drop to 0 hit points. Once you | |
(str " | ||
You must have proficiency with all " | ||
requirement | ||
". If you blow the horn without meeting this requirement, the summoned berserkers attack you. If you meet the requirement, they are friendly to you and your companions and follow your commands."))) | ||
". If you blow the horn without meeting this requirement, the summoned berserkers attack you. If you meet the requirement, they are friendly to you and your companions and follow your commands."))) | ||
}) | ||
|
||
(defn potion-of-giant-strength [name strength rarity] | ||
|
@@ -333,6 +334,25 @@ Additionally, you can focus your senses as an action to magically discern the di | |
direction to the closest dragon within 30 miles of you that is of the same type as the armor. This special action can’t be used again until the next dawn." | ||
)}) | ||
|
||
(defn | ||
^{:doc "Generic function for creating magic items with + bonuses. | ||
Use :sp-atk-mod for spell-attack-modifier bonuses. | ||
Use :sp-dc-mod for spell DC bonuses" | ||
; :test (fn [] ()) | ||
; :arglists ([name ]) | ||
:user/comment "This 'cleans' up item definitions... but could make them harder to read if it was applied all the way around."} | ||
|
||
caster-bonus-item [name bonus type rarity attunement modv description] | ||
(let [full-name (str name " +" bonus)] | ||
{name-key full-name | ||
::type type | ||
::rarity rarity | ||
::attunement (if (vector? attunement) attunement [attunement]) ;array should be passed not just one keyword | ||
::modifiers [(for [i modv] | ||
(cond (= i :sp-atk-mod) (mod5e/spell-attack-modifier-bonus bonus) | ||
(= i :sp-dc-mod) (mod5e/spell-save-dc-bonus bonus)))] | ||
::decription description})) | ||
|
||
(defn rod-of-the-pact-keeper [bonus] | ||
{name-key (str "Rod of the Pact Keeper +" bonus) | ||
::type :rod | ||
|
@@ -347,7 +367,8 @@ direction to the closest dragon within 30 miles of you that is of the same type | |
:frequency units5e/long-rests-1 | ||
:summary "Regain a warlock spell slot"})] | ||
::summary (str (common/bonus-str bonus) | ||
" to spell attack rolls and saving throw DCs for your warlock spells")}) | ||
" to spell attack rolls and saving throw DCs for your warlock spells") | ||
}) | ||
|
||
(defn ioun-stone [name rarity description & modifiers] | ||
(let [full-name (str "Ioun Stone (" name ")")] | ||
|
@@ -425,7 +446,7 @@ Curse. This armor is cursed, a fact that is revealed only when an identify spell | |
::description (str "You have resistance to " (name damage-type) " damage.") | ||
}) | ||
damage-types5e/damage-types)) | ||
|
||
(def raw-magic-items | ||
(concat | ||
armors-of-resistance | ||
|
@@ -658,7 +679,7 @@ If you aren’t a dwarf, you gain the following additional benefits while wearin | |
|
||
::attunement [:any] | ||
::modifiers [(belt-of-giant-strength-mod 23)] | ||
|
||
::description "While wearing this belt, your Strength score changes to 23. If your Strength is already equal to or greater than 23, the item has no effect on you." | ||
} | ||
{ | ||
|
@@ -825,7 +846,7 @@ Alternatively, when you light the candle for the first time, you can cast the ga | |
name-key "Cape of the Mountebank" | ||
::type :wondrous-item | ||
::rarity :rare | ||
::modifiers [(mod5e/action | ||
::modifiers [(mod5e/action | ||
{:name "Cape of the Mountebank" | ||
:page 157 | ||
:source :dmg | ||
|
@@ -857,7 +878,7 @@ The chime can be used ten times. After the tenth time, it cracks and becomes use | |
name-key "Circlet of Blasting" | ||
::type :wondrous-item | ||
::rarity :uncommon | ||
::modifiers [(mod5e/action | ||
::modifiers [(mod5e/action | ||
{:name "Circlet of Blasting" | ||
:page 158 | ||
:source :dmg | ||
|
@@ -872,7 +893,7 @@ The chime can be used ten times. After the tenth time, it cracks and becomes use | |
|
||
::attunement [:any] | ||
::modifiers [(mod5e/damage-resistance :poison) | ||
(mod5e/action | ||
(mod5e/action | ||
{:name "Cloak of Arachnidia" | ||
:page 158 | ||
:source :dmg | ||
|
@@ -939,7 +960,7 @@ shifts to camouflage you. Pulling the hood up or down requires an action."} | |
::rarity :rare | ||
|
||
::attunement [:any] | ||
::modifiers [(mod5e/action | ||
::modifiers [(mod5e/action | ||
{:name "Cloak of the Bat" | ||
:page 159 | ||
:source :dmg | ||
|
@@ -2107,7 +2128,7 @@ If you die while wearing the ring, your soul enters it, unless it already houses | |
::type :ring | ||
::rarity :very-rare | ||
::attunement [:any] | ||
::attunement-details "requires attunement outdoors at night" | ||
::attunement-details "requires attunement outdoors at night" | ||
::description "While wearing this ring in dim light or darkness, you can cast dancing lights and light from the ring at will. Casting either spell from the ring requires an action. | ||
The ring has 6 charges for the following other properties. The ring regains 1d6 expended charges daily at dawn. | ||
Faerie Fire. You can expend 1 charge as an action to cast faerie fire from the ring. | ||
|
@@ -2497,20 +2518,20 @@ Retributive Strike. You can use an action to break the staff over your knee or a | |
You have a 50 percent chance to instantly travel to a random plane of existence, avoiding the explosion. If you fail to avoid the effect, you take force damage equal to 16 × the number of charges in the staff. Every other creature in the area must make a DC 17 Dexterity saving throw. On a failed save, a creature takes an amount of damage based on how far away it is from the point of origin, as shown in the following table. On a successful save, a creature takes half as much damage." | ||
}{ | ||
name-key "Staff of Striking" | ||
::type :weapon | ||
::item-subtype :staff | ||
::rarity :very-rare | ||
::type :weapon | ||
::item-subtype :staff | ||
::rarity :very-rare | ||
|
||
::attunement [:any] | ||
::magical-attack-bonus 3 | ||
::magical-damage-bonus 3 | ||
::description "This staff can be wielded as a magic quarterstaff that grants a +3 bonus to attack and damage rolls made with it. | ||
::attunement [:any] | ||
::magical-attack-bonus 3 | ||
::magical-damage-bonus 3 | ||
::description "This staff can be wielded as a magic quarterstaff that grants a +3 bonus to attack and damage rolls made with it. | ||
The staff has 10 charges. When you hit with a melee attack using it, you can expend up to 3 of its charges. For each charge you expend, the target takes an extra 1d6 force damage. The staff regains 1d6 + 4 expended charges daily at dawn. If you expend the last charge, roll a d20. On a 1, the staff becomes a nonmagical quarterstaff." | ||
}{ | ||
name-key "Staff of Swarming Insects" | ||
::type :weapon | ||
::item-subtype :staff | ||
::rarity :rare | ||
::rarity :rare | ||
::attunement [:bard, :cleric, :druid, :sorcerer, :warlock, :wizard] | ||
|
||
::description "This staff has 10 charges and regains 1d6 + 4 expended charges daily at dawn. If you expend the last charge, roll a d20. On a 1, a swarm of insects consumes and destroys the staff, then disperses. | ||
|
@@ -2525,7 +2546,14 @@ Insect Cloud. While holding the staff, you can use an action and expend 1 charge | |
::attunement [:sorcerer, :warlock, :wizard] | ||
::magical-attack-bonus 2 | ||
::magical-damage-bonus 2 | ||
::modifiers [(mod5e/spell-attack-modifier-bonus 2)] | ||
::modifiers [(mod5e/spell-attack-modifier-bonus 2) | ||
(mod5e/saving-throw-advantage ["spells"]) | ||
(mod5e/reaction | ||
{:name "Staff of the Magi" | ||
:page 203 | ||
:source :dmg | ||
:frequency units5e/long-rests-1 | ||
:summary "Absorb spell cast by another creature, targetting only you. Cancel its effect and gain charges equal to absorbed spell's level. Staff explodes, as per Retributive Strike, if brought over 50 charges."})] | ||
::description "This staff can be wielded as a magic quarterstaff that grants a +2 bonus to attack and damage rolls made with it. While you hold it, you gain a +2 bonus to spell attack rolls. | ||
The staff has 50 charges for the following properties. It regains 4d6 + 2 expended charges daily at dawn. If you expend the last charge, roll a d20. On a 20, the staff regains 1d12 + 1 charges. | ||
Spell Absorption. While holding the staff, you have advantage on saving throws against spells. In addition, you can use your reaction when another creature casts a spell that targets only you. If you do, the staff absorbs the magic of the spell, canceling its effect and gaining a number of charges equal to the absorbed spell’s level. However, if doing so brings the staff’s total number of charges above 50, the staff explodes as if you activated its retributive strike (see below). | ||
|
@@ -2612,7 +2640,7 @@ The staff can be wielded as a magic quarterstaff. On a hit, it deals damage as a | |
::magical-damage-bonus 2 | ||
::magical-damage-type :radiant | ||
::magical-finesse? true | ||
|
||
::description "This item appears to be a longsword hilt. While grasping the hilt, you can use a bonus action to cause a blade of pure radiance to spring into existence, or make the blade disappear. While the blade exists, this magic longsword has the finesse property. If you are proficient with shortswords or longswords, you are proficient with the sun blade. | ||
You gain a +2 bonus to attack and damage rolls made with this weapon, which deals radiant damage instead of slashing damage. When you hit an undead with it, that target takes an extra 1d8 radiant damage. | ||
The sword’s luminous blade emits bright light in a 15-foot radius and dim light for an additional 15 feet. The light is sunlight. While the blade persists, you can use an action to expand or reduce its radius of bright and dim light by 5 feet each, to a maximum of 30 feet each or a minimum of 10 feet each." | ||
|
@@ -2646,12 +2674,12 @@ foot radius and dim light for an additional 10 feet. Speaking the command word a | |
Once per turn, when you hit a creature with an attack using this magic weapon, you can wound the target. At the start of each of the wounded creature’s turns, it takes 1d4 necrotic damage for each time you’ve wounded it, and it can then make a DC 15 Constitution saving throw, ending the effect of all such wounds on itself on a success. Alternatively, the wounded creature, or a creature within 5 feet of it, can use an action to make a DC 15 Wisdom (Medicine) check, ending the effect of such wounds on it on a success." | ||
}{ | ||
name-key "Talisman of Pure Good" | ||
::type :wondrous-item | ||
::type :wondrous-item | ||
|
||
::rarity :legendary | ||
::rarity :legendary | ||
|
||
::attunement [:good] | ||
::description "This talisman is a mighty symbol of goodness. A creature that is neither good nor evil in alignment takes 6d6 radiant damage upon touching the talisman. An evil creature takes 8d6 radiant damage upon touching the talisman. Either sort of creature takes the damage again each time it ends its turn holding or carrying the talisman. | ||
::attunement [:good] | ||
::description "This talisman is a mighty symbol of goodness. A creature that is neither good nor evil in alignment takes 6d6 radiant damage upon touching the talisman. An evil creature takes 8d6 radiant damage upon touching the talisman. Either sort of creature takes the damage again each time it ends its turn holding or carrying the talisman. | ||
If you are a good cleric or paladin, you can use the talisman as a holy symbol, and you gain a +2 bonus to spell attack rolls while you wear or hold it. | ||
The talisman has 7 charges. If you are wearing or holding it, you can use an action to expend 1 charge from it and choose one creature you can see on the ground within 120 feet of you. If the target is of evil alignment, a flaming fissure opens under it. The target must succeed on a DC 20 Dexterity saving throw or fall into the fissure and be destroyed, leaving no remains. The fissure then closes, leaving no trace of its existence. When you expend the last charge, the talisman disperses into motes of golden light and is destroyed." | ||
}{ | ||
|
@@ -2816,25 +2844,17 @@ The wand regains 1d6 + 1 expended charges daily at dawn. If you expend the wand | |
::type :wand | ||
::rarity :uncommon | ||
::description "The wand has 3 charges. While holding it, you can use an action to expend 1 of its charges, and if a secret door or trap is within 30 feet of you, the wand pulses and points at the one nearest to you. The wand regains 1d3 expended charges daily at dawn." | ||
}{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you just need to add: |
||
name-key "Wand of the War Mage, +1" | ||
::type :wand | ||
::rarity :uncommon | ||
::attunement [:spellcaster] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
::description "While holding this wand, you gain a +1 bonus to spell attack rolls. In addition, you ignore half cover when making a spell attack." | ||
}{ | ||
name-key "Wand of the War Mage, +2" | ||
::type :wand | ||
::rarity :rare | ||
::attunement [:spellcaster] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
::description "While holding this wand, you gain a +2 bonus to spell attack rolls. In addition, you ignore half cover when making a spell attack." | ||
}{ | ||
name-key "Wand of the War Mage, +3" | ||
::type :wand | ||
::rarity :very-rare | ||
::attunement [:spellcaster] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
::description "While holding this wand, you gain a +3 bonus to spell attack rolls. In addition, you ignore half cover when making a spell attack." | ||
}{ | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and this whole section can be removed. |
||
(caster-bonus-item "Wand of the War Mage" 1 :wand :rare [:spellcaster] | ||
[:sp-atk-mod] | ||
"While holding this wand, you gain a +1 bonus to spell attack rolls. In addition, you ignore half cover when making a spell attack.") | ||
(caster-bonus-item "Wand of the War Mage" 2 :wand :rare [:spellcaster] | ||
[:sp-atk-mod] | ||
"While holding this wand, you gain a +2 bonus to spell attack rolls. In addition, you ignore half cover when making a spell attack.") | ||
(caster-bonus-item "Wand of the War Mage" 3 :wand :rare [:spellcaster] | ||
[:sp-atk-mod] | ||
"While holding this wand, you gain a +3 bonus to spell attack rolls. In addition, you ignore half cover when making a spell attack.") | ||
{ | ||
name-key "Wand of Web" | ||
::type :wand | ||
::rarity :uncommon | ||
|
@@ -2966,7 +2986,7 @@ The boots regain 2 hours of flying capability for every 12 hours they aren’t i | |
(throw (IllegalArgumentException. (str "No base types matched for weapon item!: " (::name item)))))) | ||
(map | ||
(fn [weapon] | ||
(let [name (if name-fn | ||
(let [name (if name-fn | ||
(name-fn weapon) | ||
(if (> (count of-type) 1) | ||
(str (name-key item) ", " (:name weapon)) | ||
|
@@ -3014,7 +3034,7 @@ The boots regain 2 hours of flying capability for every 12 hours they aren’t i | |
(map | ||
(fn [armor] | ||
(let [name (if (> (count of-type) 1) | ||
(if name-fn | ||
(if name-fn | ||
(name-fn armor) | ||
(str (name-key item) ", " (:name armor))) | ||
(name-key item)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There already is a
spell-attack-modifier-bonus
and aspell-save-dc-bonus
in modifiers.cljcDo they not provide the functionality your after?
They can be used like this: