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
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __importDefault = (this && this.__importDefault) || function (mod) {
9
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const Cfg_1 = require("../../config/Cfg");
13
+ const ConstConfigCfg_1 = require("../../config/ConstConfigCfg");
14
+ const Notifier_1 = require("../../framework/notify/Notifier");
15
+ const ListenID_1 = require("../../ListenID");
16
+ const IGameModule_1 = require("../battle/IGameModule");
17
+ const BattleInputCodec_1 = __importDefault(require("../battle/util/BattleInputCodec"));
18
+ const BattleUtils_1 = require("../battle/util/BattleUtils");
19
+ let DailyTrialBattleModule = class DailyTrialBattleModule extends IGameModule_1.GameModule {
20
+ buffs;
21
+ init() {
22
+ this.moduleState.reliveTime = Cfg_1.Cfg.ConstConfig.get(ConstConfigCfg_1.ConstConfigDefine.stage_relive_count)?.value;
23
+ this.game.rolePosType = 0;
24
+ }
25
+ getMode() {
26
+ return 4;
27
+ }
28
+ gameWin() {
29
+ super.gameWin();
30
+ this.gameFinish(true);
31
+ }
32
+ gameFail(isCross) {
33
+ super.gameFail(isCross);
34
+ this.gameFinish(false, isCross);
35
+ }
36
+ gameFinish(isWin, isCross) {
37
+ if (this.game.onlyLogic)
38
+ return;
39
+ const stageProgress = Math.floor(this.game.getMainRoleHpRate(this.game.selfPlayerId) * 100);
40
+ this.markCodexTurret();
41
+ Notifier_1.Notifier.send(ListenID_1.ListenID.DailyTrail_ReuestFinishGame, {
42
+ stageId: this.stageId,
43
+ stageProgress: this.curGameProgress,
44
+ starProgress: isWin ? 1 + +(stageProgress >= 40) + +(stageProgress >= 70) : 0,
45
+ isPassStage: isWin,
46
+ myFightData: this.game.getMyFightDataMap(),
47
+ gameTime: Math.ceil(this.game.getBattleTime()),
48
+ curWave: this.curWave,
49
+ allWave: this.allWave,
50
+ items: [],
51
+ battleFrames: isWin ? BattleInputCodec_1.default.encodeFrames(this.game.getBattleFrames()) : [],
52
+ codexInfo: this.codeInfo,
53
+ killMonsterCount: this.killNormal + this.killBoss,
54
+ });
55
+ }
56
+ // protected pushLevelUpSelectSkill(level: number) {
57
+ // const cfg = Cfg.FightExp.get(level);
58
+ // let dropId = 100;
59
+ // const passStage = Notifier.call(CallID.Stage_GetCurPassStage);
60
+ // if (cfg && passStage < this.stageId) {
61
+ // if (this.stageId === 1) {
62
+ // dropId = cfg.lv1Draw;
63
+ // } else if (this.stageId === 2) {
64
+ // dropId = cfg.lv2Draw;
65
+ // } else if (this.stageId === 3) {
66
+ // dropId = cfg.lv3Draw;
67
+ // } else {
68
+ // dropId = cfg.normalDraw;
69
+ // }
70
+ // }
71
+ // if (dropId) {
72
+ // this.game.gameContext.waitSkills.push(dropId * 10 + 1);
73
+ // }
74
+ // }
75
+ onUpdateWaveInfo(curWave, allWave) {
76
+ super.onUpdateWaveInfo(curWave, allWave);
77
+ if (curWave > 0) {
78
+ this.reportStageInfo();
79
+ }
80
+ }
81
+ reportStageInfo() {
82
+ if (this.stageId <= 1 || this.game.onlyLogic) {
83
+ return;
84
+ }
85
+ this.markCodexTurret();
86
+ Notifier_1.Notifier.send(ListenID_1.ListenID.Battle_LogSnapShotInfo, this.gameType, {
87
+ stageId: this.stageId,
88
+ stageProgress: this.curGameProgress,
89
+ starProgress: 0,
90
+ isPassStage: false,
91
+ myFightData: this.game.getMyFightDataMap(),
92
+ gameTime: Math.ceil(this.game.getBattleTime()),
93
+ curWave: this.curWave,
94
+ allWave: this.allWave,
95
+ codexInfo: this.codeInfo,
96
+ buffs: this.buffs,
97
+ });
98
+ }
99
+ };
100
+ DailyTrialBattleModule = __decorate([
101
+ (0, BattleUtils_1.cacheFunction)("DailyTrialBattleModule")
102
+ ], DailyTrialBattleModule);
103
+ exports.default = DailyTrialBattleModule;
@@ -0,0 +1 @@
1
+ import "./DailyTrialBattleModule";
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ // 本文件由 scripts/gen-registry.mjs 自动生成,请勿手动编辑。
3
+ // 改了目录里的文件后跑 `npm run gen` 重新生成(prestart / prebuild 会自动跑)。
4
+ //
5
+ // 作用:@cacheFunction -> bufferCache
6
+ //
7
+ // 这些类靠装饰器往注册表里登记自己,而装饰器只在模块被求值时执行。
8
+ // Cocos 的资源系统会把 assets 下所有脚本加载一遍,所以引擎里天然成立;
9
+ // Node 只执行从入口 import 可达的模块,不引这一下,注册表就是空的。
10
+ //
11
+ // 共 1 个模块。下面的 import 只为副作用,不需要用到导出。
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ require("./DailyTrialBattleModule");
@@ -8,6 +8,7 @@ export default class GuildBossBattleModule extends GameModule {
8
8
  private _bossUpradeCfg;
9
9
  private _popupSkillSelectInfo;
10
10
  private _damage;
11
+ private _lastStepLoopCount;
11
12
  get damage(): number;
12
13
  init(): void;
13
14
  getMode(): number;
@@ -24,6 +25,6 @@ export default class GuildBossBattleModule extends GameModule {
24
25
  popupSkillSelectInfo(): void;
25
26
  onHurt(attackId: number, hurt: number, defender: FighterData): void;
26
27
  reportStageInfo(): void;
27
- /** 根据bossStep和当前血量计算累计扣除血条数 */
28
+ /** 根据已完成阶段、最后阶段循环轮数和当前血量计算累计扣除血条数 */
28
29
  calcBossHpDedStep(): number;
29
30
  }
@@ -30,6 +30,7 @@ let GuildBossBattleModule = class GuildBossBattleModule extends IGameModule_1.Ga
30
30
  _bossUpradeCfg;
31
31
  _popupSkillSelectInfo;
32
32
  _damage = 0;
33
+ _lastStepLoopCount = 0; //最后一阶段已完成的轮数,首次进入时为0
33
34
  get damage() {
34
35
  return this._damage;
35
36
  }
@@ -81,11 +82,13 @@ let GuildBossBattleModule = class GuildBossBattleModule extends IGameModule_1.Ga
81
82
  damage: this._damage,
82
83
  killHpCount: this.calcBossHpDedStep(),
83
84
  addBossBoxCount: this._bossStep,
85
+ curFrame: this.game.gameContext.curFrame,
84
86
  });
