卡牌更新
This commit is contained in:
34
Assets/Mods/Basic/Cards/Scripts/General/Skill/Tactic.cs
Normal file
34
Assets/Mods/Basic/Cards/Scripts/General/Skill/Tactic.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class Tactic : CardLogicBase
|
||||
{
|
||||
public override void SetUpLogicComponents()
|
||||
{
|
||||
AddLogicComponent<CardLogicComponent_SelectHandCards>().SetEffect(SelectEffect);
|
||||
}
|
||||
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = Cmd.Sequential(new Cmd_PlayAnimation(user.characterView, "Skill"));
|
||||
|
||||
LogicComponent<CardLogicComponent_SelectHandCards>()
|
||||
.AddSelectionCommands(ref mainGroup, "Card_Basic_Tactic_SelectHandCards_Title".Localize(), GetAttribute("Discard_Card_Count"), true);
|
||||
|
||||
mainGroup.AddCommand(new Cmd_DrawCards(user.deckSubmodule, GetAttribute("Draw_Card_Count")));
|
||||
|
||||
return mainGroup;
|
||||
}
|
||||
|
||||
private void SelectEffect(CardInstance card)
|
||||
{
|
||||
CommandQueueManager.Instance.AddCommand(user.deckSubmodule.DiscardCard(card, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user