EA 23.190 Nightly
August 30, 2025
15 files modified. 3 new files created.
Important Changes
Possible breaking changes. Click the filename to view the chunk.
ActMelee (1)
public bool Attack(float dmgMulti = 1f, bool maxRoll = false)
public bool Attack(float dmgMulti = 1f) ABILITY
public class ABILITY
{
public const int ActPick = 5047;
public const int ActInstall = 5046;
public const int ActPick = 5047;
public const int ActItem = 5048;
public const int AI_OpenLock = 5049;
public static readonly int[] IDS = new int[125]
{
5047, 5046, 5048, 5049, 5050, 5051, 5052, 5053, 5054, 5055,
5046, 5047, 5048, 5049, 5050, 5051, 5052, 5053, 5054, 5055,
6001, 6003, 6011, 6012, 6013, 5045, 6015, 6019, 6020, 6050,
6400, 6410, 6420, 6450, 6500, 6601, 6602, 6603, 6604, 6610,
6611, 6018, 6612, 5044, 5042, 5012, 5013, 5014, 5015, 5016,ActMelee
public class ActMelee : ActBaseAttack
{
public virtual bool ShouldRollMax => false;
public virtual float BaseDmgMTP => 1f;
public virtual bool UseWeaponDist => true;public override bool Perform()
return result;
}
public bool Attack(float dmgMulti = 1f, bool maxRoll = false)
public bool Attack(float dmgMulti = 1f)
{
Act.CC.combatCount = 10;
Act.CC.LookAt(Act.TC);public bool Attack(float dmgMulti = 1f, bool maxRoll = false)
bool hasHit = false;
bool usedWeapon = false;
bool usedTalisman = false;
bool maxRoll = ShouldRollMax;
int count = 0;
int dist = Act.CC.Dist(Act.TC);
Point orgPos = Act.TC.pos.Copy();
Chara cC = Act.CC;
Card orgTC = Act.TC;
bool safety = Act.CC.HasElement(486) && Act.CC.IsPCFactionOrMinion;
bool parried = false;
foreach (BodySlot slot in Act.CC.body.slots)
{
_Attack(slot);
if (parried)
{
break;
}
}
if (!usedWeapon)
{public bool Attack(float dmgMulti = 1f, bool maxRoll = false)
{
EClass.Wait(0.25f, Act.CC);
}
if (!hasHit)
{
Act.CC.PlaySound("miss");
}
if (EClass.rnd(2) == 0)
{
Act.CC.RemoveCondition<ConInvisibility>();
}
if (parried && orgTC.isChara && orgTC != cC && ACT.Melee.CanPerform(orgTC.Chara, cC))
{
new ActMeleeParry().Perform(orgTC.Chara, cC);
}
else if (!hasHit)
{
Act.CC.PlaySound("miss");
}
return true;
void _Attack(BodySlot slot)
{ }
}
AttackWithFlurry(Act.TC, Act.TP, 1f, subAttack: false);
if (num2 > 0)
if (!parried)
{
foreach (Point item in list2)
if (num2 > 0)
{
if (!item.Equals(orgPos))
foreach (Point item in list2)
{
Chara firstChara = item.FirstChara;
if (firstChara != null && firstChara.IsHostile(Act.CC))
if (!item.Equals(orgPos))
{
AttackWithFlurry(firstChara, item, 1f, subAttack: false);
Chara firstChara = item.FirstChara;
if (firstChara != null && firstChara.IsHostile(Act.CC))
{
AttackWithFlurry(firstChara, item, 1f, subAttack: false);
}
}
}
}
}
else if (scatter > 0)
{
Act.TP.ForeachNeighbor(delegate(Point p)
else if (scatter > 0)
{
if (!p.Equals(orgPos))
Act.TP.ForeachNeighbor(delegate(Point p)
{
Chara firstChara2 = p.FirstChara;
if (firstChara2 != null && firstChara2.IsHostile(Act.CC))
if (!p.Equals(orgPos))
{
AttackWithFlurry(firstChara2, p, Mathf.Min(0.5f + 0.05f * Mathf.Sqrt(scatter), 1f + 0.01f * Mathf.Sqrt(scatter)), subAttack: true);
Chara firstChara2 = p.FirstChara;
if (firstChara2 != null && firstChara2.IsHostile(Act.CC))
{
AttackWithFlurry(firstChara2, p, Mathf.Min(0.5f + 0.05f * Mathf.Sqrt(scatter), 1f + 0.01f * Mathf.Sqrt(scatter)), subAttack: true);
}
}
}
});
}
else if (num3 > 0)
{
List<Point> list = new List<Point>();
Act.TP.ForeachNeighbor(delegate(Point p)
{
if (!p.Equals(Act.TP))
{
list.Add(p.Copy());
}
});
list.Shuffle();
int num4 = 0;
for (int i = 0; i < 9 && num3 > EClass.rnd(10 + (int)Mathf.Pow(3f, i + 2)); i++)
{
num4++;
});
}
foreach (Point item2 in list)
else if (num3 > 0)
{
foreach (Card item3 in item2.ListCards().Copy())
List<Point> list = new List<Point>();
Act.TP.ForeachNeighbor(delegate(Point p)
{
if (num4 <= 0 || !Act.CC.IsAliveInCurrentZone)
if (!p.Equals(Act.TP))
{
break;
list.Add(p.Copy());
}
if (item3.trait.CanBeAttacked || (item3.isChara && item3.Chara.IsHostile(Act.CC)))
});
list.Shuffle();
int num4 = 0;
for (int i = 0; i < 9 && num3 > EClass.rnd(10 + (int)Mathf.Pow(3f, i + 2)); i++)
{
num4++;
}
foreach (Point item2 in list)
{
foreach (Card item3 in item2.ListCards().Copy())
{
AttackWithFlurry(item3, item2, 1f, subAttack: true);
num4--;
if (num4 <= 0 || !Act.CC.IsAliveInCurrentZone)
{
break;
}
if (item3.trait.CanBeAttacked || (item3.isChara && item3.Chara.IsHostile(Act.CC)))
{
AttackWithFlurry(item3, item2, 1f, subAttack: true);
if (parried)
{
break;
}
num4--;
}
}
}
}void AttackWithFlurry(Card _tc, Point _tp, float mtp, bool subAttack)
{
break;
}
if (!_tc.IsDisabled && _tc.Evalue(437) > 0 && EClass.rnd(100) < EClass.curve(5 + _tc.Evalue(437) / 3, 10, 3, 70))
{
_tc.Say("parry");
_tc.PlaySound("parry");
parried = true;
break;
}
if (m > 0)
{
Act.CC.Say("attack_flurry");+ActMeleeParry
File Created
public class ActMeleeParry : ActMelee
{
public override bool ShouldRollMax => true;
public override float BaseDmgMTP => 1.5f;
}ActRush
public class ActRush : ActMelee
{
public override bool ShowMapHighlight => true;
public override bool ShouldRollMax => true;
public override int PerformDistance => 6;
public override void OnMarkMapHighlights()public override bool Perform()
Act.CC.Say("rush", Act.CC, Act.TC);
Act.CC.PlaySound("rush");
Act.CC.pos.PlayEffect("vanish");
return Attack(1f + 0.1f * (float)num, maxRoll: true);
return Attack(1f + 0.1f * (float)num);
}
}AttackProcess
public int GetRawDamage(float dmgMulti, bool crit, bool maxRoll)
return Mathf.Clamp(num, 0, 9999999);
}
public static void ProcAbility(List<Element> list, Chara CC, Card TC, int bonus, bool subAttack = false)
{
if (list == null)
{
return;
}
foreach (Element item in list)
{
ProcAbility(item, CC, TC, bonus, subAttack);
}
}
public static void ProcAbility(Element e, Chara CC, Card TC, int bonus, bool subAttack = false)
{
if (!(e is Ability))
{
return;
}
int num = 10 + e.Value / 5;
int power = EClass.curve((100 + e.Value * 10) * (100 + bonus) / 100, 400, 100);
if (num <= EClass.rnd(100))
{
return;
}
Act obj = e as Act;
Card card = (obj.TargetType.CanSelectSelf ? CC : TC);
string text = ((e.source.proc.Length >= 2) ? e.source.proc[1] : "");
string text2 = obj.source.abilityType.TryGet(0);
switch (text2)
{
case "buff":
if (CC.HasCondition(text))
{
return;
}
card = CC;
break;
case "debuff":
case "attack":
case "dot":
card = TC;
break;
}
if (subAttack)
{
if (card == CC)
{
return;
}
switch (text2)
{
case "summon":
return;
case "teleport":
return;
case "suicide":
return;
}
}
if (card.IsAliveInCurrentZone)
{
Card tC = Act.TC;
ActEffect.ProcAt(e.source.proc[0].ToEnum<EffectId>(), power, BlessedState.Normal, CC, card, card.pos, isNeg: false, new ActRef
{
n1 = text,
aliasEle = e.source.aliasRef,
noFriendlyFire = true
});
Act.TC = tC;
}
}
public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll = false, bool subAttack = false)
{
bool flag = CC.HasCondition<ConReload>();public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =
{
num /= 2;
}
List<Element> list2 = new List<Element>();
List<Element> list = new List<Element>();
int num2 = CC.Evalue(91);
int num3 = 0;
if (weapon != null)
{
list2 = weapon.elements.dict.Values.ToList();
list = weapon.elements.dict.Values.ToList();
if (ammo != null && !flag)
{
list2 = list2.Concat(ammo.elements.dict.Values).ToList();
list = list.Concat(ammo.elements.dict.Values).ToList();
}
num2 += weapon.Evalue(91, ignoreGlobalElement: true);
num3 += weapon.Evalue(603, ignoreGlobalElement: true);public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =
string id = CC.id;
if (id == "rabbit_vopal" || id == "mantis_killer")
{
list2.Add(Element.Create(6650, 100));
list.Add(Element.Create(6650, 100));
}
}
int bane;public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =
{
if (value.Value > 0)
{
list2.Add(value);
list.Add(value);
}
}
}public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =
ModExpDef(150, 90);
ModExpDef(151, 90);
}
Proc(list2);
ProcAbility(list, CC, TC, weaponSkill.Value, subAttack);
return false;
}
if (TC.IsPC)public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =
TC.Chara.AddCondition<ConParalyze>(30 + EClass.rnd(30));
TC.Chara.AddCondition<ConGravity>();
}
if (list2.Count > 0 && !flag2)
if (list.Count > 0 && !flag2)
{
foreach (Element item in list2)
foreach (Element item in list)
{
if (!TC.IsAliveInCurrentZone)
{public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =
}
}
}
Proc(list2);
ProcAbility(list, CC, TC, weaponSkill.Value, subAttack);
}
if (!CC.IsAliveInCurrentZone || !TC.IsAliveInCurrentZone)
{ }
CC.PlaySound(id2);
}
void Proc(List<Element> list)
{
if (list == null)
{
return;
}
foreach (Element item2 in list)
{
if (item2 is Ability)
{
int num12 = 10 + item2.Value / 5;
int power = EClass.curve((100 + item2.Value * 10) * (100 + weaponSkill.Value) / 100, 400, 100);
if (num12 > EClass.rnd(100))
{
Act obj = item2 as Act;
Card card = (obj.TargetType.CanSelectSelf ? CC : TC);
string text = ((item2.source.proc.Length >= 2) ? item2.source.proc[1] : "");
string text2 = obj.source.abilityType.TryGet(0);
switch (text2)
{
case "buff":
if (CC.HasCondition(text))
{
continue;
}
card = CC;
break;
case "debuff":
case "attack":
case "dot":
card = TC;
break;
}
if (subAttack)
{
if (card == CC)
{
continue;
}
switch (text2)
{
case "attackArea":
case "summon":
case "teleport":
case "suicide":
continue;
}
}
if (card.IsAliveInCurrentZone)
{
Card tC = TC;
ActEffect.ProcAt(item2.source.proc[0].ToEnum<EffectId>(), power, BlessedState.Normal, CC, card, card.pos, isNeg: false, new ActRef
{
n1 = text,
aliasEle = item2.source.aliasRef,
noFriendlyFire = true
});
TC = tC;
}
}
}
}
}
}
private bool Crit()Card
{
if (Evalue(1644) < i + 1)
{
Chara.SetFeat(1644, i + 1);
Chara.SetFeat(1644, i + 1, msg: true);
}
}
}public bool CanAddRune(TraitMod mod)
{
switch (encSlot)
{
case "shield":
if (!category.IsChildOf("shield"))
{
return false;
}
break;
default:
{
bool flag = false;public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
return;
}
bool flag = originalTarget != null;
if (isChara && !HasElement(1241))
if (isChara && !HasElement(1241) && !flag)
{
AttackSource attackSource2 = attackSource;
if ((uint)(attackSource2 - 3) > 1u && (uint)(attackSource2 - 13) > 4u)
{
foreach (Chara chara3 in EClass._map.charas)
{
int num = chara3.Evalue(1241);
if (num != 0 && !chara3.IsDisabled && !chara3.isRestrained && !chara3.IsDeadOrSleeping && chara3 != this && !chara3.IsHostile(Chara) && (!IsPCFactionOrMinion || chara3.IsPCFactionOrMinion) && chara3.Dist(this) <= num)
if (chara3 != this && !chara3.IsHostile(Chara))
{
Say("wall_flesh", chara3, this);
chara3.DamageHP(dmg, ele, eleP, attackSource, origin, showEffect, weapon, Chara);
return;
int num = chara3.Evalue(1241);
int num2 = chara3.Evalue(438);
if ((num != 0 || num2 != 0) && !chara3.IsDisabled && !chara3.isRestrained && (!IsPCFactionOrMinion || chara3.IsPCFactionOrMinion) && chara3.Dist(this) <= Mathf.Max(num, (num2 > 0) ? 1 : 0) && (num2 <= 0 || hp * 100 / MaxHP <= chara3.hp * 100 / chara3.MaxHP))
{
Say((num2 == 0) ? "wall_flesh" : "wall_knightly", chara3, this);
chara3.DamageHP(dmg, ele, eleP, attackSource, origin, showEffect, weapon, Chara);
return;
}
}
}
}public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
}
if (!e.source.aliasRef.IsEmpty() && attackSource != AttackSource.ManaBackfire)
{
int num2 = ((origin != null) ? origin.Evalue(1238) : 0);
int num3 = ((origin != null) ? origin.Evalue(1238) : 0);
if (attackSource == AttackSource.MagicSword)
{
num2 += 2;
num3 += 2;
}
dmg = Element.GetResistDamage(dmg, Evalue(e.source.aliasRef), num2);
dmg = Element.GetResistDamage(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
}
if (EClass.game.principal.enableDamageReduction && IsPCFaction)
{
int num3 = ((origin != null) ? origin.LV : EClass._zone.DangerLv);
if (num3 > 50)
int num4 = ((origin != null) ? origin.LV : EClass._zone.DangerLv);
if (num4 > 50)
{
dmg = dmg * (100 - (int)Mathf.Min(95f, Mathf.Sqrt(num3 - 50))) / 100;
dmg = dmg * (100 - (int)Mathf.Min(95f, Mathf.Sqrt(num4 - 50))) / 100;
}
}
if (attackSource == AttackSource.Throw || attackSource == AttackSource.Range)
{
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;
if (origin != null && origin.IsPC && EClass.player.codex.Has(id))
{public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
}
if (EClass.pc.HasElement(1207) && isChara)
{
int num4 = 0;
int num5 = 0;
int num6 = 0;
foreach (Condition condition2 in Chara.conditions)
{
if (condition2.Type == ConditionType.Buff)
{
num4++;
num5++;
}
else if (condition2.Type == ConditionType.Debuff)
{
num5++;
num6++;
}
}
if (IsPCParty)
{
dmg = dmg * 100 / Mathf.Min(100 + num4 * 5, 120);
dmg = dmg * 100 / Mathf.Min(100 + num5 * 5, 120);
}
else
{
dmg = dmg * Mathf.Min(100 + num5 * 5, 120) / 100;
dmg = dmg * Mathf.Min(100 + num6 * 5, 120) / 100;
}
}
if (IsPCParty && EClass.pc.ai is GoalAutoCombat)public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
}
if (dmg >= MaxHP / 10 && Evalue(68) > 0)
{
int num6 = MaxHP / 10;
int num7 = dmg - num6;
num7 = num7 * 100 / (200 + Evalue(68) * 10);
dmg = num6 + num7;
int num7 = MaxHP / 10;
int num8 = dmg - num7;
num8 = num8 * 100 / (200 + Evalue(68) * 10);
dmg = num7 + num8;
}
}
if (origin != null && origin.IsPC && EClass.pc.Evalue(654) > 0)public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
{
dmg = 0;
}
int num8 = Mathf.Clamp(dmg * 6 / MaxHP, 0, 4) + ((dmg > 0) ? 1 : 0);
int num9 = Mathf.Clamp(dmg * 6 / MaxHP, 0, 4) + ((dmg > 0) ? 1 : 0);
int num10 = hp;
if (Evalue(1421) > 0)
{
int num9 = 0;
int num10 = dmg;
int num11 = 0;
int num12 = dmg;
if (hp > 0)
{
num10 = dmg - hp;
num12 = dmg - hp;
hp -= dmg;
num9 += dmg;
num11 += dmg;
if (hp < 0 && Chara.mana.value >= 0)
{
num9 += hp;
num11 += hp;
hp = 0;
}
}public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
{
if (Evalue(1421) >= 2)
{
num10 /= 2;
num12 /= 2;
}
dmg = num10;
dmg = num12;
if (Chara.mana.value > 0)
{
num10 -= Chara.mana.value;
num12 -= Chara.mana.value;
Chara.mana.value -= dmg;
num9 += dmg;
num11 += dmg;
}
if (Chara.mana.value <= 0)
{
hp -= num10;
num9 += num10;
hp -= num12;
num11 += num12;
}
}
dmg = num9;
dmg = num11;
}
else
{public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
}
ZoneInstanceBout zoneInstanceBout = EClass._zone.instance as ZoneInstanceBout;
bool flag2 = false;
bool flag3 = false;
if (hp < 0 && Religion.recentWrath == null)
{
if (isRestrained && IsPCFaction && EClass._zone.IsPCFaction && (!IsPC || (Chara.ai is AI_Torture && Chara.ai.IsRunning)))public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
EvadeDeath();
flag2 = true;
}
else if (zoneInstanceBout != null && (bool)LayerDrama.Instance)
{
EvadeDeath();
}
else if (LayerDrama.IsActive() && IsPC)
{
EvadeDeath();
}
else
{
if (attackSource != AttackSource.Finish && IsPCParty && Chara.host == null)
if (origin != null && origin != this && Evalue(436) > 0)
{
if (EClass.pc.ai is GoalAutoCombat && !EClass.player.invlunerable && (EClass.pc.ai as GoalAutoCombat).listHealthy.Contains(Chara))
{
EClass.core.actionsNextFrame.Add(delegate
{
Msg.Say(IsPC ? "abort_damage" : "abort_damgeAlly");
});
EClass.player.invlunerable = true;
EClass.player.TryAbortAutoCombat();
EClass.pc.stamina.Mod(-EClass.pc.stamina.max / 5);
}
if (EClass.player.invlunerable)
int num13 = (HasElement(1218) ? MaxHP : (MaxHP / 2));
if (num10 > num13)
{
EvadeDeath();
goto IL_0d0e;
flag3 = true;
hp = Mathf.Min(num13 * (int)Mathf.Sqrt(Evalue(436) * 2) / 100, MaxHP / 3);
goto IL_0e2d;
}
}
if (IsPC && Evalue(1220) > 0 && Chara.stamina.value >= Chara.stamina.max / 2)
if (zoneInstanceBout != null && (bool)LayerDrama.Instance)
{
Chara.stamina.Mod(-Chara.stamina.max / 2);
Chara.AddCondition<ConInvulnerable>();
EvadeDeath();
}
else if (LayerDrama.IsActive() && IsPC)
{
EvadeDeath();
}
else
{
if (attackSource != AttackSource.Finish && IsPCParty && Chara.host == null)
{
if (EClass.pc.ai is GoalAutoCombat && !EClass.player.invlunerable && (EClass.pc.ai as GoalAutoCombat).listHealthy.Contains(Chara))
{
EClass.core.actionsNextFrame.Add(delegate
{
Msg.Say(IsPC ? "abort_damage" : "abort_damgeAlly");
});
EClass.player.invlunerable = true;
EClass.player.TryAbortAutoCombat();
EClass.pc.stamina.Mod(-EClass.pc.stamina.max / 5);
}
if (EClass.player.invlunerable)
{
EvadeDeath();
goto IL_0e2d;
}
}
if (IsPC && Evalue(1220) > 0 && Chara.stamina.value >= Chara.stamina.max / 2)
{
Chara.stamina.Mod(-Chara.stamina.max / 2);
Chara.AddCondition<ConInvulnerable>();
EvadeDeath();
}
}
}
}
}
goto IL_0d0e;
IL_0d0e:
goto IL_0e2d;
IL_0e2d:
if (trait.CanBeAttacked)
{
renderer.PlayAnime(AnimeID.HitObj);public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
}
else if ((attackSource == AttackSource.Melee || attackSource == AttackSource.Range) && origin != null && originalTarget == null)
{
(IsPC ? EClass.pc : origin).Say("dmgMelee" + num8 + (IsPC ? "pc" : ""), origin, this);
(IsPC ? EClass.pc : origin).Say("dmgMelee" + num9 + (IsPC ? "pc" : ""), origin, this);
}
else if (isChara)
{
int num11 = ((attackSource != AttackSource.Condition && attackSource != AttackSource.WeaponEnchant) ? 1 : 2);
if (num8 >= num11)
int num14 = ((attackSource != AttackSource.Condition && attackSource != AttackSource.WeaponEnchant) ? 1 : 2);
if (num9 >= num14)
{
if (e != Element.Void)
{
Say("dmg_" + e.source.alias, this);
}
if (e == Element.Void || num8 >= 2)
if (e == Element.Void || num9 >= 2)
{
Say("dmg" + num8, this);
Say("dmg" + num9, this);
}
}
}
if (flag3)
{
Say("guts", this);
}
if (isChara)
{
if (flag2)public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
}
if (attackSource == AttackSource.Melee || attackSource == AttackSource.Range)
{
int num12 = origin.Dist(this);
if (attackSource == AttackSource.Melee && HasElement(1221) && num12 <= Evalue(1221))
int num15 = origin.Dist(this);
if (attackSource == AttackSource.Melee && HasElement(1221) && num15 <= Evalue(1221))
{
int ele2 = ((Chara.MainElement == Element.Void) ? 924 : Chara.MainElement.id);
if (id == "hedgehog_ether")public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
Say("reflect_thorne", this, origin);
origin.DamageHP(Mathf.Clamp(dmg / 10, 1, MaxHP / (origin.IsPowerful ? 200 : 20)), ele2, Power, AttackSource.Condition, this);
}
if (HasElement(1223) && num12 <= Evalue(1223))
if (HasElement(1223) && num15 <= Evalue(1223))
{
int ele3 = ((Chara.MainElement == Element.Void) ? 923 : Chara.MainElement.id);
Say("reflect_acid", this, origin);public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
}
}
}
int num13 = ((EClass.rnd(2) == 0) ? 1 : 0);
int num16 = ((EClass.rnd(2) == 0) ? 1 : 0);
if (attackSource == AttackSource.Condition)
{
num13 = 1 + EClass.rnd(2);
num16 = 1 + EClass.rnd(2);
}
if (num13 > 0)
if (num16 > 0)
{
bool flag3 = Chara.HasCondition<ConPoison>() || ((e.id == 915 || e.id == 923) && ResistLv(Evalue(955)) < 4);
AddBlood(num13, flag3 ? 6 : (-1));
bool flag4 = Chara.HasCondition<ConPoison>() || ((e.id == 915 || e.id == 923) && ResistLv(Evalue(955)) < 4);
AddBlood(num16, flag4 ? 6 : (-1));
}
bool flag4 = true;
bool flag5 = true;
switch (e.id)
{
case 910:public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
}
break;
case 918:
flag4 = false;
flag5 = false;
if (Chance(30 + eleP / 5, 100))
{
Chara.AddCondition<ConParalyze>(eleP);
}
break;
case 914:
flag4 = false;
flag5 = false;
if (EClass.rnd(3) != 0)
{
if (Chance(30 + eleP / 5, 100))public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
}
break;
case 920:
flag4 = false;
flag5 = false;
if (Chance(5 + eleP / 25, 40))
{
Chara.AddCondition<ConBlind>(eleP / 2);public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
Chara.AddCondition<ConGravity>(2000);
Condition.ignoreEffect = false;
}
if (Chara.conSleep != null && flag4)
if (Chara.conSleep != null && flag5)
{
Chara.conSleep.Kill();
}
if (IsPC)
{
float num14 = (float)hp / (float)MaxHP;
float num17 = (float)hp / (float)MaxHP;
if (Evalue(1421) > 0)
{
num14 = (float)Chara.mana.value / (float)Chara.mana.max;
num17 = (float)Chara.mana.value / (float)Chara.mana.max;
}
if (num14 < 0.3f)
if (num17 < 0.3f)
{
PlaySound("heartbeat", 1f - num14 * 2f);
PlaySound("heartbeat", 1f - num17 * 2f);
}
}
if (!IsPC && hp < MaxHP / 5 && Evalue(423) <= 0 && dmg * 100 / MaxHP + 10 > EClass.rnd(IsPowerful ? 400 : 150) && !HasCondition<ConFear>())public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource
{
ActEffect.Proc(EffectId.Duplicate, this);
}
if (origin != null)
{
foreach (BodySlot slot in Chara.body.slots)
{
if (slot.elementId == 35 && slot.thing != null && slot.thing.category.IsChildOf("shield"))
{
AttackProcess.ProcAbility(slot.thing.elements.dict.Values.ToList(), Chara, origin, Evalue(123));
}
}
}
if (hp < MaxHP / 3 && HasElement(1409) && !Chara.HasCooldown(1409))
{
Chara.AddCooldown(1409); 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 num15 = EClass.rnd(3 + Mathf.Clamp(dmg / 100, 0, valueOrDefault / 10));
origin.Chara.stamina.Mod(num15);
int num18 = EClass.rnd(3 + Mathf.Clamp(dmg / 100, 0, valueOrDefault / 10));
origin.Chara.stamina.Mod(num18);
if (IsAliveInCurrentZone)
{
Chara.stamina.Mod(-num15);
Chara.stamina.Mod(-num18);
}
}
if (origin.HasElement(1350) && attackSource == AttackSource.Melee)
{
int num16 = EClass.rndHalf(2 + Mathf.Clamp(dmg / 10, 0, origin.Chara.GetPietyValue() + 10));
origin.Chara.mana.Mod(num16);
int num19 = EClass.rndHalf(2 + Mathf.Clamp(dmg / 10, 0, origin.Chara.GetPietyValue() + 10));
origin.Chara.mana.Mod(num19);
if (IsAliveInCurrentZone)
{
Chara.mana.Mod(-num16);
Chara.mana.Mod(-num19);
}
}
if (valueOrDefault2 > 0 && attackSource == AttackSource.Melee)
{
int num17 = EClass.rnd(2 + Mathf.Clamp(dmg / 10, 0, valueOrDefault2 + 10));
origin.Chara.mana.Mod(num17);
int num20 = EClass.rnd(2 + Mathf.Clamp(dmg / 10, 0, valueOrDefault2 + 10));
origin.Chara.mana.Mod(num20);
if (IsAliveInCurrentZone)
{
Chara.mana.Mod(-num17);
Chara.mana.Mod(-num20);
}
}
}public static string ApplyTone(Chara c, ref string text, string _tones, int gend
string key = array[0];
string text2 = "";
MOD.tones.Initialize();
Debug.Log(c.Name);
if (!Lang.setting.useTone || MOD.tones.list.Count == 0)
{
text2 = text.Replace("{", "").Replace("}", "");Chara
public void RestockEquip(bool onCreate)
if (trait is TraitBard)
{
AddThing(ThingGen.Create("lute"));
if (EClass.debug.enable || EClass.rnd(50) == 0)
if (EClass.debug.enable || EClass.rnd(100) == 0)
{
EQ_ID("shield_lute");
}public int CalcCastingChance(Element e, int num = 1)
}
if (attackStyle == AttackStyle.Shield)
{
num4 += 5;
num5 += 10 - Evalue(1654) * 4;
num4 += 10;
num5 += 20 - Evalue(1654) * 8;
}
if (isConfused)
{CoreDebug
{
thing.AddCard(thing2);
}
thing2 = ThingGen.CreateFromCategory("armor", EClass.pc.LV);
thing2 = ThingGen.CreateFromCategory("armor", EClass.pc.LV + 100);
thing2.elements.SetBase(653, 1);
thing.AddCard(thing2);
}DOMAIN
public const int domHarmony = 815;
public const int domElement = 806;
public const int domComm = 805;
public const int domElement = 806;
public const int domHealing = 811;
public const int domSurvival = 801;
public static readonly int[] IDS = new int[16]
{
812, 813, 810, 809, 808, 814, 802, 807, 815, 806,
805, 811, 801, 803, 804, 800
812, 813, 810, 809, 808, 814, 802, 807, 815, 805,
806, 811, 801, 803, 804, 800
};
}
public class Domain : EClassELEMENT
public const int _void = 0;
public const int d = 3;
public const int quality = 2;
public const int lv = 1;
public const int quality = 2;
public const int d = 3;
public const int socket = 5;
public const int hardness = 13;
public const int growth = 14;
public const int water = 15;
public const int heat = 16;
public const int taste = 18;
public const int water = 15;
public const int growth = 14;
public const int fire = 21; public static readonly int[] IDS = new int[35]
{
763, 761, 751, 752, 753, 754, 755, 756, 759, 760,
762, 750, 0, 3, 1, 2, 5, 10, 11, 12,
13, 14, 16, 17, 18, 15, 21, 22, 23, 24,
762, 750, 0, 2, 1, 3, 5, 10, 11, 12,
13, 15, 16, 17, 18, 14, 21, 22, 23, 24,
25, 26, 29, 85, 20
};
}public void AddEncNote(UINote n, Card Card, ElementContainer.NoteMode mode = Ele
bool flag3 = (source.tag.Contains("neg") ? (Value > 0) : (Value < 0));
int num = Mathf.Abs(Value);
bool flag4 = Card?.ShowFoodEnc ?? false;
bool flag5 = Card != null && Card.IsWeapon && this is Ability;
bool flag5 = Card != null && this is Ability && (Card.IsWeapon || Card.category.slot == 35);
if (IsTrait || (flag4 && IsFoodTrait))
{
string[] textArray = source.GetTextArray("textAlt");ENC
public class ENC
{
public const int living = 653;
public const int eco = 652;
public const int r_PV = 651;
public const int r_mana = 641;
public const int mod_frustration = 624;
public const int r_life = 640;
public const int mod_flurry = 621;
public const int mod_chaser = 620;
public const int mod_feint = 623;
public const int mod_talisman = 609;
public const int mod_cleave = 622;
public const int mod_feint = 623;
public const int mod_flurry = 621;
public const int noDamage = 654;
public const int living = 653;
public const int r_life = 640;
public const int mod_frustration = 624;
public const int onlyPet = 655;
public const int noDamage = 654;
public const int convertCold = 851;
public const int permaCurse = 656;
public const int absorbHP = 660;
public const int absorbMP = 661;
public const int convertFire = 850;
public const int mod_chaser = 620;
public const int mod_splash = 608;
public const int convertImpact = 865;
public const int convertLightning = 852;
public const int permaCurse = 656;
public const int onlyPet = 655;
public const int mod_talisman = 609;
public const int mod_scatter = 607;
public const int negateSleep = 424;
public const int negateSteal = 426;
public const int mod_scatter = 607;
public const int mod_precision = 605;
public const int defense_range = 435;
public const int negateShockwave = 430;
public const int negateNeckHunt = 427;
public const int negateSteal = 426;
public const int negateConfusion = 425;
public const int negateSleep = 424;
public const int negateFear = 423;
public const int negateParalysis = 422;
public const int loving = 417;
public const int seeInvisible = 416;
public const int guts = 436;
public const int invisibility = 415;
public const int seeInvisible = 416;
public const int encHit = 414;
public const int corruption = 409;
public const int resWeather = 408;
public const int mod_drill = 606;
public const int mod_splash = 608;
public const int travelSpeed = 407;
public const int resMutation = 406;
public const int negateTeleport = 400;
public const int sustain_STR = 440;
public const int invisibility = 415;
public const int sustain_END = 441;
public const int parry = 437;
public const int travelSpeed = 407;
public const int resWeather = 408;
public const int sustain_PER = 443;
public const int sustain_STR = 440;
public const int strongStomach = 480;
public const int revealFaith = 481;
public const int force_weapon = 482;
public const int nonLethal = 485;
public const int safetyMeasure = 486;
public const int creativeChef = 487;
public const int bane_all = 468;
public const int revealFaith = 481;
public const int safetyMeasure = 486;
public const int deathagony = 488;
public const int mod_ammo = 600;
public const int mod_reload = 601;
public const int mod_rapid = 602;
public const int mod_ammo_knockback = 603;
public const int mod_ammo_recover = 604;
public const int mod_precision = 605;
public const int knightly = 438;
public const int mod_drill = 606;
public const int creativeChef = 487;
public const int sustain_DEX = 442;
public const int bane_fish = 467;
public const int mod_ammo = 600;
public const int deathagony = 488;
public const int strongStomach = 480;
public const int bane_machine = 465;
public const int mod_rapid = 602;
public const int bane_god = 466;
public const int bane_fish = 467;
public const int sustain_DEX = 442;
public const int bane_all = 468;
public const int sustain_PER = 443;
public const int sustain_WIL = 445;
public const int sustain_LER = 444;
public const int sustain_END = 441;
public const int sustain_MAG = 446;
public const int sustain_LER = 444;
public const int sustain_CHA = 447;
public const int sustain_figure = 450;
public const int sustain_WIL = 445;
public const int bane_dragon = 460;
public const int bane_undead = 461;
public const int sustain_CHA = 447;
public const int bane_fairy = 462;
public const int bane_animal = 463;
public const int bane_man = 464;
public const int bane_machine = 465;
public const int sustain_figure = 450;
public const int bane_god = 466;
public const int bane_man = 464;
public static readonly int[] IDS = new int[92]
public static readonly int[] IDS = new int[96]
{
653, 652, 651, 650, 641, 624, 621, 622, 623, 654,
640, 655, 851, 660, 661, 662, 663, 664, 665, 666,
850, 620, 865, 852, 656, 609, 424, 607, 430, 429,
428, 427, 426, 425, 423, 422, 421, 420, 419, 418,
417, 416, 415, 414, 412, 411, 410, 409, 408, 608,
406, 405, 404, 403, 402, 401, 400, 440, 441, 407,
443, 482, 483, 484, 485, 486, 487, 481, 488, 601,
603, 604, 605, 606, 442, 600, 480, 602, 467, 468,
445, 446, 444, 450, 460, 461, 447, 462, 463, 464,
465, 466
652, 651, 650, 641, 640, 620, 623, 609, 622, 621,
653, 624, 654, 851, 656, 660, 661, 662, 663, 664,
665, 666, 850, 608, 865, 852, 655, 607, 426, 605,
435, 430, 429, 428, 427, 425, 424, 423, 422, 421,
420, 419, 418, 417, 436, 416, 414, 412, 411, 410,
409, 606, 407, 406, 405, 404, 403, 402, 401, 400,
415, 437, 408, 440, 480, 481, 482, 483, 484, 485,
468, 486, 600, 601, 602, 603, 604, 438, 487, 467,
488, 465, 466, 442, 443, 444, 441, 446, 447, 445,
460, 461, 462, 463, 450, 464
};
}FACTION
public class FACTION
{
public const int bfFertile = 3700;
public const int bfRuin = 3702;
public const int bfGeyser = 3701;
public const int bfUndersea = 3606;
public const int bfPlain = 3600;
public const int bfSea = 3605;
public const int bfForest = 3601;
public const int bfBeach = 3604;
public const int bfSnow = 3602;
public const int bfHill = 3603;
public const int bfSnow = 3602;
public const int bfSea = 3605;
public const int bfForest = 3601;
public const int bfUndersea = 3606;
public const int bfPlain = 3600;
public const int bfRuin = 3702;
public const int bfGeyser = 3701;
public const int bfFertile = 3700;
public const int bfBeach = 3604;
public const int bfCave = 3500;
public const int fPromo = 2202;
public const int fElec = 2201;
public const int fAttraction = 2206;
public const int fMoral = 2203;
public const int fElec = 2201;
public const int fPromo = 2202;
public const int fSoil = 2200;
public const int fHeirloom = 2120;
public const int fLuck = 2118;
public const int fTaxEvasion = 2119;
public const int bfTranquil = 3703;
public const int fEducation = 2116;
public const int fLoyal = 2117;
public const int fLuck = 2118;
public const int fRation = 2207;
public const int fConstruction = 2003;
public const int fTaxEvasion = 2119;
public const int fLoyal = 2117;
public static readonly int[] IDS = new int[53]
{
3700, 3702, 3606, 3605, 3604, 3603, 3602, 3601, 3600, 3701,
3500, 2202, 2206, 2205, 2204, 2203, 2201, 2200, 2120, 2118,
3703, 2116, 2117, 2207, 3704, 3804, 3706, 2115, 4006, 4005,
3701, 3600, 3601, 3602, 3603, 3605, 3606, 3702, 3700, 3604,
3500, 2201, 2206, 2205, 2204, 2203, 2202, 2200, 2120, 2119,
3703, 2116, 2118, 2207, 3704, 3804, 3706, 2115, 4006, 4005,
4004, 4003, 4002, 4001, 4000, 3900, 3805, 3803, 3802, 3801,
3800, 3784, 3783, 3782, 3781, 3780, 3710, 3709, 3708, 3707,
3705, 2003, 2119
3705, 2003, 2117
};
}
public class Faction : EClassFOOD
public const int kirimi = 707;
public const int creativeDish = 764;
public const int food_human = 708;
public const int food_undead = 709;
public const int justcooked = 757;
public const int creativeDish = 764;
public const int food_god = 758;
public const int loseWeight = 706;
public static readonly int[] IDS = new int[13]
{
700, 701, 702, 703, 705, 704, 707, 708, 709, 757,
764, 758, 706
700, 701, 702, 703, 705, 704, 707, 764, 708, 709,
757, 758, 706
};
}MATERIAL
public class MATERIAL : EClass
public static SourceMaterial.Row sourceWaterSea => EClass.sources.materials.rows[88];
public static SourceMaterial.Row FromElement(int id)
{
return EClass.sources.materials.alias["rubinus"];
}
public static SourceMaterial.Row GetRandomMaterial(int lv, string group = null, bool tryLevelMatTier = false)
{
if (group == null)SourceElement
public bool IsEncAppliable(SourceCategory.Row cat)
{
return IsWeaponEnc;
}
string text = encSlot;
if (!(text == "all"))
return encSlot switch
{
if (text == "weapon")
{
return cat.IsChildOf("weapon");
}
return encSlot.Contains(EClass.sources.elements.map[slot].alias);
}
return true;
"all" => true,
"weapon" => cat.IsChildOf("weapon"),
"shield" => cat.IsChildOf("shield"),
_ => encSlot.Contains(EClass.sources.elements.map[slot].alias),
};
}
}Thing
public override void OnCreate(int genLv)
}
}
}
if (id == "shield_flower")
{
SourceElement.Row randomElement = Element.GetRandomElement(genLv);
elements.SetBase(randomElement.alias.Replace("ele", "miasma_"), 20);
}
if ((bp.rarity != 0 || bp.qualityBonus != 0) && base.rarity < Rarity.Artifact && base.category.tag.Contains("enc"))
{
int num4 = 0;+Zone_CurryRuin
File Created
public class Zone_CurryRuin : Zone_Civilized
{
public override string GetNewZoneID(int level)
{
if (level <= -1)
{
return "curryruin_dungeon";
}
return base.GetNewZoneID(level);
}
}+Zone_CurryRuinDungeon
File Created
using UnityEngine;
public class Zone_CurryRuinDungeon : Zone_QuestDungeon
{
public const int LvBoss = -8;
public bool IsBossLv => base.lv == -8;
public override int DangerLv => 5 + Mathf.Abs(base.lv);
public override bool LockExit
{
get
{
if (base.lv == -1)
{
return EClass.game.quests.GetPhase<QuestVernis>() < 7;
}
return false;
}
}
public override float OreChance => 4f;
public override string idExport
{
get
{
if (base.lv != -8)
{
return base.idExport;
}
return "vernis_mine_boss";
}
}
public override string GetDungenID()
{
return "DungeonMine";
}
public override void OnGenerateMap()
{
if (IsBossLv)
{
return;
}
PlaceRail();
EClass._map.ForeachCell(delegate(Cell c)
{
if (EClass.rnd(5) != 0 && c._block != 0 && !c.HasObj && !c.isSurrounded && !c.hasDoor)
{
c.GetSharedPoint().SetObj(24, 1, EClass.rnd(3));
}
});
base.OnGenerateMap();
}
}