public static void FlameCross2(Mobile from) { if (!CanUse(from)) { return; } Mobile target = from.Combatant; if (target == null) { return; } Point3D point = from.Location; Direction d = from.GetDirectionTo(target); int itemid = 0; if (d == Direction.North) { itemid = 0x3996; } else if (d == Direction.East) { itemid = 0x398C; } else if (d == Direction.South) { itemid = 0x3996; } else if (d == Direction.West) { itemid = 0x398C; } for (int j = 0; j < 16; j++) { Ability.IncreaseByDirection(ref point, d); if (from.CanSee(point)) { // Damage was 2 on the nightmare which has 30~40% fire res. 4 - 35% = 2.6, close enough for me. if (itemid != 0) { new FireFieldSpell.FireFieldItem(itemid, point, from, from.Map, TimeSpan.FromSeconds(3), 1, 100); } else { new OtherFireFieldItem2(0x3996, point, from, from.Map, TimeSpan.FromSeconds(6), 1, 80); new OtherFireFieldItem2(0x398C, point, from, from.Map, TimeSpan.FromSeconds(6), 1, 80); } } } point = from.Location; }
public static void FlameCross(Mobile from) { if (!CanUse(from)) { return; } Point3D point = from.Location; Direction d = Direction.North; int itemid = 0x3996; Map map = from.Map; for (int i = 0; i < 8; i++) { switch (i) { case 1: { d = Direction.Right; itemid = 0; } break; case 2: { d = Direction.East; itemid = 0x398C; } break; case 3: { d = Direction.Down; itemid = 0; } break; case 4: { d = Direction.South; itemid = 0x3996; } break; case 5: { d = Direction.Left; itemid = 0; } break; case 6: { d = Direction.West; itemid = 0x398C; } break; case 7: { d = Direction.Up; itemid = 0; } break; } for (int j = 0; j < 16; j++) { Ability.IncreaseByDirection(ref point, d); if (from.CanSee(point)) { // Damage was 2 on the nightmare which has 30~40% fire res. 4 - 35% = 2.6, close enough for me. if (itemid != 0) { new FireFieldSpell.FireFieldItem(itemid, point, from, from.Map, TimeSpan.FromSeconds(30), 1, 100); } else { new OtherFireFieldItem(0x3996, point, from, from.Map, TimeSpan.FromSeconds(30), 1, 80); new OtherFireFieldItem(0x398C, point, from, from.Map, TimeSpan.FromSeconds(30), 1, 80); } } } point = from.Location; } Effects.PlaySound(point, map, 0x44B); }
protected override void OnTick() { if (m_From == null || m_From.Deleted) { Stop(); return; } m_Count++; if (m_Count == 0) { Ability.IncreaseByDirection(ref m_Point, m_D); } else { Ability.IncreaseByDirection(ref m_Point, JaggedLine(m_D)); } Point3D p = new Point3D(m_Point.X, m_Point.Y, m_Map.GetAverageZ(m_Point.X, m_Point.Y)); if (m_Map.CanFit(p, 16, false, false)) { bool canplace = true; foreach (Item item in m_Map.GetItemsInRange(p, 0)) { if (item != null) { if (item is FireField && item.Visible == false) { canplace = false; break; } } } if (canplace) { new FireField(m_From, 30, 25, 35, false, new Point3D(p.X, p.Y, p.Z), m_Map).Visible = false; new FireField(m_From, 30, 0, 0, true, new Point3D(p.X, p.Y + 1, p.Z), m_Map); new FireField(m_From, 30, 0, 0, false, new Point3D(p.X + 1, p.Y, p.Z), m_Map); } } else { m_Count = 999; } if (m_Count > m_MaxCount) { Stop(); } }