Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#define CREATURELIB_STATISTICSET_HPP
|
||||
#include <exception>
|
||||
#include <stdint.h>
|
||||
#include "Exceptions/NotReachableException.hpp"
|
||||
#include "Exceptions/CreatureException.hpp"
|
||||
#include "Statistic.hpp"
|
||||
|
||||
namespace CreatureLib::Library {
|
||||
@@ -37,7 +37,7 @@ namespace CreatureLib::Library {
|
||||
case CreatureLib::Library::Statistic::MagicalAttack: return _magicalAttack;
|
||||
case CreatureLib::Library::Statistic::MagicalDefense: return _magicalDefense;
|
||||
case CreatureLib::Library::Statistic::Speed: return _speed;
|
||||
default: throw NotReachableException();
|
||||
default: NOT_REACHABLE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace CreatureLib::Library {
|
||||
case CreatureLib::Library::Statistic::MagicalAttack: _magicalAttack = value; break;
|
||||
case CreatureLib::Library::Statistic::MagicalDefense: _magicalDefense = value; break;
|
||||
case CreatureLib::Library::Statistic::Speed: _speed = value; break;
|
||||
default: throw NotReachableException();
|
||||
default: NOT_REACHABLE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace CreatureLib::Library {
|
||||
case CreatureLib::Library::Statistic::MagicalAttack: _magicalAttack += amount; break;
|
||||
case CreatureLib::Library::Statistic::MagicalDefense: _magicalDefense += amount; break;
|
||||
case CreatureLib::Library::Statistic::Speed: _speed += amount; break;
|
||||
default: throw NotReachableException();
|
||||
default: NOT_REACHABLE;
|
||||
}
|
||||
}
|
||||
inline void DecreaseStatBy(Statistic stat, T amount) {
|
||||
@@ -72,7 +72,7 @@ namespace CreatureLib::Library {
|
||||
case CreatureLib::Library::Statistic::MagicalAttack: _magicalAttack -= amount; break;
|
||||
case CreatureLib::Library::Statistic::MagicalDefense: _magicalDefense -= amount; break;
|
||||
case CreatureLib::Library::Statistic::Speed: _speed -= amount; break;
|
||||
default: throw NotReachableException();
|
||||
default: NOT_REACHABLE;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user