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