Example #1
0
        public Location LoadStorageRoom()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Storage Room";
            bool tookJournal = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerMysteriousHouse.STORAGE_ROOM_JOURNAL));

            returnData.Description = "A dark and musty storage room. There are several old pieces of parchment and journals lining the shelves";
            string journal = "- An excerpt from the art of necromancy volume II \nAt this point you need to obtain the blood of a young innocent. It's usually assumed that the sacrifice must be a virgin, and while that is true it is not the only criteria that must be met. The sacrifice must be innocent in all regards. Never stolen anything, never killed anyone, a virgin, etc. This ritual generally works better with females, though a male is acceptable in a pinch. Use your discretion while choosing who you will use.";

            if (!tookJournal)
            {
                List <LocationAction> locationActions = new List <LocationAction>();
                ReadPapersAction      parchmentAction = new ReadPapersAction(journal);
                parchmentAction.PostPaper += Journal;
                locationActions.Add(parchmentAction);
                returnData.Actions = locationActions;
            }


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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerMysteriousHouse.GetTownInstance().GetKitchenDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

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

            returnData      = new Location();
            returnData.Name = "Bandit Cave Hidden Room";
            string paperText = "To whomever it may concern, \nWe were supposed to get a shipment of supplies a week ago! Find out what went wrong! I'll be in \ncontact again if this isn't sorted out...\n";
            bool   readPaper = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownBanditCaveDeeper.READ_PAPER_KEY));

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

            if (!readPaper)
            {
                returnData.Description = "A study lined with bookshelves with a desk in the middle of the room. There are papers scattered about the desk.";

                ReadPapersAction paperReadAction = new ReadPapersAction(paperText);
                locationActions.Add(paperReadAction);
                paperReadAction.PostPaper += PaperResults;
                returnData.Actions         = locationActions;
            }

            if (_takeSaw && _takeRope && _takeWood)
            {
                returnData.Description = "A study lined with bookshelves. A desk was pushed up against the wall with paper scattered across the floor. There is a pool of blood where the desk used to be.";
            }
            else
            {
                returnData.Description = "A study lined with bookshelves with a desk in the middle of the room. There are papers scattered about the desk.";
            }

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

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            if (readPaper)
            {
                locationDefinition = WatertownBanditCaveDeeper.GetTownInstance().GetJailCellDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }
            if (_takeWood && _takeRope && _takeSaw)
            {
                locationDefinition = Watertown.GetTownInstance().GetTownCenterDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
Example #3
0
        public Location LoadCaptainTent()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Captain's Tent";
            bool   defeatedPirateCaptain = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerBeachHead.PIRATE_CAPTAIN));
            bool   openedChest           = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerBeachHead.CAPTAIN_TREASURE));
            bool   tookOrders            = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerBeachHead.CAPTAIN_ORDERS));
            string parchmentText         = "I don't want to hear any more excuses captain. You will lead on the beach head and you will wreck havoc. Kill as many innocents as you can. I don't give a rat's ass if there is a military tower close by. They will not pose a threat. You will decimate them and they won't be able to do anything about it. Victory is at hand!";

            //Actions
            if (!defeatedPirateCaptain)
            {
                returnData.Description = "The tent is large and decorated with foul substances collected through decades of pillaging. The pirate captain is sitting in his chair behind his desk, looking at you with a smirk on his face.";

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

                List <Mob> mobs = new List <Mob>();
                mobs.Add(new PirateCaptain());
                CombatAction combatAction = new CombatAction("Pirate Captain", mobs);
                combatAction.PostCombat += PirateCaptain;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            else if (defeatedPirateCaptain)
            {
                if (!openedChest)
                {
                    if (!tookOrders)
                    {
                        returnData.Description = "The tent is large and decorated with foul substances collected through decades of pillaging. The pirate captain lays dead in the center of the room. There is a piece of parchment on his desk and a treasure chest under it.";
                    }
                    else
                    {
                        returnData.Description = "The tent is large and decorated with foul substances collected through decades of pillaging. The pirate captain lays dead in the center of the room. There is a treasure chest under his desk.";
                    }

                    List <LocationAction> locationActions = new List <LocationAction>();
                    TreasureChestAction   itemAction      = new TreasureChestAction(5);
                    locationActions.Add(itemAction);
                    itemAction.PostItem += CaptainChest;
                    returnData.Actions   = locationActions;
                }
                if (openedChest && tookOrders)
                {
                    returnData.Description = "The tent is large and decorated with foul substances collected through decades of pillaging. The pirate captain lays dead in the center of the room. There is an opened treasure chest under his desk.";
                }
                if (!tookOrders && openedChest)
                {
                    returnData.Description = "The tent is large and decorated with foul substances collected through decades of pillaging. The pirate captain lays dead in the center of the room. There is a piece of parchment on his desk and an opened treasure chest under it.";
                    List <LocationAction> locationActions = new List <LocationAction>();
                    ReadPapersAction      parchmentAction = new ReadPapersAction(parchmentText);
                    parchmentAction.PostPaper += CaptainOrders;
                    locationActions.Add(parchmentAction);
                    returnData.Actions = locationActions;
                }
            }

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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerBeachHead.GetTownInstance().GetSmallPathDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedPirateCaptain)
            {
                locationDefinition = BeachTower.GetTownInstance().GetTownCenterDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }