using System.Collections.Generic; using Continentis.MainGame.Card; using Continentis.MainGame.Character; using Continentis.MainGame.Commands; using SLSUtilities.General; namespace Continentis.Mods.Basic.Cards { public class UtmostStrike : CardLogicBase { public override void SetUpLogicComponents() { AddLogicComponent(); AddLogicComponent().SetCondition(SelectCondition).SetEffect(SelectEffect); } public override CommandGroup PlayEffect(List targetList) { CommandGroup mainGroup = ForEachTarget(targetList, target => Cmd.Parallel( new Cmd_PlayAnimation(user.characterView, "Attack"), new Cmd_PlaySFX("SFX_Basic_GeneralMeleeImpact").SetDelay(0.2f), new Cmd_SpawnVFX("VFX_Basic_DefaultAttack").SetDelay(0.2f), Cmd.Do(() => AttackTarget(target, GetTargetedFinalDamage(target))) )); LogicComponent().AddSelectionCommands(ref mainGroup); return mainGroup; } public override void ApplyAttributeChangesByCard() { LogicComponent().SetDamage_Physics(); } private bool SelectCondition(CardInstance card) { return card.contentSubmodule.cardType is not CardType.Attack; } private void SelectEffect(CardInstance card) { CommandQueueManager.Instance.AddCommand(user.deckSubmodule.DiscardCard(card, true, 0f)); } } }