2025-10-30 04:21:28 -04:00
|
|
|
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);
|
|
|
|
|
|
2025-10-31 10:02:30 -04:00
|
|
|
this.contentSubmodule = new ContentSubmodule(this)
|
2025-10-30 04:21:28 -04:00
|
|
|
.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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|