Skip to content

EA 23.167 Nightly

July 8, 2025

27 files modified. 1 new file created.

Important Changes

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

Trait (1)

cs
public virtual void OnCrafted(Recipe recipe) 
public virtual void OnCrafted(Recipe recipe, List<Thing> ings) 

TraitBlanket (1)

cs
public override void OnCrafted(Recipe recipe) 
public override void OnCrafted(Recipe recipe, List<Thing> ings) 

TraitPotionAlchemy (1)

cs
public override void OnCrafted(Recipe recipe) 
public override void OnCrafted(Recipe recipe, List<Thing> ings) 

ABILITY

@@ -2,13 +2,11 @@

cs

public class ABILITY
{
	public const int ActInstall = 5046; 
	public const int ActChat = 5044; 
	public const int ActPick = 5047; 

	public const int AI_Drink = 5045;

	public const int ActPick = 5047; 
	public const int ActInstall = 5046; 

	public const int ActItem = 5048;

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

cs

	public const int AI_Steal = 6011;

	public const int AI_TendAnimal = 5043; 
	public const int ActQuickCraft = 6012;

	public const int AI_SelfHarm = 6015; 
	public const int ActChat = 5044; 
	public const int AI_PassTime = 6013; 

	public const int ActRide = 6018;

@@ -54,7 +52,7 @@ public class ABILITY

cs

	public const int ActRush = 6450;

	public const int ActCurse = 6600; 
	public const int ActCrabBreathe = 6500; 

	public const int ActEntangle = 6601;

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

cs

	public const int ActCryRage = 6604;

	public const int AI_PassTime = 6013; 
	public const int ActWeaken = 6610;

	public const int ActKick = 5042; 
	public const int AI_SelfHarm = 6015; 

	public const int ActRanged = 5040; 
	public const int ActFear = 6611; 

	public const int TaskDig = 5010; 
	public const int AI_TendAnimal = 5043; 
	public const int AI_Read = 5041; 

	public const int TaskCut = 5011;

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

cs

	public const int TaskGoOut = 5023;

	public const int AI_Read = 5041; 
	public const int AI_Eat = 5024;

	public const int AI_Haul = 5026; 
	public const int ActKick = 5042; 
	public const int AI_Grab = 5025; 

	public const int GoalSleep = 5027;

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

cs

	public const int AI_Fish = 5039;

	public const int AI_Grab = 5025; 
	public const int ActRanged = 5040; 

	public const int ActFear = 6611; 
	public const int AI_Haul = 5026; 

	public const int ActCrabBreathe = 6500; 
	public const int ActTouchSleep = 6612; 

	public const int ActTouchDrown = 6613; 
	public const int ActCurse = 6600; 
	public const int ActGazeDim = 6620; 

	public const int breathe_Lightning = 50202;

@@ -158,15 +158,15 @@ public class ABILITY

cs

	public const int breathe_Chaos = 50210;

	public const int ActTouchSleep = 6612; 
	public const int ActTouchDrown = 6613; 

	public const int breathe_Ether = 50212;

	public const int breathe_Acid = 50213;

	public const int breathe_Cut = 50214; 
	public const int breathe_Cold = 50201; 

	public const int breathe_Impact = 50215; 
	public const int breathe_Cut = 50214; 

	public const int breathe_Void = 50216;

@@ -190,7 +190,9 @@ public class ABILITY

cs

	public const int TaskMine = 5009;

	public const int breathe_Cold = 50201; 
	public const int TaskDig = 5010; 
	public const int breathe_Impact = 50215; 

	public const int breathe_Fire = 50200;

@@ -198,71 +200,71 @@ public class ABILITY

cs

	public const int ActHeadpat = 6904;

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

	public const int ActDrainBlood = 6626; 
	public const int ActInsult = 6630; 

	public const int ActCatHuffing = 6627;

	public const int ActInsult = 6630; 
	public const int ActScream = 6631; 
	public const int ActDrainBlood = 6626; 

	public const int breathe_ = 7000; 
	public const int ActStealFood = 6641; 

	public const int ActGazeInsane = 6621;

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

	public const int ActStealMoney = 6642;

	public const int ActNeckHunt = 6650;

	public const int ActGazeDim = 6620; 
	public const int ActDropMine = 6660; 
	public const int breathe_ = 7000; 

	public const int ActThrowPotion = 6661;

	public const int ActKizuamiTrick = 6903; 
	public const int ActMultiHit = 6663; 

	public const int ActLulwyTrick = 6902; 
	public const int ActBladeStorm = 6664; 

	public const int ActJureHeal = 6901; 
	public const int StTaunt = 6700; 

	public const int ActManaAbsorb = 6900; 
	public const int StManaCost = 6720; 

	public const int SongSleep = 6750;

	public const int ActDropMine = 6660; 
	public const int SongTulip = 6751; 

	public const int StManaCost = 6720; 
	public const int ActManaAbsorb = 6900; 

	public const int ActSwarm = 6662; 
	public const int ActJureHeal = 6901; 

	public const int ActMultiHit = 6663; 
	public const int ActLulwyTrick = 6902; 

	public const int ActBladeStorm = 6664; 
	public const int ActKizuamiTrick = 6903; 

	public const int StTaunt = 6700; 
	public const int ActGazeMutation = 6622; 
	public const int ActSwarm = 6662; 
	public const int ActSteal = 6640; 

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

ActEffect

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

cs
		{
			break;
		}
		int hex2 = 0; 
		int hex = 0; 
		foreach (Condition condition4 in TC.conditions)
		{
			if (condition4.Type == ConditionType.Debuff)
			{
				hex2++; 
				hex++; 
			}
		}
		if (hex2 == 0) 
		if (hex == 0) 
		{
			CC.SayNothingHappans();
			break;

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

cs
			{
				if (!item3.IsFriendOrAbove(CC))
				{
					int num10 = Dice.Create("SpShutterHex", power, CC, (actRef.refThing != null) ? null : actRef.act).Roll(); 
					item3.DamageHP(num10 * hex2, 919, power, AttackSource.None, CC); 
					int num9 = Dice.Create("SpShutterHex", power, CC, (actRef.refThing != null) ? null : actRef.act).Roll(); 
					item3.DamageHP(num9 * hex, 919, power, AttackSource.None, CC); 
				}
			}
		});

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

cs
		}
		break;
	}
	case EffectId.CatSniff:
		CC.Say("abCatSniff", CC, TC); 
		break; 
	case EffectId.Steal:
	{
		if (EClass._zone.instance is ZoneInstanceBout)

@@ -1380,7 +1383,7 @@ 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 thing4 = null; 
		Thing thing5 = null; 
		bool flag8 = actRef.n1 == "food";
		if (actRef.n1 == "money")
		{

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

cs
			if (currency > 0)
			{
				currency = Mathf.Clamp(EClass.rnd(currency / 10), 1, 100 + EClass.rndHalf(CC.LV * 200));
				thing4 = ThingGen.Create("money").SetNum(currency); 
				thing5 = ThingGen.Create("money").SetNum(currency); 
				TC.ModCurrency(-currency);
			}
		}

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

cs
			{
				func = (Thing t) => t.IsFood;
			}
			List<Thing> list3 = TC.things.List(delegate(Thing t) 
			List<Thing> list6 = TC.things.List(delegate(Thing t) 
			{
				if (t.parentCard?.trait is TraitChestMerchant || t.trait is TraitTool || t.IsThrownWeapon)
				{

@@ -1407,30 +1410,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 (list3.Count > 0) 
			if (list6.Count > 0) 
			{
				thing4 = list3.RandomItem(); 
				if (thing4.Num > 1) 
				thing5 = list6.RandomItem(); 
				if (thing5.Num > 1) 
				{
					thing4 = thing4.Split(1); 
					thing5 = thing5.Split(1); 
				}
			}
			CC.AddCooldown(6640, 200);
		}
		if (thing4 == null) 
		if (thing5 == null) 
		{
			CC.Say("abStealNothing", CC, TC);
			break;
		}
		thing4.SetInt(116, 1); 
		TC.PlaySound(thing4.material.GetSoundDrop(thing4.sourceCard)); 
		CC.Pick(thing4, msg: false); 
		CC.Say("abSteal", CC, TC, thing4.Name); 
		thing5.SetInt(116, 1); 
		TC.PlaySound(thing5.material.GetSoundDrop(thing5.sourceCard)); 
		CC.Pick(thing5, msg: false); 
		CC.Say("abSteal", CC, TC, thing5.Name); 
		if (actRef.n1 == "food")
		{
			if (CC.hunger.value != 0)
			{
				CC.InstantEat(thing4); 
				CC.InstantEat(thing5); 
			}
		}
		else

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

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

@@ -1463,12 +1466,12 @@ 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 (list5.Count == 0) 
		if (list7.Count == 0) 
		{
			CC.SayNothingHappans();
			break;
		}
		Thing thing6 = list5.RandomItem(); 
		Thing thing6 = list7.RandomItem(); 
		TC.Say("curse_hit", TC, thing6);
		thing6.SetBlessedState((thing6.blessedState == BlessedState.Cursed) ? BlessedState.Doomed : BlessedState.Cursed);
		LayerInventory.SetDirty(thing6);

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

cs
		List<Thing> list = new List<Thing>();
		TC.things.Foreach(delegate(Thing t)
		{
			int num9 = 0; 
			int num10 = 0; 
			if ((t.isEquipped || t.IsRangedWeapon || blessed) && t.blessedState < BlessedState.Normal)
			{
				if (t.blessedState == BlessedState.Cursed)
				{
					num9 = EClass.rnd(200); 
					num10 = EClass.rnd(200); 
				}
				if (t.blessedState == BlessedState.Doomed)
				{
					num9 = EClass.rnd(1000); 
					num10 = EClass.rnd(1000); 
				}
				if (blessed)
				{
					num9 /= 2; 
					num10 /= 2; 
				}
				if (id == EffectId.UncurseEQGreater)
				{
					num9 /= 10; 
					num10 /= 10; 
				}
				if (power >= num9) 
				if (power >= num10) 
				{
					TC.Say("uncurseEQ_success", t);
					t.SetBlessedState(BlessedState.Normal);

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

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

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

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

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

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

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

cs
		break;
	case EffectId.Revive:
	{
		List<KeyValuePair<int, Chara>> list7 = 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 && list7.Count == 0) 
			if (TC.IsPC && list5.Count == 0) 
			{
				list7 = 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 (list7.Count > 0) 
			if (list5.Count > 0) 
			{
				list7.RandomItem().Value.Chara.GetRevived(); 
				list5.RandomItem().Value.Chara.GetRevived(); 
				break;
			}
		}

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

cs
	case EffectId.Weaken:
	{
		bool flag7 = id == EffectId.DamageBody || id == EffectId.DamageBodyGreat;
		bool mind2 = id == EffectId.DamageMind || id == EffectId.DamageMindGreat; 
		int num6 = ((id == EffectId.DamageBody || id == EffectId.DamageMind) ? 1 : (4 + EClass.rnd(4))); 
		bool mind = id == EffectId.DamageMind || id == EffectId.DamageMindGreat; 
		int num8 = ((id == EffectId.DamageBody || id == EffectId.DamageMind) ? 1 : (4 + EClass.rnd(4))); 
		if (id == EffectId.Weaken)
		{
			flag7 = EClass.rnd(2) == 0;
			mind2 = !flag7; 
			num6 = 1; 
			mind = !flag7; 
			num8 = 1; 
		}
		else
		{

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

cs
			TC.PlaySound("debuff");
		}
		TC.Say(flag7 ? "damageBody" : "damageMind", TC);
		for (int k = 0; k < num6; k++) 
		for (int l = 0; l < num8; l++) 
		{
			TC.DamageTempElements(power, flag7, mind2, id != EffectId.Weaken); 
			TC.DamageTempElements(power, flag7, mind, id != EffectId.Weaken); 
		}
		if (TC.IsPC)
		{

@@ -1806,34 +1809,34 @@ 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; 
		bool flag9 = id == EffectId.EnhanceBody || id == EffectId.EnhanceBodyGreat; 
		bool mind2 = id == EffectId.EnhanceMind || id == EffectId.EnhanceMindGreat; 
		if (id != EffectId.EnhanceBody && id != EffectId.EnhanceMind)
		{
			EClass.rnd(4);
		}
		TC.Say(flag6 ? "enhanceBody" : "enhanceMind", TC); 
		TC.Say(flag9 ? "enhanceBody" : "enhanceMind", TC); 
		TC.PlayEffect("buff");
		TC.PlaySound("buff");
		TC.EnhanceTempElements(power, flag6, mind, onlyRenew: true); 
		TC.EnhanceTempElements(power, flag9, mind2, onlyRenew: true); 
		break;
	}
	case EffectId.RestoreBody:
	case EffectId.RestoreMind:
	{
		bool flag9 = id == EffectId.RestoreBody; 
		bool flag6 = id == EffectId.RestoreBody; 
		if (flag)
		{
			Redirect(flag9 ? EffectId.DamageBodyGreat : EffectId.DamageMindGreat, BlessedState.Normal, default(ActRef)); 
			Redirect(flag6 ? EffectId.DamageBodyGreat : EffectId.DamageMindGreat, BlessedState.Normal, default(ActRef)); 
			break;
		}
		TC.Say(flag9 ? "restoreBody" : "restoreMind", TC); 
		TC.Say(flag6 ? "restoreBody" : "restoreMind", TC); 
		TC.PlaySound("heal");
		TC.PlayEffect("heal");
		TC.CureHost(flag9 ? CureType.CureBody : CureType.CureMind, power, state); 
		TC.CureHost(flag6 ? CureType.CureBody : CureType.CureMind, power, state); 
		if (blessed)
		{
			Redirect(flag9 ? EffectId.EnhanceBodyGreat : EffectId.EnhanceMindGreat, BlessedState.Normal, default(ActRef)); 
			Redirect(flag6 ? EffectId.EnhanceBodyGreat : EffectId.EnhanceMindGreat, BlessedState.Normal, default(ActRef)); 
		}
		break;
	}

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

cs
		{
			Debug.Log(actRef.act.id);
		}
		int num7 = Dice.Create((actRef.act != null && EClass.sources.calc.map.ContainsKey(actRef.act.ID)) ? actRef.act.ID : "SpHealLight", power, CC, (actRef.refThing != null) ? null : actRef.act).Roll(); 
		int num6 = Dice.Create((actRef.act != null && EClass.sources.calc.map.ContainsKey(actRef.act.ID)) ? actRef.act.ID : "SpHealLight", power, CC, (actRef.refThing != null) ? null : actRef.act).Roll(); 
		if (actRef.refThing != null)
		{
			num7 = num7 * (100 + actRef.refThing.Evalue(7500)) / 100; 
			num6 = num6 * (100 + actRef.refThing.Evalue(7500)) / 100; 
		}
		if (flag)
		{
			TC.DamageHP(num7 / 2, 919, power); 
			TC.DamageHP(num6 / 2, 919, power); 
			break;
		}
		TC.HealHPHost(num7, (actRef.refThing == null && id != EffectId.JureHeal) ? HealSource.Magic : HealSource.Item); 
		TC.HealHPHost(num6, (actRef.refThing == null && id != EffectId.JureHeal) ? HealSource.Magic : HealSource.Item); 
		TC.CureHost(CureType.Heal, power, state);
		TC.Say((power >= 300) ? "heal_heavy" : "heal_light", TC);
		break;

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

cs
		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 thing5 = list4.RandomItem(); 
			Thing thing4 = list4.RandomItem(); 
			TC.Say("acid_hit", TC);
			if (thing5.isAcidproof) 
			if (thing4.isAcidproof) 
			{
				TC.Say("acid_nullify", thing5); 
				TC.Say("acid_nullify", thing4); 
			}
			else if (thing5.encLV > -5) 
			else if (thing4.encLV > -5) 
			{
				TC.Say("acid_rust", TC, thing5); 
				thing5.ModEncLv(-1); 
				LayerInventory.SetDirty(thing5); 
				TC.Say("acid_rust", TC, thing4); 
				thing4.ModEncLv(-1); 
				LayerInventory.SetDirty(thing4); 
			}
			if (TC.IsPCParty)
			{

Card

@@ -5510,7 +5510,7 @@ public void Teleport(Point point, bool silent = false, bool force = false)

cs
		return;
	}
	PlayEffect("teleport");
	if (!force && (trait is TraitNewZone || elements.Has(400) || (isChara && Chara.HasCondition<ConGravity>()))) 
	if (!force && (!trait.CanBeTeleported || elements.Has(400) || (isChara && Chara.HasCondition<ConGravity>()))) 
	{
		Say("antiTeleport", this);
		PlaySound("gravity");

CardRenderer

@@ -40,7 +40,14 @@ public virtual void SetOwner(Card c)

cs
	owner = c;
	if (data == null)
	{
		data = owner.sourceCard.renderData; 
		if (owner.trait is TraitFakeBlock) 
		{ 
			data = EClass.sources.blocks.map[owner.refVal].renderData; 
		} 
		else
		{ 
			data = owner.sourceCard.renderData; 
		} 
	}
	isChara = c.isChara;
	usePass = data.pass != null;

DOMAIN

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

cs

public class DOMAIN
{
	public const int domEarth = 812; 
	public const int domFaith = 802; 

	public const int domSurvival = 801; 
	public const int domMiracle = 803; 

	public const int domWind = 807; 
	public const int domMachine = 809; 

	public const int domFaith = 802; 
	public const int domEyth = 814; 

	public const int domHarvest = 808; 
	public const int domOblivion = 813; 

	public const int domMiracle = 803; 
	public const int domEarth = 812; 

	public const int domArcane = 804; 
	public const int domHealing = 811; 

	public const int domLuck = 810;

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

	public const int domEyth = 814; 
	public const int domWind = 807; 

	public const int domOblivion = 813; 
	public const int domElement = 806; 

	public const int domHealing = 811; 
	public const int domHarmony = 815; 

	public const int domMachine = 809; 
	public const int domSurvival = 801; 

	public const int domComm = 805; 
	public const int domArcane = 804; 

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

	public const int domTest = 800;

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

ELEMENT

@@ -5,9 +5,11 @@

cs

public class ELEMENT
{
	public const int roasted = 762; 
	public const int comfort = 750;

	public const int rare = 751; 
	public const int cute = 752; 

	public const int antidote = 753;

@@ -23,11 +25,9 @@ public class ELEMENT

cs

	public const int recharge = 761;

	public const int roasted = 762; 
	public const int air = 763;

	public const int cute = 752; 
	public const int rare = 751; 

	public const int _void = 0;

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

cs

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

ENC

@@ -94,9 +94,9 @@ public class ENC

cs

	public const int resWeather = 408;

	public const int mod_talisman = 609; 
	public const int travelSpeed = 407; 

	public const int resMutation = 406; 
	public const int mod_talisman = 609; 

	public const int slowDecay = 405;

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

cs

	public const int sustain_STR = 440;

	public const int travelSpeed = 407; 
	public const int resMutation = 406; 

	public const int sustain_DEX = 442;

	public const int revealFaith = 481; 
	public const int sustain_END = 441; 

	public const int force_weapon = 482; 
	public const int mod_scatter = 607; 

	public const int optimizeMana = 483; 
	public const int mod_drill = 606; 

	public const int slot_rune = 484; 
	public const int mod_precision = 605; 

	public const int nonLethal = 485; 
	public const int mod_ammo_recover = 604; 

	public const int safetyMeasure = 486; 
	public const int mod_rapid = 602; 

	public const int strongStomach = 480; 
	public const int mod_reload = 601; 

	public const int mod_ammo = 600;

	public const int mod_ammo_knockback = 603; 
	public const int mod_ammo_recover = 604; 
	public const int mod_precision = 605; 
	public const int safetyMeasure = 486; 

	public const int mod_drill = 606; 
	public const int nonLethal = 485; 

	public const int mod_scatter = 607; 
	public const int slot_rune = 484; 

	public const int sustain_END = 441; 
	public const int optimizeMana = 483; 

	public const int mod_reload = 601; 
	public const int force_weapon = 482; 

	public const int bane_all = 468; 
	public const int revealFaith = 481; 

	public const int mod_rapid = 602; 
	public const int strongStomach = 480; 

	public const int bane_god = 466; 
	public const int mod_ammo_knockback = 603; 

	public const int bane_fish = 467;

	public const int bane_all = 468; 
	public const int sustain_LER = 444;

	public const int sustain_WIL = 445;

	public const int sustain_MAG = 446; 
	public const int sustain_CHA = 447; 

	public const int bane_dragon = 460;

	public const int sustain_CHA = 447; 
	public const int bane_undead = 461; 

	public const int bane_fairy = 462; 
	public const int sustain_MAG = 446; 

	public const int bane_machine = 465; 
	public const int sustain_PER = 443; 

	public const int bane_undead = 461; 
	public const int bane_animal = 463; 

	public const int bane_man = 464;

	public const int bane_animal = 463; 
	public const int bane_machine = 465; 

	public const int sustain_PER = 443; 
	public const int bane_god = 466; 
	public const int bane_fairy = 462; 

	public static readonly int[] IDS = new int[89]
	{

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

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

EffectId

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

cs
	Sword = 295,
	LovePlus = 296,
	HairGrowth = 297,
	Gene = 298
	Gene = 298, 
	CatSniff = 299
}

FACTION

@@ -4,27 +4,27 @@

cs

public class FACTION
{
	public const int bfCave = 3500; 
	public const int bfUndersea = 3606; 
	public const int bfPlain = 3600; 

	public const int bfFertile = 3700; 
	public const int bfForest = 3601; 

	public const int bfBeach = 3604; 
	public const int bfSnow = 3602; 

	public const int bfHill = 3603;

	public const int bfGeyser = 3701; 
	public const int bfSea = 3605; 

	public const int bfSnow = 3602; 
	public const int bfUndersea = 3606; 

	public const int bfForest = 3601; 
	public const int bfCave = 3500; 

	public const int bfPlain = 3600; 
	public const int bfFertile = 3700; 

	public const int bfRuin = 3702; 
	public const int bfGeyser = 3701; 

	public const int bfSea = 3605; 
	public const int bfBeach = 3604; 
	public const int bfRuin = 3702; 

	public const int fPromo = 2202;

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

cs

	public const int fTaxEvasion = 2119;

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

	public const int bfTranquil = 3703;

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

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

	public const int fRation = 2207;

@@ -60,10 +60,10 @@ public class FACTION

cs

	public const int actBuildInspect = 4006;

	public const int actBuildRecipe = 4005; 
	public const int fAdmin = 2115;

	public const int actBuildRecipe = 4005; 
	public const int actBuildCollect = 4004;

	public const int actBuildAnywhere = 4003;

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

cs

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

FEAT

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

cs

public class FEAT
{
	public const int featDwarf = 1215; 
	public const int featSuccubus = 1216; 
	public const int featBodyParts = 1644; 

	public const int featSorter = 1643;

@@ -53,17 +55,15 @@ public class FEAT

cs

	public const int featLife = 1610;

	public const int featHealer = 1422; 
	public const int featBodyParts = 1644; 
	public const int featParty = 1645;

	public const int featLonelySoul = 1646;

	public const int featSummoner = 1647;

	public const int featManaPrecision = 1214; 
	public const int featRapidMagic = 1648; 
	public const int featDwarf = 1215; 

	public const int featSlowFood = 1200;

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

cs

	public const int featUndead = 1210;

	public const int featManaMeat = 1421; 
	public const int featHealer = 1422; 

	public const int featSnail = 1211;

	public const int featManaPrecision = 1214; 
	public const int featFisher = 1659;

	public const int featChef = 1658;

@@ -113,17 +115,13 @@ public class FEAT

cs

	public const int featDefender = 1649;

	public const int featRapidMagic = 1648; 
	public const int featElea = 1213;

	public const int featExecutioner = 1420; 
	public const int featManaMeat = 1421; 

	public const int featFairyResist = 1212;

	public const int featSwordsage = 1418; 
	public const int featMassSummoner = 1240; 
	public const int featMilitant = 1419; 

	public const int featGod_element1 = 1300;

@@ -139,13 +137,13 @@ public class FEAT

cs

	public const int featGod_luck1 = 1330;

	public const int featGod_oblivion1 = 1340; 
	public const int featDemon = 1239; 
	public const int featGod_harmony1 = 1335; 

	public const int featGod_trickery1 = 1345;

	public const int featGod_strife1 = 1355; 
	public const int featMassSummoner = 1240; 
	public const int featGod_moonshadow1 = 1350; 

	public const int featWarrior = 1400;

@@ -163,17 +161,17 @@ public class FEAT

cs

	public const int featPaladin = 1407;

	public const int featGod_moonshadow1 = 1350; 
	public const int featPaladin2 = 1408; 

	public const int featElder = 1238; 
	public const int featGod_strife1 = 1355; 

	public const int featRoran = 1237; 
	public const int featDemon = 1239; 

	public const int featNorland = 1236; 
	public const int featElder = 1238; 

	public const int featMilitant = 1419; 
	public const int featRoran = 1237; 

	public const int featGolem = 1217; 
	public const int featExecutioner = 1420; 

	public const int featMetal = 1218;

@@ -197,10 +195,10 @@ public class FEAT

cs

	public const int featDemigod = 1228;

	public const int featSuccubus = 1216; 
	public const int featLittleOne = 1229;

	public const int featGolem = 1217; 
	public const int featAdam = 1230;

	public const int featNirvana = 1231;

@@ -213,13 +211,13 @@ public class FEAT

cs

	public const int featLightEater = 1235;

	public const int featPaladin2 = 1408; 
	public const int featNorland = 1236; 

	public const int featBoost = 1409;

	public const int featGod_harmony1 = 1335; 
	public const int featReboot = 1410; 

	public const int featEarthStrength = 1411; 
	public const int featGod_oblivion1 = 1340; 

	public const int featLuckyCat = 1412;

@@ -233,22 +231,24 @@ public class FEAT

cs

	public const int featWitch = 1417;

	public const int featReboot = 1410; 
	public const int featSwordsage = 1418; 
	public const int featEarthStrength = 1411; 

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

FOOD

@@ -4,29 +4,29 @@ public class FOOD

cs

	public const int food_cat = 701;

	public const int food_love = 703; 
	public const int food_poison = 702; 

	public const int food_bug = 704; 
	public const int food_love = 703; 

	public const int gainWeight = 705;

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

	public const int kirimi = 707; 
	public const int food_bug = 704; 

	public const int food_human = 708;

	public const int food_undead = 709;

	public const int food_god = 758; 
	public const int justcooked = 757; 

	public const int loseWeight = 706; 
	public const int food_god = 758; 

	public const int justcooked = 757; 
	public const int kirimi = 707; 

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

MUTATION

@@ -6,27 +6,27 @@ public class MUTATION

cs

	public const int mutationSpeedN = 1519;

	public const int mutationSpeed = 1518; 
	public const int mutationSkin = 1510; 

	public const int mutationRegen = 1516; 
	public const int mutationSkinN = 1511; 

	public const int mutationDexN = 1515;

	public const int mutationEyeN = 1513; 
	public const int mutationRegen = 1516; 

	public const int mutationEye = 1512; 
	public const int mutationDex = 1514; 

	public const int mutationSkinN = 1511; 
	public const int mutationEyeN = 1513; 

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

	public const int mutationCha = 1522;

	public const int mutationDex = 1514; 
	public const int mutationRegenN = 1517; 

	public const int mutationChaN = 1523;

	public const int mutationRegenN = 1517; 
	public const int mutationSpeed = 1518; 

	public const int mutationBrainN = 1525;

@@ -82,8 +82,8 @@ public class MUTATION

cs

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

POLICY

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

cs

	public const int open_business = 2810;

	public const int stop_growth = 2515; 
	public const int speed_growth = 2516; 

	public const int livestock_priv = 2715;

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

cs

	public const int human_right = 2506;

	public const int speed_growth = 2516; 
	public const int stop_growth = 2515; 

	public const int trash_no = 2702;

@@ -108,9 +108,9 @@ public class POLICY

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

Player

@@ -1580,32 +1580,33 @@ public void EditBackgroundText()

cs

	public void CreateEquip()
	{
		Chara chara = EClass.pc; 
		chara.body.AddBodyPart(45); 
		Chara c = EClass.pc; 
		c.body.AddBodyPart(45); 
		if (EClass.debug.enable)
		{
			EClass.pc.EQ_ID("lantern_old");
		}
		chara.body.AddBodyPart(44); 
		chara.EQ_ID("toolbelt").c_IDTState = 0; 
		chara.EQ_ID("shirt").c_IDTState = 0; 
		chara.AddCard(ThingGen.CreateCurrency(1 + EClass.rnd(5))); 
		c.body.AddBodyPart(44); 
		c.EQ_ID("toolbelt").c_IDTState = 0; 
		c.EQ_ID("shirt").c_IDTState = 0; 
		c.AddCard(ThingGen.CreateCurrency(1 + EClass.rnd(5))); 
		bool firstSpellbook = true; 
		switch (EClass.pc.job.id)
		{
		case "paladin":
			chara.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8400), 2)); 
			c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8400), 2)); 
			break;
		case "inquisitor":
			chara.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8706), 4)); 
			c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8706), 4)); 
			break;
		case "witch":
			chara.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8790), 4)); 
			c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8790), 4)); 
			break;
		case "swordsage":
			chara.AddCard(SetSpellbook(ThingGen.CreateSpellbook(50300), 4)); 
			chara.AddCard(SetSpellbook(ThingGen.CreateSpellbook(50301), 4)); 
			chara.AddCard(SetSpellbook(ThingGen.CreateSpellbook(50802), 2)); 
			chara.AddCard(ThingGen.Create("tool_talisman")); 
			c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(50300), 4)); 
			c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(50301), 4)); 
			c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(50802), 2)); 
			c.AddCard(ThingGen.Create("tool_talisman")); 
			break;
		}
		switch (EClass.pc.job.id)

@@ -1638,7 +1639,7 @@ public void CreateEquip()

cs
			}
			if (text != "")
			{
				chara.AddCard(SetSpellbook(ThingGen.CreateSpellbook(text + element.source.alias.Replace("ele", "")), 4)); 
				c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(text + element.source.alias.Replace("ele", "")), 4)); 
				num++;
				if (num >= 2)
				{

@@ -1648,20 +1649,25 @@ public void CreateEquip()

cs
		}
		if (EClass.pc.job.id == "priest")
		{
			chara.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8400), 2)); 
			c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8400), 2)); 
		}
		else
		{
			chara.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8200), 2)); 
			c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8200), 2)); 
		}
		break;
	}
	default:
		chara.AddCard(ThingGen.Create("bandage").SetNum(6 + EClass.rnd(3))); 
		c.AddCard(ThingGen.Create("bandage").SetNum(6 + EClass.rnd(3))); 
		break;
	}
	static Thing SetSpellbook(Thing t, int charge) 
	Thing SetSpellbook(Thing t, int charge) 
	{
		if (firstSpellbook) 
		{ 
			c.AddCard(ThingGen.CreateRedBook("guide_magic")); 
			firstSpellbook = false; 
		} 
		t.AddEditorTag(EditorTag.NoReadFail);
		t.c_charges = charge;
		t.SetBlessedState(BlessedState.Normal);

Recipe

@@ -542,7 +542,7 @@ public virtual Thing Craft(BlessedState blessed, bool sound = false, List<Thing>

cs
	{
		return null;
	}
	thing.trait.OnCrafted(this); 
	thing.trait.OnCrafted(this, ings); 
	thing.SetBlessedState(blessed);
	if (model)
	{

RecipeCard

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

cs
			thing.decay = thing.MaxDecay + 1;
		}
	}
	thing.trait.OnCrafted(this); 
	thing.trait.OnCrafted(this, ings); 
	if (thing.IsAmmo && num2 < 0)
	{
		thing.SetEncLv(-num2 / 10);

StanceSongSleep

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

cs
using UnityEngine; 
public class StanceSongSleep : BaseSong
{
	public override void OnStart()

@@ -7,10 +9,14 @@ public override void OnStart()

cs

	public override void Tick()
	{
		if (owner.HasCondition<ConSilence>()) 
		{ 
			return; 
		} 
		int num = 0;
		foreach (Chara item in owner.pos.ListCharasInRadius(owner, 4, (Chara c) => !c.IsDeadOrSleeping && c.IsHostile(owner)))
		{
			if ((item.IsPowerful ? 10 : 25) > EClass.rnd(100)) 
			if ((item.IsPowerful ? 10 : 30) * Mathf.Min(base.power / 4, 100) / 100 > EClass.rnd(100)) 
			{
				item.AddCondition<ConSleep>(50 + base.power / 2);
			}

TaskHarvest

@@ -495,6 +495,10 @@ public string GetIdDismantled()

cs

	public bool ShouldGenerateDismantled(string dest)
	{
		if (target.trait is TraitFakeBlock) 
		{ 
			return false; 
		} 
		if (target.trait is TraitGrave)
		{
			return false;

Thing

@@ -1435,37 +1435,13 @@ public override void SetRenderParam(RenderParam p)

cs
			p.tile = sourceCard._tiles[base.dir % sourceCard._tiles.Length] * ((!flipX) ? 1 : (-1));
		}
		break;
	case Trait.TileMode.Default:
		if (source._altTiles.Length != 0 && trait.UseAltTiles) 
		{ 
			p.tile = source._altTiles[base.dir % source._altTiles.Length] * ((!flipX) ? 1 : (-1)); 
		} 
		else
		{ 
			p.tile = sourceCard._tiles[base.dir % sourceCard._tiles.Length] * ((!flipX) ? 1 : (-1)); 
		} 
		if (source.anime.Length == 0 || !trait.IsAnimeOn) 
		{ 
			break; 
		} 
		if (source.anime.Length > 2) 
		{ 
			float num = Time.realtimeSinceStartup * 1000f / (float)source.anime[1] % (float)source.anime[2]; 
			if ((int)num == source.anime[0] - 1 && source.anime.Length > 3) 
			{ 
				PlaySound("anime_sound" + source.anime[3]); 
			} 
			if (!(num >= (float)source.anime[0])) 
			{ 
				p.tile += num * (float)((!flipX) ? 1 : (-1)); 
			} 
		} 
		else
		{ 
			float num2 = Time.realtimeSinceStartup * 1000f / (float)source.anime[1] % (float)source.anime[0]; 
			p.tile += num2 * (float)((!flipX) ? 1 : (-1)); 
		} 
	case Trait.TileMode.FakeBlock:
	{ 
		p.color += 1572864f; 
		SourceBlock.Row row = EClass.sources.blocks.map[base.refVal]; 
		p.tile = row._tiles[base.dir % row._tiles.Length]; 
		break;
	} 
	case Trait.TileMode.SignalAnime:
		if (source._altTiles.Length != 0 && trait.UseAltTiles)
		{

@@ -1531,6 +1507,37 @@ public override void SetRenderParam(RenderParam p)

cs
			p.tile += ((!(p.tile < 0f)) ? 1 : (-1));
		}
		break;
	default: 
		if (source._altTiles.Length != 0 && trait.UseAltTiles) 
		{ 
			p.tile = source._altTiles[base.dir % source._altTiles.Length] * ((!flipX) ? 1 : (-1)); 
		} 
		else
		{ 
			p.tile = sourceCard._tiles[base.dir % sourceCard._tiles.Length] * ((!flipX) ? 1 : (-1)); 
		} 
		if (source.anime.Length == 0 || !trait.IsAnimeOn) 
		{ 
			break; 
		} 
		if (source.anime.Length > 2) 
		{ 
			float num = Time.realtimeSinceStartup * 1000f / (float)source.anime[1] % (float)source.anime[2]; 
			if ((int)num == source.anime[0] - 1 && source.anime.Length > 3) 
			{ 
				PlaySound("anime_sound" + source.anime[3]); 
			} 
			if (!(num >= (float)source.anime[0])) 
			{ 
				p.tile += num * (float)((!flipX) ? 1 : (-1)); 
			} 
		} 
		else
		{ 
			float num2 = Time.realtimeSinceStartup * 1000f / (float)source.anime[1] % (float)source.anime[0]; 
			p.tile += num2 * (float)((!flipX) ? 1 : (-1)); 
		} 
		break; 
	}
	if (trait.IdSkin != 0)
	{

ThingGen

@@ -160,6 +160,13 @@ public static Thing CreateSpellbook(int ele, int num = 1)

cs
		return thing;
	}

	public static Thing CreateRedBook(string id, int num = 1) 
	{ 
		Thing thing = Create("book").SetNum(num); 
		thing.SetStr(53, id); 
		return thing; 
	} 
	public static Thing CreateSkillbook(int ele, int num = 1)
	{
		Thing thing = Create("book_skill").SetNum(num);

Trait

@@ -11,7 +11,8 @@ public enum TileMode

cs
		Door,
		Illumination,
		DefaultNoAnime,
		SignalAnime 
		SignalAnime, 
		FakeBlock 
	}

	public enum CopyShopType

@@ -162,6 +163,8 @@ public virtual bool CanCopyInBlueprint

cs

	public virtual bool CanBeAttacked => false;

	public virtual bool CanBeTeleported => true; 
	public virtual bool CanExtendBuild => false;

	public virtual string langNote => "";

@@ -649,7 +652,7 @@ public virtual void SetParams(params string[] s)

cs
	{
	}

	public virtual void OnCrafted(Recipe recipe) 
	public virtual void OnCrafted(Recipe recipe, List<Thing> ings) 
	{
	}

TraitBaseSpellbook

@@ -275,7 +275,7 @@ public override void SetName(ref string s)

cs
		string c_idRefName = owner.c_idRefName;
		if (!c_idRefName.IsEmpty())
		{
			string @ref = ((BookType == Type.Dojin) ? EClass.game.religions.dictAll[c_idRefName].Name : EClass.sources.charas.map.TryGetValue(c_idRefName, "putty").GetName()); 
			string @ref = ((BookType == Type.Dojin) ? EClass.game.religions.dictAll.TryGetValue(c_idRefName, EClass.game.religions.Eyth).Name : EClass.sources.charas.map.TryGetValue(c_idRefName, "putty").GetName()); 
			s = "_'s".lang(@ref, s);
		}
		break;

TraitBlanket

@@ -1,3 +1,4 @@

cs
using System.Collections.Generic; 
using UnityEngine;

public class TraitBlanket : Trait

@@ -11,7 +12,7 @@ public override void OnCreate(int lv)

cs
		owner.c_charges = EClass.rndHalf(8 + Mathf.Clamp(owner.QualityLv * 2, -2, 30));
	}

	public override void OnCrafted(Recipe recipe) 
	public override void OnCrafted(Recipe recipe, List<Thing> ings) 
	{
		OnCreate(owner.LV);
	}

TraitDoor

@@ -6,6 +6,8 @@ public class TraitDoor : Trait

cs

	public override bool CanBuildInTown => false;

	public override bool CanBeTeleported => false; 
	public override bool CanBeDisassembled => !owner.IsInstalled;

	public override TileMode tileMode => TileMode.Door;

+TraitFakeBlock

File Created
cs
using System.Collections.Generic;

public class TraitFakeBlock : Trait
{
	public override TileMode tileMode => TileMode.FakeBlock;

	public override void OnCreate(int lv)
	{
		owner.refVal = 1;
	}

	public override void OnCrafted(Recipe recipe, List<Thing> ings)
	{
		TraitBlock traitBlock = ings[0].trait as TraitBlock;
		owner.refVal = traitBlock.source.id;
	}

	public override void TrySetHeldAct(ActPlan p)
	{
		if (p.pos.cell._block != 0)
		{
			p.TrySetAct("actCopyBlock", delegate
			{
				owner.Dye(p.pos.matBlock);
				owner.refVal = p.pos.sourceBlock.id;
				SE.Play("offering");
				owner._CreateRenderer();
				HotItemHeld.recipe = GetRecipe();
				return false;
			});
		}
	}
}

TraitNewZone

@@ -68,6 +68,8 @@ public virtual bool IsEntrace

cs

	public override bool CanBeStolen => false;

	public override bool CanBeTeleported => false; 
	public virtual int UseDist => 0;

	public override void OnImportMap()

TraitPotionAlchemy

@@ -28,7 +28,7 @@ public int GetPower()

cs
		return num * (100 + owner.encLV * num2) / 100;
	}

	public override void OnCrafted(Recipe recipe) 
	public override void OnCrafted(Recipe recipe, List<Thing> ings) 
	{
		owner.refVal = 0;
		List<Element> list = owner.elements.dict.Values.Where((Element e) => e.IsTrait).ToList();

TraitPowerStatue

@@ -14,6 +14,8 @@ public override bool CanBeDestroyed

cs

	public override bool CanBeStolen => false;

	public override bool CanBeTeleported => false; 
	public override bool CanUseFromInventory => false;

	public override bool UseExtra => owner.isOn;