Added Punch to Player Options & Randomised Resources for Player

This commit is contained in:
Philip W 2023-03-23 01:18:02 +00:00
parent 2b43f174a2
commit 98a9f73095
2 changed files with 13 additions and 5 deletions

View File

@ -44,10 +44,10 @@ void ATurnBaseCombatV2::StartCombat(AActor* Enemy)
HUD->AddToViewport();
EnemyActor = Enemy;
ProbertiumResource = 10;
EisResource = 10;
AzosResource = 10;
IroquoidResource = 10;
ProbertiumResource = FMath::RandRange(0, 10);
EisResource = FMath::RandRange(0, 10);
AzosResource = FMath::RandRange(0, 10);
IroquoidResource = FMath::RandRange(0, 10);
EnemyProbertiumResource = FMath::RandRange(0, 10);
EnemyEisResource = FMath::RandRange(0, 10);
@ -212,7 +212,14 @@ void ATurnBaseCombatV2::ExecuteCast(FString Combo)
{
case true:
// Player Turn
if (Combo == "")
{
DamageEnemy(1, "Punch");
}
else
{
DamageEnemy(*ValidCombos.Find(Combo), Combo);
}
OnPlayerTurn.Broadcast(PlayerActor, EnemyActor);
break;
case false:

View File

@ -67,6 +67,7 @@ public:
UPROPERTY(EditAnywhere)
TMap<FString, int32> ValidCombos =
{
{"", 1},
{"P", 5},
{"PP", 15},
{"PPP", 20},