6 #include "TargetingMode.h"
7 #include "../graphics/fwd.h"
16 static const int TYPE_ID = 303;
22 const char *Name() const { return name; }
24 bool IsMostUseful() const { return mostUseful; }
25 bool IsEquipable() const { return equipability; }
26 bool IsCursed() const { return cursed; }
27 bool IsFruit() const { return fruit; }
28 bool IsScenario() const { return scenario; }
29 bool CanSell() const { return !IsScenario(); }
30 bool CanDrop() const { return !IsScenario(); }
31 bool CanUseOnStatusScreen() const { return status; }
32 bool CanUseInBattle() const { return battle; }
34 TargetingMode &GetTargetingMode() { return targettingMode; }
35 const TargetingMode &GetTargetingMode() const { return targettingMode; }
37 bool HasMenuIcon() const { return menuIcon; }
38 const graphics::Sprite *MenuIcon() const { return menuIcon; }
39 bool HasChestIcon() const { return chestIcon; }
40 const graphics::Sprite *ChestIcon() const { return chestIcon; }
42 bool HasIkari() const { return ikari; }
43 const Ikari *GetIkari() const { return ikari; }
45 graphics::Animation *AttackAnimation() { return attackAnimation; }
46 const graphics::Animation *AttackAnimation() const { return attackAnimation; }
48 Uint16 Value() const { return value; }
50 bool EquipableAt(Hero::EquipSlot slot) const { return equipability & (1 << slot); }
52 int HeroMask() const { return heroMask; }
54 bool HasEffectOnStatusScreen() const { return properties & PROPERTY_HAS_EFFECT_STATUS; }
55 bool HasEffectInBattle() const { return properties & PROPERTY_HAS_EFFECT_BATTLE; }
56 bool HasWeaponEffect() const { return properties & PROPERTY_HAS_WEAPON_EFFECT; }
57 bool HasArmorEffect() const { return properties & PROPERTY_HAS_ARMOR_EFFECT; }
58 bool IncreasesATP() const { return properties & PROPERTY_INCREASE_ATP; }
59 bool IncreasesDFP() const { return properties & PROPERTY_INCREASE_DFP; }
60 bool IncreasesSTR() const { return properties & PROPERTY_INCREASE_STR; }
61 bool IncreasesAGL() const { return properties & PROPERTY_INCREASE_AGL; }
62 bool IncreasesINT() const { return properties & PROPERTY_INCREASE_INT; }
63 bool IncreasesGUT() const { return properties & PROPERTY_INCREASE_GUT; }
64 bool IncreasesMGR() const { return properties & PROPERTY_INCREASE_MGR; }
65 bool HasBattleAnimation() const { return properties & PROPERTY_HAS_BATTLE_ANIMATION; }
66 bool HasIkariEffect() const { return properties & PROPERTY_HAS_IKARI_EFFECT; }
68 static bool Less(const Item &, const Item &);
72 void SetName(const char *n) { name = n; }
73 void SetMenuIcon(const graphics::Sprite *icon) { menuIcon = icon; }
74 void SetUsableInBattle() { battle = true; }
75 void SetIkari(const Ikari *i) { ikari = i; }
76 void SetAttackAnimation(graphics::Animation *a) { attackAnimation = a; }
78 static void CreateTypeDescription();
79 static void Construct(void *);
83 PROPERTY_HAS_EFFECT_STATUS = 1,
84 PROPERTY_HAS_EFFECT_BATTLE = 2,
85 PROPERTY_HAS_WEAPON_EFFECT = 4,
86 PROPERTY_HAS_ARMOR_EFFECT = 8,
87 PROPERTY_INCREASE_ATP = 16,
88 PROPERTY_INCREASE_DFP = 32,
89 PROPERTY_INCREASE_STR = 64,
90 PROPERTY_INCREASE_AGL = 128,
91 PROPERTY_INCREASE_INT = 256,
92 PROPERTY_INCREASE_GUT = 512,
93 PROPERTY_INCREASE_MGR = 1024,
94 // PROPERTY_UNUSED = 2048,
95 // PROPERTY_UNUSED = 4096,
96 PROPERTY_HAS_BATTLE_ANIMATION = 8192,
97 // PROPERTY_UNKNOWN = 16384,
98 PROPERTY_HAS_IKARI_EFFECT = 32768,
103 const graphics::Sprite *menuIcon;
104 const graphics::Sprite *chestIcon;
106 graphics::Animation *attackAnimation;
111 TargetingMode targettingMode;
115 // TODO: turn these back into bits as soon as fields are implemented in the loader
127 #endif /* COMMON_ITEM_H_ */