Beispiel #1
0
void ActionGrowInfluence(struct GOAPPlanner* _Planner, struct GoapAction* _Action) {
	//Both of these should use the ImproveRelations action as a precond.
	GoapActionAddPostcond(_Action, _Planner, "Influence", 255, WSOP_SET);
	GoapActionSetName(_Action, "Grow Influence");
	_Action->Cost = ActionCost;
	_Action->Action = ActionFunction;
	_Action->ProPrecondition = NULL;
	_Action->IsComplete = ActionIsComplete;
	_Action->Utility = ActionUtility;
	_Action->UtilityFunction = UTILITY_LINEAR;
	_Action->Create = ActionCreate;
	_Action->Destroy = ActionDestroy;
}
Beispiel #2
0
void ActionDuel(struct GOAPPlanner* _Planner, struct GoapAction* _Action) {
	//Both of these should use the ImproveRelations action as a precond.
//	GoapActionAddPrecond(_Action, _Planner, "SufficientEnemies", 1, WSOP_EQUAL);
	GoapActionAddPrecond(_Action, _Planner, "Influence", 1, WSOP_GREATERTHANEQUAL);
	GoapActionAddPostcond(_Action, _Planner, "IsLeader", 1, WSOP_SET);
	_Action->Name = "Duel";
	_Action->Cost = ActionCost;
	_Action->Action = ActionFunction;
	_Action->ProPrecondition = ActionPrecondition;
	_Action->IsComplete = ActionIsComplete;
	_Action->Utility = ActionUtility;
	_Action->UtilityFunction = UTILITY_LINEAR;
	_Action->Create = NULL;
	_Action->Destroy = NULL;
}