Files
Continentis/Assets/Mods/Basic/Cards/Scripts/General/Skill/Recollection.cs

32 lines
1.2 KiB
C#
Raw Normal View History

2025-10-23 00:49:44 -04:00
using System.Collections.Generic;
using Continentis.MainGame.Card;
using Continentis.MainGame.Character;
using Continentis.MainGame.Commands;
2026-04-17 12:01:50 -04:00
using SLSUtilities.General;
2025-10-23 00:49:44 -04:00
namespace Continentis.Mods.Basic.Cards
{
2025-10-24 09:11:22 -04:00
public class Recollection : CardLogicBase
2025-10-23 00:49:44 -04:00
{
2025-11-15 12:17:34 -05:00
public override void SetUpLogicComponents()
2025-10-23 00:49:44 -04:00
{
2026-04-08 04:48:35 -04:00
var select = AddLogicComponent<CardLogicComponent_SelectCustomCards>();
select.selectEffect = SelectEffect;
2025-10-23 00:49:44 -04:00
}
2026-03-20 11:56:50 -04:00
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
2025-10-23 00:49:44 -04:00
{
2026-03-20 11:56:50 -04:00
CommandGroup mainGroup = Cmd.Sequential(new Cmd_PlayAnimation(user.characterView, "Skill"));
2025-10-23 00:49:44 -04:00
List<CardInstance> discardedCards = user.deckSubmodule.DiscardPile;
LogicComponent<CardLogicComponent_SelectCustomCards>()
2026-04-08 04:48:35 -04:00
.AddSelectionCommands(ref mainGroup, discardedCards,
"Card_Basic_Recollection_SelectCustomCards_Title".Localize(card), GetAttribute("Draw_Card_Count"));
2026-03-20 11:56:50 -04:00
return mainGroup;
2025-10-23 00:49:44 -04:00
}
2026-03-20 11:56:50 -04:00
2026-04-08 04:48:35 -04:00
private void SelectEffect(CardInstance card)
2025-10-23 00:49:44 -04:00
{
2026-04-08 04:48:35 -04:00
CommandQueueManager.Instance.AddCommand(new Cmd_DrawCards(card.deck, new List<CardInstance>() { card }));
2025-10-23 00:49:44 -04:00
}
}
}