13 #include "TargetingMode.h"
22 static const int TYPE_ID = 303;
28 const char *Name() const { return name; }
30 bool IsMostUseful() const { return mostUseful; }
31 bool IsEquipable() const { return equipability; }
32 bool IsCursed() const { return cursed; }
33 bool IsFruit() const { return fruit; }
34 bool IsScenario() const { return scenario; }
35 bool CanSell() const { return !IsScenario(); }
36 bool CanDrop() const { return !IsScenario(); }
37 bool CanUseOnStatusScreen() const { return status; }
38 bool CanUseInBattle() const { return 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 graphics::Animation *AttackAnimation() { return attackAnimation; }
52 const graphics::Animation *AttackAnimation() const { return attackAnimation; }
54 Uint16 Value() const { return value; }
56 bool EquipableAt(Hero::EquipSlot slot) const { return equipability & (1 << slot); }
58 int HeroMask() const { return heroMask; }
60 bool HasEffectOnStatusScreen() const { return properties & PROPERTY_HAS_EFFECT_STATUS; }
61 bool HasEffectInBattle() const { return properties & PROPERTY_HAS_EFFECT_BATTLE; }
62 bool HasWeaponEffect() const { return properties & PROPERTY_HAS_WEAPON_EFFECT; }
63 bool HasArmorEffect() const { return properties & PROPERTY_HAS_ARMOR_EFFECT; }
64 bool IncreasesATP() const { return properties & PROPERTY_INCREASE_ATP; }
65 bool IncreasesDFP() const { return properties & PROPERTY_INCREASE_DFP; }
66 bool IncreasesSTR() const { return properties & PROPERTY_INCREASE_STR; }
67 bool IncreasesAGL() const { return properties & PROPERTY_INCREASE_AGL; }
68 bool IncreasesINT() const { return properties & PROPERTY_INCREASE_INT; }
69 bool IncreasesGUT() const { return properties & PROPERTY_INCREASE_GUT; }
70 bool IncreasesMGR() const { return properties & PROPERTY_INCREASE_MGR; }
71 bool HasBattleAnimation() const { return properties & PROPERTY_HAS_BATTLE_ANIMATION; }
72 bool HasIkariEffect() const { return properties & PROPERTY_HAS_IKARI_EFFECT; }
74 static bool Less(const Item &, const Item &);
78 void SetName(const char *n) { name = n; }
79 void SetMenuIcon(const graphics::Sprite *icon) { menuIcon = icon; }
80 void SetUsableInBattle() { battle = true; }
81 void SetIkari(const Ikari *i) { ikari = i; }
82 void SetAttackAnimation(graphics::Animation *a) { attackAnimation = a; }
84 static void CreateTypeDescription();
85 static void Construct(void *);
89 PROPERTY_HAS_EFFECT_STATUS = 1,
90 PROPERTY_HAS_EFFECT_BATTLE = 2,
91 PROPERTY_HAS_WEAPON_EFFECT = 4,
92 PROPERTY_HAS_ARMOR_EFFECT = 8,
93 PROPERTY_INCREASE_ATP = 16,
94 PROPERTY_INCREASE_DFP = 32,
95 PROPERTY_INCREASE_STR = 64,
96 PROPERTY_INCREASE_AGL = 128,
97 PROPERTY_INCREASE_INT = 256,
98 PROPERTY_INCREASE_GUT = 512,
99 PROPERTY_INCREASE_MGR = 1024,
100 // PROPERTY_UNUSED = 2048,
101 // PROPERTY_UNUSED = 4096,
102 PROPERTY_HAS_BATTLE_ANIMATION = 8192,
103 // PROPERTY_UNKNOWN = 16384,
104 PROPERTY_HAS_IKARI_EFFECT = 32768,
109 const graphics::Sprite *menuIcon;
110 const graphics::Sprite *chestIcon;
112 graphics::Animation *attackAnimation;
117 TargetingMode targettingMode;
121 // TODO: turn these back into bits as soon as fields are implemented in the loader