Hoe.h 992 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #pragma once
  2. #include "ItemType.h"
  3. #include "ItemSkill.h"
  4. #include "BasicTool.h"
  5. class HoeToolItemType : public BasicToolItemType
  6. {
  7. protected:
  8. void loadSuperItemSkill(
  9. ItemSkill* zSkill, Framework::StreamReader* zReader) const override;
  10. void saveSuperItemSkill(const ItemSkill* zSkill,
  11. Framework::StreamWriter* zWriter) const override;
  12. public:
  13. HoeToolItemType();
  14. Item* createItem() const override;
  15. ItemSkill* createDefaultItemSkill() const override;
  16. };
  17. class HoeToolLevelUpRule : public ItemSkillLevelUpRule
  18. {
  19. public:
  20. HoeToolLevelUpRule();
  21. void applyOn(ItemSkill* zSkill) override;
  22. };
  23. class HoeToolSkill : public ItemSkill
  24. {
  25. private:
  26. int level;
  27. float xp;
  28. float maxXP;
  29. int nextActionCounter;
  30. public:
  31. HoeToolSkill();
  32. void use(Entity* zActor, Item* zUsedItem, Block* zTarget) override;
  33. void use(Entity* zActor, Item* zUsedItem, Entity* zTarget) override;
  34. friend HoeToolItemType;
  35. friend HoeToolLevelUpRule;
  36. };