Monster_10510402.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using CommonAI.Zone;
  2. using XmdsCommon.Plugin;
  3. using XmdsCommonServer.Plugin;
  4. using XmdsCommonSkill.Plugin.Buffs;
  5. using XmdsCommonServer.XLS.Data;
  6. namespace XmdsCommonSkill.Plugin.Skills.Monster
  7. {
  8. // 维希度斯 - 地面震击:震击地面,对身边N米所有敌人造成x%倍物攻伤害和额外y点物理伤害,并使他们被眩晕3秒.
  9. public class Monster_10510402 : XmdsSkillBase
  10. {
  11. public static int ID = 10510402;
  12. public static XmdsSkillValue DP_1;
  13. public static int Buff_1 = (int)XmdsBuffBase.XmdsBuffList.YUN_XUAN; // 眩晕.
  14. public override int SkillID { get { return ID; } }
  15. protected override void OnSkillDamagePerEvent(BattleParams param)
  16. {
  17. int ret = CalDamagePer(DP_1, param.GameSkill.SkillLevel);
  18. param.SkillDamagePer = ret;
  19. }
  20. protected override void OnSkillLogicEvent(BattleParams param)
  21. {
  22. BuffTemplate bt = param.Attacker.GetRegistBuff(Buff_1);
  23. bt.LifeTimeMS = 5000;
  24. bt.IsHarmful = true;
  25. // 被撞到的人眩晕.
  26. param.Hitter.mUnit.AddBuff(Buff_1, param.Attacker.mUnit);
  27. }
  28. /// <summary>
  29. /// 初始化.
  30. /// </summary>
  31. /// <param name="info"></param>
  32. /// <param name="unit"></param>
  33. /// <param name="template"></param>
  34. protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
  35. {
  36. //技能初始化,常用作为修改BUFF能力等等.
  37. XmdsBuffPack pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_1);
  38. BuffTemplate bt = pack.mBuffTemplate;
  39. pack.BindTemplateAndDispose();
  40. unit.RegistSendBuff(bt);
  41. }
  42. protected override void OnInitSkillParam()
  43. {
  44. XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
  45. InitData(data, out DP_1, XmdsSkillData.XmdsSkillDataKey.DmgRate);
  46. }
  47. }
  48. }