diff --git a/TabletopTweaks-Core/Bugfixes/General/PropertyFixes.cs b/TabletopTweaks-Core/Bugfixes/General/PropertyFixes.cs index 10188843..953531d7 100644 --- a/TabletopTweaks-Core/Bugfixes/General/PropertyFixes.cs +++ b/TabletopTweaks-Core/Bugfixes/General/PropertyFixes.cs @@ -1,5 +1,4 @@ -using HarmonyLib; -using Kingmaker.EntitySystem.Entities; +using Kingmaker.EntitySystem.Entities; using Kingmaker.UnitLogic; using Kingmaker.UnitLogic.Mechanics.Properties; diff --git a/TabletopTweaks-Core/MechanicsChanges/AdditionalModifierDescriptors.cs b/TabletopTweaks-Core/MechanicsChanges/AdditionalModifierDescriptors.cs index f4def922..e7623c70 100644 --- a/TabletopTweaks-Core/MechanicsChanges/AdditionalModifierDescriptors.cs +++ b/TabletopTweaks-Core/MechanicsChanges/AdditionalModifierDescriptors.cs @@ -117,7 +117,7 @@ static class ModifierDescriptorComparer_Compare_Patch { static SortedDictionary order; static bool Prefix(ModifierDescriptorComparer __instance, ModifierDescriptor x, ModifierDescriptor y, ref int __result) { - if (IsTTTDescriptor(x) || IsTTTDescriptor(y)) { + if (IsTTTDescriptor(x) || IsTTTDescriptor(y)) { if (order == null) { order = new SortedDictionary(); int i = 0; @@ -132,7 +132,7 @@ static class ModifierDescriptorComparer_Compare_Patch { } private static bool IsTTTDescriptor(ModifierDescriptor desc) { - return Enum.IsDefined(typeof(NaturalArmor), (int)desc) + return Enum.IsDefined(typeof(NaturalArmor), (int)desc) || Enum.IsDefined(typeof(Dodge), (int)desc) || Enum.IsDefined(typeof(Untyped), (int)desc) || Enum.IsDefined(typeof(Enhancement), (int)desc); diff --git a/TabletopTweaks-Core/MechanicsChanges/MetamagicExtention.cs b/TabletopTweaks-Core/MechanicsChanges/MetamagicExtention.cs index 6cd56055..4bd5cb70 100644 --- a/TabletopTweaks-Core/MechanicsChanges/MetamagicExtention.cs +++ b/TabletopTweaks-Core/MechanicsChanges/MetamagicExtention.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; using System.Text; -using System.Web; using TabletopTweaks.Core.ModLogic; using TabletopTweaks.Core.NewUnitParts; using TabletopTweaks.Core.Utilities; diff --git a/TabletopTweaks-Core/NewActions/ContextActionApplyBuffRanks.cs b/TabletopTweaks-Core/NewActions/ContextActionApplyBuffRanks.cs index 9cd2cb1f..61b16826 100644 --- a/TabletopTweaks-Core/NewActions/ContextActionApplyBuffRanks.cs +++ b/TabletopTweaks-Core/NewActions/ContextActionApplyBuffRanks.cs @@ -1,19 +1,19 @@ -using Kingmaker.Blueprints; -using Kingmaker; +using Kingmaker; +using Kingmaker.Blueprints; using Kingmaker.Blueprints.JsonSystem; using Kingmaker.Controllers; using Kingmaker.ElementsSystem; using Kingmaker.EntitySystem.Entities; +using Kingmaker.UnitLogic; using Kingmaker.UnitLogic.Abilities.Components.AreaEffects; -using Kingmaker.UnitLogic.Buffs.Blueprints; using Kingmaker.UnitLogic.Buffs; +using Kingmaker.UnitLogic.Buffs.Blueprints; using Kingmaker.UnitLogic.Mechanics; +using Kingmaker.UnitLogic.Mechanics.Actions; using Kingmaker.Utility; using System; -using UnityEngine.Serialization; using UnityEngine; -using Kingmaker.UnitLogic.Mechanics.Actions; -using Kingmaker.UnitLogic; +using UnityEngine.Serialization; namespace TabletopTweaks.Core.NewActions { [TypeId("4b0dd1fb0abf4bd9865214ebbba6bb02")] diff --git a/TabletopTweaks-Core/NewActions/ContextActionDisjointEnchantments.cs b/TabletopTweaks-Core/NewActions/ContextActionDisjointEnchantments.cs index dd7c68d8..d035aa66 100644 --- a/TabletopTweaks-Core/NewActions/ContextActionDisjointEnchantments.cs +++ b/TabletopTweaks-Core/NewActions/ContextActionDisjointEnchantments.cs @@ -22,7 +22,7 @@ public class ContextActionDisjointEnchantments : ContextAction { if (base.Target == null) { return; } Target.Unit.Descriptor.Body.AllSlots - + .Where(slot => slot.HasItem) .Select(slot => slot.Item) .Append(Target.Unit.Body.PrimaryHand?.MaybeWeapon?.Second) @@ -41,7 +41,7 @@ public class ContextActionDisjointEnchantments : ContextAction { }); } - public BlueprintEquipmentEnchantmentReference m_DisjointEnchantment; + public BlueprintEquipmentEnchantmentReference m_DisjointEnchantment; public ContextDurationValue Duration; } } diff --git a/TabletopTweaks-Core/NewComponents/AbilitySpecific/DisjointedEffect.cs b/TabletopTweaks-Core/NewComponents/AbilitySpecific/DisjointedEffect.cs index c56d7eac..685b64b2 100644 --- a/TabletopTweaks-Core/NewComponents/AbilitySpecific/DisjointedEffect.cs +++ b/TabletopTweaks-Core/NewComponents/AbilitySpecific/DisjointedEffect.cs @@ -19,7 +19,7 @@ public class DisjointedEffect : ItemEnchantmentComponentDelegate> Enchantments = new List>(); public bool HasDisjointed = false; - public DisjointedEffectData() {} + public DisjointedEffectData() { } } } } diff --git a/TabletopTweaks-Core/NewComponents/AbilitySpecific/MythicSneakAttack.cs b/TabletopTweaks-Core/NewComponents/AbilitySpecific/MythicSneakAttack.cs index 0dd8a66b..7fb6b640 100644 --- a/TabletopTweaks-Core/NewComponents/AbilitySpecific/MythicSneakAttack.cs +++ b/TabletopTweaks-Core/NewComponents/AbilitySpecific/MythicSneakAttack.cs @@ -2,7 +2,6 @@ using Kingmaker.PubSubSystem; using Kingmaker.RuleSystem; using Kingmaker.RuleSystem.Rules.Damage; -using Kingmaker.UI.ServiceWindow.CharacterScreen; using Kingmaker.UnitLogic; using Kingmaker.Utility; using System.Linq; diff --git a/TabletopTweaks-Core/NewComponents/AddAdditionalWeaponDamageOnHit.cs b/TabletopTweaks-Core/NewComponents/AddAdditionalWeaponDamageOnHit.cs index ba76b127..9a5467a3 100644 --- a/TabletopTweaks-Core/NewComponents/AddAdditionalWeaponDamageOnHit.cs +++ b/TabletopTweaks-Core/NewComponents/AddAdditionalWeaponDamageOnHit.cs @@ -10,7 +10,6 @@ using Kingmaker.RuleSystem; using Kingmaker.RuleSystem.Rules; using Kingmaker.RuleSystem.Rules.Damage; -using Kingmaker.UnitLogic; using Kingmaker.UnitLogic.Mechanics; using Kingmaker.UnitLogic.Parts; using Kingmaker.Utility; diff --git a/TabletopTweaks-Core/NewComponents/AddConditionalWeaponDamageBonus.cs b/TabletopTweaks-Core/NewComponents/AddConditionalWeaponDamageBonus.cs index ba0b051b..0d5e1a0a 100644 --- a/TabletopTweaks-Core/NewComponents/AddConditionalWeaponDamageBonus.cs +++ b/TabletopTweaks-Core/NewComponents/AddConditionalWeaponDamageBonus.cs @@ -1,18 +1,11 @@ -using Kingmaker.Blueprints.JsonSystem; -using Kingmaker.Blueprints; -using Kingmaker.Enums; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using Kingmaker.Blueprints; +using Kingmaker.Blueprints.JsonSystem; +using Kingmaker.ElementsSystem; using Kingmaker.EntitySystem; +using Kingmaker.Enums; using Kingmaker.PubSubSystem; using Kingmaker.RuleSystem.Rules; -using Kingmaker.RuleSystem.Rules.Damage; -using Kingmaker.RuleSystem; using Kingmaker.UnitLogic.Mechanics; -using Kingmaker.ElementsSystem; namespace TabletopTweaks.Core.NewComponents { [AllowMultipleComponents] @@ -22,7 +15,7 @@ public class AddConditionalWeaponDamageBonus : EntityFactComponentDelegate, IRulebookHandler, ISubscriber, IInitiatorRulebookSubscriber { - + public void OnEventAboutToTrigger(RuleCalculateWeaponStats evt) { RuleAttackWithWeapon attackWithWeapon = evt.AttackWithWeapon; diff --git a/TabletopTweaks-Core/NewComponents/AddOutgoingWeaponDamageBonus.cs b/TabletopTweaks-Core/NewComponents/AddOutgoingWeaponDamageBonus.cs index 063e76e1..520f28f2 100644 --- a/TabletopTweaks-Core/NewComponents/AddOutgoingWeaponDamageBonus.cs +++ b/TabletopTweaks-Core/NewComponents/AddOutgoingWeaponDamageBonus.cs @@ -5,12 +5,8 @@ using Kingmaker.RuleSystem.Rules; using Kingmaker.RuleSystem.Rules.Damage; using Kingmaker.UnitLogic; -using Kingmaker.UnitLogic.Abilities.Components; using System; -using TabletopTweaks.Core.NewUnitParts; using TabletopTweaks.Core.Utilities; -using static Kingmaker.Blueprints.Area.FactHolder; -using static LayoutRedirectElement; namespace TabletopTweaks.Core.NewComponents { [TypeId("03f55b5c7cb0445ab32ce2c8d44704ec")] diff --git a/TabletopTweaks-Core/NewComponents/OutcomingAdditionalDamageAndHealingModifier.cs b/TabletopTweaks-Core/NewComponents/OutcomingAdditionalDamageAndHealingModifier.cs index 3a40cdeb..dac62405 100644 --- a/TabletopTweaks-Core/NewComponents/OutcomingAdditionalDamageAndHealingModifier.cs +++ b/TabletopTweaks-Core/NewComponents/OutcomingAdditionalDamageAndHealingModifier.cs @@ -5,7 +5,6 @@ using Kingmaker.RuleSystem.Rules.Damage; using Kingmaker.UnitLogic; using Kingmaker.UnitLogic.Mechanics; -using System; namespace TabletopTweaks.Core.NewComponents { [AllowedOn(typeof(BlueprintUnitFact))] diff --git a/TabletopTweaks-Core/NewComponents/OwlcatReplacements/AttackBonusAgainstTargetTTT.cs b/TabletopTweaks-Core/NewComponents/OwlcatReplacements/AttackBonusAgainstTargetTTT.cs index 9c0abe3c..368271a2 100644 --- a/TabletopTweaks-Core/NewComponents/OwlcatReplacements/AttackBonusAgainstTargetTTT.cs +++ b/TabletopTweaks-Core/NewComponents/OwlcatReplacements/AttackBonusAgainstTargetTTT.cs @@ -16,9 +16,9 @@ namespace TabletopTweaks.Core.NewComponents.OwlcatReplacements { [AllowedOn(typeof(BlueprintBuff), false)] [TypeId("2a55c3471cbf44409a6193a7a8b8655f")] - public class AttackBonusAgainstTargetTTT : UnitBuffComponentDelegate, - ITargetRulebookHandler, - IRulebookHandler, + public class AttackBonusAgainstTargetTTT : UnitBuffComponentDelegate, + ITargetRulebookHandler, + IRulebookHandler, ISubscriber, ITargetRulebookSubscriber { public void OnEventAboutToTrigger(RuleCalculateAttackBonus evt) { diff --git a/TabletopTweaks-Core/NewComponents/Prerequisites/PrerequisiteInPlayerParty.cs b/TabletopTweaks-Core/NewComponents/Prerequisites/PrerequisiteInPlayerParty.cs index 1ab0346b..dbe49a27 100644 --- a/TabletopTweaks-Core/NewComponents/Prerequisites/PrerequisiteInPlayerParty.cs +++ b/TabletopTweaks-Core/NewComponents/Prerequisites/PrerequisiteInPlayerParty.cs @@ -1,5 +1,4 @@ using Kingmaker.Blueprints; -using Kingmaker.Blueprints.Classes; using Kingmaker.Blueprints.Classes.Prerequisites; using Kingmaker.Blueprints.Classes.Selection; using Kingmaker.Blueprints.JsonSystem; diff --git a/TabletopTweaks-Core/NewComponents/Properties/CompositePropertyGetter.cs b/TabletopTweaks-Core/NewComponents/Properties/CompositePropertyGetter.cs index 55c775df..f5f8eae4 100644 --- a/TabletopTweaks-Core/NewComponents/Properties/CompositePropertyGetter.cs +++ b/TabletopTweaks-Core/NewComponents/Properties/CompositePropertyGetter.cs @@ -16,7 +16,7 @@ public class CompositePropertyGetter : PropertyValueGetter { case Mode.Lowest: return Properties.Select(property => property.Calculate(unit)).Min(); case Mode.Multiply: - return Properties.Select(property => property.Calculate(unit)).Aggregate(1, (int a , int b) => a * b); + return Properties.Select(property => property.Calculate(unit)).Aggregate(1, (int a, int b) => a * b); default: return 0; } diff --git a/TabletopTweaks-Core/NewEvents/IDemoralizeHandler.cs b/TabletopTweaks-Core/NewEvents/IDemoralizeHandler.cs index a9b80953..e948c160 100644 --- a/TabletopTweaks-Core/NewEvents/IDemoralizeHandler.cs +++ b/TabletopTweaks-Core/NewEvents/IDemoralizeHandler.cs @@ -1,12 +1,8 @@ using HarmonyLib; -using Kingmaker.Controllers.Dialog; -using Kingmaker.Designers; using Kingmaker.PubSubSystem; using Kingmaker.RuleSystem.Rules; using Kingmaker.UnitLogic.Buffs; -using Kingmaker.UnitLogic.Mechanics; using Kingmaker.UnitLogic.Mechanics.Actions; -using Kingmaker.Utility; using System; using System.Collections.Generic; using System.Reflection; diff --git a/TabletopTweaks-Core/NewRules/RuleAttackWithWeaponPrecision.cs b/TabletopTweaks-Core/NewRules/RuleAttackWithWeaponPrecision.cs index a52b8888..9552a91e 100644 --- a/TabletopTweaks-Core/NewRules/RuleAttackWithWeaponPrecision.cs +++ b/TabletopTweaks-Core/NewRules/RuleAttackWithWeaponPrecision.cs @@ -6,10 +6,10 @@ using Kingmaker.RuleSystem; using Kingmaker.RuleSystem.Rules; using Kingmaker.RuleSystem.Rules.Damage; -using Kingmaker.UI.Models.Log.Events; using Kingmaker.UI.Models.Log; -using TabletopTweaks.Core.Utilities; +using Kingmaker.UI.Models.Log.Events; using System; +using TabletopTweaks.Core.Utilities; namespace TabletopTweaks.Core.NewRules { class RuleAttackWithWeaponPrecision : RuleAttackWithWeapon { diff --git a/TabletopTweaks-Core/NewRules/RuleFortificationCheck.cs b/TabletopTweaks-Core/NewRules/RuleFortificationCheck.cs index 3989dddf..51f81f73 100644 --- a/TabletopTweaks-Core/NewRules/RuleFortificationCheck.cs +++ b/TabletopTweaks-Core/NewRules/RuleFortificationCheck.cs @@ -1,20 +1,16 @@ using HarmonyLib; using JetBrains.Annotations; -using Kingmaker.EntitySystem.Stats; -using Kingmaker.Enums; using Kingmaker.RuleSystem; using Kingmaker.RuleSystem.Rules; -using Kingmaker.UI.Models.Log.Events; using Kingmaker.UI.Models.Log; +using Kingmaker.UI.Models.Log.Events; using Kingmaker.UnitLogic.Parts; -using Kingmaker.Utility; using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Reflection.Emit; using TabletopTweaks.Core.Utilities; -using static TabletopTweaks.Core.MechanicsChanges.AdditionalModifierDescriptors; namespace TabletopTweaks.Core.NewRules { public class RuleFortificationCheck : RulebookTargetEvent { diff --git a/TabletopTweaks-Core/Utilities/BloodlineTools.cs b/TabletopTweaks-Core/Utilities/BloodlineTools.cs index ae699d23..cf8539b7 100644 --- a/TabletopTweaks-Core/Utilities/BloodlineTools.cs +++ b/TabletopTweaks-Core/Utilities/BloodlineTools.cs @@ -19,7 +19,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text.RegularExpressions; using TabletopTweaks.Core.ModLogic; using TabletopTweaks.Core.NewComponents; diff --git a/TabletopTweaks-Core/Utilities/FeatTools.cs b/TabletopTweaks-Core/Utilities/FeatTools.cs index 0638557f..0d5b4ae5 100644 --- a/TabletopTweaks-Core/Utilities/FeatTools.cs +++ b/TabletopTweaks-Core/Utilities/FeatTools.cs @@ -41,7 +41,7 @@ public static class FeatTools { Selections.SylvanTricksterTalentSelection, Selections.SlayerTalentSelection10, Selections.SlayerTalentSelection6, - Selections.SlayerTalentSelection2, + Selections.SlayerTalentSelection2, Selections.RogueTalentSelection, Selections.LoremasterRogueTalentSelection }; @@ -593,7 +593,7 @@ public static class Selections { public static BlueprintFeatureSelection ZenArcherPointBlankMasterSelection => BlueprintTools.GetBlueprint("50e6aa55653bc014aafe556aad79e5c0"); public static BlueprintFeatureSelection ZenArcherWayOfTheBowSelection => BlueprintTools.GetBlueprint("53420038fdc76944695bf927f7bcd51c"); - + public static void AddModFeatureSelection(BlueprintFeatureSelection selection) { FeatureSelectionSet.Add(selection); diff --git a/TabletopTweaks-Core/Utilities/ItemTools.cs b/TabletopTweaks-Core/Utilities/ItemTools.cs index ca8f7455..ad560c16 100644 --- a/TabletopTweaks-Core/Utilities/ItemTools.cs +++ b/TabletopTweaks-Core/Utilities/ItemTools.cs @@ -11,7 +11,6 @@ using Kingmaker.UnitLogic.Buffs.Blueprints; using System; using System.Collections.Generic; -using System.Web; using TabletopTweaks.Core.MechanicsChanges; using TabletopTweaks.Core.ModLogic; using UnityEngine; @@ -354,7 +353,7 @@ public enum PotionColor : int { bp.m_InventoryTakeSound = "ScrollTake"; bp.TrashLootTypes = new TrashLootType[] { TrashLootType.Scrolls_RE }; bp.m_Overrides = new List(); - bp.AddComponent(c => { + bp.AddComponent(c => { c.m_CustomSpell = spell.ToReference(); }); }); @@ -430,7 +429,7 @@ public enum PotionColor : int { } private static Sprite GetPotionIcon(PotionColor color, int spellLevel) { return color switch { - PotionColor.Blue => spellLevel switch { + PotionColor.Blue => spellLevel switch { 1 => Form01_Blue_Simple, 2 => Form03_Blue_Simple, 3 => Form04_Blue_Simple, diff --git a/TabletopTweaks-Core/Utilities/VenderTools.cs b/TabletopTweaks-Core/Utilities/VenderTools.cs index ec2a7539..f9cd5369 100644 --- a/TabletopTweaks-Core/Utilities/VenderTools.cs +++ b/TabletopTweaks-Core/Utilities/VenderTools.cs @@ -104,7 +104,7 @@ public static class VenderTools { }); } - public static LootItem CreateLootItem([NotNull]BlueprintItem item) { + public static LootItem CreateLootItem([NotNull] BlueprintItem item) { return new LootItem() { m_Item = item.ToReference(), m_Loot = new BlueprintUnitLootReference()