Deprecate two redundant macros, and change mainline to use the simpler ones.

This commit is contained in:
Eric S. Raymond 2009-04-23 02:26:39 +00:00
parent 4c18f22a21
commit 8ffa41056d
10 changed files with 69 additions and 77 deletions

View file

@ -13,12 +13,17 @@ you and will chew your units up in detail. A good recruit mix is one
horseman and then about half mages to half spearmen; you need your
spearmen to block for wounded mages.
It's actually not a bad idea to just fort up on Methor's keep; the
orcs will reach you about dawn of the second day, and the
fortifications will tilt the kill ratio in your favor. Once you've
dealt with the initial assault wave, cross the bridge in force and run
north to kill the boss. Use Methor's lightbeam attack to soften up
opponents so your baby mages can get kills.
On Easy and Normal, it's actually not a bad idea to just fort up on
Methor's keep; the orcs will reach you about dawn of the second day,
and the fortifications will tilt the kill ratio in your favor. Once
you've dealt with the initial assault wave, cross the bridge in force
and run north to kill the boss. Use Methor's lightbeam attack to
soften up opponents so your baby mages can get kills.
On Hard, the AI may very hang back and never attack if you fort up, so
you have to send troops over the river early. If it looks like the
orcs will make contact befor morning, fort up in the treeline just west
and south of the bridge, as this wioll improve your spearmens' defense.
The Road to Weldyn
==================

View file

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

View file

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

View file

@ -55,6 +55,7 @@
team_name=player
# wmllint: recognize Relgorn
{NAMED_UNIT 2 (Dwarvish Fighter) 5 10 "Relgorn" (_"Relgorn") (ai_special=guardian)}
{MAKE_HERO Relgorn}
{NAMED_UNIT 2 (Dwarvish Fighter) 9 7 "Udrin" (_"Udrin") (ai_special=guardian)}
[/side]
[side]
@ -161,25 +162,7 @@
id=Delfador
[/scroll_to_unit]
[sound]
name=lightning.ogg
[/sound]
[colour_adjust]
red=100
green=100
blue=100
[/colour_adjust]
[delay]
time=10
[/delay]
[colour_adjust]
red=0
green=0
blue=0
[/colour_adjust]
{DELFADOR_LIGHTNING}
[message]
speaker=Delfador

View file

@ -180,7 +180,7 @@
[/unstore_unit]
{CLEAR_VARIABLE landar_store}
{REMOVE_HERO_ICON (id=Landar)}
{UNMAKE_HERO Landar}
#TODO unstore troop_store
[/event]

View file

@ -379,7 +379,7 @@
id=Harper
[/recall]
{REMOVE_HERO_ICON id=Harper}
{UNMAKE_HERO Harper}
[message]
speaker=Baldras

View file

@ -589,7 +589,7 @@
speaker=Thursagan
message= _ "Well, now we are in the caves again! Come on, back south, to the city."
[/message]
{REMOVE_HERO_ICON id=Baglur}
{UNMAKE_HERO id=Baglur}
[endlevel]
result=victory
bonus=yes

View file

@ -338,7 +338,7 @@
message=_"Aye. But I've a grim feeling we might be going to discover that in person."
[/message]
{REMOVE_HERO_ICON id=Ratheln}
{UNMAKE_HERO Ratheln}
[endlevel]
result=victory

View file

@ -14,3 +14,53 @@
#enddef
#wmllint: markcheck on
#define ADD_HERO_ICON FILTER
# Add hero icon to specified units
{DEPRECATED_MACRO ADD_HERO_ICON 1.7.2}
[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
{DEPRECATED_MACRO REMOVE_HERO_ICON 1.7.2}
[store_unit]
[filter]
{FILTER}
[/filter]
kill=no
variable=hero_removal_target
[/store_unit]
[remove_unit_overlay]
x,y=$hero_removal_target.x,$hero_removal_target.y
image=misc/hero-icon.png
[/remove_unit_overlay]
[clear_variable]
name=hero_removal_target
[/clear_variable]
#enddef

View file

@ -28,52 +28,6 @@
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]
[filter]
{FILTER}
[/filter]
kill=no
variable=hero_removal_target
[/store_unit]
[remove_unit_overlay]
x,y=$hero_removal_target.x,$hero_removal_target.y
image=misc/hero-icon.png
[/remove_unit_overlay]
[clear_variable]
name=hero_removal_target
[/clear_variable]
#enddef
#define NEW_JOURNEY X Y
# Make a new journey mark on a tracking map
[image]