class Character

Represents a generic character. More...

Contains pure virtuals
Definition#include <character.h>
Inherited byMonster, PlayerChar
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Members

Protected Members


Detailed Description

Represents a generic character. Extend to create a specific character.

bool attackRoll (Character &target)
[protected virtual]

Carries out an attack roll against target

void doDamage (Character &target)
[protected virtual]

Carries out a damage roll against target

Character (PWeapon initialWeap,PArmour initialArm,char *myName)

Creates a character with a weapon initialWeap, armour initialArm, and name myName

~Character ()
[virtual]

Destroys the Character object. Deletes the weapon, armour, status, and HP members

int getTHACO ()
[virtual]

Returns the THACO of the character (THACO with the letter O, not the number 0)

int getAC (int DamageType)
[virtual]

Returns the AC of the character for damage type DamageType

char * getName ()

Returns the name of the character

int getAC ()
[virtual]

Returns the AC unmodified by damage type

int loseHP (int amount)

Decreases the current value of the HP by amount. Returns the new HP value

void attack (Character &target)
[virtual]

Combines an attack roll and a damage roll

bool amAlive ()

Returns whether or not the HP of the character has fallen below zero

bool haveClass ()
[pure virtual]

Determines whether a character has a class.