Exemple #1
0
        public void Target(Mobile m)
        {
            if (!this.Caster.CanSee(m))
            {
                this.Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }
            else if (this.CheckBSequence(m))
            {
                SpellHelper.Turn(this.Caster, m);

                SpellHelper.AddStatBonus(this.Caster, m, StatType.Int);

                TimeSpan length = SpellHelper.GetDuration(this.Caster, m);

                if (Core.ML)
                {
                    int percentage = (int)(SpellHelper.GetOffsetScalar(this.Caster, m, false) * 100);
                    BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Cunning, 1075843, length, m, percentage.ToString()));
                }

                m.FixedParticles(0x375A, 10, 15, 5011, EffectLayer.Head);
                m.PlaySound(0x1EB);
            }

            this.FinishSequence();
        }
Exemple #2
0
        public void Target(Mobile m)
        {
            if (!this.Caster.CanSee(m))
            {
                this.Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }
            else if (this.CheckBSequence(m))
            {
                SpellHelper.Turn(this.Caster, m);

                SpellHelper.AddStatBonus(this.Caster, m, StatType.Str);
                SpellHelper.DisableSkillCheck = true;
                SpellHelper.AddStatBonus(this.Caster, m, StatType.Dex);
                SpellHelper.AddStatBonus(this.Caster, m, StatType.Int);
                SpellHelper.DisableSkillCheck = false;

                int      percentage = (int)(SpellHelper.GetOffsetScalar(this.Caster, m, false) * 100);
                TimeSpan length     = SpellHelper.GetDuration(this.Caster, m);
                string   args       = String.Format("{0}\t{1}\t{2}", percentage, percentage, percentage);
                BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Bless, 1075847, 1075848, length, m, args.ToString()));

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

                Timer.DelayCall(length, () => m.Delta(MobileDelta.Stat));
            }

            this.FinishSequence();
        }
Exemple #3
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendAsciiMessage("Target can not be seen.");                   // Target can not be seen.
            }
            else if (CheckBSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                SpellHelper.CheckReflect((int)this.Circle, Caster, ref m);

                SpellHelper.AddStatBonus(Caster, m, StatType.Str, (int)((Caster.Skills[SkillName.Magery].Value / 10) + 1), TimeSpan.FromSeconds((6 * Caster.Skills[SkillName.Magery].Value / 5) + 1));
                SpellHelper.AddStatBonus(Caster, m, StatType.Dex, (int)((Caster.Skills[SkillName.Magery].Value / 10) + 1), TimeSpan.FromSeconds((6 * Caster.Skills[SkillName.Magery].Value / 5) + 1));
                SpellHelper.AddStatBonus(Caster, m, StatType.Int, (int)((Caster.Skills[SkillName.Magery].Value / 10) + 1), TimeSpan.FromSeconds((6 * Caster.Skills[SkillName.Magery].Value / 5) + 1));

                //SpellHelper.AddStatBonus( Caster, m, StatType.Str ); SpellHelper.DisableSkillCheck = true;
                //SpellHelper.AddStatBonus( Caster, m, StatType.Dex );
                //SpellHelper.AddStatBonus( Caster, m, StatType.Int ); SpellHelper.DisableSkillCheck = false;

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

            FinishSequence();
        }
Exemple #4
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m) || m.Hidden)
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }

            else if (CheckBSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                SpellHelper.AddStatBonus(Caster, m, StatType.Int);

                bool enhancedSpellcast = SpellHelper.IsEnhancedSpell(Caster, m, EnhancedSpellbookType.Wizard, false, true);

                if (enhancedSpellcast)
                {
                    m.FixedParticles(0x375A, 10, 30, 5011, EffectLayer.Head);
                    m.PlaySound(0x1EB);
                }

                else
                {
                    m.FixedParticles(0x375A, 10, 15, 5011, EffectLayer.Head);
                    m.PlaySound(0x1EB);
                }
            }

            FinishSequence();
        }
Exemple #5
0
        public void Target(Mobile m)
        {
            if (m == null)
            {
                return;
            }

            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }
            else if (CheckBSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                SpellHelper.AddStatBonus(Caster, m, StatType.Str);
                SpellHelper.DisableSkillCheck = true;
                SpellHelper.AddStatBonus(Caster, m, StatType.Dex);
                SpellHelper.AddStatBonus(Caster, m, StatType.Int);
                SpellHelper.DisableSkillCheck = false;

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

                int      percentage = (int)(SpellHelper.GetOffsetScalar(Caster, m, false) * 100);
                TimeSpan length     = SpellHelper.GetDuration(Caster, m);

                string args = $"{percentage}\t{percentage}\t{percentage}";

                BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Bless, 1075847, 1075848, length, m, args));
            }

            FinishSequence();
        }
Exemple #6
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }
            else if (CheckBSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                int oldStr = SpellHelper.GetBuffOffset(m, StatType.Str);
                int newStr = SpellHelper.GetOffset(Caster, m, StatType.Str, false, true);

                if (newStr < oldStr || newStr == 0)
                {
                    DoHurtFizzle();
                }
                else
                {
                    SpellHelper.AddStatBonus(Caster, m, false, StatType.Str);
                    int      percentage = (int)(SpellHelper.GetOffsetScalar(Caster, m, false) * 100);
                    TimeSpan length     = SpellHelper.GetDuration(Caster, m);
                    BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Strength, 1075845, length, m, percentage.ToString()));

                    m.FixedParticles(0x375A, 10, 15, 5017, EffectLayer.Waist);
                    m.PlaySound(0x1EE);
                }
            }

            FinishSequence();
        }
Exemple #7
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendAsciiMessage("Target can not be seen.");                   // Target can not be seen.
            }
            else if (CheckBSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                SpellHelper.CheckReflect((int)this.Circle, Caster, ref m);

                SpellHelper.AddStatBonus(Caster, m, StatType.Int);

                m.FixedParticles(0x375A, 10, 15, 5011, EffectLayer.Head);
                m.PlaySound(0x1EB);

                //int percentage = (int)(SpellHelper.GetOffsetScalar( Caster, m, false )*100);
                //TimeSpan length = SpellHelper.GetDuration( Caster, m );
                int      percentage = (int)((Caster.Skills[SkillName.Magery].Value / 10) + 1);
                TimeSpan length     = TimeSpan.FromSeconds((6 * Caster.Skills[SkillName.Magery].Value / 5) + 1);

                BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Cunning, 1075843, length, m, percentage.ToString()));
            }

            FinishSequence();
        }
Exemple #8
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }
            else if (!CheckLineOfSight(m))
            {
                this.DoFizzle();
                Caster.SendAsciiMessage("Target is not in line of sight");
            }
            else if (CheckBSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                SpellHelper.AddStatBonus(Caster, m, StatType.Dex);

                m.FixedParticles(0x375A, 10, 15, 5010, EffectLayer.Waist);
                m.PlaySound(0x1e7);

                int      percentage = (int)(SpellHelper.GetOffsetScalar(Caster, m, false) * 100);
                TimeSpan length     = SpellHelper.GetDuration(Caster, m);

                BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Agility, 1075841, length, m, percentage.ToString()));
            }

            FinishSequence();
        }
Exemple #9
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (CheckBSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                SpellHelper.AddStatBonus(Caster, m, StatType.Str); SpellHelper.DisableSkillCheck = true;
                SpellHelper.AddStatBonus(Caster, m, StatType.Dex);
                SpellHelper.AddStatBonus(Caster, m, StatType.Int); SpellHelper.DisableSkillCheck = false;

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

                int      percentage = (int)(SpellHelper.GetOffsetScalar(Caster, m, false) * 100);
                TimeSpan length     = SpellHelper.GetDuration(Caster, m);

                string args = String.Format("{0}\t{1}\t{2}", percentage, percentage, percentage);
            }

            FinishSequence();
        }
Exemple #10
0
        public void Target(Mobile m)
        {
            if (m == null)
            {
                return;
            }

            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }
            else if (CheckBSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                SpellHelper.AddStatBonus(Caster, m, StatType.Str);

                m.FixedParticles(0x375A, 10, 15, 5017, EffectLayer.Waist);
                m.PlaySound(0x1EE);

                var percentage = (int)(SpellHelper.GetOffsetScalar(Caster, m, false) * 100);
                var length     = SpellHelper.GetDuration(Caster, m);

                BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Strength, 1075845, length, m, percentage.ToString()));
            }

            FinishSequence();
        }
