GameInterface.ts 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. //角色对象
  59. roleEntity?: EntityIndex
  60. //词条
  61. entryMap: Map<ENTRY, EntryObj>
  62. buffs: IBuff[]
  63. }
  64. export interface EntryObj {
  65. type: ENTRY
  66. profession: number[]
  67. num: number
  68. numArr: number[][]
  69. }