ogs-changes Mailing List for Open Gaming System (Page 2)
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
|
---|
From: <ele...@us...> - 2003-05-02 19:06:39
|
Update of /cvsroot/ogs/dist/c++/ogs/core/moves In directory sc8-pr-cvs1:/tmp/cvs-serv32451/ogs/core/moves Added Files: Burrow.h Fly.h Makefile.am Namespace.h Walk.h Log Message: See C++ ChangeLog (May 2) for details. --- NEW FILE: Burrow.h --- /* * Burrow.h -- class interface for burrowing moves * 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: Burrow.h,v 1.1 2003/05/02 19:06:31 elemings Exp $ */ #ifdef __cplusplus # ifndef OGS_CORE_MOVES_BURROW_H # define OGS_CORE_MOVES_BURROW_H # include <ogs/core/Move.h> # include <ogs/core/moves/Namespace.h> OGS_BEGIN_CORE_MOVES_NAMESPACE /** * A mode of movement based on burrowing. Some creatures that can move * by burrowing can move through solid rock while others can not. */ class Burrow: public ogs::core::Move { public: Burrow (Speed speed, bool throughSolidRock = false); bool throughSolidRock () const; private: bool _throughSolidRock; }; /** * Create a new burrow move. * * @param speed Normal speed of move. * @param throughSolidRock True if move can burrow through solid rock. */ inline Burrow::Burrow (Speed speed, bool throughSolidRock): Move (BURROW, speed), _throughSolidRock (throughSolidRock) { // empty constructor body } /** * Determine if this move can burrow through solid rock. * * @return True if a this move can burrow through solid rock. */ inline bool Burrow::throughSolidRock () const { return (this->_throughSolidRock); } OGS_END_CORE_MOVES_NAMESPACE # endif /* !defined OGS_CORE_MOVES_BURROW_H */ #endif /* defined __cplusplus */ --- NEW FILE: Fly.h --- /* * Fly.h -- class interface for templates * 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: Fly.h,v 1.1 2003/05/02 19:06:31 elemings Exp $ */ #ifdef __cplusplus # ifndef OGS_CORE_MOVES_FLY_H # define OGS_CORE_MOVES_FLY_H # include <ogs/core/moves/Namespace.h> OGS_BEGIN_CORE_MOVES_NAMESPACE /** * A mode of movement based on flying. Some creatures can fly better * than others as specified by a maneuverability class. */ class Fly: public ogs::core::Move { public: /** * An enumerated type that represents maneuverability class. * Maneuverability class determines how well the creature can fly in * three dimensions (straight, side to side, up or down, and * backwards). */ enum Maneuver { /** * An integer constant that indicates perfect maneuverability. A * creature with perfect maneuverability can stop on a dime, hover * at will, turn in an instant, and take off in any direction like * a hummingbird. */ PERFECT = 1, GOOD, AVERAGE, POOR, /** * An integer constant that indicates clumsy maneuverability. A * clumsy maneuverability class is a creature that can barely fly. * This usually includes creatures that can only glide through the * air. */ CLUMSY }; Fly (Speed speed, Maneuver maneuver); Maneuver getManeuver () const; private: Maneuver _maneuver; }; /** * Create a new fly move. * * @param speed Normal speed of move. * @param maneuver Maneuverability class of move. */ inline Fly::Fly (Speed speed, Maneuver maneuver): Move (FLY, speed), _maneuver (maneuver) { // empty constructor body } /** * Determine the maneuverability class of this fly move. * * @return Maneuverability class of this fly move. */ inline Fly::Maneuver Fly::getManeuver () const { return (this->_maneuver); } OGS_END_CORE_MOVES_NAMESPACE # endif /* !defined OGS_CORE_MOVES_FLY_H */ #endif /* defined __cplusplus */ --- NEW FILE: Makefile.am --- ## ## Makefile.am -- Automake file for Open Gaming System (OGS) ## 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: Makefile.am,v 1.1 2003/05/02 19:06:31 elemings Exp $ ## pkgincludedir = $(includedir)/ogs/core/moves pkginclude_HEADERS = \ Burrow.h \ Fly.h \ Namespace.h \ Walk.h --- NEW FILE: Namespace.h --- /* * Namespace.h -- namespace for extended moves * 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: Namespace.h,v 1.1 2003/05/02 19:06:31 elemings Exp $ */ #ifdef __cplusplus # ifndef OGS_CORE_MOVES_NAMESPACE_H # define OGS_CORE_MOVES_NAMESPACE_H # include <ogs/core/Namespace.h> /** * @namespace ogs::core::moves * * Contains extended move classes. */ # define OGS_BEGIN_CORE_MOVES_NAMESPACE \ OGS_BEGIN_CORE_NAMESPACE \ namespace moves { # define OGS_END_CORE_MOVES_NAMESPACE \ } \ OGS_END_CORE_NAMESPACE # endif /* !defined OGS_CORE_MOVES_NAMESPACE_H */ #endif /* defined __cplusplus */ --- NEW FILE: Walk.h --- /* * Walk.h -- class interface for land-based movement * 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: Walk.h,v 1.1 2003/05/02 19:06:31 elemings Exp $ */ #ifdef __cplusplus # ifndef OGS_CORE_MOVES_WALK_H # define OGS_CORE_MOVES_WALK_H # include <ogs/core/Move.h> # include <ogs/core/moves/Namespace.h> OGS_BEGIN_CORE_MOVES_NAMESPACE /** * A mode of movement based on walking. These modes can include * running, crawling, hopping, rolling, or any other similar move. * Most creatures that can move by walking can also run but some * can not. */ class Walk: public ogs::core::Move { public: Walk (Speed speed, bool canRun = true); bool canRun () const; private: bool _canRun; }; /** * Create a new walk move. * * @param speed Normal speed of move. * @param canRun True if a creature with this move can also run. */ inline Walk::Walk (Speed speed, bool canRun): Move (WALK, speed), _canRun (canRun) { // empty constructor body } /** * Determine if a creature with this move can also run. * * @return True if a creature with this move can also run. */ inline bool Walk::canRun () const { return (this->_canRun); } OGS_END_CORE_MOVES_NAMESPACE # endif /* !defined OGS_CORE_MOVES_WALK_H */ #endif /* defined __cplusplus */ |
From: <ele...@us...> - 2003-05-01 06:56:06
|
Update of /cvsroot/ogs/dist/c++/ogs/core/moves In directory sc8-pr-cvs1:/tmp/cvs-serv16722/moves Log Message: Directory /cvsroot/ogs/dist/c++/ogs/core/moves added to the repository |
From: <ele...@us...> - 2003-04-19 18:37:44
|
Update of /cvsroot/ogs/dist/c++/test In directory sc8-pr-cvs1:/tmp/cvs-serv22457/c++/test Modified Files: CreatureTest.cpp Log Message: See C++ ChangeLog (Apr 19) for details. Index: CreatureTest.cpp =================================================================== RCS file: /cvsroot/ogs/dist/c++/test/CreatureTest.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CreatureTest.cpp 15 Apr 2003 16:58:52 -0000 1.1 --- CreatureTest.cpp 19 Apr 2003 18:37:41 -0000 1.2 *************** *** 36,39 **** --- 36,40 ---- using std::cout; using std::endl; + using std::showpos; using namespace ogs::core; *************** *** 60,64 **** ostr << "d" << die.getSides (); if (die.getModifier () != 0) { ! ostr << std::showpos << die.getModifier (); } return (ostr.str ()); --- 61,65 ---- ostr << "d" << die.getSides (); if (die.getModifier () != 0) { ! ostr << showpos << die.getModifier (); } return (ostr.str ()); *************** *** 88,92 **** Abilities::Iterator itor = abilities.getBegin (); - cout << "Abilities: "; while (itor != abilities.getEnd ()) { Abilities::Value& value = *itor++; --- 89,92 ---- *************** *** 101,105 **** } ! cout << endl; } --- 101,105 ---- } ! cout << "." << endl; } *************** *** 176,181 **** SkillPtr skillPtr = *itor++; ! cout << getSkillName (skillPtr->getType ()) << " (" ! << (skillPtr->getModifiers ()).getValue () << ")"; if (itor != skills.end ()) { --- 176,181 ---- SkillPtr skillPtr = *itor++; ! cout << getSkillName (skillPtr->getType ()) << " " ! << (skillPtr->getModifiers ()).getValue (); if (itor != skills.end ()) { *************** *** 236,249 **** cout << "Size: " << char ((creature.getSize ()).getType ()) << endl; ! cout << "Hit Dice: " << formatDieNotation (creature.getHitDice ()) ! << endl; ! cout << "Initiative: " << (creature.getInitiative ()).getValue () << endl; - cout << "Defense: " << (creature.getDefense ()).getValue () << endl; const Saves& saves = creature.getSaves (); ! cout << "Saves: Fort " << saves.fort.getValue () << ", " << "Ref " << saves.ref.getValue () << ", " ! << "Will " << saves.will.getValue () << endl; printAbilities (creature.getAbilities ()); --- 236,255 ---- cout << "Size: " << char ((creature.getSize ()).getType ()) << endl; ! ! cout << "HD " << formatDieNotation (creature.getHitDice ()) ! << "; "; ! Entity::Health health = creature.getHealth (); ! cout << "hp " << std::noshowpos << health.first << "/" ! << health.second << "; "; ! ! cout << "Init " << showpos << (creature.getInitiative ()).getValue () ! << "; "; ! cout << "AC " << (creature.getDefense ()).getValue () << endl; const Saves& saves = creature.getSaves (); ! cout << "SV Fort " << saves.fort.getValue () << ", " << "Ref " << saves.ref.getValue () << ", " ! << "Will " << saves.will.getValue () << "; "; printAbilities (creature.getAbilities ()); |
From: <ele...@us...> - 2003-04-19 18:37:44
|
Update of /cvsroot/ogs/dist/c++ In directory sc8-pr-cvs1:/tmp/cvs-serv22457/c++ Modified Files: ChangeLog Log Message: See C++ ChangeLog (Apr 19) for details. Index: ChangeLog =================================================================== RCS file: /cvsroot/ogs/dist/c++/ChangeLog,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** ChangeLog 18 Apr 2003 01:40:59 -0000 1.19 --- ChangeLog 19 Apr 2003 18:37:40 -0000 1.20 *************** *** 1,3 **** --- 1,9 ---- + Sat Apr 19 18:32:35 UTC 2003 Eric Lemings <ele...@us...> + + * ogs/core/Creature.cpp, test/CreatureTest.cpp: Add Con bonus to + hit dice and roll hit points in Creature constructor. Make + output of test driver look more like a stat block. + Thu Apr 17 18:10:12 UTC 2003 Eric Lemings <ele...@us...> |
From: <ele...@us...> - 2003-04-19 18:37:44
|
Update of /cvsroot/ogs/dist/c++/ogs/core In directory sc8-pr-cvs1:/tmp/cvs-serv22457/c++/ogs/core Modified Files: Creature.cpp Log Message: See C++ ChangeLog (Apr 19) for details. Index: Creature.cpp =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/core/Creature.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Creature.cpp 18 Apr 2003 01:41:02 -0000 1.12 --- Creature.cpp 19 Apr 2003 18:37:40 -0000 1.13 *************** *** 42,45 **** --- 42,46 ---- * @param size Size of creature. * @param parts An array of body part types. + * @todo Observe Con modifier and update hit dice modifier and hit points. */ Creature::Creature (Die hitDice, Abilities abilities, *************** *** 61,66 **** this->_saves.ref.addModifier (modifier); this->_initiative.addModifier (modifier); ! Defense& defense = getDefense (); ! defense.addModifier (modifier); } --- 62,66 ---- this->_saves.ref.addModifier (modifier); this->_initiative.addModifier (modifier); ! (getDefense ()).addModifier (modifier); } *************** *** 69,72 **** --- 69,76 ---- if (ability) { this->_saves.fort.addModifier (ability->getModifier ()); + + // Add Con bonus to hit dice. + this->_hitDice.setModifier ((ability->getModifier ()).getValue () * + this->_hitDice.getCount ()); } *************** *** 81,84 **** --- 85,99 ---- //this->_saves.will.addModifier (this->_willModifier); + // Roll hit points. Minimum roll for each hit die is 1 hp. + Die::Value hitPoints = this->_hitDice.rollValue (); + Die::Count count = this->_hitDice.getCount (); + if (hitPoints < count) { + hitPoints = count; + } + + Health health (hitPoints, hitPoints); + setHealth (health); + + // Create a body from array of part types. for (Parts::size_type i = 0; i < parts.size (); ++i) { this->_body.push_back (BodyPart (*this, parts [i])); |
From: <ele...@us...> - 2003-04-19 03:35:50
|
Update of /cvsroot/ogs/dist In directory sc8-pr-cvs1:/tmp/cvs-serv28220 Modified Files: ogs.spec.in Log Message: Have to explictly specify arch for each package. Index: ogs.spec.in =================================================================== RCS file: /cvsroot/ogs/dist/ogs.spec.in,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ogs.spec.in 19 Apr 2003 00:33:53 -0000 1.10 --- ogs.spec.in 19 Apr 2003 03:35:47 -0000 1.11 *************** *** 47,50 **** --- 47,51 ---- Group: System Environment/Libraries Requires: glib2 + BuildArch: i386 %description c *************** *** 67,70 **** --- 68,72 ---- Requires: pkgconfig Requires: glib2-devel + BuildArch: i386 %description c-devel *************** *** 83,86 **** --- 85,89 ---- Summary: Libraries for running open gaming software written in C++. Group: System Environment/Libraries + BuildArch: i386 %description c++ *************** *** 101,104 **** --- 104,108 ---- Group: Development/Libraries Requires: %{name}-c++ = %{version} + BuildArch: i386 %description c++-devel *************** *** 132,135 **** --- 136,140 ---- Summary: Libraries for running open gaming software written in Java. Group: Development/Libraries + BuildArch: i386 %description java |
From: <ele...@us...> - 2003-04-19 00:33:56
|
Update of /cvsroot/ogs/dist In directory sc8-pr-cvs1:/tmp/cvs-serv13550 Modified Files: ogs.spec.in Log Message: Fix directory layout. Index: ogs.spec.in =================================================================== RCS file: /cvsroot/ogs/dist/ogs.spec.in,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ogs.spec.in 18 Apr 2003 16:49:18 -0000 1.9 --- ogs.spec.in 19 Apr 2003 00:33:53 -0000 1.10 *************** *** 178,182 **** %{_includedir}/ogs/core/[a-z]*.h %{_includedir}/ogs/core/abilities/[a-z]*.h ! %{_includedir}/ogs/core/saves/[a-z]*.h %{_includedir}/ogs/magic/[a-z]*.h %{_includedir}/ogs/support/[a-z]*.h --- 178,182 ---- %{_includedir}/ogs/core/[a-z]*.h %{_includedir}/ogs/core/abilities/[a-z]*.h ! %{_includedir}/ogs/core/details/[a-z]*.h %{_includedir}/ogs/magic/[a-z]*.h %{_includedir}/ogs/support/[a-z]*.h *************** *** 185,190 **** %{_libdir}/libogs-c.la %{_libdir}/libogs-c.so ! %{_libdir}/pkgconfig/ogs.pc ! %{_datadir}/aclocal/ogs.m4 %files c++ --- 185,190 ---- %{_libdir}/libogs-c.la %{_libdir}/libogs-c.so ! %{_libdir}/pkgconfig/ogs-c.pc ! %{_datadir}/aclocal/ogs-c.m4 %files c++ *************** *** 200,208 **** %{_includedir}/ogs/combat/feats/[A-Z]*.h %{_includedir}/ogs/core/[A-Z]*.h - %{_includedir}/ogs/core/abilities/[A-Z]*.h %{_includedir}/ogs/core/details/[A-Z]*.h %{_includedir}/ogs/creatures/[A-Z]*.h %{_includedir}/ogs/feats/[A-Z]*.h %{_includedir}/ogs/items/[A-Z]*.h %{_includedir}/ogs/magic/[A-Z]*.h %{_includedir}/ogs/magic/abilities/[A-Z]*.h --- 200,211 ---- %{_includedir}/ogs/combat/feats/[A-Z]*.h %{_includedir}/ogs/core/[A-Z]*.h %{_includedir}/ogs/core/details/[A-Z]*.h %{_includedir}/ogs/creatures/[A-Z]*.h + %{_includedir}/ogs/creatures/humanoids/[A-Z]*.h + %{_includedir}/ogs/creatures/undeads/[A-Z]*.h %{_includedir}/ogs/feats/[A-Z]*.h %{_includedir}/ogs/items/[A-Z]*.h + %{_includedir}/ogs/items/rings/[A-Z]*.h + %{_includedir}/ogs/items/wonders/[A-Z]*.h %{_includedir}/ogs/magic/[A-Z]*.h %{_includedir}/ogs/magic/abilities/[A-Z]*.h *************** *** 210,213 **** --- 213,217 ---- %{_includedir}/ogs/skills/[A-Z]*.h %{_includedir}/ogs/spells/[A-Z]*.h + %{_includedir}/ogs/spells/conjurations/[A-Z]*.h %{_includedir}/ogs/support/[A-Z]*.h %{_libdir}/libogs-cxx.a |
From: <ele...@us...> - 2003-04-19 00:32:32
|
Update of /cvsroot/ogs/dist/c++/ogs/items/rings In directory sc8-pr-cvs1:/tmp/cvs-serv12885 Modified Files: Namespace.h Log Message: Better namespace description. Index: Namespace.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/items/rings/Namespace.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Namespace.h 18 Apr 2003 01:41:05 -0000 1.2 --- Namespace.h 19 Apr 2003 00:32:29 -0000 1.3 *************** *** 31,35 **** * @namespace ogs::items::rings * ! * Provides a set of magic rings. */ # define OGS_BEGIN_ITEMS_RINGS_NAMESPACE \ --- 31,37 ---- * @namespace ogs::items::rings * ! * A collection of magical rings. The magic rings contained in this ! * package include rings whose characteristics and behavior can be ! * implemented completely within the framework of the Open Gaming System. */ # define OGS_BEGIN_ITEMS_RINGS_NAMESPACE \ |
From: <ele...@us...> - 2003-04-19 00:25:44
|
Update of /cvsroot/ogs/dist/c++/ogs/items/wonders In directory sc8-pr-cvs1:/tmp/cvs-serv11122 Modified Files: Namespace.h Log Message: Added a description for the namespace. Index: Namespace.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/items/wonders/Namespace.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Namespace.h 23 Mar 2003 22:14:36 -0000 1.1 --- Namespace.h 19 Apr 2003 00:25:39 -0000 1.2 *************** *** 31,35 **** * @namespace ogs::items::wonders * ! * */ # define OGS_BEGIN_ITEMS_WONDERS_NAMESPACE \ --- 31,38 ---- * @namespace ogs::items::wonders * ! * A collection of wonderous magical items. The wonderous items ! * contained in this package include magical items whose characteristics ! * and behavior can be implemented completely within the framework of ! * the Open Gaming System. */ # define OGS_BEGIN_ITEMS_WONDERS_NAMESPACE \ |
From: <ele...@us...> - 2003-04-19 00:17:10
|
Update of /cvsroot/ogs/dist/c++/ogs/items/wonders In directory sc8-pr-cvs1:/tmp/cvs-serv8847 Modified Files: Makefile.am Log Message: Added missing backslash at end of pkginclude_HEADERS line. Index: Makefile.am =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/items/wonders/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile.am 23 Mar 2003 22:14:36 -0000 1.1 --- Makefile.am 19 Apr 2003 00:17:06 -0000 1.2 *************** *** 23,27 **** pkgincludedir = $(includedir)/ogs/items/wonders ! pkginclude_HEADERS = Namespace.h --- 23,27 ---- pkgincludedir = $(includedir)/ogs/items/wonders ! pkginclude_HEADERS = \ Namespace.h |
From: <ele...@us...> - 2003-04-18 20:40:22
|
Update of /cvsroot/ogs/dist/java/ogs/feats In directory sc8-pr-cvs1:/tmp/cvs-serv24317/ogs/feats Modified Files: AllWeapons.java Log Message: Doc fixes. Index: AllWeapons.java =================================================================== RCS file: /cvsroot/ogs/dist/java/ogs/feats/AllWeapons.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AllWeapons.java 4 Apr 2003 20:22:54 -0000 1.1 --- AllWeapons.java 18 Apr 2003 20:39:48 -0000 1.2 *************** *** 33,38 **** * proficient with all martial weapons. Exotic weapons can only be * selected as single weapons. This class can be used instead of the ! * @c SingleWeapon class to indicate that a creature is proficient with ! * all weapons in one of these groups. * * @see SingleWeapon --- 33,38 ---- * proficient with all martial weapons. Exotic weapons can only be * selected as single weapons. This class can be used instead of the ! * <code>SingleWeapon</code> class to indicate that a creature is ! * proficient with all weapons in one of these groups. * * @see SingleWeapon |
From: <ele...@us...> - 2003-04-18 20:40:21
|
Update of /cvsroot/ogs/dist/java/ogs/core In directory sc8-pr-cvs1:/tmp/cvs-serv24317/ogs/core Modified Files: Ability.java Log Message: Doc fixes. Index: Ability.java =================================================================== RCS file: /cvsroot/ogs/dist/java/ogs/core/Ability.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Ability.java 4 Apr 2003 20:22:50 -0000 1.4 --- Ability.java 18 Apr 2003 20:39:47 -0000 1.5 *************** *** 61,65 **** * * @see Defense ! * @see Saves::ref */ public static final byte DEX = 2; --- 61,65 ---- * * @see Defense ! * @see Saves */ public static final byte DEX = 2; *************** *** 69,73 **** * modifier is added to hit die rolls and Fortitude saving throws. * ! * @see Saves::fort */ public static final byte CON = 3; --- 69,73 ---- * modifier is added to hit die rolls and Fortitude saving throws. * ! * @see Saves */ public static final byte CON = 3; *************** *** 80,84 **** * modifier is added to all Will saving throws. * ! * @see Saves::will */ public static final byte WIS = 5; --- 80,84 ---- * modifier is added to all Will saving throws. * ! * @see Saves */ public static final byte WIS = 5; |
From: <ele...@us...> - 2003-04-18 20:40:21
|
Update of /cvsroot/ogs/dist/java In directory sc8-pr-cvs1:/tmp/cvs-serv24317 Modified Files: ChangeLog Makefile.am Log Message: Doc fixes. Index: ChangeLog =================================================================== RCS file: /cvsroot/ogs/dist/java/ChangeLog,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ChangeLog 4 Apr 2003 20:22:47 -0000 1.6 --- ChangeLog 18 Apr 2003 20:39:45 -0000 1.7 *************** *** 1,3 **** --- 1,8 ---- + Fri Apr 18 20:33:43 UTC 2003 Eric Lemings <ele...@us...> + + * Makefile.am, ogs/core/Ability.java, ogs/feats/AllWeapon.java, + ogs/items/Armor.java, ogs/support/Attachable.java: Doc fixes. + Fri Apr 4 04:27:24 UTC 2003 Eric Lemings <ele...@us...> Index: Makefile.am =================================================================== RCS file: /cvsroot/ogs/dist/java/Makefile.am,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Makefile.am 4 Apr 2003 20:22:47 -0000 1.6 --- Makefile.am 18 Apr 2003 20:39:46 -0000 1.7 *************** *** 209,215 **** all-local: $(JAR_FILE) doc javadoc: ! mkdir -p $(top_builddir)/doc $(JAVADOC) $(JAVADOCFLAGS) $(JAVADOCPACKAGES) --- 209,220 ---- all-local: $(JAR_FILE) + docdir = $(top_builddir)/doc + doc javadoc: ! -rm -rf $(docdir) ! mkdir -p $(docdir) $(JAVADOC) $(JAVADOCFLAGS) $(JAVADOCPACKAGES) + + .PHONY: doc |
From: <ele...@us...> - 2003-04-18 20:39:54
|
Update of /cvsroot/ogs/dist/java/ogs/items In directory sc8-pr-cvs1:/tmp/cvs-serv24317/ogs/items Modified Files: Armor.java Log Message: Doc fixes. Index: Armor.java =================================================================== RCS file: /cvsroot/ogs/dist/java/ogs/items/Armor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Armor.java 4 Apr 2003 20:22:55 -0000 1.2 --- Armor.java 18 Apr 2003 20:39:48 -0000 1.3 *************** *** 33,37 **** * proficiency feat required to use it effectively. * ! * @see ogs::feats::ArmorProficiency */ public abstract class Armor extends Item { --- 33,37 ---- * proficiency feat required to use it effectively. * ! * @see ogs.feats.ArmorProficiency */ public abstract class Armor extends Item { |
From: <ele...@us...> - 2003-04-18 20:39:54
|
Update of /cvsroot/ogs/dist/java/ogs/support In directory sc8-pr-cvs1:/tmp/cvs-serv24317/ogs/support Modified Files: Attachable.java Log Message: Doc fixes. Index: Attachable.java =================================================================== RCS file: /cvsroot/ogs/dist/java/ogs/support/Attachable.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Attachable.java 4 Apr 2003 20:22:59 -0000 1.1 --- Attachable.java 18 Apr 2003 20:39:49 -0000 1.2 *************** *** 21,24 **** --- 21,26 ---- */ + package ogs.support; + import ogs.support.Object; |
From: <ele...@us...> - 2003-04-18 16:49:22
|
Update of /cvsroot/ogs/dist In directory sc8-pr-cvs1:/tmp/cvs-serv12571 Modified Files: ogs.spec.in Log Message: Change release back to 1. Update build directory for doc target. Index: ogs.spec.in =================================================================== RCS file: /cvsroot/ogs/dist/ogs.spec.in,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ogs.spec.in 23 Mar 2003 22:14:35 -0000 1.8 --- ogs.spec.in 18 Apr 2003 16:49:18 -0000 1.9 *************** *** 23,27 **** Name: @PACKAGE@ Version: @VERSION@ ! Release: 2 Summary: Run-time and development packages for Open Gaming System (OGS). --- 23,27 ---- Name: @PACKAGE@ Version: @VERSION@ ! Release: 1 Summary: Run-time and development packages for Open Gaming System (OGS). *************** *** 151,155 **** ./configure make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" ! curdir=`pwd` && cd c++/ogs && make doc cd $curdir/java && make doc --- 151,155 ---- ./configure make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" ! curdir=`pwd` && cd c++ && make doc cd $curdir/java && make doc |
From: <ele...@us...> - 2003-04-18 03:40:13
|
Update of /cvsroot/ogs/dist/c++/ogs/magic In directory sc8-pr-cvs1:/tmp/cvs-serv5613 Added Files: Types.h Log Message: Forgot to add Types.h file. --- NEW FILE: Types.h --- /* * Types.h -- interface for magic type definitions * 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: Types.h,v 1.1 2003/04/18 03:40:09 elemings Exp $ */ #ifdef __cplusplus # ifndef OGS_MAGIC_TYPES_H # define OGS_MAGIC_TYPES_H # include <vector> # include <ogs/magic/Namespace.h> OGS_BEGIN_MAGIC_NAMESPACE /** An unsigned integer type that represents spell level. */ typedef unsigned short SpellLevel; /** Highest spell level. */ static const SpellLevel MAX_SPELL_LEVEL = 9; /** * 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; OGS_END_MAGIC_NAMESPACE # endif /* !defined OGS_MAGIC_TYPES_H */ #endif /* defined __cplusplus */ |
From: <ele...@us...> - 2003-04-18 03:24:45
|
Update of /cvsroot/ogs/dist/c++/ogs/magic In directory sc8-pr-cvs1:/tmp/cvs-serv28518 Modified Files: Makefile.am Log Message: Added Types.h to pkginclude_HEADERS. Index: Makefile.am =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/magic/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Makefile.am 15 Apr 2003 16:58:46 -0000 1.7 --- Makefile.am 18 Apr 2003 03:24:42 -0000 1.8 *************** *** 41,45 **** Spell.h \ SpellList.h \ ! Subschool.h INCLUDES = \ --- 41,46 ---- Spell.h \ SpellList.h \ ! Subschool.h \ ! Types.h INCLUDES = \ |
From: <ele...@us...> - 2003-04-18 01:41:39
|
Update of /cvsroot/ogs/dist/c++/ogs/items/rings In directory sc8-pr-cvs1:/tmp/cvs-serv25962/c++/ogs/items/rings Modified Files: Climbing.h Namespace.h Protection.h Swimming.h Log Message: See C++ ChangeLog (Apr 17) for details. Index: Climbing.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/items/rings/Climbing.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Climbing.h 23 Mar 2003 22:14:36 -0000 1.1 --- Climbing.h 18 Apr 2003 01:41:05 -0000 1.2 *************** *** 48,51 **** --- 48,58 ---- /** + * Create a new ring of climbing. + */ + Climbing::Climbing () { + // empty constructor body + } + + /** * Determine the caster level of this magic item. * Index: Namespace.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/items/rings/Namespace.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Namespace.h 23 Mar 2003 22:14:36 -0000 1.1 --- Namespace.h 18 Apr 2003 01:41:05 -0000 1.2 *************** *** 31,35 **** * @namespace ogs::items::rings * ! * */ # define OGS_BEGIN_ITEMS_RINGS_NAMESPACE \ --- 31,35 ---- * @namespace ogs::items::rings * ! * Provides a set of magic rings. */ # define OGS_BEGIN_ITEMS_RINGS_NAMESPACE \ Index: Protection.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/items/rings/Protection.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Protection.h 23 Mar 2003 22:14:36 -0000 1.1 --- Protection.h 18 Apr 2003 01:41:05 -0000 1.2 *************** *** 71,74 **** --- 71,84 ---- /** + * Create a new ring of protection. + * + * @param bonus Deflection bonus of ring. + */ + Protection::Protection (Bonus bonus): + _modifier (bonus) { + // empty constructor body + } + + /** * Determine the caster level of this magic item. * Index: Swimming.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/items/rings/Swimming.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Swimming.h 23 Mar 2003 22:14:36 -0000 1.1 --- Swimming.h 18 Apr 2003 01:41:05 -0000 1.2 *************** *** 48,51 **** --- 48,58 ---- /** + * Create a new ring of swimming. + */ + Swimming::Swimming () { + // empty constructor body + } + + /** * Determine the caster level of this magic item. * |
From: <ele...@us...> - 2003-04-18 01:41:38
|
Update of /cvsroot/ogs/dist/c++/ogs/items In directory sc8-pr-cvs1:/tmp/cvs-serv25962/c++/ogs/items Modified Files: Ring.h Log Message: See C++ ChangeLog (Apr 17) for details. Index: Ring.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/items/Ring.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Ring.h 23 Mar 2003 22:14:36 -0000 1.1 --- Ring.h 18 Apr 2003 01:41:03 -0000 1.2 *************** *** 33,46 **** /** ! * An item worn on a finger. */ class Ring { public: ! ! protected: ! ! private: ! }; OGS_END_ITEMS_NAMESPACE --- 33,55 ---- /** ! * An item worn on a finger. Rings have a defense of 13, 2 hit points, ! * a hardness of 10, and a break DC of 25. Most rings are made from ! * precious metals although many are made from some other metal such as ! * iron or steel and some are made from glass, bone (ivory), or other ! * material. ! * ! * @todo Initialize item qualities with values for rings. */ class Ring { public: ! Ring (); }; + + /** + * Create a new ring. + */ + Ring::Ring () { + // empty constructor body + } OGS_END_ITEMS_NAMESPACE |
From: <ele...@us...> - 2003-04-18 01:41:36
|
Update of /cvsroot/ogs/dist/c++/ogs/feats In directory sc8-pr-cvs1:/tmp/cvs-serv25962/c++/ogs/feats Modified Files: Alertness.cpp Alertness.h ShieldProficiency.h Log Message: See C++ ChangeLog (Apr 17) for details. Index: Alertness.cpp =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/feats/Alertness.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Alertness.cpp 15 Apr 2003 16:58:41 -0000 1.5 --- Alertness.cpp 18 Apr 2003 01:41:03 -0000 1.6 *************** *** 26,30 **** --- 26,35 ---- #include "ogs/skills/CommonSkills.h" + using ogs::core::Creature; + using ogs::core::Modifiers; + using ogs::core::SkillPtr; + using ogs::core::Skills; using ogs::feats::Alertness; + using ogs::skills::CommonSkills; /** *************** *** 62,66 **** if (attached) { ! addSkillModifier (object); } --- 67,71 ---- if (attached) { ! changeSkills (dynamic_cast<Creature*> (&object)); } *************** *** 69,89 **** /** ! * Add modifier of this feat to Listen and Spot skills. * ! * @param object Object to add skill modifier to. */ ! void Alertness::addSkillModifier (Object& object) { ! using ogs::core::Creature; ! Creature* creature = dynamic_cast<Creature*> (&object); ! if (creature != NULL) { - using ogs::core::Skills; Skills skills = creature->getSkills (); Skills::iterator itor = skills.begin (); while (itor != skills.end ()) { - using ogs::core::SkillPtr; - using ogs::core::Modifiers; - using ogs::skills::CommonSkills; SkillPtr skillPtr = *itor++; --- 74,88 ---- /** ! * Add or remove bonus to Listen and Spot skill checks. * ! * @param creature Creature to change skills of. ! * @param add True if bonus is added, false if removed. */ ! void Alertness::changeSkills (Creature* creature, bool add) { if (creature != NULL) { Skills skills = creature->getSkills (); Skills::iterator itor = skills.begin (); while (itor != skills.end ()) { SkillPtr skillPtr = *itor++; *************** *** 91,95 **** skillPtr->getType () == CommonSkills::SPOT) { Modifiers& modifiers = skillPtr->getModifiers (); ! modifiers.addModifier (this->_modifier); } } --- 90,98 ---- skillPtr->getType () == CommonSkills::SPOT) { Modifiers& modifiers = skillPtr->getModifiers (); ! if (add) { ! modifiers.addModifier (this->_modifier); ! } else { ! modifiers.removeModifier (this->_modifier); ! } } } *************** *** 97,100 **** } ! // TODO: Define detachObject and removeSkillModifier functions. --- 100,118 ---- } ! /** ! * Detach this feat from an object. This function removes the bonus ! * added to Listen and Spot skill checks by the attachObject() function. ! * ! * @return True if this feat is detached from object. ! */ ! bool Alertness::detachObject () { ! Creature* creature = getCreature (); ! bool detached = canDetach (); ! ! if (detached) { ! changeSkills (creature, false); ! } ! ! return (detached); ! } Index: Alertness.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/feats/Alertness.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Alertness.h 15 Apr 2003 16:58:41 -0000 1.4 --- Alertness.h 18 Apr 2003 01:41:03 -0000 1.5 *************** *** 32,37 **** --- 32,41 ---- OGS_BEGIN_FEATS_NAMESPACE + class ogs::core::Creature; + /** * A feat that adds a +2 bonus to all Listen and Spot skill checks. + * + * @todo Make the data member static? */ class Alertness: public ogs::core::Feat { *************** *** 40,44 **** bool attachObject (Object& object); ! bool dettachObject (); private: --- 44,48 ---- bool attachObject (Object& object); ! bool detachObject (); private: *************** *** 46,50 **** bool canAttach (const Object& object) const; ! void addSkillModifier (Object& object); }; --- 50,54 ---- bool canAttach (const Object& object) const; ! void changeSkills (ogs::core::Creature* creature, bool add = true); }; Index: ShieldProficiency.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/feats/ShieldProficiency.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ShieldProficiency.h 15 Apr 2003 16:58:45 -0000 1.3 --- ShieldProficiency.h 18 Apr 2003 01:41:03 -0000 1.4 *************** *** 48,52 **** * Create a new Shield Proficiency feat. */ ! inline ShieldProficiency::ShieldProficiency (), Feat (EXCLUSIVE) { // empty constructor body --- 48,52 ---- * Create a new Shield Proficiency feat. */ ! inline ShieldProficiency::ShieldProficiency (): Feat (EXCLUSIVE) { // empty constructor body |
From: <ele...@us...> - 2003-04-18 01:41:36
|
Update of /cvsroot/ogs/dist/c++/ogs/core In directory sc8-pr-cvs1:/tmp/cvs-serv25962/c++/ogs/core Modified Files: Abilities.cpp Ability.cpp Ability.h BodyPart.cpp BodyPart.h Character.cpp Creature.cpp Creature.h Entity.h Experience.h Feat.cpp Item.cpp Saves.h Skill.cpp Skill.h Types.h Log Message: See C++ ChangeLog (Apr 17) for details. Index: Abilities.cpp =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/core/Abilities.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Abilities.cpp 8 Apr 2003 21:43:06 -0000 1.5 --- Abilities.cpp 18 Apr 2003 01:41:01 -0000 1.6 *************** *** 64,72 **** /** ! * Cteate a set of abilities using a direct method. * ! * @param directMethod A direct method. */ ! Abilities::Abilities (PartialMethod& directMethod) { PtrMap& map = *this; --- 64,72 ---- /** ! * Create a set of abilities using a direct method. * ! * @param partialMethod A partial method. */ ! Abilities::Abilities (PartialMethod& partialMethod) { PtrMap& map = *this; *************** *** 74,81 **** Ability::Type type = types [i]; ! if (directMethod.hasAbility (type)) { Ability* ability = type == Ability::STR? ! new Strength (directMethod): ! new Ability (type, directMethod); map [type] = AbilityPtr (ability); } --- 74,81 ---- Ability::Type type = types [i]; ! if (partialMethod.hasAbility (type)) { Ability* ability = type == Ability::STR? ! new Strength (partialMethod): ! new Ability (type, partialMethod); map [type] = AbilityPtr (ability); } Index: Ability.cpp =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/core/Ability.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Ability.cpp 13 Apr 2003 05:25:51 -0000 1.7 --- Ability.cpp 18 Apr 2003 01:41:01 -0000 1.8 *************** *** 92,97 **** * function. * ! * @param increaseCount Number of ability increases available. ! * @return Required experience level of character. */ XP::Level Ability::getIncreaseCountLevel (unsigned increaseCount) { --- 92,97 ---- * function. * ! * @param increaseCount Number of ability increases needed. ! * @return Experience level required for increase count. */ XP::Level Ability::getIncreaseCountLevel (unsigned increaseCount) { Index: Ability.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/core/Ability.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Ability.h 13 Apr 2003 05:25:51 -0000 1.6 --- Ability.h 18 Apr 2003 01:41:02 -0000 1.7 *************** *** 115,119 **** static bool isValidType (int i); static unsigned getIncreaseCount (XP::Level xpLevel); ! static XP::Level getIncreaseCountLevel (unsigned count); Ability (Type type); --- 115,119 ---- static bool isValidType (int i); static unsigned getIncreaseCount (XP::Level xpLevel); ! static XP::Level getIncreaseCountLevel (unsigned increaseCount); Ability (Type type); *************** *** 124,127 **** --- 124,128 ---- Modifiers& getModifiers (); Score getCurrentScore () const; + const Modifier& getModifier () const; Modifier& getModifier (); *************** *** 220,223 **** --- 221,225 ---- */ struct Ability::DirectMethod: public Ability::Method { + /** The score generated by a direct method. */ Ability::Score score; *************** *** 280,283 **** --- 282,295 ---- /** + * Determine the type of this ability. + * + * @return Type of this ability (STR, DEX, ...). + */ + inline Ability::Type + Ability::getType () const { + return (this->_type); + } + + /** * Determine the original (unmodified) ability score. * *************** *** 309,312 **** --- 321,336 ---- Ability::getCurrentScore () const { return (this->_originalScore + this->_modifiers.getValue ()); + } + + /** + * Determine the ability modifier for this ability. The ability + * modifier can be added to other modifier lists (such as saving throws + * and skill checks). + * + * @return Modifier for this ability. + */ + inline const Modifier& + Ability::getModifier () const { + return (this->_modifier); } Index: BodyPart.cpp =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/core/BodyPart.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BodyPart.cpp 13 Apr 2003 05:25:51 -0000 1.2 --- BodyPart.cpp 18 Apr 2003 01:41:02 -0000 1.3 *************** *** 31,37 **** * @param item Item to be equipped on this body part. * @return True if item is equipped. */ bool BodyPart::equipItem (Item& item) { ! return (false); // TODO: Implement this function. } --- 31,50 ---- * @param item Item to be equipped on this body part. * @return True if item is equipped. + * @todo Implement this function. */ bool BodyPart::equipItem (Item& item) { ! return (false); ! } ! ! /** ! * Remove an equipped or carried item from this body part. ! * ! * @param item An item to be unequipped from this body part. ! * @return True if item is unequipped from this body part. ! * @todo Implement this function. ! */ ! inline bool ! BodyPart::unequipItem (Item& item) { ! return (false); } Index: BodyPart.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/core/BodyPart.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BodyPart.h 13 Apr 2003 05:25:51 -0000 1.2 --- BodyPart.h 18 Apr 2003 01:41:02 -0000 1.3 *************** *** 30,33 **** --- 30,34 ---- # include <ogs/support/Object.h> # include <ogs/core/Namespace.h> + # include <ogs/core/Types.h> OGS_BEGIN_CORE_NAMESPACE *************** *** 77,81 **** }; ! typedef std::list<Item*> Items; BodyPart (Creature& creature, Type type); --- 78,86 ---- }; ! /** ! * A list of items. The list represents the items equipped or ! * carried on this part of the body. ! */ ! typedef std::list<ItemPtr> Items; BodyPart (Creature& creature, Type type); Index: Character.cpp =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/core/Character.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Character.cpp 13 Apr 2003 05:25:51 -0000 1.7 --- Character.cpp 18 Apr 2003 01:41:02 -0000 1.8 *************** *** 21,34 **** */ #include "ogs/core/CClass.h" #include "ogs/core/Character.h" ! using ogs::core::Abilities; ! using ogs::core::Ability; ! using ogs::core::CClass; ! using ogs::core::Character; ! using ogs::core::Creature; ! using ogs::core::Modifiers; ! using ogs::core::Skill; /** --- 21,30 ---- */ + #include "ogs/support/Event.h" #include "ogs/core/CClass.h" #include "ogs/core/Character.h" ! using ogs::support::Event; ! using namespace ogs::core; /** *************** *** 48,51 **** --- 44,59 ---- // TODO: Add bonuses and other features from cclass to creature. + } + + /** + * Change the experience points acquired by this character. + * + * @param xpPoints Experience points of this character. + * @todo Complete the implementation of this function. + */ + void Character::setPoints (XP::Points xpPoints) { + Event event (*this); + this->_xpPoints = xpPoints; + notifyObservers (event); } Index: Creature.cpp =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/core/Creature.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Creature.cpp 15 Apr 2003 16:58:34 -0000 1.11 --- Creature.cpp 18 Apr 2003 01:41:02 -0000 1.12 *************** *** 123,127 **** } ! // TODO: Implement removeSkill() function. /** --- 123,144 ---- } ! /** ! * Remove a skill from this creature. ! * ! * @param skill A skill to be removed from this creature. ! * @return True if skill is removed from this creature. ! */ ! bool Creature::removeSkill (Skill& skill) { ! SkillPtr skillPtr (&skill); ! Skills::iterator end = this->_skills.end (); ! Skills::iterator itor = std::find (this->_skills.begin (), end, ! skillPtr); ! ! if (itor != end) { ! this->_skills.erase (itor); ! } ! ! return (true); ! } /** *************** *** 169,175 **** * @param item Item to be equipped on this body. * @return True if item is equipped. */ bool Creature::equipItem (Item& item) { ! return (false); // TODO: Implement this function. } --- 186,193 ---- * @param item Item to be equipped on this body. * @return True if item is equipped. + * @todo Implement this function. */ bool Creature::equipItem (Item& item) { ! return (false); } *************** *** 182,188 **** * @param part BodyPart of the body to equip item. * @return True if item is equipped. */ bool Creature::equipItem (Item& item, BodyPart& part) { ! return (false); // TODO: Implement this function. } --- 200,207 ---- * @param part BodyPart of the body to equip item. * @return True if item is equipped. + * @todo Implement this function. */ bool Creature::equipItem (Item& item, BodyPart& part) { ! return (false); } *************** *** 194,200 **** * @param item Item to be removed from this body. * @return True if item is no longer equipped. */ bool Creature::unequipItem (Item& item) { ! return (true); // TODO: Impelement this function. } --- 213,220 ---- * @param item Item to be removed from this body. * @return True if item is no longer equipped. + * @todo Implement this function. */ bool Creature::unequipItem (Item& item) { ! return (true); } Index: Creature.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/core/Creature.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Creature.h 15 Apr 2003 16:58:34 -0000 1.10 --- Creature.h 18 Apr 2003 01:41:02 -0000 1.11 *************** *** 29,34 **** # include <vector> - # include <boost/shared_ptr.hpp> - # include <ogs/core/Abilities.h> # include <ogs/core/BodyPart.h> --- 29,32 ---- *************** *** 61,66 **** typedef std::list<BodyPart> Body; ! Die getHitDice () const; ! void setHitDice (const Die& hitDice); const Modifiers& getInitiative () const; --- 59,64 ---- typedef std::list<BodyPart> Body; ! const Die& getHitDice () const; ! Die& getHitDice (); const Modifiers& getInitiative () const; *************** *** 127,131 **** * @return Hit dice for this creature. */ ! inline Die Creature::getHitDice () const { return (this->_hitDice); --- 125,129 ---- * @return Hit dice for this creature. */ ! inline const Die& Creature::getHitDice () const { return (this->_hitDice); *************** *** 133,136 **** --- 131,145 ---- /** + * Determine the hit dice for this creature. This function allows the + * caller to change the hit dice of this creature. + * + * @return Hit dice for this creature. + */ + inline Die& + Creature::getHitDice () { + return (this->_hitDice); + } + + /** * Determine the initiative modifiers for this creature. * *************** *** 171,174 **** --- 180,195 ---- * @return Ability scores. */ + inline const Abilities& + Creature::getAbilities () const { + return (this->_abilities); + } + + /** + * Determine the abilities for this character. This function allows the + * caller to add and remove modifiers to the ability scores of this + * creature. + * + * @return Ability scores. + */ inline Abilities& Creature::getAbilities () { *************** *** 178,181 **** --- 199,214 ---- /** * Determine the saving throws for this creature. + * + * @return Saving throws for this creature. + */ + inline const Saves& + Creature::getSaves () const { + return (this->_saves); + } + + /** + * Determine the saving throws for this creature. This function allows + * the caller to add and remove modifiers to saving throws for this + * creature. * * @return Saving throws for this creature. Index: Entity.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/core/Entity.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Entity.h 15 Apr 2003 16:58:35 -0000 1.7 --- Entity.h 18 Apr 2003 01:41:02 -0000 1.8 *************** *** 123,126 **** --- 123,136 ---- /** + * Determine the current defense rating of this entity. + * + * @return Current defense rating of this entity. + */ + inline const Defense& + Entity::getDefense () const { + return (this->_defense); + } + + /** * Determine the current defense rating of this entity. This function * allows the caller to add and remove modifiers to the defense rating Index: Experience.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/core/Experience.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Experience.h 13 Apr 2003 05:25:51 -0000 1.4 --- Experience.h 18 Apr 2003 01:41:02 -0000 1.5 *************** *** 46,50 **** --- 46,52 ---- class Experience { public: + /** An unsigned integer type that represents experience points. */ typedef unsigned int Points; + /** An unsigned integer type that represents experience level. */ typedef unsigned short Level; *************** *** 53,61 **** static Modifier::Value getStrongAttack (Level level); - static Level getStrongAttackLevel (Modifier::Value value); static Modifier::Value getAverageAttack (Level level); - static Level getAverageAttackLevel (Modifier::Value value); static Modifier::Value getWeakAttack (Level level); - static Level getWeakAttackLevel (Modifier::Value value); static std::string formatLevel (Level level); --- 55,60 ---- Index: Feat.cpp =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/core/Feat.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Feat.cpp 13 Apr 2003 05:25:51 -0000 1.6 --- Feat.cpp 18 Apr 2003 01:41:02 -0000 1.7 *************** *** 29,34 **** /** * Determine experience level required for a given number of available ! * slots for feats. This method is the inverse of ! * {@link #getSlotCount(int)}. * * @param slotCount Number of slots available for feats. --- 29,34 ---- /** * Determine experience level required for a given number of available ! * slots for feats. This method is the inverse of the getSlotCount() ! * function. * * @param slotCount Number of slots available for feats. Index: Item.cpp =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/core/Item.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Item.cpp 13 Apr 2003 05:25:51 -0000 1.3 --- Item.cpp 18 Apr 2003 01:41:02 -0000 1.4 *************** *** 21,27 **** --- 21,29 ---- */ + #include "ogs/support/Event.h" #include "ogs/core/Entity.h" #include "ogs/core/Item.h" + using ogs::support::Event; using ogs::core::Entity; using ogs::core::Item; *************** *** 54,57 **** --- 56,70 ---- return (equipped); + } + + /** + * Change the worth of this item. Observers are notified of this change. + * + * @param worth Worth of this item. + */ + void Item::setWorth (Worth worth) { + Event event (*this); + this->_worth = worth; + notifyObservers (event); } Index: Saves.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/core/Saves.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Saves.h 15 Apr 2003 16:58:36 -0000 1.5 --- Saves.h 18 Apr 2003 01:41:02 -0000 1.6 *************** *** 46,51 **** --- 46,54 ---- static Modifier::Value getWeakBonus (XP::Level xpLevel); + /** Modifiers added to a Fortitude saving throw. */ Modifiers fort; + /** Modifiers added to a Reflex saving throw. */ Modifiers ref; + /** Modifiers added to a Will saving throw. */ Modifiers will; Index: Skill.cpp =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/core/Skill.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Skill.cpp 15 Apr 2003 16:58:37 -0000 1.6 --- Skill.cpp 18 Apr 2003 01:41:02 -0000 1.7 *************** *** 74,87 **** * the current points invested in this skill. * ! * @param skillPoints Maximum points invested in this skill. */ ! void Skill::setMaximumPoints (Points skillPoints) { // Maybe this function should automatically lower the ccclassPoints // and/or xclassPoints or change the maximum points to be the total // of current points but this will do for now. ! if (this->_cclassPoints + this->_xclassPoints <= skillPoints) { ! this->_maxPoints = skillPoints; ! ! // TODO: Notify observers } } --- 74,86 ---- * the current points invested in this skill. * ! * @param points Maximum skill points invested in this skill. ! * @todo Notify observers. */ ! void Skill::setMaximumPoints (Points points) { // Maybe this function should automatically lower the ccclassPoints // and/or xclassPoints or change the maximum points to be the total // of current points but this will do for now. ! if (this->_cclassPoints + this->_xclassPoints <= points) { ! this->_maxPoints = points; } } *************** *** 93,112 **** * for this skill. * ! * @param skillPoints Current skill points. * @param cclassSkill True if points are for a cclass skill or * false if points are for a cross-class skill. */ ! void Skill::setCurrentPoints (Points skillPoints, bool cclassSkill) { ! if (! checkMaximumRanks (skillPoints, cclassSkill)) { if (cclassSkill) { ! this->_cclassPoints = skillPoints; } else { ! this->_xclassPoints = skillPoints; } this->_rankModifier.setValue (getCurrentRanks ()); - - // TODO: Notify observers } } --- 92,110 ---- * for this skill. * ! * @param points Current number of skill points. * @param cclassSkill True if points are for a cclass skill or * false if points are for a cross-class skill. + * @todo Notify observers. */ ! void Skill::setCurrentPoints (Points points, bool cclassSkill) { ! if (! checkMaximumRanks (points, cclassSkill)) { if (cclassSkill) { ! this->_cclassPoints = points; } else { ! this->_xclassPoints = points; } this->_rankModifier.setValue (getCurrentRanks ()); } } Index: Skill.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/core/Skill.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Skill.h 15 Apr 2003 16:58:37 -0000 1.7 --- Skill.h 18 Apr 2003 01:41:02 -0000 1.8 *************** *** 96,100 **** protected: ! static Ranks getRanks (Points cclass, Points xclass); bool checkMaximumRanks (Points points, bool cclassSkill); --- 96,100 ---- protected: ! static Ranks getRanks (Points cclassPoints, Points xclassPoints); bool checkMaximumRanks (Points points, bool cclassSkill); Index: Types.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/core/Types.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Types.h 13 Apr 2003 05:25:51 -0000 1.1 --- Types.h 18 Apr 2003 01:41:02 -0000 1.2 *************** *** 37,40 **** --- 37,41 ---- class Feature; class Feat; + class Item; class Skill; *************** *** 56,59 **** --- 57,63 ---- /** A list of skill. */ typedef std::list<SkillPtr> Skills; + + /** A smart pointer that holds an item object. */ + typedef boost::shared_ptr<Item> ItemPtr; OGS_END_CORE_NAMESPACE |
From: <ele...@us...> - 2003-04-18 01:41:36
|
Update of /cvsroot/ogs/dist/c++/ogs/core/details In directory sc8-pr-cvs1:/tmp/cvs-serv25962/c++/ogs/core/details Modified Files: Alignment.h Description.h Quantity.h Log Message: See C++ ChangeLog (Apr 17) for details. Index: Alignment.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/core/details/Alignment.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Alignment.h 5 Feb 2003 06:01:28 -0000 1.1 --- Alignment.h 18 Apr 2003 01:41:03 -0000 1.2 *************** *** 32,42 **** /** ! * An alignment is an indicator of morals and order. Alignments are ! * associated with entities (typically characters and creatures) that ! * possess the concepts of good and evil, law and chaos. Items can ! * also be imbued with emanations of an alignment. */ class Alignment: public Detail { public: enum Value { // Absolute alignments --- 32,60 ---- /** ! * An indicator of morals and order. Alignment has two primary ! * dimensions: moral and order. In the moral dimension, an alignment ! * can have different values: good, evil, or neutral, In the order ! * dimension, an alignment can also have three different values: law, ! * chaos, or neutral. These six discrete values are known as an ! * absolute alignments. When the two dimensions are combined, an ! * alignment can consist of nine different values known as relative ! * alignments. <P ! * ! * Alignments are typically associated with entities (characters and ! * creatures) that delineate the concepts of good and evil, law and ! * chaos, and neutrality. Items, and sometimes areas, can also be ! * imbued with emanations of an alignment. <P> */ class Alignment: public Detail { public: + /** + * An enumerated type representing the value of this alignment. The + * values represent both absolute and relative alignments. The + * absolute alignments however are defined as bit masks that can be + * used in bitwise operators for the absolute alignments. + * + * @see isAligned + * @todo Document each relative alignment (some day when bored). + */ enum Value { // Absolute alignments *************** *** 72,75 **** --- 90,95 ---- void setValue (Value value); + //const char* getName () const; + private: Value _value; *************** *** 79,87 **** /** ! * Create a new alignment. * ! * @param value One of the predefined alignment values. */ ! inline Alignment::Alignment (Value value): _value (value) { } /** --- 99,111 ---- /** ! * Create a new alignment with a specified value. The default value is ! * the relative alignment TRUE_NEUTRAL. * ! * @param value Value of this alignment. */ ! inline Alignment::Alignment (Value value): ! _value (value) { ! // empty constructor body ! } /** *************** *** 90,94 **** * @return True if this alignment is an absolute alignment. */ ! inline bool Alignment::isAbsolute () const { return (this->_value == LAW || this->_value == CHAOS || this->_value == NEUTRAL_ORDER || this->_value == GOOD || --- 114,119 ---- * @return True if this alignment is an absolute alignment. */ ! inline bool ! Alignment::isAbsolute () const { return (this->_value == LAW || this->_value == CHAOS || this->_value == NEUTRAL_ORDER || this->_value == GOOD || *************** *** 101,109 **** * @return True if this alignment is a relative alignment. */ ! inline bool Alignment::isRelative () const { return (isValid (this->_value) && !isAbsolute ()); } - /** * Determine if this alignment is aligned with another alignment. Two --- 126,134 ---- * @return True if this alignment is a relative alignment. */ ! inline bool ! Alignment::isRelative () const { return (isValid (this->_value) && !isAbsolute ()); } /** * Determine if this alignment is aligned with another alignment. Two *************** *** 114,118 **** * @param a An alignment. */ ! inline bool Alignment::isAligned (const Alignment& a) const { if (this->isAbsolute () && a.isAbsolute ()) { return (false); --- 139,144 ---- * @param a An alignment. */ ! inline bool ! Alignment::isAligned (const Alignment& a) const { if (this->isAbsolute () && a.isAbsolute ()) { return (false); *************** *** 127,131 **** * @return Value of alignment. */ ! inline Alignment::Value Alignment::getValue () const { return (this->_value); } --- 153,158 ---- * @return Value of alignment. */ ! inline Alignment::Value ! Alignment::getValue () const { return (this->_value); } *************** *** 136,140 **** * @param value Value of alignment. */ ! inline void Alignment::setValue (Value value) { if (isValid (value)) { this->_value = value; --- 163,168 ---- * @param value Value of alignment. */ ! inline void ! Alignment::setValue (Value value) { if (isValid (value)) { this->_value = value; *************** *** 148,152 **** * @return True if integer value is a valid alignment value. */ ! inline bool Alignment::isValid (int i) { return (i >= EVIL && i <= TRUE_NEUTRAL); } --- 176,181 ---- * @return True if integer value is a valid alignment value. */ ! inline bool ! Alignment::isValid (int i) { return (i >= EVIL && i <= TRUE_NEUTRAL); } Index: Description.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/core/details/Description.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Description.h 5 Feb 2003 06:01:28 -0000 1.1 --- Description.h 18 Apr 2003 01:41:03 -0000 1.2 *************** *** 40,43 **** --- 40,46 ---- class Description: public Detail { public: + /** + * An enumerated type that represents the aspect of a description. + */ enum Aspect { NAME, Index: Quantity.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/core/details/Quantity.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Quantity.h 24 Feb 2003 11:14:21 -0000 1.2 --- Quantity.h 18 Apr 2003 01:41:03 -0000 1.3 *************** *** 38,41 **** --- 38,42 ---- class Quantity: public Detail { public: + /** An enumerated type that represents the aspect of a quantity. */ enum Aspect { AGE, |
Update of /cvsroot/ogs/dist/c++/ogs/cclasses In directory sc8-pr-cvs1:/tmp/cvs-serv25962/c++/ogs/cclasses Modified Files: Bard.h Cleric.h Druid.h Monk.h Paladin.cpp Paladin.h Ranger.h Sorcerer.h Wizard.h Log Message: See C++ ChangeLog (Apr 17) for details. Index: Bard.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Bard.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Bard.h 15 Apr 2003 16:58:30 -0000 1.4 --- Bard.h 18 Apr 2003 01:41:00 -0000 1.5 *************** *** 31,34 **** --- 31,35 ---- # include <ogs/core/Die.h> # include <ogs/core/Saves.h> + # include <ogs/magic/Types.h> # include <ogs/cclasses/Namespace.h> *************** *** 71,83 **** 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; protected: --- 72,77 ---- Bard (ogs::core::XP::Level xpLevel = 1); ! ogs::magic::SpellCounts getSpellsPerDay () const; ! ogs::magic::SpellCounts getSpellsKnown () const; protected: Index: Cleric.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Cleric.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Cleric.h 15 Apr 2003 16:58:30 -0000 1.4 --- Cleric.h 18 Apr 2003 01:41:00 -0000 1.5 *************** *** 31,34 **** --- 31,35 ---- # include <ogs/core/Die.h> # include <ogs/core/Saves.h> + # include <ogs/magic/Types.h> # include <ogs/cclasses/Namespace.h> *************** *** 71,82 **** 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; protected: --- 72,76 ---- Cleric (ogs::core::XP::Level xpLevel = 1); ! ogs::magic::SpellCounts getSpellsPerDay () const; protected: Index: Druid.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Druid.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Druid.h 15 Apr 2003 16:58:30 -0000 1.4 --- Druid.h 18 Apr 2003 01:41:00 -0000 1.5 *************** *** 31,34 **** --- 31,35 ---- # include <ogs/core/Die.h> # include <ogs/core/Saves.h> + # include <ogs/magic/Types.h> # include <ogs/cclasses/Namespace.h> *************** *** 73,84 **** 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; protected: --- 74,78 ---- Druid (ogs::core::XP::Level xpLevel = 1); ! ogs::magic::SpellCounts getSpellsPerDay () const; protected: Index: Monk.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Monk.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Monk.h 13 Apr 2003 05:24:49 -0000 1.3 --- Monk.h 18 Apr 2003 01:41:00 -0000 1.4 *************** *** 28,31 **** --- 28,33 ---- # include <ogs/core/CClass.h> # include <ogs/core/Die.h> + # include <ogs/core/Experience.h> + # include <ogs/core/Modifier.h> # include <ogs/core/Saves.h> # include <ogs/cclasses/Namespace.h> *************** *** 68,73 **** Monk (ogs::core::XP::Level xpLevel = 1); ogs::core::Die::Sides getUnarmedDamage () const; ! ogs::core::Modifier& getDefenseBonus () const; protected: --- 70,77 ---- Monk (ogs::core::XP::Level xpLevel = 1); + void setLevel (ogs::core::XP::Level xpLevel); + ogs::core::Die::Sides getUnarmedDamage () const; ! ogs::core::Modifier& getDefenseBonus (); protected: *************** *** 75,78 **** --- 79,85 ---- ogs::core::Modifier::Value getBaseRefSaveValue () const; ogs::core::Modifier::Value getBaseWillSaveValue () const; + + private: + ogs::core::Modifier _defenseBonus; }; *************** *** 87,92 **** ogs::core::Saves::getWeakBonus (xpLevel), ogs::core::Saves::getWeakBonus (xpLevel), ! ogs::core::Saves::getWeakBonus (xpLevel)) { // empty constructor body } --- 94,139 ---- ogs::core::Saves::getWeakBonus (xpLevel), ogs::core::Saves::getWeakBonus (xpLevel), ! ogs::core::Saves::getWeakBonus (xpLevel)), ! _defenseBonus (xpLevel / 5) { // empty constructor body + } + + /** + * Change the experience level of this monk. + * + * @param xpLevel Experience level of this monk. + */ + inline void + Monk::setLevel (ogs::core::XP::Level xpLevel) { + _defenseBonus.setValue (xpLevel / 5); + CClass::setLevel (xpLevel); + } + + /** + * Determine the die used to roll unarmed damage for this monk. + * + * @return Die used to roll unarmed damage for this monk. + */ + inline ogs::core::Die::Sides + Monk::getUnarmedDamage () const { + using ogs::core::Die; + Die::Sides dieSides [] = { + Die::d6, Die::d8, Die::d10, Die::d12, Die::d20 + }; + + ogs::core::XP::Level xpLevel = getLevel (); + return (dieSides [xpLevel > 16? 4: xpLevel / 4]); + } + + /** + * Determine the defense bonus for this monk. Monks gain a defense + * bonus that increases with experience level. This bonus applies only + * when the monk is not wearing armor. + * + * @return Defense bonus for this monk. + */ + inline ogs::core::Modifier& + Monk::getDefenseBonus () { + return (this->_defenseBonus); } Index: Paladin.cpp =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Paladin.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Paladin.cpp 15 Apr 2003 16:58:30 -0000 1.6 --- Paladin.cpp 18 Apr 2003 01:41:00 -0000 1.7 *************** *** 26,29 **** --- 26,30 ---- #include "ogs/Core.h" + #include "ogs/magic/Types.h" #include "ogs/cclasses/Paladin.h" #include "ogs/feats/AllWeapons.h" *************** *** 31,34 **** --- 32,36 ---- using namespace ogs::core; + using ogs::magic::SpellCounts; using ogs::cclasses::Paladin; using ogs::feats::AllWeapons; *************** *** 225,229 **** * @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 }, --- 227,231 ---- * @return Number of spells that can be cast per spell level per day. */ ! SpellCounts Paladin::getSpellsPerDay () const { static unsigned spellTable [17][4] = { { 0, UINT_MAX, UINT_MAX, UINT_MAX }, Index: Paladin.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Paladin.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Paladin.h 15 Apr 2003 16:58:31 -0000 1.4 --- Paladin.h 18 Apr 2003 01:41:01 -0000 1.5 *************** *** 32,35 **** --- 32,36 ---- # include <ogs/core/Experience.h> # include <ogs/core/Saves.h> + # include <ogs/magic/Types.h> # include <ogs/cclasses/Namespace.h> *************** *** 73,84 **** bool detachObject (); ! /** ! * An array of spell counts. Each element in the array represents ! * the number of spells for that spell level. The spell level is ! * the same as the index of the array. ! */ ! typedef std::vector<unsigned> SpellCounts; ! ! SpellCounts getSpellsPerDay () const; private: --- 74,78 ---- bool detachObject (); ! ogs::magic::SpellCounts getSpellsPerDay () const; private: Index: Ranger.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Ranger.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Ranger.h 15 Apr 2003 16:58:31 -0000 1.4 --- Ranger.h 18 Apr 2003 01:41:01 -0000 1.5 *************** *** 31,34 **** --- 31,35 ---- # include <ogs/core/Die.h> # include <ogs/core/Saves.h> + # include <ogs/magic/Types.h> # include <ogs/cclasses/Namespace.h> *************** *** 74,85 **** 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; protected: --- 75,79 ---- Ranger (ogs::core::XP::Level xpLevel = 1); ! ogs::magic::SpellCounts getSpellsPerDay () const; protected: Index: Sorcerer.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Sorcerer.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Sorcerer.h 15 Apr 2003 16:58:31 -0000 1.4 --- Sorcerer.h 18 Apr 2003 01:41:01 -0000 1.5 *************** *** 31,34 **** --- 31,35 ---- # include <ogs/core/Die.h> # include <ogs/core/Saves.h> + # include <ogs/magic/Types.h> # include <ogs/cclasses/Namespace.h> *************** *** 60,72 **** 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; protected: --- 61,66 ---- Sorcerer (ogs::core::XP::Level xpLevel = 1); ! ogs::magic::SpellCounts getSpellsPerDay () const; ! ogs::magic::SpellCounts getSpellsKnown () const; protected: Index: Wizard.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/cclasses/Wizard.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Wizard.h 15 Apr 2003 16:58:32 -0000 1.4 --- Wizard.h 18 Apr 2003 01:41:01 -0000 1.5 *************** *** 31,34 **** --- 31,35 ---- # include <ogs/core/Die.h> # include <ogs/core/Saves.h> + # include <ogs/magic/Types.h> # include <ogs/cclasses/Namespace.h> *************** *** 79,90 **** 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; protected: --- 80,84 ---- Wizard (ogs::core::XP::Level xpLevel = 1); ! ogs::magic::SpellCounts getSpellsPerDay () const; protected: |
From: <ele...@us...> - 2003-04-18 01:41:33
|
Update of /cvsroot/ogs/dist/c++/ogs In directory sc8-pr-cvs1:/tmp/cvs-serv25962/c++/ogs Modified Files: Feats.h Log Message: See C++ ChangeLog (Apr 17) for details. Index: Feats.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/Feats.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Feats.h 29 Mar 2003 02:10:25 -0000 1.3 --- Feats.h 18 Apr 2003 01:41:00 -0000 1.4 *************** *** 27,31 **** # include <ogs/feats/AllWeapons.h> # include <ogs/feats/ArmorProficiency.h> ! # include <ogs/feats/BonusFeat.h> # include <ogs/feats/ImprovedInitiative.h> # include <ogs/feats/ImprovedSave.h> --- 27,31 ---- # include <ogs/feats/AllWeapons.h> # include <ogs/feats/ArmorProficiency.h> ! //# include <ogs/feats/BonusFeat.h> # include <ogs/feats/ImprovedInitiative.h> # include <ogs/feats/ImprovedSave.h> |