PkmnLib/CInterface/Library/Nature.cpp

20 lines
1014 B
C++
Raw Normal View History

2020-04-17 18:15:21 +00:00
#include "../../src/Library/Natures/Nature.hpp"
#include "../Core.hpp"
using namespace PkmnLib::Library;
2022-04-02 11:03:11 +00:00
export_func Nature* PkmnLib_Nature_Construct(CreatureLib::Library::Statistic increasedStat,
2020-04-28 12:48:56 +00:00
CreatureLib::Library::Statistic decreasedStat, float increasedModifier,
float decreasedModifier) {
2020-04-17 18:15:21 +00:00
return new Nature(increasedStat, decreasedStat, increasedModifier, decreasedModifier);
}
2022-04-02 11:03:11 +00:00
export_func void PkmnLib_Nature_Destruct(const Nature* p) { delete p; }
2020-04-17 18:15:21 +00:00
SIMPLE_GET_FUNC(Nature, GetIncreaseModifier, float)
SIMPLE_GET_FUNC(Nature, GetDecreaseModifier, float)
SIMPLE_GET_FUNC(Nature, GetIncreasedStat, CreatureLib::Library::Statistic)
SIMPLE_GET_FUNC(Nature, GetDecreasedStat, CreatureLib::Library::Statistic)
2022-04-02 11:03:11 +00:00
export_func float PkmnLib_Nature_GetStatModifier(const PkmnLib::Library::Nature* nature,
2020-05-02 14:19:24 +00:00
CreatureLib::Library::Statistic stat) {
return nature->GetStatModifier(stat);
2020-04-17 18:15:21 +00:00
}