using Common.Utility.CombatEvent; using Fort23.Core; using GameLogic.Combat.CombatTool; using GameLogic.Player; namespace GameLogic.Combat.Buff { /// /// 灼热:每秒对敌人照成火属性灼烧伤害。5层后对敌人照成火系伤势+1。水洗功法能清除1层 /// public class b_1005 : BuffBasic { private float _time; protected override void ProInit() { CombatEventManager.Instance.AddEventListener(CombatEventType.AddUseGongFa, AddUseGongFa); } protected override void ProUpdate(float t) { _time += t; if (_time >= 1) { _time -= 1; float harmbl = buffCount * buffInf.BuffConfig.effectValue[0]; long harm = CombatCalculateTool.Instance.GetVlaueRatioForLong( source.CurrCombatHeroInfo.attack.Value, harmbl); CombatCalculateTool.Instance.Harm(source, combatHeroEntity, harm, AttType.Buff, _triggerData, WuXingType.Fire); } } private void AddUseGongFa(IEventData eventData) { AddUseGongFaEventData data = (AddUseGongFaEventData)eventData; if (data.SkillBasic.CombatHeroEntity == combatHeroEntity) { switch (data.SkillBasic.wuXingType) { case WuXingType.Water: ReduceCount(1); break; } } } protected override void ProDormancyObj() { CombatEventManager.Instance.RemoveEventListener(CombatEventType.AddUseGongFa, AddUseGongFa); } } }