2023-05-12 19:44:46 +00:00
|
|
|
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
|
|
|
|
|
|
#include "DamageDownPlayer.h"
|
|
|
|
|
|
|
|
void UDamageDownPlayer::Invoke(AActor* Character, float TimeOfExpiry)
|
|
|
|
{
|
|
|
|
CombatSystem = Cast<ATurnBaseCombatV2>(GetWorld()->GetGameState());
|
|
|
|
CombatSystem->BaseDamageMultiplier -= PlayerDamageMultiplierDecreaseAmount;
|
|
|
|
}
|
|
|
|
|
|
|
|
void UDamageDownPlayer::OnExpiry(AActor* Character)
|
|
|
|
{
|
|
|
|
CombatSystem->BaseDamageMultiplier += PlayerDamageMultiplierDecreaseAmount;
|
2023-05-12 23:42:38 +00:00
|
|
|
Super::OnExpiry(Character);
|
2023-05-12 19:44:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void UDamageDownPlayer::OnEnemyTurn(AActor* Enemy, AActor* Character)
|
|
|
|
{
|
|
|
|
BaseDuration -= 1.0f;
|
|
|
|
Super::OnEnemyTurn(Enemy, Character);
|
|
|
|
if (BaseDuration <= 0.0f)
|
|
|
|
{
|
|
|
|
OnExpiry(Character);
|
|
|
|
}
|
|
|
|
}
|