b_1005.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. /// 灼热:每秒对敌人照成火属性灼烧伤害,满层后敌人获得灼痛,有灼痛时不在获得
  9. /// </summary>
  10. public class b_1005 : BuffBasic
  11. {
  12. private float _time;
  13. protected override void ProInit()
  14. {
  15. }
  16. protected override void ProUpdate(float t)
  17. {
  18. _time += t;
  19. if (_time >= 1)
  20. {
  21. _time -= 1;
  22. float harmbl = buffCount * buffInf.BuffConfig.effectValue[0];
  23. long harm = CombatCalculateTool.Instance.GetVlaueRatioForLong(
  24. source.CurrCombatHeroInfo.attack.Value, harmbl);
  25. harm += CombatCalculateTool.Instance.GetVlaueRatioForLong(
  26. harm, source.CurrCombatHeroInfo.Fire_Proficient);
  27. CombatCalculateTool.Instance.Harm(source, combatHeroEntity, harm, AttType.Buff, _triggerData,
  28. WuXingType.Fire, null, HarmType.Buff);
  29. }
  30. }
  31. protected override void ProUpdateEffect()
  32. {
  33. if (buffCount >= buffInf.BuffConfig.overlayCount) //最大叠加数量
  34. {
  35. b_1010 b1010 = combatHeroEntity.BuffControl.GetBuffBasicForType<b_1010>();
  36. if (b1010 != null)
  37. {
  38. return;
  39. }
  40. BuffInfo buffInfo = BuffInfo.GetBuffInfo(10101, 1);
  41. combatHeroEntity.BuffControl.AddBuff(source, buffInfo);
  42. // combatHeroEntity.BuffControl.RemoveBuff(this);
  43. }
  44. }
  45. protected override void ProDormancyObj()
  46. {
  47. }
  48. }
  49. }