2025-10-23 00:49:44 -04:00
|
|
|
using Continentis.MainGame;
|
|
|
|
|
using Continentis.MainGame.Character;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace Continentis.Mods.Basic.Buffs
|
|
|
|
|
{
|
2025-10-24 09:11:22 -04:00
|
|
|
public class Heavy : CharacterCombatBuffBase
|
2025-10-23 00:49:44 -04:00
|
|
|
{
|
2025-10-24 09:11:22 -04:00
|
|
|
private readonly bool isAdditive;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Heavy(bool additive = false, int actionCount = 1)
|
2025-10-23 00:49:44 -04:00
|
|
|
{
|
|
|
|
|
Initialize(BuffType.Negative, BuffDispelLevel.Basic);
|
2025-10-24 09:11:22 -04:00
|
|
|
this.isAdditive = additive;
|
2025-10-23 00:49:44 -04:00
|
|
|
|
|
|
|
|
this.contentSubmodule = new ContentSubmodule(this)
|
|
|
|
|
.AddParameterGetter("Count", () => actionCountSubmodule.remainingCount.ToString());
|
|
|
|
|
|
|
|
|
|
this.iconSubmodule = new IconSubmodule(this);
|
|
|
|
|
|
2025-10-24 09:11:22 -04:00
|
|
|
this.actionCountSubmodule = new CountSubmodule(this, actionCount);
|
2025-10-23 00:49:44 -04:00
|
|
|
|
2025-10-24 09:11:22 -04:00
|
|
|
this.statusSubmodule = new StatusSubmodule(this, StatusType.Heavy);
|
2025-10-23 00:49:44 -04:00
|
|
|
}
|
|
|
|
|
|
2025-10-24 09:11:22 -04:00
|
|
|
public override bool OnBuffApply(out CharacterCombatBuffBase existingBuff)
|
2025-10-23 00:49:44 -04:00
|
|
|
{
|
2025-10-24 09:11:22 -04:00
|
|
|
MainGameManager.Instance.basePrefabs.GenerateInfoText("Heavy", attachedCharacter.characterView);
|
2025-10-23 00:49:44 -04:00
|
|
|
|
|
|
|
|
if (FindExistingSameBuff(out existingBuff))
|
|
|
|
|
{
|
2025-10-24 09:11:22 -04:00
|
|
|
if (this.isAdditive) //可叠加型状态
|
|
|
|
|
{
|
2025-10-30 04:21:28 -04:00
|
|
|
existingBuff.actionCountSubmodule.AddCount(this.actionCountSubmodule.maximumCount);
|
2025-10-24 09:11:22 -04:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 00:49:44 -04:00
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|