Author: rhuvaen
Date: Sun Nov 4 13:32:54 2007
New Revision: 21481
URL: http://svn.gna.org/viewcvs/wesnoth?rev=21481&view=rev
Log:
Added check to pass dialog for Dust Devil to Nym in scenarios 2-5.
Added:
trunk/data/campaigns/Under_the_Burning_Suns/utils/dialog-macros.cfg
Modified:
trunk/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg
trunk/data/campaigns/Under_the_Burning_Suns/scenarios/04_Descending_into_Darkness.cfg
trunk/data/campaigns/Under_the_Burning_Suns/scenarios/05_A_Subterranean_Struggle.cfg
Modified:
trunk/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg?rev=21481&r1=21480&r2=21481&view=diff
==============================================================================
---
trunk/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg
(original)
+++
trunk/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg
Sun Nov 4 13:32:54 2007
@@ -198,6 +198,7 @@
[/ai]
[/side]
[EMAIL PROTECTED]/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]
- [message]
- speaker=unit
+ {CHECK_EXPLORER}
+ [message]
+ 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]
- [message]
- speaker=unit
+ {CHECK_EXPLORER}
+ [message]
+ 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}
- [message]
- speaker=unit
+ {CHECK_EXPLORER}
+ [message]
+ 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]
Modified:
trunk/data/campaigns/Under_the_Burning_Suns/scenarios/04_Descending_into_Darkness.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Under_the_Burning_Suns/scenarios/04_Descending_into_Darkness.cfg?rev=21481&r1=21480&r2=21481&view=diff
==============================================================================
---
trunk/data/campaigns/Under_the_Burning_Suns/scenarios/04_Descending_into_Darkness.cfg
(original)
+++
trunk/data/campaigns/Under_the_Burning_Suns/scenarios/04_Descending_into_Darkness.cfg
Sun Nov 4 13:32:54 2007
@@ -261,6 +261,8 @@
[/target]
[/ai]
[/side]
+
[EMAIL PROTECTED]/Under_the_Burning_Suns/utils/dialog-macros.cfg}
# Prestart functions:
# set starting scenario objectives
@@ -992,10 +994,12 @@
value=$y1
[/set_variable]
- [message]
- speaker=second_unit
+ {CHECK_SPEAKER}
+ [message]
+ 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]
- [message]
- speaker=unit
+ {CHECK_EXPLORER}
+ [message]
+ 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]
- [message]
- speaker=unit
+ {CHECK_EXPLORER}
+ [message]
+ 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)
Modified:
trunk/data/campaigns/Under_the_Burning_Suns/scenarios/05_A_Subterranean_Struggle.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Under_the_Burning_Suns/scenarios/05_A_Subterranean_Struggle.cfg?rev=21481&r1=21480&r2=21481&view=diff
==============================================================================
---
trunk/data/campaigns/Under_the_Burning_Suns/scenarios/05_A_Subterranean_Struggle.cfg
(original)
+++
trunk/data/campaigns/Under_the_Burning_Suns/scenarios/05_A_Subterranean_Struggle.cfg
Sun Nov 4 13:32:54 2007
@@ -413,6 +413,8 @@
story= _ "What lurked in the darkness? Who were the unbelievers
that Eloh so cryptically referred to? My heart beat loudly in my chest,
everything seemed amplified down here. I had the strong suspicion that this was
not a place that my people were meant to be. I strode onwards grimly;
considering everything we had gone through so far, Uria be damned if I was
going to be frightened now."
[/part]
[/story]
+
[EMAIL PROTECTED]/Under_the_Burning_Suns/utils/dialog-macros.cfg}
# Prestart functions:
# set starting scenario objectives
@@ -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
Added: trunk/data/campaigns/Under_the_Burning_Suns/utils/dialog-macros.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Under_the_Burning_Suns/utils/dialog-macros.cfg?rev=21481&view=auto
==============================================================================
--- trunk/data/campaigns/Under_the_Burning_Suns/utils/dialog-macros.cfg (added)
+++ trunk/data/campaigns/Under_the_Burning_Suns/utils/dialog-macros.cfg Sun Nov
4 13:32:54 2007
@@ -1,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
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits