Skip to content

EA 23.45

December 1, 2024

14 files modified.

Breaking Changes

Click the file name to view the chunk.

CoreDebug (1)

cs
public static string TestSpawn(int lv, int num) 
public static string TestSpawn(int lv, int num, int lvRange = -1) 

EffectIRenderer (1)

cs
public EffectIRenderer Play(Card _card, Point from, Point to = null, float fixY = 0f) 
public EffectIRenderer Play(Card origin, Card _card, Point from, Point to = null, float fixY = 0f) 

ActThrow

@@ -138,7 +138,7 @@ public static EffectIRenderer Throw(Card c, Point p, Card target, Thing t, Throw

cs
	EffectIRenderer result = null;
	if (c.isSynced || p.IsSync)
	{
		result = Effect.Get<EffectIRenderer>((t.trait is TraitBall) ? "throw_ball" : "throw").Play(t, c.pos, p, 0.2f); 
		result = Effect.Get<EffectIRenderer>((t.trait is TraitBall) ? "throw_ball" : "throw").Play((c.isChara && c.Chara.host != null) ? c.Chara.host : c, t, c.pos, p, 0.2f); 
		t.renderer.SetFirst(false, c.renderer.position);
	}
	if (!t.HasElement(410, 1))

Chara

@@ -1213,7 +1213,10 @@ public override void OnCreate(int genLv)

cs
			select a).First<Tuple<string, int, int>>();
		}
		this.SetMainElement(tuple.Item1, (tuple.Item2 == 0) ? 10 : tuple.Item2, true);
		num = tuple.Item3; 
		if (list.Count >= 2) 
		{ 
			num = tuple.Item3; 
		} 
	}
	if (this.source.name == "*r")
	{

@@ -1257,28 +1260,28 @@ public override void OnCreate(int genLv)

cs
			{
				if (num3 != 2331752522U)
				{
					goto IL_633; 
					goto IL_63C; 
				}
				if (!(id == "snail"))
				{
					goto IL_633; 
					goto IL_63C; 
				}
				base.idSkin = 5;
				goto IL_633; 
				goto IL_63C; 
			}
			else
			{
				if (!(id == "dodo"))
				{
					goto IL_633; 
					goto IL_63C; 
				}
				base.idSkin = EClass.rnd(4);
				goto IL_633; 
				goto IL_63C; 
			}
		}
		else if (!(id == "cat"))
		{
			goto IL_633; 
			goto IL_63C; 
		}
	}
	else if (num3 <= 3253821027U)

@@ -1287,46 +1290,46 @@ public override void OnCreate(int genLv)

cs
		{
			if (num3 != 3253821027U)
			{
				goto IL_633; 
				goto IL_63C; 
			}
			if (!(id == "sister_undead"))
			{
				goto IL_633; 
				goto IL_63C; 
			}
		}
		else
		{
			if (!(id == "olderyoungersister"))
			{
				goto IL_633; 
				goto IL_63C; 
			}
			base.idSkin = 1;
			goto IL_633; 
			goto IL_63C; 
		}
	}
	else if (num3 != 3352919697U)
	{
		if (num3 != 3865623817U)
		{
			goto IL_633; 
			goto IL_63C; 
		}
		if (!(id == "dog"))
		{
			goto IL_633; 
			goto IL_63C; 
		}
	}
	else
	{
		if (!(id == "putty_snow"))
		{
			goto IL_633; 
			goto IL_63C; 
		}
		if (EClass.rnd(100) == 0 || EClass.debug.enable)
		{
			base.idSkin = EClass.rnd(4);
			goto IL_633; 
			goto IL_63C; 
		}
		goto IL_633; 
		goto IL_63C; 
	}
	base.idSkin = EClass.rnd(this.sourceCard.tiles.Length);
	if (this.id == "sister_undead" && EClass.rnd(10) == 0)

@@ -1337,7 +1340,7 @@ public override void OnCreate(int genLv)

cs
			base.ApplyBacker(row2.id);
		}
	}
	IL_633: 
	IL_63C: 
	if (this.source.tag.Contains("random_color"))
	{
		base.DyeRandom();

@@ -2447,15 +2450,23 @@ public override Card.MoveResult _Move(Point newPoint, Card.MoveType type = Card.

cs
		this.actTime = num;
	}
	Chara chara = (this.ride == null) ? this : this.ride;
	if ((!EClass._zone.IsRegion || chara.IsPC) && ((chara.isConfused && EClass.rnd(2) == 0) || (chara.isDrunk && EClass.rnd(this.IsIdle ? 2 : 8) == 0 && !chara.HasElement(1215, 1))) && newPoint.Distance(this.pos) <= 1) 
	if (!EClass._zone.IsRegion || chara.IsPC) 
	{
		Point randomNeighbor = this.pos.GetRandomNeighbor(); 
		if (this.CanMoveTo(randomNeighbor, false)) 
		bool flag = (chara.isConfused && EClass.rnd(2) == 0) || (chara.isDrunk && EClass.rnd(this.IsIdle ? 2 : 8) == 0 && !chara.HasElement(1215, 1)); 
		if (this.host != null && this.host.ride == this && ((this.host.isConfused && EClass.rnd(2) == 0) || (this.host.isDrunk && EClass.rnd(this.IsIdle ? 2 : 8) == 0 && !this.host.HasElement(1215, 1)))) 
		{
			newPoint = randomNeighbor; 
			if (this.isDrunk) 
			flag = true; 
		} 
		if (flag && newPoint.Distance(this.pos) <= 1) 
		{ 
			Point randomNeighbor = this.pos.GetRandomNeighbor(); 
			if (this.CanMoveTo(randomNeighbor, false)) 
			{
				base.Talk("drunk", null, null, false); 
				newPoint = randomNeighbor; 
				if (this.isDrunk) 
				{ 
					base.Talk("drunk", null, null, false); 
				} 
			}
		}
	}

@@ -2507,22 +2518,22 @@ public override Card.MoveResult _Move(Point newPoint, Card.MoveType type = Card.

cs
	}
	Cell cell = newPoint.cell;
	Cell cell2 = this.pos.cell;
	bool flag = cell.HasLiquid && !this.IsLevitating; 
	bool flag2 = cell.HasLiquid && !this.IsLevitating; 
	bool hasBridge = cell.HasBridge;
	bool hasRamp = cell.HasRamp;
	bool flag2 = EClass._zone.IsSnowCovered && !cell.HasRoof && !cell.isClearSnow; 
	bool flag3 = EClass._zone.IsSnowCovered && !cell.HasRoof && !cell.isClearSnow; 
	TileRow tileRow = hasRamp ? cell.sourceBlock : (hasBridge ? cell.sourceBridge : cell.sourceFloor);
	SourceMaterial.Row row = hasRamp ? cell.matBlock : (hasBridge ? cell.matBridge : cell.matFloor);
	bool flag3 = cell.IsTopWater && !cell.isFloating; 
	bool flag4 = cell.IsTopWater && !cell.isFloating; 
	if (!EClass._zone.IsRegion)
	{
		if (cell.hasDoorBoat)
		{
			tileRow = FLOOR.sourceWood;
			row = MATERIAL.sourceOak;
			flag3 = false; 
			flag4 = false; 
		}
		else if (flag2 && !tileRow.ignoreSnow) 
		else if (flag3 && !tileRow.ignoreSnow) 
		{
			if (tileRow.tileType.IsWater)
			{

@@ -2534,7 +2545,7 @@ public override Card.MoveResult _Move(Point newPoint, Card.MoveType type = Card.

cs
				tileRow = FLOOR.sourceSnow;
				row = MATERIAL.sourceSnow;
			}
			flag3 = false; 
			flag4 = false; 
		}
	}
	if ((this.pos.sourceFloor.isBeach || cell2.IsSnowTile) && !this.pos.HasObj)

@@ -2543,7 +2554,7 @@ public override Card.MoveResult _Move(Point newPoint, Card.MoveType type = Card.

cs
	}
	if (this.isSynced)
	{
		string text = (flag || flag3) ? "water" : tileRow.soundFoot.IsEmpty(row.soundFoot.IsEmpty("default")); 
		string text = (flag2 || flag4) ? "water" : tileRow.soundFoot.IsEmpty(row.soundFoot.IsEmpty("default")); 
		if (cell.obj != 0 && cell.sourceObj.tileType.IsPlayFootSound && !cell.matObj.soundFoot.IsEmpty())
		{
			text = cell.matObj.soundFoot;

@@ -2553,21 +2564,21 @@ public override Card.MoveResult _Move(Point newPoint, Card.MoveType type = Card.

cs
			SoundManager.altLastData = this.IsPC;
			base.PlaySound("Footstep/" + text, this.IsPC ? 1f : 0.9f, true);
		}
		if (!flag3) 
		if (!flag4) 
		{
			Scene scene = EClass.scene;
			PCOrbit pcOrbit = EClass.screen.pcOrbit;
			bool flag4 = scene.actionMode.gameSpeed > 1f; 
			bool flag5 = scene.actionMode.gameSpeed > 1f; 
			scene.psFoot.transform.position = this.renderer.position + pcOrbit.footPos;
			scene.psFoot.startColor = row.matColor;
			scene.psFoot.Emit(pcOrbit.emitFoot * (flag4 ? 2 : 1)); 
			if (flag4 && this.IsPC) 
			scene.psFoot.Emit(pcOrbit.emitFoot * (flag5 ? 2 : 1)); 
			if (flag5 && this.IsPC) 
			{
				scene.psSmoke.transform.position = this.renderer.position + pcOrbit.smokePos;
				scene.psSmoke.Emit(pcOrbit.emitSmoke);
			}
		}
		if (flag || flag3) 
		if (flag2 || flag4) 
		{
			Effect.Get("ripple").Play(0.4f * this.actTime * EClass.scene.actionMode.gameSpeed, newPoint, 0f, null, null);
		}

@@ -5008,7 +5019,7 @@ public override void Die(Element e = null, Card origin = null, AttackSource atta

cs
		if (origin.IsPCParty || origin.IsPCPartyMinion)
		{
			int num = 0;
			if (this.OriginalHostility >= Hostility.Friend && this.IsHuman && !this.IsPCFaction && !this.IsPCFactionMinion) 
			if (this.OriginalHostility >= Hostility.Friend && this.IsHuman && !base.IsPCFactionOrMinion) 
			{
				num = -5;
			}

ConSleep

@@ -76,6 +76,13 @@ public override void Tick()

cs
			}
			base.value = 1;
			this.slept = true;
			foreach (Chara chara in EClass.pc.party.members) 
			{ 
				if (!chara.IsPC) 
				{ 
					chara.AddCondition<ConSleep>(5 + EClass.rnd(10), true); 
				} 
			} 
			EClass.ui.AddLayer<LayerSleep>().Sleep(num, this.pcBed, this.pcPillow);
		}
		return;

CoreDebug

@@ -667,7 +667,7 @@ public void UpdateInput()

cs
	}
	if (Input.GetKeyDown(KeyCode.F4))
	{
		EClass.game.backupTime += 3600.0; 
		CoreDebug.TestSpawn(this.param1, this.param2, 5); 
		return;
	}
	if (Input.GetKeyDown(KeyCode.F5))

@@ -876,7 +876,7 @@ public void UpdateInput()

cs
					Card t = enumerator2.Current;
					EClass._zone.RemoveCard(t);
				}
				goto IL_BC2; 
				goto IL_BBB; 
			}
		}
		if (hitPoint.detail != null)

@@ -894,7 +894,7 @@ public void UpdateInput()

cs
			}
		}
	}
	IL_BC2: 
	IL_BBB: 
	if (Input.GetKeyDown(KeyCode.End) && hitPoint.detail != null)
	{
		for (int n = hitPoint.detail.things.Count - 1; n >= 0; n--)

@@ -1686,7 +1686,7 @@ public static string Spawn(string id, int num = 1, string aliasMat = "")

cs
	}

	[ConsoleCommand("")]
	public static string TestSpawn(int lv, int num) 
	public static string TestSpawn(int lv, int num, int lvRange = -1) 
	{
		if (!CoreDebug.CheatEnabled())
		{

@@ -1702,7 +1702,8 @@ where c.HasEditorTag(EditorTag.SpawnTest)

cs
	{
		EClass._zone.SpawnMob(EClass.pc.pos.GetNearestPoint(false, false, false, true), new SpawnSetting
		{
			filterLv = lv 
			filterLv = lv, 
			levelRange = lvRange 
		}).AddEditorTag(EditorTag.SpawnTest);
	}
	return "Spawned.";

EffectIRenderer

@@ -28,12 +28,19 @@ public EffectIRenderer Play(Card _card, Card _origin, Vector3 _to)

cs
		return this;
	}

	public EffectIRenderer Play(Card _card, Point from, Point to = null, float fixY = 0f) 
	public EffectIRenderer Play(Card origin, Card _card, Point from, Point to = null, float fixY = 0f) 
	{
		this.card = _card;
		this.snapTimer = -0.01f;
		this.from = from.Copy();
		base.Play(from, fixY, to, null); 
		if (origin.ExistsOnMap) 
		{ 
			base._Play(from, origin.renderer.position, fixY, to, null); 
		} 
		else
		{ 
			base.Play(from, fixY, to, null); 
		} 
		if (this.animeData)
		{
			this.anime = new TransAnime

@@ -92,6 +99,10 @@ public override void OnUpdate()

cs
		this.card.renderer.data.Draw(renderParam);
		return;
	}
	if (!this.card.renderer.hasActor) 
	{ 
		this.card.renderer.OnEnterScreen(); 
	} 
	if (this.card.renderer.actor)
	{
		this.card.renderer.actor.OnRender(renderParam);

Element.2

@@ -1029,6 +1029,23 @@ public void WriteNote()

cs
			{
				this.c.RefreshSpeed(this);
			}
			if (this.c.race.IsMachine || this.c.id == "android") 
			{ 
				int num3 = this.c.Evalue(664); 
				if (num3 > 0) 
				{ 
					if (id - 64 <= 1) 
					{ 
						this.AddFix(num3 / 2, EClass.sources.elements.map[664].GetName()); 
						return; 
					} 
					if (id != 79) 
					{ 
						return; 
					} 
					this.AddFix(num3, EClass.sources.elements.map[664].GetName()); 
				} 
			} 
		}

		public Element ele;

ElementContainerCard

@@ -213,7 +213,7 @@ public override int ValueBonus(Element e)

cs
				num = num * 2 + (e.ValueWithoutLink + e.vLink);
			}
		}
		if (this.owner.Chara.race.IsMachine || this.owner.id == "android") 
		if (e.id != 664 && (this.owner.Chara.race.IsMachine || this.owner.id == "android")) 
		{
			int num4 = this.owner.Evalue(664);
			if (num4 > 0)

FactionBranch

@@ -908,7 +908,10 @@ public void OnClaimZone()

cs
	{
		this.elements.SetBase(2206, 15, 0);
	}
	this.AddMemeber(EClass.pc); 
	if (EClass.game.StartZone == this.owner || this.owner is Zone_Vernis) 
	{ 
		this.AddMemeber(EClass.pc); 
	} 
	if (EClass.debug.allPolicy)
	{
		foreach (SourceElement.Row row3 in from a in EClass.sources.elements.rows

SpawnList

@@ -86,22 +86,42 @@ public SpawnList Filter(int lv, int levelRange = -1)

cs
		CardRow cardRow = this.rows[i];
		if (levelRange != -1)
		{
			if (Mathf.Abs(cardRow.LV - lv) < levelRange) 
			if (cardRow.isChara && (cardRow as SourceChara.Row).mainElement.Length >= 2) 
			{
				goto IL_5A; 
				SourceChara.Row row = cardRow as SourceChara.Row; 
				bool flag = false; 
				string[] mainElement = row.mainElement; 
				for (int j = 0; j < mainElement.Length; j++) 
				{ 
					string[] array = mainElement[j].Split('/', StringSplitOptions.None); 
					SourceElement.Row row2 = EClass.sources.elements.alias["ele" + array[0]]; 
					if (Mathf.Abs(cardRow.LV * row2.eleP / 100 - lv) < levelRange) 
					{ 
						flag = true; 
						break; 
					} 
				} 
				if (flag) 
				{ 
					goto IL_F1; 
				} 
			} 
			else if (Mathf.Abs(cardRow.LV - lv) < levelRange) 
			{ 
				goto IL_F1; 
			}
		}
		else if (cardRow.LV <= lv)
		{
			goto IL_5A; 
			goto IL_F1; 
		}
		IL_81: 
		IL_118: 
		i++;
		continue;
		IL_5A: 
		IL_F1: 
		SpawnList.tempList.rows.Add(cardRow);
		SpawnList.tempList.totalChance += cardRow.chance;
		goto IL_81; 
		goto IL_118; 
	}
	if (SpawnList.tempList.rows.Count == 0)
	{

TaskDrawWater

@@ -102,7 +102,7 @@ public override void OnCreateProgress(Progress_Custom p)

cs

	public override HitResult GetHitResult()
	{
		if (!this.pos.cell.IsTopWater || this.pos.HasObj || this.pos.cell.blocked) 
		if (!this.pos.cell.IsTopWater || this.pos.HasObj || this.pos.cell.HasFullBlock) 
		{
			return HitResult.Invalid;
		}

TaskPourWater

@@ -100,7 +100,7 @@ public override void OnCreateProgress(Progress_Custom p)

cs

	public override HitResult GetHitResult()
	{
		if (this.pos.HasBridge || this.pos.HasObj || this.pos.cell.blocked) 
		if (this.pos.HasBridge || this.pos.HasObj || this.pos.cell.HasFullBlock) 
		{
			return HitResult.Invalid;
		}

TraitFoodEggFertilized

@@ -41,14 +41,17 @@ public static Chara Incubate(Thing egg, Point pos, Card incubator = null)

cs
			element.vPotential += 30;
		}
	}
	FactionBranch factionBranch = EClass.Branch ?? EClass.pc.homeBranch; 
	if (factionBranch != null) 
	if (!egg.isNPCProperty) 
	{
		factionBranch.AddMemeber(chara); 
		factionBranch.ChangeMemberType(chara, EClass._zone.IsPCFaction ? FactionMemberType.Livestock : FactionMemberType.Default); 
		if (!EClass._zone.IsPCFaction) 
		FactionBranch factionBranch = EClass.Branch ?? EClass.pc.homeBranch; 
		if (factionBranch != null) 
		{
			EClass.pc.party.AddMemeber(chara); 
			factionBranch.AddMemeber(chara); 
			factionBranch.ChangeMemberType(chara, EClass._zone.IsPCFaction ? FactionMemberType.Livestock : FactionMemberType.Default); 
			if (!EClass._zone.IsPCFaction) 
			{ 
				EClass.pc.party.AddMemeber(chara); 
			} 
		}
	}
	Msg.Say("incubate", chara, null, null, null);

Zone

@@ -2085,7 +2085,10 @@ public void ClaimZone(bool debug = false)

cs
		EClass._zone.AddCard(ThingGen.Create("core_zone", -1, -1), nearestPoint).SetPlaceState(PlaceState.installed, false);
	}
	base.idPrefix = 0;
	EClass.player.spawnZone = EClass._zone; 
	if (EClass._zone == EClass.game.StartZone) 
	{ 
		EClass.player.spawnZone = EClass._zone; 
	} 
	if (EClass._zone != EClass.game.StartZone && !(EClass._zone is Zone_Vernis))
	{
		EClass._zone.SetBGM(new List<int>

Zone_Void

@@ -10,6 +10,18 @@ public bool IsBossLV

cs
		}
	}

	public override string TextWidgetDate 
	{ 
		get 
		{ 
			if (base.Boss == null) 
			{ 
				return ""; 
			} 
			return "bossLevel".lang(base.Boss.Name, null, null, null, null); 
		} 
	} 

	public override int MinLv
	{
		get