Author: alarantalara
Date: Thu Apr  5 00:54:41 2012
New Revision: 53778

URL: http://svn.gna.org/viewcvs/wesnoth?rev=53778&view=rev
Log:
apply some variable cleanup from UtBS:Eftboren

Modified:
    
trunk/data/campaigns/Under_the_Burning_Suns/scenarios/01_The_Morning_After.cfg

Modified: 
trunk/data/campaigns/Under_the_Burning_Suns/scenarios/01_The_Morning_After.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Under_the_Burning_Suns/scenarios/01_The_Morning_After.cfg?rev=53778&r1=53777&r2=53778&view=diff
==============================================================================
--- 
trunk/data/campaigns/Under_the_Burning_Suns/scenarios/01_The_Morning_After.cfg 
(original)
+++ 
trunk/data/campaigns/Under_the_Burning_Suns/scenarios/01_The_Morning_After.cfg 
Thu Apr  5 00:54:41 2012
@@ -135,20 +135,18 @@
                 description= _ "Death of Garak"
                 condition=lose
                 [show_if]
-                    [variable]
-                        name=found_garak
-                        boolean_equals=yes
-                    [/variable]
+                    [have_unit]
+                        id=Garak
+                    [/have_unit]
                 [/show_if]
             [/objective]
             [objective]
                 description= _ "Death of Zhul"
                 condition=lose
                 [show_if]
-                    [variable]
-                        name=found_zhul
-                        boolean_equals=yes
-                    [/variable]
+                    [have_unit]
+                        id=Zhul
+                    [/have_unit]
                 [/show_if]
             [/objective]
 
@@ -564,12 +562,6 @@
             [/else]
         [/if]
 
-        # Record the fact that we have found Garak
-        [set_variable]
-            name=found_garak
-            value=yes
-        [/set_variable]
-
         # Summon objectives dialog
         [show_objectives]
         [/show_objectives]
@@ -584,23 +576,11 @@
         [/filter]
 
         [if]
-            [variable]
-                name=found_garak
-                boolean_equals=yes
-            [/variable]
-            [and]
-                [not]
-                    [have_unit]
-                        role="Rocky Horror"
-                    [/have_unit]
-                [/not]
-            [/and]
-            #             [and]
-            #                 [variable]
-            #                     name=garak_speech_happened
-            #                     boolean_equals=no
-            #                 [/variable]
-            #             [/and]
+            [not]
+                [have_unit]
+                    role="Rocky Horror"
+                [/have_unit]
+            [/not]
             [then]
                 [fire_event]
                     name=garak_speech
@@ -627,12 +607,6 @@
             speaker=Garak
             message= _ "Thanks for the help. I am glad to see that so many 
have survived the night. But there’s no time to talk, we must save the rest 
of our people and crush any other of these earthen abominations back into the 
earth."
         [/message]
-
-        # Record the fact that this event has happened
-        #         [set_variable]
-        #             name=garak_speech_happened
-        #             value=yes
-        #         [/set_variable]
     [/event]
 
     # The following three events are nested, because they are supposed to
@@ -716,12 +690,6 @@
                 message= _ "All things of this world come to an end, but the 
power of Eloh endures. A new one shall grow in its place. Come now, let us see 
to the needs of our people."
             [/message]
 
-            # Record the fact that we have found Zhul
-            [set_variable]
-                name=found_zhul
-                value=yes
-            [/set_variable]
-
             # Summon objectives dialog
             [show_objectives]
             [/show_objectives]
@@ -916,7 +884,7 @@
     # time. For example if the undead capture the village at 30,8 first, the
     # following container would be set:
     # [village_at_30_8]
-    #      captured_first_by=undead
+    #      captured_by=undead
     # [/village_at_30_8]
 
     [event]
@@ -970,15 +938,13 @@
 
                 [if]
                     [variable]
-                        name=village_at_$x1|_$y1|.captured_first_by
+                        name=village_at_$x1|_$y1|.captured_by
                         not_equals=undead
                     [/variable]
 
                     # if this village wasn't captured by undead first, the
                     # player has a chance of finding a random elf
                     [then]
-                        {VARIABLE village_at_$x1|_$y1|.captured_first_by elves}
-
                         {VARIABLE_OP fate rand "1..100"}
                         # And check if it's lower than a threshold of
                         # finding an unit that's dependent on diffficulty
@@ -1070,16 +1036,7 @@
             [/filter_location]
         [/filter]
 
-        [if]
-            [variable]
-                name=village_at_$x1|_$y1|.captured_first_by
-                not_equals=elves
-            [/variable]
-
-            [then]
-                {VARIABLE village_at_$x1|_$y1|.captured_first_by undead}
-            [/then]
-        [/if]
+        {VARIABLE village_at_$x1|_$y1|.captured_by undead}
     [/event]
 
     [event]
@@ -1237,11 +1194,6 @@
                 [/have_unit]
             [/not]
             [then]
-                [modify_side]
-                    side=3
-                    gold=100
-                [/modify_side]
-
                 [fire_event]
                     name=xanthos_appearance
                 [/fire_event]
@@ -1481,14 +1433,6 @@
         {CLEAR_VARIABLE seen_mudcrawler}
         {CLEAR_VARIABLE rescued_elves}
         {CLEAR_VARIABLE seen_naru}
-
-        [clear_variable]
-            name=found_garak
-        [/clear_variable]
-
-        [clear_variable]
-            name=found_zhul
-        [/clear_variable]
     [/event]
 
     [event]


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to