Skill_910150.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using CommonAI.Zone;
  2. using CommonAI.Zone.Helper;
  3. using CommonAI.Zone.Instance;
  4. using System;
  5. using XmdsCommon.Plugin;
  6. using XmdsCommonServer.Plugin;
  7. using XmdsCommonServer.Plugin.XmdsSkillTemplate.Skills;
  8. using XmdsCommonServer.XLS.Data;
  9. using XmdsCommonSkill.Plugin.Buffs;
  10. using XmdsCommonSkill.Plugin.PassiveSkills.Magic;
  11. using static CommonAI.Zone.Instance.InstanceUnit;
  12. using static XmdsCommonSkill.Plugin.Buffs.XmdsBuff_SwordShadow;
  13. namespace XmdsCommonSkill.Plugin.Skills.Magic
  14. {
  15. /// <summary>
  16. /// 一次性范围控制伤害技能(新法术技能ID 可配置控制持续时间,效果类似法师4技能的压制)
  17. /// </summary>
  18. public class Skill_910150 : XmdsSkillBase
  19. {
  20. public static readonly int ID = 910150;
  21. public override int SkillID { get { return ID; } }
  22. public static XmdsSkillValue dmg; // 伤害
  23. public static XmdsSkillValue lockTime; // 沉默时间
  24. private static readonly int Buff_ID = (int)XmdsBuffBase.XmdsBuffList.COM_SLIENT;
  25. protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
  26. {
  27. // Buff修改
  28. var pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_ID);
  29. var bt = pack.mBuffTemplate;
  30. bt.LifeTimeMS = lockTime.GetValue();
  31. bt.IsHarmful = true;
  32. pack.BindTemplateAndDispose();
  33. unit.RegistSendBuff(bt);
  34. }
  35. protected override void OnSkillDamagePerEvent(BattleParams param)
  36. {
  37. param.SkillDamagePer = dmg.GetValue();
  38. }
  39. protected override void OnSkillLogicEvent(BattleParams param)
  40. {
  41. param.Hitter.mUnit.AddBuff(Buff_ID, param.Attacker.mUnit);
  42. }
  43. protected override void OnInitSkillParam()
  44. {
  45. XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
  46. InitData(data, out dmg, XmdsSkillData.XmdsSkillDataKey.DmgRate);
  47. InitData(data, out lockTime, XmdsSkillData.XmdsSkillDataKey.ValueSet);
  48. }
  49. }
  50. }