39 lines
1.3 KiB
C#
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()
|
|
{
|
|
base.Initialize();
|
|
this.eventSubmodule.onInitiativeDiscard.Add("FirmBelief_PlayWhenDiscard",
|
|
new PrioritizedCheckAndEffect(() => true, () => this.Play(new List<CharacterBase>(), user)));
|
|
}
|
|
|
|
protected override void SetUpLogicComponents()
|
|
{
|
|
AddLogicComponent<CardLogicComponent_Defense>();
|
|
}
|
|
|
|
protected override 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 mainGroup;
|
|
}
|
|
|
|
public override void ApplyAttributeChangesByCard()
|
|
{
|
|
LogicComponent<CardLogicComponent_Defense>().SetBlock_Fortitude();
|
|
}
|
|
}
|
|
} |