Author: zookeeper
Date: Sat Jun 28 19:14:32 2008
New Revision: 27560

URL: http://svn.gna.org/viewcvs/wesnoth?rev=27560&view=rev
Log:
Cleaned up Black Flag WML and made the transport galleon landing more random.

Modified:
    trunk/data/campaigns/Son_Of_The_Black_Eye/scenarios/06_Black_Flag.cfg

Modified: trunk/data/campaigns/Son_Of_The_Black_Eye/scenarios/06_Black_Flag.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Son_Of_The_Black_Eye/scenarios/06_Black_Flag.cfg?rev=27560&r1=27559&r2=27560&view=diff
==============================================================================
--- trunk/data/campaigns/Son_Of_The_Black_Eye/scenarios/06_Black_Flag.cfg 
(original)
+++ trunk/data/campaigns/Son_Of_The_Black_Eye/scenarios/06_Black_Flag.cfg Sat 
Jun 28 19:14:32 2008
@@ -89,17 +89,17 @@
     [/side]
 
     [side]
-        type=Transport Galleon
-        id=Transport Galleon
-        name=_ "Transport Galleon"
         side=3
         no_leader=yes
         team_name=Humans
         user_team_name=_"Humans"
-        [ai]
-            aggression=1.0
-        [/ai]
-        gold=0
+        colour=blue
+        [unit]
+            x,y=1,30
+            side=3
+            id="Transport Galleon"
+            type=Transport Galleon
+        [/unit]
     [/side]
 
     [side]
@@ -107,6 +107,7 @@
         id=Harman
         name= _ "Harman"
         side=4
+        colour=green
         team_name=Humans
         user_team_name=_"Humans"
         canrecruit=yes
@@ -122,12 +123,19 @@
     [/side]
 
     [side]
-        type=Orcish Warrior
-        id=Affman
         side=5
+        colour=purple
         team_name=Kapoue
         user_team_name=_ "Kapou'e"
         no_leader=yes
+
+        [unit]
+            type=Orcish Warrior
+            id=Affman
+            name= _ "Affman"
+            x,y=27,20
+            random_traits=yes
+        [/unit]
     [/side]
 
     [story]
@@ -149,18 +157,6 @@
     [event]
         name=prestart
 
-        [teleport]
-            [filter]
-                id="Kapou'e"
-            [/filter]
-            x=25
-            y=1
-        [/teleport]
-    [/event]
-
-    [event]
-        name=start
-
         {GRUNT_DEFENDER 16 12}
         {ARCHER_DEFENDER 17 12}
         {GRUNT_DEFENDER 20 9}
@@ -168,15 +164,28 @@
         {GRUNT_DEFENDER 32 23}
         {ARCHER_DEFENDER 31 25}
 
-        [unit]
-            type=Orcish Warrior
-            side=5
-            id=Affman
-            x=27
-            y=20
-            random_traits=yes
-            name= _ "Affman"
-        [/unit]
+        {WATCH_TOWER 21 14 Northern_Tower}
+        {WATCH_TOWER 12 19 Western_Tower}
+        {WATCH_TOWER 20 21 Eastern_Tower}
+        {PIRATE_GALLEON 12 28}
+        {PIRATE_GALLEON 3 22}
+        {PIRATE_GALLEON 10 26}
+        {PIRATE_GALLEON 6 25}
+
+        [unit]
+            side=2
+            id=Lander
+            id="Landing Galleon"
+            name= _ "Landing Galleon"
+            type=Transport Galleon
+            ai_special=guardian
+            x=7
+            y=9
+        [/unit]
+    [/event]
+
+    [event]
+        name=start
 
         [recall]
             id=Pirk
@@ -196,43 +205,8 @@
 
         [recall]
             id=Grüü
+            x,y=25,2
         [/recall]
-
-        [teleport]
-            [filter]
-                id=Grüü
-            [/filter]
-            x=25
-            y=2
-        [/teleport]
-        {WATCH_TOWER 21 14 Northern_Tower}
-        {WATCH_TOWER 12 19 Western_Tower}
-        {WATCH_TOWER 20 21 Eastern_Tower}
-        {PIRATE_GALLEON 12 28}
-        {PIRATE_GALLEON 3 22}
-        {PIRATE_GALLEON 10 26}
-        {PIRATE_GALLEON 6 25}
-        [unit]
-            side=3
-            id=Transport
-            id="Transport Galleon"
-            name= _ "Transport Galleon"
-            type=Transport Galleon
-            name= _ "Transport"
-            ai_special=guardian
-            x=2
-            y=28
-        [/unit]
-        [unit]
-            side=2
-            id=Lander
-            id="Landing Galleon"
-            name= _ "Landing Galleon"
-            type=Transport Galleon
-            ai_special=guardian
-            x=7
-            y=9
-        [/unit]
 
         [message]
             speaker="Kapou'e"
@@ -242,7 +216,6 @@
             speaker="Pirk"
             message= _ "Looks like humans have attacked here too. You were 
right, Kapou'e, the humans have declared all-out war on us."
         [/message]
-
         [message]
             speaker="Kapou'e"
             message= _ "Listen, if we are going to meet with the rest of the 
Great Council, we have to repel this attack. You shamans hide here in the 
forest until we defeat them. It will be faster and easier for us if we don't 
have to worry about protecting you."
@@ -280,7 +253,6 @@
 
     [event]
         name=turn 2
-        {MOVE_TRANSPORT_GALEON 2 28 9 30 3,4,5,6,7,8,9 28,28,28,28,29,29,30}
 
         [message]
             speaker=Affman
@@ -321,6 +293,7 @@
             speaker="Kapou'e"
             message= _ "Wise decision. We have actually come to speak to the 
