using System.Collections.Generic; using Continentis.MainGame.Card; using Continentis.MainGame.Character; using Continentis.MainGame.Commands; using SLSFramework.General; using UnityEngine; namespace Continentis.Mods.Basic.Cards { public class ArcaneMissiles : CardLogicBase { public override void SetUpLogicComponents() { AddLogicComponent(); } public override List PlayEffect(List targetList) { base.PlayEffect(targetList); List templates = new List(); templates.Add(new Cmd_PlayAnimation(user.characterView, "Attack")); for (int i = 0; i < GetAttribute("AttackCount"); i++) //多段攻击(段数可变)情况的处理 { templates.Add(new Cmd_ParamFunction(0.4f, target => { user.Attack(target, GetTargetedFinalDamage(target)); Debug.Log("攻击命令触发"); })); } CommandGroup occupiedGroup = new CommandGroup(ExecutionMode.Sequential, new Cmd_Function(1, ()=> { CommandQueueManager.Instance.AddCommand(new Cmd_Function(() => { Debug.Log("插队指令,等待动画播放完毕"); }), false); })); CommandGroup mainGroup = TargetListCommandGroup(targetList, ExecutionMode.Sequential, ExecutionMode.Sequential, templates.ToArray()); CommandGroup finalGroup = new CommandGroup(ExecutionMode.Sequential, new Cmd_Function(()=> { Debug.Log("不插队指令"); })); CommandGroup firstGroup = new CommandGroup(ExecutionMode.Sequential, new Cmd_Function(()=> { Debug.Log("插队指令,抽牌"); }), new Cmd_DrawCards(user.deckSubmodule, 1)); firstGroup.insertAtFirst = true; return new List { occupiedGroup, mainGroup, finalGroup, firstGroup }; } public override void ApplyAttributeChangesByCard() { LogicComponent().SetDamage_Arcane(); } } }