GlobalInterface.ts 2.4 KB

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