public override void OnMovement(Mobile m, Point3D oldLocation) { TeiravonMobile m_Player = m as TeiravonMobile; if (m_Player == null || m_Player.AccessLevel != AccessLevel.Player) { return; } if (Utility.InRange(GetWorldLocation(), m.Location, m_MaxRange) && m_Player.AccessLevel == AccessLevel.Player && !m_Player.IsDrow()) { m_Player.GlobeOfDarkness = true; } else { m_Player.GlobeOfDarkness = false; foreach (Mobile blah in m_Player.GetMobilesInRange(15)) { if (!blah.Hidden) { m_Player.Send(new Network.MobileIncoming(m, blah)); } } } }
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; } } } }
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)); }