diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2008-03-09 22:52:34 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2008-03-09 22:52:34 +0000 |
commit | 16e99dc852affbc8b149d35037694dcdd25948e6 (patch) | |
tree | 2fed35187b803d595559b11b89118f7ef335d359 /src/resources/monsterinfo.h | |
parent | 4e2ced304a2013808b2481cceb7622848b073e5b (diff) | |
download | mana-16e99dc852affbc8b149d35037694dcdd25948e6.tar.gz mana-16e99dc852affbc8b149d35037694dcdd25948e6.tar.bz2 mana-16e99dc852affbc8b149d35037694dcdd25948e6.tar.xz mana-16e99dc852affbc8b149d35037694dcdd25948e6.zip |
Actions and particle effect for monster attacks are now obtained from the monster database. Added new tail attack animation to scorpion monster sprite.
Diffstat (limited to 'src/resources/monsterinfo.h')
-rw-r--r-- | src/resources/monsterinfo.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/resources/monsterinfo.h b/src/resources/monsterinfo.h index 3dd18c0f..840f37be 100644 --- a/src/resources/monsterinfo.h +++ b/src/resources/monsterinfo.h @@ -39,6 +39,12 @@ enum MonsterSoundEvent MONSTER_EVENT_DIE }; +struct MonsterAttack +{ + std::string particleEffect; + SpriteAction action; +}; + /** * Holds information about a certain type of monster. This includes the name * of the monster, the sprite to display and the sounds the monster makes. @@ -80,10 +86,12 @@ class MonsterInfo Being::TargetCursorSize getTargetCursorSize() const { return mTargetCursorSize; } - std::string + const std::string& getSound(MonsterSoundEvent event) const; - const std::string & + void addMonsterAttack (int id, const std::string &particleEffect, SpriteAction action); + + const std::string& getAttackParticleEffect(int attackType) const; SpriteAction @@ -96,6 +104,7 @@ class MonsterInfo std::string mSprite; Being::TargetCursorSize mTargetCursorSize; std::map<MonsterSoundEvent, std::vector<std::string>* > mSounds; + std::map<int, MonsterAttack*> mMonsterAttacks; }; #endif |