S9054.cs 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. using CombatLibrary.CombatLibrary.CombatCore.CustomizeTimeLogic.FxLogic;
  2. using GameLogic.Combat.Buff;
  3. using GameLogic.Combat.CombatTool;
  4. using GameLogic.Combat.Hero;
  5. using UnityEngine;
  6. using UTool.CustomizeTimeLogic.FxLogic.TimeLineEventinterface;
  7. namespace GameLogic.Combat.Skill
  8. {
  9. /// <summary>
  10. /// 导电(被动)
  11. /// 每隔{0},敌人受到感电层数*{1}%的伤害
  12. /// </summary>
  13. public class S9054 : SkillBasic
  14. {
  15. protected float _currTime;
  16. protected override void ProUseSkill()
  17. {
  18. }
  19. protected override void ProDefaultTimeLineTrigger(string groupName, CombatHeroHitPoint targetEntity,
  20. ITimelineFxLogic timelineFxLogic,
  21. TriggerData triggerData, ISkillFeatures skillFeatures)
  22. {
  23. // float harmBl = 0;
  24. // b_1018 b1018 = targetEntity.combatHeroEntity.BuffControl.GetBuffBasicForType<b_1018>();
  25. // if (b1018 != null) //消耗一层感电,额外照成伤害
  26. // {
  27. // harmBl += b1018.buffCount * effectValue[1];
  28. // }
  29. //
  30. // long v = CombatCalculateTool.Instance.GetVlaueRatioForLong(CombatHeroEntity.CurrCombatHeroInfo.attack.Value,
  31. // harmBl);
  32. //
  33. // HarmReturnInfo harmReturnInfo = CombatCalculateTool.Instance.Harm(CombatHeroEntity, targetEntity, v,
  34. // AttType.Skill, triggerData,
  35. // wuXingType, skillFeatures,
  36. // HarmType.Default);
  37. }
  38. protected override void ProCombatUpdate(float time)
  39. {
  40. _currTime += time;
  41. if (_currTime >= effectValue[0])
  42. {
  43. _currTime = 0;
  44. // CombatHeroEntity[] allHero =
  45. // CombatController.currActiveCombat.CombatHeroController.GetHero(!CombatHeroEntity.IsEnemy);
  46. CombatHeroEntity targetHeroEntity = CombatHeroEntity.CombatAIBasic.currFocusTarget;
  47. if (targetHeroEntity != null)
  48. {
  49. b_1018 b1018 = targetHeroEntity.BuffControl.GetBuffBasicForType<b_1018>();
  50. if (b1018 != null)
  51. {
  52. Vector3 targetPos = targetHeroEntity.dotPos;
  53. ActivationTimeLineData("9054", customizePos: new Vector3[] { targetPos });
  54. int count = b1018.buffCount;
  55. float harmBl = count * effectValue[1];
  56. long v = CombatCalculateTool.Instance.GetVlaueRatioForLong(
  57. CombatHeroEntity.CurrCombatHeroInfo.attack.Value,
  58. harmBl);
  59. HarmReturnInfo harmReturnInfo = CombatCalculateTool.Instance.Harm(CombatHeroEntity,
  60. targetHeroEntity, v,
  61. AttType.Skill, triggerData,
  62. wuXingType, null,
  63. HarmType.Default);
  64. }
  65. }
  66. }
  67. }
  68. }
  69. }