Remove GetProperty macro, as it wasn't that intuitive, and caused issues later.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -3,28 +3,35 @@
|
||||
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
#include "../../GenericTemplates.hpp"
|
||||
#include "AttackCategory.hpp"
|
||||
#include "AttackTarget.hpp"
|
||||
|
||||
namespace CreatureLib::Library {
|
||||
class AttackData {
|
||||
GetProperty(std::string, Name);
|
||||
GetProperty(std::string, Type);
|
||||
GetProperty(AttackCategory, Category);
|
||||
GetProperty(uint8_t, BasePower);
|
||||
GetProperty(uint8_t, Accuracy);
|
||||
GetProperty(uint8_t, BaseUsages);
|
||||
GetProperty(AttackTarget, Target);
|
||||
GetProperty(uint8_t, Priority);
|
||||
|
||||
private:
|
||||
protected:
|
||||
const std::string _name;
|
||||
const std::string _type;
|
||||
AttackCategory _category;
|
||||
uint8_t _basePower;
|
||||
uint8_t _accuracy;
|
||||
uint8_t _baseUsages;
|
||||
AttackTarget _target;
|
||||
int8_t _priority;
|
||||
std::unordered_set<std::string> _flags;
|
||||
|
||||
public:
|
||||
AttackData(std::string name, std::string type, AttackCategory category, uint8_t power, uint8_t accuracy,
|
||||
uint8_t baseUsage, AttackTarget target, uint8_t priority, std::unordered_set<std::string> flags);
|
||||
|
||||
inline const std::string& GetName() const { return _name; }
|
||||
inline const std::string& GetType() const { return _type; }
|
||||
inline AttackCategory GetCategory() const { return _category; }
|
||||
inline uint8_t GetBasePower() const { return _basePower; }
|
||||
inline uint8_t GetAccuracy() const { return _accuracy; }
|
||||
inline uint8_t GetBaseUsages() const { return _baseUsages; }
|
||||
inline AttackTarget GetTarget() const { return _target; }
|
||||
inline int8_t GetPriority() const { return _priority; }
|
||||
|
||||
bool HasFlag(const std::string& key) const;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user