Exemple #11
0
        public override bool DoEffect(Mobile from, Mobile target)
        {
            if (!SpellHelper.HasStatEffect(from, m_Stat) && from.InLOS(target) && target.Alive && from.CanBeBeneficial(target))
            {
                from.DoBeneficial(target);
                SpellHelper.Turn(from, target);

                if (m_Stat != StatType.All)
                {
                    SpellHelper.AddStatBonus(null, target, m_Stat);
                }
                else
                {
                    SpellHelper.AddStatBonus(null, target, StatType.Str); SpellHelper.DisableSkillCheck = true;
                    SpellHelper.AddStatBonus(null, target, StatType.Dex);
                    SpellHelper.AddStatBonus(null, target, StatType.Int); SpellHelper.DisableSkillCheck = false;
                }

                target.FixedParticles(m_EffIID, m_EffSpd, m_Dur, m_Eff, m_ELayer);
                target.PlaySound(m_Snd);

                return(true);
            }
            else
            {
                return(false);
            }
        }
        public void Target(IPoint3D p)
        {
            if (!Caster.CanSee(p))
            {
                Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }
            else if (CheckSequence())
            {
                if (this.Scroll != null)
                {
                    Scroll.Consume();
                }
                SpellHelper.Turn(Caster, p);

                SpellHelper.GetSurfaceTop(ref p);

                ArrayList targets = new ArrayList();

                Map map = Caster.Map;

                if (map != null)
                {
                    IPooledEnumerable eable = map.GetMobilesInRange(new Point3D(p), 3);

                    foreach (Mobile m in eable)
                    {
                        if (Caster.CanBeBeneficial(m, false))
                        {
                            targets.Add(m);
                        }
                    }

                    eable.Free();
                }

                Effects.PlaySound(p, Caster.Map, 0x299);

                if (targets.Count > 0)
                {
                    for (int i = 0; i < targets.Count; ++i)
                    {
                        Mobile targ = (Mobile)targets[i];

                        SpellHelper.AddStatBonus(Caster, targ, StatType.Str); SpellHelper.DisableSkillCheck = true;
                        SpellHelper.AddStatBonus(Caster, targ, StatType.Dex);
                        SpellHelper.AddStatBonus(Caster, targ, StatType.Int); SpellHelper.DisableSkillCheck = false;

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

            FinishSequence();
        }
        public override void OnJBUse(Mobile from)
        {
            SpellHelper.Turn(from, from);

            SpellHelper.AddStatBonus(from, from, StatType.Int);

            from.FixedParticles(0x375A, 10, 15, 5011, EffectLayer.Head);
            from.PlaySound(0x1EB);

            int      percentage = (int)(SpellHelper.GetOffsetScalar(from, from, false) * 100);
            TimeSpan length     = SpellHelper.GetDuration(from, from);

            BuffInfo.AddBuff(from, new BuffInfo(BuffIcon.Cunning, 1075843, length, from, percentage.ToString()));

            OnFinish(from);
        }
Exemple #14
0
        public void OnTarget(Mobile from, Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                // Seems like this should be responsibility of the targetting system.  --daleron
                Caster.SendLocalizedMessage(500237); // Target can not be seen.
                goto Return;
            }

            if (!CheckBSequence(m))
            {
                goto Return;
            }

            SpellHelper.Turn(Caster, m);

            var effectiveness = SpellHelper.GetEffectiveness(Caster);

            var duration = Caster.Skills[SkillName.Meditation].Value * 8;

            if (Spec.GetSpec(Caster).SpecName == SpecName.Mage)
            {
                duration *= 2;
                duration *= Spec.GetSpec(Caster).Bonus;
            }

            var durr = TimeSpan.FromSeconds(duration);

            var roll = 0.8 * effectiveness + 0.2 * Utility.RandomDouble();

            var str  = (int)(25 * roll);
            var inte = (int)(25 * roll);
            var dex  = (int)(25 * roll);

            SpellHelper.AddStatBonus(Caster, m, StatType.Str, str, durr);
            SpellHelper.AddStatBonus(Caster, m, StatType.Int, inte, durr);
            SpellHelper.AddStatBonus(Caster, m, StatType.Dex, dex, durr);

            // TODO: Find different sounds/effects?  These are copied from Bless
            m.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);
            m.PlaySound(0x1EA);

Return:
            FinishSequence();
        }
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }
            else if (CheckBSequence(m))
            {
                SpellHelper.Turn(Caster, m);
                SpellHelper.AddStatBonus(Caster, m, StatType.Str);
                SpellHelper.AddStatBonus(Caster, m, StatType.Dex);

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

            FinishSequence();
        }
