Skip to content

Commit

Permalink
Add support for Paladin's Radiant strikes
Browse files Browse the repository at this point in the history
Support added by Lott in PR 1208
Closes #1208
  • Loading branch information
kakaroto committed Dec 17, 2024
1 parent 318e1c5 commit 91ef360
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/common/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,12 @@ const character_settings = {
"type": "bool",
"default": true
},
"paladin-radiant-strikes": {
"title": "Paladin: Radiant Strikes",
"description": "Roll an extra 1d8 radiant damage whenever you hit with a melee weapon or an unarmed strike",
"type": "bool",
"default": true
},
"paladin-invincible-conqueror": {
"title": "Paladin: Oath of Conquest: Invincible Conqueror",
"description": "You can harness extraordinary martial prowess for 1 minute.",
Expand Down
10 changes: 7 additions & 3 deletions src/dndbeyond/content-scripts/character.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,13 @@ function handleSpecialMeleeAttacks(damages=[], damage_types=[], properties, sett
}

if (character.hasClass("Paladin")) {
//Paladin: Improved Divine Smite
if (character.hasClassFeature("Improved Divine Smite") &&
character.getSetting("paladin-improved-divine-smite", true)) {
// Paladin: Improved Divine Smite
// Radiant Strikes works on melee and unarmed strikes, while Improved Divine Smite
// only works on melee weapon attacks, so check for action_name which would indicate a non weapon attack
if ((character.hasClassFeature("Improved Divine Smite") &&
character.getSetting("paladin-improved-divine-smite", true) && !action_name) ||
(character.hasClassFeature("Radiant Strikes") &&
character.getSetting("paladin-radiant-strikes", true))) {
damages.push("1d8");
damage_types.push("Radiant");
}
Expand Down
4 changes: 4 additions & 0 deletions src/extension/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ function populateCharacter(response) {
e = createHTMLOption("paladin-improved-divine-smite", false, character_settings);
options.append(e);
}
if (response["class-features"].includes("Radiant Strikes")) {
e = createHTMLOption("paladin-radiant-strikes", false, character_settings);
options.append(e);
}
if (response["class-features"].includes("Hexblade’s Curse")) {
e = createHTMLOption("warlock-hexblade-curse", false, character_settings);
options.append(e);
Expand Down

0 comments on commit 91ef360

Please sign in to comment.