| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 | using Common.Utility.CombatEvent;using Fort23.Core;using GameLogic.Combat.CombatTool;using GameLogic.Player;using OfficeOpenXml.FormulaParsing.Excel.Functions.Logical;namespace GameLogic.Combat.Skill{    /// <summary>    /// 火焰决 每层经过火经脉时使火系功法伤害提升1%,最多叠加20层    /// 跌到满层后火系功法对敌人照成的伤害都会让敌人灼烧1层    /// </summary>    public class S2005 : SkillBasic    {        private int _currAddCount;        private int hd = 216;        private int lastJingGuo;        protected override void ProUseSkill()        {        }        protected override void ProReplace()        {            _currAddCount = 0;            CombatEventManager.Instance.RemoveEventListener(CombatEventType.StartInjured, StartInjured);            CombatEventManager.Instance.RemoveEventListener(CombatEventType.TriggerSkillSlots, TriggerSkillSlots);                    }        protected override void ProActiveSkill()        {            // if (angle > hd)            // {            //     lastJingGuo += 360;            // }            // else            // {            //     lastJingGuo = hd;            // }            CombatEventManager.Instance.AddEventListener(CombatEventType.StartInjured, StartInjured);            CombatEventManager.Instance.AddEventListener(CombatEventType.TriggerSkillSlots, TriggerSkillSlots);        }             private void TriggerSkillSlots(IEventData iEventData)        {            TriggerSkillSlotsEventData triggerSkillSlotsEventData = iEventData as TriggerSkillSlotsEventData;            if (triggerSkillSlotsEventData.SkillBasic == this)            {                if (triggerSkillSlotsEventData.triggerType == 3)//触发到火的位置                {                    _currAddCount++;                }            }        }        private void StartInjured(IEventData iEventData)        {            StartInjuredEventData heroInjuredEventData = iEventData as StartInjuredEventData;            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;            }        }    }}
 |