PkmnLib/tests/TestLibrary/TestLibrary.cpp

58 lines
3.3 KiB
C++
Raw Normal View History

2019-12-29 14:29:52 +00:00
#include "TestLibrary.hpp"
#include <Arbutils/ConstString.hpp>
PkmnLib::Battling::BattleLibrary* TestLibrary::_library = nullptr;
2020-01-05 14:18:30 +00:00
PkmnLib::Library::SpeciesLibrary* TestLibrary::BuildSpeciesLibrary() {
auto lib = new PkmnLib::Library::SpeciesLibrary();
lib->Insert("testSpecies"_cnc,
new PkmnLib::Library::PokemonSpecies(
1, "testSpecies"_cnc,
new PkmnLib::Library::PokemonForme(
"default", 1.0f, 1.0f, 100, {0},
CreatureLib::Core::StatisticSet<uint16_t>(100, 100, 100, 100, 100, 100), {"testAbility"},
{"testHiddenAbility"}, new CreatureLib::Library::LearnableAttacks(100)),
0.5f, "testGrowthRate"_cnc, 100, 100));
lib->Insert("testSpecies2"_cnc,
new PkmnLib::Library::PokemonSpecies(
2, "testSpecies2"_cnc,
new PkmnLib::Library::PokemonForme(
"default", 1.0f, 1.0f, 100, {0},
CreatureLib::Core::StatisticSet<uint16_t>(100, 100, 100, 100, 100, 100), {"testAbility"},
{"testHiddenAbility"}, new CreatureLib::Library::LearnableAttacks(100)),
0.5f, "testGrowthRate"_cnc, 100, 100));
lib->Insert("statTestSpecies1"_cnc,
new PkmnLib::Library::PokemonSpecies(
3, "statTestSpecies1"_cnc,
new PkmnLib::Library::PokemonForme(
"default", 1.0f, 1.0f, 100, {0},
CreatureLib::Core::StatisticSet<uint16_t>(100, 100, 100, 100, 100, 100), {"testAbility"},
{"testHiddenAbility"}, new CreatureLib::Library::LearnableAttacks(100)),
0.5f, "testGrowthRate"_cnc, 100, 100));
lib->Insert("testSpecies3"_cnc,
new PkmnLib::Library::PokemonSpecies(
2, "testSpecies3"_cnc,
new PkmnLib::Library::PokemonForme(
"default", 1.0f, 1.0f, 100, {0, 4},
CreatureLib::Core::StatisticSet<uint16_t>(100, 100, 100, 100, 100, 100), {"testAbility"},
{"testHiddenAbility"}, new CreatureLib::Library::LearnableAttacks(100)),
0.5f, "testGrowthRate"_cnc, 100, 100));
2020-01-05 14:18:30 +00:00
return lib;
}
PkmnLib::Library::MoveLibrary* TestLibrary::BuildMoveLibrary() {
auto lib = new PkmnLib::Library::MoveLibrary();
lib->Insert("testMove"_cnc,
new PkmnLib::Library::MoveData("testMove", 0, PkmnLib::Library::MoveCategory::Physical, 50, 100, 20,
CreatureLib::Library::AttackTarget::Adjacent, 0, {}));
lib->Insert("testMove2"_cnc,
new PkmnLib::Library::MoveData("testMove2", 0, PkmnLib::Library::MoveCategory::Special, 30, 100, 10,
CreatureLib::Library::AttackTarget::Adjacent, 0, {}));
return lib;
}
PkmnLib::Library::ItemLibrary* TestLibrary::BuildItemLibrary() {
auto lib = new PkmnLib::Library::ItemLibrary();
lib->Insert("testItem"_cnc, new PkmnLib::Library::Item("testItem"_cnc, CreatureLib::Library::ItemCategory::MiscItem,
CreatureLib::Library::BattleItemCategory::None, 0, {}, 0));
return lib;
}