From a75c0dc6d16ee830b3177122ffb346ba70b35eaf Mon Sep 17 00:00:00 2001 From: Jonas Karlsson Date: Sun, 11 Feb 2024 14:11:36 +0100 Subject: [PATCH] fix: Improve description of autorevealing privately cast spells. Fix handling of damagerolls with no context options. --- src/module/feature/damageHandler/index.ts | 2 +- static/lang/en.json | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/module/feature/damageHandler/index.ts b/src/module/feature/damageHandler/index.ts index 0a5781bba..fc841e055 100644 --- a/src/module/feature/damageHandler/index.ts +++ b/src/module/feature/damageHandler/index.ts @@ -60,7 +60,7 @@ export async function autoRollDamage(message: ChatMessagePF2e) { const isFailure = ["criticalFailure", "failure"].includes(degreeOfSuccess); const isSuccess = ["criticalSuccess", "success"].includes(degreeOfSuccess); const context: any = flags.context; - const isBasicSave = context.options.includes("item:defense:basic"); + const isBasicSave = context?.options?.includes("item:defense:basic"); if ( actor && (rollForNonAttackNonSaveSpell || diff --git a/static/lang/en.json b/static/lang/en.json index 98cf0f8b1..ac74ff77d 100644 --- a/static/lang/en.json +++ b/static/lang/en.json @@ -352,12 +352,12 @@ "aSpell": "A spell" }, "castPrivateSpellAutoRevealIfKnown": { - "hint": "Check to not cast privately if any party member knows the spell.", - "name": "... but don't cast privately if spell known by party." + "hint": "Check to autoreveal privately cast spell if any party member knows the spell.", + "name": "... but autoreveal spell if it is known by party." }, "castPrivateSpellAutoRevealPartyMembersThatKnowSpell": { - "hint": "Check to show party members that know the spell in the chat card", - "name": "... and list the party members that know it" + "hint": "Check to, for autorevealed spells, show party members that know the spell in the chat card", + "name": "... and list the party members that know the autorevealed spell" }, "castPrivateSpellHideName": { "hint": "Check to hide the name of a privately cast spell in the damage roll instead of hiding the damage roll.",