class Spell {
+public:
+ static const int TYPE_ID = 304;
+
public:
Spell();
Uint16 Value() const { return value; }
Uint8 Cost() const { return cost; }
- bool CanUseOnStatusScreen() const { return usability & USABILITY_STATUS; }
- bool CanUseInBattle() const { return usability & USABILITY_BATTLE; }
+ bool CanUseOnStatusScreen() const { return status; }
+ bool CanUseInBattle() const { return battle; }
TargetingMode &GetTargetingMode() { return targetingMode; }
const TargetingMode &GetTargetingMode() const { return targetingMode; }
HeroGroup &UsableBy() { return usableBy; }
const HeroGroup &UsableBy() const { return usableBy; }
+ static bool Less(const Spell *, const Spell *);
+
// temporary setters
public:
void SetName(const char *n) { name = n; }
void SetCost(Uint8 c) { cost = c; }
- void SetUsableInBattle() { usability |= USABILITY_BATTLE; }
+ void SetUsableInBattle() { battle = true; }
static void CreateTypeDescription();
static void Construct(void *);
-private:
- enum Usability {
- // USABILITY_UNUSED = 1,
- // USABILITY_UNUSED = 2,
- // USABILITY_UNUSED = 4,
- // USABILITY_UNUSED = 8,
- // USABILITY_UNUSED = 16,
- // USABILITY_UNUSED = 32,
- USABILITY_STATUS = 64,
- USABILITY_BATTLE = 128,
- };
-
private:
const char *name;
int value;
int cost;
- Uint8 usability;
TargetingMode targetingMode;
HeroGroup usableBy;
+ bool status;
+ bool battle;
+
};
}