Skip to content

EA 23.112 Nightly

March 24, 2025

33 files modified. 2 new files created.

Important Changes

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

Net (1)

cs
public static async UniTask<bool> UploadFile(string id, string password, string name, string title, string path, string idLang) 
public static async UniTask<bool> UploadFile(string id, string password, string name, string title, string path, string idLang, string cat = "Home") 

ABILITY

@@ -2,9 +2,7 @@

cs

public class ABILITY
{
	public const int AI_TendAnimal = 5043; 

	public const int ActThrow = 5038; 
	public const int ActChat = 5044; 

	public const int AI_Fish = 5039;

@@ -14,7 +12,7 @@ public class ABILITY

cs

	public const int ActKick = 5042;

	public const int ActChat = 5044; 
	public const int AI_TendAnimal = 5043; 

	public const int AI_Drink = 5045;

@@ -32,11 +30,11 @@ public class ABILITY

cs

	public const int ActBash = 5052;

	public const int ActNoItem = 5037; 

	public const int TaskHarvest = 5053;

	public const int ActRestrain = 5055; 
	public const int ActThrow = 5038; 

	public const int AI_Bladder = 5054; 

	public const int AI_PlayMusic = 6001;

@@ -64,15 +62,15 @@ public class ABILITY

cs

	public const int ActRush = 6450;

	public const int AI_Bladder = 5054; 

	public const int ActCrabBreathe = 6500;

	public const int TaskMoveInstalled = 5036; 
	public const int ActRestrain = 5055; 

	public const int GoalIdle = 5034; 
	public const int ActCurse = 6600; 

	public const int Sleep = 5004; 
	public const int ActNoItem = 5037; 

	public const int TaskBuild = 5035; 

	public const int Wait = 5005;

@@ -100,11 +98,11 @@ public class ABILITY

cs

	public const int TaskTalk = 5017;

	public const int TaskBuild = 5035; 

	public const int TaskPick = 5018;

	public const int TaskFarm = 5020; 
	public const int TaskMoveInstalled = 5036; 

	public const int TaskReadBoard = 5019; 

	public const int TaskTrain = 5021;

@@ -132,13 +130,15 @@ public class ABILITY

cs

	public const int ActCancelTask = 5033;

	public const int TaskReadBoard = 5019; 
	public const int GoalIdle = 5034; 

	public const int ActCurse = 6600; 
	public const int TaskFarm = 5020; 

	public const int ActEntangle = 6601; 

	public const int ActDuplicate = 6420;

	public const int ActDraw = 6602; 
	public const int ActNTR = 6603; 

	public const int breathe_ = 7000;

@@ -156,14 +156,14 @@ public class ABILITY

cs

	public const int breathe_Nether = 50206;

	public const int ActEntangle = 6601; 

	public const int breathe_Nerve = 50208; 
	public const int breathe_Sound = 50207; 

	public const int ActHeadpat = 6904; 
	public const int ActDraw = 6602; 

	public const int breathe_Holy = 50209;

	public const int breathe_Chaos = 50210; 

	public const int breathe_Magic = 50211;

	public const int breathe_Ether = 50212;

@@ -184,21 +184,23 @@ public class ABILITY

cs

	public const int Ranged = 5003;

	public const int breathe_Chaos = 50210; 
	public const int Sleep = 5004; 

	public const int ActHeadpat = 6904; 

	public const int ActKizuamiTrick = 6903;

	public const int breathe_Sound = 50207; 
	public const int breathe_Nerve = 50208; 

	public const int ActJureHeal = 6901;

	public const int ActWeaken = 6610; 
	public const int ActTouchSleep = 6612; 

	public const int ActNTR = 6603; 
	public const int ActFear = 6611; 

	public const int ActLulwyTrick = 6902; 
	public const int ActWeaken = 6610; 

	public const int ActTouchSleep = 6612; 
	public const int ActLulwyTrick = 6902; 

	public const int ActTouchDrown = 6613;

@@ -212,44 +214,44 @@ public class ABILITY

cs

	public const int ActInsult = 6630;

	public const int ActGazeMana = 6623; 
	public const int ActScream = 6631; 

	public const int ActSteal = 6640; 
	public const int ActGazeMana = 6623; 

	public const int ActManaAbsorb = 6900; 
	public const int ActStealFood = 6641; 

	public const int StManaCost = 6720; 
	public const int ActStealMoney = 6642; 

	public const int ActScream = 6631; 
	public const int ActNeckHunt = 6650; 

	public const int StTaunt = 6700; 
	public const int ActDropMine = 6660; 

	public const int ActThrowPotion = 6661;

	public const int ActFear = 6611; 
	public const int ActSwarm = 6662; 

	public const int ActNeckHunt = 6650; 
	public const int ActManaAbsorb = 6900; 

	public const int ActStealMoney = 6642; 
	public const int StManaCost = 6720; 

	public const int ActStealFood = 6641; 
	public const int ActSteal = 6640; 

	public const int ActDropMine = 6660; 
	public const int StTaunt = 6700; 

	public static readonly int[] IDS = new int[117] 
	public static readonly int[] IDS = new int[118] 
	{
		5043, 5038, 5039, 5040, 5041, 5042, 5044, 5045, 5046, 5047, 
		5048, 5049, 5050, 5051, 5052, 5037, 5053, 5055, 6001, 6003, 
		6011, 6012, 6013, 6015, 6018, 6019, 6020, 6050, 6400, 6410, 
		6450, 5054, 6500, 5036, 5034, 5004, 5005, 5006, 5007, 5008, 
		5009, 5010, 5011, 5012, 5013, 5014, 5015, 5016, 5017, 5035, 
		5018, 5020, 5021, 5022, 5023, 5024, 5025, 5026, 5027, 5028, 
		5029, 5030, 5031, 5032, 5033, 5019, 6600, 6420, 6602, 7000, 
		50200, 50201, 50202, 50203, 50204, 50205, 50206, 6601, 50208, 6904, 
		50209, 50211, 50212, 50213, 50214, 50215, 50216, 5000, 5001, 5002, 
		5003, 50210, 6903, 50207, 6901, 6610, 6603, 6902, 6612, 6613, 
		6620, 6621, 6622, 6626, 6630, 6623, 6640, 6900, 6720, 6631, 
		6700, 6661, 6611, 6650, 6642, 6641, 6660
		5044, 5039, 5040, 5041, 5042, 5043, 5045, 5046, 5047, 5048, 
		5049, 5050, 5051, 5052, 5053, 5038, 5054, 6001, 6003, 6011, 
		6012, 6013, 6015, 6018, 6019, 6020, 6050, 6400, 6410, 6450, 
		6500, 5055, 6600, 5037, 5035, 5005, 5006, 5007, 5008, 5009, 
		5010, 5011, 5012, 5013, 5014, 5015, 5016, 5017, 5018, 5036, 
		5019, 5021, 5022, 5023, 5024, 5025, 5026, 5027, 5028, 5029, 
		5030, 5031, 5032, 5033, 5034, 5020, 6601, 6420, 6603, 7000, 
		50200, 50201, 50202, 50203, 50204, 50205, 50206, 50207, 6602, 50209, 
		50210, 50211, 50212, 50213, 50214, 50215, 50216, 5000, 5001, 5002, 
		5003, 5004, 6904, 6903, 50208, 6901, 6612, 6611, 6610, 6902, 
		6613, 6620, 6621, 6622, 6626, 6630, 6631, 6623, 6641, 6642, 
		6650, 6660, 6661, 6662, 6900, 6720, 6640, 6700
	};
}
public class Ability : Act

AI_PlayMusic

@@ -117,6 +117,12 @@ public override IEnumerable<Status> Run()

cs
		case "lute":
			idSong = "guitar_sad";
			break;
		case "recorder":
			idSong = "recorder"; 
			break; 
		case "flute":
			idSong = "flute"; 
			break; 
		case "taiko":
			idSong = "taiko";
			break;

AM_Terrain

@@ -67,7 +67,14 @@ public override void OnProcessTiles(Point point, int dir)

cs
			p.cell.height -= (byte)num2;
			if (p.cell._bridge != 0)
			{
				p.cell.bridgeHeight -= (byte)num2; 
				if (p.cell.bridgeHeight - num2 < 0) 
				{ 
					p.cell.bridgeHeight = 0; 
				} 
				else
				{ 
					p.cell.bridgeHeight -= (byte)num2; 
				} 
			}
		}
		else

@@ -92,7 +99,14 @@ public override void OnProcessTiles(Point point, int dir)

cs
			p.cell.height += (byte)num3;
			if (p.cell._bridge != 0)
			{
				p.cell.bridgeHeight += (byte)num3; 
				if (p.cell.bridgeHeight + num3 < 0) 
				{ 
					p.cell.bridgeHeight = 0; 
				} 
				else
				{ 
					p.cell.bridgeHeight += (byte)num3; 
				} 
			}
		}
		p.RefreshNeighborTiles();

ActMelee

@@ -3,6 +3,8 @@

cs

public class ActMelee : ActBaseAttack
{
	public virtual bool UseWeaponDist => true; 

