b_1004.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using Common.Utility.CombatEvent;
  2. using Fort23.Core;
  3. using GameLogic.Player;
  4. using OfficeOpenXml.FormulaParsing.Excel.Functions.Logical;
  5. namespace GameLogic.Combat.Buff
  6. {
  7. /// <summary>
  8. /// 4、噬魂:敌人每使用一次功法对应功法的伤势增加1
  9. /// </summary>
  10. public class b_1004 : BuffBasic
  11. {
  12. protected override void ProInit()
  13. {
  14. CombatEventManager.Instance.AddEventListener(CombatEventType.AddUseGongFa, AddUseGongFa);
  15. }
  16. private void AddUseGongFa(IEventData eventData)
  17. {
  18. AddUseGongFaEventData data = (AddUseGongFaEventData)eventData;
  19. if (data.SkillBasic.CombatHeroEntity == combatHeroEntity)
  20. {
  21. switch (data.SkillBasic.wuXingType)
  22. {
  23. case WuXingType.Gold:
  24. combatHeroEntity.CurrCombatHeroInfo.Metal_Injury += 1;
  25. break;
  26. case WuXingType.Fire:
  27. combatHeroEntity.CurrCombatHeroInfo.Fire_Injury += 1;
  28. break;
  29. case WuXingType.Wood:
  30. combatHeroEntity.CurrCombatHeroInfo.Wood_Injury += 1;
  31. break;
  32. case WuXingType.Earth:
  33. combatHeroEntity.CurrCombatHeroInfo.Earth_Injury += 1;
  34. break;
  35. case WuXingType.Water:
  36. combatHeroEntity.CurrCombatHeroInfo.Water_Injury += 1;
  37. break;
  38. }
  39. }
  40. }
  41. protected override void ProDormancyObj()
  42. {
  43. CombatEventManager.Instance.RemoveEventListener(CombatEventType.AddUseGongFa, AddUseGongFa);
  44. }
  45. }
  46. }