My Project
 
Loading...
Searching...
No Matches
Char Class Reference

#include <char.h>

Inheritance diagram for Char:
Collaboration diagram for Char:

Public Member Functions

 Char ()
 
 CLASSOBJECT (Char)
 
virtual void storeInBundle (Bundle *bundle)
 
virtual void restoreFromBundle (Bundle *bundle)
 
HashSet< std::string > & resistances ()
 
HashSet< std::string > & immunities ()
 
bool immunitiesContain (const std::string &cls)
 
void add (Buff *buff)
 
void remove (Buff *buff)
 
void remove (const std::string &buffClass)
 
bool attack (Char *enemy)
 
virtual int attackSkill (Char *target)
 
virtual int defenseSkill (Char *enemy)
 
virtual std::string defenseVerb ()
 
virtual int dr ()
 
virtual int damageRoll ()
 
virtual int attackProc (Char *enemy, int damage)
 
virtual int defenseProc (Char *enemy, int damage)
 
float speed ()
 
virtual void damage (int dmg, const std::string &src)
 
void destroy ()
 
virtual void die (const std::string &src)
 
bool isAlive ()
 
void Buffs (const std::string &c, std::set< Buff * > &re)
 
Buffbuff (const std::string &c)
 
std::set< Buff * > buffSet (const std::string &c)
 
bool isCharmedBy (Char *ch)
 
void updateSpriteState ()
 
virtual int stealth ()
 
virtual void move (int step)
 
int distance (Char *other)
 
void onMotionComplete ()
 
void onAttackComplete ()
 
void onOperateComplete ()
 
- Public Member Functions inherited from Actor
 Actor ()
 
int Id ()
 
void next ()
 
- Public Member Functions inherited from Object
virtual std::string getObject ()=0
 

Static Public Member Functions

static bool hit (Char *attacker, Char *defender, bool magic)
 
- Static Public Member Functions inherited from Actor
static void fixTime ()
 
static void clear ()
 
static CharfindChar (int pos)
 
static ActorfindById (int id)
 
static void init ()
 
static void addDelayed (Actor *actor, float delay)
 
static void remove (Actor *actor)
 
static void add (Actor *actor)
 
static void occupyCell (Char *ch)
 
static void freeCell (int pos)
 
static void process ()
 

Public Attributes

int pos
 
std::string name
 
int HT
 
int HP
 
CharSpritesprite
 
bool paralysed
 
bool rooted
 
bool flying
 
int invisible
 
int viewDistance
 
std::set< Buff * > buffs
 

Protected Member Functions

virtual bool act ()
 
virtual void spend (float time)
 
virtual void onRemove ()
 
- Protected Member Functions inherited from Actor
void postpone (float time)
 
float cooldown ()
 
void diactivate ()
 
virtual void onAdd ()
 

Protected Attributes

float baseSpeed
 

Static Protected Attributes

static const std::string TXT_HIT = BPT::getText("lang.s_hit_s")
 
static const std::string TXT_KILL = BPT::getText("lang.killed_you")
 
static const std::string TXT_DEFEAT = BPT::getText("lang.s_defeated_s")
 

Additional Inherited Members

- Static Public Attributes inherited from Actor
static const int TICK = 1
 
static HashSet< Actor * > all
 

Constructor & Destructor Documentation

◆ Char()

Char::Char ( )

Member Function Documentation

◆ act()

bool Char::act ( )
protectedvirtual

Implements Actor.

Reimplemented in DM300, Goo, Hero, Mob, Shopkeeper, Spinner, WandOfFlock::Sheep, Yog::BurningFist, and Yog::RottingFist.

Here is the caller graph for this function:

◆ add()

void Char::add ( Buff * buff)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ attack()

bool Char::attack ( Char * enemy)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ attackProc()

virtual int Char::attackProc ( Char * enemy,
int damage )
inlinevirtual

Reimplemented in Bat, Elemental, Goo, King::Undead, Mimic, MirrorImage, Monk, Scorpio, Spinner, Succubus, and Yog::RottingFist.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ attackSkill()

virtual int Char::attackSkill ( Char * target)
inlinevirtual

Reimplemented in Bat, Brute, Crab, DM300, Elemental, Eye, Gnoll, Golem, Goo, Hero, King, King::Undead, Mimic, MirrorImage, Monk, Rat, Scorpio, Shaman, Spinner, Swarm, Tengu, Thief, Warlock, Wraith, Yog::BurningFist, Yog::Larva, and Yog::RottingFist.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ buff()

Buff * Char::buff ( const std::string & c)
Here is the caller graph for this function:

◆ Buffs()

void Char::Buffs ( const std::string & c,
std::set< Buff * > & re )
Here is the caller graph for this function:

◆ buffSet()

