S1302.cs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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层毒,如果敌人毒超过{1}层,
  12. /// 则每层毒对敌人的伤害提升{2}%,并有几率施加一层噬魂
  13. /// </summary>
  14. public class S1302 : SkillBasic
  15. {
  16. private int currCount;
  17. private Vector3 startPos;
  18. private Vector3 fangXiang;
  19. protected override void ProUseSkill()
  20. {
  21. currCount = 0;
  22. ActivationTimeLineData("1302");
  23. ballisticsCount = (int)effectValue[0];
  24. for (int i = 0; i < effectValue[0]; i++)
  25. {
  26. CombatHeroHitPoint combatHeroHitPoint = CombatHeroEntity.CombatAIBasic.currFocusTarget
  27. .GetThis<CombatHeroEntity>()
  28. .GetMainHotPoin<CombatHeroHitPoint>();
  29. BetterList<ILifetCycleHitPoint> currTarget = new BetterList<ILifetCycleHitPoint>();
  30. currTarget.Add(combatHeroHitPoint);
  31. int index = Random.Range(3, 9);
  32. SpecialDotInfo specialDotInfo = CombatHeroEntity.GetSpecialDotInfo("zdpos" + index);
  33. ActivationTimeLineData("1302_fashe", currTarget: currTarget,
  34. customizePos: new Vector3[] { specialDotInfo.GetWorlPos() }, indexCount: i, startTime: i * -0.1f);
  35. }
  36. }
  37. // private void Launch()
  38. // {
  39. // CombatHeroHitPoint combatHeroHitPoint = CombatHeroEntity.CombatAIBasic.currFocusTarget
  40. // .GetThis<CombatHeroEntity>()
  41. // .GetMainHotPoin<CombatHeroHitPoint>();
  42. // BetterList<ILifetCycleHitPoint> currTarget = new BetterList<ILifetCycleHitPoint>();
  43. // currTarget.Add(combatHeroHitPoint);
  44. // // SpecialDotInfo specialDotInfo= CombatHeroEntity.GetSpecialDotInfo("zdpos" + (i + 2));
  45. // ActivationTimeLineData("duzhen_fashe", currTarget: currTarget,
  46. // customizePos: new Vector3[] { specialDotInfo.GetWorlPos() }, indexCount: i);
  47. // }
  48. protected override void ProTimelineFxLogicInit(string groupName, ITimelineFxLogic timelineFxLogic,
  49. TriggerData triggerData)
  50. {
  51. }
  52. protected override void ProDefaultTimeLineTrigger(string groupName, CombatHeroHitPoint targetEntity,
  53. ITimelineFxLogic timelineFxLogic,
  54. TriggerData triggerData, ISkillFeatures skillFeatures)
  55. {
  56. float addHarm = effectValue[1];
  57. b_1003 b1003 = targetEntity.combatHeroEntity.BuffControl.GetBuffBasicForType<b_1003>();
  58. if (b1003 != null)
  59. {
  60. addHarm += b1003.buffCount * effectValue[2];
  61. }
  62. long v = CombatCalculateTool.Instance.GetVlaueRatioForLong(CombatHeroEntity.CurrCombatHeroInfo.attack.Value,
  63. addHarm);
  64. HarmReturnInfo harmReturnInfo = CombatCalculateTool.Instance.Harm(CombatHeroEntity, targetEntity, v,
  65. AttType.Skill, triggerData,
  66. wuXingType, skillFeatures,
  67. HarmType.Default);
  68. // int odds = CombatCalculateTool.Instance.GetOdd(0, 100);
  69. if (harmReturnInfo.isHitHero)
  70. {
  71. BuffInfo buffInfo = BuffInfo.GetBuffInfo(10031, 1, this);
  72. targetEntity.combatHeroEntity.BuffControl.AddBuff(CombatHeroEntity, buffInfo);
  73. }
  74. }
  75. }
  76. }