Files
Continentis/Assets/Mods/Basic/Characters/CombatBuffs/Mage/ConcentratedSpellcasting.cs
2025-10-31 10:02:30 -04:00

38 lines
1.4 KiB
C#

using Continentis.MainGame;
using Continentis.MainGame.Character;
using UnityEngine;
namespace Continentis.Mods.Basic.Buffs
{
public class ConcentratedSpellcasting : CharacterCombatBuffBase
{
public ConcentratedSpellcasting(int stack)
{
Initialize(BuffType.Focusing, BuffDispelLevel.Strong);
this.contentSubmodule = new ContentSubmodule(this)
.AddParameterGetter("Stack", () => unitedStackSubmodule.stackAmount.ToString());
this.iconSubmodule = new IconSubmodule(this);
this.unitedStackSubmodule = new UnitedStackSubmodule(this, true, -1, stack, true);
this.generalAttributeSubmodule = new GeneralAttributeSubmodule(this);
this.generalAttributeSubmodule.numericChange.Add("MagicDamageDealtOffset", stack);
}
public override bool OnBuffApply(out CharacterCombatBuffBase existingBuff)
{
MainGameManager.Instance.basePrefabs.GenerateInfoText(contentSubmodule.displayName, attachedCharacter.characterView);
if (FocusingCheck(out existingBuff))
{
existingBuff.unitedStackSubmodule.PickHigherStack(this.unitedStackSubmodule);
return false;
}
return true;
}
}
}