[ogs-changes] dist/c++/ogs/feats Alertness.cpp,1.4,1.5 Alertness.h,1.3,1.4 AllWeapons.cpp,1.3,1.4 Al
Status: Alpha
Brought to you by:
elemings
|
From: <ele...@us...> - 2003-04-15 16:59:22
|
Update of /cvsroot/ogs/dist/c++/ogs/feats
In directory sc8-pr-cvs1:/tmp/cvs-serv20206/c++/ogs/feats
Modified Files:
Alertness.cpp Alertness.h AllWeapons.cpp AllWeapons.h
ArmorProficiency.cpp ArmorProficiency.h ImprovedInitiative.cpp
ImprovedSave.cpp Makefile.am ShieldProficiency.h Toughness.h
WeaponProficiency.h
Log Message:
See C++ ChangeLog (Apr 15) for details.
Index: Alertness.cpp
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/feats/Alertness.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Alertness.cpp 13 Apr 2003 05:27:06 -0000 1.4
--- Alertness.cpp 15 Apr 2003 16:58:41 -0000 1.5
***************
*** 31,35 ****
* Create a new Alertness feat.
*/
! Alertness::Alertness (): _modifier (+2) {
// empty constructor body
}
--- 31,37 ----
* Create a new Alertness feat.
*/
! Alertness::Alertness ():
! Feat (EXCLUSIVE),
! _modifier (+2) {
// empty constructor body
}
***************
*** 57,61 ****
*/
bool Alertness::attachObject (Object& object) {
! bool attached = attachObject (object);
if (attached) {
--- 59,63 ----
*/
bool Alertness::attachObject (Object& object) {
! bool attached = Feat::attachObject (object);
if (attached) {
***************
*** 86,97 ****
SkillPtr skillPtr = *itor++;
! if (skillPtr->getType () == CommonSkills::LISTEN) {
Modifiers& modifiers = skillPtr->getModifiers ();
modifiers.addModifier (this->_modifier);
- } else {
- if (skillPtr->getType () == CommonSkills::SPOT) {
- Modifiers& modifiers = skillPtr->getModifiers ();
- modifiers.addModifier (this->_modifier);
- }
}
}
--- 88,95 ----
SkillPtr skillPtr = *itor++;
! if (skillPtr->getType () == CommonSkills::LISTEN ||
! skillPtr->getType () == CommonSkills::SPOT) {
Modifiers& modifiers = skillPtr->getModifiers ();
modifiers.addModifier (this->_modifier);
}
}
Index: Alertness.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/feats/Alertness.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Alertness.h 29 Mar 2003 02:10:36 -0000 1.3
--- Alertness.h 15 Apr 2003 16:58:41 -0000 1.4
***************
*** 41,46 ****
bool attachObject (Object& object);
bool dettachObject ();
- Feat::Compatibility getCompatibility () const;
- Feat::Group getGroup () const;
private:
--- 41,44 ----
***************
*** 50,75 ****
void addSkillModifier (Object& object);
};
-
- /**
- * Determine the compatability of this feat. Alertness feats are
- * exclusive feats.
- *
- * @return Feat::EXCLUSIVE
- */
- inline ogs::core::Feat::Compatibility
- Alertness::getCompatibility () const {
- return (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 (Feat::GENERAL);
- }
OGS_END_FEATS_NAMESPACE
--- 48,51 ----
Index: AllWeapons.cpp
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/feats/AllWeapons.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** AllWeapons.cpp 13 Apr 2003 05:27:06 -0000 1.3
--- AllWeapons.cpp 15 Apr 2003 16:58:41 -0000 1.4
***************
*** 23,41 ****
#include "ogs/core/Creature.h"
#include "ogs/feats/AllWeapons.h"
- #include "ogs/items/Weapon.h"
using ogs::feats::AllWeapons;
- using ogs::items::Weapon;
-
- /**
- * Create a new weapon proficiency feat for all wapons of a specified
- * group.
- *
- * @param proficiency Group of weapons that this feat applies to.
- */
- AllWeapons::AllWeapons (Weapon::Proficiency proficiency):
- _proficiency (proficiency) {
- // empty constructor body
- }
/**
--- 23,28 ----
***************
*** 63,67 ****
AllWeapons* allWeapons = dynamic_cast <AllWeapons*> (featPtr.get ());
if (allWeapons != NULL) {
! if (allWeapons->getProficiency () == _proficiency) {
return (false);
}
--- 50,54 ----
AllWeapons* allWeapons = dynamic_cast <AllWeapons*> (featPtr.get ());
if (allWeapons != NULL) {
! if (allWeapons->getProficiency () == this->getProficiency ()) {
return (false);
}
Index: AllWeapons.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/feats/AllWeapons.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** AllWeapons.h 4 Apr 2003 20:22:46 -0000 1.2
--- AllWeapons.h 15 Apr 2003 16:58:42 -0000 1.3
***************
*** 48,58 ****
static AllWeapons* createMartial ();
- Feat::Compatibility getCompatibility () const;
- ogs::items::Weapon::Proficiency getProficiency () const;
bool isProficient (const ogs::items::Weapon& weapon) const;
private:
- ogs::items::Weapon::Proficiency _proficiency;
-
AllWeapons (ogs::items::Weapon::Proficiency proficiency);
--- 48,54 ----
***************
*** 81,105 ****
/**
- * Determine the compatability of this feat. Weapon proficiency feats
- * for all weapons are exclusive feats.
- *
- * @return Feat::EXCLUSIVE
- */
- inline ogs::core::Feat::Compatibility
- AllWeapons::getCompatibility () const {
- return (Feat::EXCLUSIVE);
- }
-
- /**
- * Determine weapon proficiency that this feat applies to.
- *
- * @return Proficiency of weapon: SIMPLE or MARTIAL.
- */
- inline ogs::items::Weapon::Proficiency
- AllWeapons::getProficiency () const {
- return (this->_proficiency);
- }
-
- /**
* Determine if a weapon is a proficient weapon. A proficient weapon is
* a weapon that a creature with this feat is proficient with. If this
--- 77,80 ----
***************
*** 111,115 ****
inline bool
AllWeapons::isProficient (const ogs::items::Weapon& weapon) const {
! return (weapon.getProficiency () == this->_proficiency);
}
--- 86,102 ----
inline bool
AllWeapons::isProficient (const ogs::items::Weapon& weapon) const {
! return (weapon.getProficiency () == this->getProficiency ());
! }
!
! /**
! * Create a new weapon proficiency feat. The new feat applies to all
! * wapons in the specified proficiency group.
! *
! * @param proficiency Group of weapons that this feat applies to.
! */
! inline
! AllWeapons::AllWeapons (ogs::items::Weapon::Proficiency proficiency):
! WeaponProficiency (EXCLUSIVE, proficiency) {
! // empty constructor body
}
Index: ArmorProficiency.cpp
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/feats/ArmorProficiency.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** ArmorProficiency.cpp 13 Apr 2003 05:27:06 -0000 1.7
--- ArmorProficiency.cpp 15 Apr 2003 16:58:42 -0000 1.8
***************
*** 67,70 ****
--- 67,71 ----
*/
ArmorProficiency::ArmorProficiency (Armor::Proficiency proficiency):
+ Feat (EXCLUSIVE, GENERAL),
_proficiency (proficiency) {
// empty constructor body
Index: ArmorProficiency.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/feats/ArmorProficiency.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ArmorProficiency.h 29 Mar 2003 02:10:36 -0000 1.4
--- ArmorProficiency.h 15 Apr 2003 16:58:43 -0000 1.5
***************
*** 48,54 ****
static ArmorProficiency* createHeavy ();
- ogs::core::Feat::Compatibility getCompatibility () const;
- ogs::core::Feat::Group getGroup () const;
-
ogs::items::Armor::Proficiency getProficiency () const;
bool isProficient (const ogs::items::Armor& armor) const;
--- 48,51 ----
***************
*** 61,86 ****
bool canAttach (const Object& object) const;
};
-
- /**
- * Determine the compatability of this feat. Armor proficiency feats
- * are exclusive feats.
- *
- * @return Feat::EXCLUSIVE
- */
- inline ogs::core::Feat::Compatibility
- ArmorProficiency::getCompatibility () const {
- return (ogs::core::Feat::EXCLUSIVE);
- }
-
- /**
- * 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);
- }
/**
--- 58,61 ----
Index: ImprovedInitiative.cpp
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/feats/ImprovedInitiative.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ImprovedInitiative.cpp 29 Mar 2003 02:10:36 -0000 1.4
--- ImprovedInitiative.cpp 15 Apr 2003 16:58:44 -0000 1.5
***************
*** 35,39 ****
* Create a new Improved Initiative feat.
*/
! ImprovedInitiative::ImprovedInitiative () {
// empty constructor body
}
--- 35,40 ----
* Create a new Improved Initiative feat.
*/
! ImprovedInitiative::ImprovedInitiative ():
! Feat (EXCLUSIVE) {
// empty constructor body
}
***************
*** 59,63 ****
*/
bool ImprovedInitiative::attachObject (Object& object) {
! bool attached = attachObject (object);
if (attached) {
--- 60,64 ----
*/
bool ImprovedInitiative::attachObject (Object& object) {
! bool attached = Feat::attachObject (object);
if (attached) {
Index: ImprovedSave.cpp
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/feats/ImprovedSave.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ImprovedSave.cpp 13 Apr 2003 05:27:06 -0000 1.4
--- ImprovedSave.cpp 15 Apr 2003 16:58:44 -0000 1.5
***************
*** 58,62 ****
* @param type One of the three types of improved saves.
*/
! ImprovedSave::ImprovedSave (Type type): _type (type) {
// empty constructor body
}
--- 58,64 ----
* @param type One of the three types of improved saves.
*/
! ImprovedSave::ImprovedSave (Type type):
! Feat (EXCLUSIVE),
! _type (type) {
// empty constructor body
}
***************
*** 103,107 ****
*/
bool ImprovedSave::attachObject (Object& object) {
! bool attached = attachObject (object);
if (attached) {
--- 105,109 ----
*/
bool ImprovedSave::attachObject (Object& object) {
! bool attached = Feat::attachObject (object);
if (attached) {
Index: Makefile.am
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/feats/Makefile.am,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Makefile.am 29 Mar 2003 02:10:37 -0000 1.6
--- Makefile.am 15 Apr 2003 16:58:45 -0000 1.7
***************
*** 27,31 ****
AllWeapons.h \
ArmorProficiency.h \
- BonusFeat.h \
ImprovedInitiative.h \
ImprovedSave.h \
--- 27,30 ----
***************
*** 48,52 ****
AllWeapons.cpp \
ArmorProficiency.cpp \
- BonusFeat.cpp \
ImprovedInitiative.cpp \
ImprovedSave.cpp \
--- 47,50 ----
Index: ShieldProficiency.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/feats/ShieldProficiency.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ShieldProficiency.h 29 Mar 2003 02:10:38 -0000 1.2
--- ShieldProficiency.h 15 Apr 2003 16:58:45 -0000 1.3
***************
*** 41,47 ****
ShieldProficiency ();
- Feat::Compatibility getCompatibility () const;
- Feat::Group getGroup () const;
-
private:
bool canAttach (const Object& object) const;
--- 41,44 ----
***************
*** 51,78 ****
* Create a new Shield Proficiency feat.
*/
! inline ShieldProficiency::ShieldProficiency () {
// empty constructor body
- }
-
- /**
- * Determine the compatability of this feat. Shield proficiency feats
- * are exclusive feats.
- *
- * @return Feat::EXCLUSIVE
- */
- inline ogs::core::Feat::Compatibility
- ShieldProficiency::getCompatibility () const {
- return (Feat::EXCLUSIVE);
- }
-
- /**
- * Determine the group that this feat belongs to. Shield proficiency
- * feats are general feats.
- *
- * @return Feat::GENERAL
- */
- inline ogs::core::Feat::Group
- ShieldProficiency::getGroup () const {
- return (Feat::GENERAL);
}
--- 48,54 ----
* Create a new Shield Proficiency feat.
*/
! inline ShieldProficiency::ShieldProficiency (),
! Feat (EXCLUSIVE) {
// empty constructor body
}
Index: Toughness.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/feats/Toughness.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Toughness.h 29 Mar 2003 02:10:38 -0000 1.2
--- Toughness.h 15 Apr 2003 16:58:45 -0000 1.3
***************
*** 41,74 ****
bool attachObject (Object& object);
bool dettachObject ();
- Feat::Compatibility getCompatibility () const;
- Feat::Group getGroup () const;
-
- private:
- ogs::core::Modifier _modifier;
-
- bool canAttach (const Object& object) const;
- void addHealthModifier (Object& object);
};
/**
! * Determine the compatability of this feat. Toughness feats are
! * cumulative feats.
! *
! * @return Feat::CUMULATIVE
! */
! inline ogs::core::Feat::Compatibility
! Toughness::getCompatibility () const {
! return (Feat::CUMULATIVE);
! }
!
! /**
! * Determine the group that this feat belongs to. Toughness feats are
! * general feats.
! *
! * @return Feat::GENERAL
*/
! inline ogs::core::Feat::Group
! Toughness::getGroup () const {
! return (Feat::GENERAL);
}
--- 41,52 ----
bool attachObject (Object& object);
bool dettachObject ();
};
/**
! * Create a new Toughness feat.
*/
! inline Toughness::Toughness ():
! Feat (CUMULATIVE) {
! // empty constructor body
}
Index: WeaponProficiency.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/feats/WeaponProficiency.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** WeaponProficiency.h 29 Mar 2003 02:10:38 -0000 1.2
--- WeaponProficiency.h 15 Apr 2003 16:58:45 -0000 1.3
***************
*** 40,75 ****
class WeaponProficiency: public ogs::core::Feat {
public:
! ogs::core::Feat::Group getGroup () const;
!
! /**
! * Determine weapon proficiency that this feat applies to.
! *
! * @return Proficiency of weapon: SIMPLE, MARTIAL, or EXOTIC.
! */
! virtual ogs::items::Weapon::Proficiency getProficiency () const = 0;
! /**
! * Determine if a weapon is a proficient weapon. A proficient
! * weapon is a weapon that a creature with this feat is proficient
! * with. If this feat is not attached to a creature, the weapon is
! * not a proficient weapon.
! *
! * @return True if weapon is a proficient weapon.
! */
! virtual bool isProficient (const ogs::items::Weapon& weapon) const = 0;
! virtual ~WeaponProficiency ();
};
/**
! * Determine the group that this feat belongs to. Weapon proficiency
! * feats are general feats.
*
! * @return Feat::GENERAL
*/
! inline ogs::core::Feat::Group
! WeaponProficiency::getGroup () const {
! return (ogs::core::Feat::GENERAL);
}
--- 40,77 ----
class WeaponProficiency: public ogs::core::Feat {
public:
+ ogs::items::Weapon::Proficiency getProficiency () const;
! virtual ~WeaponProficiency () = 0;
! protected:
! WeaponProficiency (Compatibility compatibility,
! ogs::items::Weapon::Proficiency weaponProficiency);
! private:
! ogs::items::Weapon::Proficiency _proficiency;
};
/**
! * Create a new weapon proficiency.
*
! * @param compatibility Compatibility of feat.
! * @param weaponProficiency Proficiency of weapons covered by this feat.
*/
! inline
! WeaponProficiency::WeaponProficiency (Compatibility compatibility,
! ogs::items::Weapon::Proficiency weaponProficiency):
! Feat (compatibility, GENERAL),
! _proficiency (_proficiency) {
! // empty constructor body
! }
!
! /**
! * Determine weapon proficiency that this feat applies to.
! *
! * @return Proficiency of weapon: SIMPLE, MARTIAL, or EXOTIC.
! */
! inline ogs::items::Weapon::Proficiency
! WeaponProficiency::getProficiency () const {
! return (this->_proficiency);
}
|