From c3c8be14f8fc8ed8741da0576ac7fec80312817a Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Sun, 4 Aug 2024 07:16:21 -0500 Subject: [PATCH] Include unequipping checks for enchant unit test. Removing items should update the player's active enchant list. --- Adventures in Lestoria Tests/PlayerTests.cpp | 19 +++++++++++++++++++ Adventures in Lestoria/Version.h | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Adventures in Lestoria Tests/PlayerTests.cpp b/Adventures in Lestoria Tests/PlayerTests.cpp index 24547493..0498e1d7 100644 --- a/Adventures in Lestoria Tests/PlayerTests.cpp +++ b/Adventures in Lestoria Tests/PlayerTests.cpp @@ -650,6 +650,25 @@ namespace PlayerTests Assert::IsTrue(player->HasEnchant("Attack Boost")); woodenSword.lock()->EnchantItem("Mana Pool"); Assert::IsTrue(player->HasEnchant("Mana Pool")); + + Inventory::UnequipItem(EquipSlot::HELMET); + Inventory::UnequipItem(EquipSlot::ARMOR); + Inventory::UnequipItem(EquipSlot::PANTS); + Inventory::UnequipItem(EquipSlot::GLOVES); + Inventory::UnequipItem(EquipSlot::SHOES); + Inventory::UnequipItem(EquipSlot::WEAPON); + Inventory::UnequipItem(EquipSlot::RING1); + Inventory::UnequipItem(EquipSlot::RING2); + + Assert::IsFalse(player->HasEnchant("Emergency Recovery")); + Assert::IsFalse(player->HasEnchant("Reaper of Souls")); + Assert::IsFalse(player->HasEnchant("Attack Boost")); + Assert::IsFalse(player->HasEnchant("Wizard's Soul")); + Assert::IsFalse(player->HasEnchant("Ability Haste")); + Assert::IsFalse(player->HasEnchant("Improved Ground Slam")); + Assert::IsFalse(player->HasEnchant("Battle Shout")); + Assert::IsFalse(player->HasEnchant("Attack Boost")); + Assert::IsFalse(player->HasEnchant("Mana Pool")); } }; } \ No newline at end of file diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 29603b5a..e7b53b10 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 1 #define VERSION_MINOR 2 #define VERSION_PATCH 3 -#define VERSION_BUILD 10527 +#define VERSION_BUILD 10528 #define stringify(a) stringify_(a) #define stringify_(a) #a