85
87
  }
86
88
  bossCome(fighter) {
87
89
  this._boss = fighter;
88
90
  this._bossStep = -1;
91
+ this._lastStepLoopCount = 0;
89
92
  this.bossInNextLevel();
90
93
  this.resetBossCd();
91
94
  this.game.on(fighter.ID, EntityEvent_1.EntityEvent.BeforeDead, this.bossInNextLevel, this);
@@ -100,6 +103,7 @@ let GuildBossBattleModule = class GuildBossBattleModule extends IGameModule_1.Ga
100
103
  this._bossStep++;
101
104
  if (this._bossStep >= this._bossUpradeCfg.length) {
102
105
  this._bossStep = this._bossUpradeCfg.length - 1;
106
+ this._lastStepLoopCount++;
103
107
  }
104
108
  let cfg = this._bossUpradeCfg[this._bossStep];
105
109
  this.addSetpProperty(this._bossStep, 1);
@@ -118,7 +122,7 @@ let GuildBossBattleModule = class GuildBossBattleModule extends IGameModule_1.Ga
118
122
  if (this._bossStep >= 0) {
119
123
  this.reportStageInfo();
120
124
  }
121
- Notifier_1.Notifier.send(ListenID_1.ListenID.GuildBoss_ChangedStep, this._bossStep, this._bossUpradeCfg.length);
125
+ Notifier_1.Notifier.send(ListenID_1.ListenID.GuildBoss_ChangedStep, this._bossStep, this._bossUpradeCfg.length, this._boss);
122
126
  }
