Files
Continentis/Assets/Mods/Basic/Cards/Scripts/Knight/EchoOfHonor.cs

37 lines
1.3 KiB
C#
Raw Normal View History

2025-10-30 12:07:59 -04:00
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
{
2025-11-15 12:17:34 -05:00
public override void SetUpLogicComponents()
2025-10-30 12:07:59 -04:00
{
AddLogicComponent<CardLogicComponent_GenerateCards>();
}
2025-11-15 12:17:34 -05:00
2026-03-20 11:56:50 -04:00
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
2025-10-30 12:07:59 -04:00
{
2026-03-20 11:56:50 -04:00
return Cmd.Sequential(
new Cmd_PlayAnimation(user.characterView, "Skill"),
Cmd.Do(() =>
2025-10-30 12:07:59 -04:00
{
2026-03-20 11:56:50 -04:00
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.");
}
})
);
2025-10-30 12:07:59 -04:00
}
}
}