Author: esr
Date: Thu Jan 14 03:07:25 2010
New Revision: 40694

URL: http://svn.gna.org/viewcvs/wesnoth?rev=40694&view=rev
Log:
Redctotr mainline code to not rely on [unit]side defaulting to 1, and
to nout use [unit] within [side]. 

Modified:
    trunk/data/campaigns/Eastern_Invasion/scenarios/14.The_Drowned_Plains.cfg
    trunk/data/campaigns/Heir_To_The_Throne/scenarios/04_The_Bay_of_Pearls.cfg
    trunk/data/campaigns/Legend_of_Wesmere/scenarios/03_Kalian.cfg
    trunk/data/campaigns/Northern_Rebirth/scenarios/03_To_The_Mines.cfg
    
trunk/data/campaigns/Sceptre_of_Fire/scenarios/5_Hills_of_the_Shorbear_Clan.cfg
    trunk/data/campaigns/Son_Of_The_Black_Eye/scenarios/06_Black_Flag.cfg
    
trunk/data/campaigns/Under_the_Burning_Suns/scenarios/01_The_Morning_After.cfg
    
trunk/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg
    trunk/data/tools/wmllint

Modified: 
trunk/data/campaigns/Eastern_Invasion/scenarios/14.The_Drowned_Plains.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Eastern_Invasion/scenarios/14.The_Drowned_Plains.cfg?rev=40694&r1=40693&r2=40694&view=diff
==============================================================================
--- trunk/data/campaigns/Eastern_Invasion/scenarios/14.The_Drowned_Plains.cfg 
(original)
+++ trunk/data/campaigns/Eastern_Invasion/scenarios/14.The_Drowned_Plains.cfg 
Thu Jan 14 03:07:25 2010
@@ -82,8 +82,9 @@
             caution=0.0
         [/ai]
 
-        #give the skeletal dragon something to do when there are no enemies 
available
-        #let it look like it's wandering around semi-randomly
+        #give the skeletal dragon something to do when there are no
+        #enemies available let it look like it's wandering around
+        #semi-randomly
         [ai]
             [leader_goal]
                 x,y=14,10
@@ -120,14 +121,6 @@
             [/leader_goal]
             time_of_day=second_watch
         [/ai]
-        [unit]
-            type="Skeletal Dragon"
-            id="Khrakrahs"
-            name= _ "Khrakrahs"
-            x=28
-            y=23
-            canrecruit=yes
-        [/unit]
     [/side]
 
     [event]
@@ -154,6 +147,16 @@
             note={EARLY_FINISH_BONUS_NOTE}+{NEW_GOLD_CARRYOVER_NOTE_40}
         [/objectives]
 
+        [unit]
+            type="Skeletal Dragon"
+            id="Khrakrahs"
+            name= _ "Khrakrahs"
+            side=3
+            x=28
+            y=23
+            canrecruit=yes
+        [/unit]
+
         # Note: the code for the ambushers is mostly identical to that of
         # Crossroads in HttT.
 

Modified: 
trunk/data/campaigns/Heir_To_The_Throne/scenarios/04_The_Bay_of_Pearls.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Heir_To_The_Throne/scenarios/04_The_Bay_of_Pearls.cfg?rev=40694&r1=40693&r2=40694&view=diff
==============================================================================
--- trunk/data/campaigns/Heir_To_The_Throne/scenarios/04_The_Bay_of_Pearls.cfg 
(original)
+++ trunk/data/campaigns/Heir_To_The_Throne/scenarios/04_The_Bay_of_Pearls.cfg 
Thu Jan 14 03:07:25 2010
@@ -815,6 +815,7 @@
             y=40
             id=Delfador
             type=Elder Mage
+            side=1
             profile=portraits/delfador.png
             name= _ "Delfador"
             unrenamable=yes

Modified: trunk/data/campaigns/Legend_of_Wesmere/scenarios/03_Kalian.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Legend_of_Wesmere/scenarios/03_Kalian.cfg?rev=40694&r1=40693&r2=40694&view=diff
==============================================================================
--- trunk/data/campaigns/Legend_of_Wesmere/scenarios/03_Kalian.cfg (original)
+++ trunk/data/campaigns/Legend_of_Wesmere/scenarios/03_Kalian.cfg Thu Jan 14 
03:07:25 2010
@@ -100,16 +100,6 @@
         shroud=yes
         share_view=yes
         gold=0
