Ejemplo n.º 1
0
        public override void OnDeath(Mobile m)
        {
            if (!Controller.InUse)
            {
                return;
            }

            if (m is PlayerMobile)
            {
                m.SendMessage("You have died in the RVS Duel!!");
                for (int x = 0; x < 5; x++)
                {
                    Controller.LaunchFireworks(m);
                }
                Timer.DelayCall(TimeSpan.FromSeconds(5.0), new TimerStateCallback(Controller.HandleDeath), (object)m);
            }
            else if (m is BaseCreature)            //CHANGE THIS WHEN APPROPRIATE
            {
                if (this.RegionName == "Sheep")
                {
                    Controller.SpawnEnemies(Controller.Handeling, "Rabbit", 2);
                }
                else if (this.RegionName == "Rabbit")
                {
                    Controller.SpawnEnemies(Controller.Handeling, "Sheep", 2);
                }
            }
            else
            {
                m.Corpse.Delete();
            }
        }
Ejemplo n.º 2
0
        public override void OnDeath(Mobile m)
        {
            if (!Controller.InUse)
            {
                return;
            }

            if (m is PlayerMobile)
            {
                m.SendMessage("You have died in the RVS Duel!!");
                for (int x = 0; x < 5; x++)
                {
                    Controller.LaunchFireworks(m);
                }
                Timer.DelayCall(TimeSpan.FromSeconds(5.0), new TimerStateCallback(Controller.HandleDeath), (object)m);
            }
            else if (m is BaseCreature)            //CHANGE THIS WHEN APPROPRIATE
            {
                if (Controller.SheepPoints >= Controller.Handeling.MonstersOverwhelm)
                {
                    Controller.DeleteEnemies();
                    Controller.EndRVS(1);
                    //Rabbits Have Won
                }
                else if (Controller.RabbitPoints >= Controller.Handeling.MonstersOverwhelm)
                {
                    Controller.DeleteEnemies();
                    Controller.EndRVS(2);
                    //Sheep Have Won
                }
                else if (this.RegionName == "Sheep")
                {
                    Controller.SpawnEnemies(Controller.Handeling, "Rabbit", 2);
                    Controller.SheepPoints--;
                    Controller.RabbitPoints++;
                    Controller.RabbitPoints++;
                    Controller.Handeling.EchoMessage(String.Format("Team Rabbit has {0} Points!", Controller.RabbitPoints.ToString()));
                }
                else if (this.RegionName == "Rabbit")
                {
                    Controller.SpawnEnemies(Controller.Handeling, "Sheep", 2);
                    Controller.RabbitPoints--;
                    Controller.SheepPoints++;
                    Controller.SheepPoints++;
                    Controller.Handeling.EchoMessage(String.Format("Team Sheep has {0} Points!", Controller.SheepPoints.ToString()));
                }
            }
            else
            {
                m.Corpse.Delete();
            }
        }