public static ScriptModules New( Random random, GameDatabase db, AssetDatabase assetdb, GameSession game, NamesPool namesPool, GameSetup gameSetup) { ScriptModules scriptModules = new ScriptModules(); scriptModules.VonNeumann = VonNeumann.InitializeEncounter(db, assetdb); scriptModules.Swarmers = Swarmers.InitializeEncounter(db, assetdb); scriptModules.Gardeners = Gardeners.InitializeEncounter(db, assetdb); scriptModules.AsteroidMonitor = AsteroidMonitor.InitializeEncounter(db, assetdb); scriptModules.MorrigiRelic = MorrigiRelic.InitializeEncounter(db, assetdb); scriptModules.Slaver = Slaver.InitializeEncounter(db, assetdb); scriptModules.Pirates = Pirates.InitializeEncounter(db, assetdb); scriptModules.Spectre = Spectre.InitializeEncounter(db, assetdb); scriptModules.GhostShip = GhostShip.InitializeEncounter(db, assetdb); scriptModules.MeteorShower = MeteorShower.InitializeEncounter(db, assetdb); scriptModules.SystemKiller = SystemKiller.InitializeEncounter(db, assetdb); scriptModules.Locust = Locust.InitializeEncounter(db, assetdb); scriptModules.Comet = Comet.InitializeEncounter(db, assetdb); if (db.HasEndOfFleshExpansion()) { scriptModules.NeutronStar = NeutronStar.InitializeEncounter(db, assetdb); scriptModules.SuperNova = SuperNova.InitializeEncounter(); } scriptModules.AddEasterEggs(random, db, assetdb, game, namesPool, gameSetup); return(scriptModules); }
public override void Menu() { Console.Clear(); Return.Info(); Return.Roster(p); while (day < 11) { Write.Line(0, 18, "[1] " + Colour.GOLD + "Hire Gladiators\n" + Colour.RESET); Write.Line("[2] " + Colour.ENERGY + "Manage Gladiators" + Colour.RESET); Write.Line("[3] " + Colour.ITEM + "Purchase Equipment" + Colour.RESET); Write.Line("[4] " + Colour.ENERGY + "Jobs" + Colour.RESET); Write.Line("[5] " + Colour.ENERGY + "Shady Jobs" + Colour.RESET); Write.Line("[6] " + Colour.DEFENCE + "Graveyard" + Colour.RESET); Write.Line("[7] " + Colour.XP + "Owner Rankings" + Colour.RESET); if (audience) { Write.Line("[8] " + Colour.XP + "Audience with the emperor" + Colour.RESET); } else { Write.Line("[X] " + Colour.MITIGATION + "The emperor has no interest in you" + Colour.RESET); } Write.Line("[X] " + Colour.MITIGATION + "Not implemented" + Colour.RESET); Write.Line("[0] " + Colour.TIME + "Next day" + Colour.RESET); Write.Line("[?] Help"); string choice = Return.Option(); if (choice == "1") { Location.list[1].Go(); } else if (choice == "2") { Location.list[2].Go(); } else if (choice == "3") { Location.list[3].Go(); } else if (choice == "9") { } else if (choice == "0") { Arena.Match(ownerList[0].Roster[0], ownerList[1].Roster[0]); Arena.Match(ownerList[2].Roster[0], ownerList[3].Roster[0]); Arena.Match(ownerList[4].Roster[0], ownerList[5].Roster[0]); Arena.Match(ownerList[6].Roster[0], ownerList[7].Roster[0]); Arena.Match(ownerList[8].Roster[0], ownerList[9].Roster[0]); day++; p.Action = 3; if (day % 3 == 0) { Slaver.NewStock(); } Recap.Go(); } Menu(); } }
static void Main(string[] args) { Colour.SetupConsole(); string[] names = System.IO.File.ReadAllLines(Environment.CurrentDirectory + "/Names.txt"); for (int i = 0; i < names.Length; i++) { Gladiator.list.Add(names[i]); } for (int i = 0; i < 9; i++) { Owner.list.Add(new ComputerOwner(Return.RandomInt(2, 5), 6, Return.RandomInt(50, 300), Return.RandomInt(-10, 90))); } Write.Line(Colour.RESET); Slaver.NewStock(); Story(); }
public static ScriptModules Resume(GameDatabase db) { ScriptModules scriptModules = new ScriptModules(); scriptModules.VonNeumann = VonNeumann.ResumeEncounter(db); scriptModules.Swarmers = Swarmers.ResumeEncounter(db); scriptModules.Gardeners = Gardeners.ResumeEncounter(db); scriptModules.AsteroidMonitor = AsteroidMonitor.ResumeEncounter(db); scriptModules.MorrigiRelic = MorrigiRelic.ResumeEncounter(db); scriptModules.Slaver = Slaver.ResumeEncounter(db); scriptModules.Pirates = Pirates.ResumeEncounter(db); scriptModules.Spectre = Spectre.ResumeEncounter(db); scriptModules.GhostShip = GhostShip.ResumeEncounter(db); scriptModules.MeteorShower = MeteorShower.ResumeEncounter(db); scriptModules.SystemKiller = SystemKiller.ResumeEncounter(db); scriptModules.Locust = Locust.ResumeEncounter(db); scriptModules.Comet = Comet.ResumeEncounter(db); if (db.HasEndOfFleshExpansion()) { scriptModules.NeutronStar = NeutronStar.ResumeEncounter(db); scriptModules.SuperNova = SuperNova.ResumeEncounter(); } List <PlayerInfo> list = db.GetPlayerInfos().Where <PlayerInfo>((Func <PlayerInfo, bool>)(x => { if (!x.isStandardPlayer) { return(!x.includeInDiplomacy); } return(false); })).ToList <PlayerInfo>(); foreach (int playerID in db.GetStandardPlayerIDs().ToList <int>()) { foreach (PlayerInfo playerInfo in list) { DiplomacyInfo diplomacyInfo = db.GetDiplomacyInfo(playerID, playerInfo.ID); if (diplomacyInfo.State != DiplomacyState.WAR) { db.UpdateDiplomacyState(playerID, playerInfo.ID, DiplomacyState.WAR, diplomacyInfo.Relations, true); } } } return(scriptModules); }
public bool Load(GridSaveLoadObj loadObj, double objTime) { try { var obj = (GridSaveLoadObj)loadObj; TimeCurr = obj.Time; LayerList.Clear(); foreach (var lr in obj.Layers.OrderBy(ll => ll.Time)) { LayerList.AddFirst(lr); lr.ActionWhenLoad(); } Slaver = obj.MemTactic; Slaver.LoadWhatToDo(); } catch (Exception) { return(false); } return(true); }
public static void Start() { foreach (Owner o in Create.owners) { owners.Add(o); } Slaver.NewStock(); for (int i = 0; i < 8; i++) { Manage.managerNames.Add(Return.Name()); } Console.Clear(); Write.Line("You have been recruited...\n\n"); Write.Line("The emperor has decided to host a tournament to entertain the people of the mighty nation of Marburgh."); Write.Line("You have been selected, given a small sum of money and a gladiator, and told you have 10 days to prepare.\n\n"); Write.Line("Win and you will be given ANYTHING you desire"); Write.Line("That thing you're thinking of? Yeah, you can have that\n\n"); Write.Line("Lose and you will be put to death\n"); Write.Line("Now that's entertainment!"); Write.KeyPress(0, 28); Menu(); }
public static void Menu() { Console.Clear(); Return.PlayerInfo(); Return.Managers(); Write.Line(90, 17, Color.SPEAK + "Toggle Information" + Color.RESET); Write.Line(90, 19, "[S]tats"); Write.Line(90, 20, "[I]njuries"); Write.Line(90, 21, "[E]quipment"); if (display == Display.Stats) { Return.Roster(player, 5); } else if (display == Display.Injuries) { Manage.Injuries(); } else if (display == Display.Equipment) { Manage.Equipment(); } while (day < 11) { Write.Line(0, 18, "[1] " + Color.GOLD + "Hire Gladiators\n" + Color.RESET); Write.Line("[2] " + Color.ENERGY + "Manage Gladiators" + Color.RESET); Write.Line("[3] " + Color.ITEM + "Purchase Equipment" + Color.RESET); Write.Line("[4] " + Color.ENERGY + "Jobs" + Color.RESET); if (Graveyard.graveyard.Count > 0) { Write.Line("[5] " + Color.DURABILITY + "Graveyard" + Color.RESET); } else { Write.Line("[X] " + Color.MITIGATION + "The graveyard is empty" + Color.RESET); } int gladiatorsWithAWin = 0; foreach (Owner o in Create.owners) { foreach (Gladiator g in o.roster) { if (g.wins > 0) { gladiatorsWithAWin++; } } } if (gladiatorsWithAWin > 9) { Write.Line("[6] " + Color.XP + "Top 10 Gladiators" + Color.RESET); } else { Write.Line("[X] " + Color.MITIGATION + "Not enough gladiators have won a match" + Color.RESET); } Write.Line("[7] " + Color.XP + "Owner Rankings" + Color.RESET); if (audience) { Write.Line("[8] " + Color.XP + "Audience with the emperor" + Color.RESET); } else { Write.Line("[X] " + Color.MITIGATION + "The emperor has no interest in you" + Color.RESET); } if (fightsToday) { Write.Line("[A] " + Color.STRENGTH + "The Arena!" + Color.RESET); } else { Write.Line("[X] " + Color.MITIGATION + "There are no other fights today" + Color.RESET); } Write.Line("[0] " + Color.TIME + "Next day" + Color.RESET); Write.Line("[Q] Quit"); string choice = Return.Option(); if (choice == "1") { Slaver.Hire(); } else if (choice == "2") { Manage.Gladiators(); } else if (choice == "3") { Purchase.Equipment(); } else if (choice == "5" && Graveyard.graveyard.Count > 0) { Graveyard.Visit(); } else if (choice == "6" && gladiatorsWithAWin > 9) { Rankings.Gladiators(); } else if (choice == "7") { Rankings.Owner(); } else if (choice == "a") { fightsToday = false; for (int i = 0; i < 6; i++) { Owner o = owners[Return.RandomInt(0, owners.Count)]; schedule.Add(o); owners.Remove(o); } owners = schedule; ScheduleDisplay(); Combat.Start(schedule[0].roster[0], schedule[1].roster[0]); Combat.Start(schedule[2].roster[0], schedule[3].roster[0]); Combat.Start(schedule[4].roster[0], schedule[5].roster[0]); } else if (choice == "0") { day++; player.actions = 3; if (day % 3 == 0) { Slaver.NewStock(); } // All the next day stuff fightsToday = true; } else if (choice == "s") { display = Display.Stats; } else if (choice == "e") { display = Display.Equipment; } else if (choice == "i") { display = Display.Injuries; } else if (choice == "q") { Environment.Exit(0); } Menu(); } Console.Clear(); Write.Line("YOU ARE IN THE NEXT STAGE OF THE GAME! CONGRATS!"); Write.KeyPress(); Environment.Exit(0); }
/// <summary> /// функция эволюции секти за шаг по времени с применением логики сохранения/контроля памяти /// </summary> /// <param name="deltaTau">шаг по времени</param> public void StepUp(double deltaTau) { StepUpLogic(deltaTau); TimeCurr += deltaTau; Slaver.StepWhatToDo(); }