Exemplo n.º 1
0
        static void InitMap(ref Map map)
        {
            // Add locations with their coordinates to this list.

            /*Forrest forrest = new Forrest("Black Forrest");
             * map.AddLocation(forrest, 0, 2);
             * Cliff cliff = new Cliff("Rockface");
             * map.AddLocation(cliff, 0, 3);
             * Church church = new Church("Old Chapel");
             * map.AddLocation(church, 1, 2);
             * Swamp swamp = new Swamp("Bog");
             * map.AddLocation(swamp, 0, 1);*/

            Room room = new Room("Starting room", 3, 3);

            room.SetEnclosed(true);
            room.SetBlockage(new Door("door 1", true, 2, "Discription"), 1, 2);
            room.SetBlockage(new WallDiscription("", true, 0, ""), 0, 0);
            room.AddItem(new Key("door 1", true), 1, 1);
            room.SetDiscription("{0}. This room will start whit helping you to play.");
            room.AddLocations(ref map, 0, 0);

            room = new Room("start", 6, 3);
            room.SetEnclosed(true);
            room.SetBlockage(new Door("door 1", true, 0, "Discription"), 1, 0);
            room.SetBlockage(new Door("door 2", true, 2, "Discription: Wow, this is impressive.. but it is creepy too, let's start this adventure!"), 1, 2);
            room.SetBlockage(new Door("door 3", true, 2, "Discription: Pff, i hope this is the last room, atleast the room is called end. So i guess this is the end."), 1, 2);
            room.SetBlockage(new Door("door 4", true, 0, "Discription: ehm.. That other room looked creepy, but this is even worse! why did i ever start this.."), 4, 0);
            room.SetBlockage(new Door("door 3", true, 2, "Discription: Pff, i hope this is the last room, atleast the room is called end. So i guess this is the end."), 4, 2);
            room.SetBlockage(new Door("door 6", true, 1, "Discription: brrr it looks creepy in here.. I better watch out for monsters or traps.."), 5, 1);
            //room.SetBlockage(new Door("door 6", true, 3, "Discription: brrr it looks creepy in here.. I better watch out for monsters or traps.."), 0, 1)
            room.AddItem(new Key("door 2", true), 2, 2);
            room.SetDiscription("{0} .You walk into a big empty room with three doors.\nWitch one do you choose....");
            room.AddLocations(ref map, 0, 3);

            room = new Room("", 3, 3);
            room.SetEnclosed(true);
            room.SetBlockage(new Door("door 2", true, 2, "Discription: Wow, this is impressive.. but it is creepy too, let's start this adventure!"), 1, 2);
            room.SetDiscription("Wow, this is impressive.. but it is creepy too, let's start this adventure!");
            room.AddLocations(ref map, 0, 6);

            room = new Room("Danger 2.0", 3, 3);
            room.SetEnclosed(true);
            room.SetBlockage(new Door("door 3", true, 0, "Discription: Wow, this is impressive.. but it is creepy too, let's start this adventure!"), 1, 0);
            room.SetDiscription("This is the {0} room!\n");
            room.SetEnemy(new StoneEnemy("stone enemy", 30), 0, 1);
            room.SetEnemy(new StoneEnemy("stone enemy", 30), 2, 1);
            room.AddLocations(ref map, 3, 6);

            room = new Room("Riddle", 3, 3);
            room.SetEnclosed(true);
            room.SetBlockage(new Door("door 5", true, 0, "Discription: Wow! what is this?! there are riddles everywhere!"), 1, 0);
            room.SetDiscription("This is the {0} room 2\n");
            room.AddLocations(ref map, 6, 6);

            room = new Room("Danger!", 3, 3);
            room.SetEnclosed(true);
            room.AddItem(new MagicStrawberry_s("magic strawberry's", true), 1, 1);
            room.SetBlockage(new Door("door 6", true, 3, "Discription: brrr it looks creepy in here.. I better watch out for monsters or traps.."), 0, 1);
            room.SetDiscription("This is the {0} room \n");
            room.AddLocations(ref map, 6, 3);

            map.SetRoom(" ");
        }