-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathGOAPTest1.xml
More file actions
36 lines (32 loc) · 1.31 KB
/
GOAPTest1.xml
File metadata and controls
36 lines (32 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?xml version="1.0" ?>
<GOAP name="GOAP_Test_1">
<VariableList> <!-- Variable List -->
<Variable id="EnemyInRange" key="0" let="200"></Variable> <!-- true: let; false: gt-->
<Variable id="EnemyLost" key="1"></Variable>
<Variable id="EnemyDead" key="2"></Variable>
</VariableList>
<ActionList> <!-- Action List -->
<Action id="Search" cost="1">
<Precondition id="EnemyLost" value="true"></Precondition>
<Effect id="EnemyLost" value="false"></Effect>
</Action>
<Action id="GoToEnemy" cost="1">
<Precondition id="EnemyLost" value="false"></Precondition>
<Precondition id="EnemyInRange" value="false"></Precondition>
<Effect id="EnemyInRange" value="true"></Effect>
</Action>
<Action id="Attack" cost="4">
<Precondition id="EnemyInRange" value="true"></Precondition>
<Precondition id="EnemyDead" value="false"></Precondition>
<Effect id="EnemyDead" value="true"></Effect>
</Action>
</ActionList>
<InitialState> <!-- Initial world state -->
<Variable id="EnemyLost" value="true"></Variable>
<Variable id="EnemyInRange" value="false"></Variable>
<Variable id="EnemyDead" value="false"></Variable>
</InitialState>
<GoalState> <!-- Goal world state -->
<Variable id="EnemyDead" value="true"></Variable>
</GoalState>
</GOAP>