@ -842,5 +842,38 @@ namespace EnchantTests
player - > ReduceAutoAttackTimer ( INFINITE ) ;
player - > AutoAttack ( ) ;
}
TEST_METHOD ( EnfeebledTargetNoEnchantCheck ) {
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.6f ) ; //Wait for mark lock-on
game - > OnUserUpdate ( 0.6f ) ; //Wait for mark lock-on
Assert : : AreEqual ( 2.f , newMonster . GetMoveSpdMult ( ) , L " Move Spd Multiplier should not be reduced by 30% " ) ;
Assert : : AreEqual ( 10 , newMonster . GetAttack ( ) , L " Monster Attack damage should not be reduced. " ) ;
}
TEST_METHOD ( EnfeebledTargetEnchantCheck ) {
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 ( " Enfeebled Target " ) ;
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.6f ) ; //Wait for mark lock-on
game - > OnUserUpdate ( 0.6f ) ; //Wait for mark lock-on
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. " ) ;
}
} ;
}