Warrior_110550.cs 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. using CommonAI.Zone;
  2. using CommonAI.Zone.Helper;
  3. using CommonAI.Zone.Instance;
  4. using XmdsCommon.Plugin;
  5. using XmdsCommonServer.Plugin;
  6. using XmdsCommonServer.XLS.Data;
  7. using XmdsCommonSkill.Plugin.Buffs;
  8. namespace XmdsCommonSkill.Plugin.Skills.Warrior
  9. {
  10. /// <summary>
  11. /// 五技能 5-5(烈焰风暴释放期间,移动速度提高n%,妖兽免伤上升n% 。)
  12. /// </summary>
  13. public class Warrior_110550 : Warrior_110540
  14. {
  15. private static readonly int ID = 110550;
  16. //减伤比例提升, 妖兽免伤
  17. protected XmdsSkillValue mValueSet3;
  18. private static readonly int Buff_ID_5_5 = (int)XmdsBuffBase.XmdsBuffList.IGNORCTRL_AND_SPPEDCHG; // 剑刃风暴,免控buf
  19. public override int SkillID { get { return ID; } }
  20. protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
  21. {
  22. base.OnInit(info, unit, ref template);
  23. // 释放剑刃风暴获得buff
  24. var pack1 = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_ID_5_5);
  25. var buff = (XmdsBuff_IgnorCtrlAndSpeedChg)pack1.GetXmdsBuff(0);
  26. buff.speedChange = mValueSet3.GetValue(info.TalentSkillLevel2, 1); //移速提高万分之N
  27. //怪物免伤
  28. var buff2 = pack1.GetXmdsBuff(1) as XmdsBuff_PropChange;
  29. buff2.CurentChangeType = XmdsVirtual.UnitAttributeType.MonsterDamageReduce;
  30. buff2.CurrentValue = mValueSet3.GetValue(info.TalentSkillLevel2, 2);
  31. buff2.IsPercent = true;
  32. var bt1 = pack1.mBuffTemplate;
  33. bt1.IsHarmful = true;
  34. bt1.LifeTimeMS = DAMAGE_SPELL_TIME; //时间由spell确定,所以写死
  35. pack1.BindTemplateAndDispose();
  36. unit.RegistSendBuff(bt1);
  37. }
  38. protected override void OnSkillDataChange(GameSkill gs, XmdsVirtual unit)
  39. {
  40. base.OnSkillDataChange(gs, unit);
  41. var buff1 = unit.GetRegisBuffVirtual(Buff_ID_5_5, 0) as XmdsBuff_IgnorCtrlAndSpeedChg;
  42. buff1.speedChange = mValueSet3.GetValue(gs.TalentSkillLevel2, 1);
  43. var buff2 = unit.GetRegisBuffVirtual(Buff_ID_5_5, 1) as XmdsBuff_PropChange;
  44. buff2.CurrentValue = mValueSet3.GetValue(gs.TalentSkillLevel2, 2);
  45. }
  46. protected override void OnInitConfig()
  47. {
  48. XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
  49. InitData(data, out mJuQiValue, XmdsSkillData.XmdsSkillDataKey.DmgRate);
  50. InitData(data, out mValueSet1, XmdsSkillData.XmdsSkillDataKey.ValueSet);
  51. InitData(data, out mValueSet3, XmdsSkillData.XmdsSkillDataKey.ValueSet3);
  52. //扩展配置
  53. InitData(data, out mValueSet5, XmdsSkillData.XmdsSkillDataKey.ValueSet5);
  54. InitData(data, out mValueSet6, XmdsSkillData.XmdsSkillDataKey.ValueSet6);
  55. InitData(data, out mValueSet8, XmdsSkillData.XmdsSkillDataKey.ValueSet8);
  56. }
  57. }
  58. }