到IronWall
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Character;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Buffs
|
||||
{
|
||||
public class Withstand : CharacterCombatBuffBase
|
||||
{
|
||||
public Withstand(int stack)
|
||||
{
|
||||
Initialize(BuffType.Positive, 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.onActionEnd.Add("Withstand", new EventUnit(() =>
|
||||
{
|
||||
attachedCharacter.AddBlock(this.unitedStackSubmodule.stackAmount, false);
|
||||
}));
|
||||
}
|
||||
|
||||
public override bool OnBuffApply(out CharacterCombatBuffBase existingBuff)
|
||||
{
|
||||
MainGameManager.Instance.basePrefabs.GenerateInfoText(contentSubmodule.displayName, attachedCharacter.characterView);
|
||||
|
||||
if (FindExistingSameBuff(out existingBuff))
|
||||
{
|
||||
existingBuff.unitedStackSubmodule.AddStack(this.unitedStackSubmodule.stackAmount);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f3ab0c664289dcf47ac75d37cfa8b474
|
||||
Reference in New Issue
Block a user