Author: cycholka
Date: Sun Mar 23 08:02:50 2008
New Revision: 25006

URL: http://svn.gna.org/viewcvs/wesnoth?rev=25006&view=rev
Log:
The Great NR WML cleanup project (yes, I have not forgotten :P )
*Make white mages respawn within a radius of each other
*Phase out SUPPORTER macro in favor of a die event, army of Supporters might 
sound cool but this was just an outcome of a crude WML workaround
*Introduce the result of above to first five scenarios

Modified:
    trunk/data/campaigns/Northern_Rebirth/scenarios/01_Breaking_the_Chains.cfg
    trunk/data/campaigns/Northern_Rebirth/scenarios/02_Infested_Caves.cfg
    trunk/data/campaigns/Northern_Rebirth/scenarios/03_To_The_Mines.cfg
    trunk/data/campaigns/Northern_Rebirth/scenarios/04_Clearing_the_Mines.cfg
    
trunk/data/campaigns/Northern_Rebirth/scenarios/05a_The_Pursuit_files/start_sequence.cfg
    trunk/data/campaigns/Northern_Rebirth/utils/herodeaths.cfg

Modified: 
trunk/data/campaigns/Northern_Rebirth/scenarios/01_Breaking_the_Chains.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Northern_Rebirth/scenarios/01_Breaking_the_Chains.cfg?rev=25006&r1=25005&r2=25006&view=diff
==============================================================================
--- trunk/data/campaigns/Northern_Rebirth/scenarios/01_Breaking_the_Chains.cfg 
(original)
+++ trunk/data/campaigns/Northern_Rebirth/scenarios/01_Breaking_the_Chains.cfg 
Sun Mar 23 08:02:50 2008
@@ -156,8 +156,18 @@
                 {TRAIT_LOYAL}
                 {TRAIT_RESILIENT}
             [/modifications]
+                       [variables]
+                               role=Supporter
+                       [/variables]
         [/unit]
-
+               [role]
+                       [wml_filter]
+                               [variables]
+                                       role=Supporter
+                               [/variables]
+                       [/wml_filter]
+                       role=Supporter
+               [/role]     
         [message]
             speaker=Tallin
             message= _ "The orcs have gotten careless - look how easily I 
stole these weapons and this bright gold from them. Now they're killing each 
other. This might be the only chance we got to get rid of this scum once and 
for all. Let's give it to 'em!"

Modified: trunk/data/campaigns/Northern_Rebirth/scenarios/02_Infested_Caves.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Northern_Rebirth/scenarios/02_Infested_Caves.cfg?rev=25006&r1=25005&r2=25006&view=diff
==============================================================================
--- trunk/data/campaigns/Northern_Rebirth/scenarios/02_Infested_Caves.cfg 
(original)
+++ trunk/data/campaigns/Northern_Rebirth/scenarios/02_Infested_Caves.cfg Sun 
Mar 23 08:02:50 2008
@@ -142,7 +142,14 @@
 
         # SUPPORTER is a special macro defined in campaign /utils it chooses 
an unit from peasant advancement tree and sets
         # him an supporter role.
-        
+               [role]
+                       [wml_filter]
+                               [variables]
+                                       role=Supporter
+                               [/variables]
+                       [/wml_filter]
+                       role=Supporter
+               [/role]        
         [recall]
             role=Supporter
         [/recall]

Modified: trunk/data/campaigns/Northern_Rebirth/scenarios/03_To_The_Mines.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Northern_Rebirth/scenarios/03_To_The_Mines.cfg?rev=25006&r1=25005&r2=25006&view=diff
==============================================================================
--- trunk/data/campaigns/Northern_Rebirth/scenarios/03_To_The_Mines.cfg 
(original)
+++ trunk/data/campaigns/Northern_Rebirth/scenarios/03_To_The_Mines.cfg Sun Mar 
23 08:02:50 2008
@@ -108,7 +108,14 @@
         name=start
         {PLACE_IMAGE scenery/dwarven-doors-closed.png 18 3}
 
