复制牌,保护buff显示调整
This commit is contained in:
37
Assets/Mods/Basic/Cards/Scripts/Knight/EchoOfHonor.cs
Normal file
37
Assets/Mods/Basic/Cards/Scripts/Knight/EchoOfHonor.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class EchoOfHonor : CardLogicBase
|
||||
{
|
||||
protected override void SetUpLogicComponents()
|
||||
{
|
||||
AddLogicComponent<CardLogicComponent_GenerateCards>();
|
||||
}
|
||||
|
||||
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential);
|
||||
mainGroup.AddCommand(new Cmd_PlayAnimation(user.characterView, "Skill"));
|
||||
mainGroup.AddCommand(new Cmd_Function(() =>
|
||||
{
|
||||
if (user.deckSubmodule.HandPile.Exclude(this.cardInstance).TryGetRandom(out CardInstance randomHandCard))
|
||||
{
|
||||
CardInstance newCard = CardInstance.GenerateCardInstance(randomHandCard.cardLogic, user, "Hand");
|
||||
newCard.cardLogic.SetAttribute("StaminaCost", 0);
|
||||
newCard.GenerateHandCardView("Hand");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("EchoOfHonor: No other cards in hand to copy.");
|
||||
}
|
||||
}));
|
||||
return mainGroup;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user