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

#include <wand.h>

Inheritance diagram for Wand:
Collaboration diagram for Wand:

Classes

class  Charger
 

Public Member Functions

 Wand ()
 
virtual int min ()
 
virtual int max ()
 
virtual void actions (Hero *hero, std::vector< std::string > &actions)
 
virtual bool doUnequip (Hero *hero, bool collect, bool single)
 
virtual void activate (Hero *hero)
 
virtual void execute (Hero *hero, const std::string &action)
 
virtual bool collect (Bag *container)
 
void charge (Char *owner)
 
void onDetach ()
 
void stopCharging ()
 
int power ()
 
void setKnown ()
 
virtual Itemidentify ()
 
virtual std::string toString ()
 
virtual std::string Name ()
 
virtual std::string info ()
 
virtual bool isIdentified ()
 
virtual std::string status ()
 
virtual Itemupgrade ()
 
virtual Itemdegrade ()
 
virtual int maxDurability (int lvl)
 
virtual Itemrandom ()
 
virtual int price ()
 
virtual void storeInBundle (Bundle *bundle)
 
virtual void restoreFromBundle (Bundle *bundle)
 
- Public Member Functions inherited from KindOfWeapon
virtual bool isEquipped (Hero *hero)
 
virtual bool doEquip (Hero *hero)
 
virtual int damageRoll (Hero *owner)
 
virtual float acuracyFactor (Hero *hero)
 
virtual float speedFactor (Hero *hero)
 
virtual void proc (Char *attacker, Char *defender, int damage)
 
- Public Member Functions inherited from EquipableItem
virtual void execute (Hero *hero, std::string action)
 
virtual void doDrop (Hero *hero)
 
virtual void cast (Hero *user, int dst)
 
virtual bool doUnequip (Hero *hero, bool collect)
 
- Public Member Functions inherited from Item
 CLASSNAME (Item)
 
 CLASSOBJECT (Item)
 
 Item ()
 
virtual bool doPickUp (Hero *hero)
 
virtual void doThrow (Hero *hero)
 
std::string trueName ()
 
int Image ()
 
Itemdetach (Bag *container)
 
ItemdetachAll (Bag *container)
 
virtual ItemSprite::Glowingglowing ()
 
virtual bool isUpgradable ()
 
virtual int effectiveLevel ()
 
virtual std::string desc ()
 
int Quantity ()
 
void Quantity (int value)
 
virtual void getBroken ()
 
bool isBroken ()
 
virtual void fix ()
 
int maxDurability ()
 
int visiblyUpgraded ()
 
virtual void Level (int value)
 
int Level ()
 
void use ()
 
void updateQuickslot ()
 
Itemdegrade (int n)
 
int considerState (int price)
 
void polish ()
 
std::string status ()
 
- Public Member Functions inherited from Object
virtual std::string getObject ()=0
 

Static Public Member Functions

static void initWoods ()
 
static void save (Bundle *bundle)
 
static void restore (Bundle *bundle)
 
static bool allKnown ()
 
- Static Public Member Functions inherited from Item
static void evoke (Hero *hero)
 
static ItemVirtual (const std::string &cl)
 

Public Attributes

int maxCharges
 
int curCharges = maxCharges
 
- Public Attributes inherited from Item
std::string defaultAction
 
std::string name = "smth"
 
int image = 0
 
bool stackable = false
 
bool levelKnown = false
 
bool cursed
 
bool cursedKnown
 
bool unique = false
 
int quantity
 

Static Public Attributes

static const std::string AC_ZAP = "ZAP"
 
- Static Public Attributes inherited from EquipableItem
static const std::string AC_EQUIP = "EQUIP"
 
static const std::string AC_UNEQUIP = "UNEQUIP"
 
- Static Public Attributes inherited from Item
static HerocurUser
 
static ItemcurItem
 

Protected Member Functions

virtual void init ()
 
virtual int initialCharges ()
 
virtual void onZap (int cell)=0
 
bool isKnown ()
 
void updateLevel ()
 
virtual void fx (int cell, Callback *callback)
 
void wandUsed ()
 
- Protected Member Functions inherited from EquipableItem
virtual float time2equip (Hero *hero)
 
- Protected Member Functions inherited from Item
virtual void onThrow (int cell)
 

Protected Attributes

Chargercharger
 
bool hitChars
 

Static Protected Attributes

static CellSelector::Listenerzapper
 
- Static Protected Attributes inherited from KindOfWeapon
static const float TIME_TO_EQUIP = 1.0f
 
- Static Protected Attributes inherited from Item
static const float TIME_TO_THROW = 1.0f
 
static const float TIME_TO_PICK_UP = 1.0f
 
