Files
Continentis/Assets/Mods/Basic/Cards/Scripts/Mage/ArcaneMissiles.cs
SoulliesOfficial 1bca620966 AttackResult修改
2025-11-08 22:22:43 -05:00

57 lines
2.3 KiB
C#

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
{
protected override void SetUpLogicComponents()
{
AddLogicComponent<CardLogicComponent_Attack>();
}
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
base.PlayEffect(targetList);
List<CommandBase> templates = new List<CommandBase>();
templates.Add(new Cmd_PlayAnimation(user.characterView, "Attack"));
for (int i = 0; i < GetAttribute("AttackCount"); i++) //多段攻击(段数可变)情况的处理
{
templates.Add(new Cmd_ParamFunction<CharacterBase>(0.4f, target =>
{
user.Attack(target, GetFinalDamage(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<CommandBase> { occupiedGroup, mainGroup, finalGroup, firstGroup };
}
public override void ApplyAttributeChangesByCard()
{
LogicComponent<CardLogicComponent_Attack>().SetDamage_Arcane();
}
}
}