diff --git a/TabletopTweaks-Base/Bugfixes/Abilities/Spells.cs b/TabletopTweaks-Base/Bugfixes/Abilities/Spells.cs index 2a83f23e..f74d3fc1 100644 --- a/TabletopTweaks-Base/Bugfixes/Abilities/Spells.cs +++ b/TabletopTweaks-Base/Bugfixes/Abilities/Spells.cs @@ -89,14 +89,14 @@ static void Postfix() { PatchAcidMaw(); PatchAnimalGrowth(); PatchBestowCurseGreater(); - PatchBreakEnchantment(); + PatchBreakEnchantment(); PatchChainLightning(); PatchCommand(); PatchCommandGreater(); PatchCrusadersEdge(); PatchDeathWard(); PatchDispelMagicGreater(); - PatchFirebrand(); + PatchFirebrand(); PatchFlamestrike(); PatchFrightfulAspect(); PatchGeniekind(); @@ -108,7 +108,7 @@ static void Postfix() { PatchRemoveSickness(); PatchShadowConjuration(); PatchShadowEvocation(); - PatchShadowEvocationGreater(); + PatchShadowEvocationGreater(); PatchUnbreakableHeart(); PatchWrachingRay(); PatchFromSpellFlags(); @@ -382,7 +382,7 @@ static void PatchBurstOfSonicEnergy() { var BurstOfSonicEnergy = BlueprintTools.GetBlueprint("b5a2d0e400dd38e428c953f8a2be5f0b"); var BurstOfSonicEnergy10Feet = BlueprintTools.GetBlueprint("980554934d1aa354bbb08f4b150bd9da"); var BurstOfSonicEnergyAdjacent = BlueprintTools.GetBlueprint("65010ad20b1f57a4f86cd09115728831"); - var Mythic1lvlAzata_ElysiumBolt00 = BlueprintTools.GetBlueprintReference("f00eb27234fbc39448b142f1257c8886"); + var Mythic1lvlAzata_ElysiumBolt00 = BlueprintTools.GetBlueprintReference("f00eb27234fbc39448b142f1257c8886"); BurstOfSonicEnergy.TemporaryContext(bp => { bp.AvailableMetamagic |= Metamagic.Empower @@ -394,7 +394,7 @@ static void PatchBurstOfSonicEnergy() { | (Metamagic)CustomMetamagic.ElementalCold | (Metamagic)CustomMetamagic.ElementalElectricity | (Metamagic)CustomMetamagic.ElementalFire; - bp.GetComponent().TemporaryContext(c => { + bp.GetComponent().TemporaryContext(c => { c.Actions = Helpers.CreateActionList( new Conditional() { ConditionsChecker = new ConditionsChecker() { @@ -718,11 +718,11 @@ static void PatchRepulsiveNature() { ); c.Deactivated = Helpers.CreateActionList(); c.NewRound = Helpers.CreateActionList( - new ContextActionSavingThrow() { + new ContextActionSavingThrow() { Type = SavingThrowType.Fortitude, CustomDC = new ContextValue(), Actions = Helpers.CreateActionList( - new ContextActionConditionalSaved() { + new ContextActionConditionalSaved() { Succeed = Helpers.CreateActionList( new ContextActionApplyBuff() { m_Buff = RepulsiveNatureBuffImmunity.ToReference(), @@ -955,7 +955,7 @@ static void PatchWaterTorrent() { bp.SetDescription(WaterTorrent.m_Description); }); TTTContext.Logger.LogPatch(WaterTorrent); - } + } static void PatchWindsOfFall() { if (Main.TTTContext.Fixes.Spells.IsDisabled("WindsOfFall")) { return; } @@ -1144,7 +1144,7 @@ static void PatchAnimalGrowth() { } TTTContext.Logger.LogPatch("Patched", bp); }); - } + } static void PatchBestowCurseGreater() { if (Main.TTTContext.Fixes.Spells.IsDisabled("BestowCurseGreater")) { return; } @@ -1204,7 +1204,7 @@ static void PatchBreakEnchantment() { dispel.m_MaxSpellLevel = new ContextValue(); }); TTTContext.Logger.LogPatch("Patched", BreakEnchantment); - } + } static void PatchChainLightning() { if (Main.TTTContext.Fixes.Spells.IsDisabled("ChainLightning")) { return; } @@ -1248,7 +1248,7 @@ static void PatchCommandGreater() { descriptors.Descriptor = SpellDescriptor.MindAffecting | SpellDescriptor.Compulsion; TTTContext.Logger.LogPatch(ability); }); - } + } static void PatchCrusadersEdge() { if (Main.TTTContext.Fixes.Spells.IsDisabled("CrusadersEdge")) { return; } @@ -1560,7 +1560,7 @@ static void PatchWrachingRay() { } } TTTContext.Logger.LogPatch("Patched", WrackingRay); - } + } static void PatchFromSpellFlags() { if (Main.TTTContext.Fixes.Spells.IsDisabled("FixSpellFlags")) { return; } diff --git a/TabletopTweaks-Base/Bugfixes/Classes/Alchemist.cs b/TabletopTweaks-Base/Bugfixes/Classes/Alchemist.cs index 0ee70491..44ea6d48 100644 --- a/TabletopTweaks-Base/Bugfixes/Classes/Alchemist.cs +++ b/TabletopTweaks-Base/Bugfixes/Classes/Alchemist.cs @@ -94,7 +94,7 @@ static void PatchAlternateCapstone() { add.m_Features.RemoveAll(f => f.deserializedGuid == VivsectionistDiscoverySelection.AssetGuid); }); }); - + TTTContext.Logger.LogPatch("Enabled Alternate Capstones", bp); }); } diff --git a/TabletopTweaks-Base/Bugfixes/Classes/Arcanist.cs b/TabletopTweaks-Base/Bugfixes/Classes/Arcanist.cs index 37fed32b..29f79661 100644 --- a/TabletopTweaks-Base/Bugfixes/Classes/Arcanist.cs +++ b/TabletopTweaks-Base/Bugfixes/Classes/Arcanist.cs @@ -9,7 +9,6 @@ using Kingmaker.UnitLogic; using Kingmaker.UnitLogic.Abilities; using Kingmaker.Utility; -using Mono.Cecil.Cil; using System; using System.Collections.Generic; using System.Linq; @@ -131,8 +130,7 @@ static bool Prefix(Spellbook __instance, AbilityData data, SpellSlot slot, ref b __result = false; return false; } - if (__instance.Blueprint.IsArcanist && __instance.SureMemorizedSpells(spellLevel).HasItem(delegate (SpellSlot i) - { + if (__instance.Blueprint.IsArcanist && __instance.SureMemorizedSpells(spellLevel).HasItem(delegate (SpellSlot i) { AbilityData spellShell = i.SpellShell; return spellShell?.Blueprint == data.Blueprint && Equals(spellShell?.MetamagicData, data?.MetamagicData); })) { @@ -156,8 +154,7 @@ static bool Prefix(Spellbook __instance, AbilityData data, SpellSlot slot, ref b spellSlot.LinkedSlots = memorizeSlots; spellSlot.IsOpposition = (__instance.OppositionSchools.Contains(data.Blueprint.School) || __instance.OppositionDescriptors.HasAnyFlag(data.Blueprint.SpellDescriptor)); } - EventBus.RaiseEvent(delegate (ISpellBookUIHandler h) - { + EventBus.RaiseEvent(delegate (ISpellBookUIHandler h) { h.HandleMemorizedSpell(data, __instance.Owner); }, true); __result = true; diff --git a/TabletopTweaks-Base/Bugfixes/Classes/Barbarian.cs b/TabletopTweaks-Base/Bugfixes/Classes/Barbarian.cs index a58d6faa..4b9fb6fb 100644 --- a/TabletopTweaks-Base/Bugfixes/Classes/Barbarian.cs +++ b/TabletopTweaks-Base/Bugfixes/Classes/Barbarian.cs @@ -66,7 +66,7 @@ static void Postfix() { PatchWreckingBlows(); PatchCripplingBlows(); } - + static void PatchBase() { } diff --git a/TabletopTweaks-Base/Bugfixes/Classes/Cleric.cs b/TabletopTweaks-Base/Bugfixes/Classes/Cleric.cs index 38352103..754d0b0e 100644 --- a/TabletopTweaks-Base/Bugfixes/Classes/Cleric.cs +++ b/TabletopTweaks-Base/Bugfixes/Classes/Cleric.cs @@ -36,7 +36,7 @@ static void PatchAlternateCapstone() { }); } } - [HarmonyPatch(typeof(BlueprintsCache), "Init")] + [HarmonyPatch(typeof(BlueprintsCache), "Init")] static class BlueprintsCache_Init_Domain_Patch { static bool Initialized; [HarmonyPriority(Priority.First)] @@ -47,7 +47,7 @@ static void Postfix() { PatchBaseClass(); } - + static void PatchBaseClass() { PatchGloryDomain(); diff --git a/TabletopTweaks-Base/Bugfixes/Classes/Fighter.cs b/TabletopTweaks-Base/Bugfixes/Classes/Fighter.cs index 08d8298e..7a9cf8e0 100644 --- a/TabletopTweaks-Base/Bugfixes/Classes/Fighter.cs +++ b/TabletopTweaks-Base/Bugfixes/Classes/Fighter.cs @@ -100,7 +100,7 @@ void PatchAdvancedWeaponTraining() { bp.Mode = SelectionMode.Default; bp.AddFeatures(AdvancedWeapontrainingSelection); TTTContext.Logger.LogPatch("Patched", bp); - }); + }); WeaponTrainingRankUpSelection.TemporaryContext(bp => { bp.m_AllFeatures = bp.m_AllFeatures.Where(feature => !AdvancedWeapontrainingSelection.m_AllFeatures.Contains(feature)).ToArray(); bp.m_AllFeatures.ForEach(feature => { @@ -112,12 +112,12 @@ void PatchAdvancedWeaponTraining() { }); bp.IgnorePrerequisites = true; TTTContext.Logger.LogPatch("Patched", WeaponTrainingRankUpSelection); - }); + }); SoheiWeaponRankUpTrainingSelection.TemporaryContext(bp => { bp.IgnorePrerequisites = true; bp.HideInCharacterSheetAndLevelUp = false; - }); - + }); + AdvancedWeapontrainingSelection.m_AllFeatures.ForEach(feature => { feature.Get().RemoveComponents(); TTTContext.Logger.LogPatch("Patched", feature.Get()); diff --git a/TabletopTweaks-Base/Bugfixes/Classes/Rogue.cs b/TabletopTweaks-Base/Bugfixes/Classes/Rogue.cs index cdbbacf5..9acb069f 100644 --- a/TabletopTweaks-Base/Bugfixes/Classes/Rogue.cs +++ b/TabletopTweaks-Base/Bugfixes/Classes/Rogue.cs @@ -4,7 +4,6 @@ using Kingmaker.Blueprints.Classes.Prerequisites; using Kingmaker.Blueprints.Classes.Selection; using Kingmaker.Blueprints.JsonSystem; -using Kingmaker.Designers.Mechanics.Facts; using Kingmaker.EntitySystem.Stats; using Kingmaker.UnitLogic.FactLogic; using Kingmaker.UnitLogic.Mechanics; diff --git a/TabletopTweaks-Base/Bugfixes/Classes/Sorcerer.cs b/TabletopTweaks-Base/Bugfixes/Classes/Sorcerer.cs index 117063b1..fe2e2128 100644 --- a/TabletopTweaks-Base/Bugfixes/Classes/Sorcerer.cs +++ b/TabletopTweaks-Base/Bugfixes/Classes/Sorcerer.cs @@ -57,7 +57,7 @@ static void PatchAlternateCapstone() { c.m_Feature = NewContent.AlternateCapstones.Sorcerer.SorcererAlternateCapstone.ToReference(); }); }); - + ClassTools.Classes.SorcererClass.TemporaryContext(bp => { bp.Progression.LevelEntries .Where(entry => entry.Level == 20) diff --git a/TabletopTweaks-Base/Bugfixes/Classes/WinterWitch.cs b/TabletopTweaks-Base/Bugfixes/Classes/WinterWitch.cs index cf7bf8de..8963379f 100644 --- a/TabletopTweaks-Base/Bugfixes/Classes/WinterWitch.cs +++ b/TabletopTweaks-Base/Bugfixes/Classes/WinterWitch.cs @@ -1,16 +1,9 @@ using HarmonyLib; -using Kingmaker.Blueprints.Classes; -using Kingmaker.Blueprints.Classes.Prerequisites; -using Kingmaker.Blueprints.Classes.Selection; using Kingmaker.Blueprints.JsonSystem; -using Kingmaker.Enums; -using Kingmaker.Enums.Damage; using Kingmaker.RuleSystem.Rules.Damage; using Kingmaker.UnitLogic.Abilities; using Kingmaker.UnitLogic.Mechanics.Components; -using TabletopTweaks.Core.Utilities; using static TabletopTweaks.Base.Main; -using static TabletopTweaks.Core.MechanicsChanges.AdditionalModifierDescriptors; namespace TabletopTweaks.Base.Bugfixes.Classes { internal class WinterWitch { @@ -28,7 +21,7 @@ static void Postfix() { [HarmonyPatch(typeof(ChangeSpellElementalDamageHalfUntyped), "OnEventAboutToTrigger", new[] { typeof(RulePrepareDamage) })] static class ModifierDescriptorHelper_IsStackable_Patch { - static bool Prefix(ChangeSpellElementalDamageHalfUntyped __instance, RulePrepareDamage evt) { + static bool Prefix(ChangeSpellElementalDamageHalfUntyped __instance, RulePrepareDamage evt) { if (TTTContext.Fixes.WinterWitch.IsDisabled("UnearthlyCold")) { return true; } AbilityData ability = evt.Reason.Ability; @@ -42,7 +35,7 @@ static bool Prefix(ChangeSpellElementalDamageHalfUntyped __instance, RulePrepar if (energyDamage.EnergyType == __instance.Element && !baseDamage.Precision) { DirectDamage directDamage = new DirectDamage(baseDamage.Dice.ModifiedValue, 0); baseDamage.Half.Set(true, __instance.Fact); - + directDamage.CopyFrom(baseDamage); directDamage.SourceFact = __instance.Fact; evt.Add(directDamage); diff --git a/TabletopTweaks-Base/Bugfixes/Classes/Wizard.cs b/TabletopTweaks-Base/Bugfixes/Classes/Wizard.cs index 60420dda..f6d1f27e 100644 --- a/TabletopTweaks-Base/Bugfixes/Classes/Wizard.cs +++ b/TabletopTweaks-Base/Bugfixes/Classes/Wizard.cs @@ -39,7 +39,7 @@ static void Postfix() { Initialized = true; TTTContext.Logger.LogHeader("Patching Wizard"); - } + } } } } diff --git a/TabletopTweaks-Base/Bugfixes/Features/Feats.cs b/TabletopTweaks-Base/Bugfixes/Features/Feats.cs index 3f6f8b45..d8f43e30 100644 --- a/TabletopTweaks-Base/Bugfixes/Features/Feats.cs +++ b/TabletopTweaks-Base/Bugfixes/Features/Feats.cs @@ -4,7 +4,6 @@ using Kingmaker.Blueprints.Classes; using Kingmaker.Blueprints.Classes.Prerequisites; using Kingmaker.Blueprints.Classes.Selection; -using Kingmaker.Blueprints.Items.Weapons; using Kingmaker.Blueprints.JsonSystem; using Kingmaker.Designers.EventConditionActionSystem.Actions; using Kingmaker.Designers.Mechanics.Facts; @@ -15,8 +14,6 @@ using Kingmaker.EntitySystem.Stats; using Kingmaker.Enums; using Kingmaker.Enums.Damage; -using Kingmaker.Items; -using Kingmaker.Items.Slots; using Kingmaker.PubSubSystem; using Kingmaker.RuleSystem; using Kingmaker.RuleSystem.Rules; @@ -31,7 +28,6 @@ using Kingmaker.UnitLogic.Mechanics.Actions; using Kingmaker.UnitLogic.Mechanics.Components; using Kingmaker.UnitLogic.Mechanics.Conditions; -using Kingmaker.UnitLogic.Parts; using Kingmaker.Utility; using System; using System.Collections.Generic; @@ -804,12 +800,11 @@ public void OnEventAboutToTrigger(RuleCalculateWeaponStats evt) { public void OnEventDidTrigger(RuleCalculateWeaponStats evt) { DamageDescription damageDescription = evt.DamageDescription.FirstItem(); if (damageDescription != null && damageDescription.TypeDescription.Type == DamageType.Physical) { - if (!evt.DoNotScaleDamage - && (evt.WeaponDamageDice.HasModifications - || !evt.Weapon.Blueprint.IsDamageDiceOverridden - || (evt.Initiator.IsPlayerFaction && !evt.Initiator.Body.IsPolymorphed) - || evt.IsDefaultUnit)) - { + if (!evt.DoNotScaleDamage + && (evt.WeaponDamageDice.HasModifications + || !evt.Weapon.Blueprint.IsDamageDiceOverridden + || (evt.Initiator.IsPlayerFaction && !evt.Initiator.Body.IsPolymorphed) + || evt.IsDefaultUnit)) { //DiceFormula diceFormula = WeaponDamageScaleTable.Scale(evt.WeaponDamageDice.ModifiedValue, evt.WeaponSize, Size.Medium, evt.Weapon.Blueprint); //if (diceFormula != evt.WeaponDamageDice.ModifiedValue) { // evt.WeaponDamageDice.Modify(diceFormula, ModifierDescriptor.Size); diff --git a/TabletopTweaks-Base/Bugfixes/General/ArmorEnhancementBonuses.cs b/TabletopTweaks-Base/Bugfixes/General/ArmorEnhancementBonuses.cs index 9c679e0c..06ea04db 100644 --- a/TabletopTweaks-Base/Bugfixes/General/ArmorEnhancementBonuses.cs +++ b/TabletopTweaks-Base/Bugfixes/General/ArmorEnhancementBonuses.cs @@ -2,12 +2,12 @@ using Kingmaker.Blueprints.Items.Ecnchantments; using Kingmaker.Designers; using Kingmaker.Items; -using System.Linq; using System; +using System.Linq; namespace TabletopTweaks.Base.Bugfixes.General { class ArmorEnhancementBonuses { - [HarmonyPatch(typeof(GameHelper), nameof(GameHelper.GetItemEnhancementBonus), new Type[]{ typeof(ItemEntity) })] + [HarmonyPatch(typeof(GameHelper), nameof(GameHelper.GetItemEnhancementBonus), new Type[] { typeof(ItemEntity) })] class GameHelper_GetItemEnhancementBonus_Patch { static void Postfix(ref int __result, ItemEntity item) { ItemEntityWeapon weapon; diff --git a/TabletopTweaks-Base/Bugfixes/General/VulnerabilityFix.cs b/TabletopTweaks-Base/Bugfixes/General/VulnerabilityFix.cs index a11b3688..ab958fc4 100644 --- a/TabletopTweaks-Base/Bugfixes/General/VulnerabilityFix.cs +++ b/TabletopTweaks-Base/Bugfixes/General/VulnerabilityFix.cs @@ -1,12 +1,6 @@ using HarmonyLib; -using Kingmaker.EntitySystem.Entities; -using Kingmaker.Enums.Damage; using Kingmaker.RuleSystem.Rules.Damage; -using Kingmaker.UnitLogic.Abilities.Blueprints; using Kingmaker.UnitLogic.FactLogic; -using Kingmaker.UnitLogic.Mechanics; -using Kingmaker.Utility; -using Kingmaker.View.MapObjects; using System; namespace TabletopTweaks.Base.Bugfixes.General { @@ -20,7 +14,7 @@ static void Postfix(AddDamageTypeVulnerability __instance, RuleCalculateDamage e if (__instance.PhyscicalForm) { foreach (BaseDamage baseDamage in evt.DamageBundle) { PhysicalDamage physicalDamage = baseDamage as PhysicalDamage; - if (physicalDamage != null && (physicalDamage.Form & __instance.FormType) > 0) { + if (physicalDamage != null && (physicalDamage.Form & __instance.FormType) > 0) { physicalDamage.Vulnerability = 1.5f; } } diff --git a/TabletopTweaks-Base/Bugfixes/Items/Equipment.cs b/TabletopTweaks-Base/Bugfixes/Items/Equipment.cs index c81e961d..8a71f32c 100644 --- a/TabletopTweaks-Base/Bugfixes/Items/Equipment.cs +++ b/TabletopTweaks-Base/Bugfixes/Items/Equipment.cs @@ -80,7 +80,7 @@ void PatchAmuletOfQuickDraw() { c.RangeType = WeaponRangeType.Ranged; }); }); - + TTTContext.Logger.LogPatch(AmuletOfQuickDrawFeature); } void PatchAspectOfTheAsp() { diff --git a/TabletopTweaks-Base/Bugfixes/UI/SpellTooltips.cs b/TabletopTweaks-Base/Bugfixes/UI/SpellTooltips.cs index cb701d83..f367823e 100644 --- a/TabletopTweaks-Base/Bugfixes/UI/SpellTooltips.cs +++ b/TabletopTweaks-Base/Bugfixes/UI/SpellTooltips.cs @@ -18,7 +18,7 @@ static void Postfix(TooltipTemplateAbility __instance, ref IEnumerable 0) { list[0] = new TooltipBrickEntityHeader(__instance.m_Name, __instance.m_Icon, newTypeName, __instance.m_School, __instance.m_Level, isItem: false); diff --git a/TabletopTweaks-Base/Config/Bugfixes.cs b/TabletopTweaks-Base/Config/Bugfixes.cs index 05361fb9..e30ea103 100644 --- a/TabletopTweaks-Base/Config/Bugfixes.cs +++ b/TabletopTweaks-Base/Config/Bugfixes.cs @@ -1,6 +1,5 @@ using Kingmaker.Utility; using System.Collections.Generic; -using TabletopTweaks.Base.Bugfixes.Classes; using TabletopTweaks.Core.Config; namespace TabletopTweaks.Base.Config { diff --git a/TabletopTweaks-Base/MechanicsChanges/MetamagicDamage.cs b/TabletopTweaks-Base/MechanicsChanges/MetamagicDamage.cs index d3609c2d..0d18cce3 100644 --- a/TabletopTweaks-Base/MechanicsChanges/MetamagicDamage.cs +++ b/TabletopTweaks-Base/MechanicsChanges/MetamagicDamage.cs @@ -34,7 +34,7 @@ static void Postfix(RuleCalculateDamage __instance, ref DamageValue __result, Ba num3 = damage.PreRolledValue.Value; } else { DiceFormula modifiedValue = damage.Dice.ModifiedValue; - + if (__instance.RerollAndTakeBest) { int a = __instance.Roll(modifiedValue, __instance.UnitsCount, damage.CalculationType); int b = __instance.Roll(modifiedValue, __instance.UnitsCount, damage.CalculationType); diff --git a/TabletopTweaks-Base/NewContent/Feats/MetamagicFeats/IntensifiedSpell.cs b/TabletopTweaks-Base/NewContent/Feats/MetamagicFeats/IntensifiedSpell.cs index 017a59db..8f74121f 100644 --- a/TabletopTweaks-Base/NewContent/Feats/MetamagicFeats/IntensifiedSpell.cs +++ b/TabletopTweaks-Base/NewContent/Feats/MetamagicFeats/IntensifiedSpell.cs @@ -122,7 +122,7 @@ public static void UpdateSpells() { .Where(a => a.AreaEffect.FlattenAllActions() .OfType() .Any(a => a.Value.DiceCountValue.ValueType == ContextValueType.Rank)) - .Any()); + .Any()); if (isIntensifiedSpell) { if (!spell.AvailableMetamagic.HasMetamagic((Metamagic)CustomMetamagic.Intensified)) { spell.AvailableMetamagic |= (Metamagic)CustomMetamagic.Intensified; diff --git a/TabletopTweaks-Base/NewContent/Feats/MetamagicFeats/RimeSpell.cs b/TabletopTweaks-Base/NewContent/Feats/MetamagicFeats/RimeSpell.cs index b97e9930..2c6f92c4 100644 --- a/TabletopTweaks-Base/NewContent/Feats/MetamagicFeats/RimeSpell.cs +++ b/TabletopTweaks-Base/NewContent/Feats/MetamagicFeats/RimeSpell.cs @@ -125,7 +125,7 @@ public static void AddRimeSpell() { FeatTools.AddAsMetamagicFeat(RimeSpellFeat); FavoriteMetamagicSelection.AddFeatures(FavoriteMetamagicRime); } - public static void UpdateSpells() { + public static void UpdateSpells() { if (TTTContext.AddedContent.Feats.IsDisabled("MetamagicRimeSpell")) { return; } var spells = SpellTools.GetAllSpells(); diff --git a/TabletopTweaks-Base/NewContent/Features/LongspearChargeBuff.cs b/TabletopTweaks-Base/NewContent/Features/LongspearChargeBuff.cs index 89ef1f36..c40b2bf2 100644 --- a/TabletopTweaks-Base/NewContent/Features/LongspearChargeBuff.cs +++ b/TabletopTweaks-Base/NewContent/Features/LongspearChargeBuff.cs @@ -1,5 +1,4 @@ -using Kingmaker.Designers.Mechanics.Facts; -using Kingmaker.UnitLogic.Buffs.Blueprints; +using Kingmaker.UnitLogic.Buffs.Blueprints; using TabletopTweaks.Core.NewComponents; using TabletopTweaks.Core.Utilities; using static TabletopTweaks.Base.Main; diff --git a/TabletopTweaks-Base/NewContent/RogueTalents/BleedingAttack.cs b/TabletopTweaks-Base/NewContent/RogueTalents/BleedingAttack.cs index 2f1b89be..d7c40aee 100644 --- a/TabletopTweaks-Base/NewContent/RogueTalents/BleedingAttack.cs +++ b/TabletopTweaks-Base/NewContent/RogueTalents/BleedingAttack.cs @@ -1,19 +1,14 @@ using Kingmaker.Blueprints; using Kingmaker.Blueprints.Classes; using Kingmaker.Blueprints.Classes.Spells; -using Kingmaker.Designers.EventConditionActionSystem.Actions; -using Kingmaker.ElementsSystem; using Kingmaker.EntitySystem.Stats; -using Kingmaker.Enums; using Kingmaker.RuleSystem.Rules.Damage; using Kingmaker.UnitLogic.Buffs.Blueprints; using Kingmaker.UnitLogic.FactLogic; using Kingmaker.UnitLogic.Mechanics; using Kingmaker.UnitLogic.Mechanics.Actions; using Kingmaker.UnitLogic.Mechanics.Components; -using Kingmaker.UnitLogic.Mechanics.Conditions; using Kingmaker.UnitLogic.Mechanics.Properties; -using TabletopTweaks.Core.NewComponents.Properties; using TabletopTweaks.Core.Utilities; using static TabletopTweaks.Base.Main; using StatValueGetter = Kingmaker.UnitLogic.Mechanics.Properties.StatValueGetter; @@ -44,25 +39,25 @@ public static void AddBleedingAttack() { c.OnHealDamage = true; c.AllowZeroHealDamage = true; }); - bp.AddComponent(c => { + bp.AddComponent(c => { c.Activated = Helpers.CreateActionList(); c.Deactivated = Helpers.CreateActionList(); c.NewRound = Helpers.CreateActionList( - new ContextActionDealDamage() { - DamageType = new DamageTypeDescription() { + new ContextActionDealDamage() { + DamageType = new DamageTypeDescription() { Type = DamageType.Direct }, - Duration = new ContextDurationValue() { + Duration = new ContextDurationValue() { DiceCountValue = new ContextValue(), BonusValue = new ContextValue() }, - Value = new ContextDiceValue() { + Value = new ContextDiceValue() { DiceCountValue = 0, - BonusValue = new ContextValue() { + BonusValue = new ContextValue() { ValueType = ContextValueType.Rank } } - } + } ); }); bp.AddComponent(c => { diff --git a/TabletopTweaks-Base/NewContent/Spells/CloakOfWinds.cs b/TabletopTweaks-Base/NewContent/Spells/CloakOfWinds.cs index b6a160d9..7e508af4 100644 --- a/TabletopTweaks-Base/NewContent/Spells/CloakOfWinds.cs +++ b/TabletopTweaks-Base/NewContent/Spells/CloakOfWinds.cs @@ -81,7 +81,7 @@ public static void AddCloakOfWinds() { CloakOfWindsAbility.AddToSpellList(SpellTools.SpellList.DruidSpellList, 3); CloakOfWindsAbility.AddToSpellList(SpellTools.SpellList.MagusSpellList, 3); CloakOfWindsAbility.AddToSpellList(SpellTools.SpellList.RangerSpellList, 3); - CloakOfWindsAbility.AddToSpellList(SpellTools.SpellList.WizardSpellList,3); + CloakOfWindsAbility.AddToSpellList(SpellTools.SpellList.WizardSpellList, 3); } } } diff --git a/TabletopTweaks-Base/NewContent/Spells/LongArms.cs b/TabletopTweaks-Base/NewContent/Spells/LongArms.cs index 84c50dca..16fddef3 100644 --- a/TabletopTweaks-Base/NewContent/Spells/LongArms.cs +++ b/TabletopTweaks-Base/NewContent/Spells/LongArms.cs @@ -1,7 +1,6 @@ using Kingmaker.Blueprints; using Kingmaker.Blueprints.Classes.Spells; using Kingmaker.Craft; -using Kingmaker.ElementsSystem; using Kingmaker.EntitySystem.Stats; using Kingmaker.Enums; using Kingmaker.RuleSystem; diff --git a/TabletopTweaks-Base/NewContent/Spells/MagesDisjunction.cs b/TabletopTweaks-Base/NewContent/Spells/MagesDisjunction.cs index 5d607eff..451d7bf6 100644 --- a/TabletopTweaks-Base/NewContent/Spells/MagesDisjunction.cs +++ b/TabletopTweaks-Base/NewContent/Spells/MagesDisjunction.cs @@ -25,7 +25,7 @@ public static void AddMagesDisjunction() { //var icon = AssetLoader.Image2Sprite.Create($"{Context.ModEntry.Path}Assets{Path.DirectorySeparatorChar}Abilities{Path.DirectorySeparatorChar}Icon_LongArm.png"); var Icon_MagesDisjunctionAbility = AssetLoader.LoadInternal(TTTContext, folder: "Abilities", file: "Icon_MagesDisjunctionAbility.png"); var Icon_MagesDisjunctionScroll = AssetLoader.LoadInternal(TTTContext, folder: "Equipment", file: "Icon_ScrollOfMagesDisjunction.png"); - var dispelmagic00fx = new PrefabLink() { + var dispelmagic00fx = new PrefabLink() { AssetId = "3eda0e7f710821045a35ebe432af667c" }; var AdamantineWeaponEnchantment = BlueprintTools.GetBlueprintReference("ab39e7d59dd12f4429ffef5dca88dc7b"); @@ -80,10 +80,10 @@ public static void AddMagesDisjunction() { bp.ResourceAssetIds = new string[0]; bp.AddComponent(c => { c.Actions = Helpers.CreateActionList( - new Conditional() { - ConditionsChecker = new ConditionsChecker() { - Conditions = new Condition[] { - new ContextConditionHasFact(){ + new Conditional() { + ConditionsChecker = new ConditionsChecker() { + Conditions = new Condition[] { + new ContextConditionHasFact(){ m_Fact = SummonedCreatureVisual } } @@ -131,8 +131,8 @@ public static void AddMagesDisjunction() { c.m_Radius = 40.Feet(); c.m_TargetType = TargetType.Any; c.m_Condition = new ConditionsChecker() { - Conditions = new Condition[] { - new ContextConditionIsCaster(){ + Conditions = new Condition[] { + new ContextConditionIsCaster(){ Not = true } } diff --git a/TabletopTweaks-Base/NewContent/Spells/StunningBarrierGreater.cs b/TabletopTweaks-Base/NewContent/Spells/StunningBarrierGreater.cs index fae199fd..732e83f7 100644 --- a/TabletopTweaks-Base/NewContent/Spells/StunningBarrierGreater.cs +++ b/TabletopTweaks-Base/NewContent/Spells/StunningBarrierGreater.cs @@ -2,9 +2,7 @@ using Kingmaker.Blueprints.Classes.Spells; using Kingmaker.Blueprints.Items.Equipment; using Kingmaker.Craft; -using Kingmaker.Designers.Mechanics.Buffs; using Kingmaker.Designers.Mechanics.Facts; -using Kingmaker.ElementsSystem; using Kingmaker.EntitySystem.Stats; using Kingmaker.Enums; using Kingmaker.UnitLogic.Abilities; @@ -31,23 +29,23 @@ public static void AddStunningBarrierGreater() { var Icon_StunningBarrierGreater = AssetLoader.LoadInternal(TTTContext, folder: "Abilities", file: "Icon_StunningBarrierGreater.png"); var Icon_ScrollOfStunningBarrierGreater = ScrollOfStunningBarrier.Icon; - var StunningBarrierName = Helpers.CreateString(TTTContext, "StunningBarrierGreater.Name", - "Greater Stunning Barrier", - shouldProcess:false + var StunningBarrierName = Helpers.CreateString(TTTContext, "StunningBarrierGreater.Name", + "Greater Stunning Barrier", + shouldProcess: false ); - var StunningBarrierDescription = Helpers.CreateString(TTTContext, "StunningBarrierGreater.Description", + var StunningBarrierDescription = Helpers.CreateString(TTTContext, "StunningBarrierGreater.Description", "You are closely surrounded by a barely visible magical field. " + "The field provides a +2 deflection bonus to AC and a +2 resistance bonus on saves. " + "Any creature that strikes you with a melee attack is stunned for 1 round (Will negates). " + - "Once the field has stunned a number of creatures equal to your caster level, the spell is discharged.", + "Once the field has stunned a number of creatures equal to your caster level, the spell is discharged.", shouldProcess: true ); - var StunningBarrierLocalizedDuration = Helpers.CreateString(TTTContext, "StunningBarrierGreater.Name", - "1 round/level or until discharged", + var StunningBarrierLocalizedDuration = Helpers.CreateString(TTTContext, "StunningBarrierGreater.Name", + "1 round/level or until discharged", shouldProcess: false ); - var StunningBarrierLocalizedSavingThrow = Helpers.CreateString(TTTContext, "StunningBarrierGreater.Name", - "Will negates stun", + var StunningBarrierLocalizedSavingThrow = Helpers.CreateString(TTTContext, "StunningBarrierGreater.Name", + "Will negates stun", shouldProcess: false ); //Stub for reference creation @@ -71,12 +69,12 @@ public static void AddStunningBarrierGreater() { bp.AddComponent(c => { c.SavingThrowType = SavingThrowType.Will; c.Actions = Helpers.CreateActionList( - new ContextActionConditionalSaved() { + new ContextActionConditionalSaved() { Succeed = Helpers.CreateActionList(), Failed = Helpers.CreateActionList( - new ContextActionApplyBuff() { + new ContextActionApplyBuff() { m_Buff = Stunned, - DurationValue = new ContextDurationValue() { + DurationValue = new ContextDurationValue() { DiceCountValue = 0, BonusValue = 1 } @@ -138,7 +136,7 @@ public static void AddStunningBarrierGreater() { c.OnlyMelee = true; c.ActionOnSelf = Helpers.CreateActionList(); c.ActionsOnAttacker = Helpers.CreateActionList( - new ContextActionCastSpell() { + new ContextActionCastSpell() { m_Spell = StunningBarrierGreaterStun.ToReference(), DC = new ContextValue(), SpellLevel = new ContextValue() diff --git a/TabletopTweaks-Base/UMMSettingsUI.cs b/TabletopTweaks-Base/UMMSettingsUI.cs index 0d0f44fe..7771a0ef 100644 --- a/TabletopTweaks-Base/UMMSettingsUI.cs +++ b/TabletopTweaks-Base/UMMSettingsUI.cs @@ -148,7 +148,7 @@ public static void AddedContent() { SetttingUI.SettingGroup("Archetypes", TabLevel, AddedContent.Archetypes); SetttingUI.SettingGroup("Base Abilities", TabLevel, AddedContent.BaseAbilities); - SetttingUI.SettingGroup("Bloodlines", TabLevel, AddedContent.Bloodlines); + SetttingUI.SettingGroup("Bloodlines", TabLevel, AddedContent.Bloodlines); SetttingUI.SettingGroup("Feats", TabLevel, AddedContent.Feats); SetttingUI.SettingGroup("Armor Mastery Feats", TabLevel, AddedContent.ArmorMasteryFeats); SetttingUI.SettingGroup("Shield Mastery Feats", TabLevel, AddedContent.ShieldMasteryFeats);