Skip to content

EA 23.127 Nightly Patch 1

April 17, 2025

23 files modified. 1 new file created.

Important Changes

None.

AI_Fish

@@ -77,6 +77,7 @@ public void Ripple()

cs

		public override void OnProgressComplete()
		{
			TraitToolFishing traitToolFishing = owner.FindTool<TraitToolFishing>(); 
			owner.renderer.PlayAnime(AnimeID.Fishing);
			if (hit < 100)
			{

@@ -103,7 +104,7 @@ public override void OnProgressComplete()

cs
		thing.renderer.PlayAnime(AnimeID.Jump);
		owner.Say("fish_get", owner, thing);
		owner.PlaySound("fish_get");
		owner.elements.ModExp(245, 100); 
		owner.elements.ModExp(245, thing.tier * 200 + 80 + EClass.curve(thing.Num, 5, 75) * 20); 
		if (thing.id == "medal")
		{
			thing.isHidden = false;

@@ -134,9 +135,13 @@ public override void OnProgressComplete()

cs
					thing.Destroy();
				}
			}
			if (traitToolFishing != null) 
			{ 
				num = num * 100 / (50 + traitToolFishing.owner.material.hardness * 2); 
			} 
			if (EClass.rnd(2) == 0 || num > 1)
			{
				owner.stamina.Mod(-1 * num); 
				owner.stamina.Mod(Mathf.Min(-1, -num)); 
			}
		}

@@ -283,11 +288,17 @@ public static Point GetFishingPoint(Point p)

cs

	public static Thing Makefish(Chara c)
	{
		bool hqFever = c.IsPC && c.Evalue(1659) > 0 && EClass.player.fished < 5; 
		int num = c.Evalue(245);
		if (EClass.rnd(3 + num) == 0) 
		if (!hqFever && EClass.rnd(3 + num) == 0) 
		{
			return null;
		}
		if (hqFever) 
		{ 
			c.PlayEffect("revive"); 
			c.Say("fishingFever"); 
		} 
		int[] array = new int[18]
		{
			233, 235, 236, 236, 236, 1170, 1143, 1144, 727, 728,

@@ -327,38 +338,75 @@ public static Thing Makefish(Chara c)

cs
				text = "medal";
			}
		}
		if (text != "") 
		if (!hqFever && text != "") 
		{
			thing = ThingGen.Create(text, -1, EClass._zone.ContentLv);
		}
		else if (EClass.rnd(5 + num / 3) == 0) 
		else if (!hqFever && EClass.rnd(5 + num / 3) == 0) 
		{
			thing = ThingGen.Create(array.RandomItem().ToString() ?? "");
		}
		else
		{
			int num3 = EClass.rnd(num * 2) + 1; 
			thing = ThingGen.Create("fish", -1, num3); 
			num2 = EClass.rnd(num / (num3 + 10)) + 1; 
			int num4 = 5; 
			SetFeverSeed(); 
			int lv = EClass.rnd(num * 2) + 1; 
			int num3 = 0; 
			if (EClass.rnd(EClass.debug.enable ? 1 : (c.IsPC ? 5 : (c.IsPCFaction ? 250 : 2500))) == 0) 
			{ 
				num3 = Mathf.Min(EClass.rnd(EClass.rnd(EClass.rnd(EClass.curve(num, 100, 50, 70) + 50))) / 50, 3); 
			} 
			if (hqFever && ((EClass.pc.Evalue(1659) >= 2 && EClass.player.fished == 0) || EClass.rnd(5) == 0)) 
			{ 
				num3++; 
			} 
			if (num3 > 3) 
			{ 
				num3 = 3; 
			} 
			SetFeverSeed(); 
			thing = ThingGen.Create("fish", -1, lv); 
			SetFeverSeed(); 
			int num4 = Mathf.Max(1, num / (thing.source.LV * 2 + 10)); 
			int num5 = 5; 
			if (EClass.Branch != null)
			{
				num4 += EClass.Branch.Evalue(3604) * 20 + EClass.Branch.Evalue(3605) * 20 + EClass.Branch.Evalue(3706) * 25; 
				num5 += EClass.Branch.Evalue(3604) * 20 + EClass.Branch.Evalue(3605) * 20 + EClass.Branch.Evalue(3706) * 25; 
			}
			if (num4 >= EClass.rnd(100)) 
			if (EClass._zone is Zone_Kapul) 
			{
				num2++; 
				num5 = 35; 
			}
			if (EClass.rnd(EClass.debug.enable ? 3 : 25) == 0) 
			bool num6 = num5 >= EClass.rnd(100); 
			if (num6) 
			{
				thing.SetTier(Mathf.Min(EClass.rnd(EClass.rnd(num + 50)) / 50, 3)); 
				c.Say("bigCatch", c); 
			}
			num2 = (num6 ? num4 : EClass.rnd(num4)) / (num3 + 1) + 1; 
			if (num3 != 0) 
			{ 
				thing.SetTier(num3); 
			} 
			Rand.SetSeed(); 
		}
		if (thing != null)
		{
			thing.SetNum(num2); 
			if (num2 > 1) 
			{ 
				thing.SetNum(num2); 
			} 
			thing.SetBlessedState(BlessedState.Normal);
		}
		if (c.IsPC) 
		{ 
			EClass.player.fished++; 
		} 
		return thing;
		void SetFeverSeed() 
		{ 
			if (hqFever) 
			{ 
				Rand.SetSeed(EClass.player.stats.days * 10 + EClass.player.fished); 
			} 
		} 
	}
}

