remove RECALL_AI_SIDE

This macro causes OOS because it changes the gamestate during the unsynced ai_turn event.
Also it doesn't handle custom recall costs.

This commit also fixes MAKE_AI_SIDE_PERSISTENT. But i think this macro should be removed too since just writing 'persistent=yes' in [side] is much easier to understand than using this macro.
This commit is contained in:
gfgtdf 2016-05-11 19:24:20 +02:00
parent 69b0fdd0a1
commit a1b9469eed

View file

@ -241,89 +241,6 @@
#Macro to make a ai controlled side persistent.
#Needs to be placed below the side definition.
[+side]
controller=human
persistent=yes
[/side]
[event]
name=prestart
[modify_side]
side={SIDE}
controller=ai
[/modify_side]
[/event]
[event]
name=victory
[modify_side]
side={SIDE}
controller=human
[/modify_side]
[/event]
#enddef
#define RECALL_AI_SIDE SIDE
#Recalls an ai side that is persistent (MAKE_AI_SIDE_PERSISTENT)
#Needs to be placed below the side definition.
{MAKE_AI_SIDE_PERSISTENT {SIDE}}
[event]
name=prestart
[store_unit]
variable=recall_ai_side_units_{SIDE}
[filter]
side={SIDE}
[/filter]
[/store_unit]
[/event]
[event]
name=victory
{CLEAR_VARIABLE recall_ai_side_units_{SIDE}}
[/event]
[event]
name=ai turn
[filter_condition]
[variable]
name=side_number
equals={SIDE}
[/variable]
[have_unit]
canrecruit=yes
side={SIDE}
[filter_location]
terrain=K*
[/filter_location]
[/have_unit]
[/filter_condition]
[store_gold]
side={SIDE}
[/store_gold]
[while]
[variable]
name=gold
greater_than=19
[/variable]
[variable]
name=recall_ai_side_units_{SIDE}.length
greater_than=0
[/variable]
[do]
[gold]
side={SIDE}
amount=-20
[/gold]
[store_gold]
side={SIDE}
[/store_gold]
[recall]
id=$recall_ai_side_units_{SIDE}[0].id
[/recall]
{CLEAR_VARIABLE recall_ai_side_units_{SIDE}[0]}
[/do]
[/while]
{CLEAR_VARIABLE gold}
[/event]
#enddef