278 Commits

Author SHA1 Message Date
Ignacio R. Morelle
80d093b2b9 Add support for flag and flag_icon to [store_side] 2013-12-18 23:30:39 -03:00
Alexander van Gessel
255504870d Add side filters to [scroll_to] and [scroll_to_unit] 2013-11-25 20:23:54 +01:00
mattsc
5ee8e35568 Update animation when [un]petrifying units using WML tags
Previously, when a unit was petrified with [petrify] or [harm_unit], it
would continue its standing animation.  Also, it would not start its
standing animation when unpetrifying it with [unpetrify] or
[heal_unit].  Now the animation stops/starts correctly when the status
is changed.
This fixes bug #20124
2013-11-10 19:15:32 -08:00
anonymissimus
a7ce537ee6 .gitignore code.lua
It makes sense to add this in a .gitignore as the filename must be the same
in different checkouts.
2013-08-25 21:04:01 +02:00
Ignacio R. Morelle
74915e33bf Add scroll_to_leader field to the [store_side] WML action 2013-08-20 18:25:03 -04:00
Alexander van Gessel
38b224c1ff Revert "Revert "Merge branch 'master' of github.com:wesnoth/wesnoth-old""
This reverts commit 23b72d6956e6316f8b50a6accba607f66cf197a7.
2013-08-09 00:13:46 +02:00
Thibault Févry
23b72d6956 Revert "Merge branch 'master' of github.com:wesnoth/wesnoth-old"
This reverts commit 5fa5c034110c3c942d299c8fd440297c89aca037, reversing
changes made to 06374c64ba00977a4f720a44108593fc43d5c787.
2013-08-08 18:50:46 +02:00
Elvish_Hunter
095b7b772f [allow_recruit], [disallow_recruit]: added a less cryptic error message if type= is missing 2013-07-23 22:29:04 +02:00
Ignacio R. Morelle
f6cc3acbaf Add [move_unit] force_scroll attribute
Defaults to using the [move_unit_fake] default.
2013-07-05 20:13:53 -04:00
Elvish_Hunter
f8996cbc14 [harm_unit]: removed two accidental plus signs that broke the tag 2013-06-14 23:36:23 +02:00
Elvish_Hunter
1861b9656a [harm_unit]: added animate keys to wml_actions.unstore_unit tables 2013-06-14 23:28:16 +02:00
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