public static WatertownSewerRight GetTownInstance()
        {
            if (_WatertownSewer == null)
            {
                _WatertownSewer = new WatertownSewerRight();
            }

            return(_WatertownSewer);
        }
        public Location LoadForestClearingEntrance()
        {
            Location returnData;
            bool     defeatedSkeletons = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownForestAfterSewer.DEFEATED_ENTRANCE_SKELETONS));

            returnData      = new Location();
            returnData.Name = "Small Forest Clearing";

            //Actions

            if (defeatedSkeletons == false)
            {
                returnData.Description = "A small forest clearing. The air is dark and heavy with the presence of evil so near by. Skeletons block the path forward.";
                // Location Actions
                List <LocationAction> locationActions = new List <LocationAction>();

                List <Mob> skeletons = new List <Mob>();
                skeletons.Add(new Skeleton());
                skeletons.Add(new Skeleton());
                skeletons.Add(new Skeleton());
                skeletons.Add(new Skeleton());
                CombatAction combatAction = new CombatAction("Skeletons", skeletons);
                combatAction.PostCombat += EntranceSkeletons;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            if (defeatedSkeletons)
            {
                returnData.Description = "A small forest clearing. The air is dark and heavy with the presence of evil so near by. The bones of your foes are scattered agains the edges of the trees.";
            }

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

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

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedSkeletons)
            {
                locationDefinition = WatertownForestAfterSewer.GetTownInstance().GetNarrowPathDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
        public Location LoadRoomFive()
        {
            Location returnData;
            bool     defeatedSkeletons = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownSewerRight.DEFEATED_FIFTH_ROOM_SKELETONS));

            returnData      = new Location();
            returnData.Name = "Stuffy Room";

            //Actions

            if (defeatedSkeletons == false)
            {
                returnData.Description = "Mud and slime and poopoo.  What a nasty place. Skeletons block your path.";
                // Location Actions
                List <LocationAction> locationActions = new List <LocationAction>();

                List <Mob> skeletons = new List <Mob>();
                skeletons.Add(new Skeleton());
                skeletons.Add(new Skeleton());
                skeletons.Add(new Skeleton());
                CombatAction combatAction = new CombatAction("Skeletons", skeletons);
                combatAction.PostCombat += SkeletonBattle;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            if (defeatedSkeletons)
            {
                returnData.Description = "Mud and slime and poopoo.  What a nasty place. The bones of your vanquished enemies are scattered upon the floor.";
            }

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

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

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedSkeletons)
            {
                locationDefinition = WatertownSewerRight.GetTownInstance().GetRoomSixDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
        public Location LoadRoomFour()
        {
            Location returnData;
            bool     inspectedTalisman = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownSewerRight.INSPECTED_TALISMAN));

            returnData      = new Location();
            returnData.Name = "Dark Room";
            string talismanInfo = "This talisman has a sense of forboding about it.";

            //Actions

            if (inspectedTalisman == false)
            {
                returnData.Description = "Mud and slime and poopoo.  There is a talisman on the ground with dark colors pouring out of it in a misty form.";
                // Location Actions
                List <LocationAction> locationActions = new List <LocationAction>();

                TakeItemAction talismanAction = new TakeItemAction("Inspect", "Talisman", talismanInfo);

                talismanAction.PostItem += RoomFourTalisman;

                locationActions.Add(talismanAction);

                returnData.Actions = locationActions;
            }

            if (inspectedTalisman)
            {
                returnData.Description = "Mud and slime and poopoo.  What a nasty place. There's a scorch mark where the talisman used to lay.";
            }

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

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

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            if (inspectedTalisman)
            {
                locationDefinition = WatertownSewerRight.GetTownInstance().GetRoomFiveDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
        public Location LoadRoomTwo()
        {
            Location returnData;
            bool     defeatedSewerRats = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownSewerRight.DEFEATED_SECOND_ROOM_RATS));

            returnData      = new Location();
            returnData.Name = "Small Room";

            //Actions

            if (defeatedSewerRats == false)
            {
                returnData.Description = "Mud and slime and poopoo.  What a nasty place. Sewer Rats block your path";
                // Location Actions
                List <LocationAction> locationActions = new List <LocationAction>();

                List <Mob> sewerRats = new List <Mob>();
                sewerRats.Add(new SewerRat());
                sewerRats.Add(new SewerRat());
                CombatAction combatAction = new CombatAction("Sewer Rats", sewerRats);
                combatAction.PostCombat += RoomTwoRats;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            if (defeatedSewerRats)
            {
                returnData.Description = "Mud and slime and poopoo.  What a nasty place. Sewer Rats lay dead at your feet";
            }

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

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

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            if (defeatedSewerRats)
            {
                locationDefinition = WatertownSewerRight.GetTownInstance().GetRoomThreeDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

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

            returnData             = new Location();
            returnData.Name        = "Dirty Room";
            returnData.Description = "Mud and slime and poopoo.  What a nasty place. The floor is covered with the dead skeletons of rats.";

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

            LocationDefinition locationDefinition = WatertownSewerRight.GetTownInstance().GetRoomTwoDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = WatertownSewerRight.GetTownInstance().GetRoomFourDefinition();
            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

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

            returnData             = new Location();
            returnData.Name        = "Watertown Sewer Right";
            returnData.Description = "Mud and slime and poopoo. The floor is littered with dead bodies.";

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

            // Town Center
            LocationDefinition locationDefinition = WatertownSewer.GetTownInstance().GetSewerEntranceFinalDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = WatertownSewerRight.GetTownInstance().GetRoomTwoDefinition();
            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            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);
        }
Пример #9
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);
        }