	public override int PerformDistance
	{
		get

@@ -66,7 +68,7 @@ public override bool CanPerform()

cs
	{
		return false;
	}
	if (Act.CC.Dist(Act.TC) > PerformDistance) 
	if (UseWeaponDist && Act.CC.Dist(Act.TC) > PerformDistance) 
	{
		return false;
	}

@@ -165,7 +167,7 @@ void _Attack(BodySlot slot)

cs
				w = slot.thing;
			}
			int num = 1 + Mathf.Max(Act.CC.Evalue(666), (w != null) ? w.Evalue(666) : 0);
			if (dist <= 1 || dist <= num) 
			if (!UseWeaponDist || dist <= 1 || dist <= num) 
			{
				if (w != null)
				{

+ActMeleeSwarm

File Created
cs
public class ActMeleeSwarm : ActMelee
{
	public override bool UseWeaponDist => false;

	public override int PerformDistance => 99;
}

+ActSwarm

File Created
cs
using System.Linq;

public class ActSwarm : Ability
{
	public override bool CanPerform()
	{
		if (Act.TC == null || !Act.CC.IsHostile(Act.TC.Chara))
		{
			return false;
		}
		return base.CanPerform();
	}

	public override bool Perform()
	{
		float num = 0f;
		foreach (Chara item in EClass._map.charas.ToList())
		{
			if (!Act.CC.IsAliveInCurrentZone)
			{
				break;
			}
			if (item.IsAliveInCurrentZone && item != Act.CC && item.IsHostile(Act.CC) && Act.CC.CanSeeLos(item))
			{
				Point pos = item.pos;
				TweenUtil.Delay(num, delegate
				{
					pos.PlayEffect("ab_swarm");
					pos.PlaySound("ab_swarm");
				});
				if (num < 1f)
				{
					num += 0.07f;
				}
				new ActMeleeSwarm().Perform(Act.CC, item);
			}
		}
		return true;
	}
}

BaseTileMap

@@ -1096,7 +1096,7 @@ public virtual void DrawTile()

cs
		this.tileType = row.tileType;
		param.mat = row2;
		param.dir = this.cell._roofBlockDir % 4;
		param.snow = isSnowCovered; 
		param.snow = isSnowCovered && !this.cell.isClearSnow; 
		orgX = param.x;
		orgY = param.y;
		orgZ = param.z;

@@ -1183,7 +1183,7 @@ public virtual void DrawTile()

cs
	bool flag4 = this.cell.isSurrounded && innerMode != 0 && sourceBlock.tileType.IsFullBlock;
	if (!(!isSeen || flag4))
	{
		goto IL_1668; 
		goto IL_167b; 
	}
	bool isRoomEdge = this.cell.IsRoomEdge;
	orgY = param.y;

@@ -1245,7 +1245,7 @@ public virtual void DrawTile()

cs
	{
		if (isRoomEdge)
		{
			goto IL_1668; 
			goto IL_167b; 
		}
		if (detail == null || !EMono.pc.hasTelepathy)
		{

@@ -1256,8 +1256,441 @@ public virtual void DrawTile()

cs
			fogged = true;
		}
	}
	goto IL_7b6d; 
	IL_6fb2: 
	goto IL_7b80; 
	IL_7b80: 
	if (detail.things.Count == 0 && detail.charas.Count == 0) 
	{ 
		return; 
	} 
	int num3 = 0; 
	thingPos.x = 0f; 
	thingPos.y = 0f; 
	thingPos.z = 0f; 
	freePos.x = (freePos.y = (freePos.z = 0f)); 
	if (this.cell.HasRamp) 
	{ 
		Vector3 rampFix = sourceBlock.tileType.GetRampFix(this.cell.blockDir); 
		param.x += rampFix.x; 
		param.y += rampFix.y; 
		param.z += rampFix.z; 
		freePos.x += rampFix.x; 
		freePos.y += rampFix.y; 
		freePos.z += rampFix.z; 
	} 
	param.y += (flag ? 0f : ((this.cell._bridge != 0) ? this.cell.sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight)); 
	orgPos.x = (orgX = param.x); 
	orgPos.y = (orgY = param.y); 
	orgPos.z = (orgZ = param.z); 
	if (flag && liquidLv > 0) 
	{ 
		if (liquidLv > 10) 
		{ 
			liquidLv = TileType.FloorWaterShallow.LiquidLV * 10; 
		} 
		liquidLv -= (int)(floatY * 0.5f); 
		param.liquidLv = liquidLv; 
		param.y -= TileType.FloorWaterShallow.FloorHeight; 
	} 
	Thing thing = null; 
	bool shadow = liquidLv == 0; 
	float num4 = 0f; 
	float num5 = 0f; 
	bool flag6 = false; 
	float num6 = 0f; 
	bool flag7 = false; 
	float num7 = 0f; 
	if (detail.things.Count > 0 && isSeen) 
	{ 
		_ = zSetting.max1; 
		float num8 = 0f; 
		for (int j = 0; j < detail.things.Count; j++) 
		{ 
			Thing t = detail.things[j]; 
			if ((fogged && !t.isRoofItem) || ((t.isHidden || t.trait.HideInAdv || t.isMasked) && !EMono.scene.actionMode.ShowMaskedThings) || (t.isRoofItem && ((this.room == null && !sourceBlock.tileType.IsFullBlock && !EMono._zone.IsPCFaction) || (lowBlock && !showFullWall && this.room != null) || (noRoofMode && currentRoom == null))) || (flag3 && !t.isRoofItem)) 
			{ 
				continue; 
			} 
			TileType tileType = t.trait.tileType; 
			bool isInstalled = t.IsInstalled; 
			SourcePref pref = t.Pref; 
			if (!isInstalled && t.category.tileDummy != 0) 
			{ 
				pref = rendererObjDummy.shadowPref; 
			} 
			float num9 = ((tileType.UseMountHeight && isInstalled) ? 0f : ((pref.height < 0f) ? 0f : ((pref.height == 0f) ? 0.1f : pref.height))); 
			if (t.ignoreStackHeight) 
			{ 
				thingPos.y -= num4; 
			} 
			shadow = thingPos.y < 0.16f && num7 < 0.16f; 
			_ = pref.bypassShadow; 
			param.shadowFix = 0f - thingPos.y; 
			param.liquidLv = ((thingPos.y + (float)t.altitude < 0.1f) ? liquidLv : 0); 
			if (t.isRoofItem) 
			{ 
				param.snow = isSnowCovered && !this.cell.isClearSnow; 
				SetRoofHeight(param, this.cell, cx, cz); 
				_actorPos.x = param.x; 
				_actorPos.y = param.y; 
				_actorPos.z = param.z + num8; 
				if (this.room != null) 
				{ 
					param.color = GetRoofLight(this.room.lot); 
				} 
				shadow = false; 
				param.liquidLv = 0; 
			} 
			else
			{ 
				param.snow = snowed; 
				_actorPos.x = orgX + num5; 
				_actorPos.y = orgY; 
				_actorPos.z = orgZ + num8 + thingPos.z; 
				if (tileType.CanStack || !isInstalled) 
				{ 
					if (thing?.id != t.id) 
					{ 
						_actorPos.x += thingPos.x; 
					} 
					_actorPos.y += thingPos.y; 
					if (t.trait.IgnoreLastStackHeight && (thing == null || !thing.trait.IgnoreLastStackHeight)) 
					{ 
						thingPos.y -= num4; 
						if (thing != null) 
						{ 
							_actorPos.z -= 0.2f; 
							thingPos.z -= 0.2f; 
						} 
						_actorPos.y -= num4; 
					} 
					_actorPos.z += renderSetting.thingZ + (float)j * -0.01f + zSetting.mod1 * thingPos.y; 
				} 
				if (isInstalled) 
				{ 
					if (t.TileType.IsRamp) 
					{ 
						Vector3 rampFix2 = t.TileType.GetRampFix(t.dir, pref); 
						orgX += rampFix2.x; 
						orgY += rampFix2.y; 
						orgZ += rampFix2.z; 
						freePos.x += rampFix2.x; 
						freePos.y += rampFix2.y; 
						freePos.z += rampFix2.z; 
						if (!this.cell.IsTopWater || t.altitude > 0) 
						{ 
							num7 += rampFix2.y; 
						} 
						liquidLv -= (int)(rampFix2.y * 150f); 
						if (liquidLv < 0) 
						{ 
							liquidLv = 0; 
						} 
					} 
					else if (!flag7 && t.trait.IsChangeFloorHeight && !t.ignoreStackHeight) 
					{ 
						orgY += num9 + (float)t.altitude * altitudeFix.y; 
						orgZ += (float)t.altitude * altitudeFix.z; 
						freePos.y += num9 + (float)t.altitude * altitudeFix.y; 
						if (!this.cell.IsTopWater || t.altitude > 0) 
						{ 
							num7 += num9 + (float)t.altitude * altitudeFix.y; 
						} 
						_actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1)); 
						_actorPos.z += pref.z; 
						thingPos.z += pref.z; 
						liquidLv -= (int)(num9 * 150f); 
						if (liquidLv < 0) 
						{ 
							liquidLv = 0; 
						} 
					} 
					else
					{ 
						thingPos.y += num9; 
						_actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1)); 
						_actorPos.z += pref.z; 
						if (pref.height >= 0f) 
						{ 
							thingPos.z += pref.z; 
						} 
					} 
					if (!tileType.UseMountHeight && j > 10) 
					{ 
						flag7 = true; 
					} 
				} 
				else
				{ 
					thingPos.y += num9; 
					_actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1)); 
					_actorPos.z += pref.z; 
					thingPos.z += pref.z; 
				} 
				if (t.isFloating && isWater && !hasBridge && !flag) 
				{ 
					flag = true; 
					float num10 = ((this.cell._bridge != 0) ? sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight); 
					orgY += 0.01f * floatY - num10; 
					num6 = num9; 
					_actorPos.y += 0.01f * floatY - num10; 
					if (liquidLv > 10) 
					{ 
						liquidLv = TileType.FloorWaterShallow.LiquidLV * 10; 
					} 
					liquidLv -= (int)(floatY * 0.5f); 
					if (liquidLv < 0) 
					{ 
						liquidLv = 0; 
					} 
					param.liquidLv = liquidLv; 
				} 
				num4 = num9; 
				if (t.sourceCard.multisize && !t.trait.IsGround) 
				{ 
					num8 += zSetting.multiZ; 
				} 
				orgZ += t.renderer.data.stackZ; 
				if (param.liquidLv > 0) 
				{ 
					param.liquidLv += pref.liquidMod; 
					if (param.liquidLv < 1) 
					{ 
						param.liquidLv = 1; 
					} 
					else if (param.liquidLv > 99 + pref.liquidModMax) 
					{ 
						param.liquidLv = 99 + pref.liquidModMax; 
					} 
				} 
			} 
			if (isInstalled && tileType.UseMountHeight) 
			{ 
				if (tileType != TileType.Illumination || !this.cell.HasObj) 
				{ 
					if (noRoofMode && currentRoom == null && t.altitude >= lowWallObjAltitude) 
					{ 
						continue; 
					} 
					if (hideHang && (this.cell.room?.lot != currentLot || (!this.cell.lotWall && this.cell.room != currentRoom))) 
					{ 
						Room room = ((t.dir == 0) ? this.cell.Back.room : this.cell.Left.room); 
						if (t.trait.AlwaysHideOnLowWall) 
						{ 
							if (room == null || !room.data.showWallItem) 
							{ 
								continue; 
							} 
						} 
						else if (t.altitude >= lowWallObjAltitude) 
						{ 
							continue; 
						} 
					} 
				} 
				if (tileType.UseHangZFix) 
				{ 
					flag6 = true; 
				} 
				tileType.GetMountHeight(ref _actorPos, Point.shared.Set(index), t.dir, t); 
				shadow = false; 
				param.liquidLv = 0; 
				if (t.freePos) 
				{ 
					_actorPos.x += t.fx; 
					_actorPos.y += t.fy; 
				} 
			} 
			else
			{ 
				if (t.altitude != 0) 
				{ 
					_actorPos += altitudeFix * t.altitude; 
					if (t.altitude > 2 && ((this.cell.Back.room != null && this.cell.Back.IsRoomEdge) || (this.cell.Left.room != null && this.cell.Left.IsRoomEdge)) && hideHang && (this.cell.room?.lot != currentLot || (!this.cell.lotWall && this.cell.room != currentRoom))) 
					{ 
						continue; 
					} 
				} 
				if (t.freePos) 
				{ 
					_actorPos.x = orgX + t.fx - freePos.x; 
					_actorPos.y = orgY + t.fy - freePos.y; 
				} 
				if (t.trait is TraitDoor && (t.trait as TraitDoor).IsOpen()) 
				{ 
					_actorPos.z += -0.5f; 
				} 
			} 
			if (!t.sourceCard.multisize || (t.pos.x == cx && t.pos.z == cz)) 
			{ 
				if (iconMode != 0) 
				{ 
					int num11 = 0; 
					switch (iconMode) 
					{ 
					case CardIconMode.Visibility: 
						if (t.isMasked) 
						{ 
							num11 = 17; 
						} 
						break; 
					case CardIconMode.State: 
						if (t.placeState == PlaceState.installed) 
						{ 
							num11 = 18; 
						} 
						break; 
					case CardIconMode.Deconstruct: 
						if (t.isDeconstructing) 
						{ 
							num11 = 14; 
						} 
						break; 
					} 
					if (t.isNPCProperty && !EMono.debug.godBuild) 
					{ 
						num11 = 13; 
					} 
					if (num11 != 0) 
					{ 
						passGuideBlock.Add(_actorPos.x, _actorPos.y, _actorPos.z - 10f, num11); 
					} 
				} 
				t.SetRenderParam(param); 
				if (_lowblock && t.trait.UseLowblock && !this.cell.HasFullBlock) 
				{ 
					param.tile += ((param.tile < 0f) ? (-64) : 64); 
				} 
				if (t.trait is TraitTrolley && EMono.pc.ai is AI_Trolley aI_Trolley && aI_Trolley.trolley.owner == t) 
				{ 
					RenderParam _param = new RenderParam(param); 
					EMono.core.actionsLateUpdate.Add(delegate
					{ 
						t.SetRenderParam(_param); 
						_actorPos.x = EMono.pc.renderer.position.x; 
						_actorPos.y = EMono.pc.renderer.position.y - pref.height; 
						_actorPos.z = EMono.pc.renderer.position.z + 0.02f; 
						t.renderer.Draw(_param, ref _actorPos, !t.noShadow && (shadow || tileType.AlwaysShowShadow)); 
					}); 
				} 
				else
				{ 
					t.renderer.Draw(param, ref _actorPos, !t.noShadow && (shadow || tileType.AlwaysShowShadow)); 
				} 
			} 
			if (isInstalled) 
			{ 
				num5 += pref.stackX * (float)((!t.flipX) ? 1 : (-1)); 
			} 
			param.x = orgX; 
			param.y = orgY; 
			param.z = orgZ; 
			param.color = floorLight; 
			thing = t; 
			if (pref.Float) 
			{ 
				liquidLv = 0; 
			} 
		} 
	} 
	orgY += num6; 
	if (detail.charas.Count <= 0) 
	{ 
		return; 
	} 
	param.shadowFix = 0f - num7; 
	param.color += 1310720f; 
	float max = zSetting.max2; 
	for (int k = 0; k < detail.charas.Count; k++) 
	{ 
		Chara chara = detail.charas[k]; 
		if (chara.host != null || (chara != EMono.pc && chara != LayerDrama.alwaysVisible && (flag3 || fogged || (!showAllCards && !EMono.player.CanSee(chara))))) 
		{ 
			continue; 
		} 
		_actorPos.x = orgX; 
		_actorPos.y = orgY; 
		_actorPos.z = orgZ; 
		chara.SetRenderParam(param); 
		_ = chara.IsAliveInCurrentZone; 
		if (chara.isRestrained) 
		{ 
			TraitShackle restrainer = chara.GetRestrainer(); 
			if (restrainer != null) 
			{ 
				Vector3 getRestrainPos = restrainer.GetRestrainPos; 
				if (getRestrainPos != default(Vector3)) 
				{ 
					Vector3 position = restrainer.owner.renderer.position; 
					float defCharaHeight = EMono.setting.render.defCharaHeight; 
					float num12 = getRestrainPos.y + defCharaHeight - ((chara.Pref.height == 0f) ? defCharaHeight : chara.source.pref.height); 
					_actorPos.x = position.x + getRestrainPos.x * (float)((restrainer.owner.dir % 2 == 0) ? 1 : (-1)); 
					_actorPos.y = position.y + num12; 
					_actorPos.z = position.z + getRestrainPos.z; 
					param.liquidLv = 0; 
					param.shadowFix = orgY - _actorPos.y; 
					chara.renderer.SetFirst(first: true); 
					chara.renderer.Draw(param, ref _actorPos, drawShadow: true); 
					param.shadowFix = 0f; 
					continue; 
				} 
			} 
		} 
		if (!chara.sourceCard.multisize || (chara.pos.x == cx && chara.pos.z == cz)) 
		{ 
			if (chara.IsDeadOrSleeping && chara.IsPCC) 
			{ 
				float num13 = chara.renderer.data.size.y * 0.3f; 
				if (thingPos.y > max) 
				{ 
					thingPos.y = max; 
				} 
				float num14 = thingPos.y + num13; 
				float num15 = (float)k * -0.01f; 
				if (num14 > zSetting.thresh1) 
				{ 
					num15 = zSetting.mod1; 
				} 
				_actorPos.x += thingPos.x; 
				_actorPos.y += thingPos.y; 
				_actorPos.z += renderSetting.laydownZ + num15; 
				param.liquidLv = ((thingPos.y == 0f && liquidLv > 0) ? 90 : 0); 
				thingPos.y += num13 * 0.8f; 
				chara.renderer.Draw(param, ref _actorPos, liquidLv == 0); 
			} 
			else
			{ 
				param.liquidLv = liquidLv; 
				if (param.liquidLv > 0) 
				{ 
					param.liquidLv += chara.Pref.liquidMod; 
					if (param.liquidLv < 1) 
					{ 
						param.liquidLv = 1; 
					} 
					else if (param.liquidLv > 99 + chara.Pref.liquidModMax) 
					{ 
						param.liquidLv = 99 + chara.Pref.liquidModMax; 
					} 
				} 
				if (!chara.IsPC && !chara.renderer.IsMoving && detail.charas.Count > 1 && (detail.charas.Count != 2 || !detail.charas[0].IsDeadOrSleeping || !detail.charas[0].IsPCC)) 
				{ 
					_actorPos += renderSetting.charaPos[1 + ((num3 < 4) ? num3 : 3)]; 
				} 
				_actorPos.z += 0.01f * (float)k + renderSetting.charaZ; 
				num3++; 
				if (flag6) 
				{ 
					_actorPos.z += chara.renderer.data.hangedFixZ; 
				} 
				chara.renderer.Draw(param, ref _actorPos, liquidLv == 0); 
			} 
		} 
		param.x = orgX; 
		param.y = orgY; 
		param.z = orgZ; 
	} 
	return; 
	IL_6fc5: 
	if (isSnowCovered && (sourceBlock.id != 0 || this.cell.hasDoor) && !snowed && !this.cell.isClearSnow && ((!this.cell.Front.HasRoof && !this.cell.Front.HasBlock) || (!this.cell.Right.HasRoof && !this.cell.Right.HasBlock)))
	{
		snowed = true;

@@ -1282,16 +1715,16 @@ public virtual void DrawTile()

cs
			{
				if (sourceEffect2.anime.Length > 2)
				{
					float num3 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[2]; 
					if (!(num3 >= (float)sourceEffect2.anime[0])) 
					float num16 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[2]; 
					if (!(num16 >= (float)sourceEffect2.anime[0])) 
					{
						param.tile += num3; 
						param.tile += num16; 
					}
				}
				else
				{
					float num4 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[0]; 
					param.tile += num4; 
					float num17 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[0]; 
					param.tile += num17; 
				}
			}
			if (this.cell.effect.IsFire)

@@ -1480,11 +1913,19 @@ public virtual void DrawTile()

cs
		param.matColor = 104025f;
		renderFootmark.Draw(param);
	}
	goto IL_7b6d; 
	IL_1668: 
	goto IL_7b80; 
	IL_6f65: 
	int num18; 
	if (!showRoof || !roof || this.cell.room == null || this.cell.Front.room == null || this.cell.Right.room == null) 
	{ 
		param.tile = num18; 
		rendererFov.Draw(param); 
	} 
	goto IL_6fc5; 
	IL_167b: 
	if (this.cell.isSlopeEdge)
	{
		float num5 = (float)height * _heightMod.y; 
		float num19 = (float)height * _heightMod.y; 
		orgY = param.y;
		orgZ = param.z;
		param.dir = this.cell.blockDir;

@@ -1514,17 +1955,17 @@ public virtual void DrawTile()

cs
				param.matColor = 104025f;
			}
		}
		for (int j = 0; (float)j < num5 / heightBlockSize; j++) 
		for (int l = 0; (float)l < num19 / heightBlockSize; l++) 
		{
			param.y += ugFix.y;
			param.z += ugFix.z + slopeFixZ * (float)j; 
			param.z += ugFix.z + slopeFixZ * (float)l; 
			defBlock.renderData.Draw(param);
			if (this.cell.pcSync && EMono.player.lightPower > 0f)
			{
				float num6 = param.tile; 
				float num20 = param.tile; 
				param.tile = 0f;
				rendererFov.Draw(param);
				param.tile = num6; 
				param.tile = num20; 
			}
		}
		param.y = orgY;

@@ -1535,29 +1976,29 @@ public virtual void DrawTile()

cs
	{
		orgY = param.y;
		orgZ = param.z;
		int num7 = 0; 
		int num21 = 0; 
		if (sourceBlock.tileType.IsFullBlock)
		{
			SourceBlock.Row row3 = sourceBlock;
			num7 = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length]; 
			num21 = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length]; 
		}
		else
		{
			SourceBlock.Row row3 = sourceFloor._defBlock;
			num7 = row3._tiles[this.cell.blockDir % row3._tiles.Length]; 
			num21 = row3._tiles[this.cell.blockDir % row3._tiles.Length]; 
		}
		if (((this.cell.Front.shore / 12) & 1) == 0 && this.cell.Front.sourceFloor.tileType.IsWater && this.cell.Front.height <= height && this.cell.Front.sourceBlock.tileType.RenderWaterBlock)
		{
			param.y = (float)(cz - cx) * screen.tileAlign.y - (this.cell.Front.sourceFloor.tileType.IsDeepWater ? 0.6f : 0.4f) + (float)(int)this.cell.Front.height * _heightMod.y;
			param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z;
			param.tile = num7 + ((!this.cell.Front.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0); 
			param.tile = num21 + ((!this.cell.Front.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0); 
			rendererWaterBlock.Draw(param);
		}
		if (((this.cell.Right.shore / 12) & 8) == 0 && this.cell.Right.sourceFloor.tileType.IsWater && this.cell.Right.height <= height && this.cell.Right.sourceBlock.tileType.RenderWaterBlock)
		{
			param.y = (float)(cz - cx) * screen.tileAlign.y - (this.cell.Right.sourceFloor.tileType.IsDeepWater ? 0.6f : 0.4f) + (float)(int)this.cell.Right.height * _heightMod.y;
			param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z;
			param.tile = num7 + ((!this.cell.Right.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0); 
			param.tile = num21 + ((!this.cell.Right.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0); 
			rendererWaterBlock.Draw(param);
		}
		param.y = orgY;

@@ -1598,10 +2039,10 @@ public virtual void DrawTile()

cs
		{
			param.matColor = 104025f;
		}
		for (int k = 0; k < ((!this.cell.isSkyFloor) ? 1 : EMono._map.config.skyBlockHeight); k++) 
		for (int m = 0; m < ((!this.cell.isSkyFloor) ? 1 : EMono._map.config.skyBlockHeight); m++) 
		{
			param.y += ugFix.y;
			param.z += ugFix.z + slopeFixZ * (float)k; 
			param.z += ugFix.z + slopeFixZ * (float)m; 
			defBlock2.renderData.Draw(param);
		}
		param.y = orgY;

@@ -1655,20 +2096,20 @@ public virtual void DrawTile()

cs
				}
				sourceFloor.renderData.Draw(param);
			}
			int num8 = 0; 
			int num22 = 0; 
			if (isSnowCovered && sourceFloor == FLOOR.sourceSnow && !this.cell.hasDoor)
			{
				if (!this.cell.Right.IsSnowTile && this.cell.Right.topHeight == this.cell.topHeight)
				{
					num8++; 
					num22++; 
				}
				if (!this.cell.Front.IsSnowTile && this.cell.Front.topHeight == this.cell.topHeight)
				{
					num8 += 2; 
					num22 += 2; 
				}
				if (num8 != 0) 
				if (num22 != 0) 
				{
					param.tile = 448 + num8 + 12; 
					param.tile = 448 + num22 + 12; 
					param.z -= 0.1f;
					sourceFloor.renderData.Draw(param);
					param.z += 0.1f;

@@ -1739,7 +2180,7 @@ public virtual void DrawTile()

cs
					}
				}
			}
			if (this.cell.autotile != 0 && sourceFloor.autotile != 0 && (!hasBridge || this.cell.bridgeHeight - this.cell.height > 3) && !this.cell.skipRender && num8 == 0) 
			if (this.cell.autotile != 0 && sourceFloor.autotile != 0 && (!hasBridge || this.cell.bridgeHeight - this.cell.height > 3) && !this.cell.skipRender && num22 == 0) 
			{
				pass = (isWater ? passAutoTileWater : passAutoTile);
				batch = pass.batches[pass.batchIdx];

@@ -1758,16 +2199,16 @@ public virtual void DrawTile()

cs
		}
		if (isWater)
		{
			int num9 = 12; 
			int num10 = this.cell.shore / num9; 
			int num11 = this.cell.shore % num9; 
			int num23 = 12; 
			int num24 = this.cell.shore / num23; 
			int num25 = this.cell.shore % num23; 
			bool isShoreSand = this.cell.isShoreSand;
			if (this.cell.shore != 0)
			{
				Cell cell = ((((uint)num10 & (true ? 1u : 0u)) != 0) ? this.cell.Back : ((((uint)num10 & 2u) != 0) ? this.cell.Right : ((((uint)num10 & 4u) != 0) ? this.cell.Front : this.cell.Left))); 
				Cell cell = ((((uint)num24 & (true ? 1u : 0u)) != 0) ? this.cell.Back : ((((uint)num24 & 2u) != 0) ? this.cell.Right : ((((uint)num24 & 4u) != 0) ? this.cell.Front : this.cell.Left))); 
				if (isShoreSand && !cell.sourceFloor.isBeach)
				{
					cell = ((((uint)num10 & 8u) != 0) ? this.cell.Left : ((((uint)num10 & 4u) != 0) ? this.cell.Front : ((((uint)num10 & 2u) != 0) ? this.cell.Right : this.cell.Back))); 
					cell = ((((uint)num24 & 8u) != 0) ? this.cell.Left : ((((uint)num24 & 4u) != 0) ? this.cell.Front : ((((uint)num24 & 2u) != 0) ? this.cell.Right : this.cell.Back))); 
				}
				if (!cell.IsSnowTile)
				{

@@ -1779,7 +2220,7 @@ public virtual void DrawTile()

cs
						batch.matrices[pass.idx].m03 = param.x;
						batch.matrices[pass.idx].m13 = param.y;
						batch.matrices[pass.idx].m23 = param.z;
						batch.tiles[pass.idx] = 768 + this.cell.shore / num9; 
						batch.tiles[pass.idx] = 768 + this.cell.shore / num23; 
						batch.colors[pass.idx] = param.color;
						batch.matColors[pass.idx] = param.matColor;
						pass.idx++;

@@ -1787,38 +2228,38 @@ public virtual void DrawTile()

cs
						{
							pass.NextBatch();
						}
						num11 = 2; 
						num25 = 2; 
					}
					else
					{
						num11 = cell.sourceFloor.edge; 
						num25 = cell.sourceFloor.edge; 
					}
					param.tile = (24 + num11 / 2) * 32 + num11 % 2 * 16 + num10; 
					param.tile = (24 + num25 / 2) * 32 + num25 % 2 * 16 + num24; 
					rendererShore.Draw(param);
				}
			}
			if (this.cell.Back.isShoreSand && ((uint)(this.cell.Back.shore / num9) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.Left.shore / num9) & (true ? 1u : 0u)) != 0) 
			if (this.cell.Back.isShoreSand && ((uint)(this.cell.Back.shore / num23) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.Left.shore / num23) & (true ? 1u : 0u)) != 0) 
			{
				param.tile = 785f;
				param.matColor = GetColorInt(ref this.cell.BackLeft.matFloor.matColor, this.cell.BackLeft.sourceFloor.colorMod);
				passShore.Add(param);
				Draw(60);
			}
			if (this.cell.Back.isShoreSand && ((uint)(this.cell.Back.shore / num9) & 2u) != 0 && this.cell.Right.isShoreSand && ((uint)(this.cell.Right.shore / num9) & (true ? 1u : 0u)) != 0) 
			if (this.cell.Back.isShoreSand && ((uint)(this.cell.Back.shore / num23) & 2u) != 0 && this.cell.Right.isShoreSand && ((uint)(this.cell.Right.shore / num23) & (true ? 1u : 0u)) != 0) 
			{
				param.tile = 786f;
				param.matColor = GetColorInt(ref this.cell.BackRight.matFloor.matColor, this.cell.BackRight.sourceFloor.colorMod);
				passShore.Add(param);
				Draw(56);
			}
			if (this.cell.Front.isShoreSand && ((uint)(this.cell.Front.shore / num9) & 2u) != 0 && this.cell.Right.isShoreSand && ((uint)(this.cell.Right.shore / num9) & 4u) != 0) 
			if (this.cell.Front.isShoreSand && ((uint)(this.cell.Front.shore / num23) & 2u) != 0 && this.cell.Right.isShoreSand && ((uint)(this.cell.Right.shore / num23) & 4u) != 0) 
			{
				param.tile = 787f;
				param.matColor = GetColorInt(ref this.cell.FrontRight.matFloor.matColor, this.cell.FrontRight.sourceFloor.colorMod);
				passShore.Add(param);
				Draw(48);
			}
			if (this.cell.Front.isShoreSand && ((uint)(this.cell.Front.shore / num9) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.Left.shore / num9) & 4u) != 0) 
			if (this.cell.Front.isShoreSand && ((uint)(this.cell.Front.shore / num23) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.Left.shore / num23) & 4u) != 0) 
			{
				param.tile = 788f;
				param.matColor = GetColorInt(ref this.cell.FrontLeft.matFloor.matColor, this.cell.FrontLeft.sourceFloor.colorMod);

@@ -1841,48 +2282,48 @@ public virtual void DrawTile()

cs
					pass.NextBatch();
				}
			}
			bool flag6 = false; 
			bool flag8 = false; 
			if (isShoreSand)
			{
				if (((uint)num10 & (true ? 1u : 0u)) != 0) 
				if (((uint)num24 & (true ? 1u : 0u)) != 0) 
				{
					if (((uint)num10 & 8u) != 0) 
					if (((uint)num24 & 8u) != 0) 
					{
						if ((num10 & 2) == 0 && (num10 & 4) == 0) 
						if ((num24 & 2) == 0 && (num24 & 4) == 0) 
						{
							Draw(16);
						}
						flag6 = true; 
						flag8 = true; 
					}
					if (((uint)num10 & 2u) != 0) 
					if (((uint)num24 & 2u) != 0) 
					{
						if ((num10 & 8) == 0 && (num10 & 4) == 0) 
						if ((num24 & 8) == 0 && (num24 & 4) == 0) 
						{
							Draw(20);
						}
						flag6 = true; 
						flag8 = true; 
					}
				}
				if (((uint)num10 & 4u) != 0) 
				if (((uint)num24 & 4u) != 0) 
				{
					if (((uint)num10 & 8u) != 0) 
					if (((uint)num24 & 8u) != 0) 
					{
						if ((num10 & 2) == 0 && (num10 & 1) == 0) 
						if ((num24 & 2) == 0 && (num24 & 1) == 0) 
						{
							Draw(24);
						}
						flag6 = true; 
						flag8 = true; 
					}
					if (((uint)num10 & 2u) != 0) 
					if (((uint)num24 & 2u) != 0) 
					{
						if ((num10 & 8) == 0 && (num10 & 1) == 0) 
						if ((num24 & 8) == 0 && (num24 & 1) == 0) 
						{
							Draw(28);
						}
						flag6 = true; 
						flag8 = true; 
					}
				}
				if (!flag6) 
				if (!flag8) 
				{
					if (!this.cell.Front.sourceFloor.tileType.IsWater && !this.cell.Front.isDeck)
					{

@@ -1894,7 +2335,7 @@ public virtual void DrawTile()

cs
					}
				}
			}
			if (!flag6) 
			if (!flag8) 
			{
				if (!this.cell.Back.sourceFloor.tileType.IsWater && !this.cell.Back.isDeck)
				{

@@ -1902,7 +2343,7 @@ public virtual void DrawTile()

cs
					batch = pass.batches[pass.batchIdx];
					batch.tiles[pass.idx] = 608 + waterAnimeIndex % 4;
					batch.matColors[pass.idx] = 104025f;
					if (((uint)(this.cell.shore / num9) & (true ? 1u : 0u)) != 0) 
					if (((uint)(this.cell.shore / num23) & (true ? 1u : 0u)) != 0) 
					{
						if (isShoreSand)
						{

@@ -1940,7 +2381,7 @@ public virtual void DrawTile()

cs
					batch = pass.batches[pass.batchIdx];
					batch.tiles[pass.idx] = 612 + waterAnimeIndex % 4;
					batch.matColors[pass.idx] = 104025f;
					if (((uint)(this.cell.shore / num9) & 8u) != 0) 
					if (((uint)(this.cell.shore / num23) & 8u) != 0) 
					{
						if (isShoreSand)
						{

@@ -2056,16 +2497,16 @@ public virtual void DrawTile()

cs
			param.z += bridgeFix.z;
			param.dir = 0;
			SourceBlock.Row row4 = sourceBridge._bridgeBlock;
			float num12 = (float)(this.cell.bridgeHeight - this.cell.height) * _heightMod.y; 
			float num26 = (float)(this.cell.bridgeHeight - this.cell.height) * _heightMod.y; 
			if (this.cell.sourceFloor.tileType == TileType.Sky)
			{
				num12 += (float)EMono._map.config.skyBlockHeight; 
				num26 += (float)EMono._map.config.skyBlockHeight; 
			}
			int num13 = (int)(num12 / heightBlockSize) + 2; 
			int num27 = (int)(num26 / heightBlockSize) + 2; 
			if (this.cell.bridgePillar != 0)
			{
				row4 = EMono.sources.blocks.rows[this.cell.bridgePillar];
				param.tile = row4._tiles[0] + ((num13 == 2) ? 32 : 0); 
				param.tile = row4._tiles[0] + ((num27 == 2) ? 32 : 0); 
				param.mat = ((sourceBridge.DefaultMaterial == row4.DefaultMaterial) ? sourceBridge.DefaultMaterial : row4.DefaultMaterial);
				param.matColor = ((row4.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.matColor, row4.colorMod));
			}

@@ -2077,9 +2518,9 @@ public virtual void DrawTile()

cs
			}
			param.y += ugFixBridgeTop.y;
			param.z += ugFixBridgeTop.z;
			for (int l = 0; l < num13; l++) 
			for (int n = 0; n < num27; n++) 
			{
				if (l == num13 - 1) 
				if (n == num27 - 1) 
				{
					param.y = (float)(cz - cx) * screen.tileAlign.y + (float)height * _heightMod.y + ugFixBridgeBottom.y;
					param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)height * _heightMod.z + ugFixBridgeBottom.z;

@@ -2111,13 +2552,13 @@ public virtual void DrawTile()

cs
	{
		snowed = false;
	}
	int num14 = 0; 
	num18 = 0; 
	if (sourceBlock.id != 0)
	{
		this.tileType = sourceBlock.tileType;
		roomHeight = 0f;
		int blockDir = this.cell.blockDir;
		bool flag7 = false; 
		bool flag9 = false; 
		switch (wallClipMode)
		{
		case WallClipMode.ByRoom:

@@ -2161,8 +2602,8 @@ public virtual void DrawTile()

cs
					}
				}
			}
			flag7 = (this.room != null && this.room.data.atrium) || (this.cell.room != null && this.cell.room.data.atrium); 
			if (flag7) 
			flag9 = (this.room != null && this.room.data.atrium) || (this.cell.room != null && this.cell.room.data.atrium); 
			if (flag9) 
			{
				_lowblock = false;
			}

@@ -2184,8 +2625,8 @@ public virtual void DrawTile()

cs
					roomHeight = 0f;
					break;
				}
				int num15 = ((this.room.data.maxHeight == 0) ? 2 : this.room.data.maxHeight); 
				roomHeight = EMono.setting.render.roomHeightMod * (float)((this.room.lot.height < num15) ? this.room.lot.height : num15) + 0.01f * (float)this.room.lot.heightFix; 
				int num28 = ((this.room.data.maxHeight == 0) ? 2 : this.room.data.maxHeight); 
				roomHeight = EMono.setting.render.roomHeightMod * (float)((this.room.lot.height < num28) ? this.room.lot.height : num28) + 0.01f * (float)this.room.lot.heightFix; 
			}
			break;
		case WallClipMode.ByLot:

@@ -2231,11 +2672,11 @@ public virtual void DrawTile()

cs
		}
		if (!_lowblock && (double)roomHeight > 1.2 && this.tileType.RepeatBlock)
		{
			num14 = 1; 
			num18 = 1; 
		}
		else if (lowBlock)
		{
			num14 = 2; 
			num18 = 2; 
		}
		param.mat = matBlock;
		param.dir = this.cell.blockDir;

@@ -2282,11 +2723,11 @@ public virtual void DrawTile()

cs
				}
				if (!_lowblock)
				{
					int num16 = ((currentRoom.data.maxHeight == 0) ? 2 : currentRoom.data.maxHeight); 
					roomHeight = EMono.setting.render.roomHeightMod * (float)((currentRoom.lot.height < num16) ? currentRoom.lot.height : num16) + 0.01f * (float)currentRoom.lot.heightFix; 
					int num29 = ((currentRoom.data.maxHeight == 0) ? 2 : currentRoom.data.maxHeight); 
					roomHeight = EMono.setting.render.roomHeightMod * (float)((currentRoom.lot.height < num29) ? currentRoom.lot.height : num29) + 0.01f * (float)currentRoom.lot.heightFix; 
				}
			}
			if (flag7) 
			if (flag9) 
			{
				_lowblock = (!this.cell.Front.HasFullBlock || !this.cell.Right.HasFullBlock) && (!this.cell.Front.HasFullBlock || !this.cell.Left.HasFullBlock) && (!this.cell.Back.HasFullBlock || !this.cell.Right.HasFullBlock) && (!this.cell.Back.HasFullBlock || !this.cell.Left.HasFullBlock);
				if (_lowblock)

@@ -2316,62 +2757,62 @@ public virtual void DrawTile()

cs
			{
				sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFixBlock, this.cell.hasDoor, this.cell.effect?.FireAmount ?? 0, isBlock: true);
			}
			Room room = this.cell.Front.room ?? this.cell.room; 
			if (room == null && this.cell.Right.room != null) 
			Room room2 = this.cell.Front.room ?? this.cell.room; 
			if (room2 == null && this.cell.Right.room != null) 
			{
				room = this.cell.Right.room; 
				room2 = this.cell.Right.room; 
			}
			if (!invisible && room != null) 
			if (!invisible && room2 != null) 
			{
				if (room.lot.idDeco != 0 && !this.cell.hasDoor) 
				if (room2.lot.idDeco != 0 && !this.cell.hasDoor) 
				{
					param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room.lot.idDeco); 
					param.matColor = room.lot.colDeco; 
					param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room2.lot.idDeco); 
					param.matColor = room2.lot.colDeco; 
					float y = param.y;
					param.y += (float)room.lot.decoFix * 0.01f; 
					param.y += (float)room2.lot.decoFix * 0.01f; 
					rendererWallDeco.Draw(param);
					param.y = y;
				}
				if (room.lot.idDeco2 != 0 && roomHeight != 0f && (float)room.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y) 
				if (room2.lot.idDeco2 != 0 && roomHeight != 0f && (float)room2.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y) 
				{
					param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room.lot.idDeco2); 
					param.matColor = room.lot.colDeco2; 
					param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room2.lot.idDeco2); 
					param.matColor = room2.lot.colDeco2; 
					float y2 = param.y;
					float num17 = param.z; 
					param.y += (float)room.lot.decoFix2 * 0.01f; 
					param.z += (float)room.lot.decoFix2 * 0.01f * heightModDeco; 
					float num30 = param.z; 
					param.y += (float)room2.lot.decoFix2 * 0.01f; 
					param.z += (float)room2.lot.decoFix2 * 0.01f * heightModDeco; 
					rendererWallDeco.Draw(param);
					param.y = y2;
					param.z = num17; 
					param.z = num30; 
				}
			}
			room = this.cell.Right.room ?? this.cell.room; 
			if (room == null && this.cell.Front.room != null) 
			room2 = this.cell.Right.room ?? this.cell.room; 
			if (room2 == null && this.cell.Front.room != null) 
			{
				room = this.cell.Front.room; 
				room2 = this.cell.Front.room; 
			}
			if (!invisible && room != null) 
			if (!invisible && room2 != null) 
			{
				if (room.lot.idDeco != 0 && !this.cell.hasDoor) 
				if (room2.lot.idDeco != 0 && !this.cell.hasDoor) 
				{
					param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room.lot.idDeco) * -1; 
					param.matColor = room.lot.colDeco; 
					param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room2.lot.idDeco) * -1; 
					param.matColor = room2.lot.colDeco; 
					float y3 = param.y;
					param.y += (float)room.lot.decoFix * 0.01f; 
					param.y += (float)room2.lot.decoFix * 0.01f; 
					rendererWallDeco.Draw(param);
					param.y = y3;
				}
				if (room.lot.idDeco2 != 0 && roomHeight != 0f && (float)room.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y) 
				if (room2.lot.idDeco2 != 0 && roomHeight != 0f && (float)room2.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y) 
				{
					param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room.lot.idDeco2) * -1; 
					param.matColor = room.lot.colDeco2; 
					param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room2.lot.idDeco2) * -1; 
					param.matColor = room2.lot.colDeco2; 
					float y4 = param.y;
					float num18 = param.z; 
					param.y += (float)room.lot.decoFix2 * 0.01f; 
					param.z += (float)room.lot.decoFix2 * 0.01f * heightModDeco; 
					float num31 = param.z; 
					param.y += (float)room2.lot.decoFix2 * 0.01f; 
					param.z += (float)room2.lot.decoFix2 * 0.01f * heightModDeco; 
					rendererWallDeco.Draw(param);
					param.y = y4;
					param.z = num18; 
					param.z = num31; 
				}
			}
			break;

@@ -2386,167 +2827,56 @@ public virtual void DrawTile()

cs
			orgY = param.y;
			orgZ = param.z;
			param.color = (this.tileType.IsFence ? (floorLight - (float)((int)(_shadowStrength * 0.8f * 50f) * 262144)) : blockLight);
			bool flag8 = blockDir == 1 || _lowblock || flag7; 
			bool flag9 = blockDir == 0 || _lowblock || flag7; 
			bool flag10 = blockDir == 1 || _lowblock || flag9; 
			bool flag11 = blockDir == 0 || _lowblock || flag9; 
			if (!showFullWall && currentRoom != null)
			{
				if (!flag8) 
				if (!flag10) 
				{
					if (currentRoom == this.cell.room || (this.cell.lotWall && this.cell.room?.lot == currentLot && this.cell.Front.room != currentRoom))
					{
						if (!this.cell.IsRoomEdge || (this.cell.Front.room != this.cell.room && this.cell.FrontRight.room != this.cell.room))
						{
							flag8 = true; 
							flag10 = true; 
						}
					}
					else if ((!this.cell.Front.lotWall || this.cell.Front.room?.lot != currentLot) && this.cell.Front.room != currentRoom)
					{
						flag8 = true; 
						flag10 = true; 
					}
				}
				if (!flag9) 
				if (!flag11) 
				{
					if (currentRoom == this.cell.room || (this.cell.lotWall && this.cell.room?.lot == currentLot && this.cell.Right.room != currentRoom))
					{
						if (!this.cell.IsRoomEdge || (this.cell.Right.room != this.cell.room && this.cell.FrontRight.room != this.cell.room))
						{
							flag9 = true; 
							flag11 = true; 
						}
					}
					else if ((!this.cell.Right.lotWall || this.cell.Right.room?.lot != currentLot) && this.cell.Right.room != currentRoom)
					{
						flag9 = true; 
						flag11 = true; 
					}
				}
			}
			if (blockDir == 0 || blockDir == 2)
			{ 
				param.dir = 0; 
				Room room2 = this.cell.Front.room ?? this.cell.room; 
				if (room2 != null && this.tileType.IsWall) 
				{ 
					if (room2.lot.idDeco != 0 && !this.cell.hasDoor) 
					{ 
						param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room2.lot.idDeco); 
						param.matColor = room2.lot.colDeco; 
						param.y += (float)room2.lot.decoFix * 0.01f; 
						rendererWallDeco.Draw(param); 
						param.y = orgY; 
					} 
					if (room2.lot.idDeco2 != 0 && roomHeight != 0f && !flag8 && (float)room2.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y) 
					{ 
						param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room2.lot.idDeco2); 
						param.matColor = room2.lot.colDeco2; 
						param.y += (float)room2.lot.decoFix2 * 0.01f; 
						param.z += (float)room2.lot.decoFix2 * 0.01f * heightModDeco; 
						rendererWallDeco.Draw(param); 
						param.y = orgY; 
						param.z = orgZ; 
					} 
				} 
				Cell left = this.cell.Left; 
				if (blockDir == 2 && left.sourceBlock.tileType.IsWallOrFence && !this.cell.crossWall) 
				{ 
					_sourceBlock = left.sourceBlock; 
					param.mat = left.matBlock; 
				} 
				else
				{ 
					_sourceBlock = sourceBlock; 
					param.mat = matBlock; 
				} 
				this.tileType = _sourceBlock.tileType; 
				param.tile = (tile = _sourceBlock._tiles[0] + ((flag8 && !this.tileType.IsFence) ? 32 : 0)); 
				if (_sourceBlock.useAltColor) 
				{ 
					param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.altColor, _sourceBlock.colorMod)); 
				} 
				else
				{ 
					param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.matColor, _sourceBlock.colorMod)); 
				} 
				if (roomHeight == 0f || flag8 || !this.tileType.RepeatBlock) 
				{ 
					if (!this.cell.hasDoor) 
					{ 
						_sourceBlock.renderData.Draw(param); 
					} 
				} 
				else
				{ 
					_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix, this.cell.hasDoor, this.cell.effect?.FireAmount ?? 0); 
				} 
				param.z += cornerWallFix2.z; 
				if ((blockDir == 2 || (this.cell.Front.HasWallOrFence && this.cell.Front.blockDir != 0)) != this.cell.isToggleWallPillar) 
				{ 
					if (this.cell.Back.IsSnowTile && this.cell.Right.IsSnowTile) 
					{ 
						param.snow = true; 
					} 
					param.tile = _sourceBlock._tiles[0] + ((flag8 && flag9 && !this.tileType.IsFence && !flag7) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64); 
					if (roomHeight == 0f || !this.tileType.RepeatBlock || (flag8 && flag9 && !flag7)) 
					{ 
						_sourceBlock.renderData.Draw(param); 
					} 
					else
					{ 
						_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix); 
					} 
				} 
				if (!flag8 && !showRoof && this.cell.Left.HasWallOrFence && this.cell.Left.blockDir != 0 && !this.cell.isToggleWallPillar) 
				{ 
					orgX = param.x; 
					param.tile = _sourceBlock._tiles[0] + ((flag8 && !this.tileType.IsFence && !flag7) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64); 
					param.x += cornerWallFix3.x; 
					param.y += cornerWallFix3.y; 
					param.z += cornerWallFix3.z; 
					if (!flag7 && (roomHeight == 0f || flag8)) 
					{ 
						_sourceBlock.renderData.Draw(param); 
					} 
					else
					{ 
						_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight + cornerWallFix.y, ref renderSetting.peakFix); 
					} 
					param.x = orgX; 
				} 
				else if (this.cell.FrontLeft.HasWallOrFence && this.cell.FrontLeft.blockDir != 0 && (!flag8 || !this.cell.Left.HasWall) && !this.cell.isToggleWallPillar) 
				{ 
					orgX = param.x; 
					param.tile = _sourceBlock._tiles[0] + ((flag8 && !this.tileType.IsFence && !flag7) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64); 
					param.x += cornerWallFix.x; 
					param.y += cornerWallFix.y; 
					param.z += cornerWallFix.z; 
					if (!flag7 && (roomHeight == 0f || flag8)) 
					{ 
						_sourceBlock.renderData.Draw(param); 
					} 
					else
					{ 
						_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight + cornerWallFix.y, ref renderSetting.peakFix); 
					} 
					param.x = orgX; 
				} 
			} 
			if (blockDir == 1 || blockDir == 2) 
			{ 
				param.y = orgY; 
				param.z = orgZ; 
				param.dir = 1; 
				Room room3 = this.cell.Right.room ?? this.cell.room; 
			{ 
				param.dir = 0; 
				Room room3 = this.cell.Front.room ?? this.cell.room; 
				if (room3 != null && this.tileType.IsWall)
				{
					if (room3.lot.idDeco != 0 && !this.cell.hasDoor)
					{
						param.tile = -EMono.sources.blocks.rows[0].ConvertTile(1000 + room3.lot.idDeco); 
						param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room3.lot.idDeco); 
						param.matColor = room3.lot.colDeco;
						param.y += (float)room3.lot.decoFix * 0.01f;
						rendererWallDeco.Draw(param);
						param.y = orgY;
					}
					if (room3.lot.idDeco2 != 0 && roomHeight != 0f && !flag9 && (float)room3.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y) 
					if (room3.lot.idDeco2 != 0 && roomHeight != 0f && !flag10 && (float)room3.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y) 
					{
						param.tile = -EMono.sources.blocks.rows[0].ConvertTile(1000 + room3.lot.idDeco2); 
						param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room3.lot.idDeco2); 
						param.matColor = room3.lot.colDeco2;
						param.y += (float)room3.lot.decoFix2 * 0.01f;
						param.z += (float)room3.lot.decoFix2 * 0.01f * heightModDeco;

@@ -2555,29 +2885,11 @@ public virtual void DrawTile()

cs
						param.z = orgZ;
					}
				}
				if (blockDir == 2 && this.cell.room == null && this.cell.Right.room != null) 
				{ 
					Room room4 = this.cell.Right.room; 
					maxHeight = (float)(cz - cx) * screen.tileAlign.y + (float)room4.lot.mh * _heightMod.y; 
					if (showRoof) 
					{ 
						roomHeight = room4.lot.realHeight; 
					} 
					else if ((noRoofMode && currentRoom == null) || (_lowblock && !this.tileType.ForceRpeatBlock)) 
					{ 
						roomHeight = 0f; 
					} 
					else
					{ 
						int num19 = ((room4.data.maxHeight == 0) ? 2 : room4.data.maxHeight); 
						roomHeight = EMono.setting.render.roomHeightMod * (float)((room4.lot.height < num19) ? room4.lot.height : num19) + 0.01f * (float)room4.lot.heightFix; 
					} 
				} 
				Cell back2 = this.cell.Back; 
				if (blockDir == 2 && back2.sourceBlock.tileType.IsWallOrFence && !this.cell.crossWall) 
				Cell left = this.cell.Left; 
				if (blockDir == 2 && left.sourceBlock.tileType.IsWallOrFence && !this.cell.crossWall) 
				{
					_sourceBlock = back2.sourceBlock; 
					param.mat = back2.matBlock; 
					_sourceBlock = left.sourceBlock; 
					param.mat = left.matBlock; 
				}
				else
				{

@@ -2585,7 +2897,7 @@ public virtual void DrawTile()

cs
					param.mat = matBlock;
				}
				this.tileType = _sourceBlock.tileType;
				param.tile = (tile = -_sourceBlock._tiles[0] + ((flag9 && !this.tileType.IsFence) ? (-32) : 0)); 
				param.tile = (tile = _sourceBlock._tiles[0] + ((flag10 && !this.tileType.IsFence) ? 32 : 0)); 
				if (_sourceBlock.useAltColor)
				{
					param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.altColor, _sourceBlock.colorMod));

@@ -2594,8 +2906,7 @@ public virtual void DrawTile()

cs
				{
					param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.matColor, _sourceBlock.colorMod));
				}
				param.color += _rightWallShade; 
				if (roomHeight == 0f || flag9 || !this.tileType.RepeatBlock) 
				if (roomHeight == 0f || flag10 || !this.tileType.RepeatBlock) 
				{
					if (!this.cell.hasDoor)
					{

@@ -2606,15 +2917,15 @@ public virtual void DrawTile()

cs
				{
					_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix, this.cell.hasDoor, this.cell.effect?.FireAmount ?? 0);
				}
				if ((this.cell.Right.HasWallOrFence && this.cell.Right.blockDir != 1) != this.cell.isToggleWallPillar && (blockDir != 2 || !this.cell.isToggleWallPillar)) 
				param.z += cornerWallFix2.z; 
				if ((blockDir == 2 || (this.cell.Front.HasWallOrFence && this.cell.Front.blockDir != 0)) != this.cell.isToggleWallPillar) 
				{
					if (this.cell.Left.IsSnowTile && this.cell.Front.IsSnowTile) 
					if (this.cell.Back.IsSnowTile && this.cell.Right.IsSnowTile) 
					{
						param.snow = true;
					}
					orgX = param.x; 
					param.tile = _sourceBlock._tiles[0] + ((flag9 && !this.tileType.IsFence && !flag7) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64); 
					if (!flag7 && (roomHeight == 0f || !this.tileType.RepeatBlock || flag9)) 
					param.tile = _sourceBlock._tiles[0] + ((flag10 && flag11 && !this.tileType.IsFence && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64); 
					if (roomHeight == 0f || !this.tileType.RepeatBlock || (flag10 && flag11 && !flag9)) 
					{
						_sourceBlock.renderData.Draw(param);
					}

@@ -2622,513 +2933,203 @@ public virtual void DrawTile()

cs
					{
						_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix);
					}
					param.x = orgX; 
				} 
			} 
			param.y = orgY; 
			param.z = orgZ; 
			break; 
		} 
		case BlockRenderMode.HalfBlock:
			param.color = floorLight; 
			_sourceBlock = ((sourceBlock.id == 5) ? EMono.sources.blocks.rows[matBlock.defBlock] : sourceBlock); 
			param.tile = _sourceBlock._tiles[0]; 
			param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, _sourceBlock.colorMod)); 
			param.tile2 = _sourceBlock.sourceAutoFloor._tiles[0]; 
			param.halfBlockColor = ((_sourceBlock.sourceAutoFloor.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, _sourceBlock.sourceAutoFloor.colorMod)); 
			sourceBlock.renderData.Draw(param); 
			break; 
		case BlockRenderMode.Pillar:
		{ 
			RenderData renderData2 = sourceBlock.renderData; 
			param.tile = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length]; 
			param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, sourceBlock.colorMod)); 
			int num20 = this.cell.objDir + ((this.cell.objDir >= 7) ? this.cell.objDir : 0) + 1; 
			if (num20 == 0) 
			{ 
				renderData2.Draw(param); 
			} 
			else
			{ 
				renderData2.DrawRepeat(param, num20, sourceBlock.tileType.RepeatSize); 
			} 
			param.tile = renderData2.idShadow; 
			SourcePref shadowPref2 = renderData2.shadowPref; 
			int shadow4 = shadowPref2.shadow; 
			passShadow.AddShadow(param.x + renderData2.offsetShadow.x, param.y + renderData2.offsetShadow.y, param.z + renderData2.offsetShadow.z, ShadowData.Instance.items[shadow4], shadowPref2, 0, param.snow); 
			break; 
		} 
		default: 
			param.color = floorLight; 
			param.tile = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length] + ((_lowblock && this.tileType.UseLowWallTiles) ? 3000000 : 0); 
			param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, sourceBlock.colorMod)); 
			if (roomHeight == 0f) 
			{ 
				sourceBlock.renderData.Draw(param); 
			} 
			else
			{ 
				sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFixBlock); 
			} 
			break; 
		} 
	} 
	if (this.cell.pcSync && EMono.player.lightPower > 0f && !cinemaMode) 
	{ 
		if (this.cell.room != null || !this.cell.IsRoomEdge || !showRoof) 
		{ 
			goto IL_6f52; 
		} 
		if (this.cell._block == 0 || !this.cell.sourceBlock.tileType.RepeatBlock) 
		{ 
			Room obj = this.cell.FrontRight.room; 
			if (obj == null || !obj.HasRoof) 
			{ 
				goto IL_6f52; 
			} 
		} 
	} 
	goto IL_6fb2; 
	IL_7b6d: 
	if (detail.things.Count == 0 && detail.charas.Count == 0) 
	{ 
		return; 
	} 
	int num21 = 0; 
	thingPos.x = 0f; 
	thingPos.y = 0f; 
	thingPos.z = 0f; 
	freePos.x = (freePos.y = (freePos.z = 0f)); 
	if (this.cell.HasRamp) 
	{ 
		Vector3 rampFix = sourceBlock.tileType.GetRampFix(this.cell.blockDir); 
		param.x += rampFix.x; 
		param.y += rampFix.y; 
		param.z += rampFix.z; 
		freePos.x += rampFix.x; 
		freePos.y += rampFix.y; 
		freePos.z += rampFix.z; 
	} 
	param.y += (flag ? 0f : ((this.cell._bridge != 0) ? this.cell.sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight)); 
	orgPos.x = (orgX = param.x); 
	orgPos.y = (orgY = param.y); 
	orgPos.z = (orgZ = param.z); 
	if (flag && liquidLv > 0) 
	{ 
		if (liquidLv > 10) 
		{ 
			liquidLv = TileType.FloorWaterShallow.LiquidLV * 10; 
		} 
		liquidLv -= (int)(floatY * 0.5f); 
		param.liquidLv = liquidLv; 
		param.y -= TileType.FloorWaterShallow.FloorHeight; 
	} 
	Thing thing = null; 
	bool shadow = liquidLv == 0; 
	float num22 = 0f; 
	float num23 = 0f; 
	bool flag10 = false; 
	float num24 = 0f; 
	bool flag11 = false; 
	float num25 = 0f; 
	if (detail.things.Count > 0 && isSeen) 
	{ 
		_ = zSetting.max1; 
		float num26 = 0f; 
		for (int m = 0; m < detail.things.Count; m++) 
		{ 
			Thing t = detail.things[m]; 
			if ((fogged && !t.isRoofItem) || ((t.isHidden || t.trait.HideInAdv || t.isMasked) && !EMono.scene.actionMode.ShowMaskedThings) || (t.isRoofItem && ((this.room == null && !sourceBlock.tileType.IsFullBlock && !EMono._zone.IsPCFaction) || (lowBlock && !showFullWall && this.room != null) || (noRoofMode && currentRoom == null))) || (flag3 && !t.isRoofItem)) 
			{ 
				continue; 
			} 
			TileType tileType = t.trait.tileType; 
			bool isInstalled = t.IsInstalled; 
			SourcePref pref = t.Pref; 
			if (!isInstalled && t.category.tileDummy != 0) 
			{ 
				pref = rendererObjDummy.shadowPref; 
			} 
			float num27 = ((tileType.UseMountHeight && isInstalled) ? 0f : ((pref.height < 0f) ? 0f : ((pref.height == 0f) ? 0.1f : pref.height))); 
			if (t.ignoreStackHeight) 
			{ 
				thingPos.y -= num22; 
			} 
			shadow = thingPos.y < 0.16f && num25 < 0.16f; 
			_ = pref.bypassShadow; 
			param.shadowFix = 0f - thingPos.y; 
			param.liquidLv = ((thingPos.y + (float)t.altitude < 0.1f) ? liquidLv : 0); 
			if (t.isRoofItem) 
			{ 
				param.snow = isSnowCovered && !this.cell.isClearSnow; 
				SetRoofHeight(param, this.cell, cx, cz); 
				_actorPos.x = param.x; 
				_actorPos.y = param.y; 
				_actorPos.z = param.z + num26; 
				if (this.room != null) 
				{ 
					param.color = GetRoofLight(this.room.lot); 
				} 
				shadow = false; 
				param.liquidLv = 0; 
			} 
			else
			{ 
				param.snow = snowed; 
				_actorPos.x = orgX + num23; 
				_actorPos.y = orgY; 
				_actorPos.z = orgZ + num26 + thingPos.z; 
				if (tileType.CanStack || !isInstalled) 
				{ 
					if (thing?.id != t.id) 
					{ 
						_actorPos.x += thingPos.x; 
					} 
					_actorPos.y += thingPos.y; 
					if (t.trait.IgnoreLastStackHeight && (thing == null || !thing.trait.IgnoreLastStackHeight)) 
					{ 
						thingPos.y -= num22; 
						if (thing != null) 
						{ 
							_actorPos.z -= 0.2f; 
							thingPos.z -= 0.2f; 
						} 
						_actorPos.y -= num22; 
					} 
					_actorPos.z += renderSetting.thingZ + (float)m * -0.01f + zSetting.mod1 * thingPos.y; 
				}
				if (isInstalled) 
				if (!flag10 && !showRoof && this.cell.Left.HasWallOrFence && this.cell.Left.blockDir != 0 && !this.cell.isToggleWallPillar) 
				{
					if (t.TileType.IsRamp) 
					{ 
						Vector3 rampFix2 = t.TileType.GetRampFix(t.dir, pref); 
						orgX += rampFix2.x; 
						orgY += rampFix2.y; 
						orgZ += rampFix2.z; 
						freePos.x += rampFix2.x; 
						freePos.y += rampFix2.y; 
						freePos.z += rampFix2.z; 
						if (!this.cell.IsTopWater || t.altitude > 0) 
						{ 
							num25 += rampFix2.y; 
						} 
						liquidLv -= (int)(rampFix2.y * 150f); 
						if (liquidLv < 0) 
						{ 
							liquidLv = 0; 
						} 
					} 
					else if (!flag11 && t.trait.IsChangeFloorHeight && !t.ignoreStackHeight) 
					orgX = param.x; 
					param.tile = _sourceBlock._tiles[0] + ((flag10 && !this.tileType.IsFence && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64); 
					param.x += cornerWallFix3.x; 
					param.y += cornerWallFix3.y; 
					param.z += cornerWallFix3.z; 
					if (!flag9 && (roomHeight == 0f || flag10)) 
					{
						orgY += num27 + (float)t.altitude * altitudeFix.y; 
						orgZ += (float)t.altitude * altitudeFix.z; 
						freePos.y += num27 + (float)t.altitude * altitudeFix.y; 
						if (!this.cell.IsTopWater || t.altitude > 0) 
						{ 
							num25 += num27 + (float)t.altitude * altitudeFix.y; 
						} 
						_actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1)); 
						_actorPos.z += pref.z; 
						thingPos.z += pref.z; 
						liquidLv -= (int)(num27 * 150f); 
						if (liquidLv < 0) 
						{ 
							liquidLv = 0; 
						} 
						_sourceBlock.renderData.Draw(param); 
					}
					else
					{
						thingPos.y += num27; 
						_actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1)); 
						_actorPos.z += pref.z; 
						if (pref.height >= 0f) 
						{ 
							thingPos.z += pref.z; 
						} 
					} 
					if (!tileType.UseMountHeight && m > 10) 
					{ 
						flag11 = true; 
					} 
				} 
				else
				{ 
					thingPos.y += num27; 
					_actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1)); 
					_actorPos.z += pref.z; 
					thingPos.z += pref.z; 
				} 
				if (t.isFloating && isWater && !hasBridge && !flag) 
				{ 
					flag = true; 
					float num28 = ((this.cell._bridge != 0) ? sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight); 
					orgY += 0.01f * floatY - num28; 
					num24 = num27; 
					_actorPos.y += 0.01f * floatY - num28; 
					if (liquidLv > 10) 
					{ 
						liquidLv = TileType.FloorWaterShallow.LiquidLV * 10; 
					} 
					liquidLv -= (int)(floatY * 0.5f); 
					if (liquidLv < 0) 
					{ 
						liquidLv = 0; 
						_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight + cornerWallFix.y, ref renderSetting.peakFix); 
					}
					param.liquidLv = liquidLv; 
				} 
				num22 = num27; 
				if (t.sourceCard.multisize && !t.trait.IsGround) 
				{ 
					num26 += zSetting.multiZ; 
					param.x = orgX; 
				}
				orgZ += t.renderer.data.stackZ; 
				if (param.liquidLv > 0) 
				else if (this.cell.FrontLeft.HasWallOrFence && this.cell.FrontLeft.blockDir != 0 && (!flag10 || !this.cell.Left.HasWall) && !this.cell.isToggleWallPillar) 
				{
					param.liquidLv += pref.liquidMod; 
					if (param.liquidLv < 1) 
					orgX = param.x; 
					param.tile = _sourceBlock._tiles[0] + ((flag10 && !this.tileType.IsFence && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64); 
					param.x += cornerWallFix.x; 
					param.y += cornerWallFix.y; 
					param.z += cornerWallFix.z; 
					if (!flag9 && (roomHeight == 0f || flag10)) 
					{
						param.liquidLv = 1; 
						_sourceBlock.renderData.Draw(param); 
					}
					else if (param.liquidLv > 99 + pref.liquidModMax) 
					else
					{
						param.liquidLv = 99 + pref.liquidModMax; 
						_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight + cornerWallFix.y, ref renderSetting.peakFix); 
					}
					param.x = orgX; 
				}
			}
			if (isInstalled && tileType.UseMountHeight) 
			if (blockDir == 1 || blockDir == 2) 
			{
				if (tileType != TileType.Illumination || !this.cell.HasObj) 
				param.y = orgY; 
				param.z = orgZ; 
				param.dir = 1; 
				Room room4 = this.cell.Right.room ?? this.cell.room; 
				if (room4 != null && this.tileType.IsWall) 
				{
					if (noRoofMode && currentRoom == null && t.altitude >= lowWallObjAltitude) 
					if (room4.lot.idDeco != 0 && !this.cell.hasDoor) 
					{
						continue; 
						param.tile = -EMono.sources.blocks.rows[0].ConvertTile(1000 + room4.lot.idDeco); 
						param.matColor = room4.lot.colDeco; 
						param.y += (float)room4.lot.decoFix * 0.01f; 
						rendererWallDeco.Draw(param); 
						param.y = orgY; 
					}
					if (hideHang && (this.cell.room?.lot != currentLot || (!this.cell.lotWall && this.cell.room != currentRoom))) 
					if (room4.lot.idDeco2 != 0 && roomHeight != 0f && !flag11 && (float)room4.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y) 
					{
						Room room5 = ((t.dir == 0) ? this.cell.Back.room : this.cell.Left.room); 
						if (t.trait.AlwaysHideOnLowWall) 
						{ 
							if (room5 == null || !room5.data.showWallItem) 
							{ 
								continue; 
							} 
						} 
						else if (t.altitude >= lowWallObjAltitude) 
						{ 
							continue; 
						} 
						param.tile = -EMono.sources.blocks.rows[0].ConvertTile(1000 + room4.lot.idDeco2); 
						param.matColor = room4.lot.colDeco2; 
						param.y += (float)room4.lot.decoFix2 * 0.01f; 
						param.z += (float)room4.lot.decoFix2 * 0.01f * heightModDeco; 
						rendererWallDeco.Draw(param); 
						param.y = orgY; 
						param.z = orgZ; 
					}
				}
				if (tileType.UseHangZFix) 
				if (blockDir == 2 && this.cell.room == null && this.cell.Right.room != null) 
				{
					flag10 = true; 
					Room room5 = this.cell.Right.room; 
					maxHeight = (float)(cz - cx) * screen.tileAlign.y + (float)room5.lot.mh * _heightMod.y; 
					if (showRoof) 
					{ 
						roomHeight = room5.lot.realHeight; 
					} 
					else if ((noRoofMode && currentRoom == null) || (_lowblock && !this.tileType.ForceRpeatBlock)) 
					{ 
						roomHeight = 0f; 
					} 
					else
					{ 
						int num32 = ((room5.data.maxHeight == 0) ? 2 : room5.data.maxHeight); 
						roomHeight = EMono.setting.render.roomHeightMod * (float)((room5.lot.height < num32) ? room5.lot.height : num32) + 0.01f * (float)room5.lot.heightFix; 
					} 
				}
				tileType.GetMountHeight(ref _actorPos, Point.shared.Set(index), t.dir, t); 
				shadow = false; 
				param.liquidLv = 0; 
				if (t.freePos) 
				Cell back2 = this.cell.Back; 
				if (blockDir == 2 && back2.sourceBlock.tileType.IsWallOrFence && !this.cell.crossWall) 
				{
					_actorPos.x += t.fx; 
					_actorPos.y += t.fy; 
					_sourceBlock = back2.sourceBlock; 
					param.mat = back2.matBlock; 
				}
			} 
			else
			{ 
				if (t.altitude != 0) 
				else
				{
					_actorPos += altitudeFix * t.altitude; 
					if (t.altitude > 2 && ((this.cell.Back.room != null && this.cell.Back.IsRoomEdge) || (this.cell.Left.room != null && this.cell.Left.IsRoomEdge)) && hideHang && (this.cell.room?.lot != currentLot || (!this.cell.lotWall && this.cell.room != currentRoom))) 
					{ 
						continue; 
					} 
					_sourceBlock = sourceBlock; 
					param.mat = matBlock; 
				}
				if (t.freePos) 
				this.tileType = _sourceBlock.tileType; 
				param.tile = (tile = -_sourceBlock._tiles[0] + ((flag11 && !this.tileType.IsFence) ? (-32) : 0)); 
				if (_sourceBlock.useAltColor) 
				{
					_actorPos.x = orgX + t.fx - freePos.x; 
					_actorPos.y = orgY + t.fy - freePos.y; 
					param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.altColor, _sourceBlock.colorMod)); 
				}
				if (t.trait is TraitDoor && (t.trait as TraitDoor).IsOpen()) 
				else
				{
					_actorPos.z += -0.5f; 
					param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.matColor, _sourceBlock.colorMod)); 
				}
			} 
			if (!t.sourceCard.multisize || (t.pos.x == cx && t.pos.z == cz)) 
			{ 
				if (iconMode != 0) 
				param.color += _rightWallShade; 
				if (roomHeight == 0f || flag11 || !this.tileType.RepeatBlock) 
				{
					int num29 = 0; 
					switch (iconMode) 
					{ 
					case CardIconMode.Visibility: 
						if (t.isMasked) 
						{ 
							num29 = 17; 
						} 
						break; 
					case CardIconMode.State: 
						if (t.placeState == PlaceState.installed) 
						{ 
							num29 = 18; 
						} 
						break; 
					case CardIconMode.Deconstruct: 
						if (t.isDeconstructing) 
						{ 
							num29 = 14; 
						} 
						break; 
					} 
					if (t.isNPCProperty && !EMono.debug.godBuild) 
					{ 
						num29 = 13; 
					} 
					if (num29 != 0) 
					if (!this.cell.hasDoor) 
					{
						passGuideBlock.Add(_actorPos.x, _actorPos.y, _actorPos.z - 10f, num29); 
						_sourceBlock.renderData.Draw(param); 
					}
				}
				t.SetRenderParam(param); 
				if (_lowblock && t.trait.UseLowblock && !this.cell.HasFullBlock) 
				else
				{
					param.tile += ((param.tile < 0f) ? (-64) : 64); 
					_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix, this.cell.hasDoor, this.cell.effect?.FireAmount ?? 0); 
				}
				if (t.trait is TraitTrolley && EMono.pc.ai is AI_Trolley aI_Trolley && aI_Trolley.trolley.owner == t) 
				if ((this.cell.Right.HasWallOrFence && this.cell.Right.blockDir != 1) != this.cell.isToggleWallPillar && (blockDir != 2 || !this.cell.isToggleWallPillar)) 
				{
					RenderParam _param = new RenderParam(param); 
					EMono.core.actionsLateUpdate.Add(delegate
					if (this.cell.Left.IsSnowTile && this.cell.Front.IsSnowTile) 
					{
						t.SetRenderParam(_param); 
						_actorPos.x = EMono.pc.renderer.position.x; 
						_actorPos.y = EMono.pc.renderer.position.y - pref.height; 
						_actorPos.z = EMono.pc.renderer.position.z + 0.02f; 
						t.renderer.Draw(_param, ref _actorPos, !t.noShadow && (shadow || tileType.AlwaysShowShadow)); 
					}); 
				} 
				else
				{ 
					t.renderer.Draw(param, ref _actorPos, !t.noShadow && (shadow || tileType.AlwaysShowShadow)); 
						param.snow = true; 
					} 
					orgX = param.x; 
					param.tile = _sourceBlock._tiles[0] + ((flag11 && !this.tileType.IsFence && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64); 
					if (!flag9 && (roomHeight == 0f || !this.tileType.RepeatBlock || flag11)) 
					{ 
						_sourceBlock.renderData.Draw(param); 
					} 
					else
					{ 
						_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix); 
					} 
					param.x = orgX; 
				}
			}
			if (isInstalled) 
			{ 
				num23 += pref.stackX * (float)((!t.flipX) ? 1 : (-1)); 
			} 
			param.x = orgX; 
			param.y = orgY;
			param.z = orgZ;
			break; 
		} 
		case BlockRenderMode.HalfBlock:
			param.color = floorLight;
			thing = t; 
			if (pref.Float) 
			_sourceBlock = ((sourceBlock.id == 5) ? EMono.sources.blocks.rows[matBlock.defBlock] : sourceBlock); 
			param.tile = _sourceBlock._tiles[0]; 
			param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, _sourceBlock.colorMod)); 
			param.tile2 = _sourceBlock.sourceAutoFloor._tiles[0]; 
			param.halfBlockColor = ((_sourceBlock.sourceAutoFloor.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, _sourceBlock.sourceAutoFloor.colorMod)); 
			sourceBlock.renderData.Draw(param); 
			break; 
		case BlockRenderMode.Pillar:
		{ 
			RenderData renderData2 = sourceBlock.renderData; 
			param.tile = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length]; 
			param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, sourceBlock.colorMod)); 
			int num33 = this.cell.objDir + ((this.cell.objDir >= 7) ? this.cell.objDir : 0) + 1; 
			if (num33 == 0) 
			{
				liquidLv = 0; 
				renderData2.Draw(param); 
			}
		} 
	} 
	orgY += num24; 
	if (detail.charas.Count <= 0) 
	{ 
		return; 
	} 
	param.shadowFix = 0f - num25; 
	param.color += 1310720f; 
	float max = zSetting.max2; 
	for (int n = 0; n < detail.charas.Count; n++) 
	{ 
		Chara chara = detail.charas[n]; 
		if (chara.host != null || (chara != EMono.pc && chara != LayerDrama.alwaysVisible && (flag3 || fogged || (!showAllCards && !EMono.player.CanSee(chara))))) 
		{ 
			continue; 
		} 
		_actorPos.x = orgX; 
		_actorPos.y = orgY; 
		_actorPos.z = orgZ; 
		chara.SetRenderParam(param); 
		_ = chara.IsAliveInCurrentZone; 
		if (chara.isRestrained) 
		{ 
			TraitShackle restrainer = chara.GetRestrainer(); 
			if (restrainer != null) 
			else
			{
				Vector3 getRestrainPos = restrainer.GetRestrainPos; 
				if (getRestrainPos != default(Vector3)) 
				{ 
					Vector3 position = restrainer.owner.renderer.position; 
					float defCharaHeight = EMono.setting.render.defCharaHeight; 
					float num30 = getRestrainPos.y + defCharaHeight - ((chara.Pref.height == 0f) ? defCharaHeight : chara.source.pref.height); 
					_actorPos.x = position.x + getRestrainPos.x * (float)((restrainer.owner.dir % 2 == 0) ? 1 : (-1)); 
					_actorPos.y = position.y + num30; 
					_actorPos.z = position.z + getRestrainPos.z; 
					param.liquidLv = 0; 
					param.shadowFix = orgY - _actorPos.y; 
					chara.renderer.SetFirst(first: true); 
					chara.renderer.Draw(param, ref _actorPos, drawShadow: true); 
					param.shadowFix = 0f; 
					continue; 
				} 
				renderData2.DrawRepeat(param, num33, sourceBlock.tileType.RepeatSize); 
			}
			param.tile = renderData2.idShadow; 
			SourcePref shadowPref2 = renderData2.shadowPref; 
			int shadow4 = shadowPref2.shadow; 
			passShadow.AddShadow(param.x + renderData2.offsetShadow.x, param.y + renderData2.offsetShadow.y, param.z + renderData2.offsetShadow.z, ShadowData.Instance.items[shadow4], shadowPref2, 0, param.snow); 
			break; 
		}
		if (!chara.sourceCard.multisize || (chara.pos.x == cx && chara.pos.z == cz)) 
		{ 
			if (chara.IsDeadOrSleeping && chara.IsPCC) 
		default: 
			param.color = floorLight; 
			param.tile = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length] + ((_lowblock && this.tileType.UseLowWallTiles) ? 3000000 : 0); 
			param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, sourceBlock.colorMod)); 
			if (roomHeight == 0f) 
			{
				float num31 = chara.renderer.data.size.y * 0.3f; 
				if (thingPos.y > max) 
				{ 
					thingPos.y = max; 
				} 
				float num32 = thingPos.y + num31; 
				float num33 = (float)n * -0.01f; 
				if (num32 > zSetting.thresh1) 
				{ 
					num33 = zSetting.mod1; 
				} 
				_actorPos.x += thingPos.x; 
				_actorPos.y += thingPos.y; 
				_actorPos.z += renderSetting.laydownZ + num33; 
				param.liquidLv = ((thingPos.y == 0f && liquidLv > 0) ? 90 : 0); 
				thingPos.y += num31 * 0.8f; 
				chara.renderer.Draw(param, ref _actorPos, liquidLv == 0); 
				sourceBlock.renderData.Draw(param); 
			}
			else
			{
				param.liquidLv = liquidLv; 
				if (param.liquidLv > 0) 
				{ 
					param.liquidLv += chara.Pref.liquidMod; 
					if (param.liquidLv < 1) 
					{ 
						param.liquidLv = 1; 
					} 
					else if (param.liquidLv > 99 + chara.Pref.liquidModMax) 
					{ 
						param.liquidLv = 99 + chara.Pref.liquidModMax; 
					} 
				} 
				if (!chara.IsPC && !chara.renderer.IsMoving && detail.charas.Count > 1 && (detail.charas.Count != 2 || !detail.charas[0].IsDeadOrSleeping || !detail.charas[0].IsPCC)) 
				{ 
					_actorPos += renderSetting.charaPos[1 + ((num21 < 4) ? num21 : 3)]; 
				} 
				_actorPos.z += 0.01f * (float)n + renderSetting.charaZ; 
				num21++; 
				if (flag10) 
				{ 
					_actorPos.z += chara.renderer.data.hangedFixZ; 
				} 
				chara.renderer.Draw(param, ref _actorPos, liquidLv == 0); 
				sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFixBlock); 
			}
			break; 
		}
		param.x = orgX; 
		param.y = orgY; 
		param.z = orgZ; 
	}
	return; 
	IL_6f52: 
	if (!showRoof || !roof || this.cell.room == null || this.cell.Front.room == null || this.cell.Right.room == null) 
	if (this.cell.pcSync && EMono.player.lightPower > 0f && !cinemaMode) 
	{
		param.tile = num14; 
		rendererFov.Draw(param); 
		if (this.cell.room != null || !this.cell.IsRoomEdge || !showRoof) 
		{ 
			goto IL_6f65; 
		} 
		if (this.cell._block == 0 || !this.cell.sourceBlock.tileType.RepeatBlock) 
		{ 
			Room obj = this.cell.FrontRight.room; 
			if (obj == null || !obj.HasRoof) 
			{ 
				goto IL_6f65; 
			} 
		} 
	}
	goto IL_6fb2; 
	goto IL_6fc5; 
	void Draw(int tile)
	{
		pass = passEdge;

BuildMenu

@@ -138,7 +138,7 @@ public void OnActivate()

cs
	}
	EMono.ui.HideFloats();
	this.SetActive(mode != Mode.None);
	transMain.SetActive(mode == Mode.Build && (EMono.debug.godBuild || EMono._zone.elements.Has(4005))); 
	transMain.SetActive(mode == Mode.Build && (EMono.debug.godBuild || EMono._zone.elements.Has(4005) || (EMono._zone is Zone_Tent && EMono.pc.homeBranch.elements.Has(4005)))); 
	switch (mode)
	{
	case Mode.Build:

Card

@@ -3801,6 +3801,14 @@ public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource

cs
		{
			dmg = dmg * (100 - (int)Mathf.Min(80f, Mathf.Sqrt(LV - 50) * 2.5f)) / 100;
		}
		if (EClass.game.principal.enableDamageReduction && IsPCFaction) 
		{ 
			int num = ((origin != null) ? origin.LV : EClass._zone.DangerLv); 
			if (num > 50) 
			{ 
				dmg = dmg * (100 - (int)Mathf.Min(95f, Mathf.Sqrt(num - 50))) / 100; 
			} 
		} 
		dmg = dmg * Mathf.Max(0, 100 - Evalue((e == Element.Void || e.id == 926) ? 55 : 56)) / 100;
		if (origin != null && origin.IsPC && EClass.player.codex.Has(id))
		{

@@ -3820,26 +3828,26 @@ public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource

cs
		}
		if (EClass.pc.HasElement(1207) && isChara)
		{
			int num = 0; 
			int num2 = 0;
			int num3 = 0; 
			foreach (Condition condition2 in Chara.conditions)
			{
				if (condition2.Type == ConditionType.Buff)
				{
					num++; 
					num2++; 
				}
				else if (condition2.Type == ConditionType.Debuff)
				{
					num2++; 
					num3++; 
				}
			}
			if (IsPCParty)
			{
				dmg = dmg * 100 / Mathf.Min(100 + num * 5, 120); 
				dmg = dmg * 100 / Mathf.Min(100 + num2 * 5, 120); 
			}
			else
			{
				dmg = dmg * Mathf.Min(100 + num2 * 5, 120) / 100; 
				dmg = dmg * Mathf.Min(100 + num3 * 5, 120) / 100; 
			}
		}
		if (IsPCParty && EClass.pc.ai is GoalAutoCombat)

@@ -3856,10 +3864,10 @@ public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource

cs
		}
		if (dmg >= MaxHP / 10 && Evalue(68) > 0)
		{
			int num3 = MaxHP / 10; 
			int num4 = dmg - num3; 
			num4 = num4 * 100 / (200 + Evalue(68) * 10); 
			dmg = num3 + num4; 
			int num4 = MaxHP / 10; 
			int num5 = dmg - num4; 
			num5 = num5 * 100 / (200 + Evalue(68) * 10); 
			dmg = num4 + num5; 
		}
	}
	if (origin != null && origin.IsPC && EClass.pc.Evalue(654) > 0)

@@ -3870,19 +3878,19 @@ public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource

cs
	{
		dmg = 0;
	}
	int num5 = Mathf.Clamp(dmg * 6 / MaxHP, 0, 4) + ((dmg > 0) ? 1 : 0); 
	int num6 = Mathf.Clamp(dmg * 6 / MaxHP, 0, 4) + ((dmg > 0) ? 1 : 0); 
	if (Evalue(1421) > 0)
	{
		int num6 = 0; 
		int num7 = dmg; 
		int num7 = 0; 
		int num8 = dmg; 
		if (hp > 0)
		{
			num7 = dmg - hp; 
			num8 = dmg - hp; 
			hp -= dmg;
			num6 += dmg; 
			num7 += dmg; 
			if (hp < 0 && Chara.mana.value >= 0)
			{
				num6 += hp; 
				num7 += hp; 
				hp = 0;
			}
		}

@@ -3890,22 +3898,22 @@ public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource

cs
		{
			if (Evalue(1421) >= 2)
			{
				num7 /= 2; 
				num8 /= 2; 
			}
			dmg = num7; 
			dmg = num8; 
			if (Chara.mana.value > 0)
			{
				num7 -= Chara.mana.value; 
				num8 -= Chara.mana.value; 
				Chara.mana.value -= dmg;
				num6 += dmg; 
				num7 += dmg; 
			}
			if (Chara.mana.value <= 0)
			{
				hp -= num7; 
				num6 += num7; 
				hp -= num8; 
				num7 += num8; 
			}
		}
		dmg = num6; 
		dmg = num7; 
	}
	else
	{

@@ -3925,9 +3933,9 @@ public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource

cs
				if (e != Element.Void)
				{
					c2 = EClass.Colors.elementColors.TryGetValue(e.source.alias);
					float num14 = (c2.r + c2.g + c2.b) / 3f; 
					num14 = ((num14 > 0.5f) ? 0f : (0.6f - num14)); 
					c2 = new Color(c2.r + num14, c2.g + num14, c2.b + num14, 1f); 
					float num15 = (c2.r + c2.g + c2.b) / 3f; 
					num15 = ((num15 > 0.5f) ? 0f : (0.6f - num15)); 
					c2 = new Color(c2.r + num15, c2.g + num15, c2.b + num15, 1f); 
				}
				popper.SetText(dmg.ToString() ?? "", c2);
			}

@@ -3995,7 +4003,7 @@ public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource

cs
					if (EClass.player.invlunerable)
					{
						EvadeDeath();
						goto IL_0a8f; 
						goto IL_0af8; 
					}
				}
				if (IsPC && Evalue(1220) > 0 && Chara.stamina.value >= Chara.stamina.max / 2)

@@ -4007,8 +4015,8 @@ public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource

cs
			}
		}
	}
	goto IL_0a8f; 
	IL_0a8f: 
	goto IL_0af8; 
	IL_0af8: 
	if (trait.CanBeAttacked)
	{
		renderer.PlayAnime(AnimeID.HitObj);

@@ -4141,20 +4149,20 @@ public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource

cs
	}
	else if ((attackSource == AttackSource.Melee || attackSource == AttackSource.Range) && origin != null)
	{
		(IsPC ? EClass.pc : origin).Say("dmgMelee" + num5 + (IsPC ? "pc" : ""), origin, this); 
		(IsPC ? EClass.pc : origin).Say("dmgMelee" + num6 + (IsPC ? "pc" : ""), origin, this); 
	}
	else if (isChara)
	{
		int num8 = ((attackSource != AttackSource.Condition && attackSource != AttackSource.WeaponEnchant) ? 1 : 2); 
		if (num5 >= num8) 
		int num9 = ((attackSource != AttackSource.Condition && attackSource != AttackSource.WeaponEnchant) ? 1 : 2); 
		if (num6 >= num9) 
		{
			if (e != Element.Void)
			{
				Say("dmg_" + e.source.alias, this);
			}
			if (e == Element.Void || num5 >= 2) 
			if (e == Element.Void || num6 >= 2) 
			{
				Say("dmg" + num5, this); 
				Say("dmg" + num6, this); 
			}
		}
	}

@@ -4199,15 +4207,15 @@ public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource

cs
			elements.ModExp(123, a3);
		}
	}
	int num9 = ((EClass.rnd(2) == 0) ? 1 : 0); 
	int num10 = ((EClass.rnd(2) == 0) ? 1 : 0); 
	if (attackSource == AttackSource.Condition)
	{
		num9 = 1 + EClass.rnd(2); 
		num10 = 1 + EClass.rnd(2); 
	}
	if (num9 > 0) 
	if (num10 > 0) 
	{
		bool flag = Chara.HasCondition<ConPoison>() || ((e.id == 915 || e.id == 923) && ResistLv(Evalue(955)) < 4);
		AddBlood(num9, flag ? 6 : (-1)); 
		AddBlood(num10, flag ? 6 : (-1)); 
	}
	bool flag2 = true;
	switch (e.id)

@@ -4359,14 +4367,14 @@ public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource

cs
	}
	if (IsPC)
	{
		float num10 = (float)hp / (float)MaxHP; 
		float num11 = (float)hp / (float)MaxHP; 
		if (Evalue(1421) > 0)
		{
			num10 = (float)Chara.mana.value / (float)Chara.mana.max; 
			num11 = (float)Chara.mana.value / (float)Chara.mana.max; 
		}
		if (num10 < 0.3f) 
		if (num11 < 0.3f) 
		{
			PlaySound("heartbeat", 1f - num10 * 2f); 
			PlaySound("heartbeat", 1f - num11 * 2f); 
		}
	}
	if (!IsPC && hp < MaxHP / 5 && Evalue(423) <= 0 && dmg * 100 / MaxHP + 10 > EClass.rnd(IsPowerful ? 400 : 150) && !HasCondition<ConFear>())

@@ -4439,29 +4447,29 @@ void ProcAbsorb()

cs
			int valueOrDefault2 = (origin.Evalue(661) + weapon?.Evalue(661, ignoreGlobalElement: true)).GetValueOrDefault();
			if (valueOrDefault > 0 && attackSource == AttackSource.Melee && origin.isChara && Chara.IsHostile(origin as Chara))
			{
				int num11 = EClass.rnd(3 + Mathf.Clamp(dmg / 100, 0, valueOrDefault / 10)); 
				origin.Chara.stamina.Mod(num11); 
				int num12 = EClass.rnd(3 + Mathf.Clamp(dmg / 100, 0, valueOrDefault / 10)); 
				origin.Chara.stamina.Mod(num12); 
				if (IsAliveInCurrentZone)
				{
					Chara.stamina.Mod(-num11); 
					Chara.stamina.Mod(-num12); 
				}
			}
			if (origin.HasElement(1350) && attackSource == AttackSource.Melee)
			{
				int num12 = EClass.rndHalf(2 + Mathf.Clamp(dmg / 10, 0, origin.Chara.GetPietyValue() + 10)); 
				origin.Chara.mana.Mod(num12); 
				int num13 = EClass.rndHalf(2 + Mathf.Clamp(dmg / 10, 0, origin.Chara.GetPietyValue() + 10)); 
				origin.Chara.mana.Mod(num13); 
				if (IsAliveInCurrentZone)
				{
					Chara.mana.Mod(-num12); 
					Chara.mana.Mod(-num13); 
				}
			}
			if (valueOrDefault2 > 0 && attackSource == AttackSource.Melee)
			{
				int num13 = EClass.rnd(2 + Mathf.Clamp(dmg / 10, 0, valueOrDefault2 + 10)); 
				origin.Chara.mana.Mod(num13); 
				int num14 = EClass.rnd(2 + Mathf.Clamp(dmg / 10, 0, valueOrDefault2 + 10)); 
				origin.Chara.mana.Mod(num14); 
				if (IsAliveInCurrentZone)
				{
					Chara.mana.Mod(-num13); 
					Chara.mana.Mod(-num14); 
				}
			}
		}

@@ -6099,7 +6107,7 @@ public void Say(string lang, Card c1, string ref1 = null, string ref2 = null)

cs

	public string GetTalkText(string idTopic, bool stripPun = false, bool useDefault = true)
	{
		bool flag = isChara && Chara.IsHuman; 
		bool flag = isChara && Chara.IsHumanSpeak; 
		string text = MOD.listTalk.GetTalk(c_idTalk.IsEmpty(id), idTopic, useDefault, flag);
		if (!text.IsEmpty())
		{

Chara

@@ -2962,7 +2962,7 @@ public void TryPush(Point point)

cs
					c.ModCurrency(num);
					c.PlaySound("steal_money");
				}
				else if (IsPC && !c.IsPCParty && !c.IsUnique && c.IsHuman && EClass.rnd(5) == 0) 
				else if (IsPC && !c.IsPCParty && !c.IsUnique && c.IsHumanSpeak && EClass.rnd(5) == 0) 
				{
					c.Talk("pushed");
				}

@@ -5429,6 +5429,17 @@ public bool UseAbility(Act a, Card tc = null, Point pos = null, bool pt = false)

cs
		return true;
	}
	bool flag2 = true;
	switch (a.id) 
	{ 
	case 9150: 
		EClass.player.forceTalk = true; 
		Talk("ab_meteor"); 
		break; 
	case 6662: 
		EClass.player.forceTalk = true; 
		Talk("ab_swarm"); 
		break; 
	} 
	if (pt)
	{
		Act.forcePt = true;

@@ -7645,14 +7656,14 @@ public void GiveLovePotion(Chara c, Thing t)

cs

	public void RequestProtection(Chara attacker, Action<Chara> action)
	{
		if (HasCondition<StanceTaunt>() || base.isRestrained || attacker == this || (host != null && host.isRestrained) || (IsPCFaction && attacker.IsPCFaction)) 
		if (HasCondition<StanceTaunt>() || base.isRestrained || attacker == this || (host != null && host.isRestrained) || (base.IsPCFactionOrMinion && attacker.IsPCFactionOrMinion)) 
		{
			return;
		}
		bool flag = false;
		foreach (Chara chara in EClass._map.charas)
		{
			if (chara == attacker || chara.enemy == this || chara == this || chara.host != null || chara.IsDisabled || !chara.IsFriendOrAbove(this) || chara.conSuspend != null || (chara.IsPCParty && !IsPCParty) || (IsPCFaction && !chara.IsPCFaction)) 
			if (chara == attacker || chara.enemy == this || chara == this || chara.host != null || chara.IsDisabled || !chara.IsFriendOrAbove(this) || chara.conSuspend != null || (chara.IsPCParty && !IsPCParty) || (IsPCFaction && !chara.IsPCFaction) || (attacker.IsPCFactionOrMinion && chara.IsPCFactionOrMinion)) 
			{
				continue;
			}

DOMAIN

@@ -2,42 +2,42 @@

cs

public class DOMAIN
{
	public const int domHealing = 811; 
	public const int domOblivion = 813; 

	public const int domWind = 807; 

	public const int domLuck = 810;

	public const int domMachine = 809;

	public const int domOblivion = 813; 

	public const int domHarvest = 808; 
	public const int domHarmony = 815; 

	public const int domEyth = 814;

	public const int domHarmony = 815; 
	public const int domEarth = 812; 

	public const int domFaith = 802; 
	public const int domHarvest = 808; 

	public const int domEarth = 812; 
	public const int domComm = 805; 

	public const int domWind = 807; 
	public const int domTest = 800; 

	public const int domElement = 806; 
	public const int domHealing = 811; 

	public const int domComm = 805; 
	public const int domElement = 806; 

	public const int domArcane = 804;

	public const int domMiracle = 803;

	public const int domSurvival = 801; 
	public const int domFaith = 802; 

	public const int domTest = 800; 
	public const int domSurvival = 801; 

	public static readonly int[] IDS = new int[16]
	{
		811, 810, 809, 813, 808, 814, 815, 802, 812, 807, 
		806, 805, 804, 803, 801, 800
		813, 807, 810, 809, 815, 814, 812, 808, 805, 800, 
		811, 806, 804, 803, 802, 801
	};
}
public class Domain : EClass

DramaCustomSequence

@@ -39,7 +39,7 @@ public void Build(Chara c)

cs
	_ = c.Name;
	string rumor = (c.IsPCParty ? GetTalk("sup") : GetRumor(c));
	Layer layer = null;
	bool flag3 = c.IsHuman || EClass.pc.HasElement(1640); 
	bool flag3 = c.IsHumanSpeak || EClass.pc.HasElement(1640); 
	if (!flag)
	{
		Step("Resident");

EClass

@@ -47,6 +47,14 @@ public class EClass

cs

	public static CoreDebug debug => core.debug;

	public static int rndSeed(int a, int seed) 
	{ 
		Rand.SetSeed(seed); 
		int result = rnd(a); 
		Rand.SetSeed(); 
		return result; 
	} 

	public static int rnd(int a)
	{
		return Rand.rnd(a);

ELEMENT

@@ -5,27 +5,27 @@

cs

public class ELEMENT
{
	public const int purity = 759; 

	public const int roasted = 762;

	public const int stimulant = 760; 
	public const int antidote = 753; 

	public const int comfort = 750; 
	public const int recharge = 761; 

	public const int rare = 751; 
	public const int purity = 759; 

	public const int cute = 752; 
	public const int hotspring = 756; 

	public const int antidote = 753; 
	public const int blood = 755; 

	public const int nerve = 754;

	public const int blood = 755; 
	public const int comfort = 750; 

	public const int recharge = 761; 
	public const int rare = 751; 

	public const int hotspring = 756; 
	public const int stimulant = 760; 

	public const int cute = 752; 

	public const int _void = 0;

@@ -75,8 +75,8 @@ public class ELEMENT

cs

	public static readonly int[] IDS = new int[34]
	{
		759, 762, 760, 750, 751, 752, 753, 754, 755, 761, 
		756, 0, 3, 1, 2, 5, 10, 11, 12, 13, 
		762, 753, 761, 759, 756, 755, 754, 750, 751, 760, 
		752, 0, 3, 1, 2, 5, 10, 11, 12, 13, 
		14, 16, 17, 18, 15, 21, 22, 23, 24, 25,
		26, 29, 85, 20
	};

@@ -660,24 +660,36 @@ public void _WriteNote(UINote n, Chara c, Act act)

cs
		n.Space();
		n.AddText("isGlobalAct".lang());
	}
	if (cost.type != 0 && cost.cost != 0) 
	if (cost.type == Act.CostType.None || cost.cost == 0) 
	{
		n.Space(4); 
		UIItem uIItem = n.AddExtra<UIItem>("costPrice"); 
		int num = cost.cost; 
		if (cost.type == Act.CostType.MP && c.Evalue(483) > 0) 
		return; 
	} 
	n.Space(4); 
	UIItem uIItem = n.AddExtra<UIItem>("costPrice"); 
	int num = cost.cost; 
	if (cost.type == Act.CostType.MP) 
	{ 
		if (c.Evalue(483) > 0) 
		{
			num = cost.cost * 100 / (100 + (int)Mathf.Sqrt(c.Evalue(483) * 10) * 3);
		}
		string text4 = cost.cost.ToString() ?? ""; 
		if (num != cost.cost) 
		if (c.IsPC && c.HasCondition<StanceManaCost>()) 
		{
			text4 = num + " (" + text4 + ")"; 
			int num2 = c.Evalue(1657); 
			if (num2 > 0 && vPotential >= 2) 
			{ 
				num = num * (100 - num2 * 20) / 100; 
			} 
		}
		uIItem.text1.SetText(text4, (((cost.type == Act.CostType.MP) ? c.mana.value : c.stamina.value) >= num) ? FontColor.Good : FontColor.Bad); 
		uIItem.image1.sprite = ((cost.type == Act.CostType.MP) ? EClass.core.refs.icons.mana : EClass.core.refs.icons.stamina); 
		uIItem.image1.SetNativeSize(); 
	}
	string text4 = cost.cost.ToString() ?? ""; 
	if (num != cost.cost) 
	{ 
		text4 = num + " (" + text4 + ")"; 
	} 
	uIItem.text1.SetText(text4, (((cost.type == Act.CostType.MP) ? c.mana.value : c.stamina.value) >= num) ? FontColor.Good : FontColor.Bad); 
	uIItem.image1.sprite = ((cost.type == Act.CostType.MP) ? EClass.core.refs.icons.mana : EClass.core.refs.icons.stamina); 
	uIItem.image1.SetNativeSize(); 
	string Calc()
	{
		Dice dice = Dice.Create(e, c);

ENC

@@ -68,7 +68,7 @@ public class ENC

cs

	public const int negateFear = 423;

	public const int negateBlind = 421; 
	public const int negateParalysis = 422; 

	public const int negatePoison = 420;

@@ -114,7 +114,7 @@ public class ENC

cs

	public const int sustain_STR = 440;

	public const int negateParalysis = 422; 
	public const int negateBlind = 421; 

	public const int sustain_DEX = 442;

@@ -128,10 +128,10 @@ public class ENC

cs

	public const int mod_reload = 601;

	public const int mod_ammo = 600; 

	public const int sustain_END = 441;

	public const int slot_rune = 484; 

	public const int optimizeMana = 483;

	public const int force_weapon = 482;

@@ -148,7 +148,7 @@ public class ENC

cs

	public const int bane_machine = 465;

	public const int slot_rune = 484; 
	public const int mod_ammo = 600; 

	public const int bane_animal = 463;

@@ -173,11 +173,11 @@ public class ENC

cs
		653, 652, 651, 650, 641, 624, 621, 622, 623, 654,
		640, 655, 851, 660, 661, 662, 663, 664, 665, 666,
		850, 620, 865, 852, 656, 608, 464, 606, 428, 427,
		426, 425, 424, 423, 421, 420, 418, 417, 416, 415, 
		426, 425, 424, 423, 422, 420, 418, 417, 416, 415, 
		414, 412, 411, 410, 409, 408, 407, 406, 405, 404,
		403, 402, 401, 400, 607, 429, 440, 422, 442, 605, 
		604, 603, 602, 601, 600, 441, 483, 482, 481, 480, 
		468, 467, 466, 465, 484, 463, 462, 461, 460, 447, 
		403, 402, 401, 400, 607, 429, 440, 421, 442, 605, 
		604, 603, 602, 601, 441, 484, 483, 482, 481, 480, 
		468, 467, 466, 465, 600, 463, 462, 461, 460, 447, 
		446, 445, 444, 443
	};
}

EffectId

@@ -113,5 +113,6 @@ public enum EffectId

cs
	Scream = 289,
	DropMine = 290,
	ThrowPotion = 291,
	DrainMana = 292
	DrainMana = 292, 
	Swarm = 293
}

FACTION

@@ -20,7 +20,7 @@ public class FACTION

cs

	public const int fRation = 2207;

	public const int fLoyal = 2117; 
	public const int fEducation = 2116; 

	public const int bfGeyser = 3701;

@@ -42,13 +42,13 @@ public class FACTION

cs

	public const int fHeirloom = 2120;

	public const int fEducation = 2116; 
	public const int fTaxEvasion = 2119; 

	public const int fAdmin = 2115;

	public const int fLuck = 2118; 
	public const int fLoyal = 2117; 

	public const int fTaxEvasion = 2119; 
	public const int fLuck = 2118; 

	public const int bfRuin = 3702;

@@ -110,9 +110,9 @@ public class FACTION

cs

	public static readonly int[] IDS = new int[52]
	{
		3500, 3600, 3601, 3602, 3603, 3700, 3605, 2207, 2117, 3701, 
		3604, 2206, 2202, 2204, 2203, 2003, 2201, 2200, 2120, 2116, 
		2115, 2118, 2119, 3702, 2205, 3703, 3707, 3705, 4006, 4005, 
		3500, 3600, 3601, 3602, 3603, 3700, 3605, 2207, 2116, 3701, 
		3604, 2206, 2202, 2204, 2203, 2003, 2201, 2200, 2120, 2119, 
		2115, 2117, 2118, 3702, 2205, 3703, 3707, 3705, 4006, 4005, 
		4004, 4003, 4002, 4001, 3704, 3900, 3805, 3804, 3803, 4000,
		3801, 3802, 3708, 3709, 3710, 3780, 3706, 3782, 3783, 3784,
		3800, 3781

FEAT

@@ -59,7 +59,7 @@ public class FEAT

cs

	public const int featChef = 1658;

	public const int featManaCost = 1657; 
	public const int featScavenger = 1656; 

	public const int featModelBeliever = 1655;

@@ -103,7 +103,7 @@ public class FEAT

cs

	public const int featReboot = 1410;

	public const int featScavenger = 1656; 
	public const int featManaCost = 1657; 

	public const int featPaladin2 = 1408;

@@ -207,10 +207,12 @@ public class FEAT

cs

	public const int featCosmicHorror = 1233;

	public const int featGod_moonshadow1 = 1350; 
	public const int featWizard = 1402; 

	public const int featGod_trickery1 = 1345;

	public const int featGod_moonshadow1 = 1350; 

	public const int featGod_strife1 = 1355;

	public const int featWarrior = 1400;

@@ -221,11 +223,9 @@ public class FEAT

cs

	public const int featArcher = 1404;

	public const int featPianist = 1405; 

	public const int featTourist = 1406;

	public const int featWizard = 1402; 
	public const int featPianist = 1405; 

	public const int featPaladin = 1407;

@@ -233,16 +233,16 @@ public class FEAT

cs
	{
		1628, 1627, 1626, 1625, 1624, 1623, 1622, 1621, 1620, 1612,
		1412, 1610, 1421, 1420, 1419, 1418, 1417, 1416, 1415, 1414,
		1413, 1629, 1611, 1630, 1645, 1632, 1411, 1658, 1657, 1655, 
		1413, 1629, 1611, 1630, 1645, 1632, 1411, 1658, 1656, 1655, 
		1654, 1653, 1652, 1651, 1650, 1649, 1631, 1648, 1646, 1644,
		1643, 1642, 1641, 1640, 1636, 1635, 1634, 1633, 1647, 1410,
		1656, 1408, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 
		1657, 1408, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 
		1234, 1235, 1236, 1237, 1238, 1239, 1300, 1305, 1310, 1315,
		1320, 1325, 1330, 1224, 1223, 1222, 1221, 1409, 1200, 1201,
		1202, 1203, 1204, 1205, 1206, 1207, 1208, 1335, 1209, 1211,
		1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1210,
		1340, 1233, 1350, 1345, 1355, 1400, 1401, 1403, 1404, 1405, 
		1406, 1402, 1407
		1340, 1233, 1402, 1345, 1350, 1355, 1400, 1401, 1403, 1404, 
		1406, 1405, 1407
	};
}
public class Feat : Element

FOOD

@@ -1,22 +1,22 @@

cs
public class FOOD
{
	public const int food_CHA = 700; 
	public const int food_poison = 702; 

	public const int food_cat = 701; 
	public const int food_love = 703; 

	public const int food_god = 758; 
	public const int food_bug = 704; 

	public const int justcooked = 757; 
	public const int gainWeight = 705; 

	public const int food_poison = 702; 
	public const int loseWeight = 706; 

	public const int gainWeight = 705; 
	public const int justcooked = 757; 

	public const int food_bug = 704; 
	public const int food_god = 758; 

	public const int food_love = 703; 
	public const int food_cat = 701; 

	public const int loseWeight = 706; 
	public const int food_CHA = 700; 

	public static readonly int[] IDS = new int[9] { 700, 701, 758, 757, 702, 705, 704, 703, 706 }; 
	public static readonly int[] IDS = new int[9] { 702, 703, 704, 705, 706, 757, 758, 701, 700 }; 
}

GamePrincipal

@@ -8,7 +8,8 @@ public class GamePrincipal : EClass

cs
	public enum Type
	{
		Oath,
		Workaround
		Workaround, 
		Legacy
	}

	public class Item

@@ -152,6 +153,9 @@ public void SetInt(int value)

cs
	[JsonProperty]
	public bool disableVoidBlessing;

	[JsonProperty] 
	public bool enableDamageReduction; 

	[JsonProperty]
	public HashSet<string> modified = new HashSet<string>();

@@ -194,6 +198,10 @@ public List<Item> ListItems()

cs
	{
		petFeatExpMtp = a;
	}, (int a) => 0.5f + 0.5f * (float)a + "x", 3);
	Add(-1, Type.Legacy, "enableDamageReduction", () => enableDamageReduction, delegate(bool a) 
	{ 
		enableDamageReduction = a; 
	}); 
	return list;
	void Add(int grade, Type type, string id, Func<bool> _get, Action<bool> _set)
	{

GenRoom

@@ -178,7 +178,7 @@ public void Fill()

cs
	BiomeProfile.TileFloor floor = group.floor;
	BiomeProfile.TileBlock block = group.block;
	int idMat = block.mat;
	if (zone is Zone_RandomDungeonNature && EClass.rnd(3) != 0) 
	if (zone is Zone_RandomDungeonNature && EClass.rndSeed(3, zone.uid) != 0) 
	{
		block = EClass.core.refs.biomes.dict["Dungeon_Forest"].exterior.block;
		if (zone is Zone_RandomDungeonPlain)

HotbarManager

@@ -129,6 +129,41 @@ public void ResetHotbar(int id)

cs
		}
		else if (EClass._zone is Zone_Tent)
		{
			if (flag || EClass.pc.homeBranch.elements.Has(4006)) 
			{ 
				hotbar.SetItem(new HotItemActionMode
				{ 
					id = "Inspect"
				}).always = true; 
			} 
			if (flag || EClass.pc.homeBranch.elements.Has(4000)) 
			{ 
				hotbar.SetItem(new HotItemActionMode
				{ 
					id = "Cut"
				}); 
			} 
			if (flag || EClass.pc.homeBranch.elements.Has(4001)) 
			{ 
				hotbar.SetItem(new HotItemActionMode
				{ 
					id = "Mine"
				}); 
			} 
			if (flag || EClass.pc.homeBranch.elements.Has(4001)) 
			{ 
				hotbar.SetItem(new HotItemActionMode
				{ 
					id = "Dig"
				}); 
			} 
			if (flag || EClass.pc.homeBranch.elements.Has(4004)) 
			{ 
				hotbar.SetItem(new HotItemActionMode
				{ 
					id = "Deconstruct"
				}); 
			} 
			hotbar.SetItem(new HotItemActionMode
			{
				id = "Terrain"

LayerUploader

@@ -144,7 +144,7 @@ public void Upload()

cs
		string text2 = inputPassword.text;
		SaveID();
		ExportMap();
		Net.UploadFile(text, text2, ELayer.pc.NameBraced, ELayer._zone.Name, savePath, Lang.langCode); 
		Net.UploadFile(text, text2, ELayer.pc.NameBraced, ELayer._zone.Name, savePath, Lang.langCode, (ELayer._zone is Zone_Tent) ? "Tent" : "Home"); 
		nextUpload = (int)Time.realtimeSinceStartup + limitSec;
	}
}

LayerWorldSetting

@@ -141,6 +141,7 @@ public void Refresh()

cs
	if (ELayer.player.showWorkaround)
	{
		AddCategory(GamePrincipal.Type.Workaround);
		AddCategory(GamePrincipal.Type.Legacy); 
	}
	transCustom.RebuildLayout();
	void AddCategory(GamePrincipal.Type type)

@@ -169,9 +170,9 @@ void AddCategory(GamePrincipal.Type type)

cs
			}
			bool flag = item.id == "permadeath" && !IsEmbark && !item.WasSealed();
			b.mainText.SetText(("pp_" + item.id).lang());
			b.icon.SetActive(item.IsSealed() || item.WasSealed()); 
			b.icon.SetActive(item.grade >= 0 && (item.IsSealed() || item.WasSealed())); 
			b.icon.SetAlpha(item.IsSealed() ? 1f : 0.3f);
			b.icon.sprite = sprites[item.grade]; 
			b.icon.sprite = ((item.grade < 0) ? null : sprites[item.grade]); 
			b.icon.SetNativeSize();
			b.GetOrCreate<CanvasGroup>().alpha = (flag ? 0.5f : 1f);
			string text = "pp_" + item.id + "_hint";

@@ -186,7 +187,7 @@ void AddCategory(GamePrincipal.Type type)

cs
					pp.id = -1;
					RefreshTemplate();
				}
				b.icon.SetActive(item.IsSealed() || item.WasSealed()); 
				b.icon.SetActive(item.grade >= 0 && (item.IsSealed() || item.WasSealed())); 
				b.icon.SetAlpha(item.IsSealed() ? 1f : 0.3f);
			});
		}

MUTATION

@@ -1,32 +1,34 @@

cs
public class MUTATION
{
	public const int mutationDex = 1514; 

	public const int mutationRegen = 1516;

	public const int mutationDexN = 1515; 

	public const int etherPoisonHand = 1565;

	public const int mutationSkin = 1510; 
	public const int mutationEye = 1512; 

	public const int mutationSkinN = 1511;

	public const int mutationEye = 1512; 
	public const int mutationRegenN = 1517; 

	public const int mutationEyeN = 1513;

	public const int mutationDex = 1514; 
	public const int mutationSpeed = 1518; 

	public const int mutationDexN = 1515; 
	public const int mutationSkin = 1510; 

	public const int mutationRegenN = 1517; 
	public const int mutationStr = 1520; 

	public const int etherManaBattery = 1564;

	public const int mutationSpeedN = 1519; 

	public const int etherProvoke = 1563;

	public const int etherArmor = 1562;

	public const int mutationSpeed = 1518; 
	public const int mutationSpeedN = 1519; 

	public const int etherWeak = 1560;

@@ -46,15 +48,11 @@ public class MUTATION

cs

	public const int etherFeet = 1552;

	public const int etherUgly = 1551; 

	public const int etherStupid = 1561;

	public const int etherGravity = 1550; 

	public const int mutationStr = 1520; 
	public const int etherUgly = 1551; 

	public const int mutationCha = 1522; 
	public const int mutationStrN = 1521; 

	public const int mutationChaN = 1523;

@@ -62,9 +60,9 @@ public class MUTATION

cs

	public const int mutationBrainN = 1525;

	public const int mutationStrN = 1521; 
	public const int mutationCold = 1526; 

	public const int mutationColdN = 1527; 
	public const int mutationCha = 1522; 

	public const int mutationLightning = 1528;

@@ -74,14 +72,16 @@ public class MUTATION

cs

	public const int mutationBodyN = 1531;

	public const int mutationCold = 1526; 
	public const int etherGravity = 1550; 

	public const int mutationColdN = 1527; 

	public static readonly int[] IDS = new int[38]
	{
		1516, 1565, 1510, 1511, 1512, 1513, 1514, 1515, 1517, 1564, 
		1519, 1563, 1562, 1518, 1560, 1559, 1558, 1557, 1556, 1555, 
		1554, 1553, 1552, 1551, 1561, 1550, 1520, 1522, 1523, 1524, 
		1525, 1521, 1527, 1528, 1529, 1530, 1531, 1526
		1514, 1516, 1515, 1565, 1512, 1511, 1517, 1513, 1518, 1510, 
		1520, 1564, 1563, 1562, 1519, 1560, 1559, 1558, 1557, 1556, 
		1555, 1554, 1553, 1552, 1561, 1551, 1521, 1523, 1524, 1525, 
		1526, 1522, 1528, 1529, 1530, 1531, 1550, 1527
	};
}
public class Mutation : Feat

MapGenDungen

@@ -36,7 +36,7 @@ protected override bool OnGenerateTerrain()

cs
	BiomeProfile.TileFloor floor = biome.exterior.floor;
	BiomeProfile.TileBlock block = biome.exterior.block;
	int idMat = -1;
	if (zone is Zone_RandomDungeonNature && EClass.rnd(3) != 0) 
	if (zone is Zone_RandomDungeonNature && EClass.rndSeed(3, zone.uid) != 0) 
	{
		block = EClass.core.refs.biomes.dict["Dungeon_Forest"].exterior.block;
		if (zone is Zone_RandomDungeonPlain)

ModManager

@@ -194,7 +194,7 @@ public IEnumerator RefreshMods(Action onComplete, bool syncMods)

cs
	ListPluginObject.Clear();
	foreach (BaseModPackage package5 in packages)
	{
		if (package5.IsValidVersion()) 
		if (package5.IsValidVersion() && (!disableMod || package5.builtin)) 
		{
			package5.Activate();
			if (package5.activated)

Net

@@ -37,6 +37,8 @@ public class DownloadMeta

cs

		public string path;

		public string cat; 

		public string date;

		public int version;

@@ -98,7 +100,7 @@ public void ShowChat(string logs)

cs
		}
	}

	public static async UniTask<bool> UploadFile(string id, string password, string name, string title, string path, string idLang) 
	public static async UniTask<bool> UploadFile(string id, string password, string name, string title, string path, string idLang, string cat = "Home") 
	{
		if (isUploading)
		{

@@ -117,7 +119,7 @@ public static async UniTask<bool> UploadFile(string id, string password, string

cs
	wWWForm.AddField("id", id);
	wWWForm.AddField("name", name);
	wWWForm.AddField("title", title);
	wWWForm.AddField("cat", "Home"); 
	wWWForm.AddField("cat", cat); 
	wWWForm.AddField("idLang", idLang);
	wWWForm.AddField("password", password);
	wWWForm.AddField("submit", "Send");

@@ -220,6 +222,7 @@ public static async UniTask<List<DownloadMeta>> GetFileList(string idLang)

cs
				id = array[1].Replace("\"", ""),
				name = array[2],
				title = array[3],
				cat = array[5], 
				date = array[6].Replace("\"", ""),
				version = ((array.Length >= 9) ? array[8].ToInt() : 0)
			});

POLICY

@@ -3,9 +3,7 @@

cs

public class POLICY
{
	public const int store_ripoff = 2816; 

	public const int livestock_priv = 2715; 
	public const int store_premium = 2817; 

	public const int home_discount = 2800;

@@ -21,11 +19,11 @@ public class POLICY

cs

	public const int platinum_ticket = 2815;

	public const int store_premium = 2817; 
	public const int store_ripoff = 2816; 

	public const int license_stolen = 2824; 
	public const int license_food = 2818; 

	public const int license_furniture = 2819; 
	public const int license_stolen = 2824; 

	public const int license_general = 2820;

@@ -35,7 +33,7 @@ public class POLICY

cs

	public const int legendary_exhibition = 2823;

	public const int forcePanty = 2712; 
	public const int livestock_priv = 2715; 

	public const int milk_fan = 2825;

@@ -45,31 +43,31 @@ public class POLICY

cs

	public const int license_slaver = 2828;

	public const int license_food = 2818; 

	public const int incomeTransfer = 2711; 

	public const int nocturnal_life = 2508; 
	public const int license_furniture = 2819; 

	public const int noAnimal = 2709; 
	public const int forcePanty = 2712; 

	public const int wealth_tax = 2500; 
	public const int vaccination = 2509; 

	public const int faith_tax = 2501; 
	public const int noMother = 2710; 

	public const int food_for_people = 2502;

	public const int prohibition = 2503;

	public const int noMother = 2710; 
	public const int impressment = 2504; 

	public const int legal_drug = 2505;

	public const int incomeTransfer = 2711; 

	public const int faith_tax = 2501; 

	public const int human_right = 2506;

	public const int inquisition = 2507;

	public const int vaccination = 2509; 
	public const int nocturnal_life = 2508; 

	public const int ban_radio = 2510;

@@ -77,42 +75,44 @@ public class POLICY

cs

	public const int resident_tax = 2512;

	public const int impressment = 2504; 
	public const int resident_wanted = 2513; 

	public const int taxfree = 2514; 
	public const int wealth_tax = 2500; 

	public const int noDM = 2708; 
	public const int stop_growth = 2515; 

	public const int resident_wanted = 2513; 
	public const int speed_growth = 2516; 

	public const int taxTransfer = 2705; 
	public const int energy_conservation = 2700; 

	public const int weed_no = 2703; 
	public const int noAnimal = 2709; 

	public const int trash_no = 2702; 
	public const int trash_sort = 2701; 

	public const int demon_invocation = 2706; 
	public const int trash_no = 2702; 

	public const int auto_farm = 2707; 
	public const int weed_no = 2703; 

	public const int energy_conservation = 2700; 
	public const int noDM = 2708; 

	public const int speed_growth = 2516; 
	public const int auto_farm = 2707; 

	public const int stop_growth = 2515; 
	public const int taxfree = 2514; 

	public const int trash_sort = 2701; 
	public const int taxTransfer = 2705; 

	public const int border_watch = 2704;

	public const int demon_invocation = 2706; 

	public static readonly int[] IDS = new int[51]
	{
		2816, 2715, 2800, 2810, 2811, 2812, 2813, 2814, 2815, 2817, 
		2824, 2819, 2820, 2821, 2822, 2823, 2712, 2825, 2826, 2827, 
		2828, 2818, 2711, 2508, 2709, 2500, 2501, 2502, 2503, 2710, 
		2505, 2506, 2507, 2509, 2510, 2511, 2512, 2504, 2514, 2708, 
		2513, 2705, 2703, 2702, 2706, 2707, 2700, 2516, 2515, 2701, 
		2704
		2817, 2800, 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2818, 
		2824, 2820, 2821, 2822, 2823, 2715, 2825, 2826, 2827, 2828, 
		2819, 2712, 2509, 2710, 2502, 2503, 2504, 2505, 2711, 2501, 
		2506, 2507, 2508, 2510, 2511, 2512, 2513, 2500, 2515, 2516, 
		2700, 2709, 2701, 2702, 2703, 2708, 2707, 2514, 2705, 2704, 
		2706
	};
}
public class Policy : EClass

SKILL

@@ -1,32 +1,32 @@

cs
public class SKILL
{
	public const int armorLight = 120; 

	public const int twohand = 130; 

	public const int shield = 123;

	public const int armorHeavy = 122;

	public const int acidproof = 51; 
	public const int armorLight = 120; 

	public const int fireproof = 50; 

	public const int weaponScythe = 110;

	public const int weaponCrossbow = 109;

	public const int fireproof = 50; 
	public const int twohand = 130; 

	public const int twowield = 131; 
	public const int acidproof = 51; 

	public const int PDR = 55;

	public const int EDR = 56; 

	public const int weaponBlunt = 111;

	public const int tactics = 132; 
	public const int twowield = 131; 

	public const int evasion = 150; 
	public const int strategy = 135; 

	public const int eyeofmind = 134; 
	public const int marksman = 133; 

	public const int climbing = 242;

@@ -42,12 +42,10 @@ public class SKILL

cs

	public const int parasite = 227;

	public const int marksman = 133; 
	public const int tactics = 132; 

	public const int riding = 226;

	public const int mining = 220; 

	public const int spotting = 210;

	public const int weightlifting = 207;

@@ -58,18 +56,22 @@ public class SKILL

cs

	public const int evasionPlus = 151;

	public const int strategy = 135; 
	public const int evasion = 150; 

	public const int lumberjack = 225; 
	public const int eyeofmind = 134; 

	public const int EDR = 56; 
	public const int mining = 220; 

	public const int throwing = 108; 
	public const int lumberjack = 225; 

	public const int martial = 100; 

	public const int weaponDagger = 107;

	public const int fishing = 245;

	public const int evasionPerfect = 57; 

	public const int life = 60;

	public const int mana = 61;

@@ -94,11 +96,11 @@ public class SKILL

cs

	public const int PER = 73;

	public const int LER = 74; 
	public const int throwing = 108; 

	public const int evasionPerfect = 57; 
	public const int LER = 74; 

	public const int WIL = 75; 
	public const int MAG = 76; 

	public const int CHA = 77;

@@ -116,8 +118,6 @@ public class SKILL

cs

	public const int antiMagic = 93;

	public const int martial = 100; 

	public const int weaponAxe = 102;

	public const int weaponStaff = 103;

@@ -128,7 +128,7 @@ public class SKILL

cs

	public const int weaponPolearm = 106;

	public const int MAG = 76; 
	public const int WIL = 75; 

	public const int gathering = 250;

@@ -268,13 +268,13 @@ public class SKILL

cs

	public static readonly int[] IDS = new int[133]
	{
		120, 130, 123, 122, 51, 110, 109, 50, 131, 55, 
		111, 132, 150, 134, 242, 241, 240, 237, 235, 230, 
		227, 133, 226, 220, 210, 207, 200, 152, 151, 135, 
		225, 56, 108, 107, 245, 60, 61, 62, 64, 65, 
		66, 67, 68, 70, 71, 72, 73, 74, 57, 75, 
		77, 78, 79, 80, 90, 91, 92, 93, 100, 102, 
		103, 104, 105, 106, 76, 250, 101, 256, 916, 917, 
		123, 122, 120, 50, 110, 109, 130, 51, 55, 56, 
		111, 131, 135, 133, 242, 241, 240, 237, 235, 230, 
		227, 132, 226, 210, 207, 200, 152, 151, 150, 134, 
		220, 225, 100, 107, 245, 57, 60, 61, 62, 64, 
		65, 66, 67, 68, 70, 71, 72, 73, 108, 74, 
		76, 77, 78, 79, 80, 90, 91, 92, 93, 102, 
		103, 104, 105, 106, 75, 250, 101, 256, 916, 917, 
		918, 919, 920, 921, 922, 923, 924, 925, 926, 950,
		951, 952, 915, 953, 955, 956, 957, 958, 959, 960,
		961, 962, 963, 964, 965, 970, 972, 255, 954, 914,

TileTypeWallHang

@@ -114,6 +114,10 @@ public override void GetMountHeight(ref Vector3 v, Point p, int d, Card target =

cs
		{
			v.y += p.sourceBlock.tileType.MountHeight;
		}
		if (target != null) 
		{ 
			v.z += target.Pref.z; 
		} 
	}

	protected override HitResult HitTest(Point pos)

Trait

@@ -1512,7 +1512,7 @@ public void OnBarter()

cs
			{
			case CopyShopType.Item:
			{
				num4 = (1000 + owner.c_invest * 100) / (thing4.GetPrice() + 50); 
				num4 = (1000 + owner.c_invest * 100) / (thing4.GetPrice(CurrencyType.Money, sell: false, PriceType.CopyShop) + 50); 
				int[] array = new int[4] { 701, 704, 703, 702 };
				foreach (int ele in array)
				{

TraitMoongate

@@ -9,6 +9,18 @@ public class TraitMoongate : Trait

cs
{
	public UniTask<bool> test;

	public virtual string AllowedCat 
	{ 
		get 
		{ 
			if (!(EClass._zone is Zone_Tent)) 
			{ 
				return "Home,Dungeon,Town"; 
			} 
			return "Tent"; 
		} 
	} 

	public override bool CanUse(Chara c)
	{
		if (EClass._zone.IsInstance || EClass._zone.dateExpire != 0 || EClass._zone.IsRegion || !owner.IsInstalled)

@@ -46,31 +58,39 @@ public async UniTask<bool> UseMoongate()

cs
	Debug.Log(lang);
	try
	{
		List<Net.DownloadMeta> list = (await Net.GetFileList(lang)).Where((Net.DownloadMeta m) => m.IsValidVersion()).ToList(); 
		if (list == null || list.Count == 0) 
		List<Net.DownloadMeta> listOrg = await Net.GetFileList(lang); 
		listOrg = listOrg.Where((Net.DownloadMeta m) => m.IsValidVersion()).ToList(); 
		listOrg.ForeachReverse(delegate(Net.DownloadMeta m) 
		{ 
			if (!AllowedCat.Split(',').Contains(m.cat.IsEmpty("Home"))) 
			{ 
				listOrg.Remove(m); 
			} 
		}); 
		if (listOrg == null || listOrg.Count == 0) 
		{
			EClass.pc.SayNothingHappans();
			return false;
		}
		List<MapMetaData> list2 = ListSavedUserMap(); 
		IList<Net.DownloadMeta> list3 = list.Copy(); 
		foreach (MapMetaData item2 in list2) 
		List<MapMetaData> list = ListSavedUserMap(); 
		IList<Net.DownloadMeta> list2 = listOrg.Copy(); 
		foreach (MapMetaData item2 in list) 
		{
			foreach (Net.DownloadMeta item3 in list3) 
			foreach (Net.DownloadMeta item3 in list2) 
			{
				if (item3.id == item2.id && item3.version == item2.version)
				{
					list3.Remove(item3); 
					list2.Remove(item3); 
					break;
				}
			}
		}
		Debug.Log(list3.Count); 
		if (list3.Count == 0) 
		Debug.Log(list2.Count); 
		if (list2.Count == 0) 
		{
			list3 = list.Copy(); 
			list2 = listOrg.Copy(); 
		}
		Net.DownloadMeta item = list3.RandomItem(); 
		Net.DownloadMeta item = list2.RandomItem(); 
		Zone_User zone_User = EClass.game.spatials.Find((Zone_User z) => z.id == item.id);
		if (zone_User != null)
		{

TraitWaystone

@@ -1,3 +1,5 @@

cs
using UnityEngine; 

public class TraitWaystone : Trait
{
	public bool IsTemp => owner.id == "waystone_temp";

@@ -16,43 +18,70 @@ public override bool OnUse(Chara c)

cs

	public override void TrySetAct(ActPlan p)
	{
		if (!EClass._zone.parent.IsRegion || (EClass._zone.IsInstance && !EClass._zone.IsUserZone) || EClass._zone is Zone_Dungeon || EClass._zone is Zone_Tent) 
		{ 
			return; 
		} 
		p.TrySetAct("actNewZone", delegate
		if (EClass._zone is Zone_Tent) 
		{
			if (IsTemp) 
			p.TrySetAct("actNameZone", delegate
			{ 
				Dialog.InputName("dialogChangeName", EClass._zone.Name, delegate(bool cancel, string text) 
				{ 
					if (!cancel) 
					{ 
						EClass._zone.name = text; 
						EClass._zone.idPrefix = 0; 
						WidgetDate.Refresh(); 
					} 
				}); 
				return false; 
			}, owner); 
			if (Application.isEditor || (!EClass._zone.name.IsEmpty() && !EClass.core.version.demo)) 
			{
				owner.ModNum(-1); 
				p.TrySetAct("actUploadMap", delegate
				{ 
					EClass.ui.AddLayer<LayerUploader>(); 
					return false; 
				}, owner); 
			}
			EClass.pc.MoveZone(EClass._zone.ParentZone); 
			return false; 
		}, owner, CursorSystem.MoveZone); 
		if (!EClass._zone.IsPCFaction && !EClass._zone.IsTown) 
		{ 
			return; 
		}
		if (EClass.player.spawnZone != EClass._zone) 
		else
		{
			p.TrySetAct("actSetSpawn", delegate
			if (!EClass._zone.parent.IsRegion || (EClass._zone.IsInstance && !EClass._zone.IsUserZone) || EClass._zone is Zone_Dungeon) 
			{
				Effect.Get("aura_heaven").Play(EClass.pc.pos); 
				EClass.Sound.Play("worship"); 
				EClass.player.spawnZone = EClass._zone; 
				Msg.Say("setSpawn", owner); 
				return true; 
			}, owner); 
		} 
		else if (EClass.player.spawnZone != EClass.pc.homeZone || EClass._zone != EClass.pc.homeZone) 
		{ 
			p.TrySetAct("actUnsetSpawn", delegate
				return; 
			} 
			p.TrySetAct("actNewZone", delegate
			{
				EClass.Sound.Play("trash"); 
				EClass.player.spawnZone = EClass.pc.homeZone; 
				Msg.Say("unsetSpawn", owner); 
				return true; 
			}, owner); 
				if (IsTemp) 
				{ 
					owner.ModNum(-1); 
				} 
				EClass.pc.MoveZone(EClass._zone.ParentZone); 
				return false; 
			}, owner, CursorSystem.MoveZone); 
			if (!EClass._zone.IsPCFaction && !EClass._zone.IsTown) 
			{ 
				return; 
			} 
			if (EClass.player.spawnZone != EClass._zone) 
			{ 
				p.TrySetAct("actSetSpawn", delegate
				{ 
					Effect.Get("aura_heaven").Play(EClass.pc.pos); 
					EClass.Sound.Play("worship"); 
					EClass.player.spawnZone = EClass._zone; 
					Msg.Say("setSpawn", owner); 
					return true; 
				}, owner); 
			} 
			else if (EClass.player.spawnZone != EClass.pc.homeZone || EClass._zone != EClass.pc.homeZone) 
			{ 
				p.TrySetAct("actUnsetSpawn", delegate
				{ 
					EClass.Sound.Play("trash"); 
					EClass.player.spawnZone = EClass.pc.homeZone; 
					Msg.Say("unsetSpawn", owner); 
					return true; 
				}, owner); 
			} 
		}
	}
}

WidgetSearch

@@ -108,7 +108,7 @@ public override void Search(string s)

cs
	HashSet<Card> newCards = new HashSet<Card>();
	if (!s.IsEmpty())
	{
		if (!encSearch && (EMono._zone.IsTown || EMono._zone.IsPCFaction || EMono._zone is Zone_Tent)) 
		if (!encSearch && (EMono._zone.IsTown || EMono._zone.HasLaw || EMono._zone.IsPCFaction || EMono._zone is Zone_Tent)) 
		{
			foreach (Chara chara in EMono._map.charas)
			{