protected override void OnTick() { m_Count--; if (m_Count >= 1) { if (m_Game.Running) { m_Game.AnnounceToPlayers(906, "START IN " + m_Count.ToString()); } else { Stop(); } } if (m_Count == 0) // Complete { m_Game.StartGameTimerFinished(); m_Game.AnnounceToPlayers(906, "GO GO GO"); Stop(); } }
public bool detonateLocation(Point3D location) { IPooledEnumerable items = DetonateMap.GetItemsInRange(location, 0); ArrayList todestroy = new ArrayList(); foreach (Item item in items) { if (item is BombermanStone) { BombermanStone stone = (BombermanStone)item; if (stone.Destructable) { Effects.SendLocationEffect(location, DetonateMap, 0x36CB, 10); todestroy.Add(stone); } else { return(false); } } } items.Free(); for (int i = 0; i < todestroy.Count; i++) { if ((todestroy[i]) != null) { ((BombermanStone)todestroy[i]).destroy(); } } if (todestroy.Count > 0) { return(false); } Effects.SendLocationEffect(location, DetonateMap, 0x36CB, 10); ArrayList tokill = new ArrayList(); IPooledEnumerable mobiles = DetonateMap.GetMobilesInRange(location, 0); foreach (Mobile mobile in mobiles) { tokill.Add(mobile); } mobiles.Free(); for (int i = 0; i < tokill.Count; i++) { if (((Mobile)tokill[i]).NetState != null) { if (((Mobile)tokill[i]).CanBeDamaged()) { /*if(m_Game == null) * Console.WriteLine("game"); * if(tokill[i] == null) * Console.WriteLine("tokill"); * if(m_Owner == null) * Console.WriteLine("owner");*/ if (tokill[i] == m_Owner) { m_Game.AnnounceToPlayers(2593, (m_Owner.Name + " has killed himself")); } else { m_Game.AnnounceToPlayers(2593, ((Mobile)tokill[i]).Name + " has been killed by " + m_Owner.Name); } ((Mobile)tokill[i]).Kill(); } } } return(true); }