Added check to pass dialog for Dust Devil to Nym in scenarios 2-5.

This commit is contained in:
Jan Rietema 2007-11-04 12:32:54 +00:00
parent fdb4f553aa
commit 26ef18974e
4 changed files with 113 additions and 21 deletions

View file

@ -198,6 +198,7 @@
[/ai]
[/side]
{@campaigns/Under_the_Burning_Suns/utils/dialog-macros.cfg}
# prestart events:
# Set starting scenario objectives
@ -1480,10 +1481,12 @@
[/then]
[else]
[message]
speaker=second_unit
message= _ "The undead are defeated, but we lost her in the fight as well. Darn, if only we could have saved her."
[/message]
{CHECK_SPEAKER}
[message]
description=$speaking_unit.description
message= _ "The undead are defeated, but we lost her in the fight as well. Darn, if only we could have saved her."
[/message]
{CLEAR_VARIABLE speaking_unit}
[/else]
[/if]
[/else]
@ -1585,11 +1588,13 @@
[sound]
name=gold.ogg
[/sound]
{CHECK_SPEAKER}
[message]
speaker=second_unit
description=$speaking_unit.description
message= _ "Searching his castle, we found a chest filled with gold."
[/message]
{CLEAR_VARIABLE speaking_unit}
[gold]
#ifdef EASY
@ -1712,8 +1717,9 @@
image=scenery/signpost.png
[/message]
{CHECK_EXPLORER}
[message]
speaker=unit
description=$explorer.description
message= _ "Bandits. If they get in our way, they're going to be sorry."
[/message]
@ -1723,9 +1729,10 @@
[/message]
[message]
speaker=unit
description=$explorer.description
message= _ "Did you see that? I think I just saw someone disappear behind that dune over there. I think we're being watched. I suspect there are more of these bandits lurking in these dunes than we originally thought."
[/message]
{CLEAR_VARIABLE explorer}
[objectives]
summary= _ "New Objectives:"
@ -1818,10 +1825,12 @@
y=14,15,15,16,17,15,16
[/terrain]
{CHECK_EXPLORER}
[message]
speaker=unit
description=$explorer.description
message= _ "Dang. I was sure I saw an oasis here. Must have been a mirage. I've been out in the sand for too long."
[/message]
{CLEAR_VARIABLE explorer}
[/event]
@ -1841,10 +1850,12 @@
{CLEAR_FOG 1 21 8 3}
{CHECK_EXPLORER}
[message]
speaker=unit
description=$explorer.description
message= _ "So, the outlaws have made a base around Pinnacle Rock. It's a good location, but we will drive them from it all the same."
[/message]
{CLEAR_VARIABLE explorer}
{UNCLEAR_FOG}
@ -2351,10 +2362,13 @@
# pick one random ghost_spawn from which
# to store all locations in range
{RANDOM 1..$ghost_spawn.length}
{VARIABLE ghost_x $ghost_spawn[$random].x}
{VARIABLE ghost_y $ghost_spawn[$random].y}
{CLEAR_VARIABLE ghost_spawn}
[store_locations]
variable=spawn
x=$ghost_spawn[$random].x
y=$ghost_spawn[$random].y
x=$ghost_x
y=$ghost_y
radius=8
terrain=Hd, Dd, Rr
[/store_locations]
@ -2388,7 +2402,7 @@
{ADD i 1}
[/do]
[/while]
{CLEAR_VARIABLE ghost_spawn}
{CLEAR_VARIABLE spawn}
# some ghosts dialogue
[if]
[variable]

View file

