Skip to content

Commit

Permalink
SoF 7: no need for manual target calculation
Browse files Browse the repository at this point in the history
move_unit does this by itself (in difference to move_unit_fake)
And it works as well if no surrounding hex is free.
[ci skip]
  • Loading branch information
sevu committed Oct 19, 2018
1 parent 8300293 commit 6c0ccc8
Showing 1 changed file with 4 additions and 17 deletions.
Expand Up @@ -415,6 +415,7 @@
[message]
race=elf
message= _ "You slow humans took too long, our real reinforcements are here!"
scroll=no
[/message]

[delay]
Expand Down Expand Up @@ -470,26 +471,12 @@
[/modifications]
[/unit]

[store_locations]
variable=next_to_alanin
include_borders=no
[not]
[filter]
[/filter]
[/not]
[and]
x=$alanin.x
y=$alanin.y
radius=1
[/and]
[/store_locations]

[move_unit]
id=ambusher
x=$spawn_hexes[0].x
y=$spawn_hexes[0].y
to_x=$next_to_alanin[0].x
to_y=$next_to_alanin[0].y
to_x=$alanin.x
to_y=$alanin.y
[/move_unit]

# to avoid scrolling between the killing animation and the [kill]
Expand Down Expand Up @@ -531,7 +518,7 @@
id=Alanin
animate=yes
[/kill]
{CLEAR_VARIABLE alanin,next_to_alanin,spawn,spawn_hexes}
{CLEAR_VARIABLE alanin,spawn,spawn_hexes}
[/event]

[event]
Expand Down

0 comments on commit 6c0ccc8

Please sign in to comment.