XmdsBattleFunctionEvent_10005.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. 
  2. using CommonLang;
  3. using XmdsCommonServer.Plugin;
  4. using XmdsCommonServer.Plugin.XmdsSkillTemplate.DamageCalculator;
  5. namespace XmdsCommonSkill.Plugin.FunctionEvent
  6. {
  7. /// <summary>
  8. /// 竞技场事件:一次性回血回蓝50%.
  9. /// </summary>
  10. public class XmdsBattleFunctionEvent_10005 : XmdsBattleFunctionEventBase
  11. {
  12. public static int EventID = 10005;
  13. private readonly int BuffValue_1 = 5000; // 一次性回血量:50%.
  14. //private readonly int BuffValue_2 = 5000; // 一次性回蓝量:50%.
  15. public override int GetEventID()
  16. {
  17. return EventID;
  18. }
  19. protected override void OnTriggerEvent(XmdsVirtual target, XmdsVirtual sender)
  20. {
  21. // 回血.
  22. float p = (BuffValue_1 / XmdsDamageCalculator.PERER);
  23. int v = CUtils.CastInt(p * target.MirrorProp.MaxHP);
  24. target.AddHP(v);
  25. //// 回蓝.
  26. //p = (BuffValue_2 / XmdsDamageCalculator.PERER);
  27. //v = CUtils.CastInt(p * target.mUnit.MaxMP);
  28. //target.AddMP(v);
  29. }
  30. }
  31. }