public override void cast(Map map, Hex hex) { //base.cast(map, hex); Society soc = map.overmind.enthralled.society; Person proposer = map.overmind.enthralled; VoteIssue issue = null; List <VoteIssue> potentialIssues = new List <VoteIssue>(); if (soc.posture == Society.militaryPosture.offensive && soc.offensiveTarget != null && (soc.isAtWar() == false)) { issue = new VoteIssue_DeclareWar(soc, soc.offensiveTarget, proposer); potentialIssues.Add(issue); VoteOption option_0 = new VoteOption(); option_0.index = 0; issue.options.Add(option_0); VoteOption option_1 = new VoteOption(); option_1.index = 1; issue.options.Add(option_1); } if (proposer.title_land != null) { potentialIssues.AddRange(econIssues(map, proposer, soc)); } //Remove unlanded nobles List <Person> removables = new List <Person>(); foreach (Person p in soc.people) { if (p.title_land == null) { removables.Add(p); } } if (removables.Count != 0) { issue = new VoteIssue_DismissFromCourt(soc, proposer); foreach (Person p in removables) { VoteOption option = new VoteOption(); option.person = p; issue.options.Add(option); } potentialIssues.Add(issue); } issue = new VoteIssue_MilitaryStance(soc, proposer); potentialIssues.Add(issue); for (int i = 0; i < 3; i++) { VoteOption opt = new VoteOption(); opt.index = i; issue.options.Add(opt); } //Check to see if you want to alter offensive military targetting issue = new VoteIssue_SetOffensiveTarget(soc, proposer); foreach (SocialGroup neighbour in map.getExtendedNeighbours(soc)) { VoteOption option = new VoteOption(); option.group = neighbour; issue.options.Add(option); } potentialIssues.Add(issue); //Check to see if you want to alter defensive military targetting issue = new VoteIssue_SetDefensiveTarget(soc, proposer); foreach (ThreatItem item in proposer.threatEvaluations) { if (item.group == null) { continue; } VoteOption option = new VoteOption(); option.group = item.group; issue.options.Add(option); } //Check if you want to vassalise yourself if (soc.offensiveTarget != null && soc.posture == Society.militaryPosture.defensive && (soc.isAtWar() == false)) { foreach (SocialGroup sg in soc.getNeighbours()) { if (sg is Society == false) { continue; } if (sg == soc) { continue; } Society other = (Society)sg; if (other.defensiveTarget == soc.defensiveTarget) { issue = new VoteIssue_Vassalise(soc, other, proposer); VoteOption option_0 = new VoteOption(); option_0.index = 0; issue.options.Add(option_0); VoteOption option_1 = new VoteOption(); option_1.index = 1; issue.options.Add(option_1); potentialIssues.Add(issue); } } } //Check if you want to execute someone if (soc.posture == Society.militaryPosture.introverted) { foreach (Person p in soc.people) { if (p == proposer) { continue; } issue = new VoteIssue_JudgeSuspect(soc, p, proposer); VoteOption option_0 = new VoteOption(); option_0.index = 0; issue.options.Add(option_0); VoteOption option_1 = new VoteOption(); option_1.index = 1; issue.options.Add(option_1); potentialIssues.Add(issue); } } foreach (Title t in soc.titles) { if (t.turnLastAssigned - map.turn > map.param.society_minTimeBetweenTitleReassignments) { issue = new VoteIssue_AssignTitle(soc, proposer, t); potentialIssues.Add(issue); //Everyone is eligible foreach (Person p in soc.people) { VoteOption opt = new VoteOption(); opt.person = p; issue.options.Add(opt); } } } foreach (Location loc in map.locations) { if (loc.soc == soc && loc.settlement != null && loc.settlement.title != null) { issue = new VoteIssue_AssignLandedTitle(soc, proposer, loc.settlement.title); potentialIssues.Add(issue); //Everyone is eligible foreach (Person p in soc.people) { VoteOption opt = new VoteOption(); opt.person = p; issue.options.Add(opt); } } } map.world.ui.addBlocker(map.world.prefabStore.getScrollSet(this, soc, potentialIssues).gameObject); map.overmind.hasTakenAction = false; }