Bugfix Boss End Dialogue Duplicating And Removing Input
This commit is contained in:
parent
0d7e8c5187
commit
12a7881592
BIN
Content/BlueprintAI/AI/AIBruh_Boss.uasset
(Stored with Git LFS)
BIN
Content/BlueprintAI/AI/AIBruh_Boss.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Levels/Build.umap
(Stored with Git LFS)
BIN
Content/Levels/Build.umap
(Stored with Git LFS)
Binary file not shown.
@ -439,7 +439,6 @@ void ATurnBaseCombatV2::DamagePlayer(int Damage, const FString& DamageType)
|
|||||||
AddBattleLogMessage("Player was damaged for " + FString::FromInt(Damage * EnemyBaseDamageMultiplier) + " HP by " + DamageType + ".");
|
AddBattleLogMessage("Player was damaged for " + FString::FromInt(Damage * EnemyBaseDamageMultiplier) + " HP by " + DamageType + ".");
|
||||||
if (*EnemyHealth <= 0)
|
if (*EnemyHealth <= 0)
|
||||||
{
|
{
|
||||||
EndCombat();
|
|
||||||
FProperty* IsBossProperty = FindFieldChecked<FProperty>(EnemyActor->GetClass(), "IsBoss");
|
FProperty* IsBossProperty = FindFieldChecked<FProperty>(EnemyActor->GetClass(), "IsBoss");
|
||||||
const FBoolProperty* IsBossBoolProperty = CastFieldChecked<FBoolProperty>(IsBossProperty);
|
const FBoolProperty* IsBossBoolProperty = CastFieldChecked<FBoolProperty>(IsBossProperty);
|
||||||
if (IsBossBoolProperty->GetPropertyValue_InContainer(EnemyActor))
|
if (IsBossBoolProperty->GetPropertyValue_InContainer(EnemyActor))
|
||||||
@ -448,6 +447,7 @@ void ATurnBaseCombatV2::DamagePlayer(int Damage, const FString& DamageType)
|
|||||||
EnemyActor->CallFunctionByNameWithArguments(*Command, AR, nullptr, true);
|
EnemyActor->CallFunctionByNameWithArguments(*Command, AR, nullptr, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
EndCombat();
|
||||||
Cast<ATempCharacter>(PlayerActor)->GoldBalance += 100;
|
Cast<ATempCharacter>(PlayerActor)->GoldBalance += 100;
|
||||||
EnemyActor->Destroy();
|
EnemyActor->Destroy();
|
||||||
return;
|
return;
|
||||||
@ -494,13 +494,13 @@ void ATurnBaseCombatV2::DamageEnemy(int Damage, const FString& DamageType)
|
|||||||
//Ends Combat if either the player or enemy is dead
|
//Ends Combat if either the player or enemy is dead
|
||||||
if (*EnemyHealth <= 0)
|
if (*EnemyHealth <= 0)
|
||||||
{
|
{
|
||||||
EndCombat();
|
|
||||||
if (IsBossBoolProperty->GetPropertyValue_InContainer(EnemyActor))
|
if (IsBossBoolProperty->GetPropertyValue_InContainer(EnemyActor))
|
||||||
{
|
{
|
||||||
const FString Command2 = FString::Printf(TEXT("TriggerDeathAnimation"));
|
const FString Command2 = FString::Printf(TEXT("TriggerDeathAnimation"));
|
||||||
EnemyActor->CallFunctionByNameWithArguments(*Command2, AR, nullptr, true);
|
EnemyActor->CallFunctionByNameWithArguments(*Command2, AR, nullptr, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
EndCombat();
|
||||||
Cast<ATempCharacter>(PlayerActor)->GoldBalance += 100;
|
Cast<ATempCharacter>(PlayerActor)->GoldBalance += 100;
|
||||||
EnemyActor->Destroy();
|
EnemyActor->Destroy();
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user