public static void LocationInfo(List <BaseLocation> locations, string locName, List <BaseCriminal> crew) { Color.DefaultGray(); // Get the selected location BaseLocation selectedLoc = locations.Find(l => l.Name == locName); // Display the Stakeout heading Console.WriteLine(Heading.DisplayStakeout()); CrewManagement.DisplayCrewInfo(crew); //Split the difficulty description on the '[' for easier reading List <string> diffDesciptions = selectedLoc.DifficultyDescription.Split("[").ToList(); // Display location info Console.WriteLine($@" {selectedLoc.Image} {selectedLoc.Name} _____ {selectedLoc.Summary} {diffDesciptions[0]} [{diffDesciptions[1]} _____ "); // Options for stakeouts if (selectedLoc.WaitsInVanAvailable >= 1) { if (selectedLoc.WaitsInVanAvailable > 1) { Console.WriteLine($"1) keep watching from van [{selectedLoc.WaitsInVanAvailable} waits left]"); } else { Console.WriteLine($"1) keep watching from van [{selectedLoc.WaitsInVanAvailable} wait left]"); } } else if (selectedLoc.WaitsInVanAvailable == 0) { Console.WriteLine("Come back later to continue staking out from van. You don't wait to raise suspicion."); } Console.WriteLine("2) begin heist"); Console.WriteLine("3) return to planning"); int selection = Menu.MenuInput(3); // Switch based on user input switch (selection) { case 1: LocationInfo(WaitInVan(locations, locName), locName, crew); break; case 2: Heist.CountDown(); Heist.BeginHeist(crew, locations, locName); break; case 3: LevelSelect(crew, locations); break; } }
public static List <BaseCriminal> IceAssociateCheck(List <BaseCriminal> crew, List <BaseLocation> locations, bool splitCashMenu) { Console.Clear(); string name = "not empty for a base value"; if (!splitCashMenu) { while (name != "" && crew.Count() > 1) { Console.Clear(); Console.WriteLine(Heading.DisplayIce()); CrewManagement.DisplayCrewInfo(crew); DisplayIceAssociateWarning(crew); name = Console.ReadLine(); // Store the criminal who was iced for use in display BaseCriminal whoWasIced = crew.Find(c => c.Name == name); // Make a new list of criminals WITHOUT the iced crew member List <BaseCriminal> icedCrew = crew.Where(c => c.Name != name || c.IsPlayer == true).ToList(); // Only lower morale if we have iced a crew member if (icedCrew.Count() < crew.Count()) { // Lower the crews morale List <BaseCriminal> newCrew = LowerMoraleFromIce(icedCrew); // Display Who was iced, if not null if (whoWasIced != null) { DisplayWhoWasIced(whoWasIced); } WillCrewMemberRunAfterIce(newCrew, locations); crew = newCrew; } // We didn't type in a name, so return the new crew else { crew = icedCrew; } } } else if (splitCashMenu) { Console.Clear(); Console.WriteLine(Heading.DisplayIce()); CrewManagement.DisplayCrewInfoShortened(crew); DisplayIceAssociateWarning(crew); name = Console.ReadLine(); // Store the criminal who was iced for use in display BaseCriminal whoWasIced = crew.Find(c => c.Name == name); // Make a new list of criminals WITHOUT the iced crew member List <BaseCriminal> icedCrew = crew.Where(c => c.Name != name || c.IsPlayer == true).ToList(); // Only lower morale if we have iced a crew member if (icedCrew.Count() < crew.Count()) { // Lower the crews morale List <BaseCriminal> newCrew = LowerMoraleFromIce(icedCrew); // Display Who was iced, if not null if (whoWasIced != null) { DisplayWhoWasIced(whoWasIced); } newCrew.ForEach(c => { if (c.IsPlayer) { c.PlayerFiredWeapon = true; } }); crew = newCrew; } // We didn't type in a name, so return the new crew, and do not let anyone shoot else { crew = icedCrew.Select(c => { if (c.IsPlayer) { c.PlayerFiredWeapon = false; return(c); } else { return(c); } }).ToList(); } } // If the first check is false, return a crew return(crew); }
public static void LevelSelect(List <BaseCriminal> crew, List <BaseLocation> locations) { Color.DefaultGray(); // While there are levels not yet completed, allow user to continue selecting levels List <BaseLocation> locationsLeftToRob = locations.Where(l => l.Completed == false).ToList(); BaseCriminal player = crew.Find(c => c.IsPlayer); while (locationsLeftToRob.Count() > 0) { Console.Clear(); Console.Write(Heading.DisplayPlanning()); CrewManagement.DisplayCrewInfo(crew); Console.WriteLine(LevelArt.DisplayNashville()); if (player.PlayerContactCount == 0 && crew.Count() == 1) { Console.WriteLine("No crew left to manage"); Console.WriteLine("______________________"); Console.WriteLine(""); } else { Console.WriteLine("1) manage crew"); Console.WriteLine("______________"); Console.WriteLine(""); } // Iterate through locations, for those that are not completed, then show those options locations.ForEach(l => { if (!l.Completed) { if (l.Name == "Annoying Neighbor's House") { Console.WriteLine("2) stakeout Annoying Neighbor's House"); } if (l.Name == "Corner Evan-Eleven") { Console.WriteLine("3) stock-up at Corner Evan-Eleven"); } if (l.Name == "Welts Fargo") { Console.WriteLine("4) stakeout Welts Fargo"); } if (l.Name == "Pinnackle National Bank") { Console.WriteLine("5) stakeout Pinnackle National Bank"); } if (l.Name == "Bank of Amereeka") { Console.WriteLine("6) stakeout Bank of Amereeka"); } } }); // IF you have ANY money, option 7 is available if (player.CrewTotalCash > 0) { Console.WriteLine("____________"); Console.WriteLine(""); if (crew.Count() == 1) { Console.WriteLine("7) end heist spree"); } else { Console.WriteLine("7) end heist spree and split cash"); } } // Check to ensure user typed only a number int selection = Menu.MenuInput(7); switch (selection) { case 1: if (player.PlayerContactCount == 0 && crew.Count() == 1) { LevelSelect(crew, locations); } else { CrewManagement.ManageCrew(crew, locations); } break; case 2: // Annoying Neighbor StakeOutLocation(crew, locations, 2); break; case 3: // Evan-Eleven StakeOutLocation(crew, locations, 3); break; case 4: // Welts Fargo StakeOutLocation(crew, locations, 4); break; case 5: // Pinnackle StakeOutLocation(crew, locations, 5); break; case 6: // Amereeka StakeOutLocation(crew, locations, 6); break; case 7: // End game - split cash if (player.CrewTotalCash > 0) { Outro.SplitCash(Outro.PrepCrewForEndGame(crew), locations); } break; } locationsLeftToRob = locations.Where(l => l.Completed == false).ToList(); } Outro.SplitCash(Outro.PrepCrewForEndGame(crew), locations); }