Пример #1
0
        internal static World CreateWorld()
        {
            World newWorld = new World();

            newWorld.AddLocation(-2, -1, "Farmer's Field",
                                 "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse mauris.",
                                 "farmfield.jpg",
                                 "Map-2-1.png");

            newWorld.LocationAt(-2, -1).AddMonster(2, 100);

            newWorld.AddLocation(-1, -1, "Farmer's House",
                                 "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse mauris.",
                                 "farmhouse.jpg",
                                 "Map-1-1.png");

            newWorld.LocationAt(-1, -1).TraderHere = TraderFactory.GetTraderById(2); // Farmer Ted Trader

            newWorld.AddLocation(0, -1, "Home",
                                 "This is your house",
                                 "house.jpg", "Map0-1.png");

            newWorld.AddLocation(0, 0, "Town Square",
                                 "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse mauris.",
                                 "fountain.jpg", "Map00.png");

            newWorld.AddLocation(0, 1, "Herbalist hut",
                                 "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse mauris.",
                                 "herbalisthut.jpg", "Map01.png");

            newWorld.LocationAt(0, 1).TraderHere = TraderFactory.GetTraderById(3); // Pete the ganja man Trader

            newWorld.LocationAt(0, 1).QuestsAvailableHere.Add(QuestFactory.GetQuestById(1));

            newWorld.AddLocation(0, 2, "Herb Garden",
                                 "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse mauris.",
                                 "herbgarden.jpg", "Map02.png");

            newWorld.LocationAt(0, 2).AddMonster(1, 100);

            newWorld.AddLocation(-1, 0, "Trading shop",
                                 "I got what you need",
                                 "tradingshop.jpg", "Map-10.png");
            newWorld.LocationAt(-1, 0).TraderHere = TraderFactory.GetTraderById(1); // Susan Trader

            newWorld.AddLocation(1, 0, "Town gate",
                                 "Are you sure you want to leave?",
                                 "towngate.jpg", "Map10.png");

            newWorld.AddLocation(2, 0, "Spider forest",
                                 "Oh no you got lost",
                                 "spiderforest.png", "Map20.png");

            newWorld.LocationAt(2, 0).AddMonster(3, 100);

            return(newWorld);
        }
Пример #2
0
        internal static World CreateWorld()
        {
            World newWorld = new World();

            newWorld.AddLocation(-2, -1, "农民的田地",
                                 "这里生长着成排的玉米,中间藏着巨大的老鼠。",
                                 "FarmFields.png");
            //添加老鼠
            newWorld.LocationAt(-2, -1).AddMonster(2, 100);

            newWorld.AddLocation(-1, -1, "农民的房子",
                                 "这是你邻居农夫泰德的房子。",
                                 "Farmhouse.png");
            newWorld.LocationAt(-1, -1).TraderHere =
                TraderFactory.GetTraderByName("农夫泰德");

            newWorld.AddLocation(0, -1, "家",
                                 "这是你的房子",
                                 "Home.png");

            newWorld.AddLocation(-1, 0, "贸易商店",
                                 "商人苏珊的商店。",
                                 "Trader.png");
            newWorld.LocationAt(-1, 0).TraderHere =
                TraderFactory.GetTraderByName("苏珊");

            newWorld.AddLocation(0, 0, "城市广场",
                                 "你在这里看到一个喷泉。",
                                 "TownSquare.png");

            newWorld.AddLocation(1, 0, "城堡之门",
                                 "这里有一扇门,保护小镇免受巨蜘蛛的侵袭。",
                                 "TownGate.png");

            newWorld.AddLocation(2, 0, "蜘蛛森林",
                                 "这片森林里的树都结满了蜘蛛网。",
                                 "SpiderForest.png");
            //添加蜘蛛
            newWorld.LocationAt(2, 0).AddMonster(3, 100);

            newWorld.AddLocation(0, 1, "草药医生的小屋",
                                 "你看到一个小茅屋,屋顶上正在晾干草药。.",
                                 "HerbalistsHut.png");
            newWorld.LocationAt(0, 1).TraderHere =
                TraderFactory.GetTraderByName("草药医生皮特");
            //添加除蛇任务
            newWorld.LocationAt(0, 1).QuestsAvailableHere.Add(QuestFactory.GetQuestById(1));

            newWorld.AddLocation(0, 2, "草药医生的花园",
                                 "这里有许多植物,它们后面藏着蛇。",
                                 "HerbalistsGarden.png");
            //添加蛇
            newWorld.LocationAt(0, 2).AddMonster(1, 100);
            return(newWorld);
        }
