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; }
37 void SetName(const char *n) { name = n; }
38 void SetCost(Uint8 c) { cost = c; }
39 void SetUsableInBattle() { usability |= USABILITY_BATTLE; }
41 static void CreateTypeDescription();
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_ */