예제 #1
0
            public void CheckAlive()
            {
                bool aliveCreatures = false;
                bool aliveGuardians = false;

                foreach (var mobile in m_Controller.Map.GetMobilesInBounds(m_Controller.Rect))
                {
                    if (mobile.Alive)
                    {
                        if (mobile is DarkGuardian)
                        {
                            aliveGuardians = true;
                        }
                        else
                        {
                            aliveCreatures = true;
                        }
                    }
                }


                if (!(aliveCreatures && aliveGuardians))
                {
                    m_Controller.ClearRoom();

                    Stop();
                }
            }
예제 #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 DarkGuardian))
                    {
                        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
                    }
                }
            }
예제 #3
0
            protected override void OnTick()
            {
                count++;

                foreach (var mobile in m_Controller.Map.GetMobilesInBounds(m_Controller.Rect).ToArray())
                {
                    if (!(mobile is DarkGuardian))
                    {
                        if (mobile.IsPlayer)
                        {
                            mobile.LocalOverheadMessage(MessageType.Regular, 0x3B2, 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();
                        }
                    }
                }


                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
                    }
                }
            }
예제 #4
0
            public void CheckAlive()
            {
                bool AliveCreatures = false;

                bool AliveGuardians = false;

                IPooledEnumerable 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)
                        {
                            if (mobile is DarkGuardian)
                            {
                                AliveGuardians = true;
                            }
                            else
                            {
                                AliveCreatures = true;
                            }
                        }
                    }
                }

                eable.Free();

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

                    Stop();
                }
            }