|
|
@ -875,5 +875,36 @@ namespace EnchantTests |
|
|
|
Assert::AreEqual(1.4f,newMonster.GetMoveSpdMult(),L"Move Spd Multiplier should be reduced by 30%"); |
|
|
|
Assert::AreEqual(1.4f,newMonster.GetMoveSpdMult(),L"Move Spd Multiplier should be reduced by 30%"); |
|
|
|
Assert::AreEqual(8,newMonster.GetAttack(),L"Monster Attack damage should be reduced."); |
|
|
|
Assert::AreEqual(8,newMonster.GetAttack(),L"Monster Attack damage should be reduced."); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
TEST_METHOD(LongLastingMarkNoEnchantCheck){ |
|
|
|
|
|
|
|
testKey->bHeld=true; //Force the key to be held down for testing purposes.
|
|
|
|
|
|
|
|
game->ChangePlayerClass(TRAPPER); |
|
|
|
|
|
|
|
player=game->GetPlayer(); |
|
|
|
|
|
|
|
Monster&newMonster{game->SpawnMonster({},MONSTER_DATA["TestName"])}; |
|
|
|
|
|
|
|
game->SetElapsedTime(0.01f); |
|
|
|
|
|
|
|
game->OnUserUpdate(0.01f); |
|
|
|
|
|
|
|
player->_ForceCastSpell(player->GetAbility1()); |
|
|
|
|
|
|
|
game->SetElapsedTime("Trapper.Ability 1.Precast Time"_F); |
|
|
|
|
|
|
|
game->OnUserUpdate("Trapper.Ability 1.Precast Time"_F); |
|
|
|
|
|
|
|
game->SetElapsedTime(0.f); |
|
|
|
|
|
|
|
game->OnUserUpdate(0.f); |
|
|
|
|
|
|
|
Assert::AreEqual(7.f,newMonster.GetBuffs(BuffType::TRAPPER_MARK)[0].duration,L"Mark duration is unaffected."); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
TEST_METHOD(LongLastingMarkEnchantCheck){ |
|
|
|
|
|
|
|
testKey->bHeld=true; //Force the key to be held down for testing purposes.
|
|
|
|
|
|
|
|
game->ChangePlayerClass(TRAPPER); |
|
|
|
|
|
|
|
player=game->GetPlayer(); |
|
|
|
|
|
|
|
std::weak_ptr<Item>nullRing{Inventory::AddItem("Null Ring"s)}; |
|
|
|
|
|
|
|
Inventory::EquipItem(nullRing,EquipSlot::RING1); |
|
|
|
|
|
|
|
nullRing.lock()->EnchantItem("Long-Lasting Mark"); |
|
|
|
|
|
|
|
Monster&newMonster{game->SpawnMonster({},MONSTER_DATA["TestName"])}; |
|
|
|
|
|
|
|
game->SetElapsedTime(0.01f); |
|
|
|
|
|
|
|
game->OnUserUpdate(0.01f); |
|
|
|
|
|
|
|
player->_ForceCastSpell(player->GetAbility1()); |
|
|
|
|
|
|
|
game->SetElapsedTime("Trapper.Ability 1.Precast Time"_F); |
|
|
|
|
|
|
|
game->OnUserUpdate("Trapper.Ability 1.Precast Time"_F); |
|
|
|
|
|
|
|
game->SetElapsedTime(0.f); //Wait for mark lock-on
|
|
|
|
|
|
|
|
game->OnUserUpdate(0.f); //Wait for mark lock-on
|
|
|
|
|
|
|
|
Assert::AreEqual(20.f,newMonster.GetBuffs(BuffType::TRAPPER_MARK)[0].duration,L"Mark duration is increased greatly."); |
|
|
|
|
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |