Skip to content

EA 23.146 Nightly Patch 1

May 29, 2025

12 files modified.

Important Changes

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

ActEffect (1)

cs
public static void LoveMiracle(Chara tc, Chara c, int power) 
public static void LoveMiracle(Chara tc, Chara c, int power, bool plus = false) 

Card (1)

cs
public Thing MakeEgg(bool effect = true, int num = 1, bool addToZone = true) 
public Thing MakeEgg(bool effect = true, int num = 1, bool addToZone = true, int fertChance = 20) 

ActEffect

@@ -1550,18 +1550,18 @@ public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
				text3 = text4;
			}
		}
		Condition condition = Condition.Create(text3, power, delegate(Condition con) 
		Condition condition2 = Condition.Create(text3, power, delegate(Condition con) 
		{
			if (!actRef.aliasEle.IsEmpty())
			{
				con.SetElement(EClass.sources.elements.alias[actRef.aliasEle].id);
			}
		});
		condition.isPerfume = TC.IsPC && actRef.isPerfume; 
		Condition condition2 = TC.AddCondition(condition); 
		if (condition2 != null && condition2.isPerfume) 
		condition2.isPerfume = TC.IsPC && actRef.isPerfume; 
		Condition condition3 = TC.AddCondition(condition2); 
		if (condition3 != null && condition3.isPerfume) 
		{
			condition2.value = 3; 
			condition3.value = 3; 
			Msg.Say("perfume", TC);
		}
		if (!text4.IsEmpty())

@@ -1602,13 +1602,13 @@ public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
			power = power * 2 / 3;
		}
		int a2 = power;
		int num8 = TC.WIL * (isPowerful ? 20 : 5); 
		ConHolyVeil condition3 = TC.GetCondition<ConHolyVeil>(); 
		if (condition3 != null) 
		int num7 = TC.WIL * (isPowerful ? 20 : 5); 
		ConHolyVeil condition = TC.GetCondition<ConHolyVeil>(); 
		if (condition != null) 
		{
			num8 += condition3.power * 5; 
			num7 += condition.power * 5; 
		}
		if (id != EffectId.DebuffKizuami && EClass.rnd(a2) < num8 / EClass.sources.stats.alias[n].hexPower && EClass.rnd(10) != 0) 
		if (id != EffectId.DebuffKizuami && EClass.rnd(a2) < num7 / EClass.sources.stats.alias[n].hexPower && EClass.rnd(10) != 0) 
		{
			TC.Say("debuff_resist", TC);
			CC.DoHostileAction(TC);

@@ -1775,12 +1775,12 @@ public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
	{
		bool flag8 = id == EffectId.DamageBody || id == EffectId.DamageBodyGreat;
		bool mind = id == EffectId.DamageMind || id == EffectId.DamageMindGreat;
		int num6 = ((id == EffectId.DamageBody || id == EffectId.DamageMind) ? 1 : (4 + EClass.rnd(4))); 
		int num8 = ((id == EffectId.DamageBody || id == EffectId.DamageMind) ? 1 : (4 + EClass.rnd(4))); 
		if (id == EffectId.Weaken)
		{
			flag8 = EClass.rnd(2) == 0;
			mind = !flag8;
			num6 = 1; 
			num8 = 1; 
		}
		else
		{

@@ -1788,7 +1788,7 @@ public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
			TC.PlaySound("debuff");
		}
		TC.Say(flag8 ? "damageBody" : "damageMind", TC);
		for (int l = 0; l < num6; l++) 
		for (int l = 0; l < num8; l++) 
		{
			TC.DamageTempElements(power, flag8, mind);
		}

@@ -1805,11 +1805,11 @@ public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
	{
		bool flag9 = id == EffectId.EnhanceBody || id == EffectId.EnhanceBodyGreat;
		bool mind2 = id == EffectId.EnhanceMind || id == EffectId.EnhanceMindGreat;
		int num7 = ((id == EffectId.EnhanceBody || id == EffectId.EnhanceMind) ? 1 : (4 + EClass.rnd(4))); 
		int num9 = ((id == EffectId.EnhanceBody || id == EffectId.EnhanceMind) ? 1 : (4 + EClass.rnd(4))); 
		TC.Say(flag9 ? "enhanceBody" : "enhanceMind", TC);
		TC.PlayEffect("buff");
		TC.PlaySound("buff");
		for (int m = 0; m < num7; m++) 
		for (int m = 0; m < num9; m++) 
		{
			TC.EnhanceTempElements(power, flag9, mind2);
		}

@@ -1850,17 +1850,17 @@ public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
		{
			Debug.Log(actRef.act.id);
		}
		int 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(); 
		int num6 = 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(7500)) / 100; 
			num6 = num6 * (100 + actRef.refThing.Evalue(7500)) / 100; 
		}
		if (flag)
		{
			TC.DamageHP(num9 / 2, 919, power); 
			TC.DamageHP(num6 / 2, 919, power); 
			break;
		}
		TC.HealHPHost(num9, (actRef.refThing == null && id != EffectId.JureHeal) ? HealSource.Magic : HealSource.Item); 
		TC.HealHPHost(num6, (actRef.refThing == null && id != EffectId.JureHeal) ? HealSource.Magic : HealSource.Item); 
		TC.CureHost(CureType.Heal, power, state);
		TC.Say((power >= 300) ? "heal_heavy" : "heal_light", TC);
		break;

@@ -2172,6 +2172,7 @@ public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
		Msg.Say("nothingHappens");
		break;
	case EffectId.Love:
	case EffectId.LovePlus:
		if (flag)
		{
			if (CC == TC)

@@ -2187,9 +2188,23 @@ public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
		}
		else
		{
			LoveMiracle(TC, CC, power); 
			LoveMiracle(TC, CC, power, id == EffectId.LovePlus); 
		}
		break;
	case EffectId.HairGrowth:
		TC.PlayEffect("aura_heaven"); 
		TC.PlaySound("godbless"); 
		if (!TC.HaveFur()) 
		{ 
			TC.Say("grow_hair_fail", TC); 
			break; 
		} 
		TC.Say("grow_hair", TC); 
		TC.c_fur = 100; 
		break; 
	case EffectId.Gene:
		GeneMiracle(TC, CC, blessed ? DNA.Type.Superior : (flag ? DNA.Type.Brain : DNA.Type.Default)); 
		break; 
	}
	void Redirect(EffectId _id, BlessedState _state, ActRef _ref1)
	{

@@ -2213,7 +2228,7 @@ public static void Poison(Chara tc, Chara c, int power)

cs
		}
	}

	public static void LoveMiracle(Chara tc, Chara c, int power) 
	public static void LoveMiracle(Chara tc, Chara c, int power, bool plus = false) 
	{
		if (c == tc)
		{

@@ -2224,19 +2239,38 @@ public static void LoveMiracle(Chara tc, Chara c, int power)

cs
			tc.Say("love_chara", c, tc);
		}
		tc.ModAffinity(EClass.pc, power / 4);
		if (EClass.rnd(2) != 0 && (!EClass._zone.IsUserZone || tc.IsPCFaction || !EClass.game.principal.disableUsermapBenefit)) 
		if ((plus || EClass.rnd(2) != 0) && (!EClass._zone.IsUserZone || tc.IsPCFaction || !EClass.game.principal.disableUsermapBenefit)) 
		{
			if (EClass.rnd(2) == 0) 
			if (!plus && EClass.rnd(2) == 0) 
			{
				tc.MakeMilk();
			}
			else
			{
				tc.MakeEgg(); 
				tc.MakeEgg(effect: true, 1, addToZone: true, plus ? 3 : 20); 
			}
		}
	}

	public static void GeneMiracle(Chara tc, Chara c, DNA.Type type) 
	{ 
		if (EClass._zone.IsUserZone && !tc.IsPCFactionOrMinion) 
		{ 
			Msg.SayNothingHappen(); 
			return; 
		} 
		if (c == tc) 
		{ 
			tc.Say("love_ground", tc); 
		} 
		else
		{ 
			tc.Say("love_chara", c, tc); 
		} 
		Thing t = tc.MakeGene(type); 
		tc.GiveBirth(t, effect: true); 
	} 
	public static Point GetTeleportPos(Point org, int radius = 6)
	{
		Point point = new Point();

@@ -2260,7 +2294,7 @@ public static bool Wish(string s, string name, int power, BlessedState state)

cs
	bool net = EClass.core.config.net.enable && EClass.core.config.net.sendEvent;
	List<WishItem> list = new List<WishItem>();
	int wishLv = 10 + power / 4;
	int wishValue = power * 200; 
	int wishValue = 5000 + power * 50; 
	if (state >= BlessedState.Blessed)
	{
		wishLv = wishLv * 150 / 100;

@@ -2333,26 +2367,27 @@ public static bool Wish(string s, string name, int power, BlessedState state)

cs
					thing.c_charges = 0;
					break;
				case "money":
					num = EClass.rndHalf(wishValue); 
					num = EClass.rndHalf(wishValue * 3); 
					break;
				case "plat":
					num = EClass.rndHalf(wishValue / 2000 + 4); 
					num = EClass.rndHalf(wishValue / 500 + 4); 
					break;
				case "money2":
					num = EClass.rndHalf(wishValue / 1000 + 4); 
					num = EClass.rndHalf(wishValue / 500 + 4); 
					break;
				case "medal":
					num = EClass.rndHalf(wishValue / 3000 + 4); 
					num = EClass.rndHalf(wishValue / 2000 + 4); 
					break;
				default:
					if (!flag2 && thing.trait.CanStack)
					{
						int num2 = wishValue;
						int price = thing.GetPrice();
						for (int i = 0; i < 1000; i++) 
						num2 -= price; 
						for (int i = 1; i < 1000; i++) 
						{
							int num3 = price + 500 + i * Mathf.Max(price, 200); 
							if (num2 > num3) 
							int num3 = price + i * 2 * (price + 500); 
							if (num3 > 0 && num2 > num3) 
							{
								num++;
								num2 -= num3;

ActMelee

@@ -285,6 +285,14 @@ void Attack(Card _tc, Point _tp, float mtp, bool subAttack)

cs
			bool flag = false;
			for (int k = 0; k < num5; k++)
			{
				if (!Act.CC.IsAliveInCurrentZone) 
				{ 
					break; 
				} 
				if (!Act.TC.IsAliveInCurrentZone) 
				{ 
					break; 
				} 
				if (k > 0)
				{
					Act.CC.Say("attack_chaser");

ActRide

@@ -98,6 +98,14 @@ public static void Ride(Chara host, Chara t, bool parasite = false, bool talk =

cs
		host.Refresh();
	}

	public static void Unride(Chara host, Chara mount, bool talk = true) 
	{ 
		if (host != null && (host.parasite == mount || host.ride == mount)) 
		{ 
			Unride(host, host.parasite == mount, talk); 
		} 
	} 
	public static void Unride(Chara host, bool parasite = false, bool talk = true)
	{
		Chara chara = null;

Card

@@ -2808,6 +2808,7 @@ public void ApplyTrait()

cs

	public Card SetLv(int a)
	{
		bool flag = a > LV; 
		LV = a;
		if (!isChara)
		{

@@ -2830,6 +2831,10 @@ public Card SetLv(int a)

cs
			}
		}
	}
	if (flag && elements.Base(286) > 50) 
	{ 
		elements.SetTo(286, 50 + (int)Mathf.Sqrt(elements.Base(286) - 50)); 
	} 
	Rand.SetSeed();
	hp = MaxHP;
	Chara.mana.value = Chara.mana.max;

@@ -5355,9 +5360,9 @@ public void MakeRefFrom(Card c1, Card c2 = null)

cs
		c_extraNameRef = (c1.IsPC ? EClass.pc.c_altName : c1.c_extraNameRef);
	}

	public Thing MakeEgg(bool effect = true, int num = 1, bool addToZone = true) 
	public Thing MakeEgg(bool effect = true, int num = 1, bool addToZone = true, int fertChance = 20) 
	{
		Thing thing = ThingGen.Create((EClass.rnd(EClass.debug.enable ? 1 : 20) == 0) ? "egg_fertilized" : "_egg").SetNum(num); 
		Thing thing = ThingGen.Create((EClass.rnd(EClass.debug.enable ? 1 : fertChance) == 0) ? "egg_fertilized" : "_egg").SetNum(num); 
		thing.MakeFoodFrom(this);
		thing.c_idMainElement = c_idMainElement;
		if (!addToZone)

Chara

@@ -1701,7 +1701,7 @@ public void RefreshSpeed(Element.BonusInfo info = null)

cs
		info?.AddText("minSpeed".lang((elements.ValueWithoutLink(79) / 3).ToString() ?? ""));
	}
	int num = 100;
	if (EClass._zone.IsUnderwater) 
	if (EClass._zone.map != null && EClass._zone.IsUnderwater) 
	{
		int num2 = Evalue(200);
		num = 50 + Mathf.Clamp((int)Mathf.Sqrt(num2) * 5 - EClass._zone.DangerLv / 50, 0, 50) + Mathf.Clamp((int)Mathf.Sqrt(num2), 0, 25);

@@ -4902,17 +4902,18 @@ public override void Die(Element e = null, Card origin = null, AttackSource atta

cs
		{
			EClass._zone.ResetHostility();
		}
		if (id == "tsunami") 
		{ 
			pos.PlaySound("water"); 
			Destroy(); 
			return; 
		} 
		if (base.isSummon)
		{
			Say("summon_vanish", this); 
			pos.PlayEffect("vanish"); 
			pos.PlaySound("vanish"); 
			if (id == "tsunami") 
			{ 
				pos.PlaySound("water"); 
			} 
			else
			{ 
				Say("summon_vanish", this); 
				pos.PlayEffect("vanish"); 
				pos.PlaySound("vanish"); 
			} 
			Destroy();
			return;
		}

DNA

@@ -354,7 +354,7 @@ void AddBody()

cs
			for (int j = 0; j < 100; j++)
			{
				BodySlot bodySlot2 = model.body.slots.RandomItem();
				if (bodySlot2 != null && bodySlot2.elementId != 40) 
				if (bodySlot2 != null && bodySlot2.elementId != 40 && bodySlot2.elementId != 44) 
				{
					bodySlot = bodySlot2;
					break;

@@ -537,7 +537,12 @@ public Type GetRandomType()

cs

	public string GetText()
	{
		return "gene".lang((EClass.sources.cards.map.TryGetValue(id)?.GetName() ?? "???").ToTitleCase(), cost.ToString() ?? ""); 
		string text = EClass.sources.cards.map.TryGetValue(id)?.GetName() ?? "???"; 
		if (text == "*r") 
		{ 
			text = "???"; 
		} 
		return "gene".lang(text.ToTitleCase(), cost.ToString() ?? ""); 
	}

	public void WriteNote(UINote n)

EffectId

@@ -116,5 +116,8 @@ public enum EffectId

cs
	ThrowPotion = 292,
	DrainMana = 293,
	Swarm = 294,
	Sword = 295
	Sword = 295, 
	LovePlus = 296, 
	HairGrowth = 297, 
	Gene = 298
}

FoodEffect

@@ -419,6 +419,16 @@ public static void ProcTrait(Chara c, Card t)

cs
				c.AddCondition<ConInsane>(-value.Value * 10);
				c.AddCondition<ConHallucination>(-value.Value * 20);
				break;
			case 755:
				c.AddCondition<ConBleed>(-value.Value * 10); 
				break; 
			case 756:
				c.hygiene.Mod(-value.Value * 5); 
				break; 
			case 760:
				c.RemoveCondition<ConAwakening>(); 
				c.sleepiness.Mod(value.Value); 
				break; 
			case 761:
				c.Say("recharge_stamina_negative", c);
				c.stamina.Mod(-c.stamina.max * (-value.Value / 10 + 1) / 100 + value.Value);

MapBG

@@ -5,5 +5,6 @@ public enum MapBG

cs
	Landscape,
	Airship,
	Snow,
	Fog 
	Fog, 
	Seabed 
}

Net

@@ -219,7 +219,7 @@ public static async UniTask<List<DownloadMeta>> GetFileList(string idLang)

cs
			list.Add(new DownloadMeta
			{
				path = array[0],
				id = array[1].Replace("\"", ""), 
				id = Path.GetFileNameWithoutExtension(array[0]), 
				name = array[2],
				title = array[3],
				cat = array[5],

Scene

@@ -199,10 +199,13 @@ public void Init(Mode newMode)

cs
			EMono.game.Kill();
		}
		EMono.ui.AddLayer<LayerTitle>();
		if (!isAnnounced) 
		if (!isAnnounced || Application.isEditor) 
		{
			isAnnounced = true;
			EMono.ui.AddLayer("LayerAnnounce").SetOnKill(TryWarnMacScreen); 
			EMono.core.WaitForEndOfFrame(delegate
			{ 
				EMono.ui.AddLayer("LayerAnnounce").SetOnKill(TryWarnMacScreen); 
			}); 
		}
		else
		{

Zone_Field

@@ -44,7 +44,7 @@ public override bool UseFog

cs

	public override int DangerLvFix => base.Tile.source.dangerLv;

	public override string IdBiome => EClass._map.config.idBiome.IsEmpty(base.Tile.source.idBiome.IsEmpty("Plain")); 
	public override string IdBiome => map.config.idBiome.IsEmpty(base.Tile.source.idBiome.IsEmpty("Plain")); 

	public override float PrespawnRate => 1.2f;