GameInterface.ts 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /** @format */
  2. import {EntityIndex} from '../lib/Const'
  3. import {IBuffConfig} from '../../config/BuffConfig'
  4. import {IEntryConfig} from '../../config/EntryConfig'
  5. import {ENTRY} from '../../enums/Enum'
  6. import {idNum} from '../../proto/typedef'
  7. import {IBaseAttr} from '../../interface/GlobalInterface'
  8. import {IZumabuffConfig} from '../../config/ZumabuffConfig'
  9. /** @format */
  10. //攻击效果
  11. export interface IAttackEffect {
  12. //是否暴击
  13. isCrit: boolean
  14. //是否是背刺
  15. isBack: boolean
  16. // 溅射伤害
  17. sputter?: number
  18. }
  19. //TODO 战斗信息对象重构成继承式
  20. export interface FightInfo {
  21. //造成伤害的敌人
  22. enemy: EntityIndex
  23. //掉血量
  24. reduceHp: number
  25. //造成暴击
  26. isCritical: boolean
  27. //加血的友军
  28. friend: EntityIndex
  29. //加血量
  30. addHp: number
  31. }
  32. export interface IBuff {
  33. readonly buffCfg: IBuffConfig
  34. //倒计时
  35. countDown: number
  36. //正计时 处理一些每秒触发加血,扣血buff
  37. countUp: number
  38. // buff 修改的attr数值
  39. curAttrChangeNum: number[]
  40. //buff伤害帧完成
  41. hurtFrameCompleted: boolean
  42. //buff伤害帧次数
  43. hurtTimes: number
  44. //buff免疫某个技能次数
  45. immuneTimes: number
  46. //施放这个buff的对象的基础值
  47. createBaseAttr: IBaseAttr
  48. //buff特效数组
  49. aniEntityArr: EntityIndex[]
  50. }
  51. //攻击数值对象
  52. export interface IFightData extends IBaseAttr {
  53. //临时值
  54. nowHP?: number
  55. shieldHP?: number
  56. attackNum?: number //攻击次数
  57. killNum?: number //杀人次数
  58. curSkillHurtRate?: number //技能的增减伤比例
  59. //角色对象
  60. roleEntity?: EntityIndex
  61. //词条
  62. entryMap: Map<ENTRY, EntryObj>
  63. buffs: IBuff[]
  64. }
  65. export interface EntryObj {
  66. type: ENTRY
  67. profession: number[]
  68. num: number
  69. numArr: number[][]
  70. }