[ogs-changes] dist/c++/ogs/magic Ability.cpp,1.5,1.6 Ability.h,1.3,1.4 AbsoluteRange.h,1.1,1.2 Exper
Status: Alpha
Brought to you by:
elemings
|
From: <ele...@us...> - 2003-04-18 01:41:10
|
Update of /cvsroot/ogs/dist/c++/ogs/magic
In directory sc8-pr-cvs1:/tmp/cvs-serv25962/c++/ogs/magic
Modified Files:
Ability.cpp Ability.h AbsoluteRange.h ExperienceCost.h
MetamagicFeat.h
Removed Files:
Level.h
Log Message:
See C++ ChangeLog (Apr 17) for details.
Index: Ability.cpp
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/magic/Ability.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Ability.cpp 13 Apr 2003 05:27:50 -0000 1.5
--- Ability.cpp 18 Apr 2003 01:41:06 -0000 1.6
***************
*** 21,28 ****
--- 21,32 ----
*/
+ #include "ogs/core/Modifier.h"
#include "ogs/magic/Ability.h"
+ #include "ogs/magic/Types.h"
using ogs::core::Modifier;
using ogs::magic::Ability;
+ using ogs::magic::SpellCounts;
+ using ogs::magic::SpellLevel;
/**
***************
*** 32,40 ****
* @return Number of bonus spells per spell level.
*/
! Ability::SpellCounts
! Ability::getBonusSpells (ogs::core::Modifier::Value modifier) {
SpellCounts spellCounts;
! for (int spellLevel = 1; spellLevel < 10; ++spellLevel) {
spellCounts [spellLevel] = (modifier + 3) / 4;
--modifier;
--- 36,43 ----
* @return Number of bonus spells per spell level.
*/
! SpellCounts Ability::getBonusSpells (Modifier::Value modifier) {
SpellCounts spellCounts;
! for (SpellLevel spellLevel = 1; spellLevel < 10; ++spellLevel) {
spellCounts [spellLevel] = (modifier + 3) / 4;
--modifier;
Index: Ability.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/magic/Ability.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Ability.h 8 Apr 2003 21:43:11 -0000 1.3
--- Ability.h 18 Apr 2003 01:41:06 -0000 1.4
***************
*** 31,34 ****
--- 31,35 ----
# include <ogs/core/Modifier.h>
# include <ogs/magic/Namespace.h>
+ # include <ogs/magic/Types.h>
OGS_BEGIN_MAGIC_NAMESPACE
***************
*** 42,47 ****
class Ability {
public:
- typedef std::vector<unsigned> SpellCounts;
-
/**
* Determine highest spell level that can be cast with this ability.
--- 43,46 ----
Index: AbsoluteRange.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/magic/AbsoluteRange.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** AbsoluteRange.h 7 Jan 2003 07:41:33 -0000 1.1
--- AbsoluteRange.h 18 Apr 2003 01:41:06 -0000 1.2
***************
*** 41,45 ****
--- 41,47 ----
protected:
+ /** Maximum distance of this spell range. */
float distance;
+
AbsoluteRange (Range::Type type, float distance);
};
Index: ExperienceCost.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/magic/ExperienceCost.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ExperienceCost.h 13 Apr 2003 05:27:50 -0000 1.3
--- ExperienceCost.h 18 Apr 2003 01:41:06 -0000 1.4
***************
*** 28,32 ****
# include <ogs/core/Experience.h>
# include <ogs/magic/Component.h>
! # include <ogs/magic/components/Namespace.h>
OGS_BEGIN_MAGIC_NAMESPACE
--- 28,32 ----
# include <ogs/core/Experience.h>
# include <ogs/magic/Component.h>
! # include <ogs/magic/Namespace.h>
OGS_BEGIN_MAGIC_NAMESPACE
***************
*** 39,47 ****
class ExperienceCost: public Component {
public:
! ExperienceCost (XP::Points xpCost);
! XP::Points getCost () const;
private:
! XP::Points _xpCost;
};
--- 39,47 ----
class ExperienceCost: public Component {
public:
! ExperienceCost (ogs::core::XP::Points xpCost);
! ogs::core::XP::Points getCost () const;
private:
! ogs::core::XP::Points _xpCost;
};
***************
*** 54,58 ****
* @param xpCost Cost of casting spell in experience points.
*/
! inline ExperienceCost::ExperienceCost (XP::Points xpCost):
Component (Component::EXPERIENCE_COST) {
this->_xpCost = xpCost;
--- 54,58 ----
* @param xpCost Cost of casting spell in experience points.
*/
! inline ExperienceCost::ExperienceCost (ogs::core::XP::Points xpCost):
Component (Component::EXPERIENCE_COST) {
this->_xpCost = xpCost;
***************
*** 64,68 ****
* @return Cost in experience points.
*/
! inline XP::Points ExperienceCost::getCost () const {
return (this->_xpCost);
}
--- 64,69 ----
* @return Cost in experience points.
*/
! inline ogs::core::XP::Points
! ExperienceCost::getCost () const {
return (this->_xpCost);
}
Index: MetamagicFeat.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/magic/MetamagicFeat.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** MetamagicFeat.h 15 Apr 2003 16:58:46 -0000 1.6
--- MetamagicFeat.h 18 Apr 2003 01:41:06 -0000 1.7
***************
*** 28,31 ****
--- 28,32 ----
# include <ogs/core/Feat.h>
# include <ogs/magic/Namespace.h>
+ # include <ogs/magic/Types.h>
OGS_BEGIN_MAGIC_NAMESPACE
***************
*** 46,50 ****
public:
/** The number of spell levels added by a metamagic feat. */
! typedef unsigned Cost;
Cost getCost () const;
--- 47,51 ----
public:
/** The number of spell levels added by a metamagic feat. */
! typedef SpellLevel Cost;
Cost getCost () const;
***************
*** 77,80 ****
--- 78,91 ----
_spell (NULL) {
// empty constructor body
+ }
+
+ /**
+ * Determine the cost of this metamagic feat.
+ *
+ * @return Cost of this metamagic feat.
+ */
+ inline MetamagicFeat::Cost
+ MetamagicFeat::getCost () const {
+ return (this->_cost);
}
--- Level.h DELETED ---
|