No need for fancy placement to avoid having Nym placed in cave walls anymore.
This commit is contained in:
parent
2d0721870a
commit
9f33f0e802
1 changed files with 12 additions and 58 deletions
|
@ -3746,72 +3746,26 @@
|
|||
# Next turn after big Eloh/Durstrag conversation, Nym returns and
|
||||
# tells Kaleh that Durstrag plans to send for reinforcements
|
||||
|
||||
# Since last turn Kaleh got teleported to (18,19) he can't have moved
|
||||
# very far. If Kaleh is on player’s keep hex (which is probable) then
|
||||
# teleport Nym right next to him. If he's in northern part of entrance cave
|
||||
# put her in center of cave. Else assume he's at edge of southern cave and
|
||||
# put her near him. I could just teleport Nym directly onto Kaleh's
|
||||
# location, but this often makes her appear in a cave wall.
|
||||
|
||||
[event]
|
||||
name=nym_return
|
||||
|
||||
[store_unit]
|
||||
[filter]
|
||||
id=Kaleh
|
||||
[/filter]
|
||||
variable=kaleh_location
|
||||
kill=no
|
||||
[/store_unit]
|
||||
|
||||
[unstore_unit]
|
||||
variable=Nymstats
|
||||
find_vacant=yes
|
||||
check_passability=yes
|
||||
x=$kaleh_location.x
|
||||
y=$kaleh_location.y
|
||||
[/unstore_unit]
|
||||
|
||||
{CLEAR_VARIABLE Nymstats}
|
||||
|
||||
# if Kaleh is on keep hex (18,19) teleport Nym next to him
|
||||
|
||||
[if]
|
||||
[have_unit]
|
||||
id=Kaleh
|
||||
x,y=18,19
|
||||
[/have_unit]
|
||||
|
||||
[then]
|
||||
[teleport]
|
||||
[filter]
|
||||
id=Nym
|
||||
[/filter]
|
||||
x,y=19,19
|
||||
[/teleport]
|
||||
[/then]
|
||||
|
||||
[else]
|
||||
# if Kaleh is elsewhere in northern part of entrance caves,
|
||||
# then put Nym on 21,20 (roughly center of entrance cave)
|
||||
|
||||
[if]
|
||||
[have_unit]
|
||||
id=Kaleh
|
||||
x,y=13-24,16-20
|
||||
[/have_unit]
|
||||
[then]
|
||||
[teleport]
|
||||
[filter]
|
||||
id=Nym
|
||||
[/filter]
|
||||
x,y=21,20
|
||||
[/teleport]
|
||||
[/then]
|
||||
|
||||
[else]
|
||||
# else Kaleh must be at edge of entrance cave,
|
||||
# so put Nym at 21,21
|
||||
|
||||
[teleport]
|
||||
[filter]
|
||||
id=Nym
|
||||
[/filter]
|
||||
x,y=21,21
|
||||
[/teleport]
|
||||
[/else]
|
||||
[/if]
|
||||
[/else]
|
||||
[/if]
|
||||
{CLEAR_VARIABLE Nymstats,kaleh_location}
|
||||
|
||||
[message]
|
||||
speaker=Nym
|
||||
|
|
Loading…
Add table
Reference in a new issue