Exemplo n.º 1
0
        public static void CheckHit(Mobile attacker, Mobile defender, int damage)
        {
            if (defender.FindItemOnLayer(Layer.TwoHanded) is BaseShield shield && shield.ArmorAttributes.SoulCharge > 0 && shield.ArmorAttributes.SoulCharge > Utility.Random(100))
            {
                SoulChargeContext sc = GetContextForVictim <SoulChargeContext>(defender);

                if (sc == null)
                {
                    AddEffects(sc = new SoulChargeContext(defender, shield));
                }

                sc.OnDamaged(damage);
            }
        }
Exemplo n.º 2
0
        public static void CheckHit(Mobile attacker, Mobile defender, int damage)
        {
            BaseShield shield = defender.FindItemOnLayer(Layer.TwoHanded) as BaseShield;

            if (shield != null && shield.ArmorAttributes.SoulCharge > 0 && shield.ArmorAttributes.SoulCharge > Utility.Random(100))
            {
                SoulChargeContext sc = PropertyEffect.GetContext <SoulChargeContext>(defender, EffectsType.SoulCharge);

                if (sc == null)
                {
                    sc = new SoulChargeContext(defender, shield);
                }

                sc.OnDamaged(damage);
            }
        }
Exemplo n.º 3
0
        public static void CheckHit(Mobile attacker, Mobile defender, int damage)
        {
            BaseShield shield = defender.FindItemOnLayer(Layer.TwoHanded) as BaseShield;
            if (shield != null && shield.ArmorAttributes.SoulCharge > 0 && shield.ArmorAttributes.SoulCharge > Utility.Random(100))
            {
                SoulChargeContext sc = (SoulChargeContext)PropertyEffect.GetContext(defender, EffectsType.SoulCharge);

                if (sc == null)
                    sc = new SoulChargeContext(defender, shield);

                sc.OnDamaged(damage);
            }
        }