Beispiel #1
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (CheckHSequence(m))
            {
                SpellHelper.CheckReflect((int)Circle, Caster, ref m);

                if (m.Spell != null)
                {
                    m.Spell.OnCasterHurt();
                }

                if (BlessSpell.UnderEffect(m))
                {
                    if (m.Str > m.RawStr)
                    {
                        m.RemoveStatMod(String.Format("[Magic] {0} Offset", StatType.Str));
                    }
                    else
                    {
                        m.SendAsciiMessage("You are under the effect of a bless spell and cannot get any stat penalties");
                    }
                }
                else
                {
                    SpellHelper.AddStatCurse(Caster, m, StatType.Str);
                }

                m.FixedParticles(0x374A, 10, 15, 5009, EffectLayer.Waist);
                m.PlaySound(Sound);

                HarmfulSpell(m);
            }

            FinishSequence();
        }
Beispiel #2
0
        public void Target(Mobile m)
        {
            var pm = Caster as PlayerMobile;

            if (pm != null && DateTime.UtcNow < (pm.LastArrow + DamageDelay))
            {
                DoFizzle();
            }
            else if (CheckHSequence(m))
            {
                /* Fires a bolt of nether energy at the Target,
                 * dealing chaos damage.
                 */

                SpellHelper.Turn(Caster, m);

                SpellHelper.CheckReflect(0, Caster, ref m);

                Caster.MovingParticles(m, 0x36D4, 7, 0, false, true, 0x49A, 0, 0x251E, 0x4A7A, 0x160, 0);
                Caster.PlaySound(0x211);

                if (pm != null)
                {
                    pm.LastArrow = DateTime.UtcNow;
                }

                Timer.DelayCall(DamageDelay, delegate
                {
                    double damage = GetNewAosDamage(10, 1, 4, m);

                    var types = new int[4];
                    types[Utility.Random(types.Length)] = 100;

                    SpellHelper.Damage(this, m, damage, 0, types[0], types[1], types[2], types[3]);
                });
            }

            FinishSequence();
        }
Beispiel #3
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (CheckHSequence(m))
            {
                Mobile source = Caster;

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

                //dano 3d10 + 10
                m.Poison = PoisonImpl.Lesser;

                m.FixedParticles(0x113A, 5, 25, 0, EffectLayer.Head);
                m.PlaySound(0x1E5);
            }

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

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

                double damage;

                if (Core.AOS)
                {
                    damage = GetNewAosDamage(23, 1, 4, m);
                }
                else
                {
                    damage = Utility.Random(12, 9);

                    if (CheckResisted(m))
                    {
                        damage *= 0.75;

                        m.SendLocalizedMessage(501783);                           // You feel yourself resisting magical energy.
                    }

                    damage *= GetDamageScalar(m);
                }

                m.BoltEffect(0);

                SpellHelper.Damage(this, m, damage, 0, 0, 0, 0, 100);
            }

            FinishSequence();
        }
Beispiel #5
0
        public void Target(Mobile m)
        {
            if (!(m is BaseCreature || m is PlayerMobile))
            {
                Caster.SendLocalizedMessage(1060508); // You can't curse that.
            }
            else if (UnderEffects(m))
            {
                DoFizzle();
            }
            else if (CheckHSequence(m))
            {
                SpellHelper.Turn(Caster, m);

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

                ApplyEffects(m);
                ConduitSpell.CheckAffected(Caster, m, ApplyEffects);
            }

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

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

                double damage;

                if (Core.AOS)
                {
                    damage = GetNewAosDamage(22, 1, 4, Caster.Player && m.Player);
                }
                else
                {
                    damage = Utility.Random(10, 8);

                    if (CheckResisted(m))
                    {
                        damage *= 0.75;

                        m.SendAsciiMessage("You feel yourself resisting magical energy.");
                    }

                    damage *= GetDamageScalar(m);
                }

                m.BoltEffect(0);

                SpellHelper.Damage(this, m, damage, 0, 0, 0, 0, 100);
            }

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

            if (CheckHSequence(m))
            {
                SpellHelper.CheckReflect((int)Circle, Caster, ref m);

                double damage = 20 + ((int)(GetDamageSkill(Caster) - GetResistSkill(m)) / 12);

                m.BoltEffect(0);

                SpellHelper.Damage(this, m, damage, 0, 0, 0, 0, 100);
                m.PlaySound(m.GetHurtSound());
                m.Animate(!m.Mounted ? 20 : 29, 5, 1, true, false, 0);
            }

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

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

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

                m.Paralyzed = false;

                m.FixedParticles(0x3779, 10, 15, 5004, EffectLayer.Head);
                m.PlaySound(0x1E4);
            }

            FinishSequence();
        }
Beispiel #9
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (Caster.CanBeHarmful(m) && CheckSequence())
            {
                Mobile attacker = Caster, defender = m;

                SpellHelper.Turn(Caster, m);

                attacker.AggressiveAction(defender, attacker.IsHarmfulCriminal(defender));

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

                InternalTimer t = new InternalTimer(this, attacker, defender, m);
                t.Start();
            }

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

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

                double damage = Utility.Random(1, 15);

                if (CheckResisted(m))
                {
                    damage *= 0.75;

                    m.SendLocalizedMessage(501783); // You feel yourself resisting magical energy.
                }

                damage *= GetDamageScalar(m);

                if (!m.InRange(Caster, 2))
                {
                    damage *= 0.25;                     // 1/4 damage at > 2 tile range
                }
                else if (!m.InRange(Caster, 1))
                {
                    damage *= 0.50;                     // 1/2 damage at 2 tile range
                }
                m.FixedParticles(0x374A, 10, 15, 5013, EffectLayer.Waist);
                m.PlaySound(0x1F1);

                SpellHelper.Damage(this, m, damage, 0, 0, 100, 0, 0);
            }

            FinishSequence();
        }
Beispiel #11
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (Caster.CanBeHarmful(m) && CheckSequence())
            {
                //Caster.NextSpellTime = DateTime.Now + this.GetCastRecovery();// Spell.NextSpellDelay;

                Mobile attacker = Caster, defender = m;

                SpellHelper.Turn(Caster, m);

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

                InternalTimer t = new InternalTimer(this, attacker, defender, m, this.GetCastDelay() + TimeSpan.FromSeconds(0.25) + SpellHelper.OldDamageDelay);
                t.Start();
            }

            FinishSequence();
        }
Beispiel #12
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (m.Frozen || m.Paralyzed)
            {
                Caster.SendLocalizedMessage(1061923);                   // The target is already frozen.
            }
            else if (CheckHSequence(m))
            {
                SpellHelper.Turn(Caster, m);

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

                int secs = (int)((GetDamageSkill(Caster) / 10) - (GetResistSkill(m) / 10));

                if (!m.IsPlayer)
                {
                    secs *= 3;
                }

                if (secs < 0)
                {
                    secs = 0;
                }

                double duration = secs;

                m.Paralyze(TimeSpan.FromSeconds(duration));

                m.PlaySound(0x204);
                m.FixedEffect(0x376A, 6, 1);
            }

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

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

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

                Timer t = (Timer)m_UnderEffect[m];

                if (Caster.Player && m.Player /*&& Caster != m */ && t == null)                                    //On OSI you CAN curse yourself and get this effect.
                {
                    TimeSpan duration = TimeSpan.FromSeconds((6 * Caster.Skills[SkillName.Magery].Value / 5) + 1); //SpellHelper.GetDuration( Caster, m );
                    m_UnderEffect[m] = t = Timer.DelayCall(duration, new TimerStateCallback(RemoveEffect), m);
                    m.UpdateResistances();
                }

                if (m.Spell != null)
                {
                    m.Spell.OnCasterHurt();
                }

                m.Paralyzed = false;

                m.FixedParticles(0x374A, 10, 15, 5028, EffectLayer.Waist);
                m.PlaySound(0x1EA);
            }

            FinishSequence();
        }
