@ -161,5 +161,49 @@ namespace PlayerTests
player - > Hurt ( 30 , player - > OnUpperLevel ( ) , player - > GetZ ( ) ) ;
player - > Hurt ( 30 , player - > OnUpperLevel ( ) , player - > GetZ ( ) ) ;
Assert : : AreEqual ( 74 , player - > GetHealth ( ) ) ; //Even though we are supposed to take 30 damage, damage reduction reduces it to 26 instead. (Random variance is controlled during testing. If this number changes at some point, either the damage formula or the item's stats have changed!)
Assert : : AreEqual ( 74 , player - > GetHealth ( ) ) ; //Even though we are supposed to take 30 damage, damage reduction reduces it to 26 instead. (Random variance is controlled during testing. If this number changes at some point, either the damage formula or the item's stats have changed!)
}
}
TEST_METHOD ( PlayerSetEffectsAcknowledged ) {
std : : weak_ptr < Item > setArmor { Inventory : : AddItem ( " Test Armor " s ) } ;
setArmor . lock ( ) - > enhancementLevel = " Item.Item Max Enhancement Level " _I ; //Force enhance the item to the max enhancement level.
Inventory : : EquipItem ( setArmor , EquipSlot : : ARMOR ) ;
//This gear is supposed to be provide an additional 100 defense, 1000 health, and 100 attack.
Assert : : AreEqual ( 100.f + player - > GetBaseStat ( " Defense " ) , player - > GetStat ( " Defense " ) ) ;
Assert : : AreEqual ( 100.f + player - > GetBaseStat ( " Attack " ) , player - > GetStat ( " Attack " ) ) ;
Assert : : AreEqual ( 1000.f + player - > GetBaseStat ( " Health " ) , player - > GetStat ( " Health " ) ) ;
}
TEST_METHOD ( PlayerSetEffectsAcknowledged2 ) {
std : : weak_ptr < Item > setArmor { Inventory : : AddItem ( " Test Armor2 " s ) } ;
setArmor . lock ( ) - > enhancementLevel = " Item.Item Max Enhancement Level " _I ; //Force enhance the item to the max enhancement level.
Inventory : : EquipItem ( setArmor , EquipSlot : : ARMOR ) ;
//This gear is supposed to be provide an additional 100 defense, 1000 health, and 100 attack.
Assert : : AreEqual ( 100.f + player - > GetBaseStat ( " Defense % " ) , player - > GetStat ( " Defense % " ) ) ;
Assert : : AreEqual ( 100.f + player - > GetBaseStat ( " Attack % " ) , player - > GetStat ( " Attack % " ) ) ;
Assert : : AreEqual ( 100.f + player - > GetBaseStat ( " Move Spd % " ) , player - > GetStat ( " Move Spd % " ) ) ;
Assert : : AreEqual ( 100.f + player - > GetBaseStat ( " CDR " ) , player - > GetStat ( " CDR " ) ) ;
Assert : : AreEqual ( 100.f + player - > GetBaseStat ( " Crit Rate " ) , player - > GetStat ( " Crit Rate " ) ) ;
Assert : : AreEqual ( 100.f + player - > GetBaseStat ( " Crit Dmg " ) , player - > GetStat ( " Crit Dmg " ) ) ;
Assert : : AreEqual ( 100.f + player - > GetBaseStat ( " Health % " ) , player - > GetStat ( " Health % " ) ) ;
Assert : : AreEqual ( 100.f + player - > GetBaseStat ( " HP6 Recovery % " ) , player - > GetStat ( " HP6 Recovery % " ) ) ;
}
TEST_METHOD ( PlayerSetEffectsAcknowledged3 ) {
std : : weak_ptr < Item > setArmor { Inventory : : AddItem ( " Test Armor3 " s ) } ;
setArmor . lock ( ) - > enhancementLevel = " Item.Item Max Enhancement Level " _I ; //Force enhance the item to the max enhancement level.
Inventory : : EquipItem ( setArmor , EquipSlot : : ARMOR ) ;
//This gear is supposed to be provide an additional 100 defense, 1000 health, and 100 attack.
Assert : : AreEqual ( 100.f + player - > GetBaseStat ( " HP4 Recovery % " ) , player - > GetStat ( " HP4 Recovery % " ) ) ;
Assert : : AreEqual ( 100.f + player - > GetBaseStat ( " Damage Reduction " ) , player - > GetStat ( " Damage Reduction " ) ) ;
}
TEST_METHOD ( PlayerSetEffectsAcknowledged4 ) {
std : : weak_ptr < Item > setArmor { Inventory : : AddItem ( " Test Armor4 " s ) } ;
setArmor . lock ( ) - > enhancementLevel = " Item.Item Max Enhancement Level " _I ; //Force enhance the item to the max enhancement level.
Inventory : : EquipItem ( setArmor , EquipSlot : : ARMOR ) ;
//This gear is supposed to be provide an additional 100 defense, 1000 health, and 100 attack.
Assert : : AreEqual ( 100.f + player - > GetBaseStat ( " HP Recovery % " ) , player - > GetStat ( " HP Recovery % " ) ) ;
Assert : : AreEqual ( 50.f + player - > GetBaseStat ( " Attack Spd " ) , player - > GetStat ( " Attack Spd " ) ) ;
Assert : : AreEqual ( 100.f + player - > GetBaseStat ( " Mana " ) , player - > GetStat ( " Mana " ) ) ;
}
} ;
} ;
}
}