diff --git a/COMP250_1_2101327_AI/Source/COMP250_1_2101327_AI/TurnBasedCombatV2/TurnBaseCombatV2.cpp b/COMP250_1_2101327_AI/Source/COMP250_1_2101327_AI/TurnBasedCombatV2/TurnBaseCombatV2.cpp index 4892fad..aa27535 100644 --- a/COMP250_1_2101327_AI/Source/COMP250_1_2101327_AI/TurnBasedCombatV2/TurnBaseCombatV2.cpp +++ b/COMP250_1_2101327_AI/Source/COMP250_1_2101327_AI/TurnBasedCombatV2/TurnBaseCombatV2.cpp @@ -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 - DamageEnemy(*ValidCombos.Find(Combo), Combo); + if (Combo == "") + { + DamageEnemy(1, "Punch"); + } + else + { + DamageEnemy(*ValidCombos.Find(Combo), Combo); + } OnPlayerTurn.Broadcast(PlayerActor, EnemyActor); break; case false: diff --git a/COMP250_1_2101327_AI/Source/COMP250_1_2101327_AI/TurnBasedCombatV2/TurnBaseCombatV2.h b/COMP250_1_2101327_AI/Source/COMP250_1_2101327_AI/TurnBasedCombatV2/TurnBaseCombatV2.h index a0f7462..90b512e 100644 --- a/COMP250_1_2101327_AI/Source/COMP250_1_2101327_AI/TurnBasedCombatV2/TurnBaseCombatV2.h +++ b/COMP250_1_2101327_AI/Source/COMP250_1_2101327_AI/TurnBasedCombatV2/TurnBaseCombatV2.h @@ -67,6 +67,7 @@ public: UPROPERTY(EditAnywhere) TMap ValidCombos = { + {"", 1}, {"P", 5}, {"PP", 15}, {"PPP", 20},