Skip to content

EA 23.145 Nightly

May 28, 2025

35 files modified. 2 new files created.

Important Changes

None.

ABILITY

@@ -2,15 +2,13 @@

cs

public class ABILITY
{
	public const int ActChat = 5044; 
	public const int AI_Read = 5041; 
	public const int AI_Drink = 5045; 

	public const int ActKick = 5042;

	public const int AI_TendAnimal = 5043;

	public const int AI_Drink = 5045; 
	public const int ActChat = 5044; 

	public const int ActInstall = 5046;

@@ -32,11 +30,11 @@ public class ABILITY

cs

	public const int ActRestrain = 5055;

	public const int ActRanged = 5040; 
	public const int AI_PlayMusic = 6001;

	public const int AI_Steal = 6011; 
	public const int AI_Read = 5041; 
	public const int AI_Meditate = 6003; 

	public const int ActQuickCraft = 6012;

@@ -64,15 +62,15 @@ public class ABILITY

cs

	public const int ActEntangle = 6601;

	public const int AI_Meditate = 6003; 
	public const int ActDraw = 6602;

	public const int AI_Fish = 5039; 
	public const int AI_Steal = 6011; 

	public const int ActNoItem = 5037; 
	public const int ActNTR = 6603; 

	public const int Use = 5007; 
	public const int ActRanged = 5040; 
	public const int ActThrow = 5038; 

	public const int General = 5008;

@@ -100,11 +98,11 @@ public class ABILITY

cs

	public const int TaskFarm = 5020;

	public const int ActThrow = 5038; 
	public const int TaskTrain = 5021;

	public const int TaskGoOut = 5023; 
	public const int AI_Fish = 5039; 
	public const int TaskSleepOnBed = 5022; 

	public const int AI_Eat = 5024;

@@ -132,16 +130,16 @@ public class ABILITY

cs

	public const int TaskMoveInstalled = 5036;

	public const int TaskSleepOnBed = 5022; 
	public const int ActNoItem = 5037; 

	public const int ActNTR = 6603; 
	public const int TaskGoOut = 5023; 
	public const int ActCryRage = 6604; 

	public const int ActRush = 6450;

	public const int ActFear = 6611;

	public const int breathe_Fire = 50200; 
	public const int breathe_Cold = 50201;

	public const int breathe_Lightning = 50202;

@@ -158,15 +156,15 @@ public class ABILITY

cs

	public const int breathe_Nerve = 50208;

	public const int ActWeaken = 6610; 
	public const int breathe_Chaos = 50210; 
	public const int breathe_Holy = 50209; 

	public const int breathe_ = 7000; 
	public const int ActWeaken = 6610; 

	public const int breathe_Magic = 50211;

	public const int breathe_Acid = 50213; 
	public const int breathe_Fire = 50200; 
	public const int breathe_Ether = 50212; 

	public const int breathe_Cut = 50214;

@@ -188,27 +186,29 @@ public class ABILITY

cs

	public const int Shoot = 5006;

	public const int breathe_Ether = 50212; 
	public const int Use = 5007; 

	public const int ActHeadpat = 6904; 
	public const int breathe_Acid = 50213; 

	public const int breathe_Holy = 50209; 
	public const int breathe_ = 7000; 

	public const int ActLulwyTrick = 6902; 
	public const int breathe_Chaos = 50210; 

	public const int ActGazeDim = 6620; 
	public const int ActKizuamiTrick = 6903; 
	public const int ActGazeMutation = 6622; 
	public const int ActGazeMana = 6623; 

	public const int ActTouchDrown = 6613;

	public const int ActTouchSleep = 6612;

	public const int ActKizuamiTrick = 6903; 
	public const int ActGazeMana = 6623; 
	public const int ActHeadpat = 6904; 

	public const int ActGazeMutation = 6622; 
	public const int ActDrainBlood = 6626; 

	public const int ActInsult = 6630; 
	public const int ActGazeDim = 6620; 

	public const int ActScream = 6631;

@@ -218,10 +218,12 @@ public class ABILITY

cs

	public const int ActStealMoney = 6642;

	public const int ActDrainBlood = 6626; 
	public const int ActInsult = 6630; 

	public const int ActDropMine = 6660;

	public const int ActLulwyTrick = 6902; 
	public const int ActJureHeal = 6901;

	public const int ActManaAbsorb = 6900;

@@ -232,6 +234,8 @@ public class ABILITY

cs

	public const int ActGazeInsane = 6621;

	public const int StTaunt = 6700; 
	public const int ActBladeStorm = 6664;

	public const int ActMultiHit = 6663;

@@ -240,22 +244,21 @@ public class ABILITY

cs

	public const int ActThrowPotion = 6661;

	public const int StTaunt = 6700; 
	public static readonly int[] IDS = new int[120] 
	public static readonly int[] IDS = new int[121] 
	{
		5044, 5041, 5042, 5043, 5045, 5046, 5047, 5048, 5049, 5050, 
		5051, 5052, 5053, 5054, 5055, 5040, 6001, 6011, 6012, 6013, 
		6015, 6018, 6019, 6020, 6050, 6400, 6410, 6420, 6500, 6600, 
		6601, 6003, 6602, 5039, 5037, 5007, 5008, 5009, 5010, 5011, 
		5012, 5013, 5014, 5015, 5016, 5017, 5018, 5019, 5020, 5038, 
		5021, 5023, 5024, 5025, 5026, 5027, 5028, 5029, 5030, 5031, 
		5032, 5033, 5034, 5035, 5036, 5022, 6603, 6450, 6611, 50200, 
		50201, 50202, 50203, 50204, 50205, 50206, 50207, 50208, 6610, 50210, 
		7000, 50211, 50213, 50214, 50215, 50216, 5000, 5001, 5002, 5003, 
		5004, 5005, 5006, 50212, 6904, 50209, 6902, 6620, 6613, 6612, 
		6903, 6623, 6622, 6630, 6631, 6640, 6641, 6642, 6626, 6660, 
		6901, 6900, 6720, 6650, 6621, 6664, 6663, 6662, 6661, 6700
		5045, 5042, 5043, 5044, 5046, 5047, 5048, 5049, 5050, 5051, 
		5052, 5053, 5054, 5055, 6001, 5041, 6003, 6012, 6013, 6015, 
		6018, 6019, 6020, 6050, 6400, 6410, 6420, 6500, 6600, 6601, 
		6602, 6011, 6603, 5040, 5038, 5008, 5009, 5010, 5011, 5012, 
		5013, 5014, 5015, 5016, 5017, 5018, 5019, 5020, 5021, 5039, 
		5022, 5024, 5025, 5026, 5027, 5028, 5029, 5030, 5031, 5032, 
		5033, 5034, 5035, 5036, 5037, 5023, 6604, 6450, 6611, 50201, 
		50202, 50203, 50204, 50205, 50206, 50207, 50208, 50209, 6610, 50211, 
		50200, 50212, 50214, 50215, 50216, 5000, 5001, 5002, 5003, 5004, 
		5005, 5006, 5007, 50213, 7000, 50210, 6903, 6622, 6623, 6613, 
		6612, 6904, 6626, 6620, 6631, 6640, 6641, 6642, 6630, 6660, 
		6902, 6901, 6900, 6720, 6650, 6621, 6700, 6664, 6663, 6662, 
		6661
	};
}
public class Ability : Act

AM_Adv

@@ -530,6 +530,16 @@ public override void _OnUpdateInput()

