Fix changing stat falling through enum and throwing exception.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2020-01-05 14:25:48 +01:00
parent 568232c7a5
commit f9494d4c38
2 changed files with 14 additions and 7 deletions

View File

@@ -38,4 +38,12 @@ TEST_CASE("Get creature nickname when unset", "[Library]") {
delete creature;
}
TEST_CASE("Increase creature stat boost", "[Library]") {
auto library = TestLibrary::Get();
auto creature = CreateCreature(library, "testSpecies1", 1).Create();
creature->ChangeStatBoost(CreatureLib::Core::Statistic::PhysicalAttack, 6);
REQUIRE(creature->GetStatBoost(CreatureLib::Core::Statistic::PhysicalAttack) == 6);
delete creature;
}
#endif