4 * Created on: Aug 9, 2012
11 #include "HeroGroup.h"
12 #include "TargetingMode.h"
16 namespace graphics { class Sprite; }
28 const char *Name() const { return name; }
30 bool IsMostUseful() const { return usability & USABILITY_MOST_USEFUL; }
31 bool IsEquipable() const { return usability & USABILITY_EQUIPABLE; }
32 bool IsCursed() const { return usability & USABILITY_CURSED; }
33 bool IsFruit() const { return usability & USABILITY_FRUIT; }
34 bool IsScenario() const { return usability & USABILITY_SCENARIO; }
35 bool CanSell() const { return !IsScenario(); }
36 bool CanDrop() const { return !IsScenario(); }
37 bool CanUseOnStatusScreen() const { return usability & USABILITY_STATUS; }
38 bool CanUseInBattle() const { return usability & USABILITY_BATTLE; }
40 TargetingMode &GetTargetingMode() { return targettingMode; }
41 const TargetingMode &GetTargetingMode() const { return targettingMode; }
43 bool HasMenuIcon() const { return menuIcon; }
44 const graphics::Sprite *MenuIcon() const { return menuIcon; }
45 bool HasChestIcon() const { return chestIcon; }
46 const graphics::Sprite *ChestIcon() const { return chestIcon; }
48 bool HasIkari() const { return ikari; }
49 const Ikari *GetIkari() const { return ikari; }
51 Uint16 Value() const { return value; }
53 bool CanEquipWeapon() const { return equipable & EQUIPPABLE_WEAPON; }
54 bool CanEquipArmor() const { return equipable & EQUIPPABLE_ARMOR; }
55 bool CanEquipShield() const { return equipable & EQUIPPABLE_SHIELD; }
56 bool CanEquipHelmet() const { return equipable & EQUIPPABLE_HELMET; }
57 bool CanEquipRing() const { return equipable & EQUIPPABLE_RING; }
58 bool CanEquipJewel() const { return equipable & EQUIPPABLE_JEWEL; }
60 HeroGroup &EquipableBy() { return equipableBy; }
61 const HeroGroup &EquipableBy() const { return equipableBy; }
63 bool HasEffectOnStatusScreen() const { return properties & PROPERTY_HAS_EFFECT_STATUS; }
64 bool HasEffectInBattle() const { return properties & PROPERTY_HAS_EFFECT_BATTLE; }
65 bool HasWeaponEffect() const { return properties & PROPERTY_HAS_WEAPON_EFFECT; }
66 bool HasArmorEffect() const { return properties & PROPERTY_HAS_ARMOR_EFFECT; }
67 bool IncreasesATP() const { return properties & PROPERTY_INCREASE_ATP; }
68 bool IncreasesDFP() const { return properties & PROPERTY_INCREASE_DFP; }
69 bool IncreasesSTR() const { return properties & PROPERTY_INCREASE_STR; }
70 bool IncreasesAGL() const { return properties & PROPERTY_INCREASE_AGL; }
71 bool IncreasesINT() const { return properties & PROPERTY_INCREASE_INT; }
72 bool IncreasesGUT() const { return properties & PROPERTY_INCREASE_GUT; }
73 bool IncreasesMGR() const { return properties & PROPERTY_INCREASE_MGR; }
74 bool HasBattleAnimation() const { return properties & PROPERTY_HAS_BATTLE_ANIMATION; }
75 bool HasIkariEffect() const { return properties & PROPERTY_HAS_IKARI_EFFECT; }
79 void SetName(const char *n) { name = n; }
80 void SetMenuIcon(const graphics::Sprite *icon) { menuIcon = icon; }
81 void SetUsableInBattle() { usability |= USABILITY_BATTLE; }
82 void SetIkari(const Ikari *i) { ikari = i; }
86 USABILITY_MOST_USEFUL = 1,
87 USABILITY_EQUIPABLE = 2,
88 // USABILITY_UNUSED = 4,
91 USABILITY_SCENARIO = 32,
92 USABILITY_STATUS = 64,
93 USABILITY_BATTLE = 128,
97 EQUIPPABLE_WEAPON = 1,
99 EQUIPPABLE_SHIELD = 4,
100 EQUIPPABLE_HELMET = 8,
101 EQUIPPABLE_RING = 16,
102 EQUIPPABLE_JEWEL = 32,
105 PROPERTY_HAS_EFFECT_STATUS = 1,
106 PROPERTY_HAS_EFFECT_BATTLE = 2,
107 PROPERTY_HAS_WEAPON_EFFECT = 4,
108 PROPERTY_HAS_ARMOR_EFFECT = 8,
109 PROPERTY_INCREASE_ATP = 16,
110 PROPERTY_INCREASE_DFP = 32,
111 PROPERTY_INCREASE_STR = 64,
112 PROPERTY_INCREASE_AGL = 128,
113 PROPERTY_INCREASE_INT = 256,
114 PROPERTY_INCREASE_GUT = 512,
115 PROPERTY_INCREASE_MGR = 1024,
116 // PROPERTY_UNUSED = 2048,
117 // PROPERTY_UNUSED = 4096,
118 PROPERTY_HAS_BATTLE_ANIMATION = 8192,
119 // PROPERTY_UNKNOWN = 16384,
120 PROPERTY_HAS_IKARI_EFFECT = 32768,
125 const graphics::Sprite *menuIcon;
126 const graphics::Sprite *chestIcon;
133 TargetingMode targettingMode;
135 HeroGroup equipableBy;
141 #endif /* COMMON_ITEM_H_ */