X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcommon%2FCapsule.h;fp=src%2Fcommon%2FCapsule.h;h=575a40cf78e67032d5504d6860627a891702edc1;hb=11cf419b542070def1d0edaa69d2389ab1ab427b;hp=0000000000000000000000000000000000000000;hpb=2255d436a0c2acc10b015827366a72b2ece86094;p=l2e.git diff --git a/src/common/Capsule.h b/src/common/Capsule.h new file mode 100644 index 0000000..575a40c --- /dev/null +++ b/src/common/Capsule.h @@ -0,0 +1,89 @@ +#ifndef COMMON_CAPSULE_H_ +#define COMMON_CAPSULE_H_ + +namespace graphics { + class Animation; + class Sprite; +} + +#include "../common/Stats.h" + +#include + +namespace common { + +class Spell; + +class Capsule { + +public: + static const int TYPE_ID = 307; + +public: + Capsule(); + + const char *Name() const { return name; } + const char *Alignment() const { return alignment; } + + Uint16 MaxHealth() const; + + Stats GetStats(); + + Uint8 Level() const { return level; } + int Experience() const { return experience; } + int NextLevel() const; + + graphics::Sprite *BattleSprite(); + const graphics::Sprite *BattleSprite() const; + graphics::Animation *MeleeAnimation(); + graphics::Animation *AttackAnimation(); + graphics::Animation *SpellAnimation(); + + static void CreateTypeDescription(); + static void Construct(void *); + +private: + struct Class { + static const int TYPE_ID = 308; + + Class(); + + static void CreateTypeDescription(); + static void Construct(void *); + + const char *name; + const char *tribe; + Spell *attacks[3]; + graphics::Sprite *battleSprite; + graphics::Animation *meleeAnimation; + graphics::Animation *attackAnimation; + graphics::Animation *spellAnimation; + + int healthBoost; + Stats statBoost; + }; + + Class &GetClass(); + const Class &GetClass() const; + + const char *name; + const char *alignment; + + int maxHealth; + + Stats stats; + + int level; + int experience; + + int *levelLadder; + int numLevels; + + Class *classes; + int numClasses, curClass, maxClass; + +}; + +} + +#endif /* COMMON_CAPSULE_H_ */