mail[Wesnoth-commits] r20221 - /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 09, 2007 - 12:37:
Author: rhuvaen
Date: Sun Sep  9 12:36:35 2007
New Revision: 20221

URL: http://svn.gna.org/viewcvs/wesnoth?rev=20221&view=rev
Log:
Fixed the loss condition in A Long Night (bugs #9915 and #9947)

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=20221&r1=20220&r2=20221&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 
Sun Sep  9 12:36:35 2007
@@ -126,12 +126,12 @@
 #ifdef EASY
     [message]
         description=Kaleh
-        message= _ "There's no way we can marshal our people to escape the 
battle in time. We must protect our people's twelve encampments from the 
undead."
+        message= _ "There's no way we can marshal our people to escape the 
battle in time. We must protect our people's $village_counter encampments 
from the undead."
     [/message]
 #else
     [message]
         description=Kaleh
-        message= _ "There's no way we can marshal our people to escape the 
battle in time. We must protect our people's eleven encampments from the 
undead."
+        message= _ "There's no way we can marshal our people to escape the 
battle in time. We must protect our people's $village_counter encampments 
from the undead."
     [/message]
 #endif
 
@@ -749,6 +749,20 @@
             [/target]
         [/ai]
     [/side]
+    
+    # capture villages for side 1
+    # and store them for victory conditions / undead
+    # capture
+    #define SET_ELVEN_CAMP X Y
+      [capture_village]
+        side=1
+        x={X}
+        y={Y}
+      [/capture_village]
+      {VARIABLE elven_camp[$elven_camps].x {X}}
+      {VARIABLE elven_camp[$elven_camps].y {Y}}
+      {VARIABLE_OP elven_camps add 1} 
+    #enddef
 
     # Prestart functions:
     # set starting scenario objectives
@@ -841,11 +855,6 @@
             value=0
         [/set_variable]
 
-        [set_variable]
-            name=village_counter
-            value=12
-        [/set_variable]
-
 #ifdef EASY
         {RANDOM 7..9}
 #endif
@@ -868,54 +877,25 @@
         [/set_variable]
 
         # give player 12 villages to protect
-        [capture_village]
-            side=1
-            x,y=11,12
-        [/capture_village]
-        [capture_village]
-            side=1
-            x,y=16,10
-        [/capture_village]
-        [capture_village]
-            side=1
-            x,y=15,13
-        [/capture_village]
-        [capture_village]
-            side=1
-            x,y=19,12
-        [/capture_village]
-        [capture_village]
-            side=1
-            x,y=13,16
-        [/capture_village]
-        [capture_village]
-            side=1
-            x,y=21,14
-        [/capture_village]
-        [capture_village]
-            side=1
-            x,y=18,16
-        [/capture_village]
-        [capture_village]
-            side=1
-            x,y=10,19
-        [/capture_village]
-        [capture_village]
-            side=1
-            x,y=14,18
-        [/capture_village]
-        [capture_village]
-            side=1
-            x,y=19,18
-        [/capture_village]
-        [capture_village]
-            side=1
-            x,y=17,20
-        [/capture_village]
-        [capture_village]
-            side=1
-            x,y=13,22
-        [/capture_village]
+        {VARIABLE elven_camps 0}
+        {SET_ELVEN_CAMP 11 12}
+        {SET_ELVEN_CAMP 16 10}
+        {SET_ELVEN_CAMP 15 13}
+        {SET_ELVEN_CAMP 19 12}
+        {SET_ELVEN_CAMP 13 16}
+        {SET_ELVEN_CAMP 21 14}
+        {SET_ELVEN_CAMP 18 16}
+        {SET_ELVEN_CAMP 10 19}
+        {SET_ELVEN_CAMP 14 18}
+        {SET_ELVEN_CAMP 19 18}
+        {SET_ELVEN_CAMP 17 20}
+        {SET_ELVEN_CAMP 13 22}
+        
+        [set_variable]
+            name=village_counter
+            value=$elven_camps
+        [/set_variable]
+        
     [/event]
 
     #Time Areas correspond with halo around campfires
@@ -971,12 +951,6 @@
         #print dialogue messages
         {INTRO_DIALOGUE}
 
-        #[message]
-        #id=3_1_1
-        #speaker=narrator
-        #message= _ "You start with $village_counter villages"
-        #    image=wesnoth-icon.png
-        #[/message]
     [/event]
 
     # if deathblade Zur dies first then set variable revenge = 2
@@ -1208,6 +1182,7 @@
         x={X}
         y={Y}
         terrain=Dd^Vdt
+        find_in=elven_camp
         variable=locs
     [/store_locations]
 
@@ -1766,22 +1741,12 @@
             x=0-40
             y=0-30
             side=2,3
+            [filter_location]
+              find_in=elven_camp
+              terrain=Dd^Vdt
+            [/filter_location]
         [/filter]
 
-        [store_locations]
-            x=$x1
-            y=$y1
-            terrain=Dd^Vdt
-            variable=locs
-        [/store_locations]
-
-        [if]
-            [variable]
-                name=locs.length
-                equals=1
-            [/variable]
-
-            [then]
                 #turn village into sand, Dd is the letter for sand
                 [terrain]
                     x=$x1
@@ -1839,6 +1804,8 @@
                     name=village_counter
                     add=-1
                 [/set_variable]
+                
+                {CLEAR_VARIABLE locs}
 
                 [if]
                     [variable]
@@ -1857,8 +1824,6 @@
                         [/endlevel]
                     [/then]
                 [/if]
-            [/then]
-        [/if]
     [/event]
 
     #time over event




Related Messages


Powered by MHonArc, Updated Sun Sep 09 13:00:28 2007