From 3d0c11225a3a721857f5f3a423bb042eb0d0052d Mon Sep 17 00:00:00 2001 From: Guy Elsmore-Paddock Date: Mon, 4 Dec 2023 00:28:48 -0500 Subject: [PATCH] [#53] Do Not Switch Turns if an Active Ability Blocks the End of Turn This prevents the active character's turn from ending if they're in the middle of an attack. Without this logic, the turn would end as soon as the character is out of action points to spend, leading to inconsistent behavior during post-attack logic that depends on knowing who the active character is (e.g., shifting initiative on a knocked-out character to be right before the initiative of the character who knocked them out). --- Config/Tags/PF2GameplayAbilities.ini | 1 + .../Encounters/BTDecorator_CanActiveCharacterEndTurn.uasset | 3 +++ .../Optional/ModesOfPlay/Encounters/BT_EncounterAI.uasset | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 Content/OpenPF2/Optional/ModesOfPlay/Encounters/BTDecorator_CanActiveCharacterEndTurn.uasset diff --git a/Config/Tags/PF2GameplayAbilities.ini b/Config/Tags/PF2GameplayAbilities.ini index 2f53b4afe..ed9823701 100644 --- a/Config/Tags/PF2GameplayAbilities.ini +++ b/Config/Tags/PF2GameplayAbilities.ini @@ -10,6 +10,7 @@ GameplayTagList=(Tag="GameplayAbility.Type.DefaultMovement",DevComment="Tag appl GameplayTagList=(Tag="GameplayAbility.Type.DefaultFaceTarget",DevComment="Tag applied to Gameplay Abilities that have a character rotate to face another actor.") GameplayTagList=(Tag="GameplayAbility.Type.QueueableAction", DevComment="Tag applied to Gameplay Abilities that can be queued during encounters. This should also be used as a blocking tag to prevent it from being run concurrently with other actions at the time it is de-queued.") GameplayTagList=(Tag="GameplayAbility.Type.DirectlyInvokable",DevComment="Tag applied to Gameplay Abilities that can be directly invoked by the player (e.g., from an ability dialog or input binding).") +GameplayTagList=(Tag="GameplayAbility.Type.BlocksEndOfTurn",DevComment="Tag applied to Gameplay Abilities that prevent a character's turn from ending while they are active (e.g., an attack that is in progress).") ; Tags that identify additional metadata that has been passed along for an ability activation. GameplayTagList=(Tag="GameplayAbility.Activation.Metadata.HasTarget.Character", DevComment="Tag that a Gameplay Ability activation includes a target character (for healing or attack) chosen by the player.") diff --git a/Content/OpenPF2/Optional/ModesOfPlay/Encounters/BTDecorator_CanActiveCharacterEndTurn.uasset b/Content/OpenPF2/Optional/ModesOfPlay/Encounters/BTDecorator_CanActiveCharacterEndTurn.uasset new file mode 100644 index 000000000..50784ea01 --- /dev/null +++ b/Content/OpenPF2/Optional/ModesOfPlay/Encounters/BTDecorator_CanActiveCharacterEndTurn.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff1e5e28e3318ea8202e55839c38086a36a06f52e0c19908f3b0b2ad7185099f +size 61046 diff --git a/Content/OpenPF2/Optional/ModesOfPlay/Encounters/BT_EncounterAI.uasset b/Content/OpenPF2/Optional/ModesOfPlay/Encounters/BT_EncounterAI.uasset index a3e1c1682..4f4828314 100644 --- a/Content/OpenPF2/Optional/ModesOfPlay/Encounters/BT_EncounterAI.uasset +++ b/Content/OpenPF2/Optional/ModesOfPlay/Encounters/BT_EncounterAI.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6d3d4b696e5b533b553eebd7e8dbbf9e3af21147431cfabcc8d581dc3f67cdb0 -size 24412 +oid sha256:829cf37e08ccce73d5f337743fdb01013be133adf2742d3bc6589dce9a17d9af +size 26033