/***************************************************************************
pchar.h - defines PlayerChar class
-------------------
begin : Sun Feb 6 2000
copyright : (C) 2000 by Daniel Roberge
email : droberge@uvic.ca
***************************************************************************/
#ifndef PCHAR_H
#define PCHAR_H
#include "character.h"
#include "strengthattrib.h"
#include "dexterityattrib.h"
#include "constitutionattrib.h"
#define max(x,y) (x) > (y) ? (x) : (y)
#define min(x,y) (x) < (y) ? (x) : (y)
/**Represents a player-controlled character.
Has ability scores, a race, and a class.
*@author Daniel Roberge
*/
class PlayerChar : public Character
{
private:
StrengthAttrib Str;
DexterityAttrib Dex;
ConstitutionAttrib Con;
int Int,Wis,Cha;
int DexACAdj, ConHPAdj;
int Race,Class;
int Level, XPEarned;
InventoryList inventory;
/**Increases hit points in accordance with class when level increases*/
int HitPoints();
/**Checks to see if the previously-set race is compatible with character class aClass.*/
bool checkClass(int aClass);
/**Deals with racial ability score requirements and adjustments for race aRace*/
bool verifyRace(int aRace);
/**Deals with class ability score requirements for class aClass*/
bool verifyClass(int aClass);
public:
PlayerChar(int,int,PWeapon,PArmour,int,char *);
~PlayerChar();
/**Gets the AC for damage type DT, modified for Dex*/
virtual int getAC(int DT);
/**Gets the AC for no damage type, modified for Dex*/
virtual int getAC();
/**Carries out an attack roll against target*/
//bool attackRoll(RCharacter target);
/**Does damage upon target*/
//void doDamage(RCharacter target);
/**Gets the THACO modified by strength*/
int getTHACO();
/**Adds to XP amount points*/
int earnXP(int amount);
/**Shows that this class has character classes*/
bool haveClass() {return true;};
/** Does weapon damage to target. */
virtual void doDamage(Character &target);
};
#endif
| Generated by: droberge@magebook.localdomain on Mon Jul 3 13:20:08 200. |