Skip to content

EA 23.82 Patch 4

January 27, 2025

19 files modified. 3 new files created.

Important Changes

None.

CalcMoney

@@ -61,11 +61,11 @@ public static int Whore(Chara seller, Chara buyer)

cs

	public static int InvestShop(Chara c, Chara tc)
	{
		return Invest(Guild.Merchant.InvestPrice(Mathf.Max(tc.c_invest * 700, tc.c_invest * tc.c_invest * 80) + 200)); 
		return Invest(Guild.Merchant.InvestPrice(Mathf.Max(tc.c_invest * 700, Mathf.Min(tc.c_invest, 4000) * Mathf.Min(tc.c_invest, 4000) * 80) + 200)); 
	}

	public static int InvestZone(Chara c)
	{
		return Invest((int)Mathf.Max((long)EClass._zone.development * 50L, EClass._zone.development * EClass._zone.development / 4) + 500); 
		return Invest((int)Mathf.Max((long)EClass._zone.development * 50L, Mathf.Min(EClass._zone.development, 80000) * Mathf.Min(EClass._zone.development, 80000) / 4) + 500); 
	}
}

Card

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

cs
		return;
	}
	Element e;
	if (ele == 0) 
	if (ele == 0 || ele == 926) 
	{
		e = Element.Void;
		if (origin != null)

@@ -3640,12 +3640,12 @@ 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;
		}
		dmg = dmg * Mathf.Max(0, 100 - Evalue((e == Element.Void) ? 55 : 56)) / 100; 
		dmg = dmg * Mathf.Max(0, 100 - Evalue((e == Element.Void || e.id == 926) ? 55 : 56)) / 100; 
		if (origin != null && origin.IsPC && EClass.player.codex.Has(id))
		{
			dmg = dmg * (100 + Mathf.Min(10, EClass.player.codex.GetOrCreate(id).weakspot)) / 100;
		}
		if (isChara && Chara.body.GetAttackStyle() == AttackStyle.Shield && elements.ValueWithoutLink(123) >= 5 && e == Element.Void) 
		if (isChara && Chara.body.GetAttackStyle() == AttackStyle.Shield && elements.ValueWithoutLink(123) >= 5 && (e == Element.Void || e.id == 926)) 
		{
			dmg = dmg * 90 / 100;
		}

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

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

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

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

@@ -6472,7 +6472,7 @@ public virtual int GetPrice(CurrencyType currency = CurrencyType.Money, bool sel

cs
		}
		break;
	}
	float num5 = Math.Clamp(Mathf.Sqrt(c.Evalue(291) + ((!sell && EClass._zone.IsPCFaction) ? (EClass.Branch.Evalue(2800) * 2) : 0)), 0f, 25f); 
	float num5 = Math.Clamp(Mathf.Sqrt(c.EvalueMax(291) + ((!sell && EClass._zone.IsPCFaction) ? (EClass.Branch.Evalue(2800) * 2) : 0)), 0f, 25f); 
	switch (priceType)
	{
	case PriceType.Tourism:

CardRenderer

@@ -354,22 +354,29 @@ public virtual void DrawHeld()

cs

	public SourcePref GetPref()
	{
		if (isChara && owner.idSkin > 0) 
		if (isChara) 
		{
			switch (owner.sourceCard.tiles.TryGet(owner.idSkin)) 
			if (owner.IsPCC || (owner.HasHost && owner.Chara.host.ride == owner)) 
			{
			case 2319: 
			case 2619: 
			case 2621: 
			case 2623: 
			case 2625: 
				return EClass.core.refs.prefs.sonwputit1; 
			case 2320: 
			case 2620: 
			case 2622: 
			case 2624: 
			case 2626: 
				return EClass.core.refs.prefs.snowputit2; 
				return EClass.core.refs.prefs.pcc; 
			} 
			if (owner.idSkin > 0) 
			{ 
				switch (owner.sourceCard.tiles.TryGet(owner.idSkin)) 
				{ 
				case 2319: 
				case 2619: 
				case 2621: 
				case 2623: 
				case 2625: 
					return EClass.core.refs.prefs.sonwputit1; 
				case 2320: 
				case 2620: 
				case 2622: 
				case 2624: 
				case 2626: 
					return EClass.core.refs.prefs.snowputit2; 
				} 
			}
		}
		return owner.Pref;

CoreRef

@@ -294,6 +294,8 @@ public class PrefData

cs
		public SourcePref sonwputit1;

		public SourcePref snowputit2;

		public SourcePref pcc; 
	}

	public Biomes biomes;

Date

@@ -247,7 +247,7 @@ public string GetText(TextFormat format)

cs
	switch (format)
	{
	case TextFormat.LogPlusYear:
		return year + ", " + month + "/" + day + " " + hour + ":" + min; 
		return year + ", " + month + "/" + day + " " + ((hour < 10) ? "0" : "") + hour + ":" + ((min < 10) ? "0" : "") + min; 
	case TextFormat.Log:
		return month + "/" + day + " " + hour + ":" + min;
	case TextFormat.Widget:

ENC

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

cs

	public const int mod_precision = 605;

	public const int breathing = 429; 

	public const int allNeckHunt = 428;

	public const int negateNeckHunt = 427;

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

cs

	public const int negateConfusion = 425;

	public const int mod_drill = 606; 

	public const int negateSleep = 424;

	public const int negateFear = 423;

@@ -108,13 +108,23 @@ public class ENC

cs

	public const int negateTeleport = 400;

	public const int breathing = 429; 
	public const int sustain_STR = 440; 

	public const int sustain_END = 441;

	public const int sustain_STR = 440; 
	public const int mod_drill = 606; 

	public const int bane_machine = 465; 
	public const int optimizeMana = 483; 

	public const int mod_ammo_recover = 604; 

	public const int mod_ammo_knockback = 603; 

	public const int mod_rapid = 602; 

	public const int mod_reload = 601; 

	public const int mod_ammo = 600; 

	public const int force_weapon = 482;

@@ -128,13 +138,11 @@ public class ENC

cs

	public const int bane_god = 466;

	public const int mod_reload = 601; 

	public const int bane_man = 464;

	public const int bane_animal = 463;

	public const int mod_rapid = 602; 
	public const int bane_machine = 465; 

	public const int bane_undead = 461;

@@ -146,29 +154,21 @@ public class ENC

cs

	public const int sustain_WIL = 445;

	public const int mod_ammo_knockback = 603; 

	public const int sustain_LER = 444;

	public const int sustain_PER = 443;

	public const int sustain_DEX = 442;

	public const int mod_ammo_recover = 604; 

	public const int optimizeMana = 483; 

	public const int mod_ammo = 600; 

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

FACTION

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

cs

public class FACTION
{
	public const int bfForest = 3601; 
	public const int bfCave = 3500; 

	public const int bfPlain = 3600;

	public const int bfCave = 3500; 

	public const int bfHill = 3603; 
	public const int bfForest = 3601; 

	public const int bfRuin = 3702;

	public const int bfSnow = 3602; 

	public const int bfGeyser = 3701;

	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 bfBeach = 3604;

	public const int fRation = 2207; 

	public const int bfFertile = 3700; 

	public const int fAttraction = 2206;

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

	public const int fFood = 2204;

@@ -38,25 +38,25 @@ public class FACTION

cs

	public const int fElec = 2201;

	public const int fHeirloom = 2120; 

	public const int fTaxEvasion = 2119; 

	public const int fLuck = 2118;

	public const int fLoyal = 2117; 
	public const int fConstruction = 2003; 

	public const int fEducation = 2116; 
	public const int bfTranquil = 3703; 

	public const int fHeirloom = 2120; 

	public const int fAdmin = 2115;

	public const int fConstruction = 2003; 
	public const int fEducation = 2116; 

	public const int fLoyal = 2117; 

	public const int fSafety = 2205;

	public const int bfTranquil = 3703; 
	public const int fSoil = 2200; 

	public const int bfHunt = 3705; 
	public const int bfVolcano = 3704; 

	public const int bfFish = 3706;

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

cs

	public const int actBuildMine = 4001;

	public const int bfVolcano = 3704; 
	public const int bfHunt = 3705; 

	public const int bfStart = 3900;

@@ -110,10 +110,10 @@ public class FACTION

cs

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

FEAT

@@ -3,8 +3,6 @@

cs

public class FEAT
{
	public const int featLuck = 1628; 

	public const int featCHA = 1627;

	public const int featWIL = 1626;

@@ -23,9 +21,9 @@ public class FEAT

cs

	public const int featStamina = 1612;

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

	public const int featLife = 1610; 
	public const int featEarthStrength = 1411; 

	public const int featManaMeat = 1421;

@@ -45,23 +43,25 @@ public class FEAT

cs

	public const int featFairysan = 1413;

	public const int featSPD = 1629; 
	public const int featLuckyCat = 1412; 

	public const int featMana = 1611; 
	public const int featLuck = 1628; 

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

	public const int featSPD = 1629; 

	public const int featParty = 1645;

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

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

	public const int featChef = 1658;

	public const int featManaCost = 1657;

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

	public const int featHeavyCasting = 1654;

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

cs

	public const int featDefender = 1649;

	public const int featDefense = 1631; 

	public const int featRapidMagic = 1648;

	public const int featSummoner = 1647; 

	public const int featLonelySoul = 1646;

	public const int featBodyParts = 1644;

@@ -99,13 +99,15 @@ public class FEAT

cs

	public const int featSpotting = 1633;

	public const int featSummoner = 1647; 
	public const int featEvade = 1632; 

	public const int featReboot = 1410; 
	public const int featHardy = 1630; 

	public const int featScavenger = 1656; 
	public const int featBoost = 1409; 

	public const int featPaladin2 = 1408; 
	public const int featModelBeliever = 1655; 

	public const int featPaladin = 1407; 

	public const int featShiva = 1224;

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

cs

	public const int featAdam = 1230;

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

	public const int featCosmicHorror = 1233;

	public const int featHeavyEater = 1234; 
	public const int featAcidBody = 1223; 

	public const int featLightEater = 1235; 
	public const int featHeavyEater = 1234; 

	public const int featNorland = 1236;

@@ -147,17 +149,15 @@ public class FEAT

cs

	public const int featGod_harvest1 = 1325;

	public const int featGod_luck1 = 1330; 

	public const int featAcidBody = 1223; 

	public const int featGod_harmony1 = 1335; 
	public const int featLightEater = 1235; 

	public const int featSplit = 1222;

	public const int featSpike = 1221; 

	public const int featFate = 1220;

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

	public const int featSlowFood = 1200;

@@ -199,21 +199,23 @@ public class FEAT

cs

	public const int featElderCrab = 1219;

	public const int featSpike = 1221; 

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

	public const int featBaby = 1232; 
	public const int featGod_harmony1 = 1335; 

	public const int featGod_moonshadow1 = 1350; 
	public const int featNirvana = 1231; 

	public const int featGod_trickery1 = 1345;

	public const int featGod_oblivion1 = 1340; 

	public const int featGod_moonshadow1 = 1350; 

	public const int featGod_strife1 = 1355;

	public const int featWarrior = 1400;

	public const int featThief = 1401; 
	public const int featWizard = 1402; 

	public const int featFarmer = 1403;

@@ -221,26 +223,24 @@ public class FEAT

cs

	public const int featPianist = 1405;

	public const int featTourist = 1406; 

	public const int featWizard = 1402; 
	public const int featThief = 1401; 

	public const int featPaladin = 1407; 
	public const int featTourist = 1406; 

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

FoodEffect

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

cs
	if (num3 > 20 && c.HasElement(1413))
	{
		Thing thing = ThingGen.Create("seed");
		if (EClass.rnd(EClass.debug.enable ? 1 : 10) == 0) 
		if (EClass.rnd(EClass.debug.enable ? 2 : 10) == 0) 
		{
			TraitSeed.ApplySeed(thing, 90); 
			TraitSeed.ApplySeed(thing, (EClass.rnd(3) == 0) ? 118 : 90); 
		}
		thing.SetNum(2 + EClass.rnd(3));
		c.Talk("vomit");

GrowSystem

@@ -416,6 +416,10 @@ public void SetStage(int idx, bool renewHarvest = false)

cs
		{
			cell.isHarvested = true;
		}
		if (cell.sourceObj.id == 118) 
		{ 
			EClass._zone.dirtyElectricity = true; 
		} 
	}

	public bool HaltGrowth()

+GrowSystemTreeFeywood

File Created
cs
public class GrowSystemTreeFeywood : GrowSystemTree
{
}

+HotItemWidgetSet

File Created
cs
using Newtonsoft.Json;

public class HotItemWidgetSet : HotAction
{
	[JsonProperty]
	public WidgetManager.SaveData data;

	public override string Id => "WidgetSet";

	public override string TextTip => "loadWidget".lang();

	public override bool CanChangeIconColor => true;

	public HotItemWidgetSet Register()
	{
		EClass.ui.widgets.UpdateConfigs();
		data = IO.DeepCopy(EClass.player.widgets);
		SE.WriteJournal();
		return this;
	}

	public override void Perform()
	{
		Load();
	}

	public void Load()
	{
		if (EClass.player.useSubWidgetTheme)
		{
			EClass.player.subWidgets = data;
		}
		else
		{
			EClass.player.mainWidgets = data;
		}
		EClass.ui.widgets.Reset(toggleTheme: false);
		SE.Click();
	}

	public override void OnShowContextMenu(UIContextMenu m)
	{
		base.OnShowContextMenu(m);
		m.AddButton("hotActionWidgetSet", delegate
		{
			Register();
		});
	}
}

MUTATION

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

cs
{
	public const int mutationRegen = 1516;

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

	public const int mutationSkin = 1510;

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

cs

	public const int mutationRegenN = 1517;

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

	public const int mutationSpeedN = 1519;

@@ -50,7 +50,9 @@ public class MUTATION

cs

	public const int etherStupid = 1561;

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

	public const int etherGravity = 1550; 

	public const int mutationStr = 1520;

@@ -58,11 +60,13 @@ public class MUTATION

cs

	public const int mutationChaN = 1523;

	public const int mutationBrain = 1524; 

	public const int mutationBrainN = 1525;

	public const int mutationCold = 1526; 
	public const int mutationStrN = 1521; 

	public const int mutationBrain = 1524; 
	public const int mutationColdN = 1527; 

	public const int mutationLightning = 1528;

@@ -70,18 +74,14 @@ public class MUTATION

cs

	public const int mutationBody = 1530;

	public const int mutationBodyN = 1531; 

	public const int mutationColdN = 1527; 

	public const int etherGravity = 1550; 
	public const int mutationCold = 1526; 

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

Map

@@ -1509,6 +1509,10 @@ public void SetObj(int x, int z, int id = 0, int value = 1, int dir = 0)

cs
public void SetObj(int x, int z, int idMat, int idObj, int value, int dir)
{
	Cell cell = cells[x, z];
	if (cell.sourceObj.id == 118 || idObj == 118) 
	{ 
		EClass._zone.dirtyElectricity = true; 
	} 
	cell.obj = (byte)idObj;
	cell.objVal = (byte)value;
	cell.objMat = (byte)idMat;

+OBJ

File Created
cs
public class OBJ : EClass
{
	public const int rainbow_fruit = 90;

	public const int feywood = 118;
}

POLICY

@@ -3,29 +3,29 @@

cs

public class POLICY
{
	public const int bed_quality = 2812; 
	public const int store_ripoff = 2816; 

	public const int platinum_ticket = 2815; 
	public const int livestock_priv = 2715; 

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

	public const int suite_room = 2813; 
	public const int open_business = 2810; 

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

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

	public const int home_discount = 2800; 
	public const int forcePanty = 2712; 

	public const int livestock_priv = 2715; 
	public const int suite_room = 2813; 

	public const int store_ripoff = 2816; 
	public const int mass_exhibition = 2814; 

	public const int tourist_safety = 2811; 
	public const int platinum_ticket = 2815; 

	public const int store_premium = 2817;

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

	public const int license_furniture = 2819;

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

cs

	public const int celeb = 2822;

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

	public const int milk_fan = 2825;

@@ -45,28 +45,30 @@ public class POLICY

cs

	public const int license_slaver = 2828;

	public const int incomeTransfer = 2711; 

	public const int license_food = 2818;

	public const int incomeTransfer = 2711; 
	public const int noMother = 2710; 

	public const int inquisition = 2507;

	public const int noAnimal = 2709; 

	public const int noMother = 2710; 
	public const int noDM = 2708; 

	public const int prohibition = 2503; 
	public const int noAnimal = 2709; 

	public const int food_for_people = 2502;

	public const int faith_tax = 2501;

	public const int wealth_tax = 2500; 

	public const int prohibition = 2503; 

	public const int impressment = 2504;

	public const int legal_drug = 2505;

	public const int human_right = 2506; 

	public const int nocturnal_life = 2508;

	public const int vaccination = 2509;

@@ -77,7 +79,7 @@ public class POLICY

cs

	public const int resident_tax = 2512;

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

	public const int taxfree = 2514;

@@ -85,15 +87,15 @@ public class POLICY

cs

	public const int resident_wanted = 2513;

	public const int demon_invocation = 2706; 

	public const int taxTransfer = 2705;

	public const int weed_no = 2703; 

	public const int border_watch = 2704;

	public const int trash_sort = 2701; 
	public const int demon_invocation = 2706; 

	public const int trash_no = 2702; 

	public const int weed_no = 2703; 

	public const int energy_conservation = 2700;

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

cs

	public const int stop_growth = 2515;

	public const int trash_no = 2702; 

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

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

SKILL

@@ -2,31 +2,35 @@ public class SKILL

cs
{
	public const int twowield = 131;

	public const int armorHeavy = 122; 
	public const int tactics = 132; 

	public const int twohand = 130;

	public const int shield = 123;

	public const int throwing = 108; 
	public const int armorHeavy = 122; 

	public const int weaponCrossbow = 109; 

	public const int weaponBlunt = 111;

	public const int weaponScythe = 110;

	public const int weaponCrossbow = 109; 

	public const int fireproof = 50;

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

	public const int acidproof = 51; 

	public const int armorLight = 120;

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

	public const int riding = 226; 
	public const int parasite = 227; 

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

	public const int climbing = 242; 

	public const int music = 241;

@@ -38,9 +42,9 @@ public class SKILL

cs

	public const int digging = 230;

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

	public const int acidproof = 51; 
	public const int riding = 226; 

	public const int lumberjack = 225;

@@ -56,19 +60,15 @@ public class SKILL

cs

	public const int evasionPlus = 151;

	public const int evasion = 150; 

	public const int eyeofmind = 134; 

	public const int PDR = 55; 
	public const int strategy = 135; 

	public const int martial = 100; 
	public const int EDR = 56; 

	public const int evasionPerfect = 57; 
	public const int weaponSword = 101; 

	public const int climbing = 242; 
	public const int life = 60; 

	public const int mana = 61; 
	public const int fishing = 245; 

	public const int vigor = 62;

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

cs

	public const int WIL = 75;

	public const int EDR = 56; 

	public const int MAG = 76;

	public const int LUC = 78; 
	public const int evasionPerfect = 57; 

	public const int CHA = 77; 

	public const int SPD = 79;

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

cs

	public const int antiMagic = 93;

	public const int weaponSword = 101; 
	public const int martial = 100; 

	public const int weaponAxe = 102;

@@ -124,17 +124,17 @@ public class SKILL

cs

	public const int weaponDagger = 107;

	public const int life = 60; 
	public const int throwing = 108; 

	public const int CHA = 77; 
	public const int mana = 61; 

	public const int fishing = 245; 
	public const int LUC = 78; 

	public const int weaponBow = 104; 
	public const int gathering = 250; 

	public const int carpentry = 255; 
	public const int weaponBow = 104; 

	public const int elePoison = 915; 
	public const int blacksmith = 256; 

	public const int eleNether = 916;

@@ -156,13 +156,15 @@ public class SKILL

cs

	public const int eleImpact = 925;

	public const int eleVoid = 926; 

	public const int resFire = 950;

	public const int resCold = 951;

	public const int resLightning = 952;

	public const int eleMind = 914; 
	public const int elePoison = 915; 

	public const int resDarkness = 953;

@@ -192,17 +194,15 @@ public class SKILL

cs

	public const int resCurse = 972;

	public const int gathering = 250; 
	public const int carpentry = 255; 

	public const int resMind = 954;

	public const int eleDarkness = 913; 
	public const int eleMind = 914; 

	public const int resDecay = 970;

	public const int eleCold = 911; 

	public const int blacksmith = 256; 
	public const int eleLightning = 912; 

	public const int alchemy = 257;

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

cs

	public const int farming = 286;

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

	public const int appraising = 289;

@@ -230,25 +230,29 @@ public class SKILL

cs

	public const int negotiation = 291;

	public const int cooking = 287; 
	public const int investing = 292; 

	public const int disarmTrap = 293; 
	public const int building = 288; 

	public const int regeneration = 300; 

	public const int eleCold = 911; 

	public const int eleFire = 910;

	public const int env = 313;

	public const int fun = 312; 
	public const int disarmTrap = 293; 

	public const int investing = 292; 
	public const int fun = 312; 

	public const int bladder = 311;

	public const int hygine = 310;

	public const int memorization = 307; 
	public const int eleDarkness = 913; 

	public const int eleLightning = 912; 
	public const int faith = 306; 

	public const int magicDevice = 305;

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

cs

	public const int controlmana = 302;

	public const int meditation = 301; 

	public const int faith = 306; 
	public const int memorization = 307; 

	public const int regeneration = 300; 
	public const int meditation = 301; 

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

ShopTransaction

@@ -114,25 +114,30 @@ public void Process(Thing t, int n, bool sell)

cs

	public int GetPrice(Thing t, int n, bool sell)
	{
		int price = t.GetPrice(trader.currency, sell: false, trader.priceType); 
		int price2 = t.GetPrice(trader.currency, sell: true, trader.priceType); 
		int num = n; 
		int num2 = 0; 
		int num3 = (sell ? price : price2); 
		long num = t.GetPrice(trader.currency, sell: false, trader.priceType); 
		long num2 = t.GetPrice(trader.currency, sell: true, trader.priceType); 
		int num3 = n; 
		long num4 = 0L; 
		long num5 = (sell ? num : num2); 
		foreach (Item item in sell ? bought : sold)
		{
			if (item.thing.id == t.id && item.price == num3) 
			if (item.thing.id == t.id && item.price == num5) 
			{
				int num4 = ((item.num >= num) ? num : item.num); 
				num -= num4; 
				num2 += num4 * num3; 
				int num6 = ((item.num >= num3) ? num3 : item.num); 
				num3 -= num6; 
				num4 += num6 * num5; 
			}
			if (num == 0) 
			if (num3 == 0) 
			{
				break;
			}
		}
		return num2 + num * (sell ? price2 : price); 
		num4 += (sell ? num2 : num) * num3; 
		if (num4 >= int.MaxValue || num4 <= -2147483647) 
		{ 
			return -1; 
		} 
		return (int)num4; 
	}

	public void OnEndTransaction()

SourceElement

@@ -355,7 +355,7 @@ public override void OnAfterImportData()

cs
	}
	int num = 50000;
	int num2 = 0;
	for (int i = 910; i < 926; i++) 
	for (int i = 910; i < 927; i++) 
	{
		Row ele = EClass.sources.elements.map[i];
		AddRow(ele, num + num2 + 100, "ball_");

SourceManager

@@ -166,7 +166,7 @@ public void Init()

cs
	ACT.Init();
	TimeTable.Init();
	Element.ListAttackElements.Clear();
	for (int j = 910; j < 926; j++) 
	for (int j = 910; j < 927; j++) 
	{
		Element.ListAttackElements.Add(EMono.sources.elements.map[j]);
	}

WidgetHotbar

@@ -381,6 +381,10 @@ public void SetShortcutMenu(ButtonHotItem b, UIContextMenu m)

cs
		type = HotItemToggle.Type.showBalloon
	});
	action(arg, new HotItemActionAudoDump());
	arg.AddButton("hotActionWidgetSet".lang(), delegate
	{ 
		SetItem(b, new HotItemWidgetSet().Register()); 
	}); 
	if (EMono.core.config.test.unsealWidgets)
	{
		arg = m.AddChild("menuShortcuts");

Zone

@@ -2608,6 +2608,7 @@ public Chara SpawnMob(Point pos = null, SpawnSetting setting = null)

cs
public void RefreshElectricity()
{
	dirtyElectricity = false;
	bool flag = GetSoilCost() > MaxSoil; 
	base.electricity = elements.Value(2201) * 10 + BaseElectricity;
	foreach (Thing thing in EClass._map.things)
	{

@@ -2616,6 +2617,16 @@ public void RefreshElectricity()

cs
			base.electricity += thing.trait.Electricity;
		}
	}
	if (!flag) 
	{ 
		EClass._map.bounds.ForeachCell(delegate(Cell c) 
		{ 
			if (c.sourceObj.id == 118 && c.growth.IsMature) 
			{ 
				base.electricity += 20; 
			} 
		}); 
	} 
	foreach (Thing thing2 in EClass._map.things)
	{
		if (thing2.IsInstalled)

@@ -2627,7 +2638,8 @@ public void RefreshElectricity()

cs

	public int GetElectricity(bool cost = false)
	{
		int num = 0; 
		bool flag = GetSoilCost() > MaxSoil; 
		int sum = 0; 
		foreach (Thing thing in EClass._map.things)
		{
			if (!thing.IsInstalled || thing.trait.Electricity == 0)

@@ -2638,19 +2650,29 @@ public int GetElectricity(bool cost = false)

cs
			{
				if (thing.trait.Electricity < 0)
				{
					num += -thing.trait.Electricity; 
					sum += -thing.trait.Electricity; 
				}
			}
			else if (thing.trait.Electricity > 0)
			{
				num += thing.trait.Electricity; 
				sum += thing.trait.Electricity; 
			}
		}
		if (!cost)
		{
			num += elements.Value(2201) * 10; 
			sum += elements.Value(2201) * 10 + BaseElectricity; 
			if (!flag) 
			{ 
				EClass._map.bounds.ForeachCell(delegate(Cell c) 
				{ 
					if (c.sourceObj.id == 118 && c.growth.IsMature) 
					{ 
						sum += 20; 
					} 
				}); 
			} 
		}
		return num; 
		return sum; 
	}

	public void SetBGM(List<int> ids, bool refresh = true)