47 lines
1.7 KiB
C#
47 lines
1.7 KiB
C#
using Continentis.MainGame.Card;
|
|
using Continentis.MainGame.Character;
|
|
using Continentis.MainGame.Commands;
|
|
using SLSFramework.General;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Continentis.Mods.Basic.Cards.Assassin
|
|
{
|
|
public class Backstab : CardLogicBase
|
|
{
|
|
private int _sharpnessCount = 0;
|
|
|
|
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 =>
|
|
{
|
|
_sharpnessCount = 0;
|
|
if (user.combatBuffSubmodule.HasBuff<Buffs.Sharpness>())
|
|
{
|
|
_sharpnessCount = user.combatBuffSubmodule.GetBuff<Buffs.Sharpness>().unitedStackSubmodule.stackAmount;
|
|
}
|
|
user.Attack(target, GetTargetedFinalDamage(target));
|
|
}),
|
|
new Cmd_ParamFunction<CharacterBase>(target =>
|
|
{
|
|
CreateCharacterBuff<Buffs.Sharpness>(_sharpnessCount).Apply(user, user, this);
|
|
}));
|
|
|
|
return new List<CommandBase> { mainGroup };
|
|
}
|
|
|
|
public override void ApplyAttributeChangesByCard()
|
|
{
|
|
LogicComponent<CardLogicComponent_Attack>().SetDamage_Default();
|
|
}
|
|
}
|
|
}
|