示例#1
0
        public void WoundingShot(Mobile attacker, Mobile defender)
        {
            if (Level >= PerkLevel.Fifth)
            {
                int distance = 0;

                for (int x = 0; x <= 12; x++)
                {
                    if (attacker.InRange(defender, x))
                    {
                        distance = x;
                    }
                }

                int woundChance = (int)((attacker.Skills.Anatomy.Value / 8) - (distance / 2));

                if (woundChance >= Utility.RandomMinMax(0, 100))
                {
                    BleedAttack.BeginBleed(defender, attacker);

                    attacker.SendMessage("You wound your opponent, causing them to bleed!");
                    defender.SendMessage("You've been wounded!");
                }
            }
        }
示例#2
0
        public override void Detonate(Mobile m)
        {
            int dam = Utility.RandomMinMax(MinDamage, MaxDamage);

            if (DeploymentType == DeploymentType.Tripwire)
            {
                dam *= 2;
            }

            AOS.Damage(m, Owner, dam, 100, 0, 0, 0, 0);
            Effects.SendLocationEffect(m.Location, m.Map, 0x11AD, 25, 10);
            Effects.PlaySound(m.Location, m.Map, 0x218);

            TransformContext context = TransformationSpellHelper.GetContext(m);

            if (context != null && (context.Type == typeof(LichFormSpell) || context.Type == typeof(WraithFormSpell)) || m is BaseCreature bc && bc.BleedImmune)
            {
                return;
            }

            m.SendLocalizedMessage(1060160); // You are bleeding!
            BleedAttack.BeginBleed(m, Owner, false);

            base.Detonate(m);
        }
示例#3
0
        public static void OnHit(Mobile attacker, Mobile defender)
        {
            CheckTable();

            int damage;

            if (!HasBleedMod(attacker, out damage) || (_Table != null && _Table.ContainsKey(attacker)))
            {
                return;
            }

            double bleedchance = (attacker.Skills.Ninjitsu.Value + attacker.Skills.Stealth.Value + (MasteryInfo.GetMasteryLevel(attacker, SkillName.Ninjitsu) * 40)) / 3.0 / 15.0;

            if (bleedchance > Utility.RandomDouble())
            {
                BleedAttack.BeginBleed(defender, attacker, false);

                if (_Table == null)
                {
                    _Table = new Dictionary <Mobile, DateTime>();
                }

                _Table[attacker] = DateTime.UtcNow + TimeSpan.FromMinutes(1);
            }
        }
示例#4
0
        public void Injure()
        {
            IsInjured = true;
            CantWalk  = true;

            Rider = null;
            BleedAttack.BeginBleed(this, this);
        }
示例#5
0
        public void RaiseRocks()
        {
            if (this.Map == null)
            {
                return;
            }

            IPooledEnumerable eable  = this.Map.GetMobilesInRange(this.Location, 12);
            List <Mobile>     random = new List <Mobile>();

            foreach (Mobile m in eable)
            {
                if (m.Alive && m is PlayerMobile && SpellHelper.ValidIndirectTarget(this, m) && this.CanBeHarmful(m, false))
                {
                    random.Add(m);
                }
            }

            eable.Free();
            Mobile target = null;

            if (random.Count > 0)
            {
                target = random[Utility.Random(random.Count)];
            }

            if (target != null)
            {
                Direction   d = Utility.GetDirection(this, target);
                Rectangle2D r = new Rectangle2D(target.X - 8, target.Y - 2, 17, 5);

                switch (d)
                {
                case Direction.West:
                    r = new Rectangle2D(this.X - 24, this.Y - 2, 20, 5); break;

                case Direction.North:
                    r = new Rectangle2D(this.X - 2, this.Y - 24, 5, 20); break;

                case Direction.East:
                    r = new Rectangle2D(this.X + 4, this.Y - 2, 20, 5); break;

                case Direction.South:
                    r = new Rectangle2D(this.X - 4, this.Y + 4, 20, 5); break;
                }

                for (int x = r.X; x <= r.X + r.Width; x++)
                {
                    for (int y = r.Y; y <= r.Y + r.Height; y++)
                    {
                        if (x > this.X - 4 && x < this.X + 4 && y > this.Y - 4 && y < this.Y + 4)
                        {
                            continue;
                        }

                        if (0.75 > Utility.RandomDouble())
                        {
                            int id = Utility.RandomList <int>(2282, 2273, 2277, 40106, 40107, 40108, 40106, 40107, 40108, 40106, 40107, 40108);
                            Effects.SendLocationEffect(new Point3D(x, y, this.Map.GetAverageZ(x, y)), this.Map, id, 60);
                        }
                    }
                }

                IPooledEnumerable eable2 = this.Map.GetMobilesInBounds(r);

                foreach (Mobile m in eable2)
                {
                    if (m.Alive && m is PlayerMobile && SpellHelper.ValidIndirectTarget(this, m) && this.CanBeHarmful(m, false))
                    {
                        if (m.X > this.X - 4 && m.X < this.X + 4 && m.Y > this.Y - 4 && m.Y < this.Y + 4)
                        {
                            continue;
                        }

                        m.Freeze(TimeSpan.FromSeconds(2));
                        BleedAttack.BeginBleed(m, this, false);

                        AOS.Damage(target, this, Utility.RandomMinMax(100, 110), 100, 0, 0, 0, 0);
                        m.PrivateOverheadMessage(MessageType.Regular, 0x21, 1156849, m.NetState); // *Rising columns of rock rip through your flesh and concuss you!*
                    }
                }

                eable2.Free();
            }
        }
示例#6
0
        public static BandageContext BeginHeal(Mobile healer, Mobile patient)
        {
            BaseCreature creature = patient as BaseCreature;

            if (patient is Golem)
            {
                healer.SendLocalizedMessage(500970); // Bandages cannot be used on that.
            }
            else if (creature?.IsAnimatedDead == true)
            {
                healer.SendLocalizedMessage(500951); // You cannot heal that.
            }
            else if (!patient.Poisoned && patient.Hits == patient.HitsMax && !BleedAttack.IsBleeding(patient) &&
                     creature?.IsDeadPet != true)
            {
                healer.SendLocalizedMessage(500955); // That being is not damaged!
            }
            else if (!patient.Alive && patient.Map?.CanFit(patient.Location, 16, false, false) != true)
            {
                healer.SendLocalizedMessage(501042); // Target cannot be resurrected at that location.
            }
            else if (healer.CanBeBeneficial(patient, true, true))
            {
                healer.DoBeneficial(patient);

                bool onSelf = healer == patient;
                int  dex    = healer.Dex;

                double seconds;
                double resDelay = patient.Alive ? 0.0 : 5.0;

                if (onSelf)
                {
                    if (Core.AOS)
                    {
                        seconds = 5.0 + 0.5 * ((double)(120 - dex) / 10); // TODO: Verify algorithm
                    }
                    else
                    {
                        seconds = 9.4 + 0.6 * ((double)(120 - dex) / 10);
                    }
                }
                else
                {
                    if (Core.AOS && GetPrimarySkill(patient) == SkillName.Veterinary)
                    {
                        seconds = 2.0;
                    }
                    else if (Core.AOS)
                    {
                        if (dex < 204)
                        {
                            seconds = 3.2 - Math.Sin((double)dex / 130) * 2.5 + resDelay;
                        }
                        else
                        {
                            seconds = 0.7 + resDelay;
                        }
                    }
                    else
                    {
                        if (dex >= 100)
                        {
                            seconds = 3.0 + resDelay;
                        }
                        else if (dex >= 40)
                        {
                            seconds = 4.0 + resDelay;
                        }
                        else
                        {
                            seconds = 5.0 + resDelay;
                        }
                    }
                }

                BandageContext context = GetContext(healer);

                context?.StopHeal();
                seconds *= 1000;

                context = new BandageContext(healer, patient, TimeSpan.FromMilliseconds(seconds));

                m_Table[healer] = context;

                if (!onSelf)
                {
                    patient.SendLocalizedMessage(1008078, false, healer.Name); //  : Attempting to heal you.
                }
                healer.SendLocalizedMessage(500956);                           // You begin applying the bandages.
                return(context);
            }

            return(null);
        }
示例#7
0
        public void EndHeal()
        {
            StopHeal();

            int  healerNumber, patientNumber;
            bool playSound   = true;
            bool checkSkills = false;

            SkillName primarySkill   = GetPrimarySkill(Patient);
            SkillName secondarySkill = GetSecondarySkill(Patient);

            BaseCreature petPatient = Patient as BaseCreature;

            if (!Healer.Alive)
            {
                healerNumber  = 500962; // You were unable to finish your work before you died.
                patientNumber = -1;
                playSound     = false;
            }
            else if (!Healer.InRange(Patient, Bandage.Range))
            {
                healerNumber  = 500963; // You did not stay close enough to heal your target.
                patientNumber = -1;
                playSound     = false;
            }
            else if (!Patient.Alive || petPatient?.IsDeadPet == true)
            {
                double healing = Healer.Skills[primarySkill].Value;
                double anatomy = Healer.Skills[secondarySkill].Value;
                double chance  = (healing - 68.0) / 50.0 - Slips * 0.02;

                if ((checkSkills = healing >= 80.0 && anatomy >= 80.0) && chance > Utility.RandomDouble() ||
                    Core.SE && petPatient is FactionWarHorse && petPatient.ControlMaster == Healer
                    ) //TODO: Dbl check doesn't check for faction of the horse here?
                {
                    if (Patient.Map?.CanFit(Patient.Location, 16, false, false) != true)
                    {
                        healerNumber  = 501042; // Target can not be resurrected at that location.
                        patientNumber = 502391; // Thou can not be resurrected there!
                    }
                    else if (Patient.Region?.IsPartOf("Khaldun") == true)
                    {
                        healerNumber =
                            1010395; // The veil of death in this area is too strong and resists thy efforts to restore life.
                        patientNumber = -1;
                    }
                    else
                    {
                        healerNumber  = 500965; // You are able to resurrect your patient.
                        patientNumber = -1;

                        Patient.PlaySound(0x214);
                        Patient.FixedEffect(0x376A, 10, 16);

                        if (petPatient?.IsDeadPet == true)
                        {
                            Mobile master = petPatient.ControlMaster;

                            if (master != null && Healer == master)
                            {
                                petPatient.ResurrectPet();

                                for (int i = 0; i < petPatient.Skills.Length; ++i)
                                {
                                    petPatient.Skills[i].Base -= 0.1;
                                }
                            }
                            else if (master?.InRange(petPatient, 3) == true)
                            {
                                healerNumber = 503255; // You are able to resurrect the creature.

                                master.CloseGump <PetResurrectGump>();
                                master.SendGump(new PetResurrectGump(Healer, petPatient));
                            }
                            else
                            {
                                bool found = false;

                                List <Mobile> friends = petPatient.Friends;

                                for (int i = 0; friends != null && i < friends.Count; ++i)
                                {
                                    Mobile friend = friends[i];

                                    if (friend.InRange(petPatient, 3))
                                    {
                                        healerNumber = 503255; // You are able to resurrect the creature.

                                        friend.CloseGump <PetResurrectGump>();
                                        friend.SendGump(new PetResurrectGump(Healer, petPatient));

                                        found = true;
                                        break;
                                    }
                                }

                                if (!found)
                                {
                                    healerNumber = 1049670; // The pet's owner must be nearby to attempt resurrection.
                                }
                            }
                        }
                        else
                        {
                            Patient.CloseGump <ResurrectGump>();
                            Patient.SendGump(new ResurrectGump(Patient, Healer));
                        }
                    }
                }
                else
                {
                    if (petPatient?.IsDeadPet == true)
                    {
                        healerNumber = 503256; // You fail to resurrect the creature.
                    }
                    else
                    {
                        healerNumber = 500966; // You are unable to resurrect your patient.
                    }
                    patientNumber = -1;
                }
            }
            else if (Patient.Poisoned)
            {
                Healer.SendLocalizedMessage(500969); // You finish applying the bandages.

                double healing = Healer.Skills[primarySkill].Value;
                double anatomy = Healer.Skills[secondarySkill].Value;
                double chance  = (healing - 30.0) / 50.0 - Patient.Poison.Level * 0.1 - Slips * 0.02;

                if ((checkSkills = healing >= 60.0 && anatomy >= 60.0) && chance > Utility.RandomDouble())
                {
                    if (Patient.CurePoison(Healer))
                    {
                        healerNumber  = Healer == Patient ? -1 : 1010058; // You have cured the target of all poisons.
                        patientNumber = 1010059;                          // You have been cured of all poisons.
                    }
                    else
                    {
                        healerNumber  = -1;
                        patientNumber = -1;
                    }
                }
                else
                {
                    healerNumber  = 1010060; // You have failed to cure your target!
                    patientNumber = -1;
                }
            }
            else if (BleedAttack.IsBleeding(Patient))
            {
                healerNumber  = 1060088; // You bind the wound and stop the bleeding
                patientNumber = 1060167; // The bleeding wounds have healed, you are no longer bleeding!

                BleedAttack.EndBleed(Patient, false);
            }
            else if (MortalStrike.IsWounded(Patient))
            {
                healerNumber  = Healer == Patient ? 1005000 : 1010398;
                patientNumber = -1;
                playSound     = false;
            }
            else if (Patient.Hits == Patient.HitsMax)
            {
                healerNumber  = 500967; // You heal what little damage your patient had.
                patientNumber = -1;
            }
            else
            {
                checkSkills   = true;
                patientNumber = -1;

                double healing = Healer.Skills[primarySkill].Value;
                double anatomy = Healer.Skills[secondarySkill].Value;
                double chance  = (healing + 10.0) / 100.0 - Slips * 0.02;

                if (chance > Utility.RandomDouble())
                {
                    healerNumber = 500969; // You finish applying the bandages.

                    double min, max;

                    if (Core.AOS)
                    {
                        min = anatomy / 8.0 + healing / 5.0 + 4.0;
                        max = anatomy / 6.0 + healing / 2.5 + 4.0;
                    }
                    else
                    {
                        min = anatomy / 5.0 + healing / 5.0 + 3.0;
                        max = anatomy / 5.0 + healing / 2.0 + 10.0;
                    }

                    double toHeal = min + Utility.RandomDouble() * (max - min);

                    if (Patient.Body.IsMonster || Patient.Body.IsAnimal)
                    {
                        toHeal += Patient.HitsMax / 100.0;
                    }

                    if (Core.AOS)
                    {
                        toHeal -= toHeal * Slips * 0.35; // TODO: Verify algorithm
                    }
                    else
                    {
                        toHeal -= Slips * 4;
                    }

                    if (toHeal < 1)
                    {
                        toHeal       = 1;
                        healerNumber = 500968; // You apply the bandages, but they barely help.
                    }

                    Patient.Heal((int)toHeal, Healer, false);
                }
                else
                {
                    healerNumber = 500968; // You apply the bandages, but they barely help.
                    playSound    = false;
                }
            }

            if (healerNumber != -1)
            {
                Healer.SendLocalizedMessage(healerNumber);
            }

            if (patientNumber != -1)
            {
                Patient.SendLocalizedMessage(patientNumber);
            }

            if (playSound)
            {
                Patient.PlaySound(0x57);
            }

            if (checkSkills)
            {
                Healer.CheckSkill(secondarySkill, 0.0, 120.0);
                Healer.CheckSkill(primarySkill, 0.0, 120.0);
            }
        }
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (m is BaseCreature && ((BaseCreature)m).IsAnimatedDead)
            {
                Caster.SendLocalizedMessage(1061654);                   // You cannot heal that which is not alive.
            }
            else if (m.IsDeadBondedPet)
            {
                Caster.SendLocalizedMessage(1060177);                   // You cannot heal a creature that is already dead!
            }
            else if (m is Golem)
            {
                Caster.LocalOverheadMessage(MessageType.Regular, 0x3B2, 500951);                   // You cannot heal that.
            }
            else if (MortalStrike.IsWounded(m))
            {
                if (GetJediDamage(Caster) > Utility.RandomMinMax(185, 750))
                {
                    MortalStrike.EndWound(m);
                    BuffInfo.RemoveBuff(m, BuffIcon.MortalStrike);
                }
                else
                {
                    Caster.LocalOverheadMessage(MessageType.Regular, 0x22, (Caster == m) ? 1005000 : 1010398);
                }
            }
            else if (m.Poisoned)
            {
                double healing = Caster.Skills[SkillName.EvalInt].Value;
                double anatomy = (double)(GetJediDamage(Caster) / 2);
                double chance  = ((healing - 30.0) / 50.0) - (m.Poison.Level * 0.1);

                if (healing >= 60.0 && anatomy >= 60.0 && chance > Utility.RandomDouble())
                {
                    if (m.CurePoison(Caster))
                    {
                        Caster.SendLocalizedMessage(1010058);
                        if (Caster != m)
                        {
                            m.SendLocalizedMessage(1010059);
                        }
                    }
                }
                else
                {
                    Caster.LocalOverheadMessage(MessageType.Regular, 0x22, 1010060);
                }
            }
            else if (BleedAttack.IsBleeding(m))
            {
                if (GetJediDamage(Caster) > Utility.RandomMinMax(185, 750))
                {
                    BleedAttack.EndBleed(m, false);
                }
                else
                {
                    Caster.LocalOverheadMessage(MessageType.Regular, 0x22, 1060159);
                }
            }
            else if (CheckBSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                int toHeal = (int)(Caster.Skills[SkillName.EvalInt].Value * 0.2) + (int)(GetJediDamage(Caster) * 0.1);
                toHeal += Utility.Random(1, 10);
                toHeal  = Server.Misc.MyServerSettings.PlayerLevelMod(toHeal, Caster);

                SpellHelper.Heal(toHeal, m, Caster);

                m.FixedParticles(0x376A, 9, 32, 5030, 0xB41, 0, EffectLayer.Waist);
                m.PlaySound(0x202);
            }

            FinishSequence();
        }
示例#9
0
        public static void MageAOEEffect(TeiravonMobile from)
        {
            TeiravonMobile player = from;
            int            EffectID;
            int            PhysDam;
            int            FireDam;
            int            ColdDam;
            int            PoisDam;
            int            EnerDam;
            int            Dmg;
            int            MageClass;
            ArrayList      TargList = new ArrayList();

            player.Mana -= 125;

            if (from.IsGeomancer())
            {
                MageClass = 1;
                EffectID  = 0x37FA;
                PhysDam   = 100;
                FireDam   = ColdDam = PoisDam = EnerDam = 0;
            }
            else if (from.IsPyromancer())
            {
                MageClass = 2;
                EffectID  = 0x3709;
                FireDam   = 100;
                PhysDam   = ColdDam = PoisDam = EnerDam = 0;
            }
            else if (from.IsAeromancer())
            {
                MageClass = 3;
                EffectID  = 0x375A;
                EnerDam   = 100;
                FireDam   = ColdDam = PoisDam = PhysDam = 0;
            }
            else             // Aquamancer
            {
                MageClass = 4;
                EffectID  = 0x372B;
                ColdDam   = 100;
                FireDam   = PhysDam = PoisDam = EnerDam = 0;
            }

            for (int xx = -5; xx <= 5; ++xx)
            {
                for (int yy = -5; yy <= 5; ++yy)
                {
                    if (!((xx == 0) && (yy == 0)))
                    {
                        Effects.SendLocationEffect(new Point3D(player.X + xx, player.Y + yy, player.Z), player.Map, EffectID, 13);
                    }
                }
            }

            Dmg = 10 * player.PlayerLevel;

            foreach (Mobile m in player.GetMobilesInRange(5))
            {
                if (m != player)
                {
                    TargList.Add(m);
                }
            }

            if (TargList.Count != 0)
            {
                for (int i = 0; i < TargList.Count; ++i)
                {
                    Mobile m = (Mobile)TargList[i];
                    AOS.Damage(m, player, Dmg, PhysDam, FireDam, ColdDam, PoisDam, EnerDam);

                    switch (MageClass)
                    {
                    case 1:
                        BleedAttack.BeginBleed(m, player);
                        m.SendMessage("The piercing spikes cause you to begin bleeding");
                        break;

                    case 2:
                        m.Stam = (int)(m.Stam / 10);
                        m.SendMessage("The scorching heats drains you of your stamina");
                        break;

                    case 3:
                        m.Mana = (int)(m.Mana / 10);
                        m.SendMessage("The electrifying experience robs your of your ability to concentrate mana");
                        break;

                    case 4:
                        m.Paralyze(m.Player ? TimeSpan.FromSeconds(6.0) : TimeSpan.FromSeconds(6.0));
                        m.SendMessage("The intence cold paralyzes you");
                        break;
                    }
                }
            }
        }
示例#10
0
        public static void NegateEffects(Mobile target, bool curses, bool buffs, bool damage, bool morph)
        {
            if (target == null)
            {
                return;
            }

            if (damage)
            {
                if (target.Poisoned)
                {
                    var p = target.Poison;

                    target.Poison = null;

                    target.OnCured(target, p);
                }

                target.Frozen    = false;
                target.Paralyzed = false;

                target.SetPropertyValue("Asleep", false);

                BuffInfo.RemoveBuff(target, BuffIcon.Paralyze);
                BuffInfo.RemoveBuff(target, BuffIcon.Sleep);
            }

            if (buffs)
            {
                ReactiveArmorSpell.EndArmor(target);
                MagicReflectSpell.EndReflect(target);
            }

            if (curses)
            {
                #region Pain Spike
                IDictionary table;

                if (typeof(PainSpikeSpell).GetFieldValue("m_Table", out table) && table.Contains(target))
                {
                    var t = table[target] as Timer;

                    if (t != null)
                    {
                        t.Stop();
                    }

                    table.Remove(target);

                    BuffInfo.RemoveBuff(target, BuffIcon.PainSpike);
                }
                #endregion

                CurseSpell.RemoveEffect(target);
                EvilOmenSpell.TryEndEffect(target);
                StrangleSpell.RemoveCurse(target);
                CorpseSkinSpell.RemoveCurse(target);
                BloodOathSpell.RemoveCurse(target);
                MindRotSpell.ClearMindRotScalar(target);
            }

            if (damage)
            {
                MortalStrike.EndWound(target);
                BleedAttack.EndBleed(target, target.Alive);
                MeerMage.StopEffect(target, target.Alive);
            }

            if (morph)
            {
                AnimalForm.RemoveContext(target, true);

                PolymorphSpell.StopTimer(target);
                IncognitoSpell.StopTimer(target);

                target.Send(SpeedControl.Disable);

                target.EndAction(typeof(PolymorphSpell));
                target.EndAction(typeof(IncognitoSpell));

                BuffInfo.RemoveBuff(target, BuffIcon.AnimalForm);
                BuffInfo.RemoveBuff(target, BuffIcon.Polymorph);
                BuffInfo.RemoveBuff(target, BuffIcon.Incognito);
            }

            if (buffs)
            {
                RemoveStatBonus(target, StatType.All);
            }

            if (curses)
            {
                RemoveStatCurse(target, StatType.All);
            }
        }