Beispiel #14
0
        public void Target(Mobile m)
        {
            if (!this.Caster.CanSee(m))
            {
                this.Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }
            else if (this.CheckHSequence(m))
            {
                Mobile source = this.Caster;

                SpellHelper.Turn(this.Caster, m);

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

                double damage;

                damage = Utility.Random(24, 18);

                if (this.CheckResisted(m))
                {
                    damage *= 0.75;

                    m.SendLocalizedMessage(501783); // You feel yourself resisting magical energy.
                }

                // Scale damage based on evalint and resist
                damage *= this.GetDamageScalar(m);

                // Do the effects
                source.MovingParticles(m, 0x379F, 7, 0, false, true, 3043, 4043, 0x211);
                source.PlaySound(0x20A);

                // Deal the damage
                SpellHelper.Damage(this, m, damage, 0, 0, 0, 0, 100);
            }

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

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

                if (m.Spell != null)
                {
                    m.Spell.OnCasterHurt();
                }

                m.Paralyzed = false;

                if (CheckResisted(m, 4))
                {
                    m.SendAsciiMessage("You feel yourself resisting magical energy."); // You feel yourself resisting magical energy.
                }
                else if (m.Mana >= 100)
                {
                    m.Mana -= Utility.Random(1, 100);
                }
                else
                {
                    m.Mana -= Utility.Random(1, m.Mana);
                }

                m.FixedParticles(0x374A, 10, 15, 5032, EffectLayer.Head);
                m.PlaySound(0x1F8);
            }

            FinishSequence();
        }
Beispiel #16
0
        public void OnTarget(IDamageable d)
        {
            if (d == null)
            {
                return;
            }
            else if (CheckHSequence(d))
            {
                IDamageable target = d;
                IDamageable source = Caster;

                SpellHelper.Turn(Caster, target);

                if (Core.SA && HasDelayContext(target))
                {
                    DoHurtFizzle();
                    return;
                }

                if (SpellHelper.CheckReflect((int)Circle, ref source, ref target))
                {
                    Timer.DelayCall(TimeSpan.FromSeconds(.5), () =>
                    {
                        source.MovingParticles(target, 0x36D4, 7, 0, false, true, 0x49A, 0, 0, 9502, 4019, 0x160);
                        source.PlaySound(0x211);
                    });
                }

                double damage = GetNewAosDamage(10, 1, 4, target);

                SpellHelper.Damage(this, target, damage, 0, 0, 0, 0, 0, 100, 0);

                Caster.MovingParticles(d, 0x36D4, 7, 0, false, true, 0x49A, 0, 0, 9502, 4019, 0x160);
                Caster.PlaySound(0x211);
            }

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

                if (m.Spell != null)
                {
                    m.Spell.OnCasterHurt();
                }

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

                // adam: we capped GetOffset() at 100 skill so it should now be safe to have mobs casting this
                if (Caster is PlayerMobile || true)
                {
                    if (SpellHelper.AddStatCurse(Caster, m, StatType.Dex))
                    {
                        m.FixedParticles(0x3779, 10, 15, 5009, EffectLayer.Waist);
                        m.PlaySound(0x1E6);
                    }
                    else
                    {
                        Caster.LocalOverheadMessage(MessageType.Regular, 0x3B2, 502632); // The spell fizzles.
                        Caster.FixedEffect(0x3735, 6, 30);
                        Caster.PlaySound(0x5C);
                    }
                }

                m.Paralyzed = false;
            }

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

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

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

                Timer t = (Timer)m_UnderEffect[m];

                if (Caster.Player && m.Player && Caster != m && t == null)
                {
                    TimeSpan duration = SpellHelper.GetDuration(Caster, m);
                    m_UnderEffect[m] = t = Timer.DelayCall(duration, new TimerStateCallback(RemoveEffect), m);
                    m.UpdateResistances();
                }

                if (m.Spell != null)
                {
                    m.Spell.OnCasterHurt();
                }

                m.Paralyzed = false;

                m.FixedParticles(0x374A, 10, 15, 5028, EffectLayer.Waist);
                m.PlaySound(0x1EA);
            }

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

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

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

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

                if (Core.ML)
                {
                    int percentage = (int)(SpellHelper.GetOffsetScalar(this.Caster, m, true) * 100);

                    BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.FeebleMind, 1075833, length, m, percentage.ToString()));
                }

                if (m.Spell != null)
                {
                    m.Spell.OnCasterHurt();
                }

                m.Paralyzed = false;

                m.FixedParticles(0x3779, 10, 15, 5004, EffectLayer.Head);
                m.PlaySound(0x1E4);

                this.HarmfulSpell(m);
            }

            this.FinishSequence();
        }
