diff --git a/Changelog/2026-10-15-ilt-coalesced-aetheria-clap-0.2.9-nav-settings-0.5.70.md b/Changelog/2026-10-15-ilt-coalesced-aetheria-clap-0.2.9-nav-settings-0.5.70.md new file mode 100644 index 0000000..0a4898d --- /dev/null +++ b/Changelog/2026-10-15-ilt-coalesced-aetheria-clap-0.2.9-nav-settings-0.5.70.md @@ -0,0 +1,75 @@ +# Coalesced Aetheria fixes (RynthILT) and the Nav panel's switches on Settings > Navigation (RynthAi) + +Date: 2026-10-15 + +| Plugin | Version | Previous release | +|---|---|---| +| RynthCore.Plugin.RynthILT | 0.2.9 | 0.2.8 | +| RynthCore.Plugin.RynthAi | 0.5.70-legacy-ui | 0.5.69-legacy-ui | + +Needs RynthCore engine 2026.10.5.62 for the new Settings rows (see RynthCore's changelog of the same +date). With an older engine, RynthAi works as before and the rows don't show. + +## RynthILT: Coalesced Aetheria + +Checked against ACECustom (`Entity/Aetheria.cs`, `LootGenerationFactory_Aetheria.cs` and +`PlayerCommands.HandleClap`). + +- **The level cap now applies to Coalesced Aetheria.** Coalesced Aetheria gets its level (1 to 10) + when it drops, and at level 6 or more it can carry a C or CDR rating. RynthILT used to chunk + every Coalesced piece whatever the "Chunk aetheria with max level below" setting said, so a cap + of 9 still chunked a level 10 piece. Now Coalesced and revealed aetheria follow the same cap, and + a piece with no level read yet is never chunked (UtilityBelt's Leaftide does the same). +- **The aetheria IDs were wrong.** `IltInventory` called 42636 and 42635 the red and blue chunks. + Those are the Red and Blue Coalesced Aetheria. The real IDs are now listed: the chunks (Red + 310147, Blue 310149, Yellow 310150), the powders (Red 42644, Blue 300019), the Yellow Coalesced + Aetheria (42637), and the Ancient Empyrean (34276) and Ancient Falatacot (34277) Trinkets. +- **Auto-clap sends /clap only when there is a pair to clap.** The server pairs red material (Red + Coalesced Aetheria at level 1 to 3 and still unrevealed, red chunks, red powder) with Empyrean + Trinkets, and blue material with Falatacot Trinkets. RynthILT's check used to pass with any + chunk or any trinket alone. So every 30 minutes it sent a `/clap all` that the server answered + with "You don't have any aetheria materials to process." It also ignored Coalesced Aetheria and + powder, which the server does take. The status now says "no aetheria and trinket pair carried + (red + Empyrean, blue + Falatacot)". "Clap now" still always sends. + +## RynthAi: Breadcrumbs and Route overlay on Settings > Navigation + +The Nav panel's **Breadcrumbs** and **Route overlay** switches now also appear on Settings > +Navigation, at the top of "Nav Marker Display". They are the same settings +(`NavOverlay.TrackBreadcrumbs` and `NavOverlay.ShowRouteMarkers`), so turning one on or off in +either place shows in the other. + +- RynthAi's settings payload carries them as `TrackBreadcrumbs` and `ShowRouteOverlay`. +- A save from an engine that doesn't send them leaves them unchanged. + +## Files + +RynthILT: + +- `Hub/IltInventory.cs`: the Coalesced, chunk, powder and trinket IDs. +- `Hub/IltChunkClap.cs`: `UnderChunkCap` (the cap for every aetheria), `ClapPartOf` and `CanClap` + (the server's pairing), and the clap status. +- `Hub/IltHubState.cs`: the cap's comment. +- `RynthILTPlugin.cs`: version 0.2.9. + +RynthAi: + +- `LegacyUi/LegacyUiSettings.cs`: `SettingsBridgePayload.TrackBreadcrumbs` and `ShowRouteOverlay`. +- `LegacyUi/LegacyDashboardRenderer.cs`: sends them and applies them when present. +- `RynthAiVersionCommand.cs`: version 0.5.70-legacy-ui. + +## Tests + +- `Tools\RynthILT.Tests`: 93 tests, 1529 checks, all passed. 2 are new: + - the cap covers Coalesced Aetheria, and an aetheria with no level is never chunked; + - the /clap pairing: every server ID, each colour with its own trinket, Coalesced only when + unrevealed and at level 1 to 3, the name fallback when no ID has been read yet, and one side + alone never claps. +- `Tools\RynthCore.RynthAiHostTests`: a new check that Settings and the Nav panel change the same + two switches, and that an older engine's save leaves them alone. + +## Install + +Both plugins are published as NativeAOT and installed to `C:\Games\RynthSuite\\`. The files +they replace are first saved to `RynthILT\PreviousReleases\0.2.8` and +`RynthAi\PreviousReleases\0.5.69-legacy-ui`. diff --git a/Plugins/RynthCore.Plugin.RynthAi/LegacyUi/LegacyDashboardRenderer.cs b/Plugins/RynthCore.Plugin.RynthAi/LegacyUi/LegacyDashboardRenderer.cs index d8073c4..c5db12c 100644 --- a/Plugins/RynthCore.Plugin.RynthAi/LegacyUi/LegacyDashboardRenderer.cs +++ b/Plugins/RynthCore.Plugin.RynthAi/LegacyUi/LegacyDashboardRenderer.cs @@ -1109,6 +1109,8 @@ internal sealed partial class LegacyDashboardRenderer NavLabelMode = NavLabelModes.Clamp(s.NavLabelMode), NavGuideLine = s.NavGuideLine, NavResumeNearest = s.NavResumeNearest, + TrackBreadcrumbs = s.NavOverlay.TrackBreadcrumbs, + ShowRouteOverlay = s.NavOverlay.ShowRouteMarkers, OpenDoors = s.OpenDoors, OpenDoorRange = s.OpenDoorRange, OpenDoorsOnPathOnly = s.OpenDoorsOnPathOnly, @@ -1349,6 +1351,8 @@ internal sealed partial class LegacyDashboardRenderer if (p.NavLabelMode >= 0) s.NavLabelMode = NavLabelModes.Clamp(p.NavLabelMode); if (p.NavGuideLine is bool guideLine) s.NavGuideLine = guideLine; if (p.NavResumeNearest is bool resumeNearest) s.NavResumeNearest = resumeNearest; // absent = unchanged + if (p.TrackBreadcrumbs is bool crumbs) s.NavOverlay.TrackBreadcrumbs = crumbs; // absent = unchanged + if (p.ShowRouteOverlay is bool routeOverlay) s.NavOverlay.ShowRouteMarkers = routeOverlay; s.OpenDoors = p.OpenDoors; s.OpenDoorRange = p.OpenDoorRange; if (p.OpenDoorsOnPathOnly is bool doorsOnPath) s.OpenDoorsOnPathOnly = doorsOnPath; // absent = unchanged diff --git a/Plugins/RynthCore.Plugin.RynthAi/LegacyUi/LegacyUiSettings.cs b/Plugins/RynthCore.Plugin.RynthAi/LegacyUi/LegacyUiSettings.cs index d8ca3fa..0df1800 100644 --- a/Plugins/RynthCore.Plugin.RynthAi/LegacyUi/LegacyUiSettings.cs +++ b/Plugins/RynthCore.Plugin.RynthAi/LegacyUi/LegacyUiSettings.cs @@ -1106,6 +1106,10 @@ public sealed class SettingsBridgePayload public int NavLabelMode { get; set; } = -1; public bool? NavGuideLine { get; set; } public bool? NavResumeNearest { get; set; } + // NavOverlay.TrackBreadcrumbs / ShowRouteMarkers: the Nav panel's "Breadcrumbs" and "Route + // overlay" switches, also on Settings > Navigation. Null (an older engine) = unchanged. + public bool? TrackBreadcrumbs { get; set; } + public bool? ShowRouteOverlay { get; set; } public bool OpenDoors { get; set; } public float OpenDoorRange { get; set; } public bool? OpenDoorsOnPathOnly { get; set; } // absent (an older profile or plugin) = unchanged diff --git a/Plugins/RynthCore.Plugin.RynthILT/Hub/IltChunkClap.cs b/Plugins/RynthCore.Plugin.RynthILT/Hub/IltChunkClap.cs index 072f95b..9cc98aa 100644 --- a/Plugins/RynthCore.Plugin.RynthILT/Hub/IltChunkClap.cs +++ b/Plugins/RynthCore.Plugin.RynthILT/Hub/IltChunkClap.cs @@ -5,7 +5,9 @@ // Aetheria — "Aetheria"/"Coalesced Aetheria" gems, not equipped, appraised, not flagged // never-chunk (bool 9030), never levelled (ItemTotalXp quad 4 == 0), no kept // C / CD / CDR rating (gear ints 372 / 374 / 375; on by default), and max level -// (int 319, up to 10 on ILT) under the configured cap (Coalesced always qualifies). +// (int 319, up to 10 on ILT) under the configured cap. Coalesced Aetheria has its +// level from loot too, so the cap applies to it (it used to skip the cap and could +// chunk a level 10 piece). // Corrupted — "Corrupted" melee/missile weapons with no tinks (171), no imbue (179), // not equipped, not never-chunk, cleave (292) <= 1. // Peace mode only unless ChunkInCombat; waits for the result line (10 s max). @@ -13,8 +15,10 @@ // are loot and chunk nothing on ILT: the server answers "done" with no result line. Matching // them by name ending used the Flaming Lugian Hammer on Silentkelpie's 9 Coalesced Aetheria, // every one timed out and was skipped, and the status sat on "nothing eligible" (2026-10-15). -// Clap: "/clap all" converts aetheria chunks + trinkets into coins server-side. Needs the -// AutoCraftingEnabled stamp; 30 min ± 2 min interval, first attempt ~1 min after enable. +// Clap: "/clap all" converts aetheria + trinkets into coins server-side: red (Coalesced level 1-3, +// chunks, powder) with Empyrean Trinkets, blue with Falatacot Trinkets. Auto-clap sends it only +// when a pair is carried. Needs the AutoCraftingEnabled stamp; 30 min ± 2 min interval, first +// attempt ~1 min after enable. using System; using System.Collections.Generic; using System.Linq; @@ -90,12 +94,19 @@ internal sealed class IltChunkClap : IIltFeature if (KeptForRatings(G, inv.Int(wo, IltInventory.IntGearCrit), inv.Int(wo, IltInventory.IntGearCritDamage), inv.Int(wo, IltInventory.IntGearCritDamageResist))) return false; - return coalesced || inv.Int(wo, IltInventory.IntItemMaxLevel) < ClampUnderLevel(G.ChunkAetheriaUnderLevel); + return UnderChunkCap(inv.Int(wo, IltInventory.IntItemMaxLevel), G.ChunkAetheriaUnderLevel); } /// The chunk cap in range: 1 (chunk nothing by level) to one past the ILT maximum (every level). internal static int ClampUnderLevel(int under) => Math.Clamp(under, 1, IltInventory.AetheriaMaxLevel + 1); + /// + /// True when an aetheria's max level (int 319) is under the cap. Coalesced Aetheria has its level + /// from loot (ACECustom rolls 1-10; level 6+ can carry a rating), so it gets the same cap. + /// 0 = no level read: never chunked. Pure: the tests drive it. + /// + internal static bool UnderChunkCap(int maxLevel, int under) => maxLevel > 0 && maxLevel < ClampUnderLevel(under); + /// /// True when an aetheria's C / CD / CDR rating is one the settings keep (any rating above 0 with /// its keep switch on). Pure: the tests drive it. @@ -175,21 +186,64 @@ internal sealed class IltChunkClap : IIltFeature // ── Clap ──────────────────────────────────────────────────────────────── + internal enum ClapPart { None, Red, Blue, Empyrean, Falatacot } + + /// + /// Which side of /clap an item feeds (ACECustom PlayerCommands.HandleClap): red material (Red + /// Coalesced Aetheria, chunks, powder) pairs with Ancient Empyrean Trinkets, blue with Ancient + /// Falatacot Trinkets. Coalesced counts only unrevealed and at level 1-3; level 0 (not read yet) + /// counts, and the server has the last word. With no WCID yet, the chunk and trinket names + /// decide. Pure: the tests drive it. + /// + internal static ClapPart ClapPartOf(uint wcid, string name, int maxLevel) + { + bool lowCoalesced = name.Equals("Coalesced Aetheria", StringComparison.OrdinalIgnoreCase) && maxLevel <= 3; + switch (wcid) + { + case IltInventory.WcidRedCoalescedAetheria: return lowCoalesced ? ClapPart.Red : ClapPart.None; + case IltInventory.WcidBlueCoalescedAetheria: return lowCoalesced ? ClapPart.Blue : ClapPart.None; + case IltInventory.WcidRedAetheriaChunk: + case IltInventory.WcidRedAetheriaPowder: return ClapPart.Red; + case IltInventory.WcidBlueAetheriaChunk: + case IltInventory.WcidBlueAetheriaPowder: return ClapPart.Blue; + case IltInventory.WcidEmpyreanTrinket: return ClapPart.Empyrean; + case IltInventory.WcidFalatacotTrinket: return ClapPart.Falatacot; + case 0: break; + default: return ClapPart.None; + } + if (name.Equals("Red Aetheria Chunk", StringComparison.OrdinalIgnoreCase)) return ClapPart.Red; + if (name.Equals("Blue Aetheria Chunk", StringComparison.OrdinalIgnoreCase)) return ClapPart.Blue; + if (name.Equals("Ancient Empyrean Trinket", StringComparison.OrdinalIgnoreCase)) return ClapPart.Empyrean; + if (name.Equals("Ancient Falatacot Trinket", StringComparison.OrdinalIgnoreCase)) return ClapPart.Falatacot; + return ClapPart.None; + } + + /// + /// True when /clap has a pair to work with: red material and an Empyrean Trinket, or blue + /// material and a Falatacot Trinket. One side alone gets "You don't have any aetheria materials". + /// Pure: the tests drive it. + /// + internal static bool CanClap(IEnumerable parts) + { + bool red = false, blue = false, empyrean = false, falatacot = false; + foreach (var part in parts) + { + switch (part) + { + case ClapPart.Red: red = true; break; + case ClapPart.Blue: blue = true; break; + case ClapPart.Empyrean: empyrean = true; break; + case ClapPart.Falatacot: falatacot = true; break; + } + } + return (red && empyrean) || (blue && falatacot); + } + private bool HasClapMaterials() { var inv = _ctx.Inventory; - foreach (var wo in inv.Items()) - { - uint w = inv.Wcid(wo); - if ((w == IltInventory.WcidRedAetheriaChunk || w == IltInventory.WcidBlueAetheriaChunk) - && inv.Int(wo, IltInventory.IntItemMaxLevel) <= 3) - return true; - string n = wo.Name; - if (n.Equals("Red Aetheria Chunk", StringComparison.OrdinalIgnoreCase) || n.Equals("Blue Aetheria Chunk", StringComparison.OrdinalIgnoreCase) - || n.Equals("Ancient Empyrean Trinket", StringComparison.OrdinalIgnoreCase) || n.Equals("Ancient Falatacot Trinket", StringComparison.OrdinalIgnoreCase)) - return true; - } - return false; + return CanClap(inv.Items().Where(wo => !inv.IsEquipped(wo)) + .Select(wo => ClapPartOf(inv.Wcid(wo), wo.Name, inv.Int(wo, IltInventory.IntItemMaxLevel)))); } /// Sends "/clap all" through the capture queue (reply stays visible). @@ -198,7 +252,7 @@ internal sealed class IltChunkClap : IIltFeature RynthLog.Trace(LogCat.IltGear, $"ClapNow(manual={manual})"); if (_ctx.Options.IsOff(IltFeature.Clap)) { _clapStatus = "/clap is not available (server or AutoCraftingEnabled stamp)"; return; } if (_ctx.Capture.IsPending("/clap all")) return; - if (!manual && !HasClapMaterials()) { _clapStatus = "no aetheria materials carried"; return; } + if (!manual && !HasClapMaterials()) { _clapStatus = "no aetheria and trinket pair carried (red + Empyrean, blue + Falatacot)"; return; } _clapStatus = "sending /clap all..."; _ctx.Capture.Enqueue(new IltChatRequest { @@ -307,7 +361,7 @@ internal sealed class IltChunkClap : IIltFeature ImGui.SetNextItemWidth(100); if (ImGui.InputInt("Chunk aetheria with max level below", ref under)) G.ChunkAetheriaUnderLevel = ClampUnderLevel(under); if (ImGui.IsItemHovered()) - ImGui.SetTooltip($"Infinite Leaftide aetheria goes up to level {IltInventory.AetheriaMaxLevel}; {IltInventory.AetheriaMaxLevel + 1} chunks every level."); + ImGui.SetTooltip($"Infinite Leaftide aetheria goes up to level {IltInventory.AetheriaMaxLevel}; {IltInventory.AetheriaMaxLevel + 1} chunks every level.\nApplies to Coalesced Aetheria too: it has its level before it is revealed."); bool kc = G.KeepAetheriaWithCrit, kcd = G.KeepAetheriaWithCritDamage, kcdr = G.KeepAetheriaWithCritDamageResist; ImGui.TextUnformatted("Never chunk aetheria with:"); ImGui.SameLine(); diff --git a/Plugins/RynthCore.Plugin.RynthILT/Hub/IltHubState.cs b/Plugins/RynthCore.Plugin.RynthILT/Hub/IltHubState.cs index b839669..164df6f 100644 --- a/Plugins/RynthCore.Plugin.RynthILT/Hub/IltHubState.cs +++ b/Plugins/RynthCore.Plugin.RynthILT/Hub/IltHubState.cs @@ -204,7 +204,7 @@ public sealed class IltGearState public bool ChunkInCombat; public int ChunkIntervalMs = 2000; /// - /// Only chunk aetheria whose max level is below this (Coalesced always chunks). Infinite Leaftide + /// Only chunk aetheria whose max level is below this (Coalesced Aetheria too). Infinite Leaftide /// aetheria goes up to level , so the cap runs to one past it. /// public int ChunkAetheriaUnderLevel = 4; diff --git a/Plugins/RynthCore.Plugin.RynthILT/Hub/IltInventory.cs b/Plugins/RynthCore.Plugin.RynthILT/Hub/IltInventory.cs index 272a233..6979973 100644 --- a/Plugins/RynthCore.Plugin.RynthILT/Hub/IltInventory.cs +++ b/Plugins/RynthCore.Plugin.RynthILT/Hub/IltInventory.cs @@ -36,8 +36,18 @@ internal sealed class IltInventory public const uint WcidSummonRefillCharm = 78780030; public const uint WcidUniversalMasteryCharm = 78780031; public static readonly uint[] WcidInfiniteCastingStone = { 777700019, 777700055 }; - public const uint WcidRedAetheriaChunk = 42636; - public const uint WcidBlueAetheriaChunk = 42635; + // Aetheria (ACECustom Aetheria.cs / PlayerCommands /clap). The Coalesced WCIDs stay the same once + // revealed (name "Aetheria", equipment set given), and /clap takes only unrevealed level 1-3 ones. + public const uint WcidBlueCoalescedAetheria = 42635; + public const uint WcidRedCoalescedAetheria = 42636; + public const uint WcidYellowCoalescedAetheria = 42637; + public const uint WcidRedAetheriaChunk = 310147; + public const uint WcidBlueAetheriaChunk = 310149; + public const uint WcidYellowAetheriaChunk = 310150; + public const uint WcidRedAetheriaPowder = 42644; + public const uint WcidBlueAetheriaPowder = 300019; + public const uint WcidEmpyreanTrinket = 34276; + public const uint WcidFalatacotTrinket = 34277; // ── Property ids used by several features ─────────────────────────────── public const uint IntStackSize = 12; diff --git a/Plugins/RynthCore.Plugin.RynthILT/RynthILTPlugin.cs b/Plugins/RynthCore.Plugin.RynthILT/RynthILTPlugin.cs index 7eeecdb..8b71be6 100644 --- a/Plugins/RynthCore.Plugin.RynthILT/RynthILTPlugin.cs +++ b/Plugins/RynthCore.Plugin.RynthILT/RynthILTPlugin.cs @@ -47,8 +47,8 @@ namespace RynthCore.Plugin.RynthILT; public sealed class RynthILTPlugin : RynthPluginBase { internal static readonly IntPtr NamePointer = Marshal.StringToHGlobalAnsi("RynthILT"); - // Previous release: 0.2.7. - internal static readonly IntPtr VersionPointer = Marshal.StringToHGlobalAnsi("0.2.8"); + // Previous release: 0.2.8. + internal static readonly IntPtr VersionPointer = Marshal.StringToHGlobalAnsi("0.2.9"); /// /// The settings view's surface. No longer in the sections manifest (the force-server override diff --git a/Tools/RynthCore.RynthAiHostTests/Tests/NavOverlayTests.cs b/Tools/RynthCore.RynthAiHostTests/Tests/NavOverlayTests.cs index bf707c5..8bf62a5 100644 --- a/Tools/RynthCore.RynthAiHostTests/Tests/NavOverlayTests.cs +++ b/Tools/RynthCore.RynthAiHostTests/Tests/NavOverlayTests.cs @@ -31,6 +31,35 @@ internal static class NavOverlayTests r.Add("nav overlay: the frame is a snapshot - emptying the route afterwards changes nothing", FrameIsSnapshot); r.Add("nav overlay: the label triangle budget holds for long names", TriangleBudget); r.Add("nav overlay: settings round-trip; an older engine's payload leaves them alone", SettingsRoundTrip); + r.Add("nav overlay: Settings > Navigation shows the Nav panel's Breadcrumbs and Route overlay switches", SettingsLinksNavPanelSwitches); + } + + /// + /// Settings > Navigation carries the Nav panel's two switches (NavOverlay.TrackBreadcrumbs and + /// ShowRouteMarkers), so either place changes the same setting. An engine that predates them + /// sends neither, and its save must leave them alone. + /// + private static void SettingsLinksNavPanelSwitches() + { + var s = new LegacyUiSettings(); + s.NavOverlay.TrackBreadcrumbs = false; + s.NavOverlay.ShowRouteMarkers = true; + var dash = (LegacyDashboardRenderer)System.Runtime.CompilerServices.RuntimeHelpers.GetUninitializedObject(typeof(LegacyDashboardRenderer)); + var flags = System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance; + typeof(LegacyDashboardRenderer).GetField("_settings", flags)!.SetValue(dash, s); + typeof(LegacyDashboardRenderer).GetField("_advancedSettingsUi", flags)!.SetValue(dash, new LegacyAdvancedSettingsUi(s)); + + var sent = JsonSerializer.Deserialize(dash.BuildSettingsJson(), RynthAiJsonContext.Default.SettingsBridgePayload)!; + Check.True(sent.TrackBreadcrumbs == false, "Breadcrumbs sent to the Settings face (off)"); + Check.True(sent.ShowRouteOverlay == true, "Route overlay sent to the Settings face (on)"); + + dash.ApplySettingsJson("{\"TrackBreadcrumbs\":true,\"ShowRouteOverlay\":false}"); + Check.True(s.NavOverlay.TrackBreadcrumbs, "Settings turns Breadcrumbs on (the Nav panel's switch)"); + Check.False(s.NavOverlay.ShowRouteMarkers, "Settings turns Route overlay off (the Nav panel's switch)"); + + dash.ApplySettingsJson("{\"NavRingThickness\":6}"); + Check.True(s.NavOverlay.TrackBreadcrumbs, "an older engine's save leaves Breadcrumbs alone"); + Check.False(s.NavOverlay.ShowRouteMarkers, "an older engine's save leaves Route overlay alone"); } // ── Rig ───────────────────────────────────────────────────────────── diff --git a/Tools/RynthILT.Tests/AetheriaChunkTests.cs b/Tools/RynthILT.Tests/AetheriaChunkTests.cs index 6a011b0..ce2810d 100644 --- a/Tools/RynthILT.Tests/AetheriaChunkTests.cs +++ b/Tools/RynthILT.Tests/AetheriaChunkTests.cs @@ -6,6 +6,7 @@ namespace RynthILT.Tests; // The Lugian-hammer aetheria rules (Hub/IltChunkClap.cs): Infinite Leaftide aetheria goes up to // level 10, and aetheria carrying a C, CD or CDR rating is kept unless its keep switch is off. // Only the Lugian Aetheria Hammer chunks, and ILT's result lines name the item and the tool. +// The cap covers Coalesced Aetheria too, and /clap needs a colour with its own trinket. internal static class AetheriaChunkTests { public static void Register(Runner r) @@ -14,6 +15,57 @@ internal static class AetheriaChunkTests r.Add("aetheria: C / CD / CDR ratings are kept by default, each with its own switch", Ratings); r.Add("chunk: only the Lugian Aetheria Hammer is the tool, never a Lugian Hammer weapon", HammerOnly); r.Add("chunk: ILT's result lines (item and tool named) end the wait; combat lines don't", ResultLines); + r.Add("aetheria: the level cap applies to Coalesced Aetheria too; no level read = never chunked", CoalescedCap); + r.Add("clap: the server's WCIDs, each colour paired with its trinket, Coalesced only unrevealed level 1-3", ClapPairs); + } + + /// + /// Coalesced Aetheria has its level from loot (ACECustom 1-10, ratings at 6+); it used to skip + /// the cap, so a cap of 9 still chunked a level 10 Coalesced piece. + /// + private static void CoalescedCap() + { + Check.True(IltChunkClap.UnderChunkCap(8, 9), "level 8 under a cap of 9"); + Check.False(IltChunkClap.UnderChunkCap(9, 9), "level 9 is not below 9"); + Check.False(IltChunkClap.UnderChunkCap(10, 9), "a level 10 Coalesced piece is kept"); + Check.True(IltChunkClap.UnderChunkCap(10, 11), "11 chunks every level"); + Check.False(IltChunkClap.UnderChunkCap(0, 11), "no level read: never chunked"); + } + + /// + /// ACECustom /clap: red (Coalesced 42636 at 1-3, chunk 310147, powder 42644) with Empyrean + /// Trinkets (34276); blue (42635, 310149, 300019) with Falatacot (34277). 42635/42636 were taken + /// for chunks, and one side alone counted, so auto-clap sent /clap with nothing to pair. + /// + private static void ClapPairs() + { + const string Co = "Coalesced Aetheria"; + Check.Eq(IltChunkClap.ClapPartOf(42636, Co, 2), IltChunkClap.ClapPart.Red, "red Coalesced level 2"); + Check.Eq(IltChunkClap.ClapPartOf(42635, Co, 3), IltChunkClap.ClapPart.Blue, "blue Coalesced level 3"); + Check.Eq(IltChunkClap.ClapPartOf(42636, Co, 0), IltChunkClap.ClapPart.Red, "level not read yet: the server decides"); + Check.Eq(IltChunkClap.ClapPartOf(42636, Co, 4), IltChunkClap.ClapPart.None, "level 4 Coalesced is not clapped"); + Check.Eq(IltChunkClap.ClapPartOf(42636, "Aetheria", 1), IltChunkClap.ClapPart.None, "revealed aetheria is not clapped"); + Check.Eq(IltChunkClap.ClapPartOf(42637, Co, 1), IltChunkClap.ClapPart.None, "yellow has no clap use"); + Check.Eq(IltChunkClap.ClapPartOf(310147, "Red Aetheria Chunk", 0), IltChunkClap.ClapPart.Red, "red chunk"); + Check.Eq(IltChunkClap.ClapPartOf(310149, "Blue Aetheria Chunk", 0), IltChunkClap.ClapPart.Blue, "blue chunk"); + Check.Eq(IltChunkClap.ClapPartOf(310150, "Yellow Aetheria Chunk", 0), IltChunkClap.ClapPart.None, "yellow chunk"); + Check.Eq(IltChunkClap.ClapPartOf(42644, "Aetheria Powder", 0), IltChunkClap.ClapPart.Red, "red powder"); + Check.Eq(IltChunkClap.ClapPartOf(300019, "Aetheria Powder", 0), IltChunkClap.ClapPart.Blue, "blue powder"); + Check.Eq(IltChunkClap.ClapPartOf(34276, "Ancient Empyrean Trinket", 0), IltChunkClap.ClapPart.Empyrean, "Empyrean trinket"); + Check.Eq(IltChunkClap.ClapPartOf(34277, "Ancient Falatacot Trinket", 0), IltChunkClap.ClapPart.Falatacot, "Falatacot trinket"); + Check.Eq(IltChunkClap.ClapPartOf(0, "Red Aetheria Chunk", 0), IltChunkClap.ClapPart.Red, "no WCID yet: the chunk name"); + Check.Eq(IltChunkClap.ClapPartOf(0, Co, 1), IltChunkClap.ClapPart.None, "no WCID yet: a Coalesced piece's colour is unknown"); + Check.Eq(IltChunkClap.ClapPartOf(273, "Pyreal", 0), IltChunkClap.ClapPart.None, "anything else"); + + var R = IltChunkClap.ClapPart.Red; var B = IltChunkClap.ClapPart.Blue; + var E = IltChunkClap.ClapPart.Empyrean; var F = IltChunkClap.ClapPart.Falatacot; + Check.True(IltChunkClap.CanClap(new[] { R, E }), "red + Empyrean"); + Check.True(IltChunkClap.CanClap(new[] { B, F }), "blue + Falatacot"); + Check.False(IltChunkClap.CanClap(new[] { R, F }), "red needs Empyrean, not Falatacot"); + Check.False(IltChunkClap.CanClap(new[] { B, E }), "blue needs Falatacot, not Empyrean"); + Check.False(IltChunkClap.CanClap(new[] { E, F }), "trinkets alone"); + Check.False(IltChunkClap.CanClap(new[] { R, B }), "aetheria alone"); + Check.False(IltChunkClap.CanClap(System.Array.Empty()), "nothing carried"); } ///