captainbattle 1.0.5 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (315) hide show
  1. package/dist/core/CallID.d.ts +121 -105
  2. package/dist/core/CallID.js +128 -105
  3. package/dist/core/ListenID.d.ts +503 -443
  4. package/dist/core/ListenID.js +513 -443
  5. package/dist/core/config/AccessoriesDrawCfg.d.ts +9 -0
  6. package/dist/core/config/AccessoriesDrawCfg.js +8 -0
  7. package/dist/core/config/BadgeCfg.d.ts +76 -19
  8. package/dist/core/config/BadgeCfg.js +76 -19
  9. package/dist/core/config/BountyTaskCfg.d.ts +1 -1
  10. package/dist/core/config/BuffCfg.d.ts +3 -0
  11. package/dist/core/config/BuffCfg.js +3 -0
  12. package/dist/core/config/Cfg.d.ts +224 -120
  13. package/dist/core/config/Cfg.js +251 -121
  14. package/dist/core/config/ChatChannelCfg.d.ts +8 -2
  15. package/dist/core/config/ChatChannelCfg.js +7 -1
  16. package/dist/core/config/ChatEmojiCfg.d.ts +0 -2
  17. package/dist/core/config/Const.d.ts +3 -1
  18. package/dist/core/config/Const.js +2 -0
  19. package/dist/core/config/DailyTrialMapCfg.d.ts +1 -2
  20. package/dist/core/config/EmailCfg.d.ts +13 -1
  21. package/dist/core/config/EmailCfg.js +13 -1
  22. package/dist/core/config/FirstRechargeCfg.d.ts +1 -0
  23. package/dist/core/config/FuncDescCfg.d.ts +33 -3
  24. package/dist/core/config/FuncDescCfg.js +33 -3
  25. package/dist/core/config/FusionLevelCfg.d.ts +10 -0
  26. package/dist/core/config/FusionLevelCfg.js +8 -0
  27. package/dist/core/config/GuildBonusLogCfg.d.ts +8 -0
  28. package/dist/core/config/GuildBonusLogCfg.js +8 -0
  29. package/dist/core/config/GuildBossRankRewardCfg.d.ts +2 -1
  30. package/dist/core/config/GuildConfigCfg.d.ts +1 -1
  31. package/dist/core/config/GuildConfigCfg.js +1 -1
  32. package/dist/core/config/GuildDonateCfg.d.ts +4 -2
  33. package/dist/core/config/GuildIslandBuildCfg.d.ts +16 -0
  34. package/dist/core/config/GuildIslandBuildCfg.js +8 -0
  35. package/dist/core/config/GuildIslandBuildItemCfg.d.ts +11 -0
  36. package/dist/core/config/GuildIslandBuildItemCfg.js +8 -0
  37. package/dist/core/config/GuildIslandConfigCfg.d.ts +19 -0
  38. package/dist/core/config/GuildIslandConfigCfg.js +16 -0
  39. package/dist/core/config/GuildIslandIslandCfg.d.ts +9 -0
  40. package/dist/core/config/GuildIslandIslandCfg.js +8 -0
  41. package/dist/core/config/GuildIslandRankCfg.d.ts +11 -0
  42. package/dist/core/config/GuildIslandRankCfg.js +8 -0
  43. package/dist/core/config/GuildIslandZoneCfg.d.ts +11 -0
  44. package/dist/core/config/GuildIslandZoneCfg.js +8 -0
  45. package/dist/core/config/GuildLogCfg.d.ts +1 -0
  46. package/dist/core/config/GuildLvCfg.d.ts +1 -1
  47. package/dist/core/config/InviteConfigCfg.d.ts +14 -0
  48. package/dist/core/config/InviteConfigCfg.js +11 -0
  49. package/dist/core/config/InviteRewardCfg.d.ts +9 -0
  50. package/dist/core/config/InviteRewardCfg.js +8 -0
  51. package/dist/core/config/ItemsCfg.d.ts +5 -1
  52. package/dist/core/config/ItemsCfg.js +4 -0
  53. package/dist/core/config/MarqueeContentCfg.d.ts +7 -0
  54. package/dist/core/config/MarqueeContentCfg.js +7 -1
  55. package/dist/core/config/ModAffixLvCfg.d.ts +12 -0
  56. package/dist/core/config/ModAffixLvCfg.js +8 -0
  57. package/dist/core/config/PetCfg.d.ts +0 -2
  58. package/dist/core/config/PetConfigCfg.d.ts +19 -0
  59. package/dist/core/config/PetConfigCfg.js +16 -0
  60. package/dist/core/config/PetDrawCfg.d.ts +9 -0
  61. package/dist/core/config/PetDrawCfg.js +8 -0
  62. package/dist/core/config/PetSkillCfg.d.ts +2 -1
  63. package/dist/core/config/PrivilegeCfg.d.ts +2 -0
  64. package/dist/core/config/PrivilegeCfg.js +2 -0
  65. package/dist/core/config/ProDefineCfg.d.ts +2 -0
  66. package/dist/core/config/QualityCfg.d.ts +1 -0
  67. package/dist/core/config/RelicDungeonConfigCfg.d.ts +14 -4
  68. package/dist/core/config/RelicDungeonConfigCfg.js +14 -4
  69. package/dist/core/config/RelicDungeonGrowCfg.d.ts +7 -0
  70. package/dist/core/config/RelicDungeonGrowCfg.js +8 -0
  71. package/dist/core/config/RelicDungeonLevelCfg.d.ts +4 -10
  72. package/dist/core/config/RelicDungeonRankRewardCfg.d.ts +9 -0
  73. package/dist/core/config/RelicDungeonRankRewardCfg.js +8 -0
  74. package/dist/core/config/RelicDungeonScoreCfg.d.ts +11 -0
  75. package/dist/core/config/RelicDungeonScoreCfg.js +8 -0
  76. package/dist/core/config/RelicDungeonScoreRewardCfg.d.ts +9 -0
  77. package/dist/core/config/RelicDungeonScoreRewardCfg.js +8 -0
  78. package/dist/core/config/RelicTiesCfg.d.ts +1 -0
  79. package/dist/core/config/RobotConfigCfg.d.ts +17 -0
  80. package/dist/core/config/RobotConfigCfg.js +8 -0
  81. package/dist/core/config/RoleCfg.d.ts +1 -0
  82. package/dist/core/config/RuleDescCfg.d.ts +12 -2
  83. package/dist/core/config/RuleDescCfg.js +12 -2
  84. package/dist/core/config/SeaArenaConfigCfg.d.ts +22 -0
  85. package/dist/core/config/SeaArenaConfigCfg.js +19 -0
  86. package/dist/core/config/SeaArenaRankRewardCfg.d.ts +10 -0
  87. package/dist/core/config/SeaArenaRankRewardCfg.js +8 -0
  88. package/dist/core/config/SeaArenaRobotCfg.d.ts +8 -0
  89. package/dist/core/config/SeaArenaRobotCfg.js +8 -0
  90. package/dist/core/config/SeaArenaTierCfg.d.ts +13 -0
  91. package/dist/core/config/SeaArenaTierCfg.js +8 -0
  92. package/dist/core/config/ShopCfg.d.ts +1 -0
  93. package/dist/core/config/SkillLvCfg.d.ts +10 -0
  94. package/dist/core/config/SkillLvCfg.js +8 -0
  95. package/dist/core/config/SkinSkillCfg.d.ts +2 -1
  96. package/dist/core/config/SprintActivityConfigCfg.d.ts +18 -3
  97. package/dist/core/config/SprintActivityConfigCfg.js +18 -3
  98. package/dist/core/config/StageCfg.d.ts +2 -0
  99. package/dist/core/config/TConfig.d.ts +1 -1
  100. package/dist/core/config/TConfig.js +6 -4
  101. package/dist/core/config/TalentTreeLvCfg.d.ts +1 -1
  102. package/dist/core/config/TurretFusionLevelCfg.d.ts +10 -0
  103. package/dist/core/config/TurretFusionLevelCfg.js +8 -0
  104. package/dist/core/config/TurretModAffixLvCfg.d.ts +12 -0
  105. package/dist/core/config/TurretModAffixLvCfg.js +8 -0
  106. package/dist/core/config/TurretModCfg.d.ts +20 -0
  107. package/dist/core/config/TurretModCfg.js +8 -0
  108. package/dist/core/config/TurretModConfigCfg.d.ts +20 -0
  109. package/dist/core/config/TurretModConfigCfg.js +17 -0
  110. package/dist/core/config/TurretModQualityCfg.d.ts +12 -0
  111. package/dist/core/config/TurretModQualityCfg.js +8 -0
  112. package/dist/core/config/TurretSkillLvCfg.d.ts +10 -0
  113. package/dist/core/config/TurretSkillLvCfg.js +8 -0
  114. package/dist/core/config/VehicleWashAffixCfg.d.ts +14 -0
  115. package/dist/core/config/VehicleWashAffixCfg.js +8 -0
  116. package/dist/core/config/VehicleWashLevelCfg.d.ts +6 -2
  117. package/dist/core/framework/Pool.d.ts +4 -1
  118. package/dist/core/framework/Pool.js +19 -21
  119. package/dist/core/framework/Time.js +13 -3
  120. package/dist/core/framework/Watcher.js +0 -1
  121. package/dist/core/framework/collections/MinSortList.d.ts +0 -2
  122. package/dist/core/framework/collections/MinSortList.js +9 -33
  123. package/dist/core/framework/collections/ObjectPool.js +6 -3
  124. package/dist/core/framework/notify/Notifier.d.ts +1 -1
  125. package/dist/core/framework/notify/Notifier.js +5 -4
  126. package/dist/core/framework/notify/NotifyID.d.ts +2 -1
  127. package/dist/core/framework/notify/NotifyID.js +1 -0
  128. package/dist/core/framework/notify/NotifyListener.js +35 -9
  129. package/dist/core/module/arena/ArenaBattleModule.d.ts +7 -0
  130. package/dist/core/module/arena/ArenaBattleModule.js +32 -0
  131. package/dist/core/module/arena/index.d.ts +1 -0
  132. package/dist/core/module/arena/index.js +13 -0
  133. package/dist/core/module/battle/Game.d.ts +104 -13
  134. package/dist/core/module/battle/Game.js +218 -45
  135. package/dist/core/module/battle/IGameModule.d.ts +6 -0
  136. package/dist/core/module/battle/IGameModule.js +19 -6
  137. package/dist/core/module/battle/battle.interface.d.ts +31 -7
  138. package/dist/core/module/battle/battle.interface.js +5 -1
  139. package/dist/core/module/battle/buff/BuffMgr.d.ts +25 -0
  140. package/dist/core/module/battle/buff/BuffMgr.js +43 -0
  141. package/dist/core/module/battle/buff/BuffTrigger.js +9 -1
  142. package/dist/core/module/battle/buff/buffitem/AddPhysicDamBuff.js +2 -2
  143. package/dist/core/module/battle/buff/buffitem/ChangeSetpAddDamageBuff.js +3 -2
  144. package/dist/core/module/battle/buff/buffitem/DeltaUseSkillBuff.js +3 -2
  145. package/dist/core/module/battle/buff/buffitem/DiceAddCritBuff.d.ts +8 -0
  146. package/dist/core/module/battle/buff/buffitem/DiceAddCritBuff.js +35 -0
  147. package/dist/core/module/battle/buff/buffitem/FireHurtLayerBuff.d.ts +7 -0
  148. package/dist/core/module/battle/buff/buffitem/FireHurtLayerBuff.js +28 -0
  149. package/dist/core/module/battle/buff/buffitem/ForceTargetBuff.js +2 -1
  150. package/dist/core/module/battle/buff/buffitem/HitBoundAddDamageBuff.js +1 -1
  151. package/dist/core/module/battle/buff/buffitem/HitBoundAddScaleBuff.d.ts +11 -0
  152. package/dist/core/module/battle/buff/buffitem/HitBoundAddScaleBuff.js +79 -0
  153. package/dist/core/module/battle/buff/buffitem/LinkCurseBuff.js +3 -2
  154. package/dist/core/module/battle/buff/buffitem/MonitorBuff.js +10 -12
  155. package/dist/core/module/battle/buff/buffitem/PosionBanCureBuff.d.ts +3 -0
  156. package/dist/core/module/battle/buff/buffitem/PosionBanCureBuff.js +18 -0
  157. package/dist/core/module/battle/buff/buffitem/PosionBuff.d.ts +1 -0
  158. package/dist/core/module/battle/buff/buffitem/PosionBuff.js +15 -4
  159. package/dist/core/module/battle/buff/buffitem/ProjectileOrbLinkBuff.js +1 -1
  160. package/dist/core/module/battle/buff/buffitem/ProjectileScaleUpBuff.js +4 -2
  161. package/dist/core/module/battle/buff/buffitem/SameHitAddDamageBuff.js +8 -0
  162. package/dist/core/module/battle/buff/buffitem/SlayBuff.js +1 -1
  163. package/dist/core/module/battle/buff/buffitem/TimeAddDamageBuff.d.ts +1 -1
  164. package/dist/core/module/battle/buff/buffitem/TimeAddDamageBuff.js +36 -27
  165. package/dist/core/module/battle/buff/buffitem/index.d.ts +4 -0
  166. package/dist/core/module/battle/buff/buffitem/index.js +5 -1
  167. package/dist/core/module/battle/entity/BaseEntityData.d.ts +15 -1
  168. package/dist/core/module/battle/entity/BaseEntityData.js +27 -0
  169. package/dist/core/module/battle/entity/DragonBodyData.d.ts +19 -1
  170. package/dist/core/module/battle/entity/DragonBodyData.js +34 -0
  171. package/dist/core/module/battle/entity/DragonData.d.ts +18 -1
  172. package/dist/core/module/battle/entity/DragonData.js +32 -0
  173. package/dist/core/module/battle/entity/EntityPool.d.ts +1 -2
  174. package/dist/core/module/battle/entity/EntityPool.js +9 -18
  175. package/dist/core/module/battle/entity/FighterData.d.ts +114 -3
  176. package/dist/core/module/battle/entity/FighterData.js +350 -6
  177. package/dist/core/module/battle/entity/ProjectileData.d.ts +2 -0
  178. package/dist/core/module/battle/entity/ProjectileData.js +25 -0
  179. package/dist/core/module/battle/entity/RoleData.d.ts +12 -1
  180. package/dist/core/module/battle/entity/RoleData.js +19 -0
  181. package/dist/core/module/battle/entity/TurnUnit.d.ts +36 -0
  182. package/dist/core/module/battle/entity/TurnUnit.js +74 -0
  183. package/dist/core/module/battle/entity/index.d.ts +1 -1
  184. package/dist/core/module/battle/entity/index.js +1 -1
  185. package/dist/core/module/battle/event/EntityEvent.d.ts +13 -0
  186. package/dist/core/module/battle/event/EntityEvent.js +14 -0
  187. package/dist/core/module/battle/event/EntityEventBus.d.ts +10 -0
  188. package/dist/core/module/battle/event/EntityEventBus.js +35 -0
  189. package/dist/core/module/battle/event/EventListener.d.ts +6 -1
  190. package/dist/core/module/battle/event/EventListener.js +140 -7
  191. package/dist/core/module/battle/event/GameEvent.d.ts +8 -0
  192. package/dist/core/module/battle/event/GameEvent.js +9 -0
  193. package/dist/core/module/battle/factory/FighterFactory.js +26 -10
  194. package/dist/core/module/battle/fsm-state/AnyFighterStateTransitions.js +24 -12
  195. package/dist/core/module/battle/fsm-state/AnyFighterStates.js +9 -5
  196. package/dist/core/module/battle/fsm-state/Boss18110CallState.d.ts +1 -1
  197. package/dist/core/module/battle/fsm-state/Boss18110State.d.ts +1 -1
  198. package/dist/core/module/battle/fsm-state/FighterStateMachine.d.ts +2 -0
  199. package/dist/core/module/battle/fsm-state/FighterStateMachine.js +6 -0
  200. package/dist/core/module/battle/fsm-state/FighterStateProfiles.d.ts +8 -1
  201. package/dist/core/module/battle/fsm-state/FighterStateProfiles.js +31 -0
  202. package/dist/core/module/battle/fsm-state/FighterStateRegistry.d.ts +3 -0
  203. package/dist/core/module/battle/fsm-state/FighterStateRegistry.js +27 -8
  204. package/dist/core/module/battle/fsm-state/FighterStateShared.js +2 -2
  205. package/dist/core/module/battle/fsm-state/FighterStateType.d.ts +2 -1
  206. package/dist/core/module/battle/fsm-state/FighterStateType.js +2 -1
  207. package/dist/core/module/battle/fsm-state/TurnState.d.ts +29 -0
  208. package/dist/core/module/battle/fsm-state/TurnState.js +208 -0
  209. package/dist/core/module/battle/fsm-state/TurnTransitions.d.ts +36 -0
  210. package/dist/core/module/battle/fsm-state/TurnTransitions.js +90 -0
  211. package/dist/core/module/battle/fsm-state/index.d.ts +2 -0
  212. package/dist/core/module/battle/fsm-state/index.js +3 -1
  213. package/dist/core/module/battle/manager/EntityManager.d.ts +1 -0
  214. package/dist/core/module/battle/manager/EntityManager.js +138 -20
  215. package/dist/core/module/battle/skill/SkillData.d.ts +27 -0
  216. package/dist/core/module/battle/skill/SkillData.js +43 -0
  217. package/dist/core/module/battle/skill/emitter/SkillEmitter.js +4 -1
  218. package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter1.d.ts +3 -0
  219. package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter1.js +30 -2
  220. package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter10.js +2 -2
  221. package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter13.d.ts +1 -0
  222. package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter13.js +25 -2
  223. package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter15.js +1 -1
  224. package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter2.js +1 -1
  225. package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter23.d.ts +9 -0
  226. package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter23.js +75 -11
  227. package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter24.js +1 -1
  228. package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter26.js +4 -0
  229. package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter28.js +1 -1
  230. package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter3.d.ts +14 -8
  231. package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter3.js +127 -31
  232. package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter30.d.ts +36 -0
  233. package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter30.js +235 -0
  234. package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter31.d.ts +13 -0
  235. package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter31.js +47 -0
  236. package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter4.d.ts +1 -0
  237. package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter4.js +25 -2
  238. package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter6.js +10 -6
  239. package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter8.js +2 -2
  240. package/dist/core/module/battle/skill/emitter/projectiles/index.d.ts +2 -0
  241. package/dist/core/module/battle/skill/emitter/projectiles/index.js +3 -1
  242. package/dist/core/module/battle/skill/impacts/Impact1.js +2 -0
  243. package/dist/core/module/battle/skill/impacts/Impact10.js +1 -1
  244. package/dist/core/module/battle/skill/impacts/Impact100.d.ts +13 -0
  245. package/dist/core/module/battle/skill/impacts/Impact100.js +61 -0
  246. package/dist/core/module/battle/skill/impacts/Impact101.d.ts +13 -0
  247. package/dist/core/module/battle/skill/impacts/Impact101.js +49 -0
  248. package/dist/core/module/battle/skill/impacts/Impact17.d.ts +1 -1
  249. package/dist/core/module/battle/skill/impacts/Impact18.d.ts +1 -1
  250. package/dist/core/module/battle/skill/impacts/Impact19.d.ts +13 -0
  251. package/dist/core/module/battle/skill/impacts/Impact19.js +31 -0
  252. package/dist/core/module/battle/skill/impacts/Impact2.js +1 -1
  253. package/dist/core/module/battle/skill/impacts/Impact3.js +6 -5
  254. package/dist/core/module/battle/skill/impacts/index.d.ts +3 -0
  255. package/dist/core/module/battle/skill/impacts/index.js +4 -1
  256. package/dist/core/module/battle/skill/pool/SkillEmitterPool.js +11 -6
  257. package/dist/core/module/battle/system/BornSystem.js +2 -2
  258. package/dist/core/module/battle/system/BuffSystem.d.ts +8 -5
  259. package/dist/core/module/battle/system/BuffSystem.js +47 -22
  260. package/dist/core/module/battle/system/CollisionSystem.d.ts +4 -0
  261. package/dist/core/module/battle/system/CollisionSystem.js +31 -22
  262. package/dist/core/module/battle/system/DestroySystem.d.ts +6 -0
  263. package/dist/core/module/battle/system/DestroySystem.js +61 -20
  264. package/dist/core/module/battle/system/InputSystem.d.ts +3 -1
  265. package/dist/core/module/battle/system/InputSystem.js +15 -4
  266. package/dist/core/module/battle/system/ProjectileSystem.d.ts +1 -0
  267. package/dist/core/module/battle/system/ProjectileSystem.js +49 -29
  268. package/dist/core/module/battle/system/SkillSystem.d.ts +3 -1
  269. package/dist/core/module/battle/system/SkillSystem.js +55 -25
  270. package/dist/core/module/battle/system/TurnPhaseSystem.d.ts +52 -0
  271. package/dist/core/module/battle/system/TurnPhaseSystem.js +189 -0
  272. package/dist/core/module/battle/system/TurnSchedulerSystem.d.ts +51 -0
  273. package/dist/core/module/battle/system/TurnSchedulerSystem.js +363 -0
  274. package/dist/core/module/battle/target/CloseAngleTargetSelection.js +30 -10
  275. package/dist/core/module/battle/target/CloseDownTargetSelection.js +64 -17
  276. package/dist/core/module/battle/target/CloseTargetSelection.js +22 -5
  277. package/dist/core/module/battle/target/RandomRangeTargetSelection.js +8 -8
  278. package/dist/core/module/battle/target/SelfRandomTargetSelection.js +2 -0
  279. package/dist/core/module/battle/target/SelfRandomTowerTargetSelection.js +0 -1
  280. package/dist/core/module/battle/turn/TurnBattleGame.d.ts +85 -0
  281. package/dist/core/module/battle/turn/TurnBattleGame.js +453 -0
  282. package/dist/core/module/battle/turn/TurnBattleModule.d.ts +14 -0
  283. package/dist/core/module/battle/turn/TurnBattleModule.js +65 -0
  284. package/dist/core/module/battle/turn/TurnBattleTypes.d.ts +25 -0
  285. package/dist/core/module/battle/turn/TurnBattleTypes.js +15 -0
  286. package/dist/core/module/battle/util/BattleInputCodec.d.ts +2 -3
  287. package/dist/core/module/battle/util/BattleInputCodec.js +14 -3
  288. package/dist/core/module/battle/util/BattleUtils.d.ts +21 -1
  289. package/dist/core/module/battle/util/BattleUtils.js +217 -41
  290. package/dist/core/module/battle/util/EllipseArc.d.ts +2 -0
  291. package/dist/core/module/battle/util/EllipseArc.js +43 -0
  292. package/dist/core/module/battle/util/HitDataPool.js +3 -1
  293. package/dist/core/module/battle/util/Random.js +13 -4
  294. package/dist/core/module/dailyTrial/DailyTrialBattleModule.d.ts +11 -0
  295. package/dist/core/module/dailyTrial/DailyTrialBattleModule.js +103 -0
  296. package/dist/core/module/dailyTrial/index.d.ts +1 -0
  297. package/dist/core/module/dailyTrial/index.js +13 -0
  298. package/dist/core/module/guild/view/boss/GuildBossBattleModule.d.ts +2 -1
  299. package/dist/core/module/guild/view/boss/GuildBossBattleModule.js +12 -2
  300. package/dist/core/module/module.interface.d.ts +1 -0
  301. package/dist/core/module/property/Property.d.ts +22 -3
  302. package/dist/core/module/property/Property.js +43 -5
  303. package/dist/core/module/property/PropertyUtil.d.ts +17 -2
  304. package/dist/core/module/property/PropertyUtil.js +67 -7
  305. package/dist/core/module/relicDungeon/RelicBattleModule.d.ts +5 -0
  306. package/dist/core/module/relicDungeon/RelicBattleModule.js +26 -2
  307. package/dist/core/module/stage/StageBattleModule.js +1 -0
  308. package/dist/core/proto/CommonProto.d.ts +24671 -14643
  309. package/dist/core/proto/Proto.d.ts +289 -77
  310. package/dist/index.d.ts +39 -3
  311. package/dist/index.js +230 -17
  312. package/dist/register-all.d.ts +2 -0
  313. package/dist/register-all.js +2 -0
  314. package/package.json +1 -1
  315. package/resources/config/GameJsonCfg.bin +0 -0