-        [unit]
-            type="Orcish Slayer"
-            id=Urudin
-            name= _ "Urudin"
-            canrecruit=yes
-            x=19
-            y=11
-            hitpoints=45
-            max_hitpoints=45
-        [/unit]
         recruit=""
         [ai]
             version=10703
@@ -129,6 +119,7 @@
         [/ai]
     [/side]
 
+    # wmllint: recognize Urudin
     [event]
         name=last breath
         [filter]
@@ -154,14 +145,6 @@
         fog=yes
         shroud=yes
         share_view=yes
-        [unit]
-            type=Orcish Warlord
-            id=Murudin
-            name= _ "Murudin"
-            canrecruit=yes
-            x=1
-            y=10
-        [/unit]
 #ifdef EASY
         recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, 
Orcish Crossbowman, Goblin Knight, Goblin Pillager, Goblin Spearman
 #endif
@@ -194,15 +177,6 @@
         shroud=yes
         fog=yes
         share_view=yes
-        [unit]
-            type=Orcish Warlord
-            id=Mutaf-uru
-            name= _ "Mutaf-uru"
-            profile=portraits/orcs/warlord3.png
-            canrecruit=yes
-            x=7
-            y=2
-        [/unit]
 #ifdef EASY
         recruit={ORCS1}, Orcish Crossbowman, Goblin Pillager, Goblin Knight
 #endif
@@ -225,6 +199,8 @@
             {MODIFY_AI_ADD_CANDIDATE_ACTION 5 main_loop {AI_CA_POISONING}}
         [/ai]
     [/side]
+
+    # wmllint: recognize Mutaf-uru
     [event]
         name=last breath
         [filter]
@@ -318,6 +294,36 @@
         name=prestart
         {VARIABLE orc_reserve_used no}
         {VARIABLE orc_battlefield_strategy 'wait'}
+        [unit]
+            type="Orcish Slayer"
+            id=Urudin
+            name= _ "Urudin"
+            side=3
+            canrecruit=yes
+            x=19
+            y=11
+            hitpoints=45
+            max_hitpoints=45
+        [/unit]
+        [unit]
+            type=Orcish Warlord
+            id=Murudin
+            name= _ "Murudin"
+            side=4
+            canrecruit=yes
+            x=1
+            y=10
+        [/unit]
+        [unit]
+            type=Orcish Warlord
+            id=Mutaf-uru
+            name= _ "Mutaf-uru"
+            profile=portraits/orcs/warlord3.png
+            side=5
+            canrecruit=yes
+            x=7
+            y=2
+        [/unit]
     [/event]
 
     [event]

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=40694&r1=40693&r2=40694&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 Thu Jan 
14 03:07:25 2010
@@ -138,6 +138,7 @@
             type=Dwarvish Lord
             id=Hamel
             name= _ "Hamel"
+            side=1
             profile=portraits/Hamel.png
             # This nice macro gives the unit silver crown.
             {IS_HERO}

Modified: 
trunk/data/campaigns/Sceptre_of_Fire/scenarios/5_Hills_of_the_Shorbear_Clan.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Sceptre_of_Fire/scenarios/5_Hills_of_the_Shorbear_Clan.cfg?rev=40694&r1=40693&r2=40694&view=diff
==============================================================================
--- 
trunk/data/campaigns/Sceptre_of_Fire/scenarios/5_Hills_of_the_Shorbear_Clan.cfg 
(original)
+++ 
trunk/data/campaigns/Sceptre_of_Fire/scenarios/5_Hills_of_the_Shorbear_Clan.cfg 
Thu Jan 14 03:07:25 2010
@@ -151,6 +151,7 @@
             type=Dwarvish Lord
             id=Durstorn
             name= _ "Durstorn"
+            side=1
             {IS_HERO}
             profile=portraits/durstorn.png
             random_traits=no
@@ -163,6 +164,7 @@
             type=Dwarvish Thunderguard
             id=Noiraran
             name= _ "Noiraran"
+            side=1
             [modifications]
                 {TRAIT_LOYAL}
                 {TRAIT_INTELLIGENT}
@@ -174,6 +176,7 @@
             type=Dwarvish Steelclad
             id=Kuhnar
             name= _ "Kuhnar"
