Rework CreatePokemon to not return a pointer to self every time, but return by value instead.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-04-22 14:41:20 +02:00
parent babb384166
commit b1442f25fb
5 changed files with 90 additions and 90 deletions

View File

@@ -11,7 +11,7 @@ TEST_CASE("Create and delete Pokemon") {
TEST_CASE("Get Nature from Pokemon") {
auto lib = TestLibrary::GetLibrary();
auto mon = PkmnLib::Battling::CreatePokemon(lib, "testSpecies"_cnc, 1).WithNature("neutralNature"_cnc)->Build();
auto mon = PkmnLib::Battling::CreatePokemon(lib, "testSpecies"_cnc, 1).WithNature("neutralNature"_cnc).Build();
auto nature = mon->GetNature();
REQUIRE(nature->GetDecreaseModifier() == 1);
REQUIRE(nature->GetIncreaseModifier() == 1);
@@ -23,9 +23,9 @@ TEST_CASE("Get Attack name from Pokemon") {
auto mon = PkmnLib::Battling::CreatePokemon(lib, "testSpecies"_cnc, 1)
.LearnMove(Arbutils::CaseInsensitiveConstString("testMove"),
CreatureLib::Battling::AttackLearnMethod::Level)
->LearnMove(Arbutils::CaseInsensitiveConstString("testMove2"),
.LearnMove(Arbutils::CaseInsensitiveConstString("testMove2"),
CreatureLib::Battling::AttackLearnMethod::Level)
->Build();
.Build();
auto move = mon->GetMoves()[0];
REQUIRE(move->GetMoveData()->GetName() == "testMove"_cnc);
auto move2 = mon->GetMoves()[1];