Revert patch #1063 from 2008-05-06T00:45:50Z!shadowm@wesnoth.org

This commit is contained in:
Ignacio R. Morelle 2008-05-06 01:12:25 +00:00
parent feb022d88c
commit 4b42a90f34

View file

@ -121,48 +121,3 @@
name=STORE_UNIT_VAR_store
[/clear_variable]
#enddef
#define ADVANCE_UNIT FILTER ADVANCETO
# Advances all units matching the filter to ADVANCETO or if missing, their normal advancement
#
# Example to advance all spearmen to a cavalrymen:
#! {ADVANCE_UNIT type=Spearman Cavalryman}
# Example to advance your leader normally:
#! {ADVANCE_UNIT side,canrecruit=1,yes ""}
[store_unit]
[filter]
{FILTER}
[/filter]
variable=ADVANCE_UNIT_store
kill=no
[/store_unit]
[set_variable]
name=advanceto
value={ADVANCETO}
[/set_variable]
{FOREACH ADVANCE_UNIT_store i}
[if]
[variable]
name=advanceto
not_equals=""
[/variable]
[then]
[set_variable]
name=ADVANCE_UNIT_store[$i].advanceto
value=$advanceto
[/set_variable]
[/then]
[/if]
[set_variable]
name=ADVANCE_UNIT_store[$i].experience
value=$ADVANCE_UNIT_store[$i].max_experience
[/set_variable]
[unstore_unit]
variable=ADVANCE_UNIT_store[$i]
find_vacant=no
advance=true
[/unstore_unit]
{NEXT i}
{CLEAR_VARIABLE ADVANCE_UNIT_store}
#enddef