Fix FormulaAI lurkers example
This commit is contained in:
parent
8a7c950ac2
commit
216f2f4391
2 changed files with 5 additions and 5 deletions
|
@ -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)
|
||||
|
|
|
@ -287,7 +287,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}"
|
||||
|
|
Loading…
Add table
Reference in a new issue