ERAiAPI
Loading...
Searching...
No Matches
GoalFunc.hpp
Go to the documentation of this file.
1#pragma once
2#include "AiConstants.hpp"
3
4
9{
10public:
11 //TODO Add info
18 void AddGoalScopedTeamRecord(int cooridnateType, int target, float p3);
19
24 void AddLifeParentSubGoal(float life);
25
45 GoalFunc* AddSubGoal(int goalId, float life, float goalParam0 = 0, float goalParam1 = 0, float goalParam2 = 0, float goalParam3 = 0, float goalParam4 = 0, float goalParam5 = 0, float goalParam6 = 0, float goalParam7 = 0, float goalParam8 = 0, float goalParam9 = 0, float goalParam10 = 0, float goalParam11 = 0, float goalParam12 = 0);
46
56 GoalFunc* AddSubGoal_Front(int goalId, float life, float goalParam0, float goalParam1, float goalParam2);
57
58 //TODO Add info
67 void AdjustDisplacement(int p1, int p2, float p3, float p4, float p5);
68
77 void ClearSeriesSubGoal(int goalId);
78
83
89
95
101
107
112 float GetLife();
113
119 float GetNumber(int index);
120
127 float GetParam(int paramIndex);
128
136 float GetParamBool(int paramIndex);
137
143
149 float GetTimer(int index);
150
159 bool IsExistParam(int paramIndex);
160
166 bool IsFinishTimer(int index);
167
174
175 //TODO Add info
181
186
193
201
202 //TODO Add info. Sets a flag to true, don't know what it does.
207
213 void SetNumber(int index, float value);
214
224 GoalFunc* SetTargetAngle(int angleObserverSlot, float angleStart, float angleWidth);
225
235 GoalFunc* SetTargetAngle(float angleStart, float angleWidth);
236
246 GoalFunc* SetTargetOriginRange(int rangeObserverSlot, float minDistance, float maxDistance);
247
257 GoalFunc* SetTargetOriginRange(float minDistance, float maxDistance);
258
268 GoalFunc* SetTargetRange(int rangeObserverSlot, float minDistance, float maxDistance);
269
279 GoalFunc* SetTargetRange(float minDistance, float maxDistance);
280
287 void SetTimer(int index, float value);
288
295 void SetTimerForTurnBeforeAtk(float value);
296
304 GoalFunc* TimingSetNumber(int index, float value, AI_TIMING_SET when);
305
313 GoalFunc* TimingSetTimer(int index, float value, AI_TIMING_SET when);
314
320};
GOAL_RESULT
AI_GOAL_FAILED_END_OPT
AI_TIMING_SET
Represents a Goal object.
Definition GoalFunc.hpp:9
void AddGoalScopedTeamRecord(int cooridnateType, int target, float p3)
void ClearSeriesSubGoal(int goalId)
Clears all goals in the subgoal queue from front to back until it reaches a goal whose id isn't the g...
GoalFunc * TimingSetNumber(int index, float value, AI_TIMING_SET when)
ets the goal's number to the value at the moment given.
void SetNumber(int index, float value)
Store the given number in the given index (0-7).
GoalFunc * SetTargetRange(float minDistance, float maxDistance)
Creates a range observer with the given parameters. The observer measures range with the AI's hit rad...
void SetManagementGoal()
GoalFunc * SetTargetAngle(float angleStart, float angleWidth)
Creates an angle observer with the given parameters. The observer can normally be accessed with INTER...
GoalFunc * SetTargetRange(int rangeObserverSlot, float minDistance, float maxDistance)
Creates a range observer with the given parameters. The observer measures range with the AI's hit rad...
GoalFunc * SetLifeEndSuccess(bool enable)
Set whether the goal's life running out is a success or failure (goal will end either way)....
void ClearSubGoal()
Clears goal's subgoal queue.
void AdjustDisplacement(int p1, int p2, float p3, float p4, float p5)
GoalFunc * SetTargetOriginRange(int rangeObserverSlot, float minDistance, float maxDistance)
Creates a range observer with the given parameters. The observer measures range without taking the AI...
GoalFunc * SetTargetAngle(int angleObserverSlot, float angleStart, float angleWidth)
Creates an angle observer with the given parameters. The observer can normally be accessed with INTER...
GoalFunc * AddSubGoal_Front(int goalId, float life, float goalParam0, float goalParam1, float goalParam2)
Adds subgoal to the front of this goal's subgoal queue.
bool IsFinishTimerForTurnBeforeAtk()
Returns true if the timer to turn before executing the animation is less than or equal to 0,...
GoalFunc * GetLatestAddGoalFunc()
Returns the last subgoal in the goal's subgoal queue (the last subgoal added).
GoalFunc * SetFailedEndOption(AI_GOAL_FAILED_END_OPT failedEndOption)
Set what to do on goal failure.
float GetParam(int paramIndex)
Returns the goal's param at the given index (the params used at the time of the goal's creation,...
GOAL_RESULT UpdateSubGoal()
Updates active subgoal (including all normal update functionalities, such as executing the goal's "Up...
void SetTimerForTurnBeforeAtk(float value)
Sets the goal's timer for turning to the given value. The timer constantly ticks down until it reache...
int GetBattleGoalId()
Returns the AI's battle goal id.
void SetEnableComboAttackCancel()
Does nothing.
GOAL_RESULT GetLastResult()
Returns the goal's last updated result.
bool IsInterruptSubGoalChanged()
Returns true if subgoals were added or cleared by the interrupt.
GoalFunc * TimingSetTimer(int index, float value, AI_TIMING_SET when)
Sets the goal's timer to the value at the moment given.
float GetLife()
Returns the goal's life.
void SetTimer(int index, float value)
Sets the given timer to the given value. Timers constantly tick down until they reach 0.
GoalFunc * AddSubGoal(int goalId, float life, float goalParam0=0, float goalParam1=0, float goalParam2=0, float goalParam3=0, float goalParam4=0, float goalParam5=0, float goalParam6=0, float goalParam7=0, float goalParam8=0, float goalParam9=0, float goalParam10=0, float goalParam11=0, float goalParam12=0)
Adds subgoal to this goal's subgoal queue.
int GetSubGoalNum()
Returns the number of subgoals in the goal's subgoal queue.
bool IsFinishTimer(int index)
Returns true if the given timer's remaining time is less than or equal to 0, otherwise false.
bool IsExistParam(int paramIndex)
Returns true if the index is less than 8, or if the goal was created with the given param,...
float GetTimer(int index)
Returns the given timer's remaining time.
GOAL_RESULT GetLastSubGoalResult()
Returns the goal's active subgoal's last updated result (from Update function).
void AddLifeParentSubGoal(float life)
Adds the given amount of time to the parent's, grand-parent's, grand-grand-parent's....
float GetNumber(int index)
Returns the number stored at the given index (0-7)
float GetParamBool(int paramIndex)
Returns true if the goal's param at the given index is bigger than 0, otherwise false (the params use...
GoalFunc * SetTargetOriginRange(float minDistance, float maxDistance)
Creates a range observer with the given parameters. The observer measures range without taking the AI...