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

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

[Wesnoth-cvs-commits] wesnoth data/units/Mage.cfg src/actions.cpp


From: David White
Subject: [Wesnoth-cvs-commits] wesnoth data/units/Mage.cfg src/actions.cpp
Date: Mon, 30 Aug 2004 22:07:24 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     David White <address@hidden>    04/08/31 02:02:37

Modified files:
        data/units     : Mage.cfg 
        src            : actions.cpp 

Log message:
        made charge, backstab, and steadfast abilities use true doubling and 
halving of damage rather than additive percentage calculations

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/data/units/Mage.cfg.diff?tr1=1.23&tr2=1.24&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/actions.cpp.diff?tr1=1.153&tr2=1.154&r1=text&r2=text

Patches:
Index: wesnoth/data/units/Mage.cfg
diff -u wesnoth/data/units/Mage.cfg:1.23 wesnoth/data/units/Mage.cfg:1.24
--- wesnoth/data/units/Mage.cfg:1.23    Mon Aug 23 16:18:22 2004
+++ wesnoth/data/units/Mage.cfg Tue Aug 31 02:02:36 2004
@@ -2,7 +2,6 @@
 id=Mage
 name= _ "Mage"
 race=human
-gender=male,female
 image=mage.png
 image_defensive=mage-defend.png
 hitpoints=24
@@ -14,7 +13,7 @@
 advanceto=White Mage,Red Mage
 cost=21
 usage=mixed fighter
-unit_description= _ "Mages are both weak and powerful. Moving slowly, and with 
poor defensive skills, Mages attack with magical missiles that always have a 
high chance of hitting their target. For this reason, Mages are an excellent 
choice for flushing out enemies hiding in difficult terrain."
+unit_description="Mages are both weak and powerful. Moving slowly, and with 
poor defensive skills, Mages attack with magical missiles that always have a 
high chance of hitting their target. For this reason, Mages are an excellent 
choice for flushing out enemies hiding in difficult terrain."
 get_hit_sound=groan.wav
        [attack]
        name=dagger
@@ -60,76 +59,8 @@
                end=0
                image=projectiles/magicmissile-n.png
                image_diagonal=projectiles/magicmissile-ne.png
-               
halo=halo/mage-halo9.png,halo/mage-halo10.png,halo/mage-halo11.png,halo/mage-halo12.png,halo/mage-halo13.png,
+               
halo=halo/mage-halo9.png:50,halo/mage-halo10.png:50,halo/mage-halo11.png:50,halo/mage-halo12.png:50,halo/mage-halo13.png:50,
                halo_x,halo_y=10,-14
                [/missile_frame]
        [/attack]
-
-       [female]
-       id=Mage
-       name= _ "Mage"
-       race=human
-       gender=female
-       image=mage+female.png
-       image_defensive=mage+female-defend.png
-       hitpoints=24
-       movement_type=smallfoot
-       movement=5
-       experience=60
-       level=1
-       alignment=lawful
-       advanceto=White Mage,Red Mage
-       cost=21
-       usage=mixed fighter
-       unit_description= _ "Mages are both weak and powerful. Moving slowly, 
and with poor defensive skills, Mages attack with magical missiles that always 
have a high chance of hitting their target. For this reason, Mages are an 
excellent choice for flushing out enemies hiding in difficult terrain."
-       get_hit_sound=female-hit.wav
-               [attack]
-               name=dagger
-               type=blade
-               range=short
-               damage=5
-               number=1
-                       [frame]
-                       begin=-100
-                       end=100
-                       image=mage+female-attack.png
-                       [/frame]
-                       [sound]
-                               time=-100
-                       sound=dagger-swish.wav
-                       [/sound]
-               [/attack]
-               [attack]
-               name=missile
-               type=fire
-               range=long
-               special=magical
-               damage=7
-               number=3
-                       [sound]
-                       time=-200
-                       sound=magicmissile.wav
-                       [/sound]
-                       [frame]
-                       begin=-450
-                       end=0
-                       image=mage+female-attack1.png
-                       
halo=halo/mage-halo1.png,halo/mage-halo2.png,halo/mage-halo3.png,halo/mage-halo4.png,halo/mage-halo5.png,halo/mage-halo6.png,halo/mage-halo7.png,halo/mage-halo8.png,halo/mage-halo9.png
-                       halo_x,halo_y=10,-10
-                       [/frame]
-                       [frame]
-                       begin=0
-                       end=50
-                       image=mage+female-attack1.png
-                       [/frame]
-                       [missile_frame]
-                       begin=-200
-                       end=0
-                       image=projectiles/magicmissile-n.png
-                       image_diagonal=projectiles/magicmissile-ne.png
-                       
halo=halo/mage-halo9.png,halo/mage-halo10.png,halo/mage-halo11.png,halo/mage-halo12.png,halo/mage-halo13.png,
-                       halo_x,halo_y=10,-14
-                       [/missile_frame]
-               [/attack]
-       [/female]
 [/unit]
