Fix FormulaAI lurkers example

This commit is contained in:
Celtic Minstrel 2016-03-24 16:46:43 -04:00
parent d48060bc00
commit 16ed12f7de
2 changed files with 5 additions and 5 deletions

View file

@ -6,7 +6,7 @@ def is_swamp(map, xx, yy)
map(
filter( map.terrain, (x=xx) and (y=yy)),
self.id
)[0] = 'swamp_water';
)[0] = 'swamp_water_reed';
def reachable_swamp(unit_loc,map)
# get all reachable swamp locs for unit at unit_loc #
@ -36,9 +36,9 @@ def weakest_defender(attacks)
# Attack if possible, otherwise random move #
if( size(possible_attacks) != 0,
weakest_defender(possible_attacks),
if( size(swamp_in_reach) != 0,
move(me.loc,random(swamp_in_reach)),
end)
if( size(swamp_in_reach) != 0,
move(me.loc,random(swamp_in_reach)),
end)
)
where possible_attacks = reachable_enemies_next_to_swamp( me.loc, my_attacks,map)

View file

@ -285,7 +285,7 @@
max_score=300000
type=movement
[filter]
me="filter(input, (input.type = 'Saurian Skirmisher'))"
me="filter(input, (self.type = 'Saurian Skirmisher'))"
[/filter]
evaluation=300000
action="{ai/micro_ais/engines/lurker_moves.fai}"