123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- using Common.Utility.CombatEvent;
- using Fort23.Core;
- using GameLogic.Combat.CombatTool;
- using GameLogic.Player;
- namespace GameLogic.Combat.Skill
- {
- /// <summary>
- /// 火灵丹 每层经过火经脉时使火系功法伤害提升1%,最多叠加20层
- /// </summary>
- public class S501201 : SkillBasic
- {
- private int _currAddCount;
- private int hd = 216;
- private int lastJingGuo;
- protected override void ProUseSkill()
- {
- }
- protected override void ProDispose()
- {
- _currAddCount = 0;
- CombatEventManager.Instance.RemoveEventListener(CombatEventType.StartInjured, StartInjured);
- }
- protected override void ProActiveSkill()
- {
- if (angle > hd)
- {
- lastJingGuo += 360;
- }
- else
- {
- lastJingGuo = hd;
- }
- CombatEventManager.Instance.AddEventListener(CombatEventType.StartInjured, StartInjured);
- }
- protected override void ProCombatUpdate(float time)
- {
- // float jd = angle % 360;
- if (angle >= lastJingGuo)
- {
- lastJingGuo += 360;
- if (_currAddCount < SelfSkillConfig.effectValue[1])
- {
- _currAddCount++;
- }
- }
- }
- private void StartInjured(IEventData iEventData)
- {
- HeroInjuredEventData heroInjuredEventData = iEventData as HeroInjuredEventData;
- if (heroInjuredEventData.HarmReturnInfo.source == CombatHeroEntity)
- {
- SkillBasic skillBasic = heroInjuredEventData.HarmReturnInfo.triggerData.Source as SkillBasic;
- if (skillBasic == null || !skillBasic.wuXingType.HasFlag(WuXingType.Fire))
- {
- return;
- }
- long addAtt = CombatCalculateTool.Instance.GetVlaueRatioForLong(heroInjuredEventData.HarmReturnInfo.att,
- SelfSkillConfig.effectValue[0] * _currAddCount);
- heroInjuredEventData.HarmReturnInfo.att += addAtt;
- }
- }
- }
- }
|