mail[Wesnoth-commits] r20630 - /trunk/data/campaigns/Under_the_Burning_Suns/scenarios/03_Long_Night.cfg


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by ravanrooke on September 20, 2007 - 20:52:
Author: rhuvaen
Date: Thu Sep 20 20:52:22 2007
New Revision: 20630

URL: http://svn.gna.org/viewcvs/wesnoth?rev=20630&view=rev
Log:
Fixed the orcish ambush event, and the possession of Garak on the death of 
one of the undead leaders.

Modified:
    trunk/data/campaigns/Under_the_Burning_Suns/scenarios/03_Long_Night.cfg

Modified: 
trunk/data/campaigns/Under_the_Burning_Suns/scenarios/03_Long_Night.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Under_the_Burning_Suns/scenarios/03_Long_Night.cfg?rev=20630&r1=20629&r2=20630&view=diff
==============================================================================
--- trunk/data/campaigns/Under_the_Burning_Suns/scenarios/03_Long_Night.cfg 
(original)
+++ trunk/data/campaigns/Under_the_Burning_Suns/scenarios/03_Long_Night.cfg 
Thu Sep 20 20:52:22 2007
@@ -5,6 +5,7 @@
 # then killing the leader takes precedent over killing the champion, and
 # the leader who died is the one who takes his revenge.
 
+
 [scenario]
     #textdomain wesnoth-utbs
 
@@ -147,8 +148,8 @@
 
 #enddef
 
-    #dialogue for turn 12, when one undead leader possesses Garak
-#define GARAK_DIALOGUE
+    #dialogue when one undead leader possesses Garak
+#define GARAK_DIALOGUE_PART_ONE
 
     [message]
         description=Zhul
@@ -169,6 +170,10 @@
         description=Possessed Garak
         message= _ "Hahahaha! Your puny friend is no more. With his body I 
shall crush you all. Arise again my minions and feast in the slaughter!"
     [/message]
+    
+#enddef
+
+#define GARAK_DIALOGUE_PART_TWO
 
     [message]
         description=Nym
@@ -843,7 +848,7 @@
         [/set_variable]
 
         [set_variable]
-            name=Possessed_Garak
+            name=possessed_garak
             value=0
         [/set_variable]
 
@@ -1014,15 +1019,14 @@
     # HARD: 1 orcish ruler, 2 goblin pillagers, 2 orc crossbowman,
     #  2 orcish slayers, 2 orcish warriors
 
-    #changed to turn 7
     [event]
-        name = new turn
-        first_time_only = no
+        name=new turn
+        first_time_only="no"
 
         [if]
             [variable]
                 name=turn_number
-                numerical_equals=ambush_turn
+                numerical_equals=$ambush_turn
             [/variable]
 
             [then]
@@ -1170,71 +1174,83 @@
 
 #enddef
 
