12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- #pragma once
- #include "ItemType.h"
- #include "ItemSkill.h"
- #include "BasicTool.h"
- class HoeToolItemType : public BasicToolItemType
- {
- protected:
- void loadSuperItemSkill(
- ItemSkill* zSkill, Framework::StreamReader* zReader) const override;
- void saveSuperItemSkill(const ItemSkill* zSkill,
- Framework::StreamWriter* zWriter) const override;
- public:
- HoeToolItemType();
- Item* createItem() const override;
- ItemSkill* createDefaultItemSkill() const override;
- };
- class HoeToolLevelUpRule : public ItemSkillLevelUpRule
- {
- public:
- HoeToolLevelUpRule();
- void applyOn(ItemSkill* zSkill) override;
- };
- class HoeToolSkill : public ItemSkill
- {
- private:
- int level;
- float xp;
- float maxXP;
- int nextActionCounter;
- public:
- HoeToolSkill();
- bool use(Entity* zActor, Item* zUsedItem, Block* zTarget) override;
- bool use(Entity* zActor, Item* zUsedItem, Entity* zTarget) override;
- friend HoeToolItemType;
- friend HoeToolLevelUpRule;
- };
|