Skip to content

Commit

Permalink
Merge pull request #1207 from dmportella/druid-2024-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kakaroto authored Dec 16, 2024
2 parents d5c8763 + a439ee3 commit 465cef9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/common/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,12 @@ const character_settings = {
"type": "bool",
"default": true
},
"druid-improved-lunar-radiance": {
"title": "Druid: Improved Lunar Radiance",
"description": "Once per turn, you can deal an extra 2d10 Radiant damage to a target you hit with a Wild Shape forms attack.",
"type": "bool",
"default": false
},
"discord-target": {
"title": "Discord Destination",
"description": "Send rolls to a character specific Discord channel",
Expand Down
6 changes: 6 additions & 0 deletions src/dndbeyond/base/extras.js
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,12 @@ class MonsterExtras extends CharacterBase {
roll_properties["damages"].push(String(rage_damage));
roll_properties["damage-types"].push("Rage");
}

if(this._parent_character.hasClass("Druid") && this._parent_character.hasClassFeature("Improved Lunar Radiance", true) && this._parent_character.getSetting("druid-improved-lunar-radiance", false))
{
roll_properties["damages"].push(String("2d10"));
roll_properties["damage-types"].push("Lunar Radiance");
}
// Add custom damages to wild shape attacks
addCustomDamages(character, roll_properties["damages"], roll_properties["damage-types"]);
}
Expand Down
4 changes: 4 additions & 0 deletions src/extension/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,10 @@ function populateCharacter(response) {
e = createHTMLOption("cleric-circle-of-mortality", false, character_settings);
options.append(e);
}
if (response["class-features"].includes("Lunar Form: Wild Shape: Improved Lunar Radiance")) {
e = createHTMLOption("druid-improved-lunar-radiance", false, character_settings);
options.append(e);
}
}
$('.beyond20-option-input').off('change', save_settings);
$('.beyond20-option-input').change(save_settings);
Expand Down

0 comments on commit 465cef9

Please sign in to comment.