Simple Attack MAI test scenario: move Lua filter function into preload event

… so that it is available after a reload as well.
This commit is contained in:
mattsc 2014-02-21 12:23:04 -08:00
parent 38afe48a49
commit 47e78471b9

View file

@ -46,6 +46,22 @@
hidden=yes
[/side]
[event]
name=preload
first_time_only=no
[lua]
code=<<
function close_to_advancing(unit)
if (unit.experience >= unit.max_experience-1) then
return true
else
return false
end
end
>>
[/lua]
[/event]
[event]
name=prestart
@ -64,18 +80,6 @@
{SCATTER_UNITS 12 "Soulless" 1 (x,y=5-9,8-22) (side=2)}
{SCATTER_UNITS 6 "Skeleton,Skeleton Archer" 1 (x,y=5-9,8-22) (side=2)}
[lua]
code=<<
function close_to_advancing(unit)
if (unit.experience >= unit.max_experience-1) then
return true
else
return false
end
end
>>
[/lua]
[micro_ai]
side=2
ai_type=simple_attack