Exemplo n.º 1
0
        public void Steel_Medium_Masterwork()
        {
            // Arrange
            var armor = new FullPlate(SizeCategory.Medium, FullPlateMaterial.Steel)
            {
                IsMasterwork = true
            };

            // Assert
            Assert.IsTrue(armor.IsMasterwork);
            Assert.IsTrue(armor.MasterworkIsToggleable);
            Assert.AreEqual(5, armor.ArmorCheckPenalty());
            Assert.AreEqual(1650, armor.GetMarketPrice());
            Assert.AreEqual("Masterwork Full Plate", armor.ToString());
        }
Exemplo n.º 2
0
        public void Adamantine_Small_Default()
        {
            // Arrange
            var armor = new FullPlate(SizeCategory.Small, FullPlateMaterial.Adamantine);

            // Assert
            Assert.IsTrue(armor.IsMasterwork);
            Assert.IsFalse(armor.MasterworkIsToggleable);
            Assert.AreEqual(9, armor.GetArmorBonus());
            Assert.AreEqual(5, armor.ArmorCheckPenalty());
            Assert.AreEqual(1, armor.MaximumDexterityBonus());
            Assert.AreEqual(16_500, armor.GetMarketPrice());
            Assert.AreEqual(25, armor.GetWeight());
            Assert.AreEqual(0.25, armor.SpeedPenalty);
            Assert.AreEqual("Adamantine Full Plate", armor.ToString());
        }
Exemplo n.º 3
0
        public void Steel_Large()
        {
            // Arrange
            var armor = new FullPlate(SizeCategory.Large, FullPlateMaterial.Steel);

            // Assert
            Assert.IsFalse(armor.IsMasterwork);
            Assert.IsTrue(armor.MasterworkIsToggleable);
            Assert.AreEqual(9, armor.GetArmorBonus());
            Assert.AreEqual(6, armor.ArmorCheckPenalty());
            Assert.AreEqual(1, armor.MaximumDexterityBonus());
            Assert.AreEqual(3000, armor.GetMarketPrice());
            Assert.AreEqual(100, armor.GetWeight());
            Assert.AreEqual(.25, armor.SpeedPenalty);
            Assert.AreEqual("Full Plate", armor.ToString());
        }
Exemplo n.º 4
0
        public void Dragonhide_Large()
        {
            // Arrange
            var armor = new FullPlate(SizeCategory.Large, DragonhideColor.Red);

            // Assert
            Assert.IsTrue(armor.IsMasterwork);
            Assert.IsFalse(armor.MasterworkIsToggleable);
            Assert.AreEqual(5, armor.ArmorCheckPenalty());
            Assert.AreEqual(1, armor.MaximumDexterityBonus());
            Assert.AreEqual(.25, armor.SpeedPenalty);
            Assert.AreEqual(100, armor.GetWeight());
            Assert.AreEqual(6300, armor.MundaneMarketPrice());
            Assert.AreEqual(Dragonhide.Hardness, armor.Hardness.MaterialHardness);
            Assert.AreEqual("Red Dragonhide Full Plate", armor.ToString());
        }
Exemplo n.º 5
0
        public void Mithral_Medium()
        {
            // Arrange
            var armor = new FullPlate(SizeCategory.Medium, FullPlateMaterial.Mithral);

            // Assert
            Assert.IsTrue(armor.IsMasterwork);
            Assert.IsFalse(armor.MasterworkIsToggleable);
            Assert.AreEqual(9, armor.GetArmorBonus());
            Assert.AreEqual(3, armor.ArmorCheckPenalty());
            Assert.AreEqual(3, armor.MaximumDexterityBonus());
            Assert.AreEqual(10_500, armor.GetMarketPrice());
            Assert.AreEqual(25, armor.GetWeight());
            Assert.AreEqual(0.25, armor.SpeedPenalty);
            Assert.AreEqual("Mithral Full Plate", armor.ToString());
        }
Exemplo n.º 6
0
        public void Adamantine_ApplyTo_DamageReduction()
        {
            // Arrange
            var damageReductionTracker = Mock.Of <IDamageReductionTracker>();
            var mockCharacter          = new Mock <ICharacter>();

            mockCharacter.Setup(c => c.DamageReduction)
            .Returns(damageReductionTracker);
            var armor = new FullPlate(SizeCategory.Medium, FullPlateMaterial.Adamantine);

            // Act
            armor.ApplyTo(mockCharacter.Object);

            // Assert
            Mock.Get(damageReductionTracker)
            .Verify(drt => drt.Add(It.Is <Func <byte> >(calc => 3 == calc()),
                                   It.Is <String>(bpb => "—" == bpb)),
                    "Equipping an adamantine full plate should bestow DR 3/— on the character wearing it.");
        }