Files
Continentis/Assets/Mods/Basic/Characters/CombatBuffs/General/Consolidate.cs
SoulliesOfficial 4c7e5c397b 五张牌!
2025-10-30 04:21:28 -04:00

37 lines
1.3 KiB
C#

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, false)
.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;
}
}
}