public void GetMaxImplantQLForAbilityValue() { Assert.AreEqual(0, Implant.GetMaxImplantQLForAbilityValue(5)); Assert.AreEqual(1, Implant.GetMaxImplantQLForAbilityValue(7)); Assert.AreEqual(4, Implant.GetMaxImplantQLForAbilityValue(13)); Assert.AreEqual(7, Implant.GetMaxImplantQLForAbilityValue(19)); Assert.AreEqual(33, Implant.GetMaxImplantQLForAbilityValue(70)); Assert.AreEqual(33, Implant.GetMaxImplantQLForAbilityValue(71)); Assert.AreEqual(34, Implant.GetMaxImplantQLForAbilityValue(72)); Assert.AreEqual(34, Implant.GetMaxImplantQLForAbilityValue(73)); Assert.AreEqual(35, Implant.GetMaxImplantQLForAbilityValue(74)); Assert.AreEqual(35, Implant.GetMaxImplantQLForAbilityValue(75)); Assert.AreEqual(36, Implant.GetMaxImplantQLForAbilityValue(76)); Assert.AreEqual(36, Implant.GetMaxImplantQLForAbilityValue(77)); Assert.AreEqual(178, Implant.GetMaxImplantQLForAbilityValue(361)); Assert.AreEqual(197, Implant.GetMaxImplantQLForAbilityValue(399)); Assert.AreEqual(199, Implant.GetMaxImplantQLForAbilityValue(403)); Assert.AreEqual(200, Implant.GetMaxImplantQLForAbilityValue(404)); Assert.AreEqual(200, Implant.GetMaxImplantQLForAbilityValue(450)); }
public void EquipsAndUnequipsSomeRandomImplants() { var head = Implant.GetImplant(ImplantSlot.Head, Skill.Treatment, null, Ability.Sense, 20); var ear = Implant.GetImplant(ImplantSlot.Ear, null, null, Ability.Intelligence, 20); var chest = Implant.GetImplant(ImplantSlot.Chest, Ability.Stamina, Ability.Psychic, Ability.Strength, 20); var eye = Implant.GetImplant(ImplantSlot.Eye, null, Skill.Treatment, null, 20); var leg = Implant.GetImplant(ImplantSlot.Leg, Ability.Agility, null, null, 20); var feet = Implant.GetImplant(ImplantSlot.Feet, null, Ability.Agility, null, 20); Assert.IsTrue(_character.TryEquipImplant(head)); Assert.AreEqual(296, (int)_character.TreatmentValue); Assert.AreEqual(98, _character.GetAbilityValue(Ability.Sense)); Assert.IsTrue(_character.TryEquipImplant(ear)); Assert.AreEqual(297, (int)_character.TreatmentValue); Assert.AreEqual(107, _character.GetAbilityValue(Ability.Intelligence)); Assert.AreEqual(head, _character.UnequipImplant(ImplantSlot.Head)); Assert.AreEqual(281, (int)_character.TreatmentValue); Assert.AreEqual(94, _character.GetAbilityValue(Ability.Sense)); Assert.IsTrue(_character.TryEquipImplant(head)); Assert.AreEqual(297, (int)_character.TreatmentValue); Assert.AreEqual(107, _character.GetAbilityValue(Ability.Intelligence)); Assert.IsTrue(_character.TryEquipImplant(chest)); Assert.IsTrue(_character.TryEquipImplant(eye)); Assert.IsTrue(_character.TryEquipImplant(leg)); Assert.IsTrue(_character.TryEquipImplant(feet)); Assert.AreEqual(307, (int)_character.TreatmentValue); Assert.AreEqual(107, _character.GetAbilityValue(Ability.Agility)); Assert.AreEqual(107, _character.GetAbilityValue(Ability.Intelligence)); Assert.AreEqual(104, _character.GetAbilityValue(Ability.Psychic)); Assert.AreEqual(98, _character.GetAbilityValue(Ability.Sense)); Assert.AreEqual(101, _character.GetAbilityValue(Ability.Stamina)); Assert.AreEqual(95, _character.GetAbilityValue(Ability.Strength)); var ql50Eye = Implant.GetImplant(ImplantSlot.Eye, null, Skill.SensoryImpr, Skill.MatterCrea, 50); Assert.AreEqual(50, Implant.GetMaxImplantQLForAbilityValue(_character.GetAbilityValue(Ability.Psychic))); Assert.IsTrue(_character.TryEquipImplant(ql50Eye)); Assert.AreEqual(298, (int)_character.TreatmentValue); }