diff --git a/Utils/CommonActions.cs b/Utils/CommonActions.cs index 76f366a..d7f8c96 100644 --- a/Utils/CommonActions.cs +++ b/Utils/CommonActions.cs @@ -481,26 +481,29 @@ public static async Task> SelectCards(CardModel card, Loc /// The card play instance carrying the selected target for single-target cards. /// May be for untargeted cards. /// + /// + /// If , suppresses visual effects when the power is applied. + /// /// /// A list of all applied power instances, or an empty list if no valid targets were found. /// - public static async Task> Apply(PlayerChoiceContext ctx, CardModel card, CardPlay? cardPlay) where T : PowerModel + public static async Task> Apply(PlayerChoiceContext ctx, CardModel card, CardPlay? cardPlay, bool silent = false) where T : PowerModel { if (cardPlay?.Target != null) { - return await Apply(ctx, cardPlay.Target, card) is { } result ? [result] : []; + return await Apply(ctx, cardPlay.Target, card, silent) is { } result ? [result] : []; } - return await ApplyToCreatures(card, ctx, card.GetTargets()); + return await ApplyToCreatures(card, ctx, card.GetTargets(), silent); } private static async Task> ApplyToCreatures(CardModel card, PlayerChoiceContext ctx, params Creature[] targets) where T : PowerModel { return await Apply(ctx, targets, card); } - private static async Task> ApplyToCreatures(CardModel card, PlayerChoiceContext ctx, IEnumerable targets) where T : PowerModel + private static async Task> ApplyToCreatures(CardModel card, PlayerChoiceContext ctx, IEnumerable targets, bool silent = false) where T : PowerModel { - return await Apply(ctx, targets, card); + return await Apply(ctx, targets, card, silent); } ///