stratagus-cvs
[Top][All Lists]
Advanced

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

[Stratagus-CVS] stratagus doc/ChangeLog.html src/clone/spells.c...


From: Russell Smith
Subject: [Stratagus-CVS] stratagus doc/ChangeLog.html src/clone/spells.c...
Date: Fri, 26 Sep 2003 05:15:23 -0400

CVSROOT:        /cvsroot/stratagus
Module name:    stratagus
Branch:         
Changes by:     Russell Smith <address@hidden>  03/09/26 05:15:23

Modified files:
        doc            : ChangeLog.html 
        src/clone      : spells.c unit.c 
        src/include    : spells.h unit.h unittype.h 
        src/unit       : ccl_unittype.c 

Log message:
        Removed Mana 255 Limitation

Patches:
Index: stratagus/doc/ChangeLog.html
diff -u stratagus/doc/ChangeLog.html:1.544 stratagus/doc/ChangeLog.html:1.545
--- stratagus/doc/ChangeLog.html:1.544  Tue Sep 23 03:01:23 2003
+++ stratagus/doc/ChangeLog.html        Fri Sep 26 05:15:21 2003
@@ -2,7 +2,7 @@
 <html>
 <head>
 <!--
-----   $Id: ChangeLog.html,v 1.544 2003/09/23 07:01:23 mr-russ Exp $
+----   $Id: ChangeLog.html,v 1.545 2003/09/26 09:15:21 mr-russ Exp $
 
 ----   (c) Copyright 1998-2003 by Lutz Sammer
 
@@ -36,6 +36,7 @@
 <li>Future 2.00 Release<p>
     <ul>
     <li>++
+    <li>Removed Mana 255 Limitation (from Russell Smith).
     <li>Fixed Bug #5294: -e switch doesn't work (from Russell Smith).
     <li>Merged Jarod spell patch. Still buggy, and saving not complete yet 
(from Joris Dauphin).
     <li>Made regeneration available to all units (from Russell Smith).
Index: stratagus/src/clone/spells.c
diff -u stratagus/src/clone/spells.c:1.98 stratagus/src/clone/spells.c:1.99
--- stratagus/src/clone/spells.c:1.98   Wed Sep 24 22:39:47 2003
+++ stratagus/src/clone/spells.c        Fri Sep 26 05:15:22 2003
@@ -27,7 +27,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: spells.c,v 1.98 2003/09/25 02:39:47 mr-russ Exp $
+//     $Id: spells.c,v 1.99 2003/09/26 09:15:22 mr-russ Exp $
 
 /*
 **     And when we cast our final spell
@@ -845,9 +845,9 @@
                        case flag_Mana:
                        {
                                target->Mana = haste->value;
-                               if (MaxMana < target->Mana) // What is Maxmana 
per unit.
+                               if (target->Type->_MaxMana < target->Mana)
                                {
-                                       target->Mana = MaxMana;
+                                       target->Mana = target->Type->_MaxMana;
                                }
                                break;
                        }
@@ -867,9 +867,9 @@
                        case flag_Mana_percent:
                        {
                                target->Mana = target->Mana * haste->value / 
100;
-                               if (MaxMana < target->Mana)// What is Maxmana 
per unit.
+                               if (target->Type->_MaxMana < target->Mana)
                                {
-                                       target->Mana = MaxMana;
+                                       target->Mana = target->Type->_MaxMana;
                                }
                                break;
                        }
@@ -1403,7 +1403,7 @@
                }
                case flag_Mana_percent:
                {
-                       return (target->Mana * 100 >= ttl * MaxMana); // FIXME 
: MaxMana.
+                       return (target->Mana * 100 >= ttl * 
target->Type->_MaxMana); // FIXME
                }
                /// Add here the other cases
                default:
Index: stratagus/src/clone/unit.c
diff -u stratagus/src/clone/unit.c:1.303 stratagus/src/clone/unit.c:1.304
--- stratagus/src/clone/unit.c:1.303    Sun Sep 21 22:49:55 2003
+++ stratagus/src/clone/unit.c  Fri Sep 26 05:15:22 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: unit.c,v 1.303 2003/09/22 02:49:55 mr-russ Exp $
+//     $Id: unit.c,v 1.304 2003/09/26 09:15:22 mr-russ Exp $
 
 //@{
 
@@ -1466,8 +1466,8 @@
            }
 
            // Restore mana in all magical units
-           if(units[j]->Type->CanCastSpell && units[j]->Mana != MaxMana)  {    
-               tmp = MaxMana - units[j]->Mana;
+           if(units[j]->Type->CanCastSpell && units[j]->Mana != 
units[j]->Type->_MaxMana)  {   
+               tmp = units[j]->Type->_MaxMana - units[j]->Mana;
                if (tmp > 2) {
                    tmp = 2;
                }
@@ -3962,7 +3962,7 @@
     int InRun, RunStart;
 
     CLprintf(file,"\n;;; -----------------------------------------\n");
-    CLprintf(file,";;; MODULE: units $Id: unit.c,v 1.303 2003/09/22 02:49:55 
mr-russ Exp $\n\n");
+    CLprintf(file,";;; MODULE: units $Id: unit.c,v 1.304 2003/09/26 09:15:22 
mr-russ Exp $\n\n");
 
     //
     // Local variables
Index: stratagus/src/include/spells.h
diff -u stratagus/src/include/spells.h:1.22 stratagus/src/include/spells.h:1.23
--- stratagus/src/include/spells.h:1.22 Wed Sep 24 22:39:47 2003
+++ stratagus/src/include/spells.h      Fri Sep 26 05:15:22 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: spells.h,v 1.22 2003/09/25 02:39:47 mr-russ Exp $
+//     $Id: spells.h,v 1.23 2003/09/26 09:15:22 mr-russ Exp $
 
 #ifndef __SPELLS_H__
 #define __SPELLS_H__
@@ -263,7 +263,7 @@
     f_spell *f;                                /// function to cast the spell.
     SpellActionType *SpellAction;      /// More arguments for spell (damage, 
delay, additional sounds...).
     int Range;                         /// Max range of the target.
-    unsigned int ManaCost;             /// required mana for each cast
+    int ManaCost;                      /// required mana for each cast
 
     int DependencyId;                  /// Id of upgrade, -1 if no upgrade 
needed for cast the spell.
     t_Conditions *Condition_generic;   /// Conditions to cast the spell. 
(generic (no test for each target))
Index: stratagus/src/include/unit.h
diff -u stratagus/src/include/unit.h:1.215 stratagus/src/include/unit.h:1.216
--- stratagus/src/include/unit.h:1.215  Wed Sep 24 22:39:47 2003
+++ stratagus/src/include/unit.h        Fri Sep 26 05:15:22 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: unit.h,v 1.215 2003/09/25 02:39:47 mr-russ Exp $
+//     $Id: unit.h,v 1.216 2003/09/26 09:15:22 mr-russ Exp $
 
 #ifndef __UNIT_H__
 #define __UNIT_H__
@@ -538,8 +538,7 @@
     Player*     RescuedFrom;            /// The original owner of a rescued 
unit.
                                        /// NULL if the unit was not rescued.
 
-#define MaxMana        255                     /// maximal mana for units
-    unsigned   Mana : 8;               /// mana points
+    int                Mana;                   /// mana points
     int                HP;                     /// hit points
     int                XP;                     /// experience points
     int                Kills;                  /// how many unit has this unit 
killed
@@ -568,7 +567,7 @@
                                        ** ,used for fancy buildings
                                        */
     unsigned   Rs : 8;
