From 05c728386b63bea8154c28144c74b37334398060 Mon Sep 17 00:00:00 2001 From: itamar Date: Thu, 18 Jan 2024 00:30:16 +0200 Subject: [PATCH] Changed default affliction duration to be the maximum duration rather than the first stage --- scripts/pf2e-extempore-effects.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/pf2e-extempore-effects.js b/scripts/pf2e-extempore-effects.js index 4f4ae87..04b08ce 100644 --- a/scripts/pf2e-extempore-effects.js +++ b/scripts/pf2e-extempore-effects.js @@ -432,9 +432,9 @@ const defineDurationFromTextOfAffliction = (itemDescriptionText) => { const maximumDurationMatch = itemDescriptionText // example: '

Maximum Duration 6 rounds

' .match(/

\s*\s*Maximum Duration<\/strong> (\d+ rounds?)\s*<\/p>/) - // defaults to maximum duration if 1st-stage duration doesn't exist, because some creatures (like Athach) are bugged and don't mention specific stage durations - const firstStageDuration = firstStageDurationMatch?.[1] ?? maximumDurationMatch?.[1] ?? '' - const durationObj = defineDurationFromText(firstStageDuration, itemDescriptionText) + // defaults to maximum duration + const chosenDurationText = maximumDurationMatch?.[1] ?? firstStageDurationMatch?.[1] ?? '' + const durationObj = defineDurationFromText(chosenDurationText, itemDescriptionText) return { ...durationObj, // tick down at end of turn rather than start of turn, afflictions are special this way