Skip to content

EA 23.84 Nightly

February 3, 2025

33 files modified. 4 new files created.

Important Changes

None.

ABILITY

@@ -4,8 +4,6 @@ public class ABILITY

cs
{
	public const int ActChat = 5044;

	public const int TaskMoveInstalled = 5036; 

	public const int ActNoItem = 5037;

	public const int ActThrow = 5038;

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

cs

	public const int AI_Sleep = 5050;

	public const int TaskBuild = 5035; 

	public const int ActZap = 5051;

	public const int TaskHarvest = 5053; 
	public const int TaskMoveInstalled = 5036; 

	public const int ActBash = 5052; 

	public const int AI_Bladder = 5054;

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

cs

	public const int ActEscape = 6400;

	public const int ActBash = 5052; 

	public const int ActSuicide = 6410;

	public const int GoalIdle = 5034; 
	public const int TaskHarvest = 5053; 

	public const int AI_Equip = 5032; 
	public const int ActDuplicate = 6420; 

	public const int Melee = 5002; 
	public const int TaskBuild = 5035; 

	public const int ActCancelTask = 5033; 

	public const int Ranged = 5003;

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

cs

	public const int TaskAttack = 5015;

	public const int ActCancelTask = 5033; 

	public const int TaskTame = 5016;

	public const int TaskPick = 5018; 
	public const int GoalIdle = 5034; 

	public const int TaskTalk = 5017; 

	public const int TaskReadBoard = 5019;

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

cs

	public const int AI_Deconstruct = 5031;

	public const int TaskTalk = 5017; 

	public const int ActDuplicate = 6420; 
	public const int AI_Equip = 5032; 

	public const int ActRush = 6450; 
	public const int TaskPick = 5018; 

	public const int breathe_Darkness = 50203; 
	public const int ActCrabBreathe = 6500; 

	public const int ActLulwyTrick = 6902; 
	public const int ActRush = 6450; 

	public const int ActKizuamiTrick = 6903; 
	public const int ActEntangle = 6601; 

	public const int ActHeadpat = 6904;

@@ -154,19 +150,19 @@ public class ABILITY

cs

	public const int breathe_Lightning = 50202;

	public const int ActCrabBreathe = 6500; 
	public const int breathe_Darkness = 50203; 

	public const int breathe_Mind = 50204;

	public const int ActWait = 5000; 
	public const int ActCurse = 6600; 

	public const int breathe_Poison = 50205; 
	public const int breathe_Nether = 50206; 

	public const int breathe_Sound = 50207;

	public const int breathe_Nerve = 50208; 
	public const int ActKizuamiTrick = 6903; 

	public const int breathe_Holy = 50209; 
	public const int breathe_Nerve = 50208; 

	public const int breathe_Chaos = 50210;

@@ -180,44 +176,42 @@ public class ABILITY

cs

	public const int breathe_Impact = 50215;

	public const int breathe_Nether = 50206; 

	public const int ActManaAbsorb = 6900; 
	public const int breathe_Void = 50216; 

	public const int ActJureHeal = 6901; 
	public const int ActWait = 5000; 

	public const int StTaunt = 6700; 
	public const int ActMelee = 5001; 

	public const int ActCurse = 6600; 
	public const int Melee = 5002; 

	public const int ActEntangle = 6601; 
	public const int breathe_Holy = 50209; 

	public const int ActDraw = 6602; 
	public const int ActLulwyTrick = 6902; 

	public const int ActNTR = 6603; 
	public const int breathe_Poison = 50205; 

	public const int ActMelee = 5001; 
	public const int ActGazeMana = 6623; 

	public const int ActWeaken = 6610;

	public const int ActDraw = 6602; 

	public const int ActFear = 6611;

	public const int ActTouchSleep = 6612;

	public const int StManaCost = 6720; 
	public const int ActGazeDim = 6620; 

	public const int ActGazeInsane = 6621;

	public const int ActGazeMutation = 6622;

	public const int ActGazeDim = 6620; 
	public const int ActNTR = 6603; 

	public const int ActDrainBlood = 6626;

	public const int ActInsult = 6630;

	public const int ActScream = 6631; 

	public const int ActSteal = 6640;

	public const int ActStealFood = 6641;

@@ -230,22 +224,30 @@ public class ABILITY

cs

	public const int ActThrowPotion = 6661;

	public const int ActGazeMana = 6623; 
	public const int StTaunt = 6700; 

	public const int StManaCost = 6720; 

	public const int ActManaAbsorb = 6900; 

	public const int ActScream = 6631; 

	public const int ActJureHeal = 6901; 

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

ActEffect

@@ -1322,26 +1322,26 @@ public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
			TC.Say((actRef.n1 == "money") ? "abStealNegateMoney" : "abStealNegate", TC);
			break;
		}
		Thing thing6 = null; 
		bool flag8 = actRef.n1 == "food"; 
		Thing thing4 = null; 
		bool flag6 = actRef.n1 == "food"; 
		if (actRef.n1 == "money")
		{
			int currency = TC.GetCurrency();
			if (currency > 0)
			{
				currency = Mathf.Clamp(EClass.rnd(currency / 10), 1, 100 + EClass.rndHalf(CC.LV * 200));
				thing6 = ThingGen.Create("money").SetNum(currency); 
				thing4 = ThingGen.Create("money").SetNum(currency); 
				TC.ModCurrency(-currency);
			}
		}
		else
		{
			Func<Thing, bool> func = (Thing t) => true;
			if (flag8) 
			if (flag6) 
			{
				func = (Thing t) => t.IsFood;
			}
			List<Thing> list7 = TC.things.List(delegate(Thing t) 
			List<Thing> list3 = TC.things.List(delegate(Thing t) 
			{
				if (t.parentCard?.trait is TraitChestMerchant || t.trait is TraitTool || t.IsThrownWeapon)
				{

@@ -1349,30 +1349,30 @@ public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
				}
				return t.trait.CanBeDestroyed && t.things.Count == 0 && t.invY != 1 && t.trait.CanBeStolen && !t.trait.CanOnlyCarry && !t.IsUnique && !t.isEquipped && t.blessedState == BlessedState.Normal && func(t);
			}, onlyAccessible: true);
			if (list7.Count > 0) 
			if (list3.Count > 0) 
			{
				thing6 = list7.RandomItem(); 
				if (thing6.Num > 1) 
				thing4 = list3.RandomItem(); 
				if (thing4.Num > 1) 
				{
					thing6 = thing6.Split(1); 
					thing4 = thing4.Split(1); 
				}
			}
			CC.AddCooldown(6640, 200);
		}
		if (thing6 == null) 
		if (thing4 == null) 
		{
			CC.Say("abStealNothing", CC, TC);
			break;
		}
		thing6.SetInt(116, 1); 
		TC.PlaySound(thing6.material.GetSoundDrop(thing6.sourceCard)); 
		CC.Pick(thing6, msg: false); 
		CC.Say("abSteal", CC, TC, thing6.Name); 
		thing4.SetInt(116, 1); 
		TC.PlaySound(thing4.material.GetSoundDrop(thing4.sourceCard)); 
		CC.Pick(thing4, msg: false); 
		CC.Say("abSteal", CC, TC, thing4.Name); 
		if (actRef.n1 == "food")
		{
			if (CC.hunger.value != 0)
			{
				CC.InstantEat(thing6); 
				CC.InstantEat(thing4); 
			}
		}
		else

@@ -1397,7 +1397,7 @@ public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
		{
			break;
		}
		List<Thing> list6 = TC.things.List(delegate(Thing t) 
		List<Thing> list7 = TC.things.List(delegate(Thing t) 
		{
			if (!t.isEquipped || t.blessedState == BlessedState.Doomed || t.IsToolbelt)
			{

@@ -1405,15 +1405,15 @@ public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
			}
			return (t.blessedState < BlessedState.Blessed || EClass.rnd(10) == 0) ? true : false;
		});
		if (list6.Count == 0) 
		if (list7.Count == 0) 
		{
			CC.SayNothingHappans();
			break;
		}
		Thing thing5 = list6.RandomItem(); 
		TC.Say("curse_hit", TC, thing5); 
		thing5.SetBlessedState((thing5.blessedState == BlessedState.Cursed) ? BlessedState.Doomed : BlessedState.Cursed); 
		LayerInventory.SetDirty(thing5); 
		Thing thing6 = list7.RandomItem(); 
		TC.Say("curse_hit", TC, thing6); 
		thing6.SetBlessedState((thing6.blessedState == BlessedState.Cursed) ? BlessedState.Doomed : BlessedState.Cursed); 
		LayerInventory.SetDirty(thing6); 
		break;
	}
	case EffectId.UncurseEQ:

@@ -1495,18 +1495,18 @@ public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
				text3 = text4;
			}
		}
		Condition condition2 = Condition.Create(text3, power, delegate(Condition con) 
		Condition condition = Condition.Create(text3, power, delegate(Condition con) 
		{
			if (!actRef.aliasEle.IsEmpty())
			{
				con.SetElement(EClass.sources.elements.alias[actRef.aliasEle].id);
			}
		});
		condition2.isPerfume = TC.IsPC && actRef.isPerfume; 
		Condition condition3 = TC.AddCondition(condition2); 
		if (condition3 != null && condition3.isPerfume) 
		condition.isPerfume = TC.IsPC && actRef.isPerfume; 
		Condition condition2 = TC.AddCondition(condition); 
		if (condition2 != null && condition2.isPerfume) 
		{
			condition3.value = 3; 
			condition2.value = 3; 
			Msg.Say("perfume", TC);
		}
		if (!text4.IsEmpty())

@@ -1519,12 +1519,12 @@ public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
	{
		EClass.game.religions.Trickery.Talk("ability");
		bool hex2 = CC.IsHostile(TC);
		List<SourceStat.Row> list3 = EClass.sources.stats.rows.Where((SourceStat.Row con) => con.tag.Contains("random") && con.group == (hex2 ? "Debuff" : "Buff")).ToList(); 
		List<SourceStat.Row> list6 = EClass.sources.stats.rows.Where((SourceStat.Row con) => con.tag.Contains("random") && con.group == (hex2 ? "Debuff" : "Buff")).ToList(); 
		int power2 = power;
		for (int k = 0; k < 4 + EClass.rnd(2); k++) 
		for (int m = 0; m < 4 + EClass.rnd(2); m++) 
		{
			SourceStat.Row row2 = list3.RandomItem(); 
			list3.Remove(row2); 
			SourceStat.Row row2 = list6.RandomItem(); 
			list6.Remove(row2); 
			Proc(hex2 ? EffectId.Debuff : EffectId.Buff, CC, TC, power2, new ActRef
			{
				n1 = row2.alias

@@ -1542,13 +1542,13 @@ public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
		bool isPowerful = TC.IsPowerful;
		string n = actRef.n1;
		int a2 = power;
		int num7 = TC.WIL * (isPowerful ? 20 : 5); 
		ConHolyVeil condition = TC.GetCondition<ConHolyVeil>(); 
		if (condition != null) 
		int num6 = TC.WIL * (isPowerful ? 20 : 5); 
		ConHolyVeil condition3 = TC.GetCondition<ConHolyVeil>(); 
		if (condition3 != null) 
		{
			num7 += condition.power * 5; 
			num6 += condition3.power * 5; 
		}
		if (EClass.rnd(a2) < num7 / EClass.sources.stats.alias[n].hexPower && EClass.rnd(10) != 0) 
		if (EClass.rnd(a2) < num6 / EClass.sources.stats.alias[n].hexPower && EClass.rnd(10) != 0) 
		{
			TC.Say("debuff_resist", TC);
			CC.DoHostileAction(TC);

@@ -1696,16 +1696,16 @@ public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
		break;
	case EffectId.Revive:
	{
		List<KeyValuePair<int, Chara>> list4 = EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon && a.Value.c_wasInPcParty).ToList(); 
		List<KeyValuePair<int, Chara>> list5 = EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon && a.Value.c_wasInPcParty).ToList(); 
		if (TC.IsPCFaction || TC.IsPCFactionMinion)
		{
			if (TC.IsPC && list4.Count == 0) 
			if (TC.IsPC && list5.Count == 0) 
			{
				list4 = EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.CanRevive() && a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon).ToList(); 
				list5 = EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.CanRevive() && a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon).ToList(); 
			}
			if (list4.Count > 0) 
			if (list5.Count > 0) 
			{
				list4.RandomItem().Value.Chara.GetRevived(); 
				list5.RandomItem().Value.Chara.GetRevived(); 
				break;
			}
		}

@@ -1718,24 +1718,24 @@ public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
	case EffectId.DamageMindGreat:
	case EffectId.Weaken:
	{
		bool flag9 = id == EffectId.DamageBody || id == EffectId.DamageBodyGreat; 
		bool mind2 = id == EffectId.DamageMind || id == EffectId.DamageMindGreat; 
		int num9 = ((id == EffectId.DamageBody || id == EffectId.DamageMind) ? 1 : (4 + EClass.rnd(4))); 
		bool flag7 = id == EffectId.DamageBody || id == EffectId.DamageBodyGreat; 
		bool mind = id == EffectId.DamageMind || id == EffectId.DamageMindGreat; 
		int num7 = ((id == EffectId.DamageBody || id == EffectId.DamageMind) ? 1 : (4 + EClass.rnd(4))); 
		if (id == EffectId.Weaken)
		{
			flag9 = EClass.rnd(2) == 0; 
			mind2 = !flag9; 
			num9 = 1; 
			flag7 = EClass.rnd(2) == 0; 
			mind = !flag7; 
			num7 = 1; 
		}
		else
		{
			TC.PlayEffect("debuff");
			TC.PlaySound("debuff");
		}
		TC.Say(flag9 ? "damageBody" : "damageMind", TC); 
		for (int m = 0; m < num9; m++) 
		TC.Say(flag7 ? "damageBody" : "damageMind", TC); 
		for (int k = 0; k < num7; k++) 
		{
			TC.DamageTempElements(power, flag9, mind2); 
			TC.DamageTempElements(power, flag7, mind); 
		}
		if (TC.IsPC)
		{

@@ -1748,40 +1748,40 @@ public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
	case EffectId.EnhanceBodyGreat:
	case EffectId.EnhanceMindGreat:
	{
		bool flag6 = id == EffectId.EnhanceBody || id == EffectId.EnhanceBodyGreat; 
		bool mind = id == EffectId.EnhanceMind || id == EffectId.EnhanceMindGreat; 
		int num6 = ((id == EffectId.EnhanceBody || id == EffectId.EnhanceMind) ? 1 : (4 + EClass.rnd(4))); 
		TC.Say(flag6 ? "enhanceBody" : "enhanceMind", TC); 
		bool flag8 = id == EffectId.EnhanceBody || id == EffectId.EnhanceBodyGreat; 
		bool mind2 = id == EffectId.EnhanceMind || id == EffectId.EnhanceMindGreat; 
		int num8 = ((id == EffectId.EnhanceBody || id == EffectId.EnhanceMind) ? 1 : (4 + EClass.rnd(4))); 
		TC.Say(flag8 ? "enhanceBody" : "enhanceMind", TC); 
		TC.PlayEffect("buff");
		TC.PlaySound("buff");
		for (int l = 0; l < num6; l++) 
		for (int l = 0; l < num8; l++) 
		{
			TC.EnhanceTempElements(power, flag6, mind); 
			TC.EnhanceTempElements(power, flag8, mind2); 
		}
		break;
	}
	case EffectId.RestoreBody:
	case EffectId.RestoreMind:
	{
		bool flag7 = id == EffectId.RestoreBody; 
		bool flag9 = id == EffectId.RestoreBody; 
		if (flag)
		{
			Redirect(flag7 ? EffectId.DamageBodyGreat : EffectId.DamageMindGreat, BlessedState.Normal, default(ActRef)); 
			Redirect(flag9 ? EffectId.DamageBodyGreat : EffectId.DamageMindGreat, BlessedState.Normal, default(ActRef)); 
			break;
		}
		TC.Say(flag7 ? "restoreBody" : "restoreMind", TC); 
		TC.Say(flag9 ? "restoreBody" : "restoreMind", TC); 
		TC.PlaySound("heal");
		TC.PlayEffect("heal");
		TC.CureHost(flag7 ? CureType.CureBody : CureType.CureMind, power, state); 
		TC.CureHost(flag9 ? CureType.CureBody : CureType.CureMind, power, state); 
		if (blessed)
		{
			Redirect(flag7 ? EffectId.EnhanceBodyGreat : EffectId.EnhanceMindGreat, BlessedState.Normal, default(ActRef)); 
			Redirect(flag9 ? EffectId.EnhanceBodyGreat : EffectId.EnhanceMindGreat, BlessedState.Normal, default(ActRef)); 
		}
		break;
	}
	case EffectId.HealComplete:
		Dice.Create("SpHealLight", power, CC, actRef.act);
		TC.HealHPHost(9999, HealSource.Magic); 
		TC.HealHPHost(9999, (actRef.refThing == null) ? HealSource.Magic : HealSource.Item); 
		TC.CureHost(CureType.HealComplete, power, state);
		TC.Say("heal_heavy", TC);
		break;

@@ -1792,13 +1792,13 @@ public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
		{
			EClass.game.religions.Healing.Talk("ability");
		}
		int num8 = Dice.Create((actRef.act != null && EClass.sources.calc.map.ContainsKey(actRef.act.ID)) ? actRef.act.ID : "SpHealLight", power, CC, actRef.act).Roll(); 
		int num9 = Dice.Create((actRef.act != null && EClass.sources.calc.map.ContainsKey(actRef.act.ID)) ? actRef.act.ID : "SpHealLight", power, CC, actRef.act).Roll(); 
		if (flag)
		{
			TC.DamageHP(num8 / 2, 919, power); 
			TC.DamageHP(num9 / 2, 919, power); 
			break;
		}
		TC.HealHPHost(num8, HealSource.Magic); 
		TC.HealHPHost(num9, (actRef.refThing == null) ? HealSource.Magic : HealSource.Item); 
		TC.CureHost(CureType.Heal, power, state);
		TC.Say((power >= 300) ? "heal_heavy" : "heal_light", TC);
		break;

@@ -2069,20 +2069,20 @@ public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
		{
			power /= 4;
		}
		List<Thing> list5 = TC.things.List((Thing t) => (t.Num <= 1 && t.IsEquipmentOrRanged && !t.IsToolbelt && !t.IsLightsource && t.isEquipped) ? true : false); 
		if (list5.Count != 0) 
		List<Thing> list4 = TC.things.List((Thing t) => (t.Num <= 1 && t.IsEquipmentOrRanged && !t.IsToolbelt && !t.IsLightsource && t.isEquipped) ? true : false); 
		if (list4.Count != 0) 
		{
			Thing thing4 = list5.RandomItem(); 
			Thing thing5 = list4.RandomItem(); 
			TC.Say("acid_hit", TC);
			if (thing4.isAcidproof) 
			if (thing5.isAcidproof) 
			{
				TC.Say("acid_nullify", thing4); 
				TC.Say("acid_nullify", thing5); 
			}
			else if (thing4.encLV > -5) 
			else if (thing5.encLV > -5) 
			{
				TC.Say("acid_rust", TC, thing4); 
				thing4.ModEncLv(-1); 
				LayerInventory.SetDirty(thing4); 
				TC.Say("acid_rust", TC, thing5); 
				thing5.ModEncLv(-1); 
				LayerInventory.SetDirty(thing5); 
			}
			if (TC.IsPCParty)
			{

BaseTileMap

@@ -1254,7 +1254,448 @@ public virtual void DrawTile()

cs
			fogged = true;
		}
	}
	goto IL_7aaf; 
	goto IL_7b3a; 
	IL_7b3a: 
	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); 
						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_6f1f: 
	int num16; 
	if (!showRoof || !roof || this.cell.room == null || this.cell.Front.room == null || this.cell.Right.room == null) 
	{ 
		param.tile = num16; 
		rendererFov.Draw(param); 
	} 
	goto IL_6f7f; 
	IL_6f7f:
	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)))
	{

@@ -1280,16 +1721,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 num17 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[2]; 
					if (!(num17 >= (float)sourceEffect2.anime[0])) 
					{
						param.tile += num3; 
						param.tile += num17; 
					}
				}
				else
				{
					float num4 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[0]; 
					param.tile += num4; 
					float num18 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[0]; 
					param.tile += num18; 
				}
			}
			if (this.cell.effect.IsFire)

@@ -1389,6 +1830,11 @@ public virtual void DrawTile()

cs
			if (sourceObj.HasGrowth)
			{
				this.cell.growth.OnRenderTileMap(param);
				if (this.cell.obj == 118 && Core.fixedFrame % 10f == 0f && sourceObj.growth.IsMature) 
				{ 
					EMono.scene.psFey.transform.position = new Vector3(param.x, param.y, param.z - 2f); 
					EMono.scene.psFey.Emit(1); 
				} 
			}
			else
			{

@@ -1473,19 +1919,11 @@ public virtual void DrawTile()

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

@@ -1515,17 +1953,17 @@ public virtual void DrawTile()

cs
				param.matColor = 104025f;
			}
		}
		for (int j = 0; (float)j < num6 / 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 num7 = param.tile; 
				float num20 = param.tile; 
				param.tile = 0f;
				rendererFov.Draw(param);
				param.tile = num7; 
				param.tile = num20; 
			}
		}
		param.y = orgY;

@@ -1536,29 +1974,29 @@ public virtual void DrawTile()

cs
	{
		orgY = param.y;
		orgZ = param.z;
		int num8 = 0; 
		int num21 = 0; 
		if (sourceBlock.tileType.IsFullBlock)
		{
			SourceBlock.Row row3 = sourceBlock;
			num8 = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length]; 
			num21 = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length]; 
		}
		else
		{
			SourceBlock.Row row3 = sourceFloor._defBlock;
			num8 = 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 = num8 + ((!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 = num8 + ((!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;

@@ -1599,10 +2037,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;

@@ -1656,20 +2094,20 @@ public virtual void DrawTile()

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

@@ -1740,7 +2178,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 && num9 == 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];

@@ -1759,16 +2197,16 @@ public virtual void DrawTile()

cs
		}
		if (isWater)
		{
			int num10 = 12; 
			int num11 = this.cell.shore / num10; 
			int num12 = this.cell.shore % num10; 
			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)num11 & (true ? 1u : 0u)) != 0) ? this.cell.Back : ((((uint)num11 & 2u) != 0) ? this.cell.Right : ((((uint)num11 & 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)num11 & 8u) != 0) ? this.cell.Left : ((((uint)num11 & 4u) != 0) ? this.cell.Front : ((((uint)num11 & 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)
				{

@@ -1780,7 +2218,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 / num10; 
						batch.tiles[pass.idx] = 768 + this.cell.shore / num23; 
						batch.colors[pass.idx] = param.color;
						batch.matColors[pass.idx] = param.matColor;
						pass.idx++;

@@ -1788,38 +2226,38 @@ public virtual void DrawTile()

cs
						{
							pass.NextBatch();
						}
						num12 = 2; 
						num25 = 2; 
					}
					else
					{
						num12 = cell.sourceFloor.edge; 
						num25 = cell.sourceFloor.edge; 
					}
					param.tile = (24 + num12 / 2) * 32 + num12 % 2 * 16 + num11; 
					param.tile = (24 + num25 / 2) * 32 + num25 % 2 * 16 + num24; 
					rendererShore.Draw(param);
				}
			}
			if (this.cell.Back.isShoreSand && ((uint)(this.cell.Back.shore / num10) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.Left.shore / num10) & (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 / num10) & 2u) != 0 && this.cell.Right.isShoreSand && ((uint)(this.cell.Right.shore / num10) & (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 / num10) & 2u) != 0 && this.cell.Right.isShoreSand && ((uint)(this.cell.Right.shore / num10) & 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 / num10) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.Left.shore / num10) & 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);

@@ -1842,36 +2280,36 @@ public virtual void DrawTile()

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

@@ -1883,7 +2321,7 @@ public virtual void DrawTile()

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

@@ -1891,7 +2329,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 / num10) & (true ? 1u : 0u)) != 0) 
					if (((uint)(this.cell.shore / num23) & (true ? 1u : 0u)) != 0) 
					{
						if (isShoreSand)
						{

@@ -1929,7 +2367,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 / num10) & 8u) != 0) 
					if (((uint)(this.cell.shore / num23) & 8u) != 0) 
					{
						if (isShoreSand)
						{

@@ -2045,16 +2483,16 @@ public virtual void DrawTile()

cs
			param.z += bridgeFix.z;
			param.dir = 0;
			SourceBlock.Row row4 = sourceBridge._bridgeBlock;
			float num13 = (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)
			{
				num13 += (float)EMono._map.config.skyBlockHeight; 
				num26 += (float)EMono._map.config.skyBlockHeight; 
			}
			int num14 = (int)(num13 / 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] + ((num14 == 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));
			}

@@ -2066,9 +2504,9 @@ public virtual void DrawTile()

cs
			}
			param.y += ugFixBridgeTop.y;
			param.z += ugFixBridgeTop.z;
			for (int l = 0; l < num14; l++) 
			for (int n = 0; n < num27; n++) 
			{
				if (l == num14 - 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;

@@ -2100,13 +2538,13 @@ public virtual void DrawTile()

cs
	{
		snowed = false;
	}
	num5 = 0; 
	num16 = 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:

@@ -2150,8 +2588,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;
			}

@@ -2173,8 +2611,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:

@@ -2220,11 +2658,11 @@ public virtual void DrawTile()

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

@@ -2271,11 +2709,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)

@@ -2305,62 +2743,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;

@@ -2375,198 +2813,69 @@ 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; 
				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) 
					{ 
						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; 
						rendererWallDeco.Draw(param); 
						param.y = orgY; 
						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; 
						param.y += (float)room3.lot.decoFix * 0.01f; 
						rendererWallDeco.Draw(param); 
						param.y = orgY; 
					}
					else
					if (room3.lot.idDeco2 != 0 && roomHeight != 0f && !flag10 && (float)room3.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y) 
					{
						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; 
						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; 
						rendererWallDeco.Draw(param); 
						param.y = orgY; 
						param.z = orgZ; 
					}
				}
				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
				{

@@ -2574,7 +2883,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));

@@ -2583,8 +2892,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)
					{

@@ -2595,15 +2903,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);
					}

@@ -2611,505 +2919,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_6f1f; 
		} 
		if (this.cell._block == 0 || !this.cell.sourceBlock.tileType.RepeatBlock) 
		{ 
			Room obj = this.cell.FrontRight.room; 
			if (obj == null || !obj.HasRoof) 
			{ 
				goto IL_6f1f; 
			} 
		} 
	} 
	goto IL_6f7f; 
	IL_7aaf: 
	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); 
						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; 
	}
	if (this.cell.pcSync && EMono.player.lightPower > 0f && !cinemaMode) 
	{ 
		if (this.cell.room != null || !this.cell.IsRoomEdge || !showRoof) 
		{ 
			goto IL_6f1f; 
		} 
		if (this.cell._block == 0 || !this.cell.sourceBlock.tileType.RepeatBlock) 
		{ 
			Room obj = this.cell.FrontRight.room; 
			if (obj == null || !obj.HasRoof) 
			{ 
				goto IL_6f1f; 
			} 
		} 
	} 
	goto IL_6f7f; 
	void Draw(int tile)
	{
		pass = passEdge;

ButtonGrid

@@ -508,6 +508,7 @@ public void SetIngredient(Recipe r, Thing t)

cs
	int num = t.Num;
	mainText.text = num.ToString() ?? "";
	mainText.SetActive(enable: true);
	ing = null; 
	if (t.GetRootCard() != EClass.pc)
	{
		Attach("pcInv", rightAttach: false);

Card

@@ -870,6 +870,18 @@ public bool isRestocking

cs
		}
	}

	public bool isRuneAdded 
	{ 
		get 
		{ 
			return _bits2[8]; 
		} 
		set 
		{ 
			_bits2[8] = value; 
		} 
	} 

	public bool isBackerContent => c_idBacker != 0;

	public SourceBacker.Row sourceBacker

@@ -3528,9 +3540,11 @@ public virtual void HealHP(int a, HealSource origin = HealSource.None)

cs
	{
		hp = MaxHP;
	}
	Debug.Log(origin); 
	switch (origin)
	{
	case HealSource.Magic:
	case HealSource.Item: 
		PlaySound("heal");
		PlayEffect("heal");
		break;

@@ -6384,12 +6398,13 @@ public virtual int GetPrice(CurrencyType currency = CurrencyType.Money, bool sel

cs
	int num = ((priceType != PriceType.CopyShop) ? 1 : 5);
	float num2 = Mathf.Min(0.01f * (float)Evalue(752), 1f);
	float num3 = Mathf.Min(0.01f * (float)Evalue(751), 1f);
	float num4 = Mathf.Min(0.02f * (float)Evalue(759), 2f); 
	if (num3 > 0f)
	{
		num3 *= (float)num;
	}
	float num4 = Mathf.Clamp(1f + num2 + num3, 0.5f, 5f); 
	p *= num4; 
	float num5 = Mathf.Clamp(1f + num2 + num3, 0.5f, 5f) + num4; 
	p *= num5; 
	p *= 0.20000000298023224;
	if (sell)
	{

@@ -6472,11 +6487,11 @@ public virtual int GetPrice(CurrencyType currency = CurrencyType.Money, bool sel

cs
		}
		break;
	}
	float num5 = Math.Clamp(Mathf.Sqrt(c.EvalueMax(291) + ((!sell && EClass._zone.IsPCFaction) ? (EClass.Branch.Evalue(2800) * 2) : 0)), 0f, 25f); 
	float num6 = Math.Clamp(Mathf.Sqrt(c.EvalueMax(291) + ((!sell && EClass._zone.IsPCFaction) ? (EClass.Branch.Evalue(2800) * 2) : 0)), 0f, 25f); 
	switch (priceType)
	{
	case PriceType.Tourism:
		num5 = 0f; 
		num6 = 0f; 
		break;
	case PriceType.Shipping:
		if (sell)

@@ -6490,52 +6505,52 @@ public virtual int GetPrice(CurrencyType currency = CurrencyType.Money, bool sel

cs
		{
			break;
		}
		float num6 = 1.25f; 
		float num7 = 1.25f; 
		if (EClass.Branch != null)
		{
			if (EClass.Branch.policies.IsActive(2817))
			{
				num6 += 0.1f + 0.01f * Mathf.Sqrt(EClass.Branch.Evalue(2817)); 
				num7 += 0.1f + 0.01f * Mathf.Sqrt(EClass.Branch.Evalue(2817)); 
			}
			if (EClass.Branch.policies.IsActive(2816))
			{
				num6 += 0.2f + 0.02f * Mathf.Sqrt(EClass.Branch.Evalue(2816)); 
				num7 += 0.2f + 0.02f * Mathf.Sqrt(EClass.Branch.Evalue(2816)); 
			}
			if (isChara)
			{
				if (EClass.Branch.policies.IsActive(2828))
				{
					num6 += 0.1f + 0.01f * Mathf.Sqrt(EClass.Branch.Evalue(2828)); 
					num7 += 0.1f + 0.01f * Mathf.Sqrt(EClass.Branch.Evalue(2828)); 
				}
			}
			else if (category.IsChildOf("food") || category.IsChildOf("drink"))
			{
				if (EClass.Branch.policies.IsActive(2818))
				{
					num6 += 0.05f + 0.005f * Mathf.Sqrt(EClass.Branch.Evalue(2818)); 
					num7 += 0.05f + 0.005f * Mathf.Sqrt(EClass.Branch.Evalue(2818)); 
				}
			}
			else if (category.IsChildOf("furniture"))
			{
				if (EClass.Branch.policies.IsActive(2819))
				{
					num6 += 0.05f + 0.005f * Mathf.Sqrt(EClass.Branch.Evalue(2819)); 
					num7 += 0.05f + 0.005f * Mathf.Sqrt(EClass.Branch.Evalue(2819)); 
				}
			}
			else if (EClass.Branch.policies.IsActive(2820))
			{
				num6 += 0.05f + 0.005f * Mathf.Sqrt(EClass.Branch.Evalue(2820)); 
				num7 += 0.05f + 0.005f * Mathf.Sqrt(EClass.Branch.Evalue(2820)); 
			}
		}
		p *= num6; 
		p *= num7; 
		break;
	}
	}
	if ((uint)currency > 1u)
	{
		num5 = 0f; 
		num6 = 0f; 
	}
	p *= (sell ? (1f + num5 * 0.02f) : (1f - num5 * 0.02f)); 
	p *= (sell ? (1f + num6 * 0.02f) : (1f - num6 * 0.02f)); 
	if (sell)
	{
		p = EClass.curve((int)p, 10000, 10000, 80);

Chara

@@ -1783,6 +1783,9 @@ public override void ApplyEditorTags(EditorTag tag)

cs
		bio.SetGender(1);
		base.c_idPortrait = Portrait.GetRandomPortrait(1, GetIdPortraitCat());
		break;
	case EditorTag.baby:
		SetFeat(1232); 
		break; 
	}
	base.ApplyEditorTags(tag);
}

@@ -7022,6 +7025,15 @@ public bool TryUse(Thing t)

cs
			});
			return true;
		}
		if (base.hp < MaxHP * 90 / 100) 
		{ 
			Action healAction = t.trait.GetHealAction(this); 
			if (healAction != null) 
			{ 
				healAction(); 
				return true; 
			} 
		} 
		return false;
	}

Core

@@ -22,6 +22,8 @@ public class Core : BaseCore

cs

	public static float gameDeltaNoPause;

	public static float fixedFrame; 

	public static bool spiked;

	private static SourceElement sourceElement;

@@ -289,6 +291,11 @@ public void StartCase()

cs
		}
	}

	private void FixedUpdate() 
	{ 
		fixedFrame += 1f; 
	} 

	public void Update()
	{
		frame++;

DOMAIN

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

cs

public class DOMAIN
{
	public const int domArcane = 804; 

	public const int domTest = 800; 

	public const int domSurvival = 801; 
	public const int domEyth = 814; 

	public const int domFaith = 802; 
	public const int domHealing = 811; 

	public const int domMiracle = 803; 
	public const int domOblivion = 813; 

	public const int domComm = 805; 
	public const int domTest = 800; 

	public const int domEyth = 814; 
	public const int domEarth = 812; 

	public const int domWind = 807; 
	public const int domSurvival = 801; 

	public const int domHarvest = 808;

	public const int domMachine = 809; 
	public const int domMiracle = 803; 

	public const int domLuck = 810;

	public const int domHealing = 811; 

	public const int domOblivion = 813; 
	public const int domMachine = 809; 

	public const int domEarth = 812; 
	public const int domWind = 807; 

	public const int domElement = 806;

	public const int domComm = 805; 

	public const int domFaith = 802; 

	public const int domHarmony = 815;

	public const int domArcane = 804; 

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

ELEMENT

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

cs

public class ELEMENT
{
	public const int hotspring = 756; 
	public const int antidote = 753; 

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

	public const int nerve = 754;

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

	public const int hotspring = 756; 

	public const int purity = 759; 

	public const int cute = 752;

	public const int rare = 751;

	public const int comfort = 750; 

	public const int _void = 0;

	public const int quality = 2; 
	public const int d = 3; 

	public const int lv = 1;

	public const int d = 3; 
	public const int quality = 2; 

	public const int socket = 5;

@@ -65,11 +67,12 @@ public class ELEMENT

cs

	public const int poison = 20;

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

ENC

@@ -1,5 +1,7 @@

cs
public class ENC
{
	public const int living = 653; 

	public const int eco = 652;

	public const int r_PV = 651;

@@ -8,25 +10,21 @@ public class ENC

cs

	public const int r_mana = 641;

	public const int r_life = 640; 
	public const int mod_frustration = 624; 

	public const int mod_flurry = 621;

	public const int mod_chaser = 620; 

	public const int mod_feint = 623; 

	public const int mod_cleave = 622;

	public const int living = 653; 

	public const int mod_frustration = 624; 
	public const int mod_feint = 623; 

	public const int noDamage = 654;

	public const int convertFire = 850; 
	public const int r_life = 640; 

	public const int permaCurse = 656; 
	public const int onlyPet = 655; 

	public const int convertCold = 851; 

	public const int absorbHP = 660;

@@ -42,21 +40,23 @@ public class ENC

cs

	public const int meleeDistance = 666;

	public const int convertCold = 851; 
	public const int convertFire = 850; 

	public const int mod_splash = 608; 
	public const int mod_chaser = 620; 

	public const int convertImpact = 865;

	public const int convertLightning = 852;

	public const int onlyPet = 655; 
	public const int permaCurse = 656; 

	public const int mod_scatter = 607; 
	public const int mod_splash = 608; 

	public const int bane_fairy = 462; 
	public const int throwReturn = 410; 

	public const int mod_precision = 605; 
	public const int mod_drill = 606; 

	public const int sustain_STR = 440; 

	public const int breathing = 429;

@@ -86,13 +86,11 @@ public class ENC

cs

	public const int encSpell = 411;

	public const int throwReturn = 410; 

	public const int corruption = 409;

	public const int resWeather = 408;

	public const int travelSpeed = 407; 
	public const int mod_scatter = 607; 

	public const int resMutation = 406;

@@ -108,13 +106,15 @@ public class ENC

cs

	public const int negateTeleport = 400;

	public const int sustain_STR = 440; 

	public const int sustain_END = 441;

	public const int mod_drill = 606; 
	public const int sustain_DEX = 442; 

	public const int optimizeMana = 483; 
	public const int travelSpeed = 407; 

	public const int mod_ammo = 600; 

	public const int mod_precision = 605; 

	public const int mod_ammo_recover = 604;

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

cs

	public const int mod_reload = 601;

	public const int mod_ammo = 600; 
	public const int optimizeMana = 483; 

	public const int force_weapon = 482;

@@ -134,15 +134,15 @@ public class ENC

cs

	public const int bane_all = 468;

	public const int bane_fish = 467; 

	public const int bane_god = 466;

	public const int bane_machine = 465; 

	public const int bane_man = 464;

	public const int bane_animal = 463; 
	public const int bane_fish = 467; 

	public const int bane_machine = 465; 
	public const int bane_fairy = 462; 

	public const int bane_undead = 461;

@@ -152,23 +152,23 @@ public class ENC

cs

	public const int sustain_MAG = 446;

	public const int bane_animal = 463; 

	public const int sustain_WIL = 445;

	public const int sustain_LER = 444;

	public const int sustain_PER = 443;

	public const int sustain_DEX = 442; 

	public static readonly int[] IDS = new int[80]
	{
		652, 651, 650, 641, 640, 621, 620, 623, 622, 653, 
		624, 654, 850, 656, 660, 661, 662, 663, 664, 665, 
		666, 851, 608, 865, 852, 655, 607, 462, 605, 429, 
		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, 410, 606, 440, 429, 
		428, 427, 426, 425, 424, 423, 422, 421, 420, 416,
		415, 412, 411, 410, 409, 408, 407, 406, 405, 404, 
		403, 402, 401, 400, 440, 441, 606, 483, 604, 603, 
		602, 601, 600, 482, 481, 480, 468, 467, 466, 464, 
		463, 465, 461, 460, 447, 446, 445, 444, 443, 442
		415, 412, 411, 409, 408, 607, 406, 405, 404, 403, 
		402, 401, 400, 441, 442, 407, 600, 605, 604, 603, 
		602, 601, 483, 482, 481, 480, 468, 466, 465, 464, 
		467, 462, 461, 460, 447, 446, 463, 445, 444, 443
	};
}

EditorTag

@@ -14,6 +14,7 @@ public enum EditorTag

cs
InvulnerableToMobs = 51,
Male = 60,
Female = 61,
baby = 65, 
NoSnow = 70,
TreasureMelilith = 110,
Boss = 120,

ElementContainer

@@ -637,6 +637,11 @@ public List<Element> ListLearnable(Chara c)

cs
		return list;
	}

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

	public void CopyTo(ElementContainer container)
	{
		container.dict.Clear();

FACTION

@@ -4,31 +4,31 @@

cs

public class FACTION
{
	public const int bfCave = 3500; 

	public const int bfPlain = 3600;

	public const int bfForest = 3601;

	public const int bfRuin = 3702; 

	public const int bfGeyser = 3701; 

	public const int bfSnow = 3602;

	public const int bfRuin = 3702; 

	public const int bfHill = 3603;

	public const int bfFertile = 3700; 

	public const int bfSea = 3605;

	public const int bfBeach = 3604;

	public const int fRation = 2207; 
	public const int bfCave = 3500; 

	public const int bfFertile = 3700; 
	public const int bfGeyser = 3701; 

	public const int fAttraction = 2206; 
	public const int fRation = 2207; 

	public const int fTaxEvasion = 2119; 
	public const int actBuildCollect = 4004; 

	public const int fSafety = 2205; 

	public const int fFood = 2204;

@@ -38,41 +38,37 @@ public class FACTION

cs

	public const int fElec = 2201;

	public const int fLuck = 2118; 

	public const int fConstruction = 2003; 

	public const int bfTranquil = 3703;

	public const int fSoil = 2200; 

	public const int fHeirloom = 2120;

	public const int fAdmin = 2115; 
	public const int fTaxEvasion = 2119; 

	public const int fEducation = 2116; 
	public const int fLuck = 2118; 

	public const int fLoyal = 2117;

	public const int fSafety = 2205; 

	public const int fSoil = 2200; 
	public const int fAttraction = 2206; 

	public const int bfVolcano = 3704;

	public const int bfFish = 3706; 
	public const int bfCoal = 3800; 

	public const int actBuildInspect = 4006; 
	public const int bfFish = 3706; 

	public const int actBuildRecipe = 4005;

	public const int actBuildCollect = 4004; 

	public const int actBuildAnywhere = 4003; 
	public const int actBuildInspect = 4006; 

	public const int actBuildTerrain = 4002;

	public const int actBuildMine = 4001;

	public const int bfHunt = 3705; 
	public const int fEducation = 2116; 

	public const int actBuildCut = 4000; 

	public const int bfStart = 3900;

@@ -82,40 +78,44 @@ public class FACTION

cs

	public const int bfGum = 3803;

	public const int actBuildCut = 4000; 

	public const int bfMushroom = 3801; 
	public const int bfHunt = 3705; 

	public const int bfSilica = 3802;

	public const int bfFreshAir = 3708; 
	public const int actBuildAnywhere = 4003; 

	public const int bfBasin = 3709; 
	public const int bfLandmark5 = 3784; 

	public const int bfBreed = 3710; 
	public const int bfLandmark4 = 3783; 

	public const int bfLandmark3 = 3782; 

	public const int bfLandmark2 = 3781; 

	public const int bfLandmark1 = 3780;

	public const int bfMonster = 3707; 
	public const int bfBreed = 3710; 

	public const int bfLandmark3 = 3782; 
	public const int bfBasin = 3709; 

	public const int bfLandmark4 = 3783; 
	public const int bfFreshAir = 3708; 

	public const int bfLandmark5 = 3784; 
	public const int bfMonster = 3707; 

	public const int bfCoal = 3800; 
	public const int bfMushroom = 3801; 

	public const int bfLandmark2 = 3781; 
	public const int fAdmin = 2115; 

	public const int fConstruction = 2003; 

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

FEAT

@@ -3,15 +3,33 @@

cs

public class FEAT
{
	public const int featUndead = 1210; 

	public const int featMartial = 1635; 

	public const int featNegotiate = 1634; 

	public const int featSpotting = 1633; 

	public const int featEvade = 1632; 

	public const int featDefense = 1631; 

	public const int featHardy = 1630; 

	public const int featSPD = 1629; 

	public const int featLuck = 1628; 

	public const int featCHA = 1627;

	public const int featWIL = 1626;

	public const int featMAG = 1625;

	public const int featLER = 1624; 
	public const int featFaith = 1636; 

	public const int featPER = 1623; 
	public const int featLER = 1624; 

	public const int featEND = 1622;

@@ -23,7 +41,7 @@ public class FEAT

cs

	public const int featMana = 1611;

	public const int featEarthStrength = 1411; 
	public const int featLife = 1610; 

	public const int featManaMeat = 1421;

@@ -35,33 +53,39 @@ public class FEAT

cs

	public const int featWitch = 1417;

	public const int featInquisitor = 1416; 
	public const int featPER = 1623; 

	public const int featFoxMaid = 1415; 
	public const int featAnimalLover = 1640; 

	public const int featWhiteVixen = 1414; 
	public const int featResCurse = 1641; 

	public const int featFairysan = 1413; 
	public const int featSleeper = 1642; 

	public const int featLuckyCat = 1412; 
	public const int featFluffyTail = 1209; 

	public const int featLuck = 1628; 
	public const int featSlowFood = 1200; 

	public const int featLife = 1610; 
	public const int featManaBond = 1201; 

	public const int featSPD = 1629; 
	public const int featFastLearner = 1202; 

	public const int featParty = 1645; 
	public const int featGrowParts = 1203; 

	public const int featDefense = 1631; 
	public const int featFairyWeak = 1204; 

	public const int featReboot = 1410; 
	public const int featCannibalism = 1205; 

	public const int featMelilithCurse = 1206; 

	public const int featFoxBless = 1207; 

	public const int featFoxLearn = 1208; 

	public const int featChef = 1658;

	public const int featManaCost = 1657;

	public const int featScavenger = 1656; 
	public const int featModelBeliever = 1655; 

	public const int featHeavyCasting = 1654;

@@ -81,56 +105,24 @@ public class FEAT

cs

	public const int featLonelySoul = 1646;

	public const int featParty = 1645; 

	public const int featBodyParts = 1644;

	public const int featSorter = 1643;

	public const int featSleeper = 1642; 

	public const int featResCurse = 1641; 

	public const int featAnimalLover = 1640; 

	public const int featFaith = 1636; 

	public const int featMartial = 1635; 

	public const int featNegotiate = 1634; 

	public const int featSpotting = 1633; 

	public const int featEvade = 1632; 

	public const int featHardy = 1630; 

	public const int featBoost = 1409; 

	public const int featModelBeliever = 1655; 

	public const int featPaladin = 1407; 

	public const int featShiva = 1224; 

	public const int featLoyal = 1225; 

	public const int featUnderground = 1226; 

	public const int featServant = 1227; 

	public const int featDemigod = 1228; 

	public const int featLittleOne = 1229; 

	public const int featAdam = 1230; 
	public const int featInquisitor = 1416; 

	public const int featBaby = 1232; 
	public const int featFoxMaid = 1415; 

	public const int featCosmicHorror = 1233; 
	public const int featScavenger = 1656; 

	public const int featAcidBody = 1223; 
	public const int featFairysan = 1413; 

	public const int featHeavyEater = 1234;

	public const int featLightEater = 1235; 

	public const int featNorland = 1236;

	public const int featRoran = 1237;

@@ -139,8 +131,6 @@ public class FEAT

cs

	public const int featGod_element1 = 1300;

	public const int featGod_earth1 = 1305; 

	public const int featGod_wind1 = 1310;

	public const int featGod_machine1 = 1315;

@@ -149,39 +139,33 @@ public class FEAT

cs

	public const int featGod_harvest1 = 1325;

	public const int featLightEater = 1235; 

	public const int featSplit = 1222; 

	public const int featSpike = 1221; 

	public const int featFate = 1220; 
	public const int featGod_luck1 = 1330; 

	public const int featPaladin2 = 1408; 
	public const int featGod_harmony1 = 1335; 

	public const int featSlowFood = 1200; 
	public const int featGod_oblivion1 = 1340; 

	public const int featManaBond = 1201; 
	public const int featGod_trickery1 = 1345; 

	public const int featFastLearner = 1202; 
	public const int featGod_moonshadow1 = 1350; 

	public const int featGrowParts = 1203; 
	public const int featGod_strife1 = 1355; 

	public const int featFairyWeak = 1204; 
	public const int featWarrior = 1400; 

	public const int featCannibalism = 1205; 
	public const int featThief = 1401; 

	public const int featMelilithCurse = 1206; 
	public const int featWizard = 1402; 

	public const int featFoxBless = 1207; 
	public const int featCosmicHorror = 1233; 

	public const int featFoxLearn = 1208; 
	public const int featBaby = 1232; 

	public const int featFluffyTail = 1209; 
	public const int featNirvana = 1231; 

	public const int featUndead = 1210; 
	public const int featAdam = 1230; 

	public const int featSnail = 1211; 
	public const int featWhiteVixen = 1414; 

	public const int featFairyResist = 1212;

@@ -199,48 +183,64 @@ public class FEAT

cs

	public const int featElderCrab = 1219;

	public const int featGod_luck1 = 1330; 
	public const int featFarmer = 1403; 

	public const int featGod_harmony1 = 1335; 
	public const int featFate = 1220; 

	public const int featNirvana = 1231; 
	public const int featSplit = 1222; 

	public const int featGod_trickery1 = 1345; 
	public const int featSnail = 1211; 

	public const int featGod_oblivion1 = 1340; 
	public const int featAcidBody = 1223; 

	public const int featGod_moonshadow1 = 1350; 
	public const int featShiva = 1224; 

	public const int featGod_strife1 = 1355; 
	public const int featLoyal = 1225; 

	public const int featWarrior = 1400; 
	public const int featUnderground = 1226; 

	public const int featWizard = 1402; 
	public const int featServant = 1227; 

	public const int featFarmer = 1403; 
	public const int featDemigod = 1228; 

	public const int featLittleOne = 1229; 

	public const int featSpike = 1221; 

	public const int featArcher = 1404;

	public const int featGod_earth1 = 1305; 

	public const int featTourist = 1406; 

	public const int featPianist = 1405;

	public const int featThief = 1401; 
	public const int featPaladin2 = 1408; 

	public const int featTourist = 1406; 
	public const int featReboot = 1410; 

	public const int featEarthStrength = 1411; 

	public const int featBoost = 1409; 

	public const int featLuckyCat = 1412; 

	public const int featPaladin = 1407; 

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

FOOD

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

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

	public const int food_cat = 701; 
	public const int gainWeight = 705; 

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

	public const int justcooked = 757; 
	public const int food_love = 703; 

	public const int food_poison = 702;

	public const int gainWeight = 705; 
	public const int food_cat = 701; 

	public const int food_bug = 704; 
	public const int justcooked = 757; 

	public const int food_love = 703; 
	public const int food_god = 758; 

	public const int loseWeight = 706;

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

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

GameDate

@@ -281,7 +281,12 @@ public void ShipGoods()

cs
	{
		return;
	}
	num2 = (shippingResult.hearthExpGained = num2 / 2 + 1); 
	num2 = num2 / 2 + 1; 
	if (zone.branch.policies.IsActive(2515)) 
	{ 
		num2 = 0; 
	} 
	shippingResult.hearthExpGained = num2; 
	EClass.pc.homeBranch.log.Add(Msg.Say("shipped_collect"));
	foreach (string item in list2)
	{

GrowSystemTreeCoralwood

@@ -20,6 +20,12 @@ public override bool BlockSight(Cell cell)

cs
	public override void OnSetObj()
	{
		GrowSystem.cell.isObjDyed = true;
		GrowSystem.cell.objDir = EClass.rnd(source.tiles.Length); 
		GrowSystem.cell.objMat = (byte)EClass.sources.materials.rows.Where((SourceMaterial.Row r) => r.tag.Contains("coral")).RandomItem().id;
	}

	public override int GetStageTile() 
	{ 
		return source._tiles[GrowSystem.cell.objDir % source._tiles.Length]; 
	} 
}

HealSource

@@ -2,5 +2,6 @@ public enum HealSource

cs
{
	None,
	Magic,
	HOT 
	HOT, 
	Item 
}

InvOwnerMod

@@ -6,9 +6,9 @@ public class InvOwnerMod : InvOwnerDraglet

cs

	public static bool IsValidRuneMod(Thing t, SourceElement.Row row, string idMat)
	{
		if (idMat == "adamantite") 
		if (t.category.slot != 0 && !t.isRuneAdded && !t.HasElement(row.id)) 
		{
			return t.category.slot == 35; 
			return !t.IsUnique; 
		}
		return false;
	}

@@ -41,8 +41,9 @@ public override bool ShouldShowGuide(Thing t)

cs
		{
			return false;
		}
		return true; 
	}
	else if (!IsValidRangedMod(t, traitMod.source)) 
	if (!IsValidRangedMod(t, traitMod.source)) 
	{
		return false;
	}

@@ -61,9 +62,19 @@ public override bool ShouldShowGuide(Thing t)

cs

	public override void _OnProcess(Thing t)
	{
		SE.Play("reloaded"); 
		EClass.pc.PlayEffect("identify"); 
		Msg.Say("modded", t, owner);
		t.ApplySocket(owner.Thing); 
		if (owner.trait is TraitRune) 
		{ 
			SE.Play("intonation"); 
			EClass.pc.PlayEffect("intonation"); 
			t.elements.ModBase(owner.refVal, owner.encLV); 
			t.isRuneAdded = true; 
		} 
		else
		{ 
			SE.Play("reloaded"); 
			EClass.pc.PlayEffect("identify"); 
			t.ApplySocket(owner.Thing); 
		} 
	}
}

MUTATION

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

cs
public class MUTATION
{
	public const int mutationRegen = 1516; 
	public const int mutationSpeedN = 1519; 

	public const int etherManaBattery = 1564; 
	public const int mutationSpeed = 1518; 

	public const int mutationSkin = 1510; 
	public const int mutationRegenN = 1517; 

	public const int mutationRegen = 1516; 

	public const int mutationSkinN = 1511;

	public const int mutationDex = 1514; 

	public const int mutationEye = 1512;

	public const int mutationEyeN = 1513; 
	public const int mutationSkin = 1510; 

	public const int mutationDex = 1514; 
	public const int mutationStr = 1520; 

	public const int mutationDexN = 1515;

	public const int mutationRegenN = 1517; 
	public const int mutationStrN = 1521; 

	public const int mutationEyeN = 1513; 

	public const int mutationChaN = 1523; 

	public const int etherPoisonHand = 1565;

	public const int mutationSpeedN = 1519; 
	public const int mutationCha = 1522; 

	public const int etherProvoke = 1563;

	public const int etherArmor = 1562;

	public const int mutationSpeed = 1518; 
	public const int etherStupid = 1561; 

	public const int etherWeak = 1560;

@@ -42,46 +50,38 @@ public class MUTATION

cs

	public const int etherWing = 1554;

	public const int etherEye = 1553; 
	public const int etherManaBattery = 1564; 

	public const int etherFeet = 1552;

	public const int etherUgly = 1551;

	public const int etherStupid = 1561; 

	public const int mutationBodyN = 1531; 

	public const int etherGravity = 1550;

	public const int mutationStr = 1520; 

	public const int mutationCha = 1522; 

	public const int mutationChaN = 1523; 
	public const int mutationBodyN = 1531; 

	public const int mutationBrain = 1524; 
	public const int mutationBody = 1530; 

	public const int mutationBrainN = 1525; 
	public const int mutationLightningN = 1529; 

	public const int mutationStrN = 1521; 
	public const int mutationLightning = 1528; 

	public const int mutationColdN = 1527;

	public const int mutationLightning = 1528; 
	public const int mutationCold = 1526; 

	public const int mutationLightningN = 1529; 
	public const int mutationBrainN = 1525; 

	public const int mutationBody = 1530; 
	public const int mutationBrain = 1524; 

	public const int mutationCold = 1526; 
	public const int etherEye = 1553; 

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

POLICY

@@ -3,29 +3,29 @@

cs

public class POLICY
{
	public const int store_ripoff = 2816; 
	public const int forcePanty = 2712; 

	public const int livestock_priv = 2715; 
	public const int platinum_ticket = 2815; 

	public const int home_discount = 2800; 
	public const int mass_exhibition = 2814; 

	public const int open_business = 2810; 
	public const int suite_room = 2813; 

	public const int tourist_safety = 2811; 
	public const int livestock_priv = 2715; 

	public const int bed_quality = 2812; 
	public const int tourist_safety = 2811; 

	public const int forcePanty = 2712; 
	public const int open_business = 2810; 

	public const int suite_room = 2813; 
	public const int home_discount = 2800; 

	public const int mass_exhibition = 2814; 
	public const int store_ripoff = 2816; 

	public const int platinum_ticket = 2815; 
	public const int bed_quality = 2812; 

	public const int store_premium = 2817;

	public const int legendary_exhibition = 2823; 
	public const int celeb = 2822; 

	public const int license_furniture = 2819;

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

cs

	public const int legendary_heirloom = 2821;

	public const int celeb = 2822; 
	public const int legendary_exhibition = 2823; 

	public const int license_stolen = 2824;

@@ -45,18 +45,16 @@ public class POLICY

cs

	public const int license_slaver = 2828;

	public const int incomeTransfer = 2711; 

	public const int license_food = 2818;

	public const int noMother = 2710; 

	public const int inquisition = 2507; 
	public const int incomeTransfer = 2711; 

	public const int noDM = 2708; 
	public const int self_sufficient = 2511; 

	public const int noAnimal = 2709;

	public const int noMother = 2710; 

	public const int food_for_people = 2502;

	public const int faith_tax = 2501;

@@ -69,33 +67,35 @@ public class POLICY

cs

	public const int legal_drug = 2505;

	public const int inquisition = 2507; 

	public const int nocturnal_life = 2508;

	public const int vaccination = 2509;

	public const int ban_radio = 2510;

	public const int self_sufficient = 2511; 

	public const int resident_tax = 2512;

	public const int human_right = 2506;

	public const int taxfree = 2514;

	public const int resident_wanted = 2513; 

	public const int auto_farm = 2707;

	public const int resident_wanted = 2513; 
	public const int demon_invocation = 2706; 

	public const int taxTransfer = 2705;

	public const int border_watch = 2704; 
	public const int noDM = 2708; 

	public const int demon_invocation = 2706; 
	public const int weed_no = 2703; 

	public const int trash_no = 2702; 
	public const int border_watch = 2704; 

	public const int weed_no = 2703; 
	public const int trash_sort = 2701; 

	public const int energy_conservation = 2700;

@@ -103,16 +103,16 @@ public class POLICY

cs

	public const int stop_growth = 2515;

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

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

Recipe

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

cs
		break;
	case "Obj":
		EClass._map.SetObj(pos.x, pos.z, mat, tileRow.id, 1, dir);
		if (tileType.ChangeBlockDir) 
		if (tileType.ChangeBlockDir || pos.growth is GrowSystemTreeSingle) 
		{
			EClass._map.SetBlockDir(pos.x, pos.z, dir);
		}

RecipeCard

@@ -449,7 +449,7 @@ void CheckBlock(Point _pos)

cs
	{
		if (_pos.cell.IsBlocked && _pos.HasChara)
		{
			foreach (Chara item in _pos.ListCharas()) 
			foreach (Chara item in _pos.ListCharas().Copy()) 
			{
				chara.Kick(item, ignoreSelf: false, karmaLoss: false);
			}

SKILL

@@ -1,27 +1,27 @@

cs
public class SKILL
{
	public const int twowield = 131; 

	public const int tactics = 132;

	public const int twowield = 131; 

	public const int twohand = 130;

	public const int shield = 123;

	public const int armorHeavy = 122;

	public const int weaponCrossbow = 109; 
	public const int acidproof = 51; 

	public const int weaponBlunt = 111;

	public const int weaponScythe = 110;

	public const int weaponCrossbow = 109; 

	public const int fireproof = 50;

	public const int marksman = 133;

	public const int acidproof = 51; 

	public const int armorLight = 120;

	public const int eyeofmind = 134;

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

cs

	public const int mining = 220;

	public const int spotting = 210; 
	public const int fishing = 245; 

	public const int weightlifting = 207;

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

cs

	public const int life = 60;

	public const int fishing = 245; 
	public const int mana = 61; 

	public const int vigor = 62;

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

cs

	public const int weaponStaff = 103;

	public const int weaponBow = 104; 

	public const int weaponGun = 105;

	public const int weaponPolearm = 106;

@@ -126,13 +128,11 @@ public class SKILL

cs

	public const int throwing = 108;

	public const int mana = 61; 

	public const int LUC = 78;

	public const int gathering = 250;

	public const int weaponBow = 104; 
	public const int spotting = 210; 

	public const int blacksmith = 256;

@@ -144,8 +144,6 @@ public class SKILL

cs

	public const int eleHoly = 919;

	public const int eleChaos = 920; 

	public const int eleMagic = 921;

	public const int eleEther = 922;

@@ -164,11 +162,11 @@ public class SKILL

cs

	public const int resLightning = 952;

	public const int elePoison = 915; 

	public const int resDarkness = 953;

	public const int resPoison = 955; 
	public const int elePoison = 915; 

	public const int resMind = 954; 

	public const int resNether = 956;

@@ -190,17 +188,19 @@ public class SKILL

cs

	public const int resImpact = 965;

	public const int resDecay = 970; 

	public const int resDamage = 971;

	public const int resCurse = 972;

	public const int carpentry = 255;

	public const int resMind = 954; 
	public const int resPoison = 955; 

	public const int eleMind = 914;

	public const int resDecay = 970; 
	public const int eleChaos = 920; 

	public const int eleLightning = 912;

@@ -222,7 +222,9 @@ public class SKILL

cs

	public const int farming = 286;

	public const int cooking = 287; 
	public const int eleDarkness = 913; 

	public const int building = 288; 

	public const int appraising = 289;

@@ -232,25 +234,23 @@ public class SKILL

cs

	public const int investing = 292;

	public const int building = 288; 
	public const int cooking = 287; 

	public const int regeneration = 300;

	public const int eleCold = 911;

	public const int eleFire = 910; 
	public const int disarmTrap = 293; 

	public const int env = 313;

	public const int disarmTrap = 293; 

	public const int fun = 312;

	public const int bladder = 311;

	public const int hygine = 310;

	public const int eleDarkness = 913; 
	public const int eleFire = 910; 

	public const int faith = 306;

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

cs

	public static readonly int[] IDS = new int[133]
	{
		131, 132, 130, 123, 122, 109, 111, 110, 50, 133, 
		51, 120, 134, 227, 150, 242, 241, 240, 237, 235, 
		230, 55, 226, 225, 220, 210, 207, 200, 152, 151, 
		135, 56, 101, 60, 245, 62, 64, 65, 66, 67, 
		132, 131, 130, 123, 122, 51, 111, 110, 109, 50, 
		133, 120, 134, 227, 150, 242, 241, 240, 237, 235, 
		230, 55, 226, 225, 220, 245, 207, 200, 152, 151, 
		135, 56, 101, 60, 61, 62, 64, 65, 66, 67, 
		68, 70, 71, 72, 73, 74, 75, 76, 57, 77,
		79, 80, 90, 91, 92, 93, 100, 102, 103, 105, 
		106, 107, 108, 61, 78, 250, 104, 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, 971, 972, 255, 954, 914, 
		970, 912, 257, 258, 259, 260, 261, 280, 281, 285, 
		286, 287, 289, 290, 291, 292, 288, 300, 911, 910, 
		313, 293, 312, 311, 310, 913, 306, 305, 304, 303, 
		79, 80, 90, 91, 92, 93, 100, 102, 103, 104, 
		105, 106, 107, 108, 78, 250, 210, 256, 916, 917, 
		918, 919, 921, 922, 923, 924, 925, 926, 950, 951, 
		952, 953, 915, 954, 956, 957, 958, 959, 960, 961, 
		962, 963, 964, 965, 970, 971, 972, 255, 955, 914, 
		920, 912, 257, 258, 259, 260, 261, 280, 281, 285, 
		286, 913, 288, 289, 290, 291, 292, 287, 300, 911, 
		293, 313, 312, 311, 310, 910, 306, 305, 304, 303, 
		302, 307, 301
	};
}

SLOT

@@ -1,40 +1,40 @@

cs
public class SLOT
{
	public const int toolbelt = 44; 
	public const int arm = 34; 

	public const int torso = 32; 
	public const int hand = 35; 

	public const int foot = 39; 
	public const int finger = 36; 

	public const int lightsource = 45; 
	public const int waist = 37; 

	public const int leg = 38;

	public const int arm = 34; 

	public const int waist = 37; 

	public const int tool = 40;

	public const int back = 33; 
	public const int lightsource = 45; 

	public const int hand = 35; 
	public const int toolbelt = 44; 

	public const int neck = 31; 
	public const int range = 41; 

	public const int finger = 36; 
	public const int token = 43; 

	public const int range = 41; 
	public const int back = 33; 

	public const int head = 30; 
	public const int foot = 39; 

	public const int torso = 32; 

	public const int ammo = 42;

	public const int token = 43; 
	public const int neck = 31; 

	public const int head = 30; 

	public static readonly int[] IDS = new int[16]
	{
		44, 32, 39, 45, 38, 34, 37, 40, 33, 35, 
		31, 36, 41, 30, 42, 43
		34, 35, 36, 37, 38, 40, 45, 44, 41, 43, 
		33, 39, 32, 42, 31, 30
	};
}

SPELL

@@ -1,13 +1,15 @@

cs
public class SPELL
{
	public const int ball_Sound = 50107; 
	public const int puddle_Nether = 50906; 

	public const int puddle_Darkness = 50903; 
	public const int ball_Sound = 50107; 

	public const int bolt_Sound = 50307;

	public const int hand_Sound = 50407;

	public const int ball_Void = 50116; 

	public const int arrow_Sound = 50507;

	public const int funnel_Sound = 50607;

@@ -16,11 +18,11 @@ public class SPELL

cs

	public const int weapon_Sound = 50807;

	public const int ball_Nerve = 50108; 
	public const int weapon_Nether = 50806; 

	public const int weapon_Darkness = 50803; 
	public const int puddle_Sound = 50907; 

	public const int ball_Holy = 50109; 
	public const int puddle_Impact = 50915; 

	public const int bolt_Nerve = 50308;

@@ -36,35 +38,47 @@ public class SPELL

cs

	public const int puddle_Nerve = 50908;

	public const int puddle_Sound = 50907; 
	public const int ball_Holy = 50109; 

	public const int puddle_Nether = 50906; 
	public const int weapon_Impact = 50815; 

	public const int weapon_Nether = 50806; 
	public const int ball_Nerve = 50108; 

	public const int bolt_Holy = 50309; 

	public const int miasma_Nether = 50706;

	public const int puddle_Mind = 50904; 
	public const int funnel_Nether = 50606; 

	public const int hand_Mind = 50404; 

	public const int arrow_Mind = 50504; 

	public const int funnel_Mind = 50604; 

	public const int miasma_Mind = 50704;

	public const int weapon_Mind = 50804; 

	public const int miasma_Void = 50716; 

	public const int puddle_Mind = 50904; 

	public const int ball_Poison = 50105;

	public const int funnel_Mind = 50604; 
	public const int funnel_Void = 50616; 

	public const int bolt_Poison = 50305;

	public const int hand_Poison = 50405; 
	public const int bolt_Void = 50316; 

	public const int arrow_Poison = 50505; 
	public const int hand_Poison = 50405; 

	public const int funnel_Poison = 50605;

	public const int arrow_Mind = 50504; 

	public const int miasma_Poison = 50705;

	public const int hand_Mind = 50404; 
	public const int arrow_Void = 50516; 

	public const int weapon_Poison = 50805;

@@ -72,7 +86,7 @@ public class SPELL

cs

	public const int ball_Nether = 50106;

	public const int bolt_Mind = 50304; 
	public const int hand_Void = 50416; 

	public const int bolt_Nether = 50306;

@@ -80,19 +94,25 @@ public class SPELL

cs

	public const int arrow_Nether = 50506;

	public const int funnel_Nether = 50606; 
	public const int arrow_Poison = 50505; 

	public const int ball_Mind = 50104; 
	public const int ball_Impact = 50115; 

	public const int weapon_Mind = 50804; 
	public const int hand_Holy = 50409; 

	public const int ball_Acid = 50113; 
	public const int funnel_Holy = 50609; 

	public const int hand_Holy = 50409; 
	public const int funnel_Ether = 50612; 

	public const int miasma_Ether = 50712; 

	public const int weapon_Ether = 50812; 

	public const int puddle_Ether = 50912;

	public const int miasma_Darkness = 50703; 
	public const int ball_Acid = 50113; 

	public const int hand_Impact = 50415; 

	public const int bolt_Acid = 50313;

@@ -102,14 +122,16 @@ public class SPELL

cs

	public const int funnel_Acid = 50613;

	public const int miasma_Acid = 50713; 
	public const int arrow_Ether = 50512; 

	public const int weapon_Acid = 50813; 
	public const int miasma_Acid = 50713; 

	public const int puddle_Acid = 50913;

	public const int ball_Cut = 50114;

	public const int bolt_Impact = 50315; 

	public const int bolt_Cut = 50314;

	public const int hand_Cut = 50414;

@@ -124,30 +146,14 @@ public class SPELL

cs

	public const int puddle_Cut = 50914;

	public const int ball_Impact = 50115; 
	public const int bolt_Mind = 50304; 

	public const int bolt_Impact = 50315; 
	public const int arrow_Holy = 50509; 

	public const int hand_Impact = 50415; 
	public const int hand_Ether = 50412; 

	public const int arrow_Impact = 50515;

	public const int funnel_Impact = 50615; 

	public const int miasma_Impact = 50715; 

	public const int weapon_Ether = 50812; 

	public const int miasma_Ether = 50712; 

	public const int funnel_Ether = 50612; 

	public const int arrow_Ether = 50512; 

	public const int arrow_Holy = 50509; 

	public const int funnel_Holy = 50609; 

	public const int miasma_Holy = 50709;

	public const int weapon_Holy = 50809;

@@ -156,6 +162,8 @@ public class SPELL

cs

	public const int ball_Chaos = 50110;

	public const int miasma_Impact = 50715; 

	public const int bolt_Chaos = 50310;

	public const int hand_Chaos = 50410;

@@ -166,12 +174,14 @@ public class SPELL

cs

	public const int miasma_Chaos = 50710;

	public const int bolt_Holy = 50309; 
	public const int bolt_Ether = 50312; 

	public const int weapon_Chaos = 50810;

	public const int ball_Magic = 50111;

	public const int funnel_Impact = 50615; 

	public const int bolt_Magic = 50311;

	public const int hand_Magic = 50411;

@@ -188,21 +198,13 @@ public class SPELL

cs

	public const int ball_Ether = 50112;

	public const int bolt_Ether = 50312; 

	public const int hand_Ether = 50412; 

	public const int puddle_Chaos = 50910;

	public const int funnel_Darkness = 50603; 

	public const int SpDrawMonster = 9501; 

	public const int hand_Darkness = 50403; 
	public const int weapon_Acid = 50813; 

	public const int SpLevitate = 8300; 
	public const int bolt_Fire = 50300; 

	public const int SpMutation = 8380; 
	public const int puddle_Darkness = 50903; 

	public const int SpWish = 8390;

@@ -222,10 +224,10 @@ public class SPELL

cs

	public const int SpRevive = 8430;

	public const int SpReconstruction = 8288; 

	public const int SpHOT = 8450;

	public const int SpRestoreBody = 8470; 

	public const int SpRestoreMind = 8471;

	public const int SpCureMutation = 8480;

@@ -248,15 +250,19 @@ public class SPELL

cs

	public const int SpSpeedUp = 8510;

	public const int SpRestoreBody = 8470; 

	public const int SpSilence = 8700;

	public const int SpChangeMaterialG = 8286; 
	public const int SpWeakness = 8702; 

	public const int SpChangeMaterialLesser = 8284; 
	public const int SpWeakResEle = 8704; 

	public const int weapon_Impact = 50815; 
	public const int SpMutation = 8380; 

	public const int SpBane = 8706; 

	public const int SpLevitate = 8300; 

	public const int SpChangeMaterialG = 8286; 

	public const int ball_ = 7001;

@@ -278,10 +284,10 @@ public class SPELL

cs

	public const int SpTeleportShort = 8201;

	public const int SpChangeMaterial = 8285; 

	public const int SpReturn = 8220;

	public const int SpEvac = 8221; 

	public const int SpIdentify = 8230;

	public const int SpIdentifyG = 8232;

@@ -304,21 +310,17 @@ public class SPELL

cs

	public const int SpFaith = 8281;

	public const int SpEvac = 8221; 

	public const int arrow_Darkness = 50503; 

	public const int SpWeakness = 8702; 
	public const int SpChangeMaterialLesser = 8284; 

	public const int SpBane = 8706; 
	public const int SpChangeMaterial = 8285; 

	public const int hand_Fire = 50400; 
	public const int SpReconstruction = 8288; 

	public const int arrow_Fire = 50500; 
	public const int SpGravity = 8708; 

	public const int funnel_Fire = 50600; 
	public const int SpSpeedDown = 8710; 

	public const int miasma_Fire = 50700; 
	public const int SpTelepathy = 8770; 

	public const int weapon_Fire = 50800;

@@ -334,10 +336,10 @@ public class SPELL

cs

	public const int funnel_Cold = 50601;

	public const int bolt_Fire = 50300; 

	public const int miasma_Cold = 50701;

	public const int weapon_Cold = 50801; 

	public const int puddle_Cold = 50901;

	public const int ball_Lightning = 50102;

@@ -360,19 +362,23 @@ public class SPELL

cs

	public const int bolt_Darkness = 50303;

	public const int weapon_Cold = 50801; 
	public const int hand_Darkness = 50403; 

	public const int SpWeakResEle = 8704; 
	public const int arrow_Darkness = 50503; 

	public const int ball_Fire = 50100; 
	public const int funnel_Darkness = 50603; 

	public const int SpDrawMetal = 9502; 
	public const int miasma_Darkness = 50703; 

	public const int SpGravity = 8708; 
	public const int weapon_Darkness = 50803; 

	public const int SpSpeedDown = 8710; 
	public const int miasma_Fire = 50700; 

	public const int SpTelepathy = 8770; 
	public const int funnel_Fire = 50600; 

	public const int arrow_Fire = 50500; 

	public const int hand_Fire = 50400; 

	public const int SpInvisibility = 8775;

@@ -390,17 +396,17 @@ public class SPELL

cs

	public const int SpSummon = 9000;

	public const int SpDrawBacker = 9503; 

	public const int SpSummonUndeadSister = 9001;

	public const int SpSummonFire = 9002; 

	public const int SpSummonTentacle = 9003;

	public const int SpSummonMonster = 9004;

	public const int SpSummonPawn = 9005; 
	public const int ball_Mind = 50104; 

	public const int SpSummonYeek = 9006; 
	public const int SpSummonPawn = 9005; 

	public const int SpSummonOrc = 9007;

@@ -416,33 +422,44 @@ public class SPELL

cs

	public const int SpWardMonster = 9500;

	public const int SpSummonFire = 9002; 
	public const int SpDrawMonster = 9501; 

	public const int puddle_Impact = 50915; 
	public const int SpDrawMetal = 9502; 

	public const int SpDrawBacker = 9503; 

	public const int ball_Fire = 50100; 

	public const int weapon_Void = 50816; 

	public const int SpSummonYeek = 9006; 

	public const int puddle_Void = 50916; 

	public static readonly int[] IDS = new int[210] 
	public static readonly int[] IDS = new int[218] 
	{
		50107, 50903, 50307, 50407, 50507, 50607, 50707, 50807, 50108, 50803, 
		50109, 50308, 50408, 50508, 50608, 50708, 50808, 50908, 50907, 50906, 
		50806, 50706, 50904, 50704, 50105, 50604, 50305, 50405, 50505, 50605, 
		50504, 50705, 50404, 50805, 50905, 50106, 50304, 50306, 50406, 50506, 
		50606, 50104, 50804, 50113, 50409, 50912, 50703, 50313, 50413, 50513, 
		50613, 50713, 50813, 50913, 50114, 50314, 50414, 50514, 50614, 50714, 
		50814, 50914, 50115, 50315, 50415, 50515, 50615, 50715, 50812, 50712, 
		50612, 50512, 50509, 50609, 50709, 50809, 50909, 50110, 50310, 50410, 
		50510, 50610, 50710, 50309, 50810, 50111, 50311, 50411, 50511, 50611, 
		50711, 50811, 50911, 50112, 50312, 50412, 50910, 50603, 9501, 50403, 
		8300, 8380, 8390, 8400, 8401, 8402, 8403, 8404, 8405, 8406, 
		8430, 8288, 8450, 8471, 8480, 8490, 8491, 8500, 8501, 8502, 
		8503, 8504, 8506, 8510, 8470, 8700, 8286, 8284, 50815, 7001, 
		7002, 7003, 7004, 7005, 7006, 7007, 7800, 8200, 8201, 8285, 
		8220, 8230, 8232, 8240, 8241, 8250, 8251, 8255, 8256, 8260, 
		8280, 8281, 8221, 50503, 8702, 8706, 50400, 50500, 50600, 50700, 
		50800, 50900, 50101, 50301, 50401, 50501, 50601, 50300, 50701, 50901, 
		50102, 50302, 50402, 50502, 50602, 50702, 50802, 50902, 50103, 50303, 
		50801, 8704, 50100, 9502, 8708, 8710, 8770, 8775, 8776, 8780, 
		8790, 8791, 8800, 8801, 9000, 9503, 9001, 9003, 9004, 9005, 
		9006, 9007, 9050, 9150, 9151, 9160, 9200, 9500, 9002, 50915
		50906, 50107, 50307, 50407, 50116, 50507, 50607, 50707, 50807, 50806, 
		50907, 50915, 50308, 50408, 50508, 50608, 50708, 50808, 50908, 50109, 
		50815, 50108, 50309, 50706, 50606, 50404, 50504, 50604, 50704, 50804, 
		50716, 50904, 50105, 50616, 50305, 50316, 50405, 50605, 50705, 50516, 
		50805, 50905, 50106, 50416, 50306, 50406, 50506, 50505, 50115, 50409, 
		50609, 50612, 50712, 50812, 50912, 50113, 50415, 50313, 50413, 50513, 
		50613, 50512, 50713, 50913, 50114, 50315, 50314, 50414, 50514, 50614, 
		50714, 50814, 50914, 50304, 50509, 50412, 50515, 50709, 50809, 50909, 
		50110, 50715, 50310, 50410, 50510, 50610, 50710, 50312, 50810, 50111, 
		50615, 50311, 50411, 50511, 50611, 50711, 50811, 50911, 50112, 50910, 
		50813, 50300, 50903, 8390, 8400, 8401, 8402, 8403, 8404, 8405, 
		8406, 8430, 8450, 8470, 8471, 8480, 8490, 8491, 8500, 8501, 
		8502, 8503, 8504, 8506, 8510, 8700, 8702, 8704, 8380, 8706, 
		8300, 8286, 7001, 7002, 7003, 7004, 7005, 7006, 7007, 7800, 
		8200, 8201, 8220, 8221, 8230, 8232, 8240, 8241, 8250, 8251, 
		8255, 8256, 8260, 8280, 8281, 8284, 8285, 8288, 8708, 8710, 
		8770, 50800, 50900, 50101, 50301, 50401, 50501, 50601, 50701, 50801, 
		50901, 50102, 50302, 50402, 50502, 50602, 50702, 50802, 50902, 50103, 
		50303, 50403, 50503, 50603, 50703, 50803, 50700, 50600, 50500, 50400, 
		8775, 8776, 8780, 8790, 8791, 8800, 8801, 9000, 9001, 9002, 
		9003, 9004, 50104, 9005, 9007, 9050, 9150, 9151, 9160, 9200, 
		9500, 9501, 9502, 9503, 50100, 50816, 9006, 50916
	};
}
public class Spell : Ability

Scene

@@ -110,6 +110,8 @@ public enum Mode

cs

	public ParticleSystem psRainSplashWater;

	public ParticleSystem psFey; 

	public MeshPass[] passes;

	[NonSerialized]

Thing

@@ -1069,7 +1069,11 @@ public override void WriteNote(UINote n, Action<UINote> onWriteNote = null, IIns

cs
	}
	if (GetInt(107) > 0)
	{
		n.AddText("isLicked"); 
		n.AddText("isLicked", FontColor.Great); 
	} 
	if (base.isRuneAdded) 
	{ 
		n.AddText("isRuneAdded", FontColor.Great); 
	}
	if (!base.c_idDeity.IsEmpty())
	{

TraitBaseSpellbook

@@ -126,7 +126,7 @@ public static void ReadFailEffect(Chara c)

cs
	{
		c.Say("spell_fail_monster", c);
		c.PlaySound("spell_funnel");
		for (int i = 0; i < 1 + EClass._zone.DangerLv / 15 + EClass.rnd(3 + EClass._zone.DangerLv / 15); i++) 
		for (int i = 0; i < Mathf.Clamp(1 + EClass._zone.DangerLv / 15 + EClass.rnd(3 + EClass._zone.DangerLv / 15), 1, 8); i++) 
		{
			Chara chara = CharaGen.CreateFromFilter("c_readFail", EClass._zone.DangerLv);
			EClass._zone.AddCard(chara, c.pos.GetNearestPoint(allowBlock: false, allowChara: false));

TraitCrafter

@@ -15,7 +15,8 @@ public enum MixType

cs
		Talisman,
		Scratch,
		Incubator,
		Fortune 
		Fortune, 
		RuneMold 
	}

	public enum AnimeType

@@ -270,6 +271,7 @@ public virtual Thing Craft(AI_UseCrafter ai)

cs
	MixType mixType = source.type.ToEnum<MixType>();
	int num = source.num.Calc();
	Thing t = null;
	bool claimed; 
	switch (mixType)
	{
	case MixType.Food:

@@ -314,6 +316,44 @@ public virtual Thing Craft(AI_UseCrafter ai)

cs
		t = CraftUtil.MixIngredients(t, ai.ings, CraftUtil.MixType.General, 999, EClass.pc).Thing;
		break;
	}
	case MixType.RuneMold:
	{ 
		Thing eq = ai.ings[0]; 
		List<Element> list2 = eq.elements.ListRune(); 
		if (list2.Count == 0) 
		{ 
			Msg.SayNothingHappen(); 
			break; 
		} 
		if (eq.material.hardness > owner.material.hardness) 
		{ 
			Msg.Say("rune_tooHard", owner); 
			break; 
		} 
		EClass.ui.AddLayer<LayerList>().SetList2(list2, (Element a) => a.Name, delegate(Element a, ItemGeneral b) 
		{ 
			owner.ModNum(-1); 
			eq.Destroy(); 
			Thing thing7 = ThingGen.Create("rune"); 
			thing7.refVal = a.id; 
			thing7.encLV = a.vBase + a.vSource; 
			EClass.pc.Pick(thing7); 
			EClass.pc.PlaySound("intonation"); 
			EClass.pc.PlayEffect("intonation"); 
		}, delegate(Element a, ItemGeneral b) 
		{ 
			if (EClass.debug.showExtra) 
			{ 
				b.SetSubText(a.vBase.ToString() + a.vSource, 200, FontColor.Default, TextAnchor.MiddleRight); 
			} 
			b.Build(); 
		}).SetSize(500f) 
			.SetOnKill(delegate
			{ 
			}) 
			.SetTitles("wRuneMold"); 
		break; 
	} 
	case MixType.Talisman:
	{
		int num4 = EClass.pc.Evalue(1418);

@@ -331,8 +371,7 @@ public virtual Thing Craft(AI_UseCrafter ai)

cs
		break;
	}
	case MixType.Scratch:
	{ 
		bool claimed = false; 
		claimed = false; 
		Prize(20, "medal", "save", cat: false);
		Prize(10, "plat", "save", cat: false);
		Prize(10, "furniture", "nice", cat: true);

@@ -340,7 +379,6 @@ public virtual Thing Craft(AI_UseCrafter ai)

cs
		Prize(4, "food", "", cat: false);
		Prize(1, "casino_coin", "", cat: false);
		break;
	} 
	case MixType.Fortune:
	{
		EClass.player.seedFortune++;

@@ -409,6 +447,18 @@ public virtual Thing Craft(AI_UseCrafter ai)

cs
			t.SetNum(num);
		}
		return t;
		void Prize(int chance, string s, string col, bool cat) 
		{ 
			if (!claimed && EClass.rnd(chance) == 0) 
			{ 
				t = (cat ? ThingGen.CreateFromCategory(s, EClass.pc.LV) : ThingGen.Create(s, -1, EClass.pc.LV)); 
				claimed = true; 
				if (col != "") 
				{ 
					Msg.SetColor(col); 
				} 
			} 
		} 
	}

	public override void TrySetAct(ActPlan p)

TraitDrink

@@ -152,7 +152,8 @@ public override void OnDrink(Chara c)

cs
		ActEffect.Proc(IdEffect, Power, owner.blessedState, c, null, new ActRef
		{
			n1 = N1,
			isPerfume = (this is TraitPerfume) 
			isPerfume = (this is TraitPerfume), 
			refThing = owner.Thing 
		});
	}

TraitKettle

@@ -56,6 +56,10 @@ public override bool CanCopy(Thing t)

cs
	{
		return true;
	}
	if (t.HasElement(759)) 
	{ 
		return false; 
	} 
	if (t.sockets != null)
	{
		foreach (int socket in t.sockets)

+TraitRuneMold

File Created
cs
public class TraitRuneMold : TraitCrafter
{
	public override string IdSource => "RuneMold";

	public override string CrafterTitle => "invSculpt";

	public override AnimeID IdAnimeProgress => AnimeID.Shiver;

	public override string idSoundProgress => "craft_sculpt";

	public override bool IsConsumeIng => false;

	public override bool CloseOnComplete => true;

	public virtual Rarity MaxRarity => Rarity.Normal;

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

	public override bool ShouldConsumeIng(SourceRecipe.Row item, int index)
	{
		return false;
	}
}

+TraitRuneMoldEarth

File Created
cs
public class TraitRuneMoldEarth : TraitRuneMold
{
	public override Rarity MaxRarity => Rarity.Superior;
}

+TraitRuneMoldMana

File Created
cs
public class TraitRuneMoldMana : TraitRuneMold
{
	public override Rarity MaxRarity => Rarity.Mythical;
}

+TraitRuneMoldSun

File Created
cs
public class TraitRuneMoldSun : TraitRuneMold
{
	public override Rarity MaxRarity => Rarity.Legendary;
}

TraitStairsDown

@@ -5,4 +5,6 @@ public class TraitStairsDown : TraitStairs

cs
	public override string langOnUse => "stairsDown";

	public override bool IsDownstairs => true;

	public override int InstallBottomPriority => 20000; 
}