Improve TRoW's Clearwater and Southbay ally AI (#7525)

This commit is contained in:
Dalas121 2023-05-19 11:11:07 -05:00 committed by GitHub
parent c4bc4237cd
commit dd42e4d4e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 398 additions and 45 deletions

View file

@ -23,7 +23,7 @@ Wo, Wo, Wo, Ww, Ww, Ww, Ww, Wo, Wo, Wo, Wo, Ww, Ww, Ds, Ds, Gs^Fds, Gs^Fds, Gs^F
Wo, Wo, Wo, Ww, Gs^Fds, Gg, Gg^Vh, Ww, Ww, Ww, Ww, Wo, Wo, Ww, Ww, Gs^Fds, Ww, Ww, Wo, Wo, Ww, Ww, Ww, Ww, Ww, Ww^Bsb\, Rr, Ch, Ch, Ww, Gg, Gs, Gs^Fds, Gs^Fds, Gs, Gs, Gg^Vh, Ss, Ss, Ss, Ss, Gs, Gs, Gs, Gg, Gs, Gs
Wo, Wo, Wo, Ww, Hh^Fds, Hh^Fds, Gg, Ww, Gg, Ww, Ww, Wo, Wo, Ww, Ww, Ww, Wo, Wo, Ww, Wo, Ww, Ww^Bw\, Ds, Re^Vhc, Gs^Fds, Ch, Gg, Rr, Rr, Gg, Gg, Gg, Gs, Gs^Fds, Gs, Gs, Ss, Ss, Ss, Ss, Ss, Gs, Gs, Gg, Gs, Gs^Fds, Gs^Fds
Wo, Wo, Wo, Ww, Gg^Vh, Hh^Fds, Gs^Fds, Rr^Vhc, Re, Re^Vhc, Ds, Ww, Ww, Ww, Ww, Wo, Wo, Ww, Ww^Bw\, Ww, Ww, Ds, Ch, Re, Re, Gg, Rr, Rr, Ch, Rd, Rd, Gg, Gg, Gs, Gg, Gs, Gs, Ss, Ss, Ss, Ss, Ss, Gs, Gs, Gs^Fds, Gs^Fds, Gs^Fds
Wo, Wo, Ww, Ww, Ds, Hh, Gs^Fds, Rr, Rr, Gg, Gg, Ds, Ds, Ww, Ds, Ww, Ww, Ww, Ds, Ds, Ch, Ww, 2 Kh, Ch, Rr, Rr, Re, Re, Gg, Gg, Gg, Rd, Rd, Gg, Gg, Gs, Ss, Ss, Ss, Ss, Ss, Ss, Ss, Gs, Ss, Gs^Fds, Gs^Fds
Wo, Wo, Ww, Ww, Ds, Hh, Gs^Fds, Rr, Rr, Gg, Gg, Ds, Ds, Ww, Ds, Ww, Ww, Ww, Ds, Ds, Ch, Ww^Do, 2 Kh, Ch, Rr, Rr, Re, Re, Gg, Gg, Gg, Rd, Rd, Gg, Gg, Gs, Ss, Ss, Ss, Ss, Ss, Ss, Ss, Gs, Ss, Gs^Fds, Gs^Fds
Wo, Wo, Wo, Ww, Ww, Gg, Ww, Ds, Ds, Rr, Rr, Gg, Rr, Rr, Rr, Ds, Ds, Ds, Gg, Gg, Gg, Ch, Rr, Rr, Gs^Fds, Gs^Vhc, Re, Ch, Gg, Gg, Gg, Gg, Gg, Rd, Rd, Gg^Vh, Gs, Gs, Gs, Gs, Gs, Ss, Ss, Ss, Ss, Ss, Ss
Wo, Wo, Wo, Ww, Ww, Ww, Ww, Ww, Ww, Ds, Re^Vhc, Rr, Ch, Rr, Ch, Rr, Gs^Fds, Gs^Fds, Gs^Fds, Gs^Vhc, Rr, Rr, Re, Gs^Fds, Gs^Vhc, Gs^Fds, Ch, Gg, Gg, Gg, Gs^Fds, Gs^Fds, Gs^Fds, Gg, Gg, Rd, Rd, Rd, Rd, Gs^Fds, Gs^Fds, Gs, Gs^Fds, Gs, Gs, Gs, Gs
Wo, Wo, Wo, Wo, Ww, Ww, Wo, Ww, Ww, Ww, Ww, Re, Ch, 1 Kh, Ch, Rr, Rr, Gs^Fds, Rr, Rr, Gs^Fds, Gg, Ch, Re, Ch, Gg, Gg, Gg, Gg, Gg, Gs^Fds, Gs^Fds, Gs^Fms, Gg, Gg^Vh, Gg, Gg, Gg, Gg^Vh, Rd, Rd, Gs^Fds, Hh^Fds, Hh^Fds, Gs, Gs, Hh

