S2008.cs 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using CombatLibrary.CombatLibrary.CombatCore.CustomizeTimeLogic.FxLogic;
  2. using Common.Utility.CombatEvent;
  3. using Fort23.Core;
  4. using GameLogic.Combat.CombatTool;
  5. using GameLogic.Combat.Hero;
  6. using UnityEngine;
  7. using UTool.CustomizeTimeLogic.FxLogic.TimeLineEventinterface;
  8. namespace GameLogic.Combat.Skill
  9. {
  10. /// <summary>
  11. /// 太虚剑意 后方槽位如果是剑功法,在释放功法时额外释放一道剑气,对敌人照成100%伤害,并无视护盾类效果
  12. /// </summary>
  13. public class S2008 : SkillBasic
  14. {
  15. protected override void ProUseSkill()
  16. {
  17. }
  18. protected override void ProReplace()
  19. {
  20. CombatEventManager.Instance.RemoveEventListener(CombatEventType.UseSkill, UseSkill);
  21. }
  22. protected override void ProActiveSkill()
  23. {
  24. CombatEventManager.Instance.AddEventListener(CombatEventType.UseSkill, UseSkill);
  25. }
  26. private void UseSkill(IEventData iEventData)
  27. {
  28. CombatUseSkillEventData combatUseSkillEventData = iEventData as CombatUseSkillEventData;
  29. if (IsPassiveActivateSkill(combatUseSkillEventData.useSkill))
  30. {
  31. CombatHeroHitPoint combatHeroHitPoint = CombatHeroEntity.CombatAIBasic.currFocusTarget
  32. .GetThis<CombatHeroEntity>()
  33. .GetMainHotPoin<CombatHeroHitPoint>();
  34. BetterList<ILifetCycleHitPoint> currTarget = new BetterList<ILifetCycleHitPoint>();
  35. currTarget.Add(combatHeroHitPoint);
  36. for (int i = 0; i < effectValue[0]; i++)
  37. {
  38. SpecialDotInfo specialDotInfo = CombatHeroEntity.GetSpecialDotInfo("zdpos" + (i + 2));
  39. ActivationTimeLineData("2008", currTarget: currTarget,
  40. customizePos: new Vector3[] { specialDotInfo.GetWorlPos() }, indexCount: i);
  41. }
  42. }
  43. }
  44. protected override void ProDefaultTimeLineTrigger(string groupName, CombatHeroHitPoint targetEntity,
  45. ITimelineFxLogic timelineFxLogic,
  46. TriggerData triggerData)
  47. {
  48. float addHarm = effectValue[1];
  49. long v = CombatCalculateTool.Instance.GetVlaueRatioForLong(CombatHeroEntity.CurrCombatHeroInfo.attack.Value,
  50. addHarm);
  51. HarmReturnInfo harmReturnInfo = CombatCalculateTool.Instance.Harm(CombatHeroEntity, targetEntity, v,
  52. AttType.Skill, triggerData,
  53. wuXingType,
  54. HarmType.Default);
  55. }
  56. }
  57. }