Index: wesnoth/src/actions.cpp
diff -u wesnoth/src/actions.cpp:1.153 wesnoth/src/actions.cpp:1.154
--- wesnoth/src/actions.cpp:1.153       Mon Aug 30 02:05:28 2004
+++ wesnoth/src/actions.cpp     Tue Aug 31 02:02:37 2004
@@ -1,4 +1,4 @@
-/* $Id: actions.cpp,v 1.153 2004/08/30 02:05:28 Sirp Exp $ */
+/* $Id: actions.cpp,v 1.154 2004/08/31 02:02:37 Sirp Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -341,23 +341,23 @@
                        res.defend_calculations.push_back(str_mod.str());
                }
 
-               if(charge) {
-                       percent += 100;
+               int leader_bonus = 0;
+               if(under_leadership(units,defender,&leader_bonus).valid()) {
+                       percent += leader_bonus;
 
                        if(include_strings) {
                                std::stringstream str;
-                               str << _("charge") << ", ,^+100%";
+                               str << _("leadership") << ", ,^+" + 
str_cast(leader_bonus) + "%";
                                res.defend_calculations.push_back(str.str());
                        }
                }
 
-               int leader_bonus = 0;
-               if(under_leadership(units,defender,&leader_bonus).valid()) {
-                       percent += leader_bonus;
+               if(charge) {
+                       percent = (100+percent)*2 - 100;
 
                        if(include_strings) {
                                std::stringstream str;
-                               str << _("leadership") << ", ,^+" + 
str_cast(leader_bonus) + "%";
+                               str << _("charge") << ", ," << _("Doubled");
                                res.defend_calculations.push_back(str.str());
                        }
                }
@@ -459,41 +459,41 @@
                res.attack_calculations.push_back(str_mod.str());
        }
 
-       if(charge) {
-               percent += 100;
-
+       int leader_bonus = 0;
+       if(under_leadership(units,attacker,&leader_bonus).valid()) {
+               percent += leader_bonus;
+               
                if(include_strings) {
                        std::stringstream str;
-                       str << _("charge") << ", ,^+100%";
+                       str << _("leadership") << ", ,^+" + 
str_cast(leader_bonus) + "%";
                        res.attack_calculations.push_back(str.str());
                }
        }
 
-       if(backstab) {
-               percent += 100;
+       if(charge) {
+               percent = (100+percent)*2 - 100;
+
                if(include_strings) {
                        std::stringstream str;
-                       str << _("backstab") << ", ,^+100%";
+                       str << _("charge") << ", ," << _("Doubled");
                        res.attack_calculations.push_back(str.str());
                }
        }
 
-       if(steadfast) {
-               percent -= 50;
+       if(backstab) {
+               percent = (100+percent)*2 - 100;
                if(include_strings) {
                        std::stringstream str;
-                       str << _("steadfast") << ", ,-50%";
+                       str << _("backstab") << ", ," << _("Doubled");
                        res.attack_calculations.push_back(str.str());
                }
        }
 
-       int leader_bonus = 0;
-       if(under_leadership(units,attacker,&leader_bonus).valid()) {
-               percent += leader_bonus;
-               
+       if(steadfast) {
+               percent = (100+percent)/2 - 100;
                if(include_strings) {
                        std::stringstream str;
-                       str << _("leadership") << ", ,^+" + 
str_cast(leader_bonus) + "%";
+                       str << _("steadfast") << ", ," << _("Halved");
                        res.attack_calculations.push_back(str.str());
                }
        }




reply via email to

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