X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FMonster.h;h=0891a2d246c5f4451518e1312ba990317a5cdcf1;hb=9cfff98ffce0529c685fbd5aa52e213c295449a1;hp=50a18076d357dff9fc9050caee4fd078c809c1ee;hpb=9d5e525f2bd9035e9add815e287313d09c1bf0fd;p=l2e.git diff --git a/src/battle/Monster.h b/src/battle/Monster.h index 50a1807..0891a2d 100644 --- a/src/battle/Monster.h +++ b/src/battle/Monster.h @@ -9,10 +9,14 @@ #define BATTLE_MONSTER_H_ #include "Stats.h" +#include "../graphics/Animation.h" #include -namespace graphics { class Sprite; } +namespace common { class Item; } +namespace graphics { + class Sprite; +} namespace battle { @@ -42,12 +46,20 @@ public: Uint16 ExpReward() const { return expReward; } Uint16 GoldReward() const { return goldReward; } - const /* Item */ void *DropItem() const { return dropItem; } + const common::Item *DropItem() const { return dropItem; } Uint8 DropChance() const { return dropChance; } const /* Script */ void *AttackScript() { return attackScript; } const /* Script */ void *DefenseScript() { return defenseScript; } + graphics::AnimationRunner &GetAnimation() { return animation; } + const graphics::AnimationRunner &GetAnimation() const { return animation; } + void SetAnimation(const graphics::AnimationRunner &a) { animation = a; } + + const graphics::Animation *MeleeAnimation() const { return meleeAnimation; } + const graphics::Animation *AttackAnimation() const { return attackAnimation; } + const graphics::Animation *SpellAnimation() const { return spellAnimation; } + // temporary setters until loader is implemented public: void SetName(const char *n) { name = n; } @@ -60,13 +72,23 @@ public: void SetStats(const Stats &s) { stats = s; } void SetReward(Uint16 exp, Uint16 gold) { expReward = exp; goldReward = gold; } + void SetMeleeAnimation(const graphics::Animation *a) { meleeAnimation = a; } + void SetAttackAnimation(const graphics::Animation *a) { attackAnimation = a; } + void SetSpellAnimation(const graphics::Animation *a) { spellAnimation = a; } + private: const char *name; graphics::Sprite *sprite; - /* Item */ void *dropItem; + common::Item *dropItem; /* Script */ void *attackScript; /* Script */ void *defenseScript; + const graphics::Animation *meleeAnimation; + const graphics::Animation *attackAnimation; + const graphics::Animation *spellAnimation; + + graphics::AnimationRunner animation; + Uint16 maxHealth, health; Uint16 maxMana, mana;