Commit graph

717 commits

Author SHA1 Message Date
Elvish_Hunter
664c7e6859 [harm_unit]: added fire_event keys to wml_actions.unstore_unit tables
Fix for bug #20836
2013-06-14 23:26:26 +02:00
Elvish_Hunter
6c4f81edba [harm_unit]: moved the harmer advancement check inside the for cycle/valid check 2013-06-14 23:20:05 +02:00
Elvish_Hunter
e74471eaf6 [harm_unit]: renamed bool() function to toboolean() 2013-06-14 23:13:44 +02:00
Elvish_Hunter
dae1b121a6 [harm_unit]: moved support function bool() to the start of the tag
This change is needed to have the function available for the whole tag.
2013-06-14 23:11:26 +02:00
jleldridge
4e6ecc81ce Fixed location_set().of_pairs() syntax to follow conventions. 2013-05-16 15:52:34 -04:00
jleldridge
0d8bd9fe03 Changed location_set.of_pairs() to work with different formats of x,y coordinate tables. 2013-05-16 00:21:40 -04:00
J. Tyne
70351c6209 Improve the implementation of parenthetical_split()...
...and make it local to wml_actions.remove_unit_overlay().
2013-01-25 22:10:57 +00:00
J. Tyne
110484bca6 Add a variant on parenthetical_split() to helper.lua...
...and use it to fix bug #20401.

If no problems are found with this approach, I can backport it to stable.
2013-01-05 23:47:53 +00:00
J. Tyne
26c993207b Convert some WML macros and lua functions to use...
...unpoisonable/undrainable instead of not_living.

