2019-12-29 14:29:52 +00:00
|
|
|
#include "TestLibrary.hpp"
|
2020-07-04 13:50:30 +00:00
|
|
|
#include <Arbutils/StringView.hpp>
|
2020-02-27 17:59:15 +00:00
|
|
|
|
2020-01-02 17:02:40 +00:00
|
|
|
PkmnLib::Battling::BattleLibrary* TestLibrary::_library = nullptr;
|
2021-11-15 11:47:02 +00:00
|
|
|
PkmnLib::Library::SpeciesLibrary* TestLibrary::BuildSpeciesLibrary(CreatureLib::Library::TalentLibrary* talentLibrary) {
|
2020-01-05 14:18:30 +00:00
|
|
|
auto lib = new PkmnLib::Library::SpeciesLibrary();
|
2020-08-30 11:53:15 +00:00
|
|
|
lib->Insert("testSpecies"_cnc.GetHash(),
|
2020-02-27 17:59:15 +00:00
|
|
|
new PkmnLib::Library::PokemonSpecies(
|
|
|
|
1, "testSpecies"_cnc,
|
|
|
|
new PkmnLib::Library::PokemonForme(
|
2020-05-22 11:43:02 +00:00
|
|
|
"default"_cnc, 1.0f, 1.0f, 236, {0},
|
2021-11-15 11:47:02 +00:00
|
|
|
CreatureLib::Library::StatisticSet<uint16_t>(100, 100, 100, 100, 100, 100),
|
|
|
|
{talentLibrary->Get("testAbility"_cnc)}, {talentLibrary->Get("testHiddenAbility"_cnc)},
|
|
|
|
new PkmnLib::Library::LearnableMoves(100)),
|
2020-08-08 16:41:27 +00:00
|
|
|
0.5f, "testGrowthRate"_cnc, 100, 100, {"testEggGroup"_cnc}));
|
2020-08-30 11:53:15 +00:00
|
|
|
lib->Insert("testSpecies2"_cnc.GetHash(),
|
2020-02-27 17:59:15 +00:00
|
|
|
new PkmnLib::Library::PokemonSpecies(
|
|
|
|
2, "testSpecies2"_cnc,
|
|
|
|
new PkmnLib::Library::PokemonForme(
|
2020-05-22 11:43:02 +00:00
|
|
|
"default"_cnc, 1.0f, 1.0f, 306, {0},
|
2021-11-15 11:47:02 +00:00
|
|
|
CreatureLib::Library::StatisticSet<uint16_t>(100, 100, 100, 100, 100, 100),
|
|
|
|
{talentLibrary->Get("testAbility"_cnc)}, {talentLibrary->Get("testHiddenAbility"_cnc)},
|
|
|
|
new PkmnLib::Library::LearnableMoves(100)),
|
2020-08-08 16:41:27 +00:00
|
|
|
0.5f, "testGrowthRate"_cnc, 100, 100, {"testEggGroup"_cnc}));
|
2020-08-30 11:53:15 +00:00
|
|
|
lib->Insert("statTestSpecies1"_cnc.GetHash(),
|
2020-02-27 17:59:15 +00:00
|
|
|
new PkmnLib::Library::PokemonSpecies(
|
|
|
|
3, "statTestSpecies1"_cnc,
|
|
|
|
new PkmnLib::Library::PokemonForme(
|
2020-05-22 11:43:02 +00:00
|
|
|
"default"_cnc, 1.0f, 1.0f, 236, {0},
|
2021-11-15 11:47:02 +00:00
|
|
|
CreatureLib::Library::StatisticSet<uint16_t>(100, 100, 100, 100, 100, 100),
|
|
|
|
{talentLibrary->Get("testAbility"_cnc)}, {talentLibrary->Get("testHiddenAbility"_cnc)},
|
|
|
|
new PkmnLib::Library::LearnableMoves(100)),
|
2020-08-08 16:41:27 +00:00
|
|
|
0.5f, "testGrowthRate"_cnc, 100, 100, {"testEggGroup"_cnc}));
|
2020-08-30 11:53:15 +00:00
|
|
|
lib->Insert("testSpecies3"_cnc.GetHash(),
|
2020-02-27 17:59:15 +00:00
|
|
|
new PkmnLib::Library::PokemonSpecies(
|
2020-08-30 11:53:15 +00:00
|
|
|
4, "testSpecies3"_cnc,
|
2020-02-27 17:59:15 +00:00
|
|
|
new PkmnLib::Library::PokemonForme(
|
2020-05-22 11:43:02 +00:00
|
|
|
"default"_cnc, 1.0f, 1.0f, 236, {0, 4},
|
2021-11-15 11:47:02 +00:00
|
|
|
CreatureLib::Library::StatisticSet<uint16_t>(100, 100, 100, 100, 100, 100),
|
|
|
|
{talentLibrary->Get("testAbility"_cnc)}, {talentLibrary->Get("testHiddenAbility"_cnc)},
|
|
|
|
new PkmnLib::Library::LearnableMoves(100)),
|
2020-08-08 16:41:27 +00:00
|
|
|
0.5f, "testGrowthRate"_cnc, 100, 100, {"testEggGroup"_cnc}));
|
2020-01-05 14:18:30 +00:00
|
|
|
|
2021-08-28 10:04:18 +00:00
|
|
|
lib->Insert("testCharizard"_cnc.GetHash(),
|
|
|
|
new PkmnLib::Library::PokemonSpecies(
|
|
|
|
5, "testCharizard"_cnc,
|
|
|
|
new PkmnLib::Library::PokemonForme(
|
|
|
|
"default"_cnc, 1.7f, 90.5f, 240, {0, 4},
|
2021-11-15 11:47:02 +00:00
|
|
|
CreatureLib::Library::StatisticSet<uint16_t>(78, 84, 78, 109, 85, 100),
|
|
|
|
{talentLibrary->Get("testAbility"_cnc)}, {talentLibrary->Get("testHiddenAbility"_cnc)},
|
|
|
|
new PkmnLib::Library::LearnableMoves(100)),
|
2021-08-28 10:04:18 +00:00
|
|
|
0.5f, "testGrowthRate"_cnc, 100, 100, {"testEggGroup"_cnc}));
|
|
|
|
lib->Insert("testVenusaur"_cnc.GetHash(),
|
|
|
|
new PkmnLib::Library::PokemonSpecies(
|
|
|
|
6, "testVenusaur"_cnc,
|
|
|
|
new PkmnLib::Library::PokemonForme(
|
|
|
|
"default"_cnc, 2.0f, 100.0f, 236, {0, 4},
|
2021-11-15 11:47:02 +00:00
|
|
|
CreatureLib::Library::StatisticSet<uint16_t>(80, 82, 83, 100, 100, 80),
|
|
|
|
{talentLibrary->Get("testAbility"_cnc)}, {talentLibrary->Get("testHiddenAbility"_cnc)},
|
|
|
|
new PkmnLib::Library::LearnableMoves(100)),
|
2021-08-28 10:04:18 +00:00
|
|
|
0.5f, "testGrowthRate"_cnc, 100, 100, {"testEggGroup"_cnc}));
|
|
|
|
|
2020-01-05 14:18:30 +00:00
|
|
|
return lib;
|
|
|
|
}
|
2020-01-18 13:35:08 +00:00
|
|
|
PkmnLib::Library::MoveLibrary* TestLibrary::BuildMoveLibrary() {
|
|
|
|
auto lib = new PkmnLib::Library::MoveLibrary();
|
2020-04-10 12:57:20 +00:00
|
|
|
lib->Insert("testMove"_cnc.GetHash(),
|
2020-04-06 18:03:44 +00:00
|
|
|
new PkmnLib::Library::MoveData("testMove"_cnc, 0, PkmnLib::Library::MoveCategory::Physical, 50, 100, 20,
|
|
|
|
CreatureLib::Library::AttackTarget::Adjacent, 0,
|
2020-04-10 20:27:40 +00:00
|
|
|
new CreatureLib::Library::SecondaryEffect(), {}));
|
2020-04-10 12:57:20 +00:00
|
|
|
lib->Insert("testMove2"_cnc.GetHash(),
|
2020-04-06 18:03:44 +00:00
|
|
|
new PkmnLib::Library::MoveData("testMove2"_cnc, 0, PkmnLib::Library::MoveCategory::Special, 30, 100, 10,
|
|
|
|
CreatureLib::Library::AttackTarget::Adjacent, 0,
|
2020-04-10 20:27:40 +00:00
|
|
|
new CreatureLib::Library::SecondaryEffect(), {}));
|
2020-01-22 09:33:10 +00:00
|
|
|
return lib;
|
|
|
|
}
|
|
|
|
PkmnLib::Library::ItemLibrary* TestLibrary::BuildItemLibrary() {
|
|
|
|
auto lib = new PkmnLib::Library::ItemLibrary();
|
2020-08-30 11:53:15 +00:00
|
|
|
lib->Insert("testItem"_cnc.GetHash(),
|
|
|
|
new PkmnLib::Library::Item("testItem"_cnc, CreatureLib::Library::ItemCategory::MiscItem,
|
2021-03-07 16:09:30 +00:00
|
|
|
CreatureLib::Library::BattleItemCategory::None, 0, nullptr, {}, 0));
|
2020-01-18 13:35:08 +00:00
|
|
|
return lib;
|
|
|
|
}
|