diff --git a/CHANGELOG.md b/CHANGELOG.md index 678e5b5..a7d1efb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ ## Version 1.2.5 * Aeon * Aeon Bane now once again supports dispel on non attack roll spells. +* Mythic Abilities + * Archmage Armor + * No longer works when cast from items. + * Now requires knowing Mage Armor as a prerequisite. ## Version 1.2.4 * Mythic Abilities diff --git a/TabletopTweaks-Reworks/Config/Homebrew.json b/TabletopTweaks-Reworks/Config/Homebrew.json index 4f7f8a9..8593d3d 100644 --- a/TabletopTweaks-Reworks/Config/Homebrew.json +++ b/TabletopTweaks-Reworks/Config/Homebrew.json @@ -19,6 +19,11 @@ "Homebrew": true, "Description": "Now grants two bonus casts instead of four." }, + "ArchmageArmor": { + "Enabled": true, + "Homebrew": true, + "Description": "No longer works when cast from items and requires you know mage armor as a prerequisite." + }, "DimensionalRetribution": { "Enabled": true, "Homebrew": true, diff --git a/TabletopTweaks-Reworks/Patches/MythicAbilities.cs b/TabletopTweaks-Reworks/Patches/MythicAbilities.cs index 5137ef7..a6a914c 100644 --- a/TabletopTweaks-Reworks/Patches/MythicAbilities.cs +++ b/TabletopTweaks-Reworks/Patches/MythicAbilities.cs @@ -23,7 +23,9 @@ using TabletopTweaks.Core.NewComponents; using TabletopTweaks.Core.NewComponents.AbilitySpecific; using TabletopTweaks.Core.NewComponents.OwlcatReplacements; +using TabletopTweaks.Core.NewComponents.Prerequisites; using TabletopTweaks.Core.Utilities; +using static Kingmaker.Blueprints.Classes.Prerequisites.Prerequisite; using static TabletopTweaks.Reworks.Main; namespace TabletopTweaks.Reworks.Reworks { @@ -346,12 +348,25 @@ static class BlueprintsCache_Init_Patch { TTTContext.Logger.LogPatch(UnrelentingAssaultEffectBuff); } static void PatchArchmageArmor() { - if (Main.TTTContext.Homebrew.MythicAbilities.IsDisabled("GreaterEnduringSpells")) { return; } + if (Main.TTTContext.Homebrew.MythicAbilities.IsDisabled("ArchmageArmor")) { return; } var ArchmageArmor = BlueprintTools.GetBlueprint("c3ef5076c0feb3c4f90c229714e62cd0"); + var ArcanistExploitArmoredMaskAbility = BlueprintTools.GetBlueprint("2d7d510c6e2e3e54ab9eee84a41fa2cf"); var MageArmor = BlueprintTools.GetBlueprint("9e1ad5d6f87d19e4d8883d63a6e35568"); var MageArmorBuffMythic = BlueprintTools.GetBlueprint("355be0688dabc21409f37942d637cdab"); + ArchmageArmor.TemporaryContext(bp => { + bp.AddPrerequisite(p => { + p.m_Spell = MageArmor.ToReference(); + p.RequireSpellbook = false; + p.Group = GroupType.Any; + }); + bp.AddPrerequisite(p => { + p.m_Spell = ArcanistExploitArmoredMaskAbility.ToReference(); + p.RequireSpellbook = false; + p.Group = GroupType.Any; + }); + }); MageArmor.TemporaryContext(bp => { bp.FlattenAllActions().OfType().ForEach(a => { a.ConditionsChecker.Conditions = a.ConditionsChecker.Conditions.AppendToArray(