S1402.cs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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 > 3)
  54. {
  55. BuffInfo buffInfo = BuffInfo.GetBuffInfo(10051, 1, this); //试驾灼热
  56. targetEntity.combatHeroEntity.BuffControl.AddBuff(CombatHeroEntity, buffInfo);
  57. }
  58. if (SelfSkillConfig.level > 1)
  59. {
  60. b_1005 b1010 = targetEntity.combatHeroEntity.BuffControl.GetBuffBasicForType<b_1005>();
  61. if (b1010 != null)
  62. {
  63. int odd = CombatCalculateTool.Instance.GetOdd(0, 100);
  64. int currOdd = (int)(b1010.buffCount * effectValue[2]);
  65. if (currOdd <= odd)
  66. {
  67. BuffInfo buffInfo = BuffInfo.GetBuffInfo(10061, effectValue[3], 1, this); //眩晕敌人
  68. targetEntity.combatHeroEntity.BuffControl.AddBuff(CombatHeroEntity, buffInfo);
  69. }
  70. }
  71. }
  72. if (SelfSkillConfig.level > 5)
  73. {
  74. long v2 = CombatCalculateTool.Instance.GetVlaueRatioForLong(
  75. CombatHeroEntity.CurrCombatHeroInfo.attack.Value,
  76. effectValue[4]);
  77. CombatCalculateTool.Instance.Harm(CombatHeroEntity, targetEntity, v2,
  78. AttType.Skill, triggerData, wuXingType, skillFeatures,
  79. HarmType.Default);
  80. }
  81. }
  82. }
  83. }
  84. }