Пример #1
0
        private void Gale()
        {
            TeiravonMobile caster = (TeiravonMobile)this.ControlMaster;
            ArrayList      list   = new ArrayList();

            if (caster == null)
            {
                caster = (TeiravonMobile)this.SummonMaster;
            }

            if (caster == null)
            {
                return;
            }

            if (!caster.Warmode)
            {
                return;
            }

            Engines.PartySystem.Party party = Engines.PartySystem.Party.Get(this.SummonMaster);

            foreach (Mobile m in this.GetMobilesInRange(4))
            {
                if (party != null && party.Contains(m))
                {
                    continue;
                }
                if (m is PlayerVendor)
                {
                    continue;
                }

                if (m is BaseCreature && (((BaseCreature)m).ControlMaster == this.SummonMaster || ((BaseCreature)m).AI == AIType.AI_Vendor) || m.Blessed)
                {
                    continue;
                }

                if (m.Alive && !m.IsDeadBondedPet && m != this.SummonMaster && m != this)
                {
                    list.Add(m);
                }
            }

            if (list.Count > 0)
            {
                this.FixedEffect(0x3779, 10, 20);
                caster.PlaySound(0x594);
            }

            for (int i = 0; i < list.Count; ++i)
            {
                Mobile m = (Mobile)list[i];

                if (m != this && m != caster && !m.Frozen)
                {
                    new Gust(caster, m).MoveToWorld(m.Location, m.Map);
                }
            }
            //int gusts = 1 + (caster.PlayerLevel / 4);
            //for (int i = 0; i < gusts; ++i)
            //    new Gust(caster).MoveToWorld(this.Location, caster.Map);


            return;
        }
Пример #2
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 (Caster is TeiravonMobile)
                {
                    TeiravonMobile tav     = Caster as TeiravonMobile;
                    ArrayList      targets = new ArrayList();

                    if (tav.IsForester() && tav.HasFeat(TeiravonMobile.Feats.TempestsWrath))
                    {
                        m.BoltEffect(0);
                        damage = GetNewAosDamage(28, 2, 6, Caster.Player && m.Player);
                        int splash = (int)damage / 3;


                        Engines.PartySystem.Party party = Engines.PartySystem.Party.Get(Caster);

                        try
                        {
                            foreach (Mobile x in m.GetMobilesInRange(3))
                            {
                                if (party != null && party.Contains(x))
                                {
                                    continue;
                                }

                                if (x.AccessLevel > Caster.AccessLevel)
                                {
                                    continue;
                                }

                                if (x is BaseCreature)
                                {
                                    if (((BaseCreature)x).ControlMaster == Caster)
                                    {
                                        continue;
                                    }

                                    if (((BaseCreature)x).ControlMaster != null)
                                    {
                                        Mobile v = ((BaseCreature)x).ControlMaster;
                                        if (party != null && party.Contains(v))
                                        {
                                            continue;
                                        }
                                    }
                                    else
                                    {
                                        Effects.SendMovingEffect(m, x, 0x379F, 16, 5, true, false);
                                        AOS.Damage(x, Caster, splash, 0, 0, 0, 0, 100);
                                    }
                                }

                                else if (x != Caster && Caster.HarmfulCheck(x) && x != m)
                                {
                                    Effects.SendMovingEffect(m, x, 0x379F, 16, 5, true, false);
                                    AOS.Damage(x, Caster, splash, 0, 0, 0, 0, 100);
                                }
                            }
                        }
                        catch { }
                        SpellHelper.Damage(this, m, damage, 0, 0, 0, 0, 100);

                        return;
                    }
                    // Effects.SendLocationEffect(m.Location, m.Map, 0x3789, 18);
                }

                if (Core.AOS)
                {
                    damage = GetNewAosDamage(22, 1, 4, Caster.Player && m.Player);
                }
                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();
        }
Пример #3
0
        protected override void OnTick()
        {
            if (t_Caster == null)
            {
                return;
            }
            if (Run == Max)
            {
                return;
            }

            t_Caster.PlaySound(0x2F3);
            Engines.PartySystem.Party p = Engines.PartySystem.Party.Get(t_Caster);


            //Determines aura range
            int auraRange = 6;

            ArrayList Tremor = new ArrayList();

            foreach (Mobile m in t_Caster.GetMobilesInRange(auraRange))
            {
                if (m == null)
                {
                    continue;
                }

                if (m.AccessLevel > t_Caster.AccessLevel)
                {
                    continue;
                }

                if (p != null && p.Contains(m))
                {
                    continue;
                }

                if (m is BaseCreature)
                {
                    if (!m.Alive || m == null)
                    {
                        continue;
                    }

                    BaseCreature c = (BaseCreature)m;

                    if (c.Controled || c.Summoned)
                    {
                        if (c.ControlMaster == t_Caster || c.SummonMaster == t_Caster)
                        {
                            continue;
                        }

                        if (p != null && (p.Contains(c.ControlMaster) || p.Contains(c.SummonMaster)))
                        {
                            continue;
                        }
                        ;
                    }

                    Tremor.Add(m);
                }
                else if (m is TeiravonMobile)
                {
                    if (m == t_Caster || !m.Alive || m == null)
                    {
                        continue;
                    }

                    TeiravonMobile m_Target = (TeiravonMobile)m;

                    if (m_Target.IsEvil() || m_Target.Karma <= -3000)
                    {
                        Tremor.Add(m_Target);
                    }
                }
            }

            foreach (Mobile m in Tremor)
            {
                if (m != null)
                {
                    int damage = (int)(t_Caster.PlayerLevel / 3);



                    if (damage >= 3)
                    {
                        m.Damage(Utility.RandomMinMax(damage - 2, damage + 2), t_Caster);
                    }
                    else
                    {
                        m.Damage(1, t_Caster);
                    }

                    m.Paralyze(TimeSpan.FromSeconds(0.5));
                }
            }
            Run++;
            Timer m_Timer = new TremorTimer(t_Caster, Run, 4, DateTime.Now + TimeSpan.FromSeconds(0.5));
        }