Rewrote the auto-recalling in the final scenario...

...and removed the old ROLEMACRO, HEROMACRO and RECALLMACRO.
This commit is contained in:
Lari Nieminen 2010-02-13 16:26:29 +00:00
parent 50356ad774
commit fcbcbebcd9
2 changed files with 30 additions and 83 deletions

View file

@ -181,54 +181,40 @@
[event]
name=start
#recall heroes and recall 14 others with a DARN ANNOYING MACRO
{HEROMACRO Rugnur}
{HEROMACRO Baglur}
{HEROMACRO Krawg}
{HEROMACRO Thursagan}
# wmllint: recognize Rugnor
[recall]
id=Thursagan
[/recall]
[recall]
id=Baglur
[/recall]
[recall]
id=Krawg
[/recall]
# wmllint: recognize Rugnur
# wmllint: recognize Baglur
# wmllint: recognize Krawg
# wmllint: recognize Thursagan
{ROLEMACRO 1}
{ROLEMACRO 2}
{ROLEMACRO 3}
{ROLEMACRO 4}
{ROLEMACRO 5}
{ROLEMACRO 6}
{ROLEMACRO 7}
{ROLEMACRO 8}
{ROLEMACRO 9}
{ROLEMACRO 10}
{ROLEMACRO 11}
{ROLEMACRO 12}
[unstore_unit]
variable=tempRugnur
[/unstore_unit]
[clear_variable]
name=tempRugnur
[/clear_variable]
[redraw]
[/redraw]
{RECALLMACRO Baglur}
{RECALLMACRO Krawg}
{RECALLMACRO Thursagan}
# wmllint: recognize Baglur
# wmllint: recognize Krawg
# wmllint: recognize Thursagan
{RECALLMACRO 1}
{RECALLMACRO 2}
{RECALLMACRO 3}
{RECALLMACRO 4}
{RECALLMACRO 5}
{RECALLMACRO 6}
{RECALLMACRO 7}
{RECALLMACRO 8}
{RECALLMACRO 9}
{RECALLMACRO 10}
{RECALLMACRO 11}
{RECALLMACRO 12}
[store_unit]
[filter]
side=1
x,y=recall,recall
[/filter]
kill=no
variable=to_be_recalled
[/store_unit]
{FOREACH to_be_recalled i}
[recall]
id=$to_be_recalled[$i].id
[/recall]
{NEXT i}
{CLEAR_VARIABLE to_be_recalled}
#remove the keep
[terrain]
x,y=15,4

View file

@ -88,42 +88,3 @@
[/endlevel]
[/event]
#enddef
#define ROLEMACRO X
[role]
role=temp{X}
type=Dwarvish Lord,Dwarvish Dragonguard,Dwarvish Runemaster_alt,Dwarvish Sentinel,Dwarvish Steelclad,Dwarvish Thunderguard,Dwarvish Runesmith,Dwarvish Stalwart,Gryphon Master,Gryphon Rider,Dwarvish Thunderer,Dwarvish Guardsman,Dwarvish Fighter,Dwarvish Scout,Dwarvish Explorer,Dwarvish Pathfinder
[/role]
[store_unit]
[filter]
role=temp{X}
[/filter]
variable=temp{X}
kill=yes
[/store_unit]
#enddef
#define HEROMACRO ID_STRING
[store_unit]
[filter]
id={ID_STRING}
[/filter]
variable=temp{ID_STRING}
kill=yes
[/store_unit]
#enddef
#define RECALLMACRO VALUE
[unstore_unit]
variable=temp{VALUE}
[/unstore_unit]
[recall]
role=temp{VALUE}
[/recall]
[recall]
id={VALUE}
[/recall]
[clear_variable]
name=temp{VALUE}
[/clear_variable]
#enddef