using Common.Utility.CombatEvent; using Fort23.Core; using GameLogic.Combat.CombatTool; using GameLogic.Player; using OfficeOpenXml.FormulaParsing.Excel.Functions.Logical; namespace GameLogic.Combat.Skill { /// /// 火焰决 每层经过火经脉时使火系功法伤害提升1%,最多叠加20层 /// 跌到满层后火系功法对敌人照成的伤害都会让敌人灼烧1层 /// 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; } } } }