38 lines
1.3 KiB
C#
38 lines
1.3 KiB
C#
using Continentis.MainGame.Card;
|
|
using Continentis.MainGame.Character;
|
|
using Continentis.MainGame.Commands;
|
|
using Continentis.Mods.Basic.Buffs;
|
|
using SLSFramework.General;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace Continentis.Mods.Basic.Cards.Assassin
|
|
{
|
|
public class CompoundPoison : CardLogicBase
|
|
{
|
|
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
|
{
|
|
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
|
new Cmd_ParamFunction<CharacterBase>(0.05f, target =>
|
|
{
|
|
CreateCharacterBuff<Weak>(GetAttribute("BuffStack_Weak")).Apply(target, user, this);
|
|
}),
|
|
|
|
new Cmd_ParamFunction<CharacterBase>(0.05f, target =>
|
|
{
|
|
var debuffCount = 0;
|
|
foreach (var buff in target.combatBuffSubmodule.buffList)
|
|
{
|
|
if (buff.buffType == MainGame.BuffType.Negative)
|
|
{
|
|
debuffCount++;
|
|
}
|
|
}
|
|
CreateCharacterBuff<Corrosion>(GetAttribute("BuffStack_Corrosion") * debuffCount).Apply(target, user, this);
|
|
})
|
|
);
|
|
return new List<CommandBase> { mainGroup };
|
|
}
|
|
}
|
|
}
|