wesnoth/data/ai/formula/poisoner_attack.fai
2016-07-29 12:52:10 -04:00

14 lines
376 B
Plaintext

wfl 'poisoner_attack.fai'
def get_best_defense_loc(moves, attacker, enemy)
choose(filter(map(filter(moves, src=attacker.loc), dst),
distance_between(self, enemy.loc) = 1),
defense_on(attacker, self));
attack(me.loc, get_best_defense_loc(my_moves.moves, me, target), target.loc, att_weap)
where att_weap = index_of(['poison'],map(me.attacks,specials))
wflend