Skip to content

EA 23.89 Nightly

February 9, 2025

26 files modified.

Important Changes

None.

ACT

@@ -236,6 +236,22 @@ public virtual string GetTextSmall(Card c)

cs
		return c.Name + c.GetExtraName();
	}

	public bool IsTargetHostileParty() 
	{ 
		if (base.source.abilityType.Length != 0) 
		{ 
			switch (base.source.abilityType[0]) 
			{ 
			case "debuff": 
			case "debuffStats": 
			case "attack": 
			case "dot": 
				return true; 
			} 
		} 
		return false; 
	} 

	public virtual Color GetActPlanColor()
	{
		if (!IsCrime)

ActMelee

@@ -116,159 +116,191 @@ public bool Attack(float dmgMulti = 1f, bool maxRoll = false)

cs
		return true;
	}
	bool hasHit = false;
	bool flag = false; 
	bool usedWeapon = false; 
	bool usedTalisman = false;
	int count = 0;
	int num = Act.CC.Dist(Act.TC); 
	int dist = Act.CC.Dist(Act.TC); 
	Point orgPos = Act.TC.pos.Copy();
	Card tC = Act.TC; 
	Card orgTC = Act.TC; 
	foreach (BodySlot slot in Act.CC.body.slots)
	{
		Act.TC = tC; 
		if (Act.TC == null || !Act.TC.IsAliveInCurrentZone) 
		{ 
			return true; 
		} 
		if (slot.thing == null || slot.elementId != 35 || slot.thing.source.offense.Length < 2) 
		{ 
			continue; 
		} 
		Thing w = slot.thing; 
		if (num > 1 && num > w.Evalue(666) + 1) 
		{ 
			continue; 
		} 
		flag = true; 
		if (w.IsMeleeWithAmmo && Act.CC.IsPC && w.c_ammo <= 0 && !Act.CC.HasCondition<ConReload>()) 
		{ 
			ActRanged.TryReload(w); 
		} 
		int num2 = GetWeaponEnc(606); 
		int scatter = GetWeaponEnc(607); 
		int splash = GetWeaponEnc(608); 
		int chaser = GetWeaponEnc(620); 
		int flurry = GetWeaponEnc(621); 
		int frustration = GetWeaponEnc(624); 
		int num3 = GetWeaponEnc(622); 
		int feint = GetWeaponEnc(623); 
		List<Point> list2 = EClass._map.ListPointsInLine(Act.CC.pos, Act.TC.pos, num2 / 10 + ((num2 % 10 > EClass.rnd(10)) ? 1 : 0) + 1); 
		AttackWithFlurry(Act.TC, Act.TP, 1f, subAttack: false); 
		if (num2 > 0) 
		_Attack(slot); 
	} 
	if (!usedWeapon) 
	{ 
		_Attack(null); 
	} 
	if (EClass.core.config.game.waitOnMelee) 
	{ 
		EClass.Wait(0.25f, Act.CC); 
	} 
	if (!hasHit) 
	{ 
		Act.CC.PlaySound("miss"); 
	} 
	if (EClass.rnd(2) == 0) 
	{ 
		Act.CC.RemoveCondition<ConInvisibility>(); 
	} 
	return true; 
	void _Attack(BodySlot slot) 
	{ 
		Act.TC = orgTC; 
		Thing w; 
		int splash; 
		int chaser; 
		int flurry; 
		int frustration; 
		int feint; 
		if (Act.TC != null && Act.TC.IsAliveInCurrentZone) 
		{
			foreach (Point item in list2) 
			w = null; 
			if (slot != null) 
			{
				if (!item.Equals(orgPos)) 
				if (slot.thing == null || slot.elementId != 35 || slot.thing.source.offense.Length < 2) 
				{
					Chara firstChara = item.FirstChara; 
					if (firstChara != null && firstChara.IsHostile(Act.CC)) 
					{ 
						AttackWithFlurry(firstChara, item, 1f, subAttack: false); 
					} 
					return; 
				}
				w = slot.thing; 
			}
		} 
		else if (scatter > 0) 
		{ 
			Act.TP.ForeachNeighbor(delegate(Point p) 
			int num = ((w == null) ? 1 : (w.Evalue(666) + 1)); 
			if (dist <= 1 || dist <= num) 
			{
				if (!p.Equals(orgPos)) 
				if (w != null) 
				{
					Chara firstChara2 = p.FirstChara; 
					if (firstChara2 != null && firstChara2.IsHostile(Act.CC)) 
					usedWeapon = true; 
					if (w.IsMeleeWithAmmo && Act.CC.IsPC && w.c_ammo <= 0 && !Act.CC.HasCondition<ConReload>()) 
					{
						AttackWithFlurry(firstChara2, p, Mathf.Min(0.5f + 0.05f * Mathf.Sqrt(scatter), 1f + 0.01f * Mathf.Sqrt(scatter)), subAttack: true); 
						ActRanged.TryReload(w); 
					}
				}
			}); 
		} 
		else if (num3 > 0) 
		{ 
			List<Point> list = new List<Point>(); 
			Act.TP.ForeachNeighbor(delegate(Point p) 
			{ 
				list.Add(p.Copy()); 
			}); 
			list.Shuffle(); 
			int num4 = 0; 
			for (int i = 0; i < 9 && num3 > EClass.rnd(10 + (int)Mathf.Pow(3f, i + 2)); i++) 
			{ 
				num4++; 
			} 
			foreach (Point item2 in list) 
			{ 
				foreach (Card item3 in item2.ListCards().Copy()) 
				int num2 = GetWeaponEnc(606, addSelfEnc: false); 
				int scatter = GetWeaponEnc(607, addSelfEnc: false); 
				splash = GetWeaponEnc(608, addSelfEnc: true); 
				chaser = GetWeaponEnc(620, addSelfEnc: false); 
				flurry = GetWeaponEnc(621, addSelfEnc: false); 
				frustration = GetWeaponEnc(624, addSelfEnc: false); 
				int num3 = GetWeaponEnc(622, addSelfEnc: true); 
				feint = GetWeaponEnc(623, addSelfEnc: false); 
				List<Point> list2 = EClass._map.ListPointsInLine(Act.CC.pos, Act.TC.pos, num2 / 10 + ((num2 % 10 > EClass.rnd(10)) ? 1 : 0) + 1); 
				AttackWithFlurry(Act.TC, Act.TP, 1f, subAttack: false); 
				if (num2 > 0) 
				{
					if (num4 <= 0 || !Act.CC.IsAliveInCurrentZone) 
					foreach (Point item in list2) 
					{
						break; 
						if (!item.Equals(orgPos)) 
						{ 
							Chara firstChara = item.FirstChara; 
							if (firstChara != null && firstChara.IsHostile(Act.CC)) 
							{ 
								AttackWithFlurry(firstChara, item, 1f, subAttack: false); 
							} 
						} 
					}
					if (item3.trait.CanBeAttacked || (item3.isChara && item3.Chara.IsHostile(Act.CC))) 
				} 
				else if (scatter > 0) 
				{ 
					Act.TP.ForeachNeighbor(delegate(Point p) 
					{
						AttackWithFlurry(item3, item2, 1f, subAttack: true); 
						num4--; 
						if (!p.Equals(orgPos)) 
						{ 
							Chara firstChara2 = p.FirstChara; 
							if (firstChara2 != null && firstChara2.IsHostile(Act.CC)) 
							{ 
								AttackWithFlurry(firstChara2, p, Mathf.Min(0.5f + 0.05f * Mathf.Sqrt(scatter), 1f + 0.01f * Mathf.Sqrt(scatter)), subAttack: true); 
							} 
						} 
					}); 
				} 
				else if (num3 > 0) 
				{ 
					List<Point> list = new List<Point>(); 
					Act.TP.ForeachNeighbor(delegate(Point p) 
					{ 
						list.Add(p.Copy()); 
					}); 
					list.Shuffle(); 
					int num4 = 0; 
					for (int i = 0; i < 9 && num3 > EClass.rnd(10 + (int)Mathf.Pow(3f, i + 2)); i++) 
					{ 
						num4++; 
					} 
					foreach (Point item2 in list) 
					{ 
						foreach (Card item3 in item2.ListCards().Copy()) 
						{ 
							if (num4 <= 0 || !Act.CC.IsAliveInCurrentZone) 
							{ 
								break; 
							} 
							if (item3.trait.CanBeAttacked || (item3.isChara && item3.Chara.IsHostile(Act.CC))) 
							{ 
								AttackWithFlurry(item3, item2, 1f, subAttack: true); 
								num4--; 
							} 
						} 
					}
				}
				count++; 
			}
		}
		int num5 = count; 
		count = num5 + 1; 
		void Attack(Card _tc, Point _tp, float mtp, bool subAttack)
		{
			Act.TC = _tc;
			Act.TP = _tp;
			AttackProcess.Current.Prepare(Act.CC, w, Act.TC, Act.TP, count);
			int num6 = 1; 
			int num5 = 1; 
			if (chaser > 0)
			{
				for (int j = 0; j < 10; j++)
				{
					if (chaser > EClass.rnd(4 + (int)Mathf.Pow(4f, j + 2)))
					{
						num6++; 
						num5++; 
					}
				}
			}
			bool flag2 = false; 
			for (int k = 0; k < num6; k++) 
			bool flag = false; 
			for (int k = 0; k < num5; k++) 
			{
				if (k > 0)
				{
					Act.CC.Say("attack_chaser");
				}
				flag2 = AttackProcess.Current.Perform(count, hasHit, dmgMulti * mtp, maxRoll, subAttack); 
				if (!flag2 && frustration > 0 && 10f + 2f * Mathf.Sqrt(frustration) > (float)EClass.rnd(100)) 
				flag = AttackProcess.Current.Perform(count, hasHit, dmgMulti * mtp, maxRoll, subAttack); 
				if (!flag && frustration > 0 && 10f + 2f * Mathf.Sqrt(frustration) > (float)EClass.rnd(100)) 
				{
					AttackProcess.Current.critFury = true;
					flag2 = AttackProcess.Current.Perform(count, hasHit, dmgMulti * mtp, maxRoll, subAttack); 
					flag = AttackProcess.Current.Perform(count, hasHit, dmgMulti * mtp, maxRoll, subAttack); 
					AttackProcess.Current.critFury = false;
				}
				if (flag2 || !Act.CC.IsAliveInCurrentZone || !Act.TC.IsAliveInCurrentZone) 
				if (flag || !Act.CC.IsAliveInCurrentZone || !Act.TC.IsAliveInCurrentZone) 
				{
					break;
				}
			}
			if (w.c_ammo > 0 && !Act.CC.HasCondition<ConReload>()) 
			if (w != null && w.c_ammo > 0 && !Act.CC.HasCondition<ConReload>()) 
			{
				bool flag3 = true; 
				bool flag2 = true; 
				TraitAmmo traitAmmo = ((w.ammoData == null) ? null : (w.ammoData.trait as TraitAmmo));
				if (traitAmmo != null && traitAmmo is TraitAmmoTalisman traitAmmoTalisman)
				{
					flag3 = false; 
					if (flag2 && !usedTalisman && Act.TC != null && Act.TC.IsAliveInCurrentZone) 
					flag2 = false; 
					if (flag && !usedTalisman && Act.TC != null && Act.TC.IsAliveInCurrentZone) 
					{
						Act act = Act.CC.elements.GetElement(traitAmmoTalisman.owner.refVal)?.act ?? ACT.Create(traitAmmoTalisman.owner.refVal);
						Act.powerMod = traitAmmo.owner.encLV;
						if (act.Perform(Act.CC, Act.TC, Act.TP))
						{
							usedTalisman = true;
							flag3 = true; 
							flag2 = true; 
							int spellExp = Act.CC.elements.GetSpellExp(Act.CC, act, 200);
							Act.CC.ModExp(act.id, spellExp);
						}
						Act.powerMod = 100;
					}
				}
				if (flag3) 
				if (flag2) 
				{
					w.c_ammo--;
					if (w.ammoData != null)

@@ -316,15 +348,15 @@ void Attack(Card _tc, Point _tp, float mtp, bool subAttack)

cs
		}
		void AttackWithFlurry(Card _tc, Point _tp, float mtp, bool subAttack)
		{
			int num7 = 1; 
			int num6 = 1; 
			if (flurry > 0)
			{
				for (int l = 0; l < 10 && flurry > EClass.rnd(25 + (int)Mathf.Pow(5f, l + 2)); l++)
				{
					num7++; 
					num6++; 
				}
			}
			for (int m = 0; m < num7; m++) 
			for (int m = 0; m < num6; m++) 
			{
				if (!Act.CC.IsAliveInCurrentZone)
				{

@@ -341,32 +373,10 @@ void AttackWithFlurry(Card _tc, Point _tp, float mtp, bool subAttack)

cs
					Attack(_tc, _tp, mtp, subAttack);
				}
			}
			int GetWeaponEnc(int ele) 
			int GetWeaponEnc(int ele, bool addSelfEnc) 
			{
				return ((w != null) ? w.Evalue(ele) : 0) + (Act.CC.IsPCFactionOrMinion ? EClass.pc.faction.charaElements.Value(ele) : 0); 
				return (addSelfEnc ? Act.CC.Evalue(ele) : 0) + ((w != null) ? w.Evalue(ele) : 0) + (Act.CC.IsPCFactionOrMinion ? EClass.pc.faction.charaElements.Value(ele) : 0); 
			}
		}
		if (!flag) 
		{ 
			AttackProcess.Current.Prepare(Act.CC, null, Act.TC, Act.TP); 
			if (AttackProcess.Current.Perform(count, hasHit, dmgMulti, maxRoll)) 
			{ 
				hasHit = true; 
			} 
			Act.CC.DoHostileAction(Act.TC); 
		} 
		if (EClass.core.config.game.waitOnMelee) 
		{ 
			EClass.Wait(0.25f, Act.CC); 
		} 
		if (!hasHit) 
		{ 
			Act.CC.PlaySound("miss"); 
		} 
		if (EClass.rnd(2) == 0) 
		{ 
			Act.CC.RemoveCondition<ConInvisibility>(); 
		} 
		return true; 
	}
}

AttackProcess

@@ -267,7 +267,7 @@ public void Prepare(Chara _CC, Thing _weapon, Card _TC = null, Point _TP = null,

cs
		dMulti = dMulti * 1.5f + 0.1f * Mathf.Sqrt(Mathf.Max(0, CC.Evalue(130)));
	}
	dMulti = dMulti * (float)distMod / 100f;
	toHit = toHitBase + toHitFix; 
	toHit = (toHitBase + toHitFix) * (100 + CC.Evalue(414)) / 100; 
	toHit = toHit * distMod / 100;
	if (CC.HasCondition<ConBane>())
	{

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

cs
		{
			list2 = list2.Concat(ammo.elements.dict.Values).ToList();
		}
		if (IsRanged || isThrow) 
		{ 
			num2 += weapon.Evalue(91); 
		} 
		num3 += weapon.Evalue(603); 
		num2 += weapon.Evalue(91, ignoreGlobalElement: true); 
		num3 += weapon.Evalue(603, ignoreGlobalElement: true); 
	}
	else if (CC.id == "rabbit_vopal")
	{

@@ -465,19 +462,16 @@ public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =

cs
	if (TC?.Chara != null)
	{
		SourceRace.Row race = TC.Chara.race;
		bane = CC.Evalue(468); 
		if (IsRanged) 
		{ 
			bane += toolRange.owner.Evalue(468); 
		} 
		AddBane(race.IsUndead, 461); 
		AddBane(race.IsAnimal, 463); 
		AddBane(race.IsHuman, 464); 
		AddBane(race.IsDragon, 460); 
		AddBane(race.IsGod, 466); 
		AddBane(race.IsMachine, 465); 
		AddBane(race.IsFish, 467); 
		AddBane(race.IsFairy, 462); 
		bane = 0; 
		AddBane(valid: true, 468, 50); 
		AddBane(race.IsUndead, 461, 100); 
		AddBane(race.IsAnimal, 463, 100); 
		AddBane(race.IsHuman, 464, 100); 
		AddBane(race.IsDragon, 460, 100); 
		AddBane(race.IsGod, 466, 100); 
		AddBane(race.IsMachine, 465, 100); 
		AddBane(race.IsFish, 467, 100); 
		AddBane(race.IsFairy, 462, 100); 
		if (bane != 0)
		{
			num = num * (100 + bane * 3) / 100;

@@ -700,15 +694,11 @@ public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =

cs
		TC.PlaySound("push", 1.5f);
	}
	return true;
	void AddBane(bool valid, int idEle) 
	void AddBane(bool valid, int idEle, int mod) 
	{
		if (valid)
		{
			if (IsRanged) 
			{ 
				bane += toolRange.owner.Evalue(idEle); 
			} 
			bane += CC.Evalue(idEle); 
			bane += (CC.Evalue(idEle) + ((weapon != null) ? weapon.Evalue(idEle, ignoreGlobalElement: true) : 0)) * mod / 100; 
		}
	}
	bool IgnoreExp()

@@ -930,7 +920,7 @@ public bool CalcHit()

cs
	{
		return Crit();
	}
	if ((float)CC.Evalue(90) + Mathf.Sqrt(CC.Evalue(134)) > (float)EClass.rnd(200)) 
	if ((float)(CC.Evalue(90) + ((weapon != null) ? weapon.Evalue(90, ignoreGlobalElement: true) : 0)) + Mathf.Sqrt(CC.Evalue(134)) > (float)EClass.rnd(200)) 
	{
		return Crit();
	}

ButtonElement

@@ -195,10 +195,6 @@ public void SetGrid(Element e, Chara c)

cs
		if (element != null)
		{
			num = element.Value;
			if (!element.CanLink(thing.elements) || element.IsGlobalElement) 
			{ 
				num = 0; 
			} 
		}
		if (num == 0)
		{

@@ -206,7 +202,19 @@ public void SetGrid(Element e, Chara c)

cs
			uIItem.image1.color = Color.white.SetAlpha(0.5f);
		}
		text = (e.IsFlag ? "✓" : (Mathf.Abs(num).ToString() ?? ""));
		uIItem.text1.SetText(text, (num >= 0) ? FontColor.Good : FontColor.Bad); 
		FontColor c2 = ((num >= 0) ? FontColor.Good : FontColor.Bad); 
		if (element != null) 
		{ 
			if (!element.CanLink(thing.elements)) 
			{ 
				c2 = FontColor.Gray; 
			} 
			if (element.IsGlobalElement) 
			{ 
				c2 = FontColor.Myth; 
			} 
		} 
		uIItem.text1.SetText(text, c2); 
	}
	text = "";
	int value = e.Value;

Card

@@ -2421,6 +2421,15 @@ public int Evalue(int ele)

cs
		return elements.Value(ele);
	}

	public int Evalue(int ele, bool ignoreGlobalElement) 
	{ 
		if (!ignoreGlobalElement || !HasGlobalElement(ele)) 
		{ 
			return elements.Value(ele); 
		} 
		return 0; 
	} 

	public int EvalueMax(int ele, int min = 0)
	{
		return Mathf.Max(elements.Value(ele), min);

@@ -2993,6 +3002,10 @@ void TryAdd(Thing a)

cs

	public void PurgeDuplicateArtifact(Thing af)
	{
		if (EClass.debug.enable) 
		{ 
			return; 
		} 
		List<Chara> list = new List<Chara>();
		foreach (FactionBranch child in EClass.pc.faction.GetChildren())
		{

@@ -3311,6 +3324,7 @@ public SocketData AddRune(int idEle, int v)

cs
	{
		socketList = new List<SocketData>();
	}
	SourceElement.Row row = EClass.sources.elements.map[idEle]; 
	SocketData socketData = new SocketData
	{
		idEle = idEle,

@@ -3318,7 +3332,10 @@ public SocketData AddRune(int idEle, int v)

cs
			type = SocketData.Type.Rune
		};
		socketList.Add(socketData);
		elements.SetTo(idEle, v); 
		if (IsWeapon || !row.IsWeaponEnc) 
		{ 
			elements.SetTo(idEle, v); 
		} 
		return socketData;
	}

@@ -5163,6 +5180,11 @@ public bool HasElement(string id, int req = 1)

cs
		return HasElement(EClass.sources.elements.alias[id].id, req);
	}

	public bool HasGlobalElement(int ele) 
	{ 
		return elements.GetElement(ele)?.IsGlobalElement ?? false; 
	} 

	public virtual CardRenderer _CreateRenderer()
	{
		renderer = new CardRenderer();

Chara

@@ -5184,6 +5184,7 @@ public bool UseAbility(Act a, Card tc = null, Point pos = null, bool pt = false)

cs
	a.GetPower(this);
	int i = 1;
	int num2 = 0;
	bool flag = a.IsTargetHostileParty(); 
	if (IsPC && HasCondition<StanceManaCost>())
	{
		num2 = Evalue(1657);

@@ -5196,10 +5197,20 @@ public bool UseAbility(Act a, Card tc = null, Point pos = null, bool pt = false)

cs
	if (pt)
	{
		i = 0;
		ForeachParty(delegate
		if (flag) 
		{
			i++; 
		}); 
			ForeachEnemy(delegate
			{ 
				i++; 
			}); 
		} 
		else
		{ 
			ForeachParty(delegate
			{ 
				i++; 
			}); 
		} 
	}
	if (a is Spell && IsPC && a.vPotential < i)
	{

@@ -5356,14 +5367,24 @@ public bool UseAbility(Act a, Card tc = null, Point pos = null, bool pt = false)

cs
		RemoveCondition<ConInvisibility>();
		return true;
	}
	bool flag = true; 
	bool flag2 = true; 
	if (pt)
	{
		Act.forcePt = true;
		ForeachParty(delegate(Chara c) 
		if (flag) 
		{
			a.Perform(this, c, c.pos); 
		}); 
			ForeachEnemy(delegate(Chara c) 
			{ 
				a.Perform(this, c, c.pos); 
			}); 
		} 
		else
		{ 
			ForeachParty(delegate(Chara c) 
			{ 
				a.Perform(this, c, c.pos); 
			}); 
		} 
		Act.forcePt = false;
	}
	else

@@ -5376,10 +5397,10 @@ public bool UseAbility(Act a, Card tc = null, Point pos = null, bool pt = false)

cs
			}
			ActEffect.RapidCount = j;
			ActEffect.RapidDelay = a.RapidDelay;
			flag = a.Perform(this, tc, pos); 
			flag2 = a.Perform(this, tc, pos); 
		}
	}
	if (flag && !isDead && cost.cost > 0 && a.source.lvFactor > 0) 
	if (flag2 && !isDead && cost.cost > 0 && a.source.lvFactor > 0) 
	{
		ModExp(a.id, spellExp);
	}