std::set< Buff * > Char::buffSet ( const std::string & c)
Here is the caller graph for this function:

◆ CLASSOBJECT()

Char::CLASSOBJECT ( Char )
Here is the call graph for this function:

◆ damage()

void Char::damage ( int dmg,
const std::string & src )
virtual

Reimplemented in Brute, King::Undead, Mob, Shopkeeper, WandOfFlock::Sheep, and Yog.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ damageRoll()

virtual int Char::damageRoll ( )
inlinevirtual

◆ defenseProc()

virtual int Char::defenseProc ( Char * enemy,
int damage )
inlinevirtual

Reimplemented in Mob, Swarm, and Yog.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ defenseSkill()

virtual int Char::defenseSkill ( Char * enemy)
inlinevirtual

Reimplemented in Mob.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ defenseVerb()

virtual std::string Char::defenseVerb ( )
inlinevirtual

Reimplemented in Bat, Crab, Golem, King, King::Undead, Monk, Swarm, and Wraith.

Here is the caller graph for this function:

◆ destroy()

void Char::destroy ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ die()

void Char::die ( const std::string & src)
virtual

Reimplemented in Crab, DM300, Gnoll, Golem, Goo, King, King::Undead, Mimic, Mob, Monk, Rat, Skeleton, Tengu, Yog::BurningFist, Yog, and Yog::RottingFist.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ distance()

int Char::distance ( Char * other)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dr()

virtual int Char::dr ( )
inlinevirtual

Reimplemented in Bat, Brute, Crab, DM300, Elemental, Eye, Gnoll, Golem, Goo, King, King::Undead, Monk, Rat, Scorpio, Shaman, Spinner, Tengu, Thief, Warlock, Yog::BurningFist, Yog::Larva, and Yog::RottingFist.

Here is the caller graph for this function:

◆ hit()

bool Char::hit ( Char * attacker,
Char * defender,
bool magic )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ immunities()

HashSet< std::string > & Char::immunities ( )
Here is the caller graph for this function:

◆ immunitiesContain()

bool Char::immunitiesContain ( const std::string & cls)

◆ isAlive()

bool Char::isAlive ( )
inline
Here is the caller graph for this function:

◆ isCharmedBy()

bool Char::isCharmedBy ( Char * ch)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ move()

void Char::move ( int step)
virtual

Reimplemented in DM300, Goo, Hero, Mob, and Spinner.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onAttackComplete()

void Char::onAttackComplete ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onMotionComplete()

void Char::onMotionComplete ( )
inline
Here is the call graph for this function:

◆ onOperateComplete()

void Char::onOperateComplete ( )
inline
Here is the call graph for this function:

◆ onRemove()

void Char::onRemove ( )
protectedvirtual

Reimplemented from Actor.

Reimplemented in King::Undead.

◆ remove() [1/2]

void Char::remove ( Buff * buff)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove() [2/2]

void Char::remove ( const std::string & buffClass)
Here is the call graph for this function:

◆ resistances()

HashSet< std::string > & Char::resistances ( )
Here is the caller graph for this function:

◆ restoreFromBundle()

void Char::restoreFromBundle ( Bundle * bundle)
virtual

Reimplemented from Actor.

Reimplemented in Brute, King, Mimic, MirrorImage, Mob, Swarm, and Wraith.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ speed()

float Char::speed ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ spend()

void Char::spend ( float time)
protectedvirtual

Reimplemented from Actor.

Reimplemented in Hero.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stealth()

virtual int Char::stealth ( )
inlinevirtual

◆ storeInBundle()

void Char::storeInBundle ( Bundle * bundle)
virtual

Reimplemented from Actor.

Reimplemented in King, Mimic, MirrorImage, Mob, Swarm, and Wraith.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSpriteState()

void Char::updateSpriteState ( )
Here is the call graph for this function:

Member Data Documentation

◆ baseSpeed

float Char::baseSpeed
protected

◆ buffs

std::set<Buff*> Char::buffs

◆ flying

bool Char::flying

◆ HP

int Char::HP

◆ HT

int Char::HT

◆ invisible

int Char::invisible

◆ name

std::string Char::name

◆ paralysed

bool Char::paralysed

◆ pos

int Char::pos

◆ rooted

bool Char::rooted

◆ sprite

CharSprite* Char::sprite

◆ TXT_DEFEAT

const std::string Char::TXT_DEFEAT = BPT::getText("lang.s_defeated_s")
staticprotected

◆ TXT_HIT

const std::string Char::TXT_HIT = BPT::getText("lang.s_hit_s")
staticprotected

◆ TXT_KILL

const std::string Char::TXT_KILL = BPT::getText("lang.killed_you")
staticprotected

◆ viewDistance

int Char::viewDistance

The documentation for this class was generated from the following files: