36 lines
1.2 KiB
C++
36 lines
1.2 KiB
C++
#ifndef CREATURELIB_STATISTICSET_HPP
|
|
#define CREATURELIB_STATISTICSET_HPP
|
|
#include <stdint.h>
|
|
#include "Statistic.hpp"
|
|
#include "../GenericTemplates.cpp"
|
|
|
|
namespace CreatureLib::Core{
|
|
class StatisticSet {
|
|
public:
|
|
StatisticSet(uint32_t health, uint32_t physicalAttack, uint32_t physicalDefense, uint32_t magicalAttack,
|
|
uint32_t magicalDefense, uint32_t speed);
|
|
|
|
GetSetProperty(uint32_t, Health)
|
|
GetSetProperty(uint32_t, PhysicalAttack)
|
|
GetSetProperty(uint32_t, PhysicalDefense)
|
|
GetSetProperty(uint32_t, MagicalAttack)
|
|
GetSetProperty(uint32_t, MagicalDefense)
|
|
GetSetProperty(uint32_t, Speed)
|
|
|
|
[[nodiscard]] inline uint32_t GetStat(Statistic stat) const{
|
|
switch (stat){
|
|
case Health: return __Health;
|
|
case PhysicalAttack: return __PhysicalAttack;
|
|
case PhysicalDefense: return __PhysicalDefense;
|
|
case MagicalAttack: return __MagicalAttack;
|
|
case MagicalDefense: return __MagicalDefense;
|
|
case Speed: return __Speed;
|
|
}
|
|
throw std::exception();
|
|
}
|
|
};
|
|
}
|
|
|
|
|
|
#endif //CREATURELIB_STATISTICSET_HPP
|