cs
			EClass.player.invlunerable = false;
			return;
		}
		if (EClass.pc.isBerserk && !(EClass.pc.ai is GoalCombat)) 
		{ 
			EClass.pc.FindNearestNewEnemy(); 
			if (EClass.pc.enemy != null) 
			{ 
				EClass.pc.SetAIImmediate(new GoalAutoCombat(EClass.pc.enemy)); 
			} 
			EClass.player.EndTurn(); 
			return; 
		} 
		if (EClass.player.lastTurn != EClass.pc.turn)
		{
			EClass.player.lastTurn = EClass.pc.turn;

+ActCryRage

File Created
cs
public class ActCryRage : Ability
{
	public override bool CanPerform()
	{
		return true;
	}

	public override bool Perform()
	{
		Act.CC.PlaySound("warcry");
		Act.CC.Say("abSoulcry", Act.CC);
		foreach (Chara chara in EClass._map.charas)
		{
			if (chara.IsInMutterDistance() && EClass.rnd(2) == 0)
			{
				chara.AddCondition<ConBerserk>();
			}
		}
		return true;
	}
}

ActMelee

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

cs
					}
				});
			}
			if (Act.TC.isChara && Act.TC.ExistsOnMap && knockback > 0 && knockback * 2 + 15 > EClass.rnd(100) && !Act.TC.isRestrained) 
			if (Act.TC.isChara && !Act.TC.HasCondition<ConGravity>() && Act.TC.ExistsOnMap && knockback > 0 && knockback * 2 + 15 > EClass.rnd(100) && !Act.TC.isRestrained) 
			{
				Card.MoveResult num6 = Act.TC.Chara.TryMoveFrom(Act.CC.pos);
				bool flag3 = Act.CC.id == "tsunami";

AttackProcess

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

cs
	{
		return true;
	}
	if (TC.isChara && num3 > 0 && num3 * 2 + 15 > EClass.rnd(100) && !TC.isRestrained && TC.Chara.TryMoveFrom(CC.pos) == Card.MoveResult.Success) 
	if (TC.isChara && !TC.HasCondition<ConGravity>() && num3 > 0 && num3 * 2 + 15 > EClass.rnd(100) && !TC.isRestrained && TC.Chara.TryMoveFrom(CC.pos) == Card.MoveResult.Success) 
	{
		TC.pos.PlayEffect("vanish");
		TC.PlaySound("push", 1.5f);

BaseCondition

@@ -104,7 +104,7 @@ public bool isPerfume

cs

	public virtual bool ShouldRefresh => false;

	public virtual bool CancelAI => ConsumeTurn; 
	public virtual bool CancelAI => false; 

	public virtual bool TimeBased => false;

BiomeID

@@ -8,5 +8,6 @@ public enum BiomeID

cs
	Plain,
	Artificial,
	Snow,
	Barren 
	Barren, 
	Undersea 
}

Card

@@ -3497,6 +3497,34 @@ public bool CanAddRune(SourceElement.Row row)

cs
				}
			}
		}
		string encSlot = row.encSlot; 
		if (encSlot == null || encSlot.Length != 0) 
		{ 
			switch (encSlot) 
			{ 
			default: 
			{ 
				bool flag = false; 
				string[] array = row.encSlot.Split(','); 
				foreach (string key in array) 
				{ 
					if (EClass.sources.elements.alias[key].id == category.slot) 
					{ 
						flag = true; 
					} 
				} 
				if (!flag) 
				{ 
					return false; 
				} 
				break; 
			} 
			case "global": 
			case "all": 
			case "weapon": 
				break; 
			} 
		} 
		return CountRune() < MaxRune();
	}

@@ -3906,6 +3934,10 @@ public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource

cs
		{
			dmg = dmg * (100 - (int)Mathf.Min(80f, Mathf.Sqrt(LV - 50) * 2.5f)) / 100;
		}
		if (origin != null && origin.HasCondition<ConBerserk>()) 
		{ 
			dmg = dmg * 3 / 2; 
		} 
		if (EClass.game.principal.enableDamageReduction && IsPCFaction)
		{
			int num2 = ((origin != null) ? origin.LV : EClass._zone.DangerLv);

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

cs
					if (EClass.player.invlunerable)
					{
						EvadeDeath();
						goto IL_0baa; 
						goto IL_0bcf; 
					}
				}
				if (IsPC && Evalue(1220) > 0 && Chara.stamina.value >= Chara.stamina.max / 2)

@@ -4118,8 +4150,8 @@ public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource

cs
			}
		}
	}
	goto IL_0baa; 
	IL_0baa: 
	goto IL_0bcf; 
	IL_0bcf: 
	if (trait.CanBeAttacked)
	{
		renderer.PlayAnime(AnimeID.HitObj);

Chara

@@ -119,6 +119,8 @@ public class Chara : Card, IPathfindWalker

cs

	public float idleTimer;

	public bool isBerserk; 
	public bool isDrunk;

	public bool isConfused;

@@ -1453,7 +1455,7 @@ public override void OnCreate(int genLv)

cs
	InitStats();
	body.SetOwner(this);
	hostility = OriginalHostility;
	if (race.EQ.Length != 0) 
	if (race.EQ.Length != 0 || !source.equip.IsEmpty()) 
	{
		TryRestock(onCreate: true);
	}

@@ -8670,6 +8672,10 @@ public Condition AddCondition(Condition c, bool force = false)

cs
	{
		Refresh();
	}
	if (c.CancelAI) 
	{ 
		ai.Cancel(); 
	} 
	if (IsPC && c.ConsumeTurn && !EClass.pc.isRestrained)
	{
		EClass.player.EndTurn();

+ConBerserk

File Created
cs
public class ConBerserk : BadCondition
{
	public override bool CancelAI => true;

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

	public override void OnRemoved()
	{
		owner.isBerserk = false;
		owner.ai.Cancel();
	}
}

ConSleep

@@ -35,8 +35,6 @@ public class ConSleep : BadCondition

cs

	public override bool ConsumeTurn => true;

	public override bool CancelAI => false; 
	public override int GetPhase()
	{
		return 0;

ConWait

@@ -2,8 +2,6 @@ public class ConWait : Condition

cs
{
	public override bool ConsumeTurn => true;

	public override bool CancelAI => false; 
	public override bool WillOverride => true;

	public override int GetPhase()

CoreRef

@@ -273,6 +273,8 @@ public class TextureDatas

cs

		public TextureData objs_C;

		public TextureData objs_CL; 
		public TextureData objs_CLL;

		public TextureData shadows;

DOMAIN

@@ -10,34 +10,34 @@ public class DOMAIN

cs

	public const int domEyth = 814;

	public const int domWind = 807; 
	public const int domElement = 806;

	public const int domComm = 805;

	public const int domArcane = 804;

	public const int domLuck = 810; 
	public const int domMiracle = 803; 

	public const int domFaith = 802; 
	public const int domMachine = 809; 
	public const int domLuck = 810; 

	public const int domHarmony = 815;

	public const int domWind = 807; 
	public const int domHarvest = 808;

	public const int domTest = 800;

	public const int domSurvival = 801; 
	public const int domMiracle = 803; 
	public const int domFaith = 802; 

	public const int domMachine = 809; 
	public const int domSurvival = 801; 

	public static readonly int[] IDS = new int[16]
	{
		811, 812, 813, 814, 807, 806, 805, 804, 810, 802, 
		815, 808, 800, 801, 803, 809
		811, 812, 813, 814, 806, 805, 804, 803, 809, 810, 
		815, 807, 808, 800, 802, 801
	};
}
public class Domain : EClass

ELEMENT

@@ -15,10 +15,10 @@ public class ELEMENT

cs

	public const int nerve = 754;

	public const int blood = 755; 
	public const int hotspring = 756;

	public const int purity = 759; 
	public const int stimulant = 760;

	public const int recharge = 761;

@@ -27,7 +27,7 @@ public class ELEMENT

cs

	public const int air = 763;

	public const int purity = 759; 
	public const int blood = 755; 

	public const int _void = 0;

@@ -77,8 +77,8 @@ public class ELEMENT

cs

	public static readonly int[] IDS = new int[35]
	{
		750, 751, 752, 753, 754, 755, 756, 760, 761, 762, 
		763, 759, 0, 3, 1, 2, 5, 10, 11, 12, 
		750, 751, 752, 753, 754, 756, 759, 760, 761, 762, 
		763, 755, 0, 3, 1, 2, 5, 10, 11, 12, 
		13, 14, 16, 17, 18, 15, 21, 22, 23, 24,
		25, 26, 29, 85, 20
	};

ENC

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

cs

	public const int mod_talisman = 609;

	public const int negatePoison = 420; 
	public const int negateBlind = 421; 

	public const int mod_scatter = 607;

	public const int sustain_STR = 440; 
	public const int negateShockwave = 430;

	public const int breathing = 429;

@@ -76,7 +74,7 @@ public class ENC

cs

	public const int negateParalysis = 422;

	public const int negateBlind = 421; 
	public const int negatePoison = 420; 

	public const int innocence = 418;

@@ -84,19 +82,19 @@ public class ENC

cs

	public const int seeInvisible = 416;

	public const int invisibility = 415; 
	public const int sustain_STR = 440; 

	public const int encHit = 414; 
	public const int invisibility = 415; 

	public const int slowCorruption = 412;

	public const int encSpell = 411;

	public const int mod_splash = 608; 
	public const int throwReturn = 410; 

	public const int corruption = 409;

	public const int resWeather = 408; 
	public const int mod_splash = 608; 

	public const int travelSpeed = 407;

@@ -114,11 +112,11 @@ public class ENC

cs

	public const int negateTeleport = 400;

	public const int sustain_END = 441; 
	public const int encHit = 414; 

	public const int sustain_DEX = 442; 
	public const int sustain_END = 441; 

	public const int throwReturn = 410; 
	public const int resWeather = 408; 

	public const int mod_ammo = 600;

@@ -156,36 +154,38 @@ public class ENC

cs

	public const int bane_man = 464;

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

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

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

	public const int bane_dragon = 460; 
	public const int bane_machine = 465; 

	public const int sustain_CHA = 447;

	public const int bane_machine = 465; 
	public const int sustain_MAG = 446;

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

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

	public const int sustain_PER = 443; 
	public const int bane_animal = 463; 
	public const int bane_dragon = 460; 
	public const int sustain_DEX = 442; 

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

FACTION

@@ -4,27 +4,27 @@

cs

public class FACTION
{
	public const int bfSea = 3605; 
	public const int bfUndersea = 3606; 

	public const int bfPlain = 3600; 
	public const int bfBeach = 3604; 

	public const int bfForest = 3601; 
	public const int bfFertile = 3700; 

	public const int bfSnow = 3602; 
	public const int fRation = 2207; 

	public const int bfHill = 3603; 
	public const int bfSea = 3605; 

	public const int bfGeyser = 3701;

	public const int bfBeach = 3604; 
	public const int bfHill = 3603; 

	public const int bfFertile = 3700; 
	public const int bfSnow = 3602; 

	public const int bfCave = 3500; 
	public const int bfForest = 3601; 

	public const int bfRuin = 3702; 
	public const int bfPlain = 3600; 

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

	public const int actBuildRecipe = 4005;

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

cs

	public const int fPromo = 2202;

	public const int fElec = 2201; 
	public const int fSoil = 2200; 

	public const int fHeirloom = 2120;

	public const int bfTranquil = 3703; 
	public const int bfRuin = 3702; 

	public const int fTaxEvasion = 2119;

@@ -52,20 +52,22 @@ public class FACTION

cs

	public const int fAttraction = 2206;

	public const int bfVolcano = 3704; 
	public const int bfTranquil = 3703; 

	public const int bfSilica = 3802;

	public const int bfFish = 3706; 
	public const int bfHunt = 3705; 

	public const int actBuildInspect = 4006;

	public const int actBuildAnywhere = 4003; 
	public const int actBuildCollect = 4004; 

	public const int actBuildTerrain = 4002; 
	public const int actBuildAnywhere = 4003; 

	public const int fAdmin = 2115;

	public const int actBuildTerrain = 4002; 
	public const int actBuildMine = 4001;

	public const int actBuildCut = 4000;

@@ -78,9 +80,7 @@ public class FACTION

cs

	public const int bfGum = 3803;

	public const int bfHunt = 3705; 
	public const int actBuildCollect = 4004; 
	public const int bfMushroom = 3801; 

	public const int bfCoal = 3800;

@@ -102,20 +102,22 @@ public class FACTION

cs

	public const int bfMonster = 3707;

	public const int bfMushroom = 3801; 
	public const int bfFish = 3706; 
	public const int bfVolcano = 3704; 

	public const int fConstruction = 2003;

	public const int fSoil = 2200; 
	public const int fElec = 2201; 

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

FEAT

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

cs

public class FEAT
{
	public const int featSnail = 1211; 
	public const int featElea = 1213; 
	public const int featResCurse = 1641; 
	public const int featAnimalLover = 1640; 

	public const int featFaith = 1636;

@@ -51,19 +55,15 @@ public class FEAT

cs

	public const int featExecutioner = 1420;

	public const int featMilitant = 1419; 
	public const int featSwordsage = 1418; 
	public const int featAnimalLover = 1640; 
	public const int featResCurse = 1641; 
	public const int featSleeper = 1642;

	public const int featSorter = 1643;

	public const int featUndead = 1210; 
	public const int featBodyParts = 1644; 
	public const int featParty = 1645; 
	public const int featFairyResist = 1212; 

	public const int featSlowFood = 1200;

@@ -85,12 +85,16 @@ public class FEAT

cs

	public const int featFluffyTail = 1209;

	public const int featFisher = 1659; 
	public const int featUndead = 1210; 

	public const int featWitch = 1417; 
	public const int featMilitant = 1419; 
	public const int featFisher = 1659; 

	public const int featManaCost = 1657;

	public const int featScavenger = 1656; 
	public const int featModelBeliever = 1655;

	public const int featHeavyCasting = 1654;

@@ -111,21 +115,13 @@ public class FEAT

cs

	public const int featLonelySoul = 1646;

	public const int featParty = 1645; 
	public const int featBodyParts = 1644; 
	public const int featScavenger = 1656; 
	public const int featInquisitor = 1416; 
	public const int featChef = 1658;

	public const int featWhiteVixen = 1414; 
	public const int featSwordsage = 1418; 

	public const int featLightEater = 1235; 
	public const int featSnail = 1211; 

	public const int featNorland = 1236; 
	public const int featInquisitor = 1416; 

	public const int featRoran = 1237;

@@ -137,18 +133,18 @@ 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; 
	public const int featGod_healing1 = 1320; 

	public const int featHeavyEater = 1234; 
	public const int featGod_harvest1 = 1325; 

	public const int featGod_healing1 = 1320; 
	public const int featNorland = 1236; 

	public const int featGod_luck1 = 1330;

	public const int featGod_harmony1 = 1335; 
	public const int featGod_oblivion1 = 1340;

	public const int featGod_trickery1 = 1345;

@@ -163,19 +159,19 @@ public class FEAT

cs

	public const int featWizard = 1402;

	public const int featGod_harvest1 = 1325; 
	public const int featFarmer = 1403;

	public const int featCosmicHorror = 1233; 
	public const int featArcher = 1404; 

	public const int featNirvana = 1231; 
	public const int featGod_harmony1 = 1335; 

	public const int featFoxMaid = 1415; 
	public const int featPianist = 1405; 

	public const int featElea = 1213; 
	public const int featLightEater = 1235; 

	public const int featManaPrecision = 1214; 
	public const int featCosmicHorror = 1233; 
	public const int featWitch = 1417; 

	public const int featDwarf = 1215;

@@ -189,18 +185,18 @@ public class FEAT

cs

	public const int featFate = 1220;

	public const int featBaby = 1232; 
	public const int featSpike = 1221;

	public const int featAcidBody = 1223; 
	public const int featSplit = 1222; 

	public const int featFairyResist = 1212; 
	public const int featHeavyEater = 1234; 

	public const int featShiva = 1224; 
	public const int featAcidBody = 1223; 

	public const int featLoyal = 1225;

	public const int featManaPrecision = 1214; 
	public const int featUnderground = 1226;

	public const int featServant = 1227;

@@ -211,15 +207,17 @@ public class FEAT

cs

	public const int featAdam = 1230;

	public const int featSplit = 1222; 
	public const int featNirvana = 1231; 

	public const int featArcher = 1404; 
	public const int featBaby = 1232; 

	public const int featGod_earth1 = 1305; 
	public const int featShiva = 1224; 

	public const int featTourist = 1406;

	public const int featPianist = 1405; 
	public const int featGod_machine1 = 1315; 
	public const int featPaladin2 = 1408; 

	public const int featBoost = 1409;

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

cs

	public const int featLuckyCat = 1412;

	public const int featPaladin = 1407; 
	public const int featFoxMaid = 1415; 

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

	public const int featFairysan = 1413;

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

FOOD

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

cs
public class FOOD
{
	public const int food_undead = 709; 
	public const int justcooked = 757; 
	public const int food_god = 758; 
	public const int food_CHA = 700; 

	public const int food_cat = 701;

	public const int food_CHA = 700; 
	public const int food_love = 703;

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

	public const int kirimi = 707; 
	public const int food_poison = 702; 

	public const int loseWeight = 706;

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

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

	public const int gainWeight = 705;

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

GoalCombat

@@ -43,7 +43,11 @@ public class ItemAbility

cs

	public override bool CanManualCancel()
	{
		return true; 
		if (owner != null) 
		{ 
			return !owner.isBerserk; 
		} 
		return false; 
	}

	public override IEnumerable<Status> Run()

@@ -503,7 +507,7 @@ public virtual bool TryUseAbility(int dist, bool beforeMove = false)

cs
		ability.priority = 0;
		ability.tg = null;
		ability.pt = false;
		if (EClass.rnd(100) >= ability.chance || (isBlind && ability.act.HasTag("reqSight"))) 
		if (EClass.rnd(100) >= ability.chance || (isBlind && ability.act.HasTag("reqSight")) || (act is Spell && owner.isBerserk)) 
		{
			continue;
		}

@@ -571,10 +575,14 @@ public virtual bool TryUseAbility(int dist, bool beforeMove = false)

cs
		switch (text)
		{
		case "item":
			if (owner.isBerserk) 
			{ 
				continue; 
			} 
			num = (ability.act as ActItem).BuildAct(owner);
			break;
		case "wait":
			if (owner.IsPCParty) 
			if (owner.isBerserk || owner.IsPCParty) 
			{
				continue;
			}

@@ -582,9 +590,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 flag8 = owner.HasCondition<StanceTaunt>(); 
			bool flag9 = tactics.source.taunt != -1 && 100 * owner.hp / owner.MaxHP >= tactics.source.taunt; 
			num = ((flag8 && !flag9) ? 100 : ((!flag8 && flag9) ? 100 : 0)); 
			break;
		}
		case "melee":

@@ -641,13 +649,25 @@ public virtual bool TryUseAbility(int dist, bool beforeMove = false)

cs
			}
			break;
		case "teleport":
			if (owner.isBerserk) 
			{ 
				continue; 
			} 
			num = 40;
			break;
		case "any":
			if (owner.isBerserk) 
			{ 
				continue; 
			} 
			num = 50;
			break;
		case "hot":
		case "heal":
			if (owner.isBerserk) 
			{ 
				continue; 
			} 
			isHOT = text == "hot";
			num = ForeachChara(ability, (Chara c) => HealFactor(c), isFriendlyAbility: true);
			if (ability.aiPt || (owner.IsPC && tactics.CastPartyBuff))

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

cs
			{
				continue;
			}
			bool flag6 = text == "dot"; 
			if (flag6 && (owner.isRestrained || (tc != null && tc.IsRestrainedResident))) 
			bool flag7 = text == "dot"; 
			if (flag7 && (owner.isRestrained || (tc != null && tc.IsRestrainedResident))) 
			{
				continue;
			}
			num = ((text == "attackMelee") ? tactics.P_Melee : tactics.P_Spell) + GetAttackMod(act);
			if (num > 0 && flag6) 
			if (num > 0 && flag7) 
			{
				num += 10;
			}

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

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

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

cs
			break;
		}
		case "buff":
			if (owner.isBerserk) 
			{ 
				continue; 
			} 
			num = ForeachChara(ability, (Chara c) => (!c.HasCondition(s.proc[1])) ? tactics.P_Buff : 0, isFriendlyAbility: true);
			if (ability.aiPt || (owner.IsPC && tactics.CastPartyBuff))
			{

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

cs
			}
			break;
		case "buffStats":
			if (owner.isBerserk) 
			{ 
				continue; 
			} 
			num = ForeachChara(ability, delegate(Chara c)
			{
				Element buffStats2 = c.GetBuffStats(s.proc[1]);

@@ -717,7 +745,7 @@ public virtual bool TryUseAbility(int dist, bool beforeMove = false)

cs
			}
			break;
		case "debuff":
			if (!flag) 
			if (owner.isBerserk || !flag) 
			{
				continue;
			}

@@ -728,7 +756,7 @@ public virtual bool TryUseAbility(int dist, bool beforeMove = false)

cs
			}
			break;
		case "debuffStats":
			if (!flag) 
			if (owner.isBerserk || !flag) 
			{
				continue;
			}

@@ -755,7 +783,7 @@ public virtual bool TryUseAbility(int dist, bool beforeMove = false)

cs
			break;
		case "summon":
		{
			if (owner.isRestrained || (tc != null && tc.IsRestrainedResident)) 
			if (owner.isBerserk || owner.isRestrained || (tc != null && tc.IsRestrainedResident)) 
			{
				continue;
			}

@@ -768,7 +796,7 @@ public virtual bool TryUseAbility(int dist, bool beforeMove = false)

cs
			break;
		}
		case "summonAlly":
			if (owner.isRestrained || (tc != null && tc.IsRestrainedResident)) 
			if (owner.isBerserk || owner.isRestrained || (tc != null && tc.IsRestrainedResident)) 
			{
				continue;
			}

@@ -786,7 +814,7 @@ public virtual bool TryUseAbility(int dist, bool beforeMove = false)

cs
			num = tactics.P_Summon;
			break;
		case "suicide":
			if (owner.IsPC || owner.HasCondition<ConWet>()) 
			if (owner.isBerserk || owner.IsPC || owner.HasCondition<ConWet>()) 
			{
				continue;
			}

@@ -857,36 +885,36 @@ int HealFactor(Chara c)

cs
			{
				return 0;
			}
			float num3 = (float)c.hp / (float)c.MaxHP; 
			if (num3 > (isHOT ? 0.85f : 0.75f)) 
			float num8 = (float)c.hp / (float)c.MaxHP; 
			if (num8 > (isHOT ? 0.85f : 0.75f)) 
			{
				return 0;
			}
			int num4 = tactics.P_Heal - (int)((float)tactics.P_Heal * num3) + (isHOT ? 50 : 25); 
			int num9 = tactics.P_Heal - (int)((float)tactics.P_Heal * num8) + (isHOT ? 50 : 25); 
			foreach (Condition condition in c.conditions)
			{
				if (condition is ConFear)
				{
					num4 += 10; 
					num9 += 10; 
				}
				else if (condition is ConPoison)
				{
					num4 += 2; 
					num9 += 2; 
				}
				else if (condition is ConConfuse)
				{
					num4 += 4; 
					num9 += 4; 
				}
				else if (condition is ConDim)
				{
					num4 += 6; 
					num9 += 6; 
				}
				else if (condition is ConBleed)
				{
					num4 += 8; 
					num9 += 8; 
				}
			}
			return num4; 
			return num9; 
		}
	}
	abilities.Sort((ItemAbility a, ItemAbility b) => b.priority - a.priority);

@@ -972,8 +1000,8 @@ void BuildCharaList()

cs
		{
			if (chara2 != owner)
			{
				int num7 = owner.Dist(chara2); 
				if (num7 > sightRadius || !owner.CanSeeLos(chara2, num7)) 
				int num5 = owner.Dist(chara2); 
				if (num5 > sightRadius || !owner.CanSeeLos(chara2, num5)) 
				{
					continue;
				}

@@ -989,11 +1017,11 @@ int ForeachChara(ItemAbility a, Func<Chara, int> func, bool isFriendlyAbility)

cs
			return func(owner);
		}
		BuildCharaList();
		int num8 = 0; 
		int num6 = 0; 
		foreach (Chara chara3 in charas)
		{
			int num9 = func(chara3); 
			if (num9 > 0) 
			int num7 = func(chara3); 
			if (num7 > 0) 
			{
				if (isFriendlyAbility)
				{

@@ -1010,21 +1038,21 @@ int ForeachChara(ItemAbility a, Func<Chara, int> func, bool isFriendlyAbility)

cs
					}
					if (chara3 != owner)
					{
						num9 += tactics.P_Party; 
						num7 += tactics.P_Party; 
					}
				}
				else if (!owner.IsHostile(chara3))
				{
					continue;
				}
				if (num9 >= num8) 
				if (num7 >= num6) 
				{
					a.tg = chara3;
					num8 = num9; 
					num6 = num7; 
				}
			}
		}
		return num8; 
		return num6; 
	}
	int GetAttackMod(Act a)
	{

@@ -1032,30 +1060,30 @@ int GetAttackMod(Act a)

cs
		{
			return 0;
		}
		int num5 = ((a.source.aliasRef == "mold") ? owner.MainElement.id : EClass.sources.elements.alias[a.source.aliasRef].id); 
		int num6 = -15 * tc.ResistLvFrom(num5); 
		switch (num5) 
		int num3 = ((a.source.aliasRef == "mold") ? owner.MainElement.id : EClass.sources.elements.alias[a.source.aliasRef].id); 
		int num4 = -15 * tc.ResistLvFrom(num3); 
		switch (num3) 
		{
		case 910:
			if (tc.isWet)
			{
				num6 -= 30; 
				num4 -= 30; 
			}
			break;
		case 911:
			if (tc.HasCondition<ConBurning>())
			{
				num6 -= 30; 
				num4 -= 30; 
			}
			break;
		case 912:
			if (tc.isWet)
			{
				num6 += 30; 
				num4 += 30; 
			}
			break;
		}
		return num6; 
		return num4; 
	}
	void GetNumEnemy(int radius)
	{

GrowSystem

@@ -284,7 +284,14 @@ public bool CanGrow(VirtualDate date)

cs
			return false;
		}
	}
	if (NeedUndersea && !EClass._zone.IsUnderwater && !cell.sourceFloor.tileType.IsDeepWater) 
	if (NeedUndersea) 
	{ 
		if (!EClass._zone.IsUnderwater && !cell.sourceFloor.tileType.IsDeepWater) 
		{ 
			return false; 
		} 
	} 
	else if (EClass._zone.IsUnderwater) 
	{
		return false;
	}

