Ejemplo n.º 1
0
            protected override void OnTick()
            {
                if (m_Owner.Deleted)
                {
                    Stop();
                    return;
                }

                foreach (Mobile m in m_Owner.GetMobilesInRange(9))
                {
                    if (m == m_Owner || m == m_Owner.Harrower || !m_Owner.CanBeHarmful(m))
                    {
                        continue;
                    }

                    if (m is BaseCreature)
                    {
                        BaseCreature bc = m as BaseCreature;

                        if (bc.Controlled || bc.Summoned)
                        {
                            m_ToDrain.Add(m);
                        }
                    }
                    else if (m.Player)
                    {
                        m_ToDrain.Add(m);
                    }
                }

                foreach (Mobile m in m_ToDrain)
                {
                    m_Owner.DoHarmful(m);

                    m.FixedParticles(0x374A, 10, 15, 5013, 0x455, 0, EffectLayer.Waist);
                    m.PlaySound(0x1F1);

                    int drain = Utility.RandomMinMax(14, 30);

                    if (LifeShieldLotion.UnderEffect(m))
                    {
                        double scale = Utility.RandomMinMax(50, 100) / 100.0;
                        drain = (int)(drain * scale);
                    }

                    m_Owner.Hits += drain;

                    if (m_Owner.Harrower != null)
                    {
                        m_Owner.Harrower.Hits += drain;
                    }

                    m.Damage(drain, m_Owner);
                }

                m_ToDrain.Clear();
            }
Ejemplo n.º 2
0
            protected override void OnTick()
            {
                if (m_Owner.Deleted)
                {
                    Stop();
                    return;
                }

                foreach (Mobile m in m_Owner.GetMobilesInRange(9))
                {
                    if (m == m_Owner || m == m_Owner.Harrower || !m_Owner.CanBeHarmful(m) ||
                        m.AccessLevel != AccessLevel.Player)
                    {
                        continue;
                    }

                    if (m is BaseCreature)
                    {
                        var bc = m as BaseCreature;

                        if (bc.Controlled || bc.Summoned)
                        {
                            m_ToDrain.Add(m);
                        }
                    }
                    else if (m.Player)
                    {
                        m_ToDrain.Add(m);
                    }
                }

                foreach (Mobile m in m_ToDrain)
                {
                    m_Owner.DoHarmful(m);

                    m.FixedParticles(0x374A, 10, 15, 5013, 0x455, 0, EffectLayer.Waist);
                    m.PlaySound(0x1F1);

                    int drain = Utility.RandomMinMax(14, 30);

                    m_Owner.Hits += drain;

                    if (m_Owner.Harrower != null)
                    {
                        m_Owner.Harrower.Hits += drain;
                    }

                    m.Damage(drain, m_Owner);
                }

                m_ToDrain.Clear();
            }
Ejemplo n.º 3
0
            protected override void OnTick()
            {
                if (m_Owner.Deleted)
                {
                    Stop();
                    return;
                }

                if (0.2 < Utility.RandomDouble())
                {
                    return;
                }

                IPooledEnumerable eable = m_Owner.GetMobilesInRange(8);

                foreach (Mobile m in eable)
                {
                    if (m != m_Owner && m.Player && m_Owner.CanBeHarmful(m))
                    {
                        m_ToDrain.Add(m);
                    }
                }
                eable.Free();

                foreach (Mobile m in m_ToDrain)
                {
                    m_Owner.DoHarmful(m);

                    m.FixedParticles(0x374A, 10, 15, 5013, 0x455, 0, EffectLayer.Waist);
                    m.PlaySound(0x231);

                    m.SendMessage("You feel the life drain out of you!");

                    m_Owner.Hits += 20;

                    if (m_Owner.Harrower != null)
                    {
                        m_Owner.Harrower.Hits += 20;
                    }

                    m.Damage(20, m_Owner);
                }

                m_ToDrain.Clear();
            }
Ejemplo n.º 4
0
            protected override void OnTick()
            {
                if (m_Owner.Deleted)
                {
                    Stop();
                    return;
                }

                foreach (Mobile m in m_Owner.GetMobilesInRange(8))
                {
                    if (m != m_Owner && m.Player && m_Owner.CanBeHarmful(m))
                    {
                        m_ToDrain.Add(m);
                    }
                }

                if (m_ToDrain.Count == 0)
                {
                    return;
                }

                foreach (Mobile m in m_ToDrain)
                {
                    m_Owner.DoHarmful(m);

                    m.FixedParticles(0x374A, 10, 15, 5013, 0x455, 0, EffectLayer.Waist);
                    m.PlaySound(0x1F1);

                    int drain = Utility.RandomMinMax(14, 30);

                    m_Owner.Hits += drain;

                    if (m_Owner.Harrower != null)
                    {
                        m_Owner.Harrower.Hits += drain;
                    }

                    m.Damage(drain, m_Owner);
                }

                m_ToDrain.Clear();
            }
Ejemplo n.º 5
0
            protected override void OnTick()
            {
                if (m_Owner.Deleted)
                {
                    Stop();
                    return;
                }

                var eable = m_Owner.GetMobilesInRange <Mobile>(9);

                foreach (var m in eable)
                {
                    if (m == m_Owner || !(m_Owner.CanBeHarmful(m) || m.Player && m.Alive))
                    {
                        continue;
                    }

                    if (!(m is BaseCreature bc) || !(bc.Controlled || bc.Summoned || bc.Team != m_Owner.Team))
                    {
                        continue;
                    }

                    m_Owner.DoHarmful(m);

                    m.FixedParticles(0x374A, 10, 15, 5013, 0x455, 0, EffectLayer.Waist);
                    m.PlaySound(0x1F1);

                    var drain = Utility.RandomMinMax(14, 30);

                    m_Owner.Hits += drain;

                    if (m_Owner.Harrower != null)
                    {
                        m_Owner.Harrower.Hits += drain;
                    }

                    m.Damage(drain, m_Owner);
                }

                eable.Free();
            }
Ejemplo n.º 6
0
            protected override void OnTick()
            {
                if (m_Owner.Deleted)
                {
                    Stop();
                    return;
                }

                IPooledEnumerable eable = m_Owner.GetMobilesInRange(9);

                foreach (Mobile m in eable)
                {
                    if (m == m_Owner || m == m_Owner.Harrower || !m_Owner.CanBeHarmful(m))
                    {
                        continue;
                    }

                    if (m is BaseCreature)
                    {
                        BaseCreature bc = m as BaseCreature;

                        if (bc.Controlled || bc.Summoned)
                        {
                            m_ToDrain.Add(m);
                        }
                    }
                    else if (m.Player)
                    {
                        m_ToDrain.Add(m);
                    }
                }

                eable.Free();

                foreach (Mobile m in m_ToDrain)
                {
                    m_Owner.DoHarmful(m);

                    m.FixedParticles(0x374A, 10, 15, 5013, 0x455, 0, EffectLayer.Waist);
                    m.PlaySound(0x1F1);

                    int drain = Utility.RandomMinMax(14, 30);

                    //Monster Stealables
                    if (m is PlayerMobile)
                    {
                        PlayerMobile pm = m as PlayerMobile;
                        drain = (int)LifeShieldLotion.HandleLifeDrain(pm, drain);
                    }
                    //end

                    m_Owner.Hits += drain;

                    if (m_Owner.Harrower != null)
                    {
                        m_Owner.Harrower.Hits += drain;
                    }

                    m.Damage(drain, m_Owner);
                }

                m_ToDrain.Clear();
            }