[ogs-changes] dist/c++/ogs/core Abilities.h,1.5,1.6 Creature.cpp,1.10,1.11 Creature.h,1.9,1.10 Entit
Status: Alpha
Brought to you by:
elemings
Update of /cvsroot/ogs/dist/c++/ogs/core
In directory sc8-pr-cvs1:/tmp/cvs-serv20206/c++/ogs/core
Modified Files:
Abilities.h Creature.cpp Creature.h Entity.cpp Entity.h Feat.h
Feature.h Saves.h Size.h Skill.cpp Skill.h Strength.h
Log Message:
See C++ ChangeLog (Apr 15) for details.
Index: Abilities.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/core/Abilities.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Abilities.h 13 Apr 2003 05:25:51 -0000 1.5
--- Abilities.h 15 Apr 2003 16:58:33 -0000 1.6
***************
*** 52,55 ****
--- 52,61 ----
typedef PtrMap::iterator Iterator;
+ /**
+ * A pair of an ability type and ability pointer. Iterators point
+ * to values of this type.
+ */
+ typedef PtrMap::value_type Value;
+
struct PartialMethod;
Index: Creature.cpp
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/core/Creature.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** Creature.cpp 13 Apr 2003 05:25:51 -0000 1.10
--- Creature.cpp 15 Apr 2003 16:58:34 -0000 1.11
***************
*** 41,45 ****
* @param abilities Ability scores of creature.
* @param size Size of creature.
! * @param body Body of creature.
*/
Creature::Creature (Die hitDice, Abilities abilities,
--- 41,45 ----
* @param abilities Ability scores of creature.
* @param size Size of creature.
! * @param parts An array of body part types.
*/
Creature::Creature (Die hitDice, Abilities abilities,
***************
*** 57,71 ****
// Add Dexterity modifier to Reflex save, initiative, and defense.
AbilityPtr ability = this->_abilities [Ability::DEX];
! Modifier& modifier = ability->getModifier ();
! this->_saves.ref.addModifier (modifier);
! this->_initiative.addModifier (modifier);
! Defense& defense = getDefense ();
! defense.addModifier (modifier);
// Add ability modifiers to saving throws.
ability = this->_abilities [Ability::CON];
! this->_saves.fort.addModifier (ability->getModifier ());
ability = this->_abilities [Ability::WIS];
! this->_saves.will.addModifier (ability->getModifier ());
// Add hit dice modifiers to saving throws.
--- 57,78 ----
// Add Dexterity modifier to Reflex save, initiative, and defense.
AbilityPtr ability = this->_abilities [Ability::DEX];
! if (ability) {
! Modifier& modifier = ability->getModifier ();
! this->_saves.ref.addModifier (modifier);
! this->_initiative.addModifier (modifier);
! Defense& defense = getDefense ();
! defense.addModifier (modifier);
! }
// Add ability modifiers to saving throws.
ability = this->_abilities [Ability::CON];
! if (ability) {
! this->_saves.fort.addModifier (ability->getModifier ());
! }
!
ability = this->_abilities [Ability::WIS];
! if (ability) {
! this->_saves.will.addModifier (ability->getModifier ());
! }
// Add hit dice modifiers to saving throws.
***************
*** 80,98 ****
/**
! * Add a skill to this creature.
*
! * @param skillPtr A smart pointer for a new skill.
* @return True if the skill was added to this creature.
*/
! bool Creature::addSkill (SkillPtr skillPtr) {
bool added = false;
! if (skillPtr) {
! // Make sure the skill isn't already in the list of skills.
! Skills::iterator end = _skills.end ();
! if (std::find (_skills.begin (), end, skillPtr) != end) {
! _skills.push_back (skillPtr);
! added = true;
}
}
--- 87,121 ----
/**
! * Add a skill to this creature. This function adds the skill only if
! * another skill of the same type is not already present.
*
! * @param skill A skill to be added to this creature.
* @return True if the skill was added to this creature.
*/
! bool Creature::addSkill (Skill& skill) {
bool added = false;
! Skills::iterator itor = this->_skills.begin ();
! while (itor != this->_skills.end ()) {
! if ((*itor)->getType () == skill.getType ()) {
! break;
! }
!
! ++itor;
! }
!
! if (itor == this->_skills.end ()) {
! // Add key ability to skill. One or two skills do not have key
! // abilities and this creature may not have the key ability anyway.
! Ability::Type abilityType = skill.getKeyAbility ();
! if (Ability::isValidType (abilityType)) {
! AbilityPtr abilityPtr = this->_abilities [abilityType];
! if (abilityPtr) {
! (skill.getModifiers ()).addModifier (abilityPtr->getModifier ());
! }
}
+
+ this->_skills.push_back (SkillPtr (&skill));
+ added = true;
}
***************
*** 100,115 ****
}
/**
* Add a feat to this creature.
*
! * @param featPtr A smart pointer to a new feat.
* @return True if the feat was added to this creature.
*/
! bool Creature::addFeat (FeatPtr featPtr) {
! Feat* feat = featPtr.get ();
bool added = false;
! if (added = feat->attachObject (*this)) {
! _feats.push_back (featPtr);
}
--- 123,139 ----
}
+ // TODO: Implement removeSkill() function.
+
/**
* Add a feat to this creature.
*
! * @param feat A feat to be added to this creature.
* @return True if the feat was added to this creature.
*/
! bool Creature::addFeat (Feat& feat) {
bool added = false;
! if (added = feat.attachObject (*this)) {
! this->_feats.push_back (FeatPtr (&feat));
}
***************
*** 120,135 ****
* Remove a feat from this creature.
*
! * @param featPtr A smart pointer to a feat.
* @return True if the feat was removed from this creature.
*/
! bool Creature::removeFeat (FeatPtr featPtr) {
bool removed = false;
! Feats::iterator end = _feats.end ();
! Feats::iterator itor = std::find (_feats.begin (), end, featPtr);
if (itor != end) {
! Feat* feat = featPtr.get ();
! if (removed = feat->detachObject ()) {
! _feats.erase (itor);
}
}
--- 144,159 ----
* Remove a feat from this creature.
*
! * @param feat A feat to be removed from this creature.
* @return True if the feat was removed from this creature.
*/
! bool Creature::removeFeat (Feat& feat) {
bool removed = false;
! Feats::iterator end = this->_feats.end ();
! FeatPtr featPtr (&feat);
! Feats::iterator itor = std::find (this->_feats.begin (), end, featPtr);
if (itor != end) {
! if (removed = feat.detachObject ()) {
! this->_feats.erase (itor);
}
}
Index: Creature.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/core/Creature.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Creature.h 13 Apr 2003 05:25:51 -0000 1.9
--- Creature.h 15 Apr 2003 16:58:34 -0000 1.10
***************
*** 75,84 ****
Skills getSkills () const;
! bool addSkill (SkillPtr skillPtr);
! bool removeSkill (SkillPtr skillPtr);
Feats getFeats () const;
! bool addFeat (FeatPtr featPtr);
! bool removeFeat (FeatPtr featPtr);
Body getBody () const;
--- 75,84 ----
Skills getSkills () const;
! bool addSkill (Skill& skill);
! bool removeSkill (Skill& skill);
Feats getFeats () const;
! bool addFeat (Feat& feat);
! bool removeFeat (Feat& feat);
Body getBody () const;
Index: Entity.cpp
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/core/Entity.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Entity.cpp 13 Apr 2003 05:25:51 -0000 1.6
--- Entity.cpp 15 Apr 2003 16:58:35 -0000 1.7
***************
*** 76,94 ****
* entity, this function does nothing.
*
! * @param featurePtr A shared pointer to a feature object.
* @return True if feature is added to this entity.
*/
! bool Entity::addFeature (FeaturePtr featurePtr) {
bool added = false;
! if (featurePtr) {
! Features::iterator end = this->_features.end ();
!
! if (std::find (this->_features.begin (), end, featurePtr) != end) {
! Feature* feature = featurePtr.get ();
!
! if (added = feature->attachObject (*this)) {
! this->_features.push_front (featurePtr);
! }
}
}
--- 76,90 ----
* entity, this function does nothing.
*
! * @param feature A feature to add to this enitty.
* @return True if feature is added to this entity.
*/
! bool Entity::addFeature (Feature& feature) {
bool added = false;
! Features::iterator end = this->_features.end ();
! FeaturePtr featurePtr (&feature);
! if (std::find (this->_features.begin (), end, featurePtr) == end) {
! if (added = feature.attachObject (*this)) {
! this->_features.push_front (featurePtr);
}
}
***************
*** 101,116 ****
* from this entity, this function does nothing.
*
! * @param featurePtr A shared pointer to a feature object.
* @return True if feature is removed from this entity.
*/
! bool Entity::removeFeature (FeaturePtr featurePtr) {
bool removed = true;
! if (featurePtr) {
! Feature* feature = featurePtr.get ();
!
! if (removed = feature->detachObject ()) {
! this->_features.remove (featurePtr);
! }
}
--- 97,108 ----
* from this entity, this function does nothing.
*
! * @param feature A feature to remove from this enitty.
* @return True if feature is removed from this entity.
*/
! bool Entity::removeFeature (Feature& feature) {
bool removed = true;
! if (removed = feature.detachObject ()) {
! this->_features.remove (FeaturePtr (&feature));
}
Index: Entity.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/core/Entity.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Entity.h 13 Apr 2003 05:25:51 -0000 1.6
--- Entity.h 15 Apr 2003 16:58:35 -0000 1.7
***************
*** 74,79 ****
Features getFeatures () const;
! bool addFeature (FeaturePtr featurePtr);
! bool removeFeature (FeaturePtr featurePtr);
virtual ~Entity () = 0;
--- 74,79 ----
Features getFeatures () const;
! bool addFeature (Feature& feature);
! bool removeFeature (Feature& feature);
virtual ~Entity () = 0;
Index: Feat.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/core/Feat.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Feat.h 13 Apr 2003 05:25:51 -0000 1.9
--- Feat.h 15 Apr 2003 16:58:36 -0000 1.10
***************
*** 44,48 ****
*/
enum Compatibility {
-
/**
* Indicates that the feat may be taken only once. Only one
--- 44,47 ----
***************
*** 75,79 ****
*/
enum Group {
-
/**
* A general-purpose feat. General feats are feats that can be
--- 74,77 ----
***************
*** 81,85 ****
* situations.
*/
! GENERAL = 0,
/**
--- 79,83 ----
* situations.
*/
! GENERAL = 1,
/**
***************
*** 88,92 ****
* granted to fighters are limited to combat feats.
*/
! COMBAT = 1,
/**
--- 86,90 ----
* granted to fighters are limited to combat feats.
*/
! COMBAT = 2,
/**
***************
*** 96,100 ****
* feats.
*/
! MAGIC = 2,
/**
--- 94,98 ----
* feats.
*/
! MAGIC = 3,
/**
***************
*** 103,107 ****
* particular cclasses or creatures or used in certain situations.
*/
! SPECIAL = 3,
};
--- 101,105 ----
* particular cclasses or creatures or used in certain situations.
*/
! SPECIAL = 4,
};
***************
*** 109,130 ****
static XP::Level getSlotCountLevel (unsigned slotCount);
! /**
! * Determine the compatability of this feat.
! *
! * @return Compatibility of this feat.
! */
! virtual Compatibility getCompatibility () const = 0;
!
! /**
! * Determine the group that this feat belongs to.
! *
! * @return Group that this feat belongs to.
! */
! virtual Group getGroup () const = 0;
virtual ~Feat () { }
protected:
virtual bool canAttach (const Object& object) const;
/**
--- 107,120 ----
static XP::Level getSlotCountLevel (unsigned slotCount);
! Compatibility getCompatibility () const;
! Group getGroup () const;
virtual ~Feat () { }
protected:
+ Feat (Compatibility compatibility, Group group = GENERAL);
+
virtual bool canAttach (const Object& object) const;
+ Creature* getCreature ();
/**
***************
*** 139,145 ****
--- 129,148 ----
template <class T>
bool findFeat (const Object& object) const;
+
+ private:
+ Compatibility _compatibility;
+ Group _group;
};
/**
+ * Create a new feat.
+ */
+ inline Feat::Feat (Compatibility compatibility, Group group):
+ _compatibility (compatibility),
+ _group (group) {
+ // empty constructor body
+ }
+
+ /**
* Determine number of slots available for feats at a given experience
* level.
***************
*** 154,161 ****
/**
* Determine if a feat is an instance of a specific feat. The
* specific feat is specified by the template parameter T.
*
! * @param feat An instance of a feat.
* @return True if feat is an instance of the specific feat.
*/
--- 157,196 ----
/**
+ * Determine the compatibility of this feat.
+ *
+ * @return Compatibility of this feat.
+ */
+ inline Feat::Compatibility
+ Feat::getCompatibility () const {
+ return (this->_compatibility);
+ }
+
+ /**
+ * Determine the group that this feat belongs to.
+ *
+ * @return Group that this feat belongs to.
+ */
+ inline Feat::Group
+ Feat::getGroup () const {
+ return (this->_group);
+ }
+
+ /**
+ * Determine the creature that this feat is attached to. This function
+ * returns the same value as the Feature::getObject() function. It is
+ * provided solely for the convenience of derived classes.
+ *
+ * @return Creature that this feat is attached to or NULL if not attached.
+ */
+ inline Creature*
+ Feat::getCreature () {
+ return (dynamic_cast<Creature*> (getObject ()));
+ }
+
+ /**
* Determine if a feat is an instance of a specific feat. The
* specific feat is specified by the template parameter T.
*
! * @param featPtr A shared pointer to a feat object.
* @return True if feat is an instance of the specific feat.
*/
Index: Feature.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/core/Feature.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Feature.h 4 Apr 2003 20:22:44 -0000 1.5
--- Feature.h 15 Apr 2003 16:58:36 -0000 1.6
***************
*** 26,29 ****
--- 26,30 ----
# define OGS_CORE_FEATURE_H
+ # include <ogs/support/Attachable.h>
# include <ogs/support/Object.h>
# include <ogs/core/Namespace.h>
***************
*** 37,47 ****
* detached from the object.
*/
! class Feature: public ogs::support::Object {
public:
virtual bool attachObject (Object& object);
virtual bool detachObject ();
!
! const Object* getObject () const;
! Object* getObject ();
virtual ~Feature () = 0;
--- 38,47 ----
* detached from the object.
*/
! class Feature: public ogs::support::Object,
! public ogs::support::Attachable {
public:
virtual bool attachObject (Object& object);
virtual bool detachObject ();
! Object* getObject () const;
virtual ~Feature () = 0;
***************
*** 60,64 ****
* Create a new feature.
*/
! inline Feature::Feature (): _object (NULL) {
// empty constructor body
}
--- 60,65 ----
* Create a new feature.
*/
! inline Feature::Feature ():
! _object (NULL) {
// empty constructor body
}
***************
*** 69,84 ****
* @return Attached object or NULL if not attached.
*/
- inline const ogs::support::Object*
- Feature::getObject () const {
- return (this->_object);
- }
-
- /**
- * Determine the object that this feature is currently attached to.
- *
- * @return Attached object or NULL if not attached.
- */
inline ogs::support::Object*
! Feature::getObject () {
return (this->_object);
}
--- 70,75 ----
* @return Attached object or NULL if not attached.
*/
inline ogs::support::Object*
! Feature::getObject () const {
return (this->_object);
}
Index: Saves.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/core/Saves.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Saves.h 13 Apr 2003 05:25:51 -0000 1.4
--- Saves.h 15 Apr 2003 16:58:36 -0000 1.5
***************
*** 34,39 ****
/**
! * A set of saving throws. The set contains a list of modifiers that
! * are added to rolls for each type of saving throw.
*/
struct Saves {
--- 34,44 ----
/**
! * A set of saving throws. A set of saving throws contains a separate
! * list of modifiers for each type of saving throw. There are three
! * types of saving throws: Fortitude, Reflex, and Will. These modifiers
! * are added to the roll of 1d20 when a saving throw check is made. The
! * @c Saves class encapsulates these modifiers and also contains helper
! * functions for determining base saving throw bonuses at a given
! * experience level and actually checking the roll of a saving throw.
*/
struct Saves {
***************
*** 50,54 ****
bool rollRefSave (Die::Value dc) const;
bool rollWillSave (Die::Value dc) const;
- bool rollSave (Die::Value dc, Modifier::Value totalModifier) const;
};
--- 55,58 ----
***************
*** 57,61 ****
*
* @param xpLevel Experience level of cclass.
! * @return Value of save bonus.
*/
inline Modifier::Value
--- 61,65 ----
*
* @param xpLevel Experience level of cclass.
! * @return Value of base save bonus.
*/
inline Modifier::Value
***************
*** 68,72 ****
*
* @param xpLevel Experience level of cclass.
! * @return Value of save bonus.
*/
inline Modifier::Value
--- 72,76 ----
*
* @param xpLevel Experience level of cclass.
! * @return Value of base save bonus.
*/
inline Modifier::Value
***************
*** 76,129 ****
/**
! * Create a new set of saves. Each saving throw in the set is created
! * as an empty list of modifiers.
*/
! inline Saves::Saves (): fort (), ref (), will () { }
/**
* Roll a Fortitude saving throw. The Fortitude modifiers are added to
! * the roll of 1d20 and compared to a difficulty class.
*
* @param dc Difficulty class of saving throw.
* @return True if saving throw succeeded.
*/
! inline bool Saves::rollFortSave (Die::Value dc) const {
! return (rollSave (dc, fort.getValue ()));
}
/**
* Roll a Reflex saving throw. The Reflex modifiers are added to the
! * roll of 1d20 and compared to a difficulty class.
*
* @param dc Difficulty class of saving throw.
* @return True if saving throw succeeded.
*/
! inline bool Saves::rollRefSave (Die::Value dc) const {
! return (rollSave (dc, ref.getValue ()));
}
/**
* Roll a Will saving throw. The Will modifiers are added to the roll
! * of 1d20 and compared to a difficulty class.
! *
! * @param dc Difficulty class of saving throw.
! * @return True if saving throw succeeded.
! */
! inline bool Saves::rollWillSave (Die::Value dc) const {
! return (rollSave (dc, will.getValue ()));
! }
!
! /**
! * Roll a saving throw. The total modifier is added to the roll of 1d20
! * and compared to a difficulty class (DC). If the result is greater
* than or equal to the DC, the saving throw is successful.
*
* @param dc Difficulty class of saving throw.
- * @param totalModifier Total value of all saving throw modifiers.
* @return True if saving throw succeeded.
*/
inline bool
! Saves::rollSave (Die::Value dc, Modifier::Value totalModifier) const {
! return (Die::roll () + totalModifier >= dc);
}
--- 80,128 ----
/**
! * Create a new set of saves. A new set of saving throws does not
! * contain any modifiers when initially created.
*/
! inline Saves::Saves ():
! fort (), ref (), will () {
! // empty constructor body
! }
/**
* Roll a Fortitude saving throw. The Fortitude modifiers are added to
! * the roll of 1d20 and compared to a difficulty class. If the result
! * is greater than or equal to the DC, the saving throw is successful.
*
* @param dc Difficulty class of saving throw.
* @return True if saving throw succeeded.
*/
! inline bool
! Saves::rollFortSave (Die::Value dc) const {
! return ((Die::roll () + fort.getValue ()) >= dc);
}
/**
* Roll a Reflex saving throw. The Reflex modifiers are added to the
! * roll of 1d20 and compared to a difficulty class. If the result is
! * greater than or equal to the DC, the saving throw is successful.
*
* @param dc Difficulty class of saving throw.
* @return True if saving throw succeeded.
*/
! inline bool
! Saves::rollRefSave (Die::Value dc) const {
! return ((Die::roll () + ref.getValue ()) >= dc);
}
/**
* Roll a Will saving throw. The Will modifiers are added to the roll
! * of 1d20 and compared to a difficulty class. If the result is greater
* than or equal to the DC, the saving throw is successful.
*
* @param dc Difficulty class of saving throw.
* @return True if saving throw succeeded.
*/
inline bool
! Saves::rollWillSave (Die::Value dc) const {
! return ((Die::roll () + will.getValue ()) >= dc);
}
Index: Size.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/core/Size.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Size.h 18 Feb 2003 04:17:21 -0000 1.2
--- Size.h 15 Apr 2003 16:58:37 -0000 1.3
***************
*** 55,59 ****
/** As big as a tree. */
HUGE = 'H',
! /** * As big as a house. */
GARGANTUAN = 'G',
/** As big as a castle. */
--- 55,59 ----
/** As big as a tree. */
HUGE = 'H',
! /** As big as a house. */
GARGANTUAN = 'G',
/** As big as a castle. */
Index: Skill.cpp
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/core/Skill.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Skill.cpp 13 Apr 2003 05:25:51 -0000 1.5
--- Skill.cpp 15 Apr 2003 16:58:37 -0000 1.6
***************
*** 37,40 ****
--- 37,41 ----
* @param useUntrained True if new skill can be used untrained.
* @param useArmorPenalty True if armor penalty applies to skill checks.
+ * @param cclassPoints Points spent on cclass skill.
* @return A new skill.
*
***************
*** 45,56 ****
Ability::Type keyAbility,
bool useUntrained,
! bool useArmorPenalty):
_keyAbility (keyAbility),
_useUntrained (useUntrained),
_useArmorPenalty (useArmorPenalty),
! _cclassPoints (0),
_xclassPoints (0),
_maxPoints (0),
! _rankModifier (),
_modifiers () {
--- 46,59 ----
Ability::Type keyAbility,
bool useUntrained,
! bool useArmorPenalty,
! Points cclassPoints):
! _type (type),
_keyAbility (keyAbility),
_useUntrained (useUntrained),
_useArmorPenalty (useArmorPenalty),
! _cclassPoints (cclassPoints),
_xclassPoints (0),
_maxPoints (0),
! _rankModifier (getRanks (cclassPoints, 0)),
_modifiers () {
Index: Skill.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/core/Skill.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Skill.h 13 Apr 2003 05:25:51 -0000 1.6
--- Skill.h 15 Apr 2003 16:58:37 -0000 1.7
***************
*** 78,82 ****
Skill (Type type, Ability::Type keyAbility,
! bool useUntrained, bool useArmorPenalty);
virtual ~Skill () { }
--- 78,83 ----
Skill (Type type, Ability::Type keyAbility,
! bool useUntrained, bool useArmorPenalty,
! Points cclassPoints = 0);
virtual ~Skill () { }
***************
*** 94,97 ****
--- 95,102 ----
Modifiers& getModifiers ();
+ protected:
+ static Ranks getRanks (Points cclass, Points xclass);
+ bool checkMaximumRanks (Points points, bool cclassSkill);
+
private:
Type _type;
***************
*** 104,110 ****
Modifier _rankModifier;
Modifiers _modifiers;
-
- Ranks getRanks (Points cclass, Points xclass) const;
- bool checkMaximumRanks (Points points, bool cclassSkill);
};
--- 109,112 ----
***************
*** 247,254 ****
/**
* Determine ranks from cclass skill points and cross-cclass skill * points. This function is just a convenient helper function.
*/
inline Skill::Ranks
! Skill::getRanks (Points cclass, Points xclass) const {
! return (cclass + (xclass / 2));
}
--- 249,259 ----
/**
* Determine ranks from cclass skill points and cross-cclass skill * points. This function is just a convenient helper function.
+ *
+ * @param cclassPoints Points spent for cclass skill.
+ * @param xclassPoints Points spent for cross-cclass skill.
*/
inline Skill::Ranks
! Skill::getRanks (Points cclassPoints, Points xclassPoints) {
! return (cclassPoints + (xclassPoints / 2));
}
Index: Strength.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/core/Strength.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Strength.h 4 Apr 2003 20:22:44 -0000 1.2
--- Strength.h 15 Apr 2003 16:58:37 -0000 1.3
***************
*** 33,37 ****
/**
! * An ability that determines physical power and force. A Strength * modifier is added to attack rolls with melee weapons and damage * rolls with melee weapons, thrown weapons, and specially designed * projectile weapons. Strength is a special ability that has * additional operations for determining carrying capacities.
*/
class Strength: public Ability {
--- 33,43 ----
/**
! * An ability that determines physical power and force. A Strength
! * modifier is added to attack rolls with melee weapons and damage
! * rolls with melee weapons, thrown weapons, and specially designed
! * projectile weapons. Strength is a special ability that has
! * additional operations for determining carrying capacities.
! *
! * @todo Change pounds in load functions to locale-dependent units.
*/
class Strength: public Ability {
***************
*** 54,58 ****
*/
inline
! Strength::Strength (): Ability (Ability::STR) {
// empty constructor body
}
--- 60,65 ----
*/
inline
! Strength::Strength ():
! Ability (Ability::STR) {
// empty constructor body
}
|