static const float TIME_TO_DROP = 0.5f
 
static const std::string AC_DROP = "lang.item_drop"
 
static const std::string AC_THROW = "lang.item_throw"
 
static CellSelector::Listenerthrower = new CellSelectorListenerNew()
 

Additional Inherited Members

- Static Protected Member Functions inherited from EquipableItem
static void equipCursed (Hero *hero)
 

Constructor & Destructor Documentation

◆ Wand()

Wand::Wand ( )
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ actions()

void Wand::actions ( Hero * hero,
std::vector< std::string > & actions )
virtual

Reimplemented from KindOfWeapon.

Reimplemented in WandOfMagicMissile.

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

◆ activate()

void Wand::activate ( Hero * hero)
virtual

Reimplemented from KindOfWeapon.

Here is the call graph for this function:

◆ allKnown()

bool Wand::allKnown ( )
static

◆ charge()

void Wand::charge ( Char * owner)
Here is the caller graph for this function:

◆ collect()

bool Wand::collect ( Bag * container)
virtual

Reimplemented from Item.

Here is the caller graph for this function:

◆ degrade()

Item * Wand::degrade ( )
virtual

Reimplemented from Item.

Here is the call graph for this function:

◆ doUnequip()

bool Wand::doUnequip ( Hero * hero,
bool collect,
bool single )
virtual

Reimplemented from KindOfWeapon.

Here is the call graph for this function:

◆ execute()

void Wand::execute ( Hero * hero,
const std::string & action )
virtual

Reimplemented in WandOfMagicMissile.

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

◆ fx()

void Wand::fx ( int cell,
Callback * callback )
protectedvirtual

◆ identify()

Item * Wand::identify ( )
virtual

Reimplemented from Item.

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

◆ info()

std::string Wand::info ( )
virtual

Reimplemented from Item.

◆ init()

void Wand::init ( )
protectedvirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialCharges()

virtual int Wand::initialCharges ( )
inlineprotectedvirtual

Reimplemented in WandOfMagicMissile.

Here is the caller graph for this function:

◆ initWoods()

void Wand::initWoods ( )
static

◆ isIdentified()

bool Wand::isIdentified ( )
virtual

Reimplemented from Item.

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

◆ isKnown()

bool Wand::isKnown ( )
protected
Here is the caller graph for this function:

◆ max()

virtual int Wand::max ( )
inlinevirtual

Implements KindOfWeapon.

Here is the call graph for this function:

◆ maxDurability()

virtual int Wand::maxDurability ( int lvl)
inlinevirtual

Reimplemented from Item.

◆ min()

virtual int Wand::min ( )
inlinevirtual

Implements KindOfWeapon.

Here is the call graph for this function:

◆ Name()

virtual std::string Wand::Name ( )
inlinevirtual

Reimplemented from Item.

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

◆ onDetach()

void Wand::onDetach ( )
inlinevirtual

Reimplemented from Item.

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

◆ onZap()

◆ power()

int Wand::power ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ price()

virtual int Wand::price ( )
inlinevirtual

Reimplemented from Item.

Here is the call graph for this function:

◆ random()

Item * Wand::random ( )
virtual

Reimplemented from Item.

Here is the call graph for this function:

◆ restore()

void Wand::restore ( Bundle * bundle)
static

◆ restoreFromBundle()

void Wand::restoreFromBundle ( Bundle * bundle)
virtual

Reimplemented from Item.

Here is the call graph for this function:

◆ save()

void Wand::save ( Bundle * bundle)
static

◆ setKnown()

void Wand::setKnown ( )
Here is the caller graph for this function:

◆ status()

std::string Wand::status ( )
virtual

◆ stopCharging()

void Wand::stopCharging ( )
inline
Here is the caller graph for this function:

◆ storeInBundle()

void Wand::storeInBundle ( Bundle * bundle)
virtual

Reimplemented from Item.

Here is the call graph for this function:

◆ toString()

std::string Wand::toString ( )
virtual

Reimplemented from Item.

◆ updateLevel()

void Wand::updateLevel ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ upgrade()

Item * Wand::upgrade ( )
virtual

Reimplemented from Item.

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

◆ wandUsed()

void Wand::wandUsed ( )
protected
Here is the call graph for this function:

Member Data Documentation

◆ AC_ZAP

const std::string Wand::AC_ZAP = "ZAP"
static

◆ charger

Charger* Wand::charger
protected

◆ curCharges

int Wand::curCharges = maxCharges

◆ hitChars

bool Wand::hitChars
protected

◆ maxCharges

int Wand::maxCharges

◆ zapper

CellSelector::Listener * Wand::zapper
staticprotected

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