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

35 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;
2025-10-30 04:21:28 -04:00
using Continentis.Mods.Basic.Buffs;
2025-10-23 00:49:44 -04:00
using SLSFramework.General;
using UnityEngine;
namespace Continentis.Mods.Basic.Cards
{
2025-10-30 04:21:28 -04:00
public class Cover : CardLogicBase
2025-10-23 00:49:44 -04:00
{
protected override void SetUpLogicComponents()
{
AddLogicComponent<CardLogicComponent_Defense>();
2025-10-30 04:21:28 -04:00
AddLogicComponent<CardLogicComponent_Protect>();
2025-10-23 00:49:44 -04:00
}
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
{
2025-10-30 04:21:28 -04:00
CommandGroup mainGroup = TargetListCommandGroup(targetList,
2025-10-23 00:49:44 -04:00
new Cmd_PlayAnimation(user.characterView, "Skill"),
2025-10-30 04:21:28 -04:00
new Cmd_Function(() => user.AddBlock(GetAttribute("Block"))),
new Cmd_ParamFunction<CharacterBase>((target) =>
LogicComponent<CardLogicComponent_Protect>().GenerateProtection(user, target, GetAttribute("BuffCount_Protecting"))));
2025-10-23 00:49:44 -04:00
return mainGroup;
}
2025-10-30 04:21:28 -04:00
2025-10-23 00:49:44 -04:00
public override void ApplyAttributeChangesByCard()
{
LogicComponent<CardLogicComponent_Defense>().SetBlock_Fortitude();
}
}
}