using Continentis.MainGame; using Continentis.MainGame.Card; using Continentis.MainGame.Character; using Continentis.MainGame.Commands; using SLSFramework.General; using System.Collections.Generic; using Unity.VisualScripting; namespace Continentis.Mods.Basic { namespace Cards.Cleric { public class DivinePunishment : CardLogicBase { protected override List PlayEffect(List targetList) { base.PlayEffect(targetList); CommandGroup mainGroup = TargetListCommandGroup(targetList, new Cmd_PlayAnimation(user.characterView, "Attack"), new Cmd_ParamFunction(0.2f, target => { user.Attack(target, GetFinalDamage(target)); })); mainGroup.AddCommand(new Cmd_Function(() => { CreateCardBuff(GetAttribute("DamageStack")).Apply(this, user, this); this.contentSubmodule.dirtyMark = true; })); return new List { mainGroup }; } } } namespace Buffs { public class DivinePunishment : CardCombatBuffBase { public DivinePunishment(int stack) { Initialize(BuffType.Positive, BuffDispelLevel.Strong); this.contentSubmodule = new ContentSubmodule(this); this.unitedStackSubmodule = new UnitedStackSubmodule(this, true, -1, stack); this.attributeSubmodule = new AttributeSubmodule(this); this.attributeSubmodule.numericChange.Add("Damage", stack); } public override bool OnBuffApply(out CardCombatBuffBase existingBuff) { if (FindExistingSameBuff(out existingBuff)) { existingBuff.unitedStackSubmodule.ModifyStack(this.unitedStackSubmodule.stackAmount); int newStack = existingBuff.unitedStackSubmodule.stackAmount; existingBuff.attributeSubmodule.numericChange["Damage"] = newStack; return false; } return true; } } } }