View file

@ -40,33 +40,200 @@
name= _ "Commander Aethyr"
profile="portraits/aethyr-first.webp"
canrecruit=yes
recruit=Peasant, Bowman, Horseman, Mage, Spearman
{GOLD 240 180 120}
{INCOME 6 4 2}
recruit=Peasant,Bowman,Spearman
gold=50 # if you change this, make sure it doesn't mess with the "more expensive recruits" logic
income=8
[ai]
aggression=-0.5
{NO_SCOUTS}
recruitment_pattern=mixed fighter,fighter,mixed fighter,archer,fighter,fighter
passive_leader=yes
grouping=defensive
[/ai]
[ai]
time_of_day=morning,afternoon
grouping=offensive
aggression=0.5
[/ai]
team_name=Haldric
user_team_name=_"Humans"
{FLAG_VARIANT loyalist}
[/side]
[side]
side=3
color=blue
no_leader=yes
hidden=yes
team_name=Haldric
user_team_name=_"Humans"
{FLAG_VARIANT loyalist}
[ai]
aggression=-2
caution=2
[/ai]
[/side]
{STARTING_VILLAGES 2 10}
{LIMIT_RECRUITS 2 Peasant 2} # no more peasants after the initial forward rush, otherwise they're huge vulnerabilites in the wall
{SILENTLY_LIMIT_LEADER_MOVES 2 0}
# he's allowed to attack, but not move (also means he won't try to share his keep and get himself killed)
# ideally he'd have 1 move and an adjacent village for healing, but map doesn't include that right now
[event]
name=side 2 turn
first_time_only=no
#-------------------
# ALLOW EXTRA RECRUITS
#-------------------
# if we're building a gold reserve (because the player didn't take our villages), allow more expensive recruits
[store_gold]
side=2
[/store_gold]
[if]
{VARIABLE_CONDITIONAL gold greater_than 60}
[then]
[set_extra_recruit]
id=Commander Aethyr
extra_recruit=Heavy Infantryman,Longbowman,Javelineer,Pikeman,Swordsman
[/set_extra_recruit]
[/then]
[else]
[set_extra_recruit]
id=Commander Aethyr
extra_recruit=
[/set_extra_recruit]
[/else]
[/if]
{CLEAR_VARIABLE gold}
#-------------------
# DEFEND THE WALLS
#-------------------
# if orcs swarm the forward castle, retreat to the city walls
# unless the player has units in front of the walls, in which case we want to help them attack/survive
[if]
[have_unit]
side=4,5,6
count=10-99
[filter_location]
x,y,radius=22,20,6
[/filter_location]
[/have_unit]
[not]
[have_unit]
side=1
count=4-99
[filter_location]
x=0-23,0-26,0-28
y=14-99,19-99,20-99
[/filter_location]
[/have_unit]
[/not]
[then]
[if]
#-------------------
# DON'T ADVANCE
#-------------------
# if we were previously defending, continue holding our ground
{VARIABLE_CONDITIONAL previous_ai_position equals "defending"}
[or]
{VARIABLE_CONDITIONAL previous_ai_position equals "retreat secondturn"}
[/or]
[then]
{RESET_SIDE_AI 2 no -2 2}
{MODIFY_SIDE_AI (2) (
[avoid]
x=0-27, 28, 29-99
y=0-99, 20-99, 23-99
[/avoid]
)}
{VARIABLE previous_ai_position "defending"}
[/then]
#-------------------
# FULL RETREAT
#-------------------
# if we were formerly forward or attacking, try to retreat
[else]
{RESET_SIDE_AI 2 no -9 9}
{DISABLE_ATTACKING 2}
[if]
{VARIABLE_CONDITIONAL previous_ai_position equals "retreat firstturn"}
[then]
{VARIABLE previous_ai_position "retreat secondturn"}
[/then]
[else]
{VARIABLE previous_ai_position "retreat firstturn"}
[/else]
[/if]
# with attacking disabled, we still want to attack if we end up next to an enemy (otherwise we look stupic)
# switch to side 3 and back so we have an opportunity to attack (without moving)
[event]
name=side 3 turn refresh
{MODIFY_UNIT side,canrecruit=2,no side 3}
{MODIFY_UNIT side,canrecruit=2,no attacks_left 1}
[/event]
[event]
name=side 3 turn end
{MODIFY_UNIT side,canrecruit=3,no side 2}
[/event]
[/else]
[/if]
# hold the city walls
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 66 (x,y=28,19)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 99 (x,y=29,20)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 99 (x,y=29,21)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 99 (x,y=29,22)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 33 (x,y=30,22)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 11 (x,y=31,22)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 11 (x,y=30,19)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 11 (x,y=31,20)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 09 (x,y=30,21)} )}
[/then]
#-------------------
# DEFEND FORWARD
#-------------------
# otherwise, hold the forward castle
[else]
{RESET_SIDE_AI 2 no -2 2}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 99 (x,y=22,19)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 99 (x,y=22,21)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 33 (x,y=24,21)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 33 (x,y=24,24)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 66 (x,y=25,25)} )}
{MODIFY_SIDE_AI (2) (
[avoid]
x=0-21, 22, 22, 23, 23, 24-99
y=0-99, 0-17,22-99,0-17,26-99,26-99
[/avoid]
)}
{VARIABLE previous_ai_position "forward"}
[/else]
[/if]
#-------------------
# ATTACK THE ORCS
#-------------------
# if the player has multiple units really far forward, abandon our posts entirely and help attack
[if]
[have_unit]
side=1
count=4-99
[filter_location]
x,y=0-20,0-99
[/filter_location]
[/have_unit]
[then]
{RESET_SIDE_AI 2 offensive 0.4 0.25}
{VARIABLE previous_ai_position "attacking"}
[/then]
[/if]
[/event]
[event]
name=victory
{CLEAR_VARIABLE previous_ai_position}
[/event]
[side]
type=Orcish Warlord
id=Tan-Vragar
name= _ "Tan-Vragar"
side=3
side=4
color=green
canrecruit=yes
#ifdef EASY
recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Goblin Spearman
@ -100,7 +267,8 @@
type=Orcish Warlord
id=Tan-Burg
name= _ "Tan-Burg"
side=4
side=5
color=purple
canrecruit=yes
#ifdef EASY
recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Spearman
@ -136,7 +304,8 @@
id="Ut'Tan-Vrork"
name= _ "UtTan-Vrork"
profile=portraits/orcs/grunt-2.webp
side=5
side=6
color=black
canrecruit=yes
#ifdef EASY
recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Warrior, Goblin Spearman
@ -229,9 +398,9 @@
id=Minister Edren
[/recall]
{NAMED_LOYAL_UNIT 2 (Peasant) 26 18 () ( _ "Angry Farmer")}
{NAMED_LOYAL_UNIT 2 (Peasant) 28 19 () ( _ "Angry Farmer")}
{NAMED_LOYAL_UNIT 2 (Peasant) 29 22 () ( _ "Angry Farmer")}
{NAMED_UNIT 2 (Peasant) 26 18 () ( _ "Angry Farmer") ()}
{NAMED_UNIT 2 (Peasant) 28 19 () ( _ "Angry Farmer") ()}
{NAMED_UNIT 2 (Peasant) 29 22 () ( _ "Angry Farmer") ()}
[objectives]
side=1
@ -395,21 +564,21 @@
[allow_recruit]
type=Naga Fighter
side=3
side=4
[/allow_recruit]
#ifdef EASY
{LOYAL_UNIT 3 (Naga Fighter) 31 30}
{LOYAL_UNIT 4 (Naga Fighter) 31 30}
#endif
#ifdef NORMAL
{LOYAL_UNIT 3 (Naga Fighter) 31 30}
{LOYAL_UNIT 3 (Naga Fighter) 30 31}
{LOYAL_UNIT 4 (Naga Fighter) 31 30}
{LOYAL_UNIT 4 (Naga Fighter) 30 31}
#endif
#ifdef HARD
{LOYAL_UNIT 3 (Naga Fighter) 31 30}
{LOYAL_UNIT 3 (Naga Fighter) 30 31}
{LOYAL_UNIT 3 (Naga Fighter) 27 33}
{LOYAL_UNIT 4 (Naga Fighter) 31 30}
{LOYAL_UNIT 4 (Naga Fighter) 30 31}
{LOYAL_UNIT 4 (Naga Fighter) 27 33}
#endif
[delay]
time=1000
@ -508,16 +677,16 @@
#endif
first_time_only=no
[gold]
side=3
amount={ON_DIFFICULTY 30 40 50}
[/gold]
[gold]
side=4
amount={ON_DIFFICULTY 30 40 50}
[/gold]
[gold]
side=5
amount={ON_DIFFICULTY 30 40 50}
[/gold]
[gold]
side=6
amount={ON_DIFFICULTY 40 50 60}
[/gold]
[/event]

