Long-Lasting Mark Enchant Implemented. 153/153 Tests Passing. Release Build 11020.
This commit is contained in:
parent
58298839bf
commit
6002f69dfa
@ -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_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.");
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user