Monster_605053.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using CommonAI.Zone;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using XmdsCommon.Plugin;
  7. using XmdsCommonServer.Plugin;
  8. using XmdsCommonServer.XLS.Data;
  9. using XmdsCommonSkill.Plugin.Buffs;
  10. namespace XmdsCommonSkill.Plugin.Skills.Monster
  11. {
  12. class Monster_605053 : XmdsSkillBase
  13. {
  14. public static int ID = 605053;
  15. public static XmdsSkillValue DP_1;
  16. public static int Buff_ID = (int)XmdsBuffBase.XmdsBuffList.YUN_XUAN;
  17. public override int SkillID { get { return ID; } }
  18. protected override void OnSkillDamagePerEvent(BattleParams param)
  19. {
  20. int ret = CalDamagePer(DP_1, param.GameSkill.SkillLevel);
  21. param.SkillDamagePer = ret;
  22. }
  23. protected override void OnSkillLogicEvent(BattleParams param)
  24. {
  25. XmdsBuff_Stun buff = (XmdsBuff_Stun)param.Attacker.GetRegisBuffVirtual(Buff_ID);
  26. BuffTemplate bt = param.Attacker.GetRegistBuff(Buff_ID);
  27. bt.LifeTimeMS = 5000;
  28. param.Hitter.mUnit.AddBuff(Buff_ID, param.Attacker.mUnit);
  29. }
  30. protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
  31. {
  32. XmdsBuffPack pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_ID);
  33. BuffTemplate bt = pack.mBuffTemplate;
  34. bt.IsHarmful = true;
  35. pack.BindTemplateAndDispose();
  36. unit.RegistSendBuff(bt);
  37. }
  38. protected override void OnInitSkillParam()
  39. {
  40. XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
  41. InitData(data, out DP_1, XmdsSkillData.XmdsSkillDataKey.DmgRate);
  42. }
  43. }
  44. }