4 * Created on: Aug 9, 2012
13 namespace graphics { class Sprite; }
23 bool IsMostUseful() const { return usability & USABILITY_MOST_USEFUL; }
24 bool IsEquipable() const { return usability & USABILITY_EQUIPABLE; }
25 bool IsCursed() const { return usability & USABILITY_CURSED; }
26 bool IsFruit() const { return usability & USABILITY_FRUIT; }
27 bool IsScenario() const { return usability & USABILITY_SCENARIO; }
28 bool CanSell() const { return !IsScenario(); }
29 bool CanDrop() const { return !IsScenario(); }
30 bool CanUseOnStatusScreen() const { return usability & USABILITY_STATUS; }
31 bool CanUseInBattle() const { return usability & USABILITY_BATTLE; }
33 bool TargetEnemy() const { return targettingMode & TARGETTING_MODE_ENEMY; }
34 bool TargetAlly() const { return !TargetEnemy(); }
35 bool TargetAll() const { return (targettingMode & TARGETTING_MODE_COUNT_MASK) == TARGETTING_MODE_ALL; }
36 bool TargetMultiple() const { return (targettingMode & TARGETTING_MODE_COUNT_MASK) == TARGETTING_MODE_MULTIPLE; }
37 bool TargetOne() const { return (targettingMode & TARGETTING_MODE_COUNT_MASK) == TARGETTING_MODE_ONE; }
39 bool HasMenuIcon() const { return menuIcon; }
40 const graphics::Sprite *MenuIcon() const { return menuIcon; }
41 bool HasChestIcon() const { return chestIcon; }
42 const graphics::Sprite *ChestIcon() const { return chestIcon; }
44 Uint16 Value() const { return value; }
46 bool CanEquipWeapon() const { return equipable & EQUIPPABLE_WEAPON; }
47 bool CanEquipArmor() const { return equipable & EQUIPPABLE_ARMOR; }
48 bool CanEquipShield() const { return equipable & EQUIPPABLE_SHIELD; }
49 bool CanEquipHelmet() const { return equipable & EQUIPPABLE_HELMET; }
50 bool CanEquipRing() const { return equipable & EQUIPPABLE_RING; }
51 bool CanEquipJewel() const { return equipable & EQUIPPABLE_JEWEL; }
53 bool EquipableByMaxim() const { return equipableBy & EQUIPABLE_BY_MAXIM; }
54 bool EquipableBySelan() const { return equipableBy & EQUIPABLE_BY_SELAN; }
55 bool EquipableByGuy() const { return equipableBy & EQUIPABLE_BY_GUY; }
56 bool EquipableByArtea() const { return equipableBy & EQUIPABLE_BY_ARTEA; }
57 bool EquipableByTia() const { return equipableBy & EQUIPABLE_BY_TIA; }
58 bool EquipableByDekar() const { return equipableBy & EQUIPABLE_BY_DEKAR; }
59 bool EquipableByLexis() const { return equipableBy & EQUIPABLE_BY_LEXIS; }
61 bool HasItemEffectOnStatusScreen() const { return properties & PROPERTY_HAS_ITEM_EFFECT_STATUS; }
62 bool HasItemEffectInBattle() const { return properties & PROPERTY_HAS_ITEM_EFFECT_BATTLE; }
63 bool HasWeaponEffect() const { return properties & PROPERTY_HAS_WEAPON_EFFECT; }
64 bool HasArmorEffect() const { return properties & PROPERTY_HAS_ARMOR_EFFECT; }
65 bool IncreasesATP() const { return properties & PROPERTY_INCREASE_ATP; }
66 bool IncreasesDFP() const { return properties & PROPERTY_INCREASE_DFP; }
67 bool IncreasesSTR() const { return properties & PROPERTY_INCREASE_STR; }
68 bool IncreasesAGL() const { return properties & PROPERTY_INCREASE_AGL; }
69 bool IncreasesINT() const { return properties & PROPERTY_INCREASE_INT; }
70 bool IncreasesGUT() const { return properties & PROPERTY_INCREASE_GUT; }
71 bool IncreasesMGR() const { return properties & PROPERTY_INCREASE_MGR; }
72 bool HasBattleAnimation() const { return properties & PROPERTY_HAS_BATTLE_ANIMATION; }
73 bool HasIkariEffect() const { return properties & PROPERTY_HAS_IKARI_EFFECT; }
77 USABILITY_MOST_USEFUL = 1,
78 USABILITY_EQUIPABLE = 2,
79 // USABILITY_UNUSED = 4,
82 USABILITY_SCENARIO = 32,
83 USABILITY_STATUS = 64,
84 USABILITY_BATTLE = 128,
87 TARGETTING_MODE_ALL = 0,
88 TARGETTING_MODE_ALLY = 0,
89 TARGETTING_MODE_MULTIPLE = 1,
90 TARGETTING_MODE_ONE = 2,
91 TARGETTING_MODE_COUNT_MASK = 127,
92 TARGETTING_MODE_ENEMY = 128,
93 TARGETTING_MODE_FACTION_MASK = 128,
97 EQUIPPABLE_WEAPON = 1,
99 EQUIPPABLE_SHIELD = 4,
100 EQUIPPABLE_HELMET = 8,
101 EQUIPPABLE_RING = 16,
102 EQUIPPABLE_JEWEL = 32,
105 EQUIPABLE_BY_NOBODY = 0,
106 EQUIPABLE_BY_MAXIM = 1,
107 EQUIPABLE_BY_SELAN = 2,
108 EQUIPABLE_BY_GUY = 4,
109 EQUIPABLE_BY_ARTEA = 8,
110 EQUIPABLE_BY_TIA = 16,
111 EQUIPABLE_BY_DEKAR = 32,
112 EQUIPABLE_BY_LEXIS = 64,
115 PROPERTY_HAS_ITEM_EFFECT_STATUS = 1,
116 PROPERTY_HAS_ITEM_EFFECT_BATTLE = 2,
117 PROPERTY_HAS_WEAPON_EFFECT = 4,
118 PROPERTY_HAS_ARMOR_EFFECT = 8,
119 PROPERTY_INCREASE_ATP = 16,
120 PROPERTY_INCREASE_DFP = 32,
121 PROPERTY_INCREASE_STR = 64,
122 PROPERTY_INCREASE_AGL = 128,
123 PROPERTY_INCREASE_INT = 256,
124 PROPERTY_INCREASE_GUT = 512,
125 PROPERTY_INCREASE_MGR = 1024,
126 // PROPERTY_UNUSED = 2048,
127 // PROPERTY_UNUSED = 4096,
128 PROPERTY_HAS_BATTLE_ANIMATION = 8192,
129 // PROPERTY_UNKNOWN = 16384,
130 PROPERTY_HAS_IKARI_EFFECT = 32768,
134 graphics::Sprite *menuIcon;
135 graphics::Sprite *chestIcon;
141 Uint8 targettingMode;
149 #endif /* COMMON_ITEM_H_ */