Add some hero icons where needed. Add a standard macro to do this.

This commit is contained in:
Eric S. Raymond 2009-04-11 19:32:51 +00:00
parent ee2d0ac3fc
commit 20c849736d
5 changed files with 29 additions and 2 deletions

View file

@ -12,8 +12,6 @@ WML issues
In scenario 19, maybe do an animation with a wall appearing in the
place of the portal?
In Ur-Thirodur (8), Lionel needs a hero crown.
Other
-----
Finish the walkthrough and put it on the wiki.

View file

@ -34,6 +34,7 @@
name=prestart
{RECALL_OR_CREATE_UNIT {LIONEL} Lionel}
# wmllint: recognize Lionel
{ADD_HERO_ICON id=Lionel}
[/event]
{STARTING_VILLAGES 1 4}
#### /Delfador's code ####

View file

@ -103,6 +103,7 @@
id=Chantal
x,y=32,2
[/recall]
{ADD_HERO_ICON id=Chantal}
[/event]
[side]

View file

@ -50,6 +50,7 @@
controller=ai
recruit=Elvish Ranger,Elvish Rider
team_name=goodies
{IS_HERO}
[modifications]
{TRAIT_INTELLIGENT}
{TRAIT_RESILIENT}
@ -68,6 +69,7 @@
id=Lionel
name=_ "Lionel"
profile="portraits/lionel.png"
{IS_HERO}
[modifications]
{TRAIT_FEARLESS}
{TRAIT_STRONG}

View file

@ -28,6 +28,31 @@
overlays="misc/hero-icon.png"
#enddef
#define ADD_HERO_ICON FILTER
[store_unit]
[filter]
{FILTER}
[/filter]
variable=MODIFY_UNIT_store
kill=yes
[/store_unit]
{FOREACH MODIFY_UNIT_store MODIFY_UNIT_i}
[set_variable]
name=MODIFY_UNIT_store[$MODIFY_UNIT_i].overlays
value="misc/hero-icon.png"
[/set_variable]
[unstore_unit]
variable=MODIFY_UNIT_store[$MODIFY_UNIT_i]
find_vacant=no
[/unstore_unit]
{NEXT MODIFY_UNIT_i}
{CLEAR_VARIABLE MODIFY_UNIT_store}
#enddef
#define REMOVE_HERO_ICON FILTER
# Remove the hero icon from a unit by ID or other filter
[store_unit]