Commit graph

1127 commits

Author SHA1 Message Date
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
Thonsew
70e6077f9d Fixed some of the t_token references that were leaking out into WML land.
This fixes all of the lua errors in wesnoth -t.  This does not fix all
of the errors in Anonymissimus' multiplayer add-on, which are due to
references leaking through the arbitrary code hole in wml-tags.lua:250
2011-09-21 21:44:58 +00:00
Thonsew
e59dc97260 Added support for t_token to lua code.
1. Created a t_token metatable along with support code for indexing,
garbage collection, tostring, tonumber, comparison and concatenation.

2. Adjusted string comparison and lookup in lua code to work with
either t_token or string.

This addresses in part bug #18631, bug #18695.  Before this lua was
treating all t_token as either tstrings or strings.
2011-09-20 21:21:21 +00:00
Thonsew
2bf6377351 Changed config and vconfig to use a token representation...
...t_token in place of std::string.  t_token compares, copies, copy
constructs and hashes in 1 operation instead of proportional to the
length of the string.
2011-09-08 19:16:01 +00:00
Anonymissimus
e8f6531a86 Completely removed the old x,y=$x1,$y1 default in [remove_item],
since when running into this rare exception (if the SLF doesn't
matching anything) it could be hard to figure out what happens.

[remove_item] does nothing in this case now.
2011-09-01 19:06:56 +00:00
Anonymissimus
75bf37ed86 improved [store_items] to store only items on locs matching given SLF 2011-08-21 17:39:11 +00:00
Elvish_Hunter
9853a5d3f3 Added patch #2470
(support for harmer and xp calculation), with a few modifications.
2011-08-19 08:12:34 +00:00
Anonymissimus
fdb74894be added new wml tag store_items 2011-08-17 18:38:07 +00:00
Elvish_Hunter
bb15de6c40 Added [primary_attack] support to [harm_unit] 2011-08-15 14:09:31 +00:00
Anonymissimus
e7688ed406 add SLF support to [event][remove_item] 2011-08-14 00:24:58 +00:00
Anonymissimus
38091cb48a add SLF support to [event][item] 2011-08-14 00:24:42 +00:00