37 lines
1.3 KiB
C#
37 lines
1.3 KiB
C#
using Continentis.MainGame;
|
|
using Continentis.MainGame.Character;
|
|
using UnityEngine;
|
|
|
|
namespace Continentis.Mods.Basic.Buffs
|
|
{
|
|
public sealed class Weak : CharacterCombatBuffBase
|
|
{
|
|
public Weak(int count)
|
|
{
|
|
Initialize(BuffType.Negative, BuffDispelLevel.Basic);
|
|
|
|
this.contentSubmodule = new ContentSubmodule(this)
|
|
.AddParameterGetter("Count", () => roundFirstActionCountSubmodule.remainingCount.ToString());
|
|
|
|
this.iconSubmodule = new IconSubmodule(this);
|
|
|
|
this.roundFirstActionCountSubmodule = new CountSubmodule(this, count);
|
|
|
|
this.generalAttributeSubmodule = new GeneralAttributeSubmodule(this);
|
|
generalAttributeSubmodule.numericChange.Add("PhysicsDamageDealtMultiplier", -0.25f);
|
|
}
|
|
|
|
public override bool OnBuffApply(out CharacterCombatBuffBase existingBuff)
|
|
{
|
|
MainGameManager.Instance.basePrefabs.GenerateInfoText("Weak", attachedCharacter.characterView);
|
|
|
|
if (FindExistingSameBuff(out existingBuff))
|
|
{
|
|
existingBuff.roundFirstActionCountSubmodule.AddCount(this.roundFirstActionCountSubmodule.maximumCount);
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
}
|
|
} |