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

#include <potion.h>

Inheritance diagram for Potion:
Collaboration diagram for Potion:

Public Member Functions

virtual std::string getClassName ()
 
 Potion ()
 
virtual void actions (Hero *hero, std::vector< std::string > &actions)
 
virtual void execute (Hero *hero, std::string action)
 
virtual void doThrow (Hero *hero)
 
virtual void shatter (int cell)
 
boolean isKnown ()
 
void setKnown ()
 
virtual Itemidentify ()
 
virtual String Name ()
 
virtual String info ()
 
virtual boolean isIdentified ()
 
virtual boolean isUpgradable ()
 
virtual int price ()
 
- Public Member Functions inherited from Item
 CLASSNAME (Item)
 
 CLASSOBJECT (Item)
 
 Item ()
 
virtual bool doPickUp (Hero *hero)
 
virtual void doDrop (Hero *hero)
 
virtual std::string toString ()
 
std::string trueName ()
 
int Image ()
 
Itemdetach (Bag *container)
 
ItemdetachAll (Bag *container)
 
virtual ItemSprite::Glowingglowing ()
 
virtual void storeInBundle (Bundle *bundle)
 
virtual void restoreFromBundle (Bundle *bundle)
 
virtual bool isEquipped (Hero *hero)
 
virtual int effectiveLevel ()
 
virtual std::string desc ()
 
int Quantity ()
 
void Quantity (int value)
 
virtual void cast (Hero *user, int dst)
 
virtual void getBroken ()
 
bool isBroken ()
 
virtual void fix ()
 
virtual int maxDurability (int lvl)
 
int maxDurability ()
 
int visiblyUpgraded ()
 
virtual Itemrandom ()
 
virtual void Level (int value)
 
int Level ()
 
virtual boolean collect (Bag *container)
 
void use ()
 
void updateQuickslot ()
 
virtual Itemupgrade ()
 
virtual Itemdegrade ()
 
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 initColors ()
 
static void save (Bundle *bundle)
 
static void restore (Bundle *bundle)
 
static std::set< std::string > getKnown ()
 
static std::set< std::string > getUnknown ()
 
static boolean allKnown ()
 
- Static Public Member Functions inherited from Item
static void evoke (Hero *hero)
 
static ItemVirtual (const std::string &cl)
 

Static Public Attributes

static const String AC_DRINK = "DRINK"
 
- Static Public Attributes inherited from Item
static HerocurUser
 
static ItemcurItem
 

Protected Member Functions

void drink (Hero *hero)
 
virtual void onThrow (int cell)
 
virtual void apply (Hero *hero)
 
String Color ()
 
void splash (int cell)
 
- Protected Member Functions inherited from Item
virtual void onDetach ()
 

Additional Inherited Members

- 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 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()
 

Constructor & Destructor Documentation

◆ Potion()

Potion::Potion ( )

Member Function Documentation

◆ actions()

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

Reimplemented from Item.

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

◆ allKnown()

static boolean Potion::allKnown ( )
inlinestatic

◆ apply()

void Potion::apply ( Hero * hero)
protectedvirtual

Reimplemented in PotionOfExperience, PotionOfHealing, PotionOfInvisibility, PotionOfLevitation, PotionOfMight, PotionOfMindVision, PotionOfPurity, and PotionOfStrength.

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

◆ Color()

String Potion::Color ( )
inlineprotected

◆ doThrow()

void Potion::doThrow ( Hero * hero)
virtual

Reimplemented from Item.

Here is the call graph for this function:

◆ drink()

void Potion::drink ( Hero * hero)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ execute()

void Potion::execute ( Hero * hero,
std::string action )
virtual

Reimplemented from Item.

Here is the call graph for this function:

◆ getClassName()

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

◆ getKnown()

static std::set< std::string > Potion::getKnown ( )
inlinestatic
Here is the caller graph for this function:

◆ getUnknown()

static std::set< std::string > Potion::getUnknown ( )
inlinestatic
Here is the caller graph for this function:

◆ identify()

virtual Item * Potion::identify ( )
inlinevirtual

Reimplemented from Item.

Here is the call graph for this function:

◆ info()

virtual String Potion::info ( )
inlinevirtual

Reimplemented from Item.

Here is the call graph for this function:

◆ initColors()

void Potion::initColors ( )
static

◆ isIdentified()

virtual boolean Potion::isIdentified ( )
inlinevirtual

Reimplemented from Item.

Here is the call graph for this function:

◆ isKnown()

boolean Potion::isKnown ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isUpgradable()

virtual boolean Potion::isUpgradable ( )
inlinevirtual

Reimplemented from Item.

◆ Name()

virtual String Potion::Name ( )
inlinevirtual

Reimplemented from Item.

Here is the call graph for this function:

◆ onThrow()

void Potion::onThrow ( int cell)
protectedvirtual

Reimplemented from Item.

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

◆ price()

virtual int Potion::price ( )
inlinevirtual

◆ restore()

void Potion::restore ( Bundle * bundle)
static

◆ save()

void Potion::save ( Bundle * bundle)
static

◆ setKnown()

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

◆ shatter()

void Potion::shatter ( int cell)
virtual

Reimplemented in PotionOfFrost, PotionOfLiquidFlame, PotionOfParalyticGas, PotionOfPurity, and PotionOfToxicGas.

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

◆ splash()

void Potion::splash ( int cell)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ AC_DRINK

const String Potion::AC_DRINK = "DRINK"
static

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