Skip to content

EA 23.241 Nightly

December 2, 2025

12 files modified. 2 new files created.

Important Changes

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

TraitBookSecret (2)

cs
public override bool CanRead(Chara c) 
cs
public override int GetActDuration(Chara c) 

AI_Eat

public override IEnumerable<Status> Run()

cs
	{
		yield return Cancel();
	}
	if (EClass._zone.IsPCFaction && !owner.IsPCParty && owner.memberType != FactionMemberType.Livestock && !owner.noMove) 
	if ((EClass._zone.IsPCFaction || EClass.rnd(4) != 0) && !owner.IsPCParty && owner.memberType != FactionMemberType.Livestock && !owner.noMove) 
	{
		yield return DoGotoSpot<TraitSpotDining>(base.KeepRunning);
	}

ActMelee

public bool Attack(float dmgMulti = 1f)

cs
	if (EClass.rnd(2) == 0)
	{
		Act.CC.RemoveCondition<ConInvisibility>();
		Act.CC.RemoveCondition<ConDark>(); 
	}
	if (orgTC.isChara && orgTC.ExistsOnMap && orgTC != cC && !orgTC.IsRestrainedResident && !orgTC.IsDisabled && ACT.Melee.CanPerform(orgTC.Chara, cC) && (!orgTC.IsPCFactionOrMinion || !EClass._zone.isPeace))
	{

ActThrow

public static EffectIRenderer Throw(Card c, Point p, Card target, Thing t, Throw

cs
	if (EClass.rnd(2) == 0)
	{
		c.Chara.RemoveCondition<ConInvisibility>();
		c.Chara.RemoveCondition<ConDark>(); 
	}
	if (Act.TC != null)
	{

Card

private void _OnDeserialized(StreamingContext context)

cs
		{
			isDestroyed = true;
		}
		if (version < 3) 
		if (version < 4) 
		{
			if (version < 3 && isChara && HasElement(1210))
			{
				elements.ModBase(960, -5 * Evalue(1210));
			}
			version = 3; 
			if (version < 4 && isChara && HasElement(1210)) 
			{ 
				elements.ModBase(423, Evalue(1210)); 
			} 
			version = 4; 
		}
	}

public void LevelUp()

cs
		{
			Chara.SetFeat(1415, Evalue(1415) + 1, msg: true);
		}
		if (IsPC) 
		if (IsPC || !(Chara.race.id == "mutant")) 
		{
			return;
		}
		if (Chara.race.id == "mutant") 
		int num = Mathf.Min(1 + LV / 5, 20); 
		for (int i = 0; i < num; i++) 
		{
			int num = Mathf.Min(1 + LV / 5, 20); 
			for (int i = 0; i < num; i++) 
			if (Evalue(1644) < i + 1) 
			{
				if (Evalue(1644) < i + 1) 
				{ 
					Chara.SetFeat(1644, i + 1, msg: true); 
				} 
				Chara.SetFeat(1644, i + 1, msg: true); 
			}
		}
		Chara.TryUpgrade(); 
	}

	public virtual void ApplyMaterialElements(bool remove)

public void SpawnLoot(Card origin)

cs
				{
					CardBlueprint.SetRarity((EClass.rnd(20) == 0) ? Rarity.Mythical : Rarity.Legendary);
				}
				list.Add(ThingGen.Create(array[0], -1, LV).SetNum((num4 < 1000) ? 1 : (num4 / 1000 + ((EClass.rnd(1000) > num4 % 1000) ? 1 : 0)))); 
				list.Add(ThingGen.Create(array[0], -1, LV).SetNum((num4 < 1000) ? 1 : (num4 / 1000 + ((EClass.rnd(1000) < num4 % 1000) ? 1 : 0)))); 
			}
		}
		if (Chara.IsMachine)

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

cs
			}
			break;
		case CurrencyType.Plat:
		{ 
			string text = id; 
			if (!(text == "lucky_coin")) 
			switch (id) 
			{
				if (!(text == "book_skill")) 
				{ 
					break; 
				} 
			case "lucky_coin": 
				return 100; 
			case "book_exp": 
				return 200; 
			case "book_skill": 
				return 50;
			}
			return 100; 
		} 
			break; 
		case CurrencyType.Medal:
			switch (id)
			{

Chara

public override void Tick()

cs
			{
				Say("abMistOfDarkness_step", this);
			}
			AddCondition<ConDark>(e.power); 
			break;
		}
	}

public bool UseAbility(Act a, Card tc = null, Point pos = null, bool pt = false)

cs
	if (flag2 && !a.source.tag.Contains("keepInvisi") && EClass.rnd(2) == 0)
	{
		RemoveCondition<ConInvisibility>();
		RemoveCondition<ConDark>(); 
	}
	return flag2;
	void ForeachEnemy(Action<Chara> action)

