五张牌!
This commit is contained in:
36
Assets/Mods/Basic/Cards/Scripts/General/Tactic.cs
Normal file
36
Assets/Mods/Basic/Cards/Scripts/General/Tactic.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
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)
|
||||
{
|
||||
user.deckSubmodule.DiscardCard(card);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user