Skip to content

EA 23.206 Nightly

September 26, 2025

9 files modified.

Important Changes

None.

AI_Idle

public override IEnumerable<Status> Run()

cs
		text = owner.id;
		if (!(text == "geist"))
		{
			if (text == "mech_scarab" && EClass.rnd(20) == 0) 
			if (text == "mech_scarab" && EClass.rnd(20) == 0 && owner.CanDuplicate()) 
			{
				int i = 0;
				owner.pos.ForeachNeighbor(delegate(Point p)

public override IEnumerable<Status> Run()

cs
						i++;
					}
				});
				if (i <= 2) 
				if (i < 2) 
				{
					EClass._zone.AddCard(owner.Duplicate(), owner.pos.GetNearestPoint(allowBlock: false, allowChara: false)); 
					Point randomPoint = owner.pos.GetRandomPoint(1, requireLos: false, allowChara: false, allowBlocked: false, 200); 
					if (randomPoint != null) 
					{ 
						Card c2 = EClass._zone.AddCard(owner.Duplicate(), randomPoint); 
						if (randomPoint.Distance(EClass.pc.pos) < EClass.pc.GetHearingRadius()) 
						{ 
							Msg.Say("self_dupe", owner, c2); 
						} 
					} 
				}
			}
		}

public override IEnumerable<Status> Run()

