diff --git a/Content/Levels/Build.umap b/Content/Levels/Build.umap index ca70f1c..4f1b33e 100644 --- a/Content/Levels/Build.umap +++ b/Content/Levels/Build.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0464148e35f23ace7d17a6dc4c509b52ee33a6803243ec4a5e239e288778cb18 -size 5334633 +oid sha256:a9cd7943f4dde6b28eeb1ccc1163044714c30018854cd844a1b6727d2bfffc73 +size 5332820 diff --git a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp index 2e98e04..3372fe6 100644 --- a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp +++ b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp @@ -343,7 +343,7 @@ void ATurnBaseCombatV2::ExecuteCast(FString Combo) { FOutputDeviceNull AR; UStatusSystem* StatusSystem = Cast(PlayerActor->GetComponentByClass(UStatusSystem::StaticClass())); - if (Combo == "PA") + if (Combo == "PA" || Combo == "AP") { UStatusEffect* TempThornsStatusEffect = NewObject(PlayerActor, ThornsStatusEffect); StatusSystem->AddStatusEffect(TempThornsStatusEffect, 1, false); @@ -354,7 +354,7 @@ void ATurnBaseCombatV2::ExecuteCast(FString Combo) const FString Command3 = FString::Printf(TEXT("PlayStatusAnimation")); HUD->CallFunctionByNameWithArguments(*Command3, AR, nullptr, true); } - else if (Combo == "PI") + else if (Combo == "PI" || Combo == "IP") { UStatusEffect* TempDOTStatusEffect = NewObject(PlayerActor, DOTStatusEffect); StatusSystem->AddStatusEffect(TempDOTStatusEffect, 1, false); @@ -365,7 +365,7 @@ void ATurnBaseCombatV2::ExecuteCast(FString Combo) const FString Command3 = FString::Printf(TEXT("PlayStatusAnimation")); HUD->CallFunctionByNameWithArguments(*Command3, AR, nullptr, true); } - else if (Combo == "AI") + else if (Combo == "AI" || Combo == "IA") { UStatusEffect* TempDamageDownStatusEffect = NewObject(PlayerActor, DamageDownStatusEffect); StatusSystem->AddStatusEffect(TempDamageDownStatusEffect, 1, true); @@ -413,7 +413,7 @@ void ATurnBaseCombatV2::ExecuteCast(FString Combo) { case true: // Player Turn - DamageEnemy(*ValidCombos.Find(Combo)); + DamageEnemy(ValidCombos.Contains(Combo) ? *ValidCombos.Find(Combo) : *ValidCombos.Find(Combo.Reverse())); OnPlayerTurn.Broadcast(PlayerActor, EnemyActor); break; case false: @@ -565,12 +565,14 @@ float ATurnBaseCombatV2::CalculateEscapePercentage() const bool ATurnBaseCombatV2::IsValidCombo(const FString& Combo) const { - return ValidCombos.Contains(Combo); + if (ValidCombos.Contains(Combo) || ValidCombos.Contains(Combo.Reverse())) return true; + return false; } bool ATurnBaseCombatV2::IsSpecialCombo(const FString& Combo) const { - return SpecialCombos.Contains(Combo); + if (SpecialCombos.Contains(Combo) || SpecialCombos.Contains(Combo.Reverse())) return true; + return false; } void ATurnBaseCombatV2::SwitchTurn()