EA 23.208 Nightly Patch 1
September 29, 2025
11 files modified.
Important Changes
Possible breaking changes. Click the filename to view the chunk.
SpatialManager (1)
public T Find<T>(Func<T, bool> func) where T : Zone
public T Find<T>(Func<T, bool> func = null) where T : Zone
AI_Fish
public static Thing Makefish(Chara c)
Thing thing = null;
int num2 = 1;
string text = "";
int num3 = 0;
if (c.IsPC || EClass.rnd(20) == 0)
{
if (EClass.rnd(30) == 0)
{
text = "book_ancient";
}
if (EClass.rnd(40) == 0 && EClass.rnd(40) < num / 3 + 10)
{
text = "medal";
}
if (EClass.rnd(35) == 0)
{
text = "plat";
public static Thing Makefish(Chara c)
if (EClass.rnd(50) == 0)
{
text = new string[7] { "659", "758", "759", "806", "828", "1190", "1191" }.RandomItem();
if (!c.IsPC)
{
num3 = 10;
}
}
}
if (EClass.rnd(40) == 0 && EClass.rnd(40) < num / 3 + 10)
if (!c.IsPC)
{
text = "medal";
if (text == "plat" || text == "medal")
{
num3 = 1;
}
if (num3 != 0)
{
if (EClass.rnd(EClass.player.fishArtifact + 1) <= 0)
{
EClass.player.fishArtifact += num3;
}
else
{
text = "";
}
}
}
}
if (!hqFever && text != "")
public static Thing Makefish(Chara c)
{
SetFeverSeed();
int lv = EClass.rnd(num * 2) + 1;
int num3 = 0;
int num4 = 0;
if (EClass.rnd(EClass.debug.enable ? 1 : (c.IsPC ? 5 : (c.IsPCFaction ? 250 : 2500))) == 0)
{
num3 = Mathf.Min(EClass.rnd(EClass.rnd(EClass.rnd(EClass.curve(num, 100, 50, 70) + 50))) / 50, 3);
num4 = Mathf.Min(EClass.rnd(EClass.rnd(EClass.rnd(EClass.curve(num, 100, 50, 70) + 50))) / 50, 3);
}
if (hqFever && ((EClass.pc.Evalue(1659) >= 2 && EClass.player.fished == 0) || EClass.rnd(5) == 0))
{
num3++;
num4++;
}
if (num3 > 3)
if (num4 > 3)
{
num3 = 3;
num4 = 3;
}
SetFeverSeed();
thing = ThingGen.Create("fish", -1, lv);
SetFeverSeed();
int num4 = Mathf.Max(1, num / (thing.source.LV * 2 + 10));
int num5 = 5;
int num5 = Mathf.Max(1, num / (thing.source.LV * 2 + 10));
int num6 = 5;
if (EClass.Branch != null)
{
num5 += EClass.Branch.Evalue(3604) * 20 + EClass.Branch.Evalue(3605) * 20 + EClass.Branch.Evalue(3606) * 20 + EClass.Branch.Evalue(3706) * 25;
num6 += EClass.Branch.Evalue(3604) * 20 + EClass.Branch.Evalue(3605) * 20 + EClass.Branch.Evalue(3606) * 20 + EClass.Branch.Evalue(3706) * 25;
}
if (EClass._zone is Zone_Kapul)
{
num5 = 35;
num6 = 35;
}
bool num6 = num5 >= EClass.rnd(100);
if (num6)
bool num7 = num6 >= EClass.rnd(100);
if (num7)
{
c.Say("bigCatch", c);
}
num2 = (num6 ? num4 : EClass.rnd(num4)) / (num3 + 1) + 1;
if (num3 != 0)
num2 = (num7 ? num5 : EClass.rnd(num5)) / (num4 + 1) + 1;
if (num4 != 0)
{
thing.SetTier(num3);
thing.SetTier(num4);
}
Rand.SetSeed();
}
ActEffect
public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po
{
return;
}
Thing thing2 = ThingGen.Create("mine");
thing2.c_idRefCard = "dog_mine";
Thing thing = ThingGen.Create("mine");
thing.c_idRefCard = "dog_mine";
Zone.ignoreSpawnAnime = true;
EClass._zone.AddCard(thing2, CC.pos).Install();
EClass._zone.AddCard(thing, CC.pos).Install();
break;
}
case EffectId.LittleSisterMigration:
public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po
return;
}
List<Chara> list3 = new List<Chara>();
bool flag6 = false;
bool flag5 = false;
foreach (Chara chara2 in EClass._map.charas)
{
if (!chara2.IsPCFactionOrMinion && chara2.id == "littleOne")
{
if (flag6)
if (flag5)
{
flag6 = false;
flag5 = false;
continue;
}
list3.Add(chara2);
flag6 = true;
flag5 = true;
}
}
if (list3.Count == 0)
public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po
TC.PlaySound("curse3");
TC.PlayEffect("curse");
TC.Say("forgetItems", TC);
int num = power / 50 + 1 + EClass.rnd(3);
int num5 = power / 50 + 1 + EClass.rnd(3);
List<Thing> source = TC.things.List((Thing t) => t.c_IDTState == 0);
for (int i = 0; i < num; i++)
for (int j = 0; j < num5; j++)
{
source.RandomItem().c_IDTState = 5;
}
public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po
case EffectId.EnchantArmorGreat:
{
bool armor = id == EffectId.EnchantArmor || id == EffectId.EnchantArmorGreat;
bool flag3 = id == EffectId.EnchantWeaponGreat || id == EffectId.EnchantArmorGreat;
bool flag4 = id == EffectId.EnchantWeaponGreat || id == EffectId.EnchantArmorGreat;
if (!tc.isThing)
{
LayerDragGrid.CreateEnchant(CC, armor, flag3, state);
LayerDragGrid.CreateEnchant(CC, armor, flag4, state);
return;
}
cc.PlaySound("identify");
public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po
tc.ModEncLv(-1);
break;
}
int num5 = (flag3 ? 4 : 2) + (blessed ? 1 : 0);
if (tc.encLV >= num5)
int num4 = (flag4 ? 4 : 2) + (blessed ? 1 : 0);
if (tc.encLV >= num4)
{
cc.Say("enc_resist", tc);
break;
public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po
case EffectId.Identify:
case EffectId.GreaterIdentify:
{
bool flag4 = id == EffectId.GreaterIdentify;
bool flag6 = id == EffectId.GreaterIdentify;
if (flag)
{
Redirect(EffectId.ForgetItems, flag4 ? BlessedState.Cursed : BlessedState.Normal, default(ActRef));
Redirect(EffectId.ForgetItems, flag6 ? BlessedState.Cursed : BlessedState.Normal, default(ActRef));
break;
}
if (!tc.isThing)
{
int count = ((!blessed) ? 1 : (flag4 ? (2 + EClass.rnd(2)) : (3 + EClass.rnd(3))));
LayerDragGrid.CreateIdentify(CC, flag4, state, 0, count);
int count = ((!blessed) ? 1 : (flag6 ? (2 + EClass.rnd(2)) : (3 + EClass.rnd(3))));
LayerDragGrid.CreateIdentify(CC, flag6, state, 0, count);
return;
}
cc.PlaySound("identify");
cc.PlayEffect("identify");
tc.Thing.Identify(cc.IsPCParty, (!flag4) ? IDTSource.Identify : IDTSource.SuperiorIdentify);
tc.Thing.Identify(cc.IsPCParty, (!flag6) ? IDTSource.Identify : IDTSource.SuperiorIdentify);
break;
}
case EffectId.Uncurse:
public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po
LayerDragGrid.CreateUncurse(CC, state);
return;
}
Thing thing3 = tc.Thing;
if (thing3.blessedState == BlessedState.Cursed)
Thing thing2 = tc.Thing;
if (thing2.blessedState == BlessedState.Cursed)
{
thing3.SetBlessedState(BlessedState.Normal);
thing2.SetBlessedState(BlessedState.Normal);
}
else if (thing3.blessedState == BlessedState.Doomed)
else if (thing2.blessedState == BlessedState.Doomed)
{
thing3.SetBlessedState(BlessedState.Normal);
thing2.SetBlessedState(BlessedState.Normal);
}
thing3.GetRootCard()?.TryStack(thing3);
LayerInventory.SetDirty(thing3);
thing2.GetRootCard()?.TryStack(thing2);
LayerInventory.SetDirty(thing2);
break;
}
case EffectId.Lighten:
public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po
}
cc.PlaySound("offering");
cc.PlayEffect("buff");
int num6 = (tc.isWeightChanged ? tc.c_weight : tc.Thing.source.weight);
int num3 = (tc.isWeightChanged ? tc.c_weight : tc.Thing.source.weight);
tc.isWeightChanged = true;
Element orCreateElement = tc.elements.GetOrCreateElement(64);
Element orCreateElement2 = tc.elements.GetOrCreateElement(65);
Element orCreateElement3 = tc.elements.GetOrCreateElement(67);
Element orCreateElement4 = tc.elements.GetOrCreateElement(66);
bool flag5 = tc.IsEquipmentOrRangedOrAmmo || tc.IsThrownWeapon;
bool flag3 = tc.IsEquipmentOrRangedOrAmmo || tc.IsThrownWeapon;
if (flag)
{
num6 = (int)(0.01f * (float)num6 * (float)power * 0.75f + 500f);
if (num6 < 0 || num6 > 10000000)
num3 = (int)(0.01f * (float)num3 * (float)power * 0.75f + 500f);
if (num3 < 0 || num3 > 10000000)
{
num6 = 10000000;
flag5 = false;
num3 = 10000000;
flag3 = false;
}
if (flag5)
if (flag3)
{
if (tc.IsWeapon || tc.IsThrownWeapon || tc.IsAmmo)
{
public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po
}
else
{
num6 = num6 * (100 - power / 10) / 100;
num3 = num3 * (100 - power / 10) / 100;
if (blessed)
{
power /= 4;
}
if (flag5)
if (flag3)
{
if (tc.IsWeapon || tc.IsThrownWeapon || tc.IsAmmo)
{
public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po
}
cc.Say("lighten", cc, tc);
}
tc.c_weight = num6;
tc.c_weight = num3;
tc.SetDirtyWeight();
if (tc.parent == null)
{
public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po
cc.PlayEffect("identify");
cc.Say("reconstruct", cc, tc);
EClass.game.cards.uidNext += EClass.rnd(30);
int num4 = Mathf.Max(tc.genLv, tc.LV, EClass.player.stats.deepest);
int num6 = Mathf.Max(tc.genLv, tc.LV, EClass.player.stats.deepest);
CardBlueprint.Set(new CardBlueprint
{
blesstedState = state
});
Thing thing = ThingGen.Create(tc.id, -1, (int)((long)num4 * (long)power / 400));
thing.genLv = num4;
Thing thing3 = ThingGen.Create(tc.id, -1, (int)((long)num6 * (long)power / 400));
thing3.genLv = num6;
tc.Destroy();
CC.Pick(thing, msg: false);
CC.Pick(thing3, msg: false);
if (!CC.IsPC)
{
CC.TryEquip(thing);
CC.TryEquip(thing3);
}
break;
}
public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po
string name = tc.Name;
if (row == null)
{
bool num2 = id == EffectId.ChangeMaterialGreater;
bool num = id == EffectId.ChangeMaterialGreater;
bool flag2 = id == EffectId.ChangeMaterialLesser;
string text2 = tc.Thing.source.tierGroup;
Dictionary<string, SourceMaterial.TierList> tierMap = SourceMaterial.tierMap;
int num3 = 1;
int num2 = 1;
if (flag)
{
num3 -= 2;
num2 -= 2;
}
if (blessed)
{
num3++;
num2++;
}
if (num2)
if (num)
{
num3++;
num2++;
}
if (flag2)
{
num3 -= 2;
num2 -= 2;
}
num3 = Mathf.Clamp(num3 + EClass.rnd(2), 0, 4);
num2 = Mathf.Clamp(num2 + EClass.rnd(2), 0, 4);
if (EClass.rnd(10) == 0)
{
text2 = ((text2 == "metal") ? "leather" : "metal");
}
SourceMaterial.TierList tierList = (text2.IsEmpty() ? tierMap.RandomItem() : tierMap[text2]);
for (int j = 0; j < 1000; j++)
for (int i = 0; i < 1000; i++)
{
row = tierList.tiers[num3].Select();
row = tierList.tiers[num2].Select();
if (row != tc.material)
{
break;
public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po
}
break;
}
case EffectId.ReturnVoid:
{
Zone_Void root = EClass.game.spatials.Find<Zone_Void>();
if (EClass.game.IsSurvival || root == null || root.visitCount == 0 || EClass.player.stats.deepest < 1 || (!EClass.debug.enable && EClass.player.CountKeyItem("license_void") == 0))
{
Msg.SayNothingHappen();
return;
}
int max = Mathf.Min(EClass.player.stats.deepest, -root.MinLv);
int destLv = 1;
Dialog.InputName("dialogVoidReturn".lang(max.ToString() ?? ""), max.ToString() ?? "", delegate(bool cancel, string text)
{
if (!cancel)
{
destLv = Mathf.Abs(text.ToInt());
destLv = Mathf.Clamp(destLv, 1, max) * -1;
Zone zone = ((root.lv == destLv) ? root : (root.children.Find((Spatial t) => t.lv == destLv) as Zone));
Debug.Log(destLv + "/" + zone);
if (zone == null)
{
zone = SpatialGen.Create(root.GetNewZoneID(destLv), root, register: true) as Zone;
zone.lv = destLv;
}
Msg.Say("returnComplete");
EClass.player.uidLastTravelZone = 0;
EClass.pc.MoveZone(zone, ZoneTransition.EnterState.Return);
EClass.player.lastZonePos = null;
EClass.player.returnInfo = null;
}
});
break;
}
case EffectId.Return:
case EffectId.Evac:
if (!cc.IsPC)
public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po
int num7 = Dice.Create((actRef.act != null && EClass.sources.calc.map.ContainsKey(actRef.act.ID)) ? actRef.act.ID : "SpHealLight", power, CC, (actRef.refThing != null) ? null : actRef.act).Roll();
if (actRef.refThing != null)
{
num7 = num7 * (100 + actRef.refThing.Evalue(7500)) / 100;
num7 = num7 * (100 + actRef.refThing.Evalue(750) * 10) / 100;
}
if (flag)
{
Card
public virtual int GetPrice(CurrencyType currency = CurrencyType.Money, bool sel
case CurrencyType.Medal:
switch (id)
{
case "1282":
return 5;
case "bill_tax":
return 3;
case "water":
public virtual int GetPrice(CurrencyType currency = CurrencyType.Money, bool sel
case "scroll_random":
if (refVal == 8288)
{
return 5;
return 10;
}
break;
}
Chara
if (EClass._zone.DangerLv > EClass.player.stats.deepest)
{
EClass.player.stats.deepest = EClass._zone.DangerLv;
if (EClass._zone is Zone_Void)
{
EClass.player.stats.deepestVoid = -EClass._zone.lv;
}
Msg.Say("update_deepest", EClass.player.stats.deepest.ToString() ?? "");
}
EClass.player.willAutoSave = true;
EffectId
MoonSpear = 302,
BurnMana = 303,
MoonArrow = 304,
LittleSisterMigration = 305
LittleSisterMigration = 305,
ReturnVoid = 306
}
Player
[JsonProperty]
public int deepest;
[JsonProperty]
public int deepestVoid;
[JsonProperty]
public int gambleChest;
[JsonProperty]
public int fished;
[JsonProperty]
public int fishArtifact;
[JsonProperty]
public float angle;
{
ModKarma(1);
}
if (fishArtifact > 0 && EClass.rnd(5) == 0)
{
fishArtifact--;
}
}
public bool TryAbortAutoCombat(bool immediate = true)
SpatialManager
listDestryoed.Add(s);
}
public T Find<T>(Func<T, bool> func) where T : Zone
public T Find<T>(Func<T, bool> func = null) where T : Zone
{
foreach (Spatial value in map.Values)
{
if (value is T val && func(val))
if (value is T val && (func == null || func(val)))
{
return val;
}
Trait
Add("diary_lady", 1, 0);
Add("1165", 1, 0).SetNum(5);
AddThing(ThingGen.CreateScroll(9160).SetNum(5));
Add("1282", 1, 0).SetNum(5);
Add("monsterball", 1, 0).SetNum(3).SetLv(20);
Add("monsterball", 1, 0).SetNum(3).SetLv(40);
Add("bill_tax", 1, 0).c_bill = 1;
WindowChara
string text = "deepestLv2".lang((chara.IsPCFaction ? EClass.player.stats.deepest : chara.LV).ToString() ?? "");
if (chara.IsPCFaction && EClass.player.CountKeyItem("license_void") > 0)
{
text = text + " " + "deepestLv3".lang(Mathf.Abs(EClass.game.spatials.Find("void").GetDeepestLv()).ToString() ?? "");
text = text + " " + "deepestLv3".lang(EClass.player.stats.deepestVoid.ToString() ?? "");
}
textDeepest.text = text;
textAssets.text = (chara.IsPC ? "tGameTime".lang(EClass.player.stats.days.ToFormat(), EClass.player.stats.turns.ToFormat()) : "???");
Zone
public virtual bool AllowInvest
public virtual bool CanUnlockExit => !LockExit;
public virtual int MaxLv => 99999;
public virtual int MaxLv => 99999999;
public virtual int MinLv => -99999;
public virtual int MinLv => -99999999;
public virtual bool AddPrefix => false;
{
if (IsPCFaction)
{
return -100000 + base.uid;
return -10000000 + base.uid;
}
if (this is Zone_SubTown)
{
return -8000000 + base.uid;
}
if (this is Zone_Town)
{
return -9000000 + base.uid;
}
if (this is Zone_Civilized)
{
return -90000 + base.uid;
return -7000000 + base.uid;
}
if (this is Zone_RandomDungeon)
{
return 1000000 + base.uid;
}
return base.uid;
}
Zone_Void
public override string TextWidgetDate
}
}
public override int MinLv => -10000;
public override ZoneScaleType ScaleType => ZoneScaleType.Void;
public override bool LockExit => IsBossLV;