Exemple #16
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendAsciiMessage("Target can not be seen.");
            }
            else if (CheckBSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                SpellHelper.AddStatBonus(Caster, m, StatType.Str);

                m.FixedParticles(0x375A, 10, 15, 5017, EffectLayer.Waist);
                m.PlaySound(0x1EE);
            }

            FinishSequence();
        }
Exemple #17
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }
            else if (CheckBSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                int oldStr = SpellHelper.GetBuffOffset(m, StatType.Str);
                int oldDex = SpellHelper.GetBuffOffset(m, StatType.Dex);
                int oldInt = SpellHelper.GetBuffOffset(m, StatType.Int);

                int newStr = SpellHelper.GetOffset(Caster, m, StatType.Str, false, true);
                int newDex = SpellHelper.GetOffset(Caster, m, StatType.Dex, false, true);
                int newInt = SpellHelper.GetOffset(Caster, m, StatType.Int, false, true);

                if ((newStr < oldStr && newDex < oldDex && newInt < oldInt) ||
                    (newStr == 0 && newDex == 0 && newInt == 0))
                {
                    DoHurtFizzle();
                }
                else
                {
                    SpellHelper.AddStatBonus(Caster, m, false, StatType.Str);
                    SpellHelper.AddStatBonus(Caster, m, true, StatType.Dex);
                    SpellHelper.AddStatBonus(Caster, m, true, StatType.Int);

                    int      percentage = (int)(SpellHelper.GetOffsetScalar(Caster, m, false) * 100);
                    TimeSpan length     = SpellHelper.GetDuration(Caster, m);
                    string   args       = $"{percentage}\t{percentage}\t{percentage}";
                    BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Bless, 1075847, 1075848, length, m, args));

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

                    AddBless(Caster, length + TimeSpan.FromMilliseconds(50));
                }
            }

            FinishSequence();
        }
        public override void OnJBUse(Mobile from)
        {
            SpellHelper.Turn(from, from);

            SpellHelper.AddStatBonus(from, from, StatType.Str); SpellHelper.DisableSkillCheck = true;
            SpellHelper.AddStatBonus(from, from, StatType.Dex);
            SpellHelper.AddStatBonus(from, from, StatType.Int); SpellHelper.DisableSkillCheck = false;

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

            int      percentage = (int)(SpellHelper.GetOffsetScalar(from, from, true) * 100);
            TimeSpan length     = SpellHelper.GetDuration(from, from);

            string args = string.Format("{0}\t{1}\t{2}", percentage, percentage, percentage);

            BuffInfo.AddBuff(from, new BuffInfo(BuffIcon.Bless, 1075847, 1075848, length, from, args.ToString()));

            OnFinish(from);
        }
Exemple #19
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }
            else if (CheckBSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                SpellHelper.AddStatBonus(Caster, m, StatType.Dex);

                m.FixedParticles(0x375A, 10, 15, 5010, EffectLayer.Waist);
                m.PlaySound(0x1e7);

                var percentage = (int)(SpellHelper.GetOffsetScalar(Caster, m, false) * 100);
                var length     = SpellHelper.GetDuration(Caster, m);
            }

            FinishSequence();
        }
Exemple #20
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (CheckBSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                int    bonus = (int)(GetKarmaPower(m) / 3);
                double timer = (GetKarmaPower(m) / 10);
                SpellHelper.AddStatBonus(Caster, m, StatType.Str, bonus, TimeSpan.FromMinutes(timer));

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

                BuffInfo.AddBuff(Caster, new BuffInfo(BuffIcon.Strength, 1044122, 1044118, TimeSpan.FromMinutes(timer), Caster));
            }

            FinishSequence();
        }
        public override void OnHit(Mobile attacker, Mobile defender, double damageBonus)
        {
            if (0.1 > Utility.RandomDouble())
            {
                SpellHelper.AddStatBonus(attacker, attacker, StatType.Str, 25, TimeSpan.FromMinutes(2.0));

                attacker.FixedParticles(0x375A, 1, 17, 9919, 33, 7, EffectLayer.Waist);
                attacker.FixedParticles(0x3728, 1, 13, 9502, 33, 7, (EffectLayer)255);
                attacker.PlaySound(1435);
                attacker.SendMessage("The strength of the minotaur runs through you!");
            }

            base.OnHit(attacker, defender);

            if (attacker.Alive && defender is PlayerMobile && defender.Alive)
            {
                AOS.Damage(attacker, 50, 0, 100, 0, 0, 0);
                attacker.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                attacker.PlaySound(0x307);
                Delete();
            }
        }
