2026-03-20 11:56:50 -04:00
|
|
|
using System.Collections.Generic;
|
2025-11-09 23:47:10 -06:00
|
|
|
using Continentis.MainGame.Card;
|
|
|
|
|
using Continentis.MainGame.Character;
|
2025-11-11 00:09:50 -06:00
|
|
|
using Continentis.MainGame.Commands;
|
2026-04-17 12:01:50 -04:00
|
|
|
using SLSUtilities.General;
|
2025-11-09 23:47:10 -06:00
|
|
|
|
2025-11-11 23:19:52 -06:00
|
|
|
namespace Continentis.Mods.Basic.Cards.Assassin
|
2025-11-09 23:47:10 -06:00
|
|
|
{
|
|
|
|
|
public class Backstab : CardLogicBase
|
|
|
|
|
{
|
2025-11-11 00:09:50 -06:00
|
|
|
private int _sharpnessCount = 0;
|
2025-11-15 12:17:34 -05:00
|
|
|
|
2025-12-13 23:28:23 -05:00
|
|
|
public override void SetUpLogicComponents()
|
|
|
|
|
{
|
|
|
|
|
AddLogicComponent<CardLogicComponent_Attack>();
|
|
|
|
|
}
|
2026-03-20 11:56:50 -04:00
|
|
|
|
|
|
|
|
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
2025-11-09 23:47:10 -06:00
|
|
|
{
|
2026-03-20 11:56:50 -04:00
|
|
|
return ForEachTarget(targetList, target => Cmd.Parallel(
|
2025-11-11 00:09:50 -06:00
|
|
|
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
|
|
|
|
new Cmd_PlaySFX("SFX_Basic_SwordStrike"),
|
|
|
|
|
new Cmd_SpawnVFX("VFX_Basic_RedImpact"),
|
2026-03-20 11:56:50 -04:00
|
|
|
Cmd.Sequential(
|
|
|
|
|
Cmd.Do(() =>
|
2025-11-11 00:09:50 -06:00
|
|
|
{
|
2026-03-20 11:56:50 -04:00
|
|
|
_sharpnessCount = 0;
|
|
|
|
|
if (user.combatBuffSubmodule.HasBuff<Buffs.Sharpness>())
|
|
|
|
|
_sharpnessCount = user.combatBuffSubmodule.GetBuff<Buffs.Sharpness>().unitedStackSubmodule.stackAmount;
|
2026-04-01 12:23:27 -04:00
|
|
|
AttackTarget(target, GetTargetedFinalDamage(target));
|
2026-03-20 11:56:50 -04:00
|
|
|
}),
|
|
|
|
|
Cmd.Do(() =>
|
|
|
|
|
CreateCharacterBuff<Buffs.Sharpness>(_sharpnessCount).Apply(user, user, this)
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
));
|
2025-11-09 23:47:10 -06:00
|
|
|
}
|
2025-12-13 23:28:23 -05:00
|
|
|
|
|
|
|
|
public override void ApplyAttributeChangesByCard()
|
|
|
|
|
{
|
|
|
|
|
LogicComponent<CardLogicComponent_Attack>().SetDamage_Default();
|
|
|
|
|
}
|
2025-11-09 23:47:10 -06:00
|
|
|
}
|
|
|
|
|
}
|