Warrior_110140.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using CommonAI.Data;
  2. using CommonAI.Zone;
  3. using CommonAI.Zone.Formula;
  4. using CommonAI.Zone.Helper;
  5. using CommonAI.Zone.Instance;
  6. using CommonLang;
  7. using System;
  8. using XmdsCommon.Plugin;
  9. using XmdsCommonServer.Plugin;
  10. using XmdsCommonServer.Plugin.XmdsSkillTemplate.DamageCalculator;
  11. using XmdsCommonServer.XLS.Data;
  12. using XmdsCommonSkill.Plugin.Buffs;
  13. using static CommonAI.Zone.Instance.InstanceUnit;
  14. namespace XmdsCommonSkill.Plugin.Skills.Warrior
  15. {
  16. /// <summary>
  17. /// 2-1战士【1】技能 2 - 1 此技能伤害附带额外伤害(防御力系数加成)
  18. /// </summary>
  19. public class Warrior_110140 : Warrior_110100
  20. {
  21. private static readonly int ID = 110140;
  22. //附带额外伤害
  23. protected XmdsSkillValue mValueSet2;
  24. public override int SkillID { get { return ID; } }
  25. protected override void OnSkillDamagePerEvent(BattleParams param)
  26. {
  27. base.OnSkillDamagePerEvent(param);
  28. int defValue = (int)(param.Attacker.MirrorProp.Defence * XmdsUnitProp.PER * mValueSet2.GetValue(param.GameSkill.TalentSkillLevel1));
  29. param.SkillDamageAdd += Math.Max(1, XmdsDamageCalculator.GetDamage(defValue, param.Attacker, param.Hitter, param.Source));
  30. }
  31. protected override void OnInitConfig()
  32. {
  33. XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
  34. InitData(data, out mValueSet1, XmdsSkillData.XmdsSkillDataKey.ValueSet);
  35. InitData(data, out mValueSet2, XmdsSkillData.XmdsSkillDataKey.ValueSet2);
  36. // 基础扩展
  37. InitData(data, out mValueSet8, XmdsSkillData.XmdsSkillDataKey.ValueSet8);
  38. }
  39. }
  40. }