+            side=1
             [modifications]
                 {TRAIT_LOYAL}
                 {TRAIT_QUICK}

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=40694&r1=40693&r2=40694&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 Thu 
Jan 14 03:07:25 2010
@@ -35,8 +35,116 @@
     {EXTRA_SCENARIO_MUSIC "breaking_the_chains.ogg"}
     {EXTRA_SCENARIO_MUSIC "siege_of_laurelmor.ogg"}
 
+    [side]
+        type=Orcish Leader
+        id="Kapou'e"
+        name= _ "Kapou'e"
+        side=1
+        canrecruit=yes
+        controller=human
+        recruit= Wolf Rider, Orcish Grunt, Troll Whelp, Orcish Archer
+        team_name=Kapoue
+        user_team_name=_ "Kapou'e"
+        gold=100
+        {BLACK_FLAG}
+    [/side]
+
+    [side]
+        type=General
+        id=Slowhand
+        name= _ "Slowhand"
+        side=2
+        team_name=Humans
+        user_team_name=_"Humans"
+        canrecruit=yes
+        recruit=Swordsman,Fencer,Mage,Heavy Infantryman,Bowman
+        [ai]
+            recruitment_pattern=fighter,fighter,archer,mixed fighter
+            aggression=0
+            village_value=10.0
+            leader_value=50.0
+        [/ai]
+        {GOLD 110 130 150}
+    [/side]
+
+    {STARTING_VILLAGES 2 6}
+
+    [side]
+        side=3
+        no_leader=yes
+        team_name=Humans
+        user_team_name=_"Humans"
+
+        [ai]
+            [avoid]
+                x,y=1-10,1-20
+            [/avoid]
+        [/ai]
+    [/side]
+
+    [side]
+        type=General
+        id=Harman
+        name= _ "Harman"
+        side=4
+        team_name=Humans
+        user_team_name=_"Humans"
+        canrecruit=yes
+        facing=sw
+        recruit=Swordsman,Fencer,Mage,Heavy Infantryman,Bowman
+        [ai]
+            recruitment_pattern=fighter,fighter,archer,mixed fighter
+            aggression=0
+            village_value=10.0
+            leader_value=50.0
+        [/ai]
+        {GOLD 80 100 150}
+    [/side]
+
+    {STARTING_VILLAGES 4 4}
+
+    [side]
+        side=5
+        team_name=Kapoue
+        user_team_name=_ "Kapou'e"
+        no_leader=yes
+    [/side]
+
+    [story]
+        [part]
+            show_title=yes
+            {TO_BLACK_FLAG}
+        [/part]
+    [/story]
+
     [event]
         name=prestart
+
+        {GRUNT_DEFENDER 16 12}
+        {ARCHER_DEFENDER 17 12}
+        {GRUNT_DEFENDER 20 9}
+        {ARCHER_DEFENDER 28 13}
+        {GRUNT_DEFENDER 32 23}
+        {ARCHER_DEFENDER 31 25}
+
+        [unit]
+            side=2
+            id="Landing Galleon"
+            type=Transport Galleon
+            ai_special=guardian
+            x=6
+            y=9
+        [/unit]
+
+        [unit]
+            type=Orcish Warrior
+            id=Affman
+            name= _ "Affman"
+            side=5
+            x,y=27,20
+            random_traits=yes
+        [/unit]
+
         [objectives]
             side=1
             [objective]
@@ -58,116 +166,6 @@
 
             note={EARLY_FINISH_BONUS_NOTE}+{NEW_GOLD_CARRYOVER_NOTE_40}
         [/objectives]
