Skip to content

Commit

Permalink
auto format and clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
ThyWoof committed Apr 8, 2024
1 parent 9b6ff3a commit 3b60fe8
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 25 deletions.
11 changes: 6 additions & 5 deletions SolastaUnfinishedBusiness/Feats/OtherFeats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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<IGameLocationActionService>();
var count = actionService.PendingReactionRequestGroups.Count;
Expand Down
24 changes: 12 additions & 12 deletions SolastaUnfinishedBusiness/Feats/RaceFeats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion SolastaUnfinishedBusiness/Models/BootContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ internal static void Startup()

// Late initialized to allow feats and races from other mods
CharacterContext.LateLoad();

// Custom invocations
InvocationsContext.LateLoad();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion SolastaUnfinishedBusiness/Subclasses/CircleOfTheCosmos.cs
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,6 @@ private static FeatureDefinitionPowerSharedPool BuildChalice(
.Create($"Power{Name}Chalice")
.SetGuiPresentation(Category.Feature, PowerPaladinLayOnHands)
.SetUsesFixed(ActivationTime.NoCost)
.SetUseSpellAttack()
.SetEffectDescription(
EffectDescriptionBuilder
.Create()
Expand Down
2 changes: 1 addition & 1 deletion SolastaUnfinishedBusiness/Subclasses/DomainDefiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public DomainDefiler()

private sealed class CustomBehaviorInsidiousDeathMagic(
// ReSharper disable once SuggestBaseTypeForParameterInConstructor
ConditionDefinition conditionInsidiousDeathMagic)
ConditionDefinition conditionInsidiousDeathMagic)
: IPhysicalAttackBeforeHitConfirmedOnEnemy, IMagicEffectBeforeHitConfirmedOnEnemy
{
public IEnumerator OnMagicEffectBeforeHitConfirmedOnEnemy(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions SolastaUnfinishedBusiness/Validators/ValidatorsFeat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ internal static class ValidatorsFeat
ValidateIsRaceOrSubrace(Tiefling.FormatTitle(), Tiefling, RaceTieflingBuilder.RaceTiefling);

internal static readonly Func<FeatDefinition, RulesetCharacterHero, (bool result, string output)> IsSylvanElf =
ValidateIsRaceOrSubrace($"{ElfSylvan.FormatTitle()}, {RaceHalfElfBuilder.RaceHalfElfSylvanVariant.FormatTitle()}",
ValidateIsRaceOrSubrace(
$"{ElfSylvan.FormatTitle()}, {RaceHalfElfBuilder.RaceHalfElfSylvanVariant.FormatTitle()}",
ElfSylvan, RaceHalfElfBuilder.RaceHalfElfSylvanVariant);

internal static readonly Func<FeatDefinition, RulesetCharacterHero, (bool result, string output)> IsSmallRace =
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3b60fe8

Please sign in to comment.