wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth ./changelog data/scenario-test.cfg src/...


From: Philippe Plantier
Subject: [Wesnoth-cvs-commits] wesnoth ./changelog data/scenario-test.cfg src/...
Date: Sun, 17 Apr 2005 11:40:34 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Philippe Plantier <address@hidden>      05/04/17 15:40:34

Modified files:
        .              : changelog 
        data           : scenario-test.cfg 
        src            : actions.cpp game_events.cpp playlevel.cpp 
                         team.cpp team.hpp 

Log message:
        Fixed bug #12611: [terrain] tag modifying village existence interacts 
badly
        with it being already captured and save/loading

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/changelog.diff?tr1=1.595&tr2=1.596&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/data/scenario-test.cfg.diff?tr1=1.42&tr2=1.43&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/actions.cpp.diff?tr1=1.204&tr2=1.205&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/game_events.cpp.diff?tr1=1.142&tr2=1.143&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/playlevel.cpp.diff?tr1=1.200&tr2=1.201&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/team.cpp.diff?tr1=1.87&tr2=1.88&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/team.hpp.diff?tr1=1.57&tr2=1.58&r1=text&r2=text

Patches:
Index: wesnoth/changelog
diff -u wesnoth/changelog:1.595 wesnoth/changelog:1.596
--- wesnoth/changelog:1.595     Sun Apr 17 14:37:17 2005
+++ wesnoth/changelog   Sun Apr 17 15:40:33 2005
@@ -34,6 +34,7 @@
      * Elvish Outrider: increase melee to 8-4, increase ranged to 7-4
  * fixed some OoS errors when chatting while a fight is taking place
  * fixed the spurious "statistics verification failed" messages
+ * fixed bug #12611: modifying villages with [terrain] interacting badly with 
capturing them.
  
 Version 0.9.0:
  * user interface improvements:
Index: wesnoth/data/scenario-test.cfg
diff -u wesnoth/data/scenario-test.cfg:1.42 wesnoth/data/scenario-test.cfg:1.43
--- wesnoth/data/scenario-test.cfg:1.42 Sat Apr  2 21:34:56 2005
+++ wesnoth/data/scenario-test.cfg      Sun Apr 17 15:40:34 2005
@@ -1,12 +1,12 @@
 [test]
-       name=Scenario 1: The Elves Besieged
+       name="Test scenario"
        map_data="mmmmggggggggggggggggggggggggggggggggg
 mmmmggggggggggggggggggggggggggggggggg
 mgggggCCCCggggggggggggggggggggggggggg
 mgggggC1Cgggggggggfffffgggggggggggggg
 mgggggCCCgggggggggfffffgggccccggggggg
 mgggggCCCgggggggggfffffgggcchhggggggg
-mgggggggggggggggggggggggggccccggggggg
+mgggggtgtgggggggggggggggggccccggggggg
 ggggggggggggggggggggggggggggggggggggg
 ggggggggggggggggggggggggggggggggggggg
 ggggggggggggggggggggggggggggggggggggg
@@ -33,7 +33,6 @@
    [/filter]
 
    [message]
-   id=you_didnt_win
    speaker=narrator
    message= _ "You can come if you wish, but the leader is only interested in 
speaking to Baldras."
    [/message]
@@ -96,7 +95,7 @@
        canrecruit=1
        controller=human
        hitpoints=80
-       recruit=Assassin,Elvish Hero,Elvish Fighter,Elvish 
Archer,Horseman,Mage,Elvish Shaman,Red 
Mage,Spearman,Swordsman,Duelist,Fencer,Elvish Captain,Elvish Ranger,Elvish 
Shyde,Thief,Rogue,Merman,Elvish Lord,White Mage,Mage of Light,Elvish 
Sharpshooter,Silver Mage
+       recruit="Assassin,Elvish Hero,Elvish Fighter,Elvish 
Archer,Horseman,Mage,Elvish Shaman,Red 
Mage,Spearman,Swordsman,Duelist,Fencer,Elvish Captain,Elvish Ranger,Elvish 
Shyde,Thief,Rogue,Merman,Elvish Lord,White Mage,Mage of Light,Elvish 
Sharpshooter,Silver Mage"
        gold=2000
        enemy=2
        shroud=yes
@@ -104,53 +103,31 @@
 
        [side]
        type=Orcish Warlord
-       description=Urug-Telfar
+       description="Urug-Telfar"
        side=2
        controller=ai
        canrecruit=1
-       recruit=Orcish Grunt,Troll Whelp,Wolf Rider,Orcish Archer,Orcish 
Assassin,Saurian Skirmisher,Naga
+       recruit="Orcish Grunt,Troll Whelp,Wolf Rider,Orcish Archer,Orcish 
Assassin,Saurian Skirmisher,Naga"
        gold=40
        income=10
        enemy=1
                [unit]
                        x,y=12,13
-                       type=Orcish Archer
+                       type="Orcish Archer"
                        generate_description=yes
                [/unit]
        [/side]
 
        [item]
        x,y=8,8
-       image=items/orcish-flag.png
+       image="items/orcish-flag.png"
        [/item]
        [label]
        x,y=8,8
-       id=northerners_unleashed
        text="Northerners unleashed!"
        [/label]
 
        [event]
-       name=prestart
-               [set_variable]
-                       name=random1
-                       random=1..100
-               [/set_variable]
-               [set_variable]
-                       name=random2
-                       random=1..100
-               [/set_variable]
-       [/event]
-
-       [event]
-       name=start
-
-               [message]
-                       speaker=Konrad
-                       message="Random numbers: $random1, $random2"
-               [/message]
-       [/event]
-
-       [event]
        name=moveto
        first_time_only=no
                [filter]
@@ -168,26 +145,25 @@
                {VARIABLE_OP yy1 random 10..17}
 
                [unit]
-                       side=1
-                       x,y=$xx1,$yy1
-                       type=Orcish Warlord
-                       description=Bozo
+                       side=2
+                       x,y="$xx1","$yy1"
+                       type="Orcish Warlord"
+                       description="Bozo"
                        generate_description=yes
                [/unit]
 
                [message]
-                       speaker=Bozo
+                       speaker="Bozo"
                        message="Mwahahahahah! I appeared at $xx1, $yy1!"
                [/message]
        [/event]
 
        [item]
        x,y=4,4
-       image=items/orcish-flag.png
+       image="items/orcish-flag.png"
        [/item]
        [label]
        x,y=4,4
-       id=open_the_path
        text="Open, Sesame!"
        [/label]
 
@@ -208,7 +184,7 @@
        
        [item]
        x,y=8,5
-       image=items/orcish-flag.png
+       image="items/orcish-flag.png"
        [/item]
        [label]
        x,y=8,5
@@ -225,9 +201,52 @@
                [/filter]
                [remove_shroud]
                        side=1
-                       x=0-38
-                       y=0-20
+                       x="0-38"
+                       y="0-20"
                [/remove_shroud]
        [/event]
+
+       [item]
+       x,y=8,7
+       image="items/chest-plain-closed.png"
+       [/item]
+       [label]
+       x,y=8,7
+       text="BOOM!"
+       [/label]
+
+       [event]
+       name="moveto"
+       first_time_only=no
+               [filter]
+                       x,y=8,7
+               [/filter]
+               [terrain]
+                       x="7,9"
+                       y="7,7"
+                       letter="g"
+               [/terrain]
+       [/event]
+
+       [item]
+       x,y=9,3
+       image="items/gohere.png"
+       [/item]
+       [label]
+       x,y=9,3
+       text="Win"
+       [/label]
+
+       [event]
+       name="moveto"
+       first_time_only=no
+               [filter]
+                       x,y=9,3
+               [/filter]
+               [endlevel]
+                       result="victory"
+                       bonus=yes
+               [/endlevel]
+       [/event]
 [/test]
 
