36 lines
1.2 KiB
C#
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
|
|
{
|
|
protected override void SetUpLogicComponents()
|
|
{
|
|
AddLogicComponent<CardLogicComponent_SelectHandCards>().SetEffect(SelectEffect);
|
|
}
|
|
|
|
protected override 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 mainGroup;
|
|
}
|
|
|
|
private void SelectEffect(CardInstance card)
|
|
{
|
|
CommandQueueManager.Instance.AddCommand(user.deckSubmodule.DiscardCard(card), new CommandContext());
|
|
}
|
|
}
|
|
} |