Uint16 Gut() const { return gut; }
Uint16 MagicResistance() const { return magicResistance; }
+ common::Item *Weapon() { return weapon; }
+ common::Item *Armor() { return armor; }
+ common::Item *Shield() { return shield; }
+ common::Item *Helmet() { return helmet; }
+ common::Item *Ring() { return ring; }
+ common::Item *Jewel() { return jewel; }
+
const common::Item *Weapon() const { return weapon; }
const common::Item *Armor() const { return armor; }
const common::Item *Shield() const { return shield; }
void SetMana(Uint16 m) { mana = m; }
void SetIP(Uint8 i) { ip = i; }
- void SetWeapon(const common::Item *i) { weapon = i; }
- void SetArmor(const common::Item *i) { armor = i; }
- void SetShield(const common::Item *i) { shield = i; }
- void SetHelmet(const common::Item *i) { helmet = i; }
- void SetRing(const common::Item *i) { ring = i; }
- void SetJewel(const common::Item *i) { jewel = i; }
+ void SetWeapon(common::Item *i) { weapon = i; }
+ void SetArmor(common::Item *i) { armor = i; }
+ void SetShield(common::Item *i) { shield = i; }
+ void SetHelmet(common::Item *i) { helmet = i; }
+ void SetRing(common::Item *i) { ring = i; }
+ void SetJewel(common::Item *i) { jewel = i; }
void AddSpell(const common::Spell *s) { spells.push_back(s); }
const char *name;
graphics::Sprite *sprite;
- const common::Item *weapon;
- const common::Item *armor;
- const common::Item *shield;
- const common::Item *helmet;
- const common::Item *ring;
- const common::Item *jewel;
+ common::Item *weapon;
+ common::Item *armor;
+ common::Item *shield;
+ common::Item *helmet;
+ common::Item *ring;
+ common::Item *jewel;
graphics::Animation *meleeAnimation;
graphics::Animation *attackAnimation;
maxim.SetSpellAnimation(&maximSpellAnimation);
SDL_Surface *maximMeleeImg(IMG_Load("test-data/melee-maxim.png"));
Sprite maximMeleeSprite(maximMeleeImg, 96, 96);
- SimpleAnimation maximMeleeAnimation(&maximMeleeSprite, 30, 4);
+ SimpleAnimation maximMeleeAnimation(&maximMeleeSprite, 60, 4);
maxim.SetMeleeAnimation(&maximMeleeAnimation);
SDL_Surface *selanImg(IMG_Load("test-data/selan.png"));
selan.SetSpellAnimation(&selanSpellAnimation);
SDL_Surface *selanMeleeImg(IMG_Load("test-data/melee-selan.png"));
Sprite selanMeleeSprite(selanMeleeImg, 96, 96);
- SimpleAnimation selanMeleeAnimation(&selanMeleeSprite, 30, 4);
+ SimpleAnimation selanMeleeAnimation(&selanMeleeSprite, 60, 4);
selan.SetMeleeAnimation(&selanMeleeAnimation);
SDL_Surface *guyImg(IMG_Load("test-data/guy.png"));
guy.SetAttackAnimation(&guyAttackAnimation);
SDL_Surface *guyMeleeImg(IMG_Load("test-data/melee-guy.png"));
Sprite guyMeleeSprite(guyMeleeImg, 96, 96);
- SimpleAnimation guyMeleeAnimation(&guyMeleeSprite, 30, 4);
+ SimpleAnimation guyMeleeAnimation(&guyMeleeSprite, 60, 4);
guy.SetMeleeAnimation(&guyMeleeAnimation);
SDL_Surface *dekarImg(IMG_Load("test-data/dekar.png"));
dekar.SetSpellAnimation(&dekarSpellAnimation);
SDL_Surface *dekarMeleeImg(IMG_Load("test-data/melee-dekar.png"));
Sprite dekarMeleeSprite(dekarMeleeImg, 96, 96);
- SimpleAnimation dekarMeleeAnimation(&dekarMeleeSprite, 30, 4);
+ SimpleAnimation dekarMeleeAnimation(&dekarMeleeSprite, 60, 4);
dekar.SetMeleeAnimation(&dekarMeleeAnimation);
battle::Resources battleRes;
battleRes.itemMenuHeadline = "Please choose an item.";
battleRes.itemMenuPrototype = Menu<const common::Item *>(&normalFont, &disabledFont, &handCursorSprite, 15, 6, 8, 16, 1, 32, 2, ':');
+ SDL_Surface *swordAttackImg(IMG_Load("test-data/attack-sword.png"));
+ Sprite swordAttackSprite(swordAttackImg, 96, 96);
+ SimpleAnimation swordAttackAnimation(&swordAttackSprite, 60, 4);
+
Item zircoSword;
zircoSword.SetName("Zirco sword");
zircoSword.SetMenuIcon(&swordIcon);
firestorm.GetTargetingMode().TargetAllEnemies();
firestorm.SetPhysical();
zircoSword.SetIkari(&firestorm);
-// maxim.SetWeapon(&zircoSword);
+ zircoSword.SetAttackAnimation(&swordAttackAnimation);
+ maxim.SetWeapon(&zircoSword);
Item zirconArmor;
zirconArmor.SetName("Zircon armor");
zirconArmor.SetMenuIcon(&armorIcon);
thundershriek.GetTargetingMode().TargetAllEnemies();
thundershriek.SetPhysical();
zircoWhip.SetIkari(&thundershriek);
- selan.SetWeapon(&zircoWhip);
+// selan.SetWeapon(&zircoWhip);
Item zirconPlate;
zirconPlate.SetName("Zircon plate");
zirconPlate.SetMenuIcon(&armorIcon);
torrent.GetTargetingMode().TargetAllEnemies();
torrent.SetPhysical();
zircoAx.SetIkari(&torrent);
- guy.SetWeapon(&zircoAx);
+// guy.SetWeapon(&zircoAx);
guy.SetArmor(&zirconArmor);
Item megaShield;
megaShield.SetName("Mega shield");
dragonRush.GetTargetingMode().TargetSingleEnemy();
dragonRush.SetPhysical();
lizardBlow.SetIkari(&dragonRush);
- dekar.SetWeapon(&lizardBlow);
+// dekar.SetWeapon(&lizardBlow);
Item holyRobe;
holyRobe.SetName("Holy robe");
holyRobe.SetMenuIcon(&armorIcon);