using Common.Utility.CombatEvent; using Fort23.Core; using GameLogic.Combat.CombatTool; using GameLogic.Player; namespace GameLogic.Combat.Skill { /// /// 火灵丹 每层经过火经脉时使火系功法伤害提升1%,最多叠加20层 /// public class S501201 : 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); } 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) { 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; } } } }