|
|
|
@ -30,7 +30,7 @@ namespace MonsterTests |
|
|
|
|
ItemInfo::InitializeItems(); |
|
|
|
|
testGame->InitializePlayer(); |
|
|
|
|
Stats::InitializeDamageReductionTable(); |
|
|
|
|
MonsterData testMonsterData{"TestName","Test Monster",30,10,5,{MonsterDropData{"Health Potion",100.f,1,1}}}; |
|
|
|
|
MonsterData testMonsterData{"TestName","Test Monster",30,10,5,{MonsterDropData{"Health Potion",100.f,1,1}},200.f}; |
|
|
|
|
MONSTER_DATA["TestName"]=testMonsterData; |
|
|
|
|
} |
|
|
|
|
void SetupMockMap(){ |
|
|
|
@ -114,6 +114,36 @@ namespace MonsterTests |
|
|
|
|
testMonster.Hurt(testMonster.GetMaxHealth(),testMonster.OnUpperLevel(),testMonster.GetZ()); |
|
|
|
|
Assert::AreEqual(size_t(1),ItemDrop::GetDrops().size()); |
|
|
|
|
} |
|
|
|
|
TEST_METHOD(MoveSpdSetCorrectly){ |
|
|
|
|
Monster testMonster{{},MONSTER_DATA["TestName"]}; |
|
|
|
|
Assert::AreEqual(2.f,testMonster.GetMoveSpdMult()); |
|
|
|
|
} |
|
|
|
|
TEST_METHOD(SlowdownBuffTest){ |
|
|
|
|
Monster testMonster{{},MONSTER_DATA["TestName"]}; |
|
|
|
|
testMonster.AddBuff(BuffType::SLOWDOWN,5.f,0.5f); |
|
|
|
|
Assert::AreEqual(1.f,testMonster.GetMoveSpdMult()); |
|
|
|
|
} |
|
|
|
|
TEST_METHOD(SelfInflictedSlowdownTest){ |
|
|
|
|
Monster testMonster{{},MONSTER_DATA["TestName"]}; |
|
|
|
|
testMonster.AddBuff(BuffType::SELF_INFLICTED_SLOWDOWN,5.f,0.5f); |
|
|
|
|
Assert::AreEqual(1.f,testMonster.GetMoveSpdMult()); |
|
|
|
|
} |
|
|
|
|
TEST_METHOD(SpeedBoostTest){ |
|
|
|
|
Monster testMonster{{},MONSTER_DATA["TestName"]}; |
|
|
|
|
testMonster.AddBuff(BuffType::SPEEDBOOST,5.f,0.5f); |
|
|
|
|
Assert::AreEqual(3.f,testMonster.GetMoveSpdMult()); |
|
|
|
|
} |
|
|
|
|
TEST_METHOD(LockOnSpeedBoostTest){ |
|
|
|
|
Monster testMonster{{},MONSTER_DATA["TestName"]}; |
|
|
|
|
testMonster.AddBuff(BuffType::LOCKON_SPEEDBOOST,5.f,0.5f); |
|
|
|
|
Assert::AreEqual(3.f,testMonster.GetMoveSpdMult()); |
|
|
|
|
} |
|
|
|
|
TEST_METHOD(AdditiveMoveSpdBuffsTest){ |
|
|
|
|
Monster testMonster{{},MONSTER_DATA["TestName"]}; |
|
|
|
|
testMonster.AddBuff(BuffType::SLOWDOWN,5.f,0.5f); |
|
|
|
|
testMonster.AddBuff(BuffType::SPEEDBOOST,5.f,0.75f); |
|
|
|
|
Assert::AreEqual(2.5f,testMonster.GetMoveSpdMult()); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|