[ogs-changes] dist/c++/ogs/cclasses Barbarian.h,1.2,1.3 Bard.h,1.2,1.3 Cleric.h,1.2,1.3 Druid.h,1.2,
Status: Alpha
Brought to you by:
elemings
Update of /cvsroot/ogs/dist/c++/ogs/cclasses
In directory sc8-pr-cvs1:/tmp/cvs-serv8515
Modified Files:
Barbarian.h Bard.h Cleric.h Druid.h Fighter.h Monk.h
Paladin.cpp Paladin.h Ranger.h Rogue.h Sorcerer.h Wizard.h
Log Message:
See C++ ChangeLog (Apr 13) for details.
Index: Barbarian.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Barbarian.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Barbarian.h 4 Apr 2003 20:22:41 -0000 1.2
--- Barbarian.h 13 Apr 2003 05:24:49 -0000 1.3
***************
*** 29,43 ****
# include <ogs/core/Die.h>
# include <ogs/core/Saves.h>
-
# include <ogs/cclasses/Namespace.h>
OGS_BEGIN_CCLASSES_NAMESPACE
- using ogs::core::Die;
- using ogs::core::Experience;
- using ogs::core::Modifier;
- using ogs::core::Saves;
- using ogs::core::Skill;
-
/**
* A savage, uncivilized, warlike character class. Barbarians are
--- 29,36 ----
***************
*** 59,74 ****
*
* Barbarians are typically used in fantasy campaign settings though
! * this class can be used in other settings as well..
*/
class Barbarian: public ogs::core::CClass {
public:
! Barbarian (Experience::Level xpLevel = 1);
! Die::Sides getHitDie () const;
! Skill::Points getSkillPoints () const;
protected:
! Modifier::Value getBaseAttackValue () const;
! Modifier::Value getBaseFortSaveValue () const;
};
--- 52,75 ----
*
* Barbarians are typically used in fantasy campaign settings though
! * this class can be used in other settings as well.
*/
class Barbarian: public ogs::core::CClass {
public:
! /**
! * Hit die of barbarians. Barbarians use d12 for their hit die.
! */
! static const ogs::core::Die::Sides HIT_DIE = ogs::core::Die::d12;
! /**
! * Skill rate of barbarians. Barbarians gain 4 skill points per
! * experience level.
! */
! static const ogs::core::Skill::Points SKILL_RATE = 4;
!
! Barbarian (ogs::core::XP::Level xpLevel = 1);
protected:
! ogs::core::Modifier::Value getBaseAttackValue () const;
! ogs::core::Modifier::Value getBaseFortSaveValue () const;
};
***************
*** 78,107 ****
* @param xpLevel Experience level of barbarian.
*/
! inline Barbarian::Barbarian (Experience::Level xpLevel):
! CClass (xpLevel) {
// empty constructor body
}
/**
- * Determine the hit die for this cclass. Barbarians use d12 for their
- * hit die.
- *
- * @return Die::d12.
- */
- inline Die::Sides Barbarian::getHitDie () const {
- return (Die::d12);
- }
-
- /**
- * Determine the skill points per experience level for this cclass.
- * Barbarians gain 4 skill points for each experience level.
- *
- * @return 4 skill points.
- */
- inline Skill::Points Barbarian::getSkillPoints () const {
- return (4);
- }
-
- /**
* Determine the value of base attack bonus for this cclass. Barbarians
* use the strong advancement rate for base attack bonuses.
--- 79,92 ----
* @param xpLevel Experience level of barbarian.
*/
! inline Barbarian::Barbarian (ogs::core::XP::Level xpLevel):
! CClass (HIT_DIE, SKILL_RATE, xpLevel,
! ogs::core::XP::getStrongAttack (xpLevel),
! ogs::core::Saves::getStrongBonus (xpLevel),
! ogs::core::Saves::getWeakBonus (xpLevel),
! ogs::core::Saves::getWeakBonus (xpLevel)) {
// empty constructor body
}
/**
* Determine the value of base attack bonus for this cclass. Barbarians
* use the strong advancement rate for base attack bonuses.
***************
*** 109,114 ****
* @return Value of base attack bonus.
*/
! inline Modifier::Value Barbarian::getBaseAttackValue () const {
! return (Experience::getStrongAttack (getLevel ()));
}
--- 94,100 ----
* @return Value of base attack bonus.
*/
! inline ogs::core::Modifier::Value
! Barbarian::getBaseAttackValue () const {
! return (ogs::core::XP::getStrongAttack (getLevel ()));
}
***************
*** 120,125 ****
* @return Value of base Fortitude save bonus.
*/
! inline Modifier::Value Barbarian::getBaseFortSaveValue () const {
! return (Saves::getStrongBonus (getLevel ()));
}
--- 106,112 ----
* @return Value of base Fortitude save bonus.
*/
! inline ogs::core::Modifier::Value
! Barbarian::getBaseFortSaveValue () const {
! return (ogs::core::Saves::getStrongBonus (getLevel ()));
}
Index: Bard.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Bard.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Bard.h 4 Apr 2003 20:22:41 -0000 1.2
--- Bard.h 13 Apr 2003 05:24:49 -0000 1.3
***************
*** 31,45 ****
# include <ogs/core/Die.h>
# include <ogs/core/Saves.h>
-
# include <ogs/cclasses/Namespace.h>
OGS_BEGIN_CCLASSES_NAMESPACE
- using ogs::core::Die;
- using ogs::core::Experience;
- using ogs::core::Modifier;
- using ogs::core::Saves;
- using ogs::core::Skill;
-
/**
* A "jack-of-all-trades" character class well versed in music and lore.
--- 31,38 ----
***************
*** 65,72 ****
class Bard: public ogs::core::CClass {
public:
! Bard (Experience::Level xpLevel = 1);
! Die::Sides getHitDie () const;
! Skill::Points getSkillPoints () const;
typedef std::vector<unsigned> SpellCounts;
--- 58,73 ----
class Bard: public ogs::core::CClass {
public:
! /**
! * Hit die of bards. Bards use d6 for their hit die.
! */
! static const ogs::core::Die::Sides HIT_DIE = ogs::core::Die::d6;
! /**
! * Skill rate of bards. Bards gain 4 skill points per
! * experience level.
! */
! static const ogs::core::Skill::Points SKILL_RATE = 4;
!
! Bard (ogs::core::XP::Level xpLevel = 1);
typedef std::vector<unsigned> SpellCounts;
***************
*** 75,80 ****
protected:
! Modifier::Value getBaseRefSaveValue () const;
! Modifier::Value getBaseWillSaveValue () const;
};
--- 76,81 ----
protected:
! ogs::core::Modifier::Value getBaseRefSaveValue () const;
! ogs::core::Modifier::Value getBaseWillSaveValue () const;
};
***************
*** 84,114 ****
* @param xpLevel Experience level of bard.
*/
! inline Bard::Bard (Experience::Level xpLevel):
! CClass (xpLevel) {
// empty constructor body
}
/**
- * Determine the hit die for this cclass. Bards use d6 for their hit
- * die.
- *
- * @return Die::d6.
- */
- inline Die::Sides Bard::getHitDie () const {
- return (Die::d6);
- }
-
- /**
- * Determine the skill points per experience level for this cclass.
- * Bards gain 4 skill points for each experience level.
- *
- * @return 4 skill points.
- */
- inline Skill::Points Bard::getSkillPoints () const {
- return (4);
- }
-
-
- /**
* Determine the value of base Reflex save bonus for this cclass. Bards
* use the strong advancement rate for base Reflex save bonuses.
--- 85,98 ----
* @param xpLevel Experience level of bard.
*/
! inline Bard::Bard (ogs::core::XP::Level xpLevel):
! CClass (HIT_DIE, SKILL_RATE, xpLevel,
! ogs::core::XP::getAverageAttack (xpLevel),
! ogs::core::Saves::getWeakBonus (xpLevel),
! ogs::core::Saves::getStrongBonus (xpLevel),
! ogs::core::Saves::getStrongBonus (xpLevel)) {
// empty constructor body
}
/**
* Determine the value of base Reflex save bonus for this cclass. Bards
* use the strong advancement rate for base Reflex save bonuses.
***************
*** 116,121 ****
* @return Value of base Reflex save bonus.
*/
! inline Modifier::Value Bard::getBaseRefSaveValue () const {
! return (Saves::getStrongBonus (getLevel ()));
}
--- 100,106 ----
* @return Value of base Reflex save bonus.
*/
! inline ogs::core::Modifier::Value
! Bard::getBaseRefSaveValue () const {
! return (ogs::core::Saves::getStrongBonus (getLevel ()));
}
***************
*** 126,149 ****
* @return Value of base Will save bonus.
*/
! inline Modifier::Value Bard::getBaseWillSaveValue () const {
! return (Saves::getStrongBonus (getLevel ()));
! }
!
! /**
! * Determine the number of spells that this bard can cast per day.
! *
! * @return Number of spells at each spell leve.
! */
! inline Bard::SpellCounts Bard::getSpellsPerDay () const {
! return (SpellCounts ()); // TODO: Implement.
! }
!
! /**
! * Determine the number of spells knonwn by this bard.
! *
! * @return Number of spells at each spell level.
! */
! inline Bard::SpellCounts Bard::getSpellsKnown () const {
! return (SpellCounts ()); // TODO: Implement.
}
--- 111,117 ----
* @return Value of base Will save bonus.
*/
! inline ogs::core::Modifier::Value
! Bard::getBaseWillSaveValue () const {
! return (ogs::core::Saves::getStrongBonus (getLevel ()));
}
Index: Cleric.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Cleric.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Cleric.h 4 Apr 2003 20:22:41 -0000 1.2
--- Cleric.h 13 Apr 2003 05:24:49 -0000 1.3
***************
*** 31,45 ****
# include <ogs/core/Die.h>
# include <ogs/core/Saves.h>
-
# include <ogs/cclasses/Namespace.h>
OGS_BEGIN_CCLASSES_NAMESPACE
- using ogs::core::Die;
- using ogs::core::Experience;
- using ogs::core::Modifier;
- using ogs::core::Saves;
- using ogs::core::Skill;
-
/**
* A pious character class devoted to the service of a deity. Clerics
--- 31,38 ----
***************
*** 65,72 ****
class Cleric: public ogs::core::CClass {
public:
! Cleric (Experience::Level xpLevel = 1);
! Die::Sides getHitDie () const;
! Skill::Points getSkillPoints () const;
typedef std::vector<unsigned> SpellCounts;
--- 58,73 ----
class Cleric: public ogs::core::CClass {
public:
! /**
! * Hit die of clerics. Clerics use d8 for their hit die.
! */
! static const ogs::core::Die::Sides HIT_DIE = ogs::core::Die::d8;
! /**
! * Skill rate of clerics. Clerics gain 2 skill points per
! * experience level.
! */
! static const ogs::core::Skill::Points SKILL_RATE = 2;
!
! Cleric (ogs::core::XP::Level xpLevel = 1);
typedef std::vector<unsigned> SpellCounts;
***************
*** 74,79 ****
protected:
! Modifier::Value getBaseFortSaveValue () const;
! Modifier::Value getBaseWillSaveValue () const;
};
--- 75,80 ----
protected:
! ogs::core::Modifier::Value getBaseFortSaveValue () const;
! ogs::core::Modifier::Value getBaseWillSaveValue () const;
};
***************
*** 83,112 ****
* @param xpLevel Experience level of cleric.
*/
! inline Cleric::Cleric (Experience::Level xpLevel):
! CClass (xpLevel) {
// empty constructor body
}
/**
- * Determine the hit die for this cclass. Clerics use d8 for their hit
- * die.
- *
- * @return Die::d8.
- */
- inline Die::Sides Cleric::getHitDie () const {
- return (Die::d8);
- }
-
- /**
- * Determine the skill points per experience level for this cclass.
- * Clerics gain 2 skill points for each experience level.
- *
- * @return 2 skill points.
- */
- inline Skill::Points Cleric::getSkillPoints () const {
- return (2);
- }
-
- /**
* Determine the value of base Fortitude save bonus for this cclass.
* Clerics use the strong advancement rate for base Fortitude save
--- 84,97 ----
* @param xpLevel Experience level of cleric.
*/
! inline Cleric::Cleric (ogs::core::XP::Level xpLevel):
! CClass (HIT_DIE, SKILL_RATE, xpLevel,
! ogs::core::XP::getAverageAttack (xpLevel),
! ogs::core::Saves::getStrongBonus (xpLevel),
! ogs::core::Saves::getWeakBonus (xpLevel),
! ogs::core::Saves::getStrongBonus (xpLevel)) {
// empty constructor body
}
/**
* Determine the value of base Fortitude save bonus for this cclass.
* Clerics use the strong advancement rate for base Fortitude save
***************
*** 114,119 ****
* @return Value of base Fortitude save bonus.
*/
! inline Modifier::Value Cleric::getBaseFortSaveValue () const {
! return (Saves::getStrongBonus (getLevel ()));
}
--- 99,105 ----
* @return Value of base Fortitude save bonus.
*/
! inline ogs::core::Modifier::Value
! Cleric::getBaseFortSaveValue () const {
! return (ogs::core::Saves::getStrongBonus (getLevel ()));
}
***************
*** 124,138 ****
* @return Value of base Will save bonus.
*/
! inline Modifier::Value Cleric::getBaseWillSaveValue () const {
! return (Saves::getStrongBonus (getLevel ()));
! }
!
! /**
! * Determine the number of spells that this cleric can cast per day.
! *
! * @return Number of spells at each spell leve.
! */
! inline Cleric::SpellCounts Cleric::getSpellsPerDay () const {
! return (SpellCounts ()); // TODO: Implement.
}
--- 110,116 ----
* @return Value of base Will save bonus.
*/
! inline ogs::core::Modifier::Value
! Cleric::getBaseWillSaveValue () const {
! return (ogs::core::Saves::getStrongBonus (getLevel ()));
}
Index: Druid.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Druid.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Druid.h 4 Apr 2003 20:22:41 -0000 1.2
--- Druid.h 13 Apr 2003 05:24:49 -0000 1.3
***************
*** 31,45 ****
# include <ogs/core/Die.h>
# include <ogs/core/Saves.h>
-
# include <ogs/cclasses/Namespace.h>
OGS_BEGIN_CCLASSES_NAMESPACE
- using ogs::core::Die;
- using ogs::core::Experience;
- using ogs::core::Modifier;
- using ogs::core::Saves;
- using ogs::core::Skill;
-
/**
* A character class that reveres nature. Druids are protectors and
--- 31,38 ----
***************
*** 67,74 ****
class Druid: public ogs::core::CClass {
public:
! Druid (Experience::Level xpLevel = 1);
! Die::Sides getHitDie () const;
! Skill::Points getSkillPoints () const;
typedef std::vector<unsigned> SpellCounts;
--- 60,75 ----
class Druid: public ogs::core::CClass {
public:
! /**
! * Hit die of druids. Druids use d8 for their hit die.
! */
! static const ogs::core::Die::Sides HIT_DIE = ogs::core::Die::d8;
! /**
! * Skill rate of druids. Druids gain 4 skill points per
! * experience level.
! */
! static const ogs::core::Skill::Points SKILL_RATE = 4;
!
! Druid (ogs::core::XP::Level xpLevel = 1);
typedef std::vector<unsigned> SpellCounts;
***************
*** 76,81 ****
protected:
! Modifier::Value getBaseFortSaveValue () const;
! Modifier::Value getBaseWillSaveValue () const;
};
--- 77,82 ----
protected:
! ogs::core::Modifier::Value getBaseFortSaveValue () const;
! ogs::core::Modifier::Value getBaseWillSaveValue () const;
};
***************
*** 85,114 ****
* @param xpLevel Experience level of druid.
*/
! inline Druid::Druid (Experience::Level xpLevel):
! CClass (xpLevel) {
// empty constructor body
}
/**
- * Determine the hit die for this cclass. Druids use d8 for their hit
- * die.
- *
- * @return Die::d8.
- */
- inline Die::Sides Druid::getHitDie () const {
- return (Die::d8);
- }
-
- /**
- * Determine the skill points per experience level for this cclass.
- * Druids gain 4 skill points for each experience level.
- *
- * @return 4 skill points.
- */
- inline Skill::Points Druid::getSkillPoints () const {
- return (4);
- }
-
- /**
* Determine the value of base Fortitude save bonus for this cclass.
* Druids use the strong advancement rate for base Fortitude save
--- 86,99 ----
* @param xpLevel Experience level of druid.
*/
! inline Druid::Druid (ogs::core::XP::Level xpLevel):
! CClass (HIT_DIE, SKILL_RATE, xpLevel,
! ogs::core::XP::getAverageAttack (xpLevel),
! ogs::core::Saves::getStrongBonus (xpLevel),
! ogs::core::Saves::getWeakBonus (xpLevel),
! ogs::core::Saves::getStrongBonus (xpLevel)) {
// empty constructor body
}
/**
* Determine the value of base Fortitude save bonus for this cclass.
* Druids use the strong advancement rate for base Fortitude save
***************
*** 117,122 ****
* @return Value of base Fortitude save bonus.
*/
! inline Modifier::Value Druid::getBaseFortSaveValue () const {
! return (Saves::getStrongBonus (getLevel ()));
}
--- 102,108 ----
* @return Value of base Fortitude save bonus.
*/
! inline ogs::core::Modifier::Value
! Druid::getBaseFortSaveValue () const {
! return (ogs::core::Saves::getStrongBonus (getLevel ()));
}
***************
*** 127,141 ****
* @return Value of base Will save bonus.
*/
! inline Modifier::Value Druid::getBaseWillSaveValue () const {
! return (Saves::getStrongBonus (getLevel ()));
! }
!
! /**
! * Determine the number of spells that this druid can cast per day.
! *
! * @return Number of spells at each spell leve.
! */
! inline Druid::SpellCounts Druid::getSpellsPerDay () const {
! return (SpellCounts ()); // TODO: Implement.
}
--- 113,119 ----
* @return Value of base Will save bonus.
*/
! inline ogs::core::Modifier::Value
! Druid::getBaseWillSaveValue () const {
! return (ogs::core::Saves::getStrongBonus (getLevel ()));
}
Index: Fighter.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Fighter.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Fighter.h 4 Apr 2003 20:22:41 -0000 1.7
--- Fighter.h 13 Apr 2003 05:24:49 -0000 1.8
***************
*** 30,33 ****
--- 30,34 ----
# include <ogs/core/Experience.h>
# include <ogs/core/Skill.h>
+ # include <ogs/core/Types.h>
# include <ogs/cclasses/Namespace.h>
***************
*** 37,41 ****
* A character class formally trained in weapons, armor, and tactics.
* Fighters are prototypical soldiers and mercenaries. Fighters have no
! * alignment restrictions. They may be of any alignment.
*
* At 1st-level, fighers automatically gain the Light, Medium, and Heavy
--- 38,42 ----
* A character class formally trained in weapons, armor, and tactics.
* Fighters are prototypical soldiers and mercenaries. Fighters have no
! * alignment restrictions. They may be of any alignment. <P>
*
* At 1st-level, fighers automatically gain the Light, Medium, and Heavy
***************
*** 44,48 ****
* fighters instead gain a bonus feat at 1st level and every
* even-numbered level thereafter. Fighters can also select the Weapon
! * Specialization feat at 4th-level or higher.
*
* Fighters are a universal cclass. They can be found in virtually all
--- 45,49 ----
* fighters instead gain a bonus feat at 1st level and every
* even-numbered level thereafter. Fighters can also select the Weapon
! * Specialization feat at 4th-level or higher. <P>
*
* Fighters are a universal cclass. They can be found in virtually all
***************
*** 51,64 ****
class Fighter: public ogs::core::CClass {
public:
! Fighter (ogs::core::Experience::Level xpLevel = 1);
! ogs::core::Die::Sides getHitDie () const;
! ogs::core::Skill::Points getSkillPoints () const;
! ogs::core::Modifier::Value getBaseAttack () const;
! ogs::core::Modifier::Value getBaseFortSave () const;
private:
! typedef std::vector<ogs::core::Feat*> Feats;
! Feats _bonusFeats;
};
--- 52,73 ----
class Fighter: public ogs::core::CClass {
public:
! /**
! * Hit die of fighters. Fighters use d10 for their hit die.
! */
! static const ogs::core::Die::Sides HIT_DIE = ogs::core::Die::d10;
! /**
! * Skill rate of fighters. Fighters gain 2 skill points per
! * experience level.
! */
! static const ogs::core::Skill::Points SKILL_RATE = 2;
!
! Fighter (ogs::core::XP::Level xpLevel = 1);
private:
! ogs::core::Feats _bonusFeats;
!
! ogs::core::Modifier::Value getBaseAttack () const;
! ogs::core::Modifier::Value getBaseFortSave () const;
};
***************
*** 68,99 ****
* @param xpLevel Experience level of fighter.
*/
! inline Fighter::Fighter (ogs::core::Experience::Level xpLevel):
! ogs::core::CClass (xpLevel), _bonusFeats () {
// empty constructor body
}
/**
- * Determine the hit die for this cclass. Fighters use d10 for their
- * hit die.
- *
- * @return Die::d10.
- */
- inline ogs::core::Die::Sides
- Fighter::getHitDie () const {
- return (ogs::core::Die::d10);
- }
-
- /**
- * Determine the skill points per experience level for this cclass.
- * Fighters gain 2 skill poitns for each experience level.
- *
- * @return 2 skill points.
- */
- inline ogs::core::Skill::Points
- Fighter::getSkillPoints () const {
- return (2);
- }
-
- /**
* Determine the value of base attack bonus for this cclass. Fighters
* use the strong advancement rate for base attack bonuses.
--- 77,91 ----
* @param xpLevel Experience level of fighter.
*/
! inline Fighter::Fighter (ogs::core::XP::Level xpLevel):
! CClass (HIT_DIE, SKILL_RATE, xpLevel,
! ogs::core::XP::getStrongAttack (xpLevel),
! ogs::core::Saves::getStrongBonus (xpLevel),
! ogs::core::Saves::getWeakBonus (xpLevel),
! ogs::core::Saves::getWeakBonus (xpLevel)),
! _bonusFeats () {
// empty constructor body
}
/**
* Determine the value of base attack bonus for this cclass. Fighters
* use the strong advancement rate for base attack bonuses.
***************
*** 103,107 ****
inline ogs::core::Modifier::Value
Fighter::getBaseAttack () const {
! return (ogs::core::Experience::getStrongAttack (getLevel ()));
}
--- 95,99 ----
inline ogs::core::Modifier::Value
Fighter::getBaseAttack () const {
! return (ogs::core::XP::getStrongAttack (getLevel ()));
}
Index: Monk.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Monk.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Monk.h 4 Apr 2003 20:22:42 -0000 1.2
--- Monk.h 13 Apr 2003 05:24:49 -0000 1.3
***************
*** 29,43 ****
# include <ogs/core/Die.h>
# include <ogs/core/Saves.h>
-
# include <ogs/cclasses/Namespace.h>
OGS_BEGIN_CCLASSES_NAMESPACE
- using ogs::core::Die;
- using ogs::core::Experience;
- using ogs::core::Modifier;
- using ogs::core::Saves;
- using ogs::core::Skill;
-
/**
* A character class dedicated to martial arts. Monks are well known
--- 29,36 ----
***************
*** 62,77 ****
class Monk: public ogs::core::CClass {
public:
! Monk (Experience::Level xpLevel = 1);
! Die::Sides getHitDie () const;
! Skill::Points getSkillPoints () const;
! Die::Sides getUnarmedDamage () const;
! Modifier& getDefenseBonus () const;
protected:
! Modifier::Value getBaseFortSaveValue () const;
! Modifier::Value getBaseRefSaveValue () const;
! Modifier::Value getBaseWillSaveValue () const;
};
--- 55,78 ----
class Monk: public ogs::core::CClass {
public:
! /**
! * Hit die of monks. Monks use d8 for their hit die.
! */
! static const ogs::core::Die::Sides HIT_DIE = ogs::core::Die::d8;
! /**
! * Skill rate of monks. Monks gain 4 skill points per
! * experience level.
! */
! static const ogs::core::Skill::Points SKILL_RATE = 4;
! Monk (ogs::core::XP::Level xpLevel = 1);
!
! ogs::core::Die::Sides getUnarmedDamage () const;
! ogs::core::Modifier& getDefenseBonus () const;
protected:
! ogs::core::Modifier::Value getBaseFortSaveValue () const;
! ogs::core::Modifier::Value getBaseRefSaveValue () const;
! ogs::core::Modifier::Value getBaseWillSaveValue () const;
};
***************
*** 81,110 ****
* @param xpLevel Experience level of monk.
*/
! inline Monk::Monk (Experience::Level xpLevel):
! CClass (xpLevel) {
// empty constructor body
}
/**
- * Determine the hit die for this cclass. Monks use d8 for their hit
- * die.
- *
- * @return Die::d8.
- */
- inline Die::Sides Monk::getHitDie () const {
- return (Die::d8);
- }
-
- /**
- * Determine the skill points per experience level for this cclass.
- * Monks gain 4 skill points for each experience level.
- *
- * @return 4 skill points.
- */
- inline Skill::Points Monk::getSkillPoints () const {
- return (4);
- }
-
- /**
* Determine the value of base Fortitude save bonus for this cclass.
* Monks use the strong advancement rate for base Fortitude save
--- 82,95 ----
* @param xpLevel Experience level of monk.
*/
! inline Monk::Monk (ogs::core::XP::Level xpLevel):
! CClass (HIT_DIE, SKILL_RATE, xpLevel,
! ogs::core::XP::getAverageAttack (xpLevel),
! ogs::core::Saves::getWeakBonus (xpLevel),
! ogs::core::Saves::getWeakBonus (xpLevel),
! ogs::core::Saves::getWeakBonus (xpLevel)) {
// empty constructor body
}
/**
* Determine the value of base Fortitude save bonus for this cclass.
* Monks use the strong advancement rate for base Fortitude save
***************
*** 113,118 ****
* @return Value of base Fortitude save bonus.
*/
! inline Modifier::Value Monk::getBaseFortSaveValue () const {
! return (Saves::getStrongBonus (getLevel ()));
}
--- 98,104 ----
* @return Value of base Fortitude save bonus.
*/
! inline ogs::core::Modifier::Value
! Monk::getBaseFortSaveValue () const {
! return (ogs::core::Saves::getStrongBonus (getLevel ()));
}
***************
*** 123,128 ****
* @return Value of base Reflex save bonus.
*/
! inline Modifier::Value Monk::getBaseRefSaveValue () const {
! return (Saves::getStrongBonus (getLevel ()));
}
--- 109,115 ----
* @return Value of base Reflex save bonus.
*/
! inline ogs::core::Modifier::Value
! Monk::getBaseRefSaveValue () const {
! return (ogs::core::Saves::getStrongBonus (getLevel ()));
}
***************
*** 133,138 ****
* @return Value of base Will save bonus.
*/
! inline Modifier::Value Monk::getBaseWillSaveValue () const {
! return (Saves::getStrongBonus (getLevel ()));
}
--- 120,126 ----
* @return Value of base Will save bonus.
*/
! inline ogs::core::Modifier::Value
! Monk::getBaseWillSaveValue () const {
! return (ogs::core::Saves::getStrongBonus (getLevel ()));
}
Index: Paladin.cpp
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Paladin.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Paladin.cpp 8 Apr 2003 21:43:05 -0000 1.4
--- Paladin.cpp 13 Apr 2003 05:24:49 -0000 1.5
***************
*** 21,60 ****
*/
#include <climits>
! #include "ogs/core/Abilities.h"
! #include "ogs/core/Ability.h"
! #include "ogs/core/Character.h"
! #include "ogs/core/Creature.h"
! #include "ogs/core/Modifier.h"
! #include "ogs/core/Saves.h"
#include "ogs/cclasses/Paladin.h"
#include "ogs/feats/ArmorProficiency.h"
! using ogs::core::Abilities;
! using ogs::core::Ability;
! using ogs::core::AbilityPtr;
! using ogs::core::Character;
! using ogs::core::Creature;
! using ogs::core::Modifier;
! using ogs::core::Saves;
using ogs::cclasses::Paladin;
using ogs::feats::ArmorProficiency;
- static void
- addDivineGrace (Character& character);
- static void
- removeDivineGrace (Character& character);
-
/**
* Create a new Paladin cclass.
*/
! Paladin::Paladin (Experience::Level xpLevel):
! CClass (xpLevel), _feats () {
// empty constructor body
}
/**
! * Attach this Paladin cclass to a character.
*/
bool Paladin::attachObject (Object& object) {
--- 21,58 ----
*/
+ #include <algorithm>
#include <climits>
+ #include <list>
! #include "ogs/Core.h"
#include "ogs/cclasses/Paladin.h"
+ #include "ogs/feats/AllWeapons.h"
#include "ogs/feats/ArmorProficiency.h"
! using namespace ogs::core;
using ogs::cclasses::Paladin;
+ using ogs::feats::AllWeapons;
using ogs::feats::ArmorProficiency;
/**
* Create a new Paladin cclass.
+ *
+ * @param xpLevel Experience level of barbarian.
*/
! Paladin::Paladin (XP::Level xpLevel):
! CClass (HIT_DIE, SKILL_RATE, xpLevel,
! XP::getStrongAttack (xpLevel),
! Saves::getStrongBonus (xpLevel),
! Saves::getWeakBonus (xpLevel),
! Saves::getWeakBonus (xpLevel)),
! _feats () {
// empty constructor body
}
/**
! * Attach this cclass to an object. When a paladin cclass is attached
! * to a character, the Divine Grace feature is added to the creature
! * along with armor and weapon proficiencies if the creature does not
! * already have them.
*/
bool Paladin::attachObject (Object& object) {
***************
*** 63,69 ****
}
! Character& character = dynamic_cast<Character&> (object);
! addDivineGrace (character);
! addProficiencies (character);
return (true);
--- 61,66 ----
}
! addProficiencies ();
! addDivineGrace ();
return (true);
***************
*** 71,97 ****
/**
! * Add armor and weapon proficiency feats of a paladin to a creature.
! *
! * @param character Character to add proficiency feats to.
*/
! void Paladin::addProficiencies (Character& character) {
! // Add armor proficiency feats to creature.
! ArmorProficiency* armorProficiency = ArmorProficiency::createLight ();
! Creature& creature = character.getCreature ();
! if (creature.addFeat (*armorProficiency)) {
! _feats.push_back (armorProficiency);
}
! armorProficiency = ArmorProficiency::createMedium ();
! if (creature.addFeat (*armorProficiency)) {
! _feats.push_back (armorProficiency);
}
! armorProficiency = ArmorProficiency::createHeavy ();
! if (creature.addFeat (*armorProficiency)) {
! _feats.push_back (armorProficiency);
}
! // TODO: Add weapon proficiency feats to creature.
}
--- 68,135 ----
/**
! * Add armor and weapon proficiency feats to creature. Paladins are
! * proficient with all types of armor and simple and martial weapons.
! * If the creature already has some of these feats, shared pointers are
! * stored for these feats so that other classes don't release them.
! * Otherwise, these feats are created and added to the creature.
*/
! void Paladin::addProficiencies () {
! using ogs::items::Armor;
! using ogs::items::Weapon;
!
! // Determine if the creature already has any of these feats.
! Character* character = dynamic_cast<Character*> (getObject ());
! Creature& creature = character->getCreature ();
! Feats feats = creature.getFeats ();
! Feats::iterator itor = feats.begin ();
! std::list<Armor::Proficiency> armors;
! std::list<Weapon::Proficiency> weapons;
!
! while (itor != feats.end ()) {
! FeatPtr featPtr = *itor++;
! ArmorProficiency* armorProficiency =
! dynamic_cast<ArmorProficiency*> (featPtr.get ());
!
! // If the creature has any of these feats, hold a shared pointer so
! // other classes can not release them by accident. Paladins have
! // all armor and all weapon proficiencies so it doesn't matter which
! // type they really are.
! if (armorProficiency != NULL) {
! this->_feats.push_back (featPtr);
! armors.push_back (armorProficiency->getProficiency ());
! } else {
! AllWeapons* allWeapons =
! dynamic_cast<AllWeapons*> (featPtr.get ());
!
! if (allWeapons != NULL) {
! this->_feats.push_back (featPtr);
! weapons.push_back (allWeapons->getProficiency ());
! }
! }
}
! // Create and add any proficiency feats that the creature does not
! // already have.
! std::list<Armor::Proficiency>::iterator end = armors.end ();
! if (std::find (armors.begin (), end, Armor::HEAVY) == end) {
! addProficiency (creature, FeatPtr (ArmorProficiency::createHeavy ()));
}
! if (std::find (armors.begin (), end, Armor::MEDIUM) == end) {
! addProficiency (creature, FeatPtr (ArmorProficiency::createMedium ()));
}
! if (std::find (armors.begin (), end, Armor::LIGHT) == end) {
! addProficiency (creature, FeatPtr (ArmorProficiency::createLight ()));
! }
!
! std::list<Weapon::Proficiency>::iterator wend = weapons.end ();
! if (std::find (weapons.begin (), wend, Weapon::MARTIAL) == wend) {
! addProficiency (creature, FeatPtr (AllWeapons::createMartial ()));
! }
!
! if (std::find (weapons.begin (), wend, Weapon::SIMPLE) == wend) {
! addProficiency (creature, FeatPtr (AllWeapons::createSimple ()));
! }
}
***************
*** 103,111 ****
* @param character Character to add Divine Grace feature to.
*/
! static void
! addDivineGrace (Character& character) {
! Creature& creature = character.getCreature ();
Abilities& abilities = creature.getAbilities ();
AbilityPtr cha = abilities [Ability::CHA];
if (cha) {
Modifier& modifier = cha->getModifier ();
--- 141,150 ----
* @param character Character to add Divine Grace feature to.
*/
! void Paladin::addDivineGrace () {
! Character* character = dynamic_cast<Character*> (getObject ());
! Creature& creature = character->getCreature ();
Abilities& abilities = creature.getAbilities ();
AbilityPtr cha = abilities [Ability::CHA];
+
if (cha) {
Modifier& modifier = cha->getModifier ();
***************
*** 120,134 ****
/**
! * Detach this Paladin cclass from a character.
*/
bool Paladin::detachObject () {
- Object* object = getObject ();
- Character* character = dynamic_cast<Character*> (object);
- if (character != NULL) {
- removeDivineGrace (*character);
- removeProficiencies (*character);
- }
! return (CClass::detachObject ());
}
--- 159,188 ----
/**
! * Detach this cclass from an object. The Paladin class is implemented
! * so that it can be detached from a character.
*/
bool Paladin::detachObject () {
! removeDivineGrace ();
! removeProficiencies ();
!
! return (true);
! }
!
! /**
! * Remove or release any proficiencies that were added to or held from
! * the creature.
! */
! void Paladin::removeProficiencies () {
! Character* character = dynamic_cast<Character*> (getObject ());
! Creature& creature = character->getCreature ();
!
! for (Feats::iterator itor = this->_feats.begin ();
! itor != this->_feats.end (); ++itor) {
! FeatPtr featPtr = *itor;
! if (creature.removeFeat (featPtr)) {
! this->_feats.erase (itor);
! }
! }
}
***************
*** 138,146 ****
* creature.
*/
! static void
! removeDivineGrace (Character& character) {
! Creature& creature = character.getCreature ();
! Abilities& abilities = creature.getAbilities ();
! AbilityPtr cha = abilities [Ability::CHA];
if (cha) {
Modifier& modifier = cha->getModifier ();
--- 192,200 ----
* creature.
*/
! void Paladin::removeDivineGrace () {
! Character* character = dynamic_cast<Character*> (getObject ());
! Creature& creature = character->getCreature ();
! AbilityPtr cha = (creature.getAbilities ()) [Ability::CHA];
!
if (cha) {
Modifier& modifier = cha->getModifier ();
***************
*** 153,170 ****
/**
- * Remove any proficiencies that were added to a creature.
- */
- void Paladin::removeProficiencies (Character& character) {
- // Remove armor proficiency feats from creature.
- Creature& creature = character.getCreature ();
- for (Feats::size_type i = 0; i < _feats.size (); ++i) {
- ogs::core::Feat* feat = _feats [i];
- creature.removeFeat (*feat);
- }
-
- // TODO: Remove weapon proficiency feats.
- }
-
- /**
* Determine the number of spells that this paladin can cast per day.
* The vector index of the return value is the spell level. If the
--- 207,210 ----
***************
*** 196,200 ****
};
! Experience::Level xpLevel = getLevel ();
SpellCounts spellCounts;
if (xpLevel >= 4) {
--- 236,240 ----
};
! XP::Level xpLevel = getLevel ();
SpellCounts spellCounts;
if (xpLevel >= 4) {
Index: Paladin.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Paladin.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Paladin.h 4 Apr 2003 20:22:42 -0000 1.2
--- Paladin.h 13 Apr 2003 05:24:49 -0000 1.3
***************
*** 30,45 ****
# include <ogs/core/CClass.h>
# include <ogs/core/Die.h>
# include <ogs/core/Saves.h>
!
# include <ogs/cclasses/Namespace.h>
OGS_BEGIN_CCLASSES_NAMESPACE
- using ogs::core::Die;
- using ogs::core::Experience;
- using ogs::core::Modifier;
- using ogs::core::Saves;
- using ogs::core::Skill;
-
/**
* A character class that strives to be the paragon of virtue. Paladins
--- 30,40 ----
# include <ogs/core/CClass.h>
# include <ogs/core/Die.h>
+ # include <ogs/core/Experience.h>
# include <ogs/core/Saves.h>
! # include <ogs/core/Types.h>
# include <ogs/cclasses/Namespace.h>
OGS_BEGIN_CCLASSES_NAMESPACE
/**
* A character class that strives to be the paragon of virtue. Paladins
***************
*** 63,127 ****
class Paladin: public ogs::core::CClass {
public:
! Paladin (Experience::Level xpLevel = 1);
! bool attachObject (Object& object);
! bool detachObject ();
! Die::Sides getHitDie () const;
! Skill::Points getSkillPoints () const;
typedef std::vector<unsigned> SpellCounts;
SpellCounts getSpellsPerDay () const;
private:
! typedef std::vector<ogs::core::Feat*> Feats;
! Feats _feats;
! Modifier::Value getBaseAttackValue () const;
! Modifier::Value getBaseFortSaveValue () const;
! void addProficiencies (ogs::core::Character& character);
! void removeProficiencies (ogs::core::Character& character);
};
! /**
! * Determine the hit die for this cclass. Paladins use d10 for their
! * hit die.
! *
! * @return Die::d10.
! */
! inline Die::Sides Paladin::getHitDie () const {
! return (Die::d10);
! }
!
! /**
! * Determine the skill points per experience level for this cclass.
! * Paladins gain 2 skill points for each experience level.
! *
! * @return 2 skill points.
! */
! inline Skill::Points Paladin::getSkillPoints () const {
! return (2);
! }
!
! /**
! * Determine the value of base attack bonus for this cclass. Paladins
! * use the strong advancement rate for base attack bonuses.
! *
! * @return Value of base attack bonus.
! */
! inline Modifier::Value Paladin::getBaseAttackValue () const {
! return (Experience::getStrongAttack (getLevel ()));
! }
!
! /**
! * Determine the value of base Fortitude save bonus for this cclass.
! * Paladins use the strong advancement rate for base Fortitude save
! * bonuses.
! *
! * @return Value of base Fortitude save bonus.
! */
! inline Modifier::Value Paladin::getBaseFortSaveValue () const {
! return (Saves::getStrongBonus (getLevel ()));
}
--- 58,105 ----
class Paladin: public ogs::core::CClass {
public:
! /**
! * Hit die of paladins. Paladins use d12 for their hit die.
! */
! static const ogs::core::Die::Sides HIT_DIE = ogs::core::Die::d10;
! /**
! * Skill rate of paladins. Paladins gain 2 skill points per
! * experience level.
! */
! static const ogs::core::Skill::Points SKILL_RATE = 2;
! Paladin (ogs::core::XP::Level xpLevel = 1);
!
! bool attachObject (ogs::support::Object& object);
! bool detachObject ();
+ /**
+ * An array of spell counts. Each element in the array represents
+ * the number of spells for that spell level. The spell level is
+ * the same as the index of the array.
+ */
typedef std::vector<unsigned> SpellCounts;
+
SpellCounts getSpellsPerDay () const;
private:
! ogs::core::Feats _feats;
! class ogs::core::Creature;
! void addProficiency (ogs::core::Creature& creature,
! ogs::core::FeatPtr featPtr);
! void addProficiencies ();
! void removeProficiencies ();
! void addDivineGrace ();
! void removeDivineGrace ();
};
! inline void
! Paladin::addProficiency (ogs::core::Creature& creature,
! ogs::core::FeatPtr featPtr) {
! if (creature.addFeat (featPtr)) {
! this->_feats.push_back (featPtr);
! }
}
Index: Ranger.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Ranger.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Ranger.h 4 Apr 2003 20:22:42 -0000 1.2
--- Ranger.h 13 Apr 2003 05:24:49 -0000 1.3
***************
*** 31,45 ****
# include <ogs/core/Die.h>
# include <ogs/core/Saves.h>
-
# include <ogs/cclasses/Namespace.h>
OGS_BEGIN_CCLASSES_NAMESPACE
- using ogs::core::Die;
- using ogs::core::Experience;
- using ogs::core::Modifier;
- using ogs::core::Saves;
- using ogs::core::Skill;
-
/**
* A character class skilled at outdoor hunting and survival. Rangers
--- 31,38 ----
***************
*** 68,75 ****
class Ranger: public ogs::core::CClass {
public:
! Ranger (Experience::Level xpLevel = 1);
! Die::Sides getHitDie () const;
! Skill::Points getSkillPoints () const;
typedef std::vector<unsigned> SpellCounts;
--- 61,76 ----
class Ranger: public ogs::core::CClass {
public:
! /**
! * Hit die of rangers. Rangers use d10 for their hit die.
! */
! static const ogs::core::Die::Sides HIT_DIE = ogs::core::Die::d10;
! /**
! * Skill rate of rangers. Rangers gain 4 skill points per
! * experience level.
! */
! static const ogs::core::Skill::Points SKILL_RATE = 4;
!
! Ranger (ogs::core::XP::Level xpLevel = 1);
typedef std::vector<unsigned> SpellCounts;
***************
*** 77,82 ****
protected:
! Modifier::Value getBaseAttackValue () const;
! Modifier::Value getBaseFortSaveValue () const;
};
--- 78,83 ----
protected:
! ogs::core::Modifier::Value getBaseAttackValue () const;
! ogs::core::Modifier::Value getBaseFortSaveValue () const;
};
***************
*** 86,115 ****
* @param xpLevel Experience level of ranger.
*/
! inline Ranger::Ranger (Experience::Level xpLevel):
! CClass (xpLevel) {
// empty constructor body
}
/**
- * Determine the hit die for this cclass. Rangers use d10 for their hit
- * die.
- *
- * @return Die::d10.
- */
- inline Die::Sides Ranger::getHitDie () const {
- return (Die::d10);
- }
-
- /**
- * Determine the skill points per experience level for this cclass.
- * Rangers gain 4 skill points for each experience level.
- *
- * @return 4 skill points.
- */
- inline Skill::Points Ranger::getSkillPoints () const {
- return (4);
- }
-
- /**
* Determine the value of base attack bonus for this cclass. Rangers
* use the strong advancement rate for base attack bonuses.
--- 87,100 ----
* @param xpLevel Experience level of ranger.
*/
! inline Ranger::Ranger (ogs::core::XP::Level xpLevel):
! CClass (HIT_DIE, SKILL_RATE, xpLevel,
! ogs::core::XP::getAverageAttack (xpLevel),
! ogs::core::Saves::getWeakBonus (xpLevel),
! ogs::core::Saves::getWeakBonus (xpLevel),
! ogs::core::Saves::getWeakBonus (xpLevel)) {
// empty constructor body
}
/**
* Determine the value of base attack bonus for this cclass. Rangers
* use the strong advancement rate for base attack bonuses.
***************
*** 117,122 ****
* @return Value of base attack bonus.
*/
! inline Modifier::Value Ranger::getBaseAttackValue () const {
! return (Experience::getStrongAttack (getLevel ()));
}
--- 102,108 ----
* @return Value of base attack bonus.
*/
! inline ogs::core::Modifier::Value
! Ranger::getBaseAttackValue () const {
! return (ogs::core::XP::getStrongAttack (getLevel ()));
}
***************
*** 128,142 ****
* @return Value of base Fortitude save bonus.
*/
! inline Modifier::Value Ranger::getBaseFortSaveValue () const {
! return (Saves::getStrongBonus (getLevel ()));
! }
!
! /**
! * Determine the number of spells that this ranger can cast per day.
! *
! * @return Number of spells at each spell leve.
! */
! inline Ranger::SpellCounts Ranger::getSpellsPerDay () const {
! return (SpellCounts ()); // TODO: Implement.
}
--- 114,120 ----
* @return Value of base Fortitude save bonus.
*/
! inline ogs::core::Modifier::Value
! Ranger::getBaseFortSaveValue () const {
! return (ogs::core::Saves::getStrongBonus (getLevel ()));
}
Index: Rogue.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Rogue.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Rogue.h 4 Apr 2003 20:22:42 -0000 1.2
--- Rogue.h 13 Apr 2003 05:24:49 -0000 1.3
***************
*** 31,45 ****
# include <ogs/core/Die.h>
# include <ogs/core/Saves.h>
-
# include <ogs/cclasses/Namespace.h>
OGS_BEGIN_CCLASSES_NAMESPACE
- using ogs::core::Die;
- using ogs::core::Experience;
- using ogs::core::Modifier;
- using ogs::core::Saves;
- using ogs::core::Skill;
-
/**
* A character class adept at "obtaining the unobtainable". Rogues
--- 31,38 ----
***************
*** 58,68 ****
class Rogue: public ogs::core::CClass {
public:
! Rogue (Experience::Level xpLevel = 1);
! Die::Sides getHitDie () const;
! Skill::Points getSkillPoints () const;
protected:
! Modifier::Value getBaseRefSaveValue () const;
};
--- 51,69 ----
class Rogue: public ogs::core::CClass {
public:
! /**
! * Hit die of rogues. Rogues use d6 for their hit die.
! */
! static const ogs::core::Die::Sides HIT_DIE = ogs::core::Die::d6;
! /**
! * Skill rate of rogues. Rogues gain 8 skill points per
! * experience level.
! */
! static const ogs::core::Skill::Points SKILL_RATE = 8;
!
! Rogue (ogs::core::XP::Level xpLevel = 1);
protected:
! ogs::core::Modifier::Value getBaseRefSaveValue () const;
};
***************
*** 72,101 ****
* @param xpLevel Experience level of rogue.
*/
! inline Rogue::Rogue (Experience::Level xpLevel):
! CClass (xpLevel) {
// empty constructor body
}
/**
- * Determine the hit die for this cclass. Rogues use d6 for their hit
- * die.
- *
- * @return Die::d6.
- */
- inline Die::Sides Rogue::getHitDie () const {
- return (Die::d6);
- }
-
- /**
- * Determine the skill points per experience level for this cclass.
- * Rogues gain 8 skill points for each experience level.
- *
- * @return 8 skill points.
- */
- inline Skill::Points Rogue::getSkillPoints () const {
- return (8);
- }
-
- /**
* Determine the value of base Reflex save bonus for this cclass.
* Rogues use the strong advancement rate for base Reflex save bonuses.
--- 73,86 ----
* @param xpLevel Experience level of rogue.
*/
! inline Rogue::Rogue (ogs::core::XP::Level xpLevel):
! CClass (HIT_DIE, SKILL_RATE, xpLevel,
! ogs::core::XP::getAverageAttack (xpLevel),
! ogs::core::Saves::getWeakBonus (xpLevel),
! ogs::core::Saves::getWeakBonus (xpLevel),
! ogs::core::Saves::getWeakBonus (xpLevel)) {
// empty constructor body
}
/**
* Determine the value of base Reflex save bonus for this cclass.
* Rogues use the strong advancement rate for base Reflex save bonuses.
***************
*** 103,108 ****
* @return Value of base Reflex save bonus.
*/
! inline Modifier::Value Rogue::getBaseRefSaveValue () const {
! return (Saves::getWeakBonus (getLevel ()));
}
--- 88,94 ----
* @return Value of base Reflex save bonus.
*/
! inline ogs::core::Modifier::Value
! Rogue::getBaseRefSaveValue () const {
! return (ogs::core::Saves::getWeakBonus (getLevel ()));
}
Index: Sorcerer.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Sorcerer.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Sorcerer.h 4 Apr 2003 20:22:42 -0000 1.2
--- Sorcerer.h 13 Apr 2003 05:24:49 -0000 1.3
***************
*** 31,45 ****
# include <ogs/core/Die.h>
# include <ogs/core/Saves.h>
-
# include <ogs/cclasses/Namespace.h>
OGS_BEGIN_CCLASSES_NAMESPACE
- using ogs::core::Die;
- using ogs::core::Experience;
- using ogs::core::Modifier;
- using ogs::core::Saves;
- using ogs::core::Skill;
-
/**
* A character class with inherent spell casting abilities. Sorcerers
--- 31,38 ----
***************
*** 48,59 ****
* are more limited in their range of spell casting abilities but do not
* have to memorize spells before casting them. They are also
! * proficient with all simple weapons.
*/
class Sorcerer: public ogs::core::CClass {
public:
! Sorcerer (Experience::Level xpLevel = 1);
! Die::Sides getHitDie () const;
! Skill::Points getSkillPoints () const;
typedef std::vector<unsigned> SpellCounts;
--- 41,62 ----
* are more limited in their range of spell casting abilities but do not
* have to memorize spells before casting them. They are also
! * proficient with all simple weapons. <P>
! *
! * Sorcerers are typically found in fantasy campaign settings.
*/
class Sorcerer: public ogs::core::CClass {
public:
! /**
! * Hit die of sorcerers. Sorcerers use d4 for their hit die.
! */
! static const ogs::core::Die::Sides HIT_DIE = ogs::core::Die::d4;
! /**
! * Skill rate of sorcerers. Sorcerers gain 2 skill points per
! * experience level.
! */
! static const ogs::core::Skill::Points SKILL_RATE = 2;
!
! Sorcerer (ogs::core::XP::Level xpLevel = 1);
typedef std::vector<unsigned> SpellCounts;
***************
*** 62,67 ****
protected:
! Modifier::Value getBaseAttackValue () const;
! Modifier::Value getBaseWillSaveValue () const;
};
--- 65,70 ----
protected:
! ogs::core::Modifier::Value getBaseAttackValue () const;
! ogs::core::Modifier::Value getBaseWillSaveValue () const;
};
***************
*** 71,100 ****
* @param xpLevel Experience level of sorcerer.
*/
! inline Sorcerer::Sorcerer (Experience::Level xpLevel):
! CClass (xpLevel) {
// empty constructor body
}
/**
- * Determine the hit die for this cclass. Sorcerers use d4 for their
- * hit die.
- *
- * @return Die::d4.
- */
- inline Die::Sides Sorcerer::getHitDie () const {
- return (Die::d4);
- }
-
- /**
- * Determine the skill points per experience level for this cclass.
- * Sorcerers gain 2 skill points for each experience level.
- *
- * @return 2 skill points.
- */
- inline Skill::Points Sorcerer::getSkillPoints () const {
- return (2);
- }
-
- /**
* Determine the value of base attack bonus for this cclass. Sorcerers
* use the weak advancment rate for base attack bonuses.
--- 74,87 ----
* @param xpLevel Experience level of sorcerer.
*/
! inline Sorcerer::Sorcerer (ogs::core::XP::Level xpLevel):
! CClass (HIT_DIE, SKILL_RATE, xpLevel,
! ogs::core::XP::getAverageAttack (xpLevel),
! ogs::core::Saves::getWeakBonus (xpLevel),
! ogs::core::Saves::getWeakBonus (xpLevel),
! ogs::core::Saves::getWeakBonus (xpLevel)) {
// empty constructor body
}
/**
* Determine the value of base attack bonus for this cclass. Sorcerers
* use the weak advancment rate for base attack bonuses.
***************
*** 102,107 ****
* @return Value of base attack bonus.
*/
! inline Modifier::Value Sorcerer::getBaseAttackValue () const {
! return (Experience::getWeakAttack (getLevel ()));
}
--- 89,95 ----
* @return Value of base attack bonus.
*/
! inline ogs::core::Modifier::Value
! Sorcerer::getBaseAttackValue () const {
! return (ogs::core::XP::getWeakAttack (getLevel ()));
}
***************
*** 112,117 ****
* @return Value of base Will save bonus.
*/
! inline Modifier::Value Sorcerer::getBaseWillSaveValue () const {
! return (Saves::getStrongBonus (getLevel ()));
}
--- 100,106 ----
* @return Value of base Will save bonus.
*/
! inline ogs::core::Modifier::Value
! Sorcerer::getBaseWillSaveValue () const {
! return (ogs::core::Saves::getStrongBonus (getLevel ()));
}
Index: Wizard.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Wizard.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Wizard.h 4 Apr 2003 20:22:42 -0000 1.2
--- Wizard.h 13 Apr 2003 05:24:49 -0000 1.3
***************
*** 31,45 ****
# include <ogs/core/Die.h>
# include <ogs/core/Saves.h>
-
# include <ogs/cclasses/Namespace.h>
OGS_BEGIN_CCLASSES_NAMESPACE
- using ogs::core::Die;
- using ogs::core::Experience;
- using ogs::core::Modifier;
- using ogs::core::Saves;
- using ogs::core::Skill;
-
/**
* A character class devoted to the mastery of arcane magic. Wizards
--- 31,38 ----
***************
*** 73,80 ****
class Wizard: public ogs::core::CClass {
public:
! Wizard (Experience::Level xpLevel = 1);
! Die::Sides getHitDie () const;
! Skill::Points getSkillPoints () const;
typedef std::vector<unsigned> SpellCounts;
--- 66,81 ----
class Wizard: public ogs::core::CClass {
public:
! /**
! * Hit die of wizards. Wizards use d4 for their hit die.
! */
! static const ogs::core::Die::Sides HIT_DIE = ogs::core::Die::d4;
! /**
! * Skill rate of wizards. Wizards gain 2 skill points per
! * experience level.
! */
! static const ogs::core::Skill::Points SKILL_RATE = 2;
!
! Wizard (ogs::core::XP::Level xpLevel = 1);
typedef std::vector<unsigned> SpellCounts;
***************
*** 82,90 ****
protected:
! Modifier::Value getBaseAttackValue () const;
! Modifier::Value getBaseWillSaveValue () const;
private:
! School specialty;
};
--- 83,91 ----
protected:
! ogs::core::Modifier::Value getBaseAttackValue () const;
! ogs::core::Modifier::Value getBaseWillSaveValue () const;
private:
! //Specialty _specialty;
};
***************
*** 94,123 ****
* @param xpLevel Experience level of wizard.
*/
! inline Wizard::Wizard (Experience::Level xpLevel):
! CClass (xpLevel) {
// empty constructor body
}
/**
- * Determine the hit die for this class. Wizards use d4 for their hit
- * die.
- *
- * @return Die::d4.
- */
- inline Die::Sides Wizard::getHitDie () const {
- return (Die::d4);
- }
-
- /**
- * Determine the skill points per experience level for wizards. Wizards
- * gain 2 skill points for each experience level.
- *
- * @return 2 skill points.
- */
- inline Skill::Points Wizard::getSkillPoints () const {
- return (2);
- }
-
- /**
* Determine the value of base attack bonus for wizards. Wizards use
* the weak advancement rate for base attack bonuses.
--- 95,108 ----
* @param xpLevel Experience level of wizard.
*/
! inline Wizard::Wizard (ogs::core::XP::Level xpLevel):
! CClass (HIT_DIE, SKILL_RATE, xpLevel,
! ogs::core::XP::getAverageAttack (xpLevel),
! ogs::core::Saves::getWeakBonus (xpLevel),
! ogs::core::Saves::getWeakBonus (xpLevel),
! ogs::core::Saves::getWeakBonus (xpLevel)) {
// empty constructor body
}
/**
* Determine the value of base attack bonus for wizards. Wizards use
* the weak advancement rate for base attack bonuses.
***************
*** 125,130 ****
* @return Value of base attack bonus.
*/
! inline Modifier::Value Wizard::getBaseAttackValue () const {
! return (Experience::getWeakAttack (getLevel ()));
}
--- 110,116 ----
* @return Value of base attack bonus.
*/
! inline ogs::core::Modifier::Value
! Wizard::getBaseAttackValue () const {
! return (ogs::core::XP::getWeakAttack (getLevel ()));
}
***************
*** 135,149 ****
* @return Value of base Will save bonus.
*/
! inline Modifier::Value Wizard::getBaseWillSaveValue () const {
! return (Saves::getStrongBonus (getLevel ()));
! }
!
! /**
! * Determine the number of spells that this wizard can cast per day.
! *
! * @return Number of spells at each spell leve.
! */
! inline Wizard::SpellCounts Wizard::getSpellsPerDay () const {
! return (SpellCounts ()); // TODO: Implement.
}
--- 121,127 ----
* @return Value of base Will save bonus.
*/
! inline ogs::core::Modifier::Value
! Wizard::getBaseWillSaveValue () const {
! return (ogs::core::Saves::getStrongBonus (getLevel ()));
}
|