Пример #3
0
        private static void AddQuests(Location location, XmlNodeList quests)
        {
            if (quests == null)
            {
                return;
            }

            foreach (XmlNode questNode in quests)
            {
                location.QuestsAvailableHere
                .Add(QuestFactory.GetQuestById(questNode.AttributeAsInt("ID")));
            }
        }
Пример #4
0
        internal static World CreateWorld()
        {
            World newWorld = new World();

            newWorld.AddLocation(-2, -1, "Farmer's Field",
                                 "There are rows of corn growing here, with giant rats hiding between them.",
                                 "/Engine;component/Images/Locations/FarmFields.png");

            newWorld.AddLocation(-1, -1, "Farmer's House",
                                 "This is the house of your neighbor, Farmer Ted.",
                                 "/Engine;component/Images/Locations/Farmhouse.png");

            newWorld.AddLocation(0, -1, "Home",
                                 "This is your home",
                                 "/Engine;component/Images/Locations/Home.png");

            newWorld.AddLocation(-1, 0, "Trading Shop",
                                 "The shop of Susan, the trader.",
                                 "/Engine;component/Images/Locations/Trader.png");

            newWorld.AddLocation(0, 0, "Town square",
                                 "You see a fountain here.",
                                 "/Engine;component/Images/Locations/TownSquare.png");

            newWorld.AddLocation(1, 0, "Town Gate",
                                 "There is a gate here, protecting the town from giant spiders.",
                                 "/Engine;component/Images/Locations/TownGate.png");

            newWorld.AddLocation(2, 0, "Spider Forest",
                                 "The trees in this forest are covered with spider webs.",
                                 "/Engine;component/Images/Locations/SpiderForest.png");

            newWorld.AddLocation(0, 1, "Herbalist's hut",
                                 "You see a small hut, with plants drying from the roof.",
                                 "/Engine;component/Images/Locations/HerbalistsHut.png");

            newWorld.LocationAt(0, 1).QuestsAvailableHere.Add(QuestFactory.GetQuestById(1));

            newWorld.AddLocation(0, 2, "Herbalist's garden",
                                 "There are many plants here, with snakes hiding behind them.",
                                 "/Engine;component/Images/Locations/HerbalistsGarden.png");

            return(newWorld);
        }
Пример #5
0
        // Internal classes may only be used inside the same project. Only GameSession should be using me
        internal static World CreateWorld()
        {
            World newWorld = new World();

            newWorld.AddLocation(
                0,
                -1,
                "Home",
                "Before you is a ramshackle hut with mold growing along the walls from the steady misting rain.",
                "Home.png"
                );

            newWorld.AddLocation(
                -1,
                -1,
                "Farmer's House",
                "This is the farmer's hut.'",
                "FarmHouse.png"
                );

            newWorld.LocationAt(-1, -1).TraderHere = TraderFactory.GetTraderByName("Farmer Ted");

            newWorld.AddLocation(
                -2,
                -1,
                "Farmer's Field",
                "Rows of corn stretch as far as the eye can see. The wind howls, and from the stalks the sound of crunching emanates.",
                "FarmFields.png"
                );

            newWorld.LocationAt(-2, -1).AddMonster(2, 100);

            newWorld.AddLocation(
                -1,
                0,
                "Trading Shop",
                "Ye ole shoppe",
                "Trader.png"
                );

            newWorld.LocationAt(-1, 0).TraderHere = TraderFactory.GetTraderByName("Susan");

            newWorld.AddLocation(
                0,
                0,
                "Town Square",
                "This is where the town gallows stand.",
                "TownSquare.png"
                );
            newWorld.AddLocation(
                1,
                0,
                "Town Gate",
                "The gate dangles from the walls by a single rusty hinge.",
                "TownGate.png"
                );

            newWorld.AddLocation(
                2,
                0,
                "Spider Forest",
                "What light is not blocked by the tree canopy is captured by the thick layers of gossamer web.",
                "SpiderForest.png"
                );

            newWorld.LocationAt(2, 0).AddMonster(3, 100);

            newWorld.AddLocation(
                0,
                1,
                "Herbalist's Hut",
                "A moldy ramshackle hut, before which an evil looking scarecrow spins in the wind.",
                "HerbalistsHut.png"
                );

            newWorld.LocationAt(0, 1).TraderHere = TraderFactory.GetTraderByName("Pete the Herbalist");

            newWorld.LocationAt(0, 1).QuestsAvailableHere.Add(QuestFactory.GetQuestById(1));

            newWorld.AddLocation(
                0,
                2,
                "Herbalist's Garden",
                "Many strange flowers grow wild here. You hear the hissing of angry snakes.",
                "HerbalistsGarden.png"
                );

            newWorld.LocationAt(0, 2).AddMonster(1, 100);

            return(newWorld);
        }