Beispiel #20
0
        public void Target(Mobile m)
        {
            if (CheckHSequence(m))
            {
                /* Hurls a magical boulder at the Target, dealing physical damage.
                 * This spell also has a chance to knockback and stun a player
                 * Target. The stun chance is determined by a comparison between
                 * the Caster's Evaluating Intelligence and Mysticism skills and
                 * the Target's Resisting Spells skill.
                 */

                SpellHelper.Turn(Caster, m);

                SpellHelper.CheckReflect(5, Caster, ref m);

                Caster.MovingParticles(m, 0x1363, 7, 0, false, true, 0, 0, 0xBBE, 0xFA6, 0xFFFF, 0);
                Caster.PlaySound(0x64B);

                Timer.DelayCall(TimeSpan.FromSeconds(1.0), new TimerStateCallback <Mobile>(Damage), m);
            }

            FinishSequence();
        }
Beispiel #21
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 (CheckHSequence(m))
            {
                SpellHelper.Turn(Caster, m);

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

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

                if (m.Spell != null)
                {
                    m.Spell.OnCasterHurt();
                }

                m.Paralyzed = false;

                m.FixedParticles(0x3779, 10, 15, 5002, EffectLayer.Head);
                m.PlaySound(0x1DF);

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

                BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Clumsy, 1075831, length, m, percentage.ToString()));
            }

            FinishSequence();
        }
Beispiel #22
0
        public void OnTarget(object o)
        {
            Mobile target = o as Mobile;

            if (target == null)
            {
                return;
            }

            if (target.Paralyzed)
            {
                Caster.SendLocalizedMessage(1080134); //Your target is already immobilized and cannot be slept.
            }
            else if (m_ImmunityList.Contains(target))
            {
                Caster.SendLocalizedMessage(1080135); //Your target cannot be put to sleep.
            }
            else if (CheckHSequence(target))
            {
                SpellHelper.CheckReflect(this, Caster, ref target);

                double duration = ((Caster.Skills[CastSkill].Value + Caster.Skills[DamageSkill].Value) / 20) + 2;
                duration -= GetResistSkill(target) / 10;

                if (duration <= 0 || StoneFormSpell.CheckImmunity(target))
                {
                    Caster.SendLocalizedMessage(1080136); //Your target resists sleep.
                    target.SendLocalizedMessage(1080137); //You resist sleep.
                }
                else
                {
                    DoSleep(Caster, target, TimeSpan.FromSeconds(duration));
                }
            }

            FinishSequence();
        }
Beispiel #23
0
        public void Target(IDamageable m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }
            else if (CheckHSequence(m))
            {
                IDamageable source = Caster;
                IDamageable target = m;

                SpellHelper.Turn(Caster, m);

                if (SpellHelper.CheckReflect((int)Circle, ref source, ref target))
                {
                    Timer.DelayCall(TimeSpan.FromSeconds(.5), () =>
                    {
                        source.MovingParticles(target, 0x379F, 7, 0, false, true, 3043, 4043, 0x211);
                        source.PlaySound(0x20A);
                    });
                }

                double damage = GetNewAosDamage(40, 1, 5, m);

                // Do the effects
                Caster.MovingParticles(m, 0x379F, 7, 0, false, true, 3043, 4043, 0x211);
                Caster.PlaySound(0x20A);

                if (damage > 0)
                {
                    // Deal the damage
                    SpellHelper.Damage(this, target, damage, 0, 0, 0, 0, 100);
                }
            }

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

            else if (Caster.HarmfulCheck(m) && CheckSequence())
            {
                Mobile source = Caster;
                SpellHelper.CheckReflect((int)this.Circle, ref source, ref m);
                double damage = Utility.Random(12, 15);

                damage *= GetDamageScalar(m);

                if (Caster != m)
                {
                    Caster.Direction = Caster.GetDirectionTo(m);
                }
                else if (m.Female == false)
                {
                    Caster.PlaySound(1098);
                }
                else if (m.Female == true)
                {
                    Caster.PlaySound(824);
                }

                Effects.SendMovingEffect(Caster, m, 0x36D4, 7, 0, false, true, 0x47e, 3);
                Caster.PlaySound(0x15E);

                m.Damage((int)damage);
                Caster.SendLocalizedMessage(1008127);
            }

            FinishSequence();
        }
