XmdsBuff_Immolate_MP .cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using CommonAI.Zone;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using XmdsCommonServer.Plugin;
  7. using XmdsCommonServer.Plugin.XmdsSkillTemplate.Skills;
  8. namespace XmdsCommonSkill.Plugin.Buffs
  9. {
  10. /// <summary>
  11. /// 献祭MP,扣除蓝.
  12. /// </summary>
  13. public class XmdsBuff_Immolate_MP : XmdsBuffBase
  14. {
  15. /// <summary>
  16. ///填正值为扣除MP.
  17. /// </summary>
  18. public int ChangeValue = 0;
  19. public override int GetAbilityID()
  20. {
  21. return (int)XmdsCommon.Plugin.XmdsBuffProperties.XmdsBuffAbility.Immolate_MP;
  22. }
  23. public override void CopyTo(UnitBuff other)
  24. {
  25. var ret = other as XmdsBuff_Immolate_MP;
  26. ret.ChangeValue = this.ChangeValue;
  27. base.CopyTo(other);
  28. }
  29. protected override void OnBindTemplate(ref BuffTemplate buffTemplate)
  30. {
  31. //DOT类技能首帧无效.
  32. buffTemplate.FirstTimeEnable = false;
  33. base.OnBindTemplate(ref buffTemplate);
  34. }
  35. protected override int OnBuffHit(XmdsVirtual hitter, XmdsVirtual attacker, CommonAI.Zone.Formula.AttackSource source, ref XmdsVirtual.AtkResult result)
  36. {
  37. if (ChangeValue != 0)
  38. {
  39. hitter.AddMP(-ChangeValue, attacker.mUnit);
  40. }
  41. return 0;
  42. }
  43. }
  44. }