4 * Created on: Aug 10, 2012
8 #ifndef COMMON_SPELL_H_
9 #define COMMON_SPELL_H_
11 #include "HeroGroup.h"
12 #include "TargetingMode.h"
22 const char *Name() const { return name; }
23 Uint16 Value() const { return value; }
24 Uint8 Cost() const { return cost; }
26 bool CanUseOnStatusScreen() const { return usability & USABILITY_STATUS; }
27 bool CanUseInBattle() const { return usability & USABILITY_BATTLE; }
29 TargetingMode &GetTargetingMode() { return targetingMode; }
30 const TargetingMode &GetTargetingMode() const { return targetingMode; }
32 HeroGroup &UsableBy() { return usableBy; }
33 const HeroGroup &UsableBy() const { return usableBy; }
35 // TODO: add missing spell properties
39 void SetName(const char *n) { name = n; }
40 void SetCost(Uint8 c) { cost = c; }
41 void SetUsableInBattle() { usability |= USABILITY_BATTLE; }
45 // USABILITY_UNUSED = 1,
46 // USABILITY_UNUSED = 2,
47 // USABILITY_UNUSED = 4,
48 // USABILITY_UNUSED = 8,
49 // USABILITY_UNUSED = 16,
50 // USABILITY_UNUSED = 32,
51 USABILITY_STATUS = 64,
52 USABILITY_BATTLE = 128,
62 TargetingMode targetingMode;
69 #endif /* COMMON_SPELL_H_ */