Files
Continentis/Assets/Mods/Basic/Cards/Scripts/Knight/DivineSmite.cs
SoulliesOfficial c3b1561375 更新
2026-04-01 12:23:27 -04:00

43 lines
1.5 KiB
C#

using System.Collections.Generic;
using Continentis.MainGame.Card;
using Continentis.MainGame.Character;
using Continentis.MainGame.Combat;
using Continentis.MainGame.Commands;
using SLSFramework.General;
namespace Continentis.Mods.Basic.Cards
{
public class DivineSmite : CardLogicBase
{
public override void SetUpLogicComponents()
{
AddLogicComponent<CardLogicComponent_Attack>();
AddLogicComponent<CardLogicComponent_Protect>();
}
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
{
CommandGroup mainGroup = ForEachTarget(targetList, target => Cmd.Parallel(
new Cmd_PlayAnimation(user.characterView, "Attack"),
Cmd.Do(() => AttackTarget(target, GetTargetedFinalDamage(target)))
));
List<CharacterBase> allies = CombatMainManager.Instance.characterController.GetAllAllies(user);
foreach (CharacterBase ally in allies)
{
CharacterBase captured = ally;
mainGroup.AddCommand(Cmd.Do(() =>
LogicComponent<CardLogicComponent_Protect>()
.GenerateProtection(user, captured, GetAttribute("BuffCount_Protecting"))
));
}
return mainGroup;
}
public override void ApplyAttributeChangesByCard()
{
LogicComponent<CardLogicComponent_Attack>().SetDamage_Slash();
}
}
}