One remaining use of "not_living" is in the feeding ability.
2013-01-05 18:16:02 +00:00
J. Tyne
ee19578fc4 Suppress the level-up animation when [transform_unit] is used...
...to transform a unit to its normal advancement (for consistency with
transforming to a specified type).
2013-01-05 17:56:39 +00:00
J. Tyne
01c20ecea5 Make it a default to remove poison from immune units.
This impacts wesnoth.transform_unit, [effect]apply_to=type, and
[effect]apply_to=variation.  If desired, the poisoned state can still
be explicitly set for immune units; this change only affects default
behavior, making it correspond better to the core rules.
2013-01-05 17:46:59 +00:00
J. Tyne
7b0a480254 Make Lua's wesnoth.transform_unit() function preserve hit points.
This is actually simpler to implement and is more consistent with the
[transform_unit] tag.  Plus, the wiki documentation for
wesnoth.transform_unit() does not state that the hit points definitely
will be changed (it's a bit vague on that point), so this is
consistent with the existing documentation.
2013-01-05 14:53:05 +00:00
Elvish_Hunter
aab7c8afcf Lua: added new helper.shuffle() function 2013-01-03 13:22:15 +00:00
Elvish_Hunter
bc4594616d [unit_overlay] and [remove_unit_overlay]: added WML error message...
...if image= is missing
2012-12-08 20:11:50 +00:00
Elvish_Hunter
9476d796c1 Moved [store_villages] from C++ to Lua 2012-07-21 10:03:31 +00:00
Anonymissimus
19354101ff remove apparently unneeded inefficient calls to [redraw] in [(un)petrify]
see also http://forums.wesnoth.org/viewtopic.php?p=531983#p531983 and following
2012-06-29 17:34:08 +00:00
Dmitry Kovalenko
f0c703287b LuaAI: bugfix #19086 2012-06-27 18:21:27 +00:00
Anonymissimus
6f48761f93 Fix a variable referenced out of its scope (bug #19803) 2012-06-13 21:58:01 +00:00
Ignacio R. Morelle
50e7a70883 Implement [lock_view] and [unlock_view] WML actions
They are trivial wrappers for the wesnoth.lock_view() function in Lua.
Neither takes any parameters.

There is no wrapper for wesnoth.view_locked() yet until I decide on its
name and usefulness factor.
2012-06-11 23:10:03 +00:00
Ignacio R. Morelle
a552b15df9 Add an optional .immediate (def. false) attribute...
...to the [scroll_to] and [scroll_to_unit] WML actions

When immediate is set to a true value, the display code will instantly
warp to the chosen location regardless of the scroll speed setting in
Preferences.
2012-06-11 08:50:21 +00:00
Elvish_Hunter
a129e14874 [find_path]: fixed this_unit not being restored in certain situations 2012-05-19 08:49:45 +00:00
Silas Brill
f806b61e80 Applied patch #1381: Configurable village support
This differs from the original patch in that the minimum village
support for multiplayer is 0, not 1.
2012-04-30 21:52:38 +00:00
Elvish_Hunter
6bfaa5ef88 Lua: added helper.round function 2012-04-12 10:12:05 +00:00
Anonymissimus
6f7e76cbac introduce [item]redraw=yes|no (def yes) parameter
This allows WML/lua authors to optionally skip [item]'s implicit redraw
call. shadowmaster was experiencing some negative
visual effects due to this.
2012-04-09 19:48:51 +00:00
Elvish_Hunter
b52b619482 Added [show_if] support to [objectives] [note] 2012-03-13 09:31:18 +00:00
Anonymissimus
590708a27b introduce inline SSF support in [show_objectives] 2012-03-07 19:36:34 +00:00
Anonymissimus
c0bac05285 introduce inline SSF support in [objectives]
No deprecation needed since it defaulted to the 'default
objectives' already. They are used for a side in case that that side
doesn't have side specific objctives set. Use a SSF which matches
no sides or all sides to set the default objectives, if a subset
of all sides match, the side specific objectives for these are set.
2012-03-07 19:36:14 +00:00
Elvish_Hunter
e7bcf1aba1 Added inline SLF support in [scroll_to] 2012-02-28 09:33:38 +00:00
Anonymissimus
d1360bff02 modify_unit: re-add part of the "kill units" behavior...
...which I removed in 2012-01-22T22:35:44Z!anonymissimus@arcor.de

(fix for bug #19498)
2012-02-25 20:49:43 +00:00
Anonymissimus
db9c2d6f13 strip some trailing whitespace 2012-02-25 20:49:04 +00:00
Elvish_Hunter
84beb9ced7 [harm_unit]: added resistance_multiplier key, as per fendrin's request 2012-02-15 09:53:18 +00:00
Anonymissimus
679f18801c Introduce inline SSF support in [gold] and deprecate [gold][filter_side].
Since it should never have been added and is now redundant.
2012-02-14 21:22:32 +00:00
Anonymissimus
c44e2ea3ad Activate SSF support in allow_recruit, disallow_recruit and set_recruit.
The default for empty side= is now "all sides".
2012-02-14 21:22:15 +00:00
Anonymissimus
6569d72ada update helper.lua to use wesnoth.wml_actions instead of wesnoth.fire
(patch #3040 by SigurdFireDragon, slightly modified)
2012-02-08 21:28:02 +00:00
Elvish_Hunter
e2eb3b8fea [find_path]: length -> hexes 2012-02-08 10:16:05 +00:00
Anonymissimus
8b898d26bd rename compatibility-1.8.lua to backwards-compatibility 2012-02-07 23:28:15 +00:00
Anonymissimus
fb982ed400 Implement scheduled deprecation warnings for the functions...
...in compatibility-1.8.lua.

Except for wesnoth.fire, which should better stay I think.
2012-02-07 23:27:51 +00:00
Anonymissimus
afb54cfc76 remove the string "WML" in helper.deprecate,
...since we're using it for lua functions as well
2012-02-07 23:27:34 +00:00
Anonymissimus
42801c6c73 Remove a backwards compat hack left over from previous commit:
2010-07-18T15:21:41Z!guillaume.melquiond@gmail.com

The hack causes problems now, since I want to load helper.lua previously
already and the comment says that it should be removed in 1.11.

I *think* the reason for the hack was to avoid loading wml-tags.lua twice
in case that a replay and/or (perhaps) savegame is loaded which was
created with a BfW version previously to 2010-07-18T15:21:41Z!guillaume.melquiond@gmail.com, 
since those replays/saves seemed to have recorded the commands for
loading the core lua files, which is no longer the case since back
then. Those replays/saves are no longer relevant, so everything hints
that I can safely remove this.
2012-02-07 23:27:17 +00:00
Anonymissimus
91ae18b6d3 required compatibility changes for Lua 5.2 in extension Lua code
Searched all *.lua and *.cfg (embedded lua) files in data/ for occurences
of the deprecated stuff mentioned in

http://www.lua.org/manual/5.2/manual.html#8.2

The currently compiled-in define LUA_COMPAT_ALL appears to work

like so that both the old and the new syntax work at the same time
(without errors or warnings), while the old one will be an error after
removing it.
2012-02-07 18:05:22 +00:00
Steven Panek
b2bb325104 Removed support for the deprecated [removeitem]. 2012-02-07 00:16:29 +00:00
Alexander van Gessel
6eb9efd2fd Revert "Add a warning for empty [remove_item]"
This reverts commit 2012-02-05T16:05:43Z!ai0867@gmail.com.
2012-02-05 23:08:03 +01:00
Alexander van Gessel
86ef26478c Add a warning for empty [remove_item] 2012-02-05 17:05:43 +01:00
Steven Panek
e093fc6b5c Killed 'colour'. 2012-01-30 01:40:30 +00:00
Anonymissimus
1862f701a5 Fix modify_unit removing units for the time of processing.
If the tag is used to modify the type= of several units at once,
it looks better to not kill the old units until the modified one
gets unstored, so that units don't disappear for the time of processing.
reported in the forum: http://forums.wesnoth.org/viewtopic.php?p=519174
2012-01-22 22:35:44 +00:00
Anonymissimus
0f6190a936 Propagate wesnoth.select_hex changes to [select_unit] (fix for bug #19224, bug #16819) 2012-01-17 14:57:09 +00:00
Ali El Gariani
5d025989ee Revert 2012-01-07T15:18:03Z!alinkmaze@gmail.com "Stop writing deprecated extra "colour" key in [side]" 2012-01-07 16:23:59 +00:00
Ali El Gariani
484ea0e8bc Stop writing deprecated extra "colour" key in [side]
Engine never reads such keys anymore.
2012-01-07 15:18:03 +00:00
Anonymissimus
5dcc892a9f remove deprecation warning about .colour in store_side
Unless there is some idea of reducing the false positives.
2012-01-05 19:55:20 +00:00
Ali El Gariani
3299f7e3e5 Fix bug #19213: Fix bug #19213: [harm_unit] incorrectly use ToD bonus 2011-12-26 21:59:36 +00:00