Add easy to use macro to generate enum helper functions for parsing, stringifying and iteration.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -2,9 +2,10 @@
|
||||
#define CREATURELIB_ATTACKCATEGORY_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include "../../Core/Enum.hpp"
|
||||
|
||||
namespace CreatureLib::Library {
|
||||
enum class AttackCategory : uint8_t { Physical, Magical, Status };
|
||||
ENUM(AttackCategory, uint8_t, Physical, Magical, Status)
|
||||
}
|
||||
|
||||
#endif // CREATURELIB_ATTACKCATEGORY_HPP
|
||||
|
||||
@@ -2,25 +2,16 @@
|
||||
#define CREATURELIB_ATTACKTARGET_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include "../../Core/Enum.hpp"
|
||||
|
||||
namespace CreatureLib::Library {
|
||||
enum class AttackTarget : uint8_t {
|
||||
Adjacent,
|
||||
AdjacentAlly,
|
||||
AdjacentAllySelf,
|
||||
AdjacentOpponent,
|
||||
ENUM(AttackTarget, uint8_t, Adjacent, AdjacentAlly, AdjacentAllySelf, AdjacentOpponent,
|
||||
|
||||
All,
|
||||
AllAdjacent,
|
||||
AllAdjacentOpponent,
|
||||
AllAlly,
|
||||
AllOpponent,
|
||||
All, AllAdjacent, AllAdjacentOpponent, AllAlly, AllOpponent,
|
||||
|
||||
Any,
|
||||
Any,
|
||||
|
||||
RandomOpponent,
|
||||
Self,
|
||||
};
|
||||
RandomOpponent, Self)
|
||||
}
|
||||
|
||||
#endif // CREATURELIB_ATTACKTARGET_HPP
|
||||
|
||||
Reference in New Issue
Block a user