diff --git a/SolastaUnfinishedBusiness/Feats/OtherFeats.cs b/SolastaUnfinishedBusiness/Feats/OtherFeats.cs index 288e27ec7d..a386bdb296 100644 --- a/SolastaUnfinishedBusiness/Feats/OtherFeats.cs +++ b/SolastaUnfinishedBusiness/Feats/OtherFeats.cs @@ -1195,10 +1195,10 @@ public EffectDescription GetEffectDescription( .SetSilent(Silent.WhenAddedOrRemoved) .AddFeatures( FeatureDefinitionMagicAffinityBuilder - .Create($"MagicAffinity{FeatMageSlayerName}") - .SetGuiPresentation(FeatMageSlayerName, Category.Feat) - .SetConcentrationModifiers(ConcentrationAffinity.Disadvantage, 0) - .AddToDB()) + .Create($"MagicAffinity{FeatMageSlayerName}") + .SetGuiPresentation(FeatMageSlayerName, Category.Feat) + .SetConcentrationModifiers(ConcentrationAffinity.Disadvantage, 0) + .AddToDB()) .SetSpecialInterruptions(ConditionInterruption.AnyBattleTurnEnd) .AddToDB())) .AddToDB()) @@ -1297,7 +1297,8 @@ public IEnumerator OnTryAlterOutcomeSavingThrow( var reactionParams = new CharacterActionParams(helper, (ActionDefinitions.Id)ExtraActionId.DoNothingFree) { - StringParameter = "Reaction/&CustomReactionMageSlayerDescription".Formatted(Category.Reaction, attacker.Name) + StringParameter = + "Reaction/&CustomReactionMageSlayerDescription".Formatted(Category.Reaction, attacker.Name) }; var actionService = ServiceRepository.GetService(); var count = actionService.PendingReactionRequestGroups.Count; diff --git a/SolastaUnfinishedBusiness/Feats/RaceFeats.cs b/SolastaUnfinishedBusiness/Feats/RaceFeats.cs index 2c7641901f..101e4c1c3f 100644 --- a/SolastaUnfinishedBusiness/Feats/RaceFeats.cs +++ b/SolastaUnfinishedBusiness/Feats/RaceFeats.cs @@ -901,6 +901,18 @@ private sealed class CustomBehaviorOrcishAggression( FeatureDefinitionPower powerOrcishAggression) : IFilterTargetingPosition, IModifyEffectDescription, IMagicEffectFinishedByMe, IActionFinishedByMe { + public IEnumerator OnActionFinishedByMe(CharacterAction action) + { + if (action is not CharacterActionMoveStepWalk || + !action.ActingCharacter.UsedSpecialFeatures.TryGetValue("UsedTacticalMoves", out var usedTacticalMoves)) + { + yield break; + } + + action.ActingCharacter.UsedTacticalMoves = usedTacticalMoves; + action.ActingCharacter.UsedSpecialFeatures.Remove("UsedTacticalMoves"); + } + public IEnumerator ComputeValidPositions(CursorLocationSelectPosition cursorLocationSelectPosition) { cursorLocationSelectPosition.validPositionsCache.Clear(); @@ -995,18 +1007,6 @@ public EffectDescription GetEffectDescription( return effectDescription; } - - public IEnumerator OnActionFinishedByMe(CharacterAction action) - { - if (action is not CharacterActionMoveStepWalk || - !action.ActingCharacter.UsedSpecialFeatures.TryGetValue("UsedTacticalMoves", out var usedTacticalMoves)) - { - yield break; - } - - action.ActingCharacter.UsedTacticalMoves = usedTacticalMoves; - action.ActingCharacter.UsedSpecialFeatures.Remove("UsedTacticalMoves"); - } } #endregion diff --git a/SolastaUnfinishedBusiness/Models/BootContext.cs b/SolastaUnfinishedBusiness/Models/BootContext.cs index c4fe2cf599..79aaff9919 100644 --- a/SolastaUnfinishedBusiness/Models/BootContext.cs +++ b/SolastaUnfinishedBusiness/Models/BootContext.cs @@ -95,7 +95,7 @@ internal static void Startup() // Late initialized to allow feats and races from other mods CharacterContext.LateLoad(); - + // Custom invocations InvocationsContext.LateLoad(); diff --git a/SolastaUnfinishedBusiness/Patches/CharacterActionMagicEffectPatcher.cs b/SolastaUnfinishedBusiness/Patches/CharacterActionMagicEffectPatcher.cs index ff694ae806..23baba72ba 100644 --- a/SolastaUnfinishedBusiness/Patches/CharacterActionMagicEffectPatcher.cs +++ b/SolastaUnfinishedBusiness/Patches/CharacterActionMagicEffectPatcher.cs @@ -10,7 +10,6 @@ using SolastaUnfinishedBusiness.Api.Helpers; using SolastaUnfinishedBusiness.Behaviors; using SolastaUnfinishedBusiness.Behaviors.Specific; -using SolastaUnfinishedBusiness.Feats; using SolastaUnfinishedBusiness.Interfaces; using TA; using UnityEngine; diff --git a/SolastaUnfinishedBusiness/Subclasses/Builders/InvocationsBuilders.cs b/SolastaUnfinishedBusiness/Subclasses/Builders/InvocationsBuilders.cs index ad353ccb6c..154d0df163 100644 --- a/SolastaUnfinishedBusiness/Subclasses/Builders/InvocationsBuilders.cs +++ b/SolastaUnfinishedBusiness/Subclasses/Builders/InvocationsBuilders.cs @@ -1141,7 +1141,8 @@ public IEnumerator OnMagicEffectFinishedByMe(CharacterActionMagicEffect action, position = target.LocationPosition }; - EffectHelpers.StartVisualEffect(attacker, defender, PowerDomainElementalIceLance, EffectHelpers.EffectType.Effect); + EffectHelpers.StartVisualEffect(attacker, defender, PowerDomainElementalIceLance, + EffectHelpers.EffectType.Effect); RulesetActor.InflictDamage( damageForm.BonusDamage, damageForm, diff --git a/SolastaUnfinishedBusiness/Subclasses/CircleOfTheCosmos.cs b/SolastaUnfinishedBusiness/Subclasses/CircleOfTheCosmos.cs index 28dd490550..82c7a935fb 100644 --- a/SolastaUnfinishedBusiness/Subclasses/CircleOfTheCosmos.cs +++ b/SolastaUnfinishedBusiness/Subclasses/CircleOfTheCosmos.cs @@ -426,7 +426,6 @@ private static FeatureDefinitionPowerSharedPool BuildChalice( .Create($"Power{Name}Chalice") .SetGuiPresentation(Category.Feature, PowerPaladinLayOnHands) .SetUsesFixed(ActivationTime.NoCost) - .SetUseSpellAttack() .SetEffectDescription( EffectDescriptionBuilder .Create() diff --git a/SolastaUnfinishedBusiness/Subclasses/DomainDefiler.cs b/SolastaUnfinishedBusiness/Subclasses/DomainDefiler.cs index 848d3167ac..b29090675b 100644 --- a/SolastaUnfinishedBusiness/Subclasses/DomainDefiler.cs +++ b/SolastaUnfinishedBusiness/Subclasses/DomainDefiler.cs @@ -214,7 +214,7 @@ public DomainDefiler() private sealed class CustomBehaviorInsidiousDeathMagic( // ReSharper disable once SuggestBaseTypeForParameterInConstructor - ConditionDefinition conditionInsidiousDeathMagic) + ConditionDefinition conditionInsidiousDeathMagic) : IPhysicalAttackBeforeHitConfirmedOnEnemy, IMagicEffectBeforeHitConfirmedOnEnemy { public IEnumerator OnMagicEffectBeforeHitConfirmedOnEnemy( diff --git a/SolastaUnfinishedBusiness/Subclasses/InnovationArtillerist.cs b/SolastaUnfinishedBusiness/Subclasses/InnovationArtillerist.cs index a637cb6a10..3d2dbcaab2 100644 --- a/SolastaUnfinishedBusiness/Subclasses/InnovationArtillerist.cs +++ b/SolastaUnfinishedBusiness/Subclasses/InnovationArtillerist.cs @@ -120,7 +120,7 @@ public InnovationArtillerist() EffectDescriptionBuilder .Create(EldritchBlast) .SetDurationData(DurationType.Instantaneous) - .SetTargetingData(Side.All, RangeType.RangeHit, 12, TargetType.IndividualsUnique) + .SetTargetingData(Side.Enemy, RangeType.RangeHit, 12, TargetType.IndividualsUnique) .SetParticleEffectParameters(EldritchBlast) .SetEffectForms( EffectFormBuilder diff --git a/SolastaUnfinishedBusiness/Validators/ValidatorsFeat.cs b/SolastaUnfinishedBusiness/Validators/ValidatorsFeat.cs index a1597b6fc6..4a8380e315 100644 --- a/SolastaUnfinishedBusiness/Validators/ValidatorsFeat.cs +++ b/SolastaUnfinishedBusiness/Validators/ValidatorsFeat.cs @@ -109,7 +109,8 @@ internal static class ValidatorsFeat ValidateIsRaceOrSubrace(Tiefling.FormatTitle(), Tiefling, RaceTieflingBuilder.RaceTiefling); internal static readonly Func IsSylvanElf = - ValidateIsRaceOrSubrace($"{ElfSylvan.FormatTitle()}, {RaceHalfElfBuilder.RaceHalfElfSylvanVariant.FormatTitle()}", + ValidateIsRaceOrSubrace( + $"{ElfSylvan.FormatTitle()}, {RaceHalfElfBuilder.RaceHalfElfSylvanVariant.FormatTitle()}", ElfSylvan, RaceHalfElfBuilder.RaceHalfElfSylvanVariant); internal static readonly Func IsSmallRace = @@ -217,7 +218,7 @@ internal static class ValidatorsFeat } var isRaceOrSubrace = characterRaceDefinition.Contains(hero.RaceDefinition) || - characterRaceDefinition.Contains(hero.SubRaceDefinition); + characterRaceDefinition.Contains(hero.SubRaceDefinition); var guiFormat = Gui.Format("Tooltip/&PreReqIs", description); return isRaceOrSubrace