[ogs-changes] dist/c++/ogs/spells/conjurations CureWounds.cpp,1.3,1.4 CureWounds.h,1.2,1.3
Status: Alpha
Brought to you by:
elemings
|
From: <ele...@us...> - 2003-04-18 01:41:11
|
Update of /cvsroot/ogs/dist/c++/ogs/spells/conjurations
In directory sc8-pr-cvs1:/tmp/cvs-serv25962/c++/ogs/spells/conjurations
Modified Files:
CureWounds.cpp CureWounds.h
Log Message:
See C++ ChangeLog (Apr 17) for details.
Index: CureWounds.cpp
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/spells/conjurations/CureWounds.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** CureWounds.cpp 13 Apr 2003 05:28:46 -0000 1.3
--- CureWounds.cpp 18 Apr 2003 01:41:07 -0000 1.4
***************
*** 44,50 ****
* @param casterLevel Level of caster.
* @param degree Degree of cure wounds spell.
*/
! CureWounds::CureWounds (CasterLevel casterLevel, Degree degree):
! _casterLevel (casterLevel), _degree (degree) {
// empty
}
--- 44,55 ----
* @param casterLevel Level of caster.
* @param degree Degree of cure wounds spell.
+ * @param inflict True if this spell inflicts wounds instead.
*/
! CureWounds::CureWounds (CasterLevel casterLevel,
! Degree degree,
! bool inflict):
! _casterLevel (casterLevel),
! _degree (degree),
! _inflict (inflict) {
// empty
}
***************
*** 92,95 ****
--- 97,102 ----
* points are added to the current hit points of the creature (up to its
* maximum points).
+ *
+ * @todo Implement inflict wounds behavior.
*/
void CureWounds::castSpell () {
Index: CureWounds.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/spells/conjurations/CureWounds.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CureWounds.h 13 Apr 2003 05:28:46 -0000 1.2
--- CureWounds.h 18 Apr 2003 01:41:07 -0000 1.3
***************
*** 26,32 ****
# define OGS_SPELLS_CONJURATIONS_CURE_WOUNDS_H
- # include <ogs/core/CClass.h>
# include <ogs/core/Die.h>
- # include <ogs/core/Entity.h>
# include <ogs/core/Experience.h>
# include <ogs/magic/Subschool.h>
--- 26,30 ----
***************
*** 36,40 ****
OGS_BEGIN_SPELLS_CONJURATIONS_NAMESPACE
! using ogs::core::CClass;
/**
--- 34,38 ----
OGS_BEGIN_SPELLS_CONJURATIONS_NAMESPACE
! class ogs::core::Entity;
/**
***************
*** 43,47 ****
* to undead creatures instead of curing it. Cure wounds spells can
* have different degrees. The degree of the spell determines how much
! * damage is healed (or dealt in the case of undead creatures).
*/
class CureWounds: public ogs::spells::Conjuration {
--- 41,52 ----
* to undead creatures instead of curing it. Cure wounds spells can
* have different degrees. The degree of the spell determines how much
! * damage is healed (or dealt in the case of undead creatures). The
! * level of the spell caster also increases the amount of damage cured
! * (or inflicted) by the spell.
! *
! * The opposite version of this spell inflicts wounds instead of curing
! * damage to living creatures and heals undead creatures.
! *
! * @todo Determine effects of metamagic feats and implement them.
*/
class CureWounds: public ogs::spells::Conjuration {
***************
*** 80,88 ****
};
! static CureWounds* createMinor (CasterLevel casterLevel);
! static CureWounds* createLight (CasterLevel casterLevel);
! static CureWounds* createModerate (CasterLevel casterLevel);
! static CureWounds* createSerious (CasterLevel casterLevel);
! static CureWounds* createCritical (CasterLevel casterLevel);
const ogs::magic::School& getSchool () const;
--- 85,103 ----
};
! static CureWounds*
! createMinor (CasterLevel casterLevel,
! bool inflict = false);
! static CureWounds*
! createLight (CasterLevel casterLevel,
! bool inflict = false);
! static CureWounds*
! createModerate (CasterLevel casterLevel,
! bool inflict = false);
! static CureWounds*
! createSerious (CasterLevel casterLevel,
! bool inflict = false);
! static CureWounds*
! createCritical (CasterLevel casterLevel,
! bool inflict = false);
const ogs::magic::School& getSchool () const;
***************
*** 92,101 ****
Degree getDegree () const;
Target getTarget () const;
! void setTarget (ogs::core::Entity& entity);
void castSpell ();
protected:
! CureWounds (CasterLevel casterLevel, Degree degree);
private:
--- 107,119 ----
Degree getDegree () const;
Target getTarget () const;
! void setTarget (Target target);
! bool inflictsWounds () const;
void castSpell ();
protected:
! CureWounds (CasterLevel casterLevel,
! Degree degree,
! bool inflict = false);
private:
***************
*** 103,106 ****
--- 121,125 ----
Target _target;
Degree _degree;
+ bool _inflict;
ogs::core::Die::Value rollHitPoints () const;
***************
*** 110,113 ****
--- 129,197 ----
/**
+ * Create a new Cure Minor Wounds spell.
+ *
+ * @param casterLevel Level of spell caster.
+ * @param inflict True if this spell inflicts wounds instead.
+ * @return A new Cure Minor Wounds spell.
+ */
+ inline CureWounds*
+ CureWounds::createMinor (CasterLevel casterLevel,
+ bool inflict) {
+ return (new CureWounds (casterLevel, MINOR, inflict));
+ }
+
+ /**
+ * Create a new Cure Light Wounds spell.
+ *
+ * @param casterLevel Level of spell caster.
+ * @param inflict True if this spell inflicts wounds instead.
+ * @return A new Cure Light Wounds spell.
+ */
+ inline CureWounds*
+ CureWounds::createLight (CasterLevel casterLevel,
+ bool inflict) {
+ return (new CureWounds (casterLevel, LIGHT));
+ }
+
+ /**
+ * Create a new Cure Moderate Wounds spell.
+ *
+ * @param casterLevel Level of spell caster.
+ * @param inflict True if this spell inflicts wounds instead.
+ * @return A new Cure Moderate Wounds spell.
+ */
+ inline CureWounds*
+ CureWounds::createModerate (CasterLevel casterLevel,
+ bool inflict) {
+ return (new CureWounds (casterLevel, MODERATE));
+ }
+
+ /**
+ * Create a new Cure Serious Wounds spell.
+ *
+ * @param casterLevel Level of spell caster.
+ * @param inflict True if this spell inflicts wounds instead.
+ * @return A new Cure Serious Wounds spell.
+ */
+ inline CureWounds*
+ CureWounds::createSerious (CasterLevel casterLevel,
+ bool inflict) {
+ return (new CureWounds (casterLevel, SERIOUS, inflict));
+ }
+
+ /**
+ * Create a new Cure Critical Wounds spell.
+ *
+ * @param casterLevel Level of spell caster.
+ * @param inflict True if this spell inflicts wounds instead.
+ * @return A new Cure Critical Wounds spell.
+ */
+ inline CureWounds*
+ CureWounds::createCritical (CasterLevel casterLevel,
+ bool inflict) {
+ return (new CureWounds (casterLevel, CRITICAL, inflict));
+ }
+
+ /**
* Determine the school (or subschool) for this type of spell. All cure
* wounds spells are in the Healing subschool of the Conjuration school.
***************
*** 147,150 ****
--- 231,245 ----
/**
+ * Change the target of this spell.
+ *
+ * @param target Target of this spell.
+ * @todo Complete the implementation of this function.
+ */
+ inline void
+ CureWounds::setTarget (Target target) {
+ this->_target = target;
+ }
+
+ /**
* Determine the degree of this cure wounds spell.
*
***************
*** 154,157 ****
--- 249,262 ----
CureWounds::getDegree () const {
return (this->_degree);
+ }
+
+ /**
+ * Determine if this spell inflicts wounds instead of curing wounds.
+ *
+ * @return True if the spell inflicts wounds instead.
+ */
+ inline bool
+ CureWounds::inflictsWounds () const {
+ return (this->_inflict);
}
|