AI: Add an example of using [micro_ai] in [side][ai]

This commit is contained in:
Celtic Minstrel 2021-08-15 22:45:27 -04:00 committed by Celtic Minstrel
parent 2d95c0f7d3
commit ce9bea0537

View file

@ -59,7 +59,7 @@
[/unit]
{FLAG_VARIANT long}
# Also have them target Side 2 preferentially, in order to go in that direction
# Also have them target Side 3 preferentially, in order to go in that direction
[ai]
[goal]
[criteria] #NOTE: this is a SUF, because we're targeting a unit
@ -67,6 +67,20 @@
[/criteria]
value=1000
[/goal]
[micro_ai]
ai_type=protect_unit
[unit]
id=Delfador
goal_x,goal_y=1,2
[/unit]
[unit]
id=Konrad
goal_x,goal_y=1,1
[/unit]
disable_move_leader_to_keep=yes
[/micro_ai]
[/ai]
[/side]
@ -190,24 +204,6 @@
{VARIABLE scenario_name The_Elves_Besieged}
[micro_ai]
# Required keys of [micro_ai] tag
side=1
ai_type=protect_unit
action=add
[unit]
id=Delfador
goal_x,goal_y=1,2
[/unit]
[unit]
id=Konrad
goal_x,goal_y=1,1
[/unit]
disable_move_leader_to_keep=yes
[/micro_ai]
[message]
speaker=Konrad
message= _ "Master Delfador! Look, there are orcs coming from all directions! What shall we do?"