37 lines
1.3 KiB
C#
37 lines
1.3 KiB
C#
using System.Collections.Generic;
|
|
using Continentis.MainGame.Card;
|
|
using Continentis.MainGame.Character;
|
|
using Continentis.MainGame.Commands;
|
|
using SLSUtilities.General;
|
|
using UnityEngine;
|
|
|
|
namespace Continentis.Mods.Basic.Cards
|
|
{
|
|
public class EchoOfHonor : CardLogicBase
|
|
{
|
|
public override void SetUpLogicComponents()
|
|
{
|
|
AddLogicComponent<CardLogicComponent_GenerateCards>();
|
|
}
|
|
|
|
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
|
{
|
|
return Cmd.Sequential(
|
|
new Cmd_PlayAnimation(user.characterView, "Skill"),
|
|
Cmd.Do(() =>
|
|
{
|
|
if (user.deckSubmodule.HandPile.Exclude(this.card).TryGetRandom(out CardInstance randomHandCard))
|
|
{
|
|
CardInstance newCard = CardInstance.GenerateCardInstance(randomHandCard, user, "Hand");
|
|
newCard.cardLogic.SetAttribute("StaminaCost", 0);
|
|
newCard.GenerateHandCardView("Hand");
|
|
}
|
|
else
|
|
{
|
|
Debug.LogWarning("EchoOfHonor: No other cards in hand to copy.");
|
|
}
|
|
})
|
|
);
|
|
}
|
|
}
|
|
} |