@ -262,6 +262,8 @@
[/ai]
[/side]
{@campaigns/Under_the_Burning_Suns/utils/dialog-macros.cfg}
# Prestart functions:
# set starting scenario objectives
# increase cost of recruiting units
@ -992,10 +994,12 @@
value=$y1
[/set_variable]
{CHECK_SPEAKER}
[message]
speaker=second_unit
description=$speaking_unit.description
message= _ "Wait a minute. He was wearing a silver ring on one of his fingers. I think the ring might be magical. Maybe that's why he was moving so fast."
[/message]
{CLEAR_VARIABLE speaking_unit}
[message]
speaker=Nym
@ -1112,6 +1116,9 @@
x=$ring_x
y=$ring_y
side=1
[not]
type=Dust Devil
[/not]
[/filter]
[object]
@ -1152,10 +1159,12 @@
value=1
[/set_variable]
{CHECK_EXPLORER}
[message]
speaker=unit
description=$explorer.description
message= _ "Ugh! These tunnels are pitch black! It's as bad as fighting in a moonless night, and it stinks of orc filth. I can hardly think of a place I would less like to go into."
[/message]
{CLEAR_VARIABLE explorer}
[message]
speaker=Kaleh
@ -1254,10 +1263,12 @@
name=gold.ogg
[/sound]
{CHECK_EXPLORER}
[message]
speaker=unit
description=$explorer.description
message= _ "Looks like he's been squirreling away his stolen loot in this cave. Not that he had much. Must be hard times."
[/message]
{CLEAR_VARIABLE explorer}
#ifdef EASY
[gold]
@ -1291,6 +1302,9 @@
x=12
y=16
side=1
[not]
type=Dust Devil
[/not]
[/filter]
[if]
@ -1386,10 +1400,12 @@
[allow_undo]
[/allow_undo]
{CHECK_EXPLORER}
[message]
speaker=unit
description=$explorer.description
message= _ "This is the end of the line. The water is too deep for me to continue any further. I'm freezing cold, wet, and I can't see a thing. I'm not exactly sure what I'm doing up here. Some strange influence made me want to come up here, but I don't know what made me think it could be of any good."
[/message]
{CLEAR_VARIABLE explorer}
[/event]
# Event 8: Enter the Assassin/Cloaked Figure (same guy, two names)

View file

@ -414,6 +414,8 @@
[/part]
[/story]
{@campaigns/Under_the_Burning_Suns/utils/dialog-macros.cfg}
# Prestart functions:
# set starting scenario objectives
# increase cost of recruiting units
@ -1344,9 +1346,10 @@
[/remove_shroud]
#dwarf/troll/elf dialogue
{CHECK_EXPLORER}
[message]
speaker=unit
description=$explorer.description
message= _ "Woah."
[/message]
@ -1480,7 +1483,7 @@
#set ally variable (1=dwarf 2=troll) and change elvish allegiance
[message]
speaker=unit
description=$explorer.description
message= _ "But they both look evenly matched. Who should we ally with?"
[option]
@ -1575,9 +1578,10 @@
[/music]
[message]
speaker=unit
description=$explorer.description
message= _ "There seems to be an abandoned Dwarvish fortress right in front of us. If we can fight our way to the keep, we should be able to start rallying our warriors to help in the battle."
[/message]
{CLEAR_VARIABLE explorer}
#add enemy units in tunnels who will arrive in main cavern at turn 2

View file

@ -0,0 +1,58 @@
# check to see if the Dust Devil is the unit
# triggering the event, and if it is, use Nym
# as the speaker
#define CHECK_EXPLORER
[if]
[variable]
name=unit.type
equals=Dust Devil
[/variable]
[then]
[store_unit]
variable=explorer
kill=no
[filter]
description=Nym
[/filter]
[/store_unit]
[/then]
[else]
[store_unit]
variable=explorer
kill=no
[filter]
x=$unit.x
y=$unit.y
[/filter]
[/store_unit]
[/else]
[/if]
#enddef
# for second_unit
#define CHECK_SPEAKER
[if]
[variable]
name=second_unit.type
equals=Dust Devil
[/variable]
[then]
[store_unit]
variable=speaking_unit
kill=no
[filter]
description=Nym
[/filter]
[/store_unit]
[/then]
[else]
[store_unit]
variable=speaking_unit
kill=no
[filter]
x=$unit.x
y=$unit.y
[/filter]
[/store_unit]
[/else]
[/if]
#enddef