Exemple #22
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (CheckBSequence(m))
            {
                if ((m.Player && m.Dex <= 120) || (!m.Player))
                {
                    if (CurseSpell.UnderEffect(m))
                    {
                        if (m.Dex < m.RawDex)
                        {
                            m.RemoveStatMod(String.Format("[Magic] {0} Offset", StatType.Dex));
                        }
                        else
                        {
                            m.SendAsciiMessage("You are under the effect of a curse spell and cannot get any stat bonuses");
                        }
                    }
                    else
                    {
                        SpellHelper.AddStatBonus(Caster, m, StatType.Dex);
                    }
                }
                else
                {
                    m.SendAsciiMessage(33, "You are too fast to benefit from that!");
                    return;
                }

                m.FixedParticles(0x373A, 10, 15, 5010, EffectLayer.Waist);
                m.PlaySound(Sound);
            }

            FinishSequence();
        }
Exemple #23
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (CheckBSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                SpellHelper.AddStatBonus(Caster, m, StatType.Dex);

                m.FixedParticles(0x375A, 10, 15, 5010, Server.Items.CharacterDatabase.GetMySpellHue(Caster, 0), 0, EffectLayer.Waist);
                m.PlaySound(0x1e7);

                int      percentage = (int)(SpellHelper.GetOffsetScalar(Caster, m, false) * 100);
                TimeSpan length     = SpellHelper.GetDuration(Caster, m);

                BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Agility, 1075841, length, m, percentage.ToString()));
            }

            FinishSequence();
        }
Exemple #24
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (CheckBSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                SpellHelper.AddStatBonus(Caster, m, StatType.Str); SpellHelper.DisableSkillCheck = true;
                SpellHelper.AddStatBonus(Caster, m, StatType.Dex);
                SpellHelper.AddStatBonus(Caster, m, StatType.Int); SpellHelper.DisableSkillCheck = false;

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

                TimeSpan duration   = SpellHelper.GetDuration(Caster, m);
                int      percentage = (int)(SpellHelper.GetOffsetScalar(Caster, m, true) * 100);
                BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Bless, 1075847, duration, m, String.Format("{0}\t{0}\t{0}", percentage.ToString())));
            }

            FinishSequence();
        }
Exemple #25
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();
        }
Exemple #26
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendAsciiMessage("Target is not in line of sight."); DoFizzle();//One line so i could use VS Replace, feel free to change/remove comment:p
            }
            else if (SphereSpellTarget is BaseWand)
            {
                BaseWand bw = SphereSpellTarget as BaseWand;
                bw.RechargeWand(Caster, this);
            }
            else if (CheckBSequence(m))
            {
                if ((m.Player && m.Int <= 120 && m.Str <= 120 && m.Dex <= 120 && m.RawStatTotal <= 300) || (!m.Player))
                {
                    if (CurseSpell.UnderEffect(m))
                    {
                        bool message = true;

                        if (m.Str < m.RawStr)
                        {
                            m.RemoveStatMod(String.Format("[Magic] {0} Offset", StatType.Str));
                            message = false;
                        }
                        if (m.Dex < m.RawDex)
                        {
                            m.RemoveStatMod(String.Format("[Magic] {0} Offset", StatType.Dex));
                            message = false;
                        }
                        if (m.Int < m.RawInt)
                        {
                            m.RemoveStatMod(String.Format("[Magic] {0} Offset", StatType.Int));
                            message = false;
                        }

                        if (message)
                        {
                            m.SendAsciiMessage("You are under the effect of a curse spell and cannot get any stat bonuses");
                        }
                    }
                    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;
                    }
                }

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

                int      percentage = (int)(SpellHelper.GetOffsetScalar(Caster, m, false) * 100);
                TimeSpan length     = SpellHelper.GetDuration(Caster, m);

                m_UnderEffect[m] = Timer.DelayCall(length, new TimerStateCallback(RemoveEffect), m);

                string args = String.Format("{0}\t{1}\t{2}", percentage, percentage, percentage);

                BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Bless, 1075847, 1075848, length, m, args));
            }

            FinishSequence();
        }