45 lines
1.6 KiB
C#
45 lines
1.6 KiB
C#
using System.Collections.Generic;
|
|
using Continentis.MainGame.Card;
|
|
using Continentis.MainGame.Character;
|
|
using Continentis.MainGame.Commands;
|
|
using SLSUtilities.General;
|
|
|
|
namespace Continentis.Mods.Basic.Cards.Assassin
|
|
{
|
|
public class Backstab : CardLogicBase
|
|
{
|
|
private int _sharpnessCount = 0;
|
|
|
|
public override void SetUpLogicComponents()
|
|
{
|
|
AddLogicComponent<CardLogicComponent_Attack>();
|
|
}
|
|
|
|
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
|
{
|
|
return ForEachTarget(targetList, target => Cmd.Parallel(
|
|
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
|
new Cmd_PlaySFX("SFX_Basic_SwordStrike"),
|
|
new Cmd_SpawnVFX("VFX_Basic_RedImpact"),
|
|
Cmd.Sequential(
|
|
Cmd.Do(() =>
|
|
{
|
|
_sharpnessCount = 0;
|
|
if (user.combatBuffSubmodule.HasBuff<Buffs.Sharpness>())
|
|
_sharpnessCount = user.combatBuffSubmodule.GetBuff<Buffs.Sharpness>().unitedStackSubmodule.stackAmount;
|
|
AttackTarget(target, GetTargetedFinalDamage(target));
|
|
}),
|
|
Cmd.Do(() =>
|
|
CreateCharacterBuff<Buffs.Sharpness>(_sharpnessCount).Apply(user, user, this)
|
|
)
|
|
)
|
|
));
|
|
}
|
|
|
|
public override void ApplyAttributeChangesByCard()
|
|
{
|
|
LogicComponent<CardLogicComponent_Attack>().SetDamage_Default();
|
|
}
|
|
}
|
|
}
|