From 19bbc3067e6dd577b095e3f2efb7de6eb636e922 Mon Sep 17 00:00:00 2001 From: Eligarf Date: Mon, 28 Oct 2024 08:31:16 -0700 Subject: [PATCH] Added missing await --- ChangeLog.md | 9 +++++++-- README.md | 8 ++++---- esmodules/combat.js | 4 ++-- languages/en.json | 10 ++-------- languages/pl.json | 8 +------- 5 files changed, 16 insertions(+), 23 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 0e736e9..83c58ad 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,6 +1,11 @@ +# v1.13.1 +* Added a missing await + # v1.13.0 * Added an opt-in setting to enable autorolling of non-attack spell damage before saves are rolled. -* Added a rage setting to automate barbarians entering rage at combat start +* Added an opt-in rage setting to automate barbarians entering rage at combat start +* Verify for 6.5 +* Update pl.json (thanks Lioheart) # v1.12.2 * Update pl.json (thanks Lioheart) @@ -9,7 +14,7 @@ * Better error messages, don't require `Raise a Shield` action to be present on the actor sheet. # v1.12.0 -* Add a defaulted-true game setting to use the `raise-a-shield` action at combat start for PCs using the `defend` exploration activity and have a Raise a Shield action listed in their encounter actions. Effects don't automatically expire at the beginning of turn 1, so this has to be manually managed. +* Add an opt-out setting to use the `raise-a-shield` action at combat start for PCs using the `defend` exploration activity and have a Raise a Shield action listed in their encounter actions. Effects don't automatically expire at the beginning of turn 1, so this has to be manually managed. # v1.11.1 * Fix error at combat start if an avoiding combatant has sent a non-roll chat card after the initiative roll. diff --git a/README.md b/README.md index 6a9785d..6ec0080 100644 --- a/README.md +++ b/README.md @@ -54,16 +54,16 @@ The 'Pathfinder on Foundry VTT Community and Volunteer Development Server' disco # Misfit features -These belong in some other module, but they are handy to me so I'm sharing. +These really don't belong here and should be in some other module(s), but they are handy to me so I'm sharing. ## Raise a Shield -I've added support to automatically apply `Raise a shield` to PCs using `Defend` at combat start. It doesn't really belong with a stealth module, but since I was mucking about with combat start I went ahead and added it because manually doing this every time bugged me. Do note that the shield effect won't automatically expire at the beginning of turn 1; the system doesn't seem to process turn-based expiration until round 2, so you will have to manually delete the effect if the `Raise a shield` action isn't taken on turn 1. It will automatically expire on turn 2 however. +This is an opt-out setting to automatically apply `Raise a shield` to PCs using `Defend` at combat start. Do note that the shield effect won't automatically expire at the beginning of turn 1; the system doesn't seem to process turn-based expiration until round 2, so you will have to manually delete the effect if the `Raise a shield` action isn't taken on turn 1. It will automatically expire on turn 2 however. ## Autoroll Spell Damage -I added a game setting to enable autorolling damage on non-attack spells, which only rolls the damage if the message card from the spell cast has a 'Roll Damage' button when it is created. This works differently from the autoroll feature of *PF2e Workbench* since it immediately rolls the damage and doesn't wait for a saving throw roll to trigger the automatic damage roll. It is off by default to avoid upsetting GMs who want to hide more rolls, but I heartily recommend it. +This is an opt-in setting to enable autorolling damage on non-attack spells, which only rolls the damage if the message card from the spell cast has a button with a `spell-damage` data action when it is created. This works differently from the autoroll feature of *PF2e Workbench* since it immediately rolls the damage and doesn't wait for a saving throw roll to trigger the automatic damage roll. It is off by default to avoid upsetting GMs who want to hide more rolls, but I heartily recommend it. ## Rage -Automation can be enabled to have Barbarians with `Quick-Tempered` automatically enter `Rage` at combat start. +This is an opt-in setting to automate Barbarians with `Quick-Tempered` so they automatically enter `Rage` at combat start. The `Rage` action will be ignored if it doesn't have a self-applied effect. diff --git a/esmodules/combat.js b/esmodules/combat.js index 891f34f..1b778c6 100644 --- a/esmodules/combat.js +++ b/esmodules/combat.js @@ -177,7 +177,7 @@ async function raiseDefendingShields(pcs) { if (!object?.control) continue; object.control(); log(`raising ${defender.actor.name}'s shield`); - game.pf2e.actions.raiseAShield({ actors: [defender.actor] }); + await game.pf2e.actions.raiseAShield({ actors: [defender.actor] }); } } @@ -355,7 +355,7 @@ Hooks.once('init', () => { // Add a new category if necessary, and put this other token's result in the message data if (!(target.result in messageData)) { messageData[target.result] = { - title: game.i18n.localize(`${MODULE_ID}.detectionTitle.${target.result}`), + title: game.i18n.localize(`PF2E.condition.${target.result}.name`), resultClass: (delta >= 0) ? 'success' : 'failure', targets: [target] }; diff --git a/languages/en.json b/languages/en.json index 34617d3..2ebc0fb 100644 --- a/languages/en.json +++ b/languages/en.json @@ -1,11 +1,5 @@ { "pf2e-avoid-notice": { - "detectionTitle": { - "observed": "Observed", - "hidden": "Hidden", - "undetected": "Undetected", - "unnoticed": "Unnoticed" - }, "standardCover": "Standard Cover", "greaterCover": "Greater Cover", "logLevel": { @@ -24,7 +18,7 @@ }, "raiseShields": { "name": "Raise PC shields when Defending", - "hint": "Requires PCs to have held shields and have the Defend exploration activity active. They also need to have Raise A Shield in their encounter actions", + "hint": "Requires PCs to have held shields and have the Defend exploration activity active.", "heldShield": "{actor} must have a shield equipped to {activity}." }, "autorollSpellDamage": { @@ -33,7 +27,7 @@ }, "rage": { "name": "Enrage Barbarians at combat start", - "hint": "Requires the 'Quick-Tempered' and 'Rage' feats" + "hint": "Requires the 'Quick-Tempered' feat and 'Rage' action. 'Rage' action also needs a Self-Applied Effect in order to be automated" }, "requireActivity": { "name": "Require 'Avoid Notice' exploration activity", diff --git a/languages/pl.json b/languages/pl.json index b3892f3..503afc0 100644 --- a/languages/pl.json +++ b/languages/pl.json @@ -1,11 +1,5 @@ { "pf2e-avoid-notice": { - "detectionTitle": { - "observed": "Obserwowany", - "hidden": "Ukryty", - "undetected": "Niewykryty", - "unnoticed": "Niezauważony" - }, "standardCover": "Standardowa osłona", "greaterCover": "Większa osłona", "logLevel": { @@ -24,7 +18,7 @@ }, "raiseShields": { "name": "Podnosi tarcze Postaci podczas Obrony", - "hint": "Wymaga, aby Postacie trzymali tarcze i mieli aktywną akcję eksploracji Obrona. Muszą również posiadać akcję Podnieś tarczę w swoich akcjach spotkania.", + "hint": "Wymaga, aby Postacie trzymali tarcze i mieli aktywną akcję eksploracji Obrona.", "heldShield": "{actor} musi mieć wyposażoną tarczę, aby użyć {activity}." }, "autorollSpellDamage": {