Files
Continentis/Assets/Mods/Basic/Cards/Scripts/General/Skill/Cover.cs
SoulliesOfficial ac98ec3aef 更新
2026-04-17 12:01:50 -04:00

33 lines
1.1 KiB
C#

using System.Collections.Generic;
using Continentis.MainGame.Card;
using Continentis.MainGame.Character;
using Continentis.MainGame.Commands;
using SLSUtilities.General;
namespace Continentis.Mods.Basic.Cards
{
public class Cover : CardLogicBase
{
private const string BUFF_PROTECTING_COUNT = "Buff_Protecting_Count";
public override void SetUpLogicComponents()
{
AddLogicComponent<CardLogicComponent_Defense>();
AddLogicComponent<CardLogicComponent_Protect>();
}
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
{
return ForEachTarget(targetList, target => Cmd.Parallel(
new Cmd_PlayAnimation(user.characterView, "Skill"),
Cmd.Do(() => user.AddBlock(GetAttribute("Block"))),
Cmd.Do(() => LogicComponent<CardLogicComponent_Protect>().GenerateProtection(user, target, GetAttribute(BUFF_PROTECTING_COUNT)))
));
}
public override void ApplyAttributeChangesByCard()
{
LogicComponent<CardLogicComponent_Defense>().SetBlock();
}
}
}