Skip to content

EA 23.99

March 5, 2025

26 files modified. 4 new files created.

Important Changes

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

GenBounds (1)

cs
public void SetBlock(BiomeProfile.Tile t, int x, int z) 
public void SetBlock(BiomeProfile.Tile t, int x, int z, int idMat = -1) 

Player (1)

cs
public bool TryAbortAutoCombat() 
public bool TryAbortAutoCombat(bool immediate = true) 

AI_Fuck

@@ -279,7 +279,18 @@ public void Finish()

cs
		SuccubusExp(chara, chara2);
		SuccubusExp(chara2, chara);
		chara2.ModAffinity(chara, flag ? 10 : (-5));
		if (ntr && chara.HasElement(1239) && chara2.ExistsOnMap) 
		if (!ntr || !chara.HasElement(1239) || chara2.HasElement(1216)) 
		{ 
			break; 
		} 
		if (chara2.HasElement(758)) 
		{ 
			if (chara.ExistsOnMap) 
			{ 
				chara.stamina.Mod(-1000000); 
			} 
		} 
		else if (chara2.ExistsOnMap) 
		{
			chara2.stamina.Mod(-1000000);
		}

AI_PracticeDummy

@@ -33,6 +33,10 @@ public override AIProgress CreateProgress()

cs
		},
		onProgress = delegate(Progress_Custom p)
		{
			if (p.progress % 10 == 0) 
			{ 
				target.animeCounter = 0.01f; 
			} 
			if (throwItem != null)
			{
				if (!ActThrow.CanThrow(EClass.pc, throwItem, target))

ActMelee

@@ -182,7 +182,7 @@ void _Attack(BodySlot slot)

cs
				flurry = GetWeaponEnc(621, addSelfEnc: true);
				frustration = GetWeaponEnc(624, addSelfEnc: true);
				int num3 = GetWeaponEnc(622, addSelfEnc: true);
				feint = GetWeaponEnc(623, addSelfEnc: false); 
				feint = GetWeaponEnc(623, addSelfEnc: true); 
				List<Point> list2 = EClass._map.ListPointsInLine(Act.CC.pos, Act.TC.pos, num2 / 10 + ((num2 % 10 > EClass.rnd(10)) ? 1 : 0) + 1);
				AttackWithFlurry(Act.TC, Act.TP, 1f, subAttack: false);
				if (num2 > 0)

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

cs
			{
				Act.TP.ForeachNeighbor(delegate(Point p)
				{
					if (p.Equals(Act.TP) || p.Equals(Act.CC.pos)) 
					if (p.Equals(Act.TP) || p.Equals(Act.CC.pos) || p.IsBlocked) 
					{
						return;
					}

ButtonAbility

@@ -32,6 +32,8 @@ public class ButtonAbility : UIButton, IMouseHint

cs

	public static bool usedMouseKey;

	public static bool lockUse; 

	public void SetAct(Chara _chara, Element e)
	{
		source = e.source;

@@ -126,6 +128,10 @@ public void Use()

cs

	public static bool TryUse(Act act, Card tg = null, Point pos = null, Card catalyst = null, bool first = true, bool mouse = true)
	{
		if (lockUse && first) 
		{ 
			return false; 
		} 
		bool flag = false;
		if (tg == null)
		{

@@ -137,10 +143,8 @@ public static bool TryUse(Act act, Card tg = null, Point pos = null, Card cataly

cs
	}
	if (first)
	{
		lockUse = true; 
		hotkeyAct = act;
	} 
	if (first) 
	{ 
		if (EInput.GetHotkey() != -1)
		{
			mouse = false;

@@ -186,6 +190,7 @@ public static bool TryUse(Act act, Card tg = null, Point pos = null, Card cataly

cs
			return false;
		}
	}
	lockUse = false; 
	if (flag && SpecialHoldAction(act))
	{
		EClass.player.EndTurn();

Card

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

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

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

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

@@ -4705,6 +4705,10 @@ public void SpawnLoot(Card origin)

cs
		}
		if (!isBackerContent && !flag)
		{
			if (id == "isca") 
			{ 
				list.Add(ThingGen.Create("blood_angel")); 
			} 
			int num5 = ((EClass._zone.Boss == this) ? 2 : ((this.rarity >= Rarity.Legendary) ? 1 : 0));
			if (EClass._zone is Zone_Void)
			{

Chara

@@ -690,7 +690,7 @@ public override bool isSynced

cs

	public override bool IsMultisize => sourceCard.multisize;

	public override int MaxHP => Mathf.Max(1, ((base.END * 2 + base.STR + base.WIL / 2) * Mathf.Min(base.LV, 25) / 25 + base.END + 10) * Evalue(60) / 100 * ((IsPCFaction ? 100 : (100 + (int)base.rarity * 300)) + (IsPC ? (EClass.player.lastEmptyAlly * Evalue(1646)) : 0)) / 100); 
	public override int MaxHP => (int)Mathf.Clamp(((long)(base.END * 2 + base.STR + base.WIL / 2) * (long)Mathf.Min(base.LV, 25) / 25 + base.END + 10) * Evalue(60) / 100 * ((IsPCFaction ? 100 : (100 + (int)base.rarity * 300)) + (IsPC ? (EClass.player.lastEmptyAlly * Evalue(1646)) : 0)) / 100, 1f, 100000000f); 

	public override int WeightLimit => (base.STR * 500 + base.END * 250 + Evalue(207) * 2000) * ((!HasElement(1411)) ? 1 : 5) + 45000;

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

cs
			info?.AddFix(EClass.player.lastEmptyAlly * 10 - 10, "exceedParty".lang());
		}
	}
	else if (base.LV >= 1000) 
	else if (base.LV >= 1000 && !EClass.game.principal.disableVoidBlessing) 
	{
		num += EClass.curve((base.LV - 900) / 100 * 10, 500, 100);
		info?.AddFix(EClass.curve((base.LV - 900) / 100 * 10, 500, 100), "enemySpeedBuff".lang());

@@ -1814,16 +1814,14 @@ public void SetMainElement(int id, int v = 0, bool elemental = false)

cs
{
	if (base.c_idMainElement != 0)
	{
		elements.SetBase(base.c_idMainElement, 0); 
		elements.ModBase(EClass.sources.elements.alias[EClass.sources.elements.map[base.c_idMainElement].aliasRef].id, -20); 
		SetElements(base.c_idMainElement, remove: true); 
		base.c_idMainElement = 0;
	}
	if (id != 0)
	{
		SourceElement.Row row = EClass.sources.elements.map[id]; 
		_ = EClass.sources.elements.map[id]; 
		SetElements(id, remove: false); 
		base.c_idMainElement = id;
		elements.ModBase(id, (v == 0) ? 10 : v); 
		elements.ModBase(EClass.sources.elements.alias[row.aliasRef].id, 20); 
		if (elemental)
		{
			base.isElemental = true;

@@ -1833,6 +1831,52 @@ public void SetMainElement(int id, int v = 0, bool elemental = false)

cs
			}
			_ability = null;
		}
		void SetElements(int idEle, bool remove) 
		{ 
			elements.SetBase(idEle, (!remove) ? ((v == 0) ? 10 : v) : 0); 
			elements.ModBase(EClass.sources.elements.alias[EClass.sources.elements.map[idEle].aliasRef].id, remove ? (-20) : 20); 
			switch (idEle) 
			{ 
			case 910: 
				elements.ModBase(951, remove ? 10 : (-10)); 
				break; 
			case 911: 
				elements.ModBase(950, remove ? 10 : (-10)); 
				break; 
			case 912: 
				elements.ModBase(953, remove ? 10 : (-10)); 
				break; 
			case 913: 
				elements.ModBase(952, remove ? 10 : (-10)); 
				break; 
			case 916: 
				elements.ModBase(960, remove ? 10 : (-10)); 
				break; 
			case 919: 
				elements.ModBase(956, remove ? 10 : (-10)); 
				break; 
			case 925: 
				elements.ModBase(962, remove ? 10 : (-10)); 
				break; 
			case 922: 
				elements.ModBase(965, remove ? 10 : (-10)); 
				break; 
			case 921: 
				elements.ModBase(971, remove ? 10 : (-10)); 
				break; 
			case 926: 
				elements.ModBase(961, remove ? 10 : (-10)); 
				break; 
			case 914: 
			case 915: 
			case 917: 
			case 918: 
			case 920: 
			case 923: 
			case 924: 
				break; 
			} 
		} 
	}

	public void ApplyJob(bool remove = false)

@@ -4983,7 +5027,7 @@ public override void Die(Element e = null, Card origin = null, AttackSource atta

cs
			Msg.Say("abort_allyDead");
		}
	}
	else if (EClass.game.config.autoCombat.abortOnEnemyDead && EClass.player.TryAbortAutoCombat()) 
	else if (EClass.game.config.autoCombat.abortOnEnemyDead && EClass.player.TryAbortAutoCombat(immediate: false)) 
	{
		Msg.Say("abort_enemyDead");
	}

@@ -5939,6 +5983,10 @@ public bool IsFriendOrAbove(Chara c)

cs
public override CardRenderer _CreateRenderer()
{
	CharaRenderer charaRenderer = new CharaRenderer();
	if (race.id == "spider" && source.tiles.Length > 1) 
	{ 
		base.idSkin = (EClass.core.config.game.antiSpider ? 1 : 0); 
	} 
	if (source.moveAnime == "hop")
	{
		charaRenderer.hopCurve = EClass.setting.render.anime.hop;

ConSupress

@@ -1,3 +1,10 @@

cs
public class ConSupress : BaseDebuff
{
	public override BaseNotification CreateNotification() 
	{ 
		return new NotificationCondition
		{ 
			condition = this
		}; 
	} 
}

ContentConfigGame

@@ -7,6 +7,8 @@ public class ContentConfigGame : ContentConfig

cs

	public UIButton toggleOffhand;

	public UIButton toggleAntiSpider; 

	public UIButton toggleShowInvBG;

	public UIButton toggleConfirmGive;

@@ -151,6 +153,10 @@ public override void OnInstantiate()

cs
	{
		base.config.game.sortEach = on;
	});
	toggleAntiSpider.SetToggle(base.config.game.antiSpider, delegate(bool on) 
	{ 
		base.config.game.antiSpider = on; 
	}); 
	toggleOffhand.SetToggle(base.config.game.showOffhand, delegate(bool on)
	{
		base.config.game.showOffhand = on;

CoreConfig

@@ -110,6 +110,8 @@ public class GameConfig

cs

		public bool sortEach;

		public bool antiSpider; 

		public bool autopause;

		public bool showQuickMenuHint;

Dice

@@ -14,32 +14,32 @@ public class Dice

cs

	public static int Roll(int num, int sides, int bonus = 0, Card card = null)
	{
		int num2 = 1; 
		int a = 1; 
		bool flag = true;
		int num3 = 0; 
		int num2 = 0; 
		if (card != null)
		{
			int num4 = card.Evalue(78); 
			flag = num4 >= 0; 
			num2 = 1 + Mathf.Abs(num4 / 100) + ((Mathf.Abs(num4 % 100) > rnd(100)) ? 1 : 0); 
			int num3 = card.Evalue(78); 
			flag = num3 >= 0; 
			a = 1 + Mathf.Abs(num3 / 100) + ((Mathf.Abs(num3 % 100) > rnd(100)) ? 1 : 0); 
		}
		for (int i = 0; i < num2; i++) 
		for (int i = 0; i < Mathf.Min(a, 20); i++) 
		{
			int num5 = Roll(); 
			if (i == 0 || (flag && num5 > num3) || (!flag && num5 < num3)) 
			int num4 = Roll(); 
			if (i == 0 || (flag && num4 > num2) || (!flag && num4 < num2)) 
			{
				num3 = num5; 
				num2 = num4; 
			}
		}
		return num3; 
		return num2; 
		int Roll()
		{
			int num6 = 0; 
			int num5 = 0; 
			for (int j = 0; j < num; j++)
			{
				num6 += rnd(sides) + 1; 
				num5 += rnd(sides) + 1; 
			}
			return num6 + bonus; 
			return num5 + bonus; 
		}
	}

DramaManager

@@ -1011,6 +1011,8 @@ public bool CheckIF(string IF)

cs
	string[] array = IF.Split(',');
	switch (array[0])
	{
	case "WindRest": 
		return EMono._zone is Zone_WindRest; 
	case "guild_promote":
		return Guild.Current.relation.exp >= Guild.Current.relation.ExpToNext;
	case "guild_maxpromote":

GameDate

@@ -143,6 +143,11 @@ public void AdvanceDay()

cs
	base.day++;
	base.min = 0;
	EClass.player.stats.days++;
	EClass.player.questRerollCost -= 3; 
	if (EClass.player.questRerollCost < 0) 
	{ 
		EClass.player.questRerollCost = 0; 
	} 
	if (EClass.player.stats.days >= 90)
	{
		Tutorial.Reserve("death_penalty");

GamePrincipal

@@ -149,6 +149,9 @@ public void SetInt(int value)

cs
	[JsonProperty]
	public bool petFeatExp;

	[JsonProperty] 
	public bool disableVoidBlessing; 

	[JsonProperty]
	public HashSet<string> modified = new HashSet<string>();

@@ -173,6 +176,10 @@ public List<Item> ListItems()

cs
	{
		permadeath = a;
	});
	Add(2, Type.Workaround, "disableVoidBlessing", () => disableVoidBlessing, delegate(bool a) 
	{ 
		disableVoidBlessing = a; 
	}); 
	AddSlider(2, Type.Workaround, "dropRate", () => dropRate, delegate(bool a)
	{
		dropRate = a;

@@ -180,6 +187,13 @@ public List<Item> ListItems()

cs
	{
		dropRateMtp = a;
	}, (int a) => 0.5f + 0.5f * (float)a + "x", 5);
	AddSlider(2, Type.Workaround, "petFeatExp", () => petFeatExp, delegate(bool a) 
	{ 
		petFeatExp = a; 
	}, () => petFeatExpMtp, delegate(int a) 
	{ 
		petFeatExpMtp = a; 
	}, (int a) => 0.5f + 0.5f * (float)a + "x", 3); 
	return list;
	void Add(int grade, Type type, string id, Func<bool> _get, Action<bool> _set)
	{

GenBounds

@@ -40,10 +40,10 @@ public void SetFloor(BiomeProfile.Tile t, int x, int z)

cs
		SetFloor(x, z, flag ? t.matSub : t.mat, flag ? t.idSub : t.id, EClass.rnd(EClass.rnd(8) + 1));
	}

	public void SetBlock(BiomeProfile.Tile t, int x, int z) 
	public void SetBlock(BiomeProfile.Tile t, int x, int z, int idMat = -1) 
	{
		bool flag = IsSub(t, x, z);
		SetBlock(x, z, flag ? t.matSub : t.mat, flag ? t.idSub : t.id); 
		SetBlock(x, z, (idMat != -1) ? idMat : (flag ? t.matSub : t.mat), flag ? t.idSub : t.id); 
	}

	public void SetFloor(int x, int z, int idMat, int idFloor, int direction = 0)

GenRoom

@@ -177,13 +177,22 @@ public void Fill()

cs
{
	BiomeProfile.TileFloor floor = group.floor;
	BiomeProfile.TileBlock block = group.block;
	int idMat = block.mat; 
	if (zone is Zone_RandomDungeonNature && EClass.rnd(3) != 0) 
	{ 
		block = EClass.core.refs.biomes.dict["Dungeon_Forest"].exterior.block; 
		if (zone is Zone_RandomDungeonPlain) 
		{ 
			idMat = 5; 
		} 
	} 
	for (int i = x; i < x + width; i++)
	{
		for (int j = y; j < y + height; j++)
		{
			if (map.cells[i, j]._block != 0)
			{
				SetBlock(i, j, block.mat, block.id, EClass.rnd(EClass.rnd(4) + 1)); 
				SetBlock(i, j, idMat, block.id, EClass.rnd(EClass.rnd(4) + 1)); 
			}
			SetFloor(i, j, floor.mat, floor.id, EClass.rnd(EClass.rnd(8) + 1));
		}

LayerQuestBoard

@@ -59,9 +59,10 @@ public override void OnSwitchContent(Window window)

cs
	{
		return;
	}
	menuRight.AddButton("rerollQuest".lang(1.ToString() ?? ""), delegate
	UIButton button = null; 
	button = menuRight.AddButton("rerollQuest".lang(GetCost().ToString() ?? ""), delegate
	{
		if (ELayer._zone.influence < 1) 
		if (ELayer._zone.influence < GetCost()) 
		{
			SE.Beep();
			Msg.Say("notEnoughInfluence");

@@ -71,9 +72,18 @@ public override void OnSwitchContent(Window window)

cs
				SE.Dice();
				ELayer._zone.UpdateQuests(force: true);
				RefreshQuest();
				ELayer._zone.influence--; 
				ELayer._zone.influence -= GetCost(); 
				if (ELayer.player.questRerollCost < 14) 
				{ 
					ELayer.player.questRerollCost++; 
				} 
				button.mainText.SetText("rerollQuest".lang(GetCost().ToString() ?? "")); 
			}
		});
		static int GetCost() 
		{ 
			return 1; 
		} 
	}

	public void RefreshQuest()

LayerWorldSetting

@@ -76,7 +76,7 @@ public bool IsEmbark

cs
public override void OnInit()
{
	buttonEmbark.SetActive(IsEmbark);
	buttonWorkaround.SetActive(!IsEmbark); 
	buttonWorkaround.SetActive(enable: true); 
	if (IsEmbark)
	{
		ELayer.game.principal.modified.Clear();

@@ -138,7 +138,7 @@ public void Refresh()

cs
	transCustom.DestroyChildren();
	List<GamePrincipal.Item> items = pp.ListItems();
	AddCategory(GamePrincipal.Type.Oath);
	if (!IsEmbark && ELayer.player.showWorkaround) 
	if (ELayer.player.showWorkaround) 
	{
		AddCategory(GamePrincipal.Type.Workaround);
	}

@@ -174,6 +174,9 @@ void AddCategory(GamePrincipal.Type type)

cs
			b.icon.sprite = sprites[item.grade];
			b.icon.SetNativeSize();
			b.GetOrCreate<CanvasGroup>().alpha = (flag ? 0.5f : 1f);
			string text = "pp_" + item.id + "_hint"; 
			b.SetTooltipLang(text); 
			b.tooltip.enable = Lang.Has(text); 
			b.interactable = !flag;
			b.SetToggle(item.Get(), delegate(bool a)
			{

Map

@@ -1196,6 +1196,7 @@ public void TryShatter(Point pos, int ele, int power)

cs
	Element element = Element.Create(ele);
	List<Card> list = new List<Card>();
	bool fire = ele == 910;
	bool flag = ele == 911; 
	_ = fire;
	List<Card> list2 = pos.ListCards();
	if (fire && (pos.cell.IsSnowTile || pos.cell.IsTopWater))

@@ -1204,7 +1205,7 @@ public void TryShatter(Point pos, int ele, int power)

cs
	}
	foreach (Card item in list2)
	{
		if (item.ResistLvFrom(ele) >= 3 || item.trait is TraitBlanket || (EClass.rnd(3) == 0 && !CanCook(item)) || (item.IsPCFaction && EClass.rnd(3) == 0)) 
		if (item.ResistLvFrom(ele) >= 3 || item.trait is TraitBlanket || (EClass.rnd(3) == 0 && !CanCook(item)) || (item.IsPCFaction && EClass.rnd(3) == 0) || (fire && item.HasCondition<ConWet>()) || (flag && item.HasCondition<ConBurning>())) 
		{
			continue;
		}

@@ -1291,9 +1292,9 @@ public void TryShatter(Point pos, int ele, int power)

cs
		{
			continue;
		}
		bool flag = CanCook(item3); 
		bool flag2 = CanCook(item3); 
		string text = "";
		if (flag) 
		if (flag2) 
		{
			List<SourceThing.Row> list3 = new List<SourceThing.Row>();
			foreach (RecipeSource item4 in RecipeManager.list)

@@ -1323,7 +1324,7 @@ public void TryShatter(Point pos, int ele, int power)

cs
				text = list3.RandomItem().id;
			}
		}
		if (flag && !text.IsEmpty()) 
		if (flag2 && !text.IsEmpty()) 
		{
			item3.GetRoot();
			Thing thing2 = item3.Split(1);

MapGen

@@ -9,7 +9,7 @@ public class MapGen : BaseMapGen

cs

	protected override void GenerateTerrain()
	{
		SetSize(zp.useRootSize ? zone.GetTopZone().bounds.Size : zp.size, 10); 
		SetSize((zone is Zone_Gathering) ? 60 : ((!zp.useRootSize) ? zp.size : (zone.GetTopZone().bounds?.Size ?? zp.size)), 10); 
		if (biomes == null || Size != biomes.GetLength(0))
		{
			biomes = new BiomeProfile[Size, Size];

@@ -66,7 +66,11 @@ protected override bool OnGenerateTerrain()

cs
		map.CreateNew(Size);
	}
	map.poiMap.Reset();
	if (bp.zoneProfile.useRootSize) 
	if (zone is Zone_Gathering) 
	{ 
		map.SetBounds(Size - 20); 
	} 
	else if (bp.zoneProfile.useRootSize && zone.GetTopZone().bounds != null) 
	{
		map.SetBounds(zone.GetTopZone().bounds);
	}

MapGenDungen

@@ -35,6 +35,15 @@ protected override bool OnGenerateTerrain()

cs
	}
	BiomeProfile.TileFloor floor = biome.exterior.floor;
	BiomeProfile.TileBlock block = biome.exterior.block;
	int idMat = -1; 
	if (zone is Zone_RandomDungeonNature && EClass.rnd(3) != 0) 
	{ 
		block = EClass.core.refs.biomes.dict["Dungeon_Forest"].exterior.block; 
		if (zone is Zone_RandomDungeonPlain) 
		{ 
			idMat = 5; 
		} 
	} 
	bool flag = zone.lv <= 0;
	bool flag2 = false;
	bool flag3 = false;

@@ -48,7 +57,7 @@ protected override bool OnGenerateTerrain()

cs
			if (i == 0 || j == 0 || i >= mapData.size_X || j >= mapData.size_Y)
			{
				SetFloor(floor, i, j);
				SetBlock(block, i, j); 
				SetBlock(block, i, j, idMat); 
				continue;
			}
			Dungen.Cell cell = mapData.cellsOnMap[i - 1, j - 1];

@@ -104,18 +113,18 @@ protected override bool OnGenerateTerrain()

cs
			case "Door":
				if (!(biome.style.doorChance < Rand.Range(0f, 1f)))
				{
					SetBlock(block, i, j); 
					SetBlock(block, i, j, idMat); 
					Thing t2 = ThingGen.Create(biome.style.GetIdDoor(), biome.style.matDoor);
					zone.AddCard(t2, i, j).Install();
				}
				break;
			case "Abyss":
				SetBlock(block, i, j); 
				SetBlock(block, i, j, idMat); 
				break;
			default:
				if (type.passable == generator.reversePassage)
				{
					SetBlock(block, i, j); 
					SetBlock(block, i, j, idMat); 
				}
				break;
			}

@@ -184,6 +193,10 @@ protected override bool OnGenerateTerrain()

cs
	Debug.Log("Dungen: room:" + rooms.Count + "/" + mapData.rooms.Count + " width:" + width + " height:" + height);
	int num2 = EClass.rnd(Size * Size / 50 + EClass.rnd(20)) + 5;
	num2 = num2 * Mathf.Min(20 + zone.DangerLv * 5, 100) / 100;
	if (zone is Zone_RandomDungeonNature) 
	{ 
		num2 /= 5; 
	} 
	for (int k = 0; k < num2; k++)
	{
		point = EClass._map.GetRandomPoint();

@@ -193,6 +206,29 @@ protected override bool OnGenerateTerrain()

cs
			EClass._zone.AddCard(t3, point).Install();
		}
	}
	if (zone is Zone_RandomDungeonPlain) 
	{ 
		Crawler crawler = Crawler.Create("pasture"); 
		int tries = 3; 
		crawler.CrawlUntil(EClass._map, () => EClass._map.GetRandomPoint(), tries, delegate(Crawler.Result r) 
		{ 
			int id = ((EClass.rnd(3) == 0) ? 108 : 105); 
			foreach (Point point2 in r.points) 
			{ 
				if (!point2.cell.isModified && !point2.HasThing && !point2.HasBlock && !point2.HasObj) 
				{ 
					map.SetObj(point2.x, point2.z, id); 
					int num3 = 3; 
					if (EClass.rnd(6) == 0) 
					{ 
						num3++; 
					} 
					point2.growth.SetStage(num3); 
				} 
			} 
			return false; 
		}); 
	} 
	map.things.ForeachReverse(delegate(Thing t)
	{
		if (t.trait is TraitDoor traitDoor && !traitDoor.IsValid())

@@ -228,7 +264,7 @@ void SetRoom(GenRoom room)

cs
		room.map = map;
		room.zone = zone;
		room.gen = this;
		room.group = biome.interior; 
		room.group = ((zone is Zone_RandomDungeonNature) ? biome.exterior : biome.interior); 
		rooms[room.Index] = room;
		room.Fill();
		Debug.Log("Room" + count + " " + room.width + "*" + room.height + " " + room);

Player

@@ -765,7 +765,7 @@ public void OnLeaveZone()

cs
	public int customLightMod = 3;

	[JsonProperty]
	public int validScore; 
	public int questRerollCost; 

	[JsonProperty]
	public float angle;

@@ -2179,14 +2179,17 @@ public void OnAdvanceDay()

cs
		}
	}

	public bool TryAbortAutoCombat() 
	public bool TryAbortAutoCombat(bool immediate = true) 
	{
		if (!(EClass.pc.ai is GoalAutoCombat))
		{
			return false;
		}
		EClass.pc.ai.Cancel();
		EClass.pc.SetNoGoal(); 
		if (immediate) 
		{ 
			EClass.pc.SetNoGoal(); 
		} 
		return true;
	}

StatsMana

@@ -2,9 +2,9 @@

cs

public class StatsMana : Stats
{
	public override int max => Mathf.Max(1, ((BaseStats.CC.MAG * 2 + BaseStats.CC.WIL + BaseStats.CC.LER / 2) * Mathf.Min(BaseStats.CC.LV, 25) / 25 + BaseStats.CC.MAG + 10) * (BaseStats.CC.Evalue(61) - BaseStats.CC.Evalue(93)) / 100 * ((BaseStats.CC.IsPCFaction ? 100 : (100 + (int)BaseStats.CC.rarity * 250)) + (BaseStats.CC.IsPC ? (EClass.player.lastEmptyAlly * BaseStats.CC.Evalue(1646)) : 0)) / 100); 
	public override int max => (int)Mathf.Clamp(((long)(BaseStats.CC.MAG * 2 + BaseStats.CC.WIL + BaseStats.CC.LER / 2) * (long)Mathf.Min(BaseStats.CC.LV, 25) / 25 + BaseStats.CC.MAG + 10) * (BaseStats.CC.Evalue(61) - BaseStats.CC.Evalue(93)) / 100 * ((BaseStats.CC.IsPCFaction ? 100 : (100 + (int)BaseStats.CC.rarity * 250)) + (BaseStats.CC.IsPC ? (EClass.player.lastEmptyAlly * BaseStats.CC.Evalue(1646)) : 0)) / 100, 1f, 100000000f); 

	public override int min => -9999; 
	public override int min => -999999; 

	public override void Mod(int a)
	{

StatsStamina

@@ -12,7 +12,7 @@ public class StatsStamina : Stats

cs

	public override int max => BaseStats.CC._maxStamina * BaseStats.CC.Evalue(62) / 100;

	public override int min => -9999; 
	public override int min => -999999; 

	public override void Mod(int a)
	{

Thing

@@ -1458,7 +1458,7 @@ public override void SetRenderParam(RenderParam p)

cs
		{
			p.tile = sourceCard._tiles[base.dir % sourceCard._tiles.Length] * ((!flipX) ? 1 : (-1));
		}
		if (animeCounter > 0f) 
		if (animeCounter > 0f && source.anime.Length != 0) 
		{
			animeCounter += Time.deltaTime;
			int num3 = (int)(animeCounter / (0.001f * (float)source.anime[1]));

TraitCrafter

@@ -157,18 +157,23 @@ public bool IsIngredient(int idx, SourceRecipe.Row r, Card c)

cs
			{
				return true;
			}
			continue; 
		}
		else
		if (text == "any") 
		{
			if (text == "any" && !c.IsUnique && !c.IsImportant && !c.trait.CanOnlyCarry) 
			if (this is TraitDyeMaker && !c.category.GetRoot().tag.Contains("dye") && !c.category.tag.Contains("dye")) 
			{
				return true; 
				return false; 
			}
			if (c.id == text || c.sourceCard._origin == text) 
			if (!c.IsUnique && !c.IsImportant && !c.trait.CanOnlyCarry) 
			{
				return true;
			}
		}
		if (c.id == text || c.sourceCard._origin == text) 
		{ 
			return true; 
		} 
	}
	return false;
}

TraitTrainingDummy

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

cs
public class TraitTrainingDummy : Trait
{
	public override TileMode tileMode => TileMode.SignalAnime; 

	public override bool CanBeAttacked => true;

	public override bool IdleUse(Chara c, int dist)

+Zone_Gathering

File Created
cs
public class Zone_Gathering : Zone_RandomDungeon
{
	public override int StartLV => 0;

	public override int LvBoss => 0;

	public override string IDGenerator => null;

	public override ZoneTransition.EnterState RegionEnterState => ZoneTransition.EnterState.Dir;

	public override string GetDungenID()
	{
		return null;
	}
}

+Zone_RandomDungeonForest

File Created
cs
public class Zone_RandomDungeonForest : Zone_RandomDungeonNature
{
	public override string IdBiome
	{
		get
		{
			if (EClass.rnd(2) != 0)
			{
				return "Dungeon_Forest";
			}
			return "Forest";
		}
	}
}

+Zone_RandomDungeonNature

File Created
cs
public class Zone_RandomDungeonNature : Zone_RandomDungeon
{
	public override float RespawnRate => base.RespawnRate * 3f;

	public override string GetDungenID()
	{
		if (EClass.rnd(2) == 0)
		{
			return "RoundRooms";
		}
		if (EClass.rnd(3) == 0)
		{
			return "CavernBig";
		}
		return "Cavern";
	}
}

+Zone_RandomDungeonPlain

File Created
cs
public class Zone_RandomDungeonPlain : Zone_RandomDungeonNature
{
}