EA 23.149 Nightly
June 3, 2025
10 files modified. 3 new files created.
Important Changes
Possible breaking changes. Click the filename to view the chunk.
Chara (5)
public void ModTempElement(int ele, int a, bool naturalDecay = false)
public void ModTempElement(int ele, int a, bool naturalDecay = false, bool onlyRenew = false)
public void DamageTempElements(int p, bool body, bool mind)
public void DamageTempElements(int p, bool body, bool mind, bool onlyRenew = false)
public void DamageTempElement(int ele, int p)
public void DamageTempElement(int ele, int p, bool onlyRenew = false)
public void EnhanceTempElements(int p, bool body, bool mind)
public void EnhanceTempElements(int p, bool body, bool mind, bool onlyRenew = false)
public void EnhanceTempElement(int ele, int p)
public void EnhanceTempElement(int ele, int p, bool onlyRenew = false)
AI_Torture
@@ -40,7 +40,7 @@ public override AIProgress CreateProgress()
List<Chara> list = new List<Chara>();
foreach (Chara chara in EClass._map.charas)
{
if (!chara.IsDisabled && chara.IsPCFaction && chara != owner && !chara.IsPC && !chara.isRestrained && chara.host == null && !chara.noMove && !chara.IsInCombat)
if (!chara.IsDisabled && chara.IsPCFaction && chara != owner && !chara.IsPC && !chara.isRestrained && chara.host == null && !chara.noMove && !chara.IsInCombat && !(chara.ai.Current is AI_Eat))
{
list.Add(chara);
}
@@ -50,7 +50,7 @@ public override AIProgress CreateProgress()
int num2 = 0;
foreach (Chara item in list)
{
if (EClass.rnd(3) == 0 && item.HasAccess(owner.pos))
if (EClass.rnd(3) == 0 && item.HasAccess(owner.pos) && PathManager.Instance.IsPathClear(owner.pos, item.pos, item, 30))
{
item.SetEnemy(owner);
}
ActEffect
break;
case EffectId.AbsorbMana:
{
EClass.game.religions.Element.Talk("ability");
if (CC == TC)
{
EClass.game.religions.Element.Talk("ability");
}
Dice dice = Dice.Create("ActManaAbsorb", power, CC, (actRef.refThing != null) ? null : actRef.act);
TC.mana.Mod(dice.Roll());
TC.PlaySound("heal");
TC.PlayEffect("heal");
if (TC.IsPC)
if (TC == CC)
{
CC.Say("absorbMana", CC);
}
TC.Say(flag9 ? "damageBody" : "damageMind", TC);
for (int m = 0; m < num9; m++)
{
TC.DamageTempElements(power, flag9, mind2);
TC.DamageTempElements(power, flag9, mind2, id != EffectId.Weaken);
}
if (TC.IsPC)
{
TC.PlaySound("buff");
for (int k = 0; k < num6; k++)
{
TC.EnhanceTempElements(power, flag6, mind);
TC.EnhanceTempElements(power, flag6, mind, onlyRenew: true);
}
break;
}
Card
@@ -2905,7 +2905,7 @@ public void LevelUp()
}
if (Chara.race.id == "mutant")
{
int num = Mathf.Min(1 + LV / 5, 22);
int num = Mathf.Min(1 + LV / 5, 20);
for (int i = 0; i < num; i++)
{
if (Evalue(1644) < i + 1)
Chara
@@ -3501,7 +3501,7 @@ public void TickConditions()
break;
}
}
if (turn % 500 == 0)
if (turn % 200 == 0)
{
DiminishTempElements();
}
@@ -7558,7 +7558,7 @@ public void OnInsulted()
if (HasElement(1231))
{
Talk("insulted");
AddCondition<ConEuphoric>();
AddCondition<ConEuphoric>(100 * Evalue(1231));
}
else if (EClass.rnd(20) == 0)
{
Say("resistMutation", this);
return false;
}
IEnumerable<SourceElement.Row> ie = EClass.sources.elements.rows.Where((SourceElement.Row a) => a.category == (ether ? "ether" : "mutation"));
IEnumerable<SourceElement.Row> ie = EClass.sources.elements.rows.Where((SourceElement.Row a) => a.category == (ether ? "ether" : "mutation") && !a.tag.Contains("noRandomMutation"));
for (int i = 0; i < tries; i++)
{
SourceElement.Row row = ie.RandomItem();
@@ -9445,7 +9445,7 @@ public void RefreshFaithElement()
faithElements.SetParent(this);
}
public void ModTempElement(int ele, int a, bool naturalDecay = false)
public void ModTempElement(int ele, int a, bool naturalDecay = false, bool onlyRenew = false)
{
if (a < 0 && !naturalDecay && HasElement(EClass.sources.elements.alias["sustain_" + EClass.sources.elements.map[ele].alias]?.id ?? 0))
{
@@ -9456,15 +9456,28 @@ public void ModTempElement(int ele, int a, bool naturalDecay = false)
tempElements = new ElementContainer();
tempElements.SetParent(this);
}
if (a > 0 && tempElements.Base(ele) > a)
int num = Mathf.Abs(elements.ValueWithoutLink(ele)) + 20;
int num2 = Mathf.Max(-num, -100);
int num3 = tempElements.Base(ele);
int num4 = num3 + a;
if (onlyRenew)
{
a = a * 100 / (200 + (tempElements.Base(ele) - a) * 10);
if (a > 0 && num3 >= a)
{
a = 0;
}
if (a < 0 && num3 <= a)
{
a = 0;
}
}
int num = Mathf.Abs(elements.ValueWithoutLink(ele)) * 2 + 20;
int num2 = tempElements.Base(ele) + a;
if (num2 < -num || num2 > num || (a < 0 && num2 < -100))
if (num4 > num)
{
a = 0;
a = ((num > num3) ? (num - num3) : 0);
}
if (num4 < num2)
{
a = ((num2 < num3) ? (num2 - num3) : 0);
}
Element element = tempElements.ModBase(ele, a);
if (element.vBase == 0)
@@ -9477,7 +9490,7 @@ public void ModTempElement(int ele, int a, bool naturalDecay = false)
}
}
public void DamageTempElements(int p, bool body, bool mind)
public void DamageTempElements(int p, bool body, bool mind, bool onlyRenew = false)
{
if (body)
{
@@ -9489,12 +9502,12 @@ public void DamageTempElements(int p, bool body, bool mind)
}
}
public void DamageTempElement(int ele, int p)
public void DamageTempElement(int ele, int p, bool onlyRenew = false)
{
ModTempElement(ele, -(p / 100 + EClass.rnd(p / 100 + 1) + 1));
ModTempElement(ele, -(p / 100 + EClass.rnd(p / 100 + 1) + 1), naturalDecay: false, onlyRenew);
}
public void EnhanceTempElements(int p, bool body, bool mind)
public void EnhanceTempElements(int p, bool body, bool mind, bool onlyRenew = false)
{
if (body)
{
@@ -9506,9 +9519,9 @@ public void EnhanceTempElements(int p, bool body, bool mind)
}
}
public void EnhanceTempElement(int ele, int p)
public void EnhanceTempElement(int ele, int p, bool onlyRenew = false)
{
ModTempElement(ele, p / 100 + EClass.rnd(p / 100 + 1));
ModTempElement(ele, p / 100 + EClass.rnd(p / 100 + 1), naturalDecay: false, onlyRenew);
}
public void DiminishTempElements(int a = 1)
DramaCustomSequence
@@ -40,7 +40,7 @@ public void Build(Chara c)
string rumor = (c.IsPCParty ? GetTalk("sup") : GetRumor(c));
Layer layer = null;
bool flag3 = c.IsHumanSpeak || EClass.pc.HasElement(1640);
bool num = !c.IsUnique || (c.IsPCFaction && c.trait is TraitOlderYoungerSister);
bool num = !c.IsUnique || HasTopic("unique", c.id);
if (!flag)
{
Step("Resident");
EloMap
@@ -423,7 +423,11 @@ public bool IsWater(int gx, int gy)
SourceGlobalTile.Row row = GetSources(gx, gy).LastItem();
if (row != null)
{
return row.id == 4;
if (row.id != 4)
{
return row.id == 15;
}
return true;
}
return false;
}
GoalCombat
@@ -574,6 +574,34 @@ public virtual bool TryUseAbility(int dist, bool beforeMove = false)
bool isHOT;
switch (text)
{
case "special":
if (ability.act.id != 6900 || owner.IsPC)
{
continue;
}
if (owner.IsPCParty)
{
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)
{
num = (int)num3;
}
}
}
else
{
num = 100 - owner.mana.value * 100 / Mathf.Max(1, owner.mana.max);
}
break;
case "any":
if (owner.isBerserk)
{
continue;
}
num = 50;
break;
case "item":
if (owner.isBerserk)
{
@@ -655,13 +683,6 @@ public virtual bool TryUseAbility(int dist, bool beforeMove = false)
}
num = 40;
break;
case "any":
if (owner.isBerserk)
{
continue;
}
num = 50;
break;
case "hot":
case "heal":
if (owner.isBerserk)
@@ -885,36 +906,36 @@ int HealFactor(Chara c)
{
return 0;
}
float num8 = (float)c.hp / (float)c.MaxHP;
if (num8 > (isHOT ? 0.85f : 0.75f))
float num6 = (float)c.hp / (float)c.MaxHP;
if (num6 > (isHOT ? 0.85f : 0.75f))
{
return 0;
}
int num9 = tactics.P_Heal - (int)((float)tactics.P_Heal * num8) + (isHOT ? 50 : 25);
int num7 = tactics.P_Heal - (int)((float)tactics.P_Heal * num6) + (isHOT ? 50 : 25);
foreach (Condition condition in c.conditions)
{
if (condition is ConFear)
{
num9 += 10;
num7 += 10;
}
else if (condition is ConPoison)
{
num9 += 2;
num7 += 2;
}
else if (condition is ConConfuse)
{
num9 += 4;
num7 += 4;
}
else if (condition is ConDim)
{
num9 += 6;
num7 += 6;
}
else if (condition is ConBleed)
{
num9 += 8;
num7 += 8;
}
}
return num9;
return num7;
}
}
abilities.Sort((ItemAbility a, ItemAbility b) => b.priority - a.priority);
@@ -1000,8 +1021,8 @@ void BuildCharaList()
{
if (chara2 != owner)
{
int num5 = owner.Dist(chara2);
if (num5 > sightRadius || !owner.CanSeeLos(chara2, num5))
int num10 = owner.Dist(chara2);
if (num10 > sightRadius || !owner.CanSeeLos(chara2, num10))
{
continue;
}
return func(owner);
}
BuildCharaList();
int num6 = 0;
int num4 = 0;
foreach (Chara chara3 in charas)
{
int num7 = func(chara3);
if (num7 > 0)
int num5 = func(chara3);
if (num5 > 0)
{
if (isFriendlyAbility)
{
}
if (chara3 != owner)
{
num7 += tactics.P_Party;
num5 += tactics.P_Party;
}
}
else if (!owner.IsHostile(chara3))
{
continue;
}
if (num7 >= num6)
if (num5 >= num4)
{
a.tg = chara3;
num6 = num7;
num4 = num5;
}
}
}
return num6;
return num4;
}
int GetAttackMod(Act a)
{
@@ -1060,30 +1081,30 @@ int GetAttackMod(Act a)
{
return 0;
}
int num3 = ((a.source.aliasRef == "mold") ? owner.MainElement.id : EClass.sources.elements.alias[a.source.aliasRef].id);
int num4 = -15 * tc.ResistLvFrom(num3);
switch (num3)
int num8 = ((a.source.aliasRef == "mold") ? owner.MainElement.id : EClass.sources.elements.alias[a.source.aliasRef].id);
int num9 = -15 * tc.ResistLvFrom(num8);
switch (num8)
{
case 910:
if (tc.isWet)
{
num4 -= 30;
num9 -= 30;
}
break;
case 911:
if (tc.HasCondition<ConBurning>())
{
num4 -= 30;
num9 -= 30;
}
break;
case 912:
if (tc.isWet)
{
num4 += 30;
num9 += 30;
}
break;
}
return num4;
return num9;
}
void GetNumEnemy(int radius)
{
+TraitNanasu
File Created
public class TraitNanasu : TraitUniqueChara
{
public override bool CanInvite => false;
}
+TraitPoina
File Created
public class TraitPoina : TraitUniqueChara
{
public override bool CanInvite => false;
}
TraitPotion
public class TraitPotion : TraitDrink
{
public override int Power => 200;
public override int CraftNum
{
get
{
if (GetParam(1) == "HairGrowth")
{
return 3;
}
return base.CraftNum;
}
}
public static void Create(Card owner, int ele)
{
owner.refVal = ele;
TraitPotionAlchemy
public class TraitPotionAlchemy : TraitPotionRandom
{
public override int Power => owner.Power * (100 + owner.encLV * 100) / 100;
public override int Power => GetPower();
public int GetPower()
{
int num = 200;
int num2 = 100;
int refVal = owner.refVal;
if ((uint)(refVal - 8400) <= 5u)
{
num2 = 150;
}
return num * (100 + owner.encLV * num2) / 100;
}
public override void OnCrafted(Recipe recipe)
{
TraitPotionRandom
@@ -10,8 +10,6 @@ public class TraitPotionRandom : TraitPotion
public override string AliasEle => source.aliasRef;
public override int Power => 200;
public override EffectId IdEffect
{
get
+TraitRaina
File Created
public class TraitRaina : TraitUniqueChara
{
public override bool CanInvite => false;
}