Updated Healing & Buff Jelly to Change Max Values to 20

This commit is contained in:
Philip W 2023-05-14 21:34:08 +01:00
parent ac0752154d
commit d24194b1cb

View File

@ -43,10 +43,10 @@ void UEatableItems::Use(ATempCharacter* Character)
if (isProbertiumType)
{
TurnBaseCombat = GetWorld()->GetGameState<ATurnBaseCombatV2>();
if (TurnBaseCombat->ProbertiumResource < 10)
if (TurnBaseCombat->ProbertiumResource < 20)
{
UE_LOG(LogTemp, Warning, TEXT("Probertium eaten"));
TurnBaseCombat->ProbertiumResource = FMath::Clamp(TurnBaseCombat->ProbertiumResource + 2, 0, 10);
TurnBaseCombat->ProbertiumResource = FMath::Clamp(TurnBaseCombat->ProbertiumResource + 2, 0, 20);
Character->Inventory->RemoveItem(this);
}
}
@ -54,10 +54,10 @@ void UEatableItems::Use(ATempCharacter* Character)
if (isEisType)
{
TurnBaseCombat = GetWorld()->GetGameState<ATurnBaseCombatV2>();
if (TurnBaseCombat->EisResource < 10)
if (TurnBaseCombat->EisResource < 20)
{
UE_LOG(LogTemp, Warning, TEXT("Eis eaten"));
TurnBaseCombat->EisResource = FMath::Clamp(TurnBaseCombat->EisResource + 2, 0, 10);
TurnBaseCombat->EisResource = FMath::Clamp(TurnBaseCombat->EisResource + 2, 0, 20);
Character->Inventory->RemoveItem(this);
}
}
@ -65,10 +65,10 @@ void UEatableItems::Use(ATempCharacter* Character)
if (isAzosType)
{
TurnBaseCombat = GetWorld()->GetGameState<ATurnBaseCombatV2>();
if (TurnBaseCombat->AzosResource < 10)
if (TurnBaseCombat->AzosResource < 20)
{
UE_LOG(LogTemp, Warning, TEXT("Azos eaten"));
TurnBaseCombat->AzosResource = FMath::Clamp(TurnBaseCombat->AzosResource + 2, 0, 10);
TurnBaseCombat->AzosResource = FMath::Clamp(TurnBaseCombat->AzosResource + 2, 0, 20);
Character->Inventory->RemoveItem(this);
}
}
@ -76,10 +76,10 @@ void UEatableItems::Use(ATempCharacter* Character)
if (isIroquoidType)
{
TurnBaseCombat = GetWorld()->GetGameState<ATurnBaseCombatV2>();
if (TurnBaseCombat->IroquoidResource < 10)
if (TurnBaseCombat->IroquoidResource < 20)
{
UE_LOG(LogTemp, Warning, TEXT("Iroq eaten"));
TurnBaseCombat->IroquoidResource = FMath::Clamp(TurnBaseCombat->IroquoidResource + 3, 0, 10);
TurnBaseCombat->IroquoidResource = FMath::Clamp(TurnBaseCombat->IroquoidResource + 3, 0, 20);
Character->Inventory->RemoveItem(this);
}
}