Skip to content

EA 23.181 Nightly

August 16, 2025

14 files modified.

Important Changes

Possible breaking changes. Click the filename to view the chunk.

Biography (1)

cs
public int GetOriginalAge(Chara c) 
public int GetAge(Chara c) 

ActEffect

public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
			break;
		}
		Thing thing5 = null;
		bool flag8 = actRef.n1 == "food"; 
		bool flag9 = actRef.n1 == "food"; 
		if (actRef.n1 == "money")
		{
			int currency = TC.GetCurrency();

public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
		else
		{
			Func<Thing, bool> func = (Thing t) => true;
			if (flag8) 
			if (flag9) 
			{
				func = (Thing t) => t.IsFood;
			}

public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
	{
		EClass.game.religions.Trickery.Talk("ability");
		bool hex2 = CC.IsHostile(TC);
		List<SourceStat.Row> list3 = EClass.sources.stats.rows.Where((SourceStat.Row con) => con.tag.Contains("random") && con.group == (hex2 ? "Debuff" : "Buff")).ToList(); 
		List<SourceStat.Row> list4 = EClass.sources.stats.rows.Where((SourceStat.Row con) => con.tag.Contains("random") && con.group == (hex2 ? "Debuff" : "Buff")).ToList(); 
		int power2 = power;
		for (int k = 0; k < 4 + EClass.rnd(2); k++) 
		for (int l = 0; l < 4 + EClass.rnd(2); l++) 
		{
			SourceStat.Row row2 = list3.RandomItem(); 
			list3.Remove(row2); 
			SourceStat.Row row2 = list4.RandomItem(); 
			list4.Remove(row2); 
			Proc(hex2 ? EffectId.DebuffKizuami : EffectId.Buff, CC, TC, power2, new ActRef
			{
				n1 = row2.alias

public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
		tc.bio.SetGender(gender2);
		tc.Say("transGender", tc, Gender.Name(tc.bio.gender));
		tc.Talk("tail");
		if (blessed && tc.bio.age > 1) 
		int age3 = tc.bio.GetAge(tc.Chara); 
		if (blessed && age3 > 1) 
		{
			tc.Say("ageDown", tc);
			tc.bio.age--; 
			tc.bio.SetAge(tc.Chara, age3 - 1, allowUnique: true); 
		}
		else if (flag)
		{
			tc.Say("ageUp", tc);
			tc.bio.age++; 
			tc.bio.SetAge(tc.Chara, age3 + 1, allowUnique: true); 
		} 
		break; 
	} 
	case EffectId.Youth:
	{ 
		tc.PlaySound("mutation"); 
		tc.PlayEffect("mutation"); 
		int age2 = tc.bio.GetAge(tc.Chara); 
		if (!flag && age2 <= 1) 
		{ 
			tc.SayNothingHappans(); 
			break; 
		} 
		age2 = Mathf.Max(1, age2 * 100 / (flag ? 75 : (blessed ? 400 : 200))); 
		tc.Say(flag ? "ageUp" : "ageDown", tc); 
		tc.bio.SetAge(tc.Chara, age2, allowUnique: true); 
		break; 
	} 
	case EffectId.EternalYouth:
	{ 
		tc.PlaySound("dropRewardXmas"); 
		tc.PlaySound("mutation"); 
		tc.PlayEffect("mutation"); 
		if (tc.IsUnique) 
		{ 
			tc.SayNothingHappans(); 
			break; 
		} 
		int age = tc.bio.GetAge(tc.Chara); 
		if (flag) 
		{ 
			if (tc.c_lockedAge != 0) 
			{ 
				tc.Say("eternalYouth2", tc); 
				tc.c_lockedAge = 0; 
				tc.bio.SetAge(tc.Chara, age); 
			} 
			Redirect(EffectId.Youth, BlessedState.Cursed, default(ActRef)); 
		} 
		else if (tc.c_lockedAge != 0) 
		{ 
			tc.SayNothingHappans(); 
		} 
		else
		{ 
			tc.Say("eternalYouth1", tc); 
			tc.c_lockedAge = age; 
			if (blessed) 
			{ 
				Redirect(EffectId.Youth, BlessedState.Blessed, default(ActRef)); 
			} 
		}
		break;
	}

public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
		break;
	case EffectId.Revive:
	{
		List<KeyValuePair<int, Chara>> list5 = EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon && a.Value.c_wasInPcParty).ToList(); 
		List<KeyValuePair<int, Chara>> list3 = EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon && a.Value.c_wasInPcParty).ToList(); 
		if (TC.IsPCFaction || TC.IsPCFactionMinion)
		{
			if (TC.IsPC && list5.Count == 0) 
			if (TC.IsPC && list3.Count == 0) 
			{
				list5 = EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.CanRevive() && a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon).ToList(); 
				list3 = EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.CanRevive() && a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon).ToList(); 
			}
			if (list5.Count > 0) 
			if (list3.Count > 0) 
			{
				list5.RandomItem().Value.Chara.GetRevived(); 
				list3.RandomItem().Value.Chara.GetRevived(); 
				break;
			}
		}

public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
			TC.PlaySound("debuff");
		}
		TC.Say(flag7 ? "damageBody" : "damageMind", TC);
		for (int l = 0; l < num8; l++) 
		for (int k = 0; k < num8; k++) 
		{
			TC.DamageTempElements(power, flag7, mind, id != EffectId.Weaken);
		}

public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
	case EffectId.EnhanceBodyGreat:
	case EffectId.EnhanceMindGreat:
	{
		bool flag9 = id == EffectId.EnhanceBody || id == EffectId.EnhanceBodyGreat; 
		bool flag8 = id == EffectId.EnhanceBody || id == EffectId.EnhanceBodyGreat; 
		bool mind2 = id == EffectId.EnhanceMind || id == EffectId.EnhanceMindGreat;
		if (id != EffectId.EnhanceBody && id != EffectId.EnhanceMind)
		{
			EClass.rnd(4);
		}
		TC.Say(flag9 ? "enhanceBody" : "enhanceMind", TC); 
		TC.Say(flag8 ? "enhanceBody" : "enhanceMind", TC); 
		TC.PlayEffect("buff");
		TC.PlaySound("buff");
		TC.EnhanceTempElements(power, flag9, mind2, onlyRenew: true); 
		TC.EnhanceTempElements(power, flag8, mind2, onlyRenew: true); 
		break;
	}
	case EffectId.RestoreBody:

public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
		{
			power /= 4;
		}
		List<Thing> list4 = TC.things.List((Thing t) => (t.Num <= 1 && t.IsEquipmentOrRanged && !t.IsToolbelt && !t.IsLightsource && t.isEquipped) ? true : false); 
		if (list4.Count != 0) 
		List<Thing> list5 = TC.things.List((Thing t) => (t.Num <= 1 && t.IsEquipmentOrRanged && !t.IsToolbelt && !t.IsLightsource && t.isEquipped) ? true : false); 
		if (list5.Count != 0) 
		{
			Thing thing4 = list4.RandomItem(); 
			Thing thing4 = list5.RandomItem(); 
			TC.Say("acid_hit", TC);
			if (thing4.isAcidproof)
			{

Biography

public int idInterest

cs

	public string nameBirthplace => "birthLoc2".lang(nameHome, nameLoc);

	public int age 
	public bool IsUnderAge(Chara c) 
	{
		get 
		{ 
			return EClass.world.date.year - birthYear; 
		} 
		set 
		{ 
			birthYear = EClass.world.date.year - value; 
		} 
		return GetAge(c) < 18; 
	}

	public bool IsUnderAge => age < 18; 
	public string TextAge(Chara c)
	{
		object obj;
		if (age < 1000) 
		if (GetAge(c) < 1000) 
		{
			obj = (c.IsUnique ? GetOriginalAge(c) : age).ToString(); 
			obj = GetAge(c).ToString(); 
			if (obj == null)
			{
				return "";

public string TextAge(Chara c)

cs
		return (string)obj;
	}

	public int GetOriginalAge(Chara c) 
	public int GetAge(Chara c) 
	{ 
		if (c.c_lockedAge != 0) 
		{ 
			return c.c_lockedAge; 
		} 
		if (c.IsUnique) 
		{ 
			string[] array = c.source.bio.Split('/'); 
			if (array.Length > 1) 
			{ 
				return int.Parse(array[1]); 
			} 
		} 
		return EClass.world.date.year - birthYear; 
	} 
	public void SetAge(Chara c, int a, bool allowUnique = false) 
	{
		string[] array = c.source.bio.Split('/'); 
		if (array.Length > 1) 
		if (c.IsUnique) 
		{ 
			if (allowUnique) 
			{ 
				c.c_lockedAge = a; 
			} 
		} 
		else if (c.c_lockedAge == 0) 
		{ 
			birthYear = EClass.world.date.year - a; 
		} 
		else
		{
			return int.Parse(array[1]); 
			c.c_lockedAge = a; 
		}
		return age; 
	}

	public void Generate(Chara c)

public void Generate(Chara c)

cs
			{
				flag = false;
			}
			age = int.Parse(array[1]); 
			SetAge(c, int.Parse(array[1])); 
			c.pccData = IO.LoadFile<PCCData>(CorePath.packageCore + "Data/PCC/" + c.id + ".txt");
		}
		if (array.Length > 2)

public void Generate(Chara c)

cs
	{
		SetPortrait(c);
	}
	if (c.id == "prostitute" && age < 15) 
	if (c.id == "prostitute" && GetAge(c) < 15) 
	{
		age = 15; 
		SetAge(c, 15); 
	}
	SourceThing.Row row = EClass.sources.things.rows.RandomItem();
	idLike = row.id;

public void GenerateBirthday(Chara c, int ageIndex = 0)

cs
	if (ageIndex != 0)
	{
		int num3 = (num2 - num) / 4;
		age = Rand.Range(num + num3 * (ageIndex - 1), num + num3 * ageIndex); 
		SetAge(c, Rand.Range(num + num3 * (ageIndex - 1), num + num3 * ageIndex)); 
	}
	else
	{
		age = Rand.Range(num, num2); 
		SetAge(c, Rand.Range(num, num2)); 
	}
	birthDay = EClass.rnd(30) + 1;
	birthMonth = EClass.rnd(12) + 1;

CINT

public class CINT

cs

	public const int seed = 33;

	public const int dateNews = 33; 
	public const int dateGuestArrived = 34;

	public const int taxExtra = 35;

	public const int dateLivestock = 36;

	public const int dateNews = 37; 
	public const int lockedAge = 38; 
	public const int lockLv = 50;

	public const int dateNextExpedition = 51;

Card

public int c_dateCooked

cs
		}
	}

	public int c_lockedAge 
	{ 
		get 
		{ 
			return GetInt(38); 
		} 
		set 
		{ 
			SetInt(38, value); 
		} 
	} 
	public int c_containerSize
	{
		get

CoreRef

public class PrefData

cs
		public SourcePref blockStairs;

		public SourcePref blockWall;
		public SourcePref blockPillar; 
	}

	public Biomes biomes;

DramaCustomSequence

public class DramaCustomSequence : EClass

cs
public void Build(Chara c)
{
	bool flag = idCustom == "Unique";
	bool flag2 = c.bio.IsUnderAge || EClass.pc.bio.IsUnderAge; 
	bool flag2 = c.bio.IsUnderAge(c) || EClass.pc.bio.IsUnderAge(EClass.pc); 
	bool isInGuild = Guild.Fighter.IsCurrentZone || Guild.Mage.IsCurrentZone || Guild.Thief.IsCurrentZone || Guild.Merchant.IsCurrentZone;
	string bird = (flag2 ? "bird" : "tail");
	_ = c.Name;

public void Build(Chara c)

cs
					Choice2(("daCopy" + c.trait.CopyShop).lang(c.trait.NumCopyItem.ToString() ?? ""), "_copyItem").DisableSound();
				}
			}
			if (c.trait.HaveNews && c.GetInt(33) + 10080 < EClass.world.date.GetRaw()) 
			if (c.trait.HaveNews && c.GetInt(37) + 10080 < EClass.world.date.GetRaw()) 
			{
				Choice2("daNews", "_news");
			}

void Invest(bool quick)

cs
			GameLang.refDrama1 = zone.Name;
			TempTalkTopic("news1", null);
		}
		c.SetInt(33, EClass.world.date.GetRaw()); 
		c.SetInt(37, EClass.world.date.GetRaw()); 
	});
	Method(delegate
	{

EffectId

public enum EffectId

cs
	LovePlus = 296,
	HairGrowth = 297,
	Gene = 298,
	CatSniff = 299
	CatSniff = 299, 
	Youth = 300, 
	EternalYouth = 301
}

ElementContainer

public void ModExp(int ele, float a, bool chain = false)

cs
		if (element.UseExpMod)
		{
			a = a * (float)Mathf.Clamp(element.UsePotential ? element.Potential : 100, 10, 1000) / (float)(100 + Mathf.Max(0, element.ValueWithoutLink) * 25);
			if (EClass.rndf(1f) < a % 1f + 0.1f) 
			if (EClass.rndf(1f) < a % 1f + ((ele == 152) ? 0.01f : 0.1f)) 
			{
				a += 1f;
			}

Props

void TryAdd(Thing t)

cs
	}
	void TryAdd(Thing t)
	{
		if (t.HasElement(10) && !(t.trait is TraitFoodMeal) && !(t.trait is TraitFoodFishSlice) && !t.IsExcludeFromCraft(ing) && !stack.list.Contains(t)) 
		if (t.HasElement(10) && !(t.trait is TraitFoodFishSlice) && !t.category.IsChildOf("seasoning") && !t.category.IsChildOf("meal") && !t.IsExcludeFromCraft(ing) && !stack.list.Contains(t)) 
		{
			stack.Add(t.Thing);
		}

Recipe

static string CatName(string id)

cs

		public bool IsValidIngredient(Thing t)
		{
			if (ingType == IngType.CreativeFood && t.HasElement(10) && !(t.trait is TraitFoodFishSlice)) 
			if (ingType == IngType.CreativeFood && t.HasElement(10) && !t.category.IsChildOf("seasoning") && !t.category.IsChildOf("meal") && !(t.trait is TraitFoodFishSlice)) 
			{
				return true;
			}

RenderRow

public Sprite GetSprite(int dir = 0, int skin = 0, bool snow = false)

cs
			Texture2D texture2D = pass.mat.GetTexture("_MainTex") as Texture2D;
			ProceduralMesh pmesh = pass.pmesh;
			int num = 0;
			num = ((skin != 0) ? Mathf.Abs(array[dir] + skins[skin - 1] * ((array[dir] > 0) ? 1 : (-1))) : Mathf.Abs(array[dir])); 
			num = ((skin != 0) ? Mathf.Abs(array[dir] + (skins[skin - 1] / 100 * (int)renderData.pass.pmesh.tiling.x + skins[skin - 1] % 100) * ((array[dir] > 0) ? 1 : (-1))) : Mathf.Abs(array[dir])); 
			int num2 = (int)((float)texture2D.width / pmesh.tiling.x);
			int num3 = (int)((float)texture2D.height / pmesh.tiling.y);
			int num4 = (int)((float)num % pmesh.tiling.x);

TaskHarvest

public void HarvestThing()

cs
	{
		return;
	}
	if (EClass._zone.IsUserZone && target.isNPCProperty && thing.trait is TraitPotionLove) 
	if (EClass._zone.IsUserZone && target.isNPCProperty && (thing.trait is TraitPotionLove || thing.HasTag(CTAG.rareResource))) 
	{
		Msg.Say("spellbookCrumble", thing);
		thing.Destroy();

Thing

public override SourcePref Pref

cs
		if (trait is TraitFakeBlock)
		{
			TileType tileType = EClass.sources.blocks.map[base.refVal].tileType;
			if (tileType is TileTypePillar) 
			{ 
				return EClass.core.refs.prefs.blockPillar; 
			} 
			if (tileType is TileTypeFence)
			{
				return EClass.core.refs.prefs.blockFence;

public override void SetRenderParam(RenderParam p)

cs
			}
			break;
		}
		if (trait.IdSkin != 0) 
		if (trait.IdSkin != 0 && sourceCard.skins.Length != 0) 
		{
			int index = trait.IdSkin - 1; 
			if (sourceCard.skins.Length != 0) 
			{ 
				p.tile += ((p.tile < 0f) ? (-sourceCard.skins.TryGet(index)) : sourceCard.skins.TryGet(index)); 
			} 
			int num6 = sourceCard.skins.TryGet(trait.IdSkin - 1); 
			num6 = num6 / 100 * (int)source.renderData.pass.pmesh.tiling.x + num6 % 100; 
			p.tile += ((p.tile < 0f) ? (-num6) : num6); 
		}
	}

Trait

public void OnBarter()

cs
			{
			case ShopType.Moyer:
			{
				for (int num10 = 1; num10 <= 9; num10++) 
				for (int num10 = 1; num10 <= 10; num10++) 
				{
					AddAdvWeek(num10);
				}