12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- 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
- {
- /// <summary>
- /// 献祭MP,扣除蓝.
- /// </summary>
- public class XmdsBuff_Immolate_MP : XmdsBuffBase
- {
- /// <summary>
- ///填正值为扣除MP.
- /// </summary>
- 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;
- }
- }
- }
|