View file

@ -30,8 +30,7 @@
user_team_name=_"Humans"
{FLAG_VARIANT loyalist}
[/side]
{STARTING_VILLAGES 1 12}
{STARTING_VILLAGES 1 9}
[side]
side=2
@ -40,21 +39,122 @@
name= _ "King Addroran IX"
profile="portraits/addroran.webp"
canrecruit=yes
{GOLD 200 160 120}
gold=200 # extra gold to make up for him not starting with loyal swordsmen (which he did in the previous version)
income=13
team_name=Haldric
user_team_name=_"Humans"
recruit=Bowman, Horseman, Mage, Spearman, Knight, Swordsman, Peasant
recruit=Heavy Infantryman,Mage,Javelineer,Swordsman
[ai]
{NO_SCOUTS}
grouping=defensive
passive_leader=yes
recruitment_pattern=fighter,fighter,archer,mixed fighter
[/ai]
{FLAG_VARIANT loyalist}
[/side]
{STARTING_VILLAGES 2 10}
# allow King Addroran to reach the oasis hidden under the nearby ship, since he's likely to get poisoned at some point
{SILENTLY_LIMIT_LEADER_MOVES 2 1}
[event]
name=prestart
[object]
[filter]
id=King Addroran IX
[/filter]
[effect]
apply_to=movement_costs
replace=yes
[movement_costs]
shallow_water=1
[/movement_costs]
[/effect]
[/object]
[/event]
[event]
name=side 2 turn
first_time_only=no
{MODIFY_AI_DELETE_CANDIDATE_ACTION 2 main_loop leader_shares_keep} # prettier if he doesn't wander
{RESET_SIDE_AI 2 no -2 2}
#-------------------
# SOUTHERN RIVERBANK
#-------------------
# retreat to Addoran's side of the river if orcs conquer the northern bridge entrance
# don't worry about an actual "retreat", since we'll only have a few units up there, and they'll probably be dead anyway
[if]
[have_unit]
side=4,5,6
count=5-99
[filter_location]
x,y,radius=20,19,6
[/filter_location]
[/have_unit]
[not]
[have_unit]
side=2
count=2-99
[filter_location]
x,y,radius=20,19,6
[/filter_location]
[/have_unit]
[/not]
[not]
[have_unit]
side=1
count=1-99
[filter_location]
x,y,radius=20,19,6
[/filter_location]
[/have_unit]
[/not]
[then]
{MODIFY_SIDE_AI (2) (
[avoid]
x=0-13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29-99
y=0-99, 0-24,32-99,0-25,33-99,0-25,34-99,0-25,34-99,0-23,33-99,0-24,34-99,0-24,31-99,0-22,31-99,0-22,29-99,0-22,29-99,0-22,29-99,0-22,29-99,0-21,28-99,0-21,27-99,0-21,25-99, 0-99
[/avoid]
)}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 77 (x,y=21,23)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 99 (x,y=23,23)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 99 (x,y=25,23)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 22 (x,y=27,22)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 55 (x,y=22,24)} )}
[/then]
#-------------------
# NORTHERN CASTLES
#-------------------
# by default, station units in the 2 castles guarding the north river
[else]
{MODIFY_SIDE_AI (2) (
[avoid]
x=0-13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29-99
y=0-99, 0-24,32-99,0-25,33-99,0-25,34-99,0-25,34-99,0-23,33-99,0-19,34-99,0-17,31-99,0-18,31-99,0-19,29-99,0-20,29-99,0-20,29-99,0-21,29-99,0-21,28-99,0-21,27-99,0-21,25-99, 0-99
[/avoid]
)}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 99 (x,y=19,20)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 999 (x,y=21,19)} )}
[/else]
[/if]
#-------------------
# MAIN WALLS
#-------------------
# always defend the main city wall, whether we have the northern castles or not
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 99 (x,y=28,22)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 77 (x,y=28,24)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 99 (x,y=27,26)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 77 (x,y=26,27)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 55 (x,y=24,28)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 33 (x,y=22,28)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 55 (x,y=21,30)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 11 (x,y=19,31)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 33 (x,y=19,33)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 11 (x,y=16,32)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 11 (x,y=14,31)} )}
{MODIFY_SIDE_AI (2) ({GOAL_LOCATION 11 (x,y=14,30)} )}
[/event]
[side]
type=Orcish Warlord
id=Tan-Harak
@ -231,12 +331,6 @@
y=28
[/recall]
{GUARD_UNIT (Swordsman) (Southbay Guard 1) ( _ "Southbay Guard") 2 19 33}
{GUARD_UNIT (Swordsman) (Southbay Guard 2) ( _ "Southbay Guard") 2 21 30}
{GUARD_UNIT (Swordsman) (Southbay Guard 3) ( _ "Southbay Guard") 2 28 24}
{GUARD_UNIT (Swordsman) (Southbay Guard 4) ( _ "Southbay Guard") 2 27 22}
# wmllint: recognize Southbay Guard 1
[object]
id=ruby_of_fire
description= _ "The Ruby of Fire was imbued with magic in the distant west, and can be used to scorch enemies into submission."

