From 5ddceea8baad21029be6f0bf51b278494dae58a7 Mon Sep 17 00:00:00 2001 From: pheonix99 Date: Tue, 28 Feb 2023 18:49:49 -0500 Subject: [PATCH] 1.4.9: 2.1 beta, fly, and elemental tweaks buff --- .gitignore | 1 + Readme.md | 17 +- .../Bugfixes/AI Fixes/WrongDefaultAttack.cs | 13 + .../Bugfixes/FixExtraHitsOnProcs.cs | 9 +- TomeOfTheFirebird/BuildContent.cs | 24 +- TomeOfTheFirebird/Config/Blueprints.json | 6 +- TomeOfTheFirebird/Helpers/InteropHelpers.cs | 51 ++++ TomeOfTheFirebird/Helpers/MakerTools.cs | 15 +- TomeOfTheFirebird/Info.json | 2 +- TomeOfTheFirebird/Localization/Spells.json | 39 +++ .../Archetypes/EldritchScion.cs | 2 +- .../Bloodlines/ElementalStrikesUpgrade.cs | 81 ++++++ .../Spells/FormOfTheDragon.cs | 42 +++ .../AbstractBloodlineMutationComponent.cs | 45 +++- .../BloodlineMutation/BloodHavocComponent.cs | 6 + .../BloodlineSpellComponent.cs | 37 ++- .../New Components/BurstDamageComponent.cs | 46 ++++ .../ElementalStanceComponent.cs | 4 +- .../SpellstrikeAlikeComponent.cs | 99 ++++++++ .../Archetypes/EldritchScionSage.cs | 6 +- .../Bloodlines/DragonBloodlines.cs | 207 +++++++++++++++ .../Bloodlines/PheonixBloodline.cs | 83 ++++-- .../Bloodlines/TotFBloodlineTools.cs | 20 +- .../New Content/Features/BloodHavoc.cs | 30 +++ .../Features/BloodlineMutations.cs | 120 ++++++++- .../ModifySpellLists/AzataMythicList.cs | 69 +++++ .../New Content/Spells/BoneFists.cs | 2 +- .../Spells/ElementalShieldSpells.cs | 5 +- .../New Content/Spells/EntropicShield.cs | 1 + .../New Content/Spells/FieryRunes.cs | 239 ++++++++++++++++++ TomeOfTheFirebird/New Content/Spells/Fly.cs | 93 +++++++ .../New Content/Spells/TODO/ChillTouch.cs | 28 -- .../New Content/Spells/TODO/FieryRunes.cs | 30 --- .../New Content/Spells/TODO/Frostbite.cs | 27 -- .../New Content/Spells/TODO/IceSlick.cs | 32 --- .../New Content/Spells/TelekineticStrikes.cs | 2 +- TomeOfTheFirebird/Settings.cs | 32 ++- TomeOfTheFirebird/TomeOfTheFirebird.csproj | 29 ++- 38 files changed, 1403 insertions(+), 191 deletions(-) create mode 100644 TomeOfTheFirebird/Bugfixes/AI Fixes/WrongDefaultAttack.cs create mode 100644 TomeOfTheFirebird/Helpers/InteropHelpers.cs create mode 100644 TomeOfTheFirebird/Localization/Spells.json create mode 100644 TomeOfTheFirebird/Modified Content/Bloodlines/ElementalStrikesUpgrade.cs create mode 100644 TomeOfTheFirebird/Modified Content/Spells/FormOfTheDragon.cs create mode 100644 TomeOfTheFirebird/New Components/BurstDamageComponent.cs create mode 100644 TomeOfTheFirebird/New Components/SpellstrikeAlikeComponent.cs create mode 100644 TomeOfTheFirebird/New Content/Bloodlines/DragonBloodlines.cs create mode 100644 TomeOfTheFirebird/New Content/ModifySpellLists/AzataMythicList.cs create mode 100644 TomeOfTheFirebird/New Content/Spells/FieryRunes.cs create mode 100644 TomeOfTheFirebird/New Content/Spells/Fly.cs delete mode 100644 TomeOfTheFirebird/New Content/Spells/TODO/ChillTouch.cs delete mode 100644 TomeOfTheFirebird/New Content/Spells/TODO/FieryRunes.cs delete mode 100644 TomeOfTheFirebird/New Content/Spells/TODO/Frostbite.cs delete mode 100644 TomeOfTheFirebird/New Content/Spells/TODO/IceSlick.cs diff --git a/.gitignore b/.gitignore index c205042..a1dcb07 100644 --- a/.gitignore +++ b/.gitignore @@ -367,3 +367,4 @@ FodyWeavers.xsd /TomeOfTheFirebird/Assets/Spells/SpearOfPurity.png /TomeOfTheFirebird/Assets/Spells/GloomblindBolts.png /TomeOfTheFirebird/Assets/Abilities/Phoenix_Bloodline.png +/TomeOfTheFirebird/Assets/Spells/Fly.png diff --git a/Readme.md b/Readme.md index f857052..6a3b19e 100644 --- a/Readme.md +++ b/Readme.md @@ -8,14 +8,23 @@ All homebrew content or divergences from TT will be called out. NOW REQUIRES TabletopTweaks Core Module and ModMenu + + + ## Changelog -### -1.4.8 +### 1.4.9 +2.1 Beta experimental patch. WARNING: Has not been signficantly tested! +Added Spells: Fly +Buffed Elemental Bloodline Elemental Strikes - now always-on at level 1, gains burst effect at level 20 + + + +### 1.4.8 Fix for Maw And Claw (Claw) natural weapons vanishing - replacing with toggle as game likes to do Added Ancestral Scorn feat -1.4.7 +### 1.4.7 Burst Of Radiance has been returned to spell lists from the Shadow Realm? Price Fixes for some horribly overpriced act 1 items - expect further changes here Option to replace Dragonkind 1: Red with Chains Of Fire for Oracle Flames Mystery as proxy for Fire Seeds @@ -370,8 +379,6 @@ Mountain Witch Patron Witch Unique Patrons -Extending Draconic Bloodline claw upgrades to Dragon Mystery abilities if Expanded Content is installed - Seasonal Witch archetype Banishing Warden Paladin Archetype diff --git a/TomeOfTheFirebird/Bugfixes/AI Fixes/WrongDefaultAttack.cs b/TomeOfTheFirebird/Bugfixes/AI Fixes/WrongDefaultAttack.cs new file mode 100644 index 0000000..7ae683a --- /dev/null +++ b/TomeOfTheFirebird/Bugfixes/AI Fixes/WrongDefaultAttack.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TomeOfTheFirebird.Bugfixes.AI_Fixes +{ + class WrongDefaultAttack + { + //Daeran At Party: Use Divine Zap, not crossbow + } +} diff --git a/TomeOfTheFirebird/Bugfixes/FixExtraHitsOnProcs.cs b/TomeOfTheFirebird/Bugfixes/FixExtraHitsOnProcs.cs index 52af495..8102ec6 100644 --- a/TomeOfTheFirebird/Bugfixes/FixExtraHitsOnProcs.cs +++ b/TomeOfTheFirebird/Bugfixes/FixExtraHitsOnProcs.cs @@ -20,6 +20,11 @@ namespace TomeOfTheFirebird.Bugfixes { public static class FixExtraHitsOnProcs { + public static void FixHellfireCharge() + { + //f88081f3d2ed69c429736051f2fb80ae + } + public static void FixFirebrand() { if (Settings.IsEnabled("FixExtraHitsFirebrand")) @@ -137,7 +142,7 @@ public static void FixElementalStrikes() BonusValue = ContextValues.Constant(0) }; - }).Configure();//Elect strikes before 20 + }).Configure();//Acid strikes before 20 FeatureConfigurator.For("d37a8f6f5df057a4ea50b2c065288263").RemoveComponents(x => x is AddInitiatorAttackWithWeaponTrigger).AddComponent(x => { @@ -149,7 +154,7 @@ public static void FixElementalStrikes() BonusValue = ContextValues.Constant(0) }; - }).Configure();//Elect strikes at 20 + }).Configure();//Acid strikes at 20 } diff --git a/TomeOfTheFirebird/BuildContent.cs b/TomeOfTheFirebird/BuildContent.cs index 30a968d..5f8e607 100644 --- a/TomeOfTheFirebird/BuildContent.cs +++ b/TomeOfTheFirebird/BuildContent.cs @@ -25,6 +25,13 @@ using TomeOfTheFirebird.Modified_Content.Feats; using TomeOfTheFirebird.New_Content.Archetypes; using BlueprintCore.Blueprints.Configurators.Root; +using Kingmaker.Blueprints; +using Kingmaker.Utility; +using Kingmaker.Blueprints.Classes; +using BlueprintCore.Utils; +using Kingmaker.Blueprints.Classes.Selection; +using System.Linq; +using UnityEngine; namespace TomeOfTheFirebird { @@ -71,6 +78,8 @@ static void Postfix() BurstOfRadiance.Make(); + Fly.Make(); + //Build Feats ProdigiousTWF.AddProdigiousTWF(); SunderingStrike.Build(); @@ -127,10 +136,12 @@ static void Postfix() //FighterCombatBoosts.Setup(); PheonixBloodline.MakePheonixBloodline(); + //BloodlineMutations.Setup(); EldritchScionSage.Make(); + //BloodHavoc.Make(); Modified_Content.Archetypes.Witch.ReturnAccursedPatrons(); Modified_Content.Classes.Witch.AllPatronFixes(); @@ -150,12 +161,17 @@ static void Postfix() TomeOfTheFirebird.New_Content.RacialOptions.Tiefling.Make(); ArmorOfThePit.Make(); + + } catch (Exception e) { Main.TotFContext.Logger.LogError(e, $"Error caught in early patch"); } } + + + } @@ -190,6 +206,7 @@ static void Postfix() FixExtraHitsOnProcs.FixClawsOfSacredBeast(); FixExtraHitsOnProcs.FixElementalStrikes(); + ElementalStrikesUpgrade.Do(); CavalierFixes.FixOrderAbilityDisplays(); CavalierFixes.FixOrderOfTheStarChannelAssistance(); @@ -207,8 +224,7 @@ static void Postfix() New_Content.RagePowers.ElementalStance.Finish(); New_Content.RagePowers.RageStanceMastery.Finish(); //EldritchScion.AddSorcBonusFeatsToList(); - - + RootConfigurator.ConfigureDelayedBlueprints(); @@ -232,10 +248,14 @@ static void Postfix() Main.TotFContext.Logger.LogError(e, $"Error caught in Fighter Combat Boosts"); } } + + + } [HarmonyPriority(Priority.Last)] [HarmonyPatch(typeof(StartGameLoader), "LoadAllJson")] + static class StartGameLoader_LoadAllJson { private static bool Run = false; diff --git a/TomeOfTheFirebird/Config/Blueprints.json b/TomeOfTheFirebird/Config/Blueprints.json index ea52c75..726e295 100644 --- a/TomeOfTheFirebird/Config/Blueprints.json +++ b/TomeOfTheFirebird/Config/Blueprints.json @@ -266,7 +266,11 @@ "AdoptedPipefoxFeature": "8e9fc535-4775-4512-a08a-68962f87a6d1", "AncestralScorn": "30fb3bc6-c7d4-4609-b68a-bc47f6831f83", "ClawTieflingRacialBuff": "f122ff39-1c07-4cf5-b1b3-4b4c5caa8c11", - "ClawTieflingRacialToggle": "032a6ce2-8492-41b9-9a48-b0ce6079a2fb" + "ClawTieflingRacialToggle": "032a6ce2-8492-41b9-9a48-b0ce6079a2fb", + "ElementalStrikesAcidBurstBuff": "db73ded7-381c-40fe-a2ba-5d5995f30345", + "ElementalStrikesColdBurstBuff": "c666499d-1fa9-45df-bf10-175b2b3de2c4", + "ElementalStrikesElectricityBurstBuff": "9821cbbd-dee1-464a-baa7-002c4786294e", + "ElementalStrikesFireBurstBuff": "e66ad7ba-fe84-43db-b9bc-f2f762c13bea" }, diff --git a/TomeOfTheFirebird/Helpers/InteropHelpers.cs b/TomeOfTheFirebird/Helpers/InteropHelpers.cs new file mode 100644 index 0000000..c8d6d20 --- /dev/null +++ b/TomeOfTheFirebird/Helpers/InteropHelpers.cs @@ -0,0 +1,51 @@ +using BlueprintCore.Blueprints.CustomConfigurators.UnitLogic.Abilities; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using static Kingmaker.Armies.TacticalCombat.Grid.TacticalCombatGrid; + +namespace TomeOfTheFirebird.Helpers +{ + internal static class InteropHelpers + { + public static AbilityConfigurator AddSpellToMedium(this AbilityConfigurator spell, int level) + { + if (Settings.IsMediumMpdEnabled()) + { + spell.AddToSpellList(level, "ff3e034659b64d21ac57dc0d9e893bdb", true); + } + + return spell; + } + + public static AbilityConfigurator AddSpellToSummoner(this AbilityConfigurator spell, int level) + { + + + return spell; + } + + public static AbilityConfigurator AddSpellToPsychic(this AbilityConfigurator spell, int level) + { + + + return spell; + } + + public static AbilityConfigurator AddSpellToOccultist(this AbilityConfigurator spell, int level) + { + + + return spell; + } + + public static AbilityConfigurator AddSpellToSpiritualist(this AbilityConfigurator spell, int level) + { + + + return spell; + } + } +} diff --git a/TomeOfTheFirebird/Helpers/MakerTools.cs b/TomeOfTheFirebird/Helpers/MakerTools.cs index c628394..f5d0df0 100644 --- a/TomeOfTheFirebird/Helpers/MakerTools.cs +++ b/TomeOfTheFirebird/Helpers/MakerTools.cs @@ -183,6 +183,8 @@ public static WeaponEnchantmentConfigurator MakeWeaponEnchant(string systemName, return enchant; } + + public static AbilityConfigurator MakeAbility(string systemName, string displayName, string description, Sprite icon, LocalizedString savestring, LocalizedString durationString) { Main.TotFContext.Logger.Log($"Building New Spell: {systemName}"); @@ -202,7 +204,7 @@ public static AbilityConfigurator MakeAbility(string systemName, string displayN } - + return AbilityConfigurator.New(systemName, guid.ToString()).SetDisplayName(name).SetDescription(desc).SetIcon(icon).SetLocalizedSavingThrow(savestring).SetLocalizedDuration(durationString); @@ -231,7 +233,9 @@ public static AbilityConfigurator MakeSpell(string systemName, string displayNam - var config = AbilityConfigurator.NewSpell(systemName, guid.ToString(),school, specialization, descriptors).SetDisplayName(name).SetDescription(desc).SetIcon(icon).AddSpellComponent(school).SetLocalizedSavingThrow(savestring); + var config = AbilityConfigurator.NewSpell(systemName, guid.ToString(),school, specialization, descriptors).SetDisplayName(name).SetDescription(desc).AddSpellComponent(school).SetLocalizedSavingThrow(savestring); + if (icon != null) + config.SetIcon(icon); if (durationString != null) config.SetLocalizedDuration(durationString); @@ -241,7 +245,7 @@ public static AbilityConfigurator MakeSpell(string systemName, string displayNam } - public static ActivatableAbilityConfigurator MakeToggle(string systemName, string displayName, string description, Sprite icon) + public static ActivatableAbilityConfigurator MakeToggle(string systemName, string displayName, string description, Sprite icon = null) { Main.TotFContext.Logger.Log($"Building New Toggle: {systemName}"); Kingmaker.Blueprints.BlueprintGuid guid = Main.TotFContext.Blueprints.GetGUID(systemName); @@ -250,8 +254,9 @@ public static ActivatableAbilityConfigurator MakeToggle(string systemName, strin - ActivatableAbilityConfigurator made = ActivatableAbilityConfigurator.New(systemName, guid.ToString()).SetDisplayName(name).SetDescription(desc).SetIcon(icon); - + ActivatableAbilityConfigurator made = ActivatableAbilityConfigurator.New(systemName, guid.ToString()).SetDisplayName(name).SetDescription(desc); + if (icon != null) + made.SetIcon(icon); return made; } diff --git a/TomeOfTheFirebird/Info.json b/TomeOfTheFirebird/Info.json index 180d5f5..83c2591 100644 --- a/TomeOfTheFirebird/Info.json +++ b/TomeOfTheFirebird/Info.json @@ -2,7 +2,7 @@ "Id": "TomeOfTheFirebird", "DisplayName": "Tome Of The Firebird", "Author": "pheonix99", - "Version": "1.4.8", + "Version": "1.4.9", "ManagerVersion": "0.21.3", "AssemblyName": "TomeOfTheFirebird.dll", "EntryMethod": "TomeOfTheFirebird.Main.Load", diff --git a/TomeOfTheFirebird/Localization/Spells.json b/TomeOfTheFirebird/Localization/Spells.json new file mode 100644 index 0000000..5288106 --- /dev/null +++ b/TomeOfTheFirebird/Localization/Spells.json @@ -0,0 +1,39 @@ +[ + { + "Key": "FieryRunes.Name", + + "enGB": "Fiery Runes" + }, + { + "Key": "FieryRunes.Desc", + + "enGB": "You charge a ally with a magic rune of fire. \n When the wielder of the weapon successfully strikes a foe in melee with the weapon, the wielder can discharge the rune as a swift action to deal 1d4+1 points of fire damage to the target.This damage isn’t multiplied on a critical hit. If the target has spell resistance, you attempt a caster level check (1d20 + caster level) against that spell resistance when the rune is discharged.If the rune is successfully resisted, the rune is expended and does no damage; otherwise, the rune deals damage normally.\n For every 2 caster levels beyond 3rd the caster possesses, the rune deals an additional 1d4+1 points of fire damage(2d4+2 at caster level 5th, 3d4+3 at 7th, and so on) to a maximum of 5d4+5 points of fire damage at caster level 11th." + + + }, + { + "Key": "FieryRuneArray.Name", + + "enGB": "Fiery Rune Array" + }, + { + "Key": "FieryRuneArray.Desc", + + "enGB": "You charge a ally with magic runes of fire. \n When the wielder of the weapon successfully strikes a foe in melee with the weapon, the wielder can discharge a rune as a swift action to deal 1d4+1 points of fire damage to the target.This damage isn’t multiplied on a critical hit. If the target has spell resistance, you attempt a caster level check (1d20 + caster level) against that spell resistance when the rune is discharged. If the rune is successfully resisted, a rune is expended and does no damage; otherwise, the rune deals damage normally.\n For every 2 caster levels beyond 3rd the caster possesses, the rune deals an additional 1d4+1 points of fire damage(2d4+2 at caster level 5th, 3d4+3 at 7th, and so on) to a maximum of 5d4+5 points of fire damage at caster level 11th.\n The spell creates 1 rune, plus 1 per 5 caster levels, to a maximum of 5 at level 20." + }, + + { + "Key": "Fly.Name", + "ProcessTemplates": false, + "enGB": "Fly" + }, + { + "Key": "Fly.Desc", + "ProcessTemplates": false, + "enGB": "The subject gains flight, increasing their speed by ten feet, ignoring ground effects, and gaining a +3 dodge bonus to AC against melee attacks" + } + + + + +] \ No newline at end of file diff --git a/TomeOfTheFirebird/Modified Content/Archetypes/EldritchScion.cs b/TomeOfTheFirebird/Modified Content/Archetypes/EldritchScion.cs index 6a8cc6e..eacd419 100644 --- a/TomeOfTheFirebird/Modified Content/Archetypes/EldritchScion.cs +++ b/TomeOfTheFirebird/Modified Content/Archetypes/EldritchScion.cs @@ -22,7 +22,7 @@ public static void AddSorcBonusFeatsToList() FeatureSelectionConfigurator.For("66befe7b24c42dd458952e3c47c93563").AddToAllFeatures("3a60f0c0442acfb419b0c03b584e1394").Configure(); var sorcFeat = FeatureSelectionConfigurator.For("3a60f0c0442acfb419b0c03b584e1394").AddPrerequisiteArchetypeLevel("d078b2ef073f2814c9e338a789d97b73", "45a4607686d96a1498891b3286121780", false, group: Kingmaker.Blueprints.Classes.Prerequisites.Prerequisite.GroupType.Any, level: 1); - if (Settings.IsEnabled("EldritchScionSage") && PheonixBloodline.BloodlineRequisiteFeature != null) + if (Settings.IsEnabled("EldritchScionSage") && TotFBloodlineTools.BloodlineRequisiteFeature != null) { sorcFeat.AddPrerequisiteArchetypeLevel("EldritchScionSageArchetype", "45a4607686d96a1498891b3286121780", false, group: Kingmaker.Blueprints.Classes.Prerequisites.Prerequisite.GroupType.Any, level: 1); } diff --git a/TomeOfTheFirebird/Modified Content/Bloodlines/ElementalStrikesUpgrade.cs b/TomeOfTheFirebird/Modified Content/Bloodlines/ElementalStrikesUpgrade.cs new file mode 100644 index 0000000..2b1ef8c --- /dev/null +++ b/TomeOfTheFirebird/Modified Content/Bloodlines/ElementalStrikesUpgrade.cs @@ -0,0 +1,81 @@ +using BlueprintCore.Actions.Builder; +using BlueprintCore.Actions.Builder.ContextEx; +using BlueprintCore.Blueprints.CustomConfigurators.Classes; +using BlueprintCore.Blueprints.CustomConfigurators.UnitLogic.Buffs; +using BlueprintCore.Conditions.Builder; +using BlueprintCore.Conditions.Builder.ContextEx; +using BlueprintCore.Utils; +using BlueprintCore.Utils.Types; +using Kingmaker.Designers.Mechanics.Facts; +using Kingmaker.Enums.Damage; +using Kingmaker.UnitLogic.Buffs.Blueprints; +using Kingmaker.UnitLogic.Mechanics.Components; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TomeOfTheFirebird.New_Components; + +namespace TomeOfTheFirebird.Modified_Content.Bloodlines +{ + class ElementalStrikesUpgrade + { + public static void Do() + { + if (Settings.IsEnabled("BuffElementalStrikes")) + { + //Fire Progression: 12f7b4c5d603f3744b2b1def28c0a4fa + + var baseElementalRageBuff = BuffConfigurator.For("527fe5d35a1da104490a4518ec55a0a3"); + + + string fireStrikesFeature = "0fb267c8f74fa5f4ea2e31b0f2384286"; + string fireStrikesBuff = "eb71b69ec2b317140b950fbc879efdc3"; + string fireStrikes20Feature = "837067e4608bc5948994d79a3f3b9e17"; + + AlterBloodline(fireStrikesFeature, fireStrikesBuff, fireStrikes20Feature, DamageEnergyType.Fire); + AlterBloodline("3e87f0f796a4eeb409a6998eedc1a5ef", "11fd8bc21f8de6a408859f8f2e845094", "c1710599b2f72e644918a3f7b0e2b44a", DamageEnergyType.Cold); + AlterBloodline("c4617f07db3d84443b13ff71d9d396c3", "ad90034a6f8a6f144bf8f329917e1d38", "d37a8f6f5df057a4ea50b2c065288263", DamageEnergyType.Acid); + AlterBloodline("8e1cbcd869e27b44c9af52adc384921b", "8792f9cb9a9b03d4ebb057137bf853d9", "99e577bf8876f294eaaa47dec8dae994", DamageEnergyType.Electricity); + void AlterBloodline(string strikesBaseFeature, string strikesBuff, string strikes20Feature, DamageEnergyType energy) + { + string sysname = $"ElementalStrikes{energy}BurstBuff"; + var guid = Main.TotFContext.Blueprints.GetGUID(sysname); + + var at20Buff = BuffConfigurator.New(sysname, guid.ToString()).SetFlags(flags: BlueprintBuff.Flags.HiddenInUi); + at20Buff.SetDisplayName(LocalizationTool.CreateString(sysname + ".Name", "Elemental Strikes Burst Mode", false)); + at20Buff.SetDescription(LocalizationTool.CreateString(sysname + ".Desc", "Elemental Strikes Burst Mode (SYSTEM BUFF)", false)); + at20Buff.AddComponent(x => + { + x.Dice = Kingmaker.RuleSystem.DiceType.D8; + x.Element = energy; + }); + at20Buff.Configure(); + + baseElementalRageBuff.AddFactContextActions(activated: ActionsBuilder.New().Conditional(conditions: ConditionsBuilder.New().HasFact(strikesBaseFeature), ifTrue: ActionsBuilder.New().ApplyBuff(strikesBuff, ContextDuration.Fixed(0), asChild: true)).Conditional(conditions: ConditionsBuilder.New().HasFact(strikes20Feature), ifTrue: ActionsBuilder.New().ApplyBuff(sysname, ContextDuration.Fixed(0), asChild: true)), deactivated: ActionsBuilder.New().RemoveBuff(strikesBuff).RemoveBuff(sysname)); + + + + FeatureConfigurator.For(strikesBaseFeature).RemoveComponents(x => x is AddFeatureOnClassLevel classLevel && classLevel.BeforeThisLevel == true).Configure(); + FeatureConfigurator.For(strikes20Feature).RemoveComponents(x => true).Configure(); + Main.TotFContext.Logger.Log($"Buffed {energy} Elemental Strikes"); + } + + baseElementalRageBuff.Configure(); + Main.TotFContext.Logger.Log("Buffed All Elemental Strikes"); + } + else + { + List energies = new() { DamageEnergyType.Fire, DamageEnergyType.Cold, DamageEnergyType.Electricity, DamageEnergyType.Acid }; + foreach(var energy in energies) + { + string sysname = $"ElementalStrikes{energy}BurstBuff"; + var guid = Main.TotFContext.Blueprints.GetGUID(sysname); + + var at20Buff = BuffConfigurator.New(sysname, guid.ToString()).SetFlags(flags: BlueprintBuff.Flags.HiddenInUi).Configure(); + } + } + } + } +} diff --git a/TomeOfTheFirebird/Modified Content/Spells/FormOfTheDragon.cs b/TomeOfTheFirebird/Modified Content/Spells/FormOfTheDragon.cs new file mode 100644 index 0000000..55f2743 --- /dev/null +++ b/TomeOfTheFirebird/Modified Content/Spells/FormOfTheDragon.cs @@ -0,0 +1,42 @@ +using BlueprintCore.Blueprints.CustomConfigurators.UnitLogic.Abilities; +using BlueprintCore.Utils; +using Kingmaker.Blueprints; +using Kingmaker.UnitLogic.Abilities.Components; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TabletopTweaks.Core.Utilities; + +namespace TomeOfTheFirebird.Modified_Content.Spells +{ + internal class FormOfTheDragon + { + //Check that FOTD Gold/Copper/Bronze aren't implemented + + //FOTD-Gold 1 buff: 89669cfba3d9c15448c23b79dd604c41 + //FOTD-Bronze 1 buff: 1032d4ffb1c56444ca5bfce2c778614d + //FOTD-Copper 1 buff: a4cc7169fb7e64a4a8f53bdc774341b1 + + //FOTD GOLD 1 spell on scroll: 12e6785ca0f97a145a7c02a5f0fd155c + //FOTD GOLD 2 spell on scroll: 72a3ccf67437f4342b2d23634271de77 - buff is 4300f60c00ecabc439deab11ce6d738a + //FOTD GOLD 3 spell on scroll: c511266a705a6e94186cb51e0503775f - buff is ec6ad3612c4f0e340b54a11a0e78793d + + //FOTD Bronze 1 spell on scroll: f1103c097be761e489ee27a8d49a373b - buff is ec6ad3612c4f0e340b54a11a0e78793d + + public static void AddMissingFOTDs() + { + var fotd1 = AbilityConfigurator.For("f767399367df54645ac620ef7b2062bb"); + + fotd1.EditComponent(x => + { + x.m_Variants = x.m_Variants.AppendToArray(new Kingmaker.Blueprints.BlueprintAbilityReference[] { BlueprintTool.GetRef("12e6785ca0f97a145a7c02a5f0fd155c"), BlueprintTool.GetRef("f1103c097be761e489ee27a8d49a373b"), BlueprintTool.GetRef("f1103c097be761e489ee27a8d49a373b") }); + + }); + } + + + //Investigate report of off-model + } +} diff --git a/TomeOfTheFirebird/New Components/BloodlineMutation/AbstractBloodlineMutationComponent.cs b/TomeOfTheFirebird/New Components/BloodlineMutation/AbstractBloodlineMutationComponent.cs index 81c6c06..f0fdf0e 100644 --- a/TomeOfTheFirebird/New Components/BloodlineMutation/AbstractBloodlineMutationComponent.cs +++ b/TomeOfTheFirebird/New Components/BloodlineMutation/AbstractBloodlineMutationComponent.cs @@ -22,9 +22,43 @@ class AbstractBloodlineMutationComponent : UnitFactComponentDelegate private static BlueprintFeatureReference _spellFocus; + protected static List m_ElementalScalingAttackPowers; + protected static List m_BadScalingAttackPowers; - protected bool AppliesToAbility(AbilityData ability) + protected static List allattackPowers => m_ElementalScalingAttackPowers.Concat(m_BadScalingAttackPowers).ToList(); + + + + public static void LoadElementalAttackPowers(List ids) + { + if (m_ElementalScalingAttackPowers == null) + { + m_ElementalScalingAttackPowers = new(); + } + foreach(var id in ids) + { + var reference = BlueprintTool.GetRef(id); + if (!m_ElementalScalingAttackPowers.Contains(reference)) + m_ElementalScalingAttackPowers.Add(reference); + } + } + public static void LoadBadScalingAttackPowers(List ids) + { + if (m_BadScalingAttackPowers == null) + { + m_BadScalingAttackPowers = new(); + } + foreach (var id in ids) + { + var reference = BlueprintTool.GetRef(id); + if (!m_BadScalingAttackPowers.Contains(reference)) + m_BadScalingAttackPowers.Add(reference); + } + } + + + protected virtual bool AppliesToAbility(AbilityData ability, bool resourceUsing = false) { if (spellFocuses == null) { @@ -70,10 +104,13 @@ protected bool AppliesToAbility(AbilityData ability) } - else if (ability.Blueprint.Type == Kingmaker.UnitLogic.Abilities.Blueprints.AbilityType.SpellLike || ability.Blueprint.Type == Kingmaker.UnitLogic.Abilities.Blueprints.AbilityType.Supernatural) + else if (ability.Blueprint.Type == Kingmaker.UnitLogic.Abilities.Blueprints.AbilityType.SpellLike || ability.Blueprint.Type == Kingmaker.UnitLogic.Abilities.Blueprints.AbilityType.Supernatural && Settings.IsEnabled("BloodlineMutationsForPowers")) { - //For bloodline powers when I add those to this - return false; + if (resourceUsing) + return m_ElementalScalingAttackPowers.Contains(ability.Blueprint.ToReference()); + else + return allattackPowers.Contains(ability.Blueprint.ToReference()); + } else { diff --git a/TomeOfTheFirebird/New Components/BloodlineMutation/BloodHavocComponent.cs b/TomeOfTheFirebird/New Components/BloodlineMutation/BloodHavocComponent.cs index aea83ac..08dfa05 100644 --- a/TomeOfTheFirebird/New Components/BloodlineMutation/BloodHavocComponent.cs +++ b/TomeOfTheFirebird/New Components/BloodlineMutation/BloodHavocComponent.cs @@ -1,6 +1,7 @@ using Kingmaker.PubSubSystem; using Kingmaker.RuleSystem; using Kingmaker.RuleSystem.Rules.Damage; +using Kingmaker.UnitLogic.Abilities.Blueprints; using Kingmaker.UnitLogic.Mechanics; using System; using System.Collections.Generic; @@ -14,7 +15,12 @@ class BloodHavocComponent : AbstractBloodlineMutationComponent, IInitiatorRulebo { public void OnEventAboutToTrigger(RuleCalculateDamage evt) { + + + MechanicsContext context = evt.Reason.Context; + + if (((context != null) ? context.SourceAbility : null) == null) { return; diff --git a/TomeOfTheFirebird/New Components/BloodlineMutation/BloodlineSpellComponent.cs b/TomeOfTheFirebird/New Components/BloodlineMutation/BloodlineSpellComponent.cs index 228eb35..8fd0e8f 100644 --- a/TomeOfTheFirebird/New Components/BloodlineMutation/BloodlineSpellComponent.cs +++ b/TomeOfTheFirebird/New Components/BloodlineMutation/BloodlineSpellComponent.cs @@ -2,6 +2,7 @@ using Kingmaker.Blueprints; using Kingmaker.UnitLogic; using Kingmaker.UnitLogic.FactLogic; +using Kingmaker.Utility; using System; using System.Collections.Generic; using System.Linq; @@ -48,27 +49,47 @@ public override void OnTurnOff() public static class BloodlineSpellComponentAssistant { - public static FeatureConfigurator AddBloodlineSpellComponents(this FeatureConfigurator featureConfigurator) + + + public static ProgressionConfigurator AddBloodlineSpellComponents(this ProgressionConfigurator progressionConfigurator) { List spells = new(); - - featureConfigurator.EditComponents(x => + progressionConfigurator.EditComponents(x => { + if (!spells.Contains(x.m_Spell)) - { + { + spells.Add(x.m_Spell); } - }, y => true); - foreach(BlueprintAbilityReference spell in spells) + }, y => true);//Failsafe for spells living directly on the bloodline ... + progressionConfigurator.ModifyLevelEntries(x => + { + x.m_Features.ForEach(y => + { + y.Get().GetComponents().ForEach(z => + { + if ( !spells.Contains(z.m_Spell)) + { + spells.Add(z.m_Spell); + } + }); + + }); + + }); + + + foreach (BlueprintAbilityReference spell in spells) { - featureConfigurator.AddComponent(x => + progressionConfigurator.AddComponent(x => { x.m_spell = spell; }); } - return featureConfigurator; + return progressionConfigurator; } } } diff --git a/TomeOfTheFirebird/New Components/BurstDamageComponent.cs b/TomeOfTheFirebird/New Components/BurstDamageComponent.cs new file mode 100644 index 0000000..429bf5e --- /dev/null +++ b/TomeOfTheFirebird/New Components/BurstDamageComponent.cs @@ -0,0 +1,46 @@ +using Kingmaker; +using Kingmaker.Enums.Damage; +using Kingmaker.PubSubSystem; +using Kingmaker.RuleSystem; +using Kingmaker.RuleSystem.Rules; +using Kingmaker.RuleSystem.Rules.Damage; +using Kingmaker.UnitLogic; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TomeOfTheFirebird.New_Components +{ + class BurstDamageComponent : UnitFactComponentDelegate, ISubscriber, IInitiatorRulebookSubscriber, IInitiatorRulebookHandler, IRulebookHandler + { + + public void OnEventAboutToTrigger(RuleDealDamage evt) + { + if (evt.DamageBundle.Weapon is not null) + { + RuleAttackRoll attackRoll = evt.AttackRoll; + if (base.Owner == null || attackRoll == null || !attackRoll.IsCriticalConfirmed || attackRoll.FortificationNegatesCriticalHit) + { + return; + } + RuleCalculateWeaponStats ruleCalculateWeaponStats = Rulebook.Trigger(new RuleCalculateWeaponStats(Owner, evt.AttackRoll.Weapon, null, null)); + DiceFormula dice = new DiceFormula(Math.Max(ruleCalculateWeaponStats.CriticalMultiplier - 1, 1), this.Dice); + evt.Add(new EnergyDamage(dice, this.Element)); + } + } + + // Token: 0x0600E2D6 RID: 58070 RVA: 0x003A09DA File Offset: 0x0039EBDA + public void OnEventDidTrigger(RuleDealDamage evt) + { + } + + // Token: 0x040094D8 RID: 38104 + public DamageEnergyType Element; + + // Token: 0x040094D9 RID: 38105 + public DiceType Dice = DiceType.D8; + + } +} diff --git a/TomeOfTheFirebird/New Components/ElementalStanceComponent.cs b/TomeOfTheFirebird/New Components/ElementalStanceComponent.cs index 5258e89..1a783e5 100644 --- a/TomeOfTheFirebird/New Components/ElementalStanceComponent.cs +++ b/TomeOfTheFirebird/New Components/ElementalStanceComponent.cs @@ -60,7 +60,7 @@ public void OnEventAboutToTrigger(RuleCalculateWeaponStats evt) public void OnEventAboutToTrigger(RuleDealDamage evt) { - if (evt.DamageBundle.Weapon.Blueprint.IsMelee) + if (evt.DamageBundle.Weapon?.Blueprint?.IsMelee == true) { RuleAttackRoll attackRoll = evt.AttackRoll; if (base.Owner == null || attackRoll == null || !attackRoll.IsCriticalConfirmed || attackRoll.FortificationNegatesCriticalHit) @@ -76,8 +76,8 @@ public void OnEventAboutToTrigger(RuleDealDamage evt) public void OnEventDidTrigger(RuleCalculateWeaponStats evt) { - } + } public void OnEventDidTrigger(RuleDealDamage evt) { diff --git a/TomeOfTheFirebird/New Components/SpellstrikeAlikeComponent.cs b/TomeOfTheFirebird/New Components/SpellstrikeAlikeComponent.cs new file mode 100644 index 0000000..e523ccc --- /dev/null +++ b/TomeOfTheFirebird/New Components/SpellstrikeAlikeComponent.cs @@ -0,0 +1,99 @@ +using Kingmaker.ElementsSystem; +using Kingmaker.PubSubSystem; +using Kingmaker.RuleSystem; +using Kingmaker.RuleSystem.Rules; +using Kingmaker.RuleSystem.Rules.Abilities; +using Kingmaker.UnitLogic; +using Kingmaker.UnitLogic.Abilities; +using Kingmaker.UnitLogic.Abilities.Blueprints; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TomeOfTheFirebird.New_Components +{ + class SpellstrikeAlikeComponent : UnitFactComponentDelegate, IInitiatorRulebookHandler, IRulebookHandler, ISubscriber, IInitiatorRulebookSubscriber + { + public ConditionsChecker Condition; + public BlueprintAbility PayloadBlueprint; + public override void OnActivate() + { + base.OnActivate(); + Init(PayloadBlueprint, base.Context.SourceAbilityContext.Ability, base.Context.SourceAbilityContext); + } + + public override void OnTurnOn() + { + base.OnTurnOn(); + Init(PayloadBlueprint, base.Context.SourceAbilityContext.Ability, base.Context.SourceAbilityContext); + } + + private void Init(BlueprintAbility ability, AbilityData source, AbilityExecutionContext context) + { + if (this.Data.payload != null) + { + base.Owner.RemoveFact(this.Data.payload); + + } + Data.payload = (Ability)base.Owner.AddFact(ability, null, null); + + Data.payload.OverrideParams = context.Params; + Data.payload.Data.SpellSource = context.Params.SpellSource; + Data.payload.Spellbook = context.Ability.Spellbook; + + MetamagicData metamagicData = source.MetamagicData; + Metamagic metamagic = (metamagicData != null) ? metamagicData.MetamagicMask : ((Metamagic)0); + if (metamagic != (Metamagic)0) + { + AbilityData data = Data.payload.Data; + MetamagicData metamagicData2 = Data.payload.Data.MetamagicData; + data.MetamagicData = (((metamagicData2 != null) ? metamagicData2.Clone() : null) ?? new MetamagicData()); + Data.payload.Data.MetamagicData.Add(metamagic); + } + + } + + // Token: 0x0600BB57 RID: 47959 RVA: 0x0030F5D0 File Offset: 0x0030D7D0 + public override void OnDispose() + { + base.OnDispose(); + base.Owner.RemoveFact(this.Data.payload); + + } + + public void OnEventAboutToTrigger(RuleAttackWithWeapon evt) + { + + } + + public void OnEventDidTrigger(RuleAttackWithWeapon evt) + { + if (!evt.AttackRoll.IsHit) + { + return; + } + if (this.Data.payload == null) + { + return; + } + if (!this.Condition.Check()) + return; + if (evt.AttackRoll.Weapon.Blueprint.IsMelee) + { + Rulebook.Trigger(new RuleCastSpell(this.Data.payload, evt.AttackRoll.Target)); + + } + } + } + + + + class SpellstrikeAlikeComponentData + { + public Ability payload; + } + + +} diff --git a/TomeOfTheFirebird/New Content/Archetypes/EldritchScionSage.cs b/TomeOfTheFirebird/New Content/Archetypes/EldritchScionSage.cs index 242778d..d9c12c0 100644 --- a/TomeOfTheFirebird/New Content/Archetypes/EldritchScionSage.cs +++ b/TomeOfTheFirebird/New Content/Archetypes/EldritchScionSage.cs @@ -60,11 +60,11 @@ public static void Make() EScionSage.AddToRemoveFeatures(4, "61fc0521e9992624e9c518060bf89c0f");//Spell Recall EScionSage.AddToRemoveFeatures(11, "0ef6ec1c2fdfc204fbd3bff9f1609490");//Improved Spell Recall var built = EScionSage.Configure(); - if (PheonixBloodline.BloodlineRequisiteFeature == null || Settings.IsDisabled("EldritchScionSage")) + if (TotFBloodlineTools.BloodlineRequisiteFeature == null || Settings.IsDisabled("EldritchScionSage")) return; built.AddComponent(x => { - x.m_Feature = PheonixBloodline.BloodlineRequisiteFeature; + x.m_Feature = TotFBloodlineTools.BloodlineRequisiteFeature; x.Group = Prerequisite.GroupType.Any; }); @@ -92,7 +92,7 @@ public static void Make() public static void Link() { - if (PheonixBloodline.BloodlineRequisiteFeature == null || Settings.IsDisabled("EldritchScionSage")) + if (TotFBloodlineTools.BloodlineRequisiteFeature == null || Settings.IsDisabled("EldritchScionSage")) return; diff --git a/TomeOfTheFirebird/New Content/Bloodlines/DragonBloodlines.cs b/TomeOfTheFirebird/New Content/Bloodlines/DragonBloodlines.cs new file mode 100644 index 0000000..fc5ed28 --- /dev/null +++ b/TomeOfTheFirebird/New Content/Bloodlines/DragonBloodlines.cs @@ -0,0 +1,207 @@ +using BlueprintCore.Blueprints.CustomConfigurators.Classes; +using BlueprintCore.Utils; +using Kingmaker.Blueprints; +using Kingmaker.Blueprints.Classes; +using Kingmaker.Blueprints.Classes.Prerequisites; +using Kingmaker.Blueprints.Classes.Selection; +using Kingmaker.Enums.Damage; +using Kingmaker.UnitLogic.Buffs.Blueprints; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Web; +using TabletopTweaks.Core.Utilities; +using UniRx; + +namespace TomeOfTheFirebird.New_Content.Bloodlines +{ + internal class DragonBloodlines + { + public static void Run() + { + LoadConstants(); + } + + static List StandardBloodragerBonusSpells = new List(); + + private static void LoadConstants() + { + + StandardBloodragerBonusSpells.Add(BlueprintTools.GetBlueprint("e8b16a8653bcc5e4a9c17b2bb07ca41f")); + StandardBloodragerBonusSpells.Add(BlueprintTools.GetBlueprint("906b529e689eee54d98cc69d63309d1b")); + + StandardBloodragerBonusSpells.Add(BlueprintTools.GetBlueprint("19f788ffa8163ea479168c1b04207868")); + + + StandardBloodragerBonusSpells.Add(BlueprintTools.GetBlueprint("174be67cf48f80d43a6b2976021a1d89")); + + } + private static void Rebuild() + { + + } + + private static void RebuildSorc() + { + + } + + private class BloodragerDragonBloodlineParts + { + public BlueprintProgression prog; + public bool vanilla; + public string DragonType; + public BlueprintBuffReference BaseBuff; + public BlueprintFeature WanderingFeature; + public BlueprintFactionReference ClawsDisplayFeature; + public List> Claws; + public Tuple Resistance; + public BlueprintFeatureReference Breath; + public BlueprintFeatureReference BreathCharge; + + public Tuple Wings; + public BlueprintFeatureReference Capstone; + public BlueprintFeatureReference prereqFeature; + public BlueprintFeatureReference FormOfTheDragon; + } + + private static BlueprintFeatureReference BRDragonGreenragerFeat => BlueprintTool.GetRef("3d0b4942c400a7f448ca09e04edfb52a"); + private static BlueprintFeatureReference BRDragonNormalFeat => BlueprintTool.GetRef("8a2a8d623f6cb574f9e0b6c82ae65c74"); + private static BlueprintFeatureSelectionReference BRDragonMMRager => BlueprintTool.GetRef("40e0698d0af6454cb272b53d8002f946"); + + private static BlueprintFeatureReference BRBreathWeaponCharge; + private static BlueprintBuff BloodragerStandardRageBuff => BlueprintTools.GetBlueprint("5eac31e457999334b98f98b60fc73b2f"); + + private static void MakeBlanksForApplyStep(BlueprintProgression bloodline, BloodragerDragonBloodlineParts parts) + { + if (parts.WanderingFeature == null) + { + parts.WanderingFeature = FeatureConfigurator.New(bloodline.name + "Wandering", Main.TotFContext.Blueprints.GetGUID(bloodline.name + "Wandering").ToString()).Configure(); + + } + if (parts.BaseBuff == null) + { + parts.BaseBuff = TabletopTweaks.Core.Utilities.Helpers.CreateBlueprint(Main.TotFContext, $"BloodragerDraconic{parts.DragonType}BaseBuff", bp => + { + bp.SetName(Main.TotFContext, $"{parts.DragonType} Dragon Bloodrage"); + bp.SetDescription(Main.TotFContext, ""); + bp.m_Flags = BlueprintBuff.Flags.HiddenInUi; + bp.IsClassFeature = true; + }).ToReference(); + } + } + + + private static BloodragerDragonBloodlineParts MakePartsFromVanilla(BlueprintProgression bloodline, bool vanilla, DamageEnergyType energy) + { + var result = new BloodragerDragonBloodlineParts(); + result.vanilla = vanilla; + result.prog = bloodline; + + + + + + return result; + } + + private static void MakeFakesForPartsStep(BlueprintProgression bloodline, bool vanilla) + { + + } + + + private static void ApplyBloodragerPartsToProgression(BloodragerDragonBloodlineParts parts) + { + parts.prog.LevelEntries = new LevelEntry[] { + TabletopTweaks.Core.Utilities.Helpers.CreateLevelEntry(1, parts.Claws[0].Item1, parts.prereqFeature, TotFBloodlineTools.BloodlineRequisiteFeature), + TabletopTweaks.Core.Utilities.Helpers.CreateLevelEntry(4, parts.Resistance.Item1, parts.Claws[1].Item1), + + TabletopTweaks.Core.Utilities.Helpers.CreateLevelEntry(6, BRDragonGreenragerFeat), + TabletopTweaks.Core.Utilities.Helpers.CreateLevelEntry(7, StandardBloodragerBonusSpells[0]), + TabletopTweaks.Core.Utilities.Helpers.CreateLevelEntry(8, parts.Resistance.Item1, parts.Claws[2].Item1, parts.Breath, parts.BreathCharge), + TabletopTweaks.Core.Utilities.Helpers.CreateLevelEntry(9, BRDragonGreenragerFeat), + TabletopTweaks.Core.Utilities.Helpers.CreateLevelEntry(10, StandardBloodragerBonusSpells[1]), + TabletopTweaks.Core.Utilities.Helpers.CreateLevelEntry(12, BRDragonNormalFeat, parts.Claws[3].Item1, parts.Wings.Item1), + TabletopTweaks.Core.Utilities.Helpers.CreateLevelEntry(13, StandardBloodragerBonusSpells[2]), + TabletopTweaks.Core.Utilities.Helpers.CreateLevelEntry(15, BRDragonNormalFeat), + TabletopTweaks.Core.Utilities.Helpers.CreateLevelEntry(16, parts.Resistance.Item1, StandardBloodragerBonusSpells[3], parts.FormOfTheDragon, parts.BreathCharge), + TabletopTweaks.Core.Utilities.Helpers.CreateLevelEntry(18, BRDragonNormalFeat), + TabletopTweaks.Core.Utilities.Helpers.CreateLevelEntry(20, parts.Capstone, parts.BreathCharge) + }; + parts.prog.AddPrerequisite(c => + { + c.Group = Prerequisite.GroupType.Any; + c.m_Feature = TotFBloodlineTools.BloodlineRequisiteFeature; + }); + parts.prog.AddPrerequisite(c => + { + c.Group = Prerequisite.GroupType.Any; + c.m_Feature = parts.prereqFeature; + }); + parts.prog.UIGroups = new UIGroup[] { + TabletopTweaks.Core.Utilities.Helpers.CreateUIGroup(BRDragonNormalFeat, BRDragonGreenragerFeat) + }; + if (parts.WanderingFeature == null) + { + parts.WanderingFeature = BloodlineTools.CreateMixedBloodFeature(Main.TotFContext, parts.prog.name +"Wandering", parts.prog, bp => + { + bp.m_Icon = parts.prog.Icon; + }).ToReference(); + } + if (parts.BaseBuff == null) + { + parts.BaseBuff = TabletopTweaks.Core.Utilities.Helpers.CreateBlueprint(Main.TotFContext, $"BloodragerDraconic{parts.DragonType}BaseBuff", bp => + { + bp.SetName(Main.TotFContext, $"{parts.DragonType} Dragon Bloodrage"); + bp.SetDescription(Main.TotFContext, ""); + bp.m_Flags = BlueprintBuff.Flags.HiddenInUi; + bp.IsClassFeature = true; + }).ToReference(); + } + var ThisBloodrageBuff = parts.BaseBuff.Get(); + + //TODO build claws setup! + foreach (var v in parts.Claws) + { + ThisBloodrageBuff.AddConditionalBuff(v.Item1, v.Item2); + } + ThisBloodrageBuff.AddConditionalBuff(parts.Resistance.Item1, parts.Resistance.Item2); + ThisBloodrageBuff.AddConditionalBuff(parts.Wings.Item1, parts.Wings.Item2); + + BloodragerStandardRageBuff.AddConditionalBuff(parts.prog, ThisBloodrageBuff); + + if (!Settings.IsTTTBaseEnabled()) + return; + + BloodlineTools.ApplyPrimalistException(parts.Resistance.Item1, 4, parts.prog); + BloodlineTools.ApplyPrimalistException(parts.Breath, 8, parts.prog); + BloodlineTools.ApplyPrimalistException(parts.Wings.Item1, 12, parts.prog); + BloodlineTools.ApplyPrimalistException(parts.FormOfTheDragon, 16, parts.prog); + BloodlineTools.ApplyPrimalistException(parts.Capstone, 20, parts.prog); + if (!parts.vanilla) + { + BloodlineTools.RegisterBloodragerBloodline(parts.prog, parts.WanderingFeature); + + } + TotFBloodlineTools.MetamagicSupport(parts.prog, BRDragonMMRager.Get());//Might or might not need + } + + + private static void RebuildBloodragerBloodline(BlueprintProgression dragon, string name, DamageEnergyType energyType) + { + //Build it like any other new bloodline with the following exceptions: + //Shared resource for breath attacks + //Shared natural armor buff - might need a central shared prog for anti-stacking + //Share the baseline claws - weapons but not feature + + //Re-use the progression but wipe it + + + + + } + } +} diff --git a/TomeOfTheFirebird/New Content/Bloodlines/PheonixBloodline.cs b/TomeOfTheFirebird/New Content/Bloodlines/PheonixBloodline.cs index 99154ad..931234d 100644 --- a/TomeOfTheFirebird/New Content/Bloodlines/PheonixBloodline.cs +++ b/TomeOfTheFirebird/New Content/Bloodlines/PheonixBloodline.cs @@ -29,19 +29,19 @@ namespace TomeOfTheFirebird.New_Content.Bloodlines { static class PheonixBloodline { - public static BlueprintFeatureReference BloodlineRequisiteFeature; + public static BlueprintFeatureReference PhoenixBloodlineRequisiteFeature; public static void MakePheonixBloodline() { - BloodlineRequisiteFeature = BlueprintTools.GetBlueprint("e2cfd3cedf7c40088b25aa82d6db3c77").ToReference(); - if (BloodlineRequisiteFeature == null) + + if (TotFBloodlineTools.BloodlineRequisiteFeature == null) return; PhoenixBloodlineRequisiteFeature = CreateBloodlineRequisiteFeature(); BlueprintFeatureReference CreateBloodlineRequisiteFeature() { - var AberrantBloodlineRequisiteFeature = TabletopTweaks.Core.Utilities.Helpers.CreateBlueprint(Main.TotFContext, "PhoenixBloodlineRequisiteFeature", bp => + var PheonixBloodlineRequisiteFeature = TabletopTweaks.Core.Utilities.Helpers.CreateBlueprint(Main.TotFContext, "PhoenixBloodlineRequisiteFeature", bp => { bp.IsClassFeature = true; bp.HideInUI = true; @@ -50,15 +50,15 @@ BlueprintFeatureReference CreateBloodlineRequisiteFeature() bp.SetName(Main.TotFContext, "Phoenix Bloodline"); bp.SetDescription(Main.TotFContext, "Phoenix Bloodline Requisite Feature"); }); - Main.TotFContext.Logger.LogPatch("Created", AberrantBloodlineRequisiteFeature); - return AberrantBloodlineRequisiteFeature.ToReference(); + Main.TotFContext.Logger.LogPatch("Created", PheonixBloodlineRequisiteFeature); + return PheonixBloodlineRequisiteFeature.ToReference(); } MakePhoenixBloodragerBloodline(); } private static void MakePhoenixBloodragerBloodline() { - if (BloodlineRequisiteFeature == null) + if (TotFBloodlineTools.BloodlineRequisiteFeature == null) return; var BloodragerStandardRageBuff = BlueprintTools.GetBlueprint("5eac31e457999334b98f98b60fc73b2f"); var BloodragerClass = BlueprintTools.GetBlueprint("d77e67a814d686842802c9cfd8ef8499").ToReference(); @@ -663,7 +663,7 @@ private static void MakePhoenixBloodragerBloodline() bp.m_Icon = AssetLoader.LoadInternal(Main.TotFContext, folder: "Abilities", file: "Phoenix_Bloodline.png"); bp.HideInUI = false; bp.LevelEntries = new LevelEntry[] { - TabletopTweaks.Core.Utilities.Helpers.CreateLevelEntry(1, BloodragerPhoenixDispellingStrikesDisplay, BloodragerPhoenixDispellingStrikesLevel1, PhoenixBloodlineRequisiteFeature, BloodlineRequisiteFeature), + TabletopTweaks.Core.Utilities.Helpers.CreateLevelEntry(1, BloodragerPhoenixDispellingStrikesDisplay, BloodragerPhoenixDispellingStrikesLevel1, PhoenixBloodlineRequisiteFeature, TotFBloodlineTools.BloodlineRequisiteFeature), TabletopTweaks.Core.Utilities.Helpers.CreateLevelEntry(4, HeartOfFireFeature), TabletopTweaks.Core.Utilities.Helpers.CreateLevelEntry(6, BloodragerPhoenixFeatSelectionGreenrager), @@ -681,7 +681,7 @@ private static void MakePhoenixBloodragerBloodline() bp.AddPrerequisite(c => { c.Group = Prerequisite.GroupType.Any; - c.m_Feature = BloodlineRequisiteFeature; + c.m_Feature = TotFBloodlineTools.BloodlineRequisiteFeature; }); bp.AddPrerequisite(c => { @@ -715,21 +715,68 @@ private static void MakePhoenixBloodragerBloodline() if (!Settings.IsTTTBaseEnabled()) return; + if (Settings.IsEnabled("PhoenixBloodline")) + { - BloodlineTools.ApplyPrimalistException(HeartOfFireFeature, 4, BloodragerPhoenixBloodline); - BloodlineTools.ApplyPrimalistException(BlazingVitalityFeature, 8, BloodragerPhoenixBloodline); - BloodlineTools.ApplyPrimalistException(MoltenWingsFeature, 12, BloodragerPhoenixBloodline); - BloodlineTools.ApplyPrimalistException(SelfRez, 16, BloodragerPhoenixBloodline); - BloodlineTools.ApplyPrimalistException(PheonixFireFeature, 20, BloodragerPhoenixBloodline); - ProgressionConfigurator.For(BloodragerClass.Get().Progression).AddToUIGroups(BloodragerPhoenixSpell7, BloodragerPhoenixSpell10, BloodragerPhoenixSpell13, BloodragerPhoenixSpell16).AddToUIGroups(BloodragerPhoenixDispellingStrikesDisplay, MoltenWingsFeature, SelfRez, PheonixFireFeature).Configure(); - + BloodlineTools.ApplyPrimalistException(HeartOfFireFeature, 4, BloodragerPhoenixBloodline); + BloodlineTools.ApplyPrimalistException(BlazingVitalityFeature, 8, BloodragerPhoenixBloodline); + BloodlineTools.ApplyPrimalistException(MoltenWingsFeature, 12, BloodragerPhoenixBloodline); + BloodlineTools.ApplyPrimalistException(SelfRez, 16, BloodragerPhoenixBloodline); + BloodlineTools.ApplyPrimalistException(PheonixFireFeature, 20, BloodragerPhoenixBloodline); + ProgressionConfigurator.For(BloodragerClass.Get().Progression).AddToUIGroups(BloodragerPhoenixSpell7, BloodragerPhoenixSpell10, BloodragerPhoenixSpell13, BloodragerPhoenixSpell16).AddToUIGroups(BloodragerPhoenixDispellingStrikesDisplay, MoltenWingsFeature, SelfRez, PheonixFireFeature).Configure(); - BloodlineTools.RegisterBloodragerBloodline(BloodragerPhoenixBloodline, BloodragerPhoenixBloodlineWandering); + + BloodlineTools.RegisterBloodragerBloodline(BloodragerPhoenixBloodline, BloodragerPhoenixBloodlineWandering); + } TotFBloodlineTools.MetamagicSupport(BlueprintTools.GetModBlueprint(Main.TotFContext, "BloodragerPhoenixBloodline")); } - + private static void MakePhoenixSorcBloodline() + { + /* + * Class Skill: Knowledge (Arcana) + +Bonus Spells: color spray (3rd), see invisibility (5th), magic circle against evil (7th), wall of fire (9th), break enchantment (11th), path of the winds (13th), firebrand (15th), prismatic wall (17th), fiery body (19th). + */ + + //Color spray, see invis are in + //MCaE is not in. + //It's a protection from evil aura with a summon-blocker effect and duration boost. PROBABLY not worth it given communal + enduring? + //Wall of fire has been modded - alternates are fire shield / controlled fireball + + //Break enchant is in + //Path of the winds is probably non-implementable? + //Firebrand is in + //Pris wall is right out - sunburst or fire storm is good replacer + //Firey body is in + //Bonus feats: Dodge, Elemental Focus (fire), Fast Healer, Improved Initiative, Iron Will, Mobility, Quicken Spell, Skill Focus (Knowledge [arcana]). + + //Bloodline Arcana: When casting any spell that deals fire damage, you can instead heal your targets. The spell deals no damage, and living creatures affected by the spell instead regain a number of hit points equal to half the fire damage the spell would normally deal. + //OH GOD HOW TO DO THIS + //look at deal damage rule? + + //The Unseen World (Su): At 1st level, you gain detect magic and read magic as spells known. At 5th level, the phoenix’s blood drives you to find and save lost knowledge and magical items. As a swift action, you can automatically identify the properties of a non-cursed magic item you hold; you must still identify a cursed item as normal to correctly identify it as cursed. You can use this ability a number of times equal to your Charisma modifier per day. + //Does jackall + + //Immolation (Su): At 3rd level, you gain the ability to surround yourself in fire as a swift action. This fire burns for a number of rounds per day equal to your character level plus your Charisma bonus. These rounds do not have to be consecutive. Any unarmed attacks you make while affected by immolation deal an additional 1d6 points of fire damage, and any creature that ends its turn adjacent to you while you’re affected by immolation also takes 1d6 points of fire damage. + //Not bad, make add to natural weapons and add IFF because indiscriminate damage auras suck + //Extend to users melee weapons at 20? + + //Vermilion Wings (Su): At 9th level, you gain the ability to grow a pair of phoenix wings from your back as a standard action. The wings grant you a fly speed of 60 feet with good maneuverability. You can dismiss the wings as a free action. + //Standard issue flight power + + //Restoring Flames (Sp): At 15th level, you can cast greater restoration once per day as a spell-like ability. + //Not terrible + + //Rebirth (Su): At 20th level, the full power of a phoenix erupts from within you if you perish. When you die, you are brought back to life, as true resurrection, after 1 minute. This ability can be used only once every 24 hours, and if you are slain again within this period, your death is permanent. + + //Time delay makes useless, make act like pheonix gift w/o the bomb! + + + + } + } } diff --git a/TomeOfTheFirebird/New Content/Bloodlines/TotFBloodlineTools.cs b/TomeOfTheFirebird/New Content/Bloodlines/TotFBloodlineTools.cs index cf0369b..f77d8be 100644 --- a/TomeOfTheFirebird/New Content/Bloodlines/TotFBloodlineTools.cs +++ b/TomeOfTheFirebird/New Content/Bloodlines/TotFBloodlineTools.cs @@ -15,8 +15,24 @@ namespace TomeOfTheFirebird.New_Content.Bloodlines { class TotFBloodlineTools { + private static BlueprintFeatureReference _BloodlineRequisiteFeature; + + public static BlueprintFeatureReference BloodlineRequisiteFeature + { + get { + if (_BloodlineRequisiteFeature == null) { } + { + _BloodlineRequisiteFeature = BlueprintTools.GetBlueprint("e2cfd3cedf7c40088b25aa82d6db3c77").ToReference(); + } + return _BloodlineRequisiteFeature; + } + + } + + + private static readonly BlueprintCharacterClass BloodragerClass = BlueprintTools.GetBlueprint("d77e67a814d686842802c9cfd8ef8499"); - public static void MetamagicSupport(BlueprintProgression bloodline) + public static void MetamagicSupport(BlueprintProgression bloodline, BlueprintFeatureSelection extant = null) { if (!Settings.IsTTTBaseEnabled()) return; @@ -25,7 +41,7 @@ public static void MetamagicSupport(BlueprintProgression bloodline) int[] featLevels = { 6, 9, 12, 15, 18 }; var metamagicFeats = FeatTools.GetMetamagicFeats(); - BlueprintFeatureSelection MetamagicRagerFeatSelection = null; + BlueprintFeatureSelection MetamagicRagerFeatSelection = extant; foreach (var levelEntry in bloodline.LevelEntries.Where(entry => featLevels.Contains(entry.Level))) { Main.TotFContext.Logger.Log($"Scanning level {levelEntry.Level} in phoenix bloodline"); diff --git a/TomeOfTheFirebird/New Content/Features/BloodHavoc.cs b/TomeOfTheFirebird/New Content/Features/BloodHavoc.cs index 8a7b82a..868b538 100644 --- a/TomeOfTheFirebird/New Content/Features/BloodHavoc.cs +++ b/TomeOfTheFirebird/New Content/Features/BloodHavoc.cs @@ -3,11 +3,41 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using TomeOfTheFirebird.Helpers; +using TomeOfTheFirebird.New_Components.BloodlineMutation; namespace TomeOfTheFirebird.New_Content.Features { class BloodHavoc { + public static void Make() + { + if (Settings.IsEnabled("BloodHavoc")) + { + var config = MakerTools.MakeFeature("BloodHavocFeature", "Blood Havoc", "Whenever you cast a bloodrager or sorcerer spell that deals damage, add 1 point of damage per die rolled. This benefit applies only to damaging spells that belong to schools you have selected with Spell Focus or that are bloodline spells for your bloodline. "); + config.AddComponent(); + config.AddPrerequisiteClassLevel("d77e67a814d686842802c9cfd8ef8499", 4, group: Kingmaker.Blueprints.Classes.Prerequisites.Prerequisite.GroupType.Any); + config.AddPrerequisiteClassLevel("b3a505fb61437dc4097f43c3f8f9a4cf", 1, group: Kingmaker.Blueprints.Classes.Prerequisites.Prerequisite.GroupType.Any); + config.AddPrerequisiteArchetypeLevel(archetype: "d078b2ef073f2814c9e338a789d97b73", characterClass: "45a4607686d96a1498891b3286121780", level:1, group: Kingmaker.Blueprints.Classes.Prerequisites.Prerequisite.GroupType.Any); + if (Settings.IsEnabled("EldritchScionSage")) + { + config.AddPrerequisiteArchetypeLevel(archetype: "EldritchScionSageArchetype", characterClass: "45a4607686d96a1498891b3286121780", level: 1, group: Kingmaker.Blueprints.Classes.Prerequisites.Prerequisite.GroupType.Any); + } + config.AddPrerequisiteClassLevel("b3a505fb61437dc4097f43c3f8f9a4cf", 1, group: Kingmaker.Blueprints.Classes.Prerequisites.Prerequisite.GroupType.Any); + config.Configure(); + + BloodlineMutations.AddToSelectors("BloodHavocFeature"); + + } + else + { + var config = MakerTools.MakeFeature("BloodHavocFeature", "Blood Havoc", "Whenever you cast a bloodrager or sorcerer spell that deals damage, add 1 point of damage per die rolled. This benefit applies only to damaging spells that belong to schools you have selected with Spell Focus or that are bloodline spells for your bloodline. "); + + + config.Configure(); + + } + } /* * Although heirs to similar arcane bloodlines may share commonalities, the unique circumstances in which a bloodline enters a bloodrager or sorcerer’s lineage can result in the manifestation of particularly strange or unusual bloodline powers known as mutations. Whenever a bloodrager or a sorcerer gains a new bloodline power, she can swap her bloodline power for a bloodline mutation whose prerequisites she meets. Once this choice is made, it cannot be changed, and a bloodrager or sorcerer cannot swap a bloodline power that she has altered or replaced with an archetype for a bloodline mutation. A bloodrager need not be in a bloodrage to use her bloodline mutation powers. diff --git a/TomeOfTheFirebird/New Content/Features/BloodlineMutations.cs b/TomeOfTheFirebird/New Content/Features/BloodlineMutations.cs index 9001cb2..de82578 100644 --- a/TomeOfTheFirebird/New Content/Features/BloodlineMutations.cs +++ b/TomeOfTheFirebird/New Content/Features/BloodlineMutations.cs @@ -1,11 +1,17 @@ -using BlueprintCore.Utils; +using BlueprintCore.Blueprints.CustomConfigurators.Classes; +using BlueprintCore.Blueprints.CustomConfigurators.Classes.Selection; +using BlueprintCore.Utils; +using Kingmaker.Blueprints; using Kingmaker.Blueprints.Classes; using Kingmaker.Blueprints.Classes.Selection; +using Kingmaker.UnitLogic.FactLogic; +using Kingmaker.Utility; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using TomeOfTheFirebird.New_Components.BloodlineMutation; namespace TomeOfTheFirebird.New_Content.Features { @@ -13,13 +19,123 @@ class BloodlineMutations { public static void Setup() { + if (!Settings.BloodlineMutationsEnabled()) + return; + Main.TotFContext.Logger.Log($"Processing sorc bloodlines for bloodline mutations"); var sorc = BlueprintTool.Get("24bef8d1bee12274686f6da6ccbc8914").AllFeatures.Where(x => x is BlueprintProgression).Select(x => x as BlueprintProgression); + foreach(var sorcBloodline in sorc) + { + ProcessProgression(sorcBloodline); + } + Main.TotFContext.Logger.Log($"Processing crossblooded sorc bloodlines for bloodline mutations"); + var xsorc = BlueprintTool.Get("60c99d78a70e0b44f87ba01d02d909a6").AllFeatures.Where(x => x is BlueprintProgression).Select(x => x as BlueprintProgression); + foreach (var sorcBloodline in xsorc) + { + ProcessProgression(sorcBloodline); + } + Main.TotFContext.Logger.Log($"Processing seeker sorc bloodlines for bloodline mutations"); + var seeksorc = BlueprintTool.Get("7bda7cdb0ccda664c9eb8978cf512dbc").AllFeatures.Where(x => x is BlueprintProgression).Select(x => x as BlueprintProgression); + foreach (var sorcBloodline in seeksorc) + { + ProcessProgression(sorcBloodline); + } + + Main.TotFContext.Logger.Log($"Processing bloodrager bloodlines for bloodline mutations"); + var bloodrager = BlueprintTool.Get("62b33ac8ceb18dd47ad4c8f06849bc01").AllFeatures.Where(x => x is BlueprintProgression).Select(x => x as BlueprintProgression); + foreach (var bloodragerbloodline in bloodrager) + { + ProcessProgression(bloodragerbloodline); + } + + ProcessProgression(BlueprintTool.Get("8a95d80a3162d274896d50c2f18bb6b1"));//Empyreal + ProcessProgression(BlueprintTool.Get("a46d4bd93601427409d034a997673ece"));//Sylvan + + List ElementalDieScalingActiveAttackloodlinePowers = new(); + List ShittyAttackSpellLikeBloodlinePowers = new(); + //Bloodrager + ElementalDieScalingActiveAttackloodlinePowers.Add("3dbf2ff987b060f4fbfe3df88a4f51f6");//Black Dragon Breath + ElementalDieScalingActiveAttackloodlinePowers.Add("41dbfcc6584aa34418cd7654eafe4b55");//Blue Dragon Breath + ElementalDieScalingActiveAttackloodlinePowers.Add("f164bd712ff93fc4a9d034cf8a587098");//Brass Dragon Breath + ElementalDieScalingActiveAttackloodlinePowers.Add("c99f37519a1e96d40a09d0f1bd4a9da4");//Copper Dragon Breath + ElementalDieScalingActiveAttackloodlinePowers.Add("ff81c7764c54d0f4cae959f7a11d3c0b");//Gold Dragon Breath + ElementalDieScalingActiveAttackloodlinePowers.Add("e295230146389784eb9ca50d88b74bb3");//Red Dragon Breath + ElementalDieScalingActiveAttackloodlinePowers.Add("8788db3aa77e736419a9cb3b53451e7e");//White Dragon Breath + ElementalDieScalingActiveAttackloodlinePowers.Add("a2ed208df4a37ab49820913c695517dd");//Green Dragon Breath + ElementalDieScalingActiveAttackloodlinePowers.Add("1a7036520ed1022439f5c9d63ac76503");//Silver Dragon Breath + ElementalDieScalingActiveAttackloodlinePowers.Add("53b8b1fd83f4bf94aa9d1fc2032b2cac");//Bronze Dragon Breath + + //f88081f3d2ed69c429736051f2fb80ae - hellfire charge, not an attack spell kin ability but close? + //Sorc + ShittyAttackSpellLikeBloodlinePowers.Add("64aca51981fc11346a20b723d7667e47"); + + ElementalDieScalingActiveAttackloodlinePowers.Add("3f31704e595e78942b3640cdc9b95d8b");//Red Dragon Breath + ElementalDieScalingActiveAttackloodlinePowers.Add("598e33639b662784fb07c0e4c8978aa4");//Gold Dragon Breath + ElementalDieScalingActiveAttackloodlinePowers.Add("60a3047f434f38544a2878c26955d3ad");//Blue Dragon Breath + ElementalDieScalingActiveAttackloodlinePowers.Add("633b622267c097d4abe3ec6445c05152");//Green Dragon Breath + ElementalDieScalingActiveAttackloodlinePowers.Add("84be529914c90664aa948d8266bb3fa6");//White Dragon Breath + ElementalDieScalingActiveAttackloodlinePowers.Add("531a57e0c19f80945b68bdb3e289279a");//Brass Dragon Breath + ElementalDieScalingActiveAttackloodlinePowers.Add("1e65b0b2db777e24db96d8bc52cc9207");//Black Dragon Breath + ElementalDieScalingActiveAttackloodlinePowers.Add("732291d7ac20b0949aae002622e00b34");//Bronze Dragon Breath + ElementalDieScalingActiveAttackloodlinePowers.Add("11d03ebc508d6834cad5992056ad01a4");//Silver Dragon Breath + ElementalDieScalingActiveAttackloodlinePowers.Add("826ef8251d9243941b432f97d901e938");//Copper Dragon Breath + + + ElementalDieScalingActiveAttackloodlinePowers.Add("4729c2ac98d02004fb440d17f7786e28");//Air Beam + ElementalDieScalingActiveAttackloodlinePowers.Add("8c2a0033a591b9247b45af575f12af77");//Earth Beam + ElementalDieScalingActiveAttackloodlinePowers.Add("1b4989258e5964149a909e47c72b7f67");//Fire Beam + ElementalDieScalingActiveAttackloodlinePowers.Add("9d5cb7c1b77455b4d84169ce081934c6");//Water Beam + + + ElementalDieScalingActiveAttackloodlinePowers.Add("87e837a180a12db448a6d78e58e1b0a6");//Infernal Hellfire + + AbstractBloodlineMutationComponent.LoadElementalAttackPowers(ElementalDieScalingActiveAttackloodlinePowers); + AbstractBloodlineMutationComponent.LoadBadScalingAttackPowers(ShittyAttackSpellLikeBloodlinePowers); + } - private static void ProcessProgression(BlueprintProgression blueprintProgression) + + public static void AddToSelectors(Blueprint blueprint) { + + + FeatureSelectionConfigurator.For("3a60f0c0442acfb419b0c03b584e1394").AddToAllFeatures(blueprint).Configure(); + var bloodrager = BlueprintTool.Get("62b33ac8ceb18dd47ad4c8f06849bc01").AllFeatures.Where(x => x is BlueprintProgression).Select(x => x as BlueprintProgression); + List bonusFeats = new(); + foreach(var prog in bloodrager) + { + var green = prog.LevelEntries.FirstOrDefault(x => x.Level == 6)?.Features.FirstOrDefault(x => x.name.Contains("Greenrager")) as BlueprintFeatureSelection; + var meta = prog.LevelEntries.FirstOrDefault(x => x.Level == 6)?.Features.FirstOrDefault(x => x.name.Contains("Meta")) as BlueprintFeatureSelection; + var stadnard = prog.LevelEntries.FirstOrDefault(x => x.Level == 12)?.Features.FirstOrDefault(x => x.name.Contains("FeatSelection")) as BlueprintFeatureSelection; + if (green != null && !bonusFeats.Contains(green)) + { + bonusFeats.Add(green); + } + if (meta != null && !bonusFeats.Contains(meta)) + { + bonusFeats.Add(meta); + } + if (stadnard != null && !bonusFeats.Contains(stadnard)) + { + bonusFeats.Add(stadnard); + } + + + + } + + foreach(var v in bonusFeats) + { + FeatureSelectionConfigurator.For(v).AddToAllFeatures(blueprint).Configure(); + } + } + + private static void ProcessProgression(BlueprintProgression blueprintProgression) + { + Main.TotFContext.Logger.Log($"Processing progression {blueprintProgression} for bloodline mutations"); + ProgressionConfigurator.For(blueprintProgression).AddBloodlineSpellComponents().Configure(); + } } } diff --git a/TomeOfTheFirebird/New Content/ModifySpellLists/AzataMythicList.cs b/TomeOfTheFirebird/New Content/ModifySpellLists/AzataMythicList.cs new file mode 100644 index 0000000..0f65da1 --- /dev/null +++ b/TomeOfTheFirebird/New Content/ModifySpellLists/AzataMythicList.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TomeOfTheFirebird.New_Content.ModifySpellLists +{ + class AzataMythicList + { + //Rules: 9/8/8/7/7/6/6 picks + //Spells that do the same thing more or less only count as 1 + //Spells that do the same thing but shifted chaos/good only count as 1 + //Theme order: + //Good/Chaos/rainbow/freedom + //Hope/song/light/randomness/lolz + /* + *Level 1: + * Protection from law/evil + * Unbreakable Heart/Remove Fear + * Color Spray + * Bless + * Challenge Evil + * Feather Step + * + * + * Level 2 + * Spear Of Purity + * Laughter + * Aid + * Heroism + * LuckAndResolve + * Communal Prorection from Law/Evil + * Align Weapon (Chaos/Good) + * + * Level 3 + * + * Confusion + * Good Hope + * Remove Curse + * DispelMagic + * + * Level 4 + * Rainbow Pattern + * Freedom Of Movement + * Holy Smite / Chaos Hammer + * Break Enchantment + * + * Level Whatever: Elemental Assessor + * + * Level 5: + * Song Of Discord + * Azata Aspect (as Angelic Aspect but custom) + * Cleanse + * Sacred Nimbus + * + * Level 6: + * Chain Lightning + * Greater Heroism + * EagleSoul + * + * Level 7 + * Prismatic Spray + * Holy Word / Word + * Greater Azata Aspect (as Angelic Aspect but custom) + */ + + } +} diff --git a/TomeOfTheFirebird/New Content/Spells/BoneFists.cs b/TomeOfTheFirebird/New Content/Spells/BoneFists.cs index 7e69cb8..83ca5c4 100644 --- a/TomeOfTheFirebird/New Content/Spells/BoneFists.cs +++ b/TomeOfTheFirebird/New Content/Spells/BoneFists.cs @@ -35,7 +35,7 @@ public static void BuildSpell() if (Settings.IsEnabled("BoneFists")) { BoneFists.AddToSpellLists(2, SpellList.Bloodrager, SpellList.Cleric, SpellList.Druid, SpellList.Shaman, SpellList.Hunter, SpellList.Ranger, SpellList.Witch, SpellList.Wizard); - + BoneFists.AddSpellToPsychic(2); } BoneFists.SetLocalizedSavingThrow(new Kingmaker.Localization.LocalizedString()); diff --git a/TomeOfTheFirebird/New Content/Spells/ElementalShieldSpells.cs b/TomeOfTheFirebird/New Content/Spells/ElementalShieldSpells.cs index 706d520..efcefe6 100644 --- a/TomeOfTheFirebird/New Content/Spells/ElementalShieldSpells.cs +++ b/TomeOfTheFirebird/New Content/Spells/ElementalShieldSpells.cs @@ -34,7 +34,8 @@ public static void Build() if (Settings.IsEnabled("VitrolicMist")) { VitrolicMistBuilder.AddToSpellLists(4, SpellList.Alchemist, SpellList.Bloodrager, SpellList.Magus, SpellList.Wizard); - + VitrolicMistBuilder.AddSpellToSummoner(4); + } FireShieldWarmBuilder.SetRange(AbilityRange.Personal).AllowTargeting(friends: true, self: true).SetAnimation( UnitAnimationActionCastSpell.CastAnimationStyle.Self).SetAvailableMetamagic(Metamagic.Quicken, Metamagic.Extend, Metamagic.Heighten, Metamagic.CompletelyNormal); @@ -91,7 +92,7 @@ public static void Build() { rootFireShieldBuilder.AddToSpellLists(4, SpellList.Alchemist, SpellList.Bloodrager, SpellList.Magus, SpellList.Wizard, SpellList.SunDomain); rootFireShieldBuilder.AddToSpellLists(5, SpellList.FireDomain); - + rootFireShieldBuilder.AddSpellToSummoner(4); } diff --git a/TomeOfTheFirebird/New Content/Spells/EntropicShield.cs b/TomeOfTheFirebird/New Content/Spells/EntropicShield.cs index 62ade4a..2e659ce 100644 --- a/TomeOfTheFirebird/New Content/Spells/EntropicShield.cs +++ b/TomeOfTheFirebird/New Content/Spells/EntropicShield.cs @@ -29,6 +29,7 @@ public static void Make() if (Settings.IsEnabled("EntropicShield")) { maker.AddToSpellLists(1, SpellList.Cleric); + maker.AddSpellToPsychic(1); } BlueprintCore.Blueprints.CustomConfigurators.UnitLogic.Buffs.BuffConfigurator buffMaker = MakerTools.MakeBuff("EntropicShieldBuff", "Entropic Shield", "A magical field appears around you, glowing with a chaotic blast of multicolored hues. This field deflects incoming arrows, rays, and other ranged attacks. Each ranged attack directed at you for which the attacker must make an attack roll has a 20% miss chance (similar to the effects of concealment). Other attacks that simply work at a distance are not affected.", entSprie); diff --git a/TomeOfTheFirebird/New Content/Spells/FieryRunes.cs b/TomeOfTheFirebird/New Content/Spells/FieryRunes.cs new file mode 100644 index 0000000..7a2206e --- /dev/null +++ b/TomeOfTheFirebird/New Content/Spells/FieryRunes.cs @@ -0,0 +1,239 @@ +using BlueprintCore.Actions.Builder; +using BlueprintCore.Actions.Builder.ContextEx; +using BlueprintCore.Blueprints.CustomConfigurators; +using BlueprintCore.Blueprints.CustomConfigurators.UnitLogic.Abilities; +using BlueprintCore.Blueprints.CustomConfigurators.UnitLogic.Buffs; +using BlueprintCore.Conditions.Builder; +using BlueprintCore.Conditions.Builder.ContextEx; +using BlueprintCore.Utils; +using BlueprintCore.Utils.Types; +using Kingmaker.Blueprints.Classes; +using Kingmaker.Blueprints.Classes.Spells; +using Kingmaker.UnitLogic.Abilities.Blueprints; +using Newtonsoft.Json.Linq; +using TomeOfTheFirebird.Helpers; +using TomeOfTheFirebird.New_Components; +using TomeOfTheFirebird.Reference; +using UnityEngine; + +namespace TomeOfTheFirebird.New_Spells +{ + public static class FieryRunes + { + + //Elements that are different between the two versions + //Records (other than for toggle and attack effect) + //Localization + //Spell level + //Charges + + //Objects with two instances + //Spell applied buff + //Touch spell + //Cast + static Sprite evocIcon => BlueprintTool.Get("f8019b7724d72a241a97157bc37f1c3b").Icon; + private static AbilityConfigurator MakeCast(string sysname, string touch, int spellLevel) + { + + var guid = Main.TotFContext.Blueprints.GetGUID(sysname); + var castRaw = AbilityConfigurator.NewSpell(sysname, guid.ToString(), SpellSchool.Evocation, true, SpellDescriptor.Fire); + castRaw.SetDisplayName(sysname + ".Name"); + castRaw.SetDescription(sysname + ".Desc"); + castRaw.SetCanTargetSelf(true); + castRaw.SetCanTargetFriends(true); + castRaw.SetRange(AbilityRange.Touch); + castRaw.SetIcon(evocIcon); + castRaw.SetEffectOnAlly(AbilityEffectOnUnit.Helpful); + + castRaw.AddToSpellLists(spellLevel, SpellList.Alchemist, SpellList.Bloodrager, SpellList.Druid,SpellList.Magus, SpellList.Wizard); + castRaw.AddAbilityEffectStickyTouch(touchDeliveryAbility: touch); + + return castRaw; + } + + private static BuffConfigurator MakeBuff(string sysname) + { + var guid = Main.TotFContext.Blueprints.GetGUID(sysname + "Buff"); + var buff = BuffConfigurator.New(sysname + "Buff", guid.ToString()); + buff.SetDisplayName(sysname + ".Name"); + buff.SetDescription(sysname + ".Desc"); + buff.SetIcon(evocIcon); + buff.AddAbilityResources(amount: 0, resource: "FieryRunesCharges", restoreAmount: false); + + buff.AddFacts(new() { "FieryRunesToggle" }); + buff.AddComponent(x => + { + x.PayloadBlueprint = BlueprintTool.Get("FieryRunesAttack"); + x.Condition = ConditionsBuilder.New().HasBuff("FieryRunesAllowBuff").Build(); + }); + + + + return buff; + } + + private static AbilityConfigurator MakeTouch(string sysname, string buff, bool array) + { + var guid = Main.TotFContext.Blueprints.GetGUID(sysname + "Touch"); + var castRaw = AbilityConfigurator.NewSpell(sysname + "Touch", guid.ToString(), SpellSchool.Evocation, false, SpellDescriptor.Fire); + castRaw.SetDisplayName(sysname + ".Name"); + castRaw.SetDescription(sysname + ".Desc"); + castRaw.SetCanTargetSelf(true); + castRaw.SetCanTargetFriends(true); + castRaw.SetRange(AbilityRange.Touch); + castRaw.SetIcon(evocIcon); + castRaw.SetEffectOnAlly(AbilityEffectOnUnit.Helpful); + castRaw.AddAbilityDeliverTouch(touchWeapon: "bb337517547de1a4189518d404ec49d4"); + + var act = ActionsBuilder.New().RemoveBuff("FieryRunesBuff").RemoveBuff("FieryRunesArrayBuff").ApplyBuff(buff, ContextDuration.Variable(ContextValues.Rank(Kingmaker.Enums.AbilityRankType.Default), Kingmaker.UnitLogic.Mechanics.DurationRate.Minutes), isFromSpell: true); + if (array) + { + act.RestoreResource("FieryRunesCharges", ContextValues.Rank(Kingmaker.Enums.AbilityRankType.ProjectilesCount)); + } + else + { + act.RestoreResource("FieryRunesCharges", ContextValues.Constant(1)); + } + + castRaw.AddAbilityEffectRunAction(act); + castRaw.AddContextRankConfig(ContextRankConfigs.CasterLevel()); + if (array) + { + castRaw.AddContextRankConfig(new Kingmaker.UnitLogic.Mechanics.Components.ContextRankConfig() + { + m_BaseValueType = Kingmaker.UnitLogic.Mechanics.Components.ContextRankBaseValueType.CasterLevel, + m_Type = Kingmaker.Enums.AbilityRankType.ProjectilesCount, + m_Progression = Kingmaker.UnitLogic.Mechanics.Components.ContextRankProgression.Custom, + m_CustomProgression = new Kingmaker.UnitLogic.Mechanics.Components.ContextRankConfig.CustomProgressionItem[] + { + new Kingmaker.UnitLogic.Mechanics.Components.ContextRankConfig.CustomProgressionItem + { + BaseValue= 0, + ProgressionValue = 1, + }, + new Kingmaker.UnitLogic.Mechanics.Components.ContextRankConfig.CustomProgressionItem + { + BaseValue= 5, + ProgressionValue = 2, + }, + new Kingmaker.UnitLogic.Mechanics.Components.ContextRankConfig.CustomProgressionItem + { + BaseValue= 10, + ProgressionValue = 3, + }, + new Kingmaker.UnitLogic.Mechanics.Components.ContextRankConfig.CustomProgressionItem + { + BaseValue= 15, + ProgressionValue = 4, + }, + new Kingmaker.UnitLogic.Mechanics.Components.ContextRankConfig.CustomProgressionItem + { + BaseValue= 20, + ProgressionValue = 5, + } + } + + }); + } + return castRaw; + + } + + + + public static void Make() + { + + var guid = Main.TotFContext.Blueprints.GetGUID("FieryRunesCharges"); + var resourceConfig = AbilityResourceConfigurator.New("FieryRunesCharges", guid.ToString()); + resourceConfig.SetMax(20); + resourceConfig.SetUseMax(true); + + resourceConfig.Configure(); + if (Settings.IsEnabled("FieryRunes")) + { + var fieryRunesAttack = MakerTools.MakeSpell("FieryRunesAttack", LocalizationTool.GetString("FieryRunesDischarge.Name"), "", evocIcon, Kingmaker.Blueprints.Classes.Spells.SpellSchool.Evocation, null, descriptors: SpellDescriptor.Fire); + fieryRunesAttack.AddAbilityEffectRunAction(ActionsBuilder.New().DealDamage(new Kingmaker.RuleSystem.Rules.Damage.DamageTypeDescription() { Type = Kingmaker.RuleSystem.Rules.Damage.DamageType.Energy, Energy = Kingmaker.Enums.Damage.DamageEnergyType.Fire }, new Kingmaker.UnitLogic.Mechanics.ContextDiceValue() { DiceType = Kingmaker.RuleSystem.DiceType.D4, DiceCountValue = ContextValues.Rank(Kingmaker.Enums.AbilityRankType.DamageDice), BonusValue = ContextValues.Rank(Kingmaker.Enums.AbilityRankType.DamageDice) })); + fieryRunesAttack.AddContextRankConfig(new Kingmaker.UnitLogic.Mechanics.Components.ContextRankConfig() + { + m_Type = Kingmaker.Enums.AbilityRankType.DamageDice, + m_BaseValueType = Kingmaker.UnitLogic.Mechanics.Components.ContextRankBaseValueType.CasterLevel, + m_Progression = Kingmaker.UnitLogic.Mechanics.Components.ContextRankProgression.OnePlusDiv2, + m_Max = 5 + }); + fieryRunesAttack.AddAbilityResourceLogic(1, isSpendResource: true, requiredResource: "FieryRunesCharges"); + fieryRunesAttack.Configure(); + var allowBuff = MakerTools.MakeBuff("FieryRunesAllowBuff", "FieryRunesAllowBuff", ""); + + + allowBuff.Configure(); + + var toggle = MakerTools.MakeToggle("FieryRunesToggle", LocalizationTool.GetString("FieryRunes.Name"), LocalizationTool.GetString("FieryRunes.Desc"), evocIcon); + toggle.SetBuff("FieryRunesAllowBuff"); + toggle.Configure(); + + + var regularBuff = MakeBuff("FieryRunes"); + var arrayBuff = MakeBuff("FieryRuneArray"); + + regularBuff.Configure(); + arrayBuff.Configure(); + + var regularTouch = MakeTouch("FieryRunes", "FieryRunesBuff", false); + var arrayTouch = MakeTouch("FieryRuneArray", "FieryRuneArrayBuff", false); + + MakeCast("FieryRunes", "FieryRunesTouch", 2).Configure(); + MakeCast("FieryRuneArray", "FieryRuneArrayTouch", 4).Configure(); + + } + else + { + MakerTools.MakeSpell("FieryRunesAttack", LocalizationTool.GetString("FieryRunesDischarge.Name"), "", null, Kingmaker.Blueprints.Classes.Spells.SpellSchool.Evocation, null, descriptors: SpellDescriptor.Fire).Configure(); + MakerTools.MakeBuff("FieryRunesAllowBuff", "FieryRunesAllowBuff", "").Configure(); + MakerTools.MakeToggle("FieryRunesToggle", LocalizationTool.GetString("FieryRunes.Name"), LocalizationTool.GetString("FieryRunes.Desc")).Configure(); + + MakerTools.MakeBuff("FieryRunesBuff", LocalizationTool.GetString("FieryRunes.Name"), LocalizationTool.GetString("FieryRunes.Desc"), evocIcon).Configure(); + MakerTools.MakeBuff("FieryRuneArrayBuff", LocalizationTool.GetString("FieryRuneArray.Name"), LocalizationTool.GetString("FieryRuneArray.Desc"), evocIcon).Configure(); + + + AbilityConfigurator.New("FieryRunesTouch", Main.TotFContext.Blueprints.GetGUID("FieryRunesTouch").ToString()).Configure(); + AbilityConfigurator.New("FieryRuneArrayTouch", Main.TotFContext.Blueprints.GetGUID("FieryRuneArrayTouch").ToString()).Configure(); + + AbilityConfigurator.New("FieryRunes", Main.TotFContext.Blueprints.GetGUID("FieryRunes").ToString()).Configure(); + AbilityConfigurator.New("FieryRuneArray", Main.TotFContext.Blueprints.GetGUID("FieryRuneArray").ToString()).Configure(); + + } + } + + + +// Fiery Runes + +//School evocation[fire]; Level alchemist 2, bloodrager 2, druid 2, magus 2, sorcerer/wizard 2 + +//CASTING + +//Casting Time1 standard action +//Components V, S + +//EFFECT + +//Range touch +//Target melee weapon touched +//Duration 1 minute/level or until discharged(see text) +//Saving Throw none; Spell Resistance yes(see text) + +//DESCRIPTION + +//You charge a weapon with a magic rune of fire. + +//When the wielder of the weapon successfully strikes a foe in melee with the weapon, the wielder can discharge the rune as a swift action to deal 1d4+1 points of fire damage to the target.This damage isn’t multiplied on a critical hit.If the target has spell resistance, you attempt a caster level check (1d20 + caster level) against that spell resistance when the rune is discharged.If the rune is successfully resisted, the spell is dispelled; otherwise, the rune deals damage normally. + +//For every 2 caster levels beyond 3rd the caster possesses, the rune deals an additional 1d4+1 points of fire damage(2d4+2 at caster level 5th, 3d4+3 at 7th, and so on) to a maximum of 5d4+5 points of fire damage at caster level 11th. +//Balance Adjustment: Multiply On Critical Hit - this is Scorching Touch (fire) that's increased a level to allow for 'hang' shenanigans. Make activation free action toggle with 'smart' rules (don't activate if target has fire immunity or resist above damage limit + + //Firey Rune Array + //Level 4, as Fiery Runes but one rune per 4 CL + // + } +} diff --git a/TomeOfTheFirebird/New Content/Spells/Fly.cs b/TomeOfTheFirebird/New Content/Spells/Fly.cs new file mode 100644 index 0000000..1a35b24 --- /dev/null +++ b/TomeOfTheFirebird/New Content/Spells/Fly.cs @@ -0,0 +1,93 @@ +using BlueprintCore.Blueprints.CustomConfigurators.Classes; +using BlueprintCore.Blueprints.CustomConfigurators.UnitLogic.Abilities; +using BlueprintCore.Blueprints.CustomConfigurators.UnitLogic.Buffs; +using BlueprintCore.Utils; +using BlueprintCore.Utils.Types; +using Kingmaker.UnitLogic.Abilities.Blueprints; +using Kingmaker.UnitLogic.Abilities; +using Kingmaker.UnitLogic.Mechanics; +using Kingmaker.Visual.Animation.Kingmaker.Actions; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TabletopTweaks.Core.Utilities; +using TomeOfTheFirebird.Helpers; +using UnityEngine; +using Kingmaker.UnitLogic.Buffs.Blueprints; +using BlueprintCore.Actions.Builder; +using BlueprintCore.Actions.Builder.ContextEx; + +namespace TomeOfTheFirebird.New_Content.Spells +{ + internal class Fly + { + public static void Make() + { + + var buffGUID = Main.TotFContext.Blueprints.GetGUID("FlyBuff"); + var spellGUID = Main.TotFContext.Blueprints.GetGUID("FlySpell"); + var touchGUID = Main.TotFContext.Blueprints.GetGUID("FlySpellTouch"); + + Sprite flyIcon = AssetLoader.LoadInternal(Main.TotFContext, "Spells", "Fly.png"); + if (Settings.IsEnabled("Fly")) + { + var buff = BuffConfigurator.New("FlyBuff", buffGUID.ToString()); + buff.SetDisplayName("Fly.Name"); + buff.SetDescription("Fly.Desc"); + buff.SetIcon(flyIcon); + buff.AddBuffDescriptorImmunity(descriptor: new Kingmaker.Blueprints.Classes.Spells.SpellDescriptorWrapper(Kingmaker.Blueprints.Classes.Spells.SpellDescriptor.Ground)); + buff.AddSpellImmunityToSpellDescriptor(descriptor: new Kingmaker.Blueprints.Classes.Spells.SpellDescriptorWrapper(Kingmaker.Blueprints.Classes.Spells.SpellDescriptor.Ground)); + buff.AddFormationACBonus(bonus: 3); + buff.AddACBonusAgainstAttacks(againstMeleeOnly: true, armorClassBonus: 3, descriptor: Kingmaker.Enums.ModifierDescriptor.Dodge); + buff.AddToFlags(flags: BlueprintBuff.Flags.IsFromSpell); + var buffMade = buff.Configure(); + + var touch = AbilityConfigurator.NewSpell("FlySpellTouch", touchGUID.ToString(), Kingmaker.Blueprints.Classes.Spells.SpellSchool.Transmutation, false); + touch.SetIcon(flyIcon); + touch.SetLocalizedDuration(Duration.MinutePerLevel); + touch.AllowTargeting(friends: true, self:true); + touch.SetEffectOnAlly(AbilityEffectOnUnit.Helpful); + touch.SetAnimation(UnitAnimationActionCastSpell.CastAnimationStyle.Touch); + touch.SetActionType(Kingmaker.UnitLogic.Commands.Base.UnitCommand.CommandType.Standard); + touch.SetAvailableMetamagic(Metamagic.Quicken, Metamagic.Heighten, Metamagic.CompletelyNormal, Metamagic.Reach); + touch.SetLocalizedSavingThrow(new Kingmaker.Localization.LocalizedString()); + touch.AddAbilityEffectRunAction(ActionsBuilder.New().ApplyBuff(buffMade.AssetGuidThreadSafe, durationValue: MakerTools.GetContextDurationValue(Kingmaker.UnitLogic.Mechanics.DurationRate.Minutes, true))); + touch.AddAbilityDeliverTouch(touchWeapon: "bb337517547de1a4189518d404ec49d4"); + var touchMade = touch.Configure(); + + + var spell = AbilityConfigurator.NewSpell("FlySpell", spellGUID.ToString(), Kingmaker.Blueprints.Classes.Spells.SpellSchool.Transmutation, true); + spell.SetIcon(flyIcon); + spell.AddToSpellLists(3, SpellList.Alchemist, SpellList.Wizard, SpellList.Bloodrager, SpellList.Magus, SpellList.Shaman, SpellList.Witch); + spell.SetActionType(Kingmaker.UnitLogic.Commands.Base.UnitCommand.CommandType.Standard); + spell.SetLocalizedDuration(Duration.MinutePerLevel); + spell.AllowTargeting(friends: true, self:true); + spell.SetEffectOnAlly(AbilityEffectOnUnit.Helpful); + spell.SetAnimation(UnitAnimationActionCastSpell.CastAnimationStyle.Touch); + spell.SetLocalizedSavingThrow(new Kingmaker.Localization.LocalizedString()); + spell.SetAvailableMetamagic(Metamagic.Quicken, Metamagic.Heighten, Metamagic.CompletelyNormal, Metamagic.Reach); + + spell.AddSpellToMedium(3); + spell.AddSpellToSpiritualist(3); + spell.AddSpellToSummoner(3); + spell.AddSpellToOccultist(3); + spell.AddSpellToPsychic(3); + spell.AddAbilityEffectStickyTouch(touchDeliveryAbility: touchMade.AssetGuidThreadSafe); + spell.AddAbilityDeliverTouch(touchWeapon: "bb337517547de1a4189518d404ec49d4"); + + spell.Configure(); + + //TODO MASS FLY - level 7, 30 foot burst of fly, 10 minutes per level + } + else + { + AbilityConfigurator.New("FlySpell", spellGUID.ToString()).Configure(); + AbilityConfigurator.New("FlySpellTouch", touchGUID.ToString()).Configure(); + BuffConfigurator.New("FlyBuff", buffGUID.ToString()).Configure(); + } + } + //The subject can fly at a speed of 60 feet (or 40 feet if it wears medium or heavy armor, or if it carries a medium or heavy load). It can ascend at half speed and descend at double speed, and its maneuverability is good. Using a fly spell requires only as much concentration as walking, so the subject can attack or cast spells normally. The subject of a fly spell can charge but not run, and it cannot carry aloft more weight than its maximum load, plus any armor it wears. The subject gains a bonus on Fly skill checks equal to 1/2 your caster level. + } +} diff --git a/TomeOfTheFirebird/New Content/Spells/TODO/ChillTouch.cs b/TomeOfTheFirebird/New Content/Spells/TODO/ChillTouch.cs deleted file mode 100644 index 5a7a9d2..0000000 --- a/TomeOfTheFirebird/New Content/Spells/TODO/ChillTouch.cs +++ /dev/null @@ -1,28 +0,0 @@ -namespace TomeOfTheFirebird.New_Spells -{ - class ChillTouch - { -// Chill Touch - -//School necromancy; Level bloodrager 1, magus 1, shaman 1, sorcerer/wizard 1, witch 1; Mystery reaper 1 - -//CASTING - -//Casting Time 1 standard action -//Components V, S - -//EFFECT - -//Range touch -//Targets creature or creatures touched(up to one/level) -//Duration instantaneous -//Saving Throw Fortitude partial or Will negates; see text; Spell Resistance yes - -//DESCRIPTION - -//A touch from your hand, which glows with blue energy, disrupts the life force of living creatures.Each touch channels negative energy that deals 1d6 points of damage.The touched creature also takes 1 point of Strength damage unless it makes a successful Fortitude saving throw. You can use this melee touch attack up to one time per level. - -//An undead creature you touch takes no damage of either sort, but it must make a successful Will saving throw or flee as if panicked for 1d4 rounds + 1 round per caster level. -//Make Sure multihit works with spellstrike - } -} diff --git a/TomeOfTheFirebird/New Content/Spells/TODO/FieryRunes.cs b/TomeOfTheFirebird/New Content/Spells/TODO/FieryRunes.cs deleted file mode 100644 index b04032e..0000000 --- a/TomeOfTheFirebird/New Content/Spells/TODO/FieryRunes.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace TomeOfTheFirebird.New_Spells -{ - class FieryRunes - { -// Fiery Runes - -//School evocation[fire]; Level alchemist 2, bloodrager 2, druid 2, magus 2, sorcerer/wizard 2 - -//CASTING - -//Casting Time1 standard action -//Components V, S - -//EFFECT - -//Range touch -//Target melee weapon touched -//Duration 1 minute/level or until discharged(see text) -//Saving Throw none; Spell Resistance yes(see text) - -//DESCRIPTION - -//You charge a weapon with a magic rune of fire. - -//When the wielder of the weapon successfully strikes a foe in melee with the weapon, the wielder can discharge the rune as a swift action to deal 1d4+1 points of fire damage to the target.This damage isn’t multiplied on a critical hit.If the target has spell resistance, you attempt a caster level check (1d20 + caster level) against that spell resistance when the rune is discharged.If the rune is successfully resisted, the spell is dispelled; otherwise, the rune deals damage normally. - -//For every 2 caster levels beyond 3rd the caster possesses, the rune deals an additional 1d4+1 points of fire damage(2d4+2 at caster level 5th, 3d4+3 at 7th, and so on) to a maximum of 5d4+5 points of fire damage at caster level 11th. -//Balance Adjustment: Multiply On Critical Hit - this is Scorching Touch (fire) that's increased a level to allow for 'hang' shenanigans. Make activation free action toggle with 'smart' rules (don't activate if target has fire immunity or resist above damage limit - } -} diff --git a/TomeOfTheFirebird/New Content/Spells/TODO/Frostbite.cs b/TomeOfTheFirebird/New Content/Spells/TODO/Frostbite.cs deleted file mode 100644 index 1f5f19a..0000000 --- a/TomeOfTheFirebird/New Content/Spells/TODO/Frostbite.cs +++ /dev/null @@ -1,27 +0,0 @@ -namespace TomeOfTheFirebird.New_Spells -{ - class Frostbite - { -// Frostbite - -//School transmutation[cold]; Level bloodrager 1, druid 1, magus 1, shaman 1, witch 1 - -//CASTING - -//Casting Time 1 standard action -//Components V, S - -//EFFECT - -//Range touch -//Targets creature touched -//Duration instantaneous -//Saving Throw none; Spell Resistance yes - -//DESCRIPTION - -//Your melee touch attack deals 1d6 points of nonlethal cold damage + 1 point per level, and the target is fatigued.The fatigued condition ends when the target recovers from the nonlethal damage.This spell cannot make a creature exhausted even if it is already fatigued. You can use this melee touch attack up to one time per level. - - //MAKE SURE MULTITOUCH WORKS WITH SPELLSTRIKE THAT'S THE POINT - } -} diff --git a/TomeOfTheFirebird/New Content/Spells/TODO/IceSlick.cs b/TomeOfTheFirebird/New Content/Spells/TODO/IceSlick.cs deleted file mode 100644 index 2c82d95..0000000 --- a/TomeOfTheFirebird/New Content/Spells/TODO/IceSlick.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace TomeOfTheFirebird.New_Spells -{ - class IceSlick - { -// Ice Slick - -//School evocation[cold]; Level druid 2, magus 2, ranger 2, sorcerer/wizard 2, witch 2 - -//CASTING - -//Casting Time 1 standard action -//Components V, S - -//EFFECT - -//Range close(25 ft. + 5 ft./2 levels) -//Area 5-ft.-radius burst -//Duration instantaneous(see text) -//Saving Throw Reflex partial(see text); Spell Resistance see text - - -//DESCRIPTION - -//You create a blast of intense cold, coating all solid surfaces in the area with a thin coating of ice. - -//Any creature in the area when the spell is cast takes 1d6 points of cold damage + 1 point per caster level (maximum +10) and falls prone; creatures that succeed at a Reflex save take half damage and don’t fall prone. Spell resistance applies to this initial effect. - -//A creature can walk within or through the area of ice at half its normal speed with a successful DC 10 Acrobatics check. Failure by 4 or less means the creature can’t move that round (and must succeed at a Reflex save or fall); failure by 5 or more means it falls(see the Acrobatics skill). Creatures that do not move on their turn do not need to attempt this check. - -//A 5-foot square of ice has hardness 0 and 3 hit points.The ice is an instantaneous effect, but persists as non-magical ice. Under temperate conditions, the ice lasts 1 minute per level.In tropical environments, it might last only half as long. In cold environments where ice and snow persist without melting, it could last indefinitely. - } -} diff --git a/TomeOfTheFirebird/New Content/Spells/TelekineticStrikes.cs b/TomeOfTheFirebird/New Content/Spells/TelekineticStrikes.cs index ff1495d..0db4c1c 100644 --- a/TomeOfTheFirebird/New Content/Spells/TelekineticStrikes.cs +++ b/TomeOfTheFirebird/New Content/Spells/TelekineticStrikes.cs @@ -67,7 +67,7 @@ public static void BuildSpell() if (Settings.IsEnabled("TelekineticStrikes")) { TKStrikeBuilderCast.AddToSpellLists(2, SpellList.Magus, SpellList.Wizard); - + TKStrikeBuilderCast.AddSpellToPsychic(2); } BlueprintAbility builtCast = TKStrikeBuilderCast.Configure(); diff --git a/TomeOfTheFirebird/Settings.cs b/TomeOfTheFirebird/Settings.cs index 73bdd81..7835b60 100644 --- a/TomeOfTheFirebird/Settings.cs +++ b/TomeOfTheFirebird/Settings.cs @@ -16,6 +16,19 @@ class Settings private const string RootKey = "totf.settings"; private static readonly string RootStringKey = "TotF.Settings"; + public static bool BloodlineMutationsEnabled() + { + return IsEnabled("BloodHavoc"); + } + + public static bool IsMediumMpdEnabled() + { + return UnityModManager.modEntries.Where( + mod => mod.Info.Id.Equals("Medium Class") && mod.Enabled && !mod.ErrorOnLoading) + .Any(); + } + + private static string GetKey(string partialKey) { return ($"{RootKey}.{partialKey}").ToLower(); @@ -70,11 +83,15 @@ public static void Make() builder.AddToggle(MakeToggle("eldritchscionsage", "Eldritch Scion (Sage)", true, "Adds Eldritch Scion version of Sage Sorc")); builder.AddSubHeader(GetString("ClassFeatures.Title"), startExpanded: true); + //builder.AddToggle(MakeToggle("BloodHavoc", "Bloodline Mutation: Blood Havoc", true, "Sorcerer / Bloodrager / Eldritch Scion alternate feature - increase attack spell damage by 1 per dice if spell is bloodline spell or caster has applicable spell focus")); + //builder.AddToggle(MakeToggle("BloodlineMutationsForPowers", "Bloodline Mutations for Bloodline Powers", true, "Homebrew: Bloodline Mutations also apply to Sorcerer/Bloodrager activated bloodline powers.")); + //builder.AddToggle(MakeToggle("EldritchScionBonusFeats", "Eldritch Scion: Bloodline Bonus Feats", true, "Eldritch Scion (regular and Sage) can also pick from the sorcerer bloodline feat lists for their magus bonus feats")); builder.AddToggle(MakeToggle("MercyEnsorcelled", "Mercy: Ensorcelled", true, "Attempt to dispel hostile effects on the target while healing with lay on hands, or dispel buffs while using Lay on Hands offensively.")); builder.AddToggle(MakeToggle("MercyInjured", "Mercy: Injured", true, "Grant target fast healing 3 for one round per two paladin levels.")); builder.AddToggle(MakeToggle("internalbuffer", "Kineticist: Internal Buffer", true, "Restores Kineticist Internal Buffer Class Feature")); builder.AddToggle(MakeToggle("phoenixbloodline", "Phoenix Bloodline", true, "Adds Phoenix Bloodline (Bloodrager Only)")); + builder.AddToggle(MakeToggle("RagePowerElementalStance", "Rage Power: Elemental Stance", true, "Adds barbarian rage power elemental stance to the game. Increases low-level damage from TT to balance with Powerful Stance,")); builder.AddToggle(MakeToggle("RagePowerRageStanceMastery", "Rage Power: Stance Mastery", true, "Homebrew: Allows a barbarian to use two rage power stances at once. Requires level 14 in a rage power using class or archetype")); builder.AddToggle(MakeToggle("WitchPatronAnimal", "Witch Patron: Animal", true, "Adds the Animal witch patron. Some deviation from tabletop to deal with unimplementable (speak with/charm animals) and unimplemented (antilife shell) spells.")); @@ -139,7 +156,7 @@ public static void Make() builder.AddSubHeader(GetString("MythicAbilities.Title"), startExpanded: true); - builder.AddToggle(MakeToggle("MythicKineticAegis", "Mythic Kinetic Aegis", true, "(Homebrew) Improves Kineticist Elemental Defenses with Mythic Rank.")); + builder.AddToggle(MakeToggle("MythicKineticAegis", "Mythic Kinetic Aegis", true, "Homebrew: Improves Kineticist Elemental Defenses with Mythic Rank.")); builder.AddSubHeader(GetString("RacialAbilities.Title"), startExpanded: true); builder.AddToggle(MakeToggle("TieflingAlternateFeatures", "Tiefling Alternate Features", true, "Adds Tiefling Alternate Racial Feature Selection")); @@ -150,6 +167,7 @@ public static void Make() builder.AddToggle(MakeToggle("ChainsOfFireFlameMystery", "Chains Of Fire: Add To Flame Mystery", true, "Replace Dragonkind I: Red with Chains Of Fire for Oracle Flame Mystery level 6")); builder.AddToggle(MakeToggle("EntropicShield", "Entropic Shield", true, "Level 1 Cleric/Oracle spell, gives 20% miss chance to incoming ranged attacks")); builder.AddToggle(MakeToggle("FireShield", "Fire Shield", true, "Resist Fire/Cold, deal backlash damage of other element.")); + builder.AddToggle(MakeToggle("Fly", "Fly", true, "The old standby level 3. Also enables Mass Fly at level 7")); builder.AddToggle(MakeToggle("FreezingSphere", "Freezing Sphere", true, "Level 6 ice spherical AoE attack, has normal and supersized blast modes")); builder.AddToggle(MakeToggle("GloomblindBolts", "Gloomblind Bolts", true, "Basically Negative Energy Scorching Ray with a very short duration blind rider. Made it Necromancy unlike TT because it doesn't use Illusion mechanics")); @@ -168,10 +186,13 @@ public static void Make() builder.AddToggle(MakeToggle("ShimmeringMirage", "Shimmering Mirage", true, "Water Wild Talent. Requires Shroud Of Water. Adds 20 percent miss chance as long as shroud of water is up.")); builder.AddSubHeader(GetString("Tweaks.Title"), startExpanded: true); - builder.AddToggle(MakeToggle("DragonheirScionArcaneStrikeScaling", "Dragonheir Scion: Arcane Strike Scaling", true, "Arcane Strike scales with DHS plus Dragon Disciple level if that's better than max caster level")); - builder.AddToggle(MakeToggle("UnlimitedSorcererBloodlineClaws", "Bloodlines: Unlimited Sorcerer Bloodline Claws", true, "Abyssal and Draconic sorcerer bloodline power claws no longer have a use limit.")); + + builder.AddToggle(MakeToggle("BuffElementalStrikes", "Bloodlines: Buff Bloodrager Elemental Strikes", true, "Homebrew: Makes Bloodrager Elemental Bloodline's Elemental Strikes ability always active during bloodrage from level 1. The level 20 upgrade to be always-on is replaced with a burst effect on critical hits")); + builder.AddToggle(MakeToggle("CombineSorcererDragonClaws", "Bloodlines: Combine Sorcerer Dragon Claws", true, "Combine all sorcerer dragon bloodline claw powers into the same ability, stacking elemental damage from each bloodline.")); - builder.AddToggle(MakeToggle("DispelsAreBuffSafe", "Dispels Are Buff Safe", true, "Dispel Magic, Greater Dispel Magic, Alchemist Dispelling Bombs and Slayer Dispelling Attacks should no longer dispel buffs on the casters allies or debuffs on enemies.")); + builder.AddToggle(MakeToggle("UnlimitedSorcererBloodlineClaws", "Bloodlines: Unlimited Sorcerer Bloodline Claws", true, "Abyssal and Draconic sorcerer bloodline power claws no longer have a use limit.")); + builder.AddToggle(MakeToggle("DragonheirScionArcaneStrikeScaling", "Dragonheir Scion: Arcane Strike Scaling", true, "Arcane Strike scales with DHS plus Dragon Disciple level if that's better than max caster level")); + builder.AddToggle(MakeToggle("DispelsAreBuffSafe", "Dispels Are Buff Safe", true, "Dispel Magic, Greater Dispel Magic, Alchemist Dispelling Bombs and Slayer Dispelling Attacks should no longer dispel buffs on the casters allies or debuffs on enemies.")); builder.AddToggle(MakeToggle("PurifierRestoreEarlyCures", "Purifier: Restore Early Cures", true, "Owlcat Purifier loses its cure spells but gains absolutely nothing relative to stock oracle before level 5. This setting restores CLW/CMW access.")); builder.AddToggle(MakeToggle("PurifierLevelThreeRevelation", "Purifier: Restore Level Three Revelation", true, "Restores Purifier Level 3 relevation - TT forced pick was not implemented and is unimplementable so pick should be available.")); builder.AddToggle(MakeToggle("PurifierCelestialArmorTraining", "Purifier: Enhance Celestial Armor Training", true, "Purifier's Celestial Armor unique revelation now grants advanced armor training access. Note: Absolutely Requires Tabletop Tweaks Base.")); @@ -246,6 +267,9 @@ public enum EmberPatron private class EmberUnityEnumEnum : UISettingsEntityDropdownEnum { } + + + public enum DawnOfDragonsCustomReward { Everyone, diff --git a/TomeOfTheFirebird/TomeOfTheFirebird.csproj b/TomeOfTheFirebird/TomeOfTheFirebird.csproj index fc1f82a..9f66eb1 100644 --- a/TomeOfTheFirebird/TomeOfTheFirebird.csproj +++ b/TomeOfTheFirebird/TomeOfTheFirebird.csproj @@ -37,17 +37,14 @@ 4 true - - C:\Program Files (x86)\Steam\steamapps\common\Pathfinder Second Adventure - - 1.0.1 + 1.0.2 runtime; build; native; contentfiles; analyzers; buildtransitive all - + @@ -138,7 +135,7 @@ False - ..\..\TabletopTweaks-Core\TabletopTweaks-Core\bin\Debug\TabletopTweaks-Core.dll + ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Pathfinder Second Adventure\Mods\TabletopTweaks-Core\TabletopTweaks-Core.dll ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Pathfinder Second Adventure\Wrath_Data\Managed\UniRx.dll @@ -157,6 +154,7 @@ + @@ -166,6 +164,7 @@ + @@ -175,6 +174,7 @@ + @@ -193,6 +193,7 @@ + @@ -203,6 +204,7 @@ + @@ -225,6 +227,7 @@ + @@ -237,6 +240,7 @@ + @@ -261,6 +265,7 @@ + @@ -294,24 +299,22 @@ + - - + - - @@ -363,6 +366,7 @@ PreserveNewest + @@ -372,6 +376,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest @@ -399,6 +406,7 @@ + @@ -416,6 +424,7 @@ +