NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/Gameplay/Buff/Impl/BuffBulletDamage6.cs

31 lines
972 B
C#
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using Gameplay.Unit.Data;
using UnityEngine;
namespace Gameplay.Buff
{
public class BuffBulletDamage6 : BaseBuff
{
protected override void _OnTrigger()
{
base._OnTrigger();
// 对指定敌人投掷单手斧造成A的士气压制若目标为人形单位额外造成B%+C点波拉攻击力的伤害
var paramA = _TryGetFloatParam(0);
var paramB = _TryGetFloatParam(1);
var paramC = _TryGetFloatParam(2);
var sender = creator;
var damageMorale = Mathf.RoundToInt(paramA);
owner.TakeMoraleDamage(damageMorale, sender);
if (owner.gameunitType == EGameUnitType.Character)
{
var finalDamage = Mathf.FloorToInt((paramC + paramB * sender.fightData.attack));
owner.TakeNormalDamage(configData.AttackPowerLevel,finalDamage, sender, false);
}
}
}
}