public void UnEquippedArmorMakesNoDifference() { var inv = new Inventory(); var def = new DefenseStats( new AbilityScores(), new SizeStats(), inv ); var armor = new Armor(); armor.ArmorClass = 12; inv.AddGear(armor); Assert.AreEqual(0, def.EquippedArmorBonus()); }
public void EquippedArmorIncreasesYourDefenseAndYourFlatFootedDefenseButNotTouchDefense() { //TODO: Not sure if inventory is correct, or if inventory items should have modifiers? var inventory = new Inventory(); var def = new DefenseStats( new AbilityScores(), new SizeStats(), inventory ); var startAC = def.ArmorClass(); var startFlat = def.FlatFootedArmorClass(); var startTouch = def.TouchArmorClass(); var armor = new Armor(); armor.ArmorClass = 10; inventory.AddGear(armor); inventory.EquipItem(armor); Assert.AreEqual(10, def.EquippedArmorBonus()); Assert.AreEqual(startAC + 10, def.ArmorClass()); Assert.AreEqual(startFlat + 10, def.FlatFootedArmorClass()); Assert.AreEqual(startTouch, def.TouchArmorClass()); }