public void goInsane() { int q = Eleven.random.Next(map.globalist.allInsanities.Count); madness = map.globalist.allInsanities[q]; map.addMessage(this.getFullName() + " has gone insane, and is now " + madness.name, MsgEvent.LEVEL_DARK_GREEN2, true, this.getLocation().hex); }
public Person(Society soc) { this.society = soc; firstName = TextStore.getName(isMale); madness = new Insanity_Sane(); maxSanity = Eleven.random.Next(map.param.insanity_maxSanity); sanity = maxSanity; if (World.logging) { log = new LogBox(this); } politics_militarism = Math.Pow(Eleven.random.NextDouble(), 2);//Bias towards 0 //Chance of pacifism if (Eleven.random.NextDouble() < 0.33) { politics_militarism *= -1; } //Add permanent threats threat_enshadowedNobles = new ThreatItem(map, this); threat_enshadowedNobles.form = ThreatItem.formTypes.ENSHADOWED_NOBLES; threat_enshadowedNobles.responseCode = ThreatItem.RESPONSE_DARKNESSWITHIN; threatEvaluations.Add(threat_enshadowedNobles); for (int i = 0; i < 3; i++) { Trait add = map.globalist.getTrait(this); if (add == null) { break; } traits.Add(add); if (Eleven.random.Next(2) == 0) { break; } //50% chance to add another trait } }
public Person(Society soc, House assignedHouse = null) { this.society = soc; index = World.staticMap.personIndexCount; World.staticMap.personIndexCount += 1; World.staticMap.persons.Add(this);//I can't believe this awful structure is required, but it is, for serializing. Not allowed references to others firstName = TextStore.getName(isMale); madness = new Insanity_Sane(); maxSanity = Eleven.random.Next(map.param.insanity_maxSanity); sanity = maxSanity; if (World.logging) { log = new LogBox(this); } //politics_militarism = Math.Pow(Eleven.random.NextDouble(), 2);//Bias towards 0 ////Chance of pacifism //if (Eleven.random.NextDouble() < 0.33) { // politics_militarism *= -1; //} if (assignedHouse == null) { assignedHouse = society.houses[Eleven.random.Next(society.houses.Count)]; } house = assignedHouse; if (house != null) { culture = house.culture; } if (culture == null) { culture = map.sampleCulture(soc); } //Add permanent threats threat_agents = new ThreatItem(map, this); threat_agents.form = ThreatItem.formTypes.AGENTS; threatEvaluations.Add(threat_agents); threat_enshadowedNobles = new ThreatItem(map, this); threat_enshadowedNobles.form = ThreatItem.formTypes.ENSHADOWED_NOBLES; threatEvaluations.Add(threat_enshadowedNobles); threat_plague = new ThreatItem(map, this); threat_plague.form = ThreatItem.formTypes.PLAGUE; threatEvaluations.Add(threat_plague); if (!map.simplified) { traits.Add(map.globalist.getTrait_Political(this)); for (int i = 0; i < 2; i++) { Trait add = map.globalist.getTrait(this); if (add == null) { break; } traits.Add(add); if (Eleven.random.Next(2) == 0) { break; } //50% chance to add another trait } } if (World.advancedEdition && culture != null) { assignCulture(); } }