1 #ifndef COMMON_STATS_H_
2 #define COMMON_STATS_H_
11 static const int TYPE_ID = 305;
15 Stats(Uint16 attack, Uint16 defense, Uint16 strength, Uint16 agility, Uint16 intelligence, Uint8 gut, Uint16 magicResistance);
18 Uint16 Attack() const { return attack; }
19 Uint16 Defense() const { return defense; }
20 Uint16 Strength() const { return strength; }
21 Uint16 Agility() const { return agility; }
22 Uint16 Intelligence() const { return intelligence; }
23 Uint8 Gut() const { return gut; }
24 Uint16 MagicResistance() const { return magicResistance; }
26 void SetAttack(Uint16 a) { attack = a; }
27 void SetDefense(Uint16 d) { defense = d; }
28 void SetStrength(Uint16 s) { strength = s; }
29 void SetAgility(Uint16 a) { agility = a; }
30 void SetIntelligence(Uint16 i) { intelligence = i; }
31 void SetGut(Uint8 g) { gut = g; }
32 void SetMagicResistance(Uint16 m) { magicResistance = m; }
34 static void CreateTypeDescription();
35 static void Construct(void *);
49 inline Stats operator +(const Stats &lhs, const Stats &rhs) {
51 lhs.Attack() + rhs.Attack(),
52 lhs.Defense() + rhs.Defense(),
53 lhs.Strength() + rhs.Strength(),
54 lhs.Agility() + rhs.Agility(),
55 lhs.Intelligence() + rhs.Intelligence(),
56 lhs.Gut() + rhs.Gut(),
57 lhs.MagicResistance() + rhs.MagicResistance());