package/dist/index.d.ts CHANGED
@@ -14,10 +14,12 @@ export declare function initJsonCfg(obj: any): void;
14
14
  export { EGameModule };
15
15
  export interface IGameParam {
16
16
  seed: number;
17
- stageId: number;
18
- inputs: BattleProto.IBattleFrameData[];
17
+ stageId?: number;
18
+ inputs?: BattleProto.IBattleFrameData[];
19
19
  forceLvMould?: number;
20
20
  debugEvent?: DEBUG_EVENT;
21
+ defender?: PlayerProto.IBattlePlayer;
22
+ extarGems?: number[];
21
23
  /**
22
24
  * 最大运行帧数。
23
25
  */
@@ -39,9 +41,43 @@ export interface IGuildGameParam extends IGameParam {
39
41
  * @returns 是否胜利
40
42
  */
41
43
  export declare function startBattleVerify(type: EGameModule, battlePlayer: PlayerProto.IBattlePlayer, param: IGameParam, callback?: (game: Game) => void): boolean;
44
+ /**
45
+ * 验证主线阶段战斗
46
+ * @param battlePlayer 挑战方玩家数据
47
+ * @param param 战斗参数
48
+ * @returns
49
+ */
42
50
  export declare function startStageVerify(battlePlayer: PlayerProto.IBattlePlayer, param: IGameParam): boolean;
43
- export declare function startRelicDungeonVerify(battlePlayer: PlayerProto.IBattlePlayer, param: IGameParam): boolean;
51
+ /**
52
+ * 验证遗物小岛战斗
53
+ * @param battlePlayer 挑战方玩家数据
54
+ * @param param 战斗参数 extarGems 遗物小岛海晶buff
55
+ * @returns
56
+ */
57
+ export declare function startRelicDungeonVerify(battlePlayer: PlayerProto.IBattlePlayer, param: IGameParam): {
58
+ damage: number;
59
+ };
60
+ /**
61
+ * 验证公会boss战斗
62
+ * @param battlePlayer 挑战方玩家数据
63
+ * @param param 战斗参数
64
+ * @returns
65
+ */
44
66
  export declare function startGuildVerify(battlePlayer: PlayerProto.IBattlePlayer, param: IGuildGameParam): {
45
67
  killHpCount: number;
46
68
  damage: number;
47
69
  };
70
+ /**
71
+ * 验证每日挑战战斗
72
+ * @param battlePlayer 挑战方玩家数据
73
+ * @param param 战斗参数 forceLvMould 每日挑战必传
74
+ * @returns
75
+ */
76
+ export declare function startDailyTrialVerify(battlePlayer: PlayerProto.IBattlePlayer, param: IGameParam): boolean;
77
+ /**
78
+ * 验证竞技场战斗
79
+ * @param battlePlayer 挑战方玩家数据
80
+ * @param param 战斗参数 defender 对方玩家数据
81
+ * @returns
82
+ */
83
+ export declare function startArenaVerify(challenger: PlayerProto.IBattlePlayer, defender: PlayerProto.IBattlePlayer, param: IGameParam): boolean;
package/dist/index.js CHANGED
@@ -10,6 +10,8 @@ exports.startBattleVerify = startBattleVerify;
10
10
  exports.startStageVerify = startStageVerify;
11
11
  exports.startRelicDungeonVerify = startRelicDungeonVerify;
12
12
  exports.startGuildVerify = startGuildVerify;
13
+ exports.startDailyTrialVerify = startDailyTrialVerify;
14
+ exports.startArenaVerify = startArenaVerify;
13
15
  // 必须排在最前面:给 require 装上 db:// 说明符的解析钩子。
14
16
  // tsc 是按书写顺序依次 require 的,放第一行才能保证下面那些
15
17
  // `db://assets/scripts/...` 形式的导入能走到钩子。详见 db-url-resolver.ts。
@@ -19,13 +21,16 @@ const node_zlib_1 = __importDefault(require("node:zlib"));
19
21
  require("./adb-url-resolver");
20
22
  const Cfg_1 = require("./core/config/Cfg");
21
23
  const Const_1 = require("./core/config/Const");
24
+ const DailyTrialConfigCfg_1 = require("./core/config/DailyTrialConfigCfg");
22
25
  const GuildBossConfigCfg_1 = require("./core/config/GuildBossConfigCfg");
23
26
  const battle_interface_1 = require("./core/module/battle/battle.interface");
24
27
  Object.defineProperty(exports, "EGameModule", { enumerable: true, get: function () { return battle_interface_1.EGameModule; } });
25
28
  const Game_1 = __importDefault(require("./core/module/battle/Game"));
29
+ const TurnBattleGame_1 = __importDefault(require("./core/module/battle/turn/TurnBattleGame"));
26
30
  const BattleInputCodec_1 = __importDefault(require("./core/module/battle/util/BattleInputCodec"));
27
31
  const BattleUtils_1 = require("./core/module/battle/util/BattleUtils");
28
32
  const Property_1 = require("./core/module/property/Property");
33
+ const PropertyUtil_1 = __importDefault(require("./core/module/property/PropertyUtil"));
29
34
  require("./register-all");
30
35
  /** 包内配置的相对路径。源码跑时 __dirname 是仓库根,产物跑时是 dist/ */
31
36
  const CFG_RELATIVE = node_path_1.default.join("resources", "config", "GameJsonCfg.bin");
@@ -133,6 +138,29 @@ function logDebugFightDps(data) {
133
138
  }
134
139
  }
135
140
  }
