diff --git a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp index 009d464..fe22ece 100644 --- a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp +++ b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp @@ -156,6 +156,7 @@ void ATurnBaseCombatV2::EndCombat() { StatusEffect->OnExpiry(PlayerActor); } + StatusEffects.Empty(); HUD->RemoveFromParent(); APawn* PlayerPawn = Cast(GetWorld()->GetFirstPlayerController()->GetPawn()); @@ -782,6 +783,7 @@ void ATurnBaseCombatV2::EnableButtons() const void ATurnBaseCombatV2::EnemyTurn() { + if (!IsValid(EnemyActor)) return; int ChanceToMiss; FProperty* IsBossProperty = FindFieldChecked(EnemyActor->GetClass(), "IsBoss"); const FBoolProperty* IsBossBoolProperty = CastFieldChecked(IsBossProperty);