示例#1
0
文件: AshMaze.cs 项目: elavanis/Mud
        public IZone Generate()
        {
            Zone.Name = nameof(AshMaze);

            baseAddExit = typeof(ZoneHelper).GetMethod("AddExitToRoom", BindingFlags.Static | BindingFlags.NonPublic);

            int methodCount = this.GetType().GetMethods(BindingFlags.Instance | BindingFlags.NonPublic).Count();

            for (int i = 0; i < roomCount; i++)
            {
                ZoneHelper.AddRoom(Zone, GetRoom());
            }

            Zone.Rooms[1].AddMobileObjectToRoom(LZoir());
            Zone.Rooms[10].AddMobileObjectToRoom(LZoir());
            Zone.Rooms[20].AddMobileObjectToRoom(LZoir());
            Zone.Rooms[30].AddMobileObjectToRoom(LZoir());

            Zone.Rooms[15].AddMobileObjectToRoom(AshWitch());

            ConnectRooms();



            return(Zone);
        }
示例#2
0
        IZone IZoneCode.Generate()
        {
            zone.InGameDaysTillReset = 5;
            zone.Id   = zoneId;
            zone.Name = nameof(DeepWoodForestGoblinCamp);

            int methodCount = this.GetType().GetMethods(BindingFlags.Instance | BindingFlags.NonPublic).Count();

            for (int i = 1; i <= methodCount; i++)
            {
                string     methodName = "GenerateRoom" + i;
                MethodInfo method     = this.GetType().GetMethod(methodName, BindingFlags.Instance | BindingFlags.NonPublic);
                if (method != null)
                {
                    IRoom room = (IRoom)method.Invoke(this, null);
                    room.Zone = zone.Id;
                    ZoneHelper.AddRoom(zone, room);
                }
            }

            //AddMobs();

            ConnectRooms();

            return(zone);
        }
示例#3
0
        public IZone Generate()
        {
            zone.Id = 1;
            zone.InGameDaysTillReset = 1;
            zone.Name = nameof(StartingBoat);

            int methodCount = this.GetType().GetMethods(BindingFlags.Instance | BindingFlags.NonPublic).Count();

            for (int i = 1; i <= methodCount; i++)
            {
                string     methodName = "GenerateRoom" + i;
                MethodInfo method     = this.GetType().GetMethod(methodName, BindingFlags.Instance | BindingFlags.NonPublic);
                if (method != null)
                {
                    IRoom room = (IRoom)method.Invoke(this, null);
                    room.Zone = zone.Id;
                    ZoneHelper.AddRoom(zone, room);
                }
            }

            ConnectRooms();

            AddAmbientSound();

            return(zone);
        }
示例#4
0
        public IZone Generate()
        {
            zone.Id = 4;
            zone.InGameDaysTillReset = 1;
            zone.Name = nameof(GrandViewBazaar);

            int methodCount = this.GetType().GetMethods(BindingFlags.Instance | BindingFlags.NonPublic).Count();

            for (int i = 1; i <= methodCount; i++)
            {
                string     methodName = "GenerateRoom" + i;
                MethodInfo method     = this.GetType().GetMethod(methodName, BindingFlags.Instance | BindingFlags.NonPublic);
                if (method != null)
                {
                    Room room = (Room)method.Invoke(this, null);
                    room.Zone = zone.Id;
                    ZoneHelper.AddRoom(zone, room);
                }
            }

            AddFlavorNpc(6);

            ConnectRooms();

            return(zone);
        }
示例#5
0
文件: BaseZone.cs 项目: elavanis/Mud
        public void BuildRoomsViaReflection(Type type)
        {
            int methodCount = type.GetMethods(BindingFlags.Instance | BindingFlags.NonPublic).Count();

            for (int i = 1; i <= methodCount; i++)
            {
                string     methodName = "GenerateRoom" + i;
                MethodInfo method     = type.GetMethod(methodName, BindingFlags.Instance | BindingFlags.NonPublic);
                if (method != null)
                {
                    IRoom room = (IRoom)method.Invoke(this, null);
                    room.Zone = Zone.Id;
                    ZoneHelper.AddRoom(Zone, room);
                }
            }
        }
示例#6
0
        //int npcId = 1;
        public IZone Generate()
        {
            Zone.Name = nameof(GrandViewGarden);

            for (int i = 1; i < 20; i++)
            {
                IRoom room = GenerateRoom();
                room.Zone = Zone.Id;
                ZoneHelper.AddRoom(Zone, room);
            }

            Zone.Rooms[6].AddItemToRoom(PrizeRose());
            Zone.Rooms[19].AddItemToRoom(Sign());

            ConnectRooms();

            return(Zone);
        }
示例#7
0
        //int npcId = 1;
        public IZone Generate()
        {
            zone.Id = zoneId;
            zone.InGameDaysTillReset = 1;
            zone.Name = nameof(GrandViewGarden);

            for (int i = 1; i < 20; i++)
            {
                IRoom room = GenerateRoom();
                room.Zone = zone.Id;
                ZoneHelper.AddRoom(zone, room);
            }

            zone.Rooms[6].Items.Add(PrizeRose());
            zone.Rooms[19].Items.Add(Sign());

            ConnectRooms();

            return(zone);
        }
示例#8
0
文件: MountainFace.cs 项目: crybx/mud
        public IZone Generate()
        {
            zone    = new Zone();
            zone.Id = zoneId;
            zone.InGameDaysTillReset = 1;
            zone.Name = nameof(MountainFace);

            int methodCount = this.GetType().GetMethods(BindingFlags.Instance | BindingFlags.NonPublic).Count();

            for (int i = 1; i <= methodCount; i++)
            {
                string     methodName = "GenerateRoom" + i;
                MethodInfo method     = this.GetType().GetMethod(methodName, BindingFlags.Instance | BindingFlags.NonPublic);
                if (method != null)
                {
                    IRoom room = (Room)method.Invoke(this, null);
                    room.Zone = zone.Id;
                    ZoneHelper.AddRoom(zone, room);
                }
            }

            return(zone);
        }
示例#9
0
        public IZone Generate()
        {
            zone.Id = 13;
            zone.InGameDaysTillReset = 5;
            zone.Name = nameof(AbandonedDwarvenMine);

            //int methodCount = this.GetType().GetMethods(BindingFlags.Instance | BindingFlags.NonPublic).Count();
            for (int i = 1; i <= 113; i++)
            {
                IRoom room = null;
                if (i >= 1 && i <= 6)
                {
                    room = OreCartStorage();
                }
                else if (i >= 12 && i <= 46)
                {
                    room = GoldMine();
                }
                else if (i >= 52 && i <= 57)
                {
                    room = GoldMineFloorRoom1();
                }
                else if (i >= 58 && i <= 63)
                {
                    room = GoldMineFloorRoom2();
                }
                else if (i >= 64 && i <= 72)
                {
                    room = GoldMineFloorRoom3();
                }
                else if (i >= 81 && i <= 86)
                {
                    room = GoldMineFloorRoom5();
                }
                else if (i >= 87 && i <= 88)
                {
                    room = GoldMineFloorRoom6();
                }
                else if (i >= 89 && i <= 92)
                {
                    room = GoldMineFloorRoom7();
                }
                else if (i >= 93 && i <= 105)
                {
                    room = GoldMineFloorConnectingTunnel();
                }

                else
                {
                    string     methodName = "GenerateRoom" + i;
                    MethodInfo method     = this.GetType().GetMethod(methodName, BindingFlags.Instance | BindingFlags.NonPublic);
                    if (method != null)
                    {
                        room = (IRoom)method.Invoke(this, null);
                    }
                }
                if (room != null)
                {
                    room.Zone = zone.Id;
                    ZoneHelper.AddRoom(zone, room);
                }
            }

            AddMobs();

            ConnectRooms();

            return(zone);
        }