-    # When possessed garak is created, I need to check if he is standing
-    # on a elvish village. If he is then he captures and destroys it
-
-#define CHECK_HEX X Y SIDE
-
-    [store_locations]
-        x={X}
-        y={Y}
-        terrain=Dd^Vdt
-        find_in=elven_camp
-        variable=locs
-    [/store_locations]
-
-    [set_variable]
-        name=temp
-        value=$locs.length
-    [/set_variable]
-
-    [if]
-        [variable]
-            name=locs.length
-            equals=1
-        [/variable]
-
-        [then]
-            #turn village into sand, Dd is the letter for sand
-            [terrain]
-                x={X}
-                y={Y}
-                letter=Dd
-            [/terrain]
-
-            #NOTE: a walking dead is created from inhabitants of the
-            #elvish encampment
-
-            {UNIT_ (Walking Corpse) () ("") {SIDE} {X} {Y}}
-
-            [if]
-                [variable]
-                    name=village_counter
-                    equals=12
-                [/variable]
-
-                [then]
-                    [message]
-                        description=Nym
-                        message= _ "They're raising the corpses of our slain 
people! What a horrible fate!"
-                    [/message]
-
-                    [message]
-                        description=Elyssa
-                        message= _ "Then we shall have to give them a proper 
cremation."
-                    [/message]
-                [/then]
-            [/if]
-
-            # can ignore plundering gold, because this side
-            # just lost it's leader, so it can't recruit anymore
-
-            [set_variable]
-                name=village_counter
-                add=-1
-            [/set_variable]
-        [/then]
-    [/if]
+
+#define POSSESS_GARAK SIDE MINION
+# one undead side possesses Garak
+#
+  #store Garak's x,y location
+  [store_locations]
+    [filter]
+      description=Garak
+    [/filter]
+    variable=locs
+  [/store_locations]
+  
+  [store_unit]
+    [filter]
+      description=Garak
+    [/filter]
+    variable=ElvishGarak
+    kill=no
+  [/store_unit]
+  
+  # play some adequate sound
+  
+  [kill]
+    description=Garak
+    animate=yes
+    fire_event=no
+  [/kill]
+  
+  [kill]
+    side={SIDE}
+    canrecruit=1
+    animate=yes
+    fire_event=no
+  [/kill]
+  
+  {UNIT_ (Corrupted Elf) (Possessed Garak) ( _ "Possessed Garak") {SIDE} 
$locs[0].x $locs[0].y}
+  
+  [store_locations]
+    x=$locs[0].x
+    y=$locs[0].y
+    terrain=Dd^Vdt
+    find_in=elven_camp
+    variable=camps
+  [/store_locations]
+
+  [if]
+    [variable]
+      name=camps.length
+      equals=1
+    [/variable]
+
+    [then]
+      #turn village into sand, Dd is the letter for sand
+      [terrain]
+        x=$camps[0].x
+        y=$camps[0].y
+        letter=Dd
+      [/terrain]
+
+      {UNIT_ (Walking Corpse) () ("") {SIDE} $camps[0].x $camps[0].y}
+
+      {VARIABLE_OP village_counter add -1}
+
+    [/then]
+  [/if]
+  
+  {GARAK_DIALOGUE_PART_ONE}
+  
+  {CREATE_MINIONS ({MINIONS}) {SIDE} $locs[0].x $locs[0].y}
+  
+  {GARAK_DIALOGUE_PART_TWO}
+  
+  {CLEAR_VARIABLE camps}
+  
+  {CLEAR_VARIABLE locs}
+  
+  {SET_VARIABLE possessed_garak {SIDE}}
 
 #enddef
 
@@ -1269,58 +1285,11 @@
                     message= _ "No! This contest is not over yet, Azkotep. I 
shall show you a taste of my true power."
                 [/message]
 
-                [set_variable]
-                    name=Possessed_Garak
-                    value=3
-                [/set_variable]
-
                 #Ystara (zombie) dies, Garak dies, both without triggering
                 #death events, and Possessed Garak is created
 
