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;
|
2019-10-23 17:21:21 +00:00
|
|
|
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);
|
2019-10-23 17:21:21 +00:00
|
|
|
|
|
|
|
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
|