Beispiel #1
0
        public Location LoadForestWilderness()
        {
            Location returnData;

            returnData             = new Location();
            returnData.Name        = "Ashen Forest Wilderness";
            returnData.Description = "The path forks off, the left side leading to the wilderness. The area is thick with trees both dead and alive. There is an eviling feeling in the air. You should turn back now.";

            //Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefintions = new Dictionary <string, LocationDefinition>();

            //Town Center
            LocationDefinition locationDefinition = BankenAshenForest.GetTownInstance().GetForestPathStartDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            Accomplishment shadeLord = Banken.GetBankenAccomplishments().Find(x => x.Name.Contains("Shade Lord"));

            if (GameState.Hero.Accomplishments.Contains(shadeLord))
            {
                locationDefinition = BankenForestWilderness.GetTownInstance().GetEntranceDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
        public static BankenForestWilderness GetTownInstance()
        {
            if (_BankenForestWilderness == null)
            {
                _BankenForestWilderness = new BankenForestWilderness();
            }

            return(_BankenForestWilderness);
        }
        public Location LoadDenseWoods()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Dense Woods";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenForestWilderness.DENSE_WOODS_MOBS));

            _collectedWood = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, BankenForestWilderness.COLLECT_WOOD_KEY));
            string action     = "Collect";
            string itemName   = "Wood";
            string actionText = "You chop down several trees to collect wood.";

            List <LocationAction> locationActions = new List <LocationAction>();

            if (!defeatedMobs)
            {
                returnData.Description = "The trees just off the path are very dense and could be used to collect wood...\nThere are several spiders roaming about the trees.";

                List <Mob> mobs = new List <Mob>();
                mobs.Add(new GiantSpider());
                mobs.Add(new GiantSpider());
                mobs.Add(new GiantSpider());
                mobs.Add(new GiantSpider());
                CombatAction combatAction = new CombatAction("Giant Spiders", mobs);
                combatAction.PostCombat += DenseWoodMobs;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "The trees just off the path are very dense and could be used to collect wood...";
            }

            // Location Actions

            if (!_collectedWood && defeatedMobs)
            {
                TakeItemAction itemAction = new TakeItemAction(action, itemName, actionText);
                locationActions.Add(itemAction);
                itemAction.PostItem += WoodResults;
                returnData.Actions   = locationActions;
            }

            //Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefintions = new Dictionary <string, LocationDefinition>();

            //Town Center
            LocationDefinition locationDefinition = BankenForestWilderness.GetTownInstance().GetTrecherousPathTwoDefinintion();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
        public Location LoadCreekLanding()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Creek Landing";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenForestWilderness.CREEK_LANDING_MOBS));

            List <LocationAction> locationActions = new List <LocationAction>();

            if (!defeatedMobs)
            {
                returnData.Description = "The creek landing is small but the air feels much heavier on this side of the water. Shades lurk at the edge of the woods.";

                List <Mob> mobs = new List <Mob>();
                mobs.Add(new Shade());
                mobs.Add(new Shade());
                mobs.Add(new Shade());
                mobs.Add(new Shade());
                mobs.Add(new Shade());
                mobs.Add(new Shade());
                mobs.Add(new Shade());
                mobs.Add(new Shade());
                CombatAction combatAction = new CombatAction("Shades", mobs);
                combatAction.PostCombat += CreekLandingMobs;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "The creek landing is small but the air feels much heavier on this side of the water.";
            }

            //Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefintions = new Dictionary <string, LocationDefinition>();

            //Town Center
            LocationDefinition locationDefinition = BankenForestWilderness.GetTownInstance().GetWideCreekDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedMobs)
            {
                locationDefinition = BankenForestWilderness.GetTownInstance().GetAbandonedFortressGatesDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
        public Location LoadTreacherousPath()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Treacherous Path";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenForestWilderness.TREACHEROUS_PATH_MOBS));

            if (!defeatedMobs)
            {
                returnData.Description = "The path leading into the wilderness is long, twisty, and very unforgiving to those that travel it. There are several spiders that block the path further";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new GiantSpider());
                mobs.Add(new GiantSpider());
                mobs.Add(new GiantSpider());
                mobs.Add(new GiantSpider());
                mobs.Add(new GiantSpider());
                CombatAction combatAction = new CombatAction("Giant Spiders", mobs);
                combatAction.PostCombat += TreacherousPathSpiders;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "The path leading into the wilderness is long, twisty, and very unforgiving to those that travel it. Giant spider corpses lay decaying on the ground.";
            }

            //Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefintions = new Dictionary <string, LocationDefinition>();

            //Town Center
            LocationDefinition locationDefinition = BankenForestWilderness.GetTownInstance().GetEntranceDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedMobs)
            {
                locationDefinition = BankenForestWilderness.GetTownInstance().GetBurntClearingDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

                locationDefinition = BankenForestWilderness.GetTownInstance().GetTrecherousPathTwoDefinintion();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
        public Location LoadTreacherousPathTwo()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Treacherous Path 2";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenForestWilderness.TREACHEROUS_PATH_TWO_MOBS));

            if (!defeatedMobs)
            {
                returnData.Description = "The path continues ever deeper into the forest. A dark presence blocks your progress to the end of the dangerous path.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new Shade());
                mobs.Add(new Shade());
                mobs.Add(new Shade());
                mobs.Add(new Shade());
                CombatAction combatAction = new CombatAction("Shades", mobs);
                combatAction.PostCombat += TreacherousPathTwoMobs;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "The path continues ever deeper into the forest.";
            }

            //Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefintions = new Dictionary <string, LocationDefinition>();

            //Town Center
            LocationDefinition locationDefinition = BankenForestWilderness.GetTownInstance().GetTrecherousPathDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedMobs)
            {
                locationDefinition = BankenForestWilderness.GetTownInstance().GetDenseWoodsDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

                locationDefinition = BankenForestWilderness.GetTownInstance().GetWideCreekDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
        public Location LoadSpidersHollow()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Spider's Hollow";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenForestWilderness.SPIDERS_HOLLOW_MOBS));

            if (!defeatedMobs)
            {
                returnData.Description = "A large hollow just a small distance from the clearing. The hollow is the home to many of the forest spiders. Thankfully most of them are off elsewhere. ";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new GiantSpider());
                mobs.Add(new GiantSpider());
                mobs.Add(new GiantSpider());
                mobs.Add(new GiantSpider());
                mobs.Add(new GiantSpider());
                mobs.Add(new GiantSpider());
                mobs.Add(new GiantSpider());
                mobs.Add(new GiantSpider());
                mobs.Add(new GiantSpider());
                mobs.Add(new GiantSpider());
                CombatAction combatAction = new CombatAction("Giant Spiders", mobs);
                combatAction.PostCombat += SpidersHollowMobs;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A large hollow just a small distance from the clearing. The hollow is the home to many of the forest spiders. Thankfully most of them are off elsewhere, though they will be angered when they're greeted by the sight of their dead.";
            }

            //Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefintions = new Dictionary <string, LocationDefinition>();

            //Town Center
            LocationDefinition locationDefinition = BankenForestWilderness.GetTownInstance().GetBurntClearingDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
        public Location LoadBurntClearing()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Burnt Clearing";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenForestWilderness.BURNT_CLEARING_MOBS));

            if (!defeatedMobs)
            {
                returnData.Description = "A clearing off the side of the path has been burnt to the ground long ago by some ancient evil. The air still reeks from its presence and several shades feed off the dark energy nearby.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new Shade());
                mobs.Add(new Shade());
                mobs.Add(new Shade());
                mobs.Add(new Shade());
                CombatAction combatAction = new CombatAction("Shades", mobs);
                combatAction.PostCombat += BurntClearingShades;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A clearing off the side of the path has been burnt to the ground long ago by some ancient evil. The air still reeks from its presence and there are echoes in the air of banished shades.";
            }

            //Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefintions = new Dictionary <string, LocationDefinition>();

            //Town Center
            LocationDefinition locationDefinition = BankenForestWilderness.GetTownInstance().GetTrecherousPathDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedMobs)
            {
                locationDefinition = BankenForestWilderness.GetTownInstance().GetSpidersHollowDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
        public Location LoadEntrance()
        {
            Location returnData;

            returnData             = new Location();
            returnData.Name        = "Courtyard";
            returnData.Description = "A large courtyard littered with skeletons. There are statues and impressive fountains placed around the courtyard, monuments to heros long forgotten";

            //Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefintions = new Dictionary <string, LocationDefinition>();

            LocationDefinition locationDefinition = BankenForestWilderness.GetTownInstance().GetAbandonedFortressGatesDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
        public Location LoadEntrance()
        {
            Location returnData;

            returnData             = new Location();
            returnData.Name        = "Ashen Forest Wilderness - Strange Opening";
            returnData.Description = "You catch sight of a strange opening in the trees. There's a path beyond it that leads into the unkown wilderness of the forest.";

            //Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefintions = new Dictionary <string, LocationDefinition>();

            //Town Center
            LocationDefinition locationDefinition = BankenAshenForest.GetTownInstance().GetForestPathStartDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = BankenForestWilderness.GetTownInstance().GetTrecherousPathDefinition();
            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
        public Location LoadAbandonedFortressGates()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Abandoned Fortress Gates";
            bool           defeatedMobs      = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenForestWilderness.ABANDONED_FORTRESS_MOBS));
            bool           defeatedShadeLord = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenForestWilderness.SHADE_LORD));
            bool           inspectGate       = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenForestWilderness.INSPECT_GATE));
            bool           tookTreasure      = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenForestWilderness.TREASURE));
            Accomplishment abandonedFortressAccomplishment = Banken.GetBankenAccomplishments().Find(x => x.Name.Contains("Abandoned Fortress"));
            bool           abandonedFortress = GameState.Hero.Accomplishments.Contains(abandonedFortressAccomplishment);
            string         before            = GameState.Hero.Identifier + ", you dare enter my domain? This fortress stands as a testement to my masters. The void shall claim you!";
            string         after             = "The shade lord cries out a piercing scream as it fades back into the void that spawned it.";
            string         action            = "Inspect";
            string         itemName          = "Gate";
            string         actionText        = "You inspect the gate. It seems to be sealed by very powerful dark magic. You'll have to go back to Banken and see if the rangers know of any mages that could help you unseal the gates. \nBefore you can turn back around to head back to town a Shade Lord materializes at the entrance of the gates and terror fills your heart.";

            //Once the player defeats the shades, have him/her try to open the gate
            //That will fail and a Shade Lord will appear.
            //The player will have to report back to Gilan after defeating the Shade Lord
            //Gilan will then tell the player that (s)he will have to find
            //some very power mages to help him/her blast open the gate

            List <LocationAction> locationActions = new List <LocationAction>();

            if (!defeatedMobs)
            {
                returnData.Description = "Just beyond the creek landing are the gates to an abandoned fortress. The gates appear sealed shut by some dark magic. A large group of shades hover before the gate to vanquish any that dare approach it.";

                List <Mob> mobs = new List <Mob>();
                mobs.Add(new Shade());
                mobs.Add(new Shade());
                mobs.Add(new Shade());
                mobs.Add(new Shade());
                mobs.Add(new Shade());
                mobs.Add(new Shade());
                mobs.Add(new Shade());
                mobs.Add(new Shade());
                mobs.Add(new Shade());
                mobs.Add(new Shade());
                CombatAction combatAction = new CombatAction("Shades", mobs);
                combatAction.PostCombat += AbandonedFortressMobs;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else if (!inspectGate)
            {
                returnData.Description = "Just beyond the creek landing are the gates to an abandoned fortress. The gates appear sealed shut by some dark magic.";
                TakeItemAction itemAction = new TakeItemAction(action, itemName, actionText);
                locationActions.Add(itemAction);
                itemAction.PostItem += GateResults;
                returnData.Actions   = locationActions;
            }
            else if (!defeatedShadeLord)
            {
                returnData.Description = "Just beyond the creek landing are the gates to an abandoned fortress. The gates appear sealed shut by some dark magic. A Shade Lord hovers before the gates, dark energy radiating from its body in waves.";

                List <Mob> mobs = new List <Mob>();
                mobs.Add(new ShadeLord());
                CombatAction combatAction = new CombatAction("Shade Lord", mobs, before, after);
                combatAction.PostCombat += ShadeLord;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else if (!tookTreasure)
            {
                returnData.Description = "Just beyond the creek landing are the gates to an abandoned fortress. The gates appear sealed shut by some dark magic. There is a treasure chest in front of the gates.";
                TreasureChestAction itemAction = new TreasureChestAction(5);
                locationActions.Add(itemAction);
                itemAction.PostItem += TreasureChest;
                returnData.Actions   = locationActions;
            }
            else if (!abandonedFortress)
            {
                returnData.Description = "Just beyond the creek landing are the gates to an abandoned fortress. The gates appear sealed shut by some dark magic.";
            }
            else
            {
                returnData.Description = "Just beyond the creek landing lay the crumpled gates of the Abandoned Fortress. THe gates have crumpled to dust. Whatever magic was sustaining them has imploded on itself.";
            }

            //Once the player gets the mages there will be an action to begin unsealing the gate and then the player can proceed into the "abandoned" fortress

            //Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefintions = new Dictionary <string, LocationDefinition>();

            //Town Center
            LocationDefinition locationDefinition = BankenForestWilderness.GetTownInstance().GetCreekLandingDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedMobs && inspectGate && defeatedShadeLord)
            {
                locationDefinition = Banken.GetTownInstance().GetTownCenterDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            if (abandonedFortress)
            {
                locationDefinition = BankenAbandonedFortress.GetTownInstance().GetEntranceDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
        public Location LoadWideCreek()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Wide Creek";
            //Once the player builds the raft 6 skeletons will come out from the water to attack him/her.
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenForestWilderness.WIDE_CREEK_MOBS));

            _builtRaft     = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, BankenForestWilderness.BUILD_RAFT));
            _collectedWood = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, BankenForestWilderness.COLLECT_WOOD_KEY));
            string action     = "Build";
            string itemName   = "Raft";
            string actionText = "You build a raft to cross the creek with the wood you collected. As you complete the small boat several skeletons rise from the water, ready to stop you from proceeding.";

            List <LocationAction> locationActions = new List <LocationAction>();

            // Location Actions

            if (_collectedWood && !_builtRaft)
            {
                returnData.Description = "The creek is very wide and you'll need a small raft to cross it safely.";
                TakeItemAction itemAction = new TakeItemAction(action, itemName, actionText);
                locationActions.Add(itemAction);
                itemAction.PostItem += RaftResults;
                returnData.Actions   = locationActions;
            }

            else if (!defeatedMobs & _builtRaft)
            {
                returnData.Description = "The creek is very wide. Skeletons rise from the water, ready to stop whoever dares cross it.";

                List <Mob> mobs = new List <Mob>();
                mobs.Add(new Skeleton());
                mobs.Add(new Skeleton());
                mobs.Add(new Skeleton());
                mobs.Add(new Skeleton());
                mobs.Add(new Skeleton());
                mobs.Add(new Skeleton());
                CombatAction combatAction = new CombatAction("Skeletons", mobs);
                combatAction.PostCombat += WideCreekMobs;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "The creek is very wide. The shattered bones of skeletons float in the now peaceful water.";
            }

            //Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefintions = new Dictionary <string, LocationDefinition>();

            //Town Center
            LocationDefinition locationDefinition = BankenForestWilderness.GetTownInstance().GetTrecherousPathTwoDefinintion();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            if (_builtRaft && defeatedMobs)
            {
                locationDefinition = BankenForestWilderness.GetTownInstance().GetCreekLandingDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }