Example #1
0
        private void CheckParalyze(Mobile defender, TimeSpan duration)
        {
            if (ParalyzingBlow.IsImmune(defender))
            {
                Caster.SendLocalizedMessage(1070804);   // Your target resists paralysis.
                defender.SendLocalizedMessage(1070813); // You resist paralysis.
                return;
            }

            defender.FixedEffect(0x376A, 9, 32);
            defender.PlaySound(0x204);

            Caster.SendLocalizedMessage(1060163);   // You deliver a paralyzing blow!
            defender.SendLocalizedMessage(1060164); // The attack has temporarily paralyzed you!

            // Treat it as paralyze not as freeze, effect must be removed when damaged.
            defender.Paralyze(duration);

            ParalyzingBlow.BeginImmunity(defender, duration);
        }
Example #2
0
        private void Damage(Mobile to)
        {
            if (to != null)
            {
                // send the effects
                Effects.SendPacket(to, to.Map, new GraphicalEffect(EffectType.FixedXYZ, Serial.Zero, Serial.Zero, 0x36BD, to.Location, to.Location, 20, 10, true, false));
                to.PlaySound(0x307);

                // deal the damage
                SpellHelper.Damage(this, to, GetNewAosDamage(40, 1, 5, to), 100, 0, 0, 0, 0);

                // stun the target
                double stunChance = (GetBaseSkill(Caster) + GetBoostSkill(Caster)) / 2000.0;
                stunChance -= GetResistSkill(to) / 1000.0;

                if (Utility.RandomDouble() < stunChance && !ParalyzingBlow.IsInmune(to))
                {
                    to.Freeze(TimeSpan.FromSeconds(2.0));
                    ParalyzingBlow.BeginInmunity(to, TimeSpan.FromSeconds(10.0));
                }
            }
        }