예제 #1
0
        private static bool DirectionCheck(WarHorse h, Mobile m)
        {
            if (h.Rider == null || h.Rider.Deleted)
                return false;

            switch (h.Rider.GetDirectionTo(m))
            {
                case Direction.North:
                    switch (h.Rider.Direction)
                    {
                        case Direction.North: return true;
                        case Direction.Right: return true;
                        case Direction.Up: return true;
                        default: return false;
                    }
                case Direction.Right:
                    switch (h.Rider.Direction)
                    {
                        case Direction.North: return true;
                        case Direction.Right: return true;
                        case Direction.East: return true;
                        default: return false;
                    }
                case Direction.East:
                    switch (h.Rider.Direction)
                    {
                        case Direction.East: return true;
                        case Direction.Right: return true;
                        case Direction.Down: return true;
                        default: return false;
                    }
                case Direction.Down:
                    switch (h.Rider.Direction)
                    {
                        case Direction.Down: return true;
                        case Direction.East: return true;
                        case Direction.South: return true;
                        default: return false;
                    }
                case Direction.South:
                    switch (h.Rider.Direction)
                    {
                        case Direction.South: return true;
                        case Direction.Down: return true;
                        case Direction.Left: return true;
                        default: return false;
                    }
                case Direction.Left:
                    switch (h.Rider.Direction)
                    {
                        case Direction.Left: return true;
                        case Direction.South: return true;
                        case Direction.West: return true;
                        default: return false;
                    }
                case Direction.West:
                    switch (h.Rider.Direction)
                    {
                        case Direction.West: return true;
                        case Direction.Left: return true;
                        case Direction.Up: return true;
                        default: return false;
                    }
                case Direction.Up:
                    switch (h.Rider.Direction)
                    {
                        case Direction.Up: return true;
                        case Direction.West: return true;
                        case Direction.North: return true;
                        default: return false;
                    }

                default: return false;
            }
        }
예제 #2
0
 public void MountSoldier()
 {
     switch (Nation)
     {
         case Nation.Alyrian:
             {
                 AlyrianHorse alyrianhorse = new AlyrianHorse();
                 alyrianhorse.Rider = this;
                 break;
             }
         case Nation.Azhuran:
             {
                 AzhuranHorse azhuranhorse = new AzhuranHorse();
                 azhuranhorse.Rider = this;
                 break;
             }
         case Nation.Khemetar:
             {
                 KhemetarHorse khemetarhorse = new KhemetarHorse();
                 khemetarhorse.Rider = this;
                 break;
             }
         case Nation.Mhordul:
             {
                 MhordulHorse mhordulhorse = new MhordulHorse();
                 mhordulhorse.Rider = this;
                 break;
             }
         case Nation.Tyrean:
             {
                 TyreanHorse tyreanhorse = new TyreanHorse();
                 tyreanhorse.Rider = this;
                 break;
             }
         case Nation.Vhalurian:
             {
                 if (Utility.RandomBool())
                 {
                     VhalurianHorse vhalurianhorse = new VhalurianHorse();
                     vhalurianhorse.Rider = this;
                 }
                 else
                 {
                     WarHorse warhorse = new WarHorse();
                     warhorse.Rider = this;
                 }
                 break;
             }
         case Nation.Imperial:
             {
                 if (Utility.RandomBool())
                 {
                     VhalurianHorse vhorse = new VhalurianHorse();
                     vhorse.Rider = this;
                 }
                 else
                 {
                     TyreanHorse thorse = new TyreanHorse();
                     thorse.Rider = this;
                 }
                 break;
             }
         case Nation.Sovereign:
             {
                 if (Utility.RandomBool())
                 {
                     MhordulHorse mhorse = new MhordulHorse();
                     mhorse.Rider = this;
                 }
                 else
                 {
                     AlyrianHorse ahorse = new AlyrianHorse();
                     ahorse.Rider = this;
                 }
                 break;
             }
         case Nation.Society:
             {
                 if (Utility.RandomBool())
                 {
                     KhemetarHorse khorse = new KhemetarHorse();
                     khorse.Rider = this;
                 }
                 else
                 {
                     AzhuranHorse azhorse = new AzhuranHorse();
                     azhorse.Rider = this;
                 }
                 break;
             }
         case Nation.Insularii:
             {
                 if (Utility.RandomBool())
                 {
                     MhordulHorse imhorse = new MhordulHorse();
                     imhorse.Rider = this;
                 }
                 else
                 {
                     WarHorse iwarhorse = new WarHorse();
                     iwarhorse.Rider = this;
                 }
                 break;
             }
     }
 }
예제 #3
0
 public WarHorseAttackTimer(WarHorse h)
     : base(System.TimeSpan.FromSeconds(1), System.TimeSpan.FromMinutes(Utility.RandomMinMax(1,3)))
 {
     m_Horse = h;
     Priority = TimerPriority.OneMinute;
 }