shamans, but while we are here we must help our brothers in need. Grüü, help 
hold them while I run to the keep and organize our forces to counterattack. We 
can't defeat them by sea without naval forces, but we can destroy the foothold 
they have gained on the land."
         [/message]
+
         [message]
             speaker="Grüü"
             message= _ "I love this strategy, Chief!"
@@ -328,83 +301,179 @@
     [/event]
 
     [event]
-        name=turn 3
-        {MOVE_TRANSPORT_GALEON 9 30 15 30 10,11,12,13,14,15 30,30,30,30,30,30}
-    [/event]
-
-    [event]
         name=turn 4
-        {MOVE_TRANSPORT_GALEON 15 30 20 30 16,17,18,19,20 30,30,30,30,30}
-    [/event]
-
-    [event]
-        name=turn 5
-        {MOVE_TRANSPORT_GALEON 20 30 25 30 20,21,22,23,24,25 30,30,30,30,30,30}
-    [/event]
-
-    [event]
-        name=turn 6
-        {MOVE_TRANSPORT_GALEON 25 30 27 25 26,27,27,27,27,27 29,29,28,27,26,25}
+
+        # add a warning about the transport galleon and the landing party here
+        #[message]
+        #    speaker="Grüü"
+        #    message= _ ""
+        #[/message]
+    [/event]
+
+    # this event makes the transport galleon try to sail to the sandy coastline
+    # near the orcish castle to unload the attackers
+
+    [event]
+        name=turn refresh
+        first_time_only=no
+
+        [if]
+            [variable]
+                name=side_number
+                equals=3
+            [/variable]
+
+            [then]
+                [store_unit]
+                    [filter]
+                        id=Transport Galleon
+                    [/filter]
+
+                    kill=yes
+                    variable=stored_transport
+                [/store_unit]
+
+                [if]
+                    [variable]
+                        name=landing_spot_picked
+                        equals=yes
+                    [/variable]
+
+                    [variable]
+                        name=transport_landed
+                        not_equals=yes
+                    [/variable]
+
+                    [then]
+                        {VARIABLE stored_transport.goto_x 
$transport_destination_x}
+                        {VARIABLE stored_transport.goto_y 
$transport_destination_y}
+
+                        [unstore_unit]
+                            variable=stored_transport
+                        [/unstore_unit]
+                    [/then]
+
+                    [else]
+                        {VARIABLE stored_transport.goto_x 25}
+                        {VARIABLE stored_transport.goto_y 27}
+
+                        [unstore_unit]
+                            variable=stored_transport
+                        [/unstore_unit]
+                    [/else]
+                [/if]
+
+                {CLEAR_VARIABLE stored_transport}
+            [/then]
+        [/if]
+    [/event]
+
+    [event]
+        name=moveto
+
+        [filter]
+            id=Transport Galleon
+            x,y=25,27
+        [/filter]
+
+        [store_locations]
+            x=21-30
+            y=23-29
+            terrain=Ww
+
+            [filter_adjacent_location]
+                terrain=Ds
+            [/filter_adjacent_location]
+
+            [not]
+                [filter]
+                [/filter]
+            [/not]
+
+            variable=possible_transport_destinations
+        [/store_locations]
+
+        {VARIABLE_OP transport_destination_index random 
"1..$possible_transport_destinations.length"}
+        {VARIABLE_OP transport_destination_index add -1}
+
+        {VARIABLE transport_destination_x 
$possible_transport_destinations[$transport_destination_index].x}
+        {VARIABLE transport_destination_y 
$possible_transport_destinations[$transport_destination_index].y}
+
+        {VARIABLE landing_spot_picked yes}
+
+        {CLEAR_VARIABLE 
possible_transport_destinations,transport_destination_index}
+    [/event]
+
+    [event]
+        name=moveto
+
+        [filter]
+            id=Transport Galleon
+
+            [filter_location]
+                terrain=Ww
+
+                [filter_adjacent_location]
+                    terrain=Ds
+                [/filter_adjacent_location]
+            [/filter_location]
+        [/filter]
+
+        {VARIABLE transport_landed yes}
+        {CLEAR_VARIABLE transport_destination}
 
         [unit]
             id="J'rem"
             type=Fencer
-            x=26
-            y=24
+            x,y=$x1,$y1
             side=3
             name= _ "J'rem"
             random_traits=yes
         [/unit]
         [unit]
             type=Fencer
-            x=27
-            y=24
+            x,y=$x1,$y1
             side=3
             generate_name=yes
             random_traits=yes
         [/unit]
         [unit]
             type=Swordsman
-            x=26
-            y=25
+            x,y=$x1,$y1
             side=3
             generate_name=yes
             random_traits=yes
         [/unit]
         [unit]
             type=Mage
-            x=28
-            y=24
+            x,y=$x1,$y1
             side=3
             generate_name=yes
             random_traits=yes
         [/unit]
         [unit]
             type=Cavalryman
-            x=28
-            y=25
+            x,y=$x1,$y1
             side=3
             generate_name=yes
             random_traits=yes
         [/unit]
         [unit]
             type=Cavalryman
-            x=28
-            y=25
+            x,y=$x1,$y1
             side=3
             generate_name=yes
             random_traits=yes
         [/unit]
         [unit]
             type=Cavalryman
-            x=28
-            y=25
+            x,y=$x1,$y1
             side=3
             generate_name=yes
             random_traits=yes
         [/unit]
         [message]
-            speaker="J'rem"
+            id="J'rem"
             message= _ "Pillage! Let's plunder these orcs!"
         [/message]
     [/event]


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

Reply via email to