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

#include <hero.h>

Inheritance diagram for Hero:
Collaboration diagram for Hero:

Public Member Functions

int tier ()
 
boolean shoot (Char *enemy, MissileWeapon *wep)
 
void live ()
 
String className ()
 
void updateAwareness ()
 
boolean isStarving ()
 
 Hero ()
 
int sTR ()
 
void resurrect (int resetLevel)
 
virtual bool act ()
 
bool handle (int cell)
 
virtual std::string getClassName ()
 
int VisibleEnemies ()
 
MobvisibleEnemy (int index)
 
void resume ()
 
int maxExp ()
 
void spendAndNext (float time)
 
void busy ()
 
virtual void move (int step)
 
void interrupt ()
 
bool search (bool intentional)
 
void earnExp (int exp)
 
void rest (boolean tillHealthy)
 
float attackDelay ()
 
virtual void spend (float time)
 
virtual int attackSkill (Char *target)
 
- Public Member Functions inherited from Char
 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 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 ()
 
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 void preview (GamesInProgress::Info &info, Bundle *bundle)
 
- 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 ()
 

Public Attributes

ArrayList< Mob * > visibleEnemies
 
HeroClass heroClass
 
HeroSubClass subClass
 
MissileWeaponrangedWeapon
 
Belongingsbelongings
 
int STR
 
boolean weakened
 
int lvl
 
int exp
 
bool restoreHealth
 
bool ready
 
HeroActioncurAction
 
HeroActionlastAction
 
float awareness
 
Armor::GlyphkillerGlyph
 
- 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
 

Static Public Attributes

static const std::string TXT_YOU_NOW_HAVE = BPT::getText("lang.Hero_You_Now_Have")
 
static const int STARTING_STR = 10
 
- Static Public Attributes inherited from Actor
static const int TICK = 1
 
static HashSet< Actor * > all
 

Additional Inherited Members

- Protected Member Functions inherited from Char
virtual void onRemove ()
 
- Protected Member Functions inherited from Actor
void postpone (float time)
 
float cooldown ()
 
void diactivate ()
 
virtual void onAdd ()
 
- Protected Attributes inherited from Char
float baseSpeed
 
- 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")
 

Constructor & Destructor Documentation

◆ Hero()

Hero::Hero ( )

Member Function Documentation

◆ act()

bool Hero::act ( )
virtual

Reimplemented from Char.

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

◆ attackDelay()

float Hero::attackDelay ( )
Here is the call graph for this function:

◆ attackSkill()

int Hero::attackSkill ( Char * target)
virtual

Reimplemented from Char.

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

◆ busy()

void Hero::busy ( )
inline
Here is the caller graph for this function:

◆ className()

String Hero::className ( )

◆ earnExp()

void Hero::earnExp ( int exp)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getClassName()

virtual std::string Hero::getClassName ( )
inlinevirtual

◆ handle()

bool Hero::handle ( int cell)
Here is the call graph for this function:

◆ interrupt()

void Hero::interrupt ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isStarving()

boolean Hero::isStarving ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ live()

void Hero::live ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ maxExp()

int Hero::maxExp ( )
inline
Here is the caller graph for this function:

◆ move()

void Hero::move ( int step)
virtual

Reimplemented from Char.

Here is the call graph for this function:

◆ preview()

void Hero::preview ( GamesInProgress::Info & info,
Bundle * bundle )
static
Here is the caller graph for this function:

◆ rest()

void Hero::rest ( boolean tillHealthy)
Here is the call graph for this function:

◆ resume()

void Hero::resume ( )
Here is the call graph for this function:

◆ resurrect()

void Hero::resurrect ( int resetLevel)
Here is the call graph for this function:

◆ search()

bool Hero::search ( bool intentional)
Here is the call graph for this function:

◆ shoot()

boolean Hero::shoot ( Char * enemy,
MissileWeapon * wep )
Here is the call graph for this function:

◆ spend()

void Hero::spend ( float time)
virtual

Reimplemented from Char.

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

◆ spendAndNext()

void Hero::spendAndNext ( float time)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sTR()

int Hero::sTR ( )
inline
Here is the caller graph for this function:

◆ tier()

int Hero::tier ( )
Here is the caller graph for this function:

◆ updateAwareness()

void Hero::updateAwareness ( )
Here is the caller graph for this function:

◆ VisibleEnemies()

int Hero::VisibleEnemies ( )

◆ visibleEnemy()

Mob * Hero::visibleEnemy ( int index)

Member Data Documentation

◆ awareness

float Hero::awareness

◆ belongings

Belongings* Hero::belongings

◆ curAction

HeroAction* Hero::curAction

◆ exp

int Hero::exp

◆ heroClass

HeroClass Hero::heroClass

◆ killerGlyph

Armor::Glyph* Hero::killerGlyph

◆ lastAction

HeroAction* Hero::lastAction

◆ lvl

int Hero::lvl

◆ rangedWeapon

MissileWeapon* Hero::rangedWeapon

◆ ready

bool Hero::ready

◆ restoreHealth

bool Hero::restoreHealth

◆ STARTING_STR

const int Hero::STARTING_STR = 10
static

◆ STR

int Hero::STR

◆ subClass

HeroSubClass Hero::subClass

◆ TXT_YOU_NOW_HAVE

const std::string Hero::TXT_YOU_NOW_HAVE = BPT::getText("lang.Hero_You_Now_Have")
static

◆ visibleEnemies

ArrayList<Mob*> Hero::visibleEnemies

◆ weakened

boolean Hero::weakened

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