Skip to content

Commit

Permalink
Updated Archmage armor
Browse files Browse the repository at this point in the history
  • Loading branch information
Vek17 committed Mar 24, 2023
1 parent 25d5d46 commit e52f257
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 5 additions & 0 deletions TabletopTweaks-Reworks/Config/Homebrew.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
17 changes: 16 additions & 1 deletion TabletopTweaks-Reworks/Patches/MythicAbilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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<BlueprintFeature>("c3ef5076c0feb3c4f90c229714e62cd0");
var ArcanistExploitArmoredMaskAbility = BlueprintTools.GetBlueprint<BlueprintAbility>("2d7d510c6e2e3e54ab9eee84a41fa2cf");
var MageArmor = BlueprintTools.GetBlueprint<BlueprintAbility>("9e1ad5d6f87d19e4d8883d63a6e35568");
var MageArmorBuffMythic = BlueprintTools.GetBlueprint<BlueprintBuff>("355be0688dabc21409f37942d637cdab");

ArchmageArmor.TemporaryContext(bp => {
bp.AddPrerequisite<PrerequisiteSpellKnown>(p => {
p.m_Spell = MageArmor.ToReference<BlueprintAbilityReference>();
p.RequireSpellbook = false;
p.Group = GroupType.Any;
});
bp.AddPrerequisite<PrerequisiteSpellKnown>(p => {
p.m_Spell = ArcanistExploitArmoredMaskAbility.ToReference<BlueprintAbilityReference>();
p.RequireSpellbook = false;
p.Group = GroupType.Any;
});
});
MageArmor.TemporaryContext(bp => {
bp.FlattenAllActions().OfType<Conditional>().ForEach(a => {
a.ConditionsChecker.Conditions = a.ConditionsChecker.Conditions.AppendToArray(
Expand Down

0 comments on commit e52f257

Please sign in to comment.