Commit Graph

237 Commits

Author SHA1 Message Date
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
Anonymissimus
4931372ced Fix store_unit clearing the used variable...
...before its filter can reference it (bug #19203)
2011-12-19 18:31:04 +00:00
Anonymissimus
68aaf39c11 Revert code-modifying revisions related to bug #19188 conflict-free,
since they break compatibility.

This reverts

2011-12-16T01:24:54Z!anonymissimus@arcor.de
2011-12-16T04:06:47Z!Majora700@gmail.com
2011-12-16T04:08:22Z!Majora700@gmail.com
2011-12-16T04:14:58Z!Majora700@gmail.com
2011-12-16T20:13:27Z!anonymissimus@arcor.de
2011-12-16T20:14:08Z!anonymissimus@arcor.de
2011-12-16T20:48:39Z!Majora700@gmail.com
2011-12-17T09:46:29Z!Majora700@gmail.com
2011-12-18 15:10:16 +00:00
Steven Panek
ffb4aa7a06 Made it so that [store_side] also stores current_player. 2011-12-17 09:46:29 +00:00
Elvish_Hunter
fc8464158b [harm_unit]: reworked damage calculation code to fix a bug,
where the private unit can be influenced by units with leadership and
cast more damage than expected
2011-11-20 20:09:13 +00:00
Anonymissimus
c3aa254e7d fix bug #18966 2011-11-10 21:19:10 +00:00
Anonymissimus
406d76e09c set team.objectives_changed differently (fix for bug #18927)
In multiplayer, scenarios have default objectives sent from the host
to the other clients as [scenario]objectives= t_string, and this doesn't
know about silent= but must be shown anyway.
2011-11-06 23:22:56 +00:00
Anonymissimus
4dc94edbd0 replace wesnoth.unit_image_mods with a proxy field 2011-11-06 15:52:52 +00:00
Ignacio R. Morelle
686bf9f563 Add wesnoth.unit_image_mods() function...
...and make [move_unit] use it to respect mods applied via EffectWML
2011-11-06 05:39:28 +00:00
Anonymissimus
f809051eb4 introduce [capture_village]fire_event=yes|no (def no) 2011-11-05 18:27:22 +00:00
Steven Panek
b194bf3724 Made it so that red=, blue=, and green= actually work for lose objectives. 2011-10-31 07:14:27 +00:00
Steven Panek
e1d7f56b7c Renamed r=, g=, and b=...
...in [objective], [gold_carryover], and [note] to red=, green=, and
blue= for consistency.
2011-10-28 23:04:45 +00:00
Steven Panek
f400ee4ac5 Implemented r=, g=, and b=...
...for [objective], [gold_carryover], and [note].
2011-10-28 22:31:04 +00:00
Steven Panek
f2c605e793 Implemented bullet=...
...in [objectives], [objective], [gold_carryover], and [note].
2011-10-28 22:10:02 +00:00
Elvish_Hunter
4591619ada Added support to [harm_unit] and [find_path] 2011-10-27 08:26:33 +00:00
Anonymissimus
4345f5ea75 added helper functions for starting and stopping wml variable scopes
Usage for "this_unit" in modify_unit, harm_unit and find_path.
2011-10-25 16:52:18 +00:00
Simon Forsyth
ee0e491cfd Revert accidental change to wml-tags.lua 2011-10-23 15:15:59 +00:00
Simon Forsyth
5cffe7db29 Update changelog re 2011-10-22T21:43:12Z!alarantalara@gmail.com 2011-10-23 15:13:45 +00:00
Anonymissimus
029798160e Revert "[harm_unit]: added Lua workaround for bug #18795"
I do not want such workarounds to be added. shadowmaster's campaign
was still functional nevertheless. If there's an annoying bug
and nobody has the time or knowledge or energy to fix it then we must
just accept that it lingers around any annoys us.
2011-10-19 20:01:38 +00:00
Elvish_Hunter
9c0c552d4e [harm_unit]: added Lua workaround for bug #18795 2011-10-19 08:33:33 +00:00
Anonymissimus
a0d6cbc0b2 made scope of this_unit variable in modify_unit local (bug #18811) 2011-10-15 21:05:00 +00:00
Elvish_Hunter
c4dba27436 [harm_unit] cannot longer poison not living units 2011-10-10 09:19:40 +00:00
Anonymissimus
6bf39ec751 Add support to capture_village for [filter_side]#SSF.
Since capture_village already has an inline SLF, I don't want to add
a SSF at the same level since keys and tags could conflict in the future.
In case that both inline side= and [filter_side] are present,
emit an error.

Not sure whether inline side= should be deprecated; no need to break
backwards compatibility for now.
2011-10-05 16:22:40 +00:00
Anonymissimus
6ef1bcfecd remove an unused variable 2011-10-04 12:54:54 +00:00
Anonymissimus
84f1a90ebc add a comment 2011-10-04 12:54:19 +00:00
Anonymissimus
e4be4af1e7 Move store_starting_location implementation to lua.
Add SSF support along the way. No deprecation for default side=1 needed,
since if left empty, an array with all starting locations is created,
side 1 being the first element and $array[0].something is the same as

$array.something.

(I used the same trick for [store_side] already.)
2011-10-03 20:53:11 +00:00
Elvish_Hunter
b2d6824bf7 [find_path]: ignore_visibility -> check_visibility;
ignore_units -> check_zoc; ignore_teleport -> check_teleport
2011-10-02 19:24:44 +00:00
Elvish_Hunter
6300b1b3bf Added [find_path] 2011-09-28 19:24:55 +00:00
Anonymissimus
8cc18af32a add a comment describing the .colour warning from [store_side]... 2011-09-27 23:02:30 +00:00
Anonymissimus
d3d0400ed0 revert part of 2011-09-08T19:16:01Z!thonsew@yahoo.com (resonless change to [item] behavior) 2011-09-27 23:01:26 +00:00
Anonymissimus
febb9da2ca Reverted 2011-09-21T21:44:58Z!thonsew@yahoo.com and 2011-09-20T21:21:21Z!thonsew@yahoo.com.
thonsew: The lua interface is not your playground. This is not the way
I want the lua files or its C++ interface to be modified. You are
invited to talk with me on IRC.

some of the main reasons:

-Your revisions contain lots of unneccessary changes, some of which
 break existing lua or wml without a reason. Do you ever look at the
 diffs?

-Your revisions pack a lot of unrelated stuff together into one.

2011-09-21T21:44:58Z!thonsew@yahoo.com makes sense in some parts and is what you should have
done in the first place.
2011-09-22 17:09:50 +00:00