Exemplo n.º 1
0
        public Location LoadLivingRoom()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Living Room";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerMayorHouse.LIVING_ROOM_MOBS));

            if (!defeatedMobs)
            {
                returnData.Description = "A large living room with several pieces of furniture and a table in the middle. There are cards scattered about the table from an abandoned game. There are bandits inspecting different parts of the room, but holding off theft or ransacking for some odd reason.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new Bandit());
                mobs.Add(new Bandit());
                mobs.Add(new Bandit());
                mobs.Add(new Bandit());
                mobs.Add(new Bandit());
                mobs.Add(new Bandit());
                CombatAction combatAction = new CombatAction("Bandits", mobs);
                combatAction.PostCombat += LivingRoomMobs;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A large living room with several pieces of furniture and a table in the middle. There are cards scattered about the table from an abandoned game.";
            }

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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerMayorHouse.GetTownInstance().GetEntranceDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedMobs)
            {
                locationDefinition = BeachTowerMayorHouse.GetTownInstance().GetKitchenDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
Exemplo n.º 2
0
        public Location LoadKitchen()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Kitchen";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerMayorHouse.KITCHEN_MOBS));

            if (!defeatedMobs)
            {
                returnData.Description = "A large kitchen. There is both a cooking area and a large table to serve many guest at once. It is clear that the Mayor is used to entertaining a lot of people for meals. There are several bandits going through the Mayor's food stores.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new Bandit());
                mobs.Add(new Bandit());
                mobs.Add(new Bandit());
                mobs.Add(new Bandit());
                CombatAction combatAction = new CombatAction("Bandits", mobs);
                combatAction.PostCombat += KitchenMobs;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A large kitchen. There is both a cooking area and a large table to serve many guest at once. It is clear that the Mayor is used to entertaining a lot of people for meals.";
            }

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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerMayorHouse.GetTownInstance().GetLivingRoomDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedMobs)
            {
                locationDefinition = BeachTowerMayorHouse.GetTownInstance().GetMeetingRoomDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
Exemplo n.º 3
0
        public Location LoadMeetingRoom()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Meeting Room";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerMayorHouse.MEETING_ROOM_MOBS));

            if (!defeatedMobs)
            {
                returnData.Description = "This is a relatively small room compared to the others in the house. However it is still rather large compared to rooms in most houses. There is a large table in the middle of the room with documents scattered about, dealing with various parts of the town. There are some necromancers inspecting the documents.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new Necromancer());
                mobs.Add(new Necromancer());
                mobs.Add(new Necromancer());
                CombatAction combatAction = new CombatAction("Necromancers", mobs);
                combatAction.PostCombat += MeetingRoomMobs;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "This is a relatively small room compared to the others in the house. However it is still rather large compared to rooms in most houses. There is a large table in the middle of the room with documents scattered about, dealing with various parts of the town.";
            }

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

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

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedMobs)
            {
                locationDefinition = BeachTowerMayorHouse.GetTownInstance().GetStairsDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
Exemplo n.º 4
0
        public Location LoadStairs()
        {
            Location returnData;

            returnData             = new Location();
            returnData.Name        = "Stairs";
            returnData.Description = "A large and twisting staircase, with ornate railing.";

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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerMayorHouse.GetTownInstance().GetMeetingRoomDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = BeachTowerMayorHouse.GetTownInstance().GetUpstairsHallwayDefinition();
            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
Exemplo n.º 5
0
        public Location LoadEntrance()
        {
            Location returnData;

            returnData             = new Location();
            returnData.Name        = "Mayor's House";
            returnData.Description = "An large house that shows off the wealth of the small town in a humble and simplistic way.";

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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerCapturedVillage.GetTownInstance().GetMayorsHouseDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = BeachTowerMayorHouse.GetTownInstance().GetLivingRoomDefinition();
            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);


            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

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

            returnData      = new Location();
            returnData.Name = "Outside the Mayor's House";
            //Add a confront masked bandit action
            //There will be a conversation with the bandit, followed by a brief fight
            //After the fight the bandit will throw out an insult and flee
            //The player will then have to try to get into the house but realize its impossible.
            //There is some type of spell on the house preventing access.
            //The player will have to chase down the masked bandit to figure out how to get in.
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerCapturedVillage.HOUSE_DISTRICT_MOBS));
            bool openDoor     = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerCapturedVillage.HOUSE_DISTRICT_VILLAGERS));
            bool openedChest  = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerCapturedVillage.MASKED_BANDIT_TREASURE));

            if (!defeatedMobs)
            {
                returnData.Description = "At the center of the House District is the Mayor's House. A large house, at least twice as large as the houses that surround it. It looks to be untouched by the bandits, but you can hear screaming from within - as if people are being tortured inside. There is a masked bandit standing calmly at the front of the house preventing access inside.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new MaskedBandit());
                CombatAction combatAction = new CombatAction("Masked Bandit", mobs);
                combatAction.PostCombat += MaskedBandit;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else if (defeatedMobs && !openDoor)
            {
                returnData.Description = "At the center of the House District is the Mayor's House. A large house, at least twice as large as the houses that surround it. It looks to be untouched by the bandits, but you can hear screaming from within - as if people are being tortured inside.";
                List <LocationAction> locationActions = new List <LocationAction>();
                TakeItemAction        itemAction      = new TakeItemAction("Open", "Door", "You try to open the door but are repelled by a magical force. You realize you cannot break into the house. You have to somehow track down the Masked Bandit and force him to reveal how to get into the house and save the people trapped inside.");
                itemAction.PostItem += OpenMayorHouseDoor;
                locationActions.Add(itemAction);
                returnData.Actions = locationActions;
            }
            if (openDoor && !openedChest)
            {
                returnData.Description = "At the center of the House District is the Mayor's House. A large house, at least twice as large as the houses that surround it. It looks to be untouched by the bandits, but you can hear screaming from within - as if people are being tortured inside.";
                List <LocationAction> locationActions = new List <LocationAction>();
                TreasureChestAction   itemAction      = new TreasureChestAction(5);
                locationActions.Add(itemAction);
                itemAction.PostItem += MaskedBanditChest;
                returnData.Actions   = locationActions;
            }
            else
            {
                returnData.Description = "At the center of the House District is the Mayor's House. A large house, at least twice as large as the houses that surround it. It looks to be untouched by the bandits, but you can hear screaming from within - as if people are being tortured inside.";
            }

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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerCapturedVillage.GetTownInstance().GetHouseDistrictDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            //This is just a temporary port back to Beach Tower TownHall for in development testing (since next quest isn't in yet)
            if (openedChest)
            {
                locationDefinition = BeachTower.GetTownInstance().GetTownCenterDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            Accomplishment freeMayor = BeachTower.GetBeachTowerAccomplishments().Find(x => x.Name.Contains("Free Mayor"));

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
Exemplo n.º 7
0
        public Location LoadMasterBedroom()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Master Bedroom";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerMayorHouse.DEFEAT_BANDIT_RAID_LEADER));
            bool freeMayor    = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerMayorHouse.CAPTURED_MAYOR));
            bool tookTreasure = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerMayorHouse.TREASURE_CHEST));

            if (!defeatedMobs)
            {
                returnData.Description = "A large bedroom with a large elegent bed in the center of the fall wall. There are several bookshelves full of a wide variety of literature. There is a desk against a side wall with several documents and parchment scattered about it. It is clear the Mayor is quite a scholar. The Mayor is tied up to the front of his bed post, and a Bandit Raid Leader is standing in front of him with his sword drawn and pointed to the Mayor's neck.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new BanditRaidLeader());
                CombatAction combatAction = new CombatAction("Bandit Raid Leader", mobs);
                combatAction.PostCombat += BanditRaidLeader;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }

            else if (defeatedMobs && !freeMayor)
            {
                returnData.Description = "A large bedroom with a large elegent bed in the center of the fall wall. There are several bookshelves full of a wide variety of literature. There is a desk against a side wall with several documents and parchment scattered about it. It is clear the Mayor is quite a scholar. The Mayor is tied up to the front of his bed post.";
                List <LocationAction> locationActions = new List <LocationAction>();
                TakeItemAction        itemAction      = new TakeItemAction("Free", "Mayor", "You cut the ties that are binding the mayor to the bed. He thanks you and promptly leaves the house to asses the damage done to his town. You should report back to Mike at the Beach Tower to let him know that the Mayor is free and the town has been completely liberated.");
                itemAction.PostItem += FreeMayor;
                locationActions.Add(itemAction);
                returnData.Actions = locationActions;
            }

            else if (defeatedMobs && freeMayor && !tookTreasure)
            {
                returnData.Description = "A large bedroom with a large elegent bed in the center of the fall wall. There are several bookshelves full of a wide variety of literature. There is a desk against a side wall with several documents and parchment scattered about it. It is clear the Mayor is quite a scholar.";
                List <LocationAction> locationActions = new List <LocationAction>();
                TreasureChestAction   itemAction      = new TreasureChestAction(5);
                locationActions.Add(itemAction);
                itemAction.PostItem += TreasureChest;
                returnData.Actions   = locationActions;
            }
            returnData.Description = "A large bedroom with a large elegent bed in the center of the fall wall. There are several bookshelves full of a wide variety of literature. There is a desk against a side wall with several documents and parchment scattered about it. It is clear the Mayor is quite a scholar. The Mayor is tied up to the front of his bed post.";

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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerMayorHouse.GetTownInstance().GetUpstairsHallwayDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
Exemplo n.º 8
0
        public Location LoadGuestBedroom()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Guest Bedroom";
            bool defeatedMobs  = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerMayorHouse.GUEST_BEDROOM_MOBS));
            bool freeVillagers = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerMayorHouse.CAPTURED_VILLAGERS_GUEST_BEDROOM));
            bool tookKey       = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerMayorHouse.STOLEN_KEY_TO_MASTER_BEDROOM));

            if (!defeatedMobs)
            {
                returnData.Description = "A rather simple bedroom. There is a bed in a corner with a nightstand next to it. There is a bookshelf on the wall next to the window. The bookshelf has a mix of books on this part of Asku and some fictional books. There are several villagers tied up and shoved in the corner next to the bookshelf.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new Bandit());
                mobs.Add(new Bandit());
                mobs.Add(new Bandit());
                mobs.Add(new Bandit());
                CombatAction combatAction = new CombatAction("Bandits", mobs);
                combatAction.PostCombat += GuestBedroomMobs;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }

            //After defeating the mobs there will be an action to take a stolen key that you see on a bandit's body
            //Remember action to free prisoners

            else if (defeatedMobs && !freeVillagers)
            {
                returnData.Description = "A rather simple bedroom. There is a bed in a corner with a nightstand next to it. There is a bookshelf on the wall next to the window. The bookshelf has a mix of books on this part of Asku and some fictional books. There are several villagers tied up and shoved in the corner next to the bookshelf.";
                List <LocationAction> locationActions = new List <LocationAction>();
                TakeItemAction        itemAction      = new TakeItemAction("Free", "Captured Villagers", "You free the captured villagers. You inform them to head to the Beach Tower to recieve medical attention. You let them know that soldiers are stationed throughout the city helping with the clean up and that they will help escort them. As one of the villagers rushes to leave the room, she trips over a dead bandit's body, knocking it over and revealing a key tied to his belt.");
                itemAction.PostItem += TryDoor;
                locationActions.Add(itemAction);
                returnData.Actions = locationActions;
            }

            else if (defeatedMobs && freeVillagers && !tookKey)
            {
                returnData.Description = "A rather simple bedroom. There is a bed in a corner with a nightstand next to it. There is a bookshelf on the wall next to the window. The bookshelf has a mix of books on this part of Asku and some fictional books. One of the dead bandit's has a key tied to his belt.";
                List <LocationAction> locationActions = new List <LocationAction>();
                TakeItemAction        itemAction      = new TakeItemAction("Take", "Key from the dead Bandit", "You cut the piece of leather tying the key to the bandit's belt and put it in your pocket. This key might be useful later.");
                itemAction.PostItem += TakeKey;
                locationActions.Add(itemAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A rather simple bedroom. There is a bed in a corner with a nightstand next to it. There is a bookshelf on the wall next to the window. The bookshelf has a mix of books on this part of Asku and some fictional books.";
            }

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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerMayorHouse.GetTownInstance().GetUpstairsHallwayDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
Exemplo n.º 9
0
        public Location LoadUpstairsHallway()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Upstairs Hallway";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerMayorHouse.UPSTAIRS_HALLWAY_MOBS));
            bool haveKey      = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerMayorHouse.STOLEN_KEY_TO_MASTER_BEDROOM));
            bool doorUnlocked = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerMayorHouse.STOLEN_KEY_USED));

            if (!defeatedMobs)
            {
                returnData.Description = "A large hallway with only two rooms connected to it. There are some bandits standing guard at both doors.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new Bandit());
                mobs.Add(new Bandit());
                mobs.Add(new Bandit());
                mobs.Add(new Bandit());
                CombatAction combatAction = new CombatAction("Bandits", mobs);
                combatAction.PostCombat += HallwayMobs;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }

            //Add an action to try and open the Master Bedroom Door for as long as player doesn't have the stolen key
            //i.e. if(!stolenKey) { //Open Door }
            //Once the player has the stolen key they will actually have to unlock it with an action
            //i.e. if(stolenKey && !stolenKeyUsed) { //Unlock Door }
            //Once the player unlocks the door an adjacent location for the Master Bedroom will appear

            else if (!haveKey && defeatedMobs)
            {
                returnData.Description = "A large hallway with only two rooms connected to it.";
                List <LocationAction> locationActions = new List <LocationAction>();
                TakeItemAction        itemAction      = new TakeItemAction("Open", "Door to Master Bedroom", "You try to open the door. It's locked. Maybe you should go find a key.");
                itemAction.PostItem += TryDoor;
                locationActions.Add(itemAction);
                returnData.Actions = locationActions;
            }

            else if (haveKey && defeatedMobs)
            {
                returnData.Description = "A large hallway with only two rooms connected to it.";
                List <LocationAction> locationActions = new List <LocationAction>();
                TakeItemAction        itemAction      = new TakeItemAction("Unlock", "Door to Master Bedroom", "You unlock the door to the master bedroom. You may now enter.");
                itemAction.PostItem += UnlockDoor;
                locationActions.Add(itemAction);
                returnData.Actions = locationActions;
            }

            else
            {
                returnData.Description = "A large hallway with only two rooms connected to it. The master bedroom is now unlocked.";
            }

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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerMayorHouse.GetTownInstance().GetStairsDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = BeachTowerMayorHouse.GetTownInstance().GetGuestBedroomDefinition();
            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedMobs && doorUnlocked)
            {
                locationDefinition = BeachTowerMayorHouse.GetTownInstance().GetMasterBedroomDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }