From e5b26c20ed2241ac7d9a4de48276ce6c69ad1c94 Mon Sep 17 00:00:00 2001 From: PHILIP White Date: Sat, 20 May 2023 02:01:08 +0100 Subject: [PATCH] Updated Combat to Disable Escaping in Boss Battle --- Content/Blueprints/Combat_UI/CombatCharacter.uasset | 4 ++-- Content/Blueprints/Player/BP_MyTempCharacter.uasset | 4 ++-- .../TurnBasedCombatV2/TurnBaseCombatV2.cpp | 5 ++++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Content/Blueprints/Combat_UI/CombatCharacter.uasset b/Content/Blueprints/Combat_UI/CombatCharacter.uasset index 38a77f3..2224465 100644 --- a/Content/Blueprints/Combat_UI/CombatCharacter.uasset +++ b/Content/Blueprints/Combat_UI/CombatCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:49d032ab8dd3ead13cd49c0bc4e75195ecc951a79ebb177118740615e50b8c9e -size 293091 +oid sha256:b49ab218860ee2673901a33766942d25f123df0976e6f6fb5879dcfc7dcfadc1 +size 293481 diff --git a/Content/Blueprints/Player/BP_MyTempCharacter.uasset b/Content/Blueprints/Player/BP_MyTempCharacter.uasset index 3322425..d207cb9 100644 --- a/Content/Blueprints/Player/BP_MyTempCharacter.uasset +++ b/Content/Blueprints/Player/BP_MyTempCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8ea9124a1aee1a7f8f59861697a0241dfe15f1decc3254079ceef4806ddc3272 -size 210142 +oid sha256:e60e91a99d04a203412eda67fb471e1d62ca177bea62013350c8473657bcc199 +size 210512 diff --git a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp index 0632636..4eb63ed 100644 --- a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp +++ b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp @@ -86,6 +86,7 @@ void ATurnBaseCombatV2::StartCombat(AActor* Enemy, const bool bWasShot) LookAtRotation.Pitch += 10; //Offset PlayerController->SetControlRotation(LookAtRotation); EnemyName = FText::FromString("Crystal Mutant"); + RunButton->SetIsEnabled(false); } else EnemyName = FText::FromString("Feral Goat"); @@ -781,7 +782,9 @@ void ATurnBaseCombatV2::EnableButtons() const ToggleButtonIfResourceAvailable(); BackspaceButton->SetIsEnabled(true); CastButton->SetIsEnabled(true); - RunButton->SetIsEnabled(true); + FProperty* IsBossProperty = FindFieldChecked(EnemyActor->GetClass(), "IsBoss"); + const FBoolProperty* IsBossBoolProperty = CastFieldChecked(IsBossProperty); + if (!IsBossBoolProperty->GetPropertyValue_InContainer(EnemyActor)) RunButton->SetIsEnabled(true); } void ATurnBaseCombatV2::EnemyTurn()