Skip to content

EA 23.56 Nightly

December 14, 2024

16 files modified.

Important Changes

None.

ActEffect

@@ -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 num4 = power / 50 + 1 + EClass.rnd(3); 
		int num5 = power / 50 + 1 + EClass.rnd(3); 
		List<Thing> source = TC.things.List((Thing t) => t.c_IDTState == 0);
		for (int j = 0; j < num4; j++) 
		for (int j = 0; j < num5; 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 flag5 = id == EffectId.EnchantWeaponGreat || id == EffectId.EnchantArmorGreat; 
		bool flag2 = id == EffectId.EnchantWeaponGreat || id == EffectId.EnchantArmorGreat; 
		if (!tc.isThing)
		{
			LayerDragGrid.CreateEnchant(CC, armor, flag5, state); 
			LayerDragGrid.CreateEnchant(CC, armor, flag2, 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 num5 = (flag5 ? 4 : 2) + (blessed ? 1 : 0); 
		if (tc.encLV >= num5) 
		int num = (flag2 ? 4 : 2) + (blessed ? 1 : 0); 
		if (tc.encLV >= num) 
		{
			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 flag3 = id == EffectId.GreaterIdentify; 
		bool flag4 = id == EffectId.GreaterIdentify; 
		if (flag)
		{
			Redirect(EffectId.ForgetItems, flag3 ? BlessedState.Cursed : BlessedState.Normal, default(ActRef)); 
			Redirect(EffectId.ForgetItems, flag4 ? BlessedState.Cursed : BlessedState.Normal, default(ActRef)); 
			break;
		}
		if (!tc.isThing)
		{
			int count = ((!blessed) ? 1 : (flag3 ? (2 + EClass.rnd(2)) : (3 + EClass.rnd(3)))); 
			LayerDragGrid.CreateIdentify(CC, flag3, state, 0, count); 
			int count = ((!blessed) ? 1 : (flag4 ? (2 + EClass.rnd(2)) : (3 + EClass.rnd(3)))); 
			LayerDragGrid.CreateIdentify(CC, flag4, state, 0, count); 
			return;
		}
		cc.PlaySound("identify");
		cc.PlayEffect("identify");
		tc.Thing.Identify(cc.IsPCParty, (!flag3) ? IDTSource.Identify : IDTSource.SuperiorIdentify); 
		tc.Thing.Identify(cc.IsPCParty, (!flag4) ? IDTSource.Identify : IDTSource.SuperiorIdentify); 
		break;
	}
	case EffectId.Uncurse:

@@ -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 num = (tc.isWeightChanged ? tc.c_weight : tc.Thing.source.weight); 
		int num4 = (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 flag2 = tc.IsEquipmentOrRanged || tc.IsThrownWeapon || tc.IsAmmo; 
		bool flag5 = tc.IsEquipmentOrRanged || tc.IsThrownWeapon || tc.IsAmmo; 
		if (flag)
		{
			num = (int)(0.01f * (float)num * (float)power * 0.75f + 500f); 
			if (num < 1) 
			num4 = (int)(0.01f * (float)num4 * (float)power * 0.75f + 500f); 
			if (num4 < 1) 
			{
				num = 1; 
				num4 = 1; 
			}
			if (flag2) 
			if (flag5) 
			{
				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
		{
			num = num * (100 - power / 10) / 100; 
			num4 = num4 * (100 - power / 10) / 100; 
			if (blessed)
			{
				power /= 4;
			}
			if (flag2) 
			if (flag5) 
			{
				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 = num; 
		tc.c_weight = num4; 
		tc.SetDirtyWeight();
		if (tc.parent == null)
		{

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

cs
		if (row == null)
		{
			bool num2 = id == EffectId.ChangeMaterialGreater;
			bool flag4 = id == EffectId.ChangeMaterialLesser; 
			bool flag3 = id == EffectId.ChangeMaterialLesser; 
			string text2 = tc.Thing.source.tierGroup;
			Dictionary<string, SourceMaterial.TierList> tierMap = SourceMaterial.tierMap;
			int num3 = 1;

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

cs
			{
				num3++;
			}
			if (flag4) 
			if (flag3) 
			{
				num3 -= 2;
			}

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

cs
		}
		cc.PlaySound("offering");
		cc.PlayEffect("buff");
		foreach (Element item2 in tc.elements.dict.Values.ToList()) 
		{ 
			if (item2.IsTrait && item2.vBase != 0) 
			{ 
				tc.elements.ModBase(item2.id, -item2.vBase); 
			} 
		} 
		tc.ChangeMaterial(row);
		if (tc.trait is TraitGene && tc.c_DNA != null)
		{

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

cs
		TC.Say("abShutterHex", TC);
		TC.pos.ForeachNeighbor(delegate(Point p)
		{
			foreach (Chara item2 in p.ListCharas()) 
			foreach (Chara item3 in p.ListCharas()) 
			{
				if (!item2.IsHostile(CC)) 
				if (!item3.IsHostile(CC)) 
				{
					break;
				}
				int dmg2 = Dice.Create("SpShutterHex", power * hex2, CC, actRef.act).Roll();
				item2.DamageHP(dmg2, 919, power, AttackSource.None, CC); 
				item3.DamageHP(dmg2, 919, power, AttackSource.None, CC); 
			}
		});
		break;

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

cs
				}
			}
		});
		foreach (Thing item3 in list6) 
		foreach (Thing item4 in list6) 
		{
			item3.GetRootCard()?.TryStack(item3); 
			item4.GetRootCard()?.TryStack(item4); 
		}
		if (success == 0 && fail == 0)
		{

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

cs
			Redirect(EffectId.CurseEQ, BlessedState.Normal, default(ActRef));
			break;
		}
		foreach (Condition item4 in TC.conditions.Copy()) 
		foreach (Condition item5 in TC.conditions.Copy()) 
		{
			if (item4.Type == ConditionType.Debuff && !item4.IsKilled && EClass.rnd(power * 2) > EClass.rnd(item4.power)) 
			if (item5.Type == ConditionType.Debuff && !item5.IsKilled && EClass.rnd(power * 2) > EClass.rnd(item5.power)) 
			{
				CC.Say("removeHex", TC, item4.Name.ToLower()); 
				item4.Kill(); 
				CC.Say("removeHex", TC, item5.Name.ToLower()); 
				item5.Kill(); 
				if (id == EffectId.RemoveHex)
				{
					break;

Card

@@ -4393,7 +4393,7 @@ public void SpawnLoot(Card origin)

cs
		}
		else
		{
			thing3.ChangeMaterial(Chara.race.material); 
			thing3.ChangeMaterial(Chara.material); 
		}
		list.Add(thing3);
	}

CardRenderer

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

cs
		}
		int shadow = pref.shadow;
		bool flag2 = isChara && owner.isHidden && !EClass.pc.canSeeInvisible && (!EClass.pc.hasTelepathy || !owner.Chara.race.visibleWithTelepathy);
		p.x += pref.x * (float)((!owner.flipX) ? 1 : (-1)); 
		p.y += pref.y;
		if (drawShadow && shadow != 1 && SubPassData.Current.shadow && (!flag2 || owner.IsPC))
		{

Chara

@@ -1388,6 +1388,15 @@ public override void OnCreate(int genLv)

cs
	}
	switch (id)
	{
	case "golem_wood": 
		ChangeMaterial("pine"); 
		break; 
	case "golem_steel": 
		ChangeMaterial("steel"); 
		break; 
	case "golem_gold": 
		ChangeMaterial("gold"); 
		break; 
	case "dodo":
		base.idSkin = EClass.rnd(4);
		break;

DramaActor

@@ -80,7 +80,7 @@ public void Talk(string text, List<DramaChoice> choices, bool center, bool unkno

cs
		}
		if (chara != null)
		{
			dialog.textAffinity.text = ((chara.c_bossType != 0) ? " - " : (chara.affinity.Name + "(" + chara._affinity + ")")); 
			dialog.textAffinity.text = ((chara.c_bossType != 0) ? " - " : (chara.affinity.Name + " (" + chara._affinity + ")")); 
			dialog.layoutInterest.DestroyChildren();
			int num = chara.interest / 10 + 1;
			if (chara.interest <= 0)

FactionBranch

@@ -1039,6 +1039,10 @@ void GetIncome(ref int n, ref int stat, string lang, bool tax)

cs

	public Thing GetMeal(Chara c)
	{
		if (c.things.IsFull()) 
		{ 
			return null; 
		} 
		Thing thing = EClass._zone.TryGetThingFromSharedContainer((Thing t) => c.CanEat(t, shouldEat: true) && !t.c_isImportant);
		if (thing != null)
		{

FoodEffect

@@ -9,6 +9,22 @@ public static bool IsHumanFlesh(Thing food)

cs
	{
		return false;
	}
	if (food.id == "deadbody") 
	{ 
		return true; 
	} 
	if (food.source._origin != "meat" && food.source._origin != "dish") 
	{ 
		return false; 
	} 
	string[] components = food.source.components; 
	for (int i = 0; i < components.Length; i++) 
	{ 
		if (components[i].Contains("egg")) 
		{ 
			return false; 
		} 
	} 
	if (!IsHumanFlesh(food.refCard))
	{
		return IsHumanFlesh(food.refCard2);

@@ -18,6 +34,10 @@ public static bool IsHumanFlesh(Thing food)

cs

	public static bool IsUndeadFlesh(Thing food)
	{
		if (food.source._origin != "meat" && food.source._origin != "dish") 
		{ 
			return false; 
		} 
		if (!IsUndeadFlesh(food.refCard))
		{
			return IsUndeadFlesh(food.refCard2);

@@ -74,24 +94,9 @@ public static void Proc(Chara c, Thing food)

cs
	string idTaste = "";
	bool flag2 = IsHumanFlesh(food);
	bool flag3 = IsUndeadFlesh(food);
	if (food.source._origin != "meat" && food.source._origin != "dish") 
	{ 
		flag2 = (flag3 = false); 
	} 
	if (food.id == "deadbody") 
	{ 
		flag2 = true; 
	} 
	string[] components = food.source.components; 
	for (int i = 0; i < components.Length; i++) 
	{ 
		if (components[i].Contains("egg")) 
		{ 
			flag2 = false; 
		} 
	} 
	bool flag4 = c.HasElement(1205);
	bool flag5 = food.IsDecayed || flag3;
	Debug.Log(flag2 + "/" + flag4); 
	if (food.IsBlessed)
	{
		num2 *= 1.5f;

GrowSystemPasture

@@ -18,7 +18,7 @@ public override void OnMineObj(Chara c = null)

cs
	}
	int num = 1 + EClass.rnd(base.stage.idx);
	Thing thing = EClass._map.TryGetPlant(GrowSystem.cell)?.seed;
	if (thing != null && thing.encLV > 1) 
	if (thing != null && thing.encLV > 1 && !EClass._zone.IsUserZone) 
	{
		num += EClass.rndHalf((int)Mathf.Sqrt(thing.encLV) + 1);
	}

GrowSystemTree

@@ -121,7 +121,7 @@ public override int GetHp()

cs

	public int GetPlantBonus(PlantData plant)
	{
		if (plant == null || plant.seed == null) 
		if (plant == null || plant.seed == null || EClass._zone.IsUserZone) 
		{
			return 0;
		}

HitSummary

@@ -21,7 +21,6 @@ public class HitSummary : EClass

cs

	public void Clear()
	{
		hasFactory = true; 
		money = (count = (countValid = 0));
		targets.Clear();
		groups.Clear();

Region

@@ -65,6 +65,10 @@ public void CheckRandomSites()

cs
		{
			SpatialGen.Create("little_garden", this, register: true);
		}
		if (FindZone("cave_yeek") == null) 
		{ 
			SpatialGen.Create("cave_yeek", this, register: true); 
		} 
		elomap.objmap.UpdateMeshImmediate();
	}

SerializedCards

@@ -740,6 +740,7 @@ public void Restore(Map map, Map orgMap, bool addToZone, PartialMap partial = nu

cs
			{
				card2.ApplyBacker(card2.c_idBacker);
			}
			card2.SetObj(5, null); 
		}
		if (addToZone)
		{

Thing

@@ -1831,7 +1831,6 @@ public void DoAct(Act act)

cs
	List<SourceElement.Row> list = new List<SourceElement.Row>();
	int num = 0;
	int num2 = lv + 5 + EClass.rndSqrt(10);
	float num3 = (float)(3 + Mathf.Min(lv / 10, 15)) + Mathf.Sqrt(lv); 
	foreach (SourceElement.Row row in EClass.sources.elements.rows)
	{
		if ((!neg || !row.tag.Contains("flag")) && func(row) && row.LV < num2)

@@ -1844,16 +1843,17 @@ public void DoAct(Act act)

cs
	{
		return null;
	}
	int num4 = EClass.rnd(num); 
	int num5 = 0; 
	int num3 = EClass.rnd(num); 
	int num4 = 0; 
	foreach (SourceElement.Row item in list)
	{
		num5 += item.chance; 
		if (num4 < num5) 
		num4 += item.chance; 
		if (num3 < num4) 
		{
			string text = EClass.sources.elements.map[item.id].category;
			bool flag = text == "skill" || text == "attribute" || text == "resist";
			int num6 = (item.mtp + EClass.rnd(item.mtp + (int)num3)) / item.mtp * ((!(flag && neg)) ? 1 : (-1)); 
			float num5 = (float)(3 + Mathf.Min(lv / 10, 15)) + Mathf.Sqrt(lv * item.encFactor / 100); 
			int num6 = (item.mtp + EClass.rnd(item.mtp + (int)num5)) / item.mtp * ((!(flag && neg)) ? 1 : (-1)); 
			if (item.encFactor == 0 && num6 > 25)
			{
				num6 = 25;

TraitBaseSpellbook

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

cs
	}
	case Type.Ero:
	{
		IEnumerable<SourceChara.Row> ie = EClass.sources.charas.rows.Where((SourceChara.Row a) => !a.name.IsEmpty() && a.name.Length > 2 && a.name[0] != '<' && a.race != "god"); 
		IEnumerable<SourceChara.Row> ie = EClass.sources.charas.rows.Where((SourceChara.Row a) => !a.name.IsEmpty() && a.name.Length > 2 && a.name[0] != '<' && a.race != "god" && !a.HasTag(CTAG.noRandomProduct)); 
		owner.c_idRefName = ie.RandomItem().id;
		break;
	}

Zone

@@ -1672,14 +1672,22 @@ public bool CanDestroy()

cs
	{
		return true;
	}
	if (base.dateExpire == 0 || !EClass.world.date.IsExpired(base.dateExpire)) 
	bool flag = false; 
	if (id == "cave_yeek" && !(this is Zone_DungeonYeek)) 
	{
		return false; 
		flag = true; 
	}
	Zone topZone = GetTopZone();
	if (!base.isRandomSite && !(this is Zone_Field) && (topZone == null || topZone == this || topZone.FindDeepestZone() == this)) 
	if (!flag) 
	{
		return false; 
		if (base.dateExpire == 0 || !EClass.world.date.IsExpired(base.dateExpire)) 
		{ 
			return false; 
		} 
		if (!base.isRandomSite && !(this is Zone_Field) && (topZone == null || topZone == this || topZone.FindDeepestZone() == this)) 
		{ 
			return false; 
		} 
	}
	if (EClass.pc.currentZone == null || EClass.pc.currentZone is Zone_Tent || topZone == EClass.pc.currentZone.GetTopZone() || (EClass.player.nextZone != null && topZone == EClass.player.nextZone.GetTopZone()))
	{