UtBS S8: Make sure heroes are safe before teleporting them

This commit is contained in:
DisherProject 2019-04-18 23:31:50 +02:00
parent 097514b9b7
commit 92243fc739

View file

@ -2472,6 +2472,41 @@
message= _ "Look, daylight! I think we finally made it out of the caves!"
[/message]
[find_path]
[traveler]
id=Nym
[/traveler]
[destination]
x=$explorer.x
y=$explorer.y
[/destination]
allow_multiple_turns=yes
variable=nym_path
[/find_path]
[if]
[variable]
name=unit.id
not_equals=Nym
[/variable]
[and]
[variable]
name=nym_path.hexes
numerical_equals=0
[/variable]
[/and]
[then]
# Nym is blocked by deep water
[endlevel]
result=defeat
[/endlevel]
[return]
[/return]
[/then]
[/if]
[message]
speaker=$explorer.id
message= _ "Whats this? Someone has built an outpost at the end of the cave. Where are its occupants?"
@ -2489,11 +2524,40 @@
message= _ "Kaleh, I think you should come up and see this."
[/message]
[find_path]
[traveler]
id=Kaleh
[/traveler]
[destination]
x=$explorer.x
y=$explorer.y
[/destination]
allow_multiple_turns=yes
variable=kaleh_path
[/find_path]
[if]
[variable]
name=kaleh_path.hexes
numerical_equals=0
[/variable]
[then]
# Kaleh is blocked by deep water
[endlevel]
result=defeat
[/endlevel]
[return]
[/return]
[/then]
[/if]
{MOVE_UNIT (id=Kaleh) $x1 $y1}
[/then]
[/if]
{CLEAR_VARIABLE explorer}
{CLEAR_VARIABLE explorer,kaleh_path,nym_path}
[message]
speaker=Kaleh