using CommonAI.Zone;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using XmdsCommonServer.Plugin;
using XmdsCommonServer.Plugin.XmdsSkillTemplate.Skills;
namespace XmdsCommonSkill.Plugin.Buffs
{
///
/// 献祭MP,扣除蓝.
///
public class XmdsBuff_Immolate_MP : XmdsBuffBase
{
///
///填正值为扣除MP.
///
public int ChangeValue = 0;
public override int GetAbilityID()
{
return (int)XmdsCommon.Plugin.XmdsBuffProperties.XmdsBuffAbility.Immolate_MP;
}
public override void CopyTo(UnitBuff other)
{
var ret = other as XmdsBuff_Immolate_MP;
ret.ChangeValue = this.ChangeValue;
base.CopyTo(other);
}
protected override void OnBindTemplate(ref BuffTemplate buffTemplate)
{
//DOT类技能首帧无效.
buffTemplate.FirstTimeEnable = false;
base.OnBindTemplate(ref buffTemplate);
}
protected override int OnBuffHit(XmdsVirtual hitter, XmdsVirtual attacker, CommonAI.Zone.Formula.AttackSource source, ref XmdsVirtual.AtkResult result)
{
if (ChangeValue != 0)
{
hitter.AddMP(-ChangeValue, attacker.mUnit);
}
return 0;
}
}
}