AI retreat CA: bug fix for cure-only abilities

That is, those that cure poison, but do not provide any healing.
This commit is contained in:
mattsc 2020-02-11 12:10:43 -08:00
parent b657248686
commit 396b258203

View file

@ -112,7 +112,7 @@ function retreat_functions.get_healing_locations()
local cure = 0
local abilities = wml.get_child(u.__cfg, "abilities") or {}
for ability in wml.child_range(abilities, "heals") do
heal_amount = ability.value
heal_amount = ability.value or 0
if ability.poison == "slowed" then
cure = 1
elseif ability.poison == "cured" then