五张牌!
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user