From bdd1727fe1c26db6d24f032129791b73604bd031 Mon Sep 17 00:00:00 2001 From: Sean Petrie Date: Thu, 20 Oct 2022 13:51:58 -0500 Subject: [PATCH] Update for 2.0.2c --- CHANGELOG.md | 7 +++++++ Repository.json | 2 +- .../Bugfixes/Classes/Alchemist.cs | 19 +++++++++++++++++++ .../Bugfixes/UI/OvertipFixes.cs | 2 +- TabletopTweaks-Base/Info.json | 4 ++-- .../FocusedWeapon.cs | 11 ++++++----- .../TabletopTweaks-Base.csproj | 1 + 7 files changed, 37 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61944b8b..ce937aa2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## Version 2.4.3 +* Fixes + * Removed Overtip Fixes as they are now in vanilla. + * Spells + * Magical Vestment + * Now properly handles loading and area changes. + ## Version 2.4.2 * Fixes * General diff --git a/Repository.json b/Repository.json index 7d37dff2..0cdb5bb9 100644 --- a/Repository.json +++ b/Repository.json @@ -2,7 +2,7 @@ "Releases": [ { "Id": "TabletopTweaks-Base", - "Version": "2.4.2" + "Version": "2.4.3" } ] } \ No newline at end of file diff --git a/TabletopTweaks-Base/Bugfixes/Classes/Alchemist.cs b/TabletopTweaks-Base/Bugfixes/Classes/Alchemist.cs index 44ea6d48..c8542e9a 100644 --- a/TabletopTweaks-Base/Bugfixes/Classes/Alchemist.cs +++ b/TabletopTweaks-Base/Bugfixes/Classes/Alchemist.cs @@ -111,6 +111,7 @@ static void Postfix() { PatchBase(); PatchGrenadier(); PatchIncenseSynthesizer(); + PatchVivisectionist(); } static void PatchBase() { PatchMutagens(); @@ -279,6 +280,24 @@ void PatchThickFog() { TTTContext.Logger.LogPatch("Patched", IncenseFogThickFogBuff); } } + static void PatchVivisectionist() { + //PatchMedicalDiscovery(); + + void PatchMedicalDiscovery() { + if (TTTContext.Fixes.Alchemist.Archetypes["Grenadier"].IsDisabled("BrewPotions")) { return; } + + var GrenadierArchetype = BlueprintTools.GetBlueprint("6af888a7800b3e949a40f558ff204aae"); + var BrewPotions = BlueprintTools.GetBlueprint("c0f8c4e513eb493408b8070a1de93fc0"); + + GrenadierArchetype.RemoveFeatures = GrenadierArchetype.RemoveFeatures.AppendToArray(new LevelEntry() { + Level = 1, + m_Features = new List() { + BrewPotions.ToReference() + } + }); ; + TTTContext.Logger.LogPatch("Patched", GrenadierArchetype); + } + } } } } diff --git a/TabletopTweaks-Base/Bugfixes/UI/OvertipFixes.cs b/TabletopTweaks-Base/Bugfixes/UI/OvertipFixes.cs index 7f3601d6..68a7226d 100644 --- a/TabletopTweaks-Base/Bugfixes/UI/OvertipFixes.cs +++ b/TabletopTweaks-Base/Bugfixes/UI/OvertipFixes.cs @@ -10,7 +10,7 @@ namespace TabletopTweaks.Base.Bugfixes.UI { class OvertipFixes { - [HarmonyPatch(typeof(OvertipsVM), "OnEventDidTrigger", new[] { typeof(RuleSavingThrow) })] + //[HarmonyPatch(typeof(OvertipsVM), "OnEventDidTrigger", new[] { typeof(RuleSavingThrow) })] static class DisplayFix_OvertipsVM_SavingThrow_Patch { static readonly MethodInfo RuleSavingThrow_SuccessBonus = AccessTools.PropertyGetter(typeof(RuleSavingThrow), "SuccessBonus"); static readonly MethodInfo RuleSavingThrow_StatValue = AccessTools.PropertyGetter(typeof(RuleSavingThrow), "StatValue"); diff --git a/TabletopTweaks-Base/Info.json b/TabletopTweaks-Base/Info.json index 2fc93b51..54f9fae9 100644 --- a/TabletopTweaks-Base/Info.json +++ b/TabletopTweaks-Base/Info.json @@ -8,7 +8,7 @@ "Id": "TabletopTweaks-Base", "ManagerVersion": "0.23.0", "Repository": "https://raw.githubusercontent.com/Vek17/TabletopTweaks-Base/master/Repository.json", - "Requirements": [ "TabletopTweaks-Core-0.5.1" ], + "Requirements": [ "TabletopTweaks-Core-0.5.3" ], "LoadAfter": [ "TabletopTweaks-Core" ], - "Version": "2.4.2" + "Version": "2.4.3" } \ No newline at end of file diff --git a/TabletopTweaks-Base/NewContent/FighterAdvancedWeaponTrainings/FocusedWeapon.cs b/TabletopTweaks-Base/NewContent/FighterAdvancedWeaponTrainings/FocusedWeapon.cs index f6c2d971..30c39131 100644 --- a/TabletopTweaks-Base/NewContent/FighterAdvancedWeaponTrainings/FocusedWeapon.cs +++ b/TabletopTweaks-Base/NewContent/FighterAdvancedWeaponTrainings/FocusedWeapon.cs @@ -2,6 +2,7 @@ using Kingmaker.Blueprints.Classes; using Kingmaker.Blueprints.Classes.Prerequisites; using Kingmaker.Blueprints.Classes.Selection; +using Kingmaker.Designers.Mechanics.Facts; using Kingmaker.UnitLogic.ActivatableAbilities; using Kingmaker.UnitLogic.Buffs.Blueprints; using Kingmaker.UnitLogic.FactLogic; @@ -45,11 +46,11 @@ public static void AddFocusedWeapon() { bp.SetDescription(FocusedWeaponBuff.m_Description); bp.ParameterType = FeatureParameterType.WeaponCategory; bp.m_Prerequisite = WeaponFocus.ToReference(); - bp.AddComponent(Helpers.Create(c => { - c.m_Facts = new BlueprintUnitFactReference[] { - FocusedWeaponToggleAbility.ToReference(), - }; - })); + bp.AddComponent(c => { + c.m_Feature = FocusedWeaponToggleAbility.ToReference(); + c.m_CheckedFact = FocusedWeaponToggleAbility.ToReference(); + c.Not = true; + }); bp.AddPrerequisites(Helpers.Create(c => { c.m_CharacterClass = FighterClass.ToReference(); c.Level = 9; diff --git a/TabletopTweaks-Base/TabletopTweaks-Base.csproj b/TabletopTweaks-Base/TabletopTweaks-Base.csproj index 9a8d8c78..ddd8ac00 100644 --- a/TabletopTweaks-Base/TabletopTweaks-Base.csproj +++ b/TabletopTweaks-Base/TabletopTweaks-Base.csproj @@ -201,6 +201,7 @@ +