public void TryTakeSharedItems(IEnumerable<Thing> containers, bool msg = true, b

cs
		return;
	}
	int num = 2;
	int num2 = 2; 
	bool flag = GetInt(113) == 0; 
	int num2 = 1; 
	int num3 = 2;
	bool flag = GetInt(113) == 0; 
	int num4 = 2;
	int num5 = 2;
	int num6 = 2; 
	if (homeBranch != null && homeBranch.HasItemProtection && !IsPCParty)
	{
		num4 = 0; 
		num5 = 0;
		num6 = 0; 
	}
	foreach (Thing thing3 in things)
	{
		if (CanEat(thing3, shouldEat))
		{
			num -= thing3.Num; 
			if (thing3.HasElement(757)) 
			{ 
				num2 -= thing3.Num; 
			} 
			else
			{ 
				num -= thing3.Num; 
			} 
		}
		if (thing3.trait.GetHealAction(this) != null)
		{
			num2 -= thing3.Num; 
			num3 -= thing3.Num; 
		}
		if (thing3.id == "polish_powder")
		{
			num3 -= thing3.Num; 
			num4 -= thing3.Num; 
		}
		if (thing3.trait is TraitBlanketColdproof)
		{
			num4 -= thing3.Num; 
			num5 -= thing3.Num; 
		}
		if (thing3.trait is TraitBlanketFireproof)
		{
			num5 -= thing3.Num; 
			num6 -= thing3.Num; 
		}
	}
	_ListItems.Clear();

