Files
Continentis/Assets/Mods/Basic/Cards/Scripts/General/Tactic.cs
SoulliesOfficial 5fe665d0ce Card爆改!
2025-11-15 12:17:34 -05:00

36 lines
1.2 KiB
C#

using System.Collections.Generic;
using Continentis.MainGame;
using Continentis.MainGame.Card;
using Continentis.MainGame.Character;
using Continentis.MainGame.Commands;
using SLSFramework.General;
using UnityEngine;
namespace Continentis.Mods.Basic.Cards
{
public class Tactic : CardLogicBase
{
public override void SetUpLogicComponents()
{
AddLogicComponent<CardLogicComponent_SelectHandCards>().SetEffect(SelectEffect);
}
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential,
new Cmd_PlayAnimation(user.characterView, "Skill"));
LogicComponent<CardLogicComponent_SelectHandCards>()
.AddSelectionCommands(ref mainGroup, "Card_Basic_Tactic_SelectionCommandTitle".Localize(), 1, true);
mainGroup.AddCommand(new Cmd_DrawCards(user.deckSubmodule, 1));
return new List<CommandBase> { mainGroup };
}
private void SelectEffect(CardInstance card)
{
CommandQueueManager.Instance.AddCommand(user.deckSubmodule.DiscardCard(card, true), new CommandContext());
}
}
}