EA 23.211 Nightly Patch 1
October 4, 2025
16 files modified. 2 new files created.
Important Changes
Possible breaking changes. Click the filename to view the chunk.
Card (2)
public void DamageHP(int dmg, AttackSource attackSource = AttackSource.None, Card origin = null)
public void DamageHP(long dmg, AttackSource attackSource = AttackSource.None, Card origin = null)
public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource = AttackSource.None, Card origin = null, bool showEffect = true, Thing weapon = null, Chara originalTarget = null)
public void DamageHP(long dmg, int ele, int eleP = 100, AttackSource attackSource = AttackSource.None, Card origin = null, bool showEffect = true, Thing weapon = null, Chara originalTarget = null)
+AI_Churyu
File Created
using System.Collections.Generic;
public class AI_Churyu : AIWork
{
public Card churyu;
public Chara slave;
public override int MaxRestart => 100000;
public override IEnumerable<Status> Run()
{
if (!slave.ExistsOnMap || churyu.GetRootCard() != slave)
{
yield return Success();
}
if (owner.Dist(slave) < 2)
{
if (owner.TalkTopic().IsEmpty())
{
owner.Talk("idle");
}
owner.PlaySound("Animal/Cat/cat");
yield return DoWait(1 + EClass.rnd(3));
}
else
{
yield return DoGoto(slave.pos.GetNearestPoint(allowBlock: false, allowChara: false));
}
yield return Restart();
}
}
AI_Idle
public override IEnumerable<Status> Run()
Thing thing2 = owner.things.Find("polish_powder");
if (thing2 != null && EClass._map.props.installed.Find<TraitGrindstone>() != null)
{
foreach (Thing thing8 in owner.things)
foreach (Thing thing9 in owner.things)
{
if (!thing8.IsEquipment || thing8.encLV >= 0)
if (!thing9.IsEquipment || thing9.encLV >= 0)
{
continue;
}
for (int j = 0; j < 5; j++)
{
if (thing8.encLV >= 0)
if (thing9.encLV >= 0)
{
break;
}
owner.Say("polish", owner, thing8);
thing8.ModEncLv(1);
owner.Say("polish", owner, thing9);
thing9.ModEncLv(1);
thing2.ModNum(-1);
if (thing2.isDestroyed)
{
public override IEnumerable<Status> Run()
{
if (owner.noMove)
{
foreach (Thing thing9 in owner.pos.Things)
foreach (Thing thing10 in owner.pos.Things)
{
if (thing9.IsInstalled && thing9.trait is TraitGeneratorWheel)
if (thing10.IsInstalled && thing10.trait is TraitGeneratorWheel)
{
owner.Talk("labor");
owner.PlayAnime(AnimeID.Shiver);
public override IEnumerable<Status> Run()
{
owner.AddCondition<ConSleep>(1000 + EClass.rnd(1000), force: true);
}
if (EClass.rnd(100) == 0 && !owner.noMove && (owner.HasHobbyOrWork("Pet") || owner.HasHobbyOrWork("Fluffy")))
if (!owner.noMove)
{
yield return Do(new AI_Mofu());
if (EClass.rnd(3) == 0 && owner.IsCat)
{
Chara chara2 = ((EClass.rnd(5) == 0) ? EClass.pc.party.members.RandomItem() : EClass._map.charas.RandomItem());
Thing thing5 = chara2.things.Find<TraitFoodChuryu>();
if (chara2 != owner && thing5 != null)
{
yield return Do(new AI_Churyu
{
churyu = thing5,
slave = chara2
});
}
}
if (EClass.rnd(100) == 0 && (owner.HasHobbyOrWork("Pet") || owner.HasHobbyOrWork("Fluffy")))
{
yield return Do(new AI_Mofu());
}
}
if (EClass.rnd((owner.host != null && owner.GetInt(106) != 0) ? 1000 : 40) == 0 && owner.IsHuman)
{
public override IEnumerable<Status> Run()
}
if (EClass.rnd(100) == 0 && owner.trait is TraitBitch)
{
Chara chara2 = DoSomethingToNearChara((Chara c) => c.IsIdle && !c.IsPCParty && !(c.trait is TraitBitch) && c.Evalue(418) <= 0);
if (chara2 != null)
Chara chara3 = DoSomethingToNearChara((Chara c) => c.IsIdle && !c.IsPCParty && !(c.trait is TraitBitch) && c.Evalue(418) <= 0);
if (chara3 != null)
{
yield return Do(new AI_Fuck
{
target = chara2,
target = chara3,
bitch = true
});
}
public override IEnumerable<Status> Run()
}
if (EClass.rnd(35) == 0 && owner.id == "child" && owner.pos.cell.IsSnowTile)
{
foreach (Chara chara3 in EClass._map.charas)
foreach (Chara chara4 in EClass._map.charas)
{
if (EClass.rnd(3) != 0 && chara3 != owner && chara3.pos.cell.IsSnowTile && chara3.Dist(owner) <= 6 && Los.IsVisible(chara3, owner))
if (EClass.rnd(3) != 0 && chara4 != owner && chara4.pos.cell.IsSnowTile && chara4.Dist(owner) <= 6 && Los.IsVisible(chara4, owner))
{
Thing t3 = ThingGen.Create("snow");
ActThrow.Throw(owner, chara3.pos, t3);
ActThrow.Throw(owner, chara4.pos, t3);
break;
}
}
}
if (EClass.rnd(EClass.debug.enable ? 3 : 30) == 0)
{
Thing thing5 = owner.things.Find<TraitBall>();
if (thing5 == null)
Thing thing6 = owner.things.Find<TraitBall>();
if (thing6 == null)
{
owner.pos.ForeachNeighbor(delegate(Point p)
{
public override IEnumerable<Status> Run()
}
else
{
foreach (Chara chara4 in EClass._map.charas)
foreach (Chara chara5 in EClass._map.charas)
{
if (EClass.rnd(3) != 0 && chara4 != owner && chara4.Dist(owner) <= 6 && chara4.Dist(owner) >= 3 && Los.IsVisible(chara4, owner))
if (EClass.rnd(3) != 0 && chara5 != owner && chara5.Dist(owner) <= 6 && chara5.Dist(owner) >= 3 && Los.IsVisible(chara5, owner))
{
ActThrow.Throw(owner, chara4.pos, thing5);
ActThrow.Throw(owner, chara5.pos, thing6);
break;
}
}
public override IEnumerable<Status> Run()
break;
}
List<Thing> list3 = owner.things.List((Thing a) => a.parent == owner && (a.category.id == "spellbook" || a.category.id == "ancientbook" || a.category.id == "skillbook"), onlyAccessible: true);
Thing thing6 = null;
Thing thing7 = null;
if (list3.Count > 0)
{
thing6 = list3.RandomItem();
if (!thing6.trait.CanRead(owner))
thing7 = list3.RandomItem();
if (!thing7.trait.CanRead(owner))
{
thing6 = null;
thing7 = null;
}
}
if (thing6 == null)
if (thing7 == null)
{
if (owner.things.IsFull())
{
break;
}
thing6 = ThingGen.CreateFromCategory((EClass.rnd(5) != 0) ? "spellbook" : "ancientbook");
thing6.isNPCProperty = true;
thing7 = ThingGen.CreateFromCategory((EClass.rnd(5) != 0) ? "spellbook" : "ancientbook");
thing7.isNPCProperty = true;
}
if (!(thing6.id == "1084") || !owner.IsPCFaction)
if (!(thing7.id == "1084") || !owner.IsPCFaction)
{
if (!owner.HasElement(285))
{
public override IEnumerable<Status> Run()
}
yield return Do(new AI_Read
{
target = thing6
target = thing7
});
}
break;
public override IEnumerable<Status> Run()
}
if (EClass.rnd(100) == 0 && owner.id == "bee")
{
Thing thing7 = EClass._map.ListThing<TraitBeekeep>()?.RandomItem();
if (thing7 != null)
Thing thing8 = EClass._map.ListThing<TraitBeekeep>()?.RandomItem();
if (thing8 != null)
{
yield return DoGoto(thing7.pos);
yield return DoGoto(thing8.pos);
}
}
if (EClass.rnd(10) == 0 && !EClass._zone.IsUnderwater && (owner.race.tag.Contains("water") || owner.source.tag.Contains("water")) && !owner.pos.IsDeepWater)
ActEffect
public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po
{
break;
}
int hex2 = 0;
int num10 = 0;
foreach (Condition condition4 in TC.conditions)
{
if (condition4.Type == ConditionType.Debuff)
{
hex2++;
num10++;
}
}
if (hex2 == 0)
if (num10 == 0)
{
CC.SayNothingHappans();
break;
public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po
TC.pos.PlaySound("atk_eleSound");
TC.conditions.ForeachReverse(delegate(Condition c)
{
if (c.Type == ConditionType.Debuff)
if (c.Type == ConditionType.Debuff && EClass.rnd(3) == 0)
{
c.Kill();
}
});
TC.Say("abShutterHex", TC);
TC.pos.ForeachNeighbor(delegate(Point p)
Point center = CC.pos.Copy();
List<Chara> list6 = TC.pos.ListCharasInRadius(TC, 4, (Chara c) => !c.IsFriendOrAbove(CC));
for (int l = 0; l < num10; l++)
{
foreach (Chara item4 in p.ListCharas())
TweenUtil.Delay((float)l * 0.1f, delegate
{
if (!item4.IsFriendOrAbove(CC))
center.PlaySound("shutterhex");
});
foreach (Chara item4 in list6)
{
if (item4.ExistsOnMap)
{
int num10 = Dice.Create("SpShutterHex", power, CC, (actRef.refThing != null) ? null : actRef.act).Roll();
item4.DamageHP(num10 * hex2, 919, power, AttackSource.None, CC);
Effect effect = Effect.Get("spell_moonspear");
TrailRenderer componentInChildren = effect.GetComponentInChildren<TrailRenderer>();
Color startColor = (componentInChildren.endColor = EClass.Colors.elementColors["eleHoly"]);
componentInChildren.startColor = startColor;
Point pos = item4.pos.Copy();
TweenUtil.Delay((float)l * 0.1f, delegate
{
effect.Play(center, 0f, pos);
});
int num11 = Dice.Create("SpShutterHex", power, CC, (actRef.refThing != null) ? null : actRef.act).Roll();
item4.DamageHP(num11, 919, power, AttackSource.None, CC, showEffect: false);
}
}
});
}
break;
}
case EffectId.Draw:
public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po
{
break;
}
List<Thing> list8 = TC.things.List(delegate(Thing t)
List<Thing> list9 = TC.things.List(delegate(Thing t)
{
if (!t.isEquipped || t.blessedState == BlessedState.Doomed || t.IsToolbelt)
{
public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po
}
return (t.blessedState < BlessedState.Blessed || EClass.rnd(10) == 0) ? true : false;
});
if (list8.Count == 0)
if (list9.Count == 0)
{
CC.SayNothingHappans();
break;
}
Thing thing6 = list8.RandomItem();
Thing thing6 = list9.RandomItem();
TC.Say("curse_hit", TC, thing6);
thing6.SetBlessedState((thing6.blessedState == BlessedState.Cursed) ? BlessedState.Doomed : BlessedState.Cursed);
LayerInventory.SetDirty(thing6);
public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po
List<Thing> list = new List<Thing>();
TC.things.Foreach(delegate(Thing t)
{
int num11 = 0;
int num13 = 0;
if ((t.isEquipped || t.IsRangedWeapon || blessed) && t.blessedState < BlessedState.Normal)
{
if (t.blessedState == BlessedState.Cursed)
{
num11 = EClass.rnd(200);
num13 = EClass.rnd(200);
}
if (t.blessedState == BlessedState.Doomed)
{
num11 = EClass.rnd(1000);
num13 = EClass.rnd(1000);
}
if (blessed)
{
num11 /= 2;
num13 /= 2;
}
if (id == EffectId.UncurseEQGreater)
{
num11 /= 10;
num13 /= 10;
}
if (power >= num11)
if (power >= num13)
{
TC.Say("uncurseEQ_success", t);
t.SetBlessedState(BlessedState.Normal);
public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po
{
EClass.game.religions.Trickery.Talk("ability");
bool hex = CC.IsHostile(TC);
List<SourceStat.Row> list7 = EClass.sources.stats.rows.Where((SourceStat.Row con) => con.tag.Contains("random") && con.group == (hex ? "Debuff" : "Buff")).ToList();
List<SourceStat.Row> list8 = EClass.sources.stats.rows.Where((SourceStat.Row con) => con.tag.Contains("random") && con.group == (hex ? "Debuff" : "Buff")).ToList();
int power2 = power;
for (int l = 0; l < 4 + EClass.rnd(2); l++)
for (int m = 0; m < 4 + EClass.rnd(2); m++)
{
SourceStat.Row row2 = list7.RandomItem();
list7.Remove(row2);
SourceStat.Row row2 = list8.RandomItem();
list8.Remove(row2);
Proc(hex ? EffectId.DebuffKizuami : EffectId.Buff, CC, TC, power2, new ActRef
{
n1 = row2.alias
public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po
if (TC.HasElement(1211))
{
TC.Say("drinkSaltWater_snail", TC);
int dmg = ((TC.hp > 10) ? (TC.hp - EClass.rnd(10)) : 10000);
TC.DamageHP(dmg, AttackSource.None, CC);
int num12 = ((TC.hp > 10) ? (TC.hp - EClass.rnd(10)) : 10000);
TC.DamageHP(num12, AttackSource.None, CC);
}
else if (TC.IsPC)
{
public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po
{
power /= 4;
}
List<Thing> list6 = TC.things.List((Thing t) => (t.Num <= 1 && t.IsEquipmentOrRanged && !t.IsToolbelt && !t.IsLightsource && t.isEquipped) ? true : false);
if (list6.Count != 0)
List<Thing> list7 = TC.things.List((Thing t) => (t.Num <= 1 && t.IsEquipmentOrRanged && !t.IsToolbelt && !t.IsLightsource && t.isEquipped) ? true : false);
if (list7.Count != 0)
{
Thing thing5 = list6.RandomItem();
Thing thing5 = list7.RandomItem();
TC.Say("acid_hit", TC);
if (thing5.isAcidproof)
{
Affinity
Thing result = CC.AddThing(t.Thing);
EClass.pc.PlaySound("build_resource");
int num = 0;
bool num2 = t.HasTag(CTAG.gift);
bool flag = t.category.IsChildOf(CC.GetFavCat());
bool flag2 = t.id == CC.GetFavFood().id;
bool flag = t.HasTag(CTAG.gift);
if (t.trait is TraitFoodChuryu && CC.IsCat)
{
flag = true;
}
bool flag2 = t.category.IsChildOf(CC.GetFavCat());
bool flag3 = t.id == CC.GetFavFood().id;
if (EClass.debug.alwaysFavFood && t.trait is TraitFood)
{
flag2 = true;
flag3 = true;
}
num = Mathf.Clamp(t.GetPrice() / (flag2 ? 10 : (flag ? 20 : 200)), 0, 50) + (flag2 ? 20 : (flag ? 5 : 0));
num = Mathf.Clamp(t.GetPrice() / (flag3 ? 10 : (flag2 ? 20 : 200)), 0, 50) + (flag3 ? 20 : (flag2 ? 5 : 0));
num = num * (100 + (t.HasElement(757) ? 50 : 0)) / (100 + CC.LV * 10);
if (num2)
if (flag)
{
num += 100;
CC.Say("give_ring", CC);
CC.Talk("thanks3");
}
else if (flag2 || num > 20)
else if (flag3 || num > 20)
{
CC.Talk("thanks3");
}
else if (flag || num > 10)
else if (flag2 || num > 10)
{
CC.Talk("thanks");
}
Card
public virtual int ApplyProtection(int dmg, int mod = 100)
return dmg;
}
public void DamageHP(int dmg, AttackSource attackSource = AttackSource.None, Card origin = null)
public void DamageHP(long dmg, AttackSource attackSource = AttackSource.None, Card origin = null)
{
DamageHP(dmg, 0, 0, attackSource, origin);
}
public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource = AttackSource.None, Card origin = null, bool showEffect = true, Thing weapon = null, Chara originalTarget = null)
public void DamageHP(long dmg, int ele, int eleP = 100, AttackSource attackSource = AttackSource.None, Card origin = null, bool showEffect = true, Thing weapon = null, Chara originalTarget = null)
{
if (hp < 0)
{
public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
{
num3++;
}
dmg = Element.GetResistDamage(dmg, Evalue(e.source.aliasRef), num3);
dmg = Element.GetResistDamage((int)dmg, Evalue(e.source.aliasRef), num3);
dmg = dmg * 100 / (100 + Mathf.Clamp(Evalue(961) * 5, -50, 200));
dmg = dmg * Mathf.Max(100 - Evalue(93), 10) / 100;
}
public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
Chara chara2 = Chara;
if (chara2 != null && chara2.isWet)
{
dmg /= 3;
dmg /= 3L;
}
break;
}
public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
{
dmg = dmg * 100 / (100 + Evalue(435) * 2);
}
dmg = dmg * Mathf.Max(0, 100 - Mathf.Min(Evalue((e == Element.Void || e.id == 926) ? 55 : 56), 100) / ((!flag) ? 1 : 2)) / 100;
dmg = (int)(dmg * Mathf.Max(0, 100 - Mathf.Min(Evalue((e == Element.Void || e.id == 926) ? 55 : 56), 100) / ((!flag) ? 1 : 2)) / 100);
if (origin != null && origin.IsPC && EClass.player.codex.Has(id))
{
dmg = dmg * (100 + Mathf.Min(10, EClass.player.codex.GetOrCreate(id).weakspot)) / 100;
public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
if (dmg >= MaxHP / 10 && Evalue(68) > 0)
{
int num7 = MaxHP / 10;
int num8 = dmg - num7;
long num8 = dmg - num7;
num8 = num8 * 100 / (200 + Evalue(68) * 10);
dmg = num7 + num8;
}
}
if (origin != null && origin.IsPC && EClass.pc.Evalue(654) > 0)
{
dmg = 0;
dmg = 0L;
}
if (dmg < 0)
{
dmg = 0;
dmg = 0L;
}
if (dmg > 99999999)
{
dmg = 99999999L;
}
int num9 = Mathf.Clamp(dmg * 6 / MaxHP, 0, 4) + ((dmg > 0) ? 1 : 0);
float num9 = Mathf.Clamp(dmg * 6 / MaxHP, 0f, 4f) + (float)((dmg > 0) ? 1 : 0);
int num10 = hp;
if (Evalue(1421) > 0)
{
int num11 = 0;
int num12 = dmg;
long num11 = 0L;
long num12 = dmg;
if (hp > 0)
{
num12 = dmg - hp;
hp -= dmg;
hp -= (int)dmg;
num11 += dmg;
if (hp < 0 && Chara.mana.value >= 0)
{
public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
if (Chara.mana.value > 0)
{
num12 -= Chara.mana.value;
Chara.mana.value -= dmg;
Chara.mana.value -= (int)dmg;
num11 += dmg;
}
if (Chara.mana.value <= 0)
{
hp -= num12;
hp -= (int)num12;
num11 += num12;
}
}
public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
}
else
{
hp -= dmg;
hp -= (int)dmg;
}
if (isSynced && dmg != 0)
if (isSynced && dmg != 0L)
{
float ratio = (float)dmg / (float)MaxHP;
Card c = ((parent is Chara) ? (parent as Chara) : this);
public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
c.PlayEffect("blood").SetParticleColor(EClass.Colors.matColors[material.alias].main).Emit(20 + (int)(30f * ratio));
if (EClass.core.config.test.showNumbers || isThing)
{
EClass.scene.damageTextRenderer.Add(this, c, dmg, e);
EClass.scene.damageTextRenderer.Add(this, c, (int)dmg, e);
}
});
}
public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
Chara.AddCondition<ConFractured>((int)Mathf.Max(10f, 30f - Mathf.Sqrt(Evalue(436))));
hp = Mathf.Min(half * (int)Mathf.Sqrt(Evalue(436) * 2) / 100, MaxHP / 3);
});
goto IL_0f1d;
goto IL_0f83;
}
}
if (zoneInstanceBout != null && (bool)LayerDrama.Instance)
public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
if (EClass.player.invlunerable)
{
EvadeDeath(null);
goto IL_0f1d;
goto IL_0f83;
}
}
if (Evalue(1220) > 0 && Chara.stamina.value >= (IsPC ? (Chara.stamina.max / 2) : (Chara.stamina.max / 3 * 2)))
public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
}
}
}
goto IL_0f1d;
IL_0f1d:
goto IL_0f83;
IL_0f83:
if (trait.CanBeAttacked)
{
renderer.PlayAnime(AnimeID.HitObj);
public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
else if (isChara)
{
int num13 = ((attackSource != AttackSource.Condition && attackSource != AttackSource.WeaponEnchant) ? 1 : 2);
if (num9 >= num13)
if (num9 >= (float)num13)
{
if (e != Element.Void)
{
Say("dmg_" + e.source.alias, this);
}
if (e == Element.Void || num9 >= 2)
if (e == Element.Void || num9 >= 2f)
{
Say("dmg" + num9, this);
}
public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
ele2 = 922;
}
Say("reflect_thorne", this, origin);
origin.DamageHP(Mathf.Clamp(dmg / 10, 1, MaxHP / (origin.IsPowerful ? 200 : 20)), ele2, Power, AttackSource.Condition, this);
origin.DamageHP((int)Mathf.Clamp(dmg / 10, 1f, MaxHP / (origin.IsPowerful ? 200 : 20)), ele2, Power, AttackSource.Condition, this);
}
if (HasElement(1223) && num14 <= Evalue(1223))
{
int ele3 = ((Chara.MainElement == Element.Void) ? 923 : Chara.MainElement.id);
Say("reflect_acid", this, origin);
origin.DamageHP(Mathf.Clamp(dmg / 10, 1, MaxHP / (origin.IsPowerful ? 200 : 20)), ele3, Power * 2, AttackSource.Condition, this);
origin.DamageHP((int)Mathf.Clamp(dmg / 10, 1f, MaxHP / (origin.IsPowerful ? 200 : 20)), ele3, Power * 2, AttackSource.Condition, this);
}
}
ProcAbsorb();
public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
}
if (dmg > 0)
{
int a2 = (int)(100L * (long)(dmg * 100 / MaxHP) / 100) + 1;
int a2 = (int)(100 * (dmg * 100 / MaxHP) / 100) + 1;
a2 = Mathf.Min(a2, Chara.isRestrained ? 15 : 200);
if (a2 > 0)
{
public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
{
Chara.AddCondition<ConFear>(100 + EClass.rnd(100));
}
if (Chara.ai.Current.CancelWhenDamaged && attackSource != AttackSource.Hunger && attackSource != AttackSource.Fatigue && (!EClass.core.config.test.dontCancelIfZeroDamage || dmg != 0 || !IsPC))
if (Chara.ai.Current.CancelWhenDamaged && attackSource != AttackSource.Hunger && attackSource != AttackSource.Fatigue && (!EClass.core.config.test.dontCancelIfZeroDamage || dmg != 0L || !IsPC))
{
Chara.ai.Current.TryCancel(origin);
}
int valueOrDefault2 = (origin.Evalue(661) + weapon?.Evalue(661, ignoreGlobalElement: true)).GetValueOrDefault();
if (valueOrDefault > 0 && attackSource == AttackSource.Melee && origin.isChara && !origin.Chara.ignoreSPAbsorb && Chara.IsHostile(origin as Chara))
{
int num17 = EClass.rnd(3 + Mathf.Clamp(dmg / 100, 0, valueOrDefault / 10));
int num17 = EClass.rnd(3 + (int)Mathf.Clamp(dmg / 100, 0f, valueOrDefault / 10));
origin.Chara.stamina.Mod(num17);
if (IsAliveInCurrentZone)
{
}
if (origin.HasElement(1350) && attackSource == AttackSource.Melee)
{
int num18 = EClass.rndHalf(2 + Mathf.Clamp(dmg / 10, 0, origin.Chara.GetPietyValue() + 10));
int num18 = EClass.rndHalf(2 + (int)Mathf.Clamp(dmg / 10, 0f, origin.Chara.GetPietyValue() + 10));
origin.Chara.mana.Mod(num18);
if (IsAliveInCurrentZone)
{
}
if (valueOrDefault2 > 0 && attackSource == AttackSource.Melee)
{
int num19 = EClass.rnd(2 + Mathf.Clamp(dmg / 10, 0, valueOrDefault2 + 10));
int num19 = EClass.rnd(2 + (int)Mathf.Clamp(dmg / 10, 0f, valueOrDefault2 + 10));
origin.Chara.mana.Mod(num19);
if (IsAliveInCurrentZone)
{
Chara
}
}
public bool IsCat
{
get
{
if (!(race.id == "cat") && !(race.id == "catsister"))
{
return race.id == "catgod";
}
return true;
}
}
public int DestDist => tactics.DestDist;
public bool HasNoGoal => ai.IsNoGoal;
public void RestockEquip(bool onCreate)
{
return;
}
bool flag = true;
switch (id)
{
case "kettle":
public void RestockEquip(bool onCreate)
EQ_ID("EtherDagger");
}
break;
case "mech_angel":
if (onCreate)
{
Thing thing = ThingGen.Create("pole_holy");
thing.SetReplica(on: true);
thing.rarity = Rarity.Normal;
thing.elements.SetTo(60, -15);
thing.elements.SetTo(418, -100);
thing.elements.SetTo(93, 50);
AddThing(thing);
body.Equip(thing);
flag = false;
}
break;
}
if (onCreate || !TryEquipRanged())
{
if (id == "mech_scarab")
string text = id;
if (text == "trooper" || text == "mech_scarab")
{
AddThing("gun_laser");
}
public void RestockEquip(bool onCreate)
}
for (int k = 0; k < ((!(race.id == "mutant")) ? 1 : (2 + base.LV / 30)); k++)
{
if (source.ContainsTag("boxer"))
{
EQ_CAT("martial");
}
else if (!job.weapon.IsEmpty())
if (flag)
{
if (race.id == "mutant" || (body.slotMainHand != null && body.slotMainHand.thing == null))
if (source.ContainsTag("boxer"))
{
EQ_CAT(job.weapon.RandomItem());
EQ_CAT("martial");
}
if (race.id == "mutant" || (Evalue(131) > 0 && EClass.rnd(2) == 0))
else if (!job.weapon.IsEmpty())
{
EQ_CAT(job.weapon.RandomItem());
if (race.id == "mutant" || (body.slotMainHand != null && body.slotMainHand.thing == null))
{
EQ_CAT(job.weapon.RandomItem());
}
if (race.id == "mutant" || (Evalue(131) > 0 && EClass.rnd(2) == 0))
{
EQ_CAT(job.weapon.RandomItem());
}
}
}
EQ_CAT("torso");
}
if (hunger.GetPhase() >= 4)
{
DamageHP(9999, AttackSource.Hunger);
DamageHP(9999L, AttackSource.Hunger);
}
hunger.Mod(30);
}
{
bool num2 = EClass._map.FindChara((id == "fairy_raina") ? "fairy_poina" : "fairy_raina") == null;
QuestNasu questNasu = EClass.game.quests.Get<QuestNasu>();
if (num2 && questNasu != null && questNasu.phase == 1)
if (num2 && questNasu != null && questNasu.phase <= 1)
{
if (questNasu.phase == 0)
{
questNasu.NextPhase();
}
num = 5;
flag = (flag2 = true);
EClass.Sound.StopBGM(3f);
public void Cuddle(Chara c, bool headpat = false)
ele = 922;
}
Say("reflect_thorne", c, this);
DamageHP(10, ele, Power, AttackSource.Condition);
DamageHP(10L, ele, Power, AttackSource.Condition);
}
}
CoreDebug
{
if (c.IsHostile(EClass.pc))
{
c.DamageHP(9999999, AttackSource.Finish, EClass.pc);
c.DamageHP(9999999L, AttackSource.Finish, EClass.pc);
}
});
}
{
for (int num = hitPoint.detail.charas.Count - 1; num >= 0; num--)
{
hitPoint.detail.charas[num].DamageHP(9999999, AttackSource.Finish, EClass.pc);
hitPoint.detail.charas[num].DamageHP(9999999L, AttackSource.Finish, EClass.pc);
}
}
EInput.Consume();
Effect
public Effect _Play(Point from, Vector3 fromV, float fixY = 0f, Point to = null,
{
sr.sprite = sprite;
}
if (setColor)
if (setColor && from.IsValid)
{
float num = 0.07f * (float)(int)from.cell.light + EMono.core.screen.tileMap._baseBrightness;
num += ((from.cell.HasRoof || from.cell.isShadowed) ? (-0.2f) : 0f);
GoalCombat
public virtual bool TryUseAbility(int dist, bool beforeMove = false)
{
foreach (Chara member2 in EClass.pc.party.members)
{
float num3 = 100f - (float)(member2.mana.value * 100) / MathF.Max(1f, member2.mana.max);
if (num3 > (float)num)
float num4 = 100f - (float)(member2.mana.value * 100) / MathF.Max(1f, member2.mana.max);
if (num4 > (float)num)
{
num = (int)num3;
num = (int)num4;
}
}
}
public virtual bool TryUseAbility(int dist, bool beforeMove = false)
}
num = 100 - owner.hp * 100 / Mathf.Max(1, owner.MaxHP);
break;
case 9200:
{
int num3 = 0;
foreach (Condition condition in tc.conditions)
{
if (condition.Type == ConditionType.Debuff)
{
num3++;
}
}
num = num3 * 15;
break;
}
}
if (s.target == "Neighbor")
{
{
return 0;
}
float num4 = (float)c.hp / (float)c.MaxHP;
if (num4 > (isHOT ? 0.85f : 0.75f))
float num5 = (float)c.hp / (float)c.MaxHP;
if (num5 > (isHOT ? 0.85f : 0.75f))
{
return 0;
}
int num5 = tactics.P_Heal - (int)((float)tactics.P_Heal * num4) + (isHOT ? 50 : 25);
foreach (Condition condition in c.conditions)
int num6 = tactics.P_Heal - (int)((float)tactics.P_Heal * num5) + (isHOT ? 50 : 25);
foreach (Condition condition2 in c.conditions)
{
if (condition is ConFear)
if (condition2 is ConFear)
{
num5 += 10;
num6 += 10;
}
else if (condition is ConPoison)
else if (condition2 is ConPoison)
{
num5 += 2;
num6 += 2;
}
else if (condition is ConConfuse)
else if (condition2 is ConConfuse)
{
num5 += 4;
num6 += 4;
}
else if (condition is ConDim)
else if (condition2 is ConDim)
{
num5 += 6;
num6 += 6;
}
else if (condition is ConBleed)
else if (condition2 is ConBleed)
{
num5 += 8;
num6 += 8;
}
}
return num5;
return num6;
}
}
abilities.Sort((ItemAbility a, ItemAbility b) => b.priority - a.priority);
{
if (chara2 != owner)
{
int num8 = owner.Dist(chara2);
if (num8 > sightRadius || !owner.CanSeeLos(chara2, num8))
int num9 = owner.Dist(chara2);
if (num9 > sightRadius || !owner.CanSeeLos(chara2, num9))
{
continue;
}
int ForeachChara(ItemAbility a, Func<Chara, int> func, bool isFriendlyAbility)
return func(owner);
}
BuildCharaList();
int num9 = 0;
int num10 = 0;
foreach (Chara chara3 in charas)
{
int num10 = func(chara3);
if (num10 > 0)
int num11 = func(chara3);
if (num11 > 0)
{
if (isFriendlyAbility)
{
int ForeachChara(ItemAbility a, Func<Chara, int> func, bool isFriendlyAbility)
}
if (chara3 != owner)
{
num10 += tactics.P_Party;
num11 += tactics.P_Party;
}
}
else if (!owner.IsHostile(chara3))
{
continue;
}
if (num10 >= num9)
if (num11 >= num10)
{
a.tg = chara3;
num9 = num10;
num10 = num11;
}
}
}
return num9;
return num10;
}
int GetAttackMod(Act a)
{
{
return 0;
}
int num6 = ((a.source.aliasRef == "mold") ? owner.MainElement.id : EClass.sources.elements.alias[a.source.aliasRef].id);
int num7 = -15 * tc.ResistLvFrom(num6);
int num7 = ((a.source.aliasRef == "mold") ? owner.MainElement.id : EClass.sources.elements.alias[a.source.aliasRef].id);
int num8 = -15 * tc.ResistLvFrom(num7);
if (a is ActSword)
{
num7 = 0;
num8 = 0;
}
switch (num6)
switch (num7)
{
case 910:
if (tc.isWet)
{
num7 -= 30;
num8 -= 30;
}
break;
case 911:
if (tc.HasCondition<ConBurning>())
{
num7 -= 30;
num8 -= 30;
}
break;
case 912:
if (tc.isWet)
{
num7 += 30;
num8 += 30;
}
break;
}
return num7;
return num8;
}
void GetNumEnemy(int radius)
{
Map
public void Burn(int x, int z, bool instant = false)
}
else
{
item.DamageHP(30, 910);
item.DamageHP(30L, 910);
}
}
}
Religion
if (c.HasCondition<ConWrath>())
{
recentWrath = this;
c.DamageHP(999999, AttackSource.Wrath);
c.DamageHP(999999L, AttackSource.Wrath);
recentWrath = null;
return;
}
public void PunishTakeOver(Chara c)
if (c.HasCondition<ConWrath>())
{
recentWrath = this;
c.DamageHP(999999, AttackSource.Wrath);
c.DamageHP(999999L, AttackSource.Wrath);
recentWrath = null;
return;
}
SKILL
public const int INT = 80;
public const int LUC = 78;
public const int SPD = 79;
public const int CHA = 77;
public const int gathering = 250;
public const int SPD = 79;
public const int LUC = 78;
public const int blacksmith = 256;
108, 71, 70, 68, 67, 66, 65, 72, 64, 61,
60, 57, 56, 55, 51, 62, 73, 74, 75, 107,
106, 105, 104, 103, 101, 100, 93, 92, 91, 90,
80, 78, 77, 76, 245, 250, 79, 256, 916, 917,
80, 79, 77, 76, 245, 250, 78, 256, 916, 917,
918, 920, 921, 922, 923, 924, 925, 926, 950, 951,
952, 953, 915, 954, 956, 957, 958, 959, 960, 961,
962, 963, 964, 965, 970, 971, 972, 255, 955, 914,
SLOT
public class SLOT
{
public const int tool = 40;
public const int lightsource = 45;
public const int torso = 32;
public const int lightsource = 45;
public const int tool = 40;
public const int back = 33;
public static readonly int[] IDS = new int[16]
{
40, 32, 45, 33, 38, 34, 35, 37, 36, 31,
45, 32, 40, 33, 38, 34, 35, 37, 36, 31,
39, 44, 42, 41, 30, 43
};
}
SPELL
public const int weapon_Sound = 50807;
public const int hand_Mind = 50404;
public const int puddle_Sound = 50907;
public const int sword_Sound = 51007;
public const int ball_Nerve = 50108;
public const int hand_Mind = 50404;
public const int bolt_Nerve = 50308;
public const int hand_Nerve = 50408;
public const int arrow_Sound = 50507;
public const int bolt_Poison = 50305;
public const int ball_Poison = 50105;
public const int hand_Sound = 50407;
public const int arrow_Mind = 50504;
public const int ball_Poison = 50105;
public const int bolt_Poison = 50305;
public const int sword_Mind = 51004;
public const int puddle_Darkness = 50903;
public const int arrow_Fire = 50500;
public const int hand_Fire = 50400;
public const int miasma_Darkness = 50703;
public const int SpMutation = 8380;
public const int weapon_Darkness = 50803;
public const int SpSpeedDown = 8710;
public const int SpTelepathy = 8770;
public const int SpInvisibility = 8775;
public const int hand_Fire = 50400;
public const int arrow_Fire = 50500;
public const int funnel_Fire = 50600;
public const int bolt_Fire = 50300;
public const int SpTelepathy = 8770;
public const int puddle_Void = 50916;
public const int ball_Fire = 50100;
public const int SpDrawBacker = 9503;
public const int SpSeeInvisible = 8776;
public const int SpSummonYeek = 9006;
public const int SpSummonOrc = 9007;
public const int weapon_Darkness = 50803;
public const int SpSummonFish = 9008;
public const int SpSummonOrc = 9007;
public const int SpSummonTako = 9009;
public const int SpSummonTidalWave = 9051;
public const int SpSummonTrooper = 9052;
public const int SpMeteor = 9150;
public const int SpEarthquake = 9151;
public const int SpDrawMetal = 9502;
public const int ball_Fire = 50100;
public const int SpSummonFish = 9008;
public const int sword_Void = 51016;
public static readonly int[] IDS = new int[249]
public static readonly int[] IDS = new int[250]
{
50607, 50707, 50807, 50907, 51007, 50108, 50404, 50308, 50408, 50508,
50607, 50707, 50807, 50404, 50907, 51007, 50108, 50308, 50408, 50508,
50608, 50708, 50304, 50808, 50908, 51008, 50109, 50709, 50309, 50409,
50509, 50609, 50104, 50507, 50305, 50407, 50504, 50105, 51004, 50405,
50509, 50609, 50104, 50507, 50105, 50407, 50504, 50305, 51004, 50405,
50505, 50605, 50705, 50805, 50905, 51005, 50106, 50904, 50804, 50704,
50306, 50406, 50506, 50606, 50706, 50806, 50604, 50906, 51006, 50107,
50307, 50809, 50413, 51009, 50813, 50913, 51013, 50114, 50314, 50414,
50716, 50816, 50415, 50613, 50513, 51003, 50110, 50310, 50410, 50510,
50610, 50710, 50810, 50910, 51010, 50111, 50311, 50411, 50511, 50611,
50711, 50811, 50911, 51011, 50112, 50312, 50412, 50512, 50612, 50712,
50812, 50912, 51012, 50113, 50313, 50909, 50903, 50500, 50703, 8401,
50812, 50912, 51012, 50113, 50313, 50909, 50903, 50400, 50703, 8401,
8402, 8403, 8404, 8405, 8406, 8430, 8450, 8470, 8471, 8480,
8490, 8491, 8500, 8501, 8502, 8503, 8504, 8506, 8507, 8510,
8550, 8555, 8700, 8702, 8704, 8705, 8706, 8707, 8400, 8708,
8390, 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, 8380, 50803, 8710, 8775, 50400, 50600, 50700, 50800, 50900,
8288, 8380, 8710, 8770, 8775, 50500, 50600, 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, 50300, 8770, 50916, 9503, 8776, 8780,
50303, 50403, 50503, 50603, 50300, 50916, 50100, 9503, 8776, 8780,
8790, 8791, 8792, 8800, 8801, 9000, 9001, 9002, 9003, 9004,
9005, 9006, 9007, 9008, 9009, 9010, 9050, 9051, 9150, 9151,
9155, 9156, 9160, 9200, 9500, 9501, 9502, 50100, 51016
9005, 9006, 50803, 9007, 9009, 9010, 9050, 9051, 9052, 9150,
9151, 9155, 9156, 9160, 9200, 9500, 9501, 9502, 9008, 51016
};
}
public class Spell : Ability
TaskCut
public override void OnProgress()
pos.Animate(AnimeID.HitObj);
if (IsToolValid() && EClass.setting.toolConsumeHP)
{
Act.TOOL.DamageHP(1);
Act.TOOL.DamageHP(1L);
}
}
+TraitFoodChuryu
File Created
public class TraitFoodChuryu : TraitFoodPrepared
{
}
TraitRope
public override bool OnUse(Chara c)
Dialog.YesNo("dialog_rope", delegate
{
EClass.player.EndTurn();
EClass.pc.DamageHP(99999, AttackSource.Hang);
EClass.pc.DamageHP(99999L, AttackSource.Hang);
});
return false;
}
TraitRuneMold
public class TraitRuneMold : TraitCrafter
public override bool IsIngredient(string cat, Card c)
{
if (c.rarity > MaxRarity || c.c_isImportant)
if (c.rarity > MaxRarity || c.c_isImportant || c.isReplica)
{
return false;
}