Beispiel #25
0
        public void Target(Mobile m)
        {
            if (CheckHSequence(m))
            {
                SpellHelper.Turn(Caster, m);

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

                /* Temporarily chokes off the air suply of the target with poisonous fumes.
                 * The target is inflicted with poison damage over time.
                 * The amount of damage dealt each "hit" is based off of the caster's Spirit Speak skill and the Target's current Stamina.
                 * The less Stamina the target has, the more damage is done by Strangle.
                 * Duration of the effect is Spirit Speak skill level / 10 rounds, with a minimum number of 4 rounds.
                 * The first round of damage is dealt after 5 seconds, and every next round after that comes 1 second sooner than the one before, until there is only 1 second between rounds.
                 * The base damage of the effect lies between (Spirit Speak skill level / 10) - 2 and (Spirit Speak skill level / 10) + 1.
                 * Base damage is multiplied by the following formula: (3 - (target's current Stamina / target's maximum Stamina) * 2).
                 * Example:
                 * For a target at full Stamina the damage multiplier is 1,
                 * for a target at 50% Stamina the damage multiplier is 2 and
                 * for a target at 20% Stamina the damage multiplier is 2.6
                 */

                m.PlaySound(0x22F);
                m.FixedParticles(0x36CB, 1, 9, 9911, 67, 5, EffectLayer.Head);
                m.FixedParticles(0x374A, 1, 17, 9502, 1108, 4, (EffectLayer)255);

                if (!m_Table.Contains(m))
                {
                    Timer t = new InternalTimer(m, Caster);
                    t.Start();

                    m_Table[m] = t;
                }
            }

            FinishSequence();
        }
Beispiel #26
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendAsciiMessage("Target can not be seen."); // Target can not be seen.
            }
            else if (Core.AOS && (m.Frozen || m.Paralyzed || (m.Spell != null && m.Spell.IsCasting)))
            {
                Caster.SendAsciiMessage("The target is already frozen."); // The target is already frozen.
            }
            else if (CheckHSequence(m))
            {
                SpellHelper.Turn(Caster, m);

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

                double duration;
                duration = (((Caster.Skills[SkillName.Magery].Value / 10) + 1) * 2) + 5;

                if (CheckResisted(m, 5))
                {
                    duration /= 2;
                }

                m.Paralyze(TimeSpan.FromSeconds(duration));

                if (m.Spell != null && m.Spell is Spell)
                {
                    ((Spell)m.Spell).Disturb(DisturbType.Hurt);
                }

                m.PlaySound(0x204);
                m.FixedEffect(0x376A, 6, 1);
            }

            FinishSequence();
        }
Beispiel #27
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (CheckHSequence(m))
            {
                Mobile source = Caster;

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

                //dano 2d6 + 10
                int damage = GetNewAosDamage(10, 2, 6, m);

                source.MovingParticles(m, 0x36E4, 5, 0, false, true, 0, 0, 3006, 4006, 0, 0);
                source.PlaySound(0x1E5);

                SpellHelper.Damage(this, m, damage, 0, 100, 0, 0, 0);
            }

            FinishSequence();
        }
Beispiel #28
0
        public void Target(IDamageable m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }
            else if (CheckHSequence(m))
            {
                IDamageable source = Caster;
                IDamageable target = m;

                SpellHelper.Turn(Caster, m);

                if (SpellHelper.CheckReflect(this, ref source, ref target))
                {
                    Timer.DelayCall(TimeSpan.FromSeconds(.5), () =>
                    {
                        source.MovingParticles(target, 0x36D4, 7, 0, false, true, 9502, 4019, 0x160);
                        source.PlaySound(0x15E);
                    });
                }

                double damage = 0;
                damage = GetNewAosDamage(19, 1, 5, m);

                if (damage > 0)
                {
                    Caster.MovingParticles(m, 0x36D4, 7, 0, false, true, 9502, 4019, 0x160);
                    Caster.PlaySound(0x15E);

                    SpellHelper.Damage(this, target, damage, 0, 100, 0, 0, 0);
                }
            }

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

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

                if (DoCurse(Caster, m, false))
                {
                    HarmfulSpell(m);
                }
                else
                {
                    DoHurtFizzle();
                }
            }

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

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

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

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

                m.Spell?.OnCasterHurt();

                m.Paralyzed = false;

                m.FixedParticles(0x3779, 10, 15, 5009, EffectLayer.Waist);
                m.PlaySound(0x1E6);

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

                BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Weaken, 1075837, length, m, percentage.ToString()));

                HarmfulSpell(m);
            }

            FinishSequence();
        }