using Continentis.MainGame; using Continentis.MainGame.Character; using UnityEngine; namespace Continentis.Mods.Basic.Buffs { public class Consolidate : CharacterCombatBuffBase { public Consolidate(int roundCount) { Initialize(BuffType.Positive, BuffDispelLevel.Strong); this.contentSubmodule = new ContentSubmodule(this) .AddParameterGetter("Count", () => roundCountSubmodule.remainingCount.ToString()); this.iconSubmodule = new IconSubmodule(this); this.roundCountSubmodule = new CountSubmodule(this, roundCount); this.generalAttributeSubmodule = new GeneralAttributeSubmodule(this); this.generalAttributeSubmodule.numericChange.Add("KeepBlockOnActionStart", 1); } public override bool OnBuffApply(out CharacterCombatBuffBase existingBuff) { MainGameManager.Instance.basePrefabs.GenerateInfoText("Consolidate", attachedCharacter.characterView); if (FindExistingSameBuff(out existingBuff)) { existingBuff.roundCountSubmodule.AddCount(this.roundCountSubmodule.remainingCount); return false; } return true; } } }