CreatureLib/src/Library/Attacks/AttackData.hpp
Deukhoofd 9e0d8d76fb
All checks were successful
continuous-integration/drone/push Build is passing
Change GenericTemplates.cpp to GenericTemplates.hpp, as to include it in header files.
2019-12-26 12:27:54 +01:00

33 lines
1005 B
C++

#ifndef CREATURELIB_ATTACKDATA_HPP
#define CREATURELIB_ATTACKDATA_HPP
#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:
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);
bool HasFlag(const std::string& key) const;
};
}
#endif // CREATURELIB_ATTACKDATA_HPP