Index: wesnoth/src/actions.cpp
diff -u wesnoth/src/actions.cpp:1.204 wesnoth/src/actions.cpp:1.205
--- wesnoth/src/actions.cpp:1.204       Sat Apr  9 22:22:19 2005
+++ wesnoth/src/actions.cpp     Sun Apr 17 15:40:34 2005
@@ -1,4 +1,4 @@
-/* $Id: actions.cpp,v 1.204 2005/04/09 22:22:19 silene Exp $ */
+/* $Id: actions.cpp,v 1.205 2005/04/17 15:40:34 gruikya Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -947,7 +947,6 @@
        return -1;
 }
 
-
 void get_village(const gamemap::location& loc, std::vector<team>& teams,
                  size_t team_num, const unit_map& units)
 {
Index: wesnoth/src/game_events.cpp
diff -u wesnoth/src/game_events.cpp:1.142 wesnoth/src/game_events.cpp:1.143
--- wesnoth/src/game_events.cpp:1.142   Tue Apr 12 21:40:16 2005
+++ wesnoth/src/game_events.cpp Sun Apr 17 15:40:34 2005
@@ -1,4 +1,4 @@
-/* $Id: game_events.cpp,v 1.142 2005/04/12 21:40:16 j_daniel Exp $ */
+/* $Id: game_events.cpp,v 1.143 2005/04/17 15:40:34 gruikya Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -895,6 +895,16 @@
                        const std::string& terrain_type = cfg["letter"];
                        
preferences::encountered_terrains().insert(terrain_type);
                        if(terrain_type.size() > 0) {
+                               const bool old_village = 
game_map->is_village(*loc);
+                               const bool new_village = 
game_map->is_village(terrain_type[0]);
+
+                               if(old_village && !new_village) {
+                                       int owner = village_owner(*loc, *teams);
+                                       if(owner != -1) {
+                                               
(*teams)[owner].lose_village(*loc);
+                                       }
+                               }
+
                                game_map->set_terrain(*loc,terrain_type[0]);
                        }
                }
Index: wesnoth/src/playlevel.cpp
diff -u wesnoth/src/playlevel.cpp:1.200 wesnoth/src/playlevel.cpp:1.201
--- wesnoth/src/playlevel.cpp:1.200     Tue Apr 12 21:40:16 2005
+++ wesnoth/src/playlevel.cpp   Sun Apr 17 15:40:34 2005
@@ -1,4 +1,4 @@
-/* $Id: playlevel.cpp,v 1.200 2005/04/12 21:40:16 j_daniel Exp $ */
+/* $Id: playlevel.cpp,v 1.201 2005/04/17 15:40:34 gruikya Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -848,7 +848,8 @@
                                gui::show_dialog(gui, NULL, _("Victory"),
                                                 _("You have emerged 
victorious!"), gui::OK_ONLY);
 
-                       if (state_of_game.players.size() > 0 && 
has_next_scenario)
+                       if (state_of_game.players.size() > 0 && 
has_next_scenario || 
+                                       state_of_game.campaign_type == "test")
                                gui::show_dialog(gui, NULL, _("Scenario 
Report"), report.str(), gui::OK_ONLY);
 
                        return VICTORY;
Index: wesnoth/src/team.cpp
diff -u wesnoth/src/team.cpp:1.87 wesnoth/src/team.cpp:1.88
--- wesnoth/src/team.cpp:1.87   Sun Mar 27 23:06:17 2005
+++ wesnoth/src/team.cpp        Sun Apr 17 15:40:34 2005
@@ -1,4 +1,4 @@
-/* $Id: team.cpp,v 1.87 2005/03/27 23:06:17 gruikya Exp $ */
+/* $Id: team.cpp,v 1.88 2005/04/17 15:40:34 gruikya Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -877,3 +877,4 @@
 
        return side;
 }
+
Index: wesnoth/src/team.hpp
diff -u wesnoth/src/team.hpp:1.57 wesnoth/src/team.hpp:1.58
--- wesnoth/src/team.hpp:1.57   Sun Mar 27 23:06:17 2005
+++ wesnoth/src/team.hpp        Sun Apr 17 15:40:34 2005
@@ -1,4 +1,4 @@
-/* $Id: team.hpp,v 1.57 2005/03/27 23:06:17 gruikya Exp $ */
+/* $Id: team.hpp,v 1.58 2005/04/17 15:40:34 gruikya Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -241,3 +241,4 @@
 void validate_side(int side); //throw game::game_error
 
 #endif
+




reply via email to

[Prev in Thread] Current Thread [Next in Thread]