38 lines
1.3 KiB
C#
38 lines
1.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 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))));
|
|
}
|
|
|
|
CommandGroup mainGroup = TargetListCommandGroup(targetList, ExecutionMode.Sequential, ExecutionMode.Sequential, templates.ToArray());
|
|
|
|
return mainGroup;
|
|
}
|
|
|
|
public override void ApplyAttributeChangesByCard()
|
|
{
|
|
LogicComponent<CardLogicComponent_Attack>().SetDamage_Arcane();
|
|
}
|
|
}
|
|
} |