public void HeardSpyReportRumor() { Accomplishment accomplishment = BeachTowerSpies.GetBeachTowerSpiesAccomplishments().Find(x => x.Name.Contains("Guard Report")); GameState.Hero.Accomplishments.Add(accomplishment); //Reload the entrance so it will open up the hallway LocationHandler.ResetLocation(ENTRANCE_KEY); }
public Location LoadEntrance() { Location returnData; returnData = new Location(); returnData.Name = "Beach Tower Underground Floor"; bool talkedToGuard = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerSpies.TALKED_TO_GUARD)); returnData.Description = "The air is thicker upon arriving at the underground tower floor. There is tower soldier standing guard at the entrance."; //Location Actions List <LocationAction> locationActions = new List <LocationAction>(); //Adding the guard report about the spies into the locationActions LocationAction GuardReportAction = new RumorAction("Aken - Lieutenant of the Guard", this.GuardReport); locationActions.Add(GuardReportAction); returnData.Actions = locationActions; //Adjacent Locations Dictionary <string, LocationDefinition> adjacentLocationDefintions = new Dictionary <string, LocationDefinition>(); //Town Center LocationDefinition locationDefinition = BeachTower.GetTownInstance().GetTownCenterDefinition(); adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition); Accomplishment guard = BeachTowerSpies.GetBeachTowerSpiesAccomplishments().Find(x => x.Name.Contains("Guard Report")); if (GameState.Hero.Accomplishments.Contains(guard)) { locationDefinition = BeachTowerSpies.GetTownInstance().GetHallwayDefinition(); adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition); } returnData.AdjacentLocationDefinitions = adjacentLocationDefintions; return(returnData); }