Skip to content

EA 23.50 Nightly

December 6, 2024

30 files modified. 3 new files created.

Important Changes

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

CharaGenes (1)

cs
public int GetGeneSlot() 
public int GetGeneSlot(Chara c) 

AI_Idle

@@ -49,10 +49,10 @@ public override IEnumerable<Status> Run()

cs
		}
		if (EClass.rnd(owner.IsPCParty ? 10 : 100) == 0 && owner.hunger.GetPhase() >= 3)
		{
			Thing thing = owner.things.Find((Thing a) => owner.CanEat(a, owner.IsPCFaction), recursive: false); 
			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), recursive: false); 
				thing = owner.things.Find((Thing a) => owner.CanEat(a) && !a.c_isImportant, recursive: false); 
			}
			if (thing == null && owner.IsPCFaction && EClass._zone.IsPCFaction)
			{

ActPlan

@@ -677,13 +677,13 @@ public void _Update(PointTarget target)

cs
					Thing t = _c.Thing;
					if (input == ActInput.AllAction)
					{
						if (EClass.debug.enable) 
						if (EClass.debug.enable || EClass.player.HasKeyItem("license_illumination")) 
						{
							if (t.LightData != null)
							{
								if (t.c_lightColor != 0)
								{
									TrySetAct("(debug) Clear Light", delegate
									TrySetAct("actClearLight", delegate 
									{
										t.c_lightColor = 0;
										t.RecalculateFOV();

@@ -691,7 +691,7 @@ public void _Update(PointTarget target)

cs
										return false;
									}, t);
								}
								TrySetAct("(debug) Set Light", delegate
								TrySetAct("actSetLight", delegate 
								{
									Color lightColor = t.LightColor;
									EClass.ui.AddLayer<LayerColorPicker>().SetColor(lightColor, lightColor, delegate(PickerState state, Color _c)

ActionMode

@@ -831,6 +831,10 @@ public void UpdateInput()

cs
					source = EClass.sources.materials.rows;
				}
				SourceMaterial.Row row = (flag2 ? source.NextItem(currentMat) : source.PrevItem(currentMat));
				if (row == null) 
				{ 
					row = card2.DyeMat; 
				} 
				if (EInput.isAltDown)
				{
					row = lastEditorMat;

Card

@@ -54,6 +54,8 @@ public enum MoveType

cs

	public CardRenderer renderer;

	public CardRow hat; 

	public int turn;

	public int _colorInt;

@@ -2678,6 +2680,7 @@ public void AddExp(int a)

cs
			a = a * Mathf.Clamp(100 + Chara.affinity.value / 10, 50, 100) / 100;
		}
	}
	a = a * (100 + Evalue(1237) * 30) / 100; 
	exp += a;
	while (exp >= ExpToNext)
	{

@@ -3779,6 +3782,7 @@ public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource

cs
		renderer.PlayAnime(AnimeID.HitObj);
		hp = MaxHP;
	}
	Chara target; 
	if (hp < 0)
	{
		if ((attackSource == AttackSource.Melee || attackSource == AttackSource.Range) && origin != null && (origin.isSynced || IsPC))

@@ -3821,38 +3825,40 @@ public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource

cs
				Chara.AddCondition<ConInvulnerable>();
				return;
			}
			foreach (Chara chara4 in EClass._map.charas) 
			foreach (Chara chara3 in EClass._map.charas) 
			{
				if (Chara.IsFriendOrAbove(chara4) && chara4.HasElement(1408) && chara4.faith == EClass.game.religions.Healing && EClass.world.date.GetRawDay() != chara4.GetInt(58) && (!chara4.IsPCFaction || IsPCFaction)) 
				if (Chara.IsFriendOrAbove(chara3) && chara3.HasElement(1408) && chara3.faith == EClass.game.religions.Healing && EClass.world.date.GetRawDay() != chara3.GetInt(58) && (!chara3.IsPCFaction || IsPCFaction)) 
				{
					Msg.alwaysVisible = true;
					Msg.Say("layhand", chara4, this); 
					Msg.Say("layhand", chara3, this); 
					Msg.Say("pray_heal", this);
					hp = MaxHP;
					Chara.AddCondition<ConInvulnerable>();
					PlayEffect("revive");
					PlaySound("revive");
					chara4.SetInt(58, EClass.world.date.GetRawDay()); 
					chara3.SetInt(58, EClass.world.date.GetRawDay()); 
					return;
				}
			}
		}
		if (zoneInstanceBout != null)
		{
			Chara chara3 = EClass._map.FindChara(zoneInstanceBout.uidTarget); 
			if (chara3 != null) 
			target = EClass._map.FindChara(zoneInstanceBout.uidTarget); 
			if (target != null) 
			{
				if (IsPC)
				{
					EClass.pc.hp = 0;
					chara3.ShowDialog("_chara", "bout_lose"); 
					Heal(); 
					target.ShowDialog("_chara", "bout_lose"); 
					return;
				}
				if (chara3 == this) 
				if (target == this) 
				{
					hp = 0;
					chara3.ModAffinity(EClass.pc, 10); 
					chara3.ShowDialog("_chara", "bout_win"); 
					Heal(); 
					target.ModAffinity(EClass.pc, 10); 
					target.ShowDialog("_chara", "bout_win"); 
					return;
				}
			}

@@ -4204,6 +4210,14 @@ void EvadeDeath()

cs
				Chara.mana.value = 0;
			}
		}
		void Heal() 
		{ 
			target.Cure(CureType.Death); 
			foreach (Chara member in EClass.pc.party.members) 
			{ 
				member.Cure(CureType.Death); 
			} 
		} 
	}

	public virtual void Die(Element e = null, Card origin = null, AttackSource attackSource = AttackSource.None)

Chara

@@ -872,7 +872,7 @@ public int CurrentGeneSlot

cs
	{
		if (base.c_genes != null)
		{
			return base.c_genes.GetGeneSlot(); 
			return base.c_genes.GetGeneSlot(this); 
		}
		return 0;
	}

@@ -1605,11 +1605,16 @@ public void RefreshSpeed(Element.BonusInfo info = null)

cs
	{
		_Speed -= 25;
	}
	int num = 100; 
	if (parasite != null)
	{
		_Speed = _Speed * 100 / Mathf.Clamp(120 + parasite.LV * 2 - base.STR - Evalue(227) * 2, 100, 1000);
	}
	if (_Speed < elements.ValueWithoutLink(79) / 3) 
	{ 
		_Speed = elements.ValueWithoutLink(79) / 3; 
		info?.AddText("minSpeed".lang((elements.ValueWithoutLink(79) / 3).ToString() ?? "")); 
	} 
	int num = 100; 
	if (IsPCFaction)
	{
		switch (burden.GetPhase())

@@ -1679,6 +1684,7 @@ public void RefreshSpeed(Element.BonusInfo info = null)

cs
	else if (base.LV >= 1000)
	{
		num += EClass.curve((base.LV - 900) / 100 * 10, 500, 100);
		info?.AddFix(EClass.curve((base.LV - 900) / 100 * 10, 500, 100), "enemySpeedBuff".lang()); 
	}
	if (HasCondition<ConGravity>())
	{

@@ -1689,6 +1695,7 @@ public void RefreshSpeed(Element.BonusInfo info = null)

cs
	if (_Speed < 10)
	{
		_Speed = 10;
		info?.AddText("minSpeed".lang(10.ToString() ?? "")); 
	}
	dirtySpeed = false;
}

@@ -6409,7 +6416,7 @@ public void TryTakeSharedItems(IEnumerable<Thing> containers, bool msg = true, b

cs
					_ListItems.Add(thing4);
					num3 -= thing4.Num;
				}
				else if (num4 > 0 && thing4.trait is TraitBlanketColdproof) 
				else if (num4 > 0 && !HasElement(1236) && thing4.trait is TraitBlanketColdproof) 
				{
					_ListItems.Add(thing4);
					num4 -= thing4.Num;

@@ -6419,7 +6426,7 @@ public void TryTakeSharedItems(IEnumerable<Thing> containers, bool msg = true, b

cs
					_ListItems.Add(thing4);
					num5 -= thing4.Num;
				}
				else if (num > 0 && CanEat(thing4, shouldEat)) 
				else if (num > 0 && CanEat(thing4, shouldEat) && !thing4.c_isImportant) 
				{
					_ListItems.Add(thing4);
					num -= thing4.Num;

@@ -6495,11 +6502,11 @@ public void InstantEat(Thing t = null, bool sound = true)

cs
{
	if (t == null)
	{
		t = things.Find((Thing a) => CanEat(a, shouldEat: true)); 
		t = things.Find((Thing a) => CanEat(a, shouldEat: true) && !a.c_isImportant); 
	}
	if (t == null)
	{
		t = things.Find((Thing a) => CanEat(a)); 
		t = things.Find((Thing a) => CanEat(a) && !a.c_isImportant); 
	}
	if (t != null)
	{

@@ -6519,7 +6526,7 @@ public bool CanEat(Thing t, bool shouldEat = false)

cs
	{
		return false;
	}
	if (shouldEat && !(t.trait is TraitFoodPrepared)) 
	if (shouldEat && (!(t.trait is TraitFoodPrepared) || t.c_isImportant)) 
	{
		return false;
	}

@@ -8329,7 +8336,7 @@ public void Cure(CureType type, int p = 100, BlessedState state = BlessedState.N

cs
		}
		CureCondition<ConWait>();
		CureCondition<ConSleep>();
		if (type == CureType.Death) 
		if (type == CureType.Death && hunger.value > 30) 
		{
			hunger.value = 30;
		}

CharaBody

@@ -41,6 +41,7 @@ public void SetOwner(Chara chara, bool deserialized = false)

cs
			}
			slots[num].thing = thing;
			thing.elements.SetParent(owner);
			thing.trait.OnEquip(owner, onSetOwner: true); 
		}
	}
}

@@ -76,6 +77,7 @@ public void Unequip(BodySlot slot, bool refresh = true)

cs
		EClass.pc.faction.charaElements.OnUnequip(owner, thing);
	}
	thing.elements.SetParent();
	thing.trait.OnUnequip(owner); 
	thing.c_equippedSlot = 0;
	slot.thing = null;
	if (owner.IsPC)

@@ -207,6 +209,7 @@ public bool Equip(Thing thing, BodySlot slot = null, bool msg = true)

cs
	slot.thing = thing;
	thing.c_equippedSlot = slot.index + 1;
	thing.elements.SetParent(owner);
	thing.trait.OnEquip(owner, onSetOwner: false); 
	if (EClass.pc != null)
	{
		EClass.pc.faction.charaElements.OnEquip(owner, thing);

CharaGenes

@@ -27,12 +27,17 @@ public int GetTotalCost()

cs
		return num;
	}

	public int GetGeneSlot() 
	public int GetGeneSlot(Chara c) 
	{
		int num = 0;
		foreach (DNA item in items)
		{
			num += item.slot; 
			int num2 = item.slot; 
			if (num2 > 1 && c.HasElement(1237)) 
			{ 
				num2--; 
			} 
			num += num2; 
		}
		return num;
	}

CharaRenderer

@@ -84,7 +84,7 @@ public override void OnEnterScreen()

cs
public override void Draw(RenderParam p, ref Vector3 v, bool drawShadow)
{
	base.Draw(p, ref v, drawShadow);
	if (Zone.sourceHat != null && owner.Pref.hatY != 0f && owner.host == null) 
	if ((Zone.sourceHat != null || owner.hat != null) && owner.Pref.hatY != 0f && owner.host == null) 
	{
		DrawHat();
	}

@@ -298,8 +298,8 @@ public void DrawHat()

cs
{
	if (pccData == null || !owner.IsDeadOrSleeping)
	{
		CardRow sourceHat = Zone.sourceHat; 
		_ = sourceHat.pref; 
		CardRow cardRow = Zone.sourceHat ?? owner.hat; 
		SourcePref pref = cardRow.pref; 
		bool flag = currentDir == 1 || currentDir == 3;
		int liquidLv = RenderObject.currentParam.liquidLv;
		float num = ((replacer != null) ? replacer.pref.hatY : owner.Pref.hatY);

@@ -308,9 +308,11 @@ public void DrawHat()

cs
			num += RenderObject.renderSetting.hatPos[actor.GetFrame()].y;
		}
		RenderObject.currentParam.liquidLv = 0;
		RenderObject.currentParam.y += num; 
		RenderObject.currentParam.tile = sourceHat._tiles[owner.uid % sourceHat._tiles.Length] * ((!flag) ? 1 : (-1)); 
		sourceHat.renderData.Draw(RenderObject.currentParam); 
		RenderObject.currentParam.x += 0.01f * (float)pref.equipX; 
		RenderObject.currentParam.y += num + 0.01f * (float)pref.equipY; 
		RenderObject.currentParam.z -= pref.hatY; 
		RenderObject.currentParam.tile = cardRow._tiles[owner.uid % cardRow._tiles.Length] * ((!flag) ? 1 : (-1)); 
		cardRow.renderData.Draw(RenderObject.currentParam); 
		RenderObject.currentParam.y -= num;
		RenderObject.currentParam.liquidLv = liquidLv;
	}

DNA

@@ -200,7 +200,8 @@ public bool CanRemove()

cs
{
	for (int i = 0; i < vals.Count; i += 2)
	{
		if (vals[i] == 1415) 
		int num = vals[i]; 
		if (num == 1202 || num == 1237 || num == 1415) 
		{
			return false;
		}

@@ -485,7 +486,7 @@ public string GetText()

cs

	public void WriteNote(UINote n)
	{
		if (slot > 1) 
		if (slot >= 1) 
		{
			n.AddText("isGeneReqSlots".lang(slot.ToString() ?? ""), FontColor.Warning);
		}

Dialog

@@ -122,7 +122,7 @@ private void Update()

cs

	public override void OnUpdateInput()
	{
		if ((bool)input && option.canClose && Input.GetKeyDown(KeyCode.Return)) 
		if ((bool)input && option.canClose && (Input.GetKeyDown(KeyCode.Return) || Input.GetKeyDown(KeyCode.KeypadEnter))) 
		{
			isInputEnter = true;
			Close();

DramaCustomSequence

@@ -226,13 +226,16 @@ public void Build(Chara c)

cs
		{
			Choice2("daSellFame", "_sellFame");
		}
		if (c.trait.CanInvestTown && Guild.GetCurrentGuild() == null) 
		if (EClass._zone.AllowInvest) 
		{
			Choice2("daInvest", "_investZone"); 
		} 
		if (c.trait.CanInvest) 
		{ 
			Choice2("daInvest", "_investShop"); 
			if (c.trait.CanInvestTown && Guild.GetCurrentGuild() == null) 
			{ 
				Choice2("daInvest", "_investZone"); 
			} 
			if (c.trait.CanInvest) 
			{ 
				Choice2("daInvest", "_investShop"); 
			} 
		}
		if (c.trait.CanIdentify)
		{

ELEMENT

@@ -86,6 +86,21 @@ public class BonusInfo

cs

		public int total;

		public void CheckFirst() 
		{ 
			if (first) 
			{ 
				first = false; 
				n.Space(8); 
			} 
		} 

		public void AddText(string text) 
		{ 
			CheckFirst(); 
			n.AddText("_bullet".lang() + text, FontColor.Warning); 
		} 

		public void AddText(int v, string text, string textBad = null)
		{
			if (v != 0)

@@ -95,11 +110,7 @@ public void AddText(int v, string text, string textBad = null)

cs
			{
				text2 = textBad;
			}
			if (first) 
			{ 
				first = false; 
				n.Space(8); 
			} 
			CheckFirst(); 
			total += v;
			n.AddText("_bullet".lang() + text2 + " " + ((v > 0) ? "+" : "") + v, (v > 0) ? FontColor.Good : FontColor.Bad);
		}

@@ -109,11 +120,7 @@ public void AddFix(int v, string text)

cs
	{
		if (v != 0)
		{
			if (first) 
			{ 
				first = false; 
				n.Space(8); 
			} 
			CheckFirst(); 
			n.AddText("_bullet".lang() + text + " " + ((v > 0) ? "+" : "") + v + "%", (v > 0) ? FontColor.Good : FontColor.Bad);
		}
	}

ENC

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

cs

	public const int mod_rapid = 602;

	public const int sustain_WIL = 445; 
	public const int sustain_MAG = 446; 

	public const int mod_ammo = 600;

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

cs

	public const int negateSleep = 424;

	public const int mod_reload = 601; 

	public const int negateParalysis = 422;

	public const int negateBlind = 421;

@@ -76,9 +78,9 @@ public class ENC

cs

	public const int invisibility = 415;

	public const int slowCorruption = 412; 
	public const int breathing = 429; 

	public const int encSpell = 411; 
	public const int slowCorruption = 412; 

	public const int throwReturn = 410;

@@ -102,7 +104,7 @@ public class ENC

cs

	public const int negateTeleport = 400;

	public const int breathing = 429; 
	public const int encSpell = 411; 

	public const int sustain_STR = 440;

@@ -130,13 +132,11 @@ public class ENC

cs

	public const int bane_fairy = 462;

	public const int bane_undead = 461; 

	public const int bane_dragon = 460;

	public const int mod_reload = 601; 
	public const int bane_undead = 461; 

	public const int sustain_MAG = 446; 
	public const int sustain_WIL = 445; 

	public const int sustain_LER = 444;

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

cs
	{
		653, 652, 651, 650, 641, 607, 604, 605, 606, 654,
		640, 655, 852, 660, 661, 662, 663, 664, 665, 666,
		865, 603, 850, 851, 656, 602, 445, 600, 428, 427, 
		426, 425, 424, 422, 421, 420, 416, 415, 412, 411, 
		410, 409, 408, 407, 406, 405, 404, 403, 402, 401, 
		400, 429, 440, 423, 468, 483, 482, 481, 480, 467, 
		466, 465, 464, 463, 462, 461, 460, 601, 446, 444, 
		865, 603, 850, 851, 656, 602, 446, 600, 428, 427, 
		426, 425, 424, 601, 422, 421, 420, 416, 415, 429, 
		412, 410, 409, 408, 407, 406, 405, 404, 403, 402, 
		401, 400, 411, 440, 423, 468, 483, 482, 481, 480, 
		467, 466, 465, 464, 463, 462, 460, 461, 445, 444, 
		443, 442, 441, 447
	};
}

FACTION

@@ -4,58 +4,58 @@

cs

public class FACTION
{
	public const int fRation = 2207; 
	public const int bfSnow = 3602; 

	public const int bfCave = 3500;

	public const int bfPlain = 3600;

	public const int bfGeyser = 3701; 

	public const int bfFertile = 3700; 

	public const int bfForest = 3601;

	public const int bfBeach = 3604;

	public const int bfHill = 3603;

	public const int bfSea = 3605; 

	public const int bfFertile = 3700; 

	public const int bfGeyser = 3701; 
	public const int fRation = 2207; 

	public const int bfSnow = 3602; 
	public const int bfSea = 3605; 

	public const int fAttraction = 2206;

	public const int fMoral = 2203; 
	public const int fHeirloom = 2120; 

	public const int fFood = 2204;

	public const int fMoral = 2203; 

	public const int fPromo = 2202;

	public const int fElec = 2201;

	public const int fTaxEvasion = 2119; 
	public const int fSoil = 2200; 

	public const int fLuck = 2118; 
	public const int fConstruction = 2003; 

	public const int fLoyal = 2117; 
	public const int fAdmin = 2115; 

	public const int fEducation = 2116;

	public const int fHeirloom = 2120; 

	public const int fAdmin = 2115; 
	public const int fLoyal = 2117; 

	public const int bfRuin = 3702; 
	public const int fLuck = 2118; 

	public const int fConstruction = 2003; 
	public const int fTaxEvasion = 2119; 

	public const int fSafety = 2205;

	public const int fSoil = 2200; 

	public const int bfTranquil = 3703;

	public const int bfRuin = 3702; 

	public const int bfHunt = 3705;

	public const int bfVolcano = 3704;

@@ -86,36 +86,36 @@ public class FACTION

cs

	public const int bfCoal = 3800;

	public const int bfLandmark5 = 3784; 

	public const int bfLandmark4 = 3783; 
	public const int bfMushroom = 3801; 

	public const int bfLandmark3 = 3782; 
	public const int bfMonster = 3707; 

	public const int bfLandmark2 = 3781; 
	public const int bfFreshAir = 3708; 

	public const int bfLandmark1 = 3780; 
	public const int bfBasin = 3709; 

	public const int bfBreed = 3710;

	public const int bfBasin = 3709; 
	public const int bfFish = 3706; 

	public const int bfFreshAir = 3708; 
	public const int bfLandmark2 = 3781; 

	public const int bfMonster = 3707; 
	public const int bfLandmark3 = 3782; 

	public const int bfFish = 3706; 
	public const int bfLandmark4 = 3783; 

	public const int bfMushroom = 3801; 
	public const int bfLandmark5 = 3784; 

	public const int bfLandmark1 = 3780; 

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

FEAT

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

cs

public class FEAT
{
	public const int featStamina = 1612; 
	public const int featMana = 1611; 

	public const int featSTR = 1620; 
	public const int featWIL = 1626; 

	public const int featDEX = 1621; 
	public const int featMAG = 1625; 

	public const int featCHA = 1627; 
	public const int featLER = 1624; 

	public const int featPER = 1623;

	public const int featLER = 1624; 
	public const int featEND = 1622; 

	public const int featMAG = 1625; 
	public const int featDEX = 1621; 

	public const int featWIL = 1626; 
	public const int featSTR = 1620; 

	public const int featEND = 1622; 
	public const int featStamina = 1612; 

	public const int featMana = 1611; 
	public const int featCHA = 1627; 

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

	public const int featManaMeat = 1421;

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

cs

	public const int featMilitant = 1419;

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

	public const int featInquisitor = 1416;

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

cs

	public const int featLuckyCat = 1412;

	public const int featEarthStrength = 1411; 

	public const int featLuck = 1628;

	public const int featLife = 1610;

@@ -53,7 +55,7 @@ public class FEAT

cs

	public const int featDefense = 1631;

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

	public const int featManaCost = 1657;

@@ -63,7 +65,7 @@ public class FEAT

cs

	public const int featHeavyCasting = 1654;

	public const int featRapidArrow = 1652; 
	public const int featDreamWaker = 1653; 

	public const int featMagicManner = 1651;

@@ -99,11 +101,11 @@ public class FEAT

cs

	public const int featLonelySoul = 1646;

	public const int featReboot = 1410; 
	public const int featBoost = 1409; 

	public const int featDreamWaker = 1653; 
	public const int featRapidArrow = 1652; 

	public const int featPaladin2 = 1408; 
	public const int featPaladin = 1407; 

	public const int featAcidBody = 1223;

@@ -121,7 +123,7 @@ public class FEAT

cs

	public const int featAdam = 1230;

	public const int featBaby = 1232; 
	public const int featNirvana = 1231; 

	public const int featSplit = 1222;

@@ -129,6 +131,10 @@ public class FEAT

cs

	public const int featLightEater = 1235;

	public const int featNorland = 1236; 

	public const int featRoran = 1237; 

	public const int featGod_element1 = 1300;

	public const int featGod_earth1 = 1305;

@@ -141,19 +147,15 @@ public class FEAT

cs

	public const int featGod_harvest1 = 1325;

	public const int featGod_luck1 = 1330; 

	public const int featGod_harmony1 = 1335; 

	public const int featHeavyEater = 1234;

	public const int featGod_oblivion1 = 1340; 
	public const int featGod_luck1 = 1330; 

	public const int featSpike = 1221;

	public const int featElderCrab = 1219;

	public const int featBoost = 1409; 
	public const int featPaladin2 = 1408; 

	public const int featSlowFood = 1200;

@@ -195,15 +197,19 @@ public class FEAT

cs

	public const int featFluffyTail = 1209;

	public const int featGod_trickery1 = 1345; 
	public const int featGod_harmony1 = 1335; 

	public const int featNirvana = 1231; 
	public const int featBaby = 1232; 

	public const int featGod_oblivion1 = 1340; 

	public const int featGod_trickery1 = 1345; 

	public const int featGod_moonshadow1 = 1350;

	public const int featGod_strife1 = 1355;

	public const int featWarrior = 1400; 
	public const int featThief = 1401; 

	public const int featWizard = 1402;

@@ -211,27 +217,25 @@ public class FEAT

cs

	public const int featArcher = 1404;

	public const int featPianist = 1405; 
	public const int featWarrior = 1400; 

	public const int featTourist = 1406;

	public const int featThief = 1401; 

	public const int featPaladin = 1407; 
	public const int featPianist = 1405; 

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

FOOD

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

cs
public class FOOD
{
	public const int food_cat = 701; 

	public const int food_poison = 702;

	public const int food_love = 703;

@@ -10,9 +12,7 @@ public class FOOD

cs

	public const int loseWeight = 706;

	public const int food_cat = 701; 

	public const int food_CHA = 700;

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

FactionBranch

@@ -1032,7 +1032,7 @@ void GetIncome(ref int n, ref int stat, string lang, bool tax)

cs

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

FoodEffect

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

cs
	{
		num3 *= 2;
	}
	num3 = num3 * (100 + c.Evalue(1235) * 10) / (100 + c.Evalue(1234) * 10); 
	num3 = num3 * (100 + c.Evalue(1235) * 10) / (100 + c.Evalue(1234) * 10 + c.Evalue(1236) * 15); 
	c.hunger.Mod(-num3);
	if (flag2)
	{

InvOwnerGene

@@ -25,11 +25,19 @@ public override bool ShouldShowGuide(Thing t)

cs
public override void _OnProcess(Thing t)
{
	DNA.Type type = t.c_DNA.type;
	if (type != 0 && tg.c_genes != null && tg.CurrentGeneSlot >= tg.MaxGeneSlot) 
	if (type != 0 && tg.c_genes != null) 
	{
		SE.Beep(); 
		Msg.Say("tooManyGene", tg); 
		return; 
		int num = t.c_DNA.slot; 
		if (num > 1 && tg.HasElement(1237)) 
		{ 
			num--; 
		} 
		if (tg.CurrentGeneSlot + num > tg.MaxGeneSlot) 
		{ 
			SE.Beep(); 
			Msg.Say("tooManyGene", tg); 
			return; 
		} 
	}
	if (type == DNA.Type.Brain)
	{

@@ -79,13 +87,18 @@ public override void OnWriteNote(Thing t, UINote n)

cs
		{
			n.AddHeader("HeaderAdditionalTrait", "gene_hint");
			_ = tg.c_genes;
			int num = tg.MaxGeneSlot - tg.CurrentGeneSlot; 
			int num2 = num - t.c_DNA.slot; 
			int num = t.c_DNA.slot; 
			if (num > 1 && tg.HasElement(1237)) 
			{ 
				num--; 
			} 
			int num2 = tg.MaxGeneSlot - tg.CurrentGeneSlot; 
			int num3 = num2 - num; 
			int maxGeneSlot = tg.MaxGeneSlot;
			n.AddText("gene_hint_slot".lang(num.ToString() ?? "", num2.ToString() ?? "", maxGeneSlot.ToString() ?? ""), (num2 >= 0) ? FontColor.Good : FontColor.Bad); 
			n.AddText("gene_hint_slot".lang(num2.ToString() ?? "", num3.ToString() ?? "", maxGeneSlot.ToString() ?? ""), (num3 >= 0) ? FontColor.Good : FontColor.Bad); 
			int cost = t.c_DNA.cost;
			int num3 = tg.feat - cost; 
			n.AddText("gene_hint_cost".lang(tg.feat.ToString() ?? "", cost + ((cost == t.c_DNA.cost) ? "" : ("(" + t.c_DNA.cost + ")")), num3.ToString() ?? ""), (num3 >= 0) ? FontColor.Good : FontColor.Bad); 
			int num4 = tg.feat - cost; 
			n.AddText("gene_hint_cost".lang(tg.feat.ToString() ?? "", cost + ((cost == t.c_DNA.cost) ? "" : ("(" + t.c_DNA.cost + ")")), num4.ToString() ?? ""), (num4 >= 0) ? FontColor.Good : FontColor.Bad); 
		}
	}
}

MUTATION

@@ -1,34 +1,32 @@

cs
public class MUTATION
{
	public const int mutationRegenN = 1517; 

	public const int mutationRegen = 1516;

	public const int mutationDexN = 1515;

	public const int mutationDex = 1514;

	public const int mutationSkinN = 1511; 
	public const int mutationSkin = 1510; 

	public const int mutationEye = 1512;

	public const int mutationSkin = 1510; 
	public const int mutationSkinN = 1511; 

	public const int etherManaBattery = 1564; 
	public const int etherProvoke = 1563; 

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

	public const int mutationEyeN = 1513;

	public const int mutationSpeedN = 1519; 
	public const int mutationSpeed = 1518; 

	public const int etherPoisonHand = 1565; 
	public const int etherManaBattery = 1564; 

	public const int mutationStrN = 1521; 
	public const int mutationStr = 1520; 

	public const int etherProvoke = 1563; 
	public const int etherPoisonHand = 1565; 

	public const int mutationStr = 1520; 
	public const int mutationSpeedN = 1519; 

	public const int etherStupid = 1561;

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

cs

	public const int etherFeet = 1552;

	public const int etherUgly = 1551; 

	public const int etherArmor = 1562;

	public const int etherGravity = 1550; 
	public const int mutationStrN = 1521; 

	public const int etherUgly = 1551; 
	public const int mutationBodyN = 1531; 

	public const int mutationChaN = 1523; 
	public const int mutationBody = 1530; 

	public const int mutationBrain = 1524; 
	public const int mutationLightningN = 1529; 

	public const int mutationBrainN = 1525; 
	public const int mutationLightning = 1528; 

	public const int mutationCold = 1526; 
	public const int mutationColdN = 1527; 

	public const int mutationCha = 1522; 
	public const int mutationCold = 1526; 

	public const int mutationLightning = 1528; 
	public const int mutationBrainN = 1525; 

	public const int mutationLightningN = 1529; 
	public const int mutationBrain = 1524; 

	public const int mutationBody = 1530; 
	public const int mutationChaN = 1523; 

	public const int mutationBodyN = 1531; 
	public const int mutationCha = 1522; 

	public const int mutationColdN = 1527; 
	public const int etherGravity = 1550; 

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

Map

@@ -1206,33 +1206,39 @@ public void TryShatter(Point pos, int ele, int power)

cs
		if (item.isThing && item.things.Count == 0)
		{
			list.Add(item);
			continue; 
		}
		Thing thing = ((ele == 910) ? item.things.FindBest<TraitBlanketFireproof>((Thing t) => -t.c_charges) : item.things.FindBest<TraitBlanketColdproof>((Thing t) => -t.c_charges)); 
		if (thing != null) 
		else
		{
			thing.ModCharge(-1); 
			Card rootCard2 = item.GetRootCard(); 
			if (pos.IsSync) 
			if (ele == 911 && item.HasElement(1236)) 
			{
				Msg.Say((item.isChara ? "blanketInv_" : "blanketGround_") + element.source.alias, thing, item); 
				continue; 
			}
			if (thing.c_charges <= 0) 
			Thing thing = ((ele == 910) ? item.things.FindBest<TraitBlanketFireproof>((Thing t) => -t.c_charges) : item.things.FindBest<TraitBlanketColdproof>((Thing t) => -t.c_charges)); 
			if (thing != null) 
			{
				thing.Die(element); 
				if (rootCard2.IsPCParty) 
				thing.ModCharge(-1); 
				Card rootCard2 = item.GetRootCard(); 
				if (pos.IsSync) 
				{
					ActionMode.Adv.itemLost++; 
					Msg.Say((item.isChara ? "blanketInv_" : "blanketGround_") + element.source.alias, thing, item); 
				}
				if (thing.c_charges <= 0) 
				{ 
					thing.Die(element); 
					if (rootCard2.IsPCParty) 
					{ 
						ActionMode.Adv.itemLost++; 
					} 
				} 
				continue; 
			}
			continue; 
		} 
		foreach (Thing item2 in item.things.List((Thing a) => a.things.Count == 0)) 
		{ 
			Card parentCard = item2.parentCard; 
			if (parentCard == null || (!(parentCard.trait is TraitChestMerchant) && !parentCard.HasEditorTag(EditorTag.PreciousContainer))) 
			foreach (Thing item2 in item.things.List((Thing a) => a.things.Count == 0)) 
			{
				list.Add(item2); 
				Card parentCard = item2.parentCard; 
				if (parentCard == null || (!(parentCard.trait is TraitChestMerchant) && !parentCard.HasEditorTag(EditorTag.PreciousContainer))) 
				{ 
					list.Add(item2); 
				} 
			}
		}
	}

POLICY

@@ -3,30 +3,32 @@

cs

public class POLICY
{
	public const int store_ripoff = 2816; 

	public const int incomeTransfer = 2711; 
	public const int mass_exhibition = 2814; 

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

	public const int open_business = 2810; 
	public const int bed_quality = 2812; 

	public const int tourist_safety = 2811;

	public const int bed_quality = 2812; 
	public const int noAnimal = 2709; 

	public const int noMother = 2710; 
	public const int home_discount = 2800; 

	public const int suite_room = 2813; 
	public const int incomeTransfer = 2711; 

	public const int mass_exhibition = 2814; 
	public const int noMother = 2710; 

	public const int platinum_ticket = 2815;

	public const int store_premium = 2817; 
	public const int open_business = 2810; 

	public const int store_ripoff = 2816; 

	public const int legendary_exhibition = 2823;

	public const int license_food = 2818; 

	public const int license_furniture = 2819;

	public const int license_general = 2820;

@@ -45,18 +47,14 @@ public class POLICY

cs

	public const int license_slaver = 2828;

	public const int noAnimal = 2709; 

	public const int license_food = 2818; 
	public const int store_premium = 2817; 

	public const int noDM = 2708;

	public const int human_right = 2506; 
	public const int legal_drug = 2505; 

	public const int demon_invocation = 2706;

	public const int auto_farm = 2707; 

	public const int wealth_tax = 2500;

	public const int faith_tax = 2501;

@@ -67,17 +65,19 @@ public class POLICY

cs

	public const int impressment = 2504;

	public const int human_right = 2506; 

	public const int inquisition = 2507;

	public const int nocturnal_life = 2508;

	public const int vaccination = 2509; 
	public const int auto_farm = 2707; 

	public const int ban_radio = 2510;

	public const int self_sufficient = 2511;

	public const int legal_drug = 2505; 
	public const int vaccination = 2509; 

	public const int resident_wanted = 2513;

@@ -95,19 +95,19 @@ public class POLICY

cs

	public const int weed_no = 2703;

	public const int resident_tax = 2512; 

	public const int border_watch = 2704;

	public const int taxTransfer = 2705;

	public const int resident_tax = 2512; 

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

Player

@@ -1888,6 +1888,11 @@ public void ModKeyItem(int id, int num = 1, bool msg = true)

cs
		}
	}

	public bool HasKeyItem(string alias) 
	{ 
		return CountKeyItem(EClass.sources.keyItems.alias[alias].id) > 0; 
	} 

	public int CountKeyItem(string alias)
	{
		return CountKeyItem(EClass.sources.keyItems.alias[alias].id);

SKILL

@@ -10,18 +10,18 @@ public class SKILL

cs

	public const int shield = 123;

	public const int weaponScythe = 110; 
	public const int fireproof = 50; 

	public const int armorLight = 120;

	public const int weaponBlunt = 111;

	public const int weaponScythe = 110; 

	public const int weaponCrossbow = 109;

	public const int eyeofmind = 134;

	public const int fireproof = 50; 

	public const int armorHeavy = 122;

	public const int strategy = 135;

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

cs

	public const int weaponGun = 105;

	public const int weaponDagger = 107; 
	public const int weaponPolearm = 106; 

	public const int throwing = 108;

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

cs

	public const int gathering = 250;

	public const int weaponPolearm = 106; 
	public const int weaponDagger = 107; 

	public const int blacksmith = 256;

@@ -264,13 +264,13 @@ public class SKILL

cs

	public static readonly int[] IDS = new int[131]
	{
		133, 132, 131, 130, 123, 110, 120, 111, 109, 134, 
		50, 122, 135, 230, 151, 242, 241, 240, 237, 235, 
		133, 132, 131, 130, 123, 50, 120, 111, 110, 109, 
		134, 122, 135, 230, 151, 242, 241, 240, 237, 235, 
		51, 150, 227, 225, 220, 210, 207, 200, 152, 226,
		55, 101, 57, 245, 62, 64, 65, 66, 67, 68,
		70, 71, 72, 73, 74, 75, 76, 56, 77, 79,
		80, 90, 91, 92, 100, 102, 103, 104, 105, 107, 
		108, 61, 60, 78, 250, 106, 256, 916, 917, 918, 
		80, 90, 91, 92, 100, 102, 103, 104, 105, 106, 
		108, 61, 60, 78, 250, 107, 256, 916, 917, 918, 
		920, 921, 922, 923, 924, 925, 950, 951, 952, 953,
		954, 955, 956, 957, 958, 959, 960, 961, 962, 963,
		964, 965, 970, 971, 972, 255, 915, 914, 919, 912,

Steam

@@ -184,7 +184,6 @@ public WorkshopItemData CreateItemData(BaseModPackage p)

cs
	Debug.Log(App.Client.Owner.id);
	Debug.Log(result.appId);
	Debug.Log(p.id);
	Debug.Log(p.description + "/" + result.description); 
	Debug.Log(directoryInfo.Exists + "/" + directoryInfo.FullName);
	Debug.Log(fileInfo.Exists + "/" + fileInfo.FullName);
	return result;

Thing

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

cs
	if (EClass.debug.showExtra)
	{
		n.AddText("decay:" + base.decay);
		n.AddText(base.isDyed + "/" + id + "/" + base.refVal + "/" + base.LV + "/" + trait); 
		if (source.origin != null) 
		{ 
			n.AddText(source.origin.id); 
		} 
	}
	if (id == "statue_weird")
	{

ThingGen

@@ -169,7 +169,7 @@ public static Thing CreateScroll(int ele, int num = 1)

cs

	public static Thing CreatePotion(int ele, int num = 1)
	{
		Thing thing = Create("potion").SetNum(num); 
		Thing thing = Create("1163").SetNum(num); 
		thing.refVal = ele;
		return thing;
	}

Trait

@@ -598,6 +598,14 @@ public virtual void OnCreate(int lv)

cs
	{
	}

	public virtual void OnEquip(Chara c, bool onSetOwner) 
	{ 
	} 

	public virtual void OnUnequip(Chara c) 
	{ 
	} 

	public virtual void OnChangePlaceState(PlaceState state)
	{
	}

@@ -1519,6 +1527,7 @@ public void OnBarter()

cs
	case ShopType.Deed:
		Add("deed", 1, 0);
		Add("deed_move", 2 + EClass.rnd(5), 0);
		Add("license_illumination", 1, 0); 
		Add("license_void", 1, 0);
		Add("license_adv", 1, 0);
		break;

+TraitBitchDancer

File Created
cs
public class TraitBitchDancer : TraitCitizen
{
	public override string IDRumor => "bitch";

	public override bool CanWhore => true;
}

+TraitEQ

File Created
cs
public class TraitEQ : Trait
{
}

+TraitEQFlower

File Created
cs
public class TraitEQFlower : TraitEQ
{
	public override void OnEquip(Chara c, bool onSetOwner)
	{
		c.hat = owner.sourceCard;
	}

	public override void OnUnequip(Chara c)
	{
		c.hat = null;
	}
}

Zone

@@ -226,6 +226,18 @@ public virtual bool MakeEnemiesNeutral

cs

	public virtual bool AllowCriminal => !HasLaw;

	public virtual bool AllowInvest 
	{ 
		get 
		{ 
			if (!IsTown) 
			{ 
				return IsPCFaction; 
			} 
			return true; 
		} 
	} 

	public virtual bool AllowNewZone => true;

	public virtual bool WillAutoSave => true;