Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields

Battle Class Reference

Collaboration diagram for Battle:

Collaboration graph
[legend]

Detailed Description

This class represents a single battle turn.


Public Member Functions

int getAP ()
int decrAP ()
int getStartingAP ()
void endTurn ()
 Battle ()
 A no-op turn of battle.
 Battle (Session *session, Creature *creature)
 A Battle is a round of battle between 'creature' and 'creature->getTargetCreature()'.
void reset ()
Creature * getAvailableTarget ()
Creature * getAvailablePartyTarget ()
bool isEmpty ()
bool fightTurn ()
void dealDamage (int damage, int maxDamage, int effect=Constants::EFFECT_GLOW, bool magical=false, GLuint delay=0)
Creature * getCreature ()
SessiongetSession ()
void invalidate ()

Static Public Member Functions

static void setupBattles (Session *session, Battle *battle[], int count, vector< Battle * > *turns)
 This method sets up and creates battle turns (Battle objects) in order of initiative.
static void projectileHitTurn (Session *session, Projectile *proj, Creature *target)
 Call these when a projectile weapon finally hits.
static void projectileHitTurn (Session *session, Projectile *proj, int x, int y)
static int getSoundCount ()
static char * getSound (int index)

Static Public Attributes

static bool debugBattle = false

Protected Member Functions

void launchProjectile ()
void hitWithItem ()
void initItem (Item *item)
void castSpell ()
void executeEatDrinkAction ()
bool pauseBeforePlayerTurn ()
void initTurnStep ()
void executeAction ()
void stepCloserToTarget ()
bool selectNewTarget ()
bool moveCreature ()

Static Protected Member Functions

static char * getRandomSound (int start, int count)


Constructor & Destructor Documentation

Battle::Battle  ) 
 

A no-op turn of battle.

Battle::Battle Session session,
Creature *  creature
 

A Battle is a round of battle between 'creature' and 'creature->getTargetCreature()'.


Member Function Documentation

void Battle::projectileHitTurn Session session,
Projectile proj,
Creature *  target
[static]
 

Call these when a projectile weapon finally hits.

It sets up a turn and plays it.

void Battle::setupBattles Session session,
Battle battle[],
int  count,
vector< Battle * > *  turns
[static]
 

This method sets up and creates battle turns (Battle objects) in order of initiative.


The documentation for this class was generated from the following files:
Generated on Thu Jun 16 21:50:44 2005 for scourge by  doxygen 1.4.0