using RynthCore.Plugin.RynthILT.Hub; using RynthCore.RynthAiTests.Harness; 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. internal static class AetheriaChunkTests { public static void Register(Runner r) { r.Add("aetheria: the chunk cap runs to one past ILT's level 10", Cap); 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); } /// /// Silentkelpie 2026-10-15: the Flaming Lugian Hammer (a loot weapon) matched " Lugian Hammer", /// chunked nothing, and all 9 Coalesced Aetheria timed out into the skip list. /// private static void HammerOnly() { Check.True(IltChunkClap.IsChunkHammer("Lugian Aetheria Hammer"), "the ILT tool"); Check.True(IltChunkClap.IsChunkHammer("lugian aetheria hammer"), "any case"); Check.False(IltChunkClap.IsChunkHammer("Flaming Lugian Hammer"), "a loot weapon is not the tool"); Check.False(IltChunkClap.IsChunkHammer("Lugian Hammer"), "nor the plain one"); Check.False(IltChunkClap.IsChunkHammer("Acid Lugian Hammer"), "nor any variant"); } private static void ResultLines() { Check.Eq(IltChunkClap.ClassifyChat("You smash the Corrupted Sword with the Lugian Aetheria Hammer."), IltChunkClap.ChunkResult.Done, "ILT corrupted line"); Check.Eq(IltChunkClap.ClassifyChat("You smash the aetheria with the hammer."), IltChunkClap.ChunkResult.Done, "aetheria line"); Check.Eq(IltChunkClap.ClassifyChat("The aetheria is too powerful to chunk."), IltChunkClap.ChunkResult.Refused, "refused"); Check.Eq(IltChunkClap.ClassifyChat("You're too busy!"), IltChunkClap.ChunkResult.Busy, "busy"); Check.Eq(IltChunkClap.ClassifyChat("You smash Corrupted Shadow for 147 points of bludgeoning damage!"), IltChunkClap.ChunkResult.None, "a combat line naming a corrupted monster is no result"); } private static void Cap() { Check.Eq(IltInventory.AetheriaMaxLevel, 10, "ILT max aetheria level"); Check.Eq(IltChunkClap.ClampUnderLevel(0), 1, "below 1 clamps to 1"); Check.Eq(IltChunkClap.ClampUnderLevel(7), 7, "7 (retail clamp was 6) is allowed"); Check.Eq(IltChunkClap.ClampUnderLevel(11), 11, "11 chunks every level"); Check.Eq(IltChunkClap.ClampUnderLevel(50), 11, "above 11 clamps to 11"); Check.Eq(new IltGearState().ChunkAetheriaUnderLevel, 4, "the default cap is unchanged"); } private static void Ratings() { var g = new IltGearState(); Check.True(g.KeepAetheriaWithCrit && g.KeepAetheriaWithCritDamage && g.KeepAetheriaWithCritDamageResist, "all keep switches on by default"); Check.False(IltChunkClap.KeptForRatings(g, 0, 0, 0), "no rating: chunkable"); Check.True(IltChunkClap.KeptForRatings(g, 2, 0, 0), "C kept"); Check.True(IltChunkClap.KeptForRatings(g, 0, 1, 0), "CD kept"); Check.True(IltChunkClap.KeptForRatings(g, 0, 0, 3), "CDR kept"); g.KeepAetheriaWithCrit = false; Check.False(IltChunkClap.KeptForRatings(g, 2, 0, 0), "C chunkable with its switch off"); Check.True(IltChunkClap.KeptForRatings(g, 2, 0, 3), "CDR still keeps a C+CDR sigil"); g.KeepAetheriaWithCritDamage = false; g.KeepAetheriaWithCritDamageResist = false; Check.False(IltChunkClap.KeptForRatings(g, 3, 3, 3), "every switch off: ratings don't protect"); } }