UtBS: fixed scenario 8 drowning bug
This commit is contained in:
parent
922c5e0f8b
commit
93c6e78432
1 changed files with 125 additions and 17 deletions
|
@ -728,6 +728,13 @@ name=prestart
|
|||
name=humans_killed
|
||||
value=0
|
||||
[/set_variable]
|
||||
|
||||
# used to display alternate death message if the last of the 3 humans dies
|
||||
# from drowning instead of being killed by another unit
|
||||
[set_variable]
|
||||
name=human_drowned
|
||||
value=0
|
||||
[/set_variable]
|
||||
|
||||
[set_variable]
|
||||
name=entered_gate
|
||||
|
@ -1758,11 +1765,15 @@ add=1
|
|||
add=1
|
||||
[/set_variable]
|
||||
|
||||
#kill unit before displaying messages
|
||||
#kill human before displaying messages
|
||||
[kill]
|
||||
side=2
|
||||
animate=no
|
||||
[/kill]
|
||||
|
||||
# Vary dialogue depending on what kind of sea life the humans originally
|
||||
# mentioned. Also if last human died from drowning instead of being killed
|
||||
# have Kaleh as the question, instead of the victorious unit.
|
||||
|
||||
[if]
|
||||
[variable]
|
||||
|
@ -1771,12 +1782,32 @@ add=1
|
|||
[/variable]
|
||||
|
||||
[then]
|
||||
# humans saw an elf first and mentioned hermit crabs
|
||||
# case 1: humans saw an elf first and mentioned hermit crabs
|
||||
|
||||
[if]
|
||||
[variable]
|
||||
name=human_drowned
|
||||
numerical_equals=1
|
||||
[/variable]
|
||||
|
||||
[then]
|
||||
|
||||
[message]
|
||||
speaker=Kaleh
|
||||
message= _ "Fish bait? Hermit Crabs? Who are these humans and what were they talking about?"
|
||||
[/message]
|
||||
|
||||
[message]
|
||||
speaker=second_unit
|
||||
message= _ "Fish bait? Hermit Crabs? Who are these humans and what were they talking about?"
|
||||
[/message]
|
||||
[/then]
|
||||
|
||||
[else]
|
||||
|
||||
[message]
|
||||
speaker=second_unit
|
||||
message= _ "Fish bait? Hermit Crabs? Who are these humans and what were they talking about?"
|
||||
[/message]
|
||||
|
||||
[/else]
|
||||
[/if]
|
||||
|
||||
[/then]
|
||||
|
||||
|
@ -1790,21 +1821,63 @@ add=1
|
|||
[/variable]
|
||||
|
||||
[then]
|
||||
# humans saw troll ally first and mentioned barnacles
|
||||
[message]
|
||||
speaker=second_unit
|
||||
message= _ "Fish bait? Barnacles? Who are these humans and what were they talking about?"
|
||||
[/message]
|
||||
# case 2: humans saw troll ally first and mentioned barnacles
|
||||
|
||||
[if]
|
||||
[variable]
|
||||
name=human_drowned
|
||||
numerical_equals=1
|
||||
[/variable]
|
||||
|
||||
[then]
|
||||
|
||||
[message]
|
||||
speaker=Kaleh
|
||||
message= _ "Fish bait? Barnacles? Who are these humans and what were they talking about?"
|
||||
[/message]
|
||||
|
||||
[/then]
|
||||
|
||||
[else]
|
||||
|
||||
[message]
|
||||
speaker=second_unit
|
||||
message= _ "Fish bait? Barnacles? Who are these humans and what were they talking about?"
|
||||
[/message]
|
||||
|
||||
[/else]
|
||||
[/if]
|
||||
|
||||
[/then]
|
||||
|
||||
[else]
|
||||
# humans saw dwarf ally first and mentioned cuttlefish
|
||||
[message]
|
||||
speaker=second_unit
|
||||
message= _ "Fish bait? Cuttlefish? Who are these humans and what were they talking about?"
|
||||
[/message]
|
||||
|
||||
# case 3: humans saw dwarf ally first and mentioned cuttlefish
|
||||
|
||||
[if]
|
||||
[variable]
|
||||
name=human_drowned
|
||||
numerical_equals=1
|
||||
[/variable]
|
||||
|
||||
[then]
|
||||
|
||||
[message]
|
||||
speaker=Kaleh
|
||||
message= _ "Fish bait? Cuttlefish? Who are these humans and what were they talking about?"
|
||||
[/message]
|
||||
|
||||
[/then]
|
||||
|
||||
[else]
|
||||
|
||||
[message]
|
||||
speaker=second_unit
|
||||
message= _ "Fish bait? Cuttlefish? Who are these humans and what were they talking about?"
|
||||
[/message]
|
||||
|
||||
[/else]
|
||||
[/if]
|
||||
|
||||
[/else]
|
||||
[/if]
|
||||
|
||||
|
@ -6997,12 +7070,46 @@ first_time_only=no
|
|||
[/then]
|
||||
[/if]
|
||||
|
||||
# if it is a human that drowned, set the flag
|
||||
# flag is used for death event of 3 human spelunkers, to display
|
||||
# alternate death message if the last of them dies from drowning
|
||||
[store_locations]
|
||||
x,y=$water_x,$water_y
|
||||
[filter]
|
||||
side=2
|
||||
[/filter]
|
||||
variable=victim_side
|
||||
[/store_locations]
|
||||
|
||||
[if]
|
||||
[variable]
|
||||
name=victim_side.length
|
||||
numerical_equals=1
|
||||
[/variable]
|
||||
|
||||
[then]
|
||||
|
||||
[set_variable]
|
||||
name=human_drowned
|
||||
value=1
|
||||
[/set_variable]
|
||||
|
||||
[/then]
|
||||
[/if]
|
||||
|
||||
[kill]
|
||||
x,y=$water_x,$water_y
|
||||
animate=no
|
||||
fire_event=yes
|
||||
[/kill]
|
||||
|
||||
#clear the flag
|
||||
[set_variable]
|
||||
name=human_drowned
|
||||
value=0
|
||||
[/set_variable]
|
||||
|
||||
|
||||
[/then]
|
||||
|
||||
[/if]
|
||||
|
@ -7456,6 +7563,7 @@ animate=no
|
|||
|
||||
{CLEAR_VARIABLE type_of_sealife}
|
||||
{CLEAR_VARIABLE humans_killed}
|
||||
{CLEAR_VARIABLE human_drowned}
|
||||
{CLEAR_VARIABLE entered_training_hall}
|
||||
{CLEAR_VARIABLE broke_circle}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue