Skip to content

EA 23.58 Nightly

December 16, 2024

25 files modified.

Important Changes

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

Religion (1)

cs
public void LeaveFaith(Chara c) 
public void LeaveFaith(Chara c, Religion newFaith) 

AI_UseCrafter

@@ -213,6 +213,7 @@ public override IEnumerable<Status> Run()

cs
					Effect.Get("mine").Play(from).SetParticleColor(recipe.GetColorMaterial().GetColor())
						.Emit(10 + EClass.rnd(10));
					owner.renderer.PlayAnime(AnimeID.JumpSmall);
					recipe.TryGetFirstTimeBonus(); 
				}
				else
				{

AM_Cinema

@@ -44,7 +44,7 @@ public override void OnUpdateInput()

cs
	if (EInput.leftMouse.clicked && !EClass.ui.isPointerOverUI)
	{
		SE.ClickGeneral();
		EClass.ui.canvas.enabled = !EClass.ui.canvas.enabled; 
		EClass.ui.ToggleCanvas(); 
	}
	if (EInput.rightMouse.down || conf.speed == 0)
	{

ActEffect

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

cs
			{
				num7 = 2;
			}
			if (EClass._zone.IsPCFaction && EClass._zone.branch.lv >= 3) 
			if (EClass._zone.IsPCFaction && EClass._zone.branch.HasItemProtection) 
			{
				num7 = 0;
			}

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

cs
		{
			return;
		}
		Thing thing = ThingGen.Create("mine"); 
		thing.c_idRefCard = "dog_mine"; 
		Thing thing2 = ThingGen.Create("mine"); 
		thing2.c_idRefCard = "dog_mine"; 
		Zone.ignoreSpawnAnime = true;
		EClass._zone.AddCard(thing, CC.pos).Install(); 
		EClass._zone.AddCard(thing2, CC.pos).Install(); 
		break;
	}
	case EffectId.MagicMap:

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

cs
		TC.PlaySound("curse3");
		TC.PlayEffect("curse");
		TC.Say("forgetItems", TC);
		int num3 = power / 50 + 1 + EClass.rnd(3); 
		int num4 = power / 50 + 1 + EClass.rnd(3); 
		List<Thing> source = TC.things.List((Thing t) => t.c_IDTState == 0);
		for (int j = 0; j < num3; j++) 
		for (int j = 0; j < num4; j++) 
		{
			source.RandomItem().c_IDTState = 5;
		}

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

cs
	case EffectId.EnchantArmorGreat:
	{
		bool armor = id == EffectId.EnchantArmor || id == EffectId.EnchantArmorGreat;
		bool flag3 = id == EffectId.EnchantWeaponGreat || id == EffectId.EnchantArmorGreat; 
		bool flag4 = id == EffectId.EnchantWeaponGreat || id == EffectId.EnchantArmorGreat; 
		if (!tc.isThing)
		{
			LayerDragGrid.CreateEnchant(CC, armor, flag3, state); 
			LayerDragGrid.CreateEnchant(CC, armor, flag4, state); 
			return;
		}
		cc.PlaySound("identify");

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

cs
			tc.ModEncLv(-1);
			break;
		}
		int num4 = (flag3 ? 4 : 2) + (blessed ? 1 : 0); 
		if (tc.encLV >= num4) 
		int num5 = (flag4 ? 4 : 2) + (blessed ? 1 : 0); 
		if (tc.encLV >= num5) 
		{
			cc.Say("enc_resist", tc);
			break;

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

cs
	case EffectId.Identify:
	case EffectId.GreaterIdentify:
	{
		bool flag4 = id == EffectId.GreaterIdentify; 
		bool flag5 = id == EffectId.GreaterIdentify; 
		if (flag)
		{
			Redirect(EffectId.ForgetItems, flag4 ? BlessedState.Cursed : BlessedState.Normal, default(ActRef)); 
			Redirect(EffectId.ForgetItems, flag5 ? BlessedState.Cursed : BlessedState.Normal, default(ActRef)); 
			break;
		}
		if (!tc.isThing)
		{
			int count = ((!blessed) ? 1 : (flag4 ? (2 + EClass.rnd(2)) : (3 + EClass.rnd(3)))); 
			LayerDragGrid.CreateIdentify(CC, flag4, state, 0, count); 
			int count = ((!blessed) ? 1 : (flag5 ? (2 + EClass.rnd(2)) : (3 + EClass.rnd(3)))); 
			LayerDragGrid.CreateIdentify(CC, flag5, state, 0, count); 
			return;
		}
		cc.PlaySound("identify");
		cc.PlayEffect("identify");
		tc.Thing.Identify(cc.IsPCParty, (!flag4) ? IDTSource.Identify : IDTSource.SuperiorIdentify); 
		tc.Thing.Identify(cc.IsPCParty, (!flag5) ? IDTSource.Identify : IDTSource.SuperiorIdentify); 
		break;
	}
	case EffectId.Uncurse:

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

cs
			LayerDragGrid.CreateUncurse(CC, state);
			return;
		}
		Thing thing2 = tc.Thing; 
		if (thing2.blessedState == BlessedState.Cursed) 
		Thing thing3 = tc.Thing; 
		if (thing3.blessedState == BlessedState.Cursed) 
		{
			thing2.SetBlessedState(BlessedState.Normal); 
			thing3.SetBlessedState(BlessedState.Normal); 
		}
		else if (thing2.blessedState == BlessedState.Doomed) 
		else if (thing3.blessedState == BlessedState.Doomed) 
		{
			thing2.SetBlessedState(BlessedState.Normal); 
			thing3.SetBlessedState(BlessedState.Normal); 
		}
		thing2.GetRootCard()?.TryStack(thing2); 
		LayerInventory.SetDirty(thing2); 
		thing3.GetRootCard()?.TryStack(thing3); 
		LayerInventory.SetDirty(thing3); 
		break;
	}
	case EffectId.Lighten:

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

cs
		}
		cc.PlaySound("offering");
		cc.PlayEffect("buff");
		int num5 = (tc.isWeightChanged ? tc.c_weight : tc.Thing.source.weight); 
		int num3 = (tc.isWeightChanged ? tc.c_weight : tc.Thing.source.weight); 
		tc.isWeightChanged = true;
		Element orCreateElement = tc.elements.GetOrCreateElement(64);
		Element orCreateElement2 = tc.elements.GetOrCreateElement(65);
		Element orCreateElement3 = tc.elements.GetOrCreateElement(67);
		Element orCreateElement4 = tc.elements.GetOrCreateElement(66);
		bool flag5 = tc.IsEquipmentOrRanged || tc.IsThrownWeapon || tc.IsAmmo; 
		bool flag3 = tc.IsEquipmentOrRanged || tc.IsThrownWeapon || tc.IsAmmo; 
		if (flag)
		{
			num5 = (int)(0.01f * (float)num5 * (float)power * 0.75f + 500f); 
			if (num5 < 1) 
			num3 = (int)(0.01f * (float)num3 * (float)power * 0.75f + 500f); 
			if (num3 < 1) 
			{
				num5 = 1; 
				num3 = 1; 
			}
			if (flag5) 
			if (flag3) 
			{
				if (tc.IsWeapon || tc.IsThrownWeapon)
				{

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

cs
		}
		else
		{
			num5 = num5 * (100 - power / 10) / 100; 
			num3 = num3 * (100 - power / 10) / 100; 
			if (blessed)
			{
				power /= 4;
			}
			if (flag5) 
			if (flag3) 
			{
				if (tc.IsWeapon || tc.IsThrownWeapon)
				{

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

cs
			}
			cc.Say("lighten", cc, tc);
		}
		tc.c_weight = num5; 
		tc.c_weight = num3; 
		tc.SetDirtyWeight();
		if (tc.parent == null)
		{

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

cs
		cc.PlayEffect("identify");
		cc.Say("reconstruct", cc, tc);
		EClass.game.cards.uidNext += EClass.rnd(30);
		Thing thing3 = ThingGen.Create(tc.id, -1, tc.LV * power / 100); 
		thing3.SetBlessedState(state); 
		Thing thing = ThingGen.Create(tc.id, -1, tc.LV * power / 100); 
		thing.SetBlessedState(state); 
		tc.Destroy();
		CC.Pick(thing3, msg: false); 
		CC.Pick(thing, msg: false); 
		if (!CC.IsPC)
		{
			CC.TryEquip(thing3); 
			CC.TryEquip(thing); 
		}
		break;
	}

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

cs
		}
		cc.PlaySound("offering");
		cc.PlayEffect("buff");
		if (tc.id == "log" && tc.material.alias == "carbone") 
		if ((tc.id == "log" || tc.id == "branch") && tc.material.alias == "carbone") 
		{
			foreach (Element item2 in tc.elements.dict.Values.ToList())
			{

@@ -2250,9 +2250,10 @@ public static bool Wish(string s, string name, int power)

cs
				if (num == 1 && thing.trait.CanStack)
				{
					int num2 = wishValue;
					int price = thing.GetPrice(); 
					for (int i = 0; i < 1000; i++)
					{
						int num3 = thing.GetPrice() + 500 + i * 200; 
						int num3 = price + 500 + i * Mathf.Max(price, 200); 
						if (num2 > num3)
						{
							num++;

ActionMode

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

cs
		}
		if (!EClass.ui.canvas.enabled && EInput.IsAnyKeyDown())
		{
			EClass.ui.canvas.enabled = true; 
			EClass.ui.ToggleCanvas(); 
			EInput.Consume();
			return;
		}

AttackProcess

@@ -411,10 +411,15 @@ public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =

cs
			dMulti *= 1.25f;
		}
	}
	if (CC.Evalue(1355) > 0) 
	int num2 = CC.Evalue(1355); 
	ConStrife condition = CC.GetCondition<ConStrife>(); 
	if (condition != null) 
	{
		ConStrife condition = CC.GetCondition<ConStrife>(); 
		num = ((condition == null) ? (num + 1) : (num + condition.GetDice().Roll())); 
		num += condition.GetDice().Roll(); 
	} 
	else if (num2 > 0) 
	{ 
		num++; 
	}
	num = Mathf.Clamp(num, 0, 9999999);
	num = (int)(dMulti * (float)num * dmgMulti);

@@ -428,8 +433,8 @@ public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =

cs
		num /= 2;
	}
	List<Element> list2 = new List<Element>();
	int num2 = CC.Evalue(91); 
	int num3 = 0; 
	int num3 = CC.Evalue(91); 
	int num4 = 0; 
	if (weapon != null)
	{
		list2 = weapon.elements.dict.Values.ToList();

@@ -439,9 +444,9 @@ public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =

cs
		}
		if (IsRanged || isThrow)
		{
			num2 += weapon.Evalue(91); 
			num3 += weapon.Evalue(91); 
		}
		num3 += weapon.Evalue(603); 
		num4 += weapon.Evalue(603); 
	}
	else if (CC.id == "rabbit_vopal")
	{

@@ -472,7 +477,7 @@ public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =

cs
			list2.Add(value);
		}
	}
	if (hit && num2 > EClass.rnd(100)) 
	if (hit && num3 > EClass.rnd(100)) 
	{
		CC.Say("vopal");
		penetration = 100;

@@ -526,9 +531,9 @@ public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =

cs
		CC.Say("attackMelee", CC, TC, GetAttackText(attackType, 0));
	}
	bool showEffect = true;
	int num4 = 0; 
	int num5 = 0;
	int num6 = 0;
	int num7 = 0; 
	ConWeapon conWeapon = null;
	if (weapon != null)
	{

@@ -536,40 +541,40 @@ public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =

cs
		{
			if (value2.source.categorySub == "eleConvert")
			{
				num4 = EClass.sources.elements.alias[value2.source.aliasRef].id; 
				num5 = 50 + value2.Value * 2; 
				num6 = Mathf.Min(value2.Value, 100); 
				num5 = EClass.sources.elements.alias[value2.source.aliasRef].id; 
				num6 = 50 + value2.Value * 2; 
				num7 = Mathf.Min(value2.Value, 100); 
				break;
			}
		}
	}
	if (num4 == 0) 
	if (num5 == 0) 
	{
		if (CC.HasCondition<ConWeapon>())
		{
			conWeapon = CC.GetCondition<ConWeapon>();
			num4 = conWeapon.sourceElement.id; 
			num5 = conWeapon.power / 2; 
			num6 = 40 + (int)Mathf.Min(MathF.Sqrt(conWeapon.power), 80f); 
			num5 = conWeapon.sourceElement.id; 
			num6 = conWeapon.power / 2; 
			num7 = 40 + (int)Mathf.Min(MathF.Sqrt(conWeapon.power), 80f); 
		}
		if (conWeapon == null && weapon == null && (CC.MainElement != Element.Void || CC.HasElement(1565)))
		{
			num4 = (CC.HasElement(1565) ? 915 : CC.MainElement.id); 
			num5 = CC.Power / 3 + EClass.rnd(CC.Power / 2); 
			num5 = (CC.HasElement(1565) ? 915 : CC.MainElement.id); 
			num6 = CC.Power / 3 + EClass.rnd(CC.Power / 2); 
			if (CC.MainElement != Element.Void)
			{
				num5 += CC.MainElement.Value; 
				num6 += CC.MainElement.Value; 
			}
			showEffect = false;
			num6 = 50; 
			num7 = 50; 
		}
		if (conWeapon == null && weapon != null && weapon.trait is TraitToolRangeCane)
		{
			IEnumerable<Element> enumerable = weapon.elements.dict.Values.Where((Element e) => e.source.categorySub == "eleAttack");
			if (enumerable.Count() > 0)
			{
				num4 = enumerable.RandomItem().id; 
				num5 = num4 switch
				num5 = enumerable.RandomItem().id; 
				num6 = num5 switch 
				{
					920 => 30, 
					914 => 50,

@@ -577,16 +582,16 @@ public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =

cs
					_ => 100, 
				};
			}
			num6 = 50; 
			num7 = 50; 
		}
	}
	int num7 = num; 
	int num8 = num * num6 / 100; 
	num -= num8; 
	int num9 = num * penetration / 100; 
	int num8 = num; 
	int num9 = num * num7 / 100; 
	num -= num9;
	num = TC.ApplyProtection(num) + num9 + num8; 
	TC.DamageHP(num, num4, num5, (!IsRanged && !isThrow) ? AttackSource.Melee : AttackSource.Range, CC, showEffect); 
	int num10 = num * penetration / 100; 
	num -= num10; 
	num = TC.ApplyProtection(num) + num10 + num9; 
	TC.DamageHP(num, num5, num6, (!IsRanged && !isThrow) ? AttackSource.Melee : AttackSource.Range, CC, showEffect); 
	conWeapon?.Mod(-1);
	bool flag2 = IsCane || (weapon != null && weapon.Evalue(482) > 0);
	int attackStyleElement = CC.body.GetAttackStyleElement(attackStyle);

@@ -624,13 +629,13 @@ public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =

cs
			}
			if (item.source.categorySub == "eleAttack")
			{
				int num10 = 25; 
				int num11 = 25; 
				int dmg = EClass.rnd(num * (100 + item.Value * 10) / 500 + 5);
				if (conWeapon == null && weapon != null && weapon.trait is TraitToolRangeCane)
				{
					num10 = 0; 
					num11 = 0; 
				}
				if (num10 >= EClass.rnd(100)) 
				if (num11 >= EClass.rnd(100)) 
				{
					TC.DamageHP(dmg, item.id, isThrow ? (100 + item.Value * 5) : (30 + item.Value), AttackSource.WeaponEnchant, CC);
				}

@@ -644,12 +649,12 @@ public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =

cs
	}
	if (!IsRanged && attackStyle == AttackStyle.Shield)
	{
		int num11 = CC.Evalue(123); 
		if (CC.elements.ValueWithoutLink(123) >= 10 && Mathf.Clamp(Mathf.Sqrt(num11) - 2f, 8f, 12f) > (float)EClass.rnd(100)) 
		int num12 = CC.Evalue(123); 
		if (CC.elements.ValueWithoutLink(123) >= 10 && Mathf.Clamp(Mathf.Sqrt(num12) - 2f, 8f, 12f) > (float)EClass.rnd(100)) 
		{
			num = num7 * Mathf.Min(50 + num11, 200) / 100; 
			num = num8 * Mathf.Min(50 + num12, 200) / 100; 
			num = TC.ApplyProtection(num);
			Debug.Log("Bash:" + num + "/" + num7); 
			Debug.Log("Bash:" + num + "/" + num8); 
			CC.PlaySound("shield_bash");
			CC.Say("shield_bash", CC, TC);
			TC.DamageHP(num, AttackSource.None, CC);

@@ -657,7 +662,7 @@ public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =

cs
			{
				if (EClass.rnd(2) == 0)
				{
					TC.Chara.AddCondition<ConDim>(50 + (int)Mathf.Sqrt(num11) * 10); 
					TC.Chara.AddCondition<ConDim>(50 + (int)Mathf.Sqrt(num12) * 10); 
				}
				TC.Chara.AddCondition<ConParalyze>(EClass.rnd(2), force: true);
			}

@@ -667,7 +672,7 @@ public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =

cs
	{
		return true;
	}
	if (TC.isChara && num3 > 0 && num3 * 2 + 15 > EClass.rnd(100) && !TC.isRestrained && TC.Chara.TryMoveFrom(CC.pos) == Card.MoveResult.Success) 
	if (TC.isChara && num4 > 0 && num4 * 2 + 15 > EClass.rnd(100) && !TC.isRestrained && TC.Chara.TryMoveFrom(CC.pos) == Card.MoveResult.Success) 
	{
		TC.pos.PlayEffect("vanish");
		TC.PlaySound("push", 1.5f);

@@ -769,9 +774,9 @@ void Proc(List<Element> list)

cs
		{
			if (item2 is Ability)
			{
				int num12 = 10 + item2.Value / 5; 
				int num13 = 10 + item2.Value / 5; 
				int power = EClass.curve((100 + item2.Value * 10) * (100 + weaponSkill.Value) / 100, 400, 100);
				if (num12 >= EClass.rnd(100)) 
				if (num13 >= EClass.rnd(100)) 
				{
					Act obj = item2 as Act;
					Card card = (obj.TargetType.CanSelectSelf ? CC : TC);

Card

@@ -6238,8 +6238,14 @@ public virtual int GetPrice(CurrencyType currency = CurrencyType.Money, bool sel

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

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

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

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

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

CardRenderer

@@ -216,6 +216,11 @@ public override void Draw(RenderParam p, ref Vector3 v, bool drawShadow)

cs
					drawShadow = traitFigure.ShowShadow;
					pref = row.pref;
				}
				if (renderData.pass != null && renderData.pass.name == "pass charaL" && EClass.pc.held == owner) 
				{ 
					int num = (int)renderData.pass.pmesh.tiling.x; 
					p.tile = (int)p.tile / num * num * 2 + (int)p.tile % num; 
				} 
			}
			else
			{

@@ -309,9 +314,9 @@ public override void Draw(RenderParam p, ref Vector3 v, bool drawShadow)

cs
	{
		RenderObject.tempV = position;
		RenderObject.tempV.y += data.offset.y + data.size.y;
		for (int num = listTC.Count - 1; num >= 0; num--) 
		for (int num2 = listTC.Count - 1; num2 >= 0; num2--) 
		{
			listTC[num].OnDraw(ref RenderObject.tempV); 
			listTC[num2].OnDraw(ref RenderObject.tempV); 
		}
	}
	if (owner.trait.RenderExtra)

Chara

@@ -6413,6 +6413,11 @@ public void TryTakeSharedItems(IEnumerable<Thing> containers, bool msg = true, b

cs
	int num3 = 2;
	int num4 = 2;
	int num5 = 2;
	if (homeBranch != null && homeBranch.HasItemProtection && !IsPCParty) 
	{ 
		num4 = 0; 
		num5 = 0; 
	} 
	foreach (Thing thing3 in things)
	{
		if (CanEat(thing3, shouldEat))

CharaRenderer

@@ -320,11 +320,12 @@ public void DrawHat()

cs

	public override void DrawHeld()
	{
		Card held = owner.held; 
		int num = currentDir;
		RenderData renderData = owner.held.renderer.data; 
		SourcePref pref = owner.held.Pref; 
		RenderData renderData = held.renderer.data; 
		SourcePref pref = held.Pref; 
		bool flag = num == 1 || num == 3;
		if (owner.held.isChara) 
		if (held.isChara) 
		{
			Vector3[] array = (EClass.player.altHeldPos ? RenderObject.renderSetting.heldPosChara2 : RenderObject.renderSetting.heldPosChara);
			RenderObject.currentParam.x += array[num].x;

@@ -332,11 +333,11 @@ public override void DrawHeld()

cs
		RenderObject.currentParam.z += array[num].z + data.offset.z - renderData.offset.z;
		if (EClass.player.altHeldPos)
		{
			owner.held.SetDir((owner.dir == 0) ? 2 : ((owner.dir == 1) ? 1 : ((owner.dir != 2) ? 3 : 0))); 
			held.SetDir((owner.dir == 0) ? 2 : ((owner.dir == 1) ? 1 : ((owner.dir != 2) ? 3 : 0))); 
		}
		else
		{
			owner.held.SetDir((owner.dir == 0) ? 2 : owner.dir); 
			held.SetDir((owner.dir == 0) ? 2 : owner.dir); 
		}
	}
	else

@@ -354,26 +355,26 @@ public override void DrawHeld()

cs
			RenderObject.currentParam.y += heldPos[4].y;
			RenderObject.currentParam.z += heldPos[4].z + data.offset.z - renderData.offset.z;
		}
		if (owner.held.trait.NoHeldDir || !owner.held.sourceCard.ContainsTag("noHeldDir")) 
		if (held.trait.NoHeldDir || !held.sourceCard.ContainsTag("noHeldDir")) 
		{
			owner.held.dir = (owner.flipX ? 1 : 0); 
			held.dir = (owner.flipX ? 1 : 0); 
		}
	}
	if (!owner.Cell.sourceSurface.tileType.IsDeepWater)
	{
		int liquidLv = RenderObject.currentParam.liquidLv;
		if (owner.held.isChara) 
		if (held.isChara) 
		{
			RenderObject.currentParam.liquidLv = 0;
		}
		owner.held.SetRenderParam(RenderObject.currentParam); 
		held.SetRenderParam(RenderObject.currentParam); 
		RenderObject.currentParam.x += renderData.heldPos.x - renderData.offset.x + (flag ? 0.01f : (-0.01f)) * (float)pref.equipX;
		RenderObject.currentParam.y += renderData.heldPos.y - renderData.offset.y + 0.01f * (float)pref.equipY;
		RenderObject.currentParam.z += renderData.heldPos.z;
		RenderObject.tempV.x = RenderObject.currentParam.x;
		RenderObject.tempV.y = RenderObject.currentParam.y;
		RenderObject.tempV.z = RenderObject.currentParam.z;
		owner.held.renderer.Draw(RenderObject.currentParam, ref RenderObject.tempV, drawShadow: false); 
		held.renderer.Draw(RenderObject.currentParam, ref RenderObject.tempV, drawShadow: false); 
		RenderObject.currentParam.liquidLv = liquidLv;
	}
}

CoreConfig

@@ -699,10 +699,6 @@ public void OnInit()

cs
	{
		EClass.core.ui.skins.SetMainSkin(test.idSkin);
		Apply();
		if (EClass.debug.enable) 
		{ 
			net.enable = false; 
		} 
	}

	public bool HasBackerRewardCode()

CoreDebug

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

cs
	}
	if (Input.GetKeyDown(KeyCode.F3))
	{
		(EClass.pc.AddCondition<ConStrife>() as ConStrife).lv = 6; 
		for (int i = 0; i < 10; i++)
		{
			Thing thing = ThingGen.Create("egg_fertilized");

FactionBranch

@@ -131,6 +131,8 @@ public class Statistics : EClass

cs

	public int DangerLV => Mathf.Max(1, ContentLV - (int)Mathf.Sqrt(Evalue(2704)) * 2 + (int)Mathf.Sqrt(Evalue(2706)) * 4);

	public bool HasItemProtection => lv >= 3; 

	public bool HasNetwork => lv >= 5;

	public bool IsTaxFree => policies.IsActive(2514);

HotItemContext

@@ -99,7 +99,7 @@ public static void Show(string id, Vector3 pos)

cs
			uIContextMenu.AddButton("hideUI", delegate
			{
				SE.ClickGeneral();
				EClass.ui.canvas.enabled = !EClass.ui.canvas.enabled; 
				EClass.ui.ToggleCanvas(); 
			});
			UIContextMenu uIContextMenu2 = m.AddChild("tool");
			uIContextMenu2.AddButton("LayerMod", delegate

LayerCraft

@@ -303,6 +303,10 @@ public void RefreshCategory(string cat, bool first = false)

cs
			{
				b.Attach("recipe_new", rightAttach: false);
			}
			if (a.HasFirstTimeBonus()) 
			{ 
				b.Attach("recipe_firstTime", rightAttach: false); 
			} 
		},
		onList = delegate
		{

LayerEditPortrait

@@ -129,6 +129,7 @@ public void RefreshList()

cs
		{
			b.mainText.SetText(a.id);
			b.SetPortrait(a.id, hairColor);
			b.tooltip.lang = a.id; 
		},
		onList = delegate
		{

LayerUploader

@@ -102,8 +102,7 @@ public void ExportMap()

cs

	public void Upload()
	{
		Debug.Log("aaaa"); 
		if (ini.Global["agreed"].IsEmpty()) 
		if (ini.Global["agreed"].IsEmpty() || ELayer.debug.enable) 
		{
			string[] items = new string[3] { "readTerms", "agree", "disagree" };
			Dialog.List("dialogTermsOfUse".lang(), items, (string j) => j, delegate(int c, string d)

Map

@@ -1191,7 +1191,7 @@ public void TryShatter(Point pos, int ele, int power)

cs
		{
			continue;
		}
		if (EClass._zone.IsPCFaction && EClass.Branch.lv >= 3) 
		if (EClass._zone.IsPCFaction && EClass.Branch.HasItemProtection) 
		{
			Card rootCard = item.GetRootCard();
			if (!rootCard.isChara || rootCard.Chara.IsPCFaction)

Net

@@ -311,6 +311,10 @@ public static async UniTask<bool> SendChat(string name, string msg, ChatCategory

cs
	}
	try
	{
		if (EClass.debug.enable) 
		{ 
			idLang = "DEBUG"; 
		} 
		Debug.Log("Start Sending Text:");
		WWWForm wWWForm = new WWWForm();
		wWWForm.AddField("submit", "Send");

@@ -348,6 +352,10 @@ public static async UniTask<List<ChatLog>> GetChat(ChatCategory cat, string idLa

cs
	List<ChatLog> list = new List<ChatLog>();
	try
	{
		if (EClass.debug.enable) 
		{ 
			idLang = "DEBUG"; 
		} 
		string uri = $"http://ylva.php.xdomain.jp/script/chat/logs/all_{idLang}.json";
		using UnityWebRequest www = UnityWebRequest.Get(uri);
		await www.SendWebRequest();

Recipe

@@ -901,4 +901,25 @@ public int GetSortVal()

cs
		Element reqSkill = source.GetReqSkill();
		return reqSkill.source.id * 10000 - reqSkill.Value;
	}

	public bool HasFirstTimeBonus() 
	{ 
		if (EClass.player.recipes.craftedRecipes.Contains(id)) 
		{ 
			return false; 
		} 
		return true; 
	} 

	public void TryGetFirstTimeBonus() 
	{ 
		if (HasFirstTimeBonus()) 
		{ 
			EClass.player.recipes.craftedRecipes.Add(id); 
			Element reqSkill = source.GetReqSkill(); 
			int num = 1 + ((!IsStaticLV()) ? (reqSkill.Value / 20) : 0); 
			Msg.Say("firstTimeCraft", Name); 
			EClass.pc.Pick(ThingGen.Create("ticket_fortune").SetNum(num)); 
		} 
	} 
}

RecipeManager

@@ -13,6 +13,9 @@ public class RecipeManager : EClass

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

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

	[JsonProperty]
	public Dictionary<string, int> knownRecipes = new Dictionary<string, int>();

Religion

@@ -373,7 +373,7 @@ public void JoinFaith(Chara c)

cs
	}
	if (c.faith != this)
	{
		c.faith.LeaveFaith(c); 
		c.faith.LeaveFaith(c, this); 
	}
	EClass.pc.c_daysWithGod = 0;
	Msg.Say("worship", Name);

@@ -381,7 +381,6 @@ public void JoinFaith(Chara c)

cs
	EClass.Sound.Play("worship");
	c.PlayEffect("aura_heaven");
	c.faith = this;
	c.elements.SetBase(85, 0); 
	OnJoinFaith();
	if (IsEyth)
	{

@@ -402,22 +401,36 @@ public void JoinFaith(Chara c)

cs
		}
	}

	public void LeaveFaith(Chara c) 
	public void LeaveFaith(Chara c, Religion newFaith) 
	{
		if (!IsEyth) 
		if (IsEyth) 
		{
			if (c.IsPC) 
			return; 
		} 
		bool flag = (newFaith == EClass.game.religions.Trickery && this == EClass.game.religions.MoonShadow) || (newFaith == EClass.game.religions.MoonShadow && this == EClass.game.religions.Trickery); 
		if (c.IsPC) 
		{ 
			Msg.Say("worship2"); 
			if (!flag) 
			{
				Msg.Say("worship2"); 
				Punish(c);
			}
			if (c.IsPC) 
			{ 
				EClass.pc.faction.charaElements.OnLeaveFaith(); 
			} 
			OnLeaveFaith(); 
			c.RefreshFaithElement(); 
		}
		if (flag) 
		{ 
			Talk("regards"); 
			c.elements.SetBase(85, c.Evalue(85) / 2); 
		} 
		else
		{ 
			c.elements.SetBase(85, 0); 
		} 
		if (c.IsPC) 
		{ 
			EClass.pc.faction.charaElements.OnLeaveFaith(); 
		} 
		OnLeaveFaith(); 
		c.RefreshFaithElement(); 
	}

	public void Punish(Chara c)

TraitKettle

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

cs

	public override bool CanBeBanished => false;

	public override int RestockDay => 30; 
	public override int RestockDay => 28; 

	public override bool CanCopy(Thing t)
	{

UI

@@ -333,6 +333,15 @@ public void Hide(float duration = 1f)

cs
		}
	}

	public void ToggleCanvas() 
	{ 
		canvas.enabled = !canvas.enabled; 
		if ((bool)WidgetSideScreen.Instance) 
		{ 
			WidgetSideScreen.Instance.SetActive(canvas.enabled); 
		} 
	} 

	public void OnUpdate()
	{
		if (hud.imageDrag.gameObject.activeSelf)

@@ -742,7 +751,6 @@ public void ToggleFeedback()

cs

	public void StartDrag(DragItem item)
	{
		Debug.Log(EInput.leftMouse.down); 
		dragDuration = 0f;
		if (currentDrag != null)
		{

VirtualDate

@@ -1,5 +1,4 @@

cs
using System.Collections.Generic;
using UnityEngine; 

public class VirtualDate : Date
{

@@ -54,7 +53,6 @@ public BranchMap GetBranchMap()

cs

	public void BuildSunMap()
	{
		Debug.Log("Building Sunmap"); 
		sunMap = new HashSet<int>();
		foreach (Trait value in EClass._map.props.installed.traits.suns.Values)
		{