|
|
|
@ -387,13 +387,13 @@ namespace EnchantTests |
|
|
|
|
testGame->OnUserUpdate(3.5f); |
|
|
|
|
player->Hurt(5,player->OnUpperLevel(),player->GetZ()); |
|
|
|
|
player->ConsumeMana(10); |
|
|
|
|
player->GetRightClickAbility().cooldown=player->GetAbility1().cooldown=player->GetAbility2().cooldown=player->GetAbility3().cooldown=player->GetAbility4().cooldown=0.4f; |
|
|
|
|
player->GetRightClickAbility().cooldown=player->GetAbility1().cooldown=player->GetAbility2().cooldown=player->GetAbility3().cooldown=player->GetAbility4().cooldown=1.5f; |
|
|
|
|
for(int i:std::ranges::iota_view(0,2)){ |
|
|
|
|
testGame->SetElapsedTime(0.001f); |
|
|
|
|
testGame->OnUserUpdate(0.001f); |
|
|
|
|
testGame->SetElapsedTime(0.5f); |
|
|
|
|
testGame->OnUserUpdate(0.5f); |
|
|
|
|
} |
|
|
|
|
Assert::AreEqual(98,player->GetHealth(),L"Player should have healed for 3 health from contacting the soul."); |
|
|
|
|
Assert::AreEqual(92,player->GetMana(),L"Player should have gained 2 mana from contacting the soul."); |
|
|
|
|
Assert::AreEqual(97,player->GetMana(),L"Player should have gained 2 mana from contacting the soul."); |
|
|
|
|
Assert::AreEqual(0.f,player->GetRightClickAbility().cooldown,L"Player's ability cooldowns should reduce from contacting the soul."); |
|
|
|
|
Assert::AreEqual(0.f,player->GetAbility1().cooldown,L"Player's ability cooldowns should reduce from contacting the soul."); |
|
|
|
|
Assert::AreEqual(0.f,player->GetAbility2().cooldown,L"Player's ability cooldowns should reduce from contacting the soul."); |
|
|
|
|