jostephd
3a3b752881
WML: Support [filter_side] in [item]. ( #3533 )
...
* 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
2018-09-21 21:11:08 -04:00
V N
6010ffe98e
prevent double execution of on_event.lua
...
makes it safe to dofile("on_event.lua")
2018-09-19 18:09:50 +02:00
gfgtdf
3591e82586
add game_config.combat experience
...
and make [harm_unit] use these values instead of hardcoded 8*level for
killing and level for combat.
2018-09-10 22:09:50 +02:00
newfrenchy83
7d6e2b2a10
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.
2018-09-09 18:47:56 +03:00
newfrenchy83
3541629197
[heal_unit]: clear the animation after playing it ( #3526 )
...
Fixes another case of unit halo remaining after death.
2018-09-07 19:35:39 +03:00
Jyrki Vesterinen
e63bd35f9d
[animate_unit]: clear the animation after playing it
...
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 .
2018-09-06 20:16:00 +03:00
gfgtdf
7d44782e5c
fixup [terrain_mask]
2018-08-13 17:53:16 +02:00
gfgtdf
09c56ef2fe
move [terrain_mask] to lua
...
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].
2018-08-13 15:25:41 +02:00
josteph
045d331da8
WML: Don't add a \n before condition=lose objectives if there are no objectives listed before them.
2018-07-05 12:46:44 +11:00
Andras Szell
1ea4149a44
Fix: add redraw to narrator's message so village count is refreshed
...
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.
2018-06-26 18:45:17 +11:00
Iris Morelle
5871557dbf
Fix Lua errors when failing to set a music track on an empty playlist
...
Closes #3194 .
2018-06-09 18:55:03 -04:00
Iris Morelle
051182fa1c
Fall back to the unit type name for [message] captions for nameless units
...
Fixes #3211 .
2018-06-05 04:44:28 -04:00
Iris Morelle
4e37cdc713
Don't allow [kill] animate=yes to scroll to units through fog and shroud
...
Restores 1.12's behaviour.
2018-06-04 16:15:37 -04:00
Charles Dang
8d3f54ce7c
[remove_sound_source] now accepts a comma-separated ID list
...
[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.
2018-05-22 14:55:34 +11:00
Iris Morelle
8ae38ac19f
Do not allow [message] to scroll to units through fog/shroud
...
This was a regression from 1.12.
2018-05-21 23:23:06 -04:00
Iris Morelle
e82d811ab0
Fix [change_theme] crashing when theme= isn't specified
...
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>
2018-05-19 22:38:06 -04:00
Celtic Minstrel
4a3508f13f
Support [break], [continue], and [return] in [random_placement]
2018-05-19 00:42:23 -04:00
mattsc
64f7ad2560
Lua code: replace deprecated wesnoth.get_all_vars() calls
2018-05-13 20:50:49 -07:00
mattsc
ce7faae4f4
Lua code: replace deprecated wesnoth.set_variable() calls
2018-05-13 20:35:20 -07:00
mattsc
0f157bff27
Prevent definition of wml.variables to cause deprecation warnings
2018-05-13 20:20:43 -07:00
mattsc
f1764d182f
Lua code: replace deprecated wesnoth.get_variable() calls
2018-05-13 20:03:34 -07:00
mattsc
138107c8f6
Lua code: replace deprecated wesnoth.tovconfig() calls
2018-05-13 19:54:14 -07:00
mattsc
7d0d9e19a5
Lua random map generator: fix off-by-one error in flip transforms
...
Among other things, this gave HttT S17 (Sceptre of Fire) a 50% chance
of crashing at scenario start.
2018-05-12 18:43:16 -07:00
Celtic Minstrel
07e465e57b
Support male_voice and female_voice in [message]
2018-04-28 23:09:29 -04:00
Jyrki Vesterinen
76ed49a45f
[heal_unit]: ensure that heal amount is an integer
2018-04-16 20:55:23 +03:00
Jyrki Vesterinen
f2284e2e79
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).
2018-04-16 20:54:20 +03:00
Celtic Minstrel
0294bd81b2
Display amount healed as an integer in [heal_unit]
2018-04-16 01:27:12 -04:00
Celtic Minstrel
ecc8785edb
Support location_id in [recall] and [unstore_unit]
2018-04-16 00:00:51 -04:00
Celtic Minstrel
b062b19e10
Add [move_unit]clear_shroud= as an attempt to clear shroud as the unit moves (untested)
2018-04-11 22:46:48 -04:00
Celtic Minstrel
68b33cf6bd
Allow [move_unit]dir= to perform relative movements
2018-04-11 22:46:48 -04:00
Celtic Minstrel
622db9d08b
Allow [move_unit]to_location to take a list of waypoints
2018-04-11 22:46:48 -04:00
gfgtdf
0f756b8189
fix [message] side_for= not working for the last side.
...
fixes #2776
2018-04-05 10:39:52 +11:00
Celtic Minstrel
fed46ec45f
Support location_id in [teleport]
2018-04-01 14:05:33 -04:00
Celtic Minstrel
d2a8c5bb32
Fix incorrect error message when encountering an unknown persistent tag
2018-04-01 14:02:51 -04:00
Celtic Minstrel
ea0bcec92f
Support facing in [role][auto_recall]
2018-03-30 18:39:11 -04:00
Celtic Minstrel
7a3d6f958a
Support root=cube and root=int in [set_variable]
2018-03-30 18:38:47 -04:00
Celtic Minstrel
15ae9fcb0c
Use wesnoth.format instead of string.format for translateable strings in [objectives]
2018-03-30 18:38:37 -04:00
Celtic Minstrel
c835e5b7e6
Nicer handling of some Pango formatting attributes in [message]
2018-03-30 18:38:25 -04:00
Celtic Minstrel
2bd2a8b1b6
Handle speaker=id directly in [message] instead of relying on SUF
2018-03-30 18:38:03 -04:00
Celtic Minstrel
beb5dc75aa
Support [set_variable]round=trunc
2018-03-30 18:37:39 -04:00
Vasya
2b8782923a
Lua API: simplify functional.reduce ( #2788 )
...
simplify code and remove `indentity or 0` VS `indentity` inconsistency.
2018-03-30 13:23:39 -04:00
Celtic Minstrel
79bc18fe95
Fix unintended change to the semantics of [modify_side]income=
2018-03-30 11:05:31 -04:00
Celtic Minstrel
229d2f0483
Allow percentages in [random_placement]num_items=
2018-03-25 20:56:11 -04:00
Celtic Minstrel
e4a2c14177
Allow WFL for [random_placement]num_items=
2018-03-25 20:51:03 -04:00
Celtic Minstrel
4427ee1936
Fix typo in 1dd411a84e
2018-03-25 19:52:22 -04:00
Celtic Minstrel
1dd411a84e
Support to_location in [move_unit]
2018-03-24 18:32:10 -04:00
Celtic Minstrel
4e52d62963
Support formula= in [variable] ConditionalWML
2018-03-24 18:09:04 -04:00
Celtic Minstrel
5008c72a22
Fixup wml.all_variables
2018-03-18 01:38:39 -04:00
Celtic Minstrel
8d74b72031
fixup! Fix missing return in on_event()
2018-03-17 17:21:20 -04:00
Celtic Minstrel
a314876bf2
Use new persistent tags interface for [object] [objectives] [item]
2018-03-17 17:16:23 -04:00