diff --git a/Changelog/2026-10-08-fix-buff-armor-tinkering-school.md b/Changelog/2026-10-08-fix-buff-armor-tinkering-school.md new file mode 100644 index 0000000..f7fb406 --- /dev/null +++ b/Changelog/2026-10-08-fix-buff-armor-tinkering-school.md @@ -0,0 +1,21 @@ +# Buffs - tinkering expertise spells are Creature Enchantment - 2026-10-08 + +## Fixed + +- **Armor Tinkering Expertise is cast with Creature Enchantment.** `BuffManager.SkillForBuff` + picks the magic school from the spell name and matched the Life Magic keyword "Armor" first, + so Armor Tinkering Expertise (and Prodigal Armor Expertise) took its tier from Life Magic, and + a character without Life Magic never cast it. Names with "Tinkering" or "Armor Expertise" are + now Creature Enchantment, checked before the Life Magic keywords. Armor, Incantation of Armor + and the protections stay Life Magic. + +## Files + +- `Plugins/RynthCore.Plugin.RynthAi/Combat/BuffManager.cs`: `SkillForBuff` tinkering rule. +- `Tools/RynthCore.RynthAiHostTests/Tests/BuffTests.cs`: the Armor Tinkering test is a normal + test now (was a known failure), and also checks the other tinkering expertise spells and that + the Life Magic armor buffs are unchanged. + +## Checks + +- `buff` host tests: 35 passed, 0 known failures. diff --git a/Plugins/RynthCore.Plugin.RynthAi/Combat/BuffManager.cs b/Plugins/RynthCore.Plugin.RynthAi/Combat/BuffManager.cs index 66272b3..22300af 100644 --- a/Plugins/RynthCore.Plugin.RynthAi/Combat/BuffManager.cs +++ b/Plugins/RynthCore.Plugin.RynthAi/Combat/BuffManager.cs @@ -3755,6 +3755,11 @@ public class BuffManager : IDisposable name.Contains("Bane")) return AcSkillType.ItemEnchantment; + // Tinkering skill buffs (Armor Tinkering Expertise, Prodigal Armor Expertise) are Creature + // Enchantment; checked before the Life Magic "Armor" match below. + if (name.Contains("Tinkering") || name.Contains("Armor Expertise")) + return AcSkillType.CreatureEnchantment; + if (name.Contains("Protection") || name.Contains("Armor") || name.Contains("Regeneration") || name.Contains("Rejuvenation") || name.Contains("Renewal") || name == "Harlune's Blessing" || diff --git a/Tools/RynthCore.RynthAiHostTests/Tests/BuffTests.cs b/Tools/RynthCore.RynthAiHostTests/Tests/BuffTests.cs index e996a29..1671d0f 100644 --- a/Tools/RynthCore.RynthAiHostTests/Tests/BuffTests.cs +++ b/Tools/RynthCore.RynthAiHostTests/Tests/BuffTests.cs @@ -62,9 +62,7 @@ internal static class BuffTests r.Add("buff choice: a mastery whose name has several spell ids", MultiIdMastery); // was a known failure; fixed by 0aedcee r.Add("buff timers: tier-8 weapon auras last 90 minutes", TierEightAuras); // was a known failure; fixed by 9a317a8 r.Add("buff chat: another player's speech can't record a buff timer", SpeechIsNotACast); // was a known failure; fixed by 0e384d2 - r.KnownFailure("buff school: Armor Tinkering Expertise is a Creature Enchantment spell", - "SkillForBuff matches \"Armor\" first and files it under Life Magic: its tier comes from Life Magic, and a character without Life Magic never casts it (not fixed on any branch)", - ArmorTinkeringSchool); + r.Add("buff school: Armor Tinkering Expertise is a Creature Enchantment spell", ArmorTinkeringSchool); // was a known failure } // ── Rig ─────────────────────────────────────────────────────────────────── @@ -401,7 +399,12 @@ internal static class BuffTests private static void ArmorTinkeringSchool() { - Check.Eq(BuffManager.SkillForBuff("Armor Tinkering Expertise"), AcSkillType.CreatureEnchantment, "Armor Tinkering Expertise"); + foreach (string n in new[] { "Armor Tinkering Expertise", "Item Tinkering Expertise", "Weapon Tinkering Expertise", + "Magic Item Tinkering Expertise", "Prodigal Armor Expertise", "Incantation of Armor Tinkering Expertise" }) + Check.Eq(BuffManager.SkillForBuff(n), AcSkillType.CreatureEnchantment, n); + // The "Armor" keyword still files real Life Magic armor buffs under Life. + foreach (string n in new[] { "Armor", "Incantation of Armor", "Prodigal Armor", "Blade Protection", "Regeneration" }) + Check.Eq(BuffManager.SkillForBuff(n), AcSkillType.LifeMagic, n); } private static void ItemEnchantments()