1 #ifndef COMMON_STATS_H_
2 #define COMMON_STATS_H_
16 static const int TYPE_ID = 305;
20 Stats(Uint16 attack, Uint16 defense, Uint16 strength, Uint16 agility, Uint16 intelligence, Uint8 gut, Uint16 magicResistance);
23 Uint16 Attack() const { return attack; }
24 Uint16 Defense() const { return defense; }
25 Uint16 Strength() const { return strength; }
26 Uint16 Agility() const { return agility; }
27 Uint16 Intelligence() const { return intelligence; }
28 Uint8 Gut() const { return gut; }
29 Uint16 MagicResistance() const { return magicResistance; }
31 void SetAttack(Uint16 a) { attack = a; }
32 void SetDefense(Uint16 d) { defense = d; }
33 void SetStrength(Uint16 s) { strength = s; }
34 void SetAgility(Uint16 a) { agility = a; }
35 void SetIntelligence(Uint16 i) { intelligence = i; }
36 void SetGut(Uint8 g) { gut = g; }
37 void SetMagicResistance(Uint16 m) { magicResistance = m; }
39 static void CreateTypeDescription();
40 static void Construct(void *);
43 Stats &operator +=(const Stats &other) {
44 attack += other.attack;
45 defense += other.defense;
46 strength += other.strength;
47 agility += other.agility;
48 intelligence += other.intelligence;
49 magicResistance += other.magicResistance;
55 static void AddFields(loader::TypeDescription &, const Stats &, std::ptrdiff_t offset);
69 inline Stats operator +(const Stats &lhs, const Stats &rhs) {