Snapshot for release 2026.11.1.1 (internal d85938c)

This commit is contained in:
Tom Bohar 2026-11-01 23:16:41 -05:00
commit ce1cc11ebe
2 changed files with 53 additions and 14 deletions

View file

@ -8116,10 +8116,10 @@ public partial class CombatManager : IDisposable
// ring range. If so, upgrade to ring; otherwise keep the base shape (arc/streak/blast/bolt).
bool ringDue = rule != null && rule.UseRing && _settings.RingRange > 0
&& (RingCountOverride?.Invoke() ?? CountMonstersInRange(_settings.RingRange)) >= Math.Max(1, _settings.MinRingTargets);
// Like a wall, a ring is due only when one is known: Void Magic has no ring at all (no
// "Nether Ring" in SpellData.txt), so a Void caster with Use Ring on cast nothing once a
// pack came into ring range and stood in the fight ("No spell found: elem=Nether",
// #rynth-issues 2026-10-23, DreamWeave). Without one, the rule's other shape is cast.
// Like a wall, a ring is due only when one is known: a caster with Use Ring on and no ring
// learned used to cast nothing once a pack came into ring range and stood in the fight
// ("No spell found: elem=Nether", #rynth-issues 2026-10-23, DreamWeave). Without one, the
// rule's other shape is cast. Void's rings are Clouded Soul / Ring of Skulls (2026-11-01).
int ringId = 0;
if (ringDue)
{
@ -8128,7 +8128,7 @@ public partial class CombatManager : IDisposable
{
ringDue = false;
if (_noRingLogged.Add(element + (useVoid ? "/void" : "")))
_host.Log($"[CombatCast] no {element} ring spell known{(useVoid ? " (Void Magic has none)" : "")}: casting the rule's other shape when a ring is due");
_host.Log($"[CombatCast] no {element} ring spell known{(useVoid ? " (Void: Clouded Soul, Clouded Soul II, Ring of Skulls II)" : "")}: casting the rule's other shape when a ring is due");
}
}
@ -8201,8 +8201,8 @@ public partial class CombatManager : IDisposable
/// <summary>
/// The best ring of <paramref name="element"/> the character knows (0 = none): War's lore
/// rings, else the generic "{ring base} {tier}" of the shape table (the Void row's
/// "Nether Ring" / "Corrosion Ring" exist on no known server, so a Void caster gets 0).
/// rings, Void's Clouded Soul / Ring of Skulls, else the generic "{ring base} {tier}" of the
/// shape table.
/// </summary>
private int FindRingSpell(string element, AcSkillType skill, bool useVoid)
{
@ -8214,13 +8214,8 @@ public partial class CombatManager : IDisposable
private int FindBestRingSpell(string element, AcSkillType skill)
{
// Void Magic doesn't have lore-named rings (Cassius'/Halo/etc. are all War
// Magic spells). Returning 0 here makes FindBestShapedSpell fall through to
// FindBestOffensiveSpellId(elementShapes[1], skill) where elementShapes comes
// from VoidSpellShapes — e.g. "Nether Ring" or "Corrosion Ring" — and the
// Void caster gets the right Void ring tier instead of an unknown War spell.
if (skill == AcSkillType.VoidMagic)
return 0;
return FindBestVoidRingSpell();
if (!RingLoreNames.TryGetValue(element, out string[]? loreNames) || loreNames.Length < 2) return 0;
@ -8275,6 +8270,26 @@ public partial class CombatManager : IDisposable
return 0;
}
// Void Magic's rings (SpellData category 641, ACE's NetherRing): Clouded Soul is level 5 (power
// 200), Clouded Soul II and Ring of Skulls II level 7 (power 300). They have lore names only, so
// the old "Nether Ring {tier}" lookup never found one and a Void caster never cast a ring
// (2026-11-01).
private static readonly string[] VoidRingsLevel7 = { "Clouded Soul II", "Ring of Skulls II" };
private const string VoidRingLevel5 = "Clouded Soul";
private int FindBestVoidRingSpell()
{
int maxTier = EffectiveMaxTier(AcSkillType.VoidMagic);
if (maxTier >= 7)
foreach (string name in VoidRingsLevel7)
{
int id = TrySpellByName(name); if (id != 0) return id;
}
if (maxTier >= 5)
return TrySpellByName(VoidRingLevel5);
return 0;
}
private int FindBestOffensiveSpellId(string baseName, AcSkillType skill, string? tier7Lore = null)
{
if (_spellManager == null) return 0;

View file

@ -30,7 +30,31 @@ internal static class WallTests
r.Add("walls: far off the target, it turns first and casts after the settle; facing it, no turn", WallFacing);
r.Add("walls: the cast itself waits for the turn, then goes as an area cast", WallCastThroughAttack);
r.Add("walls: UseWall, Wall Range and Min Wall Targets load off / 0 / 3 from old files", OldSettings);
r.Add("rings: a ring is due only when one is known; Void has none, so a Void caster casts its bolt (#rynth-issues 2026-10-23)", RingNeedsAKnownRing);
r.Add("rings: a ring is due only when one is known; a Void caster with no ring learned casts its bolt (#rynth-issues 2026-10-23)", RingNeedsAKnownRing);
r.Add("rings: Void's rings (11-01): Clouded Soul from tier 5, Clouded Soul II / Ring of Skulls II from tier 7", VoidRings);
}
// Void Magic's rings have lore names only (category 641): Clouded Soul (level 5), Clouded Soul II
// and Ring of Skulls II (level 7). Rynth looked for "Nether Ring", so a Void caster never rang.
private static void VoidRings()
{
var boltRing = new MonsterRule { Name = "Gilded Shade", UseBolt = true, UseRing = true };
(string, string) Cast(int tier, int near, params string[] known)
{
var rig = new Rig(tier, known);
rig.S.RingRange = 20; rig.S.MinRingTargets = 3; rig.S.WallRange = 0;
rig.C.RingCountOverride = () => near;
return rig.Cast("Nether", boltRing);
}
Check.Eq(Cast(7, 4, "Nether Bolt VII", "Clouded Soul II", "Clouded Soul"), ("Clouded Soul II", "Ring"), "tier 7: Clouded Soul II");
Check.Eq(Cast(7, 4, "Nether Bolt VII", "Ring of Skulls II"), ("Ring of Skulls II", "Ring"), "tier 7: Ring of Skulls II");
Check.Eq(Cast(7, 4, "Nether Bolt VII", "Clouded Soul"), ("Clouded Soul", "Ring"), "tier 7 knowing only the level-5 one: Clouded Soul");
Check.Eq(Cast(5, 4, "Nether Bolt V", "Clouded Soul"), ("Clouded Soul", "Ring"), "tier 5: Clouded Soul");
Check.Eq(Cast(6, 4, "Nether Bolt VI", "Clouded Soul", "Clouded Soul II"), ("Clouded Soul", "Ring"), "tier 6 knowing the II: the level-5 one");
Check.Eq(Cast(4, 4, "Nether Bolt IV", "Clouded Soul"), ("Nether Bolt IV", "Bolt"), "tier 4: no ring yet, the bolt");
Check.Eq(Cast(7, 2, "Nether Bolt VII", "Clouded Soul II"), ("Nether Bolt VII", "Bolt"), "too few near: the bolt");
foreach (string n in new[] { "Clouded Soul", "Clouded Soul II", "Ring of Skulls II" })
Check.True(SpellTable.Named(n).Any(row => row.Category == 641), $"{n} is a Void ring (category 641) in the spell data");
}
// A Void caster on DreamWeave with Use Ring on stood in the fight once 3+ monsters were near: