From 4854e364f9aa9d241cd0843a46141c44ca93c046 Mon Sep 17 00:00:00 2001 From: lamali Date: Thu, 28 May 2026 01:22:29 +0200 Subject: [PATCH] Add `silent` parameter to `Apply` methods to suppress visual effects during power application --- Utils/CommonActions.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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); } ///