Added Names to GOAP Actions
This commit is contained in:
parent
fe7033f747
commit
a0cd9f02fa
BIN
COMP250_1_2101327_AI/Content/StarterContent/Architecture/Floor_400x400.uasset
(Stored with Git LFS)
BIN
COMP250_1_2101327_AI/Content/StarterContent/Architecture/Floor_400x400.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
COMP250_1_2101327_AI/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset
(Stored with Git LFS)
BIN
COMP250_1_2101327_AI/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset
(Stored with Git LFS)
Binary file not shown.
@ -6,6 +6,7 @@
|
||||
void UCOMBO_A::Init()
|
||||
{
|
||||
ActionCost = 3.0f;
|
||||
ActionName = "A";
|
||||
PreConditions.Add("AzosResource", 1);
|
||||
Effects.Add("PlayerHealth", 5);
|
||||
Effects.Add("AzosResource", 1);
|
||||
|
@ -6,6 +6,7 @@
|
||||
void UCOMBO_AA::Init()
|
||||
{
|
||||
ActionCost = 2.0f;
|
||||
ActionName = "AA";
|
||||
PreConditions.Add("AzosResource", 2);
|
||||
Effects.Add("PlayerHealth", 10);
|
||||
Effects.Add("AzosResource", 2);
|
||||
|
@ -6,6 +6,7 @@
|
||||
void UCOMBO_AAA::Init()
|
||||
{
|
||||
ActionCost = 1.0f;
|
||||
ActionName = "AAA";
|
||||
PreConditions.Add("AzosResource", 3);
|
||||
Effects.Add("PlayerHealth", 15);
|
||||
Effects.Add("AzosResource", 3);
|
||||
|
@ -6,6 +6,7 @@
|
||||
void UCOMBO_P::Init()
|
||||
{
|
||||
ActionCost = 3.0f;
|
||||
ActionName = "P";
|
||||
PreConditions.Add("ProbertiumResource", 1);
|
||||
Effects.Add("PlayerHealth", 5);
|
||||
Effects.Add("ProbertiumResource", 1);
|
||||
|
@ -6,6 +6,7 @@
|
||||
void UCOMBO_PP::Init()
|
||||
{
|
||||
ActionCost = 2.0f;
|
||||
ActionName = "PP";
|
||||
PreConditions.Add("ProbertiumResource", 2);
|
||||
Effects.Add("PlayerHealth", 10);
|
||||
Effects.Add("ProbertiumResource", 2);
|
||||
|
@ -6,6 +6,7 @@
|
||||
void UCOMBO_PPP::Init()
|
||||
{
|
||||
ActionCost = 1.0f;
|
||||
ActionName = "PPP";
|
||||
PreConditions.Add("ProbertiumResource", 3);
|
||||
Effects.Add("PlayerHealth", 15);
|
||||
Effects.Add("ProbertiumResource", 3);
|
||||
|
@ -6,6 +6,7 @@
|
||||
void UDefaultAttack::Init()
|
||||
{
|
||||
ActionCost = 5.0f;
|
||||
ActionName = "Punch";
|
||||
PreConditions.Add("PlayerHealth", 1);
|
||||
Effects.Add("PlayerHealth", 1);
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ class COMP250_1_2101327_AI_API UGOAPAction : public UObject
|
||||
|
||||
public:
|
||||
float ActionCost = 1.0f;
|
||||
FString ActionName;
|
||||
|
||||
UFUNCTION()
|
||||
bool CheckPreConditions(UWorldState* WorldState);
|
||||
|
@ -472,7 +472,7 @@ void ATurnBaseCombatV2::EnemyTurn()
|
||||
//DamagePlayer(10);
|
||||
if (EnemyActionPlan.Num() > 0)
|
||||
{
|
||||
DamagePlayer(EnemyActionPlan[0]->Perform());
|
||||
DamagePlayer(EnemyActionPlan[0]->Perform(), EnemyActionPlan[0]->ActionName);
|
||||
EnemyActionPlan.RemoveAt(0);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user