diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f69e5a2..c2285632 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## Version 1.9.3 * Added new modified version of Armor Master as a homebrew option +* Updated icon for Aeon Bane +* Minor fixes to nestest activatable abilities +* Aberant bloodline should now work correctly with Mixed Blood Bloodrager +* Destined bloodline should now work correctly with Mixed Blood Bloodrager ## Version 1.9.2 * Removed the movement impairing descriptor from staggered diff --git a/TabletopTweaks/Bugfixes/UI/FeatureSelection.cs b/TabletopTweaks/Bugfixes/UI/FeatureSelection.cs index 32a1278c..49ca0879 100644 --- a/TabletopTweaks/Bugfixes/UI/FeatureSelection.cs +++ b/TabletopTweaks/Bugfixes/UI/FeatureSelection.cs @@ -7,7 +7,7 @@ namespace TabletopTweaks.Bugfixes.UI { static class FeatureSelection { - [HarmonyPatch(typeof(NestedFeatureSelectionUtils), "AllNestedFeaturesUnavailable", new[] { typeof(UnitDescriptor), typeof(LevelUpState), typeof(FeatureSelectionState), typeof(BlueprintFeature) })] + //[HarmonyPatch(typeof(NestedFeatureSelectionUtils), "AllNestedFeaturesUnavailable", new[] { typeof(UnitDescriptor), typeof(LevelUpState), typeof(FeatureSelectionState), typeof(BlueprintFeature) })] static class NestedFeatureSelectionUtils_AllNestedFeaturesUnavailable_Patch { static bool Prefix(ref bool __result, UnitDescriptor unit, LevelUpState state, FeatureSelectionState selectionState, BlueprintFeature feature) { IFeatureSelection selection = (feature as IFeatureSelection); @@ -17,7 +17,7 @@ static bool Prefix(ref bool __result, UnitDescriptor unit, LevelUpState state, F return false; } } - [HarmonyPatch(typeof(FeatureSelectionExtensions), "CanSelectAny", new[] { typeof(IFeatureSelection), typeof(UnitDescriptor), typeof(LevelUpState), typeof(FeatureSelectionState) })] + //[HarmonyPatch(typeof(FeatureSelectionExtensions), "CanSelectAny", new[] { typeof(IFeatureSelection), typeof(UnitDescriptor), typeof(LevelUpState), typeof(FeatureSelectionState) })] static class FeatureSelectionExtensions_CanSelectAny_Patch { static bool Prefix(ref bool __result, IFeatureSelection selection, UnitDescriptor unit, LevelUpState state, FeatureSelectionState selectionState) { FeatureSelectionState newSelectionState = new FeatureSelectionState(selectionState, selectionState.Source, selection, 0, 0); diff --git a/TabletopTweaks/Config/Blueprints.json b/TabletopTweaks/Config/Blueprints.json index 3896c859..d8a1061a 100644 --- a/TabletopTweaks/Config/Blueprints.json +++ b/TabletopTweaks/Config/Blueprints.json @@ -49,6 +49,7 @@ "BloodragerAberrantAbnormalReachBuff": "d447b775-3acd-4c72-b3e7-3489508772af", "BloodragerAberrantBaseBuff": "d0b261cf-cb9a-4223-b36e-b132f4bd302b", "BloodragerAberrantBloodline": "540390e4-7356-4601-9137-625a37910df0", + "BloodragerAberrantBloodlineWandering": "188983cb-a4b9-4ab0-a8b5-b9f96dab06e3", "BloodragerAberrantFeatSelection": "78ffea9a-643e-4c60-8cbb-6798c894c3b4", "BloodragerAberrantFeatSelectionGreenrager": "5c4d1685-cae4-446f-883c-4db9a09e8d68", "BloodragerAberrantForm": "cbc0ba36-8e8e-4c60-b0f8-218c1711e445", @@ -122,6 +123,7 @@ "BloodragerDestinedAbility": "4c3f4703-f03d-4759-9261-6e81d8fbcf72", "BloodragerDestinedBaseBuff": "5fd6712d-428b-4112-853e-24bd2f8f8a7b", "BloodragerDestinedBloodline": "7076fd5a-ffd1-4207-9ac6-c9ff4882c16e", + "BloodragerDestinedBloodlineWandering": "5f609b85-d5c0-4d04-977d-0e906d4f7abf", "BloodragerDestinedCertainStrike": "6edb06a6-c96c-433d-a06c-b66a33897df7", "BloodragerDestinedCertainStrikeBuff": "6ac01a69-ab51-46f9-9f63-4a4c325d76fa", "BloodragerDestinedDefyDeath": "092250b1-e7af-4ea7-a169-1a3695f76b3b", diff --git a/TabletopTweaks/Config/Homebrew.json b/TabletopTweaks/Config/Homebrew.json index da37c8ac..5e78ae37 100644 --- a/TabletopTweaks/Config/Homebrew.json +++ b/TabletopTweaks/Config/Homebrew.json @@ -7,6 +7,11 @@ "Homebrew": true, "Description": "Aeon Bane is now a free action to activate instead of a swift." }, + "AeonBaneIcon": { + "Enabled": true, + "Homebrew": true, + "Description": "Update Aeon Bane's Icon." + }, "AeonBaneSpellResistance": { "Enabled": true, "Homebrew": true, diff --git a/TabletopTweaks/Info.json b/TabletopTweaks/Info.json index 6644869f..af98aefb 100644 --- a/TabletopTweaks/Info.json +++ b/TabletopTweaks/Info.json @@ -9,5 +9,5 @@ "ManagerVersion": "0.23.0", "Repository": "https://raw.githubusercontent.com/Vek17/WrathMods-TabletopTweaks/master/Repository.json", "Requirements": [], - "Version": "1.9.2" + "Version": "1.9.3" } \ No newline at end of file diff --git a/TabletopTweaks/MythicReworks/Aeon.cs b/TabletopTweaks/MythicReworks/Aeon.cs index ca54c702..c544cece 100644 --- a/TabletopTweaks/MythicReworks/Aeon.cs +++ b/TabletopTweaks/MythicReworks/Aeon.cs @@ -47,6 +47,7 @@ static void Postfix() { Initialized = true; Main.LogHeader("Aeon Rework"); + PatchAeonBaneIcon(); PatchAeonBaneAction(); PatchAeonBaneSpellResistance(); PatchAeonBaneUses(); @@ -58,6 +59,16 @@ static void Postfix() { PatchAeonGazeSelection(); } + static void PatchAeonBaneIcon() { + if (ModSettings.Homebrew.MythicReworks.Aeon.IsDisabled("AeonBaneIcon")) { return; } + var Icon_AeonBane = AssetLoader.LoadInternal("Abilities", "Icon_AeonBane.png"); + var AeonBaneFeature = Resources.GetBlueprint("0b25e8d8b0488c84c9b5714e9ca0a204"); + var AeonBaneAbility = Resources.GetBlueprint("67fb31f553f2bb14bbfae0b1040169f1"); + AeonBaneFeature.m_Icon = Icon_AeonBane; + AeonBaneAbility.m_Icon = Icon_AeonBane; + Main.LogPatch("Patched", AeonBaneFeature); + Main.LogPatch("Patched", AeonBaneAbility); + } static void PatchAeonBaneAction() { if (ModSettings.Homebrew.MythicReworks.Aeon.IsDisabled("AeonBaneAction")) { return; } var AeonBaneAbility = Resources.GetBlueprint("67fb31f553f2bb14bbfae0b1040169f1"); diff --git a/TabletopTweaks/NewContent/Bloodlines/AberrantBloodline.cs b/TabletopTweaks/NewContent/Bloodlines/AberrantBloodline.cs index d9e4fdec..35e3b0b9 100644 --- a/TabletopTweaks/NewContent/Bloodlines/AberrantBloodline.cs +++ b/TabletopTweaks/NewContent/Bloodlines/AberrantBloodline.cs @@ -64,10 +64,12 @@ public static void AddBloodragerAberrantBloodline() { + "throw or be staggered for 1 round. The DC of this save is equal to 10 + 1/2 your bloodrager level + your " + "Constitution modifier. These effects stack with the Staggering Critical feat; the target must save against " + "each effect individually."); + bp.IsClassFeature = true; }); var BloodragerAberrantStaggeringStrikeBuff = Helpers.CreateBuff("BloodragerAberrantStaggeringStrikeBuff", bp => { bp.SetName(BloodragerAberrantStaggeringStrike.Name); bp.SetDescription(BloodragerAberrantStaggeringStrike.Description); + bp.IsClassFeature = true; bp.m_Flags = BlueprintBuff.Flags.HiddenInUi; var Staggered = Resources.GetBlueprint("df3950af5a783bd4d91ab73eb8fa0fd3").ToReference(); @@ -105,10 +107,12 @@ public static void AddBloodragerAberrantBloodline() { var BloodragerAberrantAbnormalReach = Helpers.CreateBlueprint("BloodragerAberrantAbnormalReach", bp => { bp.SetName("Abnormal Reach"); bp.SetDescription("At 4th level, your limbs elongate and your reach increases by 5 feet."); + bp.IsClassFeature = true; }); var BloodragerAberrantAbnormalReachBuff = Helpers.CreateBuff("BloodragerAberrantAbnormalReachBuff", bp => { bp.SetName(BloodragerAberrantAbnormalReach.Name); bp.SetDescription(BloodragerAberrantAbnormalReach.Description); + bp.IsClassFeature = true; bp.m_Flags = BlueprintBuff.Flags.HiddenInUi; bp.AddComponent(c => { c.Descriptor = ModifierDescriptor.UntypedStackable; @@ -119,10 +123,12 @@ public static void AddBloodragerAberrantBloodline() { var BloodragerAberrantFortitude = Helpers.CreateBlueprint("BloodragerAberrantFortitude", bp => { bp.SetName("Aberrant Fortitude"); bp.SetDescription("At 8th level, you become immune to the sickened and nauseated conditions."); + bp.IsClassFeature = true; }); var BloodragerAberrantFortitudeBuff = Helpers.CreateBuff("BloodragerAberrantFortitudeBuff", bp => { bp.SetName(BloodragerAberrantFortitude.Name); bp.SetDescription(BloodragerAberrantFortitude.Description); + bp.IsClassFeature = true; bp.m_Flags = BlueprintBuff.Flags.HiddenInUi; bp.AddComponent(c => { c.Condition = UnitCondition.Sickened; @@ -141,10 +147,12 @@ public static void AddBloodragerAberrantBloodline() { bp.SetName("Unusual Anatomy"); bp.SetDescription("At 12th level, your internal anatomy shifts and changes, giving you a 50% chance to negate " + "any critical hit or sneak attack that hits you. The damage is instead rolled normally."); + bp.IsClassFeature = true; }); var BloodragerAberrantUnusualAnatomyBuff = Helpers.CreateBuff("BloodragerAberrantUnusualAnatomyBuff", bp => { bp.SetName(BloodragerAberrantUnusualAnatomy.Name); bp.SetDescription(BloodragerAberrantUnusualAnatomy.Description); + bp.IsClassFeature = true; bp.m_Flags = BlueprintBuff.Flags.HiddenInUi; bp.AddComponent(c => { c.UseContextValue = false; @@ -154,10 +162,12 @@ public static void AddBloodragerAberrantBloodline() { var BloodragerAberrantResistance = Helpers.CreateBlueprint("BloodragerAberrantResistance", bp => { bp.SetName("Aberrant Resistance"); bp.SetDescription("At 16th level, you are immune to disease, exhaustion, fatigue, and poison, and to the staggered condition."); + bp.IsClassFeature = true; }); var BloodragerAberrantResistanceBuff = Helpers.CreateBuff("BloodragerAberrantResistanceBuff", bp => { bp.SetName(BloodragerAberrantResistance.Name); bp.SetDescription(BloodragerAberrantResistance.Description); + bp.IsClassFeature = true; bp.m_Flags = BlueprintBuff.Flags.HiddenInUi; bp.AddComponent(c => { c.Condition = UnitCondition.Fatigued; @@ -180,6 +190,7 @@ public static void AddBloodragerAberrantBloodline() { bp.SetDescription("At 20th level, your body becomes truly unnatural. You are immune to critical hits and sneak attacks. " + "In addition, you gain blindsight with a range of 60 feet and your bloodrager damage reduction increases by 1. " + "You have these benefits constantly, even while not bloodraging."); + bp.IsClassFeature = true; bp.AddComponent(c => { c.Range.m_Value = 60; c.Blindsight = true; @@ -208,6 +219,7 @@ public static void AddBloodragerAberrantBloodline() { var BloodragerAberrantFeatSelection = Helpers.CreateBlueprint("BloodragerAberrantFeatSelection", bp => { bp.SetName("Bonus Feats"); bp.SetDescription("Bonus Feats: Combat Reflexes, Great Fortitude, Improved Disarm, Improved Dirty Trick, Improved Initiative, Improved Unarmed Strike, Iron Will."); + bp.IsClassFeature = true; bp.Ranks = 1; bp.IsClassFeature = true; bp.HideNotAvailibleInUI = true; @@ -243,6 +255,7 @@ public static void AddBloodragerAberrantBloodline() { var spell = EnlargePerson; bp.SetName($"Bonus Spell — {EnlargePerson.Get().Name}"); bp.SetDescription("At 7th, 10th, 13th, and 16th levels, a bloodrager learns an additional spell derived from his bloodline."); + bp.IsClassFeature = true; bp.AddComponent(c => { c.m_CharacterClass = BloodragerClass; c.m_Spell = spell; @@ -253,6 +266,7 @@ public static void AddBloodragerAberrantBloodline() { var spell = SeeInvisibility; bp.SetName($"Bonus Spell — {EnlargePerson.Get().Name}"); bp.SetDescription("At 7th, 10th, 13th, and 16th levels, a bloodrager learns an additional spell derived from his bloodline."); + bp.IsClassFeature = true; bp.AddComponent(c => { c.m_CharacterClass = BloodragerClass; c.m_Spell = spell; @@ -263,6 +277,7 @@ public static void AddBloodragerAberrantBloodline() { var spell = Displacement; bp.SetName($"Bonus Spell — {EnlargePerson.Get().Name}"); bp.SetDescription("At 7th, 10th, 13th, and 16th levels, a bloodrager learns an additional spell derived from his bloodline."); + bp.IsClassFeature = true; bp.AddComponent(c => { c.m_CharacterClass = BloodragerClass; c.m_Spell = spell; @@ -273,6 +288,7 @@ public static void AddBloodragerAberrantBloodline() { var spell = SpikeStones; bp.SetName($"Bonus Spell — {EnlargePerson.Get().Name}"); bp.SetDescription("At 7th, 10th, 13th, and 16th levels, a bloodrager learns an additional spell derived from his bloodline."); + bp.IsClassFeature = true; bp.AddComponent(c => { c.m_CharacterClass = BloodragerClass; c.m_Spell = spell; @@ -286,6 +302,7 @@ public static void AddBloodragerAberrantBloodline() { + "While bloodraging, you gain the abilities and immunities of some aberrations, but show signs of your tainted heritage.\n" + BloodragerAberrantFeatSelection.Description + "\nBonus Spells: Enlarge Person (7th), See Invisibility (10th), Displacement (13th), Spike Stones (16th)."); + bp.IsClassFeature = true; bp.m_Classes = new BlueprintProgression.ClassWithLevel[] { new BlueprintProgression.ClassWithLevel { m_Class = BloodragerClass @@ -322,8 +339,13 @@ public static void AddBloodragerAberrantBloodline() { Helpers.CreateUIGroup(BloodragerAberrantFeatSelection, BloodragerAberrantFeatSelectionGreenrager) }; }); + var BloodragerAberrantBloodlineWandering = BloodlineTools.CreateMixedBloodFeature("BloodragerAberrantBloodlineWandering", BloodragerAberrantBloodline, bp => { + bp.m_Icon = AssetLoader.LoadInternal("Abilities", "Icon_AberrantBloodline.png"); + }); var BloodragerAberrantBaseBuff = Helpers.CreateBuff("BloodragerAberrantBaseBuff", bp => { + bp.SetName("Aberrant Bloodrage"); bp.m_Flags = BlueprintBuff.Flags.HiddenInUi; + bp.IsClassFeature = true; }); BloodragerAberrantBaseBuff.AddConditionalBuff(BloodragerAberrantStaggeringStrike, BloodragerAberrantStaggeringStrikeBuff); @@ -339,7 +361,7 @@ public static void AddBloodragerAberrantBloodline() { BloodlineTools.ApplyPrimalistException(BloodragerAberrantResistance, 16, BloodragerAberrantBloodline); BloodlineTools.ApplyPrimalistException(BloodragerAberrantForm, 20, BloodragerAberrantBloodline); if (ModSettings.AddedContent.Bloodlines.IsDisabled("AberrantBloodline")) { return; } - BloodlineTools.RegisterBloodragerBloodline(BloodragerAberrantBloodline); + BloodlineTools.RegisterBloodragerBloodline(BloodragerAberrantBloodline, BloodragerAberrantBloodlineWandering); } public static void AddSorcererAberrantBloodline() { var SorcererClass = Resources.GetBlueprint("b3a505fb61437dc4097f43c3f8f9a4cf").ToReference(); @@ -517,7 +539,7 @@ public static void AddSorcererAberrantBloodline() { ValueRank = AbilityRankType.StatBonus }; }); - bp.AddComponent(Helpers.CreateContextRankConfig(c => { + bp.AddContextRankConfig(c => { c.m_Type = AbilityRankType.StatBonus; c.m_BaseValueType = ContextRankBaseValueType.SummClassLevelWithArchetype; c.m_Progression = ContextRankProgression.BonusValue; @@ -525,12 +547,13 @@ public static void AddSorcererAberrantBloodline() { c.m_Max = 20; c.m_Class = new BlueprintCharacterClassReference[] { SorcererClass, MagusClass }; c.Archetype = EldritchScionArchetype; - })); + }); }); var SorcererAberrantForm = Helpers.CreateBlueprint("SorcererAberrantForm", bp => { bp.SetName("Aberrant Form"); bp.SetDescription("At 20th level, your body becomes truly unnatural. You are immune to critical hits and sneak attacks. +" + "In addition, you gain blindsight with a range of 60 feet and damage reduction 5/—"); + bp.IsClassFeature = true; bp.AddComponent(c => { c.Range.m_Value = 60; c.Blindsight = true; diff --git a/TabletopTweaks/NewContent/Bloodlines/DestinedBloodline.cs b/TabletopTweaks/NewContent/Bloodlines/DestinedBloodline.cs index 26b8e69b..7722dc14 100644 --- a/TabletopTweaks/NewContent/Bloodlines/DestinedBloodline.cs +++ b/TabletopTweaks/NewContent/Bloodlines/DestinedBloodline.cs @@ -84,6 +84,7 @@ public static void AddBloodragerDestinedBloodline() { bp.Ranks = 5; bp.SetName("Destined Strike"); bp.SetDescription("You can grant yourself an insight bonus equal to 1/2 your bloodrager level (minimum 1) on one melee attack."); + bp.IsClassFeature = true; bp.m_Icon = TrueStrike.Icon; bp.AddComponent(Helpers.Create(c => { c.Descriptor = ModifierDescriptor.Insight; @@ -148,6 +149,7 @@ public static void AddBloodragerDestinedBloodline() { var BloodragerDestinedStrike = Helpers.CreateBlueprint("BloodragerDestinedStrike", bp => { bp.SetName(BloodragerDestinedStrikeAbility.Name); bp.SetDescription(BloodragerDestinedStrikeAbility.Description); + bp.IsClassFeature = true; bp.AddComponent(Helpers.Create(c => { c.m_Facts = new BlueprintUnitFactReference[] { BloodragerDestinedStrikeAbility.ToReference(), @@ -165,12 +167,14 @@ public static void AddBloodragerDestinedBloodline() { bp.SetName("Fated Bloodrager"); bp.SetDescription("At 4th level, you gain a +1 luck bonus to AC and on saving throws. At 8th level and every " + "4 levels thereafter, this bonus increases by 1 (to a maximum of +5 at 20th level)."); + bp.IsClassFeature = true; bp.Ranks = 5; }); var BloodragerDestinedFatedBloodragerBuff = Helpers.CreateBuff("BloodragerDestinedFatedBloodragerBuff", bp => { bp.m_Flags = BlueprintBuff.Flags.HiddenInUi; bp.SetName(BloodragerDestinedFatedBloodrager.Name); bp.SetDescription(BloodragerDestinedFatedBloodrager.Description); + bp.IsClassFeature = true; bp.AddComponent(Helpers.Create(c => { c.Descriptor = ModifierDescriptor.Luck; c.Stat = StatType.AC; @@ -218,12 +222,14 @@ public static void AddBloodragerDestinedBloodline() { bp.SetName("Certain Strike"); bp.SetDescription("At 8th level, you may reroll an attack roll once during a bloodrage. You must decide to use this ability after " + "the die is rolled, but before the GM reveals the results. You must take the second result, even if it’s worse."); + bp.IsClassFeature = true; }); var BloodragerDestinedCertainStrikeBuff = Helpers.CreateBuff("BloodragerDestinedCertainStrikeBuff", bp => { //bp.m_Flags = BlueprintBuff.Flags.HiddenInUi; bp.m_Icon = LuckDomain.Icon; bp.SetName(BloodragerDestinedCertainStrike.Name); bp.SetDescription(BloodragerDestinedCertainStrike.Description); + bp.IsClassFeature = true; bp.AddComponent(Helpers.Create(c => { c.RerollOnlyIfFailed = true; c.Rule = RuleType.AttackRoll; @@ -252,6 +258,7 @@ public static void AddBloodragerDestinedBloodline() { bp.SetDescription("At 12th level, once per day when an attack or spell that deals damage would result in your death" + ", you can attempt a DC 20 Fortitude save. If you succeed, you are instead reduced to 1 hit point; if you " + "succeed and already have less than 1 hit point, you instead take no damage."); + bp.IsClassFeature = true; bp.AddComponent(Helpers.Create(c => { c.m_Resource = BloodragerDestinedDefyDeathResource.ToReference(); c.RestoreAmount = true; @@ -261,6 +268,7 @@ public static void AddBloodragerDestinedBloodline() { bp.m_Flags = BlueprintBuff.Flags.HiddenInUi; bp.SetName(BloodragerDestinedDefyDeath.Name); bp.SetDescription(BloodragerDestinedDefyDeath.Description); + bp.IsClassFeature = true; bp.AddComponent(Helpers.Create(c => { c.DC = 20; c.Type = SavingThrowType.Fortitude; @@ -274,10 +282,12 @@ public static void AddBloodragerDestinedBloodline() { bp.SetName("Unstoppable "); bp.SetDescription("At 16th level, any critical threats you score are automatically confirmed. Any critical " + "threats made against you confirm only if the second roll results in a natural 20 (or is automatically confirmed)."); + bp.IsClassFeature = true; }); var BloodragerDestinedUnstoppableBuff = Helpers.CreateBuff("BloodragerDestinedUnstoppableBuff", bp => { bp.SetName(BloodragerDestinedUnstoppable.Name); bp.SetDescription(BloodragerDestinedUnstoppable.Description); + bp.IsClassFeature = true; bp.m_Flags = BlueprintBuff.Flags.HiddenInUi; bp.AddComponent(Helpers.Create(c => { c.Value = new ContextValue() { @@ -291,6 +301,7 @@ public static void AddBloodragerDestinedBloodline() { bp.SetName("Victory or Death"); bp.SetDescription("At 20th level, you are immune to paralysis and petrification, as well as to the stunned, dazed, " + "and staggered conditions. You have these benefits constantly, even while not bloodraging."); + bp.IsClassFeature = true; bp.AddComponent(Helpers.Create(c => { c.Condition = UnitCondition.Paralyzed; })); @@ -360,6 +371,7 @@ public static void AddBloodragerDestinedBloodline() { var spell = MageShield; bp.SetName($"Bonus Spell — {spell.Get().Name}"); bp.SetDescription("At 7th, 10th, 13th, and 16th levels, a bloodrager learns an additional spell derived from his bloodline."); + bp.IsClassFeature = true; bp.AddComponent(Helpers.Create(c => { c.m_CharacterClass = BloodragerClass; c.m_Spell = spell; @@ -370,6 +382,7 @@ public static void AddBloodragerDestinedBloodline() { var spell = Blur; bp.SetName($"Bonus Spell — {spell.Get().Name}"); bp.SetDescription("At 7th, 10th, 13th, and 16th levels, a bloodrager learns an additional spell derived from his bloodline."); + bp.IsClassFeature = true; bp.AddComponent(Helpers.Create(c => { c.m_CharacterClass = BloodragerClass; c.m_Spell = spell; @@ -380,6 +393,7 @@ public static void AddBloodragerDestinedBloodline() { var spell = ProtectionFromEnergy; bp.SetName($"Bonus Spell — {spell.Get().Name}"); bp.SetDescription("At 7th, 10th, 13th, and 16th levels, a bloodrager learns an additional spell derived from his bloodline."); + bp.IsClassFeature = true; bp.AddComponent(Helpers.Create(c => { c.m_CharacterClass = BloodragerClass; c.m_Spell = spell; @@ -390,6 +404,7 @@ public static void AddBloodragerDestinedBloodline() { var spell = FreedomOfMovement; bp.SetName($"Bonus Spell — {spell.Get().Name}"); bp.SetDescription("At 7th, 10th, 13th, and 16th levels, a bloodrager learns an additional spell derived from his bloodline."); + bp.IsClassFeature = true; bp.AddComponent(Helpers.Create(c => { c.m_CharacterClass = BloodragerClass; c.m_Spell = spell; @@ -403,6 +418,7 @@ public static void AddBloodragerDestinedBloodline() { + "Your future greatness grants you the might to strike your enemies with awe.\n" + BloodragerDestinedFeatSelection.Description + "\nBonus Spells: Shield (7th), Blur (10th), Protection From Energy (13th), Freedom Of Movement (16th)."); + bp.IsClassFeature = true; bp.m_Classes = new BlueprintProgression.ClassWithLevel[] { new BlueprintProgression.ClassWithLevel { m_Class = BloodragerClass @@ -440,7 +456,12 @@ public static void AddBloodragerDestinedBloodline() { Helpers.CreateUIGroup(BloodragerDestinedFeatSelection, BloodragerDestinedFeatSelectionGreenrager) }; }); + var BloodragerAberrantBloodlineWandering = BloodlineTools.CreateMixedBloodFeature("BloodragerDestinedBloodlineWandering", BloodragerDestinedBloodline, bp => { + bp.m_Icon = AssetLoader.LoadInternal("Abilities", "Icon_DestinedBloodline.png"); + }); var BloodragerDestinedBaseBuff = Helpers.CreateBuff("BloodragerDestinedBaseBuff", bp => { + bp.SetName("Destined Bloodrage"); + bp.IsClassFeature = true; bp.m_Flags = BlueprintBuff.Flags.HiddenInUi; }); @@ -460,7 +481,7 @@ public static void AddBloodragerDestinedBloodline() { BloodlineTools.ApplyPrimalistException(BloodragerDestinedUnstoppable, 16, BloodragerDestinedBloodline); BloodlineTools.ApplyPrimalistException(BloodragerDestinedVictoryOrDeath, 20, BloodragerDestinedBloodline); if (ModSettings.AddedContent.Bloodlines.IsDisabled("DestinedBloodline")) { return; } - BloodlineTools.RegisterBloodragerBloodline(BloodragerDestinedBloodline); + BloodlineTools.RegisterBloodragerBloodline(BloodragerDestinedBloodline, BloodragerAberrantBloodlineWandering); } public static void AddSorcererDestinedBloodline() { var SorcererClass = Resources.GetBlueprint("b3a505fb61437dc4097f43c3f8f9a4cf").ToReference(); @@ -504,6 +525,7 @@ public static void AddSorcererDestinedBloodline() { }); var SorcererDestinedBloodlineArcanaBuff1 = Helpers.CreateBuff("SorcererDestinedBloodlineArcanaBuff1", bp => { bp.SetName("Destined Bloodline Arcana"); + bp.IsClassFeature = true; bp.m_Flags = BlueprintBuff.Flags.HiddenInUi; bp.AddComponent(Helpers.Create(c => { c.Descriptor = ModifierDescriptor.Luck; @@ -512,6 +534,7 @@ public static void AddSorcererDestinedBloodline() { }); var SorcererDestinedBloodlineArcanaBuff2 = Helpers.CreateBuff("SorcererDestinedBloodlineArcanaBuff2", bp => { bp.SetName("Destined Bloodline Arcana"); + bp.IsClassFeature = true; bp.m_Flags = BlueprintBuff.Flags.HiddenInUi; bp.AddComponent(Helpers.Create(c => { c.Descriptor = ModifierDescriptor.Luck; @@ -520,6 +543,7 @@ public static void AddSorcererDestinedBloodline() { }); var SorcererDestinedBloodlineArcanaBuff3 = Helpers.CreateBuff("SorcererDestinedBloodlineArcanaBuff3", bp => { bp.m_Flags = BlueprintBuff.Flags.HiddenInUi; + bp.IsClassFeature = true; bp.SetName("Destined Bloodline Arcana"); bp.AddComponent(Helpers.Create(c => { c.Descriptor = ModifierDescriptor.Luck; @@ -536,6 +560,7 @@ public static void AddSorcererDestinedBloodline() { }); var SorcererDestinedBloodlineArcanaBuff5 = Helpers.CreateBuff("SorcererDestinedBloodlineArcanaBuff5", bp => { bp.m_Flags = BlueprintBuff.Flags.HiddenInUi; + bp.IsClassFeature = true; bp.SetName("Destined Bloodline Arcana"); bp.AddComponent(Helpers.Create(c => { c.Descriptor = ModifierDescriptor.Luck; @@ -544,6 +569,7 @@ public static void AddSorcererDestinedBloodline() { }); var SorcererDestinedBloodlineArcanaBuff6 = Helpers.CreateBuff("SorcererDestinedBloodlineArcanaBuff6", bp => { bp.m_Flags = BlueprintBuff.Flags.HiddenInUi; + bp.IsClassFeature = true; bp.SetName("Destined Bloodline Arcana"); bp.AddComponent(Helpers.Create(c => { c.Descriptor = ModifierDescriptor.Luck; @@ -552,6 +578,7 @@ public static void AddSorcererDestinedBloodline() { }); var SorcererDestinedBloodlineArcanaBuff7 = Helpers.CreateBuff("SorcererDestinedBloodlineArcanaBuff7", bp => { bp.m_Flags = BlueprintBuff.Flags.HiddenInUi; + bp.IsClassFeature = true; bp.SetName("Destined Bloodline Arcana"); bp.AddComponent(Helpers.Create(c => { c.Descriptor = ModifierDescriptor.Luck; @@ -560,6 +587,7 @@ public static void AddSorcererDestinedBloodline() { }); var SorcererDestinedBloodlineArcanaBuff8 = Helpers.CreateBuff("SorcererDestinedBloodlineArcanaBuff8", bp => { bp.m_Flags = BlueprintBuff.Flags.HiddenInUi; + bp.IsClassFeature = true; bp.SetName("Destined Bloodline Arcana"); bp.AddComponent(Helpers.Create(c => { c.Descriptor = ModifierDescriptor.Luck; @@ -568,6 +596,7 @@ public static void AddSorcererDestinedBloodline() { }); var SorcererDestinedBloodlineArcanaBuff9 = Helpers.CreateBuff("SorcererDestinedBloodlineArcanaBuff9", bp => { bp.m_Flags = BlueprintBuff.Flags.HiddenInUi; + bp.IsClassFeature = true; bp.SetName("Destined Bloodline Arcana"); bp.AddComponent(Helpers.Create(c => { c.Descriptor = ModifierDescriptor.Luck; @@ -608,6 +637,7 @@ public static void AddSorcererDestinedBloodline() { bp.m_Icon = LawDomainBaseAbility.Icon; bp.SetName("Touch of Destiny"); bp.SetDescription(""); + bp.IsClassFeature = true; bp.AddComponent(Helpers.Create(c => { c.Descriptor = ModifierDescriptor.Insight; c.Stat = StatType.AdditionalAttackBonus; @@ -698,6 +728,7 @@ public static void AddSorcererDestinedBloodline() { var SorcererDestinedTouchOfDestiny = Helpers.CreateBlueprint("SorcererDestinedTouchOfDestiny", bp => { bp.SetName(SorcererDestinedTouchOfDestinyAbility.Name); bp.SetDescription(SorcererDestinedTouchOfDestinyAbility.Description); + bp.IsClassFeature = true; bp.AddComponent(Helpers.Create(c => { c.m_Facts = new BlueprintUnitFactReference[] { SorcererDestinedTouchOfDestinyAbility.ToReference(), @@ -728,6 +759,7 @@ public static void AddSorcererDestinedBloodline() { bp.SetDescription("At 15th level, your ultimate destiny is drawing near. Once per day, when an attack or spell that causes " + "damage would result in your death, you may attempt a DC 20 Will save. If successful, you are instead reduced to –1 hit " + "points and are automatically stabilized. The bonus from your fated ability applies to this save."); + bp.IsClassFeature = true; bp.AddComponent(Helpers.Create(c => { c.DC = 20; c.Type = SavingThrowType.Will; @@ -747,6 +779,7 @@ public static void AddSorcererDestinedBloodline() { bp.SetDescription("Starting at 3rd level, you gain a +1 luck bonus on all of your saving throws and to your AC during the first" + "round of combat. At 7th level and every four levels thereafter, this bonus increases " + "by +1, to a maximum of +5 at 19th level."); + bp.IsClassFeature = true; bp.AddComponent(Helpers.Create(c => { c.Descriptor = ModifierDescriptor.Luck; c.Stat = StatType.SaveFortitude; @@ -799,6 +832,7 @@ public static void AddSorcererDestinedBloodline() { bp.SetDescription("Starting at 3rd level, you gain a +1 luck bonus on all of your saving throws and to your AC during the first" + "round of combat or when you are otherwise unaware of an attack. At 7th level and every four levels thereafter, this bonus increases " + "by +1, to a maximum of +5 at 19th level."); + bp.IsClassFeature = true; var fatedBuff = Helpers.Create(c => { c.m_Buff = SorcererDestinedFatedBuff.ToReference(); c.IsNotDispelable = true; @@ -846,6 +880,7 @@ public static void AddSorcererDestinedBloodline() { var SorcererDestinedItWasMeantToBeResourceIncrease = Helpers.CreateBlueprint("SorcererDestinedItWasMeantToBeResourceIncrease", bp => { bp.SetName("It Was Meant To Be (+1 Uses)"); bp.SetDescription("It Was Meant To Be (+1 Uses)"); + bp.IsClassFeature = true; bp.HideInUI = true; bp.AddComponent(Helpers.Create(c => { c.m_Resource = SorcererDestinedItWasMeantToBeResource.ToReference(); @@ -856,6 +891,7 @@ public static void AddSorcererDestinedBloodline() { bp.SetName("It Was Meant To Be"); bp.SetDescription("You may reroll any one attack roll, critical hit confirmation roll, or level check made to " + "overcome spell resistance."); + bp.IsClassFeature = true; bp.AddComponent(Helpers.Create(c => { c.RerollOnlyIfFailed = true; c.RollsAmount = 1; @@ -939,6 +975,7 @@ public static void AddSorcererDestinedBloodline() { var SorcererDestinedDestinyRealizedBuff = Helpers.CreateBuff("SorcererDestinedDestinyRealizedBuff", bp => { bp.SetName("Destiny Realized"); bp.SetDescription("You automatically succeed at one caster level check made to overcome spell resistance."); + bp.IsClassFeature = true; bp.AddComponent(Helpers.Create(c => { c.AllSpells = true; })); @@ -988,6 +1025,7 @@ public static void AddSorcererDestinedBloodline() { bp.SetDescription("At 20th level, your moment of destiny is at hand. Any critical threats made against you only confirm if the second " + "roll results in a natural 20 on the die. Any critical threats you score with a spell are automatically confirmed. Once per day, you " + "can automatically succeed at one caster level check made to overcome spell resistance. You must use this ability before making the roll."); + bp.IsClassFeature = true; bp.AddComponent(Helpers.Create(c => { c.Value = new ContextValue() { ValueType = ContextValueType.Simple, @@ -1153,6 +1191,7 @@ public static void AddSorcererDestinedBloodline() { bp.SetDescription("Your family is destined for greatness in some way. Your birth could have been foretold in prophecy, or perhaps " + "it occurred during an especially auspicious event, such as a solar eclipse. Regardless of your bloodline’s origin, you have a great future ahead.\n" + "Bonus Feats of the Destined Bloodline: Arcane Strike, Diehard, Endurance, Sieze The Moment, Lightning Reflexes, Maximize Spell, Skill Focus (Knowledge World), Weapon Focus."); + bp.IsClassFeature = true; bp.m_Classes = new BlueprintProgression.ClassWithLevel[] { new BlueprintProgression.ClassWithLevel { m_Class = SorcererClass @@ -1195,6 +1234,7 @@ public static void AddSorcererDestinedBloodline() { var CrossbloodedDestinedBloodline = Helpers.CreateBlueprint("CrossbloodedDestinedBloodline", bp => { bp.SetName(SorcererDestinedBloodline.Name); bp.SetDescription(SorcererDestinedBloodline.Description); + bp.IsClassFeature = true; bp.m_Classes = new BlueprintProgression.ClassWithLevel[] { new BlueprintProgression.ClassWithLevel { m_Class = SorcererClass @@ -1228,6 +1268,7 @@ public static void AddSorcererDestinedBloodline() { var SeekerDestinedBloodline = Helpers.CreateBlueprint("SeekerDestinedBloodline", bp => { bp.SetName(SorcererDestinedBloodline.Name); bp.SetDescription(SorcererDestinedBloodline.Description); + bp.IsClassFeature = true; bp.m_Classes = new BlueprintProgression.ClassWithLevel[] { new BlueprintProgression.ClassWithLevel { m_Class = SorcererClass diff --git a/TabletopTweaks/NewContent/MythicAbilities/ArmorMaster.cs b/TabletopTweaks/NewContent/MythicAbilities/ArmorMaster.cs index d37c9e35..ef0495bb 100644 --- a/TabletopTweaks/NewContent/MythicAbilities/ArmorMaster.cs +++ b/TabletopTweaks/NewContent/MythicAbilities/ArmorMaster.cs @@ -132,7 +132,7 @@ public static void AddArmorMaster() { bp.m_Icon = icon; bp.SetName("Armor Master"); bp.SetDescription("While wearing armor or wielding a shield, you reduce the armor check penalty by 1 per mythic rank " + - "and increase the maximum Dexterity bonus allowed by by 1 per mythic rank. " + + "and increase the maximum Dexterity bonus allowed by 1 per mythic rank. " + "Additionally you reduce your arcane spell failure chance from armor and sheilds by 5% per mythic rank."); bp.AddComponent(c => { c.CheckCategory = true; diff --git a/TabletopTweaks/TabletopTweaks.csproj b/TabletopTweaks/TabletopTweaks.csproj index 6437eb56..ee9e3999 100644 --- a/TabletopTweaks/TabletopTweaks.csproj +++ b/TabletopTweaks/TabletopTweaks.csproj @@ -435,9 +435,18 @@ + + PreserveNewest + + + PreserveNewest + PreserveNewest + + PreserveNewest + PreserveNewest diff --git a/TabletopTweaks/Utilities/BloodlineTools.cs b/TabletopTweaks/Utilities/BloodlineTools.cs index 065cfae3..5b0973d6 100644 --- a/TabletopTweaks/Utilities/BloodlineTools.cs +++ b/TabletopTweaks/Utilities/BloodlineTools.cs @@ -10,10 +10,13 @@ using Kingmaker.UnitLogic.Abilities.Blueprints; using Kingmaker.UnitLogic.Abilities.Components; using Kingmaker.UnitLogic.Buffs.Blueprints; +using Kingmaker.UnitLogic.FactLogic; using Kingmaker.UnitLogic.Mechanics; using Kingmaker.UnitLogic.Mechanics.Actions; using Kingmaker.UnitLogic.Mechanics.Components; using Kingmaker.UnitLogic.Mechanics.Conditions; +using Kingmaker.Utility; +using System; using System.Collections.Generic; using System.Linq; using TabletopTweaks.Extensions; @@ -148,7 +151,7 @@ public static void ApplyBloodrageRestriction(this BlueprintBuff bloodrage, Bluep RequiredBuff = bloodrage.ToReference() }); } - public static void RegisterBloodragerBloodline(BlueprintProgression bloodline) { + public static void RegisterBloodragerBloodline(BlueprintProgression bloodline, BlueprintFeature wanderingBloodline) { BlueprintFeatureSelection BloodragerBloodlineSelection = Resources.GetBlueprint("62b33ac8ceb18dd47ad4c8f06849bc01"); BlueprintFeatureSelection SecondBloodragerBloodline = Resources.GetBlueprint("b7f62628915bdb14d8888c25da3fac56"); BlueprintAbility MixedBloodlineAbility = Resources.GetBlueprint("352b4e8bb5ca4301b6e6084304a86546"); @@ -158,13 +161,44 @@ public static void RegisterBloodragerBloodline(BlueprintProgression bloodline) { SecondBloodragerBloodline.m_AllFeatures = BloodragerBloodlineSelection.m_AllFeatures.AppendToArray(bloodline.ToReference()); BloodragerBloodlineSelection.m_AllFeatures = BloodragerBloodlineSelection.m_AllFeatures.AppendToArray(bloodline.ToReference()); - AddFactToApply(MixedBloodlineAbility, bloodline); - AddFactToApply(MixedBloodlineAbility2, bloodline); + AddFactToApply(MixedBloodlineAbility, wanderingBloodline); + AddFactToApply(MixedBloodlineAbility2, wanderingBloodline); void AddFactToApply(BlueprintAbility ability, BlueprintUnitFact fact) { var component = ability.GetComponent(); - component.m_Facts = component.m_Facts.AppendToArray(fact.ToReference()); + component.m_Facts = component.m_Facts + .AppendToArray(fact.ToReference()) + .OrderBy(f => f.Get().Name) + .ToArray(); } + + + } + public static BlueprintFeature CreateMixedBloodFeature(string name, BlueprintProgression bloodline, Action init = null) { + var BloodragerClass = Resources.GetBlueprint("d77e67a814d686842802c9cfd8ef8499").ToReference(); + var wanderingBLoodline = Helpers.CreateBlueprint(name, bp => { + bp.m_DisplayName = bloodline.m_DisplayName; + bp.m_Description = Helpers.CreateString($"{name}.description",""); + bp.m_Icon = bloodline.m_Icon; + bp.HideInUI = true; + bp.HideInCharacterSheetAndLevelUp = true; + bp.IsClassFeature = true; + bloodline.LevelEntries.ForEach(entry => { + foreach (var feature in entry.Features) { + if (feature is BlueprintFeatureSelection) { continue; } + if (feature.GetComponent()) { continue; } + bp.AddComponent(c => { + c.m_Class = BloodragerClass; + c.m_AdditionalClasses = new BlueprintCharacterClassReference[0]; + c.m_Archetypes = new BlueprintArchetypeReference[0]; + c.m_Feature = feature.ToReference(); + c.Level = entry.Level; + }); + } + }); + }); + init?.Invoke(wanderingBLoodline); + return wanderingBLoodline; } public static void RegisterSorcererBloodline(BlueprintProgression bloodline) { BlueprintFeatureSelection SorcererBloodlineSelection = Resources.GetBlueprint("24bef8d1bee12274686f6da6ccbc8914");