MUTATION

@@ -1,28 +1,30 @@

cs
public class MUTATION
{
	public const int mutationSkin = 1510; 
	public const int mutationSkinN = 1511; 
	public const int mutationSpeedN = 1519;

	public const int mutationEyeN = 1513; 
	public const int mutationDex = 1514; 
	public const int mutationSpeed = 1518; 

	public const int mutationDexN = 1515; 
	public const int mutationRegenN = 1517; 

	public const int mutationRegen = 1516;

	public const int mutationRegenN = 1517; 
	public const int mutationEye = 1512; 

	public const int mutationSpeed = 1518; 
	public const int mutationEyeN = 1513; 
	public const int mutationSkinN = 1511; 
	public const int mutationSkin = 1510; 

	public const int mutationStr = 1520;

	public const int mutationEye = 1512; 
	public const int mutationDexN = 1515; 

	public const int mutationCha = 1522; 
	public const int mutationStrN = 1521; 
	public const int mutationDex = 1514; 
	public const int mutationChaN = 1523; 

	public const int etherPoisonHand = 1565;

@@ -30,7 +32,7 @@ public class MUTATION

cs

	public const int etherProvoke = 1563;

	public const int mutationStrN = 1521; 
	public const int mutationCha = 1522; 

	public const int etherStupid = 1561;

@@ -50,38 +52,36 @@ public class MUTATION

cs

	public const int etherArmor = 1562;

	public const int mutationBrain = 1524; 
	public const int etherFeet = 1552;

	public const int etherUgly = 1551; 
	public const int etherGravity = 1550; 
	public const int mutationBrain = 1524; 

	public const int mutationBodyN = 1531; 
	public const int etherEye = 1553; 

	public const int mutationBody = 1530; 
	public const int mutationCold = 1526; 

	public const int mutationLightningN = 1529; 
	public const int mutationColdN = 1527; 

	public const int mutationLightning = 1528;

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

	public const int mutationCold = 1526; 
	public const int mutationBody = 1530; 

	public const int mutationBrainN = 1525; 
	public const int mutationBodyN = 1531; 

	public const int mutationChaN = 1523; 
	public const int etherGravity = 1550; 

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

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

MapGen

@@ -344,7 +344,7 @@ public void MakeNeighbor()

cs
{
	EloMap.TileInfo thisInfo;
	int seaDir;
	if (bp.surrounding != null) 
	if (bp.surrounding != null && !zone.IsUnderwater) 
	{
		thisInfo = bp.surrounding[1, 1];
		seaDir = (thisInfo.sea ? (1 + EClass.rnd(4)) : 0);

MapGenDungen

@@ -220,94 +220,36 @@ protected override bool OnGenerateTerrain()

cs
			EClass._zone.AddCard(t3, point).Install();
		}
	}
	if (zone.IsUnderwater) 
	{ 
		for (int l = 0; l < 30 + EClass.rnd(30); l++) 
		{ 
			zone.SpawnMob(null, SpawnSetting.Fish()); 
		} 
		Crawler crawler = Crawler.Create("pasture"); 
		int tries = (EClass.debug.enable ? 3 : EClass.rnd(EClass.rnd(EClass.rnd(EClass.rnd(5) + 1) + 1) + 1)); 
		Thing seed = null; 
		int num4 = Mathf.Min(EClass._zone.DangerLv, EClass.pc.Evalue(286) * 2 / 3); 
		if (num4 > 0) 
		{ 
			seed = TraitSeed.MakeSeed(EClass.sources.objs.map[137]); 
			Rand.SetSeed(EClass._zone.uid * 10 + num4); 
			TraitSeed.LevelSeed(seed, (seed.trait as TraitSeed).row, num4); 
			Rand.SetSeed(); 
			seed.elements.SetBase(2, EClass.curve(seed.encLV, 50, 10, 80)); 
		} 
		crawler.CrawlUntil(EClass._map, () => EClass._map.GetRandomPoint(), tries, delegate(Crawler.Result r) 
		{ 
			int id2 = 137; 
			foreach (Point point2 in r.points) 
			{ 
				if (!point2.cell.isModified && !point2.HasThing && !point2.HasBlock && !point2.HasObj) 
				{ 
					map.SetObj(point2.x, point2.z, id2); 
					int idx = 3 + ((EClass.rnd(3) == 0) ? 1 : 0) + ((EClass.rnd(3) == 0) ? (-1) : 0) + ((EClass.rnd(3) == 0) ? (-1) : 0); 
					point2.growth.SetStage(idx); 
					if (seed != null) 
					{ 
						EClass._map.AddPlant(point2, seed); 
					} 
				} 
			} 
			return false; 
		}); 
		crawler.CrawlUntil(tries: EClass.rnd(EClass.rnd(5) + 1) + 1, map: EClass._map, onStart: () => EClass._map.GetRandomPoint(), canComplete: delegate(Crawler.Result r) 
		{ 
			int id = 136; 
			foreach (Point point3 in r.points) 
			{ 
				if (!point3.cell.isModified && !point3.HasThing && !point3.HasBlock && !point3.HasObj) 
				{ 
					map.SetObj(point3.x, point3.z, id, 1, EClass.rnd(4)); 
				} 
			} 
			return false; 
		}); 
		crawler.CrawlUntil(tries: EClass.rnd(EClass.rnd(10) + 1) + 3, map: EClass._map, onStart: () => EClass._map.GetRandomPoint(), canComplete: delegate(Crawler.Result r) 
		{ 
			int idFloor = 121; 
			foreach (Point point4 in r.points) 
			{ 
				map.SetFloor(point4.x, point4.z, 97, idFloor, Mathf.Clamp(4 - r.startPos.Distance(point4) + EClass.rnd(3) - EClass.rnd(3), 0, 3)); 
			} 
			return false; 
		}); 
	} 
	bool forest = zone is Zone_RandomDungeonForest;
	if (zone is Zone_RandomDungeonPlain || (forest && EClass.rnd(3) == 0))
	{
		Crawler.Create("pasture").CrawlUntil(tries: EClass.debug.enable ? 3 : EClass.rnd(EClass.rnd(3) + 1), map: EClass._map, onStart: () => EClass._map.GetRandomPoint(), canComplete: delegate(Crawler.Result r)
		{
			int num5 = ((forest || EClass.rnd(5) == 0) ? EClass.sources.objs.rows.Where((SourceObj.Row a) => a.ContainsTag("wild")).RandomItem().id : ((EClass.rnd(3) == 0) ? 108 : 105)); 
			int num4 = ((forest || EClass.rnd(5) == 0) ? EClass.sources.objs.rows.Where((SourceObj.Row a) => a.ContainsTag("wild")).RandomItem().id : ((EClass.rnd(3) == 0) ? 108 : 105)); 
			Thing thing5 = null;
			int num6 = Mathf.Min(EClass._zone.DangerLv, EClass.pc.Evalue(286) * 2 / 3); 
			if (num6 > 0) 
			int num5 = Mathf.Min(EClass._zone.DangerLv, EClass.pc.Evalue(286) * 2 / 3); 
			if (num5 > 0) 
			{
				thing5 = TraitSeed.MakeSeed(EClass.sources.objs.map[num5]); 
				Rand.SetSeed(EClass._zone.uid * 10 + num6); 
				TraitSeed.LevelSeed(thing5, (thing5.trait as TraitSeed).row, num6); 
				thing5 = TraitSeed.MakeSeed(EClass.sources.objs.map[num4]); 
				Rand.SetSeed(EClass._zone.uid * 10 + num5); 
				TraitSeed.LevelSeed(thing5, (thing5.trait as TraitSeed).row, num5); 
				Rand.SetSeed();
				thing5.elements.SetBase(2, EClass.curve(thing5.encLV, 50, 10, 80));
			}
			foreach (Point point5 in r.points) 
			foreach (Point point2 in r.points) 
			{
				if (!point5.cell.isModified && !point5.HasThing && !point5.HasBlock && !point5.HasObj) 
				if (!point2.cell.isModified && !point2.HasThing && !point2.HasBlock && !point2.HasObj) 
				{
					map.SetObj(point5.x, point5.z, num5); 
					int num7 = 3; 
					map.SetObj(point2.x, point2.z, num4); 
					int num6 = 3; 
					if (EClass.rnd(6) == 0)
					{
						num7++; 
						num6++; 
					}
					point5.growth.SetStage(num7); 
					point2.growth.SetStage(num6); 
					if (thing5 != null)
					{
						EClass._map.AddPlant(point5, thing5); 
						EClass._map.AddPlant(point2, thing5); 
					}
				}
			}

POLICY

@@ -3,30 +3,26 @@

cs

public class POLICY
{
	public const int store_ripoff = 2816; 
	public const int license_food = 2818; 

	public const int platinum_ticket = 2815; 
	public const int bed_quality = 2812; 

	public const int mass_exhibition = 2814; 
	public const int suite_room = 2813; 

	public const int home_discount = 2800; 
	public const int mass_exhibition = 2814; 

	public const int bed_quality = 2812; 
	public const int platinum_ticket = 2815; 

	public const int tourist_safety = 2811;

	public const int open_business = 2810; 
	public const int store_ripoff = 2816; 

	public const int store_premium = 2817;

	public const int suite_room = 2813; 
	public const int license_food = 2818; 
	public const int license_furniture = 2819; 

	public const int license_stolen = 2824;

	public const int license_general = 2820; 
	public const int legendary_heirloom = 2821;

	public const int celeb = 2822;

@@ -41,31 +37,33 @@ public class POLICY

cs

	public const int license_slaver = 2828;

	public const int license_furniture = 2819; 
	public const int open_business = 2810; 

	public const int livestock_priv = 2715; 
	public const int license_general = 2820; 

	public const int resident_tax = 2512; 
	public const int home_discount = 2800; 

	public const int incomeTransfer = 2711; 
	public const int taxfree = 2514; 

	public const int forcePanty = 2712;

	public const int wealth_tax = 2500; 
	public const int human_right = 2506; 
	public const int impressment = 2504; 

	public const int legal_drug = 2505;

	public const int impressment = 2504; 
	public const int human_right = 2506; 

	public const int prohibition = 2503; 
	public const int inquisition = 2507; 

	public const int food_for_people = 2502; 
	public const int nocturnal_life = 2508; 

	public const int faith_tax = 2501;

	public const int inquisition = 2507; 
	public const int wealth_tax = 2500; 
	public const int livestock_priv = 2715; 
	public const int prohibition = 2503; 

	public const int vaccination = 2509;

@@ -73,25 +71,31 @@ public class POLICY

cs

	public const int self_sufficient = 2511;

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

	public const int nocturnal_life = 2508; 
	public const int food_for_people = 2502; 
	public const int speed_growth = 2516; 
	public const int weed_no = 2703; 

	public const int stop_growth = 2515;

	public const int noAnimal = 2709; 
	public const int taxTransfer = 2705; 

	public const int taxfree = 2514; 
	public const int demon_invocation = 2706; 
	public const int border_watch = 2704; 

	public const int noDM = 2708;

	public const int auto_farm = 2707;

	public const int demon_invocation = 2706; 
	public const int border_watch = 2704; 
	public const int noMother = 2710; 

	public const int taxTransfer = 2705; 
	public const int incomeTransfer = 2711; 

	public const int trash_no = 2702;

@@ -99,20 +103,16 @@ public class POLICY

cs

	public const int energy_conservation = 2700;

	public const int speed_growth = 2516; 
	public const int weed_no = 2703; 
	public const int noMother = 2710; 
	public const int noAnimal = 2709; 

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

QuestDefenseGame

@@ -10,13 +10,16 @@ public class QuestDefenseGame : QuestInstance

cs
	[JsonProperty]
	public Thing thing;

	[JsonProperty] 
	public bool useFame; 
	public override string IdZone => "instance_arena";

	public override string RefDrama1 => thing.NameSimple;

	public override string RewardSuffix => "Defense";

	public override bool FameContent => true; 
	public override bool FameContent => useFame; 

	public override int FameOnComplete => (lastWave * 8 + difficulty * 10) * (100 + bonus * 5) / 100;

@@ -33,6 +36,7 @@ public override ZoneInstanceRandomQuest CreateInstance()

cs
	public override void OnInit()
	{
		thing = ThingGen.CreateFromFilter("thing", 30);
		useFame = EClass.rnd(3) != 0; 
	}

	public override void OnBeforeComplete()

SKILL

@@ -1,13 +1,13 @@

cs
public class SKILL
{
	public const int weaponBlunt = 111; 
	public const int shield = 123;

	public const int armorHeavy = 122;

	public const int armorLight = 120;

	public const int weaponBlunt = 111; 
	public const int PDR = 55;

	public const int weaponCrossbow = 109;

@@ -16,16 +16,14 @@ public class SKILL

cs

	public const int acidproof = 51;

	public const int twohand = 130; 
	public const int weaponScythe = 110;

	public const int fishing = 245;

	public const int mining = 220; 
	public const int marksman = 133;

	public const int tactics = 132; 
	public const int climbing = 242;

	public const int music = 241;

@@ -44,7 +42,7 @@ public class SKILL

cs

	public const int lumberjack = 225;

	public const int spotting = 210; 
	public const int mining = 220; 

	public const int weightlifting = 207;

@@ -60,13 +58,17 @@ public class SKILL

cs

	public const int eyeofmind = 134;

	public const int tactics = 132; 
	public const int twowield = 131; 

	public const int EDR = 56; 
	public const int spotting = 210; 

	public const int weaponStaff = 103; 
	public const int weaponAxe = 102; 

	public const int throwing = 108; 
	public const int weaponDagger = 107; 
	public const int EDR = 56; 
	public const int evasionPerfect = 57; 

	public const int life = 60;

@@ -96,43 +98,41 @@ public class SKILL

cs

	public const int WIL = 75;

	public const int evasionPerfect = 57; 
	public const int MAG = 76;

	public const int LUC = 78; 
	public const int SPD = 79; 
	public const int INT = 80; 
	public const int weaponPolearm = 106; 

	public const int critical = 90; 
	public const int weaponGun = 105; 

	public const int vopal = 91; 
	public const int weaponBow = 104; 

	public const int penetration = 92; 
	public const int weaponStaff = 103; 

	public const int antiMagic = 93; 
	public const int weaponSword = 101; 

	public const int martial = 100;

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

	public const int weaponAxe = 102; 
	public const int antiMagic = 93; 

	public const int weaponBow = 104; 
	public const int vopal = 91; 

	public const int weaponGun = 105; 
	public const int critical = 90; 

	public const int weaponPolearm = 106; 
	public const int INT = 80; 

	public const int weaponDagger = 107; 
	public const int SPD = 79; 
	public const int LUC = 78; 

	public const int CHA = 77;

	public const int penetration = 92; 
	public const int gathering = 250;

	public const int twowield = 131; 
	public const int twohand = 130; 

	public const int blacksmith = 256;

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

cs

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

SLOT

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

cs
public class SLOT
{
	public const int neck = 31; 
	public const int toolbelt = 44;

	public const int leg = 38;

	public const int tool = 40;

	public const int torso = 32; 
	public const int back = 33;

	public const int lightsource = 45;

	public const int ammo = 42; 
	public const int neck = 31; 
	public const int arm = 34;

	public const int hand = 35;

	public const int foot = 39; 
	public const int torso = 32; 

	public const int finger = 36; 
	public const int range = 41; 
	public const int foot = 39; 

	public const int waist = 37;

	public const int head = 30; 
	public const int ammo = 42; 

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

	public const int token = 43;

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

SPELL

@@ -1,13 +1,11 @@

cs
public class SPELL
{
	public const int puddle_Nerve = 50908; 
	public const int ball_Holy = 50109; 

	public const int hand_Sound = 50407;

	public const int arrow_Sound = 50507;

	public const int miasma_Holy = 50709; 
	public const int funnel_Sound = 50607;

	public const int miasma_Sound = 50707;

@@ -16,13 +14,13 @@ public class SPELL

cs

	public const int puddle_Sound = 50907;

	public const int funnel_Holy = 50609; 
	public const int hand_Holy = 50409; 
	public const int miasma_Holy = 50709; 

	public const int sword_Sound = 51007;

	public const int bolt_Holy = 50309; 
	public const int ball_Nerve = 50108; 
	public const int sword_Nerve = 51008; 

	public const int bolt_Nerve = 50308;

@@ -32,26 +30,28 @@ public class SPELL

cs

	public const int funnel_Nerve = 50608;

	public const int ball_Holy = 50109; 
	public const int miasma_Nerve = 50708;

	public const int weapon_Nerve = 50808; 
	public const int hand_Holy = 50409; 

	public const int sword_Nerve = 51008; 
	public const int bolt_Holy = 50309; 

	public const int ball_Nerve = 50108; 
	public const int weapon_Nerve = 50808; 

	public const int arrow_Holy = 50509; 
	public const int puddle_Nerve = 50908; 

	public const int hand_Mind = 50404; 
	public const int arrow_Holy = 50509; 

	public const int ball_Sound = 50107; 
	public const int funnel_Holy = 50609; 

	public const int bolt_Mind = 50304;

	public const int ball_Sound = 50107; 
	public const int weapon_Holy = 50809;

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

	public const int funnel_Mind = 50604;

@@ -108,6 +108,8 @@ public class SPELL

cs

	public const int ball_Chaos = 50110;

	public const int weapon_Acid = 50813; 
	public const int puddle_Acid = 50913;

	public const int sword_Acid = 51013;

@@ -132,9 +134,9 @@ public class SPELL

cs

	public const int ball_Impact = 50115;

	public const int bolt_Impact = 50315; 
	public const int miasma_Acid = 50713; 

	public const int hand_Impact = 50415; 
	public const int bolt_Impact = 50315; 

	public const int arrow_Impact = 50515;

@@ -162,9 +164,9 @@ public class SPELL

cs

	public const int weapon_Void = 50816;

	public const int weapon_Acid = 50813; 
	public const int hand_Impact = 50415; 

	public const int miasma_Acid = 50713; 
	public const int sword_Holy = 51009; 

	public const int funnel_Acid = 50613;

@@ -196,7 +198,7 @@ public class SPELL

cs

	public const int funnel_Magic = 50611;

	public const int sword_Holy = 51009; 
	public const int ball_Mind = 50104; 

	public const int miasma_Magic = 50711;

@@ -228,11 +230,11 @@ public class SPELL

cs

	public const int weapon_Magic = 50811;

	public const int ball_Mind = 50104; 
	public const int sword_Darkness = 51003; 

	public const int funnel_Fire = 50600;

	public const int puddle_Darkness = 50903; 
	public const int weapon_Darkness = 50803; 

	public const int SpHealHeavy = 8401;

@@ -356,13 +358,15 @@ public class SPELL

cs

	public const int SpReconstruction = 8288;

	public const int SpBerserk = 8707; 
	public const int SpGravity = 8708;

	public const int SpSpeedDown = 8710;

	public const int SpTelepathy = 8770;

	public const int SpInvisibility = 8775; 
	public const int arrow_Fire = 50500; 

	public const int miasma_Fire = 50700;

@@ -420,15 +424,15 @@ public class SPELL

cs

	public const int miasma_Darkness = 50703;

	public const int weapon_Darkness = 50803; 
	public const int hand_Fire = 50400; 

	public const int arrow_Fire = 50500; 
	public const int puddle_Darkness = 50903; 

	public const int sword_Darkness = 51003; 
	public const int bolt_Fire = 50300; 

	public const int hand_Fire = 50400; 
	public const int ball_Fire = 50100; 

	public const int puddle_Void = 50916; 
	public const int SpInvisibility = 8775; 

	public const int SpSeeInvisible = 8776;

@@ -486,39 +490,37 @@ public class SPELL

cs

	public const int SpDrawBacker = 9503;

	public const int ball_Fire = 50100; 
	public const int bolt_Fire = 50300; 
	public const int puddle_Void = 50916; 

	public const int sword_Void = 51016;

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

TextureManager

@@ -22,6 +22,7 @@ public void Init()

cs
	AddBase(textureData.shadows, "shadows.png", tileMap.passShadow);
	AddBase(textureData.fov, "fov.png", tileMap.passFov);
	AddBase(textureData.objs_C, "objs_C.png", tileMap.passChara);
	AddBase(textureData.objs_CL, "objs_CL.png", tileMap.passCharaL); 
	AddBase(textureData.objs_CLL, "objs_CLL.png", tileMap.passCharaLL);
	AddBase(textureData.block_snow, "blocks_snow.png", tileMap.passBlock.snowPass);
	AddBase(textureData.floor_snow, "floors_snow.png", tileMap.passFloor.snowPass);

@@ -42,8 +43,7 @@ public void Init()

cs
	Add(tileMap.passShore, textureData.floor);
	Add(tileMap.passAutoTileWater, textureData.floor);
	Add(tileMap.passFloorMarker, textureData.floor);
	Add(tileMap.passCharaL, textureData.objs_C); 
	Add(tileMap.passCharaLW, textureData.objs_C); 
	Add(tileMap.passCharaLW, textureData.objs_CL); 
	Add(tileMap.passIcon, textureData.objs_S);
	AddList(textureData.world, "world.png");
	AddList(textureData.bird, "bird1.png");

TraitChara

@@ -104,9 +104,9 @@ public virtual bool CanBeTamed

cs
{
	get
	{
		if (!IsUnique && owner.rarity < Rarity.Legendary && !owner.IsMultisize && !owner.IsGlobal && !owner.IsPCFaction) 
		if (!IsUnique && owner.rarity < Rarity.Legendary && !owner.IsMultisize && !owner.IsGlobal && !owner.IsPCFaction && EClass._zone.Boss != owner && CanInvite) 
		{
			return EClass._zone.Boss != owner; 
			return owner.c_bossType == BossType.none; 
		}
		return false;
	}

TraitCrafter

@@ -365,7 +365,7 @@ public virtual Thing Craft(AI_UseCrafter ai)

cs
			Msg.Say("rune_tooHard", owner);
			break;
		}
		EClass.ui.AddLayer<LayerList>().SetList2(list, (Element a) => a.Name, delegate(Element a, ItemGeneral b) 
		EClass.ui.AddLayer<LayerList>().SetList2(list, (Element a) => GetName(a), delegate(Element a, ItemGeneral b) 
		{
			owner.ModNum(-1);
			eq.Destroy();

@@ -378,7 +378,8 @@ public virtual Thing Craft(AI_UseCrafter ai)

cs
			EClass.pc.PlayEffect("intonation");
		}, delegate(Element a, ItemGeneral b)
		{
			b.SetSubText(a.vBase + a.vSource + ((a.vLink != 0) ? (" (" + a.vLink + ")") : ""), 200, FontColor.Default, TextAnchor.MiddleRight); 
			string lang = a.vBase + a.vSource + ((a.vLink != 0) ? (" (" + a.vLink + ")") : ""); 
			b.SetSubText(lang, 200, FontColor.Default, TextAnchor.MiddleRight); 
			b.Build();
			if (a.HasTag("noRune"))
			{

@@ -509,6 +510,23 @@ public virtual Thing Craft(AI_UseCrafter ai)

cs
		t.SetNum(num);
	}
	return t;
	static string GetName(Element a) 
	{ 
		string text = a.Name; 
		string encSlot = a.source.encSlot; 
		if ((encSlot == null || encSlot.Length != 0) && !(encSlot == "global") && !(encSlot == "all")) 
		{ 
			text += " ["; 
			string[] array2 = a.source.encSlot.Split(','); 
			foreach (string text2 in array2) 
			{ 
				text += ((text2 == "weapon") ? "weapon_enc".lang() : EClass.sources.elements.alias[text2].GetName().ToTitleCase()); 
				text += ", "; 
			} 
			text = text.TrimEnd(", ".ToCharArray()) + "]"; 
		} 
		return text; 
	} 
	void Prize(int chance, string s, string col, bool cat)
	{
		if (!claimed && EClass.rnd(chance) == 0)

TraitMoongate

@@ -56,6 +56,7 @@ public async UniTask<bool> UseMoongate()

cs
		lang = ((EClass.rnd(10) != 0) ? ((EClass.rnd(2) == 0) ? "JP" : "EN") : "CN");
	}
	Debug.Log(lang);
	Net.DownloadMeta meta = null; 
	try
	{
		List<Net.DownloadMeta> listOrg = await Net.GetFileList(lang);

@@ -74,13 +75,13 @@ public async UniTask<bool> UseMoongate()

cs
		}
		List<MapMetaData> list = ListSavedUserMap();
		IList<Net.DownloadMeta> list2 = listOrg.Copy();
		foreach (MapMetaData item2 in list) 
		foreach (MapMetaData item in list) 
		{
			foreach (Net.DownloadMeta item3 in list2) 
			foreach (Net.DownloadMeta item2 in list2) 
			{
				if (item3.id == item2.id && item3.version == item2.version) 
				if (item2.id == item.id && item2.version == item.version) 
				{
					list2.Remove(item3); 
					list2.Remove(item2); 
					break;
				}
			}

@@ -90,16 +91,16 @@ public async UniTask<bool> UseMoongate()

cs
		{
			list2 = listOrg.Copy();
		}
		Net.DownloadMeta item = list2.RandomItem(); 
		Zone_User zone_User = EClass.game.spatials.Find((Zone_User z) => z.id == item.id); 
		meta = list2.RandomItem(); 
		Zone_User zone_User = EClass.game.spatials.Find((Zone_User z) => z.id == meta.id); 
		if (zone_User != null)
		{
			MoveZone(zone_User);
			return true;
		}
		FileInfo fileInfo = await Net.DownloadFile(item, CorePath.ZoneSaveUser, lang); 
		Debug.Log(item?.ToString() + "/" + item.title + item.id + "/" + item.path + "/"); 
		Debug.Log(fileInfo?.ToString() + "/" + item.name + "/" + item.path); 
		FileInfo fileInfo = await Net.DownloadFile(meta, CorePath.ZoneSaveUser, lang); 
		Debug.Log(meta?.ToString() + "/" + meta.title + meta.id + "/" + meta.path + "/"); 
		Debug.Log(fileInfo?.ToString() + "/" + meta.name + "/" + meta.path); 
		if (Zone.IsImportValid(fileInfo.FullName))
		{
			Debug.Log("valid");

@@ -114,6 +115,10 @@ public async UniTask<bool> UseMoongate()

cs
	catch (Exception ex)
	{
		EClass.ui.Say(ex.Message);
		if (meta != null) 
		{ 
			EClass.ui.Say("Invalid Usermap: " + meta.title + "(" + meta.id + ")"); 
		} 
		return false;
	}
	return true;

TraitToolBrush

@@ -47,10 +47,6 @@ public static bool IsTamePossible(Chara c)

cs
		{
			return false;
		}
		if (!EClass._zone.IsInstance && c.c_bossType == BossType.none) 
		{ 
			return c.trait.CanInvite; 
		} 
		return false; 
		return !EClass._zone.IsInstance; 
	}
}

Zone

@@ -2298,7 +2298,7 @@ public void Generate()

cs
	Zone_Field zone_Field = this as Zone_Field;
	if (IdBiome == "Sand" || IdBiome == "Water" || IsUnderwater)
	{
		int num = 1 + EClass.rnd((IdBiome == "water") ? 4 : 2); 
		int num = 1 + EClass.rnd((IdBiome == "Water") ? 3 : 2); 
		for (int i = 0; i < num; i++)
		{
			Point randomSurface = EClass._map.bounds.GetRandomSurface(centered: false, walkable: true, allowWater: true);

@@ -2318,12 +2318,71 @@ public void Generate()

cs
			}
		}
	}
	if (IsUnderwater) 
	{ 
		for (int k = 0; k < 30 + EClass.rnd(30); k++) 
		{ 
			SpawnMob(null, SpawnSetting.Fish()); 
		} 
		Crawler crawler = Crawler.Create("pasture"); 
		int num2 = (EClass.debug.enable ? 3 : EClass.rnd(EClass.rnd(EClass.rnd(EClass.rnd(5) + 1) + 1) + 1)); 
		bool flag = this is Zone_Field; 
		Thing seed = null; 
		int num3 = Mathf.Min(EClass._zone.DangerLv, EClass.pc.Evalue(286) * 2 / 3); 
		if (num3 > 0) 
		{ 
			seed = TraitSeed.MakeSeed(EClass.sources.objs.map[137]); 
			Rand.SetSeed(EClass._zone.uid * 10 + num3); 
			TraitSeed.LevelSeed(seed, (seed.trait as TraitSeed).row, num3); 
			Rand.SetSeed(); 
			seed.elements.SetBase(2, EClass.curve(seed.encLV, 50, 10, 80)); 
		} 
		crawler.CrawlUntil(EClass._map, () => EClass._map.GetRandomPoint(), num2 + (flag ? 4 : 0), delegate(Crawler.Result r) 
		{ 
			int num6 = 137; 
			foreach (Point point in r.points) 
			{ 
				if (!point.cell.isModified && !point.HasThing && !point.HasBlock && !point.HasObj) 
				{ 
					map.SetObj(point.x, point.z, num6); 
					int idx = 3 + ((EClass.rnd(3) == 0) ? 1 : 0) + ((EClass.rnd(3) == 0) ? (-1) : 0) + ((EClass.rnd(3) == 0) ? (-1) : 0); 
					point.growth.SetStage(idx); 
					if (seed != null) 
					{ 
						EClass._map.AddPlant(point, seed); 
					} 
				} 
			} 
			return false; 
		}); 
		crawler.CrawlUntil(tries: EClass.rnd(EClass.rnd(5) + 1) + 1 + (flag ? 20 : 0), map: EClass._map, onStart: () => EClass._map.GetRandomPoint(), canComplete: delegate(Crawler.Result r) 
		{ 
			int num5 = 136; 
			foreach (Point point2 in r.points) 
			{ 
				if (!point2.cell.isModified && !point2.HasThing && !point2.HasBlock && !point2.HasObj) 
				{ 
					map.SetObj(point2.x, point2.z, num5, 1, EClass.rnd(4)); 
				} 
			} 
			return false; 
		}); 
		crawler.CrawlUntil(tries: EClass.rnd(EClass.rnd(10) + 1) + 3 + (flag ? 40 : 0), map: EClass._map, onStart: () => EClass._map.GetRandomPoint(), canComplete: delegate(Crawler.Result r) 
		{ 
			int idFloor = 121; 
			foreach (Point point3 in r.points) 
			{ 
				map.SetFloor(point3.x, point3.z, 97, idFloor, Mathf.Clamp(4 - r.startPos.Distance(point3) + EClass.rnd(3) - EClass.rnd(3), 0, 3)); 
			} 
			return false; 
		}); 
	} 
	if (zone_Field != null)
	{
		if (EClass.rnd(3) == 0)
		{
			int num2 = EClass.rnd(2); 
			for (int k = 0; k < num2; k++) 
			int num4 = EClass.rnd(2); 
			for (int l = 0; l < num4; l++) 
			{
				Point randomSurface3 = EClass._map.bounds.GetRandomSurface();
				if (!randomSurface3.HasObj && !randomSurface3.HasThing)

ZoneEventDefenseGame

@@ -68,7 +68,7 @@ public override void OnVisit()

cs
		QuestDefenseGame.bonus = bonus;
		return;
	}
	int num = EClass.pc.FameLv / 100 * 50; 
	int num = (base.quest.FameContent ? (EClass.pc.FameLv / 100 * 50) : 0); 
	EClass._zone._dangerLv = 5 + num;
	bonus += num / 10;
	Point nearestPoint = EClass._map.GetCenterPos().GetNearestPoint(allowBlock: false, allowChara: false);

@@ -83,7 +83,7 @@ public void NextWave(int add = 0)

cs
{
	wave++;
	turns = 0;
	EClass._zone._dangerLv += ((EClass._zone.DangerLv >= 100) ? (EClass._zone.DangerLv / 100 * 10) : 5); 
	EClass._zone._dangerLv += ((EClass._zone.DangerLv >= 100) ? (EClass._zone.DangerLv / 100 * 5 + 5) : 5); 
	SE.Play("warhorn");
	Msg.Say("defense_wave", wave.ToString() ?? "", EClass._zone.DangerLv.ToString() ?? "");
	Spawn(2 + base.quest.difficulty + add);

Zone_Field

@@ -94,6 +94,8 @@ public override string IDBaseLandFeat

cs
		}
	}

	public override bool IsUnderwater => IdBiome == "Undersea"; 
	public override void OnGenerateMap()
	{
		base.OnGenerateMap();