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() | void UCOMBO_A::Init() | ||||||
| { | { | ||||||
| 	ActionCost = 3.0f; | 	ActionCost = 3.0f; | ||||||
|  | 	ActionName = "A"; | ||||||
| 	PreConditions.Add("AzosResource", 1); | 	PreConditions.Add("AzosResource", 1); | ||||||
| 	Effects.Add("PlayerHealth", 5); | 	Effects.Add("PlayerHealth", 5); | ||||||
| 	Effects.Add("AzosResource", 1); | 	Effects.Add("AzosResource", 1); | ||||||
|  | |||||||
| @ -6,6 +6,7 @@ | |||||||
| void UCOMBO_AA::Init() | void UCOMBO_AA::Init() | ||||||
| { | { | ||||||
| 	ActionCost = 2.0f; | 	ActionCost = 2.0f; | ||||||
|  | 	ActionName = "AA"; | ||||||
| 	PreConditions.Add("AzosResource", 2); | 	PreConditions.Add("AzosResource", 2); | ||||||
| 	Effects.Add("PlayerHealth", 10); | 	Effects.Add("PlayerHealth", 10); | ||||||
| 	Effects.Add("AzosResource", 2); | 	Effects.Add("AzosResource", 2); | ||||||
|  | |||||||
| @ -6,6 +6,7 @@ | |||||||
| void UCOMBO_AAA::Init() | void UCOMBO_AAA::Init() | ||||||
| { | { | ||||||
| 	ActionCost = 1.0f; | 	ActionCost = 1.0f; | ||||||
|  | 	ActionName = "AAA"; | ||||||
| 	PreConditions.Add("AzosResource", 3); | 	PreConditions.Add("AzosResource", 3); | ||||||
| 	Effects.Add("PlayerHealth", 15); | 	Effects.Add("PlayerHealth", 15); | ||||||
| 	Effects.Add("AzosResource", 3); | 	Effects.Add("AzosResource", 3); | ||||||
|  | |||||||
| @ -6,6 +6,7 @@ | |||||||
| void UCOMBO_P::Init() | void UCOMBO_P::Init() | ||||||
| { | { | ||||||
| 	ActionCost = 3.0f; | 	ActionCost = 3.0f; | ||||||
|  | 	ActionName = "P"; | ||||||
| 	PreConditions.Add("ProbertiumResource", 1); | 	PreConditions.Add("ProbertiumResource", 1); | ||||||
| 	Effects.Add("PlayerHealth", 5); | 	Effects.Add("PlayerHealth", 5); | ||||||
| 	Effects.Add("ProbertiumResource", 1); | 	Effects.Add("ProbertiumResource", 1); | ||||||
|  | |||||||
| @ -6,6 +6,7 @@ | |||||||
| void UCOMBO_PP::Init() | void UCOMBO_PP::Init() | ||||||
| { | { | ||||||
| 	ActionCost = 2.0f; | 	ActionCost = 2.0f; | ||||||
|  | 	ActionName = "PP"; | ||||||
| 	PreConditions.Add("ProbertiumResource", 2); | 	PreConditions.Add("ProbertiumResource", 2); | ||||||
| 	Effects.Add("PlayerHealth", 10); | 	Effects.Add("PlayerHealth", 10); | ||||||
| 	Effects.Add("ProbertiumResource", 2); | 	Effects.Add("ProbertiumResource", 2); | ||||||
|  | |||||||
| @ -6,6 +6,7 @@ | |||||||
| void UCOMBO_PPP::Init() | void UCOMBO_PPP::Init() | ||||||
| { | { | ||||||
| 	ActionCost = 1.0f; | 	ActionCost = 1.0f; | ||||||
|  | 	ActionName = "PPP"; | ||||||
| 	PreConditions.Add("ProbertiumResource", 3); | 	PreConditions.Add("ProbertiumResource", 3); | ||||||
| 	Effects.Add("PlayerHealth", 15); | 	Effects.Add("PlayerHealth", 15); | ||||||
| 	Effects.Add("ProbertiumResource", 3); | 	Effects.Add("ProbertiumResource", 3); | ||||||
|  | |||||||
| @ -6,6 +6,7 @@ | |||||||
| void UDefaultAttack::Init() | void UDefaultAttack::Init() | ||||||
| { | { | ||||||
| 	ActionCost = 5.0f; | 	ActionCost = 5.0f; | ||||||
|  | 	ActionName = "Punch"; | ||||||
| 	PreConditions.Add("PlayerHealth", 1); | 	PreConditions.Add("PlayerHealth", 1); | ||||||
| 	Effects.Add("PlayerHealth", 1); | 	Effects.Add("PlayerHealth", 1); | ||||||
| } | } | ||||||
|  | |||||||
| @ -17,6 +17,7 @@ class COMP250_1_2101327_AI_API UGOAPAction : public UObject | |||||||
| 
 | 
 | ||||||
| public: | public: | ||||||
| 	float ActionCost = 1.0f; | 	float ActionCost = 1.0f; | ||||||
|  | 	FString ActionName; | ||||||
| 
 | 
 | ||||||
| 	UFUNCTION() | 	UFUNCTION() | ||||||
| 	bool CheckPreConditions(UWorldState* WorldState); | 	bool CheckPreConditions(UWorldState* WorldState); | ||||||
|  | |||||||
| @ -472,7 +472,7 @@ void ATurnBaseCombatV2::EnemyTurn() | |||||||
| 	//DamagePlayer(10);
 | 	//DamagePlayer(10);
 | ||||||
| 	if (EnemyActionPlan.Num() > 0) | 	if (EnemyActionPlan.Num() > 0) | ||||||
| 	{ | 	{ | ||||||
| 		DamagePlayer(EnemyActionPlan[0]->Perform()); | 		DamagePlayer(EnemyActionPlan[0]->Perform(), EnemyActionPlan[0]->ActionName); | ||||||
| 		EnemyActionPlan.RemoveAt(0); | 		EnemyActionPlan.RemoveAt(0); | ||||||
| 	} | 	} | ||||||
| 	else | 	else | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user