now modify_unit no longer causes the full rebuild of the unit unless it
is really needed, this is not only faster, it also prepares a future
optimisation in reducing the units size in savegame files.
this fixes remove_modification for these effects, and also a bug where these effect would be applied twice after a unit advances.
fixes#3264fixes#3220
This also changes the implementation of [unit_overlay] to use [effect]s now so tht changesdone via [unit_overlay] ae persistent as they were before.
* WML: Support [filter_side] in [item].
If [filter_side] is present then "team_name" is ignored.
Fixes#1477.
* WML: Compare [item]team_name to [side]team_name using intersection.
Fixes problems with substrings and when one or the other is a
comma-separated list. See #3533
* WML: Rename [item][filter_side] to [item][filter_team]
* Add changelog entry
(cherry-picked from commit 3a3b752881f50ad34742c5962d40d96556adf1a1)
and make [harm_unit] use these values instead of hardcoded 8*level for
killing and level for combat.
(cherry-picked from commit 3591e82586896c8923de1d45cf9c30d25c522a3f)
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 7d6e2b2a10a61e1704c38ea7ee6aa34178a29b38)
This avoids a reference to the unit from being leaked, which prevented the
unit's halo (if any) from disappearing when the unit died.
Fixes#3509. Closes#3520.
(cherry-picked from commit e63bd35f9d209f355400a743732ea2c4b91d5da4)
and implement it using wesnoth.terrain_mask.
This also fixes an issue where [terrain_mask] would not remove
removed villages from the teams villages list after [terrain_mask].
This also adds an alignment parameter to [terrain_mask].
(cherry-picked from commit 09c56ef2fe40eaec53311918288431256aac63ff)
Fixes: https://forums.wesnoth.org/viewtopic.php?f=21&t=48370
In the tutorial when we occupy the first village the message tells us the
village count got incremented, but in the old version it was incremented
only afterwards. Non-narrator messages were updated properly. By adding the
redraw, narrator messages triggered by capture event produce the same
result as other speakers.
(cherry-picked from commit 1ea4149a4456ab8713dde4fbfcdd446b5762adcf)
[ci skip]
Lack of this pointed out by @shikadiqueen.
This change will also throw an error if id= is missing. Not sure if it did so before.
(cherry-picked from commit 8d3f54ce7c4647a97efb8ddb8b598d5a1af0f815)
Leaving theme= unspecified ought to have the same effect as providing it
and setting it to an empty string. Without the check for a nil value,
however, it would result in a crash like this:
20180519 22:31:54 error scripting/lua: lua/wml-tags.lua:922: bad argument #3 to '__newindex' (string expected, got nil)
stack traceback:
[C]: in metamethod '__newindex'
lua/wml-tags.lua:922: in local 'cmd'
lua/wml-utils.lua:145: in field 'handle_event_commands'
lua/wml-flow.lua:6: in function <lua/wml-flow.lua:5>
(cherry-picked from commit e82d811ab09ba2b6933fa3d12c9872f56369db51)
Among other things, this gave HttT S17 (Sceptre of Fire) a 50% chance
of crashing at scenario start.
(cherry-picked from commit 7d0d9e19a5fce052e35f866a1d83584dcd8f20bb)
This reverts commit 0294bd81b21be27e09f10d812fafa6bae7090002.
Changing display is unnecessary when the healed amount itself is forced
to be an integer (next commit).
(cherry-picked from commit f2284e2e79db5432039d0ac0a364d0982c7f9f71)