From 0c4b05ee2a61650c8ab0a6553ba7f06963f7996c Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Mon, 27 Mar 2017 01:07:33 -0400 Subject: [PATCH] Some fixes to [heal_unit]animate=yes - Play the healed animation - Pass the heal amount to both animations --- data/lua/wml-tags.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/data/lua/wml-tags.lua b/data/lua/wml-tags.lua index 607ee2076721..3c3758e70f6f 100644 --- a/data/lua/wml-tags.lua +++ b/data/lua/wml-tags.lua @@ -688,12 +688,12 @@ function wml_actions.heal_unit(cfg) end if cfg.animate then + local animator = wesnoth.create_animator() + animator:add(u, 'healed', 'hits', {value = heal_amount}) if #healers > 0 then - local animator = wesnoth.create_animator() - -- Need dummy 3rd argument here... - animator:add(healers[1], 'healing', 'hits') - animator:run() + animator:add(healers[1], 'healing', 'hits', {value = heal_amount}) end + animator:run() end end end