123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- using Common.Utility.CombatEvent;
- using Fort23.Core;
- using GameLogic.Combat.CombatTool;
- using GameLogic.Player;
- namespace GameLogic.Combat.Buff
- {
- /// <summary>
- /// 灼热:每秒对敌人照成火属性灼烧伤害。5层后对敌人照成火系伤势+1。水洗功法能清除1层
- /// </summary>
- 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 -= t;
- 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);
- }
- }
- }
|