-                #store Garak's x,y location
-                [store_locations]
-                    [filter]
-                        description=Garak
-                    [/filter]
-                    variable=locs
-                [/store_locations]
-
-                [set_variable]
-                    name=temp_x
-                    to_variable=locs[0].x
-                [/set_variable]
-
-                [set_variable]
-                    name=temp_y
-                    to_variable=locs[0].y
-                [/set_variable]
-
-                [store_unit]
-                    [filter]
-                        description=Garak
-                    [/filter]
-                    variable=ElvishGarak
-                [/store_unit]
-
-                [kill]
-                    description=Garak
-                    animate=yes
-                    fire_event=no
-                [/kill]
-
-                [kill]
-                    description=Ystara
-                    animate=yes
-                    fire_event=no
-                [/kill]
-
-                {UNIT_ (Corrupted Elf) (Possessed Garak) ( _ "Possessed 
Garak") 3 $temp_x $temp_y}
-
-                {CHECK_HEX $temp_x $temp_y 3}
-
-                {GARAK_DIALOGUE}
-
-                {CREATE_MINIONS (Soulless) 3 $temp_x $temp_y}
+                {POSSESS_GARAK 3 "Soulless"}
+                
             [/then]
         [/if]
 
@@ -1342,57 +1311,15 @@
                 [/message]
 
                 [set_variable]
-                    name=Possessed_Garak
+                    name=possessed_garak
                     value=2
                 [/set_variable]
 
                 #Azkotep (skele) dies, Garak dies, both without triggering
                 #death events, and Possessed Garak is created
-
-                #store Garak's x,y location
-                [store_locations]
-                    [filter]
-                        description=Garak
-                    [/filter]
-                    variable=locs
-                [/store_locations]
-
-                [set_variable]
-                    name=temp_x
-                    to_variable=locs[0].x
-                [/set_variable]
-
-                [set_variable]
-                    name=temp_y
-                    to_variable=locs[0].y
-                [/set_variable]
-
-                [store_unit]
-                    [filter]
-                        description=Garak
-                    [/filter]
-                    variable=ElvishGarak
-                [/store_unit]
-
-                [kill]
-                    description=Garak
-                    animate=yes
-                    fire_event=no
-                [/kill]
-
-                [kill]
-                    description=Azkotep
-                    animate=yes
-                    fire_event=no
-                [/kill]
-
-                {UNIT_ (Corrupted Elf) (Possessed Garak) ( _ "Possessed 
Garak") 2 $temp_x $temp_y}
-
-                {CHECK_HEX $temp_x $temp_y 2}
-
-                {GARAK_DIALOGUE}
-
-                {CREATE_MINIONS (Skeleton) 2 $temp_x $temp_y}
+                
+                {POSSESS_GARAK 2 "Skeleton"}
+
             [/then]
         [/if]
 
@@ -1416,55 +1343,8 @@
                     message= _ "No, I shall have my revenge. I shall show 
you that darkness is strongest just before dawn. I call upon the powers of 
disease and despair, grant me my vengeance!"
                 [/message]
 
-                [set_variable]
-                    name=Possessed_Garak
-                    value=3
-                [/set_variable]
-
-                #store Garak's x,y location
-                [store_locations]
-                    [filter]
-                        description=Garak
-                    [/filter]
-                    variable=locs
-                [/store_locations]
-
-                [set_variable]
-                    name=temp_x
-                    to_variable=locs[0].x
-                [/set_variable]
-
-                [set_variable]
-                    name=temp_y
-                    to_variable=locs[0].y
-                [/set_variable]
-
-                [store_unit]
-                    [filter]
-                        description=Garak
-                    [/filter]
-                    variable=ElvishGarak
-                [/store_unit]
-
-                [kill]
-                    description=Garak
-                    animate=yes
-                    fire_event=no
-                [/kill]
-
-                [kill]
-                    description=Ystara
-                    animate=yes
-                    fire_event=no
-                [/kill]
-
-                {UNIT_ (Corrupted Elf) (Possessed Garak) ( _ "Possessed 
Garak") 3 $temp_x $temp_y}
-
-                {CHECK_HEX $temp_x $temp_y 3}
-
-                {GARAK_DIALOGUE}
-
-                {CREATE_MINIONS (Soulless) 3 $temp_x $temp_y}
+                {POSSESS_GARAK 3 "Soulless"}
+
             [/then]
         [/if]
     [/event]
@@ -1558,7 +1438,7 @@
 
         [if]
             [variable]
-                name=Possessed_Garak
+                name=possessed_garak
                 equals=0
             [/variable]
 
@@ -1589,6 +1469,9 @@
                             name=revenge
                             value=3
                         [/set_variable]
+                        
+                        {POSSESS_GARAK 3 "Soulless"}
+                        
                     [/else]
                 [/if]
             [/then]
@@ -1638,7 +1521,7 @@
 
         [if]
             [variable]
-                name=Possessed_Garak
+                name=possessed_garak
                 equals=0
             [/variable]
 
@@ -1670,6 +1553,9 @@
                             name=revenge
                             value=2
                         [/set_variable]
+                        
+                        {POSSESS_GARAK 2 "Skeleton"}
+                        
                     [/else]
                 [/if]
             [/then]
@@ -1704,7 +1590,7 @@
         {CLEAR_VARIABLE village_counter}
         {CLEAR_VARIABLE revenge}
         {CLEAR_VARIABLE undead_leaders_killed}
-        {CLEAR_VARIABLE Possessed_Garak}
+        {CLEAR_VARIABLE possessed_garak}
         {CLEAR_VARIABLE ambush_turn}
 
         #temp variables




Related Messages


Powered by MHonArc, Updated Thu Sep 20 21:20:40 2007