public virtual void implement(VoteOption option) { bool positive = true; int priority = (society.hasEnthralled()) ? 1 : 3; string msg = society.getName() + ": chose " + option.info(this) + " for " + this.ToString(); World.staticMap.addMessage(msg, priority, positive, society.getCapitalHex()); bool proposerPassed = false; foreach (Person p in option.votesFor) { if (option.votesFor.Contains(p)) { proposerPassed = true; } } if (proposerPassed) { proposer.prestige += World.staticMap.param.society_prestigeFromVotingSuccess; } else { proposer.prestige += World.staticMap.param.society_prestigeFromVotingFailure; if (proposer.prestige < 0) { proposer.prestige = 0; } } }
public override void implement(VoteOption option) { base.implement(option); if (option.group != null) { Society receiver = (Society)option.group; bool canVassalise = false; List <Location> trans = new List <Location>(); foreach (Location loc in society.map.locations) { if (loc.soc == society) { trans.Add(loc); } if (loc.soc == receiver && loc.settlement != null) { canVassalise = true; } } if (canVassalise) { World.log(society.getName() + " ALLIES UNDER " + receiver.getName()); society.map.turnMessages.Add(new MsgEvent(society.getName() + " forms alliance under " + receiver.getName() + ", transferring all lands and landed nobles.", MsgEvent.LEVEL_RED, true, receiver.getCapitalHex())); foreach (Location loc in trans) { receiver.map.takeLocationFromOther(receiver, society, loc); } string message = society.getName() + " is allying itself under " + receiver.getName() + ", in response to their fears of the rising darkness. This alliance is made of nations " + " believed to be safe from the shadow"; if (receiver.allianceName == null) { if (receiver.getCapital() != null) { string name = ""; int q = Eleven.random.Next(7); if (q == 0) { name = receiver.getCapital().shortName + " Alliance"; } if (q == 1) { name = receiver.getCapital().shortName + " Concord"; } if (q == 2) { name = receiver.getCapital().shortName + " Guardians"; } if (q == 3) { name = "Alliance of " + receiver.getCapital().shortName; } if (q == 4) { name = receiver.getCapital().shortName + " Entente"; } if (q == 5) { name = "The " + receiver.getCapital().shortName + " League"; } if (q == 6) { name = "The " + receiver.getCapital().shortName + " Compact"; } message += "\nThis alliance will now go by the name of " + name; receiver.allianceName = name; } } society.map.world.prefabStore.popImgMsg(message, "The sheep naturally flock together in times of threat, seeking safety in number. But is the wolf already in their midst?"); } } }