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

#include <weapon.h>

Inheritance diagram for ShortSword:
Collaboration diagram for ShortSword:

Public Member Functions

 ShortSword ()
 
virtual void actions (Hero *hero, std::vector< std::string > &actions)
 
virtual void execute (Hero *hero, std::string action)
 
virtual String desc ()
 
virtual std::string getClassName ()
 
- Public Member Functions inherited from MeleeWeapon
 MeleeWeapon (int tier, float acu, float dly)
 
virtual int min ()
 
virtual int max ()
 
virtual Itemupgrade ()
 
Itemupgrade (boolean enchant)
 
ItemsafeUpgrade ()
 
virtual Itemdegrade ()
 
int typicalSTR ()
 
virtual String info ()
 
virtual int price ()
 
virtual Itemrandom ()
 
- Public Member Functions inherited from Weapon
 Weapon ()
 
virtual void proc (Char *attacker, Char *defender, int damage)
 
virtual void storeInBundle (Bundle *bundle)
 
virtual void restoreFromBundle (Bundle *bundle)
 
virtual float acuracyFactor (Hero *hero)
 
virtual float speedFactor (Hero *hero)
 
virtual int damageRoll (Hero *owner)
 
Itemupgrade (boolean enchant)
 
virtual int maxDurability (int lvl)
 
virtual String toString ()
 
virtual String Name ()
 
Weaponenchant (Enchantment *ench)
 
Weaponenchant ()
 
boolean isEnchanted ()
 
virtual ItemSprite::Glowingglowing ()
 
- Public Member Functions inherited from KindOfWeapon
virtual bool isEquipped (Hero *hero)
 
virtual bool doEquip (Hero *hero)
 
virtual bool doUnequip (Hero *hero, bool collect, bool single)
 
virtual void activate (Hero *hero)
 
- Public Member Functions inherited from EquipableItem
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 bool isUpgradable ()
 
virtual bool isIdentified ()
 
virtual int effectiveLevel ()
 
int Quantity ()
 
void Quantity (int value)
 
virtual void getBroken ()
 
bool isBroken ()
 
virtual void fix ()
 
int maxDurability ()
 
int visiblyUpgraded ()
 
virtual Itemidentify ()
 
virtual void Level (int value)
 
int Level ()
 
virtual boolean collect (Bag *container)
 
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 ItemCreate ()
 
- Static Public Member Functions inherited from Item
static void evoke (Hero *hero)
 
static ItemVirtual (const std::string &cl)
 

Public Attributes

boolean equipped
 
- Public Attributes inherited from Weapon
int STR
 
float ACU
 
float DLY
 
Imbue imbue
 
- 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 String AC_REFORGE = BPT::getText("lang.REFORGE")
 
static const String TXT_SELECT_WEAPON = BPT::getText("lang.select_weapon_upgrade")
 
static const String TXT_REFORGED = BPT::getText("lang.reforged_short_sword_upgrade")
 
static const String TXT_NOT_BOOMERANG = BPT::getText("lang.not_upgrade_boomerang")
 
static const float TIME_TO_REFORGE = 2.0f
 
- 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 int max0 ()
 
- Protected Member Functions inherited from MeleeWeapon
virtual int min0 ()
 
- Protected Member Functions inherited from EquipableItem
virtual float time2equip (Hero *hero)
 
- Protected Member Functions inherited from Item
virtual void onThrow (int cell)
 
virtual void onDetach ()
 

Additional Inherited Members

- Public Types inherited from Weapon
enum  Imbue { NONE , SPEED , ACCURACY }
 
- Static Protected Member Functions inherited from EquipableItem
static void equipCursed (Hero *hero)
 
- Protected Attributes inherited from Weapon
Enchantmentenchantment
 
- 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()
 

Constructor & Destructor Documentation

◆ ShortSword()

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

Member Function Documentation

◆ actions()

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

Reimplemented from KindOfWeapon.

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

◆ Create()

static Item * ShortSword::Create ( )
inlinestatic
Here is the call graph for this function:

◆ desc()

virtual String ShortSword::desc ( )
inlinevirtual

Reimplemented from Item.

Here is the call graph for this function:

◆ execute()

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

Reimplemented from EquipableItem.

Here is the call graph for this function:

◆ getClassName()

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

Reimplemented from MeleeWeapon.

◆ max0()

virtual int ShortSword::max0 ( )
inlineprotectedvirtual

Reimplemented from MeleeWeapon.

Member Data Documentation

◆ AC_REFORGE

const String ShortSword::AC_REFORGE = BPT::getText("lang.REFORGE")
static

◆ equipped

boolean ShortSword::equipped

◆ TIME_TO_REFORGE

const float ShortSword::TIME_TO_REFORGE = 2.0f
static

◆ TXT_NOT_BOOMERANG

const String ShortSword::TXT_NOT_BOOMERANG = BPT::getText("lang.not_upgrade_boomerang")
static

◆ TXT_REFORGED

const String ShortSword::TXT_REFORGED = BPT::getText("lang.reforged_short_sword_upgrade")
static

◆ TXT_SELECT_WEAPON

const String ShortSword::TXT_SELECT_WEAPON = BPT::getText("lang.select_weapon_upgrade")
static

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