141
+ function getEnemyWavesPro(myBattlePlayer, stageId) {
142
+ let property = PropertyUtil_1.default.getFightPropertyByBattlePlayer(Const_1.Const.mainRoleId, myBattlePlayer);
143
+ const atk = property[10010];
144
+ const maxStage = Cfg_1.Cfg.DailyTrialConfig.get(DailyTrialConfigCfg_1.DailyTrialConfigDefine.max_stageId).value2[stageId - 1] || 1;
145
+ let stageCfg = null;
146
+ for (let i = maxStage; i >= 0; i--) {
147
+ const tstageCfg = Cfg_1.Cfg.Stage.get(i);
148
+ if (!tstageCfg)
149
+ continue;
150
+ if (atk >= tstageCfg.atkStd || i == 0) {
151
+ stageCfg = tstageCfg;
152
+ break;
153
+ }
154
+ }
155
+ if (!stageCfg)
156
+ return [];
157
+ const diffCoefficient = Cfg_1.Cfg.DailyTrialConfig.get(DailyTrialConfigCfg_1.DailyTrialConfigDefine.difficulty_coefficient).value2[stageId - 1] ?? 1;
158
+ let tmp = [];
159
+ stageCfg.wavesPro.forEach(item => {
160
+ tmp.push([item[0], item[1] * diffCoefficient]);
161
+ });
162
+ return tmp;
163
+ }
136
164
  /**
137
165
  * fixUpdate 的默认调用次数上限。
138
166
  */
