S1402.cs 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. /// 飞出{0}道巨龙,对敌人照成{1}火系伤害
  11. /// 如果敌人处于灼痛中对敌人照成胆摄,眩晕敌人2秒
  12. /// 飞龙数量+1,并对敌人施加1层灼烧
  13. ///飞龙命中目标后引发天雷,对敌人额外照成100%伤害
  14. /// </summary>
  15. public class S1402 : SkillBasic
  16. {
  17. private static int[] zdPosIndex = new int[] { 9, 8, 7, 6, 5, 4, 3, 2, 1 };
  18. protected override void ProUseSkill()
  19. {
  20. CombatHeroHitPoint combatHeroHitPoint = CombatHeroEntity.CombatAIBasic.currFocusTarget
  21. .GetThis<CombatHeroEntity>()
  22. .GetMainHotPoin<CombatHeroHitPoint>();
  23. BetterList<ILifetCycleHitPoint> currTarget = new BetterList<ILifetCycleHitPoint>();
  24. currTarget.Add(combatHeroHitPoint);
  25. ballisticsCount = (int)effectValue[0];
  26. for (int i = 0; i < effectValue[0]; i++)
  27. {
  28. float x = CombatCalculateTool.Instance.GetOdd(-100, 100);
  29. x = (x ) / 200;
  30. Vector3 pos = new Vector3(x, 0.7f, -2f);
  31. pos = CombatHeroEntity.GameObject.transform.TransformPoint(pos);
  32. // SpecialDotInfo specialDotInfo = CombatHeroEntity.GetSpecialDotInfo(pos);
  33. ActivationTimeLineData("1402_fashe", currTarget: currTarget,
  34. customizePos: new Vector3[] { pos }, indexCount: i, startTime: -0.2f * i);
  35. }
  36. ActivationTimeLineData("1402");
  37. }
  38. protected override void ProTimelineFxLogicInit(string groupName, ITimelineFxLogic timelineFxLogic,
  39. TriggerData triggerData)
  40. {
  41. }
  42. protected override void ProDefaultTimeLineTrigger(string groupName, CombatHeroHitPoint targetEntity,
  43. ITimelineFxLogic timelineFxLogic,
  44. TriggerData triggerData, ISkillFeatures skillFeatures)
  45. {
  46. long v = CombatCalculateTool.Instance.GetVlaueRatioForLong(CombatHeroEntity.CurrCombatHeroInfo.attack.Value,
  47. effectValue[1]);
  48. HarmReturnInfo harmReturnInfo = CombatCalculateTool.Instance.Harm(CombatHeroEntity, targetEntity, v,
  49. AttType.Skill, triggerData, wuXingType, skillFeatures,
  50. HarmType.Default);
  51. if (harmReturnInfo.isHitHero)
  52. {
  53. if (SelfSkillConfig.level > 1)
  54. {
  55. b_1010 b1010 = targetEntity.combatHeroEntity.BuffControl.GetBuffBasicForType<b_1010>();
  56. if (b1010 != null)
  57. {
  58. BuffInfo buffInfo = BuffInfo.GetBuffInfo(10061, effectValue[2], 1); //眩晕敌人
  59. targetEntity.combatHeroEntity.BuffControl.AddBuff(CombatHeroEntity, buffInfo);
  60. }
  61. }
  62. if (SelfSkillConfig.level > 3)
  63. {
  64. BuffInfo buffInfo = BuffInfo.GetBuffInfo(10051, 1); //试驾灼热
  65. targetEntity.combatHeroEntity.BuffControl.AddBuff(CombatHeroEntity, buffInfo);
  66. }
  67. if (SelfSkillConfig.level > 5)
  68. {
  69. long v2 = CombatCalculateTool.Instance.GetVlaueRatioForLong(
  70. CombatHeroEntity.CurrCombatHeroInfo.attack.Value,
  71. effectValue[4]);
  72. CombatCalculateTool.Instance.Harm(CombatHeroEntity, targetEntity, v2,
  73. AttType.Skill, triggerData, wuXingType, skillFeatures,
  74. HarmType.Default);
  75. }
  76. }
  77. }
  78. }
  79. }