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 LoadNarrowPath() { Location returnData; returnData = new Location(); returnData.Name = "Narrow Path"; returnData.Description = "The path is small and narrow and goes on for a good distance."; //Actions // Adjacent Locations Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>(); // Town Center LocationDefinition locationDefinition = WatertownForest.GetTownInstance().GetClearingDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); locationDefinition = WatertownForestClearingBeforeTower.GetTownInstance().GetClearingDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions; return(returnData); }
public Location LoadForestEntrance() { Location returnData; returnData = new Location(); returnData.Name = "Watertown Forest Entrance"; returnData.Description = "A dense yet surprisingly bright forest. You can hear the laughter of the bandits off in the distance"; // Adjacent Locations Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>(); LocationDefinition locationDefinition = Watertown.GetTownInstance().GetTownCenterDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); locationDefinition = WatertownForest.GetTownInstance().GetSideAreaDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); locationDefinition = WatertownForest.GetTownInstance().GetStraightDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions; return(returnData); }
public Location LoadClearing() { Location returnData = new Location(); returnData.Name = "Forest Clearing"; bool defeatedBanditCaptain = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownForest.DEFEATED_BANDIT_CAPTAIN_KEY)); Accomplishment murderRoomAccomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Bandit Spy")); if (!defeatedBanditCaptain) { returnData.Description = "The Bandit Captain stands in the clearing and stares at you, daring you to challenge him."; } else if (defeatedBanditCaptain && !GameState.Hero.Accomplishments.Contains(murderRoomAccomplishment)) { returnData.Description = "The Bandit Captain lays dead in the clearing."; } else if (GameState.Hero.Accomplishments.Contains(murderRoomAccomplishment)) { returnData.Description = "A medium sized clearing. Now that you've been told to search for the tower you can see a covered up entrance to a narrow path. It also looks like the Bandit Captain's body has been removed."; } // Location Actions List <LocationAction> locationActions = new List <LocationAction>(); if (!defeatedBanditCaptain) { List <Mob> banditCaptain = new List <Mob>(); banditCaptain.Add(new BanditCaptain()); CombatAction combatAction = new CombatAction("Bandit Captain", banditCaptain); combatAction.PostCombat += BanditCaptainResults; locationActions.Add(combatAction); returnData.Actions = locationActions; } Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>(); LocationDefinition locationDefinition = WatertownForest.GetTownInstance().GetStraightDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); if (defeatedBanditCaptain) { locationDefinition = Watertown.GetTownInstance().GetTownCenterDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); LocationHandler.SetLocationStateValue(Watertown.LOCATION_STATE_KEY, DEFEATED_CAPTAIN_STATE, true); LocationHandler.ResetLocation(Watertown.INN_KEY); // Need to reload Inn so that new conversation can be set. } if (GameState.Hero.Accomplishments.Contains(murderRoomAccomplishment)) { locationDefinition = WatertownForestClearingBeforeTower.GetTownInstance().GetEntranceDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); } returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions; return(returnData); }
public static WatertownForest GetTownInstance() { if (_WatertownForest == null) { _WatertownForest = new WatertownForest(); } return(_WatertownForest); }
public Location LoadStraight() { Location returnData = new Location(); returnData.Name = "Watertown Forest Straight Path"; bool defeatedBandits = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownForest.DEFEATED_STRAIGHT_BANDITS_KEY)); if (!defeatedBandits) { returnData.Description = "You walk forward on the path and encounter bandits. You must conquer them to move on"; } else { returnData.Description = "The dead bodies of bandits lay strewn across the ground."; } // Location Actions List <LocationAction> locationActions = new List <LocationAction>(); if (!defeatedBandits) { List <Mob> bandits = new List <Mob>(); bandits.Add(new Bandit()); bandits.Add(new Bandit()); bandits.Add(new Bandit()); bandits.Add(new Bandit()); CombatAction combatAction = new CombatAction("Bandits", bandits); combatAction.PostCombat += StraightBanditResults; locationActions.Add(combatAction); returnData.Actions = locationActions; } // Adjacent Locations Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>(); LocationDefinition locationDefinition = WatertownForest.GetTownInstance().GetForestEntranceDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); if (defeatedBandits) { locationDefinition = WatertownForest.GetTownInstance().GetClearingDefinition(); 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); }
public Location LoadTownCenter() { Location returnData; LocationAction locationAction; returnData = new Location(); returnData.Name = "Watertown Town Center"; returnData.Description = "Welcome to the cozy Watertown Town Center."; // Location Actions List <LocationAction> locationActions = new List <LocationAction>(); locationAction = new DisplayStatsAction(); locationActions.Add(locationAction); locationAction = new DisplayInventoryAction(); locationActions.Add(locationAction); locationAction = new DisplayPotionBagAction(); locationActions.Add(locationAction); locationAction = new DisplayEquippedAction(); locationActions.Add(locationAction); locationAction = new AffixSwapperAction(); locationActions.Add(locationAction); locationAction = new StoreAction(); locationActions.Add(locationAction); locationAction = new MainMenuAction(); locationActions.Add(locationAction); locationAction = new ExitGame(); locationActions.Add(locationAction); returnData.Actions = locationActions; // Adjacent Locations Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>(); LocationDefinition locationDefinition = GetArenaDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); locationDefinition = GetInnDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); locationDefinition = GetConstableOfficeDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); Accomplishment sewerKingAccomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Sewer King")); if (GameState.Hero.Accomplishments.Contains(sewerKingAccomplishment)) { locationDefinition = WatertownSewer.GetTownInstance().GetSewerEntranceDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); } Accomplishment banditCaptainAccomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Bandit Captain")); if (GameState.Hero.Accomplishments.Contains(banditCaptainAccomplishment)) { locationDefinition = WatertownForest.GetTownInstance().GetForestEntranceDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); } Accomplishment murderRoomAccomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Bandit Murder")); if (GameState.Hero.Accomplishments.Contains(murderRoomAccomplishment)) { locationDefinition = WatertownBanditHouse.GetTownInstance().GetEntranceDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); } Accomplishment banditKingAccomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Bandit God King")); if (GameState.Hero.Accomplishments.Contains(banditKingAccomplishment)) { locationDefinition = Ankou.GetTownInstance().GetTownCenterDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); } returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions; return(returnData); }