Пример #1
0
        public static WatertownSewerLeft GetTownInstance()
        {
            if (_WatertownSewer == null)
            {
                _WatertownSewer = new WatertownSewerLeft();
            }

            return(_WatertownSewer);
        }
Пример #2
0
        public Location LoadSewerLeftEntrance()
        {
            Location returnData;
            bool     defeatedSewerRats = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownSewerLeft.DEFEATED_FIRST_ROOM_RATS));

            returnData      = new Location();
            returnData.Name = "Watertown Sewer Left";

            //Actions

            if (defeatedSewerRats == false)
            {
                returnData.Description = "Mud and slime and poopoo.  What a nasty place. A vicious pack of sewer rats impeede your progress";
                // Location Actions
                List <LocationAction> locationActions = new List <LocationAction>();

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

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            if (defeatedSewerRats)
            {
                returnData.Description = "Mud and slime and poopoo.  What a nasty place. A pack of sewer rats lay dead on the floor.";
            }

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

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

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedSewerRats)
            {
                locationDefinition = WatertownSewerLeft.GetTownInstance().GetRoomTwoDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
Пример #3
0
        public Location LoadHallway()
        {
            Location returnData;
            bool     defeatedSewerRats = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownSewerLeft.DEFEATED_HALLWAY_RATS));

            returnData      = new Location();
            returnData.Name = "Hallway";

            //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 += HallwayRats;

                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 = WatertownSewerLeft.GetTownInstance().GetRoomThreeDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedSewerRats)
            {
                locationDefinition = WatertownSewerLeft.GetTownInstance().GetRoomFourDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
Пример #4
0
        public Location LoadRoomFour()
        {
            Location returnData;
            bool     defeatedOutlawBoss = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownSewerLeft.DEFEATED_OUTLAW_BOSS));

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

            //Actions

            if (defeatedOutlawBoss == false)
            {
                returnData.Description = "Mud and slime and poopoo.  What a nasty place. The Outlaw Boss stands in the middle of the room";
                // Location Actions
                List <LocationAction> locationActions = new List <LocationAction>();

                List <Mob> outlawBoss = new List <Mob>();
                outlawBoss.Add(new OutlawBoss());
                CombatAction combatAction = new CombatAction("Outlaw Boss", outlawBoss);
                combatAction.PostCombat += OutlawBattle;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            if (defeatedOutlawBoss)
            {
                returnData.Description = "Mud and slime and poopoo.  What a nasty place. The Outlaw Boss's dead body decomposes on the ground.";
            }

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

            // Town Center
            LocationDefinition locationDefinition = WatertownSewerLeft.GetTownInstance().GetHallwayDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
Пример #5
0
        public Location LoadRoomThree()
        {
            Location returnData;
            bool     openedChest = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownSewerLeft.OPENED_CHEST_ROOM_THREE));

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

            //Actions

            if (openedChest == false)
            {
                returnData.Description = "Mud and slime and poopoo.  What a nasty place. A treasure chest sits against a wall.";
                List <LocationAction> locationActions = new List <LocationAction>();
                TreasureChestAction   itemAction      = new TreasureChestAction(2);
                locationActions.Add(itemAction);
                itemAction.PostItem += RoomThreeChest;
                returnData.Actions   = locationActions;
            }

            if (openedChest)
            {
                returnData.Description = "Mud and slime and poopoo.  What a nasty place. An opened treasure chest sits against a wall.";
            }

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

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

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = WatertownSewerLeft.GetTownInstance().GetHallwayDefinition();
            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
Пример #6
0
        public Location LoadRoomTwo()
        {
            Location returnData;
            bool     tookGold = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownSewerLeft.TOOK_GOLD_KEY));

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

            //Actions

            if (tookGold == false)
            {
                returnData.Description = "Mud and slime and poopoo.  What a nasty place. A bag of gold lays forgotten on the floor";
                List <LocationAction> locationActions = new List <LocationAction>();
                PickUpGoldAction      itemAction      = new PickUpGoldAction(50);
                locationActions.Add(itemAction);
                itemAction.PostItem += RoomTwoGold;
                returnData.Actions   = locationActions;
            }
            if (tookGold)
            {
                returnData.Description = "Mud and slime and poopoo.  What a nasty place. An empty bag of gold lays forgotten on the floor";
            }

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

            // Town Center
            LocationDefinition locationDefinition = WatertownSewerLeft.GetTownInstance().GetSewerLeftEntranceDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            locationDefinition = WatertownSewerLeft.GetTownInstance().GetRoomThreeDefinition();
            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

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