示例#11
0
        public virtual void Negate(Mobile m)
        {
            if (m == null || m.Deleted)
            {
                return;
            }

            if (m.Frozen)
            {
                m.Frozen = false;
            }

            if (m.Paralyzed)
            {
                m.Paralyzed = false;
            }

            if (m.Poisoned)
            {
                m.CurePoison(m);
            }

            if (BleedAttack.IsBleeding(m))
            {
                BleedAttack.EndBleed(m, true);
            }

            if (MortalStrike.IsWounded(m))
            {
                MortalStrike.EndWound(m);
            }

            PolymorphSpell.StopTimer(m);
            IncognitoSpell.StopTimer(m);
            DisguiseTimers.RemoveTimer(m);

            m.EndAction(typeof(PolymorphSpell));
            m.EndAction(typeof(IncognitoSpell));

            MeerMage.StopEffect(m, false);

            if (DebugMode || m.AccessLevel <= AccessLevel.Counselor)
            {
                m.RevealingAction();
                m.DisruptiveAction();
            }

            if (m.Target != null)
            {
                m.Target.Cancel(m, TargetCancelType.Overriden);
            }

            m.Spell = null;

            if (m.Combatant != null)
            {
#if ServUO
                var c = m.Combatant as Mobile;
#else
                var c = m.Combatant;
#endif

                if (c != null && c.Combatant == m)
                {
                    c.Combatant = null;
                    c.Warmode   = false;
                }

                m.Combatant = null;
            }

            if (m.Aggressed != null)
            {
                m.Aggressed.Clear();
            }

            if (m.Aggressors != null)
            {
                m.Aggressors.Clear();
            }

            m.Warmode  = false;
            m.Criminal = false;

            m.Delta(MobileDelta.Noto);
        }
示例#12
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (CheckBSequence(m))
            {
                if (Caster is TeiravonMobile && (((TeiravonMobile)Caster).IsCleric() || ((TeiravonMobile)Caster).IsDarkCleric() || ((TeiravonMobile)Caster).IsStrider() || ((TeiravonMobile)Caster).IsPaladin()) && ((TeiravonMobile)Caster).Faith != TeiravonMobile.Deity.None)
                {
                    TeiravonMobile Cleric = Caster as TeiravonMobile;

                    SpellHelper.Turn(Caster, m);

                    switch (Cleric.Faith)
                    {
                    case TeiravonMobile.Deity.Adalia:
                    {
                        if (!adalia.Contains(m))
                        {
                            adalia.Add(m, DateTime.Now);
                        }
                        if (m_Timer != null)
                        {
                            m_Timer.Stop();
                        }
                        m_Timer = new BlessHelper(m, adalia);
                        m_Timer.Start();

                        m.FixedParticles(0x375A, 10, 15, 5018, EffectLayer.Waist);
                        m.PlaySound(0x30C);
                        m.PlaySound(0x5CB);
                    }
                    break;

                    case TeiravonMobile.Deity.Cultist:
                    {
                        SpellHelper.AddStatBonus(Caster, m, StatType.Str); SpellHelper.DisableSkillCheck = true;
                        SpellHelper.AddStatBonus(Caster, m, StatType.Dex);
                        SpellHelper.AddStatBonus(Caster, m, StatType.Int); SpellHelper.DisableSkillCheck = false;

                        int      mod      = SpellHelper.GetOffset(Caster, m, StatType.Str, false);
                        TimeSpan duration = SpellHelper.GetDuration(Caster, m);

                        if (m is TeiravonMobile)
                        {
                            TeiravonMobile tav = m as TeiravonMobile;
                            tav.HitsMod = mod;
                            BlessTimer timer = new BlessTimer(Caster, (TeiravonMobile)m, duration, mod);
                            timer.Start();
                        }

                        m.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);
                        m.PlaySound(0x1EA);

                        Caster.Damage(Utility.Random(6));
                    }
                    break;

                    case TeiravonMobile.Deity.Gruumsh:
                    {
                        if (!gruumsh.Contains(m))
                        {
                            gruumsh.Add(m, DateTime.Now);
                        }
                        if (m_Timer != null)
                        {
                            m_Timer.Stop();
                        }
                        m_Timer = new BlessHelper(m, gruumsh);
                        m_Timer.Start();

                        m.FixedParticles(0x375A, 10, 15, 5018, 157, 4, EffectLayer.Waist);
                        BleedAttack.BeginBleed(m, m);
                        m.PlaySound(0x50F);
                        m.PlaySound(0x02B);
                    }
                    break;

                    case TeiravonMobile.Deity.Kamalini:
                    {
                        if (!kamalini.Contains(m))
                        {
                            kamalini.Add(m, DateTime.Now);
                        }
                        if (m_Timer != null)
                        {
                            m_Timer.Stop();
                        }
                        m_Timer = new BlessHelper(m, kamalini);
                        m_Timer.Start();

                        m.FixedParticles(0x375A, 10, 15, 5018, 157, 4, EffectLayer.Waist);
                        m.PlaySound(0x4B7);
                    }
                    break;

                    case TeiravonMobile.Deity.Kinarugi:
                    {
                        if (!kinarugi.Contains(m))
                        {
                            kinarugi.Add(m, DateTime.Now);
                        }
                        if (m_Timer != null)
                        {
                            m_Timer.Stop();
                        }
                        m_Timer = new BlessHelper(m, kinarugi);
                        m_Timer.Start();

                        m.FixedParticles(0x36FE, 10, 15, 5018, 2020, 4, EffectLayer.Waist);
                        m.PlaySound(0x09F);
                        m.PlaySound(0x5C4);
                    }
                    break;

                    case TeiravonMobile.Deity.Lloth:
                    {
                        if (m is TeiravonMobile)
                        {
                            if (!lloth.Contains(m))
                            {
                                lloth.Add(m, DateTime.Now);
                            }
                            if (m_Timer != null)
                            {
                                m_Timer.Stop();
                            }
                            m_Timer = new BlessHelper(m, lloth);
                            m_Timer.Start();

                            Effects.SendLocationParticles(EffectItem.Create(m.Location, m.Map, EffectItem.DefaultDuration), 0x3728, 1, 13, 2869, 1, 5023, 0);
                            m.PlaySound(0x381);
                            m.PlaySound(0x4B0);
                        }
                        else
                        {
                            Caster.SendMessage("You are unable to bless this target.");
                        }
                    }
                    break;

                    case TeiravonMobile.Deity.Narindun:
                    {
                        if (!narindun.Contains(m))
                        {
                            narindun.Add(m, DateTime.Now);
                        }
                        if (m_Timer != null)
                        {
                            m_Timer.Stop();
                        }
                        m_Timer = new BlessHelper(m, narindun);
                        m_Timer.Start();

                        m.FixedParticles(0x3789, 1, 40, 0x3F, 906, 3, EffectLayer.Waist);
                        m.PlaySound(0x029);
                        m.PlaySound(0x5C6);
                    }
                    break;

                    case TeiravonMobile.Deity.Occido:
                    {
                        if (!occido.Contains(m))
                        {
                            occido.Add(m, DateTime.Now);
                        }
                        if (m_Timer != null)
                        {
                            m_Timer.Stop();
                        }
                        m_Timer = new BlessHelper(m, occido);
                        m_Timer.Start();

                        m.FixedParticles(0x3728, 1, 40, 0x3F, 0, 3, EffectLayer.Waist);
                        m.PlaySound(0x5C8);
                    }
                    break;

                    case TeiravonMobile.Deity.Saerin:
                    {
                        if (!saerin.Contains(m))
                        {
                            saerin.Add(m, DateTime.Now);
                        }
                        if (m_Timer != null)
                        {
                            m_Timer.Stop();
                        }
                        m_Timer = new BlessHelper(m, saerin);
                        m_Timer.Start();

                        m.FixedParticles(0x36FE, 10, 15, 5018, 2020, 4, EffectLayer.Waist);
                        m.PlaySound(0x100);
                        m.PlaySound(0x5BE);
                    }
                    break;

                    case TeiravonMobile.Deity.Talathas:
                    {
                        if (!talathas.Contains(m))
                        {
                            talathas.Add(m, DateTime.Now);
                        }
                        if (m_Timer != null)
                        {
                            m_Timer.Stop();
                        }
                        m_Timer = new BlessHelper(m, talathas);
                        m_Timer.Start();

                        m.FixedParticles(0x36FE, 10, 15, 5018, 2020, 4, EffectLayer.Waist);
                        m.PlaySound(0x100);
                        m.PlaySound(0x5C4);
                    }
                    break;

                    case TeiravonMobile.Deity.Valar:
                    {
                        if (!valar.Contains(m))
                        {
                            valar.Add(m, DateTime.Now);
                        }
                        if (m_Timer != null)
                        {
                            m_Timer.Stop();
                        }
                        m_Timer = new BlessHelper(m, valar);
                        m_Timer.Start();

                        m.FixedParticles(0x36FE, 10, 15, 5018, 2020, 4, EffectLayer.Waist);
                        m.PlaySound(0x100);
                        m.PlaySound(0x5C4);
                    }
                    break;

                    case TeiravonMobile.Deity.Jareth:
                    {
                        if (m is TeiravonMobile)
                        {
                            TeiravonMobile tav = m as TeiravonMobile;
                            if (!tav.IsGoblin())
                            {
                                Caster.SendMessage("The Goblin King would never bless that!");
                                return;
                            }
                            if (!jareth.Contains(m))
                            {
                                jareth.Add(m, DateTime.Now);
                            }
                            if (m_Timer != null)
                            {
                                m_Timer.Stop();
                            }
                            m_Timer = new BlessHelper(m, jareth);
                            m_Timer.Start();

                            m.FixedParticles(0x2D92, 10, 15, 5018, 2829, 4, EffectLayer.Waist);
                            m.PlaySound(0x547);
                        }
                        else
                        {
                            Caster.SendMessage("The Goblin King would never bless that!");
                        }
                    }
                    break;
                    }
                }
                else
                {
                    SpellHelper.AddStatBonus(Caster, m, StatType.Str); SpellHelper.DisableSkillCheck = true;
                    SpellHelper.AddStatBonus(Caster, m, StatType.Dex);
                    SpellHelper.AddStatBonus(Caster, m, StatType.Int); SpellHelper.DisableSkillCheck = false;

                    int      mod      = SpellHelper.GetOffset(Caster, m, StatType.Str, false);
                    TimeSpan duration = SpellHelper.GetDuration(Caster, m);

                    if (m is TeiravonMobile)
                    {
                        TeiravonMobile tav = m as TeiravonMobile;
                        tav.HitsMod = mod;
                        BlessTimer timer = new BlessTimer(Caster, (TeiravonMobile)m, duration, mod);
                        timer.Start();
                    }

                    m.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);
                    m.PlaySound(0x1EA);
                }
            }

            FinishSequence();
        }