UtBS S08 Kromph and Dust Devil able to trigger Eloh's event (#6428)

(cherry picked from commit 3fad3f7cd9)
This commit is contained in:
Descacharrado 2022-01-16 23:44:44 +01:00 committed by Wedge009
parent bccf8c49f2
commit e537d91dd7
2 changed files with 94 additions and 6 deletions

View file

@ -2,6 +2,8 @@
### Add-ons client
### Add-ons server
### Campaigns
* Under the Burning Suns
* S08: Kromph and the Dust devil now trigger a critical event (issue #6211)
### Editor
### Multiplayer
### Lua API

View file

@ -3100,11 +3100,78 @@
x=25-50
y=19-31
side=1
[not]
type=Dust Devil,Flesh Golem
[/not]
[/filter]
# in case Kromph or the dust devil trigger the event the unit variable is set to track a different unit
[if]
[have_unit]
x,y=$x1,$y1
type=Dust Devil,Flesh Golem
[/have_unit]
[then]
# if the player only has Zhul and Kaleh, a new unit has to be recalled or respawned, else reassign. Nym should never be
# on the map when this is triggered but is being counted anyway to prevent future problems.
[role]
race=quenoth,elf
[not]
id=Zhul,Nym,Kaleh
[/not]
search_recall_list=no
role=talker
[else]
[if]
[have_unit]
search_recall_list=yes
x,y=recall,recall
level=1
race=elf,quenoth
[/have_unit]
[then]
[recall]
race=elf,quenoth
x,y=19,20
level=1
[/recall]
[role]
race=elf,quenoth
level=1
[not]
id=Zhul,Nym,Kaleh
[/not]
role=talker
[/role]
[/then]
[else]
{UNIT 1 (Quenoth Fighter) 19 20 (role=talker)}
[+unit]
passable=yes
[/unit]
[/else]
[/if]
[/else]
[/role]
# There will always be a talker role unit here, whether it has been recalled or "recruited"
[store_unit]
[filter]
role=talker
[/filter]
variable=talking_unit
[/store_unit]
{VARIABLE reassigned yes}
[/then]
[else]
# If the unit that triggers the event is not the Dust devil nor Flesh golem (e.g. any elf)
[store_unit]
[filter]
x,y=$x1,$y1
[/filter]
variable=talking_unit
[/store_unit]
{VARIABLE reassigned no}
[/else]
[/if]
[if]
[have_unit]
x,y=$x1,$y1
@ -3159,11 +3226,28 @@
x,y=12-23,15-20
side=1
race=quenoth,elf
[not]
id=$talking_unit.id
[/not]
message= _ "Can you see very far? Do you have any idea where we are?"
[/message]
[if]
[variable]
name=reassigned
equals=yes
[/variable]
[then]
[move_unit]
role=talker
to_x=24
to_y=22
[/move_unit]
[/then]
[/if]
[message]
speaker=unit
speaker=$talking_unit.id
message= _ "Weve come out on the side of a mountain, overlooking a large valley. The land seems to be much the same as the foothills south of the mountains. The valley is filled with sand dunes, though the center is flat. There seems to be some sort of settlement in the center of the valley. And far to the north I can see something sparkling on the horizon, but I dont know what it is."
[/message]
@ -3268,7 +3352,7 @@
[then]
[message]
speaker=unit
speaker=$talking_unit.id
message= _ "Kaleh, who are you talking to?"
[/message]
@ -3279,7 +3363,7 @@
[message]
speaker=Kaleh
message= _ "$unit.name|, be quiet, Ill explain it all later."
message= _ "$talking_unit.name, be quiet, Ill explain it all later."
[/message]
[/then]
@ -3634,6 +3718,8 @@
name=loyalists.ogg
immediate=yes
[/music]
# Clear unnecesary variables
{CLEAR_VARIABLE talking_unit,reassigned,2}
[/event]
# Event 16: Nym returns