My Project
 
Loading...
Searching...
No Matches
Mob Class Referenceabstract

#include <mob.h>

Inheritance diagram for Mob:
Collaboration diagram for Mob:

Classes

class  AiState
 
class  Fleeing
 

Public Member Functions

 Mob ()
 
virtual void storeInBundle (Bundle *bundle)
 
virtual void restoreFromBundle (Bundle *bundle)
 
virtual CharSpriteSprite ()=0
 
virtual void add (Buff *buff)
 
virtual void remove (Buff *buff)
 
virtual void move (int step)
 
virtual void onAttackComplete ()
 
virtual int defenseSkill (Char *enemy)
 
virtual int defenseProc (Char *enemy, int damage)
 
void aggro (Char *ch)
 
virtual void notice ()
 
virtual void beckon (int cell)
 
virtual void damage (int dmg, const std::string &src)
 
void yell (const std::string &str)
 
virtual std::string description ()
 
virtual void destroy ()
 
int exp ()
 
virtual void die (const std::string &str)
 
- Public Member Functions inherited from Char
 Char ()
 
 CLASSOBJECT (Char)
 
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 std::string defenseVerb ()
 
virtual int dr ()
 
virtual int damageRoll ()
 
virtual int attackProc (Char *enemy, int damage)
 
float speed ()
 
void destroy ()
 
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 ()
 
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
 

Public Attributes

bool hostile
 
AiStateSLEEPEING
 
AiStateHUNTING
 
AiStateWANDERING
 
AiStateFLEEING
 
AiStatePASSIVE
 
AiStatestate
 
- Public Attributes inherited from Char
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 ()
 
CharchooseEnemy ()
 
bool moveSprite (int from, int to)
 
virtual bool canAttack (Char *enemy)
 
virtual bool getCloser (int target)
 
virtual bool getFurther (int target)
 
virtual float attackDelay ()
 
virtual bool doAttack (Char *enemy)
 
- Protected Member Functions inherited from Char
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

int target
 
int _defenseSkill
 
int EXP
 
int maxLvl
 
Charenemy
 
bool enemySeen
 
bool alerted
 
float lootChance
 
- Protected Attributes inherited from Char
float baseSpeed
 

Static Protected Attributes

static const String TXT_ECHO = "echo of "
 
static const String TXT_NOTICE1 = "?!"
 
static const String TXT_RAGE = "#$%^"
 
static const String TXT_EXP = "%+dEXP"
 
static const float TIME_TO_WAKE_UP = 1.0f
 
- Static Protected Attributes inherited from Char
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 Member Functions inherited from Char
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 ()
 
- Static Public Attributes inherited from Actor
static const int TICK = 1
 
static HashSet< Actor * > all
 

Constructor & Destructor Documentation

◆ Mob()

Mob::Mob ( )
Here is the caller graph for this function:

Member Function Documentation

◆ act()

bool Mob::act ( )
protectedvirtual

Reimplemented from Char.

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

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

◆ add()

void Mob::add ( Buff * buff)
virtual

Reimplemented in Elemental, and Shopkeeper.

Here is the call graph for this function:

◆ aggro()

void Mob::aggro ( Char * ch)
Here is the call graph for this function:

◆ attackDelay()

virtual float Mob::attackDelay ( )
inlineprotectedvirtual

Reimplemented in Eye, Golem, Monk, and Thief.

Here is the caller graph for this function:

◆ beckon()

void Mob::beckon ( int cell)
virtual

Reimplemented in NPC, and Yog.

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

◆ canAttack()

bool Mob::canAttack ( Char * enemy)
protectedvirtual

Reimplemented in Eye, Goo, King, Scorpio, Shaman, Tengu, Warlock, and Yog::BurningFist.

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

◆ chooseEnemy()

Char * Mob::chooseEnemy ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ damage()

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

Reimplemented from Char.

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

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

◆ defenseProc()

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

Reimplemented from Char.

Reimplemented in Swarm, and Yog.

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

◆ defenseSkill()

int Mob::defenseSkill ( Char * enemy)
virtual

Reimplemented from Char.

Here is the call graph for this function:

◆ description()

virtual std::string Mob::description ( )
inlinevirtual

◆ destroy()

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

◆ die()

void Mob::die ( const std::string & str)
virtual

Reimplemented from Char.

Reimplemented in Crab, DM300, Gnoll, Golem, Goo, King, King::Undead, Mimic, 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:

◆ doAttack()

bool Mob::doAttack ( Char * enemy)
protectedvirtual

Reimplemented in Eye, Goo, Shaman, Tengu, and Warlock.

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

◆ exp()

int Mob::exp ( )
Here is the caller graph for this function:

◆ getCloser()

bool Mob::getCloser ( int target)
protectedvirtual

Reimplemented in Goo, King, Scorpio, and Tengu.

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

◆ getFurther()

bool Mob::getFurther ( int target)
protectedvirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ move()

void Mob::move ( int step)
virtual

Reimplemented from Char.

Reimplemented in DM300, Goo, and Spinner.

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

◆ moveSprite()

bool Mob::moveSprite ( int from,
int to )
protected
Here is the caller graph for this function:

◆ notice()

void Mob::notice ( )
virtual

Reimplemented in DM300, Goo, King, Tengu, and Yog.

Here is the caller graph for this function:

◆ onAttackComplete()

void Mob::onAttackComplete ( )
virtual
Here is the call graph for this function:

◆ remove()

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

◆ restoreFromBundle()

void Mob::restoreFromBundle ( Bundle * bundle)
virtual

Reimplemented from Char.

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

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

◆ Sprite()

virtual CharSprite * Mob::Sprite ( )
pure virtual

◆ storeInBundle()

void Mob::storeInBundle ( Bundle * bundle)
virtual

Reimplemented from Char.

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

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

◆ yell()

void Mob::yell ( const std::string & str)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _defenseSkill

int Mob::_defenseSkill
protected

◆ alerted

bool Mob::alerted
protected

◆ enemy

Char* Mob::enemy
protected

◆ enemySeen

bool Mob::enemySeen
protected

◆ EXP

int Mob::EXP
protected

◆ FLEEING

AiState* Mob::FLEEING

◆ hostile

bool Mob::hostile

◆ HUNTING

AiState* Mob::HUNTING

◆ lootChance

float Mob::lootChance
protected

◆ maxLvl

int Mob::maxLvl
protected

◆ PASSIVE

AiState* Mob::PASSIVE

◆ SLEEPEING

AiState* Mob::SLEEPEING

◆ state

AiState* Mob::state

◆ target

int Mob::target
protected

◆ TIME_TO_WAKE_UP

const float Mob::TIME_TO_WAKE_UP = 1.0f
staticprotected

◆ TXT_ECHO

const String Mob::TXT_ECHO = "echo of "
staticprotected

◆ TXT_EXP

const String Mob::TXT_EXP = "%+dEXP"
staticprotected

◆ TXT_NOTICE1

const String Mob::TXT_NOTICE1 = "?!"
staticprotected

◆ TXT_RAGE

const String Mob::TXT_RAGE = "#$%^"
staticprotected

◆ WANDERING

AiState* Mob::WANDERING

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