Skip to content

EA 23.257 Nightly Patch 2

January 10, 2026

29 files modified. 3 new files created.

Important Changes

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

BaseCondition (1)

cs
public bool TryNullify(Condition c) 
public virtual bool TryNullify(Condition c) 

Religion (1)

cs
public bool IsValidArtifact(string id) 
public static Religion GetArtifactDeity(string id) 

RendererReplacer (1)

cs
public static RendererReplacer CreateFrom(string id, int shift = 0) 
public static RendererReplacer CreateFrom(string id, int shift = 0, int mat = -1) 

ACT

public virtual bool ShowMouseHint(Card c)

cs

	public virtual bool IsValidTC(Card c)
	{
		if (!c.isChara) 
		if (!c.isChara || c.Chara.mimicry != null) 
		{
			return c.trait.CanBeAttacked;
		}

public bool CanPerform(Chara _cc, Card _tc = null, Point _tp = null)

cs
			}
		}
	}
	if (!(this is ActMelee) && tt.Range == TargetRange.Chara && (TC == null || !CC.CanSee(TC))) 
	if (!(this is ActMelee) && tt.Range == TargetRange.Chara && (TC == null || !CC.CanSee(TC) || TC.Chara?.mimicry != null)) 
	{
		return false;
	}

AI_Goto

public Status TryGoTo()

