[ogs-changes] dist/c++/ogs/creatures Humanoid.h,1.5,1.6 Undead.h,1.4,1.5 Undeads.h,1.1,1.2
Status: Alpha
Brought to you by:
elemings
From: <ele...@us...> - 2003-05-02 19:07:04
|
Update of /cvsroot/ogs/dist/c++/ogs/creatures In directory sc8-pr-cvs1:/tmp/cvs-serv32451/ogs/creatures Modified Files: Humanoid.h Undead.h Undeads.h Log Message: See C++ ChangeLog (May 2) for details. Index: Humanoid.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/creatures/Humanoid.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Humanoid.h 15 Apr 2003 16:58:37 -0000 1.5 --- Humanoid.h 2 May 2003 19:06:31 -0000 1.6 *************** *** 31,34 **** --- 31,35 ---- # include <ogs/core/Size.h> # include <ogs/core/Skill.h> + # include <ogs/core/moves/Walk.h> # include <ogs/creatures/Namespace.h> *************** *** 48,75 **** static const ogs::core::Skill::Points SKILL_RATE = 1; static Parts createParts (); protected: ! Humanoid (ogs::core::Die hitDice, ! ogs::core::Abilities abilities, ! ogs::core::Size::Type size = ogs::core::Size::MEDIUM, Parts parts = createParts ()); }; /** ! * Create a new humanoid creature. This constructor just forwards the ! * arguments to the Creature constructor. * * @param hitDice Hit dice of creature. * @param abilities Ability scores of creature. - * @param size Size of creature. * @param parts An array of body part types. */ inline ! Humanoid::Humanoid (ogs::core::Die hitDice, ogs::core::Abilities abilities, ! ogs::core::Size::Type size, Parts parts): ! Creature (hitDice, abilities, size, parts) { // empty constructor body } --- 49,108 ---- static const ogs::core::Skill::Points SKILL_RATE = 1; + static ogs::core::Moves createMoves (); static Parts createParts (); + virtual ~Humanoid () = 0; + protected: ! Humanoid (ogs::core::Size::Type size = ogs::core::Size::MEDIUM, ! ogs::core::Die hitDice = ogs::core::Die (HIT_DIE), ! ogs::core::Moves moves = createMoves (), ! ogs::core::Attacks attacks = ogs::core::Attacks (1), ! ogs::core::Abilities abilities = ogs::core::Abilities (), Parts parts = createParts ()); }; /** ! * Create a common list of moves. The list of moves contains one walk ! * move with a speed of 30. * + * @return A list of moves. + */ + inline ogs::core::Moves + Humanoid::createMoves () { + using ogs::core::moves::Walk; + using ogs::core::MovePtr; + using ogs::core::Moves; + return (Moves (1, MovePtr (new Walk (30)))); + } + + /** + * Create a new humanoid creature. The constructor parameters are + * ordered according to their appearance in a statistics block. The + * default values are Medium size, 1d8 for hit dice, 30 ft. walk move, + * one attack (no weapon specified), a complete set of abilities rolled + * with the standard method, and a humanoid body. + * + * @param size Size of creature. * @param hitDice Hit dice of creature. + * @param moves A list of moves. + * @param attacks An array of attacks. * @param abilities Ability scores of creature. * @param parts An array of body part types. */ inline ! Humanoid::Humanoid (ogs::core::Size::Type size, ! ogs::core::Die hitDice, ! ogs::core::Moves moves, ! ogs::core::Attacks attacks, ogs::core::Abilities abilities, ! Parts parts): ! Creature (hitDice, moves, attacks, abilities, size, parts) { // empty constructor body + } + + inline + Humanoid::~Humanoid () { + // empty destructor body } Index: Undead.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/creatures/Undead.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Undead.h 15 Apr 2003 16:58:38 -0000 1.4 --- Undead.h 2 May 2003 19:06:31 -0000 1.5 *************** *** 50,57 **** static const ogs::core::Die::Sides HIT_DIE = ogs::core::Die::d12; protected: ! Undead (ogs::core::Die hitDice, ogs::core::Abilities abilities, ogs::core::Size::Type size = ogs::core::Size::MEDIUM, Parts parts = Parts ()); }; --- 50,61 ---- static const ogs::core::Die::Sides HIT_DIE = ogs::core::Die::d12; + virtual ~Undead () = 0; + protected: ! Undead (ogs::core::Moves moves, ogs::core::Abilities abilities, ogs::core::Size::Type size = ogs::core::Size::MEDIUM, + ogs::core::Die hitDice = ogs::core::Die (HIT_DIE), + ogs::core::Attacks attacks = ogs::core::Attacks (1), Parts parts = Parts ()); }; *************** *** 67,76 **** */ inline ! Undead::Undead (ogs::core::Die hitDice, ogs::core::Abilities abilities, ogs::core::Size::Type size, Parts parts): ! Creature (hitDice, abilities, size, parts) { // empty constructor body } --- 71,87 ---- */ inline ! Undead::Undead (ogs::core::Moves moves, ogs::core::Abilities abilities, ogs::core::Size::Type size, + ogs::core::Die hitDice, + ogs::core::Attacks attacks, Parts parts): ! Creature (hitDice, moves, attacks, abilities, size, parts) { // empty constructor body + } + + inline + Undead::~Undead () { + // empty destructor body } Index: Undeads.h =================================================================== RCS file: /cvsroot/ogs/dist/c++/ogs/creatures/Undeads.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Undeads.h 15 Apr 2003 16:58:39 -0000 1.1 --- Undeads.h 2 May 2003 19:06:31 -0000 1.2 *************** *** 31,34 **** --- 31,35 ---- //# include <ogs/creatures/undeads/Mummy.h> //# include <ogs/creatures/undeads/Skeleton.h> + //# include <ogs/creatures/undeads/Spectre.h> //# include <ogs/creatures/undeads/Vampire.h> //# include <ogs/creatures/undeads/Wight.h> |