26 lines
733 B
C#
26 lines
733 B
C#
using UnityEngine;
|
|
namespace Gameplay.Buff
|
|
{
|
|
public class BuffSpecialAddShield1 : BaseBuff
|
|
{
|
|
|
|
protected override void _OnTrigger()
|
|
{
|
|
base._OnTrigger();
|
|
|
|
// 【固定值,攻击力系数,每有一个负面buff增强】
|
|
var fixValue = _TryGetFloatParam(0);
|
|
var rateAttack = _TryGetFloatParam(1);
|
|
var rateBuff = _TryGetFloatParam(2);
|
|
|
|
var totalDBuffCount = owner.buffManager.GetDebuffCount();
|
|
|
|
var finalValue = Mathf.FloorToInt(fixValue + rateAttack * owner.fightData.attack + rateBuff * totalDBuffCount);
|
|
|
|
owner.RecoverShield(finalValue, true);
|
|
|
|
}
|
|
|
|
}
|
|
}
|