public Location LoadSideArea()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Watertown Forest Side Area";
            Accomplishment banditCaveAccomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Bandit Cave"));

            if (!(GameState.Hero.Accomplishments.Contains(banditCaveAccomplishment)))
            {
                returnData.Description = "You move off to a little side area you saw. There is nothing here but more trees.";
            }
            else
            {
                returnData.Description = "Now that you were told of the cave's existence, you can spot it hiding behind some trees.";
            }

            //Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>();
            LocationDefinition locationDefinition = WatertownForest.GetTownInstance().GetStartingLocationDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            if (GameState.Hero.Accomplishments.Contains(banditCaveAccomplishment))
            {
                locationDefinition = WatertownBanditCave.GetTownInstance().GetStartingLocationDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
        public Location LoadClearing()
        {
            Location returnData = new Location();

            returnData.Name = "Forest Clearing";
            bool           defeatedBanditCaptain    = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownForest.DEFEATED_BANDIT_CAPTAIN_KEY));
            Accomplishment murderRoomAccomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Bandit Spy"));

            if (!defeatedBanditCaptain)
            {
                returnData.Description = "The Bandit Captain stands in the clearing and stares at you, daring you to challenge him.";
            }
            else if (defeatedBanditCaptain && !GameState.Hero.Accomplishments.Contains(murderRoomAccomplishment))
            {
                returnData.Description = "The Bandit Captain lays dead in the clearing.";
            }
            else if (GameState.Hero.Accomplishments.Contains(murderRoomAccomplishment))
            {
                returnData.Description = "A medium sized clearing. Now that you've been told to search for the tower you can see a covered up entrance to a narrow path. It also looks like the Bandit Captain's body has been removed.";
            }

            // Location Actions
            List <LocationAction> locationActions = new List <LocationAction>();

            if (!defeatedBanditCaptain)
            {
                List <Mob> banditCaptain = new List <Mob>();
                banditCaptain.Add(new BanditCaptain());
                CombatAction combatAction = new CombatAction("Bandit Captain", banditCaptain);
                combatAction.PostCombat += BanditCaptainResults;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }

            Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>();

            LocationDefinition locationDefinition = WatertownForest.GetTownInstance().GetStraightDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedBanditCaptain)
            {
                locationDefinition = Watertown.GetTownInstance().GetTownCenterDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

                LocationHandler.SetLocationStateValue(Watertown.LOCATION_STATE_KEY, DEFEATED_CAPTAIN_STATE, true);
                LocationHandler.ResetLocation(Watertown.INN_KEY); // Need to reload Inn so that new conversation can be set.
            }

            if (GameState.Hero.Accomplishments.Contains(murderRoomAccomplishment))
            {
                locationDefinition = WatertownForestClearingBeforeTower.GetTownInstance().GetEntranceDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }


            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
Beispiel #3
0
        public void HeardBanditKingRumor()
        {
            Accomplishment accomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Bandit God King"));

            GameState.Hero.Accomplishments.Add(accomplishment);

            // Reload the TownCenter so it will open up the hidden room
            LocationHandler.ResetLocation(TOWN_CENTER_KEY);
        }
Beispiel #4
0
        public void HeardBanditCaptainRumor()
        {
            // TODO: Need to keep duplicate accomplishments from happening (SEE ABOVE METHOD)
            Accomplishment accomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Bandit Captain"));

            GameState.Hero.Accomplishments.Add(accomplishment);

            // Reload the TownCenter so it will open up the forest
            LocationHandler.ResetLocation(TOWN_CENTER_KEY);
        }
Beispiel #5
0
        public void HeardSewerKingRumor()
        {
            // TODO: need to keep duplicate accomplishments from happening.
            Accomplishment accomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Sewer King"));

            GameState.Hero.Accomplishments.Add(accomplishment);

            // Reload the TownCenter so it will open up the sewer
            LocationHandler.ResetLocation(TOWN_CENTER_KEY);
        }
        public Location Lair()
        {
            Location returnData;
            bool     defeatedLieutenant = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownBanditCave.DEFEATED_LIEUTENANT_KEY));

            returnData      = new Location();
            returnData.Name = "Lieutenant's Lair";
            Accomplishment hiddenRoomAccomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Hidden Room"));

            if (!defeatedLieutenant)
            {
                returnData.Description = "A large room, furnished with expensive decorations. The Lieutenant stands in the middle of the room";

                // Location Actions
                List <LocationAction> locationActions = new List <LocationAction>();

                List <Mob> bandits = new List <Mob>();
                bandits.Add(new BanditLieutenant());

                CombatAction combatAction = new CombatAction("Bandit Lieutenant", bandits);
                combatAction.PostCombat += LairResults;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A large ornate room. The Bandit Lieutenant lays dead in the middle of the room. There's a book shelf against the left hand wall that seems out of place. You wonder why it's there...";
            }

            // Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>();
            LocationDefinition locationDefinition = WatertownBanditCave.GetTownInstance().GetCaveHallwayDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            if (GameState.Hero.Accomplishments.Contains(hiddenRoomAccomplishment))
            {
                locationDefinition = WatertownBanditCaveDeeper.GetTownInstance().GetStartingLocationDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }
            if (defeatedLieutenant)
            {
                locationDefinition = Watertown.GetTownInstance().GetTownCenterDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

                LocationHandler.SetLocationStateValue(Watertown.LOCATION_STATE_KEY, DEFEATED_LIEUTENANT_KEY, true);
                LocationHandler.ResetLocation(Watertown.INN_KEY); // Need to reload Inn so that new conversation can be set.
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;


            return(returnData);
        }
        public Location LoadRoomSix()
        {
            Location       returnData;
            bool           defeatedSkeletonKing            = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownSewerRight.DEFEATED_SKELETON_KING));
            bool           openedChest                     = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownSewerRight.OPENED_SKELETON_KING_CHEST));
            Accomplishment forestExplorationAccomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Explore the Forest"));

            returnData      = new Location();
            returnData.Name = "Room of Death";

            //Actions

            if (defeatedSkeletonKing == false)
            {
                returnData.Description = "Mud and slime and poopoo.  What a nasty place. Bones come from the corners of the room to form the Skeleton King.";
                // Location Actions
                List <LocationAction> locationActions = new List <LocationAction>();

                List <Mob> skeletons = new List <Mob>();
                skeletons.Add(new SkeletonKing());
                CombatAction combatAction = new CombatAction("Skeleton King", skeletons);
                combatAction.PostCombat += SkeletonKingBattle;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            if (defeatedSkeletonKing)
            {
                if (openedChest == false)
                {
                    returnData.Description = "Mud and slime and poopoo.  What a nasty place. The Skeleton King rest in pieces on the ground. His unopened chest appears in the middle of the room.";
                    List <LocationAction> locationActions = new List <LocationAction>();
                    TreasureChestAction   itemAction      = new TreasureChestAction(3);
                    locationActions.Add(itemAction);
                    itemAction.PostItem += SkeletonKingChest;
                    returnData.Actions   = locationActions;
                }
                else if (openedChest)
                {
                    returnData.Description = "Mud and slime and poopoo.  What a nasty place. The Skeleton King rest in pieces on the ground. His opened chest sits in the middle of the room.";
                }
            }

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

            // Town Center
            LocationDefinition locationDefinition = WatertownSewerRight.GetTownInstance().GetRoomFiveDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            if (GameState.Hero.Accomplishments.Contains(forestExplorationAccomplishment))
            {
                locationDefinition = WatertownForestAfterSewer.GetTownInstance().GetStartingLocationDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            if (defeatedSkeletonKing)
            {
                locationDefinition = Watertown.GetTownInstance().GetTownCenterDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
Beispiel #8
0
        public Location LoadSewerEntranceFinal()
        {
            Location returnData;
            bool     defeatedSewerKing = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownSewer.DEFEATED_SEWER_KING));

            returnData      = new Location();
            returnData.Name = "Sewer Entrance Corridor Final";
            Accomplishment exploredAccomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Defeated Sewer King"));

            if (defeatedSewerKing)
            {
                returnData.Description = "The corridor ends here but the mud and slime and poopoo continues (yuck!)."; //There is a door to the right and left (add back in later)
            }
            // Location Actions
            List <LocationAction> locationActions = new List <LocationAction>();

            if (!defeatedSewerKing)
            {
                returnData.Description = "The corridor ends here but the mud and slime and poopoo continues (yuck!). The Sewer King stands in the middle of the room";

                List <Mob> sewerKing = new List <Mob>();
                sewerKing.Add(new SewerKing());


                CombatAction combatAction = new CombatAction("Sewer King", sewerKing);
                combatAction.PostCombat += SewerKingResults;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }

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

            LocationDefinition locationDefinition = GetSewerEntranceCorridorDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            if (GameState.Hero.Accomplishments.Contains(exploredAccomplishment))
            {
                //Sewer Left
                locationDefinition = WatertownSewerLeft.GetTownInstance().GetStartingLocationDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

                //Sewer Right
                locationDefinition = WatertownSewerRight.GetTownInstance().GetStartingLocationDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            if (defeatedSewerKing)
            {
                //Town
                locationDefinition = Watertown.GetTownInstance().GetTownCenterDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

                LocationHandler.SetLocationStateValue(Watertown.LOCATION_STATE_KEY, DEFEATED_SEWER_KING, true);
                LocationHandler.ResetLocation(Watertown.INN_KEY); // Need to reload Inn so that new conversation can be set.
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
Beispiel #9
0
        public Location LoadTownCenter()
        {
            Location       returnData;
            LocationAction locationAction;


            returnData             = new Location();
            returnData.Name        = "Watertown Town Center";
            returnData.Description = "Welcome to the cozy Watertown Town Center.";

            // Location Actions
            List <LocationAction> locationActions = new List <LocationAction>();

            locationAction = new DisplayStatsAction();
            locationActions.Add(locationAction);

            locationAction = new DisplayInventoryAction();
            locationActions.Add(locationAction);

            locationAction = new DisplayPotionBagAction();
            locationActions.Add(locationAction);

            locationAction = new DisplayEquippedAction();
            locationActions.Add(locationAction);

            locationAction = new AffixSwapperAction();
            locationActions.Add(locationAction);

            locationAction = new StoreAction();
            locationActions.Add(locationAction);

            locationAction = new MainMenuAction();
            locationActions.Add(locationAction);

            locationAction = new ExitGame();
            locationActions.Add(locationAction);

            returnData.Actions = locationActions;



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

            LocationDefinition locationDefinition = GetArenaDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = GetInnDefinition();
            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = GetConstableOfficeDefinition();
            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            Accomplishment sewerKingAccomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Sewer King"));

            if (GameState.Hero.Accomplishments.Contains(sewerKingAccomplishment))
            {
                locationDefinition = WatertownSewer.GetTownInstance().GetSewerEntranceDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            Accomplishment banditCaptainAccomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Bandit Captain"));

            if (GameState.Hero.Accomplishments.Contains(banditCaptainAccomplishment))
            {
                locationDefinition = WatertownForest.GetTownInstance().GetForestEntranceDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            Accomplishment murderRoomAccomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Bandit Murder"));

            if (GameState.Hero.Accomplishments.Contains(murderRoomAccomplishment))
            {
                locationDefinition = WatertownBanditHouse.GetTownInstance().GetEntranceDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            Accomplishment banditKingAccomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Bandit God King"));

            if (GameState.Hero.Accomplishments.Contains(banditKingAccomplishment))
            {
                locationDefinition = Ankou.GetTownInstance().GetTownCenterDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }