diff --git a/COMP250_1_2101327_AI/Source/COMP250_1_2101327_AI/GOAP/Actions/Combo_P.cpp b/COMP250_1_2101327_AI/Source/COMP250_1_2101327_AI/GOAP/Actions/Combo_P.cpp new file mode 100644 index 0000000..3952daa --- /dev/null +++ b/COMP250_1_2101327_AI/Source/COMP250_1_2101327_AI/GOAP/Actions/Combo_P.cpp @@ -0,0 +1,12 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "Combo_P.h" + +void UCombo_P::Init() +{ + PreConditions.Add("PlayerHealth", 15); + PreConditions.Add("ProbertiumResource", 5); + Effects.Add("PlayerHealth", 15); + Effects.Add("ProbertiumResource", 5); +} \ No newline at end of file diff --git a/COMP250_1_2101327_AI/Source/COMP250_1_2101327_AI/GOAP/Actions/Combo_P.h b/COMP250_1_2101327_AI/Source/COMP250_1_2101327_AI/GOAP/Actions/Combo_P.h new file mode 100644 index 0000000..5634ab1 --- /dev/null +++ b/COMP250_1_2101327_AI/Source/COMP250_1_2101327_AI/GOAP/Actions/Combo_P.h @@ -0,0 +1,19 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "../GOAPAction.h" +#include "Combo_P.generated.h" + +/** + * + */ +UCLASS() +class COMP250_1_2101327_AI_API UCombo_P : public UGOAPAction +{ + GENERATED_BODY() + +public: + virtual void Init() override; +}; diff --git a/COMP250_1_2101327_AI/Source/COMP250_1_2101327_AI/GOAP/Actions/DefaultAttack.cpp b/COMP250_1_2101327_AI/Source/COMP250_1_2101327_AI/GOAP/Actions/DefaultAttack.cpp new file mode 100644 index 0000000..0627890 --- /dev/null +++ b/COMP250_1_2101327_AI/Source/COMP250_1_2101327_AI/GOAP/Actions/DefaultAttack.cpp @@ -0,0 +1,11 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "DefaultAttack.h" + +void UDefaultAttack::Init() +{ + ActionCost = 2.0f; + PreConditions.Add("PlayerHealth", 10); + Effects.Add("PlayerHealth", 10); +} diff --git a/COMP250_1_2101327_AI/Source/COMP250_1_2101327_AI/GOAP/Actions/DefaultAttack.h b/COMP250_1_2101327_AI/Source/COMP250_1_2101327_AI/GOAP/Actions/DefaultAttack.h new file mode 100644 index 0000000..258e8b4 --- /dev/null +++ b/COMP250_1_2101327_AI/Source/COMP250_1_2101327_AI/GOAP/Actions/DefaultAttack.h @@ -0,0 +1,19 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "../GOAPAction.h" +#include "DefaultAttack.generated.h" + +/** + * + */ +UCLASS() +class COMP250_1_2101327_AI_API UDefaultAttack : public UGOAPAction +{ + GENERATED_BODY() + +public: + virtual void Init() override; +};