Chris Beck
8308f7d3b9
fix whitespace at end of line
2014-09-05 16:52:03 -04:00
unknown
72f138c544
Fix bug #22306 : move_unit moves a unit even when it shouldn't
...
Modified the lua script for wml_action.move_unit. In the
loop to check for vacant tile, if the current location
is equal to the previous location we don't look for a
vacant tile since our location is free (where we are).
2014-08-07 10:59:38 -04:00
Chris Beck
762efc278f
add error reporting to [insert_tag] if it has no variable= field
...
The lack of reporting here is somewhat annoying so i patched it.
2014-06-21 18:13:42 -04:00
aquileia
1715ab3145
gitignore: Include more rules from subdirectories
...
That is: data/lua/, scons/, and utils/
2014-06-09 01:00:45 +02:00
Chris Beck
df71897d2f
add error reporting when [if] is evaluated with no actions
...
I frequently make the mistake of using {IF_VAR} but forgetting to
use [then] with it. One solution is to use my own macro, but the
better solution is to add proper error reporting to if. If the
engine parses an [if] tag with no [then], [else], or [elseif], it
should flag an error... otherwise these mistakes are generally
silent and very difficult to find.
2014-06-05 19:49:57 -04:00
Elvish_Hunter
082992beed
Removed sanity checks for missing variable=, [case] and value= in [switch]
2014-04-12 10:15:28 +02:00
Elvish_Hunter
c35e08dbfd
Removed sanity check for missing [do] in [while]
2014-04-12 10:15:28 +02:00
Elvish_Hunter
729ebd58ff
Restored support for [if] tags not containing [else] tags
2014-04-05 10:36:06 +02:00
Elvish_Hunter
df3063ed70
[switch]: implemented checks for missing [case], variable= and value=, Lua part
2014-04-03 12:33:20 +02:00
Elvish_Hunter
7e4beb8630
Get rid of obsolete if_while_handler function
2014-04-03 12:30:22 +02:00
Elvish_Hunter
cf55cf84e6
[while]: added sanity checks for missing [do] tags
2014-04-03 12:28:17 +02:00
Elvish_Hunter
2cff4662e2
Added [elseif] support, Lua part. Also included sanity checks for missing [then] tags inside [if]
2014-04-03 12:19:05 +02:00
Aishiko
a723d5fa59
Add single unit instance recall_costs
...
Add the variables, lua, and wml support variables to allow a scenario
designer the ability to define different from the standard recall costs
or team recall costs for both individual units and unit types.
from least to highest order of precendent we'll have default, team/side,
unit_type, and finally individual units.
The tag in the scenarios and in the unit config files is recall_cost=int.
2014-03-15 10:03:56 -04:00
Alexander van Gessel
62b287354f
Fix Fisher-Yates implemenation of Lua helper.shuffle (bug #21706 )
2014-03-04 11:57:19 +01:00
Chris Beck
9fb47d7f1f
negate the output of location_set:empty, fixing logic error and
...
ensuring that a boolean value is returned
2014-02-16 19:36:09 -05:00
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 23b72d6956
.
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 5fa5c03411
, reversing
changes made to 06374c64ba
.
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