b_1005.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using Common.Utility.CombatEvent;
  2. using Fort23.Core;
  3. using GameLogic.Combat.CombatTool;
  4. using GameLogic.Player;
  5. namespace GameLogic.Combat.Buff
  6. {
  7. /// <summary>
  8. /// 灼热:每秒对敌人照成火属性灼烧伤害。5层后对敌人照成火系伤势+1。水洗功法能清除1层
  9. /// </summary>
  10. public class b_1005 : BuffBasic
  11. {
  12. private float _time;
  13. protected override void ProInit()
  14. {
  15. CombatEventManager.Instance.AddEventListener(CombatEventType.AddUseGongFa, AddUseGongFa);
  16. }
  17. protected override void ProUpdate(float t)
  18. {
  19. _time += t;
  20. if (_time >= 1)
  21. {
  22. _time -= t;
  23. float harmbl = buffCount * buffInf.BuffConfig.effectValue[0];
  24. long harm = CombatCalculateTool.Instance.GetVlaueRatioForLong(
  25. source.CurrCombatHeroInfo.attack.Value, harmbl);
  26. CombatCalculateTool.Instance.Harm(source, combatHeroEntity, harm, AttType.Buff, _triggerData,
  27. WuXingType.Fire);
  28. }
  29. }
  30. private void AddUseGongFa(IEventData eventData)
  31. {
  32. AddUseGongFaEventData data = (AddUseGongFaEventData)eventData;
  33. if (data.SkillBasic.CombatHeroEntity == combatHeroEntity)
  34. {
  35. switch (data.SkillBasic.wuXingType)
  36. {
  37. case WuXingType.Water:
  38. ReduceCount(1);
  39. break;
  40. }
  41. }
  42. }
  43. protected override void ProDormancyObj()
  44. {
  45. CombatEventManager.Instance.RemoveEventListener(CombatEventType.AddUseGongFa, AddUseGongFa);
  46. }
  47. }
  48. }