captainbattle 1.0.6 → 1.0.8

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 (314) 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 +220 -13
  312. package/dist/register-all.d.ts +2 -0
  313. package/dist/register-all.js +2 -0
  314. package/package.json +1 -1
@@ -26,7 +26,8 @@ class GameModule {
26
26
  stageId = 0;
27
27
  talentSkillIds = [];
28
28
  myPosIndexs = [[0, -697], [-120, -740], [120, -740], [-280, -740], [280, -740]];
29
- moduleState = { playAudio: true, showEffect: true, showHp: true, showDamage: true, playShake: true, timeScale: 1, noCostPorjectile: false, autoFight: true, logDetial: true, isPvp: false, reliveTime: 0, noPopSelectSkill: false };
29
+ myPetsIndexs = [[-50, -750], [50, -750]];
30
+ moduleState = { playAudio: true, showEffect: true, showHp: true, showDamage: true, playShake: true, timeScale: 1, noCostPorjectile: false, autoFight: true, logDetial: true, isPvp: false, reliveTime: 0, noPopSelectSkill: false, isTurn: false };
30
31
  fightExpCfgs = [];
31
32
  maxExpLevel = 0;
32
33
  killNormal = 0;
@@ -35,6 +36,7 @@ class GameModule {
35
36
  playPro = null;
36
37
  /**精英宝箱刷新次数保底 */
37
38
  getBoxMinCt = 0;
39
+ killTypeList = {};
38
40
  codeInfo = null;
39
41
  constructor(type, game) {
40
42
  this.game = game;
@@ -46,10 +48,10 @@ class GameModule {
46
48
  }
47
49
  }
48
50
  setFighterPosition(fighter, data) {
49
- if (fighter.campType === battle_interface_1.CampType.MY && fighter.subType === battle_interface_1.SubEntityType.ROLE || fighter.subType === battle_interface_1.SubEntityType.PET) {
50
- let list = fighter.game.gameContext.curBronRole[data.playerId];
51
+ if (fighter.campType === battle_interface_1.CampType.MY && fighter.subType === battle_interface_1.SubEntityType.ROLE || fighter.subType === battle_interface_1.SubEntityType.TOWER || fighter.subType === battle_interface_1.SubEntityType.PET) {
52
+ let list = fighter.subType === battle_interface_1.SubEntityType.PET ? fighter.game.gameContext.curBornPet[data.playerId] : fighter.game.gameContext.curBornRole[data.playerId];
51
53
  let posIndex = list.length - 1;
52
- let pos = this.myPosIndexs[posIndex];
54
+ let pos = fighter.subType === battle_interface_1.SubEntityType.PET ? this.myPetsIndexs[posIndex] : this.myPosIndexs[posIndex];
53
55
  fighter.setPosition(pos[0], pos[1]);
54
56
  }
55
57
  else {
@@ -250,7 +252,7 @@ class GameModule {
250
252
  const selectedSkill = skills[skillIndex];
251
253
  skillTag.push(selectedSkill);
252
254
  skillIdList.push(selectedSkill.skillId);
253
- skills.splice(skillIndex, 1);
255
+ BattleUtils_1.BattleUtils.removeAt(skills, skillIndex);
254
256
  if (roleStarMap) {
255
257
  this.addRoleStar(selectedSkill, roleStarMap);
256
258
  if (i < getNum - 1) {
@@ -272,7 +274,7 @@ class GameModule {
272
274
  }
273
275
  let curSkills = this.game.gameContext.activeSkills[this.game.selfPlayerId];
274
276
  let drawTagMap = BattleUtils_1.BattleUtils.getDrawTagMap();
275
- let curBorn = this.game.gameContext.curBronRole[this.game.selfPlayerId];
277
+ let curBorn = this.game.gameContext.curBornRole[this.game.selfPlayerId];
276
278
  let bornFights = this.game.bornRoleFightInfo[this.game.selfPlayerId];
277
279
  let myFightDataByRoleId = {};
278
280
  for (let key in this.game.gameContext.myFightData) {
@@ -519,11 +521,22 @@ class GameModule {
519
521
  }
520
522
  //处理怪物死亡相关逻辑
521
523
  notifyFighterDead(fighter) {
524
+ this.handleKillType(fighter);
522
525
  this.handleDropExp(fighter);
523
526
  this.handleBoxType(fighter);
524
527
  this.handleCallDeadDrop(fighter);
525
528
  this.handleDragonDead(fighter);
526
529
  }
530
+ handleKillType(fighter) {
531
+ if (fighter.campType === battle_interface_1.CampType.ENEMY) {
532
+ const subType = fighter.cfg && fighter.cfg.subType;
533
+ if (subType && subType.length) {
534
+ for (let i = 0; i < subType.length; i++) {
535
+ this.killTypeList[subType[i]] = (this.killTypeList[subType[i]] || 0) + 1;
536
+ }
537
+ }
538
+ }
539
+ }
527
540
  //处理怪物掉落经验
528
541
  handleDropExp(fighter) {
529
542
  if (fighter.campType === battle_interface_1.CampType.ENEMY && fighter.dropExp > 0 && !fighter.isKillSelf) {
@@ -9,12 +9,13 @@ export declare enum EntityType {
9
9
  export declare enum SubEntityType {
10
10
  NONE = 0,
11
11
  ROLE = 1,
12
- PET = 2,
12
+ TOWER = 2,
13
13
  BOAT = 3,
14
14
  DRAGON = 4,
15
15
  DRAGON_BODY = 5,
16
16
  CALL = 6,
17
- OBSTACLE = 7
17
+ OBSTACLE = 7,
18
+ PET = 8
18
19
  }
19
20
  export declare enum ETargetType {
20
21
  CLOSE = 1,//最近目标
@@ -47,8 +48,10 @@ export declare enum CampType {
47
48
  export declare enum EGameModule {
48
49
  Stage = "StageBattleModule",//主线战斗 0
49
50
  RelicDungeon = "RelicBattleModule",//守卫小岛 1
50
- CheatDPS = "CheatDPSBattleModule",
51
- GuildBoss = "GuildBossBattleModule"
51
+ CheatDPS = "CheatDPSBattleModule",//秘籍战斗 2
52
+ GuildBoss = "GuildBossBattleModule",//船队boss 3
53
+ DailyTrial = "DailyTrialBattleModule",//每日试炼 4
54
+ Arena = "ArenaBattleModule"
52
55
  }
53
56
  export declare const enum GameState {
54
57
  NONE = 0,
@@ -59,7 +62,8 @@ export declare const enum GameState {
59
62
  export declare const enum DisplayType {
60
63
  Damage = 0,
61
64
  Heal = 1,//治疗
62
- State = 2
65
+ State = 2,//各种状态
66
+ Combo = 3
63
67
  }
64
68
  export interface IImpact {
65
69
  type: number;
@@ -75,6 +79,7 @@ export interface IImpact {
75
79
  hitScale?: number;
76
80
  hitScaleY?: number;
77
81
  hitForceTime?: number;
82
+ projectileTime?: number;
78
83
  time?: number;
79
84
  p1?: number;
80
85
  p2?: number;
@@ -132,6 +137,8 @@ export interface IFighterInfo {
132
137
  id: number;
133
138
  property: IProperty;
134
139
  skills: number[];
140
+ comboSkillId?: number;
141
+ counterSkillId?: number;
135
142
  waitCallSkills?: number[];
136
143
  waitToBorn?: number[];
137
144
  waitToLearn?: number[];
@@ -142,6 +149,7 @@ export interface IFighterInfo {
142
149
  equipList?: number[];
143
150
  fashionId?: number;
144
151
  weaponFashionId?: number;
152
+ vehicleId?: number;
145
153
  hpNum?: number;
146
154
  dropExp?: number;
147
155
  wave?: number;
@@ -149,6 +157,7 @@ export interface IFighterInfo {
149
157
  dropId?: number;
150
158
  subIFighterInfo?: IFighterInfo[];
151
159
  resPath?: string;
160
+ collision?: number[];
152
161
  }
153
162
  export interface HitEvent {
154
163
  isRealHit?: boolean;
@@ -158,6 +167,7 @@ export interface HitEvent {
158
167
  isOneKill?: boolean;
159
168
  isImmune?: number;
160
169
  isNoHit?: boolean;
170
+ isIgnoreMiss?: boolean;
161
171
  }
162
172
  export interface ProjectileSourceHitContext {
163
173
  posionLayer?: number;
@@ -193,7 +203,8 @@ export declare enum GameInputTypeEnum {
193
203
  LearnSkills = 2,
194
204
  AddPartner = 3,
195
205
  TimePast = 4,
196
- Relive = 5
206
+ Relive = 5,
207
+ UseSkill = 6
197
208
  }
198
209
  export interface GameAdjustAtkDir {
199
210
  type: GameInputTypeEnum.AdjustAtkDir;
@@ -223,7 +234,12 @@ export interface GameRelive {
223
234
  type: GameInputTypeEnum.Relive;
224
235
  playerId: number;
225
236
  }
226
- export type GameInput = GameTimePast | GameAdjustAtkDir | GameLearnSkills | GameAddPartner | GameRelive;
237
+ export interface GameUseSkill {
238
+ type: GameInputTypeEnum.UseSkill;
239
+ ownerId: number;
240
+ skillId: number;
241
+ }
242
+ export type GameInput = GameTimePast | GameAdjustAtkDir | GameLearnSkills | GameAddPartner | GameRelive | GameUseSkill;
227
243
  export interface IBattleFrameData {
228
244
  frame: number;
229
245
  data: GameInput;
@@ -246,3 +262,11 @@ export interface SkillEffectByIdParams {
246
262
  matchLen?: number;
247
263
  needSyncScale?: boolean;
248
264
  }
265
+ export interface IPVPPropertyCompare {
266
+ proId: number;
267
+ ratioType?: number;
268
+ proValue1: number;
269
+ proValue2: number;
270
+ up1: number;
271
+ up2: number;
272
+ }
@@ -11,12 +11,13 @@ var SubEntityType;
11
11
  (function (SubEntityType) {
12
12
  SubEntityType[SubEntityType["NONE"] = 0] = "NONE";
13
13
  SubEntityType[SubEntityType["ROLE"] = 1] = "ROLE";
14
- SubEntityType[SubEntityType["PET"] = 2] = "PET";
14
+ SubEntityType[SubEntityType["TOWER"] = 2] = "TOWER";
15
15
  SubEntityType[SubEntityType["BOAT"] = 3] = "BOAT";
16
16
  SubEntityType[SubEntityType["DRAGON"] = 4] = "DRAGON";
17
17
  SubEntityType[SubEntityType["DRAGON_BODY"] = 5] = "DRAGON_BODY";
18
18
  SubEntityType[SubEntityType["CALL"] = 6] = "CALL";
19
19
  SubEntityType[SubEntityType["OBSTACLE"] = 7] = "OBSTACLE";
20
+ SubEntityType[SubEntityType["PET"] = 8] = "PET";
20
21
  })(SubEntityType || (exports.SubEntityType = SubEntityType = {}));
21
22
  var ETargetType;
22
23
  (function (ETargetType) {
@@ -56,6 +57,8 @@ var EGameModule;
56
57
  EGameModule["RelicDungeon"] = "RelicBattleModule";
57
58
  EGameModule["CheatDPS"] = "CheatDPSBattleModule";
58
59
  EGameModule["GuildBoss"] = "GuildBossBattleModule";
60
+ EGameModule["DailyTrial"] = "DailyTrialBattleModule";
61
+ EGameModule["Arena"] = "ArenaBattleModule";
59
62
  })(EGameModule || (exports.EGameModule = EGameModule = {}));
60
63
  var GameInputTypeEnum;
61
64
  (function (GameInputTypeEnum) {
@@ -64,6 +67,7 @@ var GameInputTypeEnum;
64
67
  GameInputTypeEnum[GameInputTypeEnum["AddPartner"] = 3] = "AddPartner";
65
68
  GameInputTypeEnum[GameInputTypeEnum["TimePast"] = 4] = "TimePast";
66
69
  GameInputTypeEnum[GameInputTypeEnum["Relive"] = 5] = "Relive";
70
+ GameInputTypeEnum[GameInputTypeEnum["UseSkill"] = 6] = "UseSkill";
67
71
  })(GameInputTypeEnum || (exports.GameInputTypeEnum = GameInputTypeEnum = {}));
68
72
  let offset = 0;
69
73
  var DEBUG_EVENT;
@@ -70,6 +70,31 @@ export declare namespace Buff {
70
70
  deltaTime: number;
71
71
  cfgParam1: number;
72
72
  cfgParam2: number;
73
+ /**
74
+ * 获取权威值快照;out 可复用容器。
75
+ * hitData 为命中处理期的池化瞬态对象(enter/exit 时均为 null),不进入快照。
76
+ */
77
+ getValueSnapshot(out?: IBuffItemValueSnapshot): IBuffItemValueSnapshot;
78
+ /** 从权威值快照恢复(BuffPool 回收复用同一实例,字段全量覆盖) */
79
+ resetFromSnapshot(snapshot: IBuffItemValueSnapshot): void;
80
+ }
81
+ /** BuffItem 权威值快照;hitData 为瞬态池化对象不进入快照 */
82
+ interface IBuffItemValueSnapshot {
83
+ buffTypeId: number;
84
+ buffTime: number;
85
+ curBuffTime: number;
86
+ buffValue: number;
87
+ triggerRatio: number;
88
+ buffTag: number;
89
+ caster: number;
90
+ buffLayer: number;
91
+ skillId: number;
92
+ context: ExtraParam;
93
+ triggerType: number[];
94
+ triggerNum: number;
95
+ deltaTime: number;
96
+ cfgParam1: number;
97
+ cfgParam2: number;
73
98
  }
74
99
  interface BuffEffectMap {
75
100
  [key: string]: BuffEffecItem;
@@ -4,6 +4,7 @@ exports.Buff = void 0;
4
4
  exports.getBuffCaster = getBuffCaster;
5
5
  exports.getBuffImpact = getBuffImpact;
6
6
  const Cfg_1 = require("../../../config/Cfg");
7
+ const BaseEntityData_1 = require("../entity/BaseEntityData");
7
8
  function getBuffCaster(entity, buff) {
8
9
  return entity.ID === buff.caster
9
10
  ? entity
@@ -58,6 +59,48 @@ var Buff;
58
59
  deltaTime = 0;
59
60
  cfgParam1 = 0;
60
61
  cfgParam2 = 0;
62
+ /**
63
+ * 获取权威值快照;out 可复用容器。
64
+ * hitData 为命中处理期的池化瞬态对象(enter/exit 时均为 null),不进入快照。
65
+ */
66
+ getValueSnapshot(out) {
67
+ const snapshot = out || {};
68
+ snapshot.buffTypeId = this.buffTypeId;
69
+ snapshot.buffTime = this.buffTime;
70
+ snapshot.curBuffTime = this.curBuffTime;
71
+ snapshot.buffValue = this.buffValue;
72
+ snapshot.triggerRatio = this.triggerRatio;
73
+ snapshot.buffTag = this.buffTag;
74
+ snapshot.caster = this.caster;
75
+ snapshot.buffLayer = this.buffLayer;
76
+ snapshot.skillId = this.skillId;
77
+ snapshot.context = (0, BaseEntityData_1.copySnapshotValue)(this.context, snapshot.context);
78
+ snapshot.triggerType = (0, BaseEntityData_1.copySnapshotValue)(this.triggerType, snapshot.triggerType);
79
+ snapshot.triggerNum = this.triggerNum;
80
+ snapshot.deltaTime = this.deltaTime;
81
+ snapshot.cfgParam1 = this.cfgParam1;
82
+ snapshot.cfgParam2 = this.cfgParam2;
83
+ return snapshot;
84
+ }
85
+ /** 从权威值快照恢复(BuffPool 回收复用同一实例,字段全量覆盖) */
86
+ resetFromSnapshot(snapshot) {
87
+ this.buffTypeId = snapshot.buffTypeId;
88
+ this.buffTime = snapshot.buffTime;
89
+ this.curBuffTime = snapshot.curBuffTime;
90
+ this.buffValue = snapshot.buffValue;
91
+ this.triggerRatio = snapshot.triggerRatio;
92
+ this.buffTag = snapshot.buffTag;
93
+ this.caster = snapshot.caster;
94
+ this.buffLayer = snapshot.buffLayer;
95
+ this.skillId = snapshot.skillId;
96
+ this.context = (0, BaseEntityData_1.copySnapshotValue)(snapshot.context, this.context);
97
+ this.triggerType = (0, BaseEntityData_1.copySnapshotValue)(snapshot.triggerType, this.triggerType);
98
+ this.triggerNum = snapshot.triggerNum;
99
+ this.hitData = null;
100
+ this.deltaTime = snapshot.deltaTime;
101
+ this.cfgParam1 = snapshot.cfgParam1;
102
+ this.cfgParam2 = snapshot.cfgParam2;
103
+ }
61
104
  }
62
105
  Buff.BuffItem = BuffItem;
63
106
  })(Buff || (exports.Buff = Buff = {}));
@@ -218,6 +218,11 @@ function handleProjectileStay(_entity, buff, param) {
218
218
  }
219
219
  return false;
220
220
  }
221
+ /** ProjectileMergeFinish — 子弹融合完成时,可选配 triggerType[1] 指定 skillId */
222
+ function handleProjectileMergeFinish(_entity, buff, param) {
223
+ const projectile = param;
224
+ return !buff.triggerType[1] || projectile.skillId === buff.triggerType[1];
225
+ }
221
226
  /** ProjectileSubImpactAll — 子弹子impact全部触发时 */
222
227
  function handleProjectileSubImpactAll(_entity, buff, param, param2) {
223
228
  const projectile = param2;
@@ -344,7 +349,7 @@ function handleBuffTrigger(entity, buff, param) {
344
349
  }
345
350
  return false;
346
351
  }
347
- // ============================================================
352
+ //// ============================================================
348
353
  // 自动注册所有 handler(在模块加载时执行)
349
354
  // ============================================================
350
355
  registerTriggerHandler(EntityEvent_1.EntityEvent.KillOne, handleKillOne);
@@ -390,6 +395,7 @@ registerTriggerHandler(EntityEvent_1.EntityEvent.ProjectileSubImpactAll, handleP
390
395
  registerTriggerHandler(EntityEvent_1.EntityEvent.CallProjectileSubImpactAll, handleProjectileSubImpactAll);
391
396
  registerTriggerHandler(EntityEvent_1.EntityEvent.GetStar, handleGetStar);
392
397
  registerTriggerHandler(EntityEvent_1.EntityEvent.ProjectileStay, handleProjectileStay);
398
+ registerTriggerHandler(EntityEvent_1.EntityEvent.ProjectileMergeFinish, handleProjectileMergeFinish);
393
399
  registerTriggerHandler(EntityEvent_1.EntityEvent.ProjectileHitByTimes, handleProjectileBySkillId);
394
400
  registerTriggerHandler(EntityEvent_1.EntityEvent.BuffLayerNumRatio, handleBuffLayerNumRatio);
395
401
  registerTriggerHandler(EntityEvent_1.EntityEvent.ProjectileTimes, handleProjectileTimes);
@@ -408,3 +414,5 @@ registerTriggerHandler(EntityEvent_1.EntityEvent.AddPartner, handleAddPartner);
408
414
  registerTriggerHandler(EntityEvent_1.EntityEvent.KillNum, handleKillNum);
409
415
  registerTriggerHandler(EntityEvent_1.EntityEvent.BuffTrigger, handleBuffTrigger);
410
416
  registerTriggerHandler(EntityEvent_1.EntityEvent.BuffExit, handleBuffTrigger);
417
+ registerTriggerHandler(EntityEvent_1.EntityEvent.AfterBeMiss, handleNoCondition);
418
+ registerTriggerHandler(EntityEvent_1.EntityEvent.AfterMiss, handleNoCondition);
@@ -18,7 +18,7 @@ let AddPhysicDamBuff = class AddPhysicDamBuff extends BaseBuff_1.BaseBuff {
18
18
  if (impact.p5) {
19
19
  for (let i = 0; i < entity.game.gameContext.fighters.length; i++) {
20
20
  let fight = entity.game.gameContext.fighters[i];
21
- if (fight.campType === entity.campType && fight.ID !== entity.ID && fight.subType === battle_interface_1.SubEntityType.PET) {
21
+ if (fight.campType === entity.campType && fight.ID !== entity.ID && fight.subType === battle_interface_1.SubEntityType.TOWER) {
22
22
  fight.property[22110] -= buff.buffLayer * buff.buffValue;
23
23
  }
24
24
  }
@@ -32,7 +32,7 @@ let AddPhysicDamBuff = class AddPhysicDamBuff extends BaseBuff_1.BaseBuff {
32
32
  if (impact.p5) {
33
33
  for (let i = 0; i < entity.game.gameContext.fighters.length; i++) {
34
34
  let fight = entity.game.gameContext.fighters[i];
35
- if (fight.campType === entity.campType && fight.ID !== entity.ID && fight.subType === battle_interface_1.SubEntityType.PET) {
35
+ if (fight.campType === entity.campType && fight.ID !== entity.ID && fight.subType === battle_interface_1.SubEntityType.TOWER) {
36
36
  fight.property[22110] += addLayer * buff.buffValue;
37
37
  }
38
38
  }
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
9
9
  const BuffCfg_1 = require("../../../../config/BuffCfg");
10
10
  const battle_interface_1 = require("../../battle.interface");
11
11
  const EntityEvent_1 = require("../../event/EntityEvent");
12
+ const BattleUtils_1 = require("../../util/BattleUtils");
12
13
  const BuffMgr_1 = require("../BuffMgr");
13
14
  const BaseBuff_1 = require("./BaseBuff");
14
15
  // 改变子弹阶段并增伤
@@ -24,12 +25,12 @@ let ChangeSetpAddDamageBuff = class ChangeSetpAddDamageBuff extends BaseBuff_1.B
24
25
  for (let i = projectileArray.length - 1; i >= 0; i--) {
25
26
  let data = projectileArray[i];
26
27
  if (!data.projectile) {
27
- projectileArray.splice(i, 1);
28
+ BattleUtils_1.BattleUtils.removeAt(projectileArray, i);
28
29
  continue;
29
30
  }
30
31
  let projectile = entity.game.getEntityLogic(data.projectile, battle_interface_1.EntityType.PROJECTILE);
31
32
  if (!projectile || data.projectile.isDead) {
32
- projectileArray.splice(i, 1);
33
+ BattleUtils_1.BattleUtils.removeAt(projectileArray, i);
33
34
  }
34
35
  else {
35
36
  if (data.curDelay > 0) {
@@ -14,6 +14,7 @@ const battle_interface_1 = require("../../battle.interface");
14
14
  const FighterStateType_1 = require("../../fsm-state/FighterStateType");
15
15
  const EntityEvent_1 = require("../../event/EntityEvent");
16
16
  const GameEvent_1 = require("../../event/GameEvent");
17
+ const BattleUtils_1 = require("../../util/BattleUtils");
17
18
  const BVec2_1 = require("../../util/BVec2");
18
19
  const JMath_1 = __importDefault(require("../../util/JMath"));
19
20
  const BuffMgr_1 = require("../BuffMgr");
@@ -37,12 +38,12 @@ let DeltaUseSkillBuff = class DeltaUseSkillBuff extends BaseBuff_1.BaseBuff {
37
38
  for (let i = projectileArray.length - 1; i >= 0; i--) {
38
39
  let data = projectileArray[i];
39
40
  if (!data.projectile) {
40
- projectileArray.splice(i, 1);
41
+ BattleUtils_1.BattleUtils.removeAt(projectileArray, i);
41
42
  continue;
42
43
  }
43
44
  let projectile = entity.game.getEntityLogic(data.projectile, battle_interface_1.EntityType.PROJECTILE);
44
45
  if (!projectile || projectile.isDead) {
45
- projectileArray.splice(i, 1);
46
+ BattleUtils_1.BattleUtils.removeAt(projectileArray, i);
46
47
  }
47
48
  else {
48
49
  // 时间模式按帧递减,距离模式按子弹实际移动距离递减
@@ -0,0 +1,8 @@
1
+ import FighterData from "../../entity/FighterData";
2
+ import { Buff } from "../BuffMgr";
3
+ import { BaseBuff } from "./BaseBuff";
4
+ export declare class DiceAddCritBuff extends BaseBuff {
5
+ static onEnter(entity: FighterData, buff: Buff.BuffItem): void;
6
+ static onExit(entity: FighterData, buff: Buff.BuffItem): void;
7
+ static layerChange(entity: FighterData, buff: Buff.BuffItem, layer: number): void;
8
+ }
@@ -0,0 +1,35 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.DiceAddCritBuff = void 0;
10
+ const BuffCfg_1 = require("../../../../config/BuffCfg");
11
+ const BuffMgr_1 = require("../BuffMgr");
12
+ const BaseBuff_1 = require("./BaseBuff");
13
+ let DiceAddCritBuff = class DiceAddCritBuff extends BaseBuff_1.BaseBuff {
14
+ static onEnter(entity, buff) {
15
+ buff.curBuffTime = 0;
16
+ }
17
+ static onExit(entity, buff) {
18
+ if (buff.buffTime < 0)
19
+ return;
20
+ const impact = (0, BuffMgr_1.getBuffImpact)((0, BuffMgr_1.getBuffCaster)(entity, buff), buff);
21
+ entity.property[10370] -= buff.buffLayer * buff.buffValue;
22
+ entity.property[10400] -= buff.buffLayer * impact.p5;
23
+ }
24
+ static layerChange(entity, buff, layer) {
25
+ let add = layer - buff.buffLayer;
26
+ buff.buffLayer = layer;
27
+ const impact = (0, BuffMgr_1.getBuffImpact)((0, BuffMgr_1.getBuffCaster)(entity, buff), buff);
28
+ entity.property[10370] += add * buff.buffValue;
29
+ entity.property[10400] += add * impact.p5;
30
+ }
31
+ };
32
+ exports.DiceAddCritBuff = DiceAddCritBuff;
33
+ exports.DiceAddCritBuff = DiceAddCritBuff = __decorate([
34
+ BuffMgr_1.Buff.cacheBuff(BuffCfg_1.BuffDefine.DiceAddCrit)
35
+ ], DiceAddCritBuff);
@@ -0,0 +1,7 @@
1
+ import FighterData from "../../entity/FighterData";
2
+ import { Buff } from "../BuffMgr";
3
+ import { BaseBuff } from "./BaseBuff";
4
+ export declare class FireHurtLayerBuff extends BaseBuff {
5
+ static onExit(entity: FighterData, buff: Buff.BuffItem): void;
6
+ static layerChange(entity: FighterData, buff: Buff.BuffItem, layer: number): void;
7
+ }
@@ -0,0 +1,28 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.FireHurtLayerBuff = void 0;
10
+ const BuffCfg_1 = require("../../../../config/BuffCfg");
11
+ const BuffMgr_1 = require("../BuffMgr");
12
+ const BaseBuff_1 = require("./BaseBuff");
13
+ let FireHurtLayerBuff = class FireHurtLayerBuff extends BaseBuff_1.BaseBuff {
14
+ static onExit(entity, buff) {
15
+ if (buff.buffTime < 0)
16
+ return;
17
+ entity.property[22030] += buff.buffLayer * buff.buffValue;
18
+ }
19
+ static layerChange(entity, buff, layer) {
20
+ let add = layer - buff.buffLayer;
21
+ buff.buffLayer = layer;
22
+ entity.property[22030] -= add * buff.buffValue;
23
+ }
24
+ };
25
+ exports.FireHurtLayerBuff = FireHurtLayerBuff;
26
+ exports.FireHurtLayerBuff = FireHurtLayerBuff = __decorate([
27
+ BuffMgr_1.Buff.cacheBuff(BuffCfg_1.BuffDefine.FireHurtLayer)
28
+ ], FireHurtLayerBuff);
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.ForceTargetBuff = void 0;
10
10
  const BuffCfg_1 = require("../../../../config/BuffCfg");
11
11
  const battle_interface_1 = require("../../battle.interface");
12
+ const BattleUtils_1 = require("../../util/BattleUtils");
12
13
  const BuffMgr_1 = require("../BuffMgr");
13
14
  const BaseBuff_1 = require("./BaseBuff");
14
15
  // const ignoreList = [];
@@ -28,7 +29,7 @@ let ForceTargetBuff = class ForceTargetBuff extends BaseBuff_1.BaseBuff {
28
29
  let value = curList[i];
29
30
  let fighter = entity.game.getEntityLogic(value);
30
31
  if (!fighter || fighter.isDead || fighter.NoSelect(entity.normalSkillIds[0])) {
31
- curList.splice(i, 1);
32
+ BattleUtils_1.BattleUtils.removeAt(curList, i);
32
33
  }
33
34
  }
34
35
  let count = buff.buffValue;
@@ -44,7 +44,7 @@ let HitBoundAddDamageBuff = class HitBoundAddDamageBuff extends BaseBuff_1.BaseB
44
44
  if (buffs && buffs.length) {
45
45
  for (let i = 0; i < buffs.length; i++) {
46
46
  const buff = buffs[i];
47
- if (projectile.ID in buff.context.projectileMap) {
47
+ if (buff.context.projectileMap && buff.context.projectileMap[projectile.ID]) {
48
48
  delete buff.context.projectileMap[projectile.ID];
49
49
  }
50
50
  }
@@ -0,0 +1,11 @@
1
+ import FighterData from "../../entity/FighterData";
2
+ import ProjectileData from "../../entity/ProjectileData";
3
+ import { Buff } from "../BuffMgr";
4
+ import { BaseBuff } from "./BaseBuff";
5
+ export declare class HitBoundAddScaleBuff extends BaseBuff {
6
+ static onEnter(entity: FighterData, buff: Buff.BuffItem): void;
7
+ static onExit(entity: FighterData, buff: Buff.BuffItem): void;
8
+ static onProjectilCreate(entity: FighterData, projectile: ProjectileData): void;
9
+ static onProjectileDead(entity: FighterData, projectile: ProjectileData): void;
10
+ static onTrigger(entity: FighterData, projectile?: ProjectileData): void;
11
+ }
@@ -0,0 +1,79 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.HitBoundAddScaleBuff = void 0;
10
+ const BuffCfg_1 = require("../../../../config/BuffCfg");
11
+ const EntityEvent_1 = require("../../event/EntityEvent");
12
+ const BuffMgr_1 = require("../BuffMgr");
13
+ const BaseBuff_1 = require("./BaseBuff");
14
+ let HitBoundAddScaleBuff = class HitBoundAddScaleBuff extends BaseBuff_1.BaseBuff {
15
+ static onEnter(entity, buff) {
16
+ buff.curBuffTime = 0;
17
+ entity.game.on(entity.ID, EntityEvent_1.EntityEvent.ProjectileBoundary, this.onTrigger, this);
18
+ entity.game.on(entity.ID, EntityEvent_1.EntityEvent.ProjectileCreate, this.onProjectilCreate, this);
19
+ entity.game.on(entity.ID, EntityEvent_1.EntityEvent.ProjectileDead, this.onProjectileDead, this);
20
+ }
21
+ static onExit(entity, buff) {
22
+ entity.game.off(entity.ID, EntityEvent_1.EntityEvent.ProjectileBoundary, this.onTrigger, this);
23
+ entity.game.off(entity.ID, EntityEvent_1.EntityEvent.ProjectileCreate, this.onProjectilCreate, this);
24
+ entity.game.off(entity.ID, EntityEvent_1.EntityEvent.ProjectileDead, this.onProjectileDead, this);
25
+ }
26
+ static onProjectilCreate(entity, projectile) {
27
+ const buffs = entity.getBuffsByType(BuffCfg_1.BuffDefine.HitBoundAddScale);
28
+ if (buffs && buffs.length) {
29
+ for (let i = 0; i < buffs.length; i++) {
30
+ const buff = buffs[i];
31
+ const impact = (0, BuffMgr_1.getBuffImpact)((0, BuffMgr_1.getBuffCaster)(entity, buff), buff);
32
+ const skillId = impact.p5 || 0;
33
+ if (!skillId || skillId === projectile.skillId) {
34
+ if (!buff.context.projectileMap) {
35
+ buff.context.projectileMap = {};
36
+ }
37
+ buff.context.projectileMap[projectile.ID] = 0;
38
+ }
39
+ }
40
+ }
41
+ }
42
+ static onProjectileDead(entity, projectile) {
43
+ const buffs = entity.getBuffsByType(BuffCfg_1.BuffDefine.HitBoundAddScale);
44
+ if (buffs && buffs.length) {
45
+ for (let i = 0; i < buffs.length; i++) {
46
+ const buff = buffs[i];
47
+ if (buff.context.projectileMap && buff.context.projectileMap[projectile.ID]) {
48
+ delete buff.context.projectileMap[projectile.ID];
49
+ }
50
+ }
51
+ }
52
+ }
53
+ static onTrigger(entity, projectile) {
54
+ const buffs = entity.getBuffsByType(BuffCfg_1.BuffDefine.HitBoundAddScale);
55
+ if (buffs && buffs.length) {
56
+ for (let i = 0; i < buffs.length; i++) {
57
+ const buff = buffs[i];
58
+ const impact = (0, BuffMgr_1.getBuffImpact)((0, BuffMgr_1.getBuffCaster)(entity, buff), buff);
59
+ const skillId = impact.p5 || 0;
60
+ const addValue = buff.buffValue;
61
+ if (!skillId || skillId === projectile.skillId) {
62
+ if (!buff.context.projectileMap) {
63
+ buff.context.projectileMap = {};
64
+ }
65
+ let addScale = buff.context.projectileMap[projectile.ID] || 0;
66
+ if (addScale < impact.p6) {
67
+ const add = Math.min(addValue, impact.p6 - addScale);
68
+ projectile.setScale(projectile.scaleX + projectile.originScale * (add / 10000), projectile.scaleY + projectile.originScale * (add / 10000));
69
+ buff.context.projectileMap[projectile.ID] += add;
70
+ }
71
+ }
72
+ }
73
+ }
74
+ }
75
+ };
76
+ exports.HitBoundAddScaleBuff = HitBoundAddScaleBuff;
77
+ exports.HitBoundAddScaleBuff = HitBoundAddScaleBuff = __decorate([
78
+ BuffMgr_1.Buff.cacheBuff(BuffCfg_1.BuffDefine.HitBoundAddScale)
79
+ ], HitBoundAddScaleBuff);
@@ -13,6 +13,7 @@ const EntityEvent_1 = require("../../event/EntityEvent");
13
13
  const GameEvent_1 = require("../../event/GameEvent");
14
14
  const EntityManager_1 = require("../../manager/EntityManager");
15
15
  const BattleConfig_1 = require("../../util/BattleConfig");
16
+ const BattleUtils_1 = require("../../util/BattleUtils");
16
17
  const BVec2_1 = require("../../util/BVec2");
17
18
  const HitDataPool_1 = require("../../util/HitDataPool");
18
19
  const SkillEffectByIdParamsPool_1 = require("../../util/SkillEffectByIdParamsPool");
@@ -74,7 +75,7 @@ let LinkCurseBuff = class LinkCurseBuff extends BaseBuff_1.BaseBuff {
74
75
  let id = logBuff.context.projectileArray[i];
75
76
  let beHiter = entity.game.getEntityLogic(id);
76
77
  if (!beHiter) {
77
- logBuff.context.projectileArray.splice(i, 1);
78
+ BattleUtils_1.BattleUtils.removeAt(logBuff.context.projectileArray, i);
78
79
  continue;
79
80
  }
80
81
  if (beHiter.isDead)
@@ -120,7 +121,7 @@ let LinkCurseBuff = class LinkCurseBuff extends BaseBuff_1.BaseBuff {
120
121
  const logBuff = buffs[0];
121
122
  const index = logBuff.context.projectileArray.indexOf(entity.ID);
122
123
  if (index !== -1) {
123
- logBuff.context.projectileArray.splice(index, 1);
124
+ BattleUtils_1.BattleUtils.removeAt(logBuff.context.projectileArray, index);
124
125
  }
125
126
  }
126
127
  }