using System.Collections.Generic; using Continentis.MainGame.Card; using Continentis.MainGame.Character; using Continentis.MainGame.Combat; using Continentis.MainGame.Commands; using Continentis.Mods.Basic.Buffs; using SLSFramework.General; using UnityEngine; namespace Continentis.Mods.Basic.Cards { public class DivineSmite : CardLogicBase { public override void SetUpLogicComponents() { AddLogicComponent(); AddLogicComponent(); } public override List PlayEffect(List targetList) { CommandGroup mainGroup = TargetListCommandGroup(targetList, new Cmd_PlayAnimation(user.characterView, "Attack"), //new Cmd_PlaySFX("SFX_Basic_GeneralMeleeImpact").SetDelay(0.2f), //new Cmd_SpawnVFX("VFX_Basic_DefaultAttack").SetDelay(0.2f), new Cmd_ParamFunction(target => user.Attack(target, GetTargetedFinalDamage(target)))); foreach (CharacterBase protectTarget in CombatMainManager.Instance.characterController.GetAllAllies(user)) { Cmd_ParamFunction protectCommand = new Cmd_ParamFunction((target) => { LogicComponent().GenerateProtection(user, target, GetAttribute("BuffCount_Protecting")); }); protectCommand.selfContext.context["Target"] = protectTarget; mainGroup.AddCommand(protectCommand); } return new List { mainGroup }; } public override void ApplyAttributeChangesByCard() { LogicComponent().SetDamage_Slash(); } } }