cs
	{
		for (int k = 0; k < 100; k++)
		{
			Point randomPoint = EClass._map.GetRandomPoint(); 
			if (randomPoint.IsDeepWater && !randomPoint.IsBlocked) 
			Point randomPoint2 = EClass._map.GetRandomPoint(); 
			if (randomPoint2.IsDeepWater && !randomPoint2.IsBlocked) 
			{
				yield return DoGoto(randomPoint); 
				yield return DoGoto(randomPoint2); 
				break;
			}
		}

Point FindMovePoint(BaseArea.AccessType type)

cs
	{
		for (int l = 0; l < 20; l++)
		{
			Point randomPoint2 = owner.pos.GetRandomPoint(5 + l, requireLos: false); 
			if (randomPoint2 != null && randomPoint2.IsInBounds && (randomPoint2.cell.room == null || randomPoint2.cell.room.data.accessType == type)) 
			Point randomPoint3 = owner.pos.GetRandomPoint(5 + l, requireLos: false); 
			if (randomPoint3 != null && randomPoint3.IsInBounds && (randomPoint3.cell.room == null || randomPoint3.cell.room.data.accessType == type)) 
			{
				return randomPoint2; 
				return randomPoint3; 
			}
		}
		return null;

ActEffect

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

cs
	case EffectId.Duplicate:
	{
		Point randomPoint = CC.pos.GetRandomPoint(2, requireLos: false, allowChara: false, allowBlocked: false, 200);
		if (randomPoint == null || randomPoint.Equals(CC.pos) || !randomPoint.IsValid || EClass._zone.IsRegion || CC.HasCondition<ConPoison>() || CC.HasCondition<ConConfuse>() || CC.HasCondition<ConDim>() || CC.HasCondition<ConParalyze>() || CC.HasCondition<ConSleep>() || CC.HasCondition<ConBurning>() || CC.HasCondition<ConFreeze>() || CC.HasCondition<ConMiasma>() || CC.corruption >= 100) 
		if (randomPoint == null || randomPoint.Equals(CC.pos) || !randomPoint.IsValid || !CC.CanDuplicate()) 
		{
			CC.Say("split_fail", CC);
			return;

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

cs
			tc.ModEncLv(-1);
			break;
		}
		int num4 = (flag3 ? 4 : 2) + (blessed ? 1 : 0); 
		if (tc.encLV >= num4) 
		int num5 = (flag3 ? 4 : 2) + (blessed ? 1 : 0); 
		if (tc.encLV >= num5) 
		{
			cc.Say("enc_resist", tc);
			break;

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

cs
		}
		cc.PlaySound("offering");
		cc.PlayEffect("buff");
		int num5 = (tc.isWeightChanged ? tc.c_weight : tc.Thing.source.weight); 
		int num6 = (tc.isWeightChanged ? tc.c_weight : tc.Thing.source.weight); 
		tc.isWeightChanged = true;
		Element orCreateElement = tc.elements.GetOrCreateElement(64);
		Element orCreateElement2 = tc.elements.GetOrCreateElement(65);

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

cs
		bool flag5 = tc.IsEquipmentOrRangedOrAmmo || tc.IsThrownWeapon;
		if (flag)
		{
			num5 = (int)(0.01f * (float)num5 * (float)power * 0.75f + 500f); 
			if (num5 < 0 || num5 > 10000000) 
			num6 = (int)(0.01f * (float)num6 * (float)power * 0.75f + 500f); 
			if (num6 < 0 || num6 > 10000000) 
			{
				num5 = 10000000; 
				num6 = 10000000; 
				flag5 = false;
			}
			if (flag5)

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

cs
		}
		else
		{
			num5 = num5 * (100 - power / 10) / 100; 
			num6 = num6 * (100 - power / 10) / 100; 
			if (blessed)
			{
				power /= 4;

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

cs
			}
			cc.Say("lighten", cc, tc);
		}
		tc.c_weight = num5; 
		tc.c_weight = num6; 
		tc.SetDirtyWeight();
		if (tc.parent == null)
		{

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

cs
		cc.PlayEffect("identify");
		cc.Say("reconstruct", cc, tc);
		EClass.game.cards.uidNext += EClass.rnd(30);
		Thing thing = ThingGen.Create(tc.id, -1, tc.LV * power / 100); 
		int num4 = Mathf.Max(tc.genLv, tc.LV, EClass.player.stats.deepest); 
		Thing thing = ThingGen.Create(tc.id, -1, num4 * power / 100); 
		thing.SetBlessedState(state);
		thing.genLv = num4; 
		tc.Destroy();
		CC.Pick(thing, msg: false);
		if (!CC.IsPC)

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

cs
			{
				if (!item4.IsFriendOrAbove(CC))
				{
					int num9 = Dice.Create("SpShutterHex", power, CC, (actRef.refThing != null) ? null : actRef.act).Roll(); 
					item4.DamageHP(num9 * hex2, 919, power, AttackSource.None, CC); 
					int num10 = Dice.Create("SpShutterHex", power, CC, (actRef.refThing != null) ? null : actRef.act).Roll(); 
					item4.DamageHP(num10 * hex2, 919, power, AttackSource.None, CC); 
				}
			}
		});

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

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

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

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

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

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

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

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

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

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

AttackProcess

public void PlayRangedAnime(int numFire)

cs
		{
			if (EClass.core.IsGameStarted && _CC.IsAliveInCurrentZone && _zone == _CC.currentZone)
			{
				if (_weapon.id == "gun_rail") 
				string id = _weapon.id; 
				if (!(id == "gun_rail")) 
				{
					_CC.PlayEffect("laser").GetComponent<SpriteBasedLaser>().Play(_TP.PositionCenter()); 
					if (id == "gun_laser") 
					{ 
						_CC.PlayEffect("laser").GetComponent<SpriteBasedLaser>().Play(_TP.PositionCenter()); 
					} 
					else
					{ 
						Effect effect = Effect.Get("ranged_arrow")._Play(_CC.pos, _CC.isSynced ? _CC.renderer.position : _CC.pos.Position(), 0f, _TP, data.sprite); 
						if (isCane) 
						{ 
							effect.sr.color = effColor; 
						} 
					} 
				}
				else
				{
					Effect effect = Effect.Get("ranged_arrow")._Play(_CC.pos, _CC.isSynced ? _CC.renderer.position : _CC.pos.Position(), 0f, _TP, data.sprite); 
					if (isCane) 
					{ 
						effect.sr.color = effColor; 
					} 
					_CC.PlayEffect("laser_rail").GetComponent<SpriteBasedLaser>().Play(_TP.PositionCenter()); 
				}
				if (data.eject)
				{

Card

public int _z

cs
		}
	}

	public int genLv 
	{ 
		get 
		{ 
			return _ints[10]; 
		} 
		set 
		{ 
			_ints[10] = value; 
		} 
	} 
	public int refVal
	{
		get

public void Create(string _id, int _idMat = -1, int genLv = -1)

cs
	Num = 1;
	autoRefuel = true;
	EClass.game.cards.AssignUID(this);
	this.genLv = genLv; 
	isNew = true;
	SetSource();
	OnBeforeCreate();

public float GetLightPower()

cs
		return num;
	}

	public int GetHearingRadius() 
	{ 
		return 8; 
	} 
	public int GetSightRadius()
	{
		if (IsPC)

Chara

public void Refresh(bool calledRecursive = false)

cs
		}
	}

	public bool CanDuplicate() 
	{ 
		if (EClass._zone.IsRegion || HasCondition<ConPoison>() || HasCondition<ConConfuse>() || HasCondition<ConDim>() || HasCondition<ConParalyze>() || HasCondition<ConSleep>() || HasCondition<ConBurning>() || HasCondition<ConFreeze>() || HasCondition<ConMiasma>() || corruption >= 100) 
		{ 
			return false; 
		} 
		if (id == "mech_scarab" && (isSynced || pos.cell.light > 0 || (!EClass._map.IsIndoor && !pos.cell.HasRoof && !EClass.world.date.IsNight))) 
		{ 
			return false; 
		} 
		return true; 
	} 
	public Chara Duplicate()
	{
		Chara chara = CharaGen.Create(id);

public void RestockEquip(bool onCreate)

cs
		}
		break;
	}
	switch (equip) 
	if (onCreate || !TryEquipRanged()) 
	{
	case "archer": 
		if (onCreate || !TryEquipRanged()) 
		if (id == "mech_scarab") 
		{
			EQ_CAT((EClass.rnd(4) == 0) ? "crossbow" : "bow"); 
			AddThing("gun_laser"); 
		}
		break; 
	case "inquisitor": 
	case "gunner": 
		if (onCreate || !TryEquipRanged()) 
		else
		{
			EQ_CAT("gun"); 
			switch (equip) 
			{ 
			case "archer": 
				EQ_CAT((EClass.rnd(4) == 0) ? "crossbow" : "bow"); 
				break; 
			case "inquisitor": 
			case "gunner": 
				EQ_CAT("gun"); 
				break; 
			} 
		}
		break; 
	}
	int num = ((base.rarity >= Rarity.Mythical) ? (base.LV * 3) : ((base.rarity >= Rarity.Legendary) ? (base.LV * 2) : base.LV));
	if (trait is TraitAdventurer)

public void TryDropBossLoot()

cs
	}
	if (num != 0)
	{
		if (EClass._zone.DangerLv > EClass.player.stats.deepest) 
		{ 
			EClass.player.stats.deepest = EClass._zone.DangerLv; 
		} 
		EClass.player.willAutoSave = true;
		Thing thing = ThingGen.CreateTreasure("chest_boss", base.LV, type);
		point.SetBlock();

DNA

public void WriteNote(UINote n)

cs
		if (num3 >= 0)
		{
			text2 = text2 + "[" + "*".Repeat(Mathf.Clamp(num3, 1, 5)) + ((num3 > 5) ? "+" : "") + "]";
			if (EClass.debug.showExtra) 
			{ 
				text2 = text2 + " (" + element.Value + ")"; 
			} 
		} 
		if ((bool)EClass.ui.GetLayer<LayerInfo>()) 
		{ 
			text2 = text2 + " (" + element.Value + ")"; 
		}
		n.AddText("gene_info".lang(element.Name.ToTitleCase(wholeText: true), text2), color2);
	}

Trait

public void OnBarter()

cs
				Add("dagger_fish", 1, 0).SetReplica(on: true);
				NoRestockId("sword_zephir");
				Add("sword_zephir", 1, 0).SetReplica(on: true);
				NoRestockId("ribbon"); 
				NoRestockId("helm_sage"); 
				Add("ribbon", 1, 0); 
				Add("helm_sage", 1, 0); 
				Add("diary_sister", 1, 0);
				Add("diary_catsister", 1, 0);
				Add("diary_lady", 1, 0);

TraitMiral

public class TraitMiral : TraitUniqueMerchant

cs
	public override string LangBarter => "daBuyMedal";

	public override string IdAmbience => "blacksmith";
	public override int ShopLv => 1; 
}

Zone

public void RefreshHat()

cs

	public void OnVisit()
	{
		if (CountDeepestLevel && DangerLv > EClass.player.stats.deepest) 
		{ 
			EClass.player.stats.deepest = DangerLv; 
		} 
		if (EClass.world.date.IsExpired(base.dateRevive))
		{
			ResetHostility();