Skip to content

EA 23.327 Nightly

July 13, 2026

22 files modified. 2 new files created.

Important Changes

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

CoreExtension (1)

cs
public static void Sort(this List<Thing> things, UIList.SortMode m, bool ascending = false) 
public static void Sort(this List<Thing> things, UIList.SortMode m, bool ascending = false, CurrencyType currency = CurrencyType.Money) 

SpriteReplacer (3)

cs
public static Dictionary<string, string> dictTextureItems = new Dictionary<string, string>(); 
private static List<string> sortedModIds = new List<string>(); 
cs
public void ReloadBuiltInTextures() 
cs
public void BuildSuffixData(string id, Dictionary<string, string> dictTexItems) 
public void BuildSuffixData(string id, IReadOnlyDictionary<string, string> dictTexItems, List<string> sortedIds = null) 

AI_Bladder

public override IEnumerable<Status> Run()

cs
		yield return Cancel();
	}
	yield return DoGoto(toilet.owner);
	if (EClass._zone.IsPCFactionOrTent && toilet != null && toilet.owner.Dist(owner) == 1 && toilet.owner.sourceCard._origin == "bathtub") 
	{ 
		owner._Move(toilet.owner.pos); 
	} 
	Progress_Custom seq = new Progress_Custom
	{
		onProgressBegin = delegate

AI_PlayMusic

public override IEnumerable<Status> Run()

cs
			idSong = "harmonica_kumi";
			break;
		case "guitar_efrond":
		case "guitar_elec":
			idSong = "guitar_dusk";
			break;
		case "guitar":

ActEffect

void AddCon<T>(int rate, int power) where T : Condition

cs
		EClass.ui.AddLayer<LayerList>().SetStringList(delegate
		{
			List<string> list12 = new List<string>();
			for (int num19 = 0; num19 < 10; num19++) 
			for (int num20 = 0; num20 < 10; num20++) 
			{
				list12.Add(AliasGen.GetRandomAlias());
			}

void AddCon<T>(int rate, int power) where T : Condition

cs
		break;
	case EffectId.StripBlessing:
	{
		List<Condition> list11 = new List<Condition>(); 
		List<Condition> list4 = new List<Condition>(); 
		foreach (Condition condition4 in TC.conditions)
		{
			if (GetBlessingDifficulty(condition4) > 0 && EClass.rnd(GetBlessingDifficulty(condition4)) == 0)
			{
				list11.Add(condition4); 
				list4.Add(condition4); 
			}
		}
		if (list11.Count == 0) 
		if (list4.Count == 0) 
		{
			CC.SayNothingHappans();
			break;

void AddCon<T>(int rate, int power) where T : Condition

cs
		TC.pos.PlayEffect("holyveil");
		TC.pos.PlaySound("holyveil");
		TC.Say("unpolluted", TC);
		list11.Shuffle(); 
		list4.Shuffle(); 
		{
			foreach (Condition item5 in list11) 
			foreach (Condition item5 in list4) 
			{
				item5.Kill();
				if (CC.IsHostile(TC))

void AddCon<T>(int rate, int power) where T : Condition

cs
		{
			break;
		}
		int num14 = 0; 
		int num12 = 0; 
		foreach (Condition condition5 in TC.conditions)
		{
			if (condition5.Type == ConditionType.Debuff)
			{
				num14++; 
				num12++; 
			}
		}
		if (num14 == 0) 
		if (num12 == 0) 
		{
			CC.SayNothingHappans();
			break;

void AddCon<T>(int rate, int power) where T : Condition

cs
		TC.Say("abShutterHex", TC);
		Point center = CC.pos.Copy();
		List<Chara> list5 = TC.pos.ListCharasInRadius(TC, 4, (Chara c) => c == TC || c.IsHostile(CC));
		for (int l = 0; l < num14; l++) 
		for (int l = 0; l < num12; l++) 
		{
			TweenUtil.Delay((float)l * 0.1f, delegate
			{

void AddCon<T>(int rate, int power) where T : Condition

cs
					{
						effect.Play(center, 0f, pos);
					});
					int num15 = Dice.Create("SpShutterHex", power, CC, (actRef.refThing != null) ? null : actRef.act).Roll(); 
					item6.DamageHP(num15, 919, power, AttackSource.None, CC, showEffect: false); 
					int num13 = Dice.Create("SpShutterHex", power, CC, (actRef.refThing != null) ? null : actRef.act).Roll(); 
					item6.DamageHP(num13, 919, power, AttackSource.None, CC, showEffect: false); 
				}
			}
		}

void AddCon<T>(int rate, int power) where T : Condition

cs
			break;
		}
		Thing thing7 = null;
		bool flag10 = actRef.n1 == "food"; 
		bool flag12 = actRef.n1 == "food"; 
		if (actRef.n1 == "money")
		{
			int currency = TC.GetCurrency();

void AddCon<T>(int rate, int power) where T : Condition

cs
		else
		{
			Func<Thing, bool> func = (Thing t) => true;
			if (flag10) 
			if (flag12) 
			{
				func = (Thing t) => t.IsFood;
			}
			List<Thing> list8 = TC.things.List(delegate(Thing t) 
			List<Thing> list9 = TC.things.List(delegate(Thing t) 
			{
				if (t.parentCard?.trait is TraitChestMerchant || t.trait is TraitTool || t.IsThrownWeapon)
				{

void AddCon<T>(int rate, int power) where T : Condition

cs
				}
				return t.trait.CanBeDestroyed && t.things.Count == 0 && t.invY != 1 && t.trait.CanBeStolen && !t.trait.CanOnlyCarry && !t.IsUnique && !t.isEquipped && t.blessedState == BlessedState.Normal && func(t);
			}, onlyAccessible: true);
			if (list8.Count > 0) 
			if (list9.Count > 0) 
			{
				thing7 = list8.RandomItem(); 
				thing7 = list9.RandomItem(); 
				if (thing7.Num > 1)
				{
					thing7 = thing7.Split(1);

void AddCon<T>(int rate, int power) where T : Condition

cs
		{
			break;
		}
		List<Thing> list6 = TC.things.List(delegate(Thing t) 
		List<Thing> list7 = TC.things.List(delegate(Thing t) 
		{
			if (!t.isEquipped || t.blessedState == BlessedState.Doomed || t.IsToolbelt)
			{

void AddCon<T>(int rate, int power) where T : Condition

cs
			}
			return (t.blessedState < BlessedState.Blessed || EClass.rnd(10) == 0) ? true : false;
		});
		if (list6.Count == 0) 
		if (list7.Count == 0) 
		{
			CC.SayNothingHappans();
			break;
		}
		Thing thing5 = list6.RandomItem(); 
		Thing thing5 = list7.RandomItem(); 
		TC.Say("curse_hit", TC, thing5);
		thing5.SetBlessedState((thing5.blessedState == BlessedState.Cursed) ? BlessedState.Doomed : BlessedState.Cursed);
		LayerInventory.SetDirty(thing5);

void AddCon<T>(int rate, int power) where T : Condition

cs
		List<Thing> list = new List<Thing>();
		TC.things.Foreach(delegate(Thing t)
		{
			int num18 = 0; 
			int num19 = 0; 
			if ((t.isEquipped || t.IsRangedWeapon || blessed) && t.blessedState < BlessedState.Normal)
			{
				if (t.blessedState == BlessedState.Cursed)
				{
					num18 = EClass.rnd(200); 
					num19 = EClass.rnd(200); 
				}
				if (t.blessedState == BlessedState.Doomed)
				{
					num18 = EClass.rnd(1000); 
					num19 = EClass.rnd(1000); 
				}
				if (blessed)
				{
					num18 /= 2; 
					num19 /= 2; 
				}
				if (id == EffectId.UncurseEQGreater)
				{
					num18 /= 10; 
					num19 /= 10; 
				}
				if (power >= num18) 
				if (power >= num19) 
				{
					TC.Say("uncurseEQ_success", t);
					t.SetBlessedState(BlessedState.Normal);

void AddCon<T>(int rate, int power) where T : Condition

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

void AddCon<T>(int rate, int power) where T : Condition

cs
		{
			power = power * 2 / 3;
		}
		int num10 = TC.WIL * (isPowerful ? 20 : 5); 
		int num14 = TC.WIL * (isPowerful ? 20 : 5); 
		ConHolyVeil condition = TC.GetCondition<ConHolyVeil>();
		if (condition != null)
		{
			num10 += condition.power * 5; 
			num14 += condition.power * 5; 
		}
		num10 /= EClass.sources.stats.alias[n].hexPower; 
		if (id != EffectId.DebuffKizuami && EClass.rnd(power) < num10) 
		num14 /= EClass.sources.stats.alias[n].hexPower; 
		if (id != EffectId.DebuffKizuami && EClass.rnd(power) < num14) 
		{
			int num11 = 10; 
			int num12 = (TC.IsPowerful ? 40 : 90); 
			int num15 = 10; 
			int num16 = (TC.IsPowerful ? 40 : 90); 
			if (CC.IsPCFaction)
			{
				num11 += EClass.curve(CC.LER, 100, 50) / 10; 
				num15 += EClass.curve(CC.LER, 100, 50) / 10; 
			}
			if (TC.IsPowerful)
			{
				num11 /= 2; 
				num15 /= 2; 
			}
			if (condition != null)
			{
				num11 /= 5; 
				num15 /= 5; 
			}
			if (num11 >= num12) 
			if (num15 >= num16) 
			{
				num11 = num12; 
				num15 = num16; 
			}
			if (EClass.rnd(100) > num11) 
			if (EClass.rnd(100) > num15) 
			{
				TC.Say("debuff_resist", TC);
				CC.DoHostileAction(TC);

void AddCon<T>(int rate, int power) where T : Condition

cs
	{
		tc.PlaySound("mutation");
		tc.PlayEffect("mutation");
		int num13 = ((actRef.refThing != null) ? actRef.refThing.GetInt(118) : actRef.refVal); 
		if (num13 == 0) 
		int num11 = ((actRef.refThing != null) ? actRef.refThing.GetInt(118) : actRef.refVal); 
		if (num11 == 0) 
		{
			num13 = tc.GetInt(118); 
			if (num13 == 0) 
			num11 = tc.GetInt(118); 
			if (num11 == 0) 
			{
				num13 = EClass.game.seed + tc.uid; 
				num11 = EClass.game.seed + tc.uid; 
			}
			num13++; 
			num11++; 
		}
		tc.Say("transBlood", tc);
		tc.Talk("tail");
		tc.c_bloodData = null;
		tc.SetInt(118, num13); 
		tc.SetInt(118, num11); 
		break;
	}
	case EffectId.Youth:

void AddCon<T>(int rate, int power) where T : Condition

cs
		break;
	case EffectId.Revive:
	{
		List<KeyValuePair<int, Chara>> list10 = 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>> list11 = 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 && list10.Count == 0) 
			if (TC.IsPC && list11.Count == 0) 
			{
				list10 = 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(); 
				list11 = 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 (list10.Count > 0) 
			if (list11.Count > 0) 
			{
				list10.RandomItem().Value.Chara.GetRevived(); 
				list11.RandomItem().Value.Chara.GetRevived(); 
				break;
			}
		}

void AddCon<T>(int rate, int power) where T : Condition

cs
	case EffectId.DamageMindGreat:
	case EffectId.Weaken:
	{
		bool flag12 = id == EffectId.DamageBody || id == EffectId.DamageBodyGreat; 
		bool mind2 = id == EffectId.DamageMind || id == EffectId.DamageMindGreat; 
		int num17 = ((id == EffectId.DamageBody || id == EffectId.DamageMind) ? 1 : (4 + EClass.rnd(4))); 
		bool flag10 = id == EffectId.DamageBody || id == EffectId.DamageBodyGreat; 
		bool mind = id == EffectId.DamageMind || id == EffectId.DamageMindGreat; 
		int num9 = ((id == EffectId.DamageBody || id == EffectId.DamageMind) ? 1 : (4 + EClass.rnd(4))); 
		if (id == EffectId.Weaken)
		{
			flag12 = EClass.rnd(2) == 0; 
			mind2 = !flag12; 
			num17 = 1; 
			flag10 = EClass.rnd(2) == 0; 
			mind = !flag10; 
			num9 = 1; 
		}
		else
		{
			TC.PlayEffect("debuff");
			TC.PlaySound("debuff");
		}
		TC.Say(flag12 ? "damageBody" : "damageMind", TC); 
		for (int m = 0; m < num17; m++) 
		TC.Say(flag10 ? "damageBody" : "damageMind", TC); 
		for (int k = 0; k < num9; k++) 
		{
			TC.DamageTempElements(power, flag12, mind2, id != EffectId.Weaken); 
			TC.DamageTempElements(power, flag10, mind, id != EffectId.Weaken); 
		}
		if (TC.IsPC)
		{

void AddCon<T>(int rate, int power) where T : Condition

cs
	case EffectId.EnhanceBodyGreat:
	case EffectId.EnhanceMindGreat:
	{
		bool flag9 = id == EffectId.EnhanceBody || id == EffectId.EnhanceBodyGreat; 
		bool mind = id == EffectId.EnhanceMind || id == EffectId.EnhanceMindGreat; 
		bool flag11 = 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(flag11 ? "enhanceBody" : "enhanceMind", TC); 
		TC.PlayEffect("buff");
		TC.PlaySound("buff");
		TC.EnhanceTempElements(power, flag9, mind, onlyRenew: true); 
		TC.EnhanceTempElements(power, flag11, mind2, onlyRenew: true); 
		break;
	}
	case EffectId.RestoreBody:
	case EffectId.RestoreMind:
	{
		bool flag11 = id == EffectId.RestoreBody; 
		bool flag9 = id == EffectId.RestoreBody; 
		if (flag)
		{
			Redirect(flag11 ? EffectId.DamageBodyGreat : EffectId.DamageMindGreat, BlessedState.Normal, default(ActRef)); 
			Redirect(flag9 ? EffectId.DamageBodyGreat : EffectId.DamageMindGreat, BlessedState.Normal, default(ActRef)); 
			break;
		}
		TC.Say(flag11 ? "restoreBody" : "restoreMind", TC); 
		TC.Say(flag9 ? "restoreBody" : "restoreMind", TC); 
		TC.PlaySound("heal");
		TC.PlayEffect("heal");
		TC.CureHost(flag11 ? CureType.CureBody : CureType.CureMind, power, state); 
		TC.CureHost(flag9 ? CureType.CureBody : CureType.CureMind, power, state); 
		if (blessed)
		{
			Redirect(flag11 ? EffectId.EnhanceBodyGreat : EffectId.EnhanceMindGreat, BlessedState.Normal, default(ActRef)); 
			Redirect(flag9 ? EffectId.EnhanceBodyGreat : EffectId.EnhanceMindGreat, BlessedState.Normal, default(ActRef)); 
		}
		break;
	}

void AddCon<T>(int rate, int power) where T : Condition

cs
	case EffectId.Heal:
	case EffectId.JureHeal:
	{
		long num9 = Dice.Create((actRef.act != null && EClass.sources.calc.map.ContainsKey(actRef.act.ID)) ? actRef.act.ID : "SpHealLight", power, CC, (actRef.refThing != null) ? null : actRef.act).Roll(); 
		long num10 = Dice.Create((actRef.act != null && EClass.sources.calc.map.ContainsKey(actRef.act.ID)) ? actRef.act.ID : "SpHealLight", power, CC, (actRef.refThing != null) ? null : actRef.act).Roll(); 
		if (actRef.refThing != null)
		{
			num9 = num9 * (100 + actRef.refThing.Evalue(750) * 10) / 100; 
			num10 = num10 * (100 + actRef.refThing.Evalue(750) * 10) / 100; 
		}
		if (flag)
		{
			TC.DamageHP(num9 / 2, 919, power); 
			TC.DamageHP(num10 / 2, 919, power); 
			break;
		}
		if (id == EffectId.JureHeal)
		{
			EClass.game.religions.Healing.Talk("ability");
			num9 += TC.MaxHP / 4; 
			num10 += TC.MaxHP / 4; 
			TC.AddCondition<ConInvulnerable>();
			TC.HealHP(num9, HealSource.Item); 
			TC.HealHP(num10, HealSource.Item); 
			TC.Cure(CureType.Heal, power, state);
		}
		else
		{
			TC.HealHPHost(num9, (actRef.refThing == null) ? HealSource.Magic : HealSource.Item); 
			TC.HealHPHost(num10, (actRef.refThing == null) ? HealSource.Magic : HealSource.Item); 
			TC.CureHost(CureType.Heal, power, state);
		}
		TC.Say((power >= 300) ? "heal_heavy" : "heal_light", TC);

void AddCon<T>(int rate, int power) where T : Condition

cs
			Redirect(EffectId.CurseEQ, BlessedState.Normal, default(ActRef));
			break;
		}
		IList<Condition> list9 = TC.conditions.Copy(); 
		list9.Shuffle(); 
		IList<Condition> list10 = TC.conditions.Copy(); 
		list10.Shuffle(); 
		CC.PlaySound("remove_hex");
		CC.PlayEffect("remove_hex");
		foreach (Condition item8 in list9) 
		foreach (Condition item8 in list10) 
		{
			if (item8.Type != ConditionType.Debuff || item8.IsKilled)
			{

void AddCon<T>(int rate, int power) where T : Condition

cs
		if (TC.HasElement(1211))
		{
			TC.Say("drinkSaltWater_snail", TC);
			int num16 = ((TC.hp > 10) ? (TC.hp - EClass.rnd(10)) : 10000); 
			TC.DamageHP(num16, AttackSource.None, CC); 
			int num17 = ((TC.hp > 10) ? (TC.hp - EClass.rnd(10)) : 10000); 
			TC.DamageHP(num17, AttackSource.None, CC); 
		}
		else if (TC.IsPC)
		{

void AddCon<T>(int rate, int power) where T : Condition

cs
		}
		break;
	case EffectId.Sleep:
	case EffectId.BlueDrag:
		if (blessed)
		{
			power /= 4;
		}
		TC.AddCondition<ConSleep>(power);
		if (id == EffectId.BlueDrag) 
		{ 
			TC.PlayEffect("buff"); 
			TC.PlaySound("offering"); 
			int num18 = TC.Evalue(1423); 
			if (num18 > 1 && num18 < 15) 
			{ 
				if (flag) 
				{ 
					TC.SetFeat(1423, num18 - 1, msg: true); 
				} 
				else
				{ 
					TC.SetFeat(1423, Mathf.Min(num18 + ((!blessed) ? 1 : 2), 15), msg: true); 
				} 
			} 
		} 
		if (flag)
		{
			Redirect(EffectId.Disease, BlessedState.Normal, default(ActRef));

void AddCon<T>(int rate, int power) where T : Condition

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

Card

public void DamageHP(long dmg, int ele, int eleP = 100, AttackSource attackSourc

cs
		{
			foreach (Chara chara3 in EClass._map.charas)
			{
				if (chara3 != this && !chara3.IsHostile(Chara) && !chara3.IsPowerful && !chara3.IsDisabled && !chara3.isRestrained && (!IsPCFactionOrMinion || chara3.IsPCFactionOrMinion) && chara3.Dist(this) <= 3) 
				if (chara3 != this && !chara3.IsHostile(Chara) && !chara3.IsPowerful && !chara3.IsDisabled && !chara3.isRestrained && (!IsPCFactionOrMinion || chara3.IsPCFactionOrMinion) && chara3.Dist(this) <= 3 && !chara3.HasElement(1277)) 
				{
					Say("wall_bond", chara3, this);
					chara3.DamageHP(dmg, ele, eleP, attackSource, origin, showEffect, weapon, Chara);

public void DamageHP(long dmg, int ele, int eleP = 100, AttackSource attackSourc

cs
					{
						int num = chara4.Evalue(1241);
						int num2 = chara4.Evalue(438);
						if ((num != 0 || num2 != 0) && !chara4.IsDisabled && !chara4.isRestrained && (!IsPCFactionOrMinion || chara4.IsPCFactionOrMinion) && (IsPCFactionOrMinion || !chara4.IsPCFactionOrMinion) && chara4.Dist(this) <= Mathf.Max(num, (num2 > 0) ? 1 : 0) && (num != 0 || num2 <= 0 || (long)hp * 100L / MaxHP <= (long)chara4.hp * 100L / chara4.MaxHP)) 
						if ((num != 0 || num2 != 0) && !chara4.IsDisabled && !chara4.isRestrained && (!IsPCFactionOrMinion || chara4.IsPCFactionOrMinion) && (IsPCFactionOrMinion || !chara4.IsPCFactionOrMinion) && chara4.Dist(this) <= Mathf.Max(num, (num2 > 0) ? 1 : 0) && !chara4.HasElement(1277) && (num != 0 || num2 <= 0 || (long)hp * 100L / MaxHP <= (long)chara4.hp * 100L / chara4.MaxHP)) 
						{
							Say((num2 == 0) ? "wall_flesh" : "wall_knightly", chara4, this);
							chara4.DamageHP(dmg * (100L + (long)((num2 > 0) ? (-10) : 0) + ((num > 0) ? 10 : 0)) / 100, ele, eleP, attackSource, origin, showEffect, weapon, Chara);

public void DamageHP(long dmg, int ele, int eleP = 100, AttackSource attackSourc

cs
							Chara.AddCondition<ConFractured>((int)Mathf.Max(10f, 30f - Mathf.Sqrt(Evalue(436))));
							hp = Mathf.Min(half * (int)Mathf.Sqrt(Evalue(436) * 2) / 100, MaxHP / 3);
						});
						goto IL_1107; 
						goto IL_1128; 
					}
				}
				if (zoneInstanceBout != null && (bool)LayerDrama.Instance)

public void DamageHP(long dmg, int ele, int eleP = 100, AttackSource attackSourc

cs
						if (EClass.player.invlunerable)
						{
							EvadeDeath(null);
							goto IL_1107; 
							goto IL_1128; 
						}
					}
					if (Evalue(1220) > 0 && Chara.stamina.value >= (IsPC ? (Chara.stamina.max / 2) : (Chara.stamina.max / 3 * 2)))

public void DamageHP(long dmg, int ele, int eleP = 100, AttackSource attackSourc

cs
			}
		}
	}
	goto IL_1107; 
	IL_1107: 
	goto IL_1128; 
	IL_1128: 
	if (trait.CanBeAttacked)
	{
		renderer.PlayAnime(AnimeID.HitObj);

public void SpawnLoot(Card origin)

cs
				list.Add(ThingGen.Create("heart"));
			}
		}
		if (this.rarity == Rarity.Mythical) 
		{ 
			list.Add(ThingGen.Create("money3")); 
		} 
		if (!isBackerContent && !flag)
		{
			switch (id)

public virtual int GetPrice(CurrencyType currency = CurrencyType.Money, bool sel

cs
				return 3;
			case "1165":
				return 10;
			case "bed_shiawase":
				return 40; 
			case "diary_sister":
				return 12;
			case "diary_lady":

Chara

public override MoveResult _Move(Point newPoint, MoveType type = MoveType.Walk)

cs
		{
			AddExp(Mathf.Clamp((int)Mathf.Sqrt(base.ExpToNext / 100), 1, 1000));
		}
		if (pos.IsBlocked && EClass.rnd(2) == 0) 
		if (pos.IsBlocked && EClass.rnd(IsPC ? 2 : 20) == 0) 
		{
			stamina.Mod(-1);
		}

public bool RequestProtection(Chara attacker, Action<Chara> action)

cs
	bool flag = false;
	foreach (Chara chara in EClass._map.charas)
	{
		if (chara == attacker || chara.enemy == this || chara == this || chara.host != null || chara.IsDisabled || !chara.IsFriendOrAbove(this) || chara.conSuspend != null || (chara.IsPCParty && !IsPCParty) || (IsPCFaction && !chara.IsPCFaction) || (attacker.IsPCFactionOrMinion && chara.IsPCFactionOrMinion)) 
		if (chara == attacker || chara.enemy == this || chara == this || chara.host != null || chara.IsDisabled || !chara.IsFriendOrAbove(this) || chara.conSuspend != null || (chara.IsPCParty && !IsPCParty) || (IsPCFaction && !chara.IsPCFaction) || (attacker.IsPCFactionOrMinion && chara.IsPCFactionOrMinion) || chara.HasElement(1277)) 
		{
			continue;
		}

CoreDebug

public void UpdateInput()

cs
	}
	if (Input.GetKeyDown(KeyCode.F7))
	{
		MiniGame.Activate(MiniGame.Type.Scratch); 
		return; 
		EClass.pc.PlayEffect("punishment"); 
		EClass.pc.elements.ModBase(79, key ? (-10) : 10); 
	}
	if (Input.GetKeyDown(KeyCode.F8))
	{

CoreExtension

public static string TagColor(this string text, Func<bool> funcGood, Func<bool>

cs
		return text.TagColor(funcGood() ? skinColorProfile.textGood : ((funcBad != null && funcBad()) ? skinColorProfile.textBad : skinColorProfile.textDefault));
	}

	public static void Sort(this List<Thing> things, UIList.SortMode m, bool ascending = false) 
	public static void Sort(this List<Thing> things, UIList.SortMode m, bool ascending = false, CurrencyType currency = CurrencyType.Money) 
	{
		foreach (Thing thing in things)
		{
			thing.SetSortVal(m); 
			thing.SetSortVal(m, currency); 
		}
		things.Sort(delegate(Thing a, Thing b)
		{

DramaCustomSequence

public void Build(Chara c)

cs
	bool flag4 = false;
	if (!c.IsPCFaction && c.affinity.CanInvite() && !EClass._zone.IsInstance && c.c_bossType == BossType.none)
	{
		if ((c.trait.IsUnique || c.IsGlobal) && c.GetInt(111) == 0 && !c.IsPCFaction) 
		if ((c.trait.IsUnique || c.IsGlobal) && c.GetInt(111) == 0 && !c.IsPCFaction && c.trait.NeedBoutToJoin) 
		{
			Choice2("daBout", "_bout");
			flag4 = true;

public void Build(Chara c)

cs
			{
				if (EClass.pc.HasElement(1232) || EClass.pc.HasElement(1291))
				{
					goto IL_095c; 
					goto IL_0971; 
				}
				num2 = EClass.pc.HasCondition<StanceMama>();
			}

public void Build(Chara c)

cs
			}
			if (num2)
			{
				goto IL_095c; 
				goto IL_0971; 
			}
			goto IL_096d; 
			goto IL_0982; 
		}
		if (c.isDrunk || c.HasElement(1275) || EClass.debug.enable)
		{
			Choice2(flag2 ? "daBird" : "daTail", "_tail");
		}
	}
	goto IL_0d86; 
	IL_095c: 
	Choice2("daMama", "_mama"); 
	goto IL_096d; 
	IL_09bd: 
	if (c.trait.CanRevive) 
	{ 
		Choice2("daRevive", "_revive").DisableSound(); 
	} 
	if (!c.trait.IDTrainer.IsEmpty() && !EClass._zone.IsUserZone && (Guild.GetCurrentGuild() == null || Guild.GetCurrentGuild().relation.IsMember())) 
	{ 
		Choice2("daTrain", "_train").DisableSound(); 
	} 
	if (c.trait.CanWhore) 
	{ 
		Choice2(flag2 ? "daBirdBuy" : "daTailBuy", "_whore"); 
	} 
	if (c.trait.CanHeal) 
	{ 
		Choice2("daHeal", "_heal"); 
	} 
	if (c.trait.CanServeFood) 
	{ 
		Choice2("daFood", "_food"); 
	} 
	if (c.trait is TraitInformer) 
	{ 
		Choice2("daSellFame", "_sellFame"); 
	} 
	if (EClass._zone.AllowInvest) 
	{ 
		if (c.trait.CanInvestTown && Guild.GetCurrentGuild() == null) 
		{ 
			Choice2("daInvest", "_investZone"); 
		} 
		if (c.trait.CanInvest) 
		{ 
			Choice2("daInvest", "_investShop"); 
		} 
	} 
	if (c.trait.CanIdentify) 
	{ 
		Choice2("daIdentify", "_identify").DisableSound(); 
		Choice2("daIdentifyAll", "_identifyAll"); 
		Choice2("daIdentifySP", "_identifySP").DisableSound(); 
	} 
	if (c.trait.CanPicklock) 
	{ 
		if (c.Evalue(280) < 20) 
		{ 
			c.elements.SetBase(280, 20); 
		} 
		foreach (Thing item4 in EClass.pc.things.List((Thing a) => a.c_lockLv > 0, onlyAccessible: true)) 
		{ 
			Thing _t4 = item4; 
			Choice2("daPicklock".lang(_t4.Name), "_picklock").SetOnClick(delegate
			{ 
				destThing = _t4; 
			}); 
		} 
	} 
	if (c.trait is TraitBanker) 
	{ 
		Choice2("daDeposit", "_deposit"); 
	} 
	if (c.IsMaid || (c.trait.CanInvestTown && (EClass._zone.source.faction == "mysilia" || EClass._zone.IsPCFaction))) 
	{ 
		Choice2("daExtraTax", "_extraTax"); 
	} 
	if ((c.trait is TraitMiko_Mifu || c.trait is TraitMiko_Nefu || c.trait is TraitEureka) && EClass.world.date.IsExpired(c.c_dateStockExpire)) 
	{ 
		Choice2("daBlessing", "_blessing"); 
	} 
	goto IL_0d86; 
	IL_09ac: 
	goto IL_0d9b; 
	IL_09c1: 
	Choice2("daBaby", "_baby");
	goto IL_09bd; 
	IL_096d: 
	ConTransmuteHuman condition2 = c.GetCondition<ConTransmuteHuman>(); 
	bool num3; 
	if (condition2 == null) 
	{ 
		if (c.HasElement(1232)) 
		{ 
			goto IL_09ac; 
		} 
		num3 = c.HasElement(1291); 
	} 
	else
	{ 
		num3 = condition2.IsBaby; 
	} 
	if (num3) 
	{ 
		goto IL_09ac; 
	} 
	goto IL_09bd; 
	IL_0d86: 
	goto IL_09d2; 
	IL_0971: 
	Choice2("daMama", "_mama"); 
	goto IL_0982; 
	IL_0d9b: 
	if (c.IsHomeMember())
	{
		if (c.IsMaid)

public void Build(Chara c)

cs
	Talk("what", StepDefault);
	if (!c.IsMarried || EClass.debug.enable)
	{
		foreach (Thing item5 in EClass.pc.things.List((Thing a) => !a.c_isImportant && !a.isEquipped && a.c_uidAttune == 0 && (a.id == "amulet_engagement" || a.id == "ring_engagement"))) 
		foreach (Thing item4 in EClass.pc.things.List((Thing a) => !a.c_isImportant && !a.isEquipped && a.c_uidAttune == 0 && (a.id == "amulet_engagement" || a.id == "ring_engagement"))) 
		{
			Thing _t3 = item5; 
			Choice("daMarry".lang(item5.Name), "_marry").SetOnClick(delegate
			Thing _t4 = item4; 
			Choice("daMarry".lang(item4.Name), "_marry").SetOnClick(delegate
			{
				destThing = _t3; 
				destThing = _t4; 
			});
		}
	}

public void Build(Chara c)

cs
		QuestSupply supply = c.quest as QuestSupply;
		if (supply != null)
		{
			foreach (Thing item6 in supply.ListDestThing()) 
			foreach (Thing item5 in supply.ListDestThing()) 
			{
				Thing _t2 = item6; 
				Choice("daDeliver".lang(supply.GetTitle() ?? "", _t2.GetName(NameStyle.Full, supply.num)), "_deliver").SetOnClick(delegate
				Thing _t3 = item5; 
				Choice("daDeliver".lang(supply.GetTitle() ?? "", _t3.GetName(NameStyle.Full, supply.num)), "_deliver").SetOnClick(delegate
				{
					EClass.game.quests.Start(c.quest);
					destThing = _t2; 
					destThing = _t3; 
					destQuest = supply;
				}).SetOnTooltip(delegate(UITooltip a)
				{
					_t2.WriteNote(a.note); 
					_t3.WriteNote(a.note); 
				});
			}
		}

public void Build(Chara c)

cs
		{
			EClass.pc.party.AddMemeber(c);
		}
		foreach (Chara item7 in EClass.pc.party.members.ToList()) 
		foreach (Chara item6 in EClass.pc.party.members.ToList()) 
		{
			if (item7 != EClass.pc && item7 != c) 
			if (item6 != EClass.pc && item6 != c) 
			{
				EClass.pc.party.RemoveMember(item7); 
				EClass.pc.party.RemoveMember(item6); 
			}
		}
		if (c.host != null)

public void Build(Chara c)

cs
				CardBlueprint.Set(CardBlueprint.Original);
				GameLang.refDrama1 = ThingGen.Create(reqId).SetNum(reqNum).Name;
				TempTalkTopic("inviteReq1", null);
				foreach (Thing t2 in EClass.pc.things.List((Thing t) => t.id == reqId && t.Num >= reqNum, onlyAccessible: true)) 
				foreach (Thing t2 in EClass.pc.things.List((Thing t) => t.id == reqId && (t.Num >= reqNum || EClass.debug.enable), onlyAccessible: true)) 
				{
					Thing _t6 = t2;
					Choice("daDeliver".lang("", _t6.GetName(NameStyle.Full, _t6.Num)), delegate

public void Build(Chara c)

cs
						t2.ModNum(-reqNum);
						TempTalk("hired", StepEnd);
						EClass.Sound.Play("good");
						c.MakeAlly(); 
						if (c.id == "mamani") 
						{ 
							Chara chara = CharaGen.Create("mamani2"); 
							EClass._zone.AddCard(chara, EClass.pc.pos.GetNearestPoint()); 
							chara.isCopy = true; 
							chara.MakeAlly(); 
						} 
						else
						{ 
							c.MakeAlly(); 
						} 
					}).SetOnTooltip(delegate(UITooltip a)
					{
						_t6.WriteNote(a.note);

public void Build(Chara c)

cs
	Method(delegate
	{
		TempTalkTopic("blooming1", null);
		foreach (Chara item8 in EClass.pc.party.members.Where((Chara c2) => c2.CanBloom())) 
		foreach (Chara item7 in EClass.pc.party.members.Where((Chara c2) => c2.CanBloom())) 
		{
			Chara c4 = item8; 
			Chara c4 = item7; 
			Choice("daBloom".lang(c4.Name), delegate
			{
				if (EClass._zone.influence < 10)

public void Build(Chara c)

cs
				},
				onList = delegate
				{
					foreach (ResearchPlan item9 in plans) 
					foreach (ResearchPlan item8 in plans) 
					{
						list.Add(item9); 
						list.Add(item8); 
					}
				}
			};

void Invest(bool quick)

cs
				},
				onList = delegate
				{
					foreach (SourceElement.Row item10 in EClass.sources.elements.rows.Where(delegate(SourceElement.Row a) 
					foreach (SourceElement.Row item9 in EClass.sources.elements.rows.Where(delegate(SourceElement.Row a) 
					{
						if (a.tag.Contains("unused"))
						{

void Invest(bool quick)

cs
						return a.category == "skill" && a.categorySub == c.trait.IDTrainer;
					}).ToList())
					{
						list.Add(Element.Create(item10.id)); 
						list.Add(Element.Create(item9.id)); 
					}
				}
			};

void Invest(bool quick)

cs
				{
					SE.Pay();
					EClass.pc.ModCurrency(-costIdentify);
					foreach (Thing item11 in EClass.pc.things.List((Thing t) => !t.IsIdentified, onlyAccessible: true)) 
					foreach (Thing item10 in EClass.pc.things.List((Thing t) => !t.IsIdentified, onlyAccessible: true)) 
					{
						item11.Thing.Identify(show: false); 
						if (!item11.IsInstalled) 
						item10.Thing.Identify(show: false); 
						if (!item10.IsInstalled) 
						{
							numSuperior++;
						}

void Invest(bool quick)

cs
		{
			sequence.Exit();
			c.Talk("callGuards");
			foreach (Chara chara in EClass._map.charas) 
			foreach (Chara chara2 in EClass._map.charas) 
			{
				if (chara == c || chara.master == c) 
				if (chara2 == c || chara2.master == c) 
				{
					chara.SetHostility(Hostility.Enemy); 
					chara.DoHostileAction(EClass.pc.party.members.RandomItem()); 
					chara2.SetHostility(Hostility.Enemy); 
					chara2.DoHostileAction(EClass.pc.party.members.RandomItem()); 
				}
			}
			if (!EClass._zone.IsPCFaction && EClass._zone is Zone_Field)

void Invest(bool quick)

cs
	End();
	Step("_end");
	End();
	return; 
	IL_09d2: 
	if (c.trait.CanRevive) 
	{ 
		Choice2("daRevive", "_revive").DisableSound(); 
	} 
	if (!c.trait.IDTrainer.IsEmpty() && !EClass._zone.IsUserZone && (Guild.GetCurrentGuild() == null || Guild.GetCurrentGuild().relation.IsMember())) 
	{ 
		Choice2("daTrain", "_train").DisableSound(); 
	} 
	if (c.trait.CanWhore) 
	{ 
		Choice2(flag2 ? "daBirdBuy" : "daTailBuy", "_whore"); 
	} 
	if (c.trait.CanHeal) 
	{ 
		Choice2("daHeal", "_heal"); 
	} 
	if (c.trait.CanServeFood) 
	{ 
		Choice2("daFood", "_food"); 
	} 
	if (c.trait is TraitInformer) 
	{ 
		Choice2("daSellFame", "_sellFame"); 
	} 
	if (EClass._zone.AllowInvest) 
	{ 
		if (c.trait.CanInvestTown && Guild.GetCurrentGuild() == null) 
		{ 
			Choice2("daInvest", "_investZone"); 
		} 
		if (c.trait.CanInvest) 
		{ 
			Choice2("daInvest", "_investShop"); 
		} 
	} 
	if (c.trait.CanIdentify) 
	{ 
		Choice2("daIdentify", "_identify").DisableSound(); 
		Choice2("daIdentifyAll", "_identifyAll"); 
		Choice2("daIdentifySP", "_identifySP").DisableSound(); 
	} 
	if (c.trait.CanPicklock) 
	{ 
		if (c.Evalue(280) < 20) 
		{ 
			c.elements.SetBase(280, 20); 
		} 
		foreach (Thing item11 in EClass.pc.things.List((Thing a) => a.c_lockLv > 0, onlyAccessible: true)) 
		{ 
			Thing _t2 = item11; 
			Choice2("daPicklock".lang(_t2.Name), "_picklock").SetOnClick(delegate
			{ 
				destThing = _t2; 
			}); 
		} 
	} 
	if (c.trait is TraitBanker) 
	{ 
		Choice2("daDeposit", "_deposit"); 
	} 
	if (c.IsMaid || (c.trait.CanInvestTown && (EClass._zone.source.faction == "mysilia" || EClass._zone.IsPCFaction))) 
	{ 
		Choice2("daExtraTax", "_extraTax"); 
	} 
	if ((c.trait is TraitMiko_Mifu || c.trait is TraitMiko_Nefu || c.trait is TraitEureka) && EClass.world.date.IsExpired(c.c_dateStockExpire)) 
	{ 
		Choice2("daBlessing", "_blessing"); 
	} 
	goto IL_0d9b; 
	IL_0982: 
	ConTransmuteHuman condition2 = c.GetCondition<ConTransmuteHuman>(); 
	bool num3; 
	if (condition2 == null) 
	{ 
		if (c.HasElement(1232)) 
		{ 
			goto IL_09c1; 
		} 
		num3 = c.HasElement(1291); 
	} 
	else
	{ 
		num3 = condition2.IsBaby; 
	} 
	if (num3) 
	{ 
		goto IL_09c1; 
	} 
	goto IL_09d2; 
	void BackChill()
	{
		Method(RumorChill, null, StepDefault);

EffectId

public enum EffectId

cs
	ChangeBiography = 317,
	Degenerate = 318,
	MassFear = 319,
	Fuse = 320
	Fuse = 320, 
	BlueDrag = 321
}

FACTION

public class FACTION

cs

	public const int fFood = 2204;

	public const int fPromo = 2202; 
	public const int fMoral = 2203; 

	public const int fElec = 2201;

public class FACTION

cs

	public const int fConstruction = 2003;

	public const int fMoral = 2203; 
	public const int fPromo = 2202; 

	public static readonly int[] IDS = new int[53]
	{
		3601, 3602, 3603, 3604, 3701, 3606, 3700, 3702, 3600, 3605,
		3500, 2119, 2206, 2205, 2204, 2202, 2201, 2200, 2116, 2120, 
		3500, 2119, 2206, 2205, 2204, 2203, 2201, 2200, 2116, 2120, 
		2118, 2117, 3703, 2207, 3704, 4002, 3706, 2115, 4006, 4005,
		4004, 4003, 4001, 4000, 3900, 3805, 3804, 3803, 3802, 3801,
		3800, 3784, 3783, 3782, 3781, 3780, 3710, 3709, 3708, 3707,
		3705, 2003, 2203
		3705, 2003, 2202
	};
}
public class Faction : EClass

FEAT

public class FEAT

cs

	public const int featNirvana = 1231;

	public const int featFarmer = 1403; 
	public const int featWizard = 1402; 
	public const int featTourist = 1406; 

	public const int featPaladin = 1407;

public class FEAT

cs

	public const int featFairysan = 1413;

	public const int featWhiteVixen = 1414; 
	public const int featPianist = 1405; 

	public const int featTourist = 1406; 
	public const int featWhiteVixen = 1414; 

	public const int featFoxMaid = 1415; 
	public const int featInquisitor = 1416; 

	public const int featWitch = 1417;

public class FEAT

cs

	public const int featPeaky = 1423;

	public const int featElite = 1424; 
	public const int featFoxMaid = 1415; 

	public const int featInquisitor = 1416; 
	public const int featArcher = 1404; 

	public const int featMimic = 1425; 
	public const int featFarmer = 1403; 

	public const int featPianist = 1405; 
	public const int featHarem = 1276; 

	public const int featWizard = 1402; 
	public const int featGoddess = 1290; 

	public const int featSadCreature = 1291;

public class FEAT

cs

	public const int featGod_element1 = 1300;

	public const int featGod_earth1 = 1305; 
	public const int featNorland = 1236;

	public const int featGod_earth1 = 1305; 
	public const int featGod_wind1 = 1310;

	public const int featGod_machine1 = 1315;

	public const int featArcher = 1404; 
	public const int featGod_healing1 = 1320;

	public const int featGod_harvest1 = 1325; 
	public const int featGod_luck1 = 1330;

	public const int featGod_harmony1 = 1335;

public class FEAT

cs

	public const int featThief = 1401;

	public const int featGod_harvest1 = 1325; 
	public const int featElite = 1424; 

	public const int featGoddess = 1290; 
	public const int featMimic = 1425; 

	public const int featNeckHunter = 1426;

	public const int featMurderer = 1428; 
	public const int featDisguise = 1427; 

	public const int featDemon = 1239;

public class FEAT

cs

	public const int featPegasus = 1246;

	public const int featDisguise = 1427; 
	public const int featElder = 1238; 

	public const int featLibra = 1247;

public class FEAT

cs

	public const int featMiscreation = 1248;

	public const int featRoran = 1237; 
	public const int featColdHearted = 1277; 

	public const int featElder = 1238; 
	public const int featRoran = 1237; 

	public const int featHarem = 1276; 
	public const int featMurderer = 1428; 

	public const int featManyFace = 1429;

public class FEAT

cs

	public const int featPeacemaker = 1272;

	public static readonly int[] IDS = new int[156] 
	public static readonly int[] IDS = new int[157] 
	{
		1235, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 1642, 1650,
		1652, 1653, 1654, 1655, 1656, 1657, 1658, 1651, 1641, 1640,

public class FEAT

cs
		1207, 1205, 1204, 1203, 1202, 1201, 1200, 1234, 1206, 1216,
		1217, 1218, 1663, 1664, 1750, 1233, 1232, 1230, 1229, 1228,
		1227, 1226, 1225, 1224, 1223, 1222, 1221, 1220, 1219, 1661,
		1610, 1231, 1403, 1407, 1408, 1409, 1410, 1411, 1412, 1413, 
		1414, 1406, 1415, 1417, 1418, 1419, 1420, 1421, 1422, 1423, 
		1424, 1416, 1425, 1405, 1402, 1291, 1292, 1293, 1300, 1305, 
		1236, 1310, 1315, 1404, 1320, 1330, 1335, 1340, 1345, 1350, 
		1355, 1400, 1401, 1325, 1290, 1426, 1428, 1239, 1240, 1241, 
		1242, 1243, 1244, 1245, 1246, 1427, 1247, 1249, 1250, 1251, 
		1252, 1253, 1254, 1270, 1271, 1248, 1237, 1238, 1276, 1429, 
		1430, 1431, 1275, 1274, 1273, 1272
		1610, 1231, 1402, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 
		1413, 1405, 1414, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 
		1423, 1415, 1404, 1403, 1276, 1290, 1291, 1292, 1293, 1300, 
		1236, 1305, 1310, 1315, 1320, 1325, 1330, 1335, 1340, 1345, 
		1350, 1355, 1400, 1401, 1424, 1425, 1426, 1427, 1239, 1240, 
		1241, 1242, 1243, 1244, 1245, 1246, 1238, 1247, 1249, 1250, 
		1251, 1252, 1253, 1254, 1270, 1271, 1248, 1277, 1237, 1428, 
		1429, 1430, 1431, 1275, 1274, 1273, 1272
	};
}
public class Feat : Element

FOOD

public class FOOD

cs
public class FOOD
{
	public const int food_cat = 701; 
	public const int food_god = 758; 

	public const int creativeDish = 764;

	public const int food_poison = 702; 
	public const int food_cat = 701; 
	public const int food_love = 703; 

	public const int food_bug = 704;

public class FOOD

cs

	public const int justcooked = 757;

	public const int food_CHA = 700; 
	public const int food_love = 703; 
	public const int food_poison = 702; 

	public const int food_god = 758; 
	public const int food_CHA = 700; 

	public static readonly int[] IDS = new int[14]
	{
		701, 764, 702, 704, 705, 706, 707, 708, 709, 710, 
		757, 700, 703, 758
		758, 764, 701, 703, 704, 705, 706, 707, 708, 709, 
		710, 757, 702, 700
	};
}

+GrowSystemCha

File Created
cs
public class GrowSystemCha : GrowSystemCrop
{
	public override int HarvestStage => 3;

	protected override bool UseGenericFirstStageTile => false;

	public override bool CanReapSeed()
	{
		return base.stage.idx >= 3;
	}

	public override void OnMineObj(Chara c = null)
	{
		if (EClass.rnd(2) == 0)
		{
			TryPick(GrowSystem.cell, ThingGen.Create("grass", EClass.sources.materials.alias["grass"].id), c);
		}
		if (base.stage.idx == HarvestStage)
		{
			PopHarvest(c ?? EClass.pc, ThingGen.Create(idHarvestThing.IsEmpty("leaf_tea")));
		}
	}
}

LayerEditSkin

public void OnClickEdit()

cs
		SE.Beep();
		return;
	}
	string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(currentData.path); 
	string text = CorePath.custom + "Skin/" + fileNameWithoutExtension + ".pref"; 
	string text = currentData.path + ".pref"; 
	if (!File.Exists(text))
	{
		(currentData.pref ?? chara.Pref).WriteIni(text);

MUTATION

public class MUTATION

cs
public class MUTATION
{
	public const int mutationRegen = 1516; 
	public const int mutationDexN = 1515; 

	public const int mutationRegenN = 1517; 
	public const int mutationRegen = 1516; 

	public const int mutationSkin = 1510;

	public const int etherGravity = 1550; 
	public const int mutationHair = 1532; 
	public const int mutationHairN = 1533; 

	public const int mutationBodyN = 1531;

public class MUTATION

cs

	public const int mutationColdN = 1527;

	public const int etherUgly = 1551; 
	public const int mutationCold = 1526;

	public const int mutationBrain = 1524; 
	public const int etherGravity = 1550; 
	public const int mutationBrainN = 1525; 

	public const int mutationChaN = 1523;

public class MUTATION

cs

	public const int mutationSpeed = 1518;

	public const int mutationBrainN = 1525; 
	public const int mutationRegenN = 1517; 

	public const int etherFeet = 1552; 
	public const int mutationBrain = 1524; 

	public const int mutationHairN = 1533; 
	public const int etherUgly = 1551; 

	public const int etherWing = 1554; 
	public const int mutationHair = 1532; 
	public const int etherEye = 1553; 

	public const int mutationSkinN = 1511;

public class MUTATION

cs

	public const int mutationDex = 1514;

	public const int mutationDexN = 1515; 
	public const int etherEye = 1553; 
	public const int etherPoisonHand = 1565; 

	public const int etherManaBattery = 1564; 
	public const int etherFeet = 1552; 

	public const int etherProvoke = 1563;

	public const int etherPoisonHand = 1565; 
	public const int etherArmor = 1562; 

	public const int etherStupid = 1561; 
	public const int etherManaBattery = 1564; 

	public const int etherWeak = 1560;

public class MUTATION

cs

	public const int etherNeck = 1555;

	public const int etherArmor = 1562; 
	public const int etherWing = 1554; 
	public const int etherStupid = 1561; 

	public static readonly int[] IDS = new int[40]
	{
		1516, 1517, 1510, 1550, 1532, 1531, 1530, 1529, 1528, 1527, 
		1551, 1526, 1524, 1523, 1522, 1521, 1520, 1519, 1518, 1525, 
		1552, 1533, 1554, 1511, 1512, 1513, 1514, 1515, 1553, 1564, 
		1563, 1565, 1561, 1560, 1559, 1558, 1557, 1556, 1555, 1562
		1515, 1516, 1510, 1533, 1531, 1530, 1529, 1528, 1527, 1526, 
		1550, 1525, 1523, 1522, 1521, 1520, 1519, 1518, 1517, 1524, 
		1551, 1532, 1553, 1511, 1512, 1513, 1514, 1565, 1552, 1563, 
		1562, 1564, 1560, 1559, 1558, 1557, 1556, 1555, 1554, 1561
	};
}
public class Mutation : Feat

Religion

public enum ConvertType

cs
		Campaign
	}

	public enum PunishType
	{ 
		Wrath, 
		Takeover, 
		Pervert
	} 
	[JsonProperty]
	public int relation;

public virtual void LeaveFaith(Chara c, Religion newFaith, ConvertType type)

cs

	public virtual void Punish(Chara c)
	{
		if (c.mimicry != null) 
		{ 
			c.mimicry.Kill(); 
		} 
		Talk("wrath"); 
		if (c.Evalue(1228) > 0) 
		{ 
			c.SayNothingHappans(); 
			return; 
		} 
		c.hp = 1; 
		c.mana.value = 1; 
		c.stamina.value = 1; 
		if (c.HasCondition<ConWrath>()) 
		{ 
			recentWrath = this; 
			c.DamageHP(999999L, AttackSource.Wrath); 
			recentWrath = null; 
			return; 
		} 
		Thing thing = ThingGen.Create("punish_ball"); 
		int num = 0; 
		foreach (Religion item in EClass.game.religions.list) 
		{ 
			if (item.giftRank > 0) 
			{ 
				num++; 
			} 
		} 
		if (num >= 4) 
		{ 
			thing.idSkin = 1; 
		} 
		thing.ChangeWeight(EClass.pc.WeightLimit / 4 + 1000); 
		c.AddThing(thing); 
		c.AddCondition<ConWrath>(2000 + (c.IsPC ? (EClass.pc.c_daysWithGod * 20) : 0)); 
		DoPunish(c, PunishType.Wrath); 
	}

	public virtual void PunishTakeOver(Chara c)
	{ 
		DoPunish(c, PunishType.Takeover); 
	} 
	public virtual void PunishPerverseWretch(Chara c) 
	{ 
		DoPunish(c, PunishType.Pervert); 
	} 
	public void DoPunish(Chara c, PunishType type) 
	{
		if (c.mimicry != null)
		{
			c.mimicry.Kill();
		}
		Talk("takeoverFail"); 
		if (c.Evalue(1228) > 0) 
		Talk((type == PunishType.Takeover) ? "takeoverFail" : "wrath"); 
		if (type == PunishType.Wrath && c.Evalue(1228) > 0) 
		{
			c.SayNothingHappans();
			return;
		}
		c.hp /= 2; 
		if (c.mana.value > 0) 
		if (type == PunishType.Wrath) 
		{
			c.mana.value = c.mana.value / 2; 
			c.hp = 1; 
			if (c.mana.value > 0) 
			{ 
				c.mana.value = 1; 
			} 
			if (c.stamina.value > 0) 
			{ 
				c.stamina.value = 1; 
			} 
		}
		if (c.stamina.value > 0) 
		else
		{
			c.stamina.value = c.stamina.value / 2; 
			c.hp /= 2; 
			if (c.mana.value > 0) 
			{ 
				c.mana.value = c.mana.value / 2; 
			} 
			if (c.stamina.value > 0) 
			{ 
				c.stamina.value = c.stamina.value / 2; 
			} 
		}
		if (c.HasCondition<ConWrath>())
		{
			recentWrath = this;
			c.DamageHP(999999L, AttackSource.Wrath); 
			c.DamageHP(99999999L, AttackSource.Wrath); 
			recentWrath = null;
			return;
		}
		Thing thing = ThingGen.Create("punish_ball");
		thing.c_weight = EClass.pc.WeightLimit / 4 + 1000; 
		thing.isWeightChanged = true; 
		thing.SetDirtyWeight(); 
		int p = 100; 
		switch (type) 
		{ 
		case PunishType.Wrath: 
		{ 
			p = 2000 + (c.IsPC ? (EClass.pc.c_daysWithGod * 20) : 0); 
			if (type != 0) 
			{ 
				break; 
			} 
			int num = 0; 
			foreach (Religion item in EClass.game.religions.list) 
			{ 
				if (item.giftRank > 0) 
				{ 
					num++; 
				} 
			} 
			if (num >= 4) 
			{ 
				thing.idSkin = 1; 
			} 
			break; 
		} 
		case PunishType.Takeover: 
		case PunishType.Pervert: 
			p = 200; 
			break; 
		} 
		thing.ChangeWeight(EClass.pc.WeightLimit / 4 + 1000); 
		c.AddThing(thing);
		c.AddCondition<ConWrath>(200); 
		c.AddCondition<ConWrath>(p); 
	}

	public virtual void OnJoinFaith()

SpriteReplacer

public class SpriteReplacer

cs

	public static Dictionary<string, string> dictModItems = new Dictionary<string, string>();

	public static Dictionary<string, string> dictTextureItems = new Dictionary<string, string>(); 
	private static List<string> sortedModIds = new List<string>(); 
	private static bool modIdsDirty = true; 

	public SpriteData data;

public static Dictionary<string, SpriteReplacer> ListSkins()

cs
		{
			dictSkins.Remove(item);
		}
		Dictionary<string, string> dictionary = new DirectoryInfo(CorePath.custom + "Skin").GetFiles("*.png").ToDictionary((FileInfo f) => Path.GetFileNameWithoutExtension(f.Name), (FileInfo f) => Path.ChangeExtension(f.FullName, null)); 
		string key2; 
		Dictionary<string, string> dictionary = ListSkinItems(); 
		List<string> sortedIds = dictionary.Keys.OrderBy((string k) => k).ToList(); 
		foreach (KeyValuePair<string, string> item2 in dictionary)
		{
			item2.Deconstruct(out var key, out key2); 
			string key3 = key; 
			string path = key2; 
			if (!dictSkins.ContainsKey(key3)) 
			item2.Deconstruct(out var key, out var value); 
			string text = key; 
			string path = value; 
			SpriteReplacer spriteReplacer = new SpriteReplacer
			{
				dictSkins[key3] = new SpriteReplacer
				data = new SpriteData
				{
					data = new SpriteData
					{ 
						path = path 
					} 
				}; 
					path = path 
				} 
			}; 
			spriteReplacer.BuildSuffixData(text, dictionary, sortedIds); 
			if (spriteReplacer.suffixes.TryGetValue("", out var value2)) 
			{ 
				spriteReplacer.data = value2; 
			} 
			else
			{ 
				spriteReplacer.data.Init(); 
			}
			dictSkins[text] = spriteReplacer; 
		}
		foreach (KeyValuePair<string, SpriteReplacer> dictSkin2 in dictSkins) 
		return dictSkins; 
	} 
	public static Dictionary<string, string> ListSkinItems() 
	{ 
		List<DirectoryInfo> list = new List<DirectoryInfo>(); 
		list.Add(new DirectoryInfo(CorePath.custom + "Skin")); 
		list.AddRange(PackageIterator.GetDirectories("Skin", useCache: false)); 
		IEnumerable<FileInfo> enumerable = list.SelectMany((DirectoryInfo d) => from f in d.GetFiles("*.png", SearchOption.TopDirectoryOnly) 
			orderby f.Name 
			select f); 
		Dictionary<string, string> dictionary = new Dictionary<string, string>(); 
		foreach (FileInfo item in enumerable) 
		{
			dictSkin2.Deconstruct(out key2, out var value); 
			string id = key2; 
			value.BuildSuffixData(id, dictionary); 
			string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(item.Name); 
			string value = Path.ChangeExtension(item.FullName, null); 
			dictionary[fileNameWithoutExtension] = value; 
		}
		return dictSkins; 
		return dictionary; 
	}

	public Sprite GetSprite(string suffix = "")

public void Validate()

cs
		}
	}

	public void ReloadBuiltInTextures() 
	{ 
		dictTextureItems = new DirectoryInfo(CorePath.packageCore + "Texture/Item").GetFiles("*.png").ToDictionary((FileInfo f) => Path.GetFileNameWithoutExtension(f.Name), (FileInfo f) => Path.ChangeExtension(f.FullName, null)); 
	} 
	public void BuildSuffixData(string id, Dictionary<string, string> dictTexItems) 
	public void BuildSuffixData(string id, IReadOnlyDictionary<string, string> dictTexItems, List<string> sortedIds = null) 
	{
		foreach (var (text3, path) in dictTexItems) 
		List<string> list = sortedIds ?? dictTexItems.Keys.OrderBy((string k) => k).ToList(); 
		int num = list.BinarySearch(id); 
		if (num < 0) 
		{
			if (text3.StartsWith(id)) 
			num = ~num; 
		} 
		for (int i = num; i < list.Count; i++) 
		{ 
			string text = list[i]; 
			if (text.StartsWith(id)) 
			{
				string text4 = text3[id.Length..]; 
				string text2 = text[id.Length..]; 
				SpriteData spriteData = new SpriteData
				{
					path = path 
					path = dictTexItems[text] 
				};
				spriteData.Init();
				suffixes[text4] = spriteData; 
				Debug.Log("#sprite replacer " + text4.IsEmpty("<base>") + "/" + path.ShortPath()); 
				suffixes[text2] = spriteData; 
				Debug.Log("#sprite replacer " + text2.IsEmpty("<base>") + "/" + dictTexItems[text].ShortPath()); 
				continue; 
			}
			break; 
		} 
	} 
	public void SortModItemIds() 
	{ 
		if (sortedModIds.Count != dictModItems.Count || modIdsDirty) 
		{ 
			sortedModIds = dictModItems.Keys.OrderBy((string k) => k).ToList(); 
			modIdsDirty = false; 
		}
	}

public void Reload(string id, RenderData renderData = null)

cs
	suffixes.Clear();
	try
	{
		SortModItemIds(); 
		if (dictModItems.ContainsKey(id))
		{
			BuildSuffixData(id, dictModItems); 
			BuildSuffixData(id, dictModItems, sortedModIds); 
		}
		else
		else if (renderData != null && dictModItems.ContainsKey("Item/" + id)) 
		{
			if (dictTextureItems.Count == 0) 
			{ 
				ReloadBuiltInTextures(); 
			} 
			string text = dictTextureItems.TryGetValue(id); 
			if (text == null && renderData != null) 
			{ 
				text = dictTextureItems.TryGetValue(renderData.name); 
			} 
			if (text != null) 
			{ 
				BuildSuffixData(id, dictTextureItems); 
			} 
			BuildSuffixData("Item/" + id, dictModItems, sortedModIds); 
		}
		data = suffixes.TryGetValue(""); 
		suffixes.TryGetValue("", out data); 
		if (data != null)
		{
			Debug.Log(id + ":" + data.path);

public void Reload(string id, RenderData renderData = null)

cs
	}
	catch (Exception ex)
	{
		Debug.LogError("#sprite error fetching sprite replacer:" + ex); 
		Debug.LogError("#sprite error fetching sprite replacer '" + id + "' : " + ex); 
	}
	isChecked[id] = true;
}

Trait

public virtual void OnBarter(bool reroll = false)

cs
				Add("dagger_fish", 1, 0).SetReplica(on: true);
				NoRestockId("sword_zephir", 1, 0);
				Add("sword_zephir", 1, 0).SetReplica(on: true);
				Add("bed_shiawase", 1, 0).SetReplica(on: true); 
				Add("ribbon", 1, 0);
				Add("helm_sage", 1, 0);
				NoRestockId("wear_swim_danger", 1, 0);

public virtual void OnBarter(bool reroll = false)

cs
				break;
			case ShopType.Moyer:
			{
				for (int num14 = 1; num14 <= 22; num14++) 
				for (int num14 = 1; num14 <= 23; num14++) 
				{
					AddAdvWeek(num14);
				}

public Thing CreateStock()

cs
				return thing3;
			}
			case ShopType.AnimalGoods:
				if (EClass.rnd(2) == 0) 
				if (EClass.rnd(3) == 0) 
				{
					return Create("saddle");
				}
				if (EClass.rnd(2) == 0) 
				if (EClass.rnd(3) == 0) 
				{
					return Create("saddle_waist");
				}
				return Create("pasture"); 
				return Create("pasture").SetNum(EClass.rndHalf(8)); 
			case ShopType.Healer:
			{
				Thing thing2 = null;

TraitAltar

public void OnOffer(Chara c, Thing t)

cs
		}
		return;
	}
	if (t.HasElement(766) && !Deity.IsEyth) 
	{ 
		Deity.PunishTakeOver(EClass.pc); 
		return; 
	} 
	if (!IsBranchAltar && EClass.pc.IsEyth && !EClass.pc.HasElement(1228))
	{
		EClass.pc.Say("god_offerEyth", owner, t);

TraitBook

public override void OnCreate(int lv)

cs
		owner.idSkin = Item.skin;
	}

	public override void OnSetOwner() 
	{ 
		owner.idSkin = Item.skin; 
	} 
	public override void OnImportMap()
	{
		if (GetParam(1) != null)
		{
			owner.SetStr(53, GetParam(1));
		}
		owner.idSkin = Item.skin; 
	}

	public override void SetName(ref string s)

TraitChara

public virtual bool CanAutoRevive

cs

	public virtual bool CanJoinParty => true;

	public virtual bool NeedBoutToJoin => true; 
	public virtual bool CanJoinPartyResident
	{
		get

+TraitMani

File Created
cs
public class TraitMani : TraitUniqueCharaNoJoin
{
	public override bool NeedBoutToJoin => false;

	public override bool IsCountAsResident => true;
}

TraitTrolley

public virtual string GetIdSound()

cs
		}
		return "ride_bike";
	case "play_ride_big":
		if (owner.idSkin != 0) 
		if (owner.idSkin != 3) 
		{
			return "ride_trolley"; 
			if (owner.idSkin != 0) 
			{ 
				return "ride_trolley"; 
			} 
			return "ride_kin"; 
		}
		return "ride_kin"; 
		return "ride_bike"; 
	default:
		if (owner.idSkin != 7)
		{

UIInventory

public void Sort(bool redraw = true)

cs
		}
		num++;
	}
	owner.Container.things.Sort(m, IsShop ? EMono.player.pref.sort_ascending_shop : (IsAdvSort ? window.saveData.sort_ascending : EMono.player.pref.sort_ascending)); 
	owner.Container.things.Sort(m, IsShop ? EMono.player.pref.sort_ascending_shop : (IsAdvSort ? window.saveData.sort_ascending : EMono.player.pref.sort_ascending), owner.currency); 
	if (!UseGrid)
	{
		int num2 = 0;