47 lines
1.6 KiB
C#
47 lines
1.6 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 ExtremePain : 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));
|
|
}));
|
|
|
|
return new List<CommandBase> { mainGroup };
|
|
}
|
|
|
|
public override int GetTargetedFinalDamage(CharacterBase target, List<string> elementalTags = null)
|
|
{
|
|
var baseDamage = base.GetTargetedFinalDamage(target, elementalTags);
|
|
var extraDamage = 0;
|
|
if (target.combatBuffSubmodule.HasBuff<Buffs.Corrosion>())
|
|
{
|
|
extraDamage = target.combatBuffSubmodule.GetBuff<Buffs.Corrosion>().unitedStackSubmodule.stackAmount;
|
|
}
|
|
return baseDamage + extraDamage;
|
|
}
|
|
|
|
public override void ApplyAttributeChangesByCard()
|
|
{
|
|
LogicComponent<CardLogicComponent_Attack>().SetDamage_Default();
|
|
}
|
|
}
|
|
}
|