43 lines
1.5 KiB
C#
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();
|
|
}
|
|
}
|
|
} |