GlobalInterface.ts 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /** @format */
  2. import {card, equip, hero, idNum, popGiftInfo} from '../proto/typedef'
  3. import {IRoleConfig} from '../config/RoleConfig'
  4. import {PREFAB_TYPE} from '../enums/Enum'
  5. import {ICardSkillConfig} from '../config/CardSkillConfig'
  6. import {ICardConsumeConfig} from '../config/CardConsumeConfig'
  7. import {IArmorConfig} from '../config/ArmorConfig'
  8. import {ICastleSkillConfig} from '../config/CastleSkillConfig'
  9. /** @format */
  10. //角色基础属性
  11. export interface IBaseAttr {
  12. HP: number
  13. attack: number
  14. spellAttack: number
  15. realAttack: number
  16. defense: number
  17. spellDefense: number
  18. attackCrit: number
  19. critNum: number
  20. hit: number
  21. dodge: number
  22. attackSpeed: number
  23. moveSpeed: number
  24. }
  25. export interface IRole extends IBaseAttr {
  26. cfg: IRoleConfig
  27. hero: hero
  28. grade: number
  29. power: number
  30. isAlter: boolean
  31. equips: IEquip[]
  32. }
  33. export interface ICard extends IBaseAttr {
  34. cfg: ICardSkillConfig
  35. card: card
  36. grade: number
  37. power: number
  38. debrisCfg: ICardConsumeConfig
  39. }
  40. export interface ICardDebris {
  41. cfg: ICardConsumeConfig
  42. num: number
  43. id: number
  44. }
  45. export interface IEquip extends IBaseAttr {
  46. cfg: IArmorConfig
  47. equip: equip
  48. grade: number
  49. power: number
  50. }
  51. export interface ICastleSkill extends IBaseAttr {
  52. cfg: ICastleSkillConfig
  53. lv: number
  54. isUse: boolean
  55. }
  56. //道具需求
  57. export interface needIdNum extends idNum {
  58. need: number
  59. }
  60. //道具检测
  61. export interface IOperateNeed {
  62. need: needIdNum[]
  63. canUp: boolean
  64. isMax: boolean
  65. }
  66. export interface IGoodShowInfo {
  67. id: number
  68. quality: number
  69. iconUrl: string
  70. grade: number
  71. stacking: boolean
  72. isDebris: boolean
  73. name: string
  74. goodType: PREFAB_TYPE
  75. }
  76. export interface ITimeGift extends popGiftInfo {
  77. isPop?: boolean
  78. }
  79. export interface IAdStatus {
  80. time: number
  81. min: string
  82. sec: string
  83. isZero: boolean
  84. inTime: boolean
  85. dailyTimes: number
  86. }
  87. export interface IServer {
  88. server_id: number
  89. server_name: string
  90. ip: string
  91. port: string
  92. url: string
  93. state: number
  94. create: boolean
  95. }
  96. export type ExtractUFromT<T, U> = {
  97. [K in keyof T & keyof U]: T[K]
  98. }