Skip to content

Commit

Permalink
Removed [full_heal]
Browse files Browse the repository at this point in the history
  • Loading branch information
Asheviere committed Apr 3, 2015
1 parent 3c1bead commit ae0a2fe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 22 deletions.
3 changes: 1 addition & 2 deletions changelog
Expand Up @@ -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).
Expand All @@ -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=
Expand Down
11 changes: 8 additions & 3 deletions data/core/macros/utils.cfg
Expand Up @@ -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
Expand Down
17 changes: 0 additions & 17 deletions data/lua/wml-tags.lua
Expand Up @@ -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
Expand Down

0 comments on commit ae0a2fe

Please sign in to comment.