继续
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Combat;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Buffs
|
||||
{
|
||||
public class GuardianAura : CharacterCombatBuffBase
|
||||
{
|
||||
public GuardianAura(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, stack);
|
||||
|
||||
this.eventSubmodule = new EventSubmodule(this);
|
||||
this.eventSubmodule.onActionStart.Add("GuardianAura", new EventUnit(() =>
|
||||
{
|
||||
CombatMainManager.Instance.characterController.playerHeroes.ForEach(hero =>
|
||||
{
|
||||
hero.AddBlock(this.unitedStackSubmodule.stackAmount, false);
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
public override bool OnBuffApply(out CharacterCombatBuffBase existingBuff)
|
||||
{
|
||||
MainGameManager.Instance.basePrefabs.GenerateInfoText(contentSubmodule.displayName, attachedCharacter.characterView);
|
||||
|
||||
if (FocusingCheck(out existingBuff))
|
||||
{
|
||||
existingBuff.unitedStackSubmodule.PickHigherStack(this.unitedStackSubmodule.stackAmount);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fd3b89d41b8c03f48a7226ff11d2f74a
|
||||
Reference in New Issue
Block a user