@@ -5388,11 +5409,30 @@ public bool UseAbility(Act a, Card tc = null, Point pos = null, bool pt = false)

cs
	{
		AddCooldown(a.id, a.source.cooldown);
	}
	if (flag && !a.source.tag.Contains("keepInvisi") && EClass.rnd(2) == 0) 
	if (flag2 && !a.source.tag.Contains("keepInvisi") && EClass.rnd(2) == 0) 
	{
		RemoveCondition<ConInvisibility>();
	}
	return flag; 
	return flag2; 
	void ForeachEnemy(Action<Chara> action) 
	{ 
		if (_pts.Count == 0) 
		{ 
			for (int num8 = EClass._map.charas.Count - 1; num8 >= 0; num8--) 
			{ 
				Chara chara3 = EClass._map.charas[num8]; 
				if (chara3 != this && CanSeeLos(chara3) && chara3.IsHostile(this)) 
				{ 
					_pts.Add(chara3); 
				} 
			} 
		} 
		for (int num9 = _pts.Count - 1; num9 >= 0; num9--) 
		{ 
			action(_pts[num9]); 
		} 
		Debug.Log(_pts.Count); 
	} 
	void ForeachParty(Action<Chara> action)
	{
		if (_pts.Count == 0)

@@ -5655,7 +5695,7 @@ public void DoHostileAction(Card _tg, bool immediate = false)

cs
			{
				foreach (Chara member in EClass.pc.party.members)
				{
					if (member != EClass.pc && member.enemy == null) 
					if (member != EClass.pc && member.enemy == null && member.CanSee(chara)) 
					{
						member.SetEnemy(chara);
					}

@@ -5666,7 +5706,7 @@ public void DoHostileAction(Card _tg, bool immediate = false)

cs
		{
			foreach (Chara member2 in EClass.pc.party.members)
			{
				if (member2 != EClass.pc && member2.enemy == null) 
				if (member2 != EClass.pc && member2.enemy == null && member2.CanSee(this)) 
				{
					member2.SetEnemy(this);
				}

@@ -5746,7 +5786,7 @@ public bool FindNewEnemy()

cs
			}
			stealthSeen++;
		}
		else if (Los.IsVisible(pos.x, chara2.pos.x, pos.z, chara2.pos.z) && (!flag2 || EClass.pc.isBlind || EClass.pc.CanSeeLos(chara2)) && (!IsPCFaction || EClass.pc.ai.ShouldAllyAttack(chara2))) 
		else if (CanSeeLos(chara2) && (!flag2 || EClass.pc.isBlind || EClass.pc.CanSeeLos(chara2)) && (!IsPCFaction || EClass.pc.ai.ShouldAllyAttack(chara2))) 
		{
			if (!IsPCParty)
			{

@@ -6073,7 +6113,7 @@ public override string GetHoverText()

cs
	}
	if (EClass.pc.HasElement(481))
	{
		text2 += ("( " + faith.Name + ")").TagSize(14); 
		text2 += ("(" + faith.Name + ")").TagSize(14); 
	}
	return text + text2 + s;
}

CoreDebug

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

cs
	}
	if (Input.GetKeyDown(KeyCode.F2))
	{
		EClass.pc.body.GetSlot(45, onlyEmpty: false).thing.SetEncLv(EScriptable.rnd(100) - 50); 
		Chara targetChara = EClass.scene.mouseTarget.TargetChara;
		if (targetChara != null)
		{

ENC

@@ -54,12 +54,10 @@ public class ENC

cs

	public const int mod_scatter = 607;

	public const int encSpell = 411; 
	public const int bane_animal = 463; 

	public const int mod_precision = 605;

	public const int sustain_STR = 440; 

	public const int breathing = 429;

	public const int allNeckHunt = 428;

@@ -70,8 +68,6 @@ public class ENC

cs

	public const int negateConfusion = 425;

	public const int negateSleep = 424; 

	public const int negateFear = 423;

	public const int negateParalysis = 422;

@@ -84,6 +80,10 @@ public class ENC

cs

	public const int invisibility = 415;

	public const int encHit = 414; 

	public const int sustain_STR = 440; 

	public const int slowCorruption = 412;

	public const int throwReturn = 410;

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

cs

	public const int resWeather = 408;

	public const int mod_drill = 606; 
	public const int travelSpeed = 407; 

	public const int resMutation = 406;

@@ -108,15 +108,15 @@ public class ENC

cs

	public const int negateTeleport = 400;

	public const int sustain_END = 441; 
	public const int mod_drill = 606; 

	public const int sustain_DEX = 442; 
	public const int encSpell = 411; 

	public const int travelSpeed = 407; 
	public const int sustain_END = 441; 

	public const int slot_rune = 484; 
	public const int negateSleep = 424; 

	public const int mod_ammo_recover = 604; 
	public const int optimizeMana = 483; 

	public const int mod_ammo_knockback = 603;

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

cs

	public const int mod_ammo = 600;

	public const int optimizeMana = 483; 
	public const int slot_rune = 484; 

	public const int force_weapon = 482;

@@ -136,17 +136,15 @@ public class ENC

cs

	public const int bane_all = 468;

	public const int bane_god = 466; 
	public const int bane_fish = 467; 

	public const int bane_machine = 465; 
	public const int bane_god = 466; 

	public const int bane_man = 464;

	public const int bane_fish = 467; 

	public const int bane_fairy = 462;

	public const int bane_undead = 461; 
	public const int bane_machine = 465; 

	public const int bane_dragon = 460;

@@ -154,24 +152,28 @@ public class ENC

cs

	public const int sustain_MAG = 446;

	public const int bane_animal = 463; 
	public const int mod_ammo_recover = 604; 

	public const int sustain_WIL = 445;

	public const int bane_undead = 461; 

	public const int sustain_LER = 444;

	public const int sustain_PER = 443;

	public static readonly int[] IDS = new int[81] 
	public const int sustain_DEX = 442; 

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

ElementContainer

@@ -763,9 +763,15 @@ public void AddNote(UINote n, Func<Element, bool> isValid = null, Action onAdd =

cs
				text = (flag6 ? "textEncSkill" : (flag7 ? "textEncEnc" : "textEnc")).lang(name, num + (e.source.tag.Contains("ratio") ? "%" : ""), ((e.Value > 0) ? "encIncrease" : "encDecrease").lang());
			}
			int num3 = ((!(e is Resistance)) ? 1 : 0);
			int num4 = 5; 
			if (e.id == 484) 
			{ 
				num3 = 0; 
				num4 = 1; 
			} 
			if (!flag && !flag2 && !e.source.tag.Contains("flag"))
			{
				text = text + " [" + "*".Repeat(Mathf.Clamp(num * e.source.mtp / 5 + num3, 1, 5)) + ((num * e.source.mtp / 5 + num3 > 5) ? "+" : "") + "]"; 
				text = text + " [" + "*".Repeat(Mathf.Clamp(num * e.source.mtp / num4 + num3, 1, 5)) + ((num * e.source.mtp / num4 + num3 > 5) ? "+" : "") + "]"; 
			}
			if (e.HasTag("hidden"))
			{

FACTION

@@ -4,31 +4,29 @@

cs

public class FACTION
{
	public const int bfHill = 3603; 

	public const int bfCave = 3500; 

	public const int bfPlain = 3600;

	public const int bfForest = 3601;

	public const int bfSnow = 3602;

	public const int bfRuin = 3702; 

	public const int bfHill = 3603; 

	public const int bfFertile = 3700;

	public const int bfSea = 3605;

	public const int bfBeach = 3604;

	public const int bfCave = 3500; 
	public const int fRation = 2207; 

	public const int bfGeyser = 3701;

	public const int fRation = 2207; 

	public const int actBuildCollect = 4004; 
	public const int fAttraction = 2206; 

	public const int fSafety = 2205; 
	public const int fLoyal = 2117; 

	public const int fFood = 2204;

@@ -38,37 +36,43 @@ public class FACTION

cs

	public const int fElec = 2201;

	public const int bfTranquil = 3703; 

	public const int fSoil = 2200;

	public const int fLuck = 2118; 

	public const int fConstruction = 2003; 

	public const int bfRuin = 3702; 

	public const int fHeirloom = 2120;

	public const int fTaxEvasion = 2119;

	public const int fLuck = 2118; 

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

	public const int fAttraction = 2206; 
	public const int fEducation = 2116; 

	public const int bfVolcano = 3704; 
	public const int fSafety = 2205; 

	public const int bfCoal = 3800; 
	public const int bfTranquil = 3703; 

	public const int bfFish = 3706;

	public const int actBuildRecipe = 4005; 
	public const int bfHunt = 3705; 

	public const int actBuildInspect = 4006;

	public const int actBuildRecipe = 4005; 

	public const int actBuildCollect = 4004; 

	public const int actBuildAnywhere = 4003; 

	public const int actBuildTerrain = 4002;

	public const int actBuildMine = 4001;

	public const int fEducation = 2116; 

	public const int actBuildCut = 4000; 
	public const int bfVolcano = 3704; 

	public const int bfStart = 3900;

@@ -78,44 +82,40 @@ public class FACTION

cs

	public const int bfGum = 3803;

	public const int bfHunt = 3705; 

	public const int bfSilica = 3802; 
	public const int actBuildCut = 4000; 

	public const int actBuildAnywhere = 4003; 
	public const int bfMushroom = 3801; 

	public const int bfLandmark5 = 3784; 
	public const int bfSilica = 3802; 

	public const int bfLandmark4 = 3783; 
	public const int bfFreshAir = 3708; 

	public const int bfLandmark3 = 3782; 
	public const int bfBasin = 3709; 

	public const int bfLandmark2 = 3781; 
	public const int bfBreed = 3710; 

	public const int bfLandmark1 = 3780;

	public const int bfBreed = 3710; 

	public const int bfBasin = 3709; 
	public const int bfMonster = 3707; 

	public const int bfFreshAir = 3708; 
	public const int bfLandmark3 = 3782; 

	public const int bfMonster = 3707; 
	public const int bfLandmark4 = 3783; 

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

	public const int fAdmin = 2115; 
	public const int bfCoal = 3800; 

	public const int fConstruction = 2003; 
	public const int bfLandmark2 = 3781; 

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

FEAT

@@ -3,22 +3,6 @@

cs

public class FEAT
{
	public const int featUndead = 1210; 

	public const int featMartial = 1635; 

	public const int featNegotiate = 1634; 

	public const int featSpotting = 1633; 

	public const int featEvade = 1632; 

	public const int featDefense = 1631; 

	public const int featHardy = 1630; 

	public const int featSPD = 1629; 

	public const int featLuck = 1628;

	public const int featCHA = 1627;

@@ -27,10 +11,10 @@ public class FEAT

cs

	public const int featMAG = 1625;

	public const int featFaith = 1636; 

	public const int featLER = 1624;

	public const int featPER = 1623; 

	public const int featEND = 1622;

	public const int featDEX = 1621;

@@ -39,7 +23,7 @@ public class FEAT

cs

	public const int featStamina = 1612;

	public const int featMana = 1611; 
	public const int featLuckyCat = 1412; 

	public const int featLife = 1610;

@@ -53,38 +37,30 @@ public class FEAT

cs

	public const int featWitch = 1417;

	public const int featPER = 1623; 

	public const int featAnimalLover = 1640; 

	public const int featResCurse = 1641; 

	public const int featSleeper = 1642; 

	public const int featFluffyTail = 1209; 

	public const int featSlowFood = 1200; 
	public const int featInquisitor = 1416; 

	public const int featManaBond = 1201; 
	public const int featFoxMaid = 1415; 

	public const int featFastLearner = 1202; 
	public const int featWhiteVixen = 1414; 

	public const int featGrowParts = 1203; 
	public const int featFairysan = 1413; 

	public const int featFairyWeak = 1204; 
	public const int featSPD = 1629; 

	public const int featCannibalism = 1205; 
	public const int featMana = 1611; 

	public const int featMelilithCurse = 1206; 
	public const int featHardy = 1630; 

	public const int featFoxBless = 1207; 
	public const int featParty = 1645; 

	public const int featFoxLearn = 1208; 
	public const int featEvade = 1632; 

	public const int featChef = 1658; 
	public const int featEarthStrength = 1411; 

	public const int featManaCost = 1657;

	public const int featScavenger = 1656; 

	public const int featModelBeliever = 1655;

	public const int featHeavyCasting = 1654;

@@ -99,25 +75,55 @@ public class FEAT

cs

	public const int featDefender = 1649;

	public const int featRapidMagic = 1648; 
	public const int featDefense = 1631; 

	public const int featSummoner = 1647; 
	public const int featRapidMagic = 1648; 

	public const int featLonelySoul = 1646;

	public const int featParty = 1645; 

	public const int featBodyParts = 1644;

	public const int featSorter = 1643;

	public const int featInquisitor = 1416; 
	public const int featSleeper = 1642; 

	public const int featFoxMaid = 1415; 
	public const int featResCurse = 1641; 

	public const int featScavenger = 1656; 
	public const int featAnimalLover = 1640; 

	public const int featFairysan = 1413; 
	public const int featFaith = 1636; 

	public const int featMartial = 1635; 

	public const int featNegotiate = 1634; 

	public const int featSpotting = 1633; 

	public const int featSummoner = 1647; 

	public const int featReboot = 1410; 

	public const int featChef = 1658; 

	public const int featPaladin2 = 1408; 

	public const int featShiva = 1224; 

	public const int featLoyal = 1225; 

	public const int featUnderground = 1226; 

	public const int featServant = 1227; 

	public const int featDemigod = 1228; 

	public const int featLittleOne = 1229; 

	public const int featAdam = 1230; 

	public const int featNirvana = 1231; 

	public const int featCosmicHorror = 1233; 

	public const int featHeavyEater = 1234;

@@ -131,6 +137,8 @@ public class FEAT

cs

	public const int featGod_element1 = 1300;

	public const int featGod_earth1 = 1305; 

	public const int featGod_wind1 = 1310;

	public const int featGod_machine1 = 1315;

@@ -141,31 +149,39 @@ public class FEAT

cs

	public const int featGod_luck1 = 1330;

	public const int featAcidBody = 1223; 

	public const int featGod_harmony1 = 1335;

	public const int featGod_oblivion1 = 1340; 
	public const int featSplit = 1222; 

	public const int featGod_trickery1 = 1345; 
	public const int featFate = 1220; 

	public const int featGod_moonshadow1 = 1350; 
	public const int featBoost = 1409; 

	public const int featGod_strife1 = 1355; 
	public const int featSlowFood = 1200; 

	public const int featWarrior = 1400; 
	public const int featManaBond = 1201; 

	public const int featThief = 1401; 
	public const int featFastLearner = 1202; 

	public const int featWizard = 1402; 
	public const int featGrowParts = 1203; 

	public const int featCosmicHorror = 1233; 
	public const int featFairyWeak = 1204; 

	public const int featBaby = 1232; 
	public const int featCannibalism = 1205; 

	public const int featNirvana = 1231; 
	public const int featMelilithCurse = 1206; 

	public const int featAdam = 1230; 
	public const int featFoxBless = 1207; 

	public const int featWhiteVixen = 1414; 
	public const int featFoxLearn = 1208; 

	public const int featFluffyTail = 1209; 

	public const int featUndead = 1210; 

	public const int featSnail = 1211; 

	public const int featFairyResist = 1212;

@@ -183,64 +199,48 @@ public class FEAT

cs

	public const int featElderCrab = 1219;

	public const int featFarmer = 1403; 

	public const int featFate = 1220; 

	public const int featSplit = 1222; 

	public const int featSnail = 1211; 
	public const int featSpike = 1221; 

	public const int featAcidBody = 1223; 
	public const int featGod_oblivion1 = 1340; 

	public const int featShiva = 1224; 
	public const int featBaby = 1232; 

	public const int featLoyal = 1225; 
	public const int featGod_moonshadow1 = 1350; 

	public const int featUnderground = 1226; 
	public const int featGod_trickery1 = 1345; 

	public const int featServant = 1227; 
	public const int featGod_strife1 = 1355; 

	public const int featDemigod = 1228; 
	public const int featWarrior = 1400; 

	public const int featLittleOne = 1229; 
	public const int featThief = 1401; 

	public const int featSpike = 1221; 
	public const int featFarmer = 1403; 

	public const int featArcher = 1404;

	public const int featGod_earth1 = 1305; 

	public const int featTourist = 1406; 

	public const int featPianist = 1405;

	public const int featPaladin2 = 1408; 

	public const int featReboot = 1410; 

	public const int featEarthStrength = 1411; 

	public const int featBoost = 1409; 
	public const int featTourist = 1406; 

	public const int featLuckyCat = 1412; 
	public const int featWizard = 1402; 

	public const int featPaladin = 1407;

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

FOOD

@@ -1,22 +1,22 @@

cs
public class FOOD
{
	public const int gainWeight = 705; 
	public const int food_CHA = 700; 

	public const int food_bug = 704; 
	public const int food_cat = 701; 

	public const int food_love = 703; 
	public const int food_god = 758; 

	public const int justcooked = 757; 

	public const int food_poison = 702;

	public const int food_cat = 701; 
	public const int gainWeight = 705; 

	public const int justcooked = 757; 
	public const int food_bug = 704; 

	public const int food_god = 758; 
	public const int food_love = 703; 

	public const int loseWeight = 706;

	public const int food_CHA = 700; 

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

FactionBranch

@@ -1613,7 +1613,7 @@ public void UpdateReqruits(bool clear = false)

cs
	for (int j = 0; j < num2; j++)
	{
		Chara chara = CharaGen.CreateFromFilter("c_neutral", ContentLV + Mathf.Min(EClass.player.stats.days, 10));
		if (chara.isBackerContent) 
		if (chara.isBackerContent || chara.source.quality != 0) 
		{
			j--;
		}

Game

@@ -460,6 +460,7 @@ public void OnLoad()

cs
			questDebt.stage = 5;
		}
	}
	TryAddQuest("into_darkness", "exile_kettle"); 
	if (version.IsBelow(0, 23, 72))
	{
		foreach (Chara value2 in EClass.game.cards.globalCharas.Values)

@@ -494,10 +495,6 @@ public void OnLoad()

cs
	{
		TryAddQuestIfActive("demitas_spellwriter", "into_darkness");
	}
	if (version.IsBelow(0, 22, 91)) 
	{ 
		TryAddQuest("into_darkness", "exile_kettle"); 
	} 
	if (version.IsBelow(0, 22, 86))
	{
		Chara chara = cards.globalCharas.Find("demitas");

GoalCombat

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

cs
				tc = (owner.enemy = null);
			}
		}
		if (tc == null || tc.isDead || !tc.ExistsOnMap || !tc.pos.IsInBounds || lostCount >= (owner.IsPowerful ? 50 : 5)) 
		if (tc == null || tc.isDead || !tc.ExistsOnMap || !tc.pos.IsInBounds || lostCount >= (owner.IsPowerful ? 50 : 5) || !owner.CanSee(tc)) 
		{
			tc = (owner.enemy = null);
			if (owner.IsPC && EClass.game.config.autoCombat.abortOnKill)

@@ -514,9 +514,9 @@ public virtual bool TryUseAbility(int dist, bool beforeMove = false)

cs
			break;
		case "taunt":
		{
			bool flag7 = owner.HasCondition<StanceTaunt>(); 
			bool flag8 = tactics.source.taunt != -1 && 100 * owner.hp / owner.MaxHP >= tactics.source.taunt; 
			num = ((flag7 && !flag8) ? 100 : ((!flag7 && flag8) ? 100 : 0)); 
			bool flag6 = owner.HasCondition<StanceTaunt>(); 
			bool flag7 = tactics.source.taunt != -1 && 100 * owner.hp / owner.MaxHP >= tactics.source.taunt; 
			num = ((flag6 && !flag7) ? 100 : ((!flag6 && flag7) ? 100 : 0)); 
			break;
		}
		case "melee":

@@ -595,16 +595,20 @@ public virtual bool TryUseAbility(int dist, bool beforeMove = false)

cs
			{
				continue;
			}
			bool flag9 = text == "dot"; 
			if (flag9 && (owner.isRestrained || (tc != null && tc.IsRestrainedResident))) 
			bool flag8 = text == "dot"; 
			if (flag8 && (owner.isRestrained || (tc != null && tc.IsRestrainedResident))) 
			{
				continue;
			}
			num = ((text == "attackMelee") ? tactics.P_Melee : tactics.P_Spell) + GetAttackMod(act);
			if (num > 0 && flag9) 
			if (num > 0 && flag8) 
			{
				num += 10;
			}
			if (ability.aiPt) 
			{ 
				ability.pt = true; 
			} 
			break;
		}
		case "attackArea":

@@ -613,13 +617,13 @@ public virtual bool TryUseAbility(int dist, bool beforeMove = false)

cs
			{
				continue;
			}
			bool flag6 = ability.act is ActBolt; 
			bool flag9 = ability.act is ActBolt; 
			if (!flag || (owner.IsPCParty && (EClass._zone.IsTown || EClass._zone.IsPCFaction)) || (act.id == 9150 && EClass._zone.IsPCFaction && owner.IsNeutralOrAbove()))
			{
				continue;
			}
			GetNumEnemy(flag6 ? 6 : 5); 
			if (numEnemy == 0 || (owner.IsPCFactionOrMinion && GetNumNeutral(flag6 ? 6 : 5) > 0)) 
			GetNumEnemy(flag9 ? 6 : 5); 
			if (numEnemy == 0 || (owner.IsPCFactionOrMinion && GetNumNeutral(flag9 ? 6 : 5) > 0)) 
			{
				continue;
			}

@@ -636,8 +640,8 @@ public virtual bool TryUseAbility(int dist, bool beforeMove = false)

cs
		case "buffStats":
			num = ForeachChara(ability, delegate(Chara c)
			{
				Element buffStats = c.GetBuffStats(s.proc[1]); 
				return (buffStats == null || buffStats.Value < 0) ? tactics.P_Buff : 0; 
				Element buffStats2 = c.GetBuffStats(s.proc[1]); 
				return (buffStats2 == null || buffStats2.Value < 0) ? tactics.P_Buff : 0; 
			}, isFriendlyAbility: true);
			if (ability.aiPt || (owner.IsPC && tactics.CastPartyBuff))
			{

@@ -650,6 +654,10 @@ public virtual bool TryUseAbility(int dist, bool beforeMove = false)

cs
				continue;
			}
			num = tactics.P_Debuff;
			if (ability.aiPt) 
			{ 
				ability.pt = true; 
			} 
			break;
		case "debuffStats":
			if (!flag)

@@ -658,9 +666,13 @@ public virtual bool TryUseAbility(int dist, bool beforeMove = false)

cs
			}
			num = ForeachChara(ability, delegate(Chara c)
			{
				Element buffStats2 = c.GetBuffStats(s.proc[1]); 
				return (buffStats2 == null || buffStats2.Value > 0) ? tactics.P_Debuff : 0; 
				Element buffStats = c.GetBuffStats(s.proc[1]); 
				return (buffStats == null || buffStats.Value > 0) ? tactics.P_Debuff : 0; 
			}, isFriendlyAbility: false);
			if (ability.aiPt) 
			{ 
				ability.pt = true; 
			} 
			break;
		case "ground":
			if (!flag || owner.isRestrained || (tc != null && tc.IsRestrainedResident))

@@ -833,29 +845,7 @@ int HealFactor(Chara c)

cs
			continue;
		}
		Cost cost = ability2.act.GetCost(owner);
		if (owner.IsPCParty && ability2.pt && !ability2.act.TargetType.ForceParty && cost.cost * EClass.pc.party.members.Count > owner.mana.value) 
		{ 
			continue; 
		} 
		if (isPCFaction && cost.cost > 0) 
		{ 
			switch (cost.type) 
			{ 
			case CostType.MP: 
				if (cost.cost > owner.mana.value) 
				{ 
					continue; 
				} 
				break; 
			case CostType.SP: 
				if (cost.cost > owner.stamina.value) 
				{ 
					continue; 
				} 
				break; 
			} 
		} 
		if (cost.cost > 0 && EClass.rnd(100) > tactics.AbilityChance) 
		if ((owner.IsPCParty && ability2.pt && !ability2.act.IsTargetHostileParty() && !ability2.act.TargetType.ForceParty && cost.cost * EClass.pc.party.members.Count > owner.mana.value) || (cost.cost > 0 && EClass.rnd(100) > tactics.AbilityChance)) 
		{
			continue;
		}

HotItemHeld

@@ -39,14 +39,14 @@ public static bool CanRotate()

cs
	{
		return false;
	}
	if (EClass.pc.held.trait is TraitTile) 
	{ 
		return true; 
	} 
	if (taskBuild == null)
	{
		return false;
	}
	if (EClass.pc.held.trait is TraitTile) 
	{ 
		return true; 
	} 
	if (!taskBuild.CanPerform())
	{
		return false;

MUTATION

@@ -1,40 +1,32 @@

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

	public const int mutationSpeed = 1518; 
	public const int mutationRegen = 1516; 

	public const int mutationRegenN = 1517; 
	public const int etherPoisonHand = 1565; 

	public const int mutationRegen = 1516; 
	public const int mutationSkin = 1510; 

	public const int mutationSkinN = 1511;

	public const int mutationDex = 1514; 

	public const int mutationEye = 1512;

	public const int mutationSkin = 1510; 
	public const int mutationEyeN = 1513; 

	public const int mutationStr = 1520; 
	public const int mutationDex = 1514; 

	public const int mutationDexN = 1515;

	public const int mutationStrN = 1521; 

	public const int mutationEyeN = 1513; 

	public const int mutationChaN = 1523; 
	public const int mutationRegenN = 1517; 

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

	public const int mutationCha = 1522; 
	public const int mutationSpeedN = 1519; 

	public const int etherProvoke = 1563;

	public const int etherArmor = 1562;

	public const int etherStupid = 1561; 
	public const int mutationSpeed = 1518; 

	public const int etherWeak = 1560;

@@ -50,38 +42,46 @@ public class MUTATION

cs

	public const int etherWing = 1554;

	public const int etherManaBattery = 1564; 
	public const int etherEye = 1553; 

	public const int etherFeet = 1552;

	public const int etherUgly = 1551;

	public const int etherGravity = 1550; 
	public const int etherStupid = 1561; 

	public const int mutationBodyN = 1531; 
	public const int mutationStrN = 1521; 

	public const int mutationBody = 1530; 
	public const int mutationStr = 1520; 

	public const int mutationLightningN = 1529; 
	public const int mutationCha = 1522; 

	public const int mutationLightning = 1528; 
	public const int mutationChaN = 1523; 

	public const int mutationColdN = 1527; 
	public const int mutationBrainN = 1525; 

	public const int mutationCold = 1526;

	public const int mutationBrainN = 1525; 

	public const int mutationBrain = 1524;

	public const int etherEye = 1553; 
	public const int mutationLightning = 1528; 

	public const int mutationLightningN = 1529; 

	public const int mutationBody = 1530; 

	public const int mutationBodyN = 1531; 

	public const int mutationColdN = 1527; 

	public const int etherGravity = 1550; 

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

POLICY

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

cs

public class POLICY
{
	public const int forcePanty = 2712; 
	public const int bed_quality = 2812; 

	public const int platinum_ticket = 2815;

@@ -11,21 +11,21 @@ public class POLICY

cs

	public const int suite_room = 2813;

	public const int livestock_priv = 2715; 

	public const int tourist_safety = 2811; 
	public const int forcePanty = 2712; 

	public const int open_business = 2810;

	public const int home_discount = 2800;

	public const int livestock_priv = 2715; 

	public const int store_ripoff = 2816;

	public const int bed_quality = 2812; 
	public const int tourist_safety = 2811; 

	public const int store_premium = 2817;

	public const int celeb = 2822; 
	public const int license_stolen = 2824; 

	public const int license_furniture = 2819;

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

cs

	public const int legendary_heirloom = 2821;

	public const int legendary_exhibition = 2823; 
	public const int celeb = 2822; 

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

	public const int milk_fan = 2825;

@@ -49,53 +49,51 @@ public class POLICY

cs

	public const int incomeTransfer = 2711;

	public const int self_sufficient = 2511; 
	public const int nocturnal_life = 2508; 

	public const int noAnimal = 2709;

	public const int noMother = 2710; 

	public const int food_for_people = 2502; 
	public const int wealth_tax = 2500; 

	public const int faith_tax = 2501;

	public const int wealth_tax = 2500; 
	public const int food_for_people = 2502; 

	public const int prohibition = 2503; 
	public const int noMother = 2710; 

	public const int impressment = 2504;

	public const int legal_drug = 2505;

	public const int inquisition = 2507; 
	public const int human_right = 2506; 

	public const int nocturnal_life = 2508; 
	public const int inquisition = 2507; 

	public const int vaccination = 2509;

	public const int ban_radio = 2510;

	public const int self_sufficient = 2511; 

	public const int resident_tax = 2512;

	public const int human_right = 2506; 
	public const int prohibition = 2503; 

	public const int taxfree = 2514;

	public const int resident_wanted = 2513;

	public const int auto_farm = 2707; 

	public const int demon_invocation = 2706;

	public const int taxTransfer = 2705; 

	public const int noDM = 2708; 
	public const int auto_farm = 2707; 

	public const int weed_no = 2703;

	public const int trash_no = 2702; 

	public const int border_watch = 2704;

	public const int trash_sort = 2701; 
	public const int noDM = 2708; 

	public const int energy_conservation = 2700;

@@ -103,16 +101,18 @@ public class POLICY

cs

	public const int stop_growth = 2515;

	public const int trash_no = 2702; 
	public const int trash_sort = 2701; 

	public const int taxTransfer = 2705; 

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

RecipeCard

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

cs
		{
			if (ing2.trait is TraitRune)
			{
				thing.AddRune(ing2).dontConsumeSlot = true; 
				thing.AddRune(ing2); 
				thing.elements.SetBase(484, 1);
			}
		}

SKILL

@@ -1,6 +1,6 @@

cs
public class SKILL
{
	public const int tactics = 132; 
	public const int armorHeavy = 122; 

	public const int twowield = 131;

@@ -8,8 +8,6 @@ public class SKILL

cs

	public const int shield = 123;

	public const int armorHeavy = 122; 

	public const int acidproof = 51;

	public const int weaponBlunt = 111;

@@ -20,15 +18,15 @@ public class SKILL

cs

	public const int fireproof = 50;

	public const int marksman = 133; 
	public const int tactics = 132; 

	public const int armorLight = 120;

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

	public const int parasite = 227; 
	public const int evasionPlus = 151; 

	public const int evasion = 150; 
	public const int strategy = 135; 

	public const int climbing = 242;

@@ -42,15 +40,15 @@ public class SKILL

cs

	public const int digging = 230;

	public const int PDR = 55; 
	public const int parasite = 227; 

	public const int riding = 226; 
	public const int eyeofmind = 134; 

	public const int lumberjack = 225; 
	public const int riding = 226; 

	public const int mining = 220;

	public const int fishing = 245; 
	public const int spotting = 210; 

	public const int weightlifting = 207;

@@ -58,16 +56,20 @@ public class SKILL

cs

	public const int stealth = 152;

	public const int evasionPlus = 151; 
	public const int PDR = 55; 

	public const int strategy = 135; 
	public const int evasion = 150; 

	public const int lumberjack = 225; 

	public const int EDR = 56;

	public const int weaponSword = 101; 
	public const int throwing = 108; 

	public const int life = 60;

	public const int fishing = 245; 

	public const int mana = 61;

	public const int vigor = 62;

@@ -94,11 +96,11 @@ public class SKILL

cs

	public const int WIL = 75;

	public const int MAG = 76; 

	public const int evasionPerfect = 57;

	public const int CHA = 77; 
	public const int MAG = 76; 

	public const int LUC = 78; 

	public const int SPD = 79;

@@ -126,13 +128,11 @@ public class SKILL

cs

	public const int weaponDagger = 107;

	public const int throwing = 108; 

	public const int LUC = 78; 
	public const int CHA = 77; 

	public const int gathering = 250;

	public const int spotting = 210; 
	public const int weaponSword = 101; 

	public const int blacksmith = 256;

@@ -144,6 +144,8 @@ public class SKILL

cs

	public const int eleHoly = 919;

	public const int eleChaos = 920; 

	public const int eleMagic = 921;

	public const int eleEther = 922;

@@ -162,11 +164,11 @@ public class SKILL

cs

	public const int resLightning = 952;

	public const int resDarkness = 953; 

	public const int elePoison = 915;

	public const int resMind = 954; 
	public const int resDarkness = 953; 

	public const int resPoison = 955; 

	public const int resNether = 956;

@@ -188,28 +190,28 @@ public class SKILL

cs

	public const int resImpact = 965;

	public const int resDecay = 970; 

	public const int resDamage = 971;

	public const int resCurse = 972;

	public const int carpentry = 255;

	public const int resPoison = 955; 
	public const int resMind = 954; 

	public const int eleMind = 914;

	public const int eleChaos = 920; 
	public const int resDecay = 970; 

	public const int eleLightning = 912;

	public const int alchemy = 257; 
	public const int eleDarkness = 913; 

	public const int sculpture = 258;

	public const int jewelry = 259;

	public const int alchemy = 257; 

	public const int weaving = 260;

	public const int handicraft = 261;

@@ -222,9 +224,7 @@ public class SKILL

cs

	public const int farming = 286;

	public const int eleDarkness = 913; 

	public const int building = 288; 
	public const int cooking = 287; 

	public const int appraising = 289;

@@ -234,15 +234,15 @@ public class SKILL

cs

	public const int investing = 292;

	public const int cooking = 287; 
	public const int building = 288; 

	public const int regeneration = 300;

	public const int eleCold = 911;

	public const int disarmTrap = 293; 
	public const int eleFire = 910; 

	public const int env = 313; 
	public const int disarmTrap = 293; 

	public const int fun = 312;

@@ -250,9 +250,9 @@ public class SKILL

cs

	public const int hygine = 310;

	public const int eleFire = 910; 
	public const int memorization = 307; 

	public const int faith = 306; 
	public const int env = 313; 

	public const int magicDevice = 305;

@@ -262,26 +262,26 @@ public class SKILL

cs

	public const int controlmana = 302;

	public const int memorization = 307; 

	public const int meditation = 301;

	public const int faith = 306; 

	public static readonly int[] IDS = new int[133]
	{
		132, 131, 130, 123, 122, 51, 111, 110, 109, 50, 
		133, 120, 134, 227, 150, 242, 241, 240, 237, 235, 
		230, 55, 226, 225, 220, 245, 207, 200, 152, 151, 
		135, 56, 101, 60, 61, 62, 64, 65, 66, 67, 
		68, 70, 71, 72, 73, 74, 75, 76, 57, 77, 
		79, 80, 90, 91, 92, 93, 100, 102, 103, 104, 
		105, 106, 107, 108, 78, 250, 210, 256, 916, 917, 
		918, 919, 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, 
		920, 912, 257, 258, 259, 260, 261, 280, 281, 285, 
		286, 913, 288, 289, 290, 291, 292, 287, 300, 911, 
		293, 313, 312, 311, 310, 910, 306, 305, 304, 303, 
		302, 307, 301
		122, 131, 130, 123, 51, 111, 110, 109, 50, 132, 
		120, 133, 151, 135, 242, 241, 240, 237, 235, 230, 
		227, 134, 226, 220, 210, 207, 200, 152, 55, 150, 
		225, 56, 108, 60, 245, 61, 62, 64, 65, 66, 
		67, 68, 70, 71, 72, 73, 74, 75, 57, 76, 
		78, 79, 80, 90, 91, 92, 93, 100, 102, 103, 
		104, 105, 106, 107, 77, 250, 101, 256, 916, 917, 
		918, 919, 920, 921, 922, 923, 924, 925, 926, 950, 
		951, 952, 915, 953, 955, 956, 957, 958, 959, 960, 
		961, 962, 963, 964, 965, 971, 972, 255, 954, 914, 
		970, 912, 913, 258, 259, 257, 260, 261, 280, 281, 
		285, 286, 287, 289, 290, 291, 292, 288, 300, 911, 
		910, 293, 312, 311, 310, 307, 313, 305, 304, 303, 
		302, 301, 306
	};
}
public class Skill : Element

@@ -292,7 +292,11 @@ public class Skill : Element

cs

	public override bool CanLink(ElementContainer owner)
	{
		return !base.IsGlobalElement; 
		if (!base.IsGlobalElement) 
		{ 
			return !base.source.IsWeaponEnc; 
		} 
		return false; 
	}

	public override int GetSourcePotential(int v)

SLOT

@@ -1,40 +1,40 @@

cs
public class SLOT
{
	public const int arm = 34; 
	public const int finger = 36; 

	public const int hand = 35; 
	public const int lightsource = 45; 

	public const int finger = 36; 
	public const int toolbelt = 44; 

	public const int waist = 37; 
	public const int token = 43; 

	public const int leg = 38; 
	public const int ammo = 42; 

	public const int range = 41; 

	public const int tool = 40;

	public const int lightsource = 45; 
	public const int foot = 39; 

	public const int toolbelt = 44; 
	public const int leg = 38; 

	public const int range = 41; 
	public const int hand = 35; 

	public const int token = 43; 
	public const int waist = 37; 

	public const int back = 33;

	public const int foot = 39; 

	public const int torso = 32;

	public const int ammo = 42; 

	public const int neck = 31;

	public const int head = 30;

	public const int arm = 34; 

	public static readonly int[] IDS = new int[16]
	{
		34, 35, 36, 37, 38, 40, 45, 44, 41, 43, 
		33, 39, 32, 42, 31, 30
		36, 45, 44, 43, 42, 41, 40, 39, 38, 35, 
		37, 33, 32, 31, 30, 34
	};
}

SPELL

@@ -1,210 +1,226 @@

cs
public class SPELL
{
	public const int puddle_Nether = 50906; 
	public const int hand_Void = 50416; 

	public const int ball_Sound = 50107; 
	public const int arrow_Fire = 50500; 

	public const int bolt_Sound = 50307; 
	public const int arrow_Cold = 50501; 

	public const int hand_Sound = 50407; 
	public const int arrow_Lightning = 50502; 

	public const int ball_Void = 50116; 
	public const int arrow_Darkness = 50503; 

	public const int arrow_Mind = 50504; 

	public const int arrow_Poison = 50505; 

	public const int arrow_Nether = 50506; 

	public const int arrow_Sound = 50507;

	public const int funnel_Sound = 50607; 
	public const int arrow_Chaos = 50510; 

	public const int miasma_Sound = 50707; 
	public const int arrow_Holy = 50509; 

	public const int weapon_Sound = 50807; 
	public const int arrow_Magic = 50511; 

	public const int weapon_Nether = 50806; 
	public const int arrow_Ether = 50512; 

	public const int puddle_Sound = 50907; 
	public const int arrow_Acid = 50513; 

	public const int puddle_Impact = 50915; 
	public const int arrow_Cut = 50514; 

	public const int bolt_Nerve = 50308; 
	public const int arrow_Impact = 50515; 

	public const int hand_Nerve = 50408; 
	public const int arrow_Void = 50516; 

	public const int funnel_Fire = 50600; 

	public const int funnel_Cold = 50601; 

	public const int arrow_Nerve = 50508;

	public const int funnel_Nerve = 50608; 
	public const int funnel_Lightning = 50602; 

	public const int miasma_Nerve = 50708; 
	public const int hand_Cut = 50414; 

	public const int weapon_Nerve = 50808; 
	public const int hand_Acid = 50413; 

	public const int puddle_Nerve = 50908; 
	public const int hand_Fire = 50400; 

	public const int ball_Holy = 50109; 
	public const int bolt_Void = 50316; 

	public const int weapon_Impact = 50815; 
	public const int bolt_Impact = 50315; 

	public const int ball_Nerve = 50108; 
	public const int bolt_Cut = 50314; 

	public const int bolt_Holy = 50309; 
	public const int bolt_Acid = 50313; 

	public const int miasma_Nether = 50706; 
	public const int bolt_Ether = 50312; 

	public const int funnel_Nether = 50606; 
	public const int bolt_Magic = 50311; 

	public const int hand_Cold = 50401; 

	public const int hand_Lightning = 50402; 

	public const int hand_Darkness = 50403; 

	public const int hand_Mind = 50404;

	public const int arrow_Mind = 50504; 
	public const int hand_Poison = 50405; 

	public const int funnel_Mind = 50604; 
	public const int hand_Nether = 50406; 

	public const int miasma_Mind = 50704; 
	public const int hand_Sound = 50407; 

	public const int weapon_Mind = 50804; 
	public const int hand_Nerve = 50408; 

	public const int miasma_Void = 50716; 
	public const int hand_Holy = 50409; 

	public const int puddle_Mind = 50904; 
	public const int hand_Chaos = 50410; 

	public const int ball_Poison = 50105; 
	public const int hand_Magic = 50411; 

	public const int funnel_Void = 50616; 
	public const int hand_Ether = 50412; 

	public const int bolt_Poison = 50305; 
	public const int hand_Impact = 50415; 

	public const int bolt_Void = 50316; 
	public const int funnel_Darkness = 50603; 

	public const int hand_Poison = 50405; 
	public const int weapon_Lightning = 50802; 

	public const int funnel_Poison = 50605;

	public const int miasma_Poison = 50705; 

	public const int arrow_Void = 50516; 
	public const int weapon_Mind = 50804; 

	public const int weapon_Poison = 50805;

	public const int puddle_Poison = 50905; 
	public const int weapon_Nether = 50806; 

	public const int ball_Nether = 50106; 
	public const int weapon_Sound = 50807; 

	public const int hand_Void = 50416; 
	public const int weapon_Nerve = 50808; 

	public const int bolt_Nether = 50306; 
	public const int weapon_Holy = 50809; 

	public const int hand_Nether = 50406; 
	public const int weapon_Chaos = 50810; 

	public const int arrow_Nether = 50506; 
	public const int weapon_Magic = 50811; 

	public const int arrow_Poison = 50505; 
	public const int weapon_Ether = 50812; 

	public const int ball_Impact = 50115; 
	public const int weapon_Acid = 50813; 

	public const int hand_Holy = 50409; 
	public const int weapon_Cut = 50814; 

	public const int funnel_Holy = 50609; 
	public const int weapon_Impact = 50815; 

	public const int funnel_Ether = 50612; 
	public const int weapon_Void = 50816; 

	public const int miasma_Ether = 50712; 
	public const int weapon_Darkness = 50803; 

	public const int weapon_Ether = 50812; 
	public const int puddle_Fire = 50900; 

	public const int puddle_Ether = 50912; 
	public const int puddle_Lightning = 50902; 

	public const int ball_Acid = 50113; 
	public const int puddle_Darkness = 50903; 

	public const int hand_Impact = 50415; 
	public const int puddle_Mind = 50904; 

	public const int bolt_Acid = 50313; 
	public const int puddle_Poison = 50905; 

	public const int hand_Acid = 50413; 
	public const int puddle_Nether = 50906; 

	public const int arrow_Acid = 50513; 
	public const int puddle_Sound = 50907; 

	public const int funnel_Acid = 50613; 
	public const int puddle_Nerve = 50908; 

	public const int arrow_Ether = 50512; 
	public const int puddle_Holy = 50909; 

	public const int miasma_Acid = 50713; 
	public const int puddle_Chaos = 50910; 

	public const int puddle_Acid = 50913; 
	public const int puddle_Magic = 50911; 

	public const int ball_Cut = 50114; 
	public const int puddle_Ether = 50912; 

	public const int bolt_Impact = 50315; 
	public const int puddle_Acid = 50913; 

	public const int bolt_Cut = 50314; 
	public const int puddle_Cut = 50914; 

	public const int hand_Cut = 50414; 
	public const int puddle_Cold = 50901; 

	public const int arrow_Cut = 50514; 
	public const int funnel_Mind = 50604; 

	public const int funnel_Cut = 50614; 
	public const int bolt_Chaos = 50310; 

	public const int miasma_Cut = 50714; 
	public const int weapon_Fire = 50800; 

	public const int weapon_Cut = 50814; 
	public const int funnel_Nether = 50606; 

	public const int puddle_Cut = 50914; 
	public const int funnel_Sound = 50607; 

	public const int bolt_Mind = 50304; 
	public const int funnel_Nerve = 50608; 

	public const int arrow_Holy = 50509; 
	public const int funnel_Holy = 50609; 

	public const int hand_Ether = 50412; 
	public const int funnel_Chaos = 50610; 

	public const int arrow_Impact = 50515; 
	public const int funnel_Magic = 50611; 

	public const int miasma_Holy = 50709; 
	public const int funnel_Ether = 50612; 

	public const int weapon_Holy = 50809; 
	public const int funnel_Acid = 50613; 

	public const int puddle_Holy = 50909; 
	public const int funnel_Cut = 50614; 

	public const int ball_Chaos = 50110; 
	public const int funnel_Impact = 50615; 

	public const int miasma_Impact = 50715; 
	public const int funnel_Void = 50616; 

	public const int bolt_Chaos = 50310; 
	public const int miasma_Fire = 50700; 

	public const int hand_Chaos = 50410; 
	public const int miasma_Cold = 50701; 

	public const int arrow_Chaos = 50510; 
	public const int weapon_Cold = 50801; 

	public const int funnel_Chaos = 50610; 
	public const int miasma_Lightning = 50702; 

	public const int miasma_Chaos = 50710; 
	public const int miasma_Mind = 50704; 

	public const int bolt_Ether = 50312; 
	public const int miasma_Poison = 50705; 

	public const int weapon_Chaos = 50810; 
	public const int miasma_Nether = 50706; 

	public const int ball_Magic = 50111; 
	public const int miasma_Sound = 50707; 

	public const int funnel_Impact = 50615; 
	public const int miasma_Nerve = 50708; 

	public const int bolt_Magic = 50311; 
	public const int miasma_Holy = 50709; 

	public const int hand_Magic = 50411; 
	public const int miasma_Chaos = 50710; 

	public const int arrow_Magic = 50511; 
	public const int miasma_Magic = 50711; 

	public const int funnel_Magic = 50611; 
	public const int miasma_Ether = 50712; 

	public const int miasma_Magic = 50711; 
	public const int miasma_Acid = 50713; 

	public const int weapon_Magic = 50811; 
	public const int miasma_Cut = 50714; 

	public const int puddle_Magic = 50911; 
	public const int miasma_Impact = 50715; 

	public const int ball_Ether = 50112; 
	public const int miasma_Void = 50716; 

	public const int puddle_Chaos = 50910; 
	public const int miasma_Darkness = 50703; 

	public const int weapon_Acid = 50813; 
	public const int bolt_Holy = 50309; 

	public const int bolt_Fire = 50300; 
	public const int ball_Lightning = 50102; 

	public const int puddle_Darkness = 50903; 
	public const int bolt_Sound = 50307; 

	public const int SpMutation = 8380; 

	public const int SpWish = 8390;

@@ -250,20 +266,14 @@ public class SPELL

cs

	public const int SpSpeedUp = 8510;

	public const int SpSilence = 8700; 

	public const int SpWeakness = 8702; 

	public const int SpWeakResEle = 8704; 

	public const int SpMutation = 8380; 

	public const int SpBane = 8706; 

	public const int SpLevitate = 8300;

	public const int SpReconstruction = 8288; 

	public const int SpChangeMaterialG = 8286;

	public const int SpChangeMaterial = 8285; 

	public const int ball_ = 7001;

	public const int bolt_ = 7002;

@@ -286,9 +296,9 @@ public class SPELL

cs

	public const int SpReturn = 8220;

	public const int SpEvac = 8221; 
	public const int SpSilence = 8700; 

	public const int SpIdentify = 8230; 
	public const int SpEvac = 8221; 

	public const int SpIdentifyG = 8232;

@@ -312,73 +322,73 @@ public class SPELL

cs

	public const int SpChangeMaterialLesser = 8284;

	public const int SpChangeMaterial = 8285; 

	public const int SpReconstruction = 8288; 
	public const int SpIdentify = 8230; 

	public const int SpGravity = 8708; 
	public const int bolt_Nerve = 50308; 

	public const int SpSpeedDown = 8710; 
	public const int SpWeakness = 8702; 

	public const int SpTelepathy = 8770; 
	public const int SpBane = 8706; 

	public const int weapon_Fire = 50800; 
	public const int ball_Cold = 50101; 

	public const int puddle_Fire = 50900; 
	public const int ball_Darkness = 50103; 

	public const int ball_Cold = 50101; 
	public const int ball_Mind = 50104; 

	public const int bolt_Cold = 50301; 
	public const int ball_Poison = 50105; 

	public const int hand_Cold = 50401; 
	public const int ball_Nether = 50106; 

	public const int arrow_Cold = 50501; 
	public const int ball_Sound = 50107; 

	public const int funnel_Cold = 50601; 
	public const int ball_Nerve = 50108; 

	public const int miasma_Cold = 50701; 
	public const int ball_Holy = 50109; 

	public const int weapon_Cold = 50801; 
	public const int ball_Chaos = 50110; 

	public const int puddle_Cold = 50901; 
	public const int ball_Magic = 50111; 

	public const int ball_Lightning = 50102; 
	public const int ball_Ether = 50112; 

	public const int bolt_Lightning = 50302; 
	public const int ball_Acid = 50113; 

	public const int hand_Lightning = 50402; 
	public const int ball_Cut = 50114; 

	public const int arrow_Lightning = 50502; 
	public const int ball_Impact = 50115; 

	public const int funnel_Lightning = 50602; 
	public const int ball_Void = 50116; 

	public const int miasma_Lightning = 50702; 
	public const int puddle_Impact = 50915; 

	public const int weapon_Lightning = 50802; 
	public const int bolt_Fire = 50300; 

	public const int puddle_Lightning = 50902; 
	public const int bolt_Cold = 50301; 

	public const int ball_Darkness = 50103; 
	public const int bolt_Lightning = 50302; 

	public const int bolt_Darkness = 50303;

	public const int hand_Darkness = 50403; 
	public const int bolt_Mind = 50304; 

	public const int arrow_Darkness = 50503; 
	public const int bolt_Poison = 50305; 

	public const int funnel_Darkness = 50603; 
	public const int bolt_Nether = 50306; 

	public const int miasma_Darkness = 50703; 
	public const int ball_Fire = 50100; 

	public const int weapon_Darkness = 50803; 
	public const int SpDrawBacker = 9503; 

	public const int miasma_Fire = 50700; 
	public const int SpDrawMetal = 9502; 

	public const int funnel_Fire = 50600; 
	public const int SpDrawMonster = 9501; 

	public const int arrow_Fire = 50500; 
	public const int SpGravity = 8708; 

	public const int hand_Fire = 50400; 
	public const int SpSpeedDown = 8710; 

	public const int SpTelepathy = 8770; 

	public const int SpInvisibility = 8775;

@@ -396,18 +406,18 @@ public class SPELL

cs

	public const int SpSummon = 9000;

	public const int SpSummonUndeadSister = 9001; 
	public const int SpWeakResEle = 8704; 

	public const int SpSummonFire = 9002; 
	public const int SpSummonUndeadSister = 9001; 

	public const int SpSummonTentacle = 9003;

	public const int SpSummonMonster = 9004;

	public const int ball_Mind = 50104; 

	public const int SpSummonPawn = 9005;

	public const int SpSummonYeek = 9006; 

	public const int SpSummonOrc = 9007;

	public const int SpSummonShadow = 9050;

@@ -422,44 +432,34 @@ public class SPELL

cs

	public const int SpWardMonster = 9500;

	public const int SpDrawMonster = 9501; 

	public const int SpDrawMetal = 9502; 

	public const int SpDrawBacker = 9503; 

	public const int ball_Fire = 50100; 

	public const int weapon_Void = 50816; 

	public const int SpSummonYeek = 9006; 
	public const int SpSummonFire = 9002; 

	public const int puddle_Void = 50916;

	public static readonly int[] IDS = new int[218]
	{
		50906, 50107, 50307, 50407, 50116, 50507, 50607, 50707, 50807, 50806, 
		50907, 50915, 50308, 50408, 50508, 50608, 50708, 50808, 50908, 50109, 
		50815, 50108, 50309, 50706, 50606, 50404, 50504, 50604, 50704, 50804, 
		50716, 50904, 50105, 50616, 50305, 50316, 50405, 50605, 50705, 50516, 
		50805, 50905, 50106, 50416, 50306, 50406, 50506, 50505, 50115, 50409, 
		50609, 50612, 50712, 50812, 50912, 50113, 50415, 50313, 50413, 50513, 
		50613, 50512, 50713, 50913, 50114, 50315, 50314, 50414, 50514, 50614, 
		50714, 50814, 50914, 50304, 50509, 50412, 50515, 50709, 50809, 50909, 
		50110, 50715, 50310, 50410, 50510, 50610, 50710, 50312, 50810, 50111, 
		50615, 50311, 50411, 50511, 50611, 50711, 50811, 50911, 50112, 50910, 
		50813, 50300, 50903, 8390, 8400, 8401, 8402, 8403, 8404, 8405, 
		8406, 8430, 8450, 8470, 8471, 8480, 8490, 8491, 8500, 8501, 
		8502, 8503, 8504, 8506, 8510, 8700, 8702, 8704, 8380, 8706, 
		8300, 8286, 7001, 7002, 7003, 7004, 7005, 7006, 7007, 7800, 
		8200, 8201, 8220, 8221, 8230, 8232, 8240, 8241, 8250, 8251, 
		8255, 8256, 8260, 8280, 8281, 8284, 8285, 8288, 8708, 8710, 
		8770, 50800, 50900, 50101, 50301, 50401, 50501, 50601, 50701, 50801, 
		50901, 50102, 50302, 50402, 50502, 50602, 50702, 50802, 50902, 50103, 
		50303, 50403, 50503, 50603, 50703, 50803, 50700, 50600, 50500, 50400, 
		8775, 8776, 8780, 8790, 8791, 8800, 8801, 9000, 9001, 9002, 
		9003, 9004, 50104, 9005, 9007, 9050, 9150, 9151, 9160, 9200, 
		9500, 9501, 9502, 9503, 50100, 50816, 9006, 50916
		50416, 50500, 50501, 50502, 50503, 50504, 50505, 50506, 50507, 50510, 
		50509, 50511, 50512, 50513, 50514, 50515, 50516, 50600, 50601, 50508, 
		50602, 50414, 50413, 50400, 50316, 50315, 50314, 50313, 50312, 50311, 
		50401, 50402, 50403, 50404, 50405, 50406, 50407, 50408, 50409, 50410, 
		50411, 50412, 50415, 50603, 50802, 50605, 50804, 50805, 50806, 50807, 
		50808, 50809, 50810, 50811, 50812, 50813, 50814, 50815, 50816, 50803, 
		50900, 50902, 50903, 50904, 50905, 50906, 50907, 50908, 50909, 50910, 
		50911, 50912, 50913, 50914, 50901, 50604, 50310, 50800, 50606, 50607, 
		50608, 50609, 50610, 50611, 50612, 50613, 50614, 50615, 50616, 50700, 
		50701, 50801, 50702, 50704, 50705, 50706, 50707, 50708, 50709, 50710, 
		50711, 50712, 50713, 50714, 50715, 50716, 50703, 50309, 50102, 50307, 
		8380, 8390, 8400, 8401, 8402, 8403, 8404, 8405, 8406, 8430, 
		8450, 8470, 8471, 8480, 8490, 8491, 8500, 8501, 8502, 8503, 
		8504, 8506, 8510, 8300, 8288, 8286, 8285, 7001, 7002, 7003, 
		7004, 7005, 7006, 7007, 7800, 8200, 8201, 8220, 8700, 8221, 
		8232, 8240, 8241, 8250, 8251, 8255, 8256, 8260, 8280, 8281, 
		8284, 8230, 50308, 8702, 8706, 50101, 50103, 50104, 50105, 50106, 
		50107, 50108, 50109, 50110, 50111, 50112, 50113, 50114, 50115, 50116, 
		50915, 50300, 50301, 50302, 50303, 50304, 50305, 50306, 50100, 9503, 
		9502, 9501, 8708, 8710, 8770, 8775, 8776, 8780, 8790, 8791, 
		8800, 8801, 9000, 8704, 9001, 9003, 9004, 9005, 9006, 9007, 
		9050, 9150, 9151, 9160, 9200, 9500, 9002, 50916
	};
}
public class Spell : Ability

SlaverData

@@ -19,7 +19,7 @@ public void TryRefresh(Chara owner)

cs
	int num = 4 + EClass.rnd(4);
	for (int i = 0; i < num; i++)
	{
		Chara item = ((owner.trait.SlaverType != SlaverType.Animal) ? CharaGen.Create(SpawnListChara.Get("slaver_human", (SourceChara.Row s) => EClass.sources.races.map[s.race].tag.Contains("human")).Select().id) : ((!(EClass._zone is Zone_Yowyn) || EClass.rnd(3) == 0) ? CharaGen.Create(SpawnListChara.Get("slaver_animal", (SourceChara.Row s) => EClass.sources.races.map[s.race].tag.Contains("animal")).Select().id) : CharaGen.Create(SpawnListChara.Get("slaver_horse", (SourceChara.Row s) => s.id == "horse_yowyn").Select().id))); 
		Chara item = ((owner.trait.SlaverType != SlaverType.Animal) ? CharaGen.Create(SpawnListChara.Get("slaver_human", (SourceChara.Row s) => EClass.sources.races.map[s.race].tag.Contains("human") && s.quality == 0).Select().id) : ((!(EClass._zone is Zone_Yowyn) || EClass.rnd(3) == 0) ? CharaGen.Create(SpawnListChara.Get("slaver_animal", (SourceChara.Row s) => EClass.sources.races.map[s.race].tag.Contains("animal") && s.quality == 0).Select().id) : CharaGen.Create(SpawnListChara.Get("slaver_horse", (SourceChara.Row s) => s.id == "horse_yowyn").Select().id))); 
		list.Add(item);
	}
	dateRefresh = EClass.world.date.GetRaw(168);

SocketData

@@ -50,18 +50,6 @@ public int value

cs
		}
	}

	public bool dontConsumeSlot 
	{ 
		get 
		{ 
			return bits[0]; 
		} 
		set 
		{ 
			bits[0] = value; 
		} 
	} 

	[OnSerializing]
	private void _OnSerializing(StreamingContext context)
	{

TraitRuneMold

@@ -8,6 +8,8 @@ public class TraitRuneMold : TraitCrafter

cs

	public override string idSoundProgress => "craft_sculpt";

	public override bool HoldAsDefaultInteraction => false; 

	public override bool IsConsumeIng => false;

	public override bool CloseOnComplete => true;

WindowChara

@@ -666,20 +666,17 @@ public void RefreshSkill(int idTab)

cs
			}
			else
			{
				switch (a.id) 
				if (a.vSource != 0) 
				{
				case 55: 
				case 56: 
				case 57: 
				case 68: 
				case 90: 
				case 91: 
				case 93: 
					if (a.vSource != 0) 
					if (a.source.IsWeaponEnc) 
					{ 
						return true; 
					} 
					int id = a.id; 
					if ((uint)(id - 55) <= 2u || id == 68 || id == 93) 
					{
						return true;
					}
					break; 
				}
				if ((a.owner == chara.elements && a.vLink == 0 && !a.IsFactionElement(chara)) || a.source.category == "resist")
				{