123
127
  addSetpProperty(gameStep, type) {
124
128
  let cfg = this._bossUpradeCfg[gameStep];
@@ -185,9 +189,10 @@ let GuildBossBattleModule = class GuildBossBattleModule extends IGameModule_1.Ga
185
189
  damage: this._damage,
186
190
  killHpCount: this.calcBossHpDedStep(),
187
191
  addBossBoxCount: this._bossStep,
192
+ curFrame: this.game.gameContext.curFrame,
188
193
  });
189
194
  }
190
- /** 根据bossStep和当前血量计算累计扣除血条数 */
195
+ /** 根据已完成阶段、最后阶段循环轮数和当前血量计算累计扣除血条数 */
191
196
  calcBossHpDedStep() {
192
197
  let total = 0;
193
198
  // 已完成阶段的血条数直接累加hpNum
@@ -197,6 +202,11 @@ let GuildBossBattleModule = class GuildBossBattleModule extends IGameModule_1.Ga
197
202
  total += cfg.hpNum;
198
203
  }
199
204
  }
205
+ // 最后阶段每完成一轮都会回到同一阶段,需要额外累计整轮血条数。
206
+ if (this._lastStepLoopCount > 1) {
207
+ const lastCfg = this._bossUpradeCfg[this._bossUpradeCfg.length - 1];
208
+ total += this._lastStepLoopCount * lastCfg.hpNum;
209
+ }
200
210
  // 当前阶段已扣除的血条数
201
211
  if (this._boss && this._boss.bossHpSplit > 0) {
202
212
  const all = Property_1.PropertyHelper.hp(this._boss.property);
@@ -119,6 +119,7 @@ export interface IGuildBossResultData extends GuildProto.C_GUILD_BOSS_ATTACK_END
119
119
  addBossBoxCount?: number;
120
120
  killHpCount?: number;
121
121
  damage?: number;
122
+ curFrame?: number;
122
123
  }
123
124
  export interface IBattleSnapShotInfo {
124
125
  mode: string;
@@ -8,7 +8,9 @@ export declare enum SystemProperty {
8
8
  Relic,//遗物属性属性
9
9
  Gem,//海晶属性属性
10
10
  Skin,//皮肤属性属性
11
- Decoration
11
+ Decoration,//装扮属性属性
12
+ VehicleWash,//载具洗练属性
13
+ Pet
12
14
  }
13
15
  export declare const PROPERTY_SCALE = 10000;
14
16
  export declare const ATTACK_SHAKE_TIME_SCALE = 9999;
@@ -27,11 +29,11 @@ export declare class PropertyHelper {
27
29
  static addProperty(out: IProperty, prop: IProperty): void;
28
30
  static addPropertyByKeyValue(out: IProperty, key: number, value: number): void;
29
31
  static clone(prop: IProperty, out?: IProperty): IProperty;
30
- static normalize(out: IProperty): void;
32
+ static normalize(out: IProperty, isPvp?: boolean): void;
31
33
  static battlePower(out: IProperty): number;
32
34
  static getExp(exp: number, out: IProperty): number;
33
35
  static atk(out: IProperty): number;
34
- static hp(out: IProperty): number;
36
+ static hp(out: IProperty, isPvp?: boolean): number;
35
37
  static shieldCount(out: IProperty): number;
36
38
  static shield(out: IProperty): number;
37
39
  static miss(out: IProperty): number;
@@ -57,5 +59,22 @@ export declare class PropertyHelper {
57
59
  static showPreview(attr: readonly number[]): {
58
60
  name: string;
59
61
  val: string;
62
+ icon: string;
60
63
  };
64
+ /** 回合出手速度 */
65
+ static turnSpeed(out: IProperty): number;
66
+ /** 回合制连击概率 */
67
+ static turnComboRatio(out: IProperty): number;
68
+ /** 回合制反击概率 */
69
+ static turnCounterRatio(out: IProperty): number;
70
+ /** 回合制 击晕概率 */
71
+ static turnStunRatio(out: IProperty): number;
72
+ /** 回合制 闪避概率 */
73
+ static turnMissRatio(out: IProperty): number;
74
+ /** 回合制 破甲概率 */
75
+ static turnCritRatio(out: IProperty): number;
76
+ /** 回合制护盾恢复 */
77
+ static turnShieldHeal(out: IProperty): number;
78
+ /** 展示属性对比预览值 */
79
+ static showContrastPreview(oldVal: readonly number[], newVal: readonly number[]): string;
61
80
  }
@@ -16,6 +16,8 @@ var SystemProperty;
16
16
  SystemProperty[SystemProperty["Gem"] = 1 << offset++] = "Gem";
17
17
  SystemProperty[SystemProperty["Skin"] = 1 << offset++] = "Skin";
18
18
  SystemProperty[SystemProperty["Decoration"] = 1 << offset++] = "Decoration";
19
+ SystemProperty[SystemProperty["VehicleWash"] = 1 << offset++] = "VehicleWash";
20
+ SystemProperty[SystemProperty["Pet"] = 1 << offset++] = "Pet";
19
21
  })(SystemProperty || (exports.SystemProperty = SystemProperty = {}));
