public override void cast(Map map, Unit u) { SG_Undead theDead = (SG_Undead)u.location.soc; foreach (SocialGroup sg in map.socialGroups) { if (sg is Society) { if (theDead.getRel(sg).state != DipRel.dipState.war) { map.declareWar(theDead, sg); } } } double amount = 1; Evidence e2 = new Evidence(map.turn); e2.pointsTo = u; e2.weight = amount; u.location.evidence.Add(e2); u.location.map.world.prefabStore.popImgMsg(u.getName() + " calls upon the dead to rise up, and begin their war against life.", u.location.map.world.wordStore.lookup("ABILITY_DOCTOR_WAR_AGAINST_LIFE")); }
public override void castInner(Map map, Unit u) { SocialGroup sg = null; foreach (SocialGroup soc in map.socialGroups) { if (soc is SG_Undead) { sg = soc; } } if (sg == null) { sg = new SG_Undead(map, u.location); map.socialGroups.Add(sg); } u.location.soc = sg; u.location.settlement = new Set_Corpseroot(u.location, u.location.soc); u.location.units.Remove(u.location.settlement.embeddedUnit); foreach (Hex hex in u.location.territory) { if (map.landmass[hex.x][hex.y] && Eleven.random.NextDouble() < 0.5) { hex.flora = new Flora_Corpseroot(hex); } } u.location.map.world.prefabStore.popImgMsg(u.getName() + " sows the ground with corpseroot, allowing the bodies they loot to be stored until they are raised back to life.", u.location.map.world.wordStore.lookup("ABILITY_DOCTOR_SOW_CORPSEROOT")); }