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

            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 LoadDeathCircle()
        {
            Location returnData;
            bool     defeatedSkeletons = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownForestAfterSewer.DEFEATED_DEATH_CIRCLE_SKELETONS));

            returnData      = new Location();
            returnData.Name = "Death Circle";

            //Actions

            if (defeatedSkeletons == false)
            {
                returnData.Description = "A circular area with skeletons meandering about.";
                // 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());
                skeletons.Add(new Skeleton());
                skeletons.Add(new Skeleton());
                skeletons.Add(new Skeleton());
                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 = "A circular area with crumpled bones littering the ground.";
            }

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

            // Town Center
            LocationDefinition locationDefinition = WatertownForestAfterSewer.GetTownInstance().GetMeetingGroundsDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
        public Location LoadMeetingGrounds()
        {
            Location returnData;
            bool     defeatedVillagers = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownForestAfterSewer.DEFATED_MEETING_GROUNDS_POSSESED_VILLAGERS));

            returnData      = new Location();
            returnData.Name = "Meeting Grounds";

            //Actions
            if (defeatedVillagers == false)
            {
                returnData.Description = "A circular enclosing lined with candles against the trees and a smaller circle a few feet from the trees lined with skulls. Two possesed villagers stand in the middle of the inner circle.";
                // Location Actions
                List <LocationAction> locationActions = new List <LocationAction>();

                List <Mob> villagers = new List <Mob>();
                villagers.Add(new PossesedVillager());
                villagers.Add(new PossesedVillager());
                CombatAction combatAction = new CombatAction("Possesed Villagers", villagers);
                combatAction.PostCombat += MeetingGroundsVillagers;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            if (defeatedVillagers)
            {
                returnData.Description = "A circular enclosing lined with candles against the trees and a smaller circle a few feet from the trees lined with skulls.";
            }

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

            LocationDefinition locationDefinition = WatertownForestAfterSewer.GetTownInstance().GetNarrowPathDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedVillagers)
            {
                locationDefinition = WatertownForestAfterSewer.GetTownInstance().GetDeathCircleDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

                locationDefinition = WatertownForestAfterSewer.GetTownInstance().GetEnclosedClearingDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

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

            returnData      = new Location();
            returnData.Name = "Narrow Path";

            //Actions

            if (defeatedSkeletons == false)
            {
                returnData.Description = "A small narrow path. A red light can be seen in the distance. Skeletons are walking down the 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 += NarrowPathSkeletons;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            if (defeatedSkeletons)
            {
                returnData.Description = "A small narrow path. A red light can be seen in the distance.";
            }

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

            // Town Center
            LocationDefinition locationDefinition = WatertownForestAfterSewer.GetTownInstance().GetForestClearingDefintion();

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
        public Location LoadForestCabinEntrance()
        {
            Location returnData;
            bool     inspectedBodies = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownForestCabin.INSPECTED_DEAD_BODIES));

            returnData             = new Location();
            returnData.Name        = "Cabin Entrance";
            returnData.Description = "The room has a mass of dead bodies strewn across the floor";
            string bodyInfo = "The bodies look like they're burned and scarred from knifes and dark magic.";

            //Actions

            if (inspectedBodies == false)
            {
                // Location Actions
                List <LocationAction> locationActions = new List <LocationAction>();

                TakeItemAction talismanAction = new TakeItemAction("Inspect", "Bodies", bodyInfo);

                talismanAction.PostItem += EntranceBodies;

                locationActions.Add(talismanAction);

                returnData.Actions = locationActions;
            }

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

            // Town Center
            LocationDefinition locationDefinition = WatertownForestAfterSewer.GetTownInstance().GetEnclosedClearingDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            if (inspectedBodies)
            {
                locationDefinition = WatertownForestCabin.GetTownInstance().GetRoomTwoDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
Ejemplo n.º 7
0
        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);
        }
        public Location LoadEnclosedClearing()
        {
            Location returnData;
            bool     defeatedSkeletonKing = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownForestAfterSewer.DEFEATED_POSSESED_GUARD));
            bool     openedChest          = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownForestAfterSewer.OPENED_BOSS_CHEST_ENCLOSED_CLEARING));

            returnData      = new Location();
            returnData.Name = "Enclosed Clearing";

            //Actions

            if (defeatedSkeletonKing == false)
            {
                returnData.Description = "A small enclosed clearing. A cabin sits in the back of it, with a small walkway leading up to its front door. The walk way is lined in skulls and candles. A possesed village guard blocks the door.";
                // Location Actions
                List <LocationAction> locationActions = new List <LocationAction>();

                List <Mob> guard = new List <Mob>();
                guard.Add(new PossesedGuardBoss());
                CombatAction combatAction = new CombatAction("Possesed Guard", guard);
                combatAction.PostCombat += GuardBossBattle;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            if (defeatedSkeletonKing)
            {
                if (openedChest == false)
                {
                    returnData.Description = "A small enclosed clearing. A cabin sits in the back of it, with a small walkway leading up to its front door. The walk way is lined in skulls and candles. The possesed guard lays to rest to the side of the path. His unopened chest appears off to the side.";
                    List <LocationAction> locationActions = new List <LocationAction>();
                    TreasureChestAction   itemAction      = new TreasureChestAction(3);
                    locationActions.Add(itemAction);
                    itemAction.PostItem += GuardChest;
                    returnData.Actions   = locationActions;
                }
                else if (openedChest)
                {
                    returnData.Description = "A small enclosed clearing. A cabin sits in the back of it, with a small walkway leading up to its front door. The walk way is lined in skulls and candles. The possesed guard lays to rest to the side of the path. His opened chest sits off to the side.";
                }
            }

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

            // Town Center
            LocationDefinition locationDefinition = WatertownForestAfterSewer.GetTownInstance().GetMeetingGroundsDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedSkeletonKing)
            {
                locationDefinition = WatertownForestCabin.GetTownInstance().GetEntranceDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }