Example #1
0
        public override void OnGotMeleeAttack(Mobile attacker)
        {
            base.OnGotMeleeAttack(attacker);

            if (m_FieldActive)
            {
                this.FixedParticles(0x376A, 20, 10, 0x2530, EffectLayer.Waist);

                PlaySound(0x2F4);

                attacker.SendAsciiMessage("Your weapon is less effective with the creature's magical barrier up!");

                if (attacker is BaseCreature)                   // KILL ANY PETS PLAYERS FOOLISHLY BROUGHT WITH THEM
                {
                    BaseCreature pet = (BaseCreature)attacker;
                    if (BaseCreature.IsPet(attacker))
                    {
                        SendEBoltOnPet(attacker);
                    }
                }
            }

            if (attacker != null && attacker.Alive && attacker.Weapon is BaseRanged && 0.4 > Utility.RandomDouble())
            {
                SendEBolt(attacker);
            }
        }