Skip to content

EA 23.262 Nightly Patch 1

January 19, 2026

18 files modified. 1 new file created.

Important Changes

None.

ACT

public virtual bool ShowMouseHint(Card c)

cs

	public virtual bool IsValidTC(Card c)
	{
		if (!c.isChara || c.Chara.mimicry != null) 
		if (!c.isChara || (c.Chara.mimicry != null && !c.IsPCParty)) 
		{
			return c.trait.CanBeAttacked;
		}

public bool CanPerform(Chara _cc, Card _tc = null, Point _tp = null)

cs
			}
		}
	}
	if (!(this is ActMelee) && tt.Range == TargetRange.Chara && (TC == null || !CC.CanSee(TC) || (TC.Chara?.mimicry != null && CC.IsPC && TC != EClass.pc))) 
	if (!(this is ActMelee) && tt.Range == TargetRange.Chara && (TC == null || !CC.CanSee(TC) || (TC.Chara?.mimicry != null && CC.IsPC && !TC.IsPCParty))) 
	{
		return false;
	}

ActEffect

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

cs
				j--;
				continue;
			}
			int num6 = -1; 
			long num6 = -1L; 
			n = actRef.n1;
			if (!(n == "shadow"))
			{

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

cs
					{
						num7 = (CC.IsPCFactionOrMinion ? (CC.LV / 2) : (CC.LV / 3 * 2));
					}
					num6 = chara.LV * (100 + power / 10) / 100 + power / 30; 
					if (num5 == -1) 
					{ 
						num6 = chara.LV * (100 + power / 10) / 100 + power / 30; 
					} 
					if (num6 < num7)
					{
						num6 = num7;
					}
					if (num6 > 99999999) 
					{ 
						num6 = 99999999L; 
					} 
				}
			}
			else

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

cs
			}
			if (chara.LV < num6)
			{
				chara.SetLv(num6); 
				chara.SetLv((int)num6); 
			}
			chara.interest = 0;
			if (chara.HaveFur())

ActMelee

void AttackWithFlurry(Card _tc, Point _tp, float mtp, bool subAttack)

cs
				{
					break;
				}
				if ((bool)LayerDrama.Instance) 
				{ 
					break; 
				} 
				if (m > 0)
				{
					Act.CC.Say(Act.CC.IsHostile() ? "attack_flurry_enemy" : "attack_flurry");

ActPlan

public void _Update(PointTarget target)

cs
				int num = c2.Dist(EClass.pc);
				if (num <= 1 || !EClass.pc.isBlind)
				{
					if (c2.mimicry != null) 
					if (c2.mimicry != null && !c2.IsPCParty) 
					{
						if (num <= 1)
						{

public void _Update(PointTarget target)

cs
			items.ForeachReverse(delegate(Card _c)
			{
				Chara c = _c.Chara;
				if (c != null && c.mimicry == null) 
				if (c != null && (c.mimicry == null || c.IsPCParty)) 
				{
					bool flag3 = EClass.pc.CanSee(c);
					if (flag3)

ActThrow

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

cs
	{
		Msg.Say("shatter");
	}
	if (Act.TC != null && Act.TC.isChara && Act.TC.Chara.mimicry != null) 
	if (Act.TC?.Chara?.mimicry != null) 
	{
		Act.TC.Chara.mimicry.RevealMimicry(c, surprise: false);
	}

AttackProcess

public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =

cs
		num2 += weapon.Evalue(91, ignoreGlobalElement: true);
		num3 += weapon.Evalue(603, ignoreGlobalElement: true);
	}
	if (CC.HasElement(1426)) 
	if (!IsRanged && !isThrow && CC.HasElement(1426)) 
	{
		list.Add(Element.Create(6650, 100));
	}

AttackSource

public enum AttackSource

cs
Hang,
Wrath,
ManaBackfire,
DeathSentense, 
DeathSentence, 
Euthanasia,
Shockwave,
MagicSword,

Chara

public override void Die(Element e = null, Card origin = null, AttackSource atta

cs
	}
	if (isInActiveZone)
	{
		if (attackSource == AttackSource.DeathSentense || attackSource == AttackSource.Euthanasia) 
		if (attackSource == AttackSource.DeathSentence || attackSource == AttackSource.Euthanasia) 
		{
			Msg.Say("goto_heaven", this);
		}

public void TryPutSharedItems(IEnumerable<Thing> containers, bool msg = true)

cs
	Thing bestRangedWeapon = GetBestRangedWeapon();
	foreach (Thing thing in things)
	{
		if (!thing.IsAmmo) 
		if (!thing.IsAmmo && !thing.c_isImportant) 
		{
			if (thing.category.slot != 0 && !thing.isEquipped && !thing.HasTag(CTAG.gift))
			{

public bool ShouldThrowAway(Thing t, ClearInventoryType type)

cs
			return false;
		}
	}
	if (t.isEquipped || t.rarity >= Rarity.Legendary || !t.trait.CanBeDestroyed) 
	if (t.isEquipped || t.rarity >= Rarity.Legendary || !t.trait.CanBeDestroyed || t.c_isImportant) 
	{
		return false;
	}

public bool TryNeckHunt(Chara TC, int power, bool harvest = false)

cs
	{
		return false;
	}
	if (TC.hp > (long)TC.MaxHP * (long)(Mathf.Min(5 + (int)Mathf.Sqrt(power), harvest ? 35 : 25) + Evalue(1426) * 5) / 100) 
	if (TC.hp > (long)TC.MaxHP * (long)(Mathf.Min(5 + (int)Mathf.Sqrt(power), harvest ? 30 : 20) + Evalue(1426) * 5) / (TC.IsPowerful ? 250 : 100)) 
	{
		return false;
	}

ConDeathSentense

public override void Tick()

cs
		owner.Say("death_sentense", owner);
		if (!euthanasia && owner.IsPowerful)
		{
			owner.DamageHP(owner.MaxHP / (EClass.debug.enable ? 1 : 13) + 1, AttackSource.DeathSentense); 
			owner.DamageHP(owner.MaxHP / (EClass.debug.enable ? 1 : 13) + 1, AttackSource.DeathSentence); 
		}
		else
		{
			owner.Die(null, null, euthanasia ? AttackSource.Euthanasia : AttackSource.DeathSentense); 
			owner.Die(null, null, euthanasia ? AttackSource.Euthanasia : AttackSource.DeathSentence); 
		}
	}
}

ConditionType

public enum ConditionType

cs
	Wrath,
	Buff,
	Stance,
	Sentense 
	Sentence 
}

ContentGallery

public class Page : UIBook.Page

cs
		public class Item
		{
			public int id;
			public Sprite sprite; 
		}

		public List<string> ids = new List<string>();

public override void BuildNote(UINote n, string idTopic)

cs
		foreach (string id in ids)
		{
			UIItem uIItem = n.AddItem("ItemGallery");
			int num = id.ToInt(); 
			Sprite sprite = Resources.Load<Sprite>("Media/Gallery/" + CoreRef.GetArtDir(num) + "/" + EClass.core.refs.dictSketches[num]); 
			int idx = id.ToInt(); 
			string path = EClass.core.refs.dictSketches2[idx]; 
			Sprite sprite = sprites.TryGetValue(idx); 
			if (!sprite) 
			{ 
				Texture2D texture2D = IO.LoadPNG(path + "_t"); 
				sprite = Sprite.Create(texture2D, new Rect(0f, 0f, texture2D.width, texture2D.height), new Vector2(0.5f, 0.5f)); 
				sprites[idx] = sprite; 
			} 
			uIItem.image1.sprite = sprite;
			uIItem.text1.text = "#" + id;
			uIItem.button1.SetOnClick(delegate
			{
				SE.Play("click_recipe");
				EClass.ui.AddLayer<LayerImage>().SetImage(sprite); 
				Sprite sprite2 = spritesFull.TryGetValue(idx); 
				if (!sprite2) 
				{ 
					Texture2D texture2D2 = IO.LoadPNG(path); 
					sprite2 = Sprite.Create(texture2D2, new Rect(0f, 0f, texture2D2.width, texture2D2.height), new Vector2(0.5f, 0.5f)); 
					spritesFull[idx] = sprite2; 
				} 
				EClass.ui.AddLayer<LayerImage>().SetImage(sprite2); 
			});
		}
	}

public override void BuildNote(UINote n, string idTopic)

cs

	public static bool listMode;

	public static Dictionary<int, Sprite> sprites = new Dictionary<int, Sprite>(); 
	public static Dictionary<int, Sprite> spritesFull = new Dictionary<int, Sprite>(); 
	public Transform transBig;

	public Image imageBig;

public override void OnSwitchContent(int idTab)

cs
	if (EClass.debug.allArt)
	{
		EClass.player.sketches.Clear();
		foreach (int key in EClass.core.refs.dictSketches.Keys) 
		foreach (int key in EClass.core.refs.dictSketches2.Keys) 
		{
			EClass.player.sketches.Add(key);
		}

public void Refresh()

cs
		}
		book.currentPage = lastPage;
		book.Show();
		textCollected.SetText("sketch_collected".lang((list.Count * 100 / EClass.core.refs.dictSketches.Count()).ToString() ?? "")); 
		textCollected.SetText("sketch_collected".lang((list.Count * 100 / EClass.core.refs.dictSketches2.Count()).ToString() ?? "")); 
	}

	public void OnClickHelp()

public void ToggleMode()

cs
	private void OnDestroy()
	{
		lastPage = book.currentPage;
		foreach (Sprite item in sprites.Values.Concat(spritesFull.Values)) 
		{ 
			Object.Destroy(item.texture); 
			Object.Destroy(item); 
		} 
		sprites.Clear(); 
		spritesFull.Clear(); 
	}
}

CoreRef

public class PrefData

cs

	public UD_Int_String dictSketches;

	public UD_Int_String dictSketches2; 
	public PrefData prefs;

	public float testColor;

public void RebuildBGMList()

cs

	public void RebuildSketchList()
	{
		dictSketches.Clear(); 
		for (int i = 0; i < 10; i++) 
		{ 
			Sprite[] array = Resources.LoadAll<Sprite>("Media/Gallery/" + GetArtDir(i * 100)); 
			foreach (Sprite sprite in array) 
			{ 
				int key = sprite.name.Split('_')[0].ToInt(); 
				dictSketches[key] = sprite.name; 
				Debug.Log(key + " " + sprite.name); 
			} 
		} 
		Debug.Log("Sketches rebuilt:" + dictSketches.Count()); 
		dictSketches2 = GalleryFlattenAndRename.Run(); 
	}

	public static string GetArtDir(int a)

DramaOutcome

public bool check_sketch()

cs
	{
		for (int j = 0; j < 5; j++)
		{
			int item = EMono.core.refs.dictSketches.Keys.RandomItem(); 
			int item = EMono.core.refs.dictSketches2.Keys.RandomItem(); 
			if (!EMono.player.sketches.Contains(item))
			{
				EMono.player.sketches.Add(item);

public void give_sketch_reward()

cs

	public void give_sketch_special()
	{
		foreach (int key in EMono.core.refs.dictSketches.Keys) 
		foreach (int key in EMono.core.refs.dictSketches2.Keys) 
		{
			if (key >= 500 && key < 700)
			{

+GalleryFlattenAndRename

File Created
cs
using System.IO;
using System.Linq;
using UnityEngine;

public static class GalleryFlattenAndRename
{
	public static string root = CorePath.CorePackage.ETC + "/Gallery";

	public static UD_Int_String dict;

	public const int ThumbMaxW = 360;

	public const int ThumbMaxH = 240;

	public static UD_Int_String Run()
	{
		dict = new UD_Int_String();
		int num = MoveAllFilesUnderSubfoldersToRoot(root);
		string[] array = Directory.GetDirectories(root, "*", SearchOption.AllDirectories).ToArray();
		for (int i = 0; i < array.Length; i++)
		{
			Directory.Delete(array[i], recursive: true);
		}
		array = Directory.GetFiles(root, "*", SearchOption.TopDirectoryOnly);
		foreach (string text in array)
		{
			if (text.EndsWith("meta"))
			{
				File.Delete(text);
			}
		}
		RenameAllFilesToLeadingNumber(root);
		array = Directory.GetFiles(root, "*", SearchOption.TopDirectoryOnly);
		foreach (string text2 in array)
		{
			if (text2.EndsWith("meta"))
			{
				File.Delete(text2);
			}
		}
		CreateThumbnailsSameFolder(root, 360, 240);
		Debug.Log("[Gallery] Done. Total:" + num + "/" + dict.Count);
		return dict;
	}

	private static int MoveAllFilesUnderSubfoldersToRoot(string root)
	{
		string[] directories = Directory.GetDirectories(root, "*", SearchOption.AllDirectories);
		int num = 0;
		string[] array = directories;
		for (int i = 0; i < array.Length; i++)
		{
			string[] files = Directory.GetFiles(array[i], "*", SearchOption.TopDirectoryOnly);
			foreach (string text in files)
			{
				string text2 = Path.Combine(root, Path.GetFileName(text));
				File.Move(text, text2);
				if (!text2.EndsWith("meta"))
				{
					num++;
				}
			}
		}
		return num;
	}

	private static void RenameAllFilesToLeadingNumber(string root)
	{
		string[] files = Directory.GetFiles(root, "*", SearchOption.TopDirectoryOnly);
		foreach (string obj in files)
		{
			string extension = Path.GetExtension(obj);
			string text = Path.GetFileNameWithoutExtension(obj).Split('_')[0];
			string text2 = Path.Combine(root, text + extension);
			File.Move(obj, text2);
			dict[text.ToInt()] = text2;
		}
	}

	private static void CreateThumbnailsSameFolder(string root, int maxW, int maxH)
	{
		string[] files = Directory.GetFiles(root, "*", SearchOption.TopDirectoryOnly);
		foreach (string text in files)
		{
			if (text.EndsWith(".meta"))
			{
				continue;
			}
			string text2 = Path.GetExtension(text).ToLowerInvariant();
			if (!IsImageExt(text2) || Path.GetFileName(text).Contains(text2 + "_t"))
			{
				continue;
			}
			byte[] data = File.ReadAllBytes(text);
			Texture2D texture2D = new Texture2D(2, 2, TextureFormat.RGBA32, mipChain: false, linear: false);
			if (!texture2D.LoadImage(data))
			{
				Object.DestroyImmediate(texture2D);
				continue;
			}
			int width = texture2D.width;
			int height = texture2D.height;
			float num = Mathf.Min((float)maxW / (float)width, (float)maxH / (float)height);
			if (num > 1f)
			{
				num = 1f;
			}
			int w = Mathf.Max(1, Mathf.RoundToInt((float)width * num));
			int h = Mathf.Max(1, Mathf.RoundToInt((float)height * num));
			Texture2D texture2D2 = ResizeTo(texture2D, w, h);
			string path = text + "_t";
			byte[] bytes = ((!(text2 == ".png")) ? texture2D2.EncodeToJPG(90) : texture2D2.EncodeToPNG());
			File.WriteAllBytes(path, bytes);
			Object.DestroyImmediate(texture2D);
			Object.DestroyImmediate(texture2D2);
		}
	}

	private static bool IsImageExt(string ext)
	{
		if (!(ext == ".png") && !(ext == ".jpg"))
		{
			return ext == ".jpeg";
		}
		return true;
	}

	private static Texture2D ResizeTo(Texture2D src, int w, int h)
	{
		RenderTexture temporary = RenderTexture.GetTemporary(w, h, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.sRGB);
		RenderTexture active = RenderTexture.active;
		Graphics.Blit(src, temporary);
		RenderTexture.active = temporary;
		Texture2D texture2D = new Texture2D(w, h, TextureFormat.RGBA32, mipChain: false, linear: false);
		texture2D.ReadPixels(new Rect(0f, 0f, w, h), 0, 0);
		texture2D.Apply(updateMipmaps: false, makeNoLongerReadable: false);
		RenderTexture.active = active;
		RenderTexture.ReleaseTemporary(temporary);
		return texture2D;
	}
}

HotItemHeld

public bool TrySetToolAct(ActPlan p)

cs
		Card tc = null;
		foreach (Chara item in pos.ListVisibleCharas())
		{
			if (item.isSynced && item.IsAliveInCurrentZone && item.mimicry == null) 
			if (item.isSynced && item.IsAliveInCurrentZone && (item.mimicry == null || item.IsPCParty)) 
			{
				tc = item;
				break;

HotItemNoItem

public static bool _TrySetAct(ActPlan p)

cs
	Card tg = null;
	p.pos.ListVisibleCards().ForeachReverse(delegate(Card a)
	{
		if (a.isChara && a.Chara.mimicry != null && !a.IsPC) 
		if (a.isChara && a.Chara.mimicry != null && !a.IsPCParty) 
		{
			tg = a;
			return true;

public static bool _TrySetAct(ActPlan p)

cs
		{
			if (tg.ExistsOnMap)
			{
				if (tg.isChara && tg.Chara.mimicry != null) 
				if (tg.isChara && tg.Chara.mimicry != null && !tg.IsPCParty) 
				{
					tg.Chara.mimicry.RevealMimicry(EClass.pc, surprise: true);
					return true;

InvOwner

public bool Process(bool startTransaction = false)

cs
			destInv.owner.Chara.Talk("tooHeavy");
			return false;
		}
		if (thing2.c_isImportant && !destInv.owner.IsPC && destInv.DenyImportant) 
		if (thing2.c_isImportant && destInv != inv && !destInv.owner.IsPC && destInv.DenyImportant) 
		{
			Msg.Say("markedImportant");
			return false;

public ListInteraction ListInteractions(ButtonGrid b, bool context)

cs
	}
	if (context)
	{
		bool flag4 = false; 
		if (AllowHold(t) && !Container.isNPCProperty)
		{
			if (t.Num > 1)

public ListInteraction ListInteractions(ButtonGrid b, bool context)

cs
					t.ShowSplitMenu(b, (HasTrader && currency != 0 && !owner.IsPC) ? new Transaction(b) : null);
				});
			}
			if (owner.IsPC) 
			if ((owner.IsPC || Container.IsPCFactionOrMinion) && AllowDrop(t)) 
			{
				flag4 = true; 
				listInteraction.Add(t.c_isImportant ? "important_off" : "important_on", 299, delegate
				listInteraction.Add(flag ? "dragForget" : "actDrop", 300, delegate 
				{
					t.c_isImportant = !t.c_isImportant; 
					LayerInventory.SetDirty(t); 
					SE.ClickOk(); 
					EClass.pc.DropThing(t); 
				});
				if (AllowDrop(t)) 
				{ 
					listInteraction.Add(flag ? "dragForget" : "actDrop", 300, delegate
					{ 
						EClass.pc.DropThing(t); 
					}); 
				} 
			}
		}
		bool flag4 = false; 
		if (owner.IsPC || Container.IsPCFactionOrMinion) 
		{ 
			flag4 = true; 
			listInteraction.Add(t.c_isImportant ? "important_off" : "important_on", 299, delegate
			{ 
				t.c_isImportant = !t.c_isImportant; 
				LayerInventory.SetDirty(t); 
				SE.ClickOk(); 
			}); 
		} 
		if (!flag4 && t.c_isImportant)
		{
			listInteraction.Add(t.c_isImportant ? "important_off" : "important_on", 299, delegate

Trait

public void OnBarter(bool reroll = false)

cs
				Add("433", 1, 0);
				Add("714", 1, 0);
				Add("1017", 1, 0);
				Add("1313", 1, 0); 
				Add("1155", 1, 0);
				Add("1287", 1, 0);
				Add("1288", 1, 0);

WidgetSideScreen

public override void OnSetContextMenu(UIContextMenu m)

cs
		extra.width = (int)a;
		OnChangeResolution();
	}, 10f, 50f, isInt: true);
	uIContextMenu.AddSlider("image", (float a) => a.ToString() ?? "", extra.idImage, delegate(float a) 
	{ 
		extra.idImage = (int)a; 
		OnChangeResolution(); 
	}, 0f, sprites.Length - 1, isInt: true); 
	uIContextMenu.AddButton("colorBG", delegate
	{
		EMono.ui.AddLayer<LayerColorPicker>().SetColor(bgColor, Color.white, delegate(PickerState state, Color _c)

public override void OnChangeResolution()

cs
	base.OnChangeResolution();
	RectTransform rectTransform = this.Rect();
	float x = 0.01f * (float)Screen.width * (float)extra.width / EMono.core.uiScale + 50f;
	float num = (float)Screen.height / EMono.core.uiScale + 50f; 
	rectTransform.sizeDelta = new Vector2(x, num); 
	float y = (float)Screen.height / EMono.core.uiScale + 50f; 
	rectTransform.sizeDelta = new Vector2(x, y); 
	if (extra.reverse)
	{
		rectTransform.SetAnchor(0f, 0.5f, 0f, 0.5f);

public override void OnChangeResolution()

cs
		rectTransform.anchoredPosition = new Vector2(rectTransform.sizeDelta.x * -0.5f, 0f);
	}
	Refresh();
	imagePic.SetActive(extra.idImage > 0); 
	Sprite sprite = sprites[extra.idImage]; 
	if ((bool)sprite) 
	{ 
		imagePic.sprite = sprite; 
		imagePic.rectTransform.sizeDelta = new Vector2(num * (float)sprite.texture.width / (float)sprite.texture.height, num); 
		imagePic.color = bgColor; 
	} 
	imagePic.SetActive(enable: false); 
	if (extra.alignUI)
	{
		if (extra.reverse)