31 lines
945 B
C++
31 lines
945 B
C++
#ifndef CREATURELIB_LEARNEDATTACK_HPP
|
|
#define CREATURELIB_LEARNEDATTACK_HPP
|
|
|
|
#include "../../Library/Attacks/AttackData.hpp"
|
|
#include "AttackLearnMethod.hpp"
|
|
|
|
namespace CreatureLib::Battling {
|
|
class LearnedAttack {
|
|
const Library::AttackData* _attack;
|
|
uint8_t _maxUses;
|
|
uint8_t _remainingUses;
|
|
AttackLearnMethod _learnMethod;
|
|
|
|
public:
|
|
LearnedAttack(Library::AttackData* attack, uint8_t maxUses, AttackLearnMethod learnMethod);
|
|
LearnedAttack(const Library::AttackData* attack, AttackLearnMethod learnMethod);
|
|
|
|
const Library::AttackData* GetAttack() const;
|
|
uint8_t GetMaxUses() const;
|
|
uint8_t GetRemainingUses() const;
|
|
AttackLearnMethod GetLearnMethod() const;
|
|
|
|
bool TryUse(uint8_t uses);
|
|
void DecreaseUses(uint8_t amount);
|
|
void RestoreUses(uint8_t amount);
|
|
void RestoreUses();
|
|
};
|
|
}
|
|
|
|
#endif // CREATURELIB_LEARNEDATTACK_HPP
|