From a439ee3f01ecc8593485e2208b39a9e9a597fddd Mon Sep 17 00:00:00 2001 From: dmportella Date: Sat, 7 Dec 2024 15:10:43 +0000 Subject: [PATCH] druid: added support for lunar radiance 2024 --- src/common/settings.js | 6 ++++++ src/dndbeyond/base/extras.js | 6 ++++++ src/extension/popup.js | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/src/common/settings.js b/src/common/settings.js index 4a4eaddc..eccac826 100644 --- a/src/common/settings.js +++ b/src/common/settings.js @@ -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", diff --git a/src/dndbeyond/base/extras.js b/src/dndbeyond/base/extras.js index a3da0422..98e1c362 100644 --- a/src/dndbeyond/base/extras.js +++ b/src/dndbeyond/base/extras.js @@ -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"]); } diff --git a/src/extension/popup.js b/src/extension/popup.js index 7d5a4463..8053002f 100644 --- a/src/extension/popup.js +++ b/src/extension/popup.js @@ -310,6 +310,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);