Monster_6060803.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. 
  2. using XmdsCommonServer.XLS.Data;
  3. using XmdsCommonServer.Plugin;
  4. using XmdsCommonSkill.Plugin.Buffs;
  5. using CommonAI.Zone;
  6. using XmdsCommon.Plugin;
  7. namespace XmdsCommonSkill.Plugin.Skills.Monster
  8. {
  9. /// <summary>
  10. /// 巴拉克斯镇长 - 嘶吼: 发出嘶吼,使身边大范围内所有敌人被眩晕5秒,同时造成x%被物攻伤害和额外y点物理伤害.
  11. /// </summary>
  12. public class Monster_6060803 : XmdsSkillBase
  13. {
  14. public static int ID = 6060803;
  15. public static XmdsSkillValue DP_1;
  16. /// 眩晕.
  17. public static int Buff_ID = (int)XmdsBuffBase.XmdsBuffList.YUN_XUAN;
  18. public override int SkillID { get { return ID; } }
  19. protected override void OnSkillDamagePerEvent(BattleParams param)
  20. {
  21. int ret = CalDamagePer(DP_1, param.GameSkill.SkillLevel);
  22. param.SkillDamagePer = ret;
  23. }
  24. protected override void OnSkillLogicEvent(BattleParams param)
  25. {
  26. XmdsBuff_Stun buff = (XmdsBuff_Stun)param.Attacker.GetRegisBuffVirtual(Buff_ID);
  27. BuffTemplate bt = param.Attacker.GetRegistBuff(Buff_ID);
  28. bt.LifeTimeMS = 5000;
  29. param.Hitter.mUnit.AddBuff(Buff_ID, param.Attacker.mUnit);
  30. }
  31. protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
  32. {
  33. XmdsBuffPack pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_ID);
  34. BuffTemplate bt = pack.mBuffTemplate;
  35. bt.IsHarmful = true;
  36. pack.BindTemplateAndDispose();
  37. unit.RegistSendBuff(bt);
  38. }
  39. protected override void OnInitSkillParam()
  40. {
  41. XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
  42. InitData(data, out DP_1, XmdsSkillData.XmdsSkillDataKey.DmgRate);
  43. }
  44. }
  45. }