public void TestStunnedImmunity()
        {
            Monster   vrock           = MonsterBuilder.BuildVrock();
            Character wizard          = CharacterBuilder.BuildTestWizard();
            Attack    stunningScreech = vrock.attacks.Find(x => x.Name == AttackNames.StunningScreech);

            Assert.IsTrue(wizard.CanBeAffectedBy(stunningScreech));
            wizard.conditionImmunities = Conditions.Stunned;
            Assert.IsFalse(wizard.CanBeAffectedBy(stunningScreech));
        }
        public void TestDamageImmunity()
        {
            Monster   vrock  = MonsterBuilder.BuildVrock();
            Character wizard = CharacterBuilder.BuildTestWizard();
            Attack    beak   = vrock.attacks.Find(x => x.Name == "Beak");

            Assert.IsTrue(wizard.CanBeAffectedBy(beak));
            wizard.AddDamageImmunity(DamageType.Piercing, AttackKind.Any);
            Assert.IsFalse(wizard.CanBeAffectedBy(beak));
        }
        public void TestDeafnessImmunity()
        {
            Monster   vrock           = MonsterBuilder.BuildVrock();
            Character wizard          = CharacterBuilder.BuildTestWizard();
            Attack    stunningScreech = vrock.attacks.Find(x => x.Name == AttackNames.StunningScreech);

            Assert.IsTrue(wizard.CanBeAffectedBy(stunningScreech));
            wizard.ManuallyAddedConditions |= Conditions.Deafened;
            Assert.IsFalse(wizard.CanBeAffectedBy(stunningScreech));
        }
        public void TestVrock()
        {
            Monster vrock = MonsterBuilder.BuildVrock();

            Assert.IsTrue(vrock.IsResistantTo(DamageType.Cold, AttackKind.NonMagical));
            Assert.IsTrue(vrock.IsResistantTo(DamageType.Fire, AttackKind.NonMagical));
            Assert.IsTrue(vrock.IsResistantTo(DamageType.Lightning, AttackKind.NonMagical));
            Assert.IsTrue(vrock.IsResistantTo(DamageType.Bludgeoning, AttackKind.NonMagical));
            Assert.IsTrue(vrock.IsResistantTo(DamageType.Piercing, AttackKind.NonMagical));
            Assert.IsTrue(vrock.IsResistantTo(DamageType.Slashing, AttackKind.NonMagical));
            Assert.IsTrue(vrock.IsImmuneTo(DamageType.Poison, AttackKind.Any));
            Assert.IsTrue(vrock.IsImmuneTo(Conditions.Poisoned));
        }