S110001.cs 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. using CombatLibrary.CombatLibrary.CombatCore.CustomizeTimeLogic.FxLogic;
  2. using GameLogic.Combat.CombatTool;
  3. using GameLogic.Combat.Hero;
  4. using UTool.CustomizeTimeLogic.FxLogic.TimeLineEventinterface;
  5. namespace GameLogic.Combat.Skill
  6. {
  7. /// <summary>
  8. /// 大蛇第一个技能,对敌人照成伤害,并将敌人击退一段距离
  9. /// </summary>
  10. public class S110001 : SkillBasic
  11. {
  12. private float _harm;
  13. protected override void ProInitSkill()
  14. {
  15. _harm = SelfSkillConfig.effectValue[0];
  16. }
  17. protected override void ProUseSkill()
  18. {
  19. ActivationTimeLineData("sk1");
  20. }
  21. protected override ILifetCycleHitPoint[] ProGetTineLineTargetEntity(
  22. TimeLineEventLogicBasic timeLineEventLogicBasic)
  23. {
  24. ILifetCycleHitPoint[] lifetCycleHitPoints = new ILifetCycleHitPoint[_enterAlertTarget.Count];
  25. for (int i = 0; i < _enterAlertTarget.Count; i++)
  26. {
  27. CombatHeroHitPoint combatHeroHitPoint = _enterAlertTarget[i].GetMainHotPoin<CombatHeroHitPoint>();
  28. lifetCycleHitPoints[i] = combatHeroHitPoint;
  29. }
  30. return lifetCycleHitPoints;
  31. }
  32. protected override void ProDefaultTimeLineTrigger(string groupName, CombatHeroHitPoint targetEntity,
  33. ITimelineFxLogic timelineFxLogic,
  34. TriggerData triggerData)
  35. {
  36. for (int i = 0; i < _enterAlertTarget.Count; i++)
  37. {
  38. long v = CombatCalculateTool.Instance.GetVlaueRatioForLong(
  39. CombatHeroEntity.CurrCombatHeroInfo.attack.Value,
  40. _harm);
  41. CombatHeroHitPoint combatHeroHitPoint = _enterAlertTarget[i].GetMainHotPoin<CombatHeroHitPoint>();
  42. HarmReturnInfo harmReturnInfo = Harm(CombatHeroEntity, combatHeroHitPoint,
  43. v, AttType.Skill, triggerData);
  44. }
  45. }
  46. public override bool IsCanUse()
  47. {
  48. int odds = CombatCalculateTool.Instance.GetOdd();
  49. if (odds < 50)
  50. {
  51. return true;
  52. }
  53. SkillCd = SkillMaxCd;
  54. return false;
  55. }
  56. }
  57. }