Commit graph

15 commits

Author SHA1 Message Date
Elvish_Hunter
608a2bf85e Improved variable setting in [heal_unit] and [harm_unit] 2022-01-16 13:13:52 +01:00
Celtic Minstrel
ea5367de17 Move create_animator and create_weapon into the units module 2021-05-11 14:52:18 -04:00
Celtic Minstrel
aaa2dc4ece Rollback possibility of wesnoth.get_units matching recall list units
Now it's renamed to wesnoth.units.find_on_map.

wesnoth.units.find implements the case of finding units on either the map or a recall list.
2019-11-15 22:39:09 -05:00
Celtic Minstrel
977f05d77f Lua: Replace uses of deprecated (moved) unit functions
Also backtracked the removal of wesnoth.get_recall_units, which is now available as wesnoth.units.find_on_recall - it's just more convenient than passing x=recall to wesnoth.units.find
2019-11-15 22:39:08 -05:00
newfrenchy83
c1a70068d5 Lua API: implicitly clear animator after playing it (#3536)
This prevents the animator from holding a strong reference to the target unit, which was keeping the unit object alive and thus preventing the unit halo, if any, from disappearing.

(cherry-picked from commit 7d6e2b2a10)
2018-10-07 03:24:59 +00:00
newfrenchy83
98bec00fac [heal_unit]: clear the animation after playing it (#3526)
Fixes another case of unit halo remaining after death.

(cherry-picked from commit 3541629197)
2018-10-07 03:24:56 +00:00
mattsc
0e017d9f7c Lua code: replace deprecated wesnoth.set_variable() calls
(cherry-picked from commit ce7faae4f4)
2018-10-07 03:21:07 +00:00
Jyrki Vesterinen
d75a752c06 [heal_unit]: ensure that heal amount is an integer
(cherry-picked from commit 76ed49a45f)
2018-10-07 03:19:22 +00:00
Jyrki Vesterinen
167ee61d34 Revert "Display amount healed as an integer in [heal_unit]"
This reverts commit 0294bd81b2.

Changing display is unnecessary when the healed amount itself is forced
to be an integer (next commit).

(cherry-picked from commit f2284e2e79)
2018-10-07 03:19:22 +00:00
Celtic Minstrel
017c3ca9cf Display amount healed as an integer in [heal_unit]
(cherry-picked from commit 0294bd81b2)
2018-10-07 03:19:21 +00:00
Charles Dang
0103959c36 Cleaned up deprecated API usage in core Lua
[ci skip]
2018-03-13 16:55:36 +11:00
Charles Dang
3489dac642 [heal_unit]: don't play healed animation if no healing is done
[ci skip]

Addresses #2530. Not closing that though, since the behavior might still be tweaked.

The healer will still play their own animation, if applicable (behavior option 2 in
the bug report).
2018-03-05 15:44:42 +11:00
Jyrki Vesterinen
f064f50f1b [heal_unit]: Turn on floating text with animate=yes
I also moved the animation to be played *before* healing, which is the same
order as in C++ code. In the previous order, the animation isn't played for
some reason.

Fixes #2295.
2017-12-18 23:28:45 +02:00
Jyrki Vesterinen
d80d47eb8a [heal_unit]: fix wrong value of "hits" parameter
Only "hit", "miss" and "kill" are allowed.
2017-12-18 22:04:35 +02:00
Celtic Minstrel
e1233fd0f2 Split several of the larger WML tags into their own file 2017-05-03 02:43:22 -04:00