Monster_9140403.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. 
  2. using XmdsCommonServer.XLS.Data;
  3. using XmdsCommonServer.Plugin;
  4. using XmdsCommonSkill.Plugin.Buffs;
  5. using XmdsCommonServer.Plugin.XmdsSkillTemplate.Skills;
  6. using CommonAI.Zone;
  7. using XmdsCommon.Plugin;
  8. using XmdsCommonServer.Plugin.XmdsSkillTemplate.DamageCalculator;
  9. namespace XmdsCommonSkill.Plugin.Skills.Monster
  10. {
  11. /// <summary>
  12. /// 屠夫 - 冲撞: 蓄力N秒后向目标区域冲撞造成x%物攻伤害和额外y点物理伤害,同时眩晕N秒.
  13. /// </summary>
  14. public class Monster_9140403 : XmdsSkillBase
  15. {
  16. public static int ID = 9140403;
  17. public static XmdsSkillValue DP_1;
  18. public static int Buff_ID = (int)XmdsBuffBase.XmdsBuffList.YUN_XUAN;
  19. public override int SkillID { get { return ID; } }
  20. protected override void OnSkillDamagePerEvent(BattleParams param)
  21. {
  22. int ret = CalDamagePer(DP_1, param.GameSkill.SkillLevel);
  23. param.SkillDamagePer = ret;
  24. }
  25. protected override void OnSkillLogicEvent(BattleParams param)
  26. {
  27. int lv = param.GameSkill.SkillLevel;
  28. BuffTemplate bt = param.Attacker.GetRegistBuff(Buff_ID);
  29. bt.LifeTimeMS = 5000;
  30. bt.IsHarmful = true;
  31. param.Hitter.mUnit.AddBuff(Buff_ID, param.Attacker.mUnit);
  32. }
  33. protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
  34. {
  35. XmdsBuffPack pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_ID);
  36. BuffTemplate bt = pack.mBuffTemplate;
  37. pack.BindTemplateAndDispose();
  38. unit.RegistSendBuff(bt);
  39. }
  40. protected override void OnInitSkillParam()
  41. {
  42. XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
  43. InitData(data, out DP_1, XmdsSkillData.XmdsSkillDataKey.DmgRate);
  44. }
  45. }
  46. }