Skip to content

Commit

Permalink
fix indention of NEAREST_HEX macro uses
Browse files Browse the repository at this point in the history
previously the code put the brackets in the wrong
line and handfixed that but a wmlindent comment,
but that then broke possible other uses of that
macro.
  • Loading branch information
gfgtdf committed Oct 19, 2020
1 parent 2f234a8 commit 267b7db
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 48 deletions.
Expand Up @@ -607,18 +607,19 @@ of Healing"
[filter]
[/filter]
[/not]
[/and] ) location}
[/and]
) location}

[move_unit_fake]
type=Spearman
x=10, $location.x
y=11, $location.y
side=2
[/move_unit_fake]
{PLACE_GUARD $location.x $location.y (Spearman) {TRAIT1} {TRAIT2} {ID} {NAME}}
[clear_variable]
name=location
[/clear_variable]
[move_unit_fake]
type=Spearman
x=10, $location.x
y=11, $location.y
side=2
[/move_unit_fake]
{PLACE_GUARD $location.x $location.y (Spearman) {TRAIT1} {TRAIT2} {ID} {NAME}}
[clear_variable]
name=location
[/clear_variable]
#enddef
# wmllint: whofield MOVE_AND_PLACE_GUARD 3

Expand Down
Expand Up @@ -184,23 +184,24 @@ I was so sure I had the answer! I was wrong. I wanted to believe that I was imag
[or]
x,y=47,13
[/or]
[/not]) location}
[/not]
) location}

[move_unit_fake]
type={TYPE}
side=3
x=47,$location.x
y=13,$location.y
[/move_unit_fake]
[unit]
type={TYPE}
side=3
x=$location.x
y=$location.y
[/unit]
[clear_variable]
name=location
[/clear_variable]
[move_unit_fake]
type={TYPE}
side=3
x=47,$location.x
y=13,$location.y
[/move_unit_fake]
[unit]
type={TYPE}
side=3
x=$location.x
y=$location.y
[/unit]
[clear_variable]
name=location
[/clear_variable]
#enddef

[event]
Expand Down
Expand Up @@ -2,10 +2,6 @@

# A loyal saurian healer is added at the end of this scenario--very useful.

# This is slightly hackish since the closer contains VAR_NAME...
# wmlindent: opener "{NEAREST_HEX "
# wmlindent: closer "location}"

[scenario]
name= _ "Battleground"
map_file=11_Battleground.map
Expand Down Expand Up @@ -187,8 +183,8 @@ Rastaban seems like an acceptable ally. He is quite different from the stodgy te
[not]
[filter]
[/filter]
[/not] )
location}
[/not]
) location}

[move_unit_fake]
type=Saurian Soothsayer
Expand Down
11 changes: 4 additions & 7 deletions data/campaigns/Secrets_of_the_Ancients/scenarios/16_The_Mage.cfg
Expand Up @@ -5,10 +5,6 @@
# Crelanu. The water destroys undead, but can be removed by living units. It is there
# to prevent easy assassination of Crelanu with a few specters.

# This is slightly hackish since the closer contains VAR_NAME...
# wmlindent: opener "{NEAREST_HEX "
# wmlindent: closer "location}"

[scenario]
name= _ "The Mage"
map_file=16_The_Mage.map
Expand Down Expand Up @@ -464,12 +460,13 @@ We crossed the high plateaus, and forded the Arkan-thoria. Then we headed up int

# We'd prefer the gryphon to be recruited in a castle hex, so we'll try to
# find an empty one.
{NEAREST_HEX 21 6 3 (terrain=C*
{NEAREST_HEX 21 6 3 (
terrain=C*
[not]
[filter]
[/filter]
[/not])
location}
[/not]
) location}
[if]
[variable]
name=location.length
Expand Down
Expand Up @@ -6,10 +6,6 @@
# backfire as the leader will get at least a castle's worth of units a turn earlier in
# this case. Several events and macros control this. (About half of this file actually.)

# This is slightly hackish since the closer contains VAR_NAME...
# wmlindent: opener "{NEAREST_HEX "
# wmlindent: closer "location}"

[scenario]
name= _ "Against the World"
map_file=21_Against_the_World.map
Expand Down Expand Up @@ -680,8 +676,8 @@ We finally made it out of the mountains. We crossed the Ford of Abez late this m
[not]
[filter]
[/filter]
[/not])
location}
[/not]
) location}

[move_unit_fake]
type=Great Mage
Expand Down Expand Up @@ -747,8 +743,8 @@ We finally made it out of the mountains. We crossed the Ford of Abez late this m
[not]
[filter]
[/filter]
[/not])
location}
[/not]
) location}

[move_unit_fake]
type=Elvish Enchantress
Expand Down

0 comments on commit 267b7db

Please sign in to comment.