-        
+               [role]
+                       [wml_filter]
+                               [variables]
+                                       role=Supporter
+                               [/variables]
+                       [/wml_filter]
+                       role=Supporter
+               [/role]     
         [recall]
             role=Supporter
         [/recall]

Modified: 
trunk/data/campaigns/Northern_Rebirth/scenarios/04_Clearing_the_Mines.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Northern_Rebirth/scenarios/04_Clearing_the_Mines.cfg?rev=25006&r1=25005&r2=25006&view=diff
==============================================================================
--- trunk/data/campaigns/Northern_Rebirth/scenarios/04_Clearing_the_Mines.cfg 
(original)
+++ trunk/data/campaigns/Northern_Rebirth/scenarios/04_Clearing_the_Mines.cfg 
Sun Mar 23 08:02:50 2008
@@ -95,7 +95,14 @@
     [event]
         name=start
 
-        
+               [role]
+                       [wml_filter]
+                               [variables]
+                                       role=Supporter
+                               [/variables]
+                       [/wml_filter]
+                       role=Supporter
+               [/role]     
         [recall]
             role=Supporter
         [/recall]

Modified: 
trunk/data/campaigns/Northern_Rebirth/scenarios/05a_The_Pursuit_files/start_sequence.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Northern_Rebirth/scenarios/05a_The_Pursuit_files/start_sequence.cfg?rev=25006&r1=25005&r2=25006&view=diff
==============================================================================
--- 
trunk/data/campaigns/Northern_Rebirth/scenarios/05a_The_Pursuit_files/start_sequence.cfg
 (original)
+++ 
trunk/data/campaigns/Northern_Rebirth/scenarios/05a_The_Pursuit_files/start_sequence.cfg
 Sun Mar 23 08:02:50 2008
@@ -259,7 +259,15 @@
     [event]
         name=start
 
-       # Malifor escapes into shroud   
+               [role]
+                       [wml_filter]
+                               [variables]
+                                       role=Supporter
+                               [/variables]
+                       [/wml_filter]
+                       role=Supporter
+               [/role]     
+               # Malifor escapes into shroud   
         [hide_unit]
             x=20
             y=39

Modified: trunk/data/campaigns/Northern_Rebirth/utils/herodeaths.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Northern_Rebirth/utils/herodeaths.cfg?rev=25006&r1=25005&r2=25006&view=diff
==============================================================================
--- trunk/data/campaigns/Northern_Rebirth/utils/herodeaths.cfg (original)
+++ trunk/data/campaigns/Northern_Rebirth/utils/herodeaths.cfg Sun Mar 23 
08:02:50 2008
@@ -311,21 +311,45 @@
                [/then]
        [/if]
        {FLASH}
-#      [store_locations]
-#           variable=father_marcus_whereabouts
-#           [filter]
-#               id=Father Marcus
-#           [/filter]
-#           radius=1
-#       [/store_locations]
-       [store_starting_location]
-               side=1
-               variable=respawn_point
-       [/store_starting_location]
+       {VARIABLE current_radius 1}
+       [while]
+               [variable]
+                       name=respawn_point.length
+                       equals=0
+               [/variable]
+               [do]
+                       [store_locations]
+                               variable=respawn_point
+                               [and]   
+                                       [filter]
+                                               id=Father Marcus
+                                       [/filter]
+                                       radius=$current_radius
+                               [/and]
+                               [and]
+                                       [not]
+                                               [filter]
+                                               [/filter]
+                                       [/not]
+                                       [not]
+                                               
terrain=Xu,Qxu,Ql,Qlf,Wo,Mm^Xm,Md^Xm,Xv
+                                       [/not]
+                               [/and]
+                       [/store_locations]
+                       {VARIABLE_OP current_radius add 1}
+               [/do]
+       [/while]
+#      [store_starting_location]
+#              side=1
+#              variable=respawn_point
+#      [/store_starting_location]
        [store_unit]
