Files
Continentis/Assets/Mods/Basic/Cards/Scripts/Mage/ArcaneMissiles.cs
SoulliesOfficial d09b58fd80 架构大更
2026-03-20 11:56:50 -04:00

57 lines
2.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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<CardLogicComponent_Attack>();
}
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
{
// 多段攻击先等1秒占位再对每个目标依次连续打多段
CommandGroup occupiedGroup = Cmd.Sequential(
Cmd.After(1f, () =>
CommandQueueManager.Instance.AddCommand(Cmd.Do(() =>
Debug.Log("插队指令,等待动画播放完毕")))
)
);
CommandGroup mainGroup = ForEachTarget(targetList, target =>
{
CommandGroup perTargetGroup = Cmd.Sequential(new Cmd_PlayAnimation(user.characterView, "Attack"));
int attackCount = GetAttribute("AttackCount");
for (int i = 0; i < attackCount; i++)
{
perTargetGroup.AddCommand(Cmd.After(0.4f, () =>
{
user.Attack(target, GetTargetedFinalDamage(target));
Debug.Log("攻击命令触发");
}));
}
return perTargetGroup;
});
CommandGroup finalGroup = Cmd.Sequential(Cmd.Do(() => Debug.Log("不插队指令")));
CommandGroup firstGroup = Cmd.Sequential(
Cmd.Do(() => Debug.Log("插队指令,抽牌")),
new Cmd_DrawCards(user.deckSubmodule, 1)
);
return Cmd.Sequential(occupiedGroup, mainGroup, finalGroup, firstGroup);
}
public override void ApplyAttributeChangesByCard()
{
LogicComponent<CardLogicComponent_Attack>().SetDamage_Arcane();
}
}
}