static async Task PlayCardByPayingHalfCostOrForgetting(PowerCard card, SelfCtx ctx) { // target spirit may now play the major power they keep by: // * paying half its cost (round up) OR int cost = (card.Cost + card.Cost % 2) / 2; var payingHalfCostOption = new SelfAction( $"paying {cost}", ctx => ctx.Self.PlayCard(card, cost) ).Matches(x => cost <= x.Self.Energy); // * forgetting it at the end of turn. var forgettingCardOption = new SelfAction( $"forgetting at end of turn", ctx => { ctx.Self.PlayCard(card, 0); ctx.GameState.TimePasses_ThisRound.Push((gs) => { ctx.Self.Forget(card); return(Task.CompletedTask); // this must run befire cards are moved to discard, or it will be forgotten for Shifting Memories }); } ); // !!! It gains all elmemental thresholds. - implement! await ctx.SelectAction_Optional($"Play {card.Name} now by:", payingHalfCostOption, forgettingCardOption ); }