EA 23.88 Nightly
February 6, 2025
9 files modified.
Important Changes
Possible breaking changes. Click the filename to view the chunk.
Card (1)
public bool HasRune()
public int CountRune()
InvOwnerMod (1)
public static bool IsValidRuneMod(Thing t, SourceElement.Row row, string idMat)
Card
@@ -3337,19 +3337,57 @@ public SocketData GetRuneEnc(int idEle)
return null;
}
public bool HasRune()
public int CountRune()
{
int num = 0;
if (socketList != null)
{
foreach (SocketData socket in socketList)
{
if (socket.type == SocketData.Type.Rune && !socket.dontConsumeSlot)
if (socket.type == SocketData.Type.Rune)
{
return true;
num++;
}
}
}
return false;
return num;
}
public int MaxRune()
{
return ((!IsUnique) ? 1 : 0) + Evalue(484);
}
public bool CanAddRune(SourceElement.Row row)
{
if (category.slot == 0)
{
return false;
}
if (material.HasEnc(row.id))
{
return false;
}
if (!IsWeapon && row.IsWeaponEnc)
{
return false;
}
if (row.category == "resist")
{
foreach (Element item in elements.ListElements())
{
if (item.source.category == "resist" && (item.vBase != 0 || item.vSource != 0))
{
return false;
}
}
}
return CountRune() < MaxRune();
}
public bool HasRune()
{
return CountRune() > 0;
}
public void OnChildNumChange(Card c)
Chara
@@ -5723,34 +5723,50 @@ public bool FindNewEnemy()
int num = (base.PER + Evalue(210) * 2) * ((!flag) ? 1 : 2);
bool flag2 = IsPCParty && !IsPC && EClass.game.config.tactics.dontWander;
bool flag3 = !IsPCParty;
Chara chara = null;
int num2 = 9999;
for (int i = 0; i < EClass._map.charas.Count; i++)
{
Chara chara = EClass._map.charas[i];
if (chara == this || !IsHostile(chara) || !CanSee(chara))
Chara chara2 = EClass._map.charas[i];
if (chara2 == this || !IsHostile(chara2) || !CanSee(chara2))
{
continue;
}
int num2 = Dist(chara);
int num3 = GetSightRadius() + (flag ? 1 : 0);
if (num2 > num3)
int num3 = Dist(chara2);
int num4 = GetSightRadius() + (flag ? 1 : 0);
if (num3 > num4)
{
continue;
}
if (flag3 && EClass.rnd(chara.Evalue(152) + 5) * (100 + num2 * num2 * 10) / 100 > EClass.rnd(num))
if (flag3 && EClass.rnd(chara2.Evalue(152) + 5) * (100 + num3 * num3 * 10) / 100 > EClass.rnd(num))
{
if (this == pos.FirstChara)
{
chara.ModExp(152, Mathf.Clamp((num - chara.Evalue(152)) / 2, 1, Mathf.Max(30 - stealthSeen * 2, 1)));
chara2.ModExp(152, Mathf.Clamp((num - chara2.Evalue(152)) / 2, 1, Mathf.Max(30 - stealthSeen * 2, 1)));
}
stealthSeen++;
}
else if (Los.IsVisible(pos.x, chara.pos.x, pos.z, chara.pos.z) && (!flag2 || EClass.pc.isBlind || EClass.pc.CanSeeLos(chara)) && (!IsPCFaction || EClass.pc.ai.ShouldAllyAttack(chara)))
else if (Los.IsVisible(pos.x, chara2.pos.x, pos.z, chara2.pos.z) && (!flag2 || EClass.pc.isBlind || EClass.pc.CanSeeLos(chara2)) && (!IsPCFaction || EClass.pc.ai.ShouldAllyAttack(chara2)))
{
DoHostileAction(chara);
enemy = chara;
return true;
if (!IsPCParty)
{
DoHostileAction(chara2);
enemy = chara2;
return true;
}
if (num3 < num2)
{
num2 = num3;
chara = chara2;
}
}
}
if (chara != null)
{
DoHostileAction(chara);
enemy = chara;
return true;
}
return false;
}
ConBoost
@@ -17,6 +17,7 @@ public override RendererReplacer GetRendererReplacer()
"black_angel" => RendererReplacer.CreateFrom("black_angel", -1),
"adv_verna" => RendererReplacer.CreateFrom("adv_verna", 2),
"griffin" => RendererReplacer.CreateFrom("griffin", 1),
"isca" => RendererReplacer.CreateFrom("isca", 1),
_ => null,
};
}
ELEMENT
@@ -23,11 +23,11 @@ public class ELEMENT
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;
@@ -69,8 +69,8 @@ public class ELEMENT
public static readonly int[] IDS = new int[31]
{
753, 750, 754, 755, 756, 759, 752, 751, 0, 3,
1, 2, 5, 10, 11, 12, 13, 14, 16, 17,
753, 750, 754, 755, 756, 759, 752, 751, 0, 2,
1, 3, 5, 10, 11, 12, 13, 14, 16, 17,
18, 15, 21, 22, 23, 24, 25, 26, 29, 85,
20
};
ENC
public class ENC
{
public const int living = 653;
public const int eco = 652;
public const int r_PV = 651;
@@ -10,22 +8,26 @@ public class ENC
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_cleave = 622;
public const int mod_chaser = 620;
public const int mod_feint = 623;
public const int noDamage = 654;
public const int mod_cleave = 622;
public const int r_life = 640;
public const int living = 653;
public const int onlyPet = 655;
public const int mod_frustration = 624;
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;
@@ -42,19 +44,19 @@ public class ENC
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_splash = 608;
public const int mod_scatter = 607;
public const int throwReturn = 410;
public const int encSpell = 411;
public const int mod_drill = 606;
public const int mod_precision = 605;
public const int sustain_STR = 440;
@@ -84,13 +86,13 @@ public class ENC
public const int slowCorruption = 412;
public const int encSpell = 411;
public const int throwReturn = 410;
public const int corruption = 409;
public const int resWeather = 408;
public const int mod_scatter = 607;
public const int mod_drill = 606;
public const int resMutation = 406;
@@ -112,9 +114,7 @@ public class ENC
public const int travelSpeed = 407;
public const int mod_ammo = 600;
public const int mod_precision = 605;
public const int slot_rune = 484;
public const int mod_ammo_recover = 604;
@@ -124,6 +124,8 @@ public class ENC
public const int mod_reload = 601;
public const int mod_ammo = 600;
public const int optimizeMana = 483;
public const int force_weapon = 482;
@@ -160,15 +162,16 @@ public class ENC
public const int sustain_PER = 443;
public static readonly int[] IDS = new int[80]
public static readonly int[] IDS = new int[81]
{
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, 608, 410, 606, 440, 429,
428, 427, 426, 425, 424, 423, 422, 421, 420, 416,
415, 412, 411, 409, 408, 607, 406, 405, 404, 403,
402, 401, 400, 441, 442, 407, 600, 605, 604, 603,
602, 601, 483, 482, 481, 480, 468, 466, 465, 464,
467, 462, 461, 460, 447, 446, 463, 445, 444, 443
652, 651, 650, 641, 640, 621, 620, 623, 622, 653,
624, 654, 851, 656, 660, 661, 662, 663, 664, 665,
666, 850, 608, 865, 852, 655, 607, 411, 605, 440,
429, 428, 427, 426, 425, 424, 423, 422, 421, 420,
416, 415, 412, 410, 409, 408, 606, 406, 405, 404,
403, 402, 401, 400, 441, 442, 407, 484, 604, 603,
602, 601, 600, 483, 482, 481, 480, 468, 466, 465,
464, 467, 462, 461, 460, 447, 446, 463, 445, 444,
443
};
}
InvOwnerMod
@@ -4,29 +4,6 @@ public class InvOwnerMod : InvOwnerDraglet
public override string langTransfer => "invMod";
public static bool IsValidRuneMod(Thing t, SourceElement.Row row, string idMat)
{
if (row.category == "resist")
{
foreach (Element item in t.elements.ListElements())
{
if (item.source.category == "resist")
{
return false;
}
}
}
if (t.material.HasEnc(row.id))
{
return false;
}
if (t.category.slot != 0 && !t.HasRune())
{
return !t.IsUnique;
}
return false;
}
public static bool IsValidRangedMod(Thing t, SourceElement.Row row)
{
if (t.trait is TraitToolRangeCane && !row.tag.Contains("modCane"))
@@ -51,7 +28,7 @@ public override bool ShouldShowGuide(Thing t)
TraitMod traitMod = owner.trait as TraitMod;
if (traitMod is TraitRune)
{
if (!IsValidRuneMod(t, traitMod.source, owner.material.alias))
if (!t.CanAddRune(traitMod.source))
{
return false;
}
RecipeCard
@@ -235,6 +235,7 @@ public override Thing Craft(BlessedState blessed, bool sound = false, List<Thing
if (ing2.trait is TraitRune)
{
thing.AddRune(ing2).dontConsumeSlot = true;
thing.elements.SetBase(484, 1);
}
}
}
Region
@@ -322,7 +322,7 @@ public override void OnAdvanceHour()
ShouldPass = (SourceChara.Row s) => s.biome == biome.name || s.biome.IsEmpty()
}) : SpawnList.Get(biome.spawn.GetRandomCharaId()));
Chara chara = CharaGen.CreateFromFilter(list, regionPoint.dangerLv);
if (chara != null)
if (chara != null && !(chara.trait is TraitUniqueMonster))
{
AddCard(chara, randomPoint);
}
TraitUniqueMonsterAdv
@@ -2,7 +2,5 @@ public class TraitUniqueMonsterAdv : TraitUniqueMonster
{
public override int MaxRandomAbility => 4;
public override bool UseRandomAlias => true;
public override bool IsWearingPanty => true;
}