bool HasRing() const { return ring; }
bool HasJewel() const { return jewel; }
+ int AttackFrames() const { return attackFrames; }
+ int SpellFrames() const { return spellFrames; }
+
// temporary setters until loader is implemented
public:
void SetName(const char *n) { name = n; }
void AddSpell(const common::Spell *s) { spells.push_back(s); }
+ void SetAttackFrames(int num) { attackFrames = num; }
+ void SetSpellFrames(int num) { spellFrames = num; }
+
private:
const char *name;
graphics::Sprite *sprite;
// TODO: vector does not seem to be a good choice
std::vector<const common::Spell *> spells;
- // TODO: equipment list
+
+ int attackFrames;
+ int spellFrames;
Uint16 maxHealth, health;
Uint16 maxMana, mana;
maxim.SetMaxMana(20);
maxim.SetMana(20);
maxim.SetIP(0);
+ maxim.SetAttackFrames(3);
+ maxim.SetSpellFrames(2);
SDL_Surface *selanImg(IMG_Load("test-data/selan.png"));
Sprite selanSprite(selanImg, 64, 64);
selan.SetMaxMana(23);
selan.SetMana(23);
selan.SetIP(1);
+ selan.SetAttackFrames(3);
+ selan.SetSpellFrames(4);
SDL_Surface *guyImg(IMG_Load("test-data/guy.png"));
Sprite guySprite(guyImg, 64, 64);
guy.SetMaxMana(0);
guy.SetMana(0);
guy.SetIP(254);
+ guy.SetAttackFrames(3);
+ guy.SetSpellFrames(0);
SDL_Surface *dekarImg(IMG_Load("test-data/dekar.png"));
Sprite dekarSprite(dekarImg, 64, 64);
dekar.SetMaxMana(0);
dekar.SetMana(0);
dekar.SetIP(255);
+ dekar.SetAttackFrames(3);
+ dekar.SetSpellFrames(3);
battle::Resources battleRes;