-    int                CurrentResource;
+    unsigned char      CurrentResource;
 
 #define MAX_ORDERS 16                  /// How many outstanding orders?
     char       OrderCount;             /// how many orders in queue
Index: stratagus/src/include/unittype.h
diff -u stratagus/src/include/unittype.h:1.115 
stratagus/src/include/unittype.h:1.116
--- stratagus/src/include/unittype.h:1.115      Wed Sep 24 22:39:47 2003
+++ stratagus/src/include/unittype.h    Fri Sep 26 05:15:22 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: unittype.h,v 1.115 2003/09/25 02:39:47 mr-russ Exp $
+//     $Id: unittype.h,v 1.116 2003/09/26 09:15:22 mr-russ Exp $
 
 #ifndef __UNITTYPE_H__
 #define __UNITTYPE_H__
@@ -702,7 +702,7 @@
     Construction*Construction;         /// What is shown in construction phase
     int                _SightRange;            /// Sight range
     int                _HitPoints;             /// Maximum hit points
-    unsigned   _MaxMana : 8;           /// Maximum mana points
+    int                _MaxMana;               /// Maximum mana points
     // FIXME: only flag
     int                Magic;                  /// Unit can cast spells
 
Index: stratagus/src/unit/ccl_unittype.c
diff -u stratagus/src/unit/ccl_unittype.c:1.89 
stratagus/src/unit/ccl_unittype.c:1.90
--- stratagus/src/unit/ccl_unittype.c:1.89      Wed Sep 24 12:03:24 2003
+++ stratagus/src/unit/ccl_unittype.c   Fri Sep 26 05:15:22 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: ccl_unittype.c,v 1.89 2003/09/24 16:03:24 n0body Exp $
+//     $Id: ccl_unittype.c,v 1.90 2003/09/26 09:15:22 mr-russ Exp $
 
 //@{
 
@@ -259,10 +259,6 @@
            list=gh_cdr(list);
        } else if( gh_eq_p(value,gh_symbol2scm("max-mana")) ) {
            type->_MaxMana=gh_scm2int(gh_car(list));
-           if( type->_MaxMana>MaxMana ) {
-               DebugLevel0Fn("Too much mana %d\n" _C_ type->_MaxMana);
-               type->_MaxMana=MaxMana;
-           }
            list=gh_cdr(list);
        } else if( gh_eq_p(value,gh_symbol2scm("magic")) ) {
            type->Magic=gh_scm2int(gh_car(list));




reply via email to

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