From ae0a2fe2cc668890001d611b8f71e275df213809 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A4r=20Halberkamp?= Date: Fri, 3 Apr 2015 19:33:44 +0200 Subject: [PATCH] Removed [full_heal] --- changelog | 3 +-- data/core/macros/utils.cfg | 11 ++++++++--- data/lua/wml-tags.lua | 17 ----------------- 3 files changed, 9 insertions(+), 22 deletions(-) diff --git a/changelog b/changelog index 2c42cea6050e..74d2db707d02 100644 --- a/changelog +++ b/changelog @@ -274,7 +274,7 @@ Version 1.13.0-dev: between random and non-random music play (bug #19653) * Fixed a bug that prevented [animate_unit] from displaying death or victory animations for those units that filter them based on weapon (eg. Wose) - * New WML tags: [full_heal] and [put_to_recall_list]. + * New WML tags: [put_to_recall_list] and [sync_variable]. * Fixed nested macros emitting incorrect bindings to the default 'wesnoth' textdomain at the end of a substitution instead of the parent textdomain, this breaking localization of subsequent strings (bug #22962). @@ -283,7 +283,6 @@ Version 1.13.0-dev: * force_lock_settings defaults to yes in [scenario]. * Moved all preprocessor diagnostics from the 'config' log domain to 'preprocessor'. - * New WML tag [sync_variable] * Imagepath function "~SEPIA": gives the image a sepia tint * Imagepath function "~NEG": gives the image a photographic negative effect * Dropped support for [filter_side] in [gold] and [modify_ai], [theme] name= diff --git a/data/core/macros/utils.cfg b/data/core/macros/utils.cfg index 18f2adeeb6c6..61b462fc0fa9 100644 --- a/data/core/macros/utils.cfg +++ b/data/core/macros/utils.cfg @@ -365,9 +365,14 @@ #enddef #define FULL_HEAL FILTER - [full_heal] - {FILTER} - [/full_heal] + [heal_unit] + [filter] + {FILTER} + [/filter] + + amount=full + restore_statuses=yes + [/heal_unit] #enddef #define PUT_TO_RECALL_LIST FILTER diff --git a/data/lua/wml-tags.lua b/data/lua/wml-tags.lua index e7d4af142923..3f05de5dda44 100644 --- a/data/lua/wml-tags.lua +++ b/data/lua/wml-tags.lua @@ -1316,23 +1316,6 @@ function wml_actions.put_to_recall_list(cfg) end end -function wml_actions.full_heal(cfg) - local units = wesnoth.get_units(cfg) - - for i, unit in ipairs(units) do - if (not unit.status.unhealable) or cfg.ignore_status then - unit.hitpoints = unit.max_hitpoints - if cfg.cures then - unit.status.poisoned = false - unit.status.slowed = false - end - if cfg.animate then - wesnoth.animate_unit({ flag = "healed" , with_bars = "yes" , { "filter" , { id = unit.id } } }) - end - end - end -end - function wml_actions.allow_undo(cfg) wesnoth.allow_undo() end