-    [/event]
-
-    [side]
-        type=Orcish Leader
-        id="Kapou'e"
-        name= _ "Kapou'e"
-        side=1
-        canrecruit=yes
-        controller=human
-        recruit= Wolf Rider, Orcish Grunt, Troll Whelp, Orcish Archer
-        team_name=Kapoue
-        user_team_name=_ "Kapou'e"
-        gold=100
-        {BLACK_FLAG}
-    [/side]
-
-    [side]
-        type=General
-        id=Slowhand
-        name= _ "Slowhand"
-        side=2
-        team_name=Humans
-        user_team_name=_"Humans"
-        canrecruit=yes
-        recruit=Swordsman,Fencer,Mage,Heavy Infantryman,Bowman
-        [ai]
-            recruitment_pattern=fighter,fighter,archer,mixed fighter
-            aggression=0
-            village_value=10.0
-            leader_value=50.0
-        [/ai]
-        {GOLD 110 130 150}
-    [/side]
-
-    {STARTING_VILLAGES 2 6}
-
-    [side]
-        side=3
-        no_leader=yes
-        team_name=Humans
-        user_team_name=_"Humans"
-
-        [ai]
-            [avoid]
-                x,y=1-10,1-20
-            [/avoid]
-        [/ai]
-    [/side]
-
-    [side]
-        type=General
-        id=Harman
-        name= _ "Harman"
-        side=4
-        team_name=Humans
-        user_team_name=_"Humans"
-        canrecruit=yes
-        facing=sw
-        recruit=Swordsman,Fencer,Mage,Heavy Infantryman,Bowman
-        [ai]
-            recruitment_pattern=fighter,fighter,archer,mixed fighter
-            aggression=0
-            village_value=10.0
-            leader_value=50.0
-        [/ai]
-        {GOLD 80 100 150}
-    [/side]
-
-    {STARTING_VILLAGES 4 4}
-
-    [side]
-        side=5
-        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]
-        [part]
-            show_title=yes
-            {TO_BLACK_FLAG}
-        [/part]
-    [/story]
-
-    [event]
-        name=prestart
-
-        {GRUNT_DEFENDER 16 12}
-        {ARCHER_DEFENDER 17 12}
-        {GRUNT_DEFENDER 20 9}
-        {ARCHER_DEFENDER 28 13}
-        {GRUNT_DEFENDER 32 23}
-        {ARCHER_DEFENDER 31 25}
-
-        [unit]
-            side=2
-            id="Landing Galleon"
-            type=Transport Galleon
-            ai_special=guardian
-            x=6
-            y=9
-        [/unit]
     [/event]
 
     [event]

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=40694&r1=40693&r2=40694&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 Jan 14 03:07:25 2010
@@ -54,27 +54,6 @@
         controller=human
         shroud=yes
         fog=no
-
-        # Start with Nym
-
-        [unit]
-            type=Nym Hunter
-            id=Nym
-            name= _ "Nym"
-            x=27
-            y=22
-            unrenamable=yes
-            [modifications]
-                {TRAIT_LOYAL}
-#ifndef HARD
-                {TRAIT_RESILIENT}
-#ifdef EASY
-                {TRAIT_QUICK}
-#endif
-#endif
-            [/modifications]
-            {IS_HERO}
-        [/unit]
     [/side]
 
     # Monster side : mudcrawlers and cuttlefish
@@ -152,6 +131,26 @@
             note={EARLY_FINISH_BONUS_NOTE}+{NEW_GOLD_CARRYOVER_NOTE_40}
         [/objectives]
 
+        # Start with Nym
+        [unit]
+            type=Nym Hunter
+            id=Nym
+            name= _ "Nym"
+            side=1
+            x=27
+            y=22
+            unrenamable=yes
+            [modifications]
+                {TRAIT_LOYAL}
+#ifndef HARD
+                {TRAIT_RESILIENT}
+#ifdef EASY
+                {TRAIT_QUICK}
+#endif
+#endif
+            [/modifications]
+            {IS_HERO}
+        [/unit]
         # There are 3 mudcrawler encounter spots, in the NW and SW corner
         # and in the barracks.  Depending on which way you circle around
         # the village, you will encounter the NW or barracks first.

Modified: 
trunk/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg?rev=40694&r1=40693&r2=40694&view=diff
==============================================================================
--- 
trunk/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg
 (original)
+++ 
trunk/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg
 Thu Jan 14 03:07:25 2010
@@ -976,6 +976,7 @@
                         type=Dust Devil
                         id=Dust Devil
                         name=_"Dust Devil"
+                        side=1
                         [modifications]
                             {TRAIT_LOYAL}
                         [/modifications]

Modified: trunk/data/tools/wmllint
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wmllint?rev=40694&r1=40693&r2=40694&view=diff
==============================================================================
--- trunk/data/tools/wmllint (original)
+++ trunk/data/tools/wmllint Thu Jan 14 03:07:25 2010
@@ -497,6 +497,9 @@
     if closer == "terrain" and attributes.get("heals") in ("true", "false"):
         print '"%s", line %d: heals attribute no longer takes a boolean' % \
               (filename, lineno)
+    if closer == "unit" and attributes.get("id") is not None and 
attributes.get("type") is not None and attributes.get("side") is None:
+        print '"%s", line %d: unit declaration without side attribute' % \
+              (filename, lineno)
 
 def within(tag):
     "Did the specified tag lead one of our enclosing contexts?"


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

Reply via email to