diff --git a/Adventures in Lestoria Tests/EnchantTests.cpp b/Adventures in Lestoria Tests/EnchantTests.cpp index d0593dea..062b7fc1 100644 --- a/Adventures in Lestoria Tests/EnchantTests.cpp +++ b/Adventures in Lestoria Tests/EnchantTests.cpp @@ -875,5 +875,36 @@ namespace EnchantTests 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."); } + 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_ptrnullRing{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."); + } }; } \ No newline at end of file diff --git a/Adventures in Lestoria/Monster.cpp b/Adventures in Lestoria/Monster.cpp index 086fe964..fb876c7c 100644 --- a/Adventures in Lestoria/Monster.cpp +++ b/Adventures in Lestoria/Monster.cpp @@ -1329,16 +1329,20 @@ void Monster::TriggerMark(){ } void Monster::ApplyMark(float time,uint8_t stackCount){ + float markDuration{time}; + if(game->GetPlayer()->HasEnchant("Long-Lasting Mark"))markDuration="Long-Lasting Mark"_ENC["DURATION"]; + if(GetMarkStacks()>0){ for(Buff&b:buffList){ if(b.type==BuffType::TRAPPER_MARK){ b.intensity+=stackCount; - b.duration=std::max(b.duration,time); + + b.duration=std::max(b.duration,markDuration); break; } } }else{ - game->AddToMarkedTargetList({GetWeakPointer(),stackCount,time}); + game->AddToMarkedTargetList({GetWeakPointer(),stackCount,markDuration}); } markApplicationTimer=0.5f; } diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index e770e8a4..0a0ea549 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 11017 +#define VERSION_BUILD 11020 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 43402916..79d49de4 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