cs
		{
			return Status.Running;
		}
		if (moveResult == Card.MoveResult.Fail || moveResult == Card.MoveResult.Door) 
		if (moveResult == Card.MoveResult.Fail || (uint)(moveResult - 2) <= 1u) 
		{
			if (owner.IsPC && ActionMode.IsAdv)
			{

AI_Idle

public override IEnumerable<Status> Run()

cs
				}
			}
		}
		if (!EClass._zone.IsRegion && owner.id == "mimic" && EClass.rnd(5) == 0 && owner.mimicry == null) 
		{ 
			owner.UseAbility(8794, owner); 
		} 
		Party party = owner.party;
		if (party == null || party.leader == owner || !party.leader.IsAliveInCurrentZone || owner.host != null || !EClass._zone.PetFollow)
		{

public override IEnumerable<Status> Run()

cs
	string aiIdle = owner.source.aiIdle;
	if (!(aiIdle == "stand") && !(aiIdle == "root"))
	{
		if (EClass.rnd(15) == 0) 
		if (EClass.rnd(15) == 0 && owner.mimicry == null) 
		{
			owner.MoveRandom();
		}

AM_Adv

public override void OnRenderTile(Point point, HitResult result, int dir)

cs
	}
	foreach (Chara chara in EClass._map.charas)
	{
		if (chara.isSynced && chara.IsHostile(EClass.pc) && !chara.IsMultisize && EClass.pc.CanSee(chara)) 
		if (chara.isSynced && chara.IsHostile(EClass.pc) && !chara.IsMultisize && EClass.pc.CanSee(chara) && chara.mimicry == null) 
		{
			Vector3 vector = chara.pos.Position();
			EClass.screen.guide.passGuideFloor.Add(vector.x, vector.y, vector.z - 0.01f, 23f, 0.3f);

AM_MoveInstalled

public Card GetTarget(Point point)

cs

	public bool CanPutAway()
	{
		if (target == null) 
		{ 
			return false; 
		} 
		if (target.HasTag(CTAG.godArtifact)) 
		{ 
			return false; 
		} 
		if (EClass.debug.ignoreBuildRule)
		{
			return true;
		}
		if (target == null || target.isChara || target.trait.CanOnlyCarry) 
		if (target.isChara || target.trait.CanOnlyCarry) 
		{
			return false;
		}

ActEffect

void AddCon<T>(int rate, int power) where T : Condition

cs
			return;
		}
		List<Chara> list3 = new List<Chara>();
		bool flag5 = false; 
		bool flag6 = false; 
		foreach (Chara chara2 in EClass._map.charas)
		{
			if (!chara2.IsPCFactionOrMinion && chara2.id == "littleOne")
			{
				if (flag5) 
				if (flag6) 
				{
					flag5 = false; 
					flag6 = false; 
					continue;
				}
				list3.Add(chara2);
				flag5 = true; 
				flag6 = true; 
			}
		}
		if (list3.Count == 0)

void AddCon<T>(int rate, int power) where T : Condition

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

void AddCon<T>(int rate, int power) where T : Condition

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

void AddCon<T>(int rate, int power) where T : Condition

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

void AddCon<T>(int rate, int power) where T : Condition

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

void AddCon<T>(int rate, int power) where T : Condition

cs
		Element orCreateElement2 = tc.elements.GetOrCreateElement(65);
		Element orCreateElement3 = tc.elements.GetOrCreateElement(67);
		Element orCreateElement4 = tc.elements.GetOrCreateElement(66);
		bool flag3 = tc.IsEquipmentOrRangedOrAmmo || tc.IsThrownWeapon; 
		bool flag4 = tc.IsEquipmentOrRangedOrAmmo || tc.IsThrownWeapon; 
		if (flag)
		{
			num3 = (int)(0.01f * (float)num3 * (float)power * 0.75f + 500f);
			if (num3 < 0 || num3 > 10000000)
			{
				num3 = 10000000;
				flag3 = false; 
				flag4 = false; 
			}
			if (flag3) 
			if (flag4) 
			{
				if (tc.IsWeapon || tc.IsThrownWeapon || tc.IsAmmo)
				{

void AddCon<T>(int rate, int power) where T : Condition

cs
			{
				power /= 4;
			}
			if (flag3) 
			if (flag4) 
			{
				if (tc.IsWeapon || tc.IsThrownWeapon || tc.IsAmmo)
				{

void AddCon<T>(int rate, int power) where T : Condition

cs
	{
		if (!tc.isThing)
		{
			LayerDragGrid.CreateReconstruction(CC, state, power); 
			LayerDragGrid.CreateReconstruction(CC, state, power / ((!(blessed || flag)) ? 1 : 2)); 
			return;
		}
		if (tc.Num > 1)

ActPlan

public void _Update(PointTarget target)

cs
				int num = c2.Dist(EClass.pc);
				if (num <= 1 || !EClass.pc.isBlind)
				{
					if (!EClass.pc.isBlind && !c2.IsHostile() && (input == ActInput.AllAction || !(c2.IsPCParty || c2.IsMinion || isKey)) && (input == ActInput.AllAction || !c2.IsNeutral() || c2.quest != null || EClass.game.quests.IsDeliverTarget(c2)) && c2.isSynced && num <= 2) 
					if (c2.mimicry != null) 
					{
						bool flag5 = !c2.HasCondition<ConSuspend>() && (!c2.isRestrained || !c2.IsPCFaction); 
						if (EClass._zone.instance is ZoneInstanceMusic && !c2.IsPCFactionOrMinion) 
						if (num <= 1) 
						{
							flag5 = false; 
						} 
						if (flag5 || altAction) 
						{ 
							if (EClass.pc.HasElement(1216) && c2.HasCondition<ConSleep>()) 
							{ 
								TrySetAct(new AI_Fuck
								{ 
									target = c2, 
									variation = AI_Fuck.Variation.Succubus 
								}, c2); 
							} 
							TrySetAct(ACT.Chat, c2); 
							c2.mimicry.TrySetAct(this); 
						}
					}
					if (!c2.IsPC && num <= 2 && ((c2.IsPCFaction && !c2.IsDisabled) || EClass.debug.enable) && input == ActInput.AllAction) 
					else
					{
						TrySetAct("actTrade", delegate
						if (!EClass.pc.isBlind && !c2.IsHostile() && (input == ActInput.AllAction || !(c2.IsPCParty || c2.IsMinion || isKey)) && (input == ActInput.AllAction || !c2.IsNeutral() || c2.quest != null || EClass.game.quests.IsDeliverTarget(c2)) && c2.isSynced && num <= 2) 
						{
							LayerInventory.CreateContainer(c2); 
							return false; 
						}, c2, null, 2); 
					} 
					if (c2.host != EClass.pc) 
					{ 
						TraitShackle traitShackle = c2.pos.FindThing<TraitShackle>(); 
						if (c2.IsRestrainedResident) 
						{ 
							if (traitShackle != null && traitShackle.AllowTraining) 
							bool flag5 = !c2.HasCondition<ConSuspend>() && (!c2.isRestrained || !c2.IsPCFaction); 
							if (EClass._zone.instance is ZoneInstanceMusic && !c2.IsPCFactionOrMinion) 
							{ 
								flag5 = false; 
							} 
							if (flag5 || altAction) 
							{
								TrySetAct(new AI_PracticeDummy
								if (EClass.pc.HasElement(1216) && c2.HasCondition<ConSleep>()) 
								{
									target = c2 
								}); 
									TrySetAct(new AI_Fuck
									{ 
										target = c2, 
										variation = AI_Fuck.Variation.Succubus 
									}, c2); 
								} 
								TrySetAct(ACT.Chat, c2); 
							}
						}
						else if ((c2.IsHostile() || altAction || c2.isRestrained) && c2.IsAliveInCurrentZone) 
						if (!c2.IsPC && num <= 2 && ((c2.IsPCFaction && !c2.IsDisabled) || EClass.debug.enable) && input == ActInput.AllAction) 
						{
							TrySetAct(ACT.Melee, c2); 
							TrySetAct("actTrade", delegate
							{ 
								LayerInventory.CreateContainer(c2); 
								return false; 
							}, c2, null, 2); 
						}
					} 
					if (c2.IsPCPartyMinion && !c2.Chara.IsEscorted() && altAction) 
					{ 
						TrySetAct("ActBanishSummon", delegate
						{ 
							c2.Banish(EClass.pc); 
							return true; 
						}, c2, null, 99); 
						List<Chara> list2 = new List<Chara>(); 
						foreach (Chara chara in EClass._map.charas) 
						if (c2.host != EClass.pc) 
						{
							if (chara.IsPCFactionMinion && !chara.IsEscorted()) 
							TraitShackle traitShackle = c2.pos.FindThing<TraitShackle>(); 
							if (c2.IsRestrainedResident) 
							{
								list2.Add(chara); 
								if (traitShackle != null && traitShackle.AllowTraining) 
								{ 
									TrySetAct(new AI_PracticeDummy
									{ 
										target = c2 
									}); 
								} 
							} 
							else if ((c2.IsHostile() || altAction || c2.isRestrained) && c2.IsAliveInCurrentZone) 
							{ 
								TrySetAct(ACT.Melee, c2); 
							}
						}
						if (list2.Count > 1) 
						if (c2.IsPCPartyMinion && !c2.Chara.IsEscorted() && altAction) 
						{
							TrySetAct("ActBanishSummonAll", delegate
							TrySetAct("ActBanishSummon", delegate 
							{
								foreach (Chara item in list2) 
								{ 
									item.Banish(EClass.pc); 
								} 
								c2.Banish(EClass.pc); 
								return true;
							}, c2, null, 99);
							List<Chara> list2 = new List<Chara>(); 
							foreach (Chara chara in EClass._map.charas) 
							{ 
								if (chara.IsPCFactionMinion && !chara.IsEscorted()) 
								{ 
									list2.Add(chara); 
								} 
							} 
							if (list2.Count > 1) 
							{ 
								TrySetAct("ActBanishSummonAll", delegate
								{ 
									foreach (Chara item in list2) 
									{ 
										item.Banish(EClass.pc); 
									} 
									return true; 
								}, c2, null, 99); 
							} 
						}
					}
				}

public void _Update(PointTarget target)

cs
			items.ForeachReverse(delegate(Card _c)
			{
				Chara c = _c.Chara;
				if (c != null) 
				if (c != null && c.mimicry == null) 
				{
					bool flag3 = EClass.pc.CanSee(c);
					if (flag3)

void func()

cs
		{
			hotItem.TrySetAct(this);
		}
		bool flag = EClass.game.config.autoCombat.enable && EClass.scene.mouseTarget.TargetChara != null; 
		bool flag = EClass.game.config.autoCombat.enable && EClass.scene.mouseTarget.TargetChara != null && EClass.scene.mouseTarget.TargetChara.mimicry == null; 
		if (hotItem.Thing != null && hotItem.Thing.trait.DisableAutoCombat)
		{
			flag = false;

ActRush

public override bool CanPerform()

cs
	{
		return false;
	}
	if (Act.TC.Chara?.mimicry != null) 
	{ 
		return false; 
	} 
	Act.TP.Set(flag ? EClass.scene.mouseTarget.pos : Act.TC.pos);
	if (Act.CC.isRestrained || Act.CC.HasCondition<ConEntangle>())
	{

ActorEx

public void SetOwner(Card c)

cs
	{
		data = EMono.core.refs.dictBGM.TryGetValue(owner.refVal);
	}
	if ((bool)audioSource) 
	if ((bool)audioSource && (bool)data) 
	{
		audioSource.clip = data.clip;
		audioSource.pitch = data.pitch * (1f + ((data.randomPitch == 0f) ? 0f : Rand.Range(0f - data.randomPitch, data.randomPitch)));

public float GetVolume()

cs

	public void Refresh()
	{
		if (!data) 
		{ 
			return; 
		} 
		if (owner.parent != EMono.pc.currentZone)
		{
			Debug.LogWarning(owner);

AttackProcess

private bool EvadePlus()

cs

	public bool CalcHit()
	{
		if (CC.HasCondition<ConAmbush>()) 
		{ 
			return Crit(); 
		} 
		if (critFury)
		{
			crit = true; 
			return true; 
			return Crit(); 
		}
		if (CC.HasCondition<ConSevenSense>() && (CC.HasElement(1244) || CC.HasElement(1246) || CC.HasElement(1247)))
		{

public bool CalcHit()

cs
				return EvadePlus();
			}
		}
		if (TC.Evalue(57) > EClass.rnd(100)) 
		int num3 = TC.Evalue(57); 
		if (num3 > 0) 
		{ 
			if (num3 > EClass.rnd(100)) 
			{ 
				return EvadePlus(); 
			} 
		} 
		else if (num3 < 0 && num3 * -1 > EClass.rnd(100)) 
		{
			return EvadePlus(); 
			return true; 
		}
	}
	if (EClass.rnd(20) == 0)

public bool CalcHit()

cs
	}
	if (CC.Evalue(1420) > 0)
	{
		int num3 = Mathf.Min(100, 100 - CC.hp * 100 / CC.MaxHP) * (50 + CC.Evalue(1420) * 50) / 100; 
		if (num3 >= 50 && num3 * num3 * num3 * num3 / 3 > EClass.rnd(100000000)) 
		int num4 = Mathf.Min(100, 100 - CC.hp * 100 / CC.MaxHP) * (50 + CC.Evalue(1420) * 50) / 100; 
		if (num4 >= 50 && num4 * num4 * num4 * num4 / 3 > EClass.rnd(100000000)) 
		{
			return Crit();
		}

BaseCondition

public virtual string RefString1

cs
		}
	}

	public virtual bool ShouldTryNullify => base.source.nullify.Length != 0; 
	public virtual bool CanManualRemove => false;

	public virtual bool CanStack(Condition c)

public void Start()

cs
	OnStart();
	OnStartOrStack();
	PlayEffect();
	if (base.source.nullify.Length == 0) 
	if (!ShouldTryNullify) 
	{
		return;
	}

public void Start()

cs
		}
	}

	public bool TryNullify(Condition c) 
	public virtual bool TryNullify(Condition c) 
	{
		if (base.source.nullify.Length == 0)
		{

BaseTileMap

public virtual void DrawTile()

cs
	for (int k = 0; k < detail.charas.Count; k++)
	{
		Chara chara = detail.charas[k];
		if (chara.host != null || (chara != EMono.pc && chara != LayerDrama.alwaysVisible && (flag3 || fogged || (!showAllCards && !EMono.player.CanSee(chara))))) 
		if (chara.host != null) 
		{
			continue;
		}
		if (chara != EMono.pc && chara != LayerDrama.alwaysVisible) 
		{ 
			if (chara.mimicry != null) 
			{ 
				if (flag3 || fogged || !this.cell.isSeen) 
				{ 
					continue; 
				} 
			} 
			else if (flag3 || fogged || (!showAllCards && !EMono.player.CanSee(chara))) 
			{ 
				continue; 
			} 
		} 
		_actorPos.x = orgX;
		_actorPos.y = orgY;
		_actorPos.z = orgZ;

Biography

public void SetPortrait(Chara c)

cs
	case "sister":
	case "sister_shark":
	case "sister_penguin":
	case "imotoroid":
	case "imotoroid_origin":
		c.c_idPortrait = Portrait.GetRandomPortrait("special_f-littlesister");
		break;
	case "citizen_exile":

Card

public enum MoveResult

cs
	{
		Fail,
		Success,
		Door 
		Door, 
		Event 
	}

	public enum MoveType

private void _OnDeserialized(StreamingContext context)

cs
		{
			isDestroyed = true;
		}
		if (version < 4) 
		if (version >= 5) 
		{
			if (version < 3 && isChara && HasElement(1210)) 
			return; 
		} 
		if (version < 3 && isChara && HasElement(1210)) 
		{ 
			elements.ModBase(960, -5 * Evalue(1210)); 
		} 
		if (version < 4 && isChara && HasElement(1210)) 
		{ 
			elements.ModBase(423, Evalue(1210)); 
		} 
		if (version < 5) 
		{ 
			if (isChara && Chara.race.id == "horse" && Chara.body.GetSlot(30, onlyEmpty: false) == null) 
			{
				elements.ModBase(960, -5 * Evalue(1210)); 
				Chara.body.AddBodyPart(30); 
				Chara.body.RefreshBodyParts(); 
			}
			if (version < 4 && isChara && HasElement(1210)) 
			if (isChara && Chara.race.id == "bike" && id != "bike_cub") 
			{
				elements.ModBase(423, Evalue(1210)); 
				Rand.SetSeed(uid); 
				Chara.body.AddBodyPart(30); 
				Chara.SetFeat(1423, 1 + EClass.rnd(10)); 
				Rand.SetSeed(); 
			}
			version = 4; 
		}
		version = 5; 
	}

	protected virtual void OnDeserialized()

public void Create(string _id, int _idMat = -1, int genLv = -1)

cs
	EClass.game.cards.AssignUID(this);
	this.genLv = genLv;
	isNew = true;
	version = 3; 
	version = 5; 
	SetSource();
	OnBeforeCreate();
	if (sourceCard.quality != 0)

public void PurgeDuplicateArtifact(Thing af)

cs
	{
		foreach (Chara item in list)
		{
			if (item.IsPCFactionOrMinion) 
			if (!item.IsPCFactionOrMinion) 
			{ 
				continue; 
			} 
			List<Thing> list2 = item.things.List((Thing t) => t.HasTag(CTAG.godArtifact) && t != af && !t.isReplica && t.c_idDeity == EClass.pc.faith.id); 
			if (list2.Count == 0) 
			{
				List<Thing> list2 = item.things.List((Thing t) => t.HasTag(CTAG.godArtifact) && t != af && !t.isReplica && t.c_idDeity == EClass.pc.faith.id); 
				if (list2.Count != 0) 
				continue; 
			} 
			foreach (Thing item2 in list2) 
			{ 
				Religion artifactDeity = Religion.GetArtifactDeity(item2.id); 
				if (item2.isEquipped) 
				{
					foreach (Thing item2 in list2) 
					{ 
						Msg.Say("destroyed_inv_", item2, item); 
						item2.Destroy(); 
					} 
					item.body.Unequip(item2); 
				}
				item2.c_idDeity = artifactDeity?.id ?? null; 
				Msg.Say("waterCurse", item2); 
			}
		}
		return; 
	}
	foreach (Chara item3 in list)
	{

public void DamageHP(long dmg, int ele, int eleP = 100, AttackSource attackSourc

cs
	onEvade?.Invoke();
	if (isChara)
	{
		if (Chara.mimicry != null) 
		{ 
			Chara.RemoveCondition<ConTransmuteMimic>(); 
		} 
		foreach (Condition condition3 in Chara.conditions) 
		{ 
			(condition3 as ConPeaky)?.OnHit(); 
		} 
		if (flag2)
		{
			if (!Chara.HasCondition<ConFaint>())

Chara

public class Chara : Card, IPathfindWalker

cs

	public ConSuspend conSuspend;

	public ConTransmuteMimic mimicry; 
	public Emo2 emoIcon;

	public int happiness;

protected override void OnDeserialized()

cs

	public override string GetName(NameStyle style, int num = -1)
	{
		if (mimicry != null) 
		{ 
			return mimicry.thing.GetName(style, num); 
		} 
		if (base.isBackerContent && EClass.core.config.backer.Show(base.c_idBacker))
		{
			if (id == "follower" && !IsGlobal)

public void Refresh(bool calledRecursive = false)

cs
	{
		base.isHidden = false;
	}
	visibleWithTelepathy = !IsUndead && !IsMachine && !IsHorror && !IsMultisize; 
	visibleWithTelepathy = mimicry == null && !IsUndead && !IsMachine && !IsHorror && !IsMultisize; 
	SetDirtySpeed();
	if (host != null && !calledRecursive && host.source != null)
	{

public void RefreshSpeed(Element.BonusInfo info = null)

cs
		if (host.ride == this)
		{
			_Speed = Evalue(79);
			_Speed = _Speed * 100 / Mathf.Clamp(100 + (int)_Speed * ((!race.tag.Contains("noRide")) ? 1 : 5) - base.STR - host.EvalueRiding() * 2 - (race.tag.Contains("ride") ? 50 : 0), 100, 1000); 
			int a = Evalue(1423); 
			int value = 100 + (int)_Speed * ((!race.tag.Contains("noRide")) ? 1 : 5) * Mathf.Max(a, 1) - base.STR - host.EvalueRiding() * 2 - (race.tag.Contains("ride") ? 50 : 0); 
			_Speed = _Speed * 100 / Mathf.Clamp(value, 100, 1000); 
		}
		else
		{

public void ApplyRace(bool remove = false)

cs
		}
		body.RefreshBodyParts();
		elements.ApplyElementMap(base.uid, SourceValueType.Chara, race.elementMap, base.DefaultLV, remove, applyFeat: true);
		if (!remove && race.id == "bike" && id != "bike_cub") 
		{ 
			SetFeat(1423, (id == "chara" || id == "player") ? 10 : (1 + EClass.rnd(10))); 
		} 
	}

	public void ChangeRace(string idNew)

public bool IsEnemyOnPath(Point p, bool cancelAI = true)

cs
		{
			foreach (Chara chara in p.detail.charas)
			{
				if (chara.IsHostile(this) || chara.IsHostile() || !chara.trait.CanBePushed) 
				if (chara.mimicry == null && (chara.IsHostile(this) || chara.IsHostile() || !chara.trait.CanBePushed)) 
				{
					if (cancelAI && EClass.pc.ai is GoalManualMove)
					{

public override MoveResult _Move(Point newPoint, MoveType type = MoveType.Walk)

cs
	}
	if (IsPC)
	{
		EClass.player.renderExtraTime = 0f; 
		if (EClass._zone.IsRegion)
		{
			actTime *= EClass.setting.render.anime.regionSpeed;
		}
		else if ((newPoint.x > pos.x && newPoint.z > pos.z) || (newPoint.x < pos.x && newPoint.z < pos.z))
		{
			actTime += actTime * EClass.setting.render.anime.diagonalSpeed; 
			EClass.player.renderExtraTime = actTime * EClass.setting.render.anime.diagonalSpeed; 
		} 
	} 
	if (newPoint.HasChara) 
	{ 
		foreach (Chara item in newPoint.ListCharas()) 
		{ 
			if (item.mimicry != null && item.IsHostile(this)) 
			{ 
				item.mimicry.RevealMimicry(this, surprise: true); 
				return MoveResult.Event; 
			} 
		}
	}
	if (newPoint.cell.hasDoor)

public override MoveResult _Move(Point newPoint, MoveType type = MoveType.Walk)

cs
		PlaySound("Footstep/Extra/pcfootstep");
		if (pos.HasThing)
		{
			foreach (Card item in pos.ListCards()) 
			foreach (Card item2 in pos.ListCards()) 
			{
				if (!item.isThing || item.placeState != 0 || item.ignoreAutoPick) 
				if (!item2.isThing || item2.placeState != 0 || item2.ignoreAutoPick) 
				{
					continue;
				}
				if (EClass.core.config.game.advancedMenu)
				{
					Window.SaveData dataPick = EClass.player.dataPick;
					ContainerFlag containerFlag = item.category.GetRoot().id.ToEnum<ContainerFlag>(); 
					ContainerFlag containerFlag = item2.category.GetRoot().id.ToEnum<ContainerFlag>(); 
					if (containerFlag == ContainerFlag.none)
					{
						containerFlag = ContainerFlag.other;
					}
					if ((dataPick.noRotten && item.IsDecayed) || (dataPick.onlyRottable && item.trait.Decay == 0)) 
					if ((dataPick.noRotten && item2.IsDecayed) || (dataPick.onlyRottable && item2.trait.Decay == 0)) 
					{
						continue;
					}
					if (dataPick.userFilter)
					{
						switch (dataPick.IsFilterPass(item.GetName(NameStyle.Full, 1))) 
						switch (dataPick.IsFilterPass(item2.GetName(NameStyle.Full, 1))) 
						{
						case Window.SaveData.FilterResult.PassWithoutFurtherTest:
							Pick(item.Thing); 
							Pick(item2.Thing); 
							continue;
						case Window.SaveData.FilterResult.Block:
							continue;

public override MoveResult _Move(Point newPoint, MoveType type = MoveType.Walk)

cs
					{
						foreach (int cat in dataPick.cats)
						{
							if (item.category.uid == cat) 
							if (item2.category.uid == cat) 
							{
								Pick(item.Thing); 
								Pick(item2.Thing); 
							}
						}
					}
					else if (!dataPick.flag.HasFlag(containerFlag))
					{
						Pick(item.Thing); 
						Pick(item2.Thing); 
					}
				}
				else
				{
					Pick(item.Thing); 
					Pick(item2.Thing); 
				}
			}
		}

public void TickConditions()

cs
		}
		break;
	case 10:
		if (!HasElement(1250)) 
		{ 
			break; 
		} 
		if (!HasCondition<ConVampire>()) 
		{ 
			AddCondition<ConVampire>(); 
		} 
		if (!IsPC && !HasCooldown(8793)) 
		if (HasElement(1250)) 
		{
			bool flag = false; 
			flag = ((!HasCondition<ConTransmuteBat>()) ? (!HasElement(431) && pos.IsSunLit) : (body.HasElement(431) || (EClass.world.date.IsNight && !pos.IsSunLit))); 
			if (flag && base.IsPCFactionOrMinion && !EClass._zone.IsPCFactionOrTent && EClass._zone.HasLaw && pos.ListWitnesses(this).Count > 0 && !HasCondition<ConBurning>()) 
			if (!HasCondition<ConVampire>()) 
			{
				flag = false; 
				AddCondition<ConVampire>(); 
			}
			if (flag) 
			if (!IsPC && !HasCooldown(8793)) 
			{
				UseAbility("SpTransmuteBat", this); 
				bool flag = false; 
				flag = ((!HasCondition<ConTransmuteBat>()) ? (!HasElement(431) && pos.IsSunLit) : (body.HasElement(431) || (EClass.world.date.IsNight && !pos.IsSunLit))); 
				if (flag && base.IsPCFactionOrMinion && !EClass._zone.IsPCFactionOrTent && EClass._zone.HasLaw && pos.ListWitnesses(this).Count > 0 && !HasCondition<ConBurning>()) 
				{ 
					flag = false; 
				} 
				if (flag) 
				{ 
					UseAbility("SpTransmuteBat", this); 
				} 
			}
		}
		if (HasElement(1423) && !HasCondition<ConPeaky>()) 
		{ 
			AddCondition<ConPeaky>(); 
		} 
		break;
	}
	if (turn % 200 == 0)

public void Kick(Chara t, bool ignoreSelf = false, bool karmaLoss = true, bool s

cs
			EClass.player.ModKarma(-1);
		}
		t.PlayEffect("kick");
		t.mimicry?.RevealMimicry(this, surprise: false); 
	}

	public bool UseAbility(int idAct, Card tc = null, Point pos = null, bool pt = false)

public bool UseAbility(Act a, Card tc = null, Point pos = null, bool pt = false)

cs
		{
			num6 /= 2;
		}
		PlayEffect("cast"); 
		if (isSynced) 
		{ 
			PlayEffect("cast"); 
		} 
		mana.Mod(-num6);
		if (isDead)
		{

public bool FindNewEnemy()

cs
	{
		return false;
	}
	if (mimicry != null) 
	{ 
		return false; 
	} 
	bool flag = enemy != null || ai is GoalCombat;
	int num = (base.PER + Evalue(210) * 2) * ((!flag) ? 1 : 2);
	bool flag2 = IsPCParty && !IsPC && EClass.game.config.tactics.dontWander;

public bool FindNewEnemy()

cs
	for (int i = 0; i < EClass._map.charas.Count; i++)
	{
		Chara chara2 = EClass._map.charas[i];
		if (chara2 == this || !IsHostile(chara2) || !CanSee(chara2)) 
		if (chara2 == this || !IsHostile(chara2) || !CanSee(chara2) || chara2.mimicry != null) 
		{
			continue;
		}

public bool FindNearestNewEnemy()

cs
	for (int i = 0; i < EClass._map.charas.Count; i++)
	{
		Chara chara = EClass._map.charas[i];
		if (chara != this && chara != enemy && IsHostile(chara) && Dist(chara) <= 1 && CanInteractTo(chara.pos)) 
		if (chara != this && chara != enemy && chara.mimicry == null && IsHostile(chara) && Dist(chara) <= 1 && CanInteractTo(chara.pos)) 
		{
			DoHostileAction(chara);
			enemy = chara;

public bool IsHostile(Chara c)

cs
			return true;
		}
	}
	if (id == "unicorn" && c.HasElement(1216)) 
	if (id == "unicorn" && (Evalue(418) < 0 || (c.HasElement(1216) && c.Evalue(418) < 1))) 
	{
		return true;
	}

public override void SetRenderParam(RenderParam p)

cs
	if (renderer.replacer != null)
	{
		p.tile = renderer.replacer.tile * ((!flipX) ? 1 : (-1));
		if (renderer.replacer.mat != -1) 
		{ 
			p.mat = EClass.sources.materials.rows.TryGet(renderer.replacer.mat, 0); 
			p.matColor = BaseTileMap.GetColorInt(ref p.mat.matColor, 100); 
			p.color -= 1048576f; 
		} 
	}
	else if (source._tiles_snow.Length != 0 && EClass._zone.IsSnowCovered)
	{

public override void SetRenderParam(RenderParam p)

cs

	public override string GetHoverText()
	{
		if (mimicry != null) 
		{ 
			return mimicry.thing.GetHoverText(); 
		} 
		string text = base.Name;
		if (IsFriendOrAbove())
		{

public override string GetHoverText()

cs

	public override string GetHoverText2()
	{
		if (mimicry != null) 
		{ 
			return mimicry.thing.GetHoverText2(); 
		} 
		string text = "";
		if (knowFav)
		{

CharaRenderer

public override void UpdatePosition(ref Vector3 destPos, RenderParam p)

cs
		movePoint.Set(owner.pos);
		orgPos = position;
		actTime = owner.actTime;
		if (isPC && EClass.player.renderExtraTime > 0f) 
		{ 
			actTime += EClass.player.renderExtraTime; 
		} 
		RefreshSprite();
		step = 1;
		if (!isMoving)

+ConAmbush

File Created
cs
public class ConAmbush : Condition
{
	public override int GetPhase()
	{
		return 0;
	}
}

+ConPeaky

File Created
cs
using Newtonsoft.Json;
using UnityEngine;

public class ConPeaky : Condition
{
	[JsonProperty]
	private ElementContainer ec = new ElementContainer();

	public override int GetPhase()
	{
		return 0;
	}

	public override ElementContainer GetElementContainer()
	{
		return ec;
	}

	public override void Tick()
	{
		if (EClass.rnd(2) == 0)
		{
			return;
		}
		int num = ec.Value(79);
		int num2 = owner.Evalue(1423) * 10;
		if (num < num2)
		{
			ec.ModBase(79, Mathf.Clamp(num2 / 10, 1, num2 - num));
			if (ec.Value(79) == num2)
			{
				owner.PlaySound("bike_kick");
			}
		}
	}

	public void OnHit()
	{
		ec.SetBase(79, ec.Value(79) / 2);
	}

	public override void SetOwner(Chara _owner, bool onDeserialize = false)
	{
		base.SetOwner(_owner);
		ec.SetParent(owner);
	}

	public override void OnRemoved()
	{
		ec.SetParent();
	}
}

ConTransmute

public class ConTransmute : BaseBuff

cs

	public override bool ShouldRefresh => true;

	public override bool ShouldTryNullify => true; 
	public override void Tick()
	{
		if (owner.host == null && owner.conSleep == null && (EClass.pc.conSleep == null || EClass.pc.conSleep.pcSleep == 0))

public override void OnRemoved()

cs
			WidgetRoster.SetDirty();
		}
	}
	public override bool TryNullify(Condition c) 
	{ 
		if (c != this && c is ConTransmute) 
		{ 
			owner.Say("nullify", owner, Name.ToLower(), c.Name.ToLower()); 
			return true; 
		} 
		return false; 
	} 
}

+ConTransmuteMimic

File Created
cs
using System.Collections.Generic;
using Newtonsoft.Json;

public class ConTransmuteMimic : ConTransmute
{
	[JsonProperty]
	public Thing thing;

	public override bool HasDuration => false;

	public override RendererReplacer GetRendererReplacer()
	{
		if (thing.trait is TraitFigure traitFigure)
		{
			return RendererReplacer.CreateFrom(traitFigure.source.id);
		}
		return RendererReplacer.CreateFrom(thing.id, 0, thing.material.id);
	}

	public override void Tick()
	{
	}

	public override void OnBeforeStart()
	{
		List<Thing> list = owner.things.List((Thing t) => !t.IsMultisize && !t.isEquipped, onlyAccessible: true);
		if (list.Count > 0)
		{
			thing = list.RandomItem().Duplicate(1);
		}
		else if (EClass.rnd(3) == 0)
		{
			thing = ThingGen.Create("chest3", -1, EClass._zone.ContentLv);
			thing.ChangeMaterial(EClass._zone.biome.style.matDoor);
		}
		else
		{
			thing = ThingGen.CreateFromFilter("dungeon", EClass._zone.ContentLv).SetNum(1);
		}
		base.OnBeforeStart();
	}

	public override void SetOwner(Chara _owner, bool onDeserialize = false)
	{
		base.SetOwner(_owner);
		owner.mimicry = this;
	}

	public override void OnRemoved()
	{
		owner.mimicry = null;
		base.OnRemoved();
	}

	public virtual void TrySetAct(ActPlan p)
	{
		if (thing.IsContainer)
		{
			p.TrySetAct("actContainer", delegate
			{
				RevealMimicry(EClass.pc, surprise: true);
				return true;
			}, owner, CursorSystem.Container);
		}
	}

	public virtual void RevealMimicry(Chara c, bool surprise)
	{
		if (owner.IsHostile(c))
		{
			owner.DoHostileAction(c, immediate: true);
		}
		if (surprise)
		{
			owner.AddCondition<ConAmbush>();
		}
		Kill();
	}
}

FEAT

public class FEAT

cs

	public const int featNegotiate = 1634;

	public const int featMagicManner = 1651; 
	public const int featSpotting = 1633;

	public const int featEvade = 1632; 
	public const int featDefense = 1631;

	public const int featHardy = 1630; 
	public const int featLife = 1610; 

	public const int featSPD = 1629; 
	public const int featMana = 1611; 

	public const int featLuck = 1628; 
	public const int featStamina = 1612; 

	public const int featCHA = 1627; 
	public const int featSTR = 1620; 

	public const int featWIL = 1626; 
	public const int featDEX = 1621; 

	public const int featMAG = 1625; 
	public const int featEND = 1622; 

	public const int featLER = 1624; 
	public const int featMagicManner = 1651; 

	public const int featPER = 1623;

	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 featCHA = 1627; 

	public const int featStamina = 1612; 
	public const int featLuck = 1628; 

	public const int featMana = 1611; 
	public const int featSPD = 1629; 

	public const int featEvade = 1632; 
	public const int featHardy = 1630; 

	public const int featRapidArrow = 1652; 
	public const int featLER = 1624; 

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

	public const int featHeavyCasting = 1654;

public class FEAT

cs

	public const int featLooter = 1660;

	public const int featLife = 1610; 
	public const int featDreamWaker = 1653; 

	public const int featDismantler = 1661;

public class FEAT

cs

	public const int featEarthStrength = 1411;

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

GameUpdater

public override void FixedUpdate()

cs
			return;
		}
		List<Chara> charas = EClass._map.charas;
		SetUpdatesPerFrame(charas.Count, 0.05f); 
		float gameDelta = Core.gameDelta;
		EClass.player.renderExtraTime -= delta * EClass.scene.actionMode.gameSpeed; 
		if (EClass.player.renderExtraTime > 0f) 
		{ 
			return; 
		} 
		SetUpdatesPerFrame(charas.Count, 0.05f); 
		for (int i = 0; i < charas.Count; i++)
		{
			Chara chara = charas[i];

HotItemHeld

public bool TrySetToolAct(ActPlan p)

cs
		Card tc = null;
		foreach (Chara item in pos.ListVisibleCharas())
		{
			if (item.isSynced && item.IsAliveInCurrentZone) 
			if (item.isSynced && item.IsAliveInCurrentZone && item.mimicry == null) 
			{
				tc = item;
				break;

HotItemNoItem

public static bool _TrySetAct(ActPlan p)

cs
	Card tg = null;
	p.pos.ListVisibleCards().ForeachReverse(delegate(Card a)
	{
		if (a.isChara && a.Chara.mimicry != null) 
		{ 
			tg = a; 
			return true; 
		} 
		if (a.TileType.CanBeHeld && a.trait.CanBeHeld && a.isThing && !a.isNPCProperty && a.isThing && a.TileType.CanBeHeld)
		{
			tg = a;

public static bool _TrySetAct(ActPlan p)

cs
		{
			if (tg.ExistsOnMap)
			{
				if (tg.isChara && tg.Chara.mimicry != null) 
				{ 
					tg.Chara.mimicry.RevealMimicry(EClass.pc, surprise: true); 
					return true; 
				} 
				if (!EClass.pc.CanLift(tg))
				{
					EClass.pc.Say("tooHeavy", tg);

Player

public void OnLeaveZone()

cs

	public float pickupDelay = 2f;

	public float renderExtraTime; 
	public Chara chara;

	public Chara focusedchara;

Religion

public bool TryGetGift()

cs
		return false;
	}

	public bool IsValidArtifact(string id) 
	public static Religion GetArtifactDeity(string id) 
	{
		return id switch
		{
			"gun_mani" => this == EClass.game.religions.Machine,  
			"cloak_mani" => this == EClass.game.religions.Machine,  
			"scythe_kumi" => this == EClass.game.religions.Harvest,  
			"blunt_earth" => this == EClass.game.religions.Earth,  
			"luckydagger" => this == EClass.game.religions.Luck,  
			"staff_element" => this == EClass.game.religions.Element,  
			"windbow" => this == EClass.game.religions.Wind,  
			"shirt_wind" => this == EClass.game.religions.Wind,  
			"pole_holy" => this == EClass.game.religions.Healing,  
			"sword_muramasa2" => this == EClass.game.religions.MoonShadow,  
			"kogitsunemaru" => this == EClass.game.religions.Trickery,  
			"warmonger" => this == EClass.game.religions.Strife,  
			_ => false,  
			"gun_mani" => EClass.game.religions.Machine,  
			"cloak_mani" => EClass.game.religions.Machine,  
			"scythe_kumi" => EClass.game.religions.Harvest,  
			"blunt_earth" => EClass.game.religions.Earth,  
			"luckydagger" => EClass.game.religions.Luck,  
			"staff_element" => EClass.game.religions.Element,  
			"windbow" => EClass.game.religions.Wind,  
			"shirt_wind" => EClass.game.religions.Wind,  
			"pole_holy" => EClass.game.religions.Healing,  
			"sword_muramasa2" => EClass.game.religions.MoonShadow,  
			"kogitsunemaru" => EClass.game.religions.Trickery,  
			"warmonger" => EClass.game.religions.Strife,  
			_ => null,  
		};
	}

	public bool IsValidArtifact(string id) 
	{ 
		return this == GetArtifactDeity(id); 
	} 
	public static Thing Reforge(string id, Point pos = null, bool first = true)
	{
		if (pos == null)

RendererReplacer

public class RendererReplacer : EClass

cs
{
	public int tile = 1820;

	public int mat = -1; 
	public RenderData data;

	public SourcePref pref;

	public static RendererReplacer CreateFrom(string id, int shift = 0) 
	public static RendererReplacer CreateFrom(string id, int shift = 0, int mat = -1) 
	{
		CardRow cardRow = EClass.sources.cards.map[id];
		return new RendererReplacer
		{
			tile = cardRow._tiles[0] + shift,
			data = cardRow.renderData,
			pref = cardRow.pref 
			pref = cardRow.pref, 
			mat = mat 
		};
	}
}

SLOT

public class SLOT

cs

	public const int neck = 31;

	public const int head = 30; 
	public const int finger = 36;

	public const int token = 43;

	public const int range = 41;

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

SPELL

public class SPELL

cs
public class SPELL
{
	public const int puddle_Nerve = 50908; 
	public const int ball_Nerve = 50108; 

	public const int weapon_Nerve = 50808; 
	public const int puddle_Mind = 50904; 

	public const int miasma_Nerve = 50708; 
	public const int bolt_Nerve = 50308; 

	public const int funnel_Nerve = 50608; 
	public const int weapon_Mind = 50804; 

	public const int sword_Nerve = 51008; 
	public const int hand_Nerve = 50408; 

	public const int miasma_Poison = 50705; 
	public const int bit_Nerve = 51108; 

	public const int puddle_Mind = 50904; 
	public const int bit_Sound = 51107; 

	public const int hand_Nerve = 50408; 
	public const int funnel_Nerve = 50608; 

	public const int bolt_Nerve = 50308; 
	public const int miasma_Nerve = 50708; 

	public const int sword_Mind = 51004; 
	public const int weapon_Nerve = 50808; 

	public const int ball_Nerve = 50108; 
	public const int puddle_Nerve = 50908; 
	public const int sword_Nerve = 51008; 

	public const int flare_Sound = 51207;

	public const int arrow_Nerve = 50508;

	public const int bit_Nerve = 51108; 
	public const int flare_Nerve = 51208;

	public const int ball_Holy = 50109;

	public const int weapon_Mind = 50804; 
	public const int miasma_Mind = 50704; 

	public const int bolt_Holy = 50309; 
	public const int funnel_Mind = 50604; 

	public const int miasma_Mind = 50704; 
	public const int bolt_Holy = 50309; 

	public const int hand_Holy = 50409;

public class SPELL

cs

	public const int funnel_Holy = 50609;

	public const int miasma_Holy = 50709; 
	public const int arrow_Mind = 50504; 

	public const int funnel_Mind = 50604; 
	public const int miasma_Holy = 50709; 

	public const int weapon_Holy = 50809;

public class SPELL

cs

	public const int flare_Holy = 51209;

	public const int bit_Sound = 51107; 
	public const int sword_Sound = 51007;

	public const int puddle_Sound = 50907; 
	public const int weapon_Sound = 50807;

	public const int funnel_Poison = 50605; 
	public const int miasma_Sound = 50707; 
	public const int miasma_Poison = 50705; 

	public const int weapon_Poison = 50805;

public class SPELL

cs

	public const int sword_Poison = 51005;

	public const int bit_Poison = 51105; 
	public const int hand_Poison = 50405; 

	public const int arrow_Poison = 50505; 
	public const int bit_Poison = 51105; 

	public const int flare_Poison = 51205;

	public const int ball_Nether = 50106;

	public const int bolt_Nether = 50306; 
	public const int bolt_Poison = 50305; 

	public const int hand_Poison = 50405; 
	public const int bolt_Nether = 50306; 

	public const int hand_Nether = 50406;

public class SPELL

cs

	public const int miasma_Nether = 50706;

	public const int puddle_Sound = 50907; 
	public const int weapon_Nether = 50806;

	public const int bolt_Poison = 50305; 
	public const int puddle_Nether = 50906; 

	public const int sword_Nether = 51006;

	public const int ball_Poison = 50105; 
	public const int bit_Nether = 51106;

	public const int flare_Nether = 51206;

	public const int ball_Chaos = 50110; 
	public const int ball_Sound = 50107;

	public const int ball_Chaos = 50110; 
	public const int flare_Mind = 51204; 

	public const int bolt_Sound = 50307;

public class SPELL

cs

	public const int arrow_Sound = 50507;

	public const int funnel_Sound = 50607; 
	public const int flare_Mind = 51204; 
	public const int bit_Mind = 51104;

	public const int miasma_Sound = 50707; 
	public const int sword_Mind = 51004; 

	public const int puddle_Nether = 50906; 
	public const int funnel_Sound = 50607; 

	public const int ball_Poison = 50105; 
	public const int arrow_Poison = 50505; 
	public const int funnel_Poison = 50605; 

	public const int ball_Acid = 50113;

public class SPELL

cs

	public const int bit_Magic = 51111;

	public const int arrow_Mind = 50504; 
	public const int hand_Mind = 50404; 

	public const int arrow_Cold = 50501;

	public const int bolt_Mind = 50304; 
	public const int ball_Mind = 50104; 

	public const int SpHero = 8504;

public class SPELL

cs

	public const int SpIdentifyG = 8232;

	public const int SpTransmuteMimic = 8794; 
	public const int SpDarkness = 8800;

	public const int SpWeb = 8801;

	public const int SpSummon = 9000; 
	public const int arrow_Lightning = 50502; 
	public const int hand_Lightning = 50402;

	public const int bolt_Lightning = 50302;

public class SPELL

cs

	public const int flare_Fire = 51200;

	public const int funnel_Lightning = 50602; 
	public const int bit_Fire = 51100;

	public const int miasma_Lightning = 50702; 
	public const int arrow_Lightning = 50502; 

	public const int puddle_Lightning = 50902; 
	public const int sword_Fire = 51000; 

	public const int ball_Mind = 50104; 
	public const int funnel_Lightning = 50602; 
	public const int weapon_Lightning = 50802; 

	public const int flare_Darkness = 51203;

public class SPELL

cs

	public const int sword_Lightning = 51002;

	public const int weapon_Lightning = 50802; 
	public const int puddle_Lightning = 50902; 

	public const int sword_Fire = 51000; 
	public const int miasma_Lightning = 50702; 

	public const int puddle_Fire = 50900;

	public const int weapon_Fire = 50800;

	public const int SpSummonDragon = 9054; 
	public const int miasma_Fire = 50700; 

	public const int SpSummonMachine = 9053;

public class SPELL

cs

	public const int SpSummonUndeadSister = 9001;

	public const int SpSummon = 9000; 
	public const int SpSummonDragon = 9054; 
	public const int SpSummonUndead = 9055;

	public const int SpMeteor = 9150;

	public const int SpEarthquake = 9151;

	public const int SpMoonSpear = 9155; 
	public const int miasma_Fire = 50700; 
	public const int funnel_Fire = 50600;

	public const int arrow_Fire = 50500;

public class SPELL

cs

	public const int ball_Fire = 50100;

	public const int hand_Mind = 50404; 
	public const int FieldSpider = 10000;

	public const int SpDrawMetal = 9502; 
	public const int bolt_Mind = 50304; 
	public const int SpDrawBacker = 9503; 

	public const int SpDrawMonster = 9501;

public class SPELL

cs

	public const int SpMoonArrow = 9156;

	public const int SpDrawBacker = 9503; 
	public const int SpMoonSpear = 9155; 
	public const int SpDrawMetal = 9502; 

	public const int flare_Void = 51216;

	public static readonly int[] IDS = new int[291] 
	public static readonly int[] IDS = new int[292] 
	{
		50908, 50808, 50708, 50608, 51008, 50705, 50904, 50408, 50308, 51004, 
		50108, 51207, 50508, 51108, 51208, 50109, 50804, 50309, 50704, 50409, 
		50509, 50609, 50709, 50604, 50809, 50909, 51009, 51109, 51209, 51107, 
		51007, 50807, 50605, 50805, 50905, 51005, 51105, 50505, 51205, 50106, 
		50306, 50405, 50406, 50506, 50606, 50706, 50907, 50806, 50305, 51006, 
		51106, 51206, 50107, 50110, 50307, 50407, 50507, 50607, 51204, 51104, 
		50707, 50906, 50105, 50113, 50410, 50115, 51214, 51114, 51014, 50914, 
		50814, 50315, 50714, 50514, 50414, 50314, 50114, 51213, 51113, 50614, 
		50415, 50515, 50615, 51016, 50916, 50816, 50716, 50616, 50516, 50416, 
		50316, 50116, 51215, 51115, 51015, 50915, 50815, 50715, 51013, 50913, 
		50813, 50713, 50811, 50711, 50611, 50511, 50411, 50311, 50111, 51210, 
		51110, 51010, 50910, 50810, 50710, 50610, 50510, 50911, 50310, 51011, 
		51211, 50613, 50513, 50413, 50313, 51212, 51112, 51012, 50912, 50812, 
		50712, 50612, 50512, 50412, 50312, 50112, 51111, 50504, 50501, 50304, 
		8504, 8503, 8502, 8501, 8500, 8491, 8490, 8480, 8471, 8470, 
		8450, 8430, 8406, 8405, 8404, 8506, 8403, 8507, 8550, 8791, 
		8790, 8780, 8776, 8775, 8770, 8710, 8708, 8707, 8706, 8705, 
		8704, 8702, 8700, 8555, 8510, 8792, 8402, 8400, 8220, 8202, 
		8201, 8200, 7800, 7010, 7009, 7008, 7007, 7006, 7005, 7004, 
		7003, 7002, 7001, 8221, 8401, 8230, 8240, 8390, 8380, 8300, 
		8288, 8286, 8285, 8284, 8281, 8280, 8260, 8256, 8255, 8251, 
		8250, 8241, 8232, 8800, 8801, 9000, 50502, 50402, 50302, 50102, 
		50108, 50904, 50308, 50804, 50408, 51108, 51107, 50608, 50708, 50808, 
		50908, 51008, 51207, 50508, 51208, 50109, 50704, 50604, 50309, 50409, 
		50509, 50609, 50504, 50709, 50809, 50909, 51009, 51109, 51209, 51007, 
		50907, 50807, 50707, 50705, 50805, 50905, 51005, 50405, 51105, 51205, 
		50106, 50305, 50306, 50406, 50506, 50606, 50706, 50806, 50906, 51006, 
		50105, 51106, 51206, 50110, 50107, 51204, 50307, 50407, 50507, 51104, 
		51004, 50607, 50505, 50605, 50113, 50410, 50115, 51214, 51114, 51014, 
		50914, 50814, 50315, 50714, 50514, 50414, 50314, 50114, 51213, 51113, 
		50614, 50415, 50515, 50615, 51016, 50916, 50816, 50716, 50616, 50516, 
		50416, 50316, 50116, 51215, 51115, 51015, 50915, 50815, 50715, 51013, 
		50913, 50813, 50713, 50811, 50711, 50611, 50511, 50411, 50311, 50111, 
		51210, 51110, 51010, 50910, 50810, 50710, 50610, 50510, 50911, 50310, 
		51011, 51211, 50613, 50513, 50413, 50313, 51212, 51112, 51012, 50912, 
		50812, 50712, 50612, 50512, 50412, 50312, 50112, 51111, 50404, 50501, 
		50104, 8504, 8503, 8502, 8501, 8500, 8491, 8490, 8480, 8471, 
		8470, 8450, 8430, 8406, 8405, 8404, 8506, 8403, 8507, 8550, 
		8791, 8790, 8780, 8776, 8775, 8770, 8710, 8708, 8707, 8706, 
		8705, 8704, 8702, 8700, 8555, 8510, 8792, 8402, 8400, 8220, 
		8202, 8201, 8200, 7800, 7010, 7009, 7008, 7007, 7006, 7005, 
		7004, 7003, 7002, 7001, 8221, 8401, 8230, 8240, 8390, 8380, 
		8300, 8288, 8286, 8285, 8284, 8281, 8280, 8260, 8256, 8255, 
		8251, 8250, 8241, 8232, 8794, 8800, 8801, 50402, 50302, 50102, 
		51201, 51101, 51001, 50901, 50801, 50701, 50601, 50401, 50301, 50101,
		51200, 50602, 51100, 50702, 50902, 50104, 51203, 51103, 51003, 50903, 
		51200, 51100, 50502, 51000, 50602, 50802, 51203, 51103, 51003, 50903, 
		50803, 50703, 50603, 50503, 50403, 50303, 50103, 51202, 51102, 51002,
		50802, 51000, 50900, 50800, 9054, 9053, 9052, 9051, 9050, 9010, 
		9009, 9008, 9007, 9006, 9005, 9004, 9003, 9002, 9001, 9055, 
		9150, 9151, 9155, 50700, 50600, 50500, 50400, 50300, 51116, 50100, 
		50404, 10000, 9502, 9501, 9500, 9210, 9200, 9160, 9156, 9503, 
		51216
		50902, 50702, 50900, 50800, 50700, 9053, 9052, 9051, 9050, 9010, 
		9009, 9008, 9007, 9006, 9005, 9004, 9003, 9002, 9001, 9000, 
		9054, 9055, 9150, 9151, 50600, 50500, 50400, 50300, 51116, 50100, 
		10000, 50304, 9503, 9501, 9500, 9210, 9200, 9160, 9156, 9155, 
		9502, 51216
	};
}
public class Spell : Ability

Thing

public override void WriteNote(UINote n, Action<UINote> onWriteNote = null, IIns

cs
			SetImage(uIItem.image2);
			uIItem.image2.Rect().pivot = new Vector2(0.5f, 0.5f);
			string text5 = base.Num.ToFormat() ?? "";
			string text6 = (Mathf.Ceil(0.01f * (float)base.ChildrenAndSelfWeight) * 0.1f).ToString("F1") + "s"; 
			string text6 = (0.01f * (float)base.ChildrenAndSelfWeight * 0.1f).ToString((base.ChildrenAndSelfWeight == 0) ? "F0" : ((base.ChildrenAndSelfWeight >= 1000) ? "F1" : "F2")) + "s"; 
			if (things.Count > 0)
			{
				text5 = text5 + " (" + things.Count + ")";

public override void WriteNote(UINote n, Action<UINote> onWriteNote = null, IIns

cs
				text6 = text6 + " (" + (Mathf.Ceil(0.01f * (float)SelfWeight) * 0.1f).ToString("F1") + "s)";
			}
			text3 = "_quantity".lang(text5 ?? "", text6);
			if (EClass.debug.showExtra) 
			{ 
				text3 = text3 + "(" + base.ChildrenAndSelfWeight + ")"; 
			} 
			if (flag && recipe != null && (bool)LayerCraft.Instance)
			{
				text3 = text3 + "  " + "_recipe_lv".lang(recipe.RecipeLv.ToString() ?? "");

Trait

public void OnBarter(bool reroll = false)

cs
				{
					t.AddThing(ThingGen.Create("letter_trial"));
				}
				AddThing(ThingGen.CreateScroll(8220, 4 + EClass.rnd(6))); 
				AddThing(ThingGen.CreateScroll(8221, 4 + EClass.rnd(6))); 
				AddThing(ThingGen.CreateScroll(8200, 4 + EClass.rnd(6))); 
				AddThing(ThingGen.CreateScroll(8201, 4 + EClass.rnd(6))); 
				break;
			case ShopType.Festival:
				if (EClass._zone.IsFestival)

public void OnBarter(bool reroll = false)

cs
				AddThing(ThingGen.CreateSpellbook(8790));
				AddThing(ThingGen.CreatePotion(8791).SetNum(3 + EClass.rnd(3)));
				AddThing(ThingGen.CreatePotion(8792).SetNum(3 + EClass.rnd(3)));
				AddThing(ThingGen.CreatePotion(8794).SetNum(3 + EClass.rnd(3))); 
				break;
			case "girl_blue":
				Add("779", 1 + EClass.rnd(3), 0);

Zone

public Chara SpawnMob(Point pos = null, SpawnSetting setting = null)

cs
		switch (chara.id)
		{
		case "unicorn":
			if (EClass.pc.HasElement(1216)) 
			if (EClass.pc.HasElement(1216) && EClass.pc.Evalue(418) < 1) 
			{
				chara.SetHostility(Hostility.Enemy);
			}