Healer Support Micro AI: bug fix for aggression= key

Key needs to converted to a number before checking its value.
This commit is contained in:
mattsc 2013-04-29 17:39:39 -07:00
parent b97ed9b338
commit 1951cc218e

View file

@ -149,7 +149,7 @@ function wesnoth.wml_actions.micro_ai(cfg)
-- The healers_can_attack CA is only added to the table if aggression ~= 0
-- But: make sure we always try removal
if (cfg.action == 'delete') or (cfg.aggression ~= 0) then
if (cfg.action == 'delete') or (tonumber(cfg.aggression) ~= 0) then
table.insert(CA_parms,
{
id = 'healers_can_attack', eval_name = 'healers_can_attack_eval', exec_name = 'healers_can_attack_exec',