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:
parent
38afe48a49
commit
47e78471b9
1 changed files with 16 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue