Files
Continentis/Assets/Mods/Basic/Cards/Scripts/Knight/FirmBelief.cs
SoulliesOfficial 5fe665d0ce Card爆改!
2025-11-15 12:17:34 -05:00

39 lines
1.3 KiB
C#

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 FirmBelief : CardLogicBase
{
public override void Initialize(CardInstance card)
{
base.Initialize(card);
this.card.eventSubmodule.onInitiativeDiscard.Add("FirmBelief_PlayWhenDiscard",
new PrioritizedCheckAndEffect(() => true, () => card.Play(new List<CharacterBase>(), user)));
}
public override void SetUpLogicComponents()
{
AddLogicComponent<CardLogicComponent_Defense>();
}
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
CommandGroup mainGroup = SingleCommandGroup(
new Cmd_PlayAnimation(user.characterView, "Skill"),
new Cmd_Function(() => user.AddBlock(GetAttribute("Block"))),
new Cmd_Function(() => user.deckSubmodule.DrawCards(GetAttribute("DrawCardAmount"))));
return new List<CommandBase> { mainGroup };
}
public override void ApplyAttributeChangesByCard()
{
LogicComponent<CardLogicComponent_Defense>().SetBlock_Fortitude();
}
}
}