AI_Idle

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

cs
			Thing thing = owner.things.Find((Thing a) => owner.CanEat(a, owner.IsPCFaction) && !a.c_isImportant, recursive: false);
			if (thing == null && owner.IsPCFaction)
			{
				thing = owner.things.Find((Thing a) => owner.CanEat(a) && !a.c_isImportant, recursive: false); 
				thing = owner.FindBestFoodToEat(); 
			}
			if (thing == null && owner.IsPCFaction && EClass._zone.IsPCFaction)
			{

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

cs
			}
		});
	}
	if (EClass.rnd(100) == 0 && owner.trait.CanFish) 
	if (EClass.rnd(100) == 0 && owner.trait.CanFish && owner.stamina.value > 0) 
	{
		Point fishingPoint = AI_Fish.GetFishingPoint(owner.pos);
		if (fishingPoint.IsValid)

AI_PlayMusic

@@ -129,6 +129,9 @@ public override IEnumerable<Status> Run()

cs
		case "mokugyo":
			idSong = "mokugyo";
			break;
		case "tambourine":
			idSong = "tambourine"; 
			break; 
		case "mic":
			idSong = "mic_rachmaninoff";
			break;

@@ -243,6 +246,10 @@ public override IEnumerable<Status> Run()

cs
			Msg.SetColor(Msg.colors.Ono);
			owner.Say(Lang.GetList("music").RandomItem());
			Msg.SetColor();
			if (tool.id == "tambourine") 
			{ 
				Msg.Say("tambourine"); 
			} 
			if (EClass.debug.enable && EClass.pc.job.id == "pianist")
			{
				song.lv = 10000;

AI_Practice

@@ -18,7 +18,7 @@ public override bool CanManualCancel()

cs
public override void OnCancelOrSuccess()
{
	base.OnCancelOrSuccess();
	if (owner == EClass.pc) 
	if (owner == EClass.pc && turn > 0) 
	{
		long a = totalDamage / turn;
		Msg.Say("trainingDPS", turn.ToFormat(), a.ToFormat(), hit.ToFormat() ?? "", totalDamage.ToFormat() ?? "");

ActMelee

@@ -126,6 +126,7 @@ public bool Attack(float dmgMulti = 1f, bool maxRoll = false)

cs
	int dist = Act.CC.Dist(Act.TC);
	Point orgPos = Act.TC.pos.Copy();
	Card orgTC = Act.TC;
	bool safety = Act.CC.HasElement(486) && Act.CC.IsPCFactionOrMinion; 
	foreach (BodySlot slot in Act.CC.body.slots)
	{
		_Attack(slot);

@@ -172,14 +173,6 @@ void _Attack(BodySlot slot)

cs
			int num = 1 + Mathf.Max(Act.CC.Evalue(666), (w != null) ? w.Evalue(666) : 0);
			if (!UseWeaponDist || dist <= 1 || dist <= num)
			{
				if (w != null) 
				{ 
					usedWeapon = true; 
					if (w.IsMeleeWithAmmo && Act.CC.IsPC && w.c_ammo <= 0 && !Act.CC.HasCondition<ConReload>()) 
					{ 
						ActRanged.TryReload(w); 
					} 
				} 
				int num2 = GetWeaponEnc(606, addSelfEnc: false);
				int scatter = GetWeaponEnc(607, addSelfEnc: false);
				splash = GetWeaponEnc(608, addSelfEnc: true);

@@ -190,6 +183,22 @@ void _Attack(BodySlot slot)

cs
				feint = GetWeaponEnc(623, addSelfEnc: true);
				mod_talisman = GetWeaponEnc(609, addSelfEnc: true);
				List<Point> list2 = EClass._map.ListPointsInLine(Act.CC.pos, Act.TC.pos, num2 / 10 + ((num2 % 10 > EClass.rnd(10)) ? 1 : 0) + 1);
				if (w != null) 
				{ 
					if (safety) 
					{ 
						if (!w.HasElement(486)) 
						{ 
							return; 
						} 
						num2 = (scatter = (splash = (num3 = 0))); 
					} 
					usedWeapon = true; 
					if (w.IsMeleeWithAmmo && Act.CC.IsPC && w.c_ammo <= 0 && !Act.CC.HasCondition<ConReload>()) 
					{ 
						ActRanged.TryReload(w); 
					} 
				} 
				AttackWithFlurry(Act.TC, Act.TP, 1f, subAttack: false);
				if (num2 > 0)
				{

@@ -288,7 +297,7 @@ void Attack(Card _tc, Point _tp, float mtp, bool subAttack)

cs
			}
			Act.TC = _tc;
			Act.TP = _tp;
			if (w != null && w.c_ammo > 0 && !Act.CC.HasCondition<ConReload>()) 
			if (w != null && w.c_ammo > 0 && !Act.CC.HasCondition<ConReload>() && !safety) 
			{
				bool flag2 = true;
				TraitAmmo traitAmmo = ((w.ammoData == null) ? null : (w.ammoData.trait as TraitAmmo));

AttackProcess

@@ -445,6 +445,7 @@ public int GetRawDamage(float dmgMulti, bool crit, bool maxRoll)

cs
public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll = false, bool subAttack = false)
{
	bool flag = CC.HasCondition<ConReload>();
	bool flag2 = CC.HasElement(486) && CC.IsPCFactionOrMinion; 
	hit = CalcHit();
	int num = GetRawDamage(dmgMulti, crit, maxRoll);
	if (IsRanged && count >= numFireWithoutDamageLoss)

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

cs
	{
		conWeapon.Mod(-1);
	}
	bool flag2 = IsCane || (weapon != null && weapon.Evalue(482) > 0); 
	bool flag3 = IsCane || (weapon != null && weapon.Evalue(482) > 0); 
	int attackStyleElement = CC.body.GetAttackStyleElement(attackStyle);
	if (!subAttack)
	{

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

cs
		if (!IsRanged || count == 0)
		{
			ModExpAtk(weaponSkill.id, mod2);
			ModExpAtk(flag2 ? 304 : (IsRanged ? 133 : 132), mod2); 
			ModExpAtk(flag3 ? 304 : (IsRanged ? 133 : 132), mod2); 
		}
		if (crit)
		{

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

cs
		TC.Chara.AddCondition<ConParalyze>(30 + EClass.rnd(30));
		TC.Chara.AddCondition<ConGravity>();
	}
	if (list2.Count > 0) 
	if (list2.Count > 0 && !flag2) 
	{
		foreach (Element item in list2)
		{

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

cs
	{
		return true;
	}
	if (!IsRanged && attackStyle == AttackStyle.Shield) 
	if (!IsRanged && !flag2 && 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))

Card

@@ -2551,6 +2551,15 @@ public bool IsChildOf(Card c)

cs
		return GetRootCard() == c;
	}

	public T FindTool<T>() where T : Trait
	{ 
		if (IsPC) 
		{ 
			return Tool?.trait as T; 
		} 
		return things.Find<T>()?.trait as T; 
	} 

	[OnSerializing]
	private void _OnSerializing(StreamingContext context)
	{

@@ -3601,16 +3610,18 @@ public void SetTier(int a, bool setTraits = true)

cs
	tier = a;
	if (setTraits)
	{
		elements.SetBase(2, a * 30); 
		foreach (Element value in elements.dict.Values) 
		if (a > 0) 
		{
			if (value.IsFoodTrait) 
			foreach (Element value in elements.dict.Values) 
			{
				Debug.Log(value.Name + "/" + value.Value); 
				elements.SetTo(value.id, value.Value * (100 + a * 200) / 100); 
				if (value.IsFoodTrait || value.IsTrait) 
				{ 
					elements.SetTo(value.id, value.Value * (a * 180) / 100); 
				} 
			}
		}
		elements.SetBase(759, a); 
		elements.SetBase(2, a * 30); 
		elements.SetBase(759, (a > 1) ? a : 0); 
	}
	LayerInventory.SetDirty(Thing);
}

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

cs
		{
			Chara.TrySetEnemy(origin.Chara);
		}
		if (origin.Evalue(428) > 0 && !IsPCFactionOrMinion && EClass.rnd(dmg) >= EClass.rnd(MaxHP / 10) + MaxHP / 100 + 1) 
		if ((weapon == null || !weapon.HasElement(486)) && origin.Evalue(428) > 0 && !IsPCFactionOrMinion && EClass.rnd(dmg) >= EClass.rnd(MaxHP / 10) + MaxHP / 100 + 1) 
		{
			origin.Chara.TryNeckHunt(Chara, origin.Evalue(428) * 20, harvest: true);
		}

Chara

@@ -60,6 +60,9 @@ public class Chara : Card, IPathfindWalker

cs
	[JsonProperty(PropertyName = "T7")]
	public List<int> _listAbility;

	[JsonProperty(PropertyName = "T8")] 
	public List<List<string>> _historyFood; 

	[JsonProperty(PropertyName = "1")]
	public PCCData pccData;

@@ -6901,8 +6904,33 @@ public void TryTakeSharedItems(IEnumerable<Thing> containers, bool msg = true, b

cs
		}
	}

	public Thing FindBestFoodToEat() 
	{ 
		Thing result = null; 
		int num = -1; 
		if (IsPC) 
		{ 
			return null; 
		} 
		foreach (Thing item in things.List((Thing t) => CanEat(t, shouldEat: true) && !t.c_isImportant, onlyAccessible: true)) 
		{ 
			int num2 = CountNumEaten(item); 
			int num3 = 100 - num2; 
			if (num3 > num) 
			{ 
				result = item; 
				num = num3; 
			} 
		} 
		return result; 
	} 

	public void InstantEat(Thing t = null, bool sound = true)
	{
		if (t == null) 
		{ 
			t = FindBestFoodToEat(); 
		} 
		if (t == null)
		{
			t = things.Find((Thing a) => CanEat(a, shouldEat: true) && !a.c_isImportant);

@@ -9224,6 +9252,58 @@ public bool TryNullifyCurse()

cs
		return false;
	}

	public void OnAdvanceDay() 
	{ 
		if (_historyFood != null) 
		{ 
			while (_historyFood.Count > 7) 
			{ 
				_historyFood.RemoveAt(_historyFood.Count - 1); 
			} 
			if (_historyFood[0].Count > 0) 
			{ 
				_historyFood.Insert(0, new List<string>()); 
			} 
		} 
	} 

	public void AddFoodHistory(Thing food) 
	{ 
		if (!IsPCFaction || !IsGlobal) 
		{ 
			_historyFood = null; 
			return; 
		} 
		if (_historyFood == null) 
		{ 
			_historyFood = new List<List<string>> 
			{ 
				new List<string>() 
			}; 
		} 
		_historyFood[0].Add(food.id); 
	} 

	public int CountNumEaten(Thing food) 
	{ 
		if (_historyFood == null) 
		{ 
			return -1; 
		} 
		int num = 0; 
		foreach (List<string> item in _historyFood) 
		{ 
			foreach (string item2 in item) 
			{ 
				if (item2 == food.id) 
				{ 
					num++; 
				} 
			} 
		} 
		return num; 
	} 

	public int GetPietyValue()
	{
		if (base._IsPC)

CoreDebug

@@ -990,11 +990,9 @@ public void UpdateInput()

cs
	}
	if (Input.GetKeyDown(KeyCode.F4))
	{
		for (int j = 0; j < 10; j++) 
		foreach (Chara member in EClass.pc.party.members) 
		{
			Thing thing2 = ThingGen.CreateFromCategory("fish", 999); 
			thing2.SetTier(EScriptable.rnd(4)); 
			EClass.pc.Pick(thing2); 
			member.InstantEat(); 
		}
		EClass.pc.PlayEffect("phoenix");
		return;

@@ -1062,7 +1060,7 @@ public void UpdateInput()

cs
		if (Input.GetKey(KeyCode.F9))
		{
			EClass.scene.paused = false;
			for (int k = 0; k < advanceMin; k++) 
			for (int j = 0; j < advanceMin; j++) 
			{
				EClass.game.updater.FixedUpdate();
			}

@@ -1202,8 +1200,8 @@ public void UpdateInput()

cs
	{
		for (int num4 = hitPoint.detail.things.Count - 1; num4 >= 0; num4--)
		{
			Thing thing3 = hitPoint.detail.things[num4]; 
			Debug.Log(thing3.id + "/" + thing3.Pref.height + "/" + thing3.trait?.ToString() + "/" + thing3.source.tileType.CanStack + "/" + thing3.source.tileType?.ToString() + "/" + thing3.isSynced + "/" + RenderObject.syncList.Contains(thing3.renderer)); 
			Thing thing2 = hitPoint.detail.things[num4]; 
			Debug.Log(thing2.id + "/" + thing2.Pref.height + "/" + thing2.trait?.ToString() + "/" + thing2.source.tileType.CanStack + "/" + thing2.source.tileType?.ToString() + "/" + thing2.isSynced + "/" + RenderObject.syncList.Contains(thing2.renderer)); 
		}
	}
	if (!Application.isEditor)

@@ -1279,40 +1277,40 @@ public void UpdateInput()

cs
	case DebugHotkey.Item:
		if (Input.GetKeyDown(KeyCode.Alpha1))
		{
			Thing thing4 = ThingGen.Create("stairsDown_cave"); 
			Thing thing3 = ThingGen.Create("stairsDown_cave"); 
			EClass._zone.AddCard(thing3, EClass.pc.pos); 
			thing3.SetPlaceState(PlaceState.installed); 
		} 
		if (Input.GetKeyDown(KeyCode.Alpha2)) 
		{ 
			Thing thing4 = ThingGen.Create("stairs"); 
			EClass._zone.AddCard(thing4, EClass.pc.pos);
			thing4.SetPlaceState(PlaceState.installed);
		}
		if (Input.GetKeyDown(KeyCode.Alpha2)) 
		if (Input.GetKeyDown(KeyCode.Alpha3)) 
		{
			Thing thing5 = ThingGen.Create("stairs"); 
			EClass._zone.AddCard(thing5, EClass.pc.pos); 
			Thing thing5 = ThingGen.Create("sign"); 
			EClass._zone.AddCard(thing5, hitPoint); 
			thing5.SetPlaceState(PlaceState.installed);
		}
		if (Input.GetKeyDown(KeyCode.Alpha3)) 
		if (Input.GetKeyDown(KeyCode.Alpha4)) 
		{
			Thing thing6 = ThingGen.Create("sign"); 
			Thing thing6 = ThingGen.Create("sign2"); 
			EClass._zone.AddCard(thing6, hitPoint);
			thing6.SetPlaceState(PlaceState.installed);
		}
		if (Input.GetKeyDown(KeyCode.Alpha4)) 
		if (Input.GetKeyDown(KeyCode.Alpha5)) 
		{
			Thing thing7 = ThingGen.Create("sign2"); 
			Thing thing7 = ThingGen.Create("well"); 
			EClass._zone.AddCard(thing7, hitPoint);
			thing7.SetPlaceState(PlaceState.installed);
		}
		if (Input.GetKeyDown(KeyCode.Alpha5)) 
		if (Input.GetKeyDown(KeyCode.Alpha6)) 
		{
			Thing thing8 = ThingGen.Create("well"); 
			Thing thing8 = ThingGen.Create("altar"); 
			EClass._zone.AddCard(thing8, hitPoint);
			thing8.SetPlaceState(PlaceState.installed);
		}
		if (Input.GetKeyDown(KeyCode.Alpha6)) 
		{ 
			Thing thing9 = ThingGen.Create("altar"); 
			EClass._zone.AddCard(thing9, hitPoint); 
			thing9.SetPlaceState(PlaceState.installed); 
		} 
		if (Input.GetKeyDown(KeyCode.Alpha7))
		{
			Thing t = ThingGen.Create("torch");

CraftUtil

@@ -75,6 +75,17 @@ public static void MakeDish(Thing food, int lv, Chara crafter = null)

cs
			list.Add(thing);
		}
		MakeDish(food, list, num, crafter);
		if (crafter != null && crafter.id != "rodwyn") 
		{ 
			if (food.HasElement(709)) 
			{ 
				food.elements.Remove(709); 
			} 
			if (food.HasElement(708) && !crafter.HasElement(1205)) 
			{ 
				food.elements.Remove(708); 
			} 
		} 
	}

	public static void MakeDish(Card food, List<Thing> ings, int qualityBonus, Chara crafter = null)

ENC

@@ -132,6 +132,8 @@ public class ENC

cs

	public const int mod_reload = 601;

	public const int safetyMeasure = 486; 

	public const int nonLethal = 485;

	public const int slot_rune = 484;

@@ -142,37 +144,37 @@ public class ENC

cs

	public const int revealFaith = 481;

	public const int strongStomach = 480; 
	public const int bane_all = 468; 

	public const int bane_fish = 467;

	public const int bane_god = 466;

	public const int bane_all = 468; 
	public const int strongStomach = 480; 

	public const int bane_man = 464; 
	public const int bane_machine = 465; 

	public const int bane_animal = 463; 
	public const int sustain_PER = 443; 

	public const int bane_fairy = 462; 
	public const int sustain_LER = 444; 

	public const int bane_undead = 461; 
	public const int sustain_WIL = 445; 

	public const int sustain_MAG = 446; 

	public const int bane_dragon = 460;

	public const int sustain_CHA = 447;

	public const int bane_machine = 465; 

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

	public const int sustain_WIL = 445; 
	public const int bane_animal = 463; 

	public const int sustain_LER = 444; 
	public const int bane_man = 464; 

	public const int sustain_PER = 443; 
	public const int bane_undead = 461; 

	public static readonly int[] IDS = new int[86] 
	public static readonly int[] IDS = new int[87] 
	{
		653, 652, 651, 650, 641, 624, 621, 622, 623, 654,
		640, 655, 851, 660, 661, 662, 663, 664, 665, 666,

@@ -180,8 +182,8 @@ public class ENC

cs
		428, 427, 426, 425, 424, 423, 422, 421, 420, 417,
		416, 441, 415, 412, 411, 410, 608, 408, 407, 406,
		405, 404, 403, 402, 401, 400, 414, 442, 409, 600,
		606, 605, 604, 603, 602, 601, 485, 484, 483, 482, 
		481, 480, 467, 466, 468, 464, 463, 462, 461, 460, 
		447, 465, 446, 445, 444, 443
		606, 605, 604, 603, 602, 601, 486, 485, 484, 483, 
		482, 481, 468, 467, 466, 480, 465, 443, 444, 445, 
		446, 460, 447, 462, 463, 464, 461
	};
}

FACTION

@@ -4,26 +4,26 @@

cs

public class FACTION
{
	public const int bfSea = 3605; 

	public const int bfPlain = 3600; 

	public const int bfForest = 3601; 

	public const int bfSnow = 3602; 

	public const int bfHill = 3603; 
	public const int bfFertile = 3700; 

	public const int bfGeyser = 3701;

	public const int bfBeach = 3604;

	public const int bfFertile = 3700; 
	public const int bfSea = 3605; 

	public const int bfCave = 3500;

	public const int bfRuin = 3702;

	public const int bfHill = 3603; 

	public const int bfSnow = 3602; 

	public const int bfForest = 3601; 

	public const int bfPlain = 3600; 

	public const int fRation = 2207;

	public const int actBuildRecipe = 4005;

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

cs

	public const int bfTranquil = 3703;

	public const int fTaxEvasion = 2119; 
	public const int fHeirloom = 2120; 

	public const int fLuck = 2118;

@@ -106,16 +106,16 @@ public class FACTION

cs

	public const int fConstruction = 2003;

	public const int fHeirloom = 2120; 
	public const int fTaxEvasion = 2119; 

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

FEAT

@@ -5,6 +5,8 @@ public class FEAT

cs
{
	public const int featSnail = 1211;

	public const int featAnimalLover = 1640; 

	public const int featFaith = 1636;

	public const int featMartial = 1635;

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

cs

	public const int featMilitant = 1419;

	public const int featSwordsage = 1418; 

	public const int featAnimalLover = 1640; 
	public const int featResCurse = 1641; 

	public const int featWitch = 1417; 
	public const int featSwordsage = 1418; 

	public const int featResCurse = 1641; 
	public const int featSleeper = 1642; 

	public const int featSorter = 1643; 
	public const int featBodyParts = 1644; 

	public const int featUndead = 1210;

@@ -85,6 +85,8 @@ public class FEAT

cs

	public const int featFluffyTail = 1209;

	public const int featFisher = 1659; 

	public const int featManaCost = 1657;

	public const int featScavenger = 1656;

@@ -111,15 +113,13 @@ public class FEAT

cs

	public const int featParty = 1645;

	public const int featBodyParts = 1644; 

	public const int featSleeper = 1642; 
	public const int featSorter = 1643; 

	public const int featInquisitor = 1416; 
	public const int featWitch = 1417; 

	public const int featChef = 1658;

	public const int featWhiteVixen = 1414; 
	public const int featFoxMaid = 1415; 

	public const int featLightEater = 1235;

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

cs

	public const int featGod_element1 = 1300;

	public const int featGod_wind1 = 1310; 
	public const int featGod_earth1 = 1305; 

	public const int featGod_machine1 = 1315;

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

cs

	public const int featNirvana = 1231;

	public const int featFoxMaid = 1415; 
	public const int featInquisitor = 1416; 

	public const int featElea = 1213;

@@ -191,10 +191,10 @@ public class FEAT

cs

	public const int featSpike = 1221;

	public const int featFairyResist = 1212; 

	public const int featAcidBody = 1223;

	public const int featFairyResist = 1212; 

	public const int featShiva = 1224;

	public const int featLoyal = 1225;

@@ -213,14 +213,12 @@ public class FEAT

cs

	public const int featPianist = 1405;

	public const int featGod_earth1 = 1305; 
	public const int featGod_wind1 = 1310; 

	public const int featPaladin = 1407;

	public const int featTourist = 1406;

	public const int featBoost = 1409; 

	public const int featReboot = 1410;

	public const int featEarthStrength = 1411;

@@ -229,22 +227,26 @@ public class FEAT

cs

	public const int featFairysan = 1413;

	public const int featBoost = 1409; 

	public const int featPaladin2 = 1408;

	public static readonly int[] IDS = new int[114] 
	public const int featWhiteVixen = 1414; 

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

FOOD

@@ -2,31 +2,31 @@ public class FOOD

cs
{
	public const int food_CHA = 700;

	public const int food_undead = 709; 
	public const int justcooked = 757; 

	public const int food_god = 758;

	public const int justcooked = 757; 

	public const int food_cat = 701;

	public const int food_human = 708; 
	public const int food_undead = 709; 

	public const int food_love = 703;

	public const int food_bug = 704; 
	public const int food_poison = 702; 

	public const int gainWeight = 705; 
	public const int kirimi = 707; 

	public const int loseWeight = 706;

	public const int kirimi = 707; 
	public const int food_human = 708; 

	public const int food_poison = 702; 
	public const int food_bug = 704; 

	public const int gainWeight = 705; 

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

FoodEffect

@@ -55,6 +55,24 @@ public static void Proc(Chara c, Thing food)

cs
	bool flag3 = food.HasElement(709);
	bool flag4 = c.HasElement(1205);
	bool flag5 = food.IsDecayed || flag3;
	c.AddFoodHistory(food); 
	if (c.IsPCFaction && !c.IsPC) 
	{ 
		int num6 = c.CountNumEaten(food); 
		bool flag6 = c.GetFavFood().id == food.id; 
		Debug.Log(c.Name + "/" + food.id + "/" + num6); 
		if (num6 < 2 || flag6) 
		{ 
			if (num6 == 1 || flag6 || EClass.rnd(4) == 0) 
			{ 
				c.Talk("foodNice"); 
			} 
		} 
		else if (num6 > 3 && EClass.rnd(num6) >= 3) 
		{ 
			c.Talk("foodBored"); 
		} 
	} 
	if (food.IsBlessed)
	{
		num2 *= 1.5f;

@@ -136,10 +154,10 @@ public static void Proc(Chara c, Thing food)

cs
			break;
		}
	}
	float num6 = Mathf.Min(c.hunger.value, num3); 
	float num7 = Mathf.Min(c.hunger.value, num3); 
	if (c.hunger.GetPhase() >= 3)
	{
		num6 *= 1.1f; 
		num7 *= 1.1f; 
	}
	if (flag5 && !c.HasElement(480))
	{

@@ -154,7 +172,7 @@ public static void Proc(Chara c, Thing food)

cs
	}
	else
	{
		num2 = num2 * num6 / 10f; 
		num2 = num2 * num7 / 10f; 
		if (c.HasCondition<ConAnorexia>())
		{
			num2 = 0.01f;

@@ -168,14 +186,14 @@ public static void Proc(Chara c, Thing food)

cs
			}
			string[] foodEffect = value.source.foodEffect;
			int id = value.id;
			float num7 = num2 * (float)value.Value; 
			float num8 = num2 * (float)value.Value; 
			if (value.source.category == "food" && c.IsPC)
			{
				bool flag6 = num7 >= 0f; 
				string text = value.source.GetText(flag6 ? "textInc" : "textDec", returnNull: true); 
				bool flag7 = num8 >= 0f; 
				string text = value.source.GetText(flag7 ? "textInc" : "textDec", returnNull: true); 
				if (text != null)
				{
					Msg.SetColor(flag6 ? "positive" : "negative"); 
					Msg.SetColor(flag7 ? "positive" : "negative"); 
					c.Say(text);
				}
			}

@@ -203,7 +221,7 @@ public static void Proc(Chara c, Thing food)

cs
			case "exp":
			{
				id = ((foodEffect.Length > 1) ? EClass.sources.elements.alias[foodEffect[1]].id : value.id);
				int a = (int)(num7 * (float)((foodEffect.Length > 2) ? foodEffect[2].ToInt() : 4)) * 2 / 3; 
				int a = (int)(num8 * (float)((foodEffect.Length > 2) ? foodEffect[2].ToInt() : 4)) * 2 / 3; 
				c.ModExp(id, a);
				break;
			}

@@ -211,9 +229,9 @@ public static void Proc(Chara c, Thing food)

cs
			{
				id = ((foodEffect.Length > 1) ? EClass.sources.elements.alias[foodEffect[1]].id : value.id);
				int vTempPotential = c.elements.GetElement(id).vTempPotential;
				int num8 = EClass.rndHalf((int)(num7 / 5f) + 1); 
				num8 = num8 * 100 / Mathf.Max(100, vTempPotential * 2 / 3); 
				c.elements.ModTempPotential(id, num8, 8); 
				int num9 = EClass.rndHalf((int)(num8 / 5f) + 1); 
				num9 = num9 * 100 / Mathf.Max(100, vTempPotential * 2 / 3); 
				c.elements.ModTempPotential(id, num9, 8); 
				break;
			}
			case "karma":

GameDate

@@ -131,14 +131,14 @@ public void AdvanceHour()

cs
			{
				Tutorial.Reserve("season2");
			}
			if (base.year >= 2500) 
			{ 
				Tutorial.Reserve("worldend"); 
			} 
			else
			{
				Tutorial.Remove("season2");
			}
			if (base.year >= 2500) 
			{ 
				Tutorial.Reserve("worldend"); 
			} 
		}
	}

@@ -181,6 +181,10 @@ public void AdvanceDay()

cs
			item.MoveZone(item.homeZone);
		}
	}
	foreach (Chara value in EClass.game.cards.globalCharas.Values) 
	{ 
		value.OnAdvanceDay(); 
	} 
	if (EClass.pc.homeZone != null && EClass.pc.homeZone.mainFaction == EClass.pc.faction)
	{
		WidgetSticky.Add(new StickyHomeReport());

MUTATION

@@ -1,10 +1,10 @@

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

	public const int mutationSkin = 1510;

	public const int mutationEye = 1512; 
	public const int mutationSkinN = 1511; 

	public const int mutationSpeedN = 1519; 

	public const int mutationEyeN = 1513;

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

cs

	public const int mutationStr = 1520;

	public const int mutationSkinN = 1511; 
	public const int mutationEye = 1512; 

	public const int mutationCha = 1522;

@@ -48,40 +48,40 @@ public class MUTATION

cs

	public const int etherWing = 1554;

	public const int etherEye = 1553; 

	public const int etherArmor = 1562;

	public const int mutationBrain = 1524; 

	public const int etherFeet = 1552;

	public const int mutationChaN = 1523; 
	public const int etherUgly = 1551; 

	public const int mutationBrainN = 1525; 
	public const int etherGravity = 1550; 

	public const int mutationCold = 1526; 
	public const int mutationBodyN = 1531; 

	public const int mutationColdN = 1527; 
	public const int mutationBody = 1530; 

	public const int mutationLightning = 1528; 
	public const int mutationLightningN = 1529; 

	public const int mutationBrain = 1524; 
	public const int mutationLightning = 1528; 

	public const int mutationBody = 1530; 
	public const int mutationColdN = 1527; 

	public const int mutationBodyN = 1531; 
	public const int mutationCold = 1526; 

	public const int etherGravity = 1550; 
	public const int mutationBrainN = 1525; 

	public const int etherUgly = 1551; 
	public const int mutationChaN = 1523; 

	public const int mutationLightningN = 1529; 
	public const int etherEye = 1553; 

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

POLICY

@@ -3,25 +3,27 @@

cs

public class POLICY
{
	public const int store_premium = 2817; 
	public const int store_ripoff = 2816; 

	public const int open_business = 2810; 
	public const int platinum_ticket = 2815; 

	public const int tourist_safety = 2811; 
	public const int mass_exhibition = 2814; 

	public const int home_discount = 2800; 

	public const int bed_quality = 2812;

	public const int suite_room = 2813; 
	public const int tourist_safety = 2811; 

	public const int mass_exhibition = 2814; 
	public const int open_business = 2810; 

	public const int platinum_ticket = 2815; 
	public const int store_premium = 2817; 

	public const int store_ripoff = 2816; 
	public const int suite_room = 2813; 

	public const int license_food = 2818;

	public const int legendary_exhibition = 2823; 
	public const int license_stolen = 2824; 

	public const int license_general = 2820;

@@ -29,9 +31,7 @@ public class POLICY

cs

	public const int celeb = 2822;

	public const int home_discount = 2800; 

	public const int license_stolen = 2824; 
	public const int legendary_exhibition = 2823; 

	public const int milk_fan = 2825;

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

cs

	public const int livestock_priv = 2715;

	public const int resident_wanted = 2513; 
	public const int resident_tax = 2512; 

	public const int incomeTransfer = 2711;

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

cs

	public const int self_sufficient = 2511;

	public const int resident_tax = 2512; 
	public const int resident_wanted = 2513; 

	public const int nocturnal_life = 2508;

@@ -107,10 +107,10 @@ public class POLICY

cs

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

Player

@@ -780,6 +780,9 @@ public void OnLeaveZone()

cs
	[JsonProperty]
	public int questRerollCost;

	[JsonProperty] 
	public int fished; 

	[JsonProperty]
	public float angle;

@@ -2187,6 +2190,7 @@ public void OnAdvanceDay()

cs
	}
	EClass.pc.RefreshFaithElement();
	prayed = false;
	fished = 0; 
	if (karma < 0 && EClass.rnd(4) == 0)
	{
		ModKarma(1);

RecipeCard

@@ -295,6 +295,10 @@ public override Thing Craft(BlessedState blessed, bool sound = false, List<Thing

cs
		Msg.Say("noMoreSlice");
		num5 = 1;
	}
	if (num5 > 1 && (thing.HasElement(703) || thing.HasElement(704) || thing.HasElement(1229))) 
	{ 
		num5 = 1; 
	} 
	if (num5 > 1)
	{
		thing.SetNum(num5);

SKILL

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

cs

	public const int mining = 220;

	public const int fishing = 245; 
	public const int marksman = 133; 

	public const int climbing = 242;

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

cs

	public const int strategy = 135;

	public const int eyeofmind = 134; 
	public const int fishing = 245; 

	public const int tactics = 132;

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

cs

	public const int gathering = 250;

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

	public const int blacksmith = 256;

@@ -269,12 +269,12 @@ public class SKILL

cs
public static readonly int[] IDS = new int[133]
{
	111, 123, 122, 120, 55, 109, 50, 51, 130, 110,
	131, 220, 245, 242, 241, 240, 237, 235, 230, 227, 
	226, 225, 210, 207, 200, 152, 151, 150, 135, 134, 
	131, 220, 133, 242, 241, 240, 237, 235, 230, 227, 
	226, 225, 210, 207, 200, 152, 151, 150, 135, 245, 
	132, 56, 103, 108, 60, 61, 62, 64, 65, 66,
	67, 68, 70, 71, 72, 73, 74, 75, 57, 76,
	78, 79, 80, 90, 91, 92, 93, 100, 101, 102,
	104, 105, 106, 107, 77, 250, 133, 256, 916, 917, 
	104, 105, 106, 107, 77, 250, 134, 256, 916, 917, 
	918, 920, 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,

TraitBaseSpellbook

@@ -84,7 +84,7 @@ public override bool TryProgress(AIProgress p)

cs
		return false;
	}
	int diff = Mathf.Max(1, Difficulty * ((owner.blessedState >= BlessedState.Blessed) ? 75 : ((owner.blessedState <= BlessedState.Cursed) ? 300 : 100)) / 100);
	int check = Mathf.Max(1, c.Evalue(eleParent) * (100 + c.Evalue(285) * 10) / 100); 
	int check = Mathf.Max(1, (int)((long)c.Evalue(eleParent) * (long)(100 + c.Evalue(285) * 10) / 100)); 
	if (ReadCheck() || EClass.debug.godMode || owner.HasEditorTag(EditorTag.NoReadFail))
	{
		return true;

+TraitToolFishing

File Created
cs
public class TraitToolFishing : TraitTool
{
}

UISong

@@ -46,7 +46,11 @@ private void Update()

cs
	}
	AudioSource audioSource = source.source;
	ratio = Mathf.Clamp((audioSource.time - part.start) / (part.duration + bgm.song.fadeIn), 0f, 1f);
	if (EMono.game == null || !EMono.core.IsGameStarted || source == null || !source.isPlaying || ratio >= 0.99f || (ratio <= 0f && !(EMono.pc.ai is AI_PlayMusic))) 
	if ((EMono.pc.ai is GoalManualMove || EMono.pc.IsMoving) && ratio < 0.1f) 
	{ 
		Kill(); 
	} 
	else if (EMono.game == null || !EMono.core.IsGameStarted || source == null || !source.isPlaying || ratio >= 0.99f || (ratio <= 0f && !(EMono.pc.ai is AI_PlayMusic))) 
	{
		timer += Core.delta;
		if (timer > 0.3f)