TRoW S19: Automatically collect chest at the end of the scenario (#6192)
This commit is contained in:
parent
3a312f3703
commit
1b905240af
1 changed files with 44 additions and 3 deletions
|
@ -162,6 +162,7 @@
|
|||
|
||||
{VARIABLE xx1 $possible_chest_locs[$random].x}
|
||||
{VARIABLE yy1 $possible_chest_locs[$random].y}
|
||||
{VARIABLE chest_obtained no}
|
||||
|
||||
{CLEAR_VARIABLE possible_chest_locs,random}
|
||||
|
||||
|
@ -310,16 +311,31 @@
|
|||
x=$xx1
|
||||
y=$yy1
|
||||
[/filter]
|
||||
[fire_event]
|
||||
name=get chest
|
||||
[/fire_event]
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=get chest
|
||||
|
||||
[sound]
|
||||
name=open-chest.wav
|
||||
[/sound]
|
||||
|
||||
[store_unit]
|
||||
[filter]
|
||||
x,y=$xx1,$yy1
|
||||
side=1
|
||||
[/filter]
|
||||
variable=chest_unit_temp
|
||||
[/store_unit]
|
||||
[message]
|
||||
speaker=unit
|
||||
speaker=$chest_unit_temp.id
|
||||
message= _ "I’ve found the orcs’ chest! It’s filled with gold."
|
||||
[/message]
|
||||
|
||||
{CLEAR_VARIABLE chest_unit_temp}
|
||||
|
||||
[remove_item]
|
||||
x,y=$x1,$y1
|
||||
[/remove_item]
|
||||
|
@ -327,6 +343,10 @@
|
|||
{PLACE_IMAGE (items/chest-plain-open.png) $xx1 $yy1}
|
||||
|
||||
{LOOT {ON_DIFFICULTY 125 100 75} 1}
|
||||
[set_variable]
|
||||
name=chest_obtained
|
||||
value=yes
|
||||
[/set_variable]
|
||||
[/event]
|
||||
|
||||
# When an enemy side has less than half of its units left, some undead
|
||||
|
@ -639,7 +659,6 @@
|
|||
[/message]
|
||||
|
||||
{CLEAR_VARIABLE side_2_undead_backup_triggered,side_3_undead_backup_triggered,side_4_undead_backup_triggered,undead_spawns_so_far}
|
||||
{CLEAR_VARIABLE xx1,yy1}
|
||||
|
||||
[endlevel]
|
||||
result=victory
|
||||
|
@ -675,4 +694,26 @@
|
|||
message= _ "Ahh, it’s great to be home! I’m not much for the politics, but it’s great to be home!"
|
||||
[/message]
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=victory
|
||||
|
||||
[if]
|
||||
[variable]
|
||||
name=chest_obtained
|
||||
equals=no
|
||||
[/variable]
|
||||
[then]
|
||||
[message]
|
||||
speaker=Prince Haldric
|
||||
message= _ "Grab the troll’s gold and get moving!"
|
||||
[/message]
|
||||
[fire_event]
|
||||
name=get chest
|
||||
[/fire_event]
|
||||
[/then]
|
||||
[/if]
|
||||
|
||||
{CLEAR_VARIABLE xx1,yy1,chest_obtained}
|
||||
[/event]
|
||||
[/scenario]
|
||||
|
|
Loading…
Add table
Reference in a new issue