Skip to content

Commit

Permalink
clean up if statement parenthesis
Browse files Browse the repository at this point in the history
  • Loading branch information
kakaroto committed Nov 28, 2024
1 parent bb50f9c commit 79fad59
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/dndbeyond/base/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,11 @@ async function buildAttackRoll(character, attack_source, name, description, prop
}

function applyGWFIfRequired(action_name, properties, damage) {
if(((properties["Attack Type"] == "Melee" &&
(
(properties["Properties"].includes("Versatile") && character.getSetting("versatile-choice") != "one") ||
if((properties["Attack Type"] == "Melee" &&
((properties["Properties"].includes("Versatile") && character.getSetting("versatile-choice") != "one") ||
properties["Properties"].includes("Two-Handed"))) ||
action_name.includes("Polearm Master") && character.hasFeat("Polearm Master", false) ||
action_name.includes("Pole Strike") && character.hasFeat("Polearm Master 2024", false))
(action_name.includes("Polearm Master") && character.hasFeat("Polearm Master", false)) ||
a(ction_name.includes("Pole Strike") && character.hasFeat("Polearm Master 2024", false))
) {
if(character.hasGreatWeaponFighting(2014)) {
damage = damage.replace(/[0-9]*d[0-9]+/g, "$&ro<=2");
Expand Down

0 comments on commit 79fad59

Please sign in to comment.