public Location LoadSideArea() { Location returnData; returnData = new Location(); returnData.Name = "Watertown Forest Side Area"; Accomplishment banditCaveAccomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Bandit Cave")); if (!(GameState.Hero.Accomplishments.Contains(banditCaveAccomplishment))) { returnData.Description = "You move off to a little side area you saw. There is nothing here but more trees."; } else { returnData.Description = "Now that you were told of the cave's existence, you can spot it hiding behind some trees."; } //Adjacent Locations Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>(); LocationDefinition locationDefinition = WatertownForest.GetTownInstance().GetStartingLocationDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions; if (GameState.Hero.Accomplishments.Contains(banditCaveAccomplishment)) { locationDefinition = WatertownBanditCave.GetTownInstance().GetStartingLocationDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); } returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions; 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); }
public Location Lair() { Location returnData; bool defeatedLieutenant = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownBanditCave.DEFEATED_LIEUTENANT_KEY)); returnData = new Location(); returnData.Name = "Lieutenant's Lair"; Accomplishment hiddenRoomAccomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Hidden Room")); if (!defeatedLieutenant) { returnData.Description = "A large room, furnished with expensive decorations. The Lieutenant stands in the middle of the room"; // Location Actions List <LocationAction> locationActions = new List <LocationAction>(); List <Mob> bandits = new List <Mob>(); bandits.Add(new BanditLieutenant()); CombatAction combatAction = new CombatAction("Bandit Lieutenant", bandits); combatAction.PostCombat += LairResults; locationActions.Add(combatAction); returnData.Actions = locationActions; } else { returnData.Description = "A large ornate room. The Bandit Lieutenant lays dead in the middle of the room. There's a book shelf against the left hand wall that seems out of place. You wonder why it's there..."; } // Adjacent Locations Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>(); LocationDefinition locationDefinition = WatertownBanditCave.GetTownInstance().GetCaveHallwayDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); if (GameState.Hero.Accomplishments.Contains(hiddenRoomAccomplishment)) { locationDefinition = WatertownBanditCaveDeeper.GetTownInstance().GetStartingLocationDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); } if (defeatedLieutenant) { locationDefinition = Watertown.GetTownInstance().GetTownCenterDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); LocationHandler.SetLocationStateValue(Watertown.LOCATION_STATE_KEY, DEFEATED_LIEUTENANT_KEY, true); LocationHandler.ResetLocation(Watertown.INN_KEY); // Need to reload Inn so that new conversation can be set. } returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions; return(returnData); }
public Location CaveHallway() { Location returnData; bool defeatedBandits = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownBanditCave.DEFEATED_HALLWAY_BANDITS_KEY)); returnData = new Location(); returnData.Name = "Bandit Hallway"; if (!defeatedBandits) { returnData.Description = "A long hallway. Your path is blocked by bandits."; // Location Actions List <LocationAction> locationActions = new List <LocationAction>(); List <Mob> bandits = new List <Mob>(); bandits.Add(new Bandit()); bandits.Add(new Bandit()); CombatAction combatAction = new CombatAction("Bandits", bandits); combatAction.PostCombat += HallwayResults; locationActions.Add(combatAction); returnData.Actions = locationActions; } else { returnData.Description = "A long hallway, dead bandits lay on the ground."; } // Adjacent Locations Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>(); LocationDefinition locationDefinition = WatertownBanditCave.GetTownInstance().GetCaveEntranceDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); if (defeatedBandits) { locationDefinition = WatertownBanditCave.GetTownInstance().GetLairDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); } returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions; return(returnData); }
public Location LoadCaveEntrance() { Location returnData; returnData = new Location(); returnData.Name = "Bandit Cave Entrance"; returnData.Description = "A small room covered in dirt and mud. There is a passageway that leads further on into the cave."; // Adjacent Locations Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>(); LocationDefinition locationDefinition = WatertownForest.GetTownInstance().GetSideAreaDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); locationDefinition = WatertownBanditCave.GetTownInstance().GetCaveHallwayDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions; return(returnData); }