ICombatCalculation.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. using XGame.Database;
  2. namespace FL.Battle
  3. {
  4. /// <summary>
  5. /// 战斗数值结算
  6. /// </summary>
  7. public interface ICombatCalculation
  8. {
  9. /// <summary>
  10. /// 结算伤害
  11. /// </summary>
  12. /// <param name="damage"></param>
  13. /// <param name="attackerId"></param>
  14. /// <param name="skill"></param>
  15. void Damage(int damage, long attackerId, SkillTable skill);
  16. /// <summary>
  17. /// 结算伤害
  18. /// </summary>
  19. /// <param name="damage"></param>
  20. /// <param name="elementType"></param>
  21. void Damage(int damage, EElementType elementType);
  22. /// <summary>
  23. /// 根据技能的目标类型返回技能的触发者
  24. /// 受击者调用
  25. /// </summary>
  26. /// <param name="skillId"></param>
  27. /// <param name="attacker"></param>
  28. /// <returns></returns>
  29. ICombatCalculation GetSkillTrigger(long skillId, ICombatCalculation attacker);
  30. /// <summary>
  31. /// 根据buff的目标类型返回buff的触发者
  32. /// 受击者调用
  33. /// </summary>
  34. /// <param name="buffId"></param>
  35. /// <param name="attacker"></param>
  36. /// <returns></returns>
  37. ICombatCalculation GetBuffTrigger(long buffId, ICombatCalculation attacker);
  38. /// <summary>
  39. /// 触发技能
  40. /// </summary>
  41. /// <param name="skillId"></param>
  42. /// <param name="targetId"></param>
  43. /// <param name="probability">触发概率, 默认100%触发</param>
  44. void TickSkill(long skillId, long targetId, int probability = 10000);
  45. /// <summary>
  46. /// 触发buff
  47. /// </summary>
  48. /// <param name="buffId"></param>
  49. /// <param name="probability">buff触发概率, 默认100%触发</param>
  50. /// <param name="addLayer">叠加层数,默认为1</param>
  51. /// <param name="damage">触发buff的技能伤害值</param>
  52. void TickBuff(long buffId, int probability = 10000, int addLayer = 1, int damage = 0);
  53. /// <summary>
  54. /// 攻击者触发铭文
  55. /// 只有随从有铭文
  56. /// </summary>
  57. /// <param name="targetId"></param>
  58. /// <param name="skillElementType"></param>
  59. /// <param name="damage"></param>
  60. void TickEpigraph(long targetId, EElementType skillElementType, int damage);
  61. }
  62. }