[ogs-changes] dist/c++/ogs/cclasses Bard.h,1.3,1.4 Cleric.h,1.3,1.4 Druid.h,1.3,1.4 Paladin.cpp,1.5,
Status: Alpha
Brought to you by:
elemings
Update of /cvsroot/ogs/dist/c++/ogs/cclasses
In directory sc8-pr-cvs1:/tmp/cvs-serv20206/c++/ogs/cclasses
Modified Files:
Bard.h Cleric.h Druid.h Paladin.cpp Paladin.h Ranger.h
Sorcerer.h Wizard.h
Log Message:
See C++ ChangeLog (Apr 15) for details.
Index: Bard.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Bard.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Bard.h 13 Apr 2003 05:24:49 -0000 1.3
--- Bard.h 15 Apr 2003 16:58:30 -0000 1.4
***************
*** 71,75 ****
--- 71,81 ----
Bard (ogs::core::XP::Level xpLevel = 1);
+ /**
+ * 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;
SpellCounts getSpellsKnown () const;
Index: Cleric.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Cleric.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Cleric.h 13 Apr 2003 05:24:49 -0000 1.3
--- Cleric.h 15 Apr 2003 16:58:30 -0000 1.4
***************
*** 71,75 ****
--- 71,81 ----
Cleric (ogs::core::XP::Level xpLevel = 1);
+ /**
+ * 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;
Index: Druid.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Druid.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Druid.h 13 Apr 2003 05:24:49 -0000 1.3
--- Druid.h 15 Apr 2003 16:58:30 -0000 1.4
***************
*** 73,77 ****
--- 73,83 ----
Druid (ogs::core::XP::Level xpLevel = 1);
+ /**
+ * 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;
Index: Paladin.cpp
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Paladin.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Paladin.cpp 13 Apr 2003 05:24:49 -0000 1.5
--- Paladin.cpp 15 Apr 2003 16:58:30 -0000 1.6
***************
*** 67,70 ****
--- 67,78 ----
}
+ inline void
+ Paladin::addProficiency (ogs::core::Creature& creature,
+ ogs::core::Feat* feat) {
+ if (creature.addFeat (*feat)) {
+ this->_feats.push_back (FeatPtr (feat));
+ }
+ }
+
/**
* Add armor and weapon proficiency feats to creature. Paladins are
***************
*** 113,135 ****
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 ()));
}
}
--- 121,145 ----
std::list<Armor::Proficiency>::iterator end = armors.end ();
if (std::find (armors.begin (), end, Armor::HEAVY) == end) {
! addProficiency (creature, ArmorProficiency::createHeavy ());
}
if (std::find (armors.begin (), end, Armor::MEDIUM) == end) {
! addProficiency (creature, ArmorProficiency::createMedium ());
}
if (std::find (armors.begin (), end, Armor::LIGHT) == end) {
! addProficiency (creature, ArmorProficiency::createLight ());
}
std::list<Weapon::Proficiency>::iterator wend = weapons.end ();
if (std::find (weapons.begin (), wend, Weapon::MARTIAL) == wend) {
! addProficiency (creature, AllWeapons::createMartial ());
}
if (std::find (weapons.begin (), wend, Weapon::SIMPLE) == wend) {
! addProficiency (creature, AllWeapons::createSimple ());
}
+
+ // TODO: Add shield proficiency.
}
***************
*** 181,185 ****
itor != this->_feats.end (); ++itor) {
FeatPtr featPtr = *itor;
! if (creature.removeFeat (featPtr)) {
this->_feats.erase (itor);
}
--- 191,195 ----
itor != this->_feats.end (); ++itor) {
FeatPtr featPtr = *itor;
! if (creature.removeFeat (*featPtr)) {
this->_feats.erase (itor);
}
Index: Paladin.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Paladin.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Paladin.h 13 Apr 2003 05:24:49 -0000 1.3
--- Paladin.h 15 Apr 2003 16:58:31 -0000 1.4
***************
*** 32,36 ****
# include <ogs/core/Experience.h>
# include <ogs/core/Saves.h>
- # include <ogs/core/Types.h>
# include <ogs/cclasses/Namespace.h>
--- 32,35 ----
***************
*** 88,92 ****
class ogs::core::Creature;
void addProficiency (ogs::core::Creature& creature,
! ogs::core::FeatPtr featPtr);
void addProficiencies ();
--- 87,91 ----
class ogs::core::Creature;
void addProficiency (ogs::core::Creature& creature,
! ogs::core::Feat* featPtr);
void addProficiencies ();
***************
*** 95,106 ****
void removeDivineGrace ();
};
-
- inline void
- Paladin::addProficiency (ogs::core::Creature& creature,
- ogs::core::FeatPtr featPtr) {
- if (creature.addFeat (featPtr)) {
- this->_feats.push_back (featPtr);
- }
- }
OGS_END_CCLASSES_NAMESPACE
--- 94,97 ----
Index: Ranger.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Ranger.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Ranger.h 13 Apr 2003 05:24:49 -0000 1.3
--- Ranger.h 15 Apr 2003 16:58:31 -0000 1.4
***************
*** 74,78 ****
--- 74,84 ----
Ranger (ogs::core::XP::Level xpLevel = 1);
+ /**
+ * 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;
Index: Sorcerer.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Sorcerer.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Sorcerer.h 13 Apr 2003 05:24:49 -0000 1.3
--- Sorcerer.h 15 Apr 2003 16:58:31 -0000 1.4
***************
*** 60,64 ****
--- 60,70 ----
Sorcerer (ogs::core::XP::Level xpLevel = 1);
+ /**
+ * 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;
SpellCounts getSpellsKnown () const;
Index: Wizard.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Wizard.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Wizard.h 13 Apr 2003 05:24:49 -0000 1.3
--- Wizard.h 15 Apr 2003 16:58:32 -0000 1.4
***************
*** 79,83 ****
--- 79,89 ----
Wizard (ogs::core::XP::Level xpLevel = 1);
+ /**
+ * 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;
|