High XP attack CA: do not try to attack petrified enemies
This commit is contained in:
parent
371b9b67ec
commit
52826a3824
1 changed files with 1 additions and 0 deletions
|
@ -55,6 +55,7 @@ function ca_attack_highxp:evaluation(cfg, data)
|
|||
for i_t,enemy in ipairs(all_units) do
|
||||
if wesnoth.is_enemy(wesnoth.current.side, enemy.side)
|
||||
and enemy:matches({ { "filter_vision", { side = wesnoth.current.side, visible = 'yes' } } })
|
||||
and (not enemy.status.petrified)
|
||||
then
|
||||
local XP_to_levelup = enemy.max_experience - enemy.experience
|
||||
if (max_unit_level >= XP_to_levelup) then
|
||||
|
|
Loading…
Add table
Reference in a new issue