S9054.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using CombatLibrary.CombatLibrary.CombatCore.CustomizeTimeLogic.FxLogic;
  2. using GameLogic.Combat.Buff;
  3. using GameLogic.Combat.CombatTool;
  4. using GameLogic.Combat.Hero;
  5. using UTool.CustomizeTimeLogic.FxLogic.TimeLineEventinterface;
  6. namespace GameLogic.Combat.Skill
  7. {
  8. /// <summary>
  9. /// 导电(被动)
  10. /// 每隔{0},敌人受到感电层数*{1}%的伤害
  11. /// </summary>
  12. public class S9054 : SkillBasic
  13. {
  14. protected float _currTime;
  15. protected override void ProUseSkill()
  16. {
  17. }
  18. protected override void ProDefaultTimeLineTrigger(string groupName, CombatHeroHitPoint targetEntity,
  19. ITimelineFxLogic timelineFxLogic,
  20. TriggerData triggerData, ISkillFeatures skillFeatures)
  21. {
  22. float harmBl = 0;
  23. b_1018 b1018 = targetEntity.combatHeroEntity.BuffControl.GetBuffBasicForType<b_1018>();
  24. if (b1018 != null) //消耗一层感电,额外照成伤害
  25. {
  26. harmBl += b1018.buffCount * effectValue[1];
  27. }
  28. long v = CombatCalculateTool.Instance.GetVlaueRatioForLong(CombatHeroEntity.CurrCombatHeroInfo.attack.Value,
  29. harmBl);
  30. HarmReturnInfo harmReturnInfo = CombatCalculateTool.Instance.Harm(CombatHeroEntity, targetEntity, v,
  31. AttType.Skill, triggerData,
  32. wuXingType, skillFeatures,
  33. HarmType.Default);
  34. }
  35. protected override void ProCombatUpdate(float time)
  36. {
  37. _currTime += time;
  38. if (_currTime >= effectValue[0])
  39. {
  40. _currTime = 0;
  41. }
  42. }
  43. }
  44. }