public void TryTakeSharedItems(IEnumerable<Thing> containers, bool msg = true, b

cs
		{
			if (!thing4.c_isImportant && thing4.IsIdentified)
			{
				if (num3 > 0 && thing4.id == "polish_powder") 
				if (num4 > 0 && thing4.id == "polish_powder") 
				{
					_ListItems.Add(thing4);
					num3 -= thing4.Num; 
					num4 -= thing4.Num; 
				}
				else if (num4 > 0 && !HasElement(1236) && thing4.trait is TraitBlanketColdproof) 
				else if (num5 > 0 && !HasElement(1236) && thing4.trait is TraitBlanketColdproof) 
				{
					_ListItems.Add(thing4);
					num4 -= thing4.Num; 
					num5 -= thing4.Num; 
				}
				else if (num5 > 0 && thing4.trait is TraitBlanketFireproof) 
				else if (num6 > 0 && thing4.trait is TraitBlanketFireproof) 
				{
					_ListItems.Add(thing4);
					num5 -= thing4.Num; 
					num6 -= thing4.Num; 
				} 
				else if (num2 > 0 && CanEat(thing4, shouldEat) && !thing4.c_isImportant && thing4.HasElement(757)) 
				{ 
					_ListItems.Add(thing4); 
					num2 -= thing4.Num; 
				}
				else if (num > 0 && CanEat(thing4, shouldEat) && !thing4.c_isImportant)
				{
					_ListItems.Add(thing4);
					num -= thing4.Num;
				}
				else if (num2 > 0 && thing4.trait.GetHealAction(this) != null) 
				else if (num3 > 0 && thing4.trait.GetHealAction(this) != null) 
				{
					_ListItems.Add(thing4);
					num2 -= thing4.Num; 
					num3 -= thing4.Num; 
				}
				else if (flag && thing4.IsEquipmentOrRanged && !thing4.HasTag(CTAG.gift) && ShouldEquip(thing4, useFav: true))
				{

public void TryTakeSharedItems(IEnumerable<Thing> containers, bool msg = true, b

cs
			break;
		}
		Thing thing2 = listItem2.parent as Thing;
		if (thing.Num > 2) 
		if (thing.HasElement(757)) 
		{ 
			if (thing.Num > 1) 
			{ 
				thing = thing.Split(1); 
			} 
		} 
		else if (thing.Num > 2) 
		{
			thing = thing.Split(2);
		}

public Thing FindBestFoodToEat()

cs
	foreach (Thing item in things.List((Thing t) => CanEat(t, shouldEat: true) && !t.c_isImportant, onlyAccessible: true))
	{
		int num2 = CountNumEaten(item);
		int num3 = 100 - num2; 
		int num3 = 100 - num2 + (item.HasElement(757) ? 10 : 0); 
		if (num3 > num)
		{
			result = item;

public bool CanAcceptGift(Chara c, Card t)

cs
	{
		return true;
	}
	if (t.trait is TraitBookSecret) 
	if (t.trait is TraitBookExp) 
	{
		return true;
	}

public Condition AddCondition(Condition c, bool force = false)

cs
			return null;
		}
	}
	int num2 = c.EvaluateTurn(c.power); 
	if (num2 == 0) 
	{ 
		return null; 
	} 
	for (int j = 0; j < conditions.Count; j++)
	{
		if (conditions[j].id != c.id)

public Condition AddCondition(Condition c, bool force = false)

cs
		{
			if (conditions[j].WillOverride)
			{
				conditions[j].Kill(silent: true); 
				continue; 
				if (num2 > conditions[j].value) 
				{ 
					conditions[j].Kill(silent: true); 
					continue; 
				} 
				return null; 
			}
			if (CanGainConResist)
			{

public Condition AddCondition(Condition c, bool force = false)

cs
			return null;
		}
	}
	int num2 = c.EvaluateTurn(c.power); 
	if (num2 == 0) 
	{ 
		return null; 
	} 
	c.value = num2;
	conditions.Add(c);
	if (CanGainConResist)

public void SetFeat(int id, int value = 1, bool msg = false)

cs
		num = feat.Value;
		feat.Apply(-feat.Value, elements);
	}
	if (value > 0) 
	feat = elements.SetBase(id, value - (feat?.vSource ?? 0)) as Feat; 
	if (feat.Value != 0) 
	{
		feat = elements.SetBase(id, value - (feat?.vSource ?? 0)) as Feat; 
		feat.Apply(feat.Value, elements);
	}
	else
	{ 
		elements.Remove(id); 
	} 
	if (EClass.core.IsGameStarted)
	{
		Refresh();

+ConDark

File Created
cs
public class ConDark : Condition
{
	public override bool ShouldRefresh => true;

	public override int GetPhase()
	{
		return 0;
	}
}

DNA

public void Generate(Type _type, Chara model = null)

cs
	cost = 0;
	slot = 0;
	vals.Clear();
	Debug.Log(seed); 
	Rand.SetSeed(seed);
	if (model == null)
	{

FEAT

public List<string> Apply(int a, ElementContainer owner, bool hint = false)

cs
		ModBase(956, a * 10, hide: false);
		ModBase(950, a * -5, hide: false);
		ModBase(960, a * -5, hide: false);
		ModBase(423, a, hide: false); 
		break;
	case 1290:
		ModBase(418, a * 100, hide: false);

Player

public void CreateEquip()

cs
	if (c.race.id == "vampire")
	{
		c.AddCard(ThingGen.CreateRecipe("bloodpack"));
		c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8800), 4)); 
		if (EClass.debug.enable)
		{
			c.AddCard(ThingGen.Create("mixer"));

Thing

public override void WriteNote(UINote n, Action<UINote> onWriteNote = null, IIns

cs
	{
		AddText("isAcidproof", FontColor.Default);
	}
	if (trait.Electricity > 0) 
	if (trait.OriginalElectricity > 0) 
	{
		AddText("isGenerateElectricity".lang(trait.Electricity.ToString() ?? ""), FontColor.Default); 
		AddText("isGenerateElectricity".lang(trait.OriginalElectricity.ToString() ?? ""), FontColor.Default); 
	}
	if (trait.Electricity < 0) 
	if (trait.OriginalElectricity < 0) 
	{
		AddText("isConsumeElectricity".lang(Mathf.Abs(trait.Electricity).ToString() ?? ""), FontColor.Default); 
		AddText("isConsumeElectricity".lang(Mathf.Abs(trait.OriginalElectricity).ToString() ?? ""), FontColor.Default); 
	}
	if (base.IsUnique)
	{

public override void SetRenderParam(RenderParam p)

cs
		}
		if (source.anime.Length > 2)
		{
			float num = time * 1000f / (float)source.anime[1] % (float)source.anime[2]; 
			if ((int)num == source.anime[0] - 1 && source.anime.Length > 3) 
			int num = (int)(time * 1000f / (float)source.anime[1] % (float)source.anime[2]); 
			if (num == source.anime[0] - 1 && source.anime.Length > 3) 
			{
				PlaySound("anime_sound" + source.anime[3]);
			}
			if (!(num >= (float)source.anime[0])) 
			if (num < source.anime[0]) 
			{
				p.tile += num * (float)((!(p.tile < 0f)) ? 1 : (-1)); 
				p.tile += num * ((!(p.tile < 0f)) ? 1 : (-1)); 
			}
		}
		else
		{
			float num2 = time * 1000f / (float)source.anime[1] % (float)source.anime[0]; 
			p.tile += num2 * (float)((!(p.tile < 0f)) ? 1 : (-1)); 
			int num2 = (int)(time * 1000f / (float)source.anime[1] % (float)source.anime[0]); 
			p.tile += num2 * ((!(p.tile < 0f)) ? 1 : (-1)); 
		}
		break;
	}

public void ShowSplitMenu(ButtonGrid button, InvOwner.Transaction trans = null)

cs
	}
	i.onDestroy = delegate
	{
		if (!buy && !i.wasCanceled) 
		if ((!buy || Input.GetKeyDown(KeyCode.Return) || Input.GetKeyDown(KeyCode.KeypadEnter)) && !i.wasCanceled) 
		{
			Process();
		}

void UpdateButton()

cs
public void ShowSplitMenu2(ButtonGrid button, string lang, Action<int> onSplit = null)
{
	int count = 1;
	UIContextMenu uIContextMenu = EClass.ui.CreateContextMenuInteraction(); 
	UIContextMenu i = EClass.ui.CreateContextMenuInteraction(); 
	UIButton buttonBuy = null;
	UIItem itemSlider = null;
	itemSlider = uIContextMenu.AddSlider("sliderSplitMenu", "adjustmentNum", (float a) => (!EClass.core.IsGameStarted) ? "" : ("/" + base.Num), count, delegate(float b) 
	itemSlider = i.AddSlider("sliderSplitMenu", "adjustmentNum", (float a) => (!EClass.core.IsGameStarted) ? "" : ("/" + base.Num), count, delegate(float b) 
	{
		count = (int)b;
		UpdateButton();
	}, 1f, base.Num, isInt: true, hideOther: false, useInput: true).GetComponent<UIItem>();
	buttonBuy = uIContextMenu.AddButton("invBuy", delegate
	buttonBuy = i.AddButton("invBuy", delegate 
	{
		Process();
	});
	uIContextMenu.onDestroy = delegate
	i.onDestroy = delegate 
	{
		if ((Input.GetKeyDown(KeyCode.Return) || Input.GetKeyDown(KeyCode.KeypadEnter)) && !i.wasCanceled) 
		{ 
			Process(); 
		} 
	};
	uIContextMenu.Show(); 
	i.Show(); 
	if ((bool)buttonBuy)
	{
		buttonBuy.gameObject.AddComponent<CanvasGroup>();

Trait

public virtual bool ShouldRefreshTile

cs

	public virtual int GuidePriotiy => 0;

	public virtual int Electricity 
	public virtual int OriginalElectricity 
	{
		get
		{

public virtual int Electricity

cs
		}
	}

	public virtual int Electricity => OriginalElectricity; 
	public virtual bool IgnoreLastStackHeight => false;

	public virtual int Decay => owner.material.decay;

public void OnBarter(bool reroll = false)

cs
		NoRestock(ThingGen.Create("lucky_coin").SetNum(10));
		NoRestock(ThingGen.CreateSkillbook(6662));
		NoRestock(ThingGen.CreateSkillbook(6664));
		Add("book_exp", 10, 0); 
		break;
	case ShopType.Copy:
	{

public void OnBarter(bool reroll = false)

cs
				break;
			case ShopType.Moyer:
			{
				for (int num12 = 1; num12 <= 13; num12++) 
				for (int num12 = 1; num12 <= 14; num12++) 
				{
					AddAdvWeek(num12);
				}

+TraitBookExp

File Created
cs
public class TraitBookExp : TraitScroll
{
	public override bool CanRead(Chara c)
	{
		return !c.isBlind;
	}

	public override int GetActDuration(Chara c)
	{
		return 5;
	}

	public override void OnRead(Chara c)
	{
		EClass.player.forceTalk = true;
		c.Talk((EClass.rnd(2) == 0) ? "nice_statue" : "disgust");
		c.AddExp(c.ExpToNext / ((!c.IsPC) ? 1 : 4));
		c.PlaySound("ding_potential");
		c.Say("spellbookCrumble", owner.Duplicate(1));
		owner.ModNum(-1);
	}
}

TraitBookSecret

public class TraitBookSecret : TraitScroll

cs
public class TraitBookSecret : TraitScroll
public class TraitBookSecret : TraitBookExp
{
	public override bool CanRead(Chara c) 
	{ 
		return !c.isBlind; 
	} 
	public override int GetActDuration(Chara c) 
	{ 
		return 5; 
	} 
	public override void OnRead(Chara c)
	{
		if (c.IsPC && EClass.player.stats.kumi >= 5)

public override void OnRead(Chara c)

cs
	}
	c.Say("book_secret", c);
	c.Say("dingExp", c);
	c.feat += (c.IsPC ? 1 : 3); 
	c.feat += (c.IsPC ? 1 : 4); 
	if (c.IsPC)
	{
		EClass.player.stats.kumi++;

TraitMagicChest

public class TraitMagicChest : TraitContainer

cs
public class TraitMagicChest : TraitContainer
{
	public override int Electricity => base.Electricity + ((IsFridge ? 50 : 0) + owner.c_containerUpgrade.cap / 5) * -1; 
	public override int OriginalElectricity => base.OriginalElectricity + ((IsFridge ? 50 : 0) + owner.c_containerUpgrade.cap / 5) * -1; 

	public override bool IsHomeItem => true;