View file

@ -0,0 +1,90 @@
#textdomain wesnoth-trow
# some examples:
# {MODIFY_AI_DELETE_ASPECT 2,3,4 avoid "*"}
# {MODIFY_SIDE_AI (2,3,4) (grouping=defensive)}
# {MODIFY_SIDE_AI (2,3,4) ({GOAL_SEEK_SIDE 99 1 4})}
# {MODIFY_SIDE_AI (2,3,4) ({GOAL_AVOID_SIDE 99 1 4})}
# {MODIFY_SIDE_AI (2,3,4) ({GOAL_LOCATION 99 (x,y=26,14)})}
# {MODIFY_SIDE_AI (2,3,4) ({GOAL_TERRAIN 15 (terrain=Kh,Ch,Chr,R*)})}
# {MODIFY_SIDE_AI (2,3,4) ({GOAL_LOCATION 99 (
# x=0,1,2
# y=0,1,2
# )})}
# {MODIFY_SIDE_AI (2) ([avoid]
# x=13-32,20-32
# y=1-6,1-19
# [/avoid])}
#define GOAL_LOCATION VALUE CRITERIA
[goal]
name=target_location
[criteria]
{CRITERIA}
[/criteria]
value={VALUE}
[/goal]
#enddef
#define MODIFY_SIDE_AI SIDE MODIFICATION
[modify_side]
side={SIDE}
[ai]
{MODIFICATION}
[/ai]
[/modify_side]
#enddef
#define DISABLE_ATTACKING SIDE
{MODIFY_AI_DELETE_CANDIDATE_ACTION {SIDE} main_loop spread_poison}
{MODIFY_AI_DELETE_CANDIDATE_ACTION {SIDE} main_loop high_xp_attack}
{MODIFY_AI_DELETE_CANDIDATE_ACTION {SIDE} main_loop combat}
#enddef
#define ENABLE_ATTACKING SIDE
{MODIFY_AI_ADD_CANDIDATE_ACTION {SIDE} main_loop {AI_CA_SPREAD_POISON}}
{MODIFY_AI_ADD_CANDIDATE_ACTION {SIDE} main_loop {AI_CA_HIGH_XP_ATTACK}}
{MODIFY_AI_ADD_CANDIDATE_ACTION {SIDE} main_loop {AI_CA_COMBAT}}
#enddef
#define RESET_SIDE_AI SIDE GROUPING AGGRESSION CAUTION
{DISABLE_ATTACKING {SIDE}} # reset any attack-related CA score changes
{ENABLE_ATTACKING {SIDE}}
{MODIFY_AI_DELETE_GOAL {SIDE} "*"}
{MODIFY_SIDE_AI ({SIDE}) (
[avoid]
x,y=0,0
[/avoid]
)}
{MODIFY_AI_DELETE_ASPECT {SIDE} grouping "*"}
{MODIFY_AI_DELETE_ASPECT {SIDE} aggression "*"}
{MODIFY_AI_DELETE_ASPECT {SIDE} caution "*"}
{MODIFY_AI_DELETE_ASPECT {SIDE} leader_value "*"}
{MODIFY_SIDE_AI ({SIDE}) (grouping={GROUPING})}
{MODIFY_SIDE_AI ({SIDE}) (aggression={AGGRESSION})}
{MODIFY_SIDE_AI ({SIDE}) (caution={CAUTION})}
{MODIFY_SIDE_AI ({SIDE}) (leader_value=0)}
#enddef
#define SILENTLY_LIMIT_LEADER_MOVES SIDE MOVES
# don't allow AI leaders to be baited far from their keeps
# modify per-turn instead of max-moves so that the player can't see it
{SILENTLY_LIMIT_MOVES {SIDE} canrecruit=yes {MOVES}}
#enddef
#define SILENTLY_LIMIT_MOVES SIDE FILTER MOVES
[event]
name=side {SIDE} turn refresh
first_time_only=no
[modify_unit]
[filter]
side={SIDE}
{FILTER}
[/filter]
moves={MOVES}
[/modify_unit]
[/event]
#enddef