20
22
  exports.PROPERTY_SCALE = 10000; //属性万分比
21
23
  exports.ATTACK_SHAKE_TIME_SCALE = 9999; //攻击前摇时间万分比
@@ -83,7 +85,7 @@ class PropertyHelper {
83
85
  }
84
86
  return newProp;
85
87
  }
86
- static normalize(out) {
88
+ static normalize(out, isPvp = false) {
87
89
  //攻击
88
90
  out[10010] = this.atk(out);
89
91
  out[10020] = 0;
@@ -91,9 +93,10 @@ class PropertyHelper {
91
93
  out[10030] = 0;
92
94
  out[10040] = 0;
93
95
  //生命
94
- out[10050] = this.hp(out);
96
+ out[10050] = this.hp(out, isPvp);
95
97
  out[10060] = 0;
96
98
  out[10061] = 0;
99
+ out[51300] = 0;
97
100
  //护盾
98
101
  out[10090] = this.shield(out);
99
102
  out[10100] = 0;
@@ -145,8 +148,8 @@ class PropertyHelper {
145
148
  return Math.ceil(out[10010] * (1 + out[10020] / exports.PROPERTY_SCALE) * (1 + out[10021] / exports.PROPERTY_SCALE) * (1 + out[10040] / exports.PROPERTY_SCALE) + out[10030]);
146
149
  }
147
150
  //血量
148
- static hp(out) {
149
- return Math.ceil(out[10050] * (1 + out[10060] / exports.PROPERTY_SCALE) * (1 + out[10061] / exports.PROPERTY_SCALE));
151
+ static hp(out, isPvp = false) {
152
+ return Math.ceil(out[10050] * (1 + out[10060] / exports.PROPERTY_SCALE) * (1 + out[10061] / exports.PROPERTY_SCALE) * (isPvp ? 1 : (1 + out[51300] / exports.PROPERTY_SCALE)));
150
153
  }
151
154
  //护盾次数
152
155
  static shieldCount(out) {
@@ -233,7 +236,42 @@ class PropertyHelper {
233
236
  static showPreview(attr) {
234
237
  let cfg = Cfg_1.Cfg.ProDefine.get(attr[0]);
235
238
  let val = cfg.ratioType == 1 ? `${attr[1] / 100}% ` : `${attr[1]}`;
236
- return { name: cfg.proName.translate(), val };
239
+ return { name: cfg.proName.translate(), val, icon: cfg.attrIcon };
240
+ }
241
+ /** 回合出手速度 */
242
+ static turnSpeed(out) {
243
+ return Math.ceil(out[50000] * (1 + out[50001] / exports.PROPERTY_SCALE));
244
+ }
245
+ /** 回合制连击概率 */
246
+ static turnComboRatio(out) {
247
+ return out[50100] + out[50102];
248
+ }
249
+ /** 回合制反击概率 */
250
+ static turnCounterRatio(out) {
251
+ return out[50200] + out[50201];
252
+ }
253
+ /** 回合制 击晕概率 */
254
+ static turnStunRatio(out) {
255
+ return out[50200] + out[50201];
256
+ }
257
+ /** 回合制 闪避概率 */
258
+ static turnMissRatio(out) {
259
+ return out[50400] + out[50401];
260
+ }
261
+ /** 回合制 破甲概率 */
262
+ static turnCritRatio(out) {
263
+ return out[50500] + out[50501];
264
+ }
265
+ /** 回合制护盾恢复 */
266
+ static turnShieldHeal(out) {
267
+ return out[50600] + out[50601];
268
+ }
269
+ /** 展示属性对比预览值 */
270
+ static showContrastPreview(oldVal, newVal) {
271
+ let cfg = Cfg_1.Cfg.ProDefine.get(oldVal[0]);
272
+ let diff = newVal[1] - oldVal[1];
273
+ let showDiff = cfg.ratioType == 1 ? `${diff / 100}% ` : `${diff}`;
274
+ return showDiff;
237
275
  }
238
276
  }
239
277
  exports.PropertyHelper = PropertyHelper;
@@ -17,13 +17,20 @@ export interface LocalFight {
17
17
  [key: string]: SkinProto.ISkin;
18
18
  };
19
19
  decoration?: DecorationProto.IDecorationItem[];
20
+ vehicleWash?: VehicleProto.IPurifyPlan;
21
+ pets?: {
22
+ [key: number]: PetProto.IPet;
23
+ };
24
+ petSlots?: {
25
+ [key: number]: PetProto.ISlot;
26
+ };
20
27
  }
21
28
  export default class PropertyUtil {
22
29
  static roleSystem: SystemProperty[];
23
- static petSystem: SystemProperty[];
30
+ static towerSystem: SystemProperty[];
24
31
  static reset(): void;
25
32
  static tempFight: LocalFight;
26
- static getFightPropertyByBattlePlayer(roleId: number, playerData: PlayerProto.IBattlePlayer, out?: IProperty, needNormal?: boolean): IProperty;
33
+ static getFightPropertyByBattlePlayer(roleId: number, playerData: PlayerProto.IBattlePlayer, out?: IProperty, needNormal?: boolean, isPvp?: boolean): IProperty;
27
34
  static getAllSkinMap(skin: {
28
35
  [key: string]: number;
29
36
  }): {
@@ -58,4 +65,12 @@ export default class PropertyUtil {
58
65
  private static getAllSkinProperty;
59
66
  /** 装扮系统属性投放 */
60
67
  private static getAllDecorationProperty;
68
+ /** 载具洗练系统属性投放 */
69
+ private static getAllVehicleWashProperty;
70
+ /** 宠物系统属性投放(上阵属性 + 拥有属性) */
71
+ static getAllPetProperty(pets: {
72
+ [key: number]: PetProto.IPet;
73
+ }, petSlots: {
74
+ [key: number]: PetProto.ISlot;
75
+ }, out: IProperty): void;
61
76
  }
@@ -5,8 +5,8 @@ const Property_1 = require("./Property");
5
5
  const mainRoleId = 200000;
6
6
  const DefaultWeapon = 810000;
7
7
  class PropertyUtil {
8
- static roleSystem = [Property_1.SystemProperty.Base, Property_1.SystemProperty.Equip, Property_1.SystemProperty.Talent, Property_1.SystemProperty.Talent_Tree, Property_1.SystemProperty.Turret, Property_1.SystemProperty.Relic, Property_1.SystemProperty.Gem, Property_1.SystemProperty.Skin, Property_1.SystemProperty.Decoration];
9
- static petSystem = [Property_1.SystemProperty.Base, Property_1.SystemProperty.Level];
8
+ static roleSystem = [Property_1.SystemProperty.Base, Property_1.SystemProperty.Equip, Property_1.SystemProperty.Talent, Property_1.SystemProperty.Talent_Tree, Property_1.SystemProperty.Turret, Property_1.SystemProperty.Relic, Property_1.SystemProperty.Gem, Property_1.SystemProperty.Skin, Property_1.SystemProperty.Decoration, Property_1.SystemProperty.VehicleWash, Property_1.SystemProperty.Pet];
9
+ static towerSystem = [Property_1.SystemProperty.Base, Property_1.SystemProperty.Level];
10
10
  static reset() {
11
11
  }
12
12
  static tempFight = {
@@ -17,7 +17,7 @@ class PropertyUtil {
17
17
  talent_tree: {},
18
18
  gems: [],
19
19
  };
20
- static getFightPropertyByBattlePlayer(roleId, playerData, out, needNormal = true) {
20
+ static getFightPropertyByBattlePlayer(roleId, playerData, out, needNormal = true, isPvp = false) {
21
21
  out = out || Property_1.PropertyHelper.createProperty();
22
22
  let roleCfg = Cfg_1.Cfg.Role.get(roleId);
23
23
  let tempFight = this.tempFight;
@@ -27,6 +27,7 @@ class PropertyUtil {
27
27
  tempFight.talents = playerData.talents || [];
28
28
  tempFight.turretMap = playerData.turretMap || {};
29
29
  tempFight.decoration = playerData.unlockDecorationItems || [];
30
+ tempFight.vehicleWash = playerData.curPurifyPlan || {};
30
31
  let reliceMap = playerData.relicMap || {};
31
32
  tempFight.relics = [];
32
33
  for (let key in reliceMap) {
@@ -42,12 +43,12 @@ class PropertyUtil {
42
43
  tempFight.skins = this.getAllSkinMap(playerData.skinMap);
43
44
  let property = PropertyUtil.getFightProperty(tempFight);
44
45
  Property_1.PropertyHelper.clone(property, out);
45
- if (roleCfg.type === 2) {
46
- let property = this.getFightPropertyByBattlePlayer(mainRoleId, playerData, null, false);
46
+ if (roleCfg.type === 2 || roleCfg.type === 8) {
47
+ let property = this.getFightPropertyByBattlePlayer(mainRoleId, playerData, null, false, isPvp);
47
48
  Property_1.PropertyHelper.addProperty(out, property);
48
49
  }
49
50
  if (needNormal) {
50
- Property_1.PropertyHelper.normalize(out);
51
+ Property_1.PropertyHelper.normalize(out, isPvp);
51
52
  }
52
53
  return out;
53
54
  }
@@ -61,7 +62,7 @@ class PropertyUtil {
61
62
  // 根据服务端传来的结构计算属性
62
63
  static getFightProperty(fight) {
63
64
  let roleCfg = Cfg_1.Cfg.Role.get(fight.roleId);
64
- let system = roleCfg.type === 1 ? this.roleSystem : this.petSystem;
65
+ let system = roleCfg.type === 1 ? this.roleSystem : this.towerSystem;
65
66
  let all = Property_1.PropertyHelper.createProperty();
66
67
  for (let i = 0; i < system.length; i++) {
67
68
  this.handleSystemByFight(system[i], all, fight, roleCfg); //个人
@@ -109,6 +110,12 @@ class PropertyUtil {
109
110
  case Property_1.SystemProperty.Decoration:
110
111
  this.getAllDecorationProperty(fight.decoration, out);
111
112
  break;
113
+ case Property_1.SystemProperty.VehicleWash:
114
+ this.getAllVehicleWashProperty(fight.vehicleWash, out);
115
+ break;
116
+ case Property_1.SystemProperty.Pet:
117
+ this.getAllPetProperty(fight.pets, fight.petSlots, out);
118
+ break;
112
119
  }
113
120
  }
114
121
  static getEquipProperty(equipId, part) {
@@ -280,5 +287,58 @@ class PropertyUtil {
280
287
  Property_1.PropertyHelper.addPropertyByArray(out, cfg.attr);
281
288
  });
282
289
  }
290
+ /** 载具洗练系统属性投放 */
291
+ static getAllVehicleWashProperty(vehicleWash, out) {
292
+ const affixItems = vehicleWash?.affixItems;
293
+ if (!affixItems)
294
+ return;
295
+ affixItems.forEach(item => {
296
+ if (!item || !item.id)
297
+ return;
298
+ const cfg = Cfg_1.Cfg.VehicleWashAffix.get(item.id);
299
+ if (!cfg)
300
+ return;
301
+ Property_1.PropertyHelper.addPropertyByKeyValue(out, cfg.attrType, item.value || 0);
302
+ });
303
+ }
304
+ /** 宠物系统属性投放(上阵属性 + 拥有属性) */
305
+ static getAllPetProperty(pets, petSlots, out) {
306
+ if (!out)
307
+ return;
308
+ // 1. 上阵属性:随槽位等级提升,上阵生效,宠物品质越高获得加成越高
309
+ if (petSlots) {
310
+ for (const slotKey in petSlots) {
311
+ const slot = petSlots[slotKey];
312
+ if (!slot || !slot.petId || slot.petId <= 0)
313
+ continue;
314
+ const slotLv = slot.level || 1;
315
+ const slotCfg = Cfg_1.Cfg.PetSlotLv.get(slotLv);
316
+ if (!slotCfg || !slotCfg.slotLvAttr)
317
+ continue;
318
+ const petCfg = Cfg_1.Cfg.Pet.get(slot.petId);
319
+ const rate = petCfg?.attrRate || 0;
320
+ slotCfg.slotLvAttr.forEach(([attrId, baseVal]) => {
321
+ const extraVal = Math.floor(baseVal * (rate / 10000));
322
+ const totalVal = baseVal + extraVal;
323
+ Property_1.PropertyHelper.addPropertyByKeyValue(out, attrId, totalVal);
324
+ });
325
+ }
326
+ }
327
+ // 2. 拥有属性:宠物解锁后生效,随宠物星级提升
328
+ if (pets) {
329
+ for (const petKey in pets) {
330
+ const pet = pets[petKey];
331
+ if (!pet || !pet.id)
332
+ continue;
333
+ const star = pet.star || 0;
334
+ if (star <= 0)
335
+ continue;
336
+ const starCfg = Cfg_1.Cfg.PetStar.find({ pet: pet.id, star });
337
+ if (starCfg && starCfg.StarLvAttr) {
338
+ Property_1.PropertyHelper.addPropertyByArray(out, starCfg.StarLvAttr);
339
+ }
340
+ }
341
+ }
342
+ }
283
343
  }
284
344
  exports.default = PropertyUtil;
@@ -1,5 +1,8 @@
1
+ import type FighterData from "../battle/entity/FighterData";
1
2
  import { GameModule } from "../battle/IGameModule";
2
3
  export default class RelicBattleModule extends GameModule {
4
+ private _damage;
5
+ get damage(): number;
3
6
  init(): void;
4
7
  getMode(): number;
5
8
  gameStart(): void;
@@ -8,4 +11,6 @@ export default class RelicBattleModule extends GameModule {
8
11
  gameFinish(isWin: boolean, isCross?: boolean): void;
9
12
  onUpdateWaveInfo(curWave: number, allWave: number): void;
10
13
  reportStageInfo(): void;
14
+ onHurt(attackId: number, hurt: number, defender: FighterData): void;
15
+ getScore(damage: number): number;
11
16
  }
@@ -5,19 +5,27 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
6
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
7
  };
8
+ var __importDefault = (this && this.__importDefault) || function (mod) {
9
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10
+ };
8
11
  Object.defineProperty(exports, "__esModule", { value: true });
9
12
  const Cfg_1 = require("../../config/Cfg");
10
13
  const ConstConfigCfg_1 = require("../../config/ConstConfigCfg");
14
+ const RelicDungeonConfigCfg_1 = require("../../config/RelicDungeonConfigCfg");
11
15
  const Notifier_1 = require("../../framework/notify/Notifier");
12
16
  const ListenID_1 = require("../../ListenID");
17
+ const battle_interface_1 = require("../battle/battle.interface");
13
18
  const Collider_1 = require("../battle/collider/Collider");
14
19
  const ColliderPool_1 = require("../battle/collider/ColliderPool");
15
20
  const IGameModule_1 = require("../battle/IGameModule");
21
+ const BattleInputCodec_1 = __importDefault(require("../battle/util/BattleInputCodec"));
16
22
  const BattleUtils_1 = require("../battle/util/BattleUtils");
17
23
  let RelicBattleModule = class RelicBattleModule extends IGameModule_1.GameModule {
24
+ _damage = 0;
25
+ get damage() { return this._damage; }
18
26
  init() {
19
27
  this.moduleState.reliveTime = Cfg_1.Cfg.ConstConfig.get(ConstConfigCfg_1.ConstConfigDefine.stage_relive_count)?.value;
20
- this.myPosIndexs = [[0, 0], [-93, 75 - 24], [93, 75 - 24], [-93, -75 - 24], [93, -75 - 24]];
28
+ this.myPosIndexs = [[0, -200], [-93, -125 - 24], [93, -125 - 24], [-93, -275 - 24], [93, -275 - 24]];
21
29
  this.game.rolePosType = 1;
22
30
  }
23
31
  getMode() {
@@ -39,6 +47,7 @@ let RelicBattleModule = class RelicBattleModule extends IGameModule_1.GameModule
39
47
  mainRole.shape = shape;
40
48
  shape.group = Collider_1.ColliderMask.My;
41
49
  mainRole.isDirty |= 1 /* LocalDirtyFlag.POSITION */;
50
+ this._damage = 0;
42
51
  // const levelCfg = Cfg.RelicDungeonLevel.get(this.stageId);
43
52
  // for (let i = 0; i < levelCfg.turretPos.length; i++) {
44
53
  // let pos = levelCfg.turretPos[i];
@@ -62,15 +71,17 @@ let RelicBattleModule = class RelicBattleModule extends IGameModule_1.GameModule
62
71
  return;
63
72
  this.markCodexTurret();
64
73
  Notifier_1.Notifier.send(ListenID_1.ListenID.RelicDungeon_RequestFinishGame, {
74
+ myFightData: this.game.getMyFightDataMap(),
65
75
  stageId: this.stageId,
66
76
  stageProgress: this.curGameProgress,
67
77
  isPassStage: isWin,
68
- myFightData: this.game.getMyFightDataMap(),
69
78
  gameTime: Math.ceil(this.game.getBattleTime()),
70
79
  curWave: this.curWave,
71
80
  allWave: this.allWave,
72
81
  items: [],
82
+ battleFrames: isWin ? BattleInputCodec_1.default.encodeFrames(this.game.getBattleFrames()) : [],
73
83
  codexInfo: this.codeInfo,
84
+ newPass: false,
74
85
  });
75
86
  }
76
87
  onUpdateWaveInfo(curWave, allWave) {
@@ -93,6 +104,19 @@ let RelicBattleModule = class RelicBattleModule extends IGameModule_1.GameModule
93
104
  codexInfo: this.codeInfo,
94
105
  });
95
106
  }
107
+ onHurt(attackId, hurt, defender) {
108
+ super.onHurt(attackId, hurt, defender);
109
+ if (defender.campType !== battle_interface_1.CampType.ENEMY)
110
+ return;
111
+ this._damage += hurt;
112
+ const score = this.getScore(this._damage);
113
+ Notifier_1.Notifier.send(ListenID_1.ListenID.RelicDungeon_UpdateTotalDmg, this._damage, score);
114
+ }
115
+ //伤害转积分
116
+ getScore(damage) {
117
+ const cfg = Cfg_1.Cfg.RelicDungeonConfig.get(RelicDungeonConfigCfg_1.RelicDungeonConfigDefine.score_ratio);
118
+ return Math.floor(damage * cfg.value) || 0;
119
+ }
96
120
  };
97
121
  RelicBattleModule = __decorate([
98
122
  (0, BattleUtils_1.cacheFunction)("RelicBattleModule")
@@ -51,6 +51,7 @@ let StageBattleModule = class StageBattleModule extends IGameModule_1.GameModule
51
51
  battleFrames: isWin ? BattleInputCodec_1.default.encodeFrames(this.game.getBattleFrames()) : [],
52
52
  codexInfo: this.codeInfo,
53
53
  killMonsterCount: this.killNormal + this.killBoss,
54
+ enemyKillTypeMap: this.killTypeList,
54
55
  });
55
56
  }
56
57
  pushLevelUpSelectSkill(level) {