Skip to content

EA 23.85 Nightly

February 4, 2025

14 files modified.

Important Changes

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

Map (2)

cs
public void SetObj(int x, int z, int idMat, int idObj, int value, int dir) 
public void SetObj(int x, int z, int idMat, int idObj, int value, int dir, bool ignoreRandomMat = false) 
cs
public void MineBlock(Point point, bool recoverBlock = false, Chara c = null) 
public void MineBlock(Point point, bool recoverBlock = false, Chara c = null, bool mineObj = true) 

Card

@@ -3540,7 +3540,6 @@ public virtual void HealHP(int a, HealSource origin = HealSource.None)

cs
	{
		hp = MaxHP;
	}
	Debug.Log(origin); 
	switch (origin)
	{
	case HealSource.Magic:

Chara

@@ -7363,7 +7363,7 @@ public void GiveGift(Chara c, Thing t)

cs
		Msg.Say("affinityNone", c, this);
		return;
	}
	if (!t.isCopy && t.IsCursed && t.IsEquipmentOrRanged && c.HasElement(1414)) 
	if (!t.isCopy && t.IsCursed && t.IsEquipmentOrRanged && !t.IsAmmo && c.HasElement(1414)) 
	{
		bool num = t.blessedState == BlessedState.Doomed;
		int num2 = 200 + t.LV * 3;

CoreDebug

@@ -905,6 +905,7 @@ public void UpdateInput()

cs
	}
	if (Input.GetKeyDown(KeyCode.F2))
	{
		EClass.pc.body.GetSlot(45, onlyEmpty: false).thing.SetEncLv(EScriptable.rnd(100) - 50); 
		Chara targetChara = EClass.scene.mouseTarget.TargetChara;
		if (targetChara != null)
		{

ElementContainer

@@ -639,7 +639,7 @@ public List<Element> ListLearnable(Chara c)

cs

	public List<Element> ListRune()
	{
		return ListElements((Element a) => !a.source.encSlot.IsEmpty()); 
		return ListElements((Element a) => !a.source.encSlot.IsEmpty() && a.vBase + a.vSource != 0); 
	}

	public void CopyTo(ElementContainer container)

InvOwnerChangeMaterial

@@ -21,7 +21,7 @@ public override bool ShouldShowGuide(Thing t)

cs
	{
		return true;
	}
	if (!t.category.IsChildOf("currency") && !t.IsUnique && t.trait.CanBeDropped && !t.source.fixedMaterial && !(t.trait is TraitCatalyst) && !(t.trait is TraitTile) && !(t.trait is TraitMaterialHammer)) 
	if (!t.category.IsChildOf("currency") && !t.IsUnique && !t.isRuneAdded && t.trait.CanBeDropped && !t.source.fixedMaterial && !(t.trait is TraitCatalyst) && !(t.trait is TraitTile) && !(t.trait is TraitMaterialHammer)) 
	{
		return !(t.trait is TraitSeed);
	}

InvOwnerMod

@@ -6,7 +6,24 @@ public class InvOwnerMod : InvOwnerDraglet

cs

	public static bool IsValidRuneMod(Thing t, SourceElement.Row row, string idMat)
	{
		if (t.category.slot != 0 && !t.isRuneAdded && !t.HasElement(row.id)) 
		if (row.category == "resist") 
		{ 
			foreach (Element item in t.elements.ListElements()) 
			{ 
				if (item.source.category == "resist") 
				{ 
					return false; 
				} 
			} 
		} 
		foreach (int key in t.material.elementMap.Keys) 
		{ 
			if (key == row.id) 
			{ 
				return false; 
			} 
		} 
		if (t.category.slot != 0 && !t.isRuneAdded) 
		{
			return !t.IsUnique;
		}

@@ -67,8 +84,9 @@ public override void _OnProcess(Thing t)

cs
	{
		SE.Play("intonation");
		EClass.pc.PlayEffect("intonation");
		t.elements.ModBase(owner.refVal, owner.encLV); 
		t.elements.SetBase(owner.refVal, owner.encLV); 
		t.isRuneAdded = true;
		owner.ModNum(-1); 
	}
	else
	{

Map

@@ -1506,7 +1506,7 @@ public void SetObj(int x, int z, int id = 0, int value = 1, int dir = 0)

cs
		SetObj(x, z, (byte)EClass.sources.objs.rows[id].DefaultMaterial.id, id, value, dir);
	}

	public void SetObj(int x, int z, int idMat, int idObj, int value, int dir) 
	public void SetObj(int x, int z, int idMat, int idObj, int value, int dir, bool ignoreRandomMat = false) 
	{
		Cell cell = cells[x, z];
		if (cell.sourceObj.id == 118 || idObj == 118)

@@ -1520,7 +1520,7 @@ public void SetObj(int x, int z, int idMat, int idObj, int value, int dir)

cs
	cell.isHarvested = false;
	cell.isObjDyed = false;
	SourceObj.Row sourceObj = cell.sourceObj;
	if (!sourceObj.matCategory.IsEmpty()) 
	if (!ignoreRandomMat && !sourceObj.matCategory.IsEmpty()) 
	{
		int num = EClass._zone.DangerLv;
		if (sourceObj.tag.Contains("spot"))

@@ -1630,7 +1630,7 @@ public void DropBlockComponent(Point point, TileRow r, SourceMaterial.Row mat, b

cs
		}
	}

	public void MineBlock(Point point, bool recoverBlock = false, Chara c = null) 
	public void MineBlock(Point point, bool recoverBlock = false, Chara c = null, bool mineObj = true) 
	{
		bool flag = ActionMode.Mine.IsRoofEditMode() && point.cell._roofBlock != 0;
		if (!point.IsValid || (!flag && !point.cell.HasBlock))

@@ -1658,7 +1658,7 @@ public void MineBlock(Point point, bool recoverBlock = false, Chara c = null)

cs
			RemoveLonelyRamps(point.cell);
		}
		point.SetBlock();
		if (flag2 && point.sourceObj.tileType.IsBlockMount) 
		if (flag2 && point.sourceObj.tileType.IsBlockMount && mineObj) 
		{
			MineObj(point, null, c);
		}

@@ -1806,7 +1806,6 @@ public void MineObj(Point point, Task task = null, Chara c = null)

cs
	}
	Cell cell = point.cell;
	SourceObj.Row sourceObj = cell.sourceObj;
	bool flag = false; 
	if (c == null && task != null)
	{
		c = task.owner;

@@ -1848,7 +1847,7 @@ public void MineObj(Point point, Task task = null, Chara c = null)

cs
		{
			if (cell.HasBlock && (sourceObj.id == 18 || sourceObj.id == 19))
			{
				MineBlock(point, recoverBlock: false, c); 
				MineBlock(point, recoverBlock: false, c, mineObj: false); 
			}
			switch (sourceObj.alias)
			{

@@ -1871,10 +1870,6 @@ public void MineObj(Point point, Task task = null, Chara c = null)

cs
	}
	SetObj(point.x, point.z);
	cell.gatherCount = 0;
	if (flag) 
	{ 
		RefreshFOV(point.x, point.z); 
	} 
	void Pop(Thing t)
	{
		if (EClass.scene.actionMode.IsBuildMode && EClass.debug.godBuild)

Recipe

@@ -672,7 +672,7 @@ public virtual void Build(Chara chara, Card t, Point pos, int mat, int dir, int

cs
		EClass._map.SetBridge(pos.x, pos.z, Mathf.Clamp(bridgeHeight + altitude, 0, 255), mat, tileRow.id, dir);
		break;
	case "Obj":
		EClass._map.SetObj(pos.x, pos.z, mat, tileRow.id, 1, dir); 
		EClass._map.SetObj(pos.x, pos.z, mat, tileRow.id, 1, dir, ignoreRandomMat: true); 
		if (tileType.ChangeBlockDir || pos.growth is GrowSystemTreeSingle)
		{
			EClass._map.SetBlockDir(pos.x, pos.z, dir);

RecipeCard

@@ -199,7 +199,7 @@ public override Thing Craft(BlessedState blessed, bool sound = false, List<Thing

cs
			break;
		}
	}
	bool num5 = EClass.sources.cards.map[key].tag.Contains("static_craft"); 
	bool flag3 = EClass.sources.cards.map[key].tag.Contains("static_craft"); 
	if (!isDish && num4 < 1)
	{
		num4 = 1;

@@ -212,7 +212,7 @@ public override Thing Craft(BlessedState blessed, bool sound = false, List<Thing

cs
	{
		num = -1;
	}
	if (num5) 
	if (flag3) 
	{
		num3 = 0;
		flag = false;

@@ -222,15 +222,25 @@ public override Thing Craft(BlessedState blessed, bool sound = false, List<Thing

cs
		qualityBonus = num3,
		rarity = (flag ? Rarity.Crude : Rarity.Normal)
	});
	Thing thing = (num5 ? ThingGen.Create(key) : ThingGen.Create(key, num, num4)); 
	Thing thing = (flag3 ? ThingGen.Create(key) : ThingGen.Create(key, num, num4)); 
	if (thing.trait.CraftNum > 1)
	{
		thing.SetNum(thing.trait.CraftNum);
	}
	thing.idSkin = idSkin;
	if (thing.IsEquipment && ings != null) 
	{ 
		foreach (Thing ing2 in ings) 
		{ 
			if (ing2.trait is TraitRune) 
			{ 
				thing.elements.ModBase(ing2.refVal, ing2.encLV); 
			} 
		} 
	} 
	thing.Identify(show: false);
	thing.isCrafted = true;
	if (!num5) 
	if (!flag3) 
	{
		if (base.source.colorIng != 0)
		{

@@ -243,7 +253,7 @@ public override Thing Craft(BlessedState blessed, bool sound = false, List<Thing

cs
		}
	}
	thing.SetBlessedState(blessed);
	if (!num5) 
	if (!flag3) 
	{
		if (isDish)
		{

Thing

@@ -1881,7 +1881,7 @@ public void DoAct(Act act)

cs

	public void TryLickEnchant(Chara c, bool msg = true, Chara tg = null, BodySlot slot = null)
	{
		if (!base.IsEquipmentOrRanged || base.IsCursed || base.rarity <= Rarity.Normal || GetInt(107) > 0) 
		if (!base.IsEquipmentOrRanged || base.IsCursed || base.rarity <= Rarity.Normal || GetInt(107) > 0 || base.isRuneAdded) 
		{
			return;
		}

TraitCrafter

@@ -319,13 +319,15 @@ public virtual Thing Craft(AI_UseCrafter ai)

cs
	case MixType.RuneMold:
	{
		Thing eq = ai.ings[0];
		List<Element> list2 = eq.elements.ListRune(); 
		Thing thing7 = eq.Duplicate(1); 
		thing7.SetEncLv(0); 
		List<Element> list2 = thing7.elements.ListRune(); 
		if (list2.Count == 0)
		{
			Msg.SayNothingHappen();
			break;
		}
		if (eq.material.hardness > owner.material.hardness) 
		if (eq.material.hardness > owner.material.hardness && !EClass.debug.enable) 
		{
			Msg.Say("rune_tooHard", owner);
			break;

@@ -334,19 +336,21 @@ public virtual Thing Craft(AI_UseCrafter ai)

cs
		{
			owner.ModNum(-1);
			eq.Destroy();
			Thing thing7 = ThingGen.Create("rune"); 
			thing7.refVal = a.id; 
			thing7.encLV = a.vBase + a.vSource; 
			EClass.pc.Pick(thing7); 
			Thing thing8 = ThingGen.Create("rune"); 
			thing8.refVal = a.id; 
			thing8.encLV = a.vBase + a.vSource; 
			EClass.pc.Pick(thing8); 
			EClass.pc.PlaySound("intonation");
			EClass.pc.PlayEffect("intonation");
		}, delegate(Element a, ItemGeneral b)
		{
			if (EClass.debug.showExtra) 
			b.SetSubText((a.vBase + a.vSource).ToString() ?? "", 200, FontColor.Default, TextAnchor.MiddleRight); 
			b.Build(); 
			if (a.HasTag("noRune")) 
			{
				b.SetSubText(a.vBase.ToString() + a.vSource, 200, FontColor.Default, TextAnchor.MiddleRight); 
				b.button1.interactable = false; 
				b.button1.mainText.gameObject.AddComponent<CanvasGroup>().alpha = 0.5f; 
			}
			b.Build(); 
		}).SetSize(500f)
			.SetOnKill(delegate
			{

TraitKettle

@@ -48,7 +48,7 @@ public override bool CanJoinParty

cs

	public override bool CanCopy(Thing t)
	{
		if (t.noSell || t.HasElement(1229)) 
		if (t.noSell || t.isRuneAdded || t.HasElement(1229)) 
		{
			return false;
		}

TraitMannequin

@@ -32,7 +32,7 @@ public override bool OnUse(Chara c)

cs
	List<Thing> list = new List<Thing>();
	foreach (BodySlot slot in EClass.pc.body.slots)
	{
		if (slot.elementId != 44 && slot.elementId != 45 && slot.thing != null && slot.thing.blessedState >= BlessedState.Normal) 
		if (slot.elementId != 44 && slot.thing != null && slot.thing.blessedState >= BlessedState.Normal) 
		{
			list.Add(slot.thing);
		}

TraitRuneMold

@@ -16,7 +16,7 @@ public class TraitRuneMold : TraitCrafter

cs

	public override bool IsIngredient(string cat, Card c)
	{
		if (c.rarity > MaxRarity) 
		if (c.rarity > MaxRarity || c.c_isImportant) 
		{
			return false;
		}