-               id=Sister Theta
+               [filter]
+                       id=Sister Theta
+               [/filter]
                variable=type_check
-               kill=no
+               kill=yes
+               fire_event=no
        [/store_unit]
     [unit]
         type=$type_check.type
@@ -343,6 +367,7 @@
     [/unit]
        {CLEAR_VARIABLE respawn_point}
        {CLEAR_VARIABLE type_check}
+       {CLEAR_VARIABLE current_radius}
        [if]
                [variable]
                        name=random
@@ -593,14 +618,45 @@
             [/message]
                [/then]
        [/if]
-       [store_starting_location]
-               side=1
-               variable=respawns_at
-       [/store_starting_location]
+       {VARIABLE current_radius 1}
+       [while]
+               [variable]
+                       name=respawn_point.length
+                       equals=0
+               [/variable]
+               [do]
+                       [store_locations]
+                               variable=respawn_point
+                               [and]
+                                       [filter]
+                                               id=Sister Theta
+                                       [/filter]
+                                       radius=$current_radius
+                               [/and]
+                               [and]
+                                       [not]
+                                               [filter]
+                                               [/filter]
+                                       [/not]
+                                       [not]
+                                               
terrain=Xu,Qxu,Ql,Qlf,Wo,Mm^Xm,Md^Xm,Xv
+                                       [/not]
+                               [/and]
+                       [/store_locations]
+                       {VARIABLE_OP current_raduis add 1}
+               [/do]
+       [/while]
+#      [store_starting_location]
+#              side=1
+#              variable=respawns_at
+#      [/store_starting_location]
        [store_unit]
-               id=Father Marcus
+               [filter]
+                       id=Father Marcus
+               [/filter]
                variable=type_check
-               kill=no
+               kill=yes
+               fire_event=no
        [/store_unit]
        {FLASH}
     [unit]
@@ -609,15 +665,16 @@
                name= _ "Father Marcus"
                profile=portraits/Father_Marcus.jpg
                side=1
-               x=$respawns_at.x
-               y=$respawns_at.y
+               x=$respawn_point.x
+               y=$respawn_point.y
                [modifications]
             {TRAIT_LOYAL}
             {TRAIT_RESILIENT}
         [/modifications]
     [/unit]
        {CLEAR_VARIABLE type_check}
-       {CLEAR_VARIABLE respawns_at}
+       {CLEAR_VARIABLE respawn_point}
+       {CLEAR_VARIABLE current_radius}
        [if]
                [variable]
                        name=random
@@ -785,24 +842,37 @@
 [event]
        name=die
        [filter]
-               role=Supporter
+               [wml_filter]
+                       [variables]
+                               role=Supporter
+                       [/variables]
+               [/wml_filter]
        [/filter]
        
-       [role]
-               race=Human
-               alignment=lawful
-               [not]
-                       id=Camerin
-               [/not]
-               [not]
-                       id=Tallin
-               [/not]
-               [not]
-                       usage=healer
-               [/not]
-               [not]
+       [store_unit]
+               [filter]
+                       race=Human
+                       alignment=lawful
+                       [not]
+                               id=Camerin
+                       [/not]
+                       [not]
+                               id=Tallin
+                       [/not]
+                       [not]
+                               usage=healer
+                       [/not]
+                       [not]
+                               role=Supporter
+                       [/not]
                        role=Supporter
-               [/not]
-               role=Supporter
-       [/role]
-[/event]
+               [/filter]
+               kill=no
+               variable=new_supporter
+       [/store_unit]
+       {VARIABLE new_supporter.variables.role Supporter}
+       [unstore_unit]
+               variable=new_supporter
+       [/unstore_unit]
+       {CLEAR_VARIABLE new_supporter}
+[/event]


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

Reply via email to