Ejemplo n.º 1
0
            public void CheckAlive()
            {
                bool AliveCreatures = false;

                var eable = Map.Malas.GetMobilesInBounds(m_Controller.Rect);

                foreach (object obj in eable)
                {
                    if (obj is Mobile)
                    {
                        Mobile mobile = obj as Mobile;

                        if (mobile != null && mobile.Alive && !(mobile is WandererOfTheVoid))
                        {
                            AliveCreatures = true;
                        }
                    }
                }


                if (!AliveCreatures)
                {
                    m_Controller.ClearRoom();

                    Stop();
                }
            }
Ejemplo n.º 2
0
            protected override void OnTick()
            {
                count++;

                IPooledEnumerable eable = Map.Malas.GetMobilesInBounds(m_Controller.Rect);

                ArrayList targets = new ArrayList();

                foreach (Mobile mobile in eable)
                {
                    targets.Add(mobile);
                }

                for (int i = 0; i < targets.Count; ++i)
                {
                    Mobile mobile = targets[i] as Mobile;

                    if (mobile != null && !(mobile is WandererOfTheVoid))
                    {
                        if (mobile.Player)
                        {
                            mobile.Say(1062092);                               // Your body reacts violently from the pain.

                            mobile.Animate(32, 5, 1, true, false, 0);
                        }

                        mobile.Damage(Utility.Random(15, 20));

                        if (count == 10)                           // at OSI at this second all mobiles is killed and room is cleared
                        {
                            mobile.Kill();
                        }
                    }
                }

                eable.Free();

                if (count == 10)
                {
                    if (m_Controller != null)
                    {
                        m_Controller.ClearRoom();                         // clear room

                        if (m_Controller.m_Timer != null)
                        {
                            m_Controller.m_Timer.Stop();                             // stop gas effects
                        }

                        Stop();                         // stop convulsions
                    }
                }
            }