CreatureLib/src/Library/Living/LearnedAttack.hpp

30 lines
815 B
C++
Raw Normal View History

2019-10-23 16:57:50 +00:00
#ifndef CREATURELIB_LEARNEDATTACK_HPP
#define CREATURELIB_LEARNEDATTACK_HPP
#include "../Attacks/AttackData.hpp"
2019-10-24 09:04:19 +00:00
#include "AttackLearnMethod.hpp"
2019-10-23 16:57:50 +00:00
namespace CreatureLib::Library{
class LearnedAttack {
const AttackData* _attack;
uint8_t _maxUses;
uint8_t _remainingUses;
2019-10-24 09:04:19 +00:00
AttackLearnMethod _learnMethod;
2019-10-23 16:57:50 +00:00
public:
2019-10-24 09:04:19 +00:00
LearnedAttack(AttackData* attack, uint8_t maxUses, AttackLearnMethod learnMethod);
const AttackData* GetAttack() const;
uint8_t GetMaxUses() const;
uint8_t GetRemainingUses() const;
2019-10-24 09:04:19 +00:00
AttackLearnMethod GetLearnMethod() const;
bool TryUse(uint8_t uses);
void DecreaseUses(uint8_t amount);
void RestoreUses(uint8_t amount);
void RestoreUses();
2019-10-23 16:57:50 +00:00
};
}
#endif //CREATURELIB_LEARNEDATTACK_HPP