ogs-changes Mailing List for Open Gaming System (Page 7)
Status: Alpha
Brought to you by:
elemings
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
(35) |
Apr
(96) |
May
(22) |
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
|---|
Update of /cvsroot/ogs/dist/c++/ogs/magic In directory sc8-pr-cvs1:/tmp/cvs-serv1939/c++/ogs/magic Modified Files: Ability.cpp Component.cpp LevelRange.cpp MetamagicFeat.cpp School.cpp Spell.cpp SpellList.cpp Subschool.cpp Log Message: See C++ ChangeLog file (Mar 24) for details. Index: Ability.cpp =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/magic/Ability.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Ability.cpp 5 Feb 2003 06:01:28 -0000 1.2 --- Ability.cpp 25 Mar 2003 06:13:13 -0000 1.3 *************** *** 21,25 **** */ ! #include "Ability.h" using ogs::core::Modifier; --- 21,25 ---- */ ! #include "ogs/magic/Ability.h" using ogs::core::Modifier; Index: Component.cpp =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/magic/Component.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Component.cpp 27 Feb 2003 22:42:17 -0000 1.3 --- Component.cpp 25 Mar 2003 06:13:13 -0000 1.4 *************** *** 24,28 **** #include <stdexcept> ! #include "Component.h" using ogs::magic::Component; --- 24,28 ---- #include <stdexcept> ! #include "ogs/magic/Component.h" using ogs::magic::Component; Index: LevelRange.cpp =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/magic/LevelRange.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** LevelRange.cpp 7 Jan 2003 07:41:33 -0000 1.1 --- LevelRange.cpp 25 Mar 2003 06:13:13 -0000 1.2 *************** *** 21,25 **** */ ! #include "LevelRange.h" using ogs::magic::LevelRange; --- 21,25 ---- */ ! #include "ogs/magic/LevelRange.h" using ogs::magic::LevelRange; Index: MetamagicFeat.cpp =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/magic/MetamagicFeat.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MetamagicFeat.cpp 25 Feb 2003 19:40:25 -0000 1.3 --- MetamagicFeat.cpp 25 Mar 2003 06:13:13 -0000 1.4 *************** *** 23,28 **** #include <typeinfo> ! #include "MetamagicFeat.h" ! #include "Spell.h" using ogs::magic::MetamagicFeat; --- 23,28 ---- #include <typeinfo> ! #include "ogs/magic/MetamagicFeat.h" ! #include "ogs/magic/Spell.h" using ogs::magic::MetamagicFeat; Index: School.cpp =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/magic/School.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** School.cpp 7 Jan 2003 07:41:33 -0000 1.1 --- School.cpp 25 Mar 2003 06:13:13 -0000 1.2 *************** *** 24,28 **** #include <stdexcept> ! #include "School.h" using ogs::magic::School; --- 24,28 ---- #include <stdexcept> ! #include "ogs/magic/School.h" using ogs::magic::School; Index: Spell.cpp =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/magic/Spell.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Spell.cpp 25 Feb 2003 19:40:26 -0000 1.2 --- Spell.cpp 25 Mar 2003 06:13:13 -0000 1.3 *************** *** 21,25 **** */ ! #include "Spell.h" using ogs::magic::Descriptors; --- 21,25 ---- */ ! #include "ogs/magic/Spell.h" using ogs::magic::Descriptors; Index: SpellList.cpp =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/magic/SpellList.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SpellList.cpp 28 Feb 2003 11:11:25 -0000 1.1 --- SpellList.cpp 25 Mar 2003 06:13:13 -0000 1.2 *************** *** 21,25 **** */ ! #include "SpellList.h" using ogs::magic::SpellList; --- 21,25 ---- */ ! #include "ogs/magic/SpellList.h" using ogs::magic::SpellList; Index: Subschool.cpp =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/magic/Subschool.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Subschool.cpp 7 Jan 2003 07:41:33 -0000 1.1 --- Subschool.cpp 25 Mar 2003 06:13:13 -0000 1.2 *************** *** 24,28 **** #include <stdexcept> ! #include "Subschool.h" using ogs::magic::Subschool; --- 24,28 ---- #include <stdexcept> ! #include "ogs/magic/Subschool.h" using ogs::magic::Subschool; |
|
From: <ele...@us...> - 2003-03-25 06:13:18
|
Update of /cvsroot/ogs/dist/c++/ogs/feats
In directory sc8-pr-cvs1:/tmp/cvs-serv1939/c++/ogs/feats
Modified Files:
Alertness.cpp Alertness.h ArmorProficiency.cpp
ArmorProficiency.h BonusFeat.h ImprovedInitiative.h
Makefile.am
Added Files:
ImprovedInitiative.cpp ImprovedSave.cpp ImprovedSave.h
Removed Files:
GreatFortitude.h IronWill.h LightningReflexes.h
Log Message:
See C++ ChangeLog file (Mar 24) for details.
--- NEW FILE: ImprovedSave.cpp ---
/*
* ImprovedSave.cpp -- class implementation for Improved Save feats
* Copyright (C) 2003 Eric Lemings <ele...@us...>
*
* This software is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA
*
* RCS: $Id: ImprovedSave.cpp,v 1.1 2003/03/25 06:13:13 elemings Exp $
*/
#include <cassert>
#include "ogs/core/Creature.h"
#include "ogs/feats/ImprovedSave.h"
using ogs::core::Creature;
using ogs::core::Saves;
using ogs::feats::ImprovedSave;
ogs::core::Modifier ImprovedSave::_modifier (+2);
/**
* Create a new Great Fortitude feat.
*/
ImprovedSave* ImprovedSave::createGreatFortitude () {
return (new ImprovedSave (GREAT_FORTITUDE));
}
/**
* Create a new Iron Will feat.
*/
ImprovedSave* ImprovedSave::createIronWill () {
return (new ImprovedSave (IRON_WILL));
}
/**
* Create a new Great Fortitude feat.
*/
ImprovedSave* ImprovedSave::createLightningReflexes() {
return (new ImprovedSave (LIGHTNING_REFLEXES));
}
/**
* Create a new Improved Save feat.
*
* @param type One of the three types of improved saves.
*/
ImprovedSave::ImprovedSave (Type type): _type (type) {
// empty constructor body
}
/**
* Determine if this feat can be attached to an object. Since Great
* Fortitude feats are exclusive feats, they can only be attached to
* objects that do not already have this feat.
*
* @param object Object to attach this feature to.
* @return True if the feature is attached to the object.
*/
bool ImprovedSave::canAttach (Object& object) const {
return (Feat::canAttach (object) &&
!Feat::findFeat<ImprovedSave> (object));
}
/**
* Attach this Improved Save feat to a creature.
*
* @param object Creature to attach Improved Save to.
* @return True if feat is attached to creature.
*/
bool ImprovedSave::attachObject (Object& object) {
bool attached = attachObject (object);
if (attached) {
Creature* creature = dynamic_cast<Creature*> (&object);
if (creature != NULL) {
Saves& saves = creature->getSaves ();
if (this->_type == GREAT_FORTITUDE) {
saves.fort.addModifier (this->_modifier);
} else if (this->_type == IRON_WILL) {
saves.will.addModifier (this->_modifier);
} else {
assert (this->_type == LIGHTNING_REFLEXES);
saves.ref.addModifier (this->_modifier);
}
}
}
return (attached);
}
/**
* Detach this Improved Save feat from a creature.
*
* @return True if feat is detached from creature.
*/
bool ImprovedSave::detachObject () {
Creature* creature = dynamic_cast<Creature*> (getObject ());
assert (creature != NULL);
bool detached = detachObject ();
if (detached) {
Saves& saves = creature->getSaves ();
if (this->_type == GREAT_FORTITUDE) {
saves.fort.removeModifier (this->_modifier);
} else if (this->_type == IRON_WILL) {
saves.will.removeModifier (this->_modifier);
} else {
assert (this->_type == LIGHTNING_REFLEXES);
saves.ref.removeModifier (this->_modifier);
}
}
return (detached);
}
--- NEW FILE: ImprovedSave.h ---
/*
* ImprovedSave.h -- class interface for Improved Save feat
* Copyright (C) 2002 Eric Lemings <ele...@us...>
*
* This software is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA
*
* RCS: $Id: ImprovedSave.h,v 1.1 2003/03/25 06:13:13 elemings Exp $
*/
#ifdef __cplusplus
# ifndef OGS_FEATS_IMPROVED_SAVE_H
# define OGS_FEATS_IMPROVED_SAVE_H
# include <ogs/core/Feat.h>
# include <ogs/core/Modifier.h>
# include <ogs/feats/Namespace.h>
OGS_BEGIN_FEATS_NAMESPACE
/**
* A feat that adds a +2 bonus to saving throws. Improved Save feats
* come in three varieties: Great Fortitude, Iron Will, and Lightning
* Reflexes. Each variety applies to a different type of save.
*/
class ImprovedSave: public ogs::core::Feat {
public:
/** Type of Improved Save feat. */
enum Type {
/** Bonus is added to all Fortitude saves. */
GREAT_FORTITUDE,
/** Bonus is added to all Will saves. */
IRON_WILL,
/** Bonus is added to all Reflex saves. */
LIGHTNING_REFLEXES,
};
static ImprovedSave* createGreatFortitude ();
static ImprovedSave* createIronWill ();
static ImprovedSave* createLightningReflexes ();
bool attachObject (Object& object);
bool detachObject ();
ogs::core::Feat::Compatibility getCompatibility () const;
ogs::core::Feat::Group getGroup () const;
Type getType () const;
private:
Type _type;
static ogs::core::Modifier _modifier;
ImprovedSave (Type type);
bool canAttach (Object& object) const;
};
/**
* Determine the compatability of this feat. Improved Save feats are
* exclusive feats.
*
* @return Feat::EXCLUSIVE
*/
inline ogs::core::Feat::Compatibility
ImprovedSave::getCompatibility () const {
return (ogs::core::Feat::EXCLUSIVE);
}
/**
* Determine the group that this feat belongs to. Improved Save feats
* are general feats.
*
* @return Feat::GENERAL
*/
inline ogs::core::Feat::Group
ImprovedSave::getGroup () const {
return (ogs::core::Feat::GENERAL);
}
/**
* Determine the type of this Improved Save feat.
*
* @return GREAT_FORTITUDE, IRON_WILL, or LIGHTNING_REFLEXES.
*/
inline ImprovedSave::Type
ImprovedSave::getType () const {
return (this->_type);
}
OGS_END_FEATS_NAMESPACE
# endif /* !defined OGS_FEATS_IMPROVED_SAVE_H */
#endif /* defined __cplusplus */
Index: Alertness.cpp
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/feats/Alertness.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Alertness.cpp 23 Mar 2003 22:14:36 -0000 1.1
--- Alertness.cpp 25 Mar 2003 06:13:13 -0000 1.2
***************
*** 1,4 ****
/*
! * Alertness.cpp -- class implementation for templates
* Copyright (C) 2003 Eric Lemings <ele...@us...>
*
--- 1,4 ----
/*
! * Alertness.cpp -- class implementation for Alertness feats
* Copyright (C) 2003 Eric Lemings <ele...@us...>
*
***************
*** 21,25 ****
*/
- #include "ogs/support/Object.h"
#include "ogs/core/Creature.h"
#include "ogs/feats/Alertness.h"
--- 21,24 ----
***************
*** 27,31 ****
#include "ogs/skills/Spot.h"
- using ogs::support::Object;
using ogs::core::Creature;
using ogs::feats::Alertness;
--- 26,29 ----
***************
*** 34,92 ****
* Create a new Alertness feat.
*/
! Alertness::Alertness ():
! _creature (NULL), _modifier (+2) {
// empty constructor body
}
/**
! * Determine if a creature has a feat.
*
! * @param creature Creature to check.
! * @return True if creature has an instance of FeatClass.
*/
! template <class FeatClass>
! bool findFeat (Creature& creature) {
! Creature::Feats feats = creature.getFeats ();
! Creature::Feats::iterator itor = feats.begin ();
! bool found = false;
!
! while (itor != feats.end ()) {
! FeatClass* feat = dynamic_cast <FeatClass*> (*itor);
! if (feat != NULL) {
! found = true;
! }
!
! ++itor;
! }
!
! return (found);
}
/**
! * Attach this feat to a creature. This function adds a +2 bonus to
* Listen and Spot skill checks if the creature has either or both of
* these skills.
*
! * @param object Creature to attach this feat to.
! * @return True if feat is attached to creature.
*/
bool Alertness::attachObject (Object& object) {
! if (this == &object || // Can't attach this object to itself
! this->_creature != NULL) { // Can't attach if already attached.
! return (false);
! }
! // Can only attach this feat to creatures.
! Creature* creature = dynamic_cast<Creature*> (&object);
! if (creature != NULL) {
! // Alertness feats are exclusive feats.
! if (! findFeat<Alertness> (*creature)) {
! this->_creature = creature;
! addSkillModifier (*creature);
! return (true);
! }
}
! return (false);
}
--- 32,68 ----
* Create a new Alertness feat.
*/
! Alertness::Alertness (): _modifier (+2) {
// empty constructor body
}
/**
! * Determine if this feat can be attached to an object. Since Alertness
! * feats are exclusive feats, they can only be attached to objects that
! * do not already have this feat.
*
! * @param object Object to attach this feature to.
! * @return True if the feature is attached to the object.
*/
! bool Alertness::canAttach (Object& object) const {
! return (Feat::canAttach (object) &&
! !Feat::findFeat<Alertness> (object));
}
/**
! * Attach this feat to an object. This function adds a +2 bonus to
* Listen and Spot skill checks if the creature has either or both of
* these skills.
*
! * @param object Object to attach this feat to.
! * @return True if feat is attached to object.
*/
bool Alertness::attachObject (Object& object) {
! bool attached = attachObject (object);
! if (attached) {
! addSkillModifier (object);
}
! return (attached);
}
***************
*** 94,118 ****
* Add modifier of this feat to Listen and Spot skills.
*
! * @param creature Creature to add skill modifier to.
*/
! void Alertness::addSkillModifier (Creature& creature) {
! Creature::Skills skills = creature.getSkills ();
! Creature::Skills::iterator itor = skills.begin ();
! while (itor != skills.end ()) {
! using ogs::skills::Listen;
! Listen* listenSkill = dynamic_cast<Listen*> (*itor);
! if (listenSkill != NULL) {
! listenSkill->addModifier (this->_modifier);
! } else {
! using ogs::skills::Spot;
! Spot* spotSkill = dynamic_cast<Spot*> (*itor);
! if (spotSkill != NULL) {
! spotSkill->addModifier (this->_modifier);
}
- }
! ++itor;
}
}
--- 70,99 ----
* Add modifier of this feat to Listen and Spot skills.
*
! * @param object Object to add skill modifier to.
*/
! void Alertness::addSkillModifier (Object& object) {
! Creature* creature = dynamic_cast<Creature*> (&object);
! if (creature != NULL) {
! Creature::Skills skills = creature->getSkills ();
! Creature::Skills::iterator itor = skills.begin ();
! while (itor != skills.end ()) {
! using ogs::skills::Listen;
! Listen* listenSkill = dynamic_cast<Listen*> (*itor);
! if (listenSkill != NULL) {
! listenSkill->addModifier (this->_modifier);
! } else {
! using ogs::skills::Spot;
! Spot* spotSkill = dynamic_cast<Spot*> (*itor);
! if (spotSkill != NULL) {
! spotSkill->addModifier (this->_modifier);
! }
}
! ++itor;
! }
}
}
+
+ // TODO: Define detachObject and removeSkillModifier functions.
Index: Alertness.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/feats/Alertness.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Alertness.h 23 Mar 2003 22:14:36 -0000 1.1
--- Alertness.h 25 Mar 2003 06:13:13 -0000 1.2
***************
*** 44,67 ****
Object* getObject () const;
ogs::core::Feat::Compatibility getCompatibility () const;
private:
- ogs::core::Creature* _creature;
ogs::core::Modifier _modifier;
! void addSkillModifier (ogs::core::Creature& creature);
};
/**
- * Determine the creature that this feat is attached to.
- *
- * @return Creature that this feat is attached to or NULL if not
- * attached.
- */
- inline ogs::support::Object*
- Alertness::getObject () const {
- return (this->_creature);
- }
-
- /**
* Determine the compatability of this feat. Alertness feats are
* exclusive feats.
--- 44,57 ----
Object* getObject () const;
ogs::core::Feat::Compatibility getCompatibility () const;
+ ogs::core::Feat::Group getGroup () const;
private:
ogs::core::Modifier _modifier;
! bool canAttach (Object& object) const;
! void addSkillModifier (ogs::support::Object& object);
};
/**
* Determine the compatability of this feat. Alertness feats are
* exclusive feats.
***************
*** 72,75 ****
--- 62,76 ----
Alertness::getCompatibility () const {
return (ogs::core::Feat::EXCLUSIVE);
+ }
+
+ /**
+ * Determine the group that this feat belongs to. Alertness feats are
+ * general feats.
+ *
+ * @return Feat::GENERAL
+ */
+ inline ogs::core::Feat::Group
+ Alertness::getGroup () const {
+ return (ogs::core::Feat::GENERAL);
}
Index: ArmorProficiency.cpp
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/feats/ArmorProficiency.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ArmorProficiency.cpp 23 Mar 2003 22:14:36 -0000 1.3
--- ArmorProficiency.cpp 25 Mar 2003 06:13:13 -0000 1.4
***************
*** 34,38 ****
static bool
findArmorProficiency (Creature& creature,
! Armor::Group armorGroup);
/**
--- 34,38 ----
static bool
findArmorProficiency (Creature& creature,
! Armor::Proficiency proficiency);
/**
***************
*** 66,110 ****
* Create a new armor proficiency feat.
*
! * @param armorGroup One of the three armor groups.
*/
! ArmorProficiency::ArmorProficiency (Armor::Group armorGroup):
! _creature (NULL), _armorGroup (armorGroup) {
// empty constructor body
}
/**
! * Attach this armor proficiency feat to a creature.
*
! * @param object Creature to attach armor proficiency to.
! * @return True if feat is attached to creature.
*/
! bool ArmorProficiency::attachObject (Object& object) {
! if (this == &object || // Can't attach this object to itself
! this->_creature != NULL) { // Can't attach if already attached.
! return (false);
! }
!
! // Can only attach this feat to creatures.
! Creature* creature = dynamic_cast<Creature*> (&object);
! if (creature == NULL) {
return (false);
}
bool success = false;
! if (this->_armorGroup == Armor::LIGHT) {
! if (! findArmorProficiency (*creature, Armor::LIGHT)) {
! this->_creature = creature;
success = true;
}
! } else if (this->_armorGroup == Armor::MEDIUM) {
! if (findArmorProficiency (*creature, Armor::LIGHT) &&
! !findArmorProficiency (*creature, Armor::MEDIUM)) {
! this->_creature = creature;
success = true;
}
! } else if (this->_armorGroup == Armor::HEAVY) {
! if (findArmorProficiency (*creature, Armor::MEDIUM) &&
! !findArmorProficiency (*creature, Armor::HEAVY)) {
! this->_creature = creature;
success = true;
}
--- 66,101 ----
* Create a new armor proficiency feat.
*
! * @param proficiency One of the three armor groups.
*/
! ArmorProficiency::ArmorProficiency (Armor::Proficiency proficiency):
! _proficiency (proficiency) {
// empty constructor body
}
/**
! * Determine if this feat can be attached to an object.
*
! * @param object Object to attach this feat to.
! * @return True if this feat is attached to object.
*/
! bool ArmorProficiency::canAttach (Object& object) const {
! if (!Feat::canAttach (object)) {
return (false);
}
bool success = false;
! Creature& creature = dynamic_cast<Creature&> (object);
! if (this->_proficiency == Armor::LIGHT) {
! if (! findArmorProficiency (creature, Armor::LIGHT)) {
success = true;
}
! } else if (this->_proficiency == Armor::MEDIUM) {
! if (findArmorProficiency (creature, Armor::LIGHT) &&
! !findArmorProficiency (creature, Armor::MEDIUM)) {
success = true;
}
! } else if (this->_proficiency == Armor::HEAVY) {
! if (findArmorProficiency (creature, Armor::MEDIUM) &&
! !findArmorProficiency (creature, Armor::HEAVY)) {
success = true;
}
***************
*** 118,127 ****
*
* @param creature Creature to be checked for proficiency.
! * @param armorGroup Group of armor proficiency.
* @return True if creature has armor proficiency.
*/
static bool
findArmorProficiency (Creature& creature,
! Armor::Group armorGroup) {
Creature::Feats feats = creature.getFeats ();
Creature::Feats::iterator itor = feats.begin ();
--- 109,118 ----
*
* @param creature Creature to be checked for proficiency.
! * @param proficiency Proficiency of armor proficiency.
* @return True if creature has armor proficiency.
*/
static bool
findArmorProficiency (Creature& creature,
! Armor::Proficiency proficiency) {
Creature::Feats feats = creature.getFeats ();
Creature::Feats::iterator itor = feats.begin ();
***************
*** 134,138 ****
dynamic_cast <ArmorProficiency*> (feat);
if (armorProficiency != NULL) {
! if (armorProficiency->getGroup () == armorGroup) {
found = true;
}
--- 125,129 ----
dynamic_cast <ArmorProficiency*> (feat);
if (armorProficiency != NULL) {
! if (armorProficiency->getProficiency () == proficiency) {
found = true;
}
***************
*** 156,167 ****
bool proficient = false;
! if (this->_creature != NULL) {
! Armor::Group armorGroup = armor.getGroup ();
! if (this->_armorGroup == Armor::HEAVY) {
proficient = true;
! } else if (this->_armorGroup == Armor::MEDIUM &&
! armorGroup != Armor::HEAVY) {
proficient = true;
! } else if (armorGroup == Armor::LIGHT) {
proficient = true;
}
--- 147,158 ----
bool proficient = false;
! if (getObject () != NULL) {
! Armor::Proficiency proficiency = armor.getProficiency ();
! if (this->_proficiency == Armor::HEAVY) {
proficient = true;
! } else if (this->_proficiency == Armor::MEDIUM &&
! proficiency != Armor::HEAVY) {
proficient = true;
! } else if (proficiency == Armor::LIGHT) {
proficient = true;
}
***************
*** 170,171 ****
--- 161,163 ----
return (proficient);
}
+
Index: ArmorProficiency.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/feats/ArmorProficiency.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ArmorProficiency.h 23 Mar 2003 22:14:36 -0000 1.2
--- ArmorProficiency.h 25 Mar 2003 06:13:13 -0000 1.3
***************
*** 49,76 ****
static ArmorProficiency* createHeavy ();
- bool attachObject (Object& object);
- Object* getObject () const;
ogs::core::Feat::Compatibility getCompatibility () const;
! ogs::items::Armor::Group getGroup () const;
virtual bool isProficient (const ogs::items::Armor& armor) const;
private:
! ogs::core::Creature* _creature;
! ogs::items::Armor::Group _armorGroup;
! ArmorProficiency (ogs::items::Armor::Group armorGroup);
! };
! /**
! * Determine the creature that this feat is attached to.
! *
! * @return Creature that this feat is attached to or NULL if not
! * attached.
! */
! inline ogs::support::Object*
! ArmorProficiency::getObject () const {
! return (this->_creature);
! }
/**
--- 49,65 ----
static ArmorProficiency* createHeavy ();
ogs::core::Feat::Compatibility getCompatibility () const;
+ ogs::core::Feat::Group getGroup () const;
! ogs::items::Armor::Proficiency getProficiency () const;
virtual bool isProficient (const ogs::items::Armor& armor) const;
private:
! ogs::items::Armor::Proficiency _proficiency;
! ArmorProficiency (ogs::items::Armor::Proficiency proficiency);
! bool canAttach (Object& object) const;
! };
/**
***************
*** 86,96 ****
/**
! * Determine the group of this armor proficiency.
*
! * @return Group of armor proficiency: LIGHT, MEDIUM, or HEAVY.
*/
! inline ogs::items::Armor::Group
ArmorProficiency::getGroup () const {
! return (this->_armorGroup);
}
--- 75,96 ----
/**
! * Determine the group that this feat belongs to. Armor proficiency
! * feats are general feats.
*
! * @return Feat::GENERAL
*/
! inline ogs::core::Feat::Group
ArmorProficiency::getGroup () const {
! return (ogs::core::Feat::GENERAL);
! }
!
! /**
! * Determine which type of armor this proficiency feat applies to.
! *
! * @return Type of armor: LIGHT, MEDIUM, or HEAVY.
! */
! inline ogs::items::Armor::Proficiency
! ArmorProficiency::getProficiency () const {
! return (this->_proficiency);
}
Index: BonusFeat.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/feats/BonusFeat.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** BonusFeat.h 23 Mar 2003 22:14:36 -0000 1.1
--- BonusFeat.h 25 Mar 2003 06:13:13 -0000 1.2
***************
*** 82,85 ****
--- 82,86 ----
Feat::Compatibility getCompatibility () const;
+ Feat::Group getGroup () const;
Restriction getRestriction () const;
Feat* getFeat () const;
***************
*** 118,121 ****
--- 119,134 ----
BonusFeat::getCompatibility () const {
return (_feat != NULL? _feat->getCompatibility (): Feat::REPEATABLE);
+ }
+
+ /**
+ * Determine the group that this feat belongs to. Bonus feats are
+ * general feats by themselves. After a feat is selected, the group of
+ * a bonus feat is the same as the selected feat.
+ *
+ * @return Feat::GENERAL or group of selected feat.
+ */
+ inline Feat::Group
+ BonusFeat::getGroup () const {
+ return (_feat != NULL? _feat->getGroup (): Feat::GENERAL);
}
Index: ImprovedInitiative.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/feats/ImprovedInitiative.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ImprovedInitiative.h 7 Jan 2003 07:41:33 -0000 1.1
--- ImprovedInitiative.h 25 Mar 2003 06:13:13 -0000 1.2
***************
*** 33,37 ****
/**
! * A feat that adds a +4 bonus to all initiative checks.
*/
class ImprovedInitiative: public ogs::core::Feat {
--- 33,37 ----
/**
! * A feat that adds a +4 bonus to initiative rolls.
*/
class ImprovedInitiative: public ogs::core::Feat {
***************
*** 39,48 ****
ImprovedInitiative ();
! void attachEntity (ogs::core::Entity& entity);
! void detachEntity (ogs::core::Entity& entity);
private:
! ogs::core::Modifier modifier;
};
OGS_END_FEATS_NAMESPACE
--- 39,74 ----
ImprovedInitiative ();
! bool attachObject (Object& object);
! bool detachObject ();
! ogs::core::Feat::Compatibility getCompatibility () const;
! ogs::core::Feat::Group getGroup () const;
private:
! static ogs::core::Modifier _modifier;
!
! bool canAttach (Object& object) const;
};
+
+ /**
+ * Determine the compatability of this feat. Improved Initiative feats are
+ * exclusive feats.
+ *
+ * @return Feat::EXCLUSIVE
+ */
+ inline ogs::core::Feat::Compatibility
+ ImprovedInitiative::getCompatibility () const {
+ return (ogs::core::Feat::EXCLUSIVE);
+ }
+
+ /**
+ * Determine the group that this feat belongs to. Improved Initiative feats
+ * are general feats.
+ *
+ * @return Feat::GENERAL
+ */
+ inline ogs::core::Feat::Group
+ ImprovedInitiative::getGroup () const {
+ return (ogs::core::Feat::GENERAL);
+ }
OGS_END_FEATS_NAMESPACE
Index: Makefile.am
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/feats/Makefile.am,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Makefile.am 23 Mar 2003 22:14:36 -0000 1.4
--- Makefile.am 25 Mar 2003 06:13:13 -0000 1.5
***************
*** 28,35 ****
BonusFeat.h \
ExoticWeapon.h \
- GreatFortitude.h \
ImprovedInitiative.h \
! IronWill.h \
! LightningReflexes.h \
MartialWeapon.h \
Namespace.h \
--- 28,33 ----
BonusFeat.h \
ExoticWeapon.h \
ImprovedInitiative.h \
! ImprovedSave.h \
MartialWeapon.h \
Namespace.h \
***************
*** 52,55 ****
--- 50,55 ----
BonusFeat.cpp \
ExoticWeapon.cpp \
+ ImprovedInitiative.cpp \
+ ImprovedSave.cpp \
MartialWeapon.cpp
--- GreatFortitude.h DELETED ---
--- IronWill.h DELETED ---
--- LightningReflexes.h DELETED ---
|
|
From: <ele...@us...> - 2003-03-25 06:13:18
|
Update of /cvsroot/ogs/dist/c++/ogs/spells In directory sc8-pr-cvs1:/tmp/cvs-serv1939/c++/ogs/spells Modified Files: Conjurations.h Log Message: See C++ ChangeLog file (Mar 24) for details. Index: Conjurations.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/spells/Conjurations.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Conjurations.h 23 Mar 2003 22:14:36 -0000 1.1 --- Conjurations.h 25 Mar 2003 06:13:14 -0000 1.2 *************** *** 1,4 **** /* ! * Conjurations.h -- declarations for Conjuration spells * Copyright (C) 2002 Eric Lemings <ele...@us...> * --- 1,4 ---- /* ! * Conjurations.h -- declarations for conjuration spells * Copyright (C) 2002 Eric Lemings <ele...@us...> * *************** *** 21,33 **** */ ! #ifdef __cplusplus ! ! # ifndef OGS_SPELLS_CONJURATIONS_H ! # define OGS_SPELLS_CONJURATIONS_H ! ! # include <ogs/spells/conjurations/CureWounds.h> ! # endif /* !defined OGS_SPELLS_CONJURATIONS_H */ ! #endif /* defined __cplusplus */ --- 21,29 ---- */ ! #ifndef OGS_SPELLS_CONJURATIONS_H ! # define OGS_SPELLS_CONJURATIONS_H ! # include <ogs/spells/conjurations/CureWounds.h> ! #endif /* !defined OGS_SPELLS_CONJURATIONS_H */ |
|
From: <ele...@us...> - 2003-03-25 06:13:18
|
Update of /cvsroot/ogs/dist/c++/ogs/support
In directory sc8-pr-cvs1:/tmp/cvs-serv1939/c++/ogs/support
Modified Files:
Class.cpp Event.cpp Event.h Object.cpp
Added Files:
Attachable.h
Log Message:
See C++ ChangeLog file (Mar 24) for details.
--- NEW FILE: Attachable.h ---
/*
* Attachable.java -- class declaration for attachable objects
* Copyright (C) 2003 Eric Lemings <ele...@us...>
*
* This software is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA
*
* RCS: $Id: Attachable.h,v 1.1 2003/03/25 06:13:15 elemings Exp $
*/
#ifdef __cplusplus
# ifndef OGS_SUPPORT_ATTACHABLE_H
# define OGS_SUPPORT_ATTACHABLE_H
# include <ogs/support/Namespace.h>
OGS_BEGIN_SUPPORT_NAMESPACE
class Object;
/**
* An object that can be attached to another object. While attached, a
* attachable may modify the object that it is attached to. These
* modifications should be reversible if and when the attachable is
* detached from the object.
*/
class Attachable {
public:
/**
* Attach this attachable to an object. This function first
* determines whether this object can be attached to the specified
* object. This step usually checks whether the object is being
* attached to itself or whether it is already attached. If the
* object can be attached, this function then applies any
* modifications to the attached object and returns true.
* Otherwise, this function should simply return false.
*
* @param object Object to attach this attachable to.
* @return True if this attachable is attached to the object.
*/
virtual bool attachObject (Object& object) = 0;
/**
* Detach this attachable from an object. This function determines
* if this object is attached and, if so, whether it can be detached
* from the attached object. If it can, the function removes or
* otherwise reverses any modifications made to the attached object
* and returns true. Otherwise, the function returns false.
*
* @return True if this attachable is detached from the object.
*/
virtual bool detachObject () = 0;
/**
* Determine the object that this attachable is currently attached
* to. If the attachable is not currently attached to any object,
* this function returns null.
*
* @return Attached object or null if not attached.
*/
virtual Object* getObject () const = 0;
};
OGS_END_SUPPORT_NAMESPACE
# endif /* !defined OGS_SUPPORT_ATTACHABLE_H */
#endif /* defined __cplusplus */
Index: Class.cpp
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/support/Class.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Class.cpp 7 Jan 2003 07:41:34 -0000 1.1
--- Class.cpp 25 Mar 2003 06:13:15 -0000 1.2
***************
*** 21,25 ****
*/
! #include "Class.h"
using ogs::support::Class;
--- 21,25 ----
*/
! #include "ogs/support/Class.h"
using ogs::support::Class;
Index: Event.cpp
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/support/Event.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Event.cpp 7 Jan 2003 07:41:34 -0000 1.1
--- Event.cpp 25 Mar 2003 06:13:15 -0000 1.2
***************
*** 24,33 ****
#include <string>
! #include "Object.h"
! #include "Event.h"
using ogs::support::Event;
-
- Event::~Event () { }
/**
--- 24,31 ----
#include <string>
! #include "ogs/support/Object.h"
! #include "ogs/support/Event.h"
using ogs::support::Event;
/**
Index: Event.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/support/Event.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Event.h 7 Jan 2003 07:41:34 -0000 1.1
--- Event.h 25 Mar 2003 06:13:15 -0000 1.2
***************
*** 71,74 ****
--- 71,76 ----
}
+ inline Event::~Event () { }
+
OGS_END_SUPPORT_NAMESPACE
Index: Object.cpp
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/support/Object.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Object.cpp 18 Feb 2003 04:17:21 -0000 1.2
--- Object.cpp 25 Mar 2003 06:13:15 -0000 1.3
***************
*** 26,32 ****
#include <typeinfo>
! #include "Class.h"
! #include "Object.h"
! #include "Observer.h"
using namespace ogs::support;
--- 26,32 ----
#include <typeinfo>
! #include "ogs/support/Class.h"
! #include "ogs/support/Object.h"
! #include "ogs/support/Observer.h"
using namespace ogs::support;
|
Update of /cvsroot/ogs/dist/c++/ogs/skills
In directory sc8-pr-cvs1:/tmp/cvs-serv1939/c++/ogs/skills
Modified Files:
Appraise.h Bluff.h Climb.h Craft.h Diplomacy.cpp
DisableDevice.h Disguise.h EscapeArtist.h Forgery.h
GatherInformation.h HandleAnimal.h Hide.h Intimidate.h Jump.h
Knowledge.h Listen.h MoveSilently.h Profession.h Ride.h
Search.h SenseMotive.h SpeakLanguage.h Spot.cpp Swim.h
Tumble.h
Log Message:
See C++ ChangeLog file (Mar 24) for details.
Index: Appraise.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/Appraise.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Appraise.h 7 Jan 2003 07:41:34 -0000 1.1
--- Appraise.h 25 Mar 2003 06:13:14 -0000 1.2
***************
*** 26,29 ****
--- 26,30 ----
# define OGS_SKILLS_APPRAISE_H
+ # include <ogs/core/Skill.h>
# include <ogs/skills/Namespace.h>
***************
*** 35,40 ****
class Appraise: public ogs::core::Skill {
public:
-
- protected:
private:
--- 36,39 ----
Index: Bluff.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/Bluff.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Bluff.h 7 Jan 2003 07:41:34 -0000 1.1
--- Bluff.h 25 Mar 2003 06:13:14 -0000 1.2
***************
*** 26,29 ****
--- 26,30 ----
# define OGS_SKILLS_BLUFF_H
+ # include <ogs/core/Skill.h>
# include <ogs/skills/Namespace.h>
***************
*** 35,40 ****
class Bluff: public ogs::core::Skill {
public:
-
- protected:
private:
--- 36,39 ----
Index: Climb.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/Climb.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Climb.h 5 Feb 2003 06:01:29 -0000 1.2
--- Climb.h 25 Mar 2003 06:13:14 -0000 1.3
***************
*** 26,29 ****
--- 26,30 ----
# define OGS_SKILLS_CLIMB_H
+ # include <ogs/core/Skill.h>
# include <ogs/skills/Namespace.h>
***************
*** 35,40 ****
class Climb: public ogs::core::Skill {
public:
-
- protected:
private:
--- 36,39 ----
Index: Craft.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/Craft.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Craft.h 7 Jan 2003 07:41:34 -0000 1.1
--- Craft.h 25 Mar 2003 06:13:14 -0000 1.2
***************
*** 26,29 ****
--- 26,30 ----
# define OGS_SKILLS_CRAFT_H
+ # include <ogs/core/Skill.h>
# include <ogs/skills/Namespace.h>
***************
*** 35,40 ****
class Craft: public ogs::core::Skill {
public:
-
- protected:
private:
--- 36,39 ----
Index: Diplomacy.cpp
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/Diplomacy.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Diplomacy.cpp 7 Jan 2003 07:41:34 -0000 1.1
--- Diplomacy.cpp 25 Mar 2003 06:13:14 -0000 1.2
***************
*** 21,25 ****
*/
! #include "Diplomacy.h"
using ogs::skills::Diplomacy;
--- 21,25 ----
*/
! #include "ogs/skills/Diplomacy.h"
using ogs::skills::Diplomacy;
Index: DisableDevice.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/DisableDevice.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DisableDevice.h 7 Jan 2003 07:41:34 -0000 1.1
--- DisableDevice.h 25 Mar 2003 06:13:14 -0000 1.2
***************
*** 26,29 ****
--- 26,30 ----
# define OGS_SKILLS_DISABLE_DEVICE_H
+ # include <ogs/core/Skill.h>
# include <ogs/skills/Namespace.h>
***************
*** 35,40 ****
class DisableDevice: public ogs::core::Skill {
public:
-
- protected:
private:
--- 36,39 ----
Index: Disguise.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/Disguise.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Disguise.h 7 Jan 2003 07:41:34 -0000 1.1
--- Disguise.h 25 Mar 2003 06:13:14 -0000 1.2
***************
*** 26,29 ****
--- 26,30 ----
# define OGS_SKILLS_DISGUISE_H
+ # include <ogs/core/Skill.h>
# include <ogs/skills/Namespace.h>
***************
*** 35,40 ****
class Disguise: public ogs::core::Skill {
public:
-
- protected:
private:
--- 36,39 ----
Index: EscapeArtist.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/EscapeArtist.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** EscapeArtist.h 7 Jan 2003 07:41:34 -0000 1.1
--- EscapeArtist.h 25 Mar 2003 06:13:14 -0000 1.2
***************
*** 26,29 ****
--- 26,30 ----
# define OGS_SKILLS_ESCAPE_ARTIST_H
+ # include <ogs/core/Skill.h>
# include <ogs/skills/Namespace.h>
***************
*** 35,40 ****
class EscapeArtist: public ogs::core::Skill {
public:
-
- protected:
private:
--- 36,39 ----
Index: Forgery.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/Forgery.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Forgery.h 7 Jan 2003 07:41:34 -0000 1.1
--- Forgery.h 25 Mar 2003 06:13:14 -0000 1.2
***************
*** 26,29 ****
--- 26,30 ----
# define OGS_SKILLS_FORGERY_H
+ # include <ogs/core/Skill.h>
# include <ogs/skills/Namespace.h>
***************
*** 35,40 ****
class Forgery: public ogs::core::Skill {
public:
-
- protected:
private:
--- 36,39 ----
Index: GatherInformation.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/GatherInformation.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** GatherInformation.h 7 Jan 2003 07:41:34 -0000 1.1
--- GatherInformation.h 25 Mar 2003 06:13:14 -0000 1.2
***************
*** 26,29 ****
--- 26,30 ----
# define OGS_SKILLS_GATHER_INFORMATION_H
+ # include <ogs/core/Skill.h>
# include <ogs/skills/Namespace.h>
***************
*** 35,40 ****
class GatherInformation: public ogs::core::Skill {
public:
-
- protected:
private:
--- 36,39 ----
Index: HandleAnimal.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/HandleAnimal.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** HandleAnimal.h 7 Jan 2003 07:41:34 -0000 1.1
--- HandleAnimal.h 25 Mar 2003 06:13:14 -0000 1.2
***************
*** 26,29 ****
--- 26,30 ----
# define OGS_SKILLS_HANDLE_ANIMAL_H
+ # include <ogs/core/Skill.h>
# include <ogs/skills/Namespace.h>
***************
*** 35,40 ****
class HandleAnimal: public ogs::core::Skill {
public:
-
- protected:
private:
--- 36,39 ----
Index: Hide.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/Hide.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Hide.h 7 Jan 2003 07:41:34 -0000 1.1
--- Hide.h 25 Mar 2003 06:13:14 -0000 1.2
***************
*** 26,29 ****
--- 26,30 ----
# define OGS_SKILLS_HIDE_H
+ # include <ogs/core/Skill.h>
# include <ogs/skills/Namespace.h>
***************
*** 35,40 ****
class Hide: public ogs::core::Skill {
public:
-
- protected:
private:
--- 36,39 ----
Index: Intimidate.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/Intimidate.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Intimidate.h 7 Jan 2003 07:41:34 -0000 1.1
--- Intimidate.h 25 Mar 2003 06:13:14 -0000 1.2
***************
*** 26,29 ****
--- 26,30 ----
# define OGS_SKILLS_INTIMIDATE_H
+ # include <ogs/core/Skill.h>
# include <ogs/skills/Namespace.h>
***************
*** 35,40 ****
class Intimidate: public ogs::core::Skill {
public:
-
- protected:
private:
--- 36,39 ----
Index: Jump.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/Jump.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Jump.h 7 Jan 2003 07:41:34 -0000 1.1
--- Jump.h 25 Mar 2003 06:13:14 -0000 1.2
***************
*** 26,29 ****
--- 26,30 ----
# define OGS_SKILLS_JUMP_H
+ # include <ogs/core/Skill.h>
# include <ogs/skills/Namespace.h>
***************
*** 35,40 ****
class Jump: public ogs::core::Skill {
public:
-
- protected:
private:
--- 36,39 ----
Index: Knowledge.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/Knowledge.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Knowledge.h 7 Jan 2003 07:41:34 -0000 1.1
--- Knowledge.h 25 Mar 2003 06:13:14 -0000 1.2
***************
*** 26,29 ****
--- 26,30 ----
# define OGS_SKILLS_KNOWLEDGE_H
+ # include <ogs/core/Skill.h>
# include <ogs/skills/Namespace.h>
***************
*** 35,40 ****
class Knowledge: public ogs::core::Skill {
public:
-
- protected:
private:
--- 36,39 ----
Index: Listen.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/Listen.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Listen.h 7 Jan 2003 07:41:34 -0000 1.1
--- Listen.h 25 Mar 2003 06:13:14 -0000 1.2
***************
*** 26,29 ****
--- 26,30 ----
# define OGS_SKILLS_LISTEN_H
+ # include <ogs/core/Skill.h>
# include <ogs/skills/Namespace.h>
***************
*** 35,40 ****
class Listen: public ogs::core::Skill {
public:
-
- protected:
private:
--- 36,39 ----
Index: MoveSilently.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/MoveSilently.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MoveSilently.h 7 Jan 2003 07:41:34 -0000 1.1
--- MoveSilently.h 25 Mar 2003 06:13:14 -0000 1.2
***************
*** 26,29 ****
--- 26,30 ----
# define OGS_SKILLS_MOVE_SILENTLY_H
+ # include <ogs/core/Skill.h>
# include <ogs/skills/Namespace.h>
***************
*** 35,40 ****
class MoveSilently: public ogs::core::Skill {
public:
-
- protected:
private:
--- 36,39 ----
Index: Profession.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/Profession.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Profession.h 7 Jan 2003 07:41:34 -0000 1.1
--- Profession.h 25 Mar 2003 06:13:14 -0000 1.2
***************
*** 26,29 ****
--- 26,30 ----
# define OGS_SKILLS_PROFESSION_H
+ # include <ogs/core/Skill.h>
# include <ogs/skills/Namespace.h>
***************
*** 35,40 ****
class Profession: public ogs::core::Skill {
public:
-
- protected:
private:
--- 36,39 ----
Index: Ride.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/Ride.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Ride.h 7 Jan 2003 07:41:34 -0000 1.1
--- Ride.h 25 Mar 2003 06:13:14 -0000 1.2
***************
*** 26,29 ****
--- 26,30 ----
# define OGS_SKILLS_RIDE_H
+ # include <ogs/core/Skill.h>
# include <ogs/skills/Namespace.h>
***************
*** 35,40 ****
class Ride: public ogs::core::Skill {
public:
-
- protected:
private:
--- 36,39 ----
Index: Search.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/Search.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Search.h 7 Jan 2003 07:41:34 -0000 1.1
--- Search.h 25 Mar 2003 06:13:14 -0000 1.2
***************
*** 26,29 ****
--- 26,30 ----
# define OGS_SKILLS_SEARCH_H
+ # include <ogs/core/Skill.h>
# include <ogs/skills/Namespace.h>
***************
*** 35,40 ****
class Search: public ogs::core::Skill {
public:
-
- protected:
private:
--- 36,39 ----
Index: SenseMotive.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/SenseMotive.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SenseMotive.h 7 Jan 2003 07:41:34 -0000 1.1
--- SenseMotive.h 25 Mar 2003 06:13:14 -0000 1.2
***************
*** 26,29 ****
--- 26,30 ----
# define OGS_SKILLS_SENSE_MOTIVE_H
+ # include <ogs/core/Skill.h>
# include <ogs/skills/Namespace.h>
***************
*** 35,40 ****
class SenseMotive: public ogs::core::Skill {
public:
-
- protected:
private:
--- 36,39 ----
Index: SpeakLanguage.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/SpeakLanguage.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SpeakLanguage.h 7 Jan 2003 07:41:34 -0000 1.1
--- SpeakLanguage.h 25 Mar 2003 06:13:14 -0000 1.2
***************
*** 26,29 ****
--- 26,30 ----
# define OGS_SKILLS_SPEAK_LANGUAGE_H
+ # include <ogs/core/Skill.h>
# include <ogs/skills/Namespace.h>
***************
*** 35,40 ****
class SpeakLanguage: public ogs::core::Skill {
public:
-
- protected:
private:
--- 36,39 ----
Index: Spot.cpp
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/Spot.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Spot.cpp 7 Jan 2003 07:41:34 -0000 1.1
--- Spot.cpp 25 Mar 2003 06:13:14 -0000 1.2
***************
*** 21,27 ****
*/
! #include <ogs/core/Modifier.h>
!
! #include "Spot.h"
using ogs::core::Modifier;
--- 21,26 ----
*/
! #include "ogs/core/Modifier.h"
! #include "ogs/skills/Spot.h"
using ogs::core::Modifier;
Index: Swim.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/Swim.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Swim.h 7 Jan 2003 07:41:34 -0000 1.1
--- Swim.h 25 Mar 2003 06:13:14 -0000 1.2
***************
*** 26,29 ****
--- 26,30 ----
# define OGS_SKILLS_SWIM_H
+ # include <ogs/core/Skill.h>
# include <ogs/skills/Namespace.h>
***************
*** 35,40 ****
class Swim: public ogs::core::Skill {
public:
-
- protected:
private:
--- 36,39 ----
Index: Tumble.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/skills/Tumble.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Tumble.h 7 Jan 2003 07:41:34 -0000 1.1
--- Tumble.h 25 Mar 2003 06:13:14 -0000 1.2
***************
*** 26,29 ****
--- 26,30 ----
# define OGS_SKILLS_TUMBLE_H
+ # include <ogs/core/Skill.h>
# include <ogs/skills/Namespace.h>
***************
*** 35,40 ****
class Tumble: public ogs::core::Skill {
public:
-
- protected:
private:
--- 36,39 ----
|
|
From: <ele...@us...> - 2003-03-25 06:13:17
|
Update of /cvsroot/ogs/dist/c++/ogs/items
In directory sc8-pr-cvs1:/tmp/cvs-serv1939/c++/ogs/items
Modified Files:
Armor.cpp Armor.h Rings.h Weapon.cpp Wonders.h
Log Message:
See C++ ChangeLog file (Mar 24) for details.
Index: Armor.cpp
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/items/Armor.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Armor.cpp 7 Jan 2003 07:41:33 -0000 1.1
--- Armor.cpp 25 Mar 2003 06:13:13 -0000 1.2
***************
*** 23,27 ****
#include <stdexcept>
! #include "Armor.h"
using ogs::core::Modifier;
--- 23,27 ----
#include <stdexcept>
! #include "ogs/items/Armor.h"
using ogs::core::Modifier;
Index: Armor.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/items/Armor.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Armor.h 23 Mar 2003 22:14:36 -0000 1.2
--- Armor.h 25 Mar 2003 06:13:13 -0000 1.3
***************
*** 35,69 ****
* An item worn for protection in combat. Armor is typically a suit or
* partial suit of steel, leather, or other material that is worn over
! * the body. Armor is classified into one of three groups: light,
! * medium, or heavy. The armor group is used to determine the armor
! * proficiency required to use it effectively.
*
! * @see ogs::feats::ArmorGroup
*/
class Armor: public ogs::core::Item {
public:
! /**
! * Indicates the proficiency required to effectively utilize the
! * armor.
! */
! enum Group {
! /** Requires light armor proficiency. */
LIGHT = 1,
! /** Requires medium armor proficiency. */
MEDIUM = 2,
! /** Requires heavy armor proficiency. */
HEAVY = 3
};
! virtual Group getGroup () const = 0;
virtual ogs::core::Modifier& getDefenseBonus () = 0;
virtual ogs::core::Modifier& getArmorCheckPenalty () = 0;
virtual int getArcaneSpellFailure () = 0;
virtual ~Armor ();
};
OGS_END_ITEMS_NAMESPACE
--- 35,82 ----
* An item worn for protection in combat. Armor is typically a suit or
* partial suit of steel, leather, or other material that is worn over
! * the body. Armor belongs to one of three proficiencies: light,
! * medium, or heavy. The armor proficiency determines the armor
! * proficiency feat required to use it effectively.
*
! * @see ogs::feats::ArmorProficiency
*/
class Armor: public ogs::core::Item {
public:
! /** The proficiency required to effectively utilize the armor. */
! enum Proficiency {
! /** Requires light armor proficiency feat. */
LIGHT = 1,
! /** Requires medium armor proficiency feat. */
MEDIUM = 2,
! /** Requires heavy armor proficiency feat. */
HEAVY = 3
};
! /**
! * Determine the proficiency required to effectively utilize this
! * armor.
! *
! * @return Proficiency of this armor: LIGHT, MEDIUM, or HEAVY.
! */
! virtual Proficiency getProficiency () const = 0;
!
! /**
! * Determine the defense modifier added when wearing this armor.
! *
! * @return Defense modifier.
! */
virtual ogs::core::Modifier& getDefenseBonus () = 0;
+
virtual ogs::core::Modifier& getArmorCheckPenalty () = 0;
+
virtual int getArcaneSpellFailure () = 0;
virtual ~Armor ();
};
+
+ inline Armor::~Armor () { }
OGS_END_ITEMS_NAMESPACE
Index: Rings.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/items/Rings.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Rings.h 23 Mar 2003 22:14:36 -0000 1.1
--- Rings.h 25 Mar 2003 06:13:13 -0000 1.2
***************
*** 21,62 ****
*/
! #ifdef __cplusplus
!
! # ifndef OGS_ITEMS_RINGS_H
! # define OGS_ITEMS_RINGS_H
!
! //# include <ogs/items/rings/AnimalFriendship.h>
! //# include <ogs/items/rings/Blinking.h>
! //# include <ogs/items/rings/ChameleonPower.h>
! # include <ogs/items/rings/Climbing.h>
! //# include <ogs/items/rings/Counterspells.h>
! //# include <ogs/items/rings/DjinniCalling.h>
! //# include <ogs/items/rings/ElementalCommand.h>
! //# include <ogs/items/rings/ElementalResistance.h>
! //# include <ogs/items/rings/Evasion.h>
! //# include <ogs/items/rings/FeatherFalling.h>
! //# include <ogs/items/rings/ForceShield.h>
! //# include <ogs/items/rings/FreedomOfMovement.h>
! //# include <ogs/items/rings/FriendShield.h>
! //# include <ogs/items/rings/Invisibility.h>
! //# include <ogs/items/rings/Jumping.h>
! //# include <ogs/items/rings/MindShielding.h>
! # include <ogs/items/rings/Protection.h>
! //# include <ogs/items/rings/Ram.h>
! //# include <ogs/items/rings/Regeneration.h>
! //# include <ogs/items/rings/ShootingStars.h>
! //# include <ogs/items/rings/SpellStoring.h>
! //# include <ogs/items/rings/SpellTurning.h>
! //# include <ogs/items/rings/Sustenance.h>
! # include <ogs/items/rings/Swimming.h>
! //# include <ogs/items/rings/Telekinesis.h>
! //# include <ogs/items/rings/ThreeWishes.h>
! //# include <ogs/items/rings/Warmth.h>
! //# include <ogs/items/rings/WaterWalking.h>
! //# include <ogs/items/rings/Wizardry.h>
! //# include <ogs/items/rings/XRayVision.h>
! # endif /* !defined OGS_ITEMS_RINGS_H */
! #endif /* defined __cplusplus */
--- 21,59 ----
*/
! #ifndef OGS_ITEMS_RINGS_H
! # define OGS_ITEMS_RINGS_H
! // Uncomment these as they are completed.
! //# include <ogs/items/rings/AnimalFriendship.h>
! //# include <ogs/items/rings/Blinking.h>
! //# include <ogs/items/rings/ChameleonPower.h>
! # include <ogs/items/rings/Climbing.h>
! //# include <ogs/items/rings/Counterspells.h>
! //# include <ogs/items/rings/DjinniCalling.h>
! //# include <ogs/items/rings/ElementalCommand.h>
! //# include <ogs/items/rings/ElementalResistance.h>
! //# include <ogs/items/rings/Evasion.h>
! //# include <ogs/items/rings/FeatherFalling.h>
! //# include <ogs/items/rings/ForceShield.h>
! //# include <ogs/items/rings/FreedomOfMovement.h>
! //# include <ogs/items/rings/FriendShield.h>
! //# include <ogs/items/rings/Invisibility.h>
! //# include <ogs/items/rings/Jumping.h>
! //# include <ogs/items/rings/MindShielding.h>
! # include <ogs/items/rings/Protection.h>
! //# include <ogs/items/rings/Ram.h>
! //# include <ogs/items/rings/Regeneration.h>
! //# include <ogs/items/rings/ShootingStars.h>
! //# include <ogs/items/rings/SpellStoring.h>
! //# include <ogs/items/rings/SpellTurning.h>
! //# include <ogs/items/rings/Sustenance.h>
! # include <ogs/items/rings/Swimming.h>
! //# include <ogs/items/rings/Telekinesis.h>
! //# include <ogs/items/rings/ThreeWishes.h>
! //# include <ogs/items/rings/Warmth.h>
! //# include <ogs/items/rings/WaterWalking.h>
! //# include <ogs/items/rings/Wizardry.h>
! //# include <ogs/items/rings/XRayVision.h>
! #endif /* !defined OGS_ITEMS_RINGS_H */
Index: Weapon.cpp
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/items/Weapon.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Weapon.cpp 7 Jan 2003 07:41:33 -0000 1.1
--- Weapon.cpp 25 Mar 2003 06:13:13 -0000 1.2
***************
*** 21,25 ****
*/
! #include "Weapon.h"
using ogs::items::Weapon;
--- 21,25 ----
*/
! #include "ogs/items/Weapon.h"
using ogs::items::Weapon;
Index: Wonders.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/items/Wonders.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Wonders.h 23 Mar 2003 22:14:36 -0000 1.1
--- Wonders.h 25 Mar 2003 06:13:13 -0000 1.2
***************
*** 21,71 ****
*/
! #ifdef __cplusplus
!
! # ifndef OGS_ITEMS_WONDERS_H
! # define OGS_ITEMS_WONDERS_H
// Pretty sure these wonders can be fully implemented.
! //# include <ogs/items/wonders/AmuletOfHealth.h>
! //# include <ogs/items/wonders/AmuletOfNaturalArmor.h>
! //# include <ogs/items/wonders/BeltOfGiantStrength.h>
! //# include <ogs/items/wonders/BlessedBook.h>
! //# include <ogs/items/wonders/BootsOfElvenkind.h>
! //# include <ogs/items/wonders/BootsOfStrideAndSpring.h>
! //# include <ogs/items/wonders/BracersOfArmor.h>
! //# include <ogs/items/wonders/CloakOfCharisma.h>
! //# include <ogs/items/wonders/CloakOfElvenkind.h>
! //# include <ogs/items/wonders/CloakOfResistance.h>
! //# include <ogs/items/wonders/GauntletsOfOgrePower.h>
! //# include <ogs/items/wonders/GlovesOfDexterity.h>
! //# include <ogs/items/wonders/GlovesOfSwimAndClimb.h>
! //# include <ogs/items/wonders/HeadbandOfIntellect.h>
! //# include <ogs/items/wonders/LensOfDetection.h>
! //# include <ogs/items/wonders/MantleOfSpellResistance.h>
! //# include <ogs/items/wonders/ManualOfPhysicalAbility.h>
! //# include <ogs/items/wonders/Luckstone.h>
! //# include <ogs/items/wonders/TomeOfMentalAbility.h>
! //# include <ogs/items/wonders/VestmentOfFaith.h>
// Not exactly sure if these wonders can be implemented.
! //# include <ogs/items/wonders/AmuletOfUndeadTurning.h>
! //# include <ogs/items/wonders/BagOfHolding.h>
! //# include <ogs/items/wonders/MonksBelt.h>
! //# include <ogs/items/wonders/BeltOfDwarvenkind.h>
! //# include <ogs/items/wonders/CircletOfPersuasion.h>
! //# include <ogs/items/wonders/EyesOfTheEagle.h>
! //# include <ogs/items/wonders/GloveOfStoring.h>
! //# include <ogs/items/wonders/GogglesOfNight.h>
! //# include <ogs/items/wonders/MaskOfTheSkull.h>
! //# include <ogs/items/wonders/PearlOfPower.h>
! //# include <ogs/items/wonders/PeriaptOfHealth.h>
! //# include <ogs/items/wonders/ScabbardOfKeenEdges.h>
! //# include <ogs/items/wonders/VestOfEscape.h>
! //# include <ogs/items/wonders/DruidsVestment.h>
// Other wonders probably cannot be implemented in this context.
! # endif /* !defined OGS_ITEMS_WONDERS_H */
!
! #endif /* defined __cplusplus */
--- 21,67 ----
*/
! #ifndef OGS_ITEMS_WONDERS_H
! # define OGS_ITEMS_WONDERS_H
// Pretty sure these wonders can be fully implemented.
! //# include <ogs/items/wonders/AmuletOfHealth.h>
! //# include <ogs/items/wonders/AmuletOfNaturalArmor.h>
! //# include <ogs/items/wonders/BeltOfGiantStrength.h>
! //# include <ogs/items/wonders/BlessedBook.h>
! //# include <ogs/items/wonders/BootsOfElvenkind.h>
! //# include <ogs/items/wonders/BootsOfStrideAndSpring.h>
! //# include <ogs/items/wonders/BracersOfArmor.h>
! //# include <ogs/items/wonders/CloakOfCharisma.h>
! //# include <ogs/items/wonders/CloakOfElvenkind.h>
! //# include <ogs/items/wonders/CloakOfResistance.h>
! //# include <ogs/items/wonders/GauntletsOfOgrePower.h>
! //# include <ogs/items/wonders/GlovesOfDexterity.h>
! //# include <ogs/items/wonders/GlovesOfSwimAndClimb.h>
! //# include <ogs/items/wonders/HeadbandOfIntellect.h>
! //# include <ogs/items/wonders/LensOfDetection.h>
! //# include <ogs/items/wonders/MantleOfSpellResistance.h>
! //# include <ogs/items/wonders/ManualOfPhysicalAbility.h>
! //# include <ogs/items/wonders/Luckstone.h>
! //# include <ogs/items/wonders/TomeOfMentalAbility.h>
! //# include <ogs/items/wonders/VestmentOfFaith.h>
// Not exactly sure if these wonders can be implemented.
! //# include <ogs/items/wonders/AmuletOfUndeadTurning.h>
! //# include <ogs/items/wonders/BagOfHolding.h>
! //# include <ogs/items/wonders/MonksBelt.h>
! //# include <ogs/items/wonders/BeltOfDwarvenkind.h>
! //# include <ogs/items/wonders/CircletOfPersuasion.h>
! //# include <ogs/items/wonders/EyesOfTheEagle.h>
! //# include <ogs/items/wonders/GloveOfStoring.h>
! //# include <ogs/items/wonders/GogglesOfNight.h>
! //# include <ogs/items/wonders/MaskOfTheSkull.h>
! //# include <ogs/items/wonders/PearlOfPower.h>
! //# include <ogs/items/wonders/PeriaptOfHealth.h>
! //# include <ogs/items/wonders/ScabbardOfKeenEdges.h>
! //# include <ogs/items/wonders/VestOfEscape.h>
! //# include <ogs/items/wonders/DruidsVestment.h>
// Other wonders probably cannot be implemented in this context.
! #endif /* !defined OGS_ITEMS_WONDERS_H */
|
|
From: <ele...@us...> - 2003-03-24 07:45:20
|
Update of /cvsroot/ogs/dist/c++/ogs/cclasses
In directory sc8-pr-cvs1:/tmp/cvs-serv1156
Modified Files:
Paladin.cpp
Log Message:
Implemented getSpellsPerDay function.
Index: Paladin.cpp
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Paladin.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Paladin.cpp 23 Mar 2003 22:14:36 -0000 1.1
--- Paladin.cpp 24 Mar 2003 07:45:11 -0000 1.2
***************
*** 1,4 ****
/*
! * Paladin.cpp -- class implementation for templates
* Copyright (C) 2003 Eric Lemings <ele...@us...>
*
--- 1,4 ----
/*
! * Paladin.cpp -- class implementation for paladins
* Copyright (C) 2003 Eric Lemings <ele...@us...>
*
***************
*** 21,24 ****
--- 21,26 ----
*/
+ #include <climits>
+
#include "ogs/core/Abilities.h"
#include "ogs/core/Ability.h"
***************
*** 162,164 ****
--- 164,210 ----
// 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
+ * number of spells for a given spell level is zero (0), the number of
+ * spells that can be cast for that level is the same as the bonus
+ * spells from the Charisma score of the paladin (if any).
+ *
+ * @return Number of spells that can be cast per spell level per day.
+ */
+ Paladin::SpellCounts Paladin::getSpellsPerDay () const {
+ static unsigned spellTable [17][4] = {
+ { 0, UINT_MAX, UINT_MAX, UINT_MAX },
+ { 0, UINT_MAX, UINT_MAX, UINT_MAX },
+ { 1, UINT_MAX, UINT_MAX, UINT_MAX },
+ { 1, UINT_MAX, UINT_MAX, UINT_MAX },
+ { 1, 0, UINT_MAX, UINT_MAX },
+ { 1, 0, UINT_MAX, UINT_MAX },
+ { 1, 1, UINT_MAX, UINT_MAX },
+ { 1, 1, 0, UINT_MAX },
+ { 1, 1, 1, UINT_MAX },
+ { 1, 1, 1, UINT_MAX },
+ { 2, 1, 1, 0 },
+ { 2, 1, 1, 1 },
+ { 2, 2, 1, 1 },
+ { 2, 2, 2, 1 },
+ { 3, 2, 2, 1 },
+ { 3, 3, 3, 2 },
+ { 3, 3, 3, 3 },
+ };
+
+ Experience::Level xpLevel = getLevel ();
+ SpellCounts spellCounts;
+ if (xpLevel >= 4) {
+ SpellCounts::size_type i = 0;
+ while (spellTable [xpLevel][i] != UINT_MAX) {
+ spellCounts [i] = spellTable [xpLevel][i];
+ ++i;
+ }
+ }
+
+ return (spellCounts);
+ }
+
|
|
From: <ele...@us...> - 2003-03-23 22:14:39
|
Update of /cvsroot/ogs/dist In directory sc8-pr-cvs1:/tmp/cvs-serv31134 Modified Files: ChangeLog ogs.spec.in Log Message: See ChangeLog files (Mar 23) for details. Index: ChangeLog =================================================================== RCS file: /cvsroot/ogs/dist/ChangeLog,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** ChangeLog 9 Mar 2003 00:18:36 -0000 1.25 --- ChangeLog 23 Mar 2003 22:14:35 -0000 1.26 *************** *** 1,3 **** --- 1,10 ---- + Fri Mar 21 22:11:32 UTC 2003 Eric Lemings <ele...@us...> + + * ogs.spec.in, */ogs*.spec.in: Change architecture of ogs-c++-doc + package from i386 to noarch. Change subpackages to use + individual source distributions rather than comprehensive source + distribution. + Sat Mar 8 17:13:29 UTC 2003 Eric Lemings <ele...@us...> Index: ogs.spec.in =================================================================== RCS file: /cvsroot/ogs/dist/ogs.spec.in,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ogs.spec.in 14 Mar 2003 22:33:22 -0000 1.7 --- ogs.spec.in 23 Mar 2003 22:14:35 -0000 1.8 *************** *** 117,120 **** --- 117,121 ---- Summary: Documentation for developing open gaming software in C++. Group: Development/Libraries + BuildArch: noarch %description c++-doc |