@@ -150,12 +178,37 @@ function loadFighterInfo(battlePlayer) {
150
178
  let fightId = fighterList[i];
151
179
  if (fightId <= 0)
152
180
  continue;
153
- let fightInfo = BattleUtils_1.BattleUtils.parseBattleInfoById(fightId, 0, battlePlayer);
181
+ let fightInfo = BattleUtils_1.BattleUtils.parseBattleInfoById(fightId, battlePlayer);
154
182
  fightInfo.playerId = 0;
155
183
  myFightDatas.push(fightInfo);
156
184
  }
157
185
  return myFightDatas;
158
186
  }
187
+ function parseFighterInfo(battlePlayer, playerId) {
188
+ const myFightDatas = [];
189
+ let waitBornSkillIds = [];
190
+ let waitLearnSkillIds = [];
191
+ let fighterList = [Const_1.Const.mainRoleId];
192
+ for (let key in battlePlayer.petSlots) {
193
+ fighterList.push(battlePlayer.petSlots[key].petId);
194
+ }
195
+ for (let i = 0; i < fighterList.length; i++) {
196
+ let fightId = fighterList[i];
197
+ if (fightId <= 0)
198
+ continue;
199
+ let myRoleData = BattleUtils_1.BattleUtils.parsePVPBattleInfoById(fightId, battlePlayer);
200
+ myRoleData.playerId = playerId;
201
+ if (myRoleData.waitToBorn && myRoleData.waitToBorn.length) {
202
+ waitBornSkillIds.push(...myRoleData.waitToBorn);
203
+ }
204
+ if (myRoleData.waitToLearn && myRoleData.waitToLearn.length) {
205
+ waitLearnSkillIds.push(...myRoleData.waitToLearn);
206
+ }
207
+ this.cutSomeProperty(myRoleData);
208
+ myFightDatas.push(myRoleData);
209
+ }
210
+ return myFightDatas;
211
+ }
159
212
  /**
160
213
  * 开始战斗验证
161
214
  * @param type 游戏模块
@@ -170,16 +223,56 @@ function startBattleVerify(type, battlePlayer, param, callback) {
170
223
  }
171
224
  // 配置按需加载:入口 import 本包不再有读盘副作用,直接调用也能跑
172
225
  initCfg();
226
+ //遗迹小岛添加额外海晶
227
+ if (type === battle_interface_1.EGameModule.RelicDungeon) {
228
+ const buffIds = param.extarGems || [];
229
+ const groupToIdQuality = new Map();
230
+ for (let i = 0; i < buffIds.length; i++) {
231
+ let gemId = buffIds[i];
232
+ let gemCfg = Cfg_1.Cfg.Gem.get(gemId);
233
+ if (gemCfg) {
234
+ let idQualityList = groupToIdQuality.get(gemCfg.group);
235
+ if (!idQualityList) {
236
+ groupToIdQuality.set(gemCfg.group, [gemCfg.id, gemCfg.quality]);
237
+ }
238
+ else {
239
+ if (idQualityList[1] < gemCfg.quality) {
240
+ idQualityList[0] = gemCfg.id;
241
+ idQualityList[1] = gemCfg.quality;
242
+ }
243
+ }
244
+ }
245
+ }
246
+ battlePlayer.gemSlotMap[999] = { gemIds: [] };
247
+ for (let key in battlePlayer.gemSlotMap) {
248
+ let gemInfo = battlePlayer.gemSlotMap[key];
249
+ if (gemInfo && gemInfo.gemIds && gemInfo.gemIds.length) {
250
+ for (let i = 0; i < gemInfo.gemIds.length; i++) {
251
+ let gemId = gemInfo.gemIds[i];
252
+ const cfg = Cfg_1.Cfg.Gem.get(gemId);
253
+ let gemGroup = groupToIdQuality.get(cfg.group);
254
+ if (gemGroup) {
255
+ if (gemGroup[1] > cfg.quality) {
256
+ gemInfo.gemIds[i] = gemGroup[0];
257
+ }
258
+ groupToIdQuality.delete(cfg.group);
259
+ }
260
+ }
261
+ }
262
+ }
263
+ //设置buff
264
+ groupToIdQuality.forEach(value => {
265
+ battlePlayer.gemSlotMap[999].gemIds.push(value[0]);
266
+ });
267
+ }
173
268
  const myFightDatas = loadFighterInfo(battlePlayer);
174
269
  let enemyData = [];
175
270
  let talentSkillIds = [];
176
- if (battlePlayer) {
177
- for (let key in battlePlayer.talentTree) {
178
- let talentTreeLv = Cfg_1.Cfg.TalentTreeLv.filter({ skillId: +key, lv: battlePlayer.talentTree[key] });
179
- if (talentTreeLv && talentTreeLv.length) {
180
- if (talentTreeLv[0].skill) {
181
- talentSkillIds.push(...talentTreeLv[0].skill);
182
- }
271
+ for (let key in battlePlayer.talentTree) {
272
+ let talentTreeLv = Cfg_1.Cfg.TalentTreeLv.filter({ skillId: +key, lv: battlePlayer.talentTree[key] });
273
+ if (talentTreeLv && talentTreeLv.length) {
274
+ if (talentTreeLv[0].skill) {
275
+ talentSkillIds.push(...talentTreeLv[0].skill);
183
276
  }
184
277
  }
185
278
  }
@@ -199,11 +292,11 @@ function startBattleVerify(type, battlePlayer, param, callback) {
199
292
  else if (type === battle_interface_1.EGameModule.RelicDungeon) {
200
293
  let relicDungeon = Cfg_1.Cfg.RelicDungeonLevel.get(param.stageId);
201
294
  if (relicDungeon) {
202
- wavesPro = relicDungeon.wavesPro;
203
- enemyData = BattleUtils_1.BattleUtils.getBornInfoByWavesId(relicDungeon.lvMould, 2, param.seed);
295
+ enemyData = BattleUtils_1.BattleUtils.getBornInfoByWavesId(relicDungeon.lvId, 2, param.seed);
204
296
  }
205
297
  }
206
298
  else if (type === battle_interface_1.EGameModule.GuildBoss) {
299
+ const bossCfg = Cfg_1.Cfg.GuildBossLevel.get(param.stageId);
207
300
  const guildParam = param;
208
301
  const cheerLayer = guildParam.cheerLayer ?? 0;
209
302
  const cheerBuffs = Cfg_1.Cfg.GuildBossConfig.get(GuildBossConfigCfg_1.GuildBossConfigDefine.boss_support_buff)?.value2 || [];
@@ -213,6 +306,11 @@ function startBattleVerify(type, battlePlayer, param, callback) {
213
306
  Property_1.PropertyHelper.addPropertyByKeyValue(myRoleData.property, element[0], element[1] * cheerLayer);
214
307
  }
215
308
  }
309
+ enemyData = BattleUtils_1.BattleUtils.getBornInfoByWavesId(bossCfg.id, 4, param.seed);
310
+ }
311
+ else if (type === battle_interface_1.EGameModule.DailyTrial) {
312
+ wavesPro = getEnemyWavesPro(battlePlayer, param.stageId);
313
+ enemyData = BattleUtils_1.BattleUtils.getBornInfoByWavesId(param.forceLvMould, 1, param.seed);
216
314
  }
217
315
  let isWin = false;
218
316
  let inputs = [];
@@ -253,14 +351,20 @@ function startBattleVerify(type, battlePlayer, param, callback) {
253
351
  }
254
352
  game.initFight(myFightDatas, enemyData);
255
353
  const maxFrames = param.maxFrames > 0 ? param.maxFrames : DEFAULT_MAX_FRAMES;
354
+ const forceFrame = param.maxFrames != null;
256
355
  let frames = 0;
257
356
  while (game && !game.isOver()) {
258
357
  if (frames >= maxFrames) {
259
- throw new Error(`[startBattleVerify] 战斗在 ${maxFrames} 次 fixUpdate 后仍未结束,判定为死循环。` +
260
- `stageId=${param.stageId} type=${type} seed=${param.seed} ` +
261
- `fixUpdate=${frames} curFrame=${game.gameContext.curFrame} ` +
262
- `battleTime=${game.getBattleTime()} progress=${game.getGameProgress()} ` +
263
- `isOver=${game.isOver()}`);
358
+ if (forceFrame) {
359
+ break;
360
+ }
361
+ else {
362
+ throw new Error(`[startBattleVerify] 战斗在 ${maxFrames} 次 fixUpdate 后仍未结束,判定为死循环。` +
363
+ `stageId=${param.stageId} type=${type} seed=${param.seed} ` +
364
+ `fixUpdate=${frames} curFrame=${game.gameContext.curFrame} ` +
365
+ `battleTime=${game.getBattleTime()} progress=${game.getGameProgress()} ` +
366
+ `isOver=${game.isOver()}`);
367
+ }
264
368
  }
265
369
  game.fixUpdate(Game_1.default.stableTime);
266
370
  frames++;
@@ -271,12 +375,102 @@ function startBattleVerify(type, battlePlayer, param, callback) {
271
375
  game.destroy();
272
376
  return isWin;
273
377
  }
378
+ function startBattlePVP(type, challenger, defender, param) {
379
+ if (param.forcePass) {
380
+ return true;
381
+ }
382
+ // 配置按需加载:入口 import 本包不再有读盘副作用,直接调用也能跑
383
+ initCfg();
384
+ let seed = param.seed;
385
+ let battlePlayer = challenger;
386
+ let enemyBattlePlayer = defender;
387
+ const challengeUserId = +battlePlayer.baseInfo.userId;
388
+ const defenderUserId = +enemyBattlePlayer.baseInfo.userId;
389
+ //加载挑战方单位数据
390
+ const challengerInfo = this.parseFighterInfo(battlePlayer, challengeUserId);
391
+ //加载防守方单位数据
392
+ const defenderInfo = this.parseFighterInfo(enemyBattlePlayer, defenderUserId);
393
+ let isWin = false;
394
+ const game = new TurnBattleGame_1.default({
395
+ type: battle_interface_1.EGameModule.Arena,
396
+ logicStep: 60,
397
+ gameWidth: Const_1.Const.designWidth,
398
+ gameHeight: Const_1.Const.MatchHeight,
399
+ renderRoot: this.gameNode.node,
400
+ seed: seed,
401
+ stageId: 1,
402
+ resultCall: (win, debugData) => {
403
+ isWin = win;
404
+ logDebugFightDps(game.gameContext);
405
+ if (debugData && debugData.length) {
406
+ saveDebugLog(debugData);
407
+ }
408
+ }
409
+ });
410
+ for (let i = 0; i < challengerInfo.length; i++) {
411
+ let data = challengerInfo[i];
412
+ data.oid = this.game.getNextOid();
413
+ }
414
+ for (let i = 0; i < defenderInfo.length; i++) {
415
+ let data = defenderInfo[i];
416
+ data.oid = this.game.getNextOid();
417
+ }
418
+ //初始化
419
+ game.initPVPFight(challengerInfo, defenderInfo);
420
+ const maxFrames = param.maxFrames > 0 ? param.maxFrames : DEFAULT_MAX_FRAMES;
421
+ const forceFrame = param.maxFrames != null;
422
+ let frames = 0;
423
+ while (game && !game.isOver()) {
424
+ if (frames >= maxFrames) {
425
+ if (forceFrame) {
426
+ break;
427
+ }
428
+ else {
429
+ throw new Error(`[startBattleVerify] 战斗在 ${maxFrames} 次 fixUpdate 后仍未结束,判定为死循环。` +
430
+ `stageId=${param.stageId} type=${type} seed=${param.seed} ` +
431
+ `fixUpdate=${frames} curFrame=${game.gameContext.curFrame} ` +
432
+ `battleTime=${game.getBattleTime()} progress=${game.getGameProgress()} ` +
433
+ `isOver=${game.isOver()}`);
434
+ }
435
+ }
436
+ game.fixUpdate(Game_1.default.stableTime);
437
+ frames++;
438
+ }
439
+ return isWin;
440
+ }
441
+ /**
442
+ * 验证主线阶段战斗
443
+ * @param battlePlayer 挑战方玩家数据
444
+ * @param param 战斗参数
445
+ * @returns
446
+ */
274
447
  function startStageVerify(battlePlayer, param) {
275
448
  return startBattleVerify(battle_interface_1.EGameModule.Stage, battlePlayer, param);
276
449
  }
450
+ /**
451
+ * 验证遗物小岛战斗
452
+ * @param battlePlayer 挑战方玩家数据
453
+ * @param param 战斗参数 extarGems 遗物小岛海晶buff
454
+ * @returns
455
+ */
277
456
  function startRelicDungeonVerify(battlePlayer, param) {
278
- return startBattleVerify(battle_interface_1.EGameModule.RelicDungeon, battlePlayer, param);
457
+ const data = {
458
+ damage: 0,
459
+ };
460
+ startBattleVerify(battle_interface_1.EGameModule.RelicDungeon, battlePlayer, param, game => {
461
+ const gameModule = game.gameModule;
462
+ if (gameModule) {
463
+ data.damage = gameModule.damage;
464
+ }
465
+ });
466
+ return data;
279
467
  }
468
+ /**
469
+ * 验证公会boss战斗
470
+ * @param battlePlayer 挑战方玩家数据
471
+ * @param param 战斗参数
472
+ * @returns
473
+ */
280
474
  function startGuildVerify(battlePlayer, param) {
281
475
  const data = {
282
476
  killHpCount: 0,
@@ -295,8 +489,26 @@ function startGuildVerify(battlePlayer, param) {
295
489
  });
296
490
  return data;
297
491
  }
492
+ /**
493
+ * 验证每日挑战战斗
494
+ * @param battlePlayer 挑战方玩家数据
495
+ * @param param 战斗参数 forceLvMould 每日挑战必传
496
+ * @returns
497
+ */
498
+ function startDailyTrialVerify(battlePlayer, param) {
499
+ return startBattleVerify(battle_interface_1.EGameModule.DailyTrial, battlePlayer, param);
500
+ }
501
+ /**
502
+ * 验证竞技场战斗
503
+ * @param battlePlayer 挑战方玩家数据
504
+ * @param param 战斗参数 defender 对方玩家数据
505
+ * @returns
506
+ */
507
+ function startArenaVerify(challenger, defender, param) {
508
+ return startBattlePVP(battle_interface_1.EGameModule.Arena, challenger, defender, param);
509
+ }
298
510
  /*
299
- const inputInfo = { "type": 3, "seed": 335636424, "reqTime": 1793585401817, "stageId": 1, "cheerLayer": 0, "inputs": [{ "frame": 54, "data": { "params": [0, 1, 12000200], "type": 2 } }, { "frame": 67, "data": { "params": [0, 1, 12000100], "type": 2 } }, { "frame": 80, "data": { "params": [0, 1, 15000200], "type": 2 } }, { "frame": 628, "data": { "params": [0, 1, 10010060], "type": 2 } }, { "frame": 1879, "data": { "params": [0, 1, 1200020104], "type": 2 } }, { "frame": 3754, "data": { "params": [0, 1, 10010070], "type": 2 } }, { "frame": 4786, "data": { "params": [0, -9659, 2588, 1, 1], "type": 1 } }, { "frame": 4834, "data": { "params": [0, -9659, 2588, 1, 1], "type": 1 } }, { "frame": 4836, "data": { "params": [0, 9659, 2588, 1, 1], "type": 1 } }, { "frame": 4837, "data": { "params": [0, 9659, 2588, 1, 1], "type": 1 } }, { "frame": 4839, "data": { "params": [0, 9659, 2588, 1, 1], "type": 1 } }, { "frame": 4840, "data": { "params": [0, 9659, 2588, 1, 1], "type": 1 } }, { "frame": 4842, "data": { "params": [0, 9292, 3697, 1, 1], "type": 1 } }, { "frame": 4843, "data": { "params": [0, 8096, 5870, 1, 1], "type": 1 } }, { "frame": 4843, "data": { "params": [0, 7017, 7125, 1, 1], "type": 1 } }, { "frame": 4845, "data": { "params": [0, 6012, 7991, 1, 1], "type": 1 } }, { "frame": 4845, "data": { "params": [0, 5081, 8613, 1, 1], "type": 1 } }, { "frame": 4847, "data": { "params": [0, 4277, 9039, 1, 1], "type": 1 } }, { "frame": 4847, "data": { "params": [0, 3673, 9301, 1, 1], "type": 1 } }, { "frame": 4848, "data": { "params": [0, 3058, 9521, 1, 1], "type": 1 } }, { "frame": 4848, "data": { "params": [0, 2428, 9701, 1, 1], "type": 1 } }, { "frame": 4850, "data": { "params": [0, 1889, 9820, 1, 1], "type": 1 } }, { "frame": 4850, "data": { "params": [0, 1650, 9863, 1, 1], "type": 1 } }, { "frame": 4851, "data": { "params": [0, 1389, 9903, 1, 1], "type": 1 } }, { "frame": 4851, "data": { "params": [0, 1208, 9927, 1, 1], "type": 1 } }, { "frame": 4851, "data": { "params": [0, 1146, 9934, 1, 1], "type": 1 } }, { "frame": 4851, "data": { "params": [0, 1090, 9940, 1, 1], "type": 1 } }, { "frame": 4853, "data": { "params": [0, 947, 9955, 1, 1], "type": 1 } }, { "frame": 4853, "data": { "params": [0, 905, 9959, 1, 1], "type": 1 } }, { "frame": 4853, "data": { "params": [0, 866, 9962, 1, 1], "type": 1 } }, { "frame": 4853, "data": { "params": [0, 831, 9965, 1, 1], "type": 1 } }, { "frame": 4854, "data": { "params": [0, 798, 9968, 1, 1], "type": 1 } }, { "frame": 4854, "data": { "params": [0, 768, 9970, 1, 1], "type": 1 } }, { "frame": 4854, "data": { "params": [0, 735, 9973, 1, 1], "type": 1 } }, { "frame": 4856, "data": { "params": [0, 694, 9976, 1, 1], "type": 1 } }, { "frame": 4856, "data": { "params": [0, 658, 9978, 1, 1], "type": 1 } }, { "frame": 4858, "data": { "params": [0, 634, 9980, 1, 1], "type": 1 } }, { "frame": 4858, "data": { "params": [0, 611, 9981, 1, 1], "type": 1 } }, { "frame": 4859, "data": { "params": [0, 589, 9983, 1, 1], "type": 1 } }, { "frame": 4859, "data": { "params": [0, 570, 9984, 1, 1], "type": 1 } }, { "frame": 4861, "data": { "params": [0, 551, 9985, 1, 1], "type": 1 } }, { "frame": 4861, "data": { "params": [0, 531, 9986, 1, 1], "type": 1 } }, { "frame": 4862, "data": { "params": [0, 515, 9987, 1, 1], "type": 1 } }, { "frame": 4864, "data": { "params": [0, 497, 9988, 1, 1], "type": 1 } }, { "frame": 4864, "data": { "params": [0, 485, 9988, 1, 1], "type": 1 } }, { "frame": 4865, "data": { "params": [0, 427, 9991, 1, 1], "type": 1 } }, { "frame": 4867, "data": { "params": [0, 281, 9996, 1, 1], "type": 1 } }, { "frame": 4870, "data": { "params": [0, 185, 9998, 1, 1], "type": 1 } }, { "frame": 4873, "data": { "params": [0, 49, 10000, 1, 1], "type": 1 } }, { "frame": 4876, "data": { "params": [0, -82, 10000, 1, 1], "type": 1 } }, { "frame": 4883, "data": { "params": [0, -123, 9999, 1, 1], "type": 1 } }, { "frame": 4884, "data": { "params": [0, -120, 9999, 1, 1], "type": 1 } }, { "frame": 4887, "data": { "params": [0, -118, 9999, 1, 1], "type": 1 } }, { "frame": 4890, "data": { "params": [0, -76, 10000, 1, 1], "type": 1 } }, { "frame": 4898, "data": { "params": [0, -76, 10000, 1, 0], "type": 1 } }, { "frame": 5283, "data": { "params": [0, 1704, 9854, 1, 0], "type": 1 } }, { "frame": 7502, "data": { "params": [0, 1, 10010000], "type": 2 } }, { "frame": 12503, "data": { "params": [0, 1, -488923588], "type": 2 } }], "battlePlayer": { "userId": "10302000001", "uuid": "dt1", "nickname": "p_10302", "lv": 2, "maxStage": 2, "registerTime": 1793257944489, "onlineTime": 1793585141437, "offlineTime": 1793585107539, "online": true, "guildId": 1001, "guildRole": 100, "battlePower": 1350, "guildInfo": { "lastUpdateTime": 1793584403003, "guildWeekPoint": 100 }, "equipPartMap": { "1": { "lv": 1, "partId": 1, "equipId": 0 }, "2": { "lv": 1, "partId": 2, "equipId": 0 }, "3": { "lv": 1, "partId": 3, "equipId": 0 }, "4": { "lv": 1, "partId": 4, "equipId": 0 }, "5": { "lv": 1, "partId": 5, "equipId": 0 }, "6": { "lv": 1, "partId": 6, "equipId": 0 } }, "gemSlotMap": { "1": { "gemIds": [0], "partId": 1, "unlockCount": 1 }, "2": { "gemIds": [0], "partId": 2, "unlockCount": 1 }, "3": { "gemIds": [0], "partId": 3, "unlockCount": 1 }, "4": { "gemIds": [0], "partId": 4, "unlockCount": 1 }, "5": { "gemIds": [0], "partId": 5, "unlockCount": 1 }, "6": { "gemIds": [0], "partId": 6, "unlockCount": 1 } }, "turretMap": { "120001": { "id": 120001, "lv": 1, "turretModId": 0 }, "120002": { "id": 120002, "lv": 1, "turretModId": 0 }, "150002": { "id": 150002, "lv": 1, "turretModId": 0 } }, "talents": [{ "id": 1, "type": 1 }, { "id": 1, "type": 2 }, { "id": 1, "type": 3 }], "talentTree": {}, "skinMap": {}, "equipSkinMap": {}, "skinSlotMap": { "1": { "groupIds": [0] }, "2": { "groupIds": [0] }, "3": { "groupIds": [0] } }, "decorationInfo": { "unlockItems": [], "playerDecoration": { "title": 0, "avatar": 301001, "avatarFrame": 401001, "bubbleFrame": 601001 } }, "serverId": 1, "relicMap": { "1": { "configId": 1101001, "eValue": 0, "randomAttrList": [{ "id": 2204001, "value": 5 }], "randomEntryList": [] }, "2": { "configId": 1201001, "eValue": 0, "randomAttrList": [{ "id": 2303001, "value": 5 }], "randomEntryList": [] }, "3": { "configId": 1301001, "eValue": 0, "randomAttrList": [{ "id": 2332001, "value": 5 }], "randomEntryList": [] }, "4": { "configId": 1401001, "eValue": 0, "randomAttrList": [{ "id": 2328001, "value": 5 }], "randomEntryList": [] }, "5": { "configId": 1501001, "eValue": 0, "randomAttrList": [{ "id": 2303001, "value": 6 }], "randomEntryList": [] } }, "purifySkillLevel": 1, "curPurifyPlan": { "affixItems": [{ "id": 0, "value": 0, "status": 0 }, { "id": 0, "value": 0, "status": 0 }] }, "baseInfo": { "userId": "10302000001", "nickname": "p_10302", "lv": 2, "onlineTime": 1793585141437, "offlineTime": 1793585107539, "maxStage": 2, "decorationInfo": { "unlockItems": [], "playerDecoration": { "title": 0, "avatar": 301001, "avatarFrame": 401001, "bubbleFrame": 601001 } }, "serverId": 1 } } }
511
+ const inputInfo = { "type": 3, "seed": 247106275, "reqTime": 1793591265517, "stageId": 1, "cheerLayer": 0, "inputs": [{ "frame": 32, "data": { "params": [0, 1, 12000200], "type": 2 } }, { "frame": 46, "data": { "params": [0, 1, 8101011001], "type": 2 } }, { "frame": 60, "data": { "params": [0, 1, 1200020105], "type": 2 } }, { "frame": 628, "data": { "params": [0, 1, 10010070], "type": 2 } }, { "frame": 1880, "data": { "params": [0, 1, 15000200], "type": 2 } }, { "frame": 2113, "data": { "params": [0, 924, 9957, 1, 1], "type": 1 } }, { "frame": 2116, "data": { "params": [0, 924, 9957, 1, 0], "type": 1 } }, { "frame": 2120, "data": { "params": [0, 950, 9955, 1, 1], "type": 1 } }, { "frame": 2123, "data": { "params": [0, 950, 9955, 1, 0], "type": 1 } }, { "frame": 2562, "data": { "params": [0, -350, 9994, 1, 1], "type": 1 } }, { "frame": 2567, "data": { "params": [0, -350, 9994, 1, 0], "type": 1 } }, { "frame": 2677, "data": { "params": [0, 1, 12000100], "type": 2 } }, { "frame": 3097, "data": { "params": [0, -433, 9991, 1, 1], "type": 1 } }, { "frame": 3106, "data": { "params": [0, -387, 9993, 1, 1], "type": 1 } }, { "frame": 3108, "data": { "params": [0, -342, 9994, 1, 1], "type": 1 } }, { "frame": 3108, "data": { "params": [0, -319, 9995, 1, 1], "type": 1 } }, { "frame": 3110, "data": { "params": [0, -276, 9996, 1, 1], "type": 1 } }, { "frame": 3110, "data": { "params": [0, -233, 9997, 1, 1], "type": 1 } }, { "frame": 3111, "data": { "params": [0, -172, 9999, 1, 1], "type": 1 } }, { "frame": 3111, "data": { "params": [0, -132, 9999, 1, 1], "type": 1 } }, { "frame": 3113, "data": { "params": [0, -112, 9999, 1, 1], "type": 1 } }, { "frame": 3114, "data": { "params": [0, -73, 10000, 1, 1], "type": 1 } }, { "frame": 3116, "data": { "params": [0, -54, 10000, 1, 1], "type": 1 } }, { "frame": 3119, "data": { "params": [0, -54, 10000, 1, 0], "type": 1 } }, { "frame": 3160, "data": { "params": [0, 494, 9988, 1, 1], "type": 1 } }, { "frame": 3164, "data": { "params": [0, 600, 9982, 1, 1], "type": 1 } }, { "frame": 3166, "data": { "params": [0, 644, 9979, 1, 1], "type": 1 } }, { "frame": 3166, "data": { "params": [0, 693, 9976, 1, 1], "type": 1 } }, { "frame": 3168, "data": { "params": [0, 738, 9973, 1, 1], "type": 1 } }, { "frame": 3168, "data": { "params": [0, 765, 9971, 1, 1], "type": 1 } }, { "frame": 3169, "data": { "params": [0, 826, 9966, 1, 1], "type": 1 } }, { "frame": 3171, "data": { "params": [0, 835, 9965, 1, 1], "type": 1 } }, { "frame": 3172, "data": { "params": [0, 844, 9964, 1, 1], "type": 1 } }, { "frame": 3174, "data": { "params": [0, 844, 9964, 1, 0], "type": 1 } }, { "frame": 3221, "data": { "params": [0, 867, 9962, 1, 1], "type": 1 } }, { "frame": 3228, "data": { "params": [0, 857, 9963, 1, 1], "type": 1 } }, { "frame": 3228, "data": { "params": [0, 866, 9962, 1, 1], "type": 1 } }, { "frame": 3230, "data": { "params": [0, 896, 9960, 1, 1], "type": 1 } }, { "frame": 3232, "data": { "params": [0, 941, 9956, 1, 1], "type": 1 } }, { "frame": 3233, "data": { "params": [0, 963, 9954, 1, 1], "type": 1 } }, { "frame": 3233, "data": { "params": [0, 971, 9953, 1, 1], "type": 1 } }, { "frame": 3235, "data": { "params": [0, 980, 9952, 1, 1], "type": 1 } }, { "frame": 3236, "data": { "params": [0, 971, 9953, 1, 1], "type": 1 } }, { "frame": 3236, "data": { "params": [0, 972, 9953, 1, 0], "type": 1 } }, { "frame": 3753, "data": { "params": [0, 1, 1200010102], "type": 2 } }, { "frame": 4319, "data": { "params": [0, 3763, 9265, 1, 1], "type": 1 } }, { "frame": 4320, "data": { "params": [0, 3840, 9233, 1, 1], "type": 1 } }, { "frame": 4320, "data": { "params": [0, 3876, 9218, 1, 1], "type": 1 } }, { "frame": 4322, "data": { "params": [0, 3975, 9176, 1, 1], "type": 1 } }, { "frame": 4322, "data": { "params": [0, 3997, 9166, 1, 1], "type": 1 } }, { "frame": 4323, "data": { "params": [0, 4102, 9120, 1, 1], "type": 1 } }, { "frame": 4323, "data": { "params": [0, 4168, 9090, 1, 1], "type": 1 } }, { "frame": 4325, "data": { "params": [0, 4221, 9066, 1, 1], "type": 1 } }, { "frame": 4325, "data": { "params": [0, 4307, 9025, 1, 1], "type": 1 } }, { "frame": 4326, "data": { "params": [0, 4367, 8996, 1, 1], "type": 1 } }, { "frame": 4326, "data": { "params": [0, 4414, 8973, 1, 1], "type": 1 } }, { "frame": 4328, "data": { "params": [0, 4470, 8945, 1, 1], "type": 1 } }, { "frame": 4328, "data": { "params": [0, 4525, 8917, 1, 1], "type": 1 } }, { "frame": 4330, "data": { "params": [0, 4568, 8896, 1, 1], "type": 1 } }, { "frame": 4353, "data": { "params": [0, 4620, 8869, 1, 1], "type": 1 } }, { "frame": 4355, "data": { "params": [0, 4607, 8875, 1, 1], "type": 1 } }, { "frame": 4360, "data": { "params": [0, 4626, 8865, 1, 1], "type": 1 } }, { "frame": 4367, "data": { "params": [0, 4626, 8865, 1, 0], "type": 1 } }, { "frame": 4430, "data": { "params": [0, 3680, 9298, 1, 1], "type": 1 } }, { "frame": 4432, "data": { "params": [0, 3626, 9319, 1, 1], "type": 1 } }, { "frame": 4433, "data": { "params": [0, 3644, 9312, 1, 1], "type": 1 } }, { "frame": 4433, "data": { "params": [0, 3619, 9322, 1, 1], "type": 1 } }, { "frame": 4435, "data": { "params": [0, 3682, 9297, 1, 1], "type": 1 } }, { "frame": 4435, "data": { "params": [0, 3708, 9287, 1, 1], "type": 1 } }, { "frame": 4436, "data": { "params": [0, 3733, 9277, 1, 1], "type": 1 } }, { "frame": 4436, "data": { "params": [0, 3771, 9262, 1, 1], "type": 1 } }, { "frame": 4438, "data": { "params": [0, 3804, 9248, 1, 1], "type": 1 } }, { "frame": 4443, "data": { "params": [0, 3804, 9248, 1, 0], "type": 1 } }, { "frame": 5926, "data": { "params": [0, 1, 10010080], "type": 2 } }, { "frame": 5960, "data": { "params": [0, 3696, 9292, 1, 1], "type": 1 } }, { "frame": 5965, "data": { "params": [0, 3696, 9292, 1, 0], "type": 1 } }, { "frame": 6118, "data": { "params": [0, 1, 10010090], "type": 2 } }, { "frame": 7504, "data": { "params": [0, 1, 1500020106], "type": 2 } }], "battlePlayer": { "userId": "10302000001", "uuid": "dt1", "nickname": "p_10302", "lv": 2, "maxStage": 2, "registerTime": 1793257944489, "onlineTime": 1793590899087, "offlineTime": 1793590879327, "online": true, "guildId": 1001, "guildRole": 100, "battlePower": 1350, "guildInfo": { "lastUpdateTime": 1793584403003, "guildWeekPoint": 500 }, "equipPartMap": { "1": { "lv": 1, "partId": 1, "equipId": 0 }, "2": { "lv": 1, "partId": 2, "equipId": 0 }, "3": { "lv": 1, "partId": 3, "equipId": 0 }, "4": { "lv": 1, "partId": 4, "equipId": 0 }, "5": { "lv": 1, "partId": 5, "equipId": 0 }, "6": { "lv": 1, "partId": 6, "equipId": 0 } }, "gemSlotMap": { "1": { "gemIds": [0], "partId": 1, "unlockCount": 1 }, "2": { "gemIds": [0], "partId": 2, "unlockCount": 1 }, "3": { "gemIds": [0], "partId": 3, "unlockCount": 1 }, "4": { "gemIds": [0], "partId": 4, "unlockCount": 1 }, "5": { "gemIds": [0], "partId": 5, "unlockCount": 1 }, "6": { "gemIds": [0], "partId": 6, "unlockCount": 1 } }, "turretMap": { "120001": { "id": 120001, "lv": 1, "turretModId": 0 }, "120002": { "id": 120002, "lv": 1, "turretModId": 0 }, "150002": { "id": 150002, "lv": 1, "turretModId": 0 } }, "talents": [{ "id": 1, "type": 1 }, { "id": 1, "type": 2 }, { "id": 1, "type": 3 }], "talentTree": {}, "skinMap": {}, "equipSkinMap": {}, "skinSlotMap": { "1": { "groupIds": [0] }, "2": { "groupIds": [0] }, "3": { "groupIds": [0] } }, "decorationInfo": { "unlockItems": [], "playerDecoration": { "title": 0, "avatar": 301001, "avatarFrame": 401001, "bubbleFrame": 601001 } }, "serverId": 1, "relicMap": { "1": { "configId": 1101001, "eValue": 0, "randomAttrList": [{ "id": 2204001, "value": 5 }], "randomEntryList": [] }, "2": { "configId": 1201001, "eValue": 0, "randomAttrList": [{ "id": 2303001, "value": 5 }], "randomEntryList": [] }, "3": { "configId": 1301001, "eValue": 0, "randomAttrList": [{ "id": 2332001, "value": 5 }], "randomEntryList": [] }, "4": { "configId": 1401001, "eValue": 0, "randomAttrList": [{ "id": 2328001, "value": 5 }], "randomEntryList": [] }, "5": { "configId": 1501001, "eValue": 0, "randomAttrList": [{ "id": 2303001, "value": 6 }], "randomEntryList": [] } }, "purifySkillLevel": 1, "curPurifyPlan": { "affixItems": [{ "id": 0, "value": 0, "status": 0 }, { "id": 0, "value": 0, "status": 0 }] }, "baseInfo": { "userId": "10302000001", "nickname": "p_10302", "lv": 2, "onlineTime": 1793590899087, "offlineTime": 1793590879327, "maxStage": 2, "decorationInfo": { "unlockItems": [], "playerDecoration": { "title": 0, "avatar": 301001, "avatarFrame": 401001, "bubbleFrame": 601001 } }, "serverId": 1 } } }
300
512
 
301
513
  const start = performance.now();
302
514
  const t = startGuildVerify(inputInfo.battlePlayer, {
@@ -305,6 +517,7 @@ const t = startGuildVerify(inputInfo.battlePlayer, {
305
517
  inputs: inputInfo.inputs,
306
518
  debugEvent: DEBUG_EVENT.Hurt,
307
519
  cheerLayer: inputInfo.cheerLayer,
520
+ maxFrames: 7999
308
521
  });
309
522
  const end = performance.now();
310
523
  console.log(t, end - start);
@@ -1,3 +1,4 @@
1
+ import "./core/module/arena";
1
2
  import "./core/module/battle/buff/buffitem";
2
3
  import "./core/module/battle/entity";
3
4
  import "./core/module/battle/fsm-state";
@@ -5,6 +6,7 @@ import "./core/module/battle/skill/emitter";
5
6
  import "./core/module/battle/skill/emitter/projectiles";
6
7
  import "./core/module/battle/skill/impacts";
7
8
  import "./core/module/battle/target";
9
+ import "./core/module/dailyTrial";
8
10
  import "./core/module/guild/view/boss";
9
11
  import "./core/module/relicDungeon";
10
12
  import "./core/module/stage";
@@ -16,6 +16,7 @@
16
16
  // 放在仓库根目录而不是 core/ 下:core/ 对应 Cocos 的 assets 目录
17
17
  // (见 tsconfig 的 db://assets/* -> core/* 映射),Node 侧专属的胶水不混进去。
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
+ require("./core/module/arena"); // @cacheFunction -> bufferCache(Game 按 EGameModule 取战斗模块)
19
20
  require("./core/module/battle/buff/buffitem"); // @Buff.cacheBuff -> Buff.bufferCache
20
21
  require("./core/module/battle/entity"); // @cacheFunction -> bufferCache
21
22
  require("./core/module/battle/fsm-state"); // registerFighterStateNode/Transition/Profile -> 状态机注册表(不引则状态机查不到节点,战斗永远不结束)
@@ -23,6 +24,7 @@ require("./core/module/battle/skill/emitter"); // @cacheFunction -> bufferCache
23
24
  require("./core/module/battle/skill/emitter/projectiles"); // @cacheFunction -> bufferCache
24
25
  require("./core/module/battle/skill/impacts"); // @registerImpact -> impactRegistry
25
26
  require("./core/module/battle/target"); // registerTargetSelection -> targetSelectionRegistry(不引则目标选择器查不到,索敌全是空)
27
+ require("./core/module/dailyTrial"); // @cacheFunction -> bufferCache(Game 按 EGameModule 取战斗模块)
26
28
  require("./core/module/guild/view/boss"); // @cacheFunction -> bufferCache(Game 按 EGameModule 取战斗模块)
27
29
  require("./core/module/relicDungeon"); // @cacheFunction -> bufferCache(Game 按 EGameModule 取战斗模块)
28
30
  require("./core/module/stage"); // @cacheFunction -> bufferCache(Game 按 EGameModule 取战斗模块)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "captainbattle",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "水上大乱斗后端战斗模拟",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
Binary file