EA 23.119 Nightly
April 3, 2025
10 files modified.
Important Changes
Possible breaking changes. Click the filename to view the chunk.
CoreDebug (1)
cs
public static string Fix_LoytelDebt()
public static string Reset_LoytelDebt()
AI_Idle
@@ -818,6 +818,18 @@ public override IEnumerable<Status> Run()
cs
yield return DoGoto(thing7.pos);
}
}
if (EClass.rnd(10) == 0 && (owner.race.tag.Contains("water") || owner.source.tag.Contains("water")) && !owner.pos.IsDeepWater)
{
for (int j = 0; j < 100; j++)
{
Point randomPoint = EClass._map.GetRandomPoint();
if (randomPoint.IsDeepWater && !randomPoint.IsBlocked)
{
yield return DoGoto(randomPoint);
break;
}
}
}
string aiIdle = owner.source.aiIdle;
if (!(aiIdle == "stand") && !(aiIdle == "root"))
{
@@ -841,12 +853,12 @@ public override IEnumerable<Status> Run()
cs
yield return Restart();
Point FindMovePoint(BaseArea.AccessType type)
{
for (int j = 0; j < 20; j++)
for (int k = 0; k < 20; k++)
{
Point randomPoint = owner.pos.GetRandomPoint(5 + j, requireLos: false);
if (randomPoint != null && randomPoint.IsInBounds && (randomPoint.cell.room == null || randomPoint.cell.room.data.accessType == type))
Point randomPoint2 = owner.pos.GetRandomPoint(5 + k, requireLos: false);
if (randomPoint2 != null && randomPoint2.IsInBounds && (randomPoint2.cell.room == null || randomPoint2.cell.room.data.accessType == type))
{
return randomPoint;
return randomPoint2;
}
}
return null;
ActEffect
cs
{
break;
}
int hex2 = 0;
int hex = 0;
foreach (Condition condition4 in TC.conditions)
{
if (condition4.Type == ConditionType.Debuff)
{
hex2++;
hex++;
}
}
if (hex2 == 0)
if (hex == 0)
{
CC.SayNothingHappans();
break;
cs
{
break;
}
int dmg2 = Dice.Create("SpShutterHex", power * hex2, CC, (actRef.refThing != null) ? null : actRef.act).Roll();
int dmg2 = Dice.Create("SpShutterHex", power * hex, CC, (actRef.refThing != null) ? null : actRef.act).Roll();
item3.DamageHP(dmg2, 919, power, AttackSource.None, CC);
}
});
cs
break;
}
Thing thing6 = null;
bool flag9 = actRef.n1 == "food";
bool flag8 = actRef.n1 == "food";
if (actRef.n1 == "money")
{
int currency = TC.GetCurrency();
cs
else
{
Func<Thing, bool> func = (Thing t) => true;
if (flag9)
if (flag8)
{
func = (Thing t) => t.IsFood;
}
List<Thing> list7 = TC.things.List(delegate(Thing t)
List<Thing> list6 = TC.things.List(delegate(Thing t)
{
if (t.parentCard?.trait is TraitChestMerchant || t.trait is TraitTool || t.IsThrownWeapon)
{
cs
}
return t.trait.CanBeDestroyed && t.things.Count == 0 && t.invY != 1 && t.trait.CanBeStolen && !t.trait.CanOnlyCarry && !t.IsUnique && !t.isEquipped && t.blessedState == BlessedState.Normal && func(t);
}, onlyAccessible: true);
if (list7.Count > 0)
if (list6.Count > 0)
{
thing6 = list7.RandomItem();
thing6 = list6.RandomItem();
if (thing6.Num > 1)
{
thing6 = thing6.Split(1);
cs
{
break;
}
List<Thing> list5 = TC.things.List(delegate(Thing t)
List<Thing> list3 = TC.things.List(delegate(Thing t)
{
if (!t.isEquipped || t.blessedState == BlessedState.Doomed || t.IsToolbelt)
{
cs
}
return (t.blessedState < BlessedState.Blessed || EClass.rnd(10) == 0) ? true : false;
});
if (list5.Count == 0)
if (list3.Count == 0)
{
CC.SayNothingHappans();
break;
}
Thing thing5 = list5.RandomItem();
TC.Say("curse_hit", TC, thing5);
thing5.SetBlessedState((thing5.blessedState == BlessedState.Cursed) ? BlessedState.Doomed : BlessedState.Cursed);
LayerInventory.SetDirty(thing5);
Thing thing4 = list3.RandomItem();
TC.Say("curse_hit", TC, thing4);
thing4.SetBlessedState((thing4.blessedState == BlessedState.Cursed) ? BlessedState.Doomed : BlessedState.Cursed);
LayerInventory.SetDirty(thing4);
break;
}
case EffectId.UncurseEQ:
cs
text3 = text4;
}
}
Condition condition2 = Condition.Create(text3, power, delegate(Condition con)
Condition condition = Condition.Create(text3, power, delegate(Condition con)
{
if (!actRef.aliasEle.IsEmpty())
{
con.SetElement(EClass.sources.elements.alias[actRef.aliasEle].id);
}
});
condition2.isPerfume = TC.IsPC && actRef.isPerfume;
Condition condition3 = TC.AddCondition(condition2);
if (condition3 != null && condition3.isPerfume)
condition.isPerfume = TC.IsPC && actRef.isPerfume;
Condition condition2 = TC.AddCondition(condition);
if (condition2 != null && condition2.isPerfume)
{
condition3.value = 3;
condition2.value = 3;
Msg.Say("perfume", TC);
}
if (!text4.IsEmpty())
cs
case EffectId.KizuamiTrick:
{
EClass.game.religions.Trickery.Talk("ability");
bool hex = CC.IsHostile(TC);
List<SourceStat.Row> list4 = EClass.sources.stats.rows.Where((SourceStat.Row con) => con.tag.Contains("random") && con.group == (hex ? "Debuff" : "Buff")).ToList();
bool hex2 = CC.IsHostile(TC);
List<SourceStat.Row> list5 = EClass.sources.stats.rows.Where((SourceStat.Row con) => con.tag.Contains("random") && con.group == (hex2 ? "Debuff" : "Buff")).ToList();
int power2 = power;
for (int k = 0; k < 4 + EClass.rnd(2); k++)
{
SourceStat.Row row2 = list4.RandomItem();
list4.Remove(row2);
Proc(hex ? EffectId.Debuff : EffectId.Buff, CC, TC, power2, new ActRef
SourceStat.Row row2 = list5.RandomItem();
list5.Remove(row2);
Proc(hex2 ? EffectId.Debuff : EffectId.Buff, CC, TC, power2, new ActRef
{
n1 = row2.alias
});
cs
power = power * 2 / 3;
}
int a2 = power;
int num6 = TC.WIL * (isPowerful ? 20 : 5);
ConHolyVeil condition = TC.GetCondition<ConHolyVeil>();
if (condition != null)
int num9 = TC.WIL * (isPowerful ? 20 : 5);
ConHolyVeil condition3 = TC.GetCondition<ConHolyVeil>();
if (condition3 != null)
{
num6 += condition.power * 5;
num9 += condition3.power * 5;
}
if (EClass.rnd(a2) < num6 / EClass.sources.stats.alias[n].hexPower && EClass.rnd(10) != 0)
if (EClass.rnd(a2) < num9 / EClass.sources.stats.alias[n].hexPower && EClass.rnd(10) != 0)
{
TC.Say("debuff_resist", TC);
CC.DoHostileAction(TC);
cs
case EffectId.Faith:
{
Religion faith = tc.Chara.faith;
if (faith.IsEyth)
{
tc.SayNothingHappans();
break;
}
tc.PlayEffect("aura_heaven");
tc.PlaySound("aura_heaven");
tc.Say("faith", tc, faith.Name);
cs
break;
case EffectId.Revive:
{
List<KeyValuePair<int, Chara>> list6 = EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon && a.Value.c_wasInPcParty).ToList();
List<KeyValuePair<int, Chara>> list7 = EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon && a.Value.c_wasInPcParty).ToList();
if (TC.IsPCFaction || TC.IsPCFactionMinion)
{
if (TC.IsPC && list6.Count == 0)
if (TC.IsPC && list7.Count == 0)
{
list6 = EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.CanRevive() && a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon).ToList();
list7 = EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.CanRevive() && a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon).ToList();
}
if (list6.Count > 0)
if (list7.Count > 0)
{
list6.RandomItem().Value.Chara.GetRevived();
list7.RandomItem().Value.Chara.GetRevived();
break;
}
}
cs
{
bool flag7 = id == EffectId.DamageBody || id == EffectId.DamageBodyGreat;
bool mind = id == EffectId.DamageMind || id == EffectId.DamageMindGreat;
int num7 = ((id == EffectId.DamageBody || id == EffectId.DamageMind) ? 1 : (4 + EClass.rnd(4)));
int num6 = ((id == EffectId.DamageBody || id == EffectId.DamageMind) ? 1 : (4 + EClass.rnd(4)));
if (id == EffectId.Weaken)
{
flag7 = EClass.rnd(2) == 0;
mind = !flag7;
num7 = 1;
num6 = 1;
}
else
{
cs
TC.PlaySound("debuff");
}
TC.Say(flag7 ? "damageBody" : "damageMind", TC);
for (int l = 0; l < num7; l++)
for (int l = 0; l < num6; l++)
{
TC.DamageTempElements(power, flag7, mind);
}
cs
case EffectId.EnhanceBodyGreat:
case EffectId.EnhanceMindGreat:
{
bool flag8 = id == EffectId.EnhanceBody || id == EffectId.EnhanceBodyGreat;
bool flag9 = id == EffectId.EnhanceBody || id == EffectId.EnhanceBodyGreat;
bool mind2 = id == EffectId.EnhanceMind || id == EffectId.EnhanceMindGreat;
int num8 = ((id == EffectId.EnhanceBody || id == EffectId.EnhanceMind) ? 1 : (4 + EClass.rnd(4)));
TC.Say(flag8 ? "enhanceBody" : "enhanceMind", TC);
int num7 = ((id == EffectId.EnhanceBody || id == EffectId.EnhanceMind) ? 1 : (4 + EClass.rnd(4)));
TC.Say(flag9 ? "enhanceBody" : "enhanceMind", TC);
TC.PlayEffect("buff");
TC.PlaySound("buff");
for (int m = 0; m < num8; m++)
for (int m = 0; m < num7; m++)
{
TC.EnhanceTempElements(power, flag8, mind2);
TC.EnhanceTempElements(power, flag9, mind2);
}
break;
}
cs
{
Debug.Log(actRef.act.id);
}
int num9 = 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();
int num8 = 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 (flag)
{
TC.DamageHP(num9 / 2, 919, power);
TC.DamageHP(num8 / 2, 919, power);
break;
}
TC.HealHPHost(num9, (actRef.refThing == null) ? HealSource.Magic : HealSource.Item);
TC.HealHPHost(num8, (actRef.refThing == null) ? HealSource.Magic : HealSource.Item);
TC.CureHost(CureType.Heal, power, state);
TC.Say((power >= 300) ? "heal_heavy" : "heal_light", TC);
break;
cs
{
power /= 4;
}
List<Thing> list3 = TC.things.List((Thing t) => (t.Num <= 1 && t.IsEquipmentOrRanged && !t.IsToolbelt && !t.IsLightsource && t.isEquipped) ? true : false);
if (list3.Count != 0)
List<Thing> list4 = TC.things.List((Thing t) => (t.Num <= 1 && t.IsEquipmentOrRanged && !t.IsToolbelt && !t.IsLightsource && t.isEquipped) ? true : false);
if (list4.Count != 0)
{
Thing thing4 = list3.RandomItem();
Thing thing5 = list4.RandomItem();
TC.Say("acid_hit", TC);
if (thing4.isAcidproof)
if (thing5.isAcidproof)
{
TC.Say("acid_nullify", thing4);
TC.Say("acid_nullify", thing5);
}
else if (thing4.encLV > -5)
else if (thing5.encLV > -5)
{
TC.Say("acid_rust", TC, thing4);
thing4.ModEncLv(-1);
LayerInventory.SetDirty(thing4);
TC.Say("acid_rust", TC, thing5);
thing5.ModEncLv(-1);
LayerInventory.SetDirty(thing5);
}
if (TC.IsPCParty)
{
ActPray
@@ -25,26 +25,26 @@ public static bool TryPray(Chara c, bool passive = false)
cs
}
if (c.faith.IsEyth)
{
c.Say("pray", c);
if (passive)
{
if (c.Evalue(1655) < 2 || EClass.pc.party.members.Count <= 1)
if (c.Evalue(1655) >= 2 && EClass.pc.party.members.Count > 1)
{
return true;
}
foreach (Chara member in EClass.pc.party.members)
{
if (member != EClass.pc)
foreach (Chara member in EClass.pc.party.members)
{
member.Say("pray2", member, member.faith.Name);
member.ModExp(306, 200);
if (member != EClass.pc)
{
member.Say("pray2", member, member.faith.Name);
member.ModExp(306, 200);
}
}
}
}
else
{
c.Say("pray", c);
c.PlaySound("pray_ignore");
}
c.ModExp(306, 100);
return true;
}
foreach (Chara member2 in EClass.pc.party.members)
Chara
@@ -2292,6 +2292,10 @@ public bool MoveRandom()
cs
Point randomNeighbor = pos.GetRandomNeighbor();
if (!randomNeighbor.Equals(pos) && !randomNeighbor.HasChara && HasAccess(randomNeighbor))
{
if ((race.tag.Contains("water") || source.tag.Contains("water")) && pos.cell.IsTopWaterAndNoSnow && !randomNeighbor.IsDeepWater)
{
return false;
}
return TryMove(randomNeighbor) == MoveResult.Success;
}
return false;
cs
flag2 = a.Perform(this, tc, pos);
}
}
if (flag2 && !isDead && cost.cost > 0 && a.source.lvFactor > 0)
if (flag2 && !isDead)
{
ModExp(a.id, spellExp);
if (cost.cost > 0 && a.source.lvFactor > 0)
{
ModExp(a.id, spellExp);
}
if (a.source.alias.StartsWith("sword_"))
{
ModExp(101, 50);
}
}
ActEffect.RapidCount = 0;
if (!IsPC && a.source.cooldown > 0)
CharaAbility
@@ -156,7 +156,10 @@ public void BuildRandomAbilityList()
cs
continue;
}
}
randomAbilities.Add(row);
if (!row.tag.Contains("noRandomAbility"))
{
randomAbilities.Add(row);
}
}
}
CoreDebug
@@ -1802,16 +1802,16 @@ public static string Cheat()
cs
}
[ConsoleCommand("")]
public static string Fix_LoytelDebt()
public static string Reset_LoytelDebt()
{
QuestDebt questDebt = EClass.game.quests.Get<QuestDebt>();
if (questDebt == null || questDebt.stage != 6 || EClass.player.debt == 19000000)
if (questDebt == null)
{
return "Quest Status Not Valid.";
}
questDebt.stage = 0;
questDebt.paid = false;
questDebt.gaveBill = true;
questDebt.gaveBill = false;
EClass.player.debt = 20000000;
Thing thing = ThingGen.Create("856");
thing.refVal = 109;
Player
@@ -434,6 +434,18 @@ public bool gotJurePillow
cs
}
}
public bool gotLoytelMart
{
get
{
return bits[31];
}
set
{
bits[31] = value;
}
}
public int start
{
get
Point
@@ -260,6 +260,18 @@ public bool HasMultipleChara
cs
}
}
public bool IsDeepWater
{
get
{
if (cell.IsTopWaterAndNoSnow)
{
return sourceFloor.tileType.IsDeepWater;
}
return false;
}
}
public Chara FirstChara
{
get
QuestDebt
@@ -83,7 +83,11 @@ public void GiveReward()
cs
EClass.player.DropReward(ThingGen.Create("ticket_resident"));
break;
case 5:
EClass.player.DropReward(ThingGen.Create("loytel_mart"));
if (!EClass.player.flags.gotLoytelMart)
{
EClass.player.flags.gotLoytelMart = true;
EClass.player.DropReward(ThingGen.Create("loytel_mart"));
}
break;
case 6:
EClass.player.flags.loytelMartLv = 1;
ZoneEventSubdue
@@ -14,7 +14,7 @@ public override void OnVisit()
cs
{
if (!EClass.game.isLoading)
{
EClass._zone._dangerLv = Mathf.Max(base.quest.DangerLv - 5, 1);
EClass._zone._dangerLv = Mathf.Max(base.quest.DangerLv - 2, 1);
Spawn(4 + base.quest.difficulty * 2 + EClass.rnd(5));
AggroEnemy(15);
EClass._zone.SetBGM(102);