42 lines
1.4 KiB
C#
42 lines
1.4 KiB
C#
using System.Collections.Generic;
|
|
using Continentis.MainGame.Card;
|
|
using Continentis.MainGame.Character;
|
|
using Continentis.MainGame.Commands;
|
|
using Continentis.Mods.Basic.Buffs;
|
|
using SLSFramework.General;
|
|
using UnityEngine;
|
|
|
|
namespace Continentis.Mods.Basic.Cards
|
|
{
|
|
public class HeavySlash : CardLogicBase
|
|
{
|
|
public override void SetUpLogicComponents()
|
|
{
|
|
AddLogicComponent<CardLogicComponent_Attack>();
|
|
}
|
|
|
|
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
|
{
|
|
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
|
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
|
new Cmd_PlaySFX("SFX_Basic_SwordStrike"),
|
|
new Cmd_SpawnVFX("VFX_Basic_RedImpact"),
|
|
new Cmd_ParamFunction<CharacterBase>(target =>
|
|
{
|
|
user.Attack(target, GetTargetedFinalDamage(target));
|
|
})); //对目标造成伤害
|
|
|
|
mainGroup.AddCommand(new Cmd_Function(() =>
|
|
{
|
|
CreateCharacterBuff<Heavy>(false, 1).Apply(user, user, this);
|
|
})); //对使用者施加沉重状态
|
|
|
|
return new List<CommandBase> { mainGroup };
|
|
}
|
|
|
|
public override void ApplyAttributeChangesByCard()
|
|
{
|
|
LogicComponent<CardLogicComponent_Attack>().SetDamage_Slash();
|
|
}
|
|
}
|
|
} |