28 lines
795 B
C++
28 lines
795 B
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
#include "DamageDownPlayer.h"
|
|
|
|
void UDamageDownPlayer::Invoke(AActor* Character, float TimeOfExpiry)
|
|
{
|
|
ATurnBaseCombatV2* CombatSystem = Cast<ATurnBaseCombatV2>(GetWorld()->GetGameState());
|
|
CombatSystem->BaseDamageMultiplier -= PlayerDamageMultiplierDecreaseAmount;
|
|
}
|
|
|
|
void UDamageDownPlayer::OnExpiry(AActor* Character)
|
|
{
|
|
ATurnBaseCombatV2* CombatSystem = Cast<ATurnBaseCombatV2>(GetWorld()->GetGameState());
|
|
CombatSystem->BaseDamageMultiplier += PlayerDamageMultiplierDecreaseAmount;
|
|
Super::OnExpiry(Character);
|
|
}
|
|
|
|
void UDamageDownPlayer::OnEnemyTurn(AActor* Enemy, AActor* Character)
|
|
{
|
|
BaseDuration -= 1.0f;
|
|
Super::OnEnemyTurn(Enemy, Character);
|
|
if (BaseDuration <= 0.0f)
|
|
{
|
|
OnExpiry(Character);
|
|
}
|
|
}
|