@v12-engine/engine 0.1.0 → 0.4.0

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 (951) hide show
  1. package/dist/abilities/amounts.d.ts +28 -0
  2. package/dist/abilities/amounts.js +74 -0
  3. package/dist/abilities/amounts.js.map +1 -0
  4. package/dist/abilities/buffs.d.ts +106 -6
  5. package/dist/abilities/buffs.js +443 -0
  6. package/dist/abilities/buffs.js.map +1 -0
  7. package/dist/abilities/castTold.d.ts +2 -0
  8. package/dist/abilities/castTold.js +66 -0
  9. package/dist/abilities/castTold.js.map +1 -0
  10. package/dist/abilities/chance.d.ts +38 -0
  11. package/dist/abilities/chance.js +77 -0
  12. package/dist/abilities/chance.js.map +1 -0
  13. package/dist/abilities/charges.d.ts +18 -0
  14. package/dist/abilities/charges.js +101 -0
  15. package/dist/abilities/charges.js.map +1 -0
  16. package/dist/abilities/control.d.ts +28 -0
  17. package/dist/abilities/control.js +113 -0
  18. package/dist/abilities/control.js.map +1 -0
  19. package/dist/abilities/dispel.js +51 -0
  20. package/dist/abilities/dispel.js.map +1 -0
  21. package/dist/abilities/effectFields.d.ts +1 -1
  22. package/dist/abilities/effectFields.js +676 -0
  23. package/dist/abilities/effectFields.js.map +1 -0
  24. package/dist/abilities/effectIndex.d.ts +27 -0
  25. package/dist/abilities/effectIndex.js +64 -0
  26. package/dist/abilities/effectIndex.js.map +1 -0
  27. package/dist/abilities/effects/buff.d.ts +9 -3
  28. package/dist/abilities/effects/buff.js +84 -0
  29. package/dist/abilities/effects/buff.js.map +1 -0
  30. package/dist/abilities/effects/conditions.d.ts +2 -0
  31. package/dist/abilities/effects/conditions.js +41 -0
  32. package/dist/abilities/effects/conditions.js.map +1 -0
  33. package/dist/abilities/effects/core.js +54 -0
  34. package/dist/abilities/effects/core.js.map +1 -0
  35. package/dist/abilities/effects/damage.d.ts +1 -1
  36. package/dist/abilities/effects/damage.js +43 -0
  37. package/dist/abilities/effects/damage.js.map +1 -0
  38. package/dist/abilities/effects/heal.d.ts +2 -2
  39. package/dist/abilities/effects/heal.js +51 -0
  40. package/dist/abilities/effects/heal.js.map +1 -0
  41. package/dist/abilities/effects/missile.d.ts +13 -1
  42. package/dist/abilities/effects/missile.js +104 -0
  43. package/dist/abilities/effects/missile.js.map +1 -0
  44. package/dist/abilities/effects/morph.d.ts +5 -0
  45. package/dist/abilities/effects/morph.js +43 -0
  46. package/dist/abilities/effects/morph.js.map +1 -0
  47. package/dist/abilities/effects/moves.d.ts +16 -4
  48. package/dist/abilities/effects/moves.js +212 -0
  49. package/dist/abilities/effects/moves.js.map +1 -0
  50. package/dist/abilities/effects/passives.d.ts +19 -9
  51. package/dist/abilities/effects/passives.js +131 -0
  52. package/dist/abilities/effects/passives.js.map +1 -0
  53. package/dist/abilities/effects/proxy.d.ts +5 -0
  54. package/dist/abilities/effects/proxy.js +60 -0
  55. package/dist/abilities/effects/proxy.js.map +1 -0
  56. package/dist/abilities/effects/sight.d.ts +2 -2
  57. package/dist/abilities/effects/sight.js +39 -0
  58. package/dist/abilities/effects/sight.js.map +1 -0
  59. package/dist/abilities/effects/spawn.d.ts +5 -2
  60. package/dist/abilities/effects/spawn.js +40 -0
  61. package/dist/abilities/effects/spawn.js.map +1 -0
  62. package/dist/abilities/effects/timed.d.ts +2 -2
  63. package/dist/abilities/effects/timed.js +96 -0
  64. package/dist/abilities/effects/timed.js.map +1 -0
  65. package/dist/abilities/effects/trade.d.ts +1 -1
  66. package/dist/abilities/effects/trade.js +25 -0
  67. package/dist/abilities/effects/trade.js.map +1 -0
  68. package/dist/abilities/effects.d.ts +97 -23
  69. package/dist/abilities/effects.js +860 -0
  70. package/dist/abilities/effects.js.map +1 -0
  71. package/dist/abilities/land.d.ts +38 -4
  72. package/dist/abilities/land.js +189 -0
  73. package/dist/abilities/land.js.map +1 -0
  74. package/dist/abilities/recast.d.ts +45 -0
  75. package/dist/abilities/recast.js +118 -0
  76. package/dist/abilities/recast.js.map +1 -0
  77. package/dist/abilities/scaled.js +40 -0
  78. package/dist/abilities/scaled.js.map +1 -0
  79. package/dist/abilities/screen.d.ts +6 -0
  80. package/dist/abilities/screen.js +83 -0
  81. package/dist/abilities/screen.js.map +1 -0
  82. package/dist/abilities/shapes.d.ts +66 -0
  83. package/dist/abilities/shapes.js +122 -0
  84. package/dist/abilities/shapes.js.map +1 -0
  85. package/dist/abilities/text.d.ts +14 -2
  86. package/dist/abilities/text.js +204 -0
  87. package/dist/abilities/text.js.map +1 -0
  88. package/dist/abilities/triggers.d.ts +98 -0
  89. package/dist/abilities/triggers.js +351 -0
  90. package/dist/abilities/triggers.js.map +1 -0
  91. package/dist/abilityChanges.d.ts +131 -0
  92. package/dist/abilityChanges.js +345 -0
  93. package/dist/abilityChanges.js.map +1 -0
  94. package/dist/ai/area.d.ts +4 -1
  95. package/dist/ai/brain.d.ts +4 -1
  96. package/dist/ai/brain.js +844 -0
  97. package/dist/ai/brain.js.map +1 -0
  98. package/dist/ai/budget.js +74 -0
  99. package/dist/ai/budget.js.map +1 -0
  100. package/dist/ai/checks.d.ts +9 -1
  101. package/dist/ai/checks.js +242 -0
  102. package/dist/ai/checks.js.map +1 -0
  103. package/dist/ai/computer.d.ts +11 -4
  104. package/dist/ai/computer.js +251 -0
  105. package/dist/ai/computer.js.map +1 -0
  106. package/dist/ai/defence.d.ts +4 -0
  107. package/dist/ai/defence.js +430 -0
  108. package/dist/ai/defence.js.map +1 -0
  109. package/dist/ai/define.d.ts +3 -2
  110. package/dist/ai/define.js +31 -0
  111. package/dist/ai/define.js.map +1 -0
  112. package/dist/ai/economy.d.ts +10 -7
  113. package/dist/ai/economy.js +780 -0
  114. package/dist/ai/economy.js.map +1 -0
  115. package/dist/ai/geometry.js +38 -0
  116. package/dist/ai/geometry.js.map +1 -0
  117. package/dist/ai/goals.d.ts +1 -0
  118. package/dist/ai/goals.js +560 -0
  119. package/dist/ai/goals.js.map +1 -0
  120. package/dist/ai/knowledge.d.ts +72 -7
  121. package/dist/ai/knowledge.js +804 -0
  122. package/dist/ai/knowledge.js.map +1 -0
  123. package/dist/ai/lanes.d.ts +10 -2
  124. package/dist/ai/lanes.js +715 -0
  125. package/dist/ai/lanes.js.map +1 -0
  126. package/dist/ai/melee/build.js +264 -0
  127. package/dist/ai/melee/build.js.map +1 -0
  128. package/dist/ai/melee/goals.d.ts +7 -0
  129. package/dist/ai/melee/goals.js +720 -0
  130. package/dist/ai/melee/goals.js.map +1 -0
  131. package/dist/ai/melee/heroes.js +68 -0
  132. package/dist/ai/melee/heroes.js.map +1 -0
  133. package/dist/ai/melee/index.d.ts +1 -1
  134. package/dist/ai/melee/index.js +51 -0
  135. package/dist/ai/melee/index.js.map +1 -0
  136. package/dist/ai/melee/production.js +29 -0
  137. package/dist/ai/melee/production.js.map +1 -0
  138. package/dist/ai/melee/surrender.js +64 -0
  139. package/dist/ai/melee/surrender.js.map +1 -0
  140. package/dist/ai/micro.d.ts +9 -0
  141. package/dist/ai/micro.js +1316 -0
  142. package/dist/ai/micro.js.map +1 -0
  143. package/dist/ai/mission.d.ts +9 -2
  144. package/dist/ai/mission.js +538 -0
  145. package/dist/ai/mission.js.map +1 -0
  146. package/dist/ai/missionRules.d.ts +1 -1
  147. package/dist/ai/missionRules.js +26 -0
  148. package/dist/ai/missionRules.js.map +1 -0
  149. package/dist/ai/module.d.ts +6 -2
  150. package/dist/ai/module.js +37 -0
  151. package/dist/ai/module.js.map +1 -0
  152. package/dist/ai/options.d.ts +3 -3
  153. package/dist/ai/plans/build.d.ts +20 -1
  154. package/dist/ai/plans/build.js +608 -0
  155. package/dist/ai/plans/build.js.map +1 -0
  156. package/dist/ai/plans/placement.d.ts +4 -1
  157. package/dist/ai/plans/placement.js +295 -0
  158. package/dist/ai/plans/placement.js.map +1 -0
  159. package/dist/ai/plans/plans.d.ts +9 -0
  160. package/dist/ai/plans/plans.js +110 -0
  161. package/dist/ai/plans/plans.js.map +1 -0
  162. package/dist/ai/plans/production.d.ts +14 -2
  163. package/dist/ai/plans/production.js +434 -0
  164. package/dist/ai/plans/production.js.map +1 -0
  165. package/dist/ai/plans/purse.d.ts +6 -3
  166. package/dist/ai/plans/purse.js +139 -0
  167. package/dist/ai/plans/purse.js.map +1 -0
  168. package/dist/ai/plans/tech.d.ts +6 -0
  169. package/dist/ai/plans/tech.js +122 -0
  170. package/dist/ai/plans/tech.js.map +1 -0
  171. package/dist/ai/profiles.d.ts +4 -4
  172. package/dist/{profiles-B3NS9jwk.js → ai/profiles.js} +3 -98
  173. package/dist/ai/profiles.js.map +1 -0
  174. package/dist/ai/reach.js +54 -0
  175. package/dist/ai/reach.js.map +1 -0
  176. package/dist/ai/report.d.ts +8 -0
  177. package/dist/ai/report.js +87 -0
  178. package/dist/ai/report.js.map +1 -0
  179. package/dist/ai/roles.d.ts +4 -0
  180. package/dist/ai/roles.js +207 -0
  181. package/dist/ai/roles.js.map +1 -0
  182. package/dist/ai/rules.d.ts +8 -2
  183. package/dist/ai/rules.js +416 -0
  184. package/dist/ai/rules.js.map +1 -0
  185. package/dist/ai/scouting.d.ts +6 -0
  186. package/dist/ai/scouting.js +324 -0
  187. package/dist/ai/scouting.js.map +1 -0
  188. package/dist/ai/settings.js +99 -0
  189. package/dist/ai/settings.js.map +1 -0
  190. package/dist/ai/squads.d.ts +21 -2
  191. package/dist/ai/squads.js +916 -0
  192. package/dist/ai/squads.js.map +1 -0
  193. package/dist/ai/strength.js +320 -0
  194. package/dist/ai/strength.js.map +1 -0
  195. package/dist/ai/task.d.ts +3 -1
  196. package/dist/ai/task.js +17 -0
  197. package/dist/ai/task.js.map +1 -0
  198. package/dist/ai/tasks/attack.js +24 -0
  199. package/dist/ai/tasks/attack.js.map +1 -0
  200. package/dist/ai/tasks/capture.d.ts +3 -3
  201. package/dist/ai/tasks/capture.js +37 -0
  202. package/dist/ai/tasks/capture.js.map +1 -0
  203. package/dist/ai/tasks/creep.js +29 -0
  204. package/dist/ai/tasks/creep.js.map +1 -0
  205. package/dist/ai/tasks/defend.js +61 -0
  206. package/dist/ai/tasks/defend.js.map +1 -0
  207. package/dist/ai/tasks/drop.js +81 -0
  208. package/dist/ai/tasks/drop.js.map +1 -0
  209. package/dist/ai/tasks/escort.js +59 -0
  210. package/dist/ai/tasks/escort.js.map +1 -0
  211. package/dist/ai/tasks/gather.js +48 -0
  212. package/dist/ai/tasks/gather.js.map +1 -0
  213. package/dist/ai/tasks/harass.js +39 -0
  214. package/dist/ai/tasks/harass.js.map +1 -0
  215. package/dist/ai/tasks/hold.js +32 -0
  216. package/dist/ai/tasks/hold.js.map +1 -0
  217. package/dist/ai/tasks/index.js +34 -0
  218. package/dist/ai/tasks/index.js.map +1 -0
  219. package/dist/ai/tasks/move.js +26 -0
  220. package/dist/ai/tasks/move.js.map +1 -0
  221. package/dist/ai/tasks/patrol.js +59 -0
  222. package/dist/ai/tasks/patrol.js.map +1 -0
  223. package/dist/ai/tasks/retreat.js +28 -0
  224. package/dist/ai/tasks/retreat.js.map +1 -0
  225. package/dist/ai/tasks/scout.js +73 -0
  226. package/dist/ai/tasks/scout.js.map +1 -0
  227. package/dist/ai/tasks/shared.d.ts +1 -1
  228. package/dist/ai/tasks/shared.js +137 -0
  229. package/dist/ai/tasks/shared.js.map +1 -0
  230. package/dist/ai/team.d.ts +18 -1
  231. package/dist/ai/team.js +492 -0
  232. package/dist/ai/team.js.map +1 -0
  233. package/dist/ai/threat.d.ts +6 -0
  234. package/dist/ai/threat.js +206 -0
  235. package/dist/ai/threat.js.map +1 -0
  236. package/dist/ai/view.d.ts +21 -7
  237. package/dist/ai/view.js +677 -0
  238. package/dist/ai/view.js.map +1 -0
  239. package/dist/ai/waves.d.ts +6 -0
  240. package/dist/ai/waves.js +410 -0
  241. package/dist/ai/waves.js.map +1 -0
  242. package/dist/ai.js +54 -6239
  243. package/dist/aiTesting.d.ts +6 -3
  244. package/dist/aiTesting.js +229 -0
  245. package/dist/aiTesting.js.map +1 -0
  246. package/dist/areas.d.ts +4 -1
  247. package/dist/areas.js +295 -0
  248. package/dist/areas.js.map +1 -0
  249. package/dist/attacks.d.ts +3 -3
  250. package/dist/attacks.js +127 -0
  251. package/dist/attacks.js.map +1 -0
  252. package/dist/burning.d.ts +267 -0
  253. package/dist/burning.js +795 -0
  254. package/dist/burning.js.map +1 -0
  255. package/dist/bytes.js +21 -0
  256. package/dist/bytes.js.map +1 -0
  257. package/dist/callings.d.ts +71 -0
  258. package/dist/callings.js +157 -0
  259. package/dist/callings.js.map +1 -0
  260. package/dist/cameraOrders.d.ts +78 -0
  261. package/dist/cameraOrders.js +114 -0
  262. package/dist/cameraOrders.js.map +1 -0
  263. package/dist/camps.d.ts +70 -4
  264. package/dist/camps.js +501 -0
  265. package/dist/camps.js.map +1 -0
  266. package/dist/capture.d.ts +15 -3
  267. package/dist/capture.js +304 -0
  268. package/dist/capture.js.map +1 -0
  269. package/dist/cellLayers.d.ts +78 -13
  270. package/dist/cellLayers.js +275 -0
  271. package/dist/cellLayers.js.map +1 -0
  272. package/dist/cellPatches.d.ts +24 -0
  273. package/dist/cellPatches.js +73 -0
  274. package/dist/cellPatches.js.map +1 -0
  275. package/dist/cinematics.d.ts +10 -5
  276. package/dist/cinematics.js +161 -0
  277. package/dist/cinematics.js.map +1 -0
  278. package/dist/clock.d.ts +2 -2
  279. package/dist/clock.js +78 -0
  280. package/dist/clock.js.map +1 -0
  281. package/dist/commands.d.ts +36 -4
  282. package/dist/commands.js +636 -0
  283. package/dist/commands.js.map +1 -0
  284. package/dist/components.d.ts +31 -10
  285. package/dist/components.js +74 -0
  286. package/dist/components.js.map +1 -0
  287. package/dist/computers.d.ts +4 -4
  288. package/dist/computers.js +194 -0
  289. package/dist/computers.js.map +1 -0
  290. package/dist/concealment.d.ts +25 -2
  291. package/dist/concealment.js +409 -0
  292. package/dist/concealment.js.map +1 -0
  293. package/dist/coreComponents.js +130 -0
  294. package/dist/coreComponents.js.map +1 -0
  295. package/dist/createGame.d.ts +306 -0
  296. package/dist/createGame.js +405 -0
  297. package/dist/createGame.js.map +1 -0
  298. package/dist/dashing.d.ts +18 -2
  299. package/dist/dashing.js +41 -0
  300. package/dist/dashing.js.map +1 -0
  301. package/dist/debug.d.ts +8 -0
  302. package/dist/debug.js +5 -3
  303. package/dist/debug2.js +76 -0
  304. package/dist/debug2.js.map +1 -0
  305. package/dist/debugCommands.d.ts +6 -6
  306. package/dist/debugCommands.js +537 -0
  307. package/dist/debugCommands.js.map +1 -0
  308. package/dist/debugging.d.ts +1 -0
  309. package/dist/defaultSets.d.ts +183 -0
  310. package/dist/defaultSets.js +216 -0
  311. package/dist/defaultSets.js.map +1 -0
  312. package/dist/definitions.d.ts +6 -0
  313. package/dist/definitions.js +78 -0
  314. package/dist/definitions.js.map +1 -0
  315. package/dist/defs.d.ts +1895 -165
  316. package/dist/defs.js +380 -0
  317. package/dist/defs.js.map +1 -0
  318. package/dist/denying.d.ts +4 -4
  319. package/dist/denying.js +106 -0
  320. package/dist/denying.js.map +1 -0
  321. package/dist/destructibles.d.ts +2 -2
  322. package/dist/destructibles.js +36 -0
  323. package/dist/destructibles.js.map +1 -0
  324. package/dist/determinism.d.ts +4 -4
  325. package/dist/determinism.js +247 -0
  326. package/dist/determinism.js.map +1 -0
  327. package/dist/dialog.d.ts +17 -2
  328. package/dist/dialog.js +108 -0
  329. package/dist/dialog.js.map +1 -0
  330. package/dist/effectRefs.js +28 -0
  331. package/dist/effectRefs.js.map +1 -0
  332. package/dist/effects.d.ts +27 -11
  333. package/dist/effects.js +110 -0
  334. package/dist/effects.js.map +1 -0
  335. package/dist/endings.d.ts +1 -1
  336. package/dist/endings.js +78 -0
  337. package/dist/endings.js.map +1 -0
  338. package/dist/engagement.d.ts +40 -6
  339. package/dist/engagement.js +530 -0
  340. package/dist/engagement.js.map +1 -0
  341. package/dist/engineEvents.d.ts +72 -9
  342. package/dist/engineEvents.js +520 -0
  343. package/dist/engineEvents.js.map +1 -0
  344. package/dist/entity.d.ts +275 -26
  345. package/dist/entity.js +441 -0
  346. package/dist/entity.js.map +1 -0
  347. package/dist/entityIndex.d.ts +10 -3
  348. package/dist/entityIndex.js +149 -0
  349. package/dist/entityIndex.js.map +1 -0
  350. package/dist/errors.d.ts +6 -2
  351. package/dist/errors.js +59 -0
  352. package/dist/errors.js.map +1 -0
  353. package/dist/events.d.ts +11 -5
  354. package/dist/events.js +158 -0
  355. package/dist/events.js.map +1 -0
  356. package/dist/exactMath.js +273 -0
  357. package/dist/exactMath.js.map +1 -0
  358. package/dist/features.d.ts +1 -1
  359. package/dist/features.js +127 -0
  360. package/dist/features.js.map +1 -0
  361. package/dist/fields.d.ts +25 -5
  362. package/dist/fields.js +140 -0
  363. package/dist/fields.js.map +1 -0
  364. package/dist/fixture.d.ts +3 -3
  365. package/dist/fixture.js +512 -0
  366. package/dist/fixture.js.map +1 -0
  367. package/dist/fog.d.ts +26 -3
  368. package/dist/fog.js +333 -0
  369. package/dist/fog.js.map +1 -0
  370. package/dist/foliage.d.ts +476 -0
  371. package/dist/foliage.js +1478 -0
  372. package/dist/foliage.js.map +1 -0
  373. package/dist/foliageDebug.d.ts +57 -0
  374. package/dist/foliageDebug.js +172 -0
  375. package/dist/foliageDebug.js.map +1 -0
  376. package/dist/foliageRegrowth.d.ts +20 -0
  377. package/dist/foliageRegrowth.js +332 -0
  378. package/dist/foliageRegrowth.js.map +1 -0
  379. package/dist/formState.d.ts +67 -0
  380. package/dist/formState.js +65 -0
  381. package/dist/formState.js.map +1 -0
  382. package/dist/formation.d.ts +46 -8
  383. package/dist/formation.js +297 -0
  384. package/dist/formation.js.map +1 -0
  385. package/dist/forms.d.ts +58 -0
  386. package/dist/forms.js +146 -0
  387. package/dist/forms.js.map +1 -0
  388. package/dist/friendlyFire.d.ts +2 -2
  389. package/dist/friendlyFire.js +37 -0
  390. package/dist/friendlyFire.js.map +1 -0
  391. package/dist/game.d.ts +141 -48
  392. package/dist/game.js +834 -0
  393. package/dist/game.js.map +1 -0
  394. package/dist/gameData.d.ts +96 -22
  395. package/dist/gameData.js +1690 -0
  396. package/dist/gameData.js.map +1 -0
  397. package/dist/gameFiles.d.ts +3 -3
  398. package/dist/gameFiles.js +14 -0
  399. package/dist/gameFiles.js.map +1 -0
  400. package/dist/gates.js +92 -0
  401. package/dist/gates.js.map +1 -0
  402. package/dist/generate.d.ts +28 -1
  403. package/dist/generate.js +1062 -0
  404. package/dist/generate.js.map +1 -0
  405. package/dist/generateWorker.d.ts +7 -3
  406. package/dist/generateWorker.js +86 -0
  407. package/dist/generateWorker.js.map +1 -0
  408. package/dist/grid.d.ts +9 -0
  409. package/dist/grid.js +102 -0
  410. package/dist/grid.js.map +1 -0
  411. package/dist/ground.d.ts +17 -1
  412. package/dist/ground.js +375 -0
  413. package/dist/ground.js.map +1 -0
  414. package/dist/groundObjects.d.ts +70 -0
  415. package/dist/groundObjects.js +371 -0
  416. package/dist/groundObjects.js.map +1 -0
  417. package/dist/groundSpeed.d.ts +20 -3
  418. package/dist/groundSpeed.js +117 -0
  419. package/dist/groundSpeed.js.map +1 -0
  420. package/dist/hero.d.ts +126 -10
  421. package/dist/hero.js +432 -0
  422. package/dist/hero.js.map +1 -0
  423. package/dist/holds.d.ts +94 -0
  424. package/dist/holds.js +305 -0
  425. package/dist/holds.js.map +1 -0
  426. package/dist/home.d.ts +1 -1
  427. package/dist/home.js +30 -0
  428. package/dist/home.js.map +1 -0
  429. package/dist/hooks.d.ts +339 -57
  430. package/dist/hooks.js +105 -0
  431. package/dist/hooks.js.map +1 -0
  432. package/dist/hotReload.d.ts +6 -5
  433. package/dist/hotReload.js +145 -0
  434. package/dist/hotReload.js.map +1 -0
  435. package/dist/ids.d.ts +3 -3
  436. package/dist/ids.js +30 -0
  437. package/dist/ids.js.map +1 -0
  438. package/dist/idsFile.d.ts +36 -0
  439. package/dist/idsFile.js +134 -0
  440. package/dist/idsFile.js.map +1 -0
  441. package/dist/index.d.ts +105 -68
  442. package/dist/index.js +194 -4701
  443. package/dist/inspect.d.ts +29 -2
  444. package/dist/{inspect-D9dWHmZ0.js → inspect.js} +21 -12
  445. package/dist/inspect.js.map +1 -0
  446. package/dist/inventory.d.ts +14 -1
  447. package/dist/inventory.js +84 -0
  448. package/dist/inventory.js.map +1 -0
  449. package/dist/items.d.ts +136 -8
  450. package/dist/items.js +585 -0
  451. package/dist/items.js.map +1 -0
  452. package/dist/lanes.d.ts +12 -3
  453. package/dist/lanes.js +496 -0
  454. package/dist/lanes.js.map +1 -0
  455. package/dist/life.d.ts +6 -2
  456. package/dist/life.js +287 -0
  457. package/dist/life.js.map +1 -0
  458. package/dist/log.d.ts +26 -3
  459. package/dist/log.js +192 -0
  460. package/dist/log.js.map +1 -0
  461. package/dist/manaBurn.d.ts +2 -2
  462. package/dist/manaBurn.js +75 -0
  463. package/dist/manaBurn.js.map +1 -0
  464. package/dist/map/file.d.ts +56 -3
  465. package/dist/map/file.js +264 -0
  466. package/dist/map/file.js.map +1 -0
  467. package/dist/map/images.js +61 -0
  468. package/dist/map/images.js.map +1 -0
  469. package/dist/map/look.d.ts +1 -1
  470. package/dist/map/look.js +30 -0
  471. package/dist/map/look.js.map +1 -0
  472. package/dist/map/pathProfile.js +183 -0
  473. package/dist/map/pathProfile.js.map +1 -0
  474. package/dist/map/resize.d.ts +4 -0
  475. package/dist/map/resize.js +136 -0
  476. package/dist/map/resize.js.map +1 -0
  477. package/dist/map/schema.js +257 -0
  478. package/dist/map/schema.js.map +1 -0
  479. package/dist/map/terrain.js +214 -0
  480. package/dist/map/terrain.js.map +1 -0
  481. package/dist/map/types.d.ts +92 -13
  482. package/dist/map/types.js +251 -0
  483. package/dist/map/types.js.map +1 -0
  484. package/dist/mapCheck/cells.js +94 -0
  485. package/dist/mapCheck/cells.js.map +1 -0
  486. package/dist/mapCheck/rules/foliage.d.ts +9 -0
  487. package/dist/mapCheck/rules/foliage.js +83 -0
  488. package/dist/mapCheck/rules/foliage.js.map +1 -0
  489. package/dist/mapCheck/rules/names.js +39 -0
  490. package/dist/mapCheck/rules/names.js.map +1 -0
  491. package/dist/mapCheck/rules/objects.d.ts +1 -1
  492. package/dist/mapCheck/rules/objects.js +56 -0
  493. package/dist/mapCheck/rules/objects.js.map +1 -0
  494. package/dist/mapCheck/rules/paths.js +32 -0
  495. package/dist/mapCheck/rules/paths.js.map +1 -0
  496. package/dist/mapCheck/rules/players.js +20 -0
  497. package/dist/mapCheck/rules/players.js.map +1 -0
  498. package/dist/mapCheck/rules/races.js +56 -0
  499. package/dist/mapCheck/rules/races.js.map +1 -0
  500. package/dist/mapCheck/rules/random.js +47 -0
  501. package/dist/mapCheck/rules/random.js.map +1 -0
  502. package/dist/mapCheck/rules/regions.js +30 -0
  503. package/dist/mapCheck/rules/regions.js.map +1 -0
  504. package/dist/mapCheck/rules/targets.js +31 -0
  505. package/dist/mapCheck/rules/targets.js.map +1 -0
  506. package/dist/mapCheck/rules/walking.js +45 -0
  507. package/dist/mapCheck/rules/walking.js.map +1 -0
  508. package/dist/mapCheck.d.ts +2 -2
  509. package/dist/mapCheck.js +63 -0
  510. package/dist/mapCheck.js.map +1 -0
  511. package/dist/mapFields.d.ts +25 -2
  512. package/dist/mapFields.js +134 -0
  513. package/dist/mapFields.js.map +1 -0
  514. package/dist/mapFile.js +176 -0
  515. package/dist/mapFile.js.map +1 -0
  516. package/dist/mapMeasure.d.ts +8 -0
  517. package/dist/mapMeasure.js +283 -0
  518. package/dist/mapMeasure.js.map +1 -0
  519. package/dist/mapMerge.d.ts +1 -0
  520. package/dist/mapMerge.js +172 -0
  521. package/dist/mapMerge.js.map +1 -0
  522. package/dist/mapObjectives.js +138 -0
  523. package/dist/mapObjectives.js.map +1 -0
  524. package/dist/mapObjects.js +80 -0
  525. package/dist/mapObjects.js.map +1 -0
  526. package/dist/math.d.ts +37 -7
  527. package/dist/math.js +155 -0
  528. package/dist/math.js.map +1 -0
  529. package/dist/messages.d.ts +71 -4
  530. package/dist/messages.js +29 -0
  531. package/dist/messages.js.map +1 -0
  532. package/dist/missionRules.d.ts +10 -2
  533. package/dist/{missionRules-C-bGxm0Q.js → missionRules.js} +30 -150
  534. package/dist/missionRules.js.map +1 -0
  535. package/dist/mods.d.ts +39 -20
  536. package/dist/mods.js +271 -0
  537. package/dist/mods.js.map +1 -0
  538. package/dist/moves.d.ts +87 -0
  539. package/dist/moves.js +539 -0
  540. package/dist/moves.js.map +1 -0
  541. package/dist/names.d.ts +7 -0
  542. package/dist/names.js +122 -0
  543. package/dist/names.js.map +1 -0
  544. package/dist/navigation/agentParams.js +14 -0
  545. package/dist/navigation/agentParams.js.map +1 -0
  546. package/dist/navigation/air.d.ts +7 -3
  547. package/dist/navigation/air.js +401 -0
  548. package/dist/navigation/air.js.map +1 -0
  549. package/dist/navigation/builds.d.ts +34 -2
  550. package/dist/navigation/builds.js +287 -0
  551. package/dist/navigation/builds.js.map +1 -0
  552. package/dist/navigation/groundAreas.d.ts +59 -1
  553. package/dist/navigation/groundAreas.js +407 -0
  554. package/dist/navigation/groundAreas.js.map +1 -0
  555. package/dist/navigation/navigation.d.ts +98 -9
  556. package/dist/navigation/recast.d.ts +194 -18
  557. package/dist/navigation/recast.js +1379 -0
  558. package/dist/navigation/recast.js.map +1 -0
  559. package/dist/navigation/sidePaths.d.ts +8 -3
  560. package/dist/navigation/sidePaths.js +241 -0
  561. package/dist/navigation/sidePaths.js.map +1 -0
  562. package/dist/navigation/sized.js +243 -0
  563. package/dist/navigation/sized.js.map +1 -0
  564. package/dist/nearest.js +32 -0
  565. package/dist/nearest.js.map +1 -0
  566. package/dist/noise.js +59 -0
  567. package/dist/noise.js.map +1 -0
  568. package/dist/objectives.d.ts +12 -3
  569. package/dist/objectives.js +144 -0
  570. package/dist/objectives.js.map +1 -0
  571. package/dist/orders/basic.d.ts +5 -5
  572. package/dist/orders/basic.js +417 -0
  573. package/dist/orders/basic.js.map +1 -0
  574. package/dist/orders/build.js +278 -0
  575. package/dist/orders/build.js.map +1 -0
  576. package/dist/orders/cast.d.ts +13 -3
  577. package/dist/orders/cast.js +558 -0
  578. package/dist/orders/cast.js.map +1 -0
  579. package/dist/orders/facts.js +16 -0
  580. package/dist/orders/facts.js.map +1 -0
  581. package/dist/orders/harvest.d.ts +21 -5
  582. package/dist/orders/harvest.js +540 -0
  583. package/dist/orders/harvest.js.map +1 -0
  584. package/dist/orders/idle.d.ts +3 -1
  585. package/dist/orders/idle.js +234 -0
  586. package/dist/orders/idle.js.map +1 -0
  587. package/dist/orders/items.js +92 -0
  588. package/dist/orders/items.js.map +1 -0
  589. package/dist/orders/queue.js +108 -0
  590. package/dist/orders/queue.js.map +1 -0
  591. package/dist/orders/waiting.d.ts +39 -0
  592. package/dist/orders/waiting.js +149 -0
  593. package/dist/orders/waiting.js.map +1 -0
  594. package/dist/pack.schema.js +13 -0
  595. package/dist/pack.schema.js.map +1 -0
  596. package/dist/pack.schema.json +7622 -841
  597. package/dist/packs/director/index.d.ts +13 -5
  598. package/dist/packs/director/index.js +204 -0
  599. package/dist/packs/director/index.js.map +1 -0
  600. package/dist/packs/heroes/campaign.d.ts +3 -2
  601. package/dist/packs/heroes/campaign.js +241 -0
  602. package/dist/packs/heroes/campaign.js.map +1 -0
  603. package/dist/packs/heroes/carry.d.ts +6 -0
  604. package/dist/packs/heroes/carry.js +112 -0
  605. package/dist/packs/heroes/carry.js.map +1 -0
  606. package/dist/packs/heroes/commands.js +115 -0
  607. package/dist/packs/heroes/commands.js.map +1 -0
  608. package/dist/packs/heroes/fallen.d.ts +43 -0
  609. package/dist/packs/heroes/fallen.js +61 -0
  610. package/dist/packs/heroes/fallen.js.map +1 -0
  611. package/dist/packs/heroes/hire.js +60 -0
  612. package/dist/packs/heroes/hire.js.map +1 -0
  613. package/dist/packs/heroes/index.d.ts +7 -6
  614. package/dist/packs/heroes/index.js +130 -0
  615. package/dist/packs/heroes/index.js.map +1 -0
  616. package/dist/packs/heroes/loop.d.ts +95 -0
  617. package/dist/packs/heroes/loop.js +250 -0
  618. package/dist/packs/heroes/loop.js.map +1 -0
  619. package/dist/packs/heroes/making.d.ts +6 -3
  620. package/dist/packs/heroes/making.js +55 -0
  621. package/dist/packs/heroes/making.js.map +1 -0
  622. package/dist/packs/heroes/respawn.d.ts +3 -3
  623. package/dist/packs/heroes/respawn.js +87 -0
  624. package/dist/packs/heroes/respawn.js.map +1 -0
  625. package/dist/packs/heroes/sets.d.ts +32 -0
  626. package/dist/packs/heroes/sets.js +51 -0
  627. package/dist/packs/heroes/sets.js.map +1 -0
  628. package/dist/packs/heroes/spells.d.ts +16 -0
  629. package/dist/packs/heroes/spells.js +269 -0
  630. package/dist/packs/heroes/spells.js.map +1 -0
  631. package/dist/packs/items/defaults.d.ts +43 -0
  632. package/dist/packs/items/defaults.js +1504 -0
  633. package/dist/packs/items/defaults.js.map +1 -0
  634. package/dist/packs/items/index.d.ts +27 -0
  635. package/dist/packs/items/index.js +214 -0
  636. package/dist/packs/items/index.js.map +1 -0
  637. package/dist/packs/moba/index.d.ts +3 -3
  638. package/dist/packs/moba/index.js +174 -0
  639. package/dist/packs/moba/index.js.map +1 -0
  640. package/dist/packs/pack.d.ts +15 -15
  641. package/dist/packs/pack.js +14 -0
  642. package/dist/packs/pack.js.map +1 -0
  643. package/dist/packs.d.ts +15 -7
  644. package/dist/packs.js +222 -0
  645. package/dist/packs.js.map +1 -0
  646. package/dist/paths.d.ts +2 -0
  647. package/dist/paths.js +109 -0
  648. package/dist/paths.js.map +1 -0
  649. package/dist/plain.js +57 -0
  650. package/dist/plain.js.map +1 -0
  651. package/dist/player.d.ts +33 -10
  652. package/dist/player.js +159 -0
  653. package/dist/player.js.map +1 -0
  654. package/dist/portals.d.ts +1 -1
  655. package/dist/portals.js +194 -0
  656. package/dist/portals.js.map +1 -0
  657. package/dist/prefabs.d.ts +25 -2
  658. package/dist/prefabs.js +239 -0
  659. package/dist/prefabs.js.map +1 -0
  660. package/dist/presetBuildings.js +58 -0
  661. package/dist/presetBuildings.js.map +1 -0
  662. package/dist/presetFoliage.d.ts +27 -0
  663. package/dist/presetFoliage.js +98 -0
  664. package/dist/presetFoliage.js.map +1 -0
  665. package/dist/presetGround.js +65 -0
  666. package/dist/presetGround.js.map +1 -0
  667. package/dist/proxies.d.ts +12 -0
  668. package/dist/proxies.js +79 -0
  669. package/dist/proxies.js.map +1 -0
  670. package/dist/query.d.ts +56 -0
  671. package/dist/query.js +88 -0
  672. package/dist/query.js.map +1 -0
  673. package/dist/races.d.ts +15 -14
  674. package/dist/races.js +172 -0
  675. package/dist/races.js.map +1 -0
  676. package/dist/randomGroups.js +91 -0
  677. package/dist/randomGroups.js.map +1 -0
  678. package/dist/registry.d.ts +117 -53
  679. package/dist/registry.js +323 -0
  680. package/dist/registry.js.map +1 -0
  681. package/dist/remains.d.ts +11 -9
  682. package/dist/remains.js +188 -0
  683. package/dist/remains.js.map +1 -0
  684. package/dist/replication.d.ts +12 -7
  685. package/dist/replication.js +100 -0
  686. package/dist/replication.js.map +1 -0
  687. package/dist/rng.d.ts +2 -0
  688. package/dist/rng.js +40 -0
  689. package/dist/rng.js.map +1 -0
  690. package/dist/rules.d.ts +186 -99
  691. package/dist/rules.js +179 -0
  692. package/dist/rules.js.map +1 -0
  693. package/dist/rulesCheck.d.ts +5 -4
  694. package/dist/rulesCheck.js +693 -0
  695. package/dist/rulesCheck.js.map +1 -0
  696. package/dist/runes.d.ts +2 -2
  697. package/dist/runes.js +80 -0
  698. package/dist/runes.js.map +1 -0
  699. package/dist/save.d.ts +37 -12
  700. package/dist/save.js +532 -0
  701. package/dist/save.js.map +1 -0
  702. package/dist/scenario.d.ts +2 -2
  703. package/dist/scenario.js +99 -0
  704. package/dist/scenario.js.map +1 -0
  705. package/dist/scheduler.d.ts +3 -0
  706. package/dist/scheduler.js +156 -0
  707. package/dist/scheduler.js.map +1 -0
  708. package/dist/score.d.ts +19 -19
  709. package/dist/score.js +709 -0
  710. package/dist/score.js.map +1 -0
  711. package/dist/sequences.d.ts +10 -6
  712. package/dist/sequences.js +206 -0
  713. package/dist/sequences.js.map +1 -0
  714. package/dist/server/doorman.js +154 -0
  715. package/dist/server/doorman.js.map +1 -0
  716. package/dist/server/gameServer.d.ts +16 -1
  717. package/dist/server/gameServer.js +643 -0
  718. package/dist/server/gameServer.js.map +1 -0
  719. package/dist/server/index.d.ts +1 -1
  720. package/dist/server/lobby.js +199 -0
  721. package/dist/server/lobby.js.map +1 -0
  722. package/dist/server/log.js +18 -0
  723. package/dist/server/log.js.map +1 -0
  724. package/dist/server/match.js +267 -0
  725. package/dist/server/match.js.map +1 -0
  726. package/dist/server/mode.d.ts +18 -9
  727. package/dist/server/mode.js +220 -0
  728. package/dist/server/mode.js.map +1 -0
  729. package/dist/{navigation-worker.js → server/navigation-worker.js} +1 -1
  730. package/dist/server/navigation-worker.js.map +1 -0
  731. package/dist/server/navigation.js +39 -0
  732. package/dist/server/navigation.js.map +1 -0
  733. package/dist/server/ops.d.ts +4 -0
  734. package/dist/server/ops.js +137 -0
  735. package/dist/server/ops.js.map +1 -0
  736. package/dist/server/packs.d.ts +3 -3
  737. package/dist/server/packs.js +32 -0
  738. package/dist/server/packs.js.map +1 -0
  739. package/dist/server/ratings.d.ts +5 -0
  740. package/dist/server/ratings.js +104 -0
  741. package/dist/server/ratings.js.map +1 -0
  742. package/dist/server/relay.d.ts +12 -2
  743. package/dist/server/relay.js +144 -0
  744. package/dist/server/relay.js.map +1 -0
  745. package/dist/server/rooms.d.ts +9 -2
  746. package/dist/server/rooms.js +442 -0
  747. package/dist/server/rooms.js.map +1 -0
  748. package/dist/server/seat.js +116 -0
  749. package/dist/server/seat.js.map +1 -0
  750. package/dist/server/seatSettings.d.ts +3 -3
  751. package/dist/server/seatSettings.js +63 -0
  752. package/dist/server/seatSettings.js.map +1 -0
  753. package/dist/server/secret.js +13 -0
  754. package/dist/server/secret.js.map +1 -0
  755. package/dist/server/start.d.ts +13 -6
  756. package/dist/server/start.js +76 -0
  757. package/dist/server/start.js.map +1 -0
  758. package/dist/server/websocket.d.ts +9 -1
  759. package/dist/server/websocket.js +306 -0
  760. package/dist/server/websocket.js.map +1 -0
  761. package/dist/server.js +15 -2861
  762. package/dist/session/can.js +26 -0
  763. package/dist/session/can.js.map +1 -0
  764. package/dist/session/commandReplay.d.ts +8 -2
  765. package/dist/session/commandReplay.js +293 -0
  766. package/dist/session/commandReplay.js.map +1 -0
  767. package/dist/session/debug.js +151 -0
  768. package/dist/session/debug.js.map +1 -0
  769. package/dist/session/delay.js +62 -0
  770. package/dist/session/delay.js.map +1 -0
  771. package/dist/session/delta.d.ts +14 -1
  772. package/dist/session/delta.js +407 -0
  773. package/dist/session/delta.js.map +1 -0
  774. package/dist/session/entityState.js +415 -0
  775. package/dist/session/entityState.js.map +1 -0
  776. package/dist/session/local.d.ts +47 -5
  777. package/dist/session/local.js +670 -0
  778. package/dist/session/local.js.map +1 -0
  779. package/dist/session/memory.d.ts +20 -2
  780. package/dist/session/memory.js +131 -0
  781. package/dist/session/memory.js.map +1 -0
  782. package/dist/session/protocol.d.ts +325 -31
  783. package/dist/session/protocol.js +55 -0
  784. package/dist/session/protocol.js.map +1 -0
  785. package/dist/session/remote.d.ts +74 -12
  786. package/dist/session/remote.js +1394 -0
  787. package/dist/session/remote.js.map +1 -0
  788. package/dist/session/replay.d.ts +11 -2
  789. package/dist/session/replay.js +160 -0
  790. package/dist/session/replay.js.map +1 -0
  791. package/dist/session/seed.js +12 -0
  792. package/dist/session/seed.js.map +1 -0
  793. package/dist/session/share.d.ts +5 -1
  794. package/dist/session/share.js +94 -0
  795. package/dist/session/share.js.map +1 -0
  796. package/dist/session/socket.d.ts +1 -1
  797. package/dist/session/socket.js +29 -0
  798. package/dist/session/socket.js.map +1 -0
  799. package/dist/session/wire.d.ts +5 -0
  800. package/dist/session/wire.js +84 -0
  801. package/dist/session/wire.js.map +1 -0
  802. package/dist/session/worker.d.ts +77 -12
  803. package/dist/session/worker.js +499 -0
  804. package/dist/session/worker.js.map +1 -0
  805. package/dist/shared.d.ts +31 -5
  806. package/dist/shared.js +166 -0
  807. package/dist/shared.js.map +1 -0
  808. package/dist/sides.d.ts +9 -3
  809. package/dist/sides.js +149 -0
  810. package/dist/sides.js.map +1 -0
  811. package/dist/sight.js +85 -0
  812. package/dist/sight.js.map +1 -0
  813. package/dist/simulate-worker.js +1 -1
  814. package/dist/simulate.d.ts +12 -8
  815. package/dist/{simulate-oXBiw1Ff.js → simulate.js} +10 -11
  816. package/dist/simulate.js.map +1 -0
  817. package/dist/smart.js +77 -0
  818. package/dist/smart.js.map +1 -0
  819. package/dist/spatial.d.ts +32 -16
  820. package/dist/spatial.js +234 -0
  821. package/dist/spatial.js.map +1 -0
  822. package/dist/spawning.d.ts +1 -0
  823. package/dist/spawning.js +224 -0
  824. package/dist/spawning.js.map +1 -0
  825. package/dist/stances.d.ts +6 -3
  826. package/dist/stances.js +169 -0
  827. package/dist/stances.js.map +1 -0
  828. package/dist/start.d.ts +10 -10
  829. package/dist/start.js +75 -0
  830. package/dist/start.js.map +1 -0
  831. package/dist/stats.d.ts +42 -16
  832. package/dist/stats.js +290 -0
  833. package/dist/stats.js.map +1 -0
  834. package/dist/summoned.d.ts +52 -0
  835. package/dist/summoned.js +38 -0
  836. package/dist/summoned.js.map +1 -0
  837. package/dist/summons.d.ts +10 -13
  838. package/dist/summons.js +271 -0
  839. package/dist/summons.js.map +1 -0
  840. package/dist/systems/abilities.js +224 -0
  841. package/dist/systems/abilities.js.map +1 -0
  842. package/dist/systems/combat.d.ts +35 -1
  843. package/dist/systems/combat.js +677 -0
  844. package/dist/systems/combat.js.map +1 -0
  845. package/dist/systems/combatTold.d.ts +3 -1
  846. package/dist/systems/combatTold.js +85 -0
  847. package/dist/systems/combatTold.js.map +1 -0
  848. package/dist/systems/construction.js +80 -0
  849. package/dist/systems/construction.js.map +1 -0
  850. package/dist/systems/economy.d.ts +0 -6
  851. package/dist/systems/economy.js +128 -0
  852. package/dist/systems/economy.js.map +1 -0
  853. package/dist/systems/fog.d.ts +1 -1
  854. package/dist/systems/fog.js +120 -0
  855. package/dist/systems/fog.js.map +1 -0
  856. package/dist/systems/life.js +32 -0
  857. package/dist/systems/life.js.map +1 -0
  858. package/dist/systems/movement.d.ts +24 -12
  859. package/dist/systems/movement.js +1247 -0
  860. package/dist/systems/movement.js.map +1 -0
  861. package/dist/systems/orders.js +64 -0
  862. package/dist/systems/orders.js.map +1 -0
  863. package/dist/systems/production.js +322 -0
  864. package/dist/systems/production.js.map +1 -0
  865. package/dist/systems/productionQueue.js +120 -0
  866. package/dist/systems/productionQueue.js.map +1 -0
  867. package/dist/systems/victory.d.ts +1 -1
  868. package/dist/systems/victory.js +56 -0
  869. package/dist/systems/victory.js.map +1 -0
  870. package/dist/talk.d.ts +6 -6
  871. package/dist/talk.js +153 -0
  872. package/dist/talk.js.map +1 -0
  873. package/dist/targeting.d.ts +142 -0
  874. package/dist/targeting.js +49 -0
  875. package/dist/targeting.js.map +1 -0
  876. package/dist/tech.d.ts +20 -3
  877. package/dist/tech.js +239 -0
  878. package/dist/tech.js.map +1 -0
  879. package/dist/techTree.d.ts +7 -0
  880. package/dist/techTree.js +90 -0
  881. package/dist/techTree.js.map +1 -0
  882. package/dist/terrain.d.ts +59 -7
  883. package/dist/terrain.js +389 -0
  884. package/dist/terrain.js.map +1 -0
  885. package/dist/terrainSave.d.ts +6 -0
  886. package/dist/terrainSave.js +74 -0
  887. package/dist/terrainSave.js.map +1 -0
  888. package/dist/testing.d.ts +8 -7
  889. package/dist/testing.js +13 -739
  890. package/dist/testing.js.map +1 -1
  891. package/dist/tiles.d.ts +1 -1
  892. package/dist/tiles.js +43 -0
  893. package/dist/tiles.js.map +1 -0
  894. package/dist/timers.d.ts +29 -4
  895. package/dist/timers.js +242 -0
  896. package/dist/timers.js.map +1 -0
  897. package/dist/tomes.d.ts +4 -4
  898. package/dist/tomes.js +94 -0
  899. package/dist/tomes.js.map +1 -0
  900. package/dist/trade.js +103 -0
  901. package/dist/trade.js.map +1 -0
  902. package/dist/transport.d.ts +6 -1
  903. package/dist/transport.js +281 -0
  904. package/dist/transport.js.map +1 -0
  905. package/dist/tunables.d.ts +10 -3
  906. package/dist/tunables.js +56 -0
  907. package/dist/tunables.js.map +1 -0
  908. package/dist/unitResources.d.ts +67 -0
  909. package/dist/unitResources.js +266 -0
  910. package/dist/unitResources.js.map +1 -0
  911. package/dist/upkeep.d.ts +6 -1
  912. package/dist/upkeep.js +26 -0
  913. package/dist/upkeep.js.map +1 -0
  914. package/dist/veterancy.d.ts +8 -3
  915. package/dist/veterancy.js +131 -0
  916. package/dist/veterancy.js.map +1 -0
  917. package/dist/vision.d.ts +36 -0
  918. package/dist/vision.js +133 -0
  919. package/dist/vision.js.map +1 -0
  920. package/dist/walls.d.ts +1 -1
  921. package/dist/walls.js +278 -0
  922. package/dist/walls.js.map +1 -0
  923. package/dist/world.d.ts +606 -88
  924. package/dist/world.js +1263 -0
  925. package/dist/world.js.map +1 -0
  926. package/package.json +2 -2
  927. package/dist/ai.js.map +0 -1
  928. package/dist/attributes.d.ts +0 -66
  929. package/dist/brain-BvVdUhX8.js +0 -7659
  930. package/dist/brain-BvVdUhX8.js.map +0 -1
  931. package/dist/builds-C6LfgvEU.js +0 -460
  932. package/dist/builds-C6LfgvEU.js.map +0 -1
  933. package/dist/coreComponents-syuh2fPG.js +0 -5149
  934. package/dist/coreComponents-syuh2fPG.js.map +0 -1
  935. package/dist/debugCommands-CzjrSm66.js +0 -14739
  936. package/dist/debugCommands-CzjrSm66.js.map +0 -1
  937. package/dist/determinism-BCymQwiE.js +0 -518
  938. package/dist/determinism-BCymQwiE.js.map +0 -1
  939. package/dist/game-DiJEN-Ks.js +0 -5800
  940. package/dist/game-DiJEN-Ks.js.map +0 -1
  941. package/dist/index.js.map +0 -1
  942. package/dist/inspect-D9dWHmZ0.js.map +0 -1
  943. package/dist/local-Dkovq42k.js +0 -1379
  944. package/dist/local-Dkovq42k.js.map +0 -1
  945. package/dist/missionRules-C-bGxm0Q.js.map +0 -1
  946. package/dist/navigation-worker.js.map +0 -1
  947. package/dist/packs-g5thvmGn.js +0 -3199
  948. package/dist/packs-g5thvmGn.js.map +0 -1
  949. package/dist/profiles-B3NS9jwk.js.map +0 -1
  950. package/dist/server.js.map +0 -1
  951. package/dist/simulate-oXBiw1Ff.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"world.js","names":[],"sources":["../src/world.ts"],"sourcesContent":["import {\n\tcellsChanged,\n\tgroundReshaped,\n\tcheckpoint,\n\tcommandHandled,\n\tcommandRejected,\n\tentityRemoved,\n\tenvironmentChanged,\n\tmessageSent,\n\tworldFailed\n} from '#engine/engineEvents'\nimport { Life } from './life'\nimport { dashing } from './dashing'\nimport { Sight } from './sight'\nimport { Sides } from './sides'\nimport { Clock } from './clock'\nimport { Spawning } from './spawning'\nimport { constructionSite } from './systems/construction'\nimport { cellsIn, rememberUnseenCells } from './cellLayers'\nimport { executeCommand, type IssuedCommand } from './commands'\nimport type { Camp } from './camps'\nimport type { ChatAudience, PingId } from './talk'\nimport { checksOf, type DebugChecks } from './debug'\nimport {\n\ttype AbilityDef,\n\ttype AttackDef,\n\ttype Cost,\n\ttype DamageType,\n\ttype EffectDef,\n\ttype EffectOf,\n\tisScenery,\n\ttype MorphBack,\n\ttype ResourceId\n} from './defs'\nimport { detection, Entity, type EntityId, exposure, type ItemInstance, type PlayerId } from './entity'\nimport { EntityIndex } from './entityIndex'\nimport { type ErrorPolicy, type ErrorSite, GameEnded, modOfPart, type RejectedKind, siteKey, siteOf, siteWords, type WorldFailure } from './errors'\nimport { Emitter } from './events'\nimport { coreHooks } from './features'\nimport { errorFields, Logger, type LogLevel, rootLogger } from './log'\nimport { type AnyHook, type HookDef, Hooks } from './hooks'\nimport { FogOfWar } from './fog'\nimport { BuildGrid } from './grid'\nimport type { Vec2 } from './math'\nimport { AirNavigation, LayeredNavigation } from './navigation/air'\nimport type { SidePaths } from './navigation/sidePaths'\nimport type { Navigation } from './navigation/navigation'\nimport { Player, type PlayerInit, type SpentOn } from './player'\nimport type { Registry, System } from './registry'\nimport { hasGroundSpeeds, slowsOnFoot, stopsOnFoot } from './groundSpeed'\nimport type { RuleSettings } from './rules'\nimport { Scheduler } from './scheduler'\nimport { Score } from './score'\nimport { Computers } from './computers'\nimport { type Component, StateStore } from './components'\nimport { type Message, type MessageRef, toMessage } from './messages'\nimport { Rng } from './rng'\nimport { settleRaces } from './races'\nimport { tunableChanged, tunings } from './tunables'\nimport { type DataKind, type DataValues, definitionChanged, definitionIn, mergeValues, redefineIn, redefinitions } from './gameData'\nimport { SpatialIndex } from './spatial'\nimport { type GroundItem } from './items'\nimport { statsOf } from './stats'\nimport type { Terrain } from './terrain'\nimport { applyTerrainPatch, type GroundBase, type TerrainPatch } from './ground'\nimport { type AreaDef, type AreaShape, Areas } from './areas'\nimport { queryWorld, type WorldQuery } from './query'\nimport { Dialog, type SaidLine } from './dialog'\nimport { Objectives, type ObjectiveState, type ObjectiveStatus } from './objectives'\nimport { coreTimers, type SequenceDef, Sequences } from './sequences'\nimport { helpListeners } from './orders/idle'\nimport { type TimerDef, Timers } from './timers'\nimport type { ListenerDef } from './events'\nimport type { Trace } from './inspect'\nimport type { CameraOrder } from './cameraOrders'\nimport type { WindGust } from './foliage'\nimport type { CinematicChoice, CinematicCue, CinematicCueSent, CinematicEnded } from './cinematics'\nimport { type FxCue, type FxOptions, playFx, stopFx } from './effects'\nimport { mapInfo, names, WorldMap } from './names'\nimport type { MapEnvironment } from './map'\nimport { type PrefabDef, type SpawnedPrefab, spawnPrefab, type SpawnPrefabOptions } from './prefabs'\n\n/**\n * What two players are to each other, when set apart from their teams (`World.setRelation`)\n *\n * @beta\n */\nexport type PlayerRelation = 'ally' | 'enemy' | 'neutral'\n\n/**\n * A shot in flight to a target or a point; it deals its damage when it lands (`world.projectiles`)\n *\n * @beta\n */\nexport interface Projectile {\n\t/** The projectile's id, from `world.newId` */\n\tid: number\n\t/** The entity that fired it */\n\tsource: EntityId\n\t/** The player whose unit fired it, who is credited with what it does */\n\towner: PlayerId\n\t/** The entity it is after; 0 or gone for a shot that hits an area */\n\ttarget: EntityId\n\t/** Where it is now, east-west, in world units */\n\tx: number\n\t/** Where it is now, north-south, in world units */\n\tz: number\n\t/** Where it was at the last tick, east-west, for the screen to blend by */\n\tprevX: number\n\t/** Where it was at the last tick, north-south, for the screen to blend by */\n\tprevZ: number\n\t/** Where it is heading. Follows the target while it lives */\n\ttx: number\n\t/** The north-south coordinate it is heading for */\n\ttz: number\n\t/** World units it flies per second */\n\tspeed: number\n\t/** The damage it deals on landing */\n\tdamage: number\n\t/** The type of damage it deals */\n\ttype: DamageType\n\t/** Whether the hit is a critical one */\n\tcrit: boolean\n\t/** Fired uphill and going to miss: it flies all the way and does nothing when it comes down */\n\tmiss: boolean\n\t/** Where it was fired from */\n\tsx: number\n\t/** North-south coordinate it was fired from */\n\tsz: number\n\t/** Set for shots that hit an area instead of a target */\n\tsplash?: { radius: number; fells: boolean; targets?: AttackDef['targets'] }\n\t/** What it looks like, when the rules say: a look of the shooter's visual, for the screen (a flaming arrow) */\n\tlook?: string\n\t/** The type of what shot it: the screen draws it so, even once the shooter is gone or out of sight */\n\tkind: string\n\t/** Words of the game's own about it, which its damage carries (see `BeforeAttack.tags`) */\n\ttags?: string[]\n\t/** How what it kills dies, for the screen (see `AttackDef.how`) */\n\thow?: string\n\t/** Which of its shooter's attacks it is of, by place (`UnitTypeDef.attacks`): the first when left out */\n\tweapon?: number\n}\n\n/**\n * What an ability sent on its way: it travels in a line and does something to everything it passes through\n *\n * @beta\n */\nexport interface Missile {\n\t/** The missile's id, from `world.newId` */\n\tid: number\n\t/** The player whose unit sent it */\n\towner: PlayerId\n\t/** The caster entity that sent it */\n\tsource: EntityId\n\t/** The id of the ability it was sent by */\n\tability: string\n\t/** The ability's level when it was sent */\n\tlevel: number\n\t/** Where it is now, east-west, in world units */\n\tx: number\n\t/** Where it is now, north-south, in world units */\n\tz: number\n\t/** Where it was at the last tick, east-west */\n\tprevX: number\n\t/** Where it was at the last tick, north-south */\n\tprevZ: number\n\t/** Direction, of length 1 */\n\tdx: number\n\t/** North-south part of its direction */\n\tdz: number\n\t/** World units it travels per second */\n\tspeed: number\n\t/** How far it still goes */\n\tleft: number\n\t/** Seconds until it sets off, and how long that took in all */\n\tdelay: number\n\t/** Seconds it takes to take shape before it sets off: `delay` starts from it and counts down */\n\tforms: number\n\t/** How far from its path it hits things, in world units */\n\tradius: number\n\t/** The missile effect of the ability that made it, which says what it does to what it hits */\n\teffect: EffectOf<'missile'>\n\t/** Whom it has passed through already. Missiles sent together share it: what one of them hit the others pass by */\n\thit: Set<EntityId>\n\t/** The unit it flies after, for the ones that do */\n\ttarget: EntityId\n\t/** How far it has come */\n\ttravelled: number\n\t/** How far it has come since it set off, or sprang on last (`EffectFields.bounce`): how far along its arc it is */\n\tleg: number\n\t/** How high above the ground its arc carries it now, for whoever draws it: 0 for what is not thrown in an arc */\n\theight: number\n\t/** How many times it has sprung on to another */\n\tbounces: number\n\t/** Something got in its way: what happens where it ends does not */\n\tstopped: boolean\n\t/** On its way back to the caster (`EffectFields.returns`): it touches nobody (unless it `hitsOnReturn`), and ends where the caster is */\n\treturning?: boolean\n\t/** How many it went through, for one that goes through so many (`pierce`) or less on each (`falloff`) */\n\tstruck?: number\n\t/** The last one it hit, for what happens where it meets a wall (`onWall`) */\n\tlast?: EntityId\n\t/** The level of the ground it set off from, for one that stops at a wall (`onWall`): a cliff above it is a wall */\n\tfloor?: number\n\t/** Where its owner steers it (`steer`, `steerMissile`) */\n\tsteerTo?: Vec2\n\t/** How full the ability that sent it was held (`EffectContext.held`), for one held and let go */\n\theld?: number\n}\n\n/**\n * Something an ability does a while after it was cast\n *\n * @beta\n */\nexport interface Delayed {\n\t/** Seconds until its effects happen */\n\tleft: number\n\t/** The unit that cast the ability */\n\tcaster: Entity\n\t/** The ability whose effects are waiting */\n\tability: AbilityDef\n\t/** The ability's level when it was cast */\n\tlevel: number\n\t/** Where the effects happen */\n\tpoint: Vec2\n\t/** The effects to run when the time is up */\n\teffects: EffectDef[]\n\t/** What its arrival goes by, when not the ability */\n\timpact?: string\n\t/** Where the effects went off from and the way they faced as it was cast, for those with a shape (`EffectCommon.shape`) */\n\tfrom?: Vec2\n\t/** The way the effects faced as it was cast, in radians as a unit's `facing` (0 along +z), for those with a shape */\n\theading?: number\n}\n\n/**\n * Ground an ability goes on working on for a while\n *\n * @beta\n */\nexport interface Zone {\n\t/** The zone's id, from `world.newId` */\n\tid: number\n\t/** The unit that cast the ability */\n\tcaster: Entity\n\t/** The ability that made the zone */\n\tability: AbilityDef\n\t/** The ability's level when it was cast */\n\tlevel: number\n\t/** Centre of the zone, east-west */\n\tx: number\n\t/** Centre of the zone, north-south */\n\tz: number\n\t/** Seconds the zone goes on */\n\tleft: number\n\t/** Seconds until what is inside is next seen to */\n\tnext: number\n\t/** The zone effect that says what it does to what is inside */\n\teffect: EffectOf<'zone'>\n\t/**\n\t * Where the effects went off from and the way they faced as it was cast, kept for what it holds with a shape\n\t * (`EffectCommon.shape`): a cone of it goes off from there, the way it faced. Left out for one with no shape\n\t */\n\tfrom?: Vec2\n\t/** The way it faced as it was cast, in radians as a unit's `facing` (0 along +z); left out for one with no shape */\n\theading?: number\n\t/** The unit it goes with (`follow`) */\n\tfollows?: EntityId\n\t/** Who is in it now, by id from the lowest, for one that sees to who comes and goes (`onEnter`, `onLeave`, `edge`) */\n\tinside?: EntityId[]\n}\n\n/**\n * How a message to a player is shown: an error, information or a hint\n *\n * @beta\n */\nexport type MessageKind = 'error' | 'info' | 'hint'\n\n/**\n * The events a world emits (`world.events`), by name, each with its payload; what hooks do not cover and listeners and sessions hear\n *\n * @beta\n */\nexport interface WorldEvents {\n\t/** An entity was added to the world */\n\tentitySpawned: Entity\n\t/** An entity left the world, dead or taken away */\n\tentityRemoved: Entity\n\t/**\n\t * `cause`: the blow, for what died of damage. `how`: what the rules made of the death in the `death` hook, for the\n\t * screen to show (`'exploded'`, `'burned'`)\n\t */\n\tentityDied: { entity: Entity; killer?: Entity; attack: boolean; cause?: DeathCause; how?: string; reason: DeathReason }\n\t/** A buff was put on, or put on again (`renewed`, with the level it had before: `previousLevel`) */\n\tbuffApplied: { target: Entity; buff: string; level: number; source?: Entity; renewed: boolean; previousLevel?: number }\n\t/** A buff came off: it ran out (`expired`), or was taken off. Not for the buffs of something that dies */\n\tbuffRemoved: { entity: Entity; buff: string; expired: boolean }\n\t/** Damage was dealt to a target: how much, of which type, by whom and by what ability or attack */\n\tdamaged: { target: Entity; source?: Entity; amount: number; type: DamageType; crit: boolean; attack: boolean; ability?: string; tags?: string[] }\n\t/** An attack went wide. Where it would have landed, and whom it was for */\n\tmissed: { x: number; z: number; source?: Entity; target?: Entity }\n\t/** A target was healed by an amount, by a source when it has one */\n\thealed: { target: Entity; source?: Entity; amount: number }\n\t/** `weapon`: which of its attacks swings, by place (`UnitTypeDef.attacks`) */\n\tattackStarted: { attacker: Entity; target?: Entity; weapon: number }\n\t/**\n\t * A swing called off before its blow (`cancelSwing`): the unit was told something else, its target went, it was\n\t * stunned. What it was swinging at, where it was at something, and with which of its attacks\n\t */\n\tswingCancelled: { attacker: Entity; target?: Entity; weapon: number }\n\t/** A projectile was fired */\n\tprojectileSpawned: Projectile\n\t/** A projectile landed or was taken away */\n\tprojectileRemoved: Projectile\n\t/** An attack that hits an area came down */\n\timpact: { x: number; z: number; radius: number; owner: PlayerId }\n\t/** A building's construction began, its site placed */\n\tconstructionStarted: Entity\n\t/** A building was completed */\n\tconstructionFinished: Entity\n\t/** A construction was called off by its owner: it dies next, with the reason `cancelled` */\n\tconstructionCancelled: Entity\n\t/** A building started to turn into another type (`UnitTypeDef.upgradesTo`), over `time` seconds */\n\tmorphStarted: { entity: Entity; into: string; time: number }\n\t/** That was called off, or the building died before it was done */\n\tmorphCancelled: { entity: Entity; into: string }\n\t/** A building finished training a unit */\n\tunitTrained: { building: Entity; unit: Entity }\n\t/** An entity became another type: `from`, what it was */\n\tentityMorphed: { entity: Entity; from: string }\n\t/** A hero in a form turned back into what it was (`leaveForm`): `form`, the type it was in; `why`, what turned it back */\n\tmorphedBack: { entity: Entity; form: string; why?: MorphBack | (string & {}) }\n\t/** A player was defeated, out of the game */\n\tplayerDefeated: Player\n\t/** A player gave up (see `surrender`): `playerDefeated` follows */\n\tplayerSurrendered: { player: PlayerId }\n\t/** A player asked for a pause, and the rules let them (see `askPause`): whoever runs the world pauses it, for `seconds` at most */\n\tpauseAsked: { player: PlayerId; seconds: number; left: number }\n\t/** The game ended; `winner` is the winning team */\n\tgameOver: { winner: number }\n\t/** The game ended on an error in its rules (`world.failure`): it is not stepped again */\n\tworldFailed: WorldFailure\n\t/** A unit got into a transport (`UnitTypeDef.transport`), or out of one */\n\tboarded: { passenger: Entity; transport: Entity }\n\t/** A unit was hired at a place that hires (`UnitTypeDef.hires`) */\n\tunitHired: { shop: Entity; unit: Entity; player: PlayerId }\n\t/** A unit got out of a transport */\n\tunloaded: { passenger: Entity; transport: Entity }\n\t/** A hero reached a new level */\n\theroLevelUp: { hero: Entity; level: number }\n\t/** A hero earned experience (`grantXp`): how much, after `beforeXp`, and the level it is at after it */\n\txpGained: { hero: Entity; amount: number; level: number; from?: Entity }\n\t/**\n\t * A unit's mana changed by something it did or was given: spent on a cast (`amount` below 0, `ability` the one cast)\n\t * or given by an effect (above 0). Not its regeneration, which would be every tick\n\t */\n\tmanaChanged: { entity: Entity; amount: number; ability?: string; source?: Entity }\n\t/**\n\t * A pool of a game's own on a unit (rage, energy, charges) changed: emitted by the game's rules\n\t * (`world.events.emit(resourceChanged, …)`), heard by the screens of the unit's owner and allies (`resource`)\n\t */\n\tresourceChanged: { entity: Entity; kind: string; amount: number; reason?: string }\n\t/** A fallen hero was brought back */\n\theroRevived: Entity\n\t/** `duration`: seconds of the wind-up */\n\tcastStarted: { caster: Entity; ability: AbilityDef; point?: Vec2; duration: number }\n\t/**\n\t * A wind-up called off before it went off: the caster stunned, killed, or ordered elsewhere. `ability`: the one wound up,\n\t * where it is still known (an item's, gone with the item, is not)\n\t */\n\tcastCancelled: { caster: Entity; ability?: AbilityDef }\n\t/** A channelled ability started to be kept up, or ended: done, or `interrupted` */\n\tchannelStarted: { caster: Entity; ability: AbilityDef; duration: number }\n\t/** A channelled ability stopped being kept up; `interrupted` when it was broken off */\n\tchannelEnded: { caster: Entity; ability: AbilityDef; interrupted: boolean }\n\t/** A missile was sent on its way */\n\tmissileSpawned: Missile\n\t/** A missile passed through a target */\n\tmissileHit: { missile: Missile; target: Entity }\n\t/** A missile ended or was taken away */\n\tmissileRemoved: Missile\n\t/** An ability was cast: by whom, at what level, at which target or point, and whether it used a charge */\n\tabilityCast: { caster: Entity; ability: AbilityDef; level: number; target?: Entity; point: Vec2; charged?: boolean }\n\t/**\n\t * What an ability set off arrived: a missile hit, a rush ended, the time was up. `from`: where it went off from,\n\t * when not the caster (`EffectContext.origin`). `effect`: the effect of the ability whose arrival it is (a missile, a\n\t * delay, a zone at its end), where the list that landed is one of the ability's\n\t */\n\tabilityImpact: {\n\t\tcaster: Entity\n\t\tability: AbilityDef\n\t\tlevel: number\n\t\ttarget?: Entity\n\t\tpoint: Vec2\n\t\tradius: number\n\t\timpact?: string\n\t\tfrom?: Vec2\n\t\teffect?: EffectDef\n\t}\n\t/** A building finished researching an upgrade, to this level */\n\tresearchFinished: { building: Entity; upgrade: string; level: number }\n\t/** An item came to lie on the ground */\n\titemDropped: GroundItem\n\t/** An entity picked an item up from the ground */\n\titemPicked: { entity: Entity; item: ItemInstance }\n\t/** A hero took a purchase back at a shop (`undoBuy`): what it cost came back, the parts it used up came back */\n\titemUndone: { entity: Entity; item: string; shop: number }\n\t/** Every creep of a camp is gone. It comes back after a while, when it says so (see `Camp.respawn`) */\n\tcampCleared: { camp: Camp }\n\t/** A camp cleared came back, its creeps where they stood (see `respawnCamp`) */\n\tcampReturned: { camp: Camp }\n\t/** A player marked a spot for their allies, or for everyone (see `ping`) */\n\tpinged: { player: PlayerId; point: Vec2; kind: PingId; to: ChatAudience; by?: string }\n\t/** A player gave an ally resources (see `give`): how much went, and how much came after the tax */\n\ttraded: { from: PlayerId; to: PlayerId; resource: string; sent: number; received: number }\n\t/** A player traded one resource for another at a rate (see `exchange`): how much of what went, and how much of what came */\n\texchanged: { player: PlayerId; sold: string; sent: number; bought: string; received: number }\n\t/** A player said a line (see `chat`): to their side, or to everyone */\n\tchatted: { player: PlayerId; text: string; to: ChatAudience; by?: string }\n\t/** What a unit carries changed: an item given, taken, bought, sold, used up, or a hero carried in with theirs */\n\tinventoryChanged: { entity: Entity }\n\t/** A player was paid a bounty of this amount for an entity's death */\n\tbounty: { entity: Entity; player: PlayerId; amount: number }\n\t/** A worker struck what it is mending */\n\tworked: { worker: Entity; target: Entity }\n\t/** A worker struck the tree it is working on */\n\tchopped: { worker: Entity; source: Entity }\n\t/** A worker handed in what it carried: `amount` as it went into the purse, `upkeep` what upkeep took of it at the door */\n\tresourcesDeposited: { entity: Entity; player: PlayerId; kind: ResourceId; amount: number; upkeep?: number }\n\t/**\n\t * A player paid for something (`spend`), or was given back what they paid (`refund`, `giveBack`): `on` what (`unit`,\n\t * `upgrade`, `structure`, `item`, `hire`, `repair`... or a game's own word), and its id\n\t */\n\tresourcesSpent: { player: PlayerId; cost: Cost; on: SpentOn; id?: string; refund: boolean }\n\t/**\n\t * A command, or a part of one, that a player's own client never sends: not what it says it is (an unknown type, a\n\t * field missing or of the wrong kind), or naming another player's unit, or a unit there never was. What a race makes\n\t * (an order to a unit that has just died) is not one. A server counts these against whoever sent them (`onCheat`);\n\t * a game's own commands may emit it too\n\t */\n\t/**\n\t * A command turned away (`RejectedKind`: why, for what counts them, as a server's cheat counter does), with the\n\t * reason in words for the log\n\t */\n\tcommandRejected: { player?: PlayerId; type?: string; kind: RejectedKind; reason: string }\n\t/** A command that came with a number of its sender's (`seq`) was carried out: refused with the first error the player was told, or not */\n\tcommandHandled: { player: PlayerId; seq: number; refusal?: Message }\n\t/** Feedback for a player, like \"Not enough gold\": what the client finds the words for */\n\tmessageSent: { player: PlayerId; message: Message; kind: MessageKind; seconds?: number }\n\t/** A unit walked into an area of the game (`Rules.areas`) */\n\tenteredArea: { area: string; entity: Entity }\n\t/** A unit walked out of one. What dies in an area is not said to leave it */\n\tleftArea: { area: string; entity: Entity }\n\t/** An objective of a player was given (`was` undefined), got further along, was done or failed */\n\tobjectiveChanged: { player: PlayerId; objective: ObjectiveState; was?: ObjectiveStatus }\n\t/** Someone said a line, to some players or everyone (see `world.dialog`) */\n\tlineSaid: SaidLine\n\t/** A line was skipped by whom it was said to: it ends early for them */\n\tlineEnded: { id: number; to: PlayerId[] }\n\t/** A player went over to another team (`setTeam`) */\n\tteamChanged: { player: PlayerId; from: number; to: number }\n\t/** The rules marked a moment to start again from, like the start of a wave: a session keeps a save of it */\n\tcheckpoint: { label: Message }\n\t/** The rules play one of the view's cinematics on the screens of some players, or everyone's (see `playCinematic`) */\n\tcinematicCue: CinematicCue\n\t/** The rules cue the cinematic playing on some screens, or everyone's (see `cueCinematic`) */\n\tcinematicCued: CinematicCueSent\n\t/** The rules pan or shake one player's camera (see `cameraFor`) */\n\tcameraOrdered: { player: PlayerId } & Pick<CameraOrder, 'pan' | 'shake'>\n\t/** A cinematic the rules played is over on a player's screen, as their screen said (see `cinematic`'s `wait`) */\n\tcinematicEnded: CinematicEnded\n\t/** A player picked an answer of a cinematic's choice, as their screen said (see `cinematicChose`) */\n\tcinematicChoice: CinematicChoice\n\t/** The rules play one of the view's effects at a place or on an entity, for everyone who sees it (see `world.fx`) */\n\tfxStarted: FxCue\n\t/** The rules stop an effect they played (see `world.stopFx`) */\n\tfxStopped: { id: number; fade?: number }\n\t/**\n\t * One hidden in a layer of cells moved in it, or stepped into it (`ConcealmentOptions.rustle`): told to the teams\n\t * it names that do not see it (all of them, where none are named), where they see the ground, as a shake of what the\n\t * layer draws there\n\t */\n\trustled: { layer: string; entity: Entity; x: number; z: number; entered: boolean; teams?: number[] }\n\t/**\n\t * A gust of wind blew at a place (`gust`, `WindGust`): where, and the gust. Told to the players who see the place,\n\t * for their screens to bend the grass and bushes there\n\t */\n\tgusted: { x: number; z: number; gust: WindGust }\n\t/**\n\t * Cells of a layer (`Terrain.cells`) were set to a value (`setCells`): told to the players who see them, the others\n\t * as they come into sight (`cellsSeen`). `over`: the seconds the screens ease into it over, where the rules said\n\t * (grass growing back)\n\t */\n\tcellsChanged: { layer: string; cells: number[]; value: number; over?: number }\n\t/**\n\t * Cells of a layer that changed out of a team's sight came into it (`TeamMemory.cells`): told to that team's players,\n\t * the cells at `value` now\n\t */\n\tcellsSeen: { team: number; layer: string; cells: number[]; value: number }\n\t/** A part of the ground was reshaped (`reshapeGround`): as it is now, told to every player */\n\tgroundReshaped: { patch: TerrainPatch }\n\t/** What the map looks like beyond its ground changed (`setEnvironment`): as it is now, told to every player */\n\t/** `over`: the seconds the screens ease into it over, where the rules said */\n\tenvironmentChanged: { environment: MapEnvironment; over?: number }\n}\n\n/**\n * What a world checks of itself and of its game as it runs, over the process's: for tests, development, a server that\n * runs games of its own\n *\n * @beta\n */\nexport interface WorldChecks {\n\t/** The engine's checks on itself (`DebugChecks`): all on or off, some of them; the process's (`setDebugChecks`) when left out */\n\tchecks?: boolean | Partial<DebugChecks>\n}\n\n/**\n * What a world is made of (`new World`): its ground and ways, its game, its players, its systems and hooks, and what it\n * checks of itself\n *\n * @beta\n */\nexport interface WorldOptions extends WorldChecks {\n\t/** The ground the world stands on */\n\tterrain: Terrain\n\t/** The navigation units on the ground walk by */\n\tnavigation: Navigation\n\t/** Where boats go (`UnitTypeDef.naval`): the deep water. None for a map without, and boats go on the ground */\n\twaterNavigation?: Navigation\n\t/** The navigations the sides plan their routes on, of what each knows (`Rules.paths: 'seen'`). None when left out */\n\tsidePaths?: SidePaths\n\t/** The game's definitions: unit types, abilities, orders and the rest */\n\tregistry: Registry\n\t/** The players of the world, in order, from which its `Player`s are made */\n\tplayers: PlayerInit[]\n\t/** The races one is drawn from for a player given `random`: all of the game's when left out */\n\trandomRaces?: readonly string[]\n\t/** Makes the systems of the world, once it is made: what keeps state of its own keeps it for this world */\n\tsystems: (world: World) => System[]\n\t/** Hook handlers. The engine's own (`coreHooks`) when left out */\n\thooks?: HookDef[]\n\t/** How the game reacts to events, subscribed in this order once the world is made */\n\tlisteners?: ListenerDef[]\n\t/** Parts of the map the rules watch */\n\tareas?: AreaDef[]\n\t/** What the game can set to go off later, by id */\n\ttimers?: TimerDef[]\n\t/** Scripts of steps the game can start, by id */\n\tsequences?: SequenceDef[]\n\t/** Seed for the world's random generator; 1 when left out */\n\tseed?: number\n\t/** Simulation steps per second */\n\ttickRate?: number\n\t/** The logger the world's own is made under (`world.log`): the root one when left out */\n\tlog?: Logger\n\t/** The least an entry of the world's log must matter to be said (`Rules.log`) */\n\tlogLevel?: LogLevel\n\t/** What becomes of a part of the game that throws (`Rules.onError`): it throws on, when left out */\n\tonError?: ErrorPolicy\n}\n\n/**\n * How a blow is described to `world.damage`: its type, whether it is an attack or crit, its ability, tags and how it kills\n *\n * @beta\n */\nexport interface DamageOptions {\n\t/** Physical when left out */\n\tdamageType?: DamageType\n\t/** A basic attack: life steal works on it */\n\tattack?: boolean\n\t/** It struck critically. The amount is what it is, this is for whoever is watching */\n\tcrit?: boolean\n\t/** The ability that dealt it, by id: for \"immune to Ice Storm\", or a kill feed. Left out for a basic attack */\n\tability?: string\n\t/** Words of the game's own about it (`'fire'`, `'explosive'`), for hooks and the screen to decide on */\n\ttags?: string[]\n\t/** How what this blow kills dies, for the screen (`'burnt'`): the death's `how` (`AttackDef.how`, `AbilityDef.how`) */\n\thow?: string\n}\n\n/**\n * What killed something that died of damage: the blow that did it\n *\n * @beta\n */\nexport interface DeathCause {\n\t/** The type of damage that killed */\n\ttype: DamageType\n\t/** What the blow took off */\n\tamount: number\n\t/** How much more it was than there was health left */\n\toverkill: number\n\t/** Whether the killing blow was a critical hit */\n\tcrit: boolean\n\t/** The id of the ability that dealt the blow, when it was one */\n\tability?: string\n\t/** Words of the game's own about the blow (`DamageOptions.tags`) */\n\ttags?: string[]\n\t/** How the blow says what it kills dies (`DamageOptions.how`) */\n\thow?: string\n}\n\n/**\n * Why something died, when it was not of damage: killed by the rules (`killed`, `world.kill`), its building called\n * off (`cancelled`), its time out (`expired`), a resource used up (`depleted`), brought down by a blast (`felled`), taken\n * away with what it stood on or by the debug tools (`removed`), or the game's own word (`sold`, `sacrificed`). `damage`\n * for one that ran out of health\n *\n * @beta\n */\nexport type DeathReason = 'damage' | 'killed' | 'cancelled' | 'expired' | 'depleted' | 'felled' | 'removed' | (string & {})\n\n/**\n * A spot a team sees for a while, with nothing standing there\n *\n * @beta\n */\nexport interface Reveal {\n\t/** The reveal's id, from `world.newId` */\n\tid: number\n\t/** The team that sees the spot */\n\tteam: number\n\t/** Centre of the revealed spot, east-west */\n\tx: number\n\t/** Centre of the revealed spot, north-south */\n\tz: number\n\t/** How far from the centre it reveals, in world units */\n\tradius: number\n\t/** Seconds it goes on */\n\tleft: number\n\t/** Shown, and nothing drawn for it: what the rules show a player, as a cinematic looks at it. A spell's, when left out */\n\tquiet?: boolean\n}\n\n/**\n * What `world.spawn` is told besides type, owner and position: facing, size, look and the rest\n *\n * @beta\n */\nexport interface SpawnOptions {\n\t/** The way it faces, in radians; the engine's default facing when left out */\n\tfacing?: number\n\t/** How big it is drawn */\n\tscale?: number\n\t/** Which of the models of its type it is drawn with, for things that come in kinds like trees */\n\tlook?: string\n\t/**\n\t * Drawn as this entity is: its type's model, its owner's colour, its size and its look, while the new one stays what\n\t * its own type and owner say it is (a soul in the fallen's shape). `scale` and `look` here win over the entity's\n\t */\n\tlooksLike?: Entity\n\t/**\n\t * Components it starts with, by id, as `Component.default` would not give them: `{ 'warden.soul': { hero: 4 } }`.\n\t * They are on it before the hooks of its making run. An id the game does not have throws\n\t */\n\tdata?: Record<string, unknown>\n\t/** A name of its own, for the rules to find it by: `world.named('gate')` */\n\tname?: string\n\t/** Seconds it lasts, when that is not what its type says */\n\tlifetime?: number\n\t/** Structures only: start as a construction site, with its build time and what was paid when they are not its type's */\n\tunderConstruction?: boolean | { buildTime?: number; paid?: Cost }\n}\n\n/**\n * Where a new entity goes and whose it is, with what else it starts with (`World.spawn(type, { at, owner })`)\n *\n * @public\n */\nexport interface SpawnAt extends SpawnOptions {\n\t/** Where it stands, in cells; a building is centred on the cells nearest it */\n\tat: Vec2\n\t/** The player it belongs to */\n\towner: PlayerId\n}\n\n/** See `World.internals` */\nexport interface WorldInternals {\n\tnextEntityId: number\n\tnextId: number\n\tclockShift: number\n\t/** The hour the clock stands at, when it does not move */\n\tstillHour?: number\n\tcommands: IssuedCommand[]\n\t/** Who died and has not been taken out of the world yet: at the end of the tick that comes */\n\tdead?: EntityId[]\n}\n\n/**\n * What watches a world from outside (`World.watch`): told of each command a player gives it, each save taken of it,\n * and each tick it ran\n *\n * @beta\n */\nexport interface WorldWatcher {\n\t/** A command given from outside a tick, before the tick it is applied at runs */\n\tcommand?(command: IssuedCommand): void\n\t/** A save was taken, which put the world's crowd back as a load puts it */\n\tsaved?(): void\n\t/** A tick ran */\n\tstepped?(): void\n}\n\n/**\n * The simulation: the ground, entities, players, systems and rules of one game, stepped a tick at a time with `step`\n *\n * @public\n */\nexport class World {\n\t/**\n\t * Obstacles the navigation had no room for (`RecastNavigationOptions.maxObstacles`): what is put down past it does not block the way\n\t *\n\t * @beta\n\t */\n\tobstaclesRefused = 0\n\t/**\n\t * The ground the world stands on\n\t *\n\t * @beta\n\t */\n\treadonly terrain: Terrain\n\t/**\n\t * The ground it started on, where it was made from a map (S36): what a save keeps only the changes of\n\t *\n\t * @beta\n\t */\n\tground?: GroundBase\n\t/**\n\t * The ground and the air. Agents find their own layer, everything else is about the ground\n\t *\n\t * @beta\n\t */\n\treadonly nav: Navigation\n\t/**\n\t * The navigations the sides plan their routes on, of the buildings each knows (`Rules.paths: 'seen'`): routes\n\t * of ground units are planned on their side's, and walked on `nav`. None where routes know everything\n\t *\n\t * @beta\n\t */\n\treadonly sidePaths?: SidePaths\n\t/** The ground, the air and the water, to find where a kind of unit can be */\n\tprivate readonly layers: LayeredNavigation\n\t/** The navigation an entity goes on: the air for what flies, the water for boats where the map has it, the ground for the rest */\n\t/**\n\t * The ways a type of entity walks, flies or sails on (`navFor` for one made)\n\t *\n\t * @internal\n\t */\n\tlayerOf(def: { flying?: boolean; naval?: boolean }): Navigation {\n\t\treturn this.layers.layer(def)\n\t}\n\n\t/**\n\t * An id for an entity about to be made (`Spawning`)\n\t *\n\t * @internal\n\t */\n\tnewEntityId(): number {\n\t\treturn this.nextEntityId++\n\t}\n\n\t/**\n\t * The navigation an entity walks by: the air, the water or the ground, by its layer\n\t *\n\t * @beta\n\t */\n\tnavFor(entity: Entity): Navigation {\n\t\treturn this.layers.layer(entity.def)\n\t}\n\t/**\n\t * The air alone\n\t *\n\t * @beta\n\t */\n\treadonly air: Navigation\n\t/** The game's definitions: unit types, abilities, orders and the rest */\n\treadonly registry: Registry\n\t/**\n\t * Which cells are taken by buildings and what can be built where\n\t *\n\t * @beta\n\t */\n\treadonly grid: BuildGrid\n\t/**\n\t * What each team has seen and sees, per cell\n\t *\n\t * @beta\n\t */\n\treadonly fog: FogOfWar\n\t/**\n\t * Index of entities by position, for asking what is near a point.\n\t *\n\t * Units are filed once a tick, where they stand as it starts (after the commands, before the systems: `step`).\n\t * A unit that moves during the tick (the `move` phase) is still filed where it was until the next, so a query in\n\t * `resolve` searches by where units started and checks distance against where they are now: a unit that walked\n\t * into range this tick may be found only the next. Structures are filed where they stand, as they are made\n\t *\n\t * @beta\n\t */\n\treadonly spatial: SpatialIndex\n\t/** What happened, for whoever watches: sessions, tests. Sent out at the end of each tick. Rules use `hooks` */\n\treadonly events = new Emitter()\n\t/**\n\t * What this world says about what it does: `world.log.warn('waves', 'nothing to send', { wave })`. Each entry says\n\t * the game and the tick it is from, and goes to whoever asked (`world.log.to(sink)`) and to the logger the world\n\t * was made under. It changes nothing in the world, and is not in a save\n\t */\n\treadonly log: Logger\n\t/**\n\t * The engine's checks on itself this world runs (`DebugChecks`): what it was made with (`CreateWorldOptions.checks`),\n\t * the process's (`setDebugChecks`) when it says nothing. Slow: tests and development\n\t *\n\t * @beta\n\t */\n\tchecks: DebugChecks = checksOf(undefined)\n\t/**\n\t * Moved on by `invalidateStats` without an entity: every entity's stats are added up again when next asked for\n\t *\n\t * @beta\n\t */\n\tstatsVersion = 0\n\t/**\n\t * What the debug tools follow of the rules as they run: hooks and listeners. Null when nobody asks, see `EventLog`\n\t *\n\t * @beta\n\t */\n\ttrace: Trace | null = null\n\t/** Where game modules and mods take part in damage, deaths, orders and the like, see `HookEvents` */\n\treadonly hooks: Hooks\n\t/** The areas of the game, and who is in them */\n\treadonly areas: Areas\n\t/** What is set to go off later: `world.timers.after(30, waveComes)` */\n\treadonly timers: Timers\n\t/** Scripts of steps that run over time: `world.sequences.start(briefing)` */\n\treadonly sequences: Sequences\n\t/** What each player is set to do, in a mission */\n\treadonly objectives: Objectives\n\t/**\n\t * What the game counts of its players (`RuleSettings.score`): `world.score.add(player, 'towersLost')`, `get`, `team`.\n\t * Counts nothing in a game that does not ask\n\t *\n\t * @beta\n\t */\n\treadonly score: Score\n\t/** What is said, by whom, to whom: `world.dialog.say(player, line)`, or `talk` in a sequence */\n\treadonly dialog: Dialog\n\t/** The world's seeded random generator; the only source of randomness the simulation uses */\n\treadonly rng: Rng\n\t/** Every player of the world, by id */\n\treadonly players = new Map<PlayerId, Player>()\n\t/**\n\t * Everything in the world, by id. Fallen heroes stay in here while they wait to be brought back\n\t *\n\t * @beta\n\t */\n\treadonly entities = new Map<EntityId, Entity>()\n\t/**\n\t * The entities that act: the ones that move, fight, build or change by themselves, which is everything but scenery.\n\t * Systems that run every tick go through these instead of `entities`, which on a big map is mostly trees.\n\t *\n\t * In the order each became a unit, which is the order of ids except for scenery woken later (`Spawning.wake`: a\n\t * tree given a buff), which comes last, after units made before it. A save keeps this order, so a loaded world\n\t * walks it the same. A component's index (`EntityIndex`, `SystemDef.over`) walks in id order instead, so code that\n\t * picks the first of equals breaks the tie by id, not by which it met first, to stay the same either way\n\t */\n\treadonly units = new Map<EntityId, Entity>()\n\t/**\n\t * The scenery each team sees right now, by team. Kept by the fog system whenever it works out what everyone sees:\n\t * scenery never moves, so this only changes then. Lets a session describe what is in sight without testing every tree\n\t *\n\t * @beta\n\t */\n\treadonly sceneryInSight = new Map<number, Set<Entity>>()\n\t/**\n\t * Entities by owner, heroes by owner, shops. For questions that would otherwise go through every entity\n\t *\n\t * @beta\n\t */\n\treadonly index = new EntityIndex(\n\t\t(id) => this.registry.used(id),\n\t\t() => this\n\t)\n\t/**\n\t * The shots in flight\n\t *\n\t * @beta\n\t */\n\treadonly projectiles: Projectile[] = []\n\t/**\n\t * The missiles in flight\n\t *\n\t * @beta\n\t */\n\treadonly missiles: Missile[] = []\n\t/**\n\t * Effects waiting for their time to come\n\t *\n\t * @beta\n\t */\n\treadonly delayed: Delayed[] = []\n\t/**\n\t * The zones that are working on the ground now\n\t *\n\t * @beta\n\t */\n\treadonly zones: Zone[] = []\n\t/**\n\t * Switches for trying things out. A game that is played for real leaves them off\n\t *\n\t * @beta\n\t */\n\treadonly cheats = {\n\t\t/** Abilities and what is carried can be used again at once */\n\t\tnoCooldowns: false,\n\t\t/** Abilities cost no mana, and are cast with none left */\n\t\tnoManaCosts: false,\n\t\t/** What the players allowed the debug tools own (`debugPlayers`) takes no harm, and so does not die of it */\n\t\tinvulnerable: false,\n\t\t/** How fast the game goes, 1 as it should, 0 paused: whoever runs it (a session in the page, a server) goes by it */\n\t\tspeed: 1\n\t}\n\t/**\n\t * Players who may use the debug commands (`debug.*`, see `debugCommands.ts`): who a session lets, a seat in the page\n\t * that asked, a server started to. Not in a save: whoever loads it says again\n\t *\n\t * @beta\n\t */\n\treadonly debugPlayers = new Set<PlayerId>()\n\t/**\n\t * The entity each object of the map became, by the object's id (`MapObject.id`): what the map put down as the world\n\t * was made of it (`createWorldFromMap`), and what the editor's Play here put down since (`debug.mapObject`), for the\n\t * editor to find again what it moves and takes away (EQ10). Kept in a save\n\t *\n\t * @beta\n\t */\n\treadonly fromMap = new Map<number, EntityId>()\n\t/**\n\t * Spots a team sees for a while without anything there to see them\n\t *\n\t * @beta\n\t */\n\treadonly reveals: Reveal[] = []\n\t/**\n\t * State of game modules and mods for the whole game, see `state`\n\t *\n\t * @beta\n\t */\n\treadonly states = new StateStore()\n\t/**\n\t * Items lying on the ground\n\t *\n\t * @beta\n\t */\n\treadonly items: GroundItem[] = []\n\t/**\n\t * Runs the systems, in order, each as often as it asks\n\t *\n\t * @beta\n\t */\n\treadonly scheduler: Scheduler\n\t/** The computer players: who is seated, kept in a save and seated again by a load (`world.computers.seat`) */\n\treadonly computers: Computers\n\t/**\n\t * What the world's numbers started from (`rng`): 1 when none was given. A computer player's own numbers start from it and its player\n\t *\n\t * @beta\n\t */\n\treadonly seed: number\n\n\t/** Simulation ticks per second */\n\treadonly tickRate: number\n\t/**\n\t * Seconds per tick\n\t *\n\t * @beta\n\t */\n\treadonly dt: number\n\t/** The tick number the world is at, from 0; it goes up by one for each `step` */\n\ttick = 0\n\t/**\n\t * How things are hurt, healed and die (`Life`)\n\t *\n\t * @beta\n\t */\n\treadonly life: Life = new Life(this)\n\t/**\n\t * What each team sees of the entities (`Sight`): the fog, what is invisible, the game's say\n\t *\n\t * @beta\n\t */\n\treadonly sight: Sight = new Sight(this)\n\t/**\n\t * Who is on whose side (`Sides`): teams, relations, shared vision and control\n\t *\n\t * @beta\n\t */\n\treadonly sides: Sides = new Sides(this)\n\t/**\n\t * How entities come into the world and are moved about in it (`Spawning`)\n\t *\n\t * @beta\n\t */\n\treadonly spawning: Spawning = new Spawning(this)\n\t/**\n\t * The time of day (`Clock`): the hour, night, turned forward or stopped\n\t *\n\t * @beta\n\t */\n\treadonly clock: Clock = new Clock(this)\n\t/** Team that won, once the game is decided */\n\twinner: number | null = null\n\t/**\n\t * What becomes of a part of the game that throws: a hook's handler, a listener, a system, a timer, an order, a\n\t * command (`ErrorPolicy`). The game's own (`Rules.onError`), or whoever runs the world's; with neither it\n\t * throws, as it always did. A server and a launched game end the game where nothing is said (`??= 'end'`)\n\t *\n\t * @beta\n\t */\n\terrorPolicy?: ErrorPolicy\n\t/**\n\t * Why the game ended on an error, once it has (`end`): the world is not stepped again\n\t *\n\t * @beta\n\t */\n\tfailure: WorldFailure | null = null\n\t/**\n\t * The parts switched off for having thrown (`disable`), by name (`siteKey`): kept in a save, and off again when it is loaded\n\t *\n\t * @beta\n\t */\n\treadonly disabled = new Map<string, ErrorSite>()\n\t/** True through a tick: an error then can end the game; outside one it is whoever called's */\n\tprivate stepping = false\n\tprivate toldFailure = false\n\t/** Errors already answered `throw` further in: not asked about again on their way out */\n\tprivate readonly thrown = new WeakSet<object>()\n\n\tprivate nextEntityId = 1\n\tprivate nextId = 1\n\tprivate commands: IssuedCommand[] = []\n\t/** Commands each player gave since the last tick, from outside one: what `commandLimit` counts */\n\tprivate readonly given = new Map<PlayerId, number>()\n\t/** Commands let go since the last tick, by player: told of at the next (`commandRejected`) */\n\tprivate readonly overLimit = new Map<PlayerId, number>()\n\t/** Those of them the sender numbered: each answered at the next tick, refused (`commandHandled`), for a screen that waits on it */\n\tprivate readonly overLimitSeqs: { player: PlayerId; seq: number }[] = []\n\n\t/**\n\t * Commands a player may give between two ticks, at most (`issue`, from outside a tick): those past it are let go,\n\t * and the tick says so once (`commandRejected`, reason `tooManyCommands`), and answers each the sender numbered,\n\t * refused (`commandHandled`). A server's rate limit keeps far under it; this bounds what has none (a worker, a\n\t * page's own host, a script gone wrong). The computer and scripts, which give theirs in a tick, are not counted.\n\t * 100 when left out; `Infinity` for none\n\t *\n\t * @beta\n\t */\n\tcommandLimit = 100\n\n\t/**\n\t * Makes an empty world of the options' terrain, rules and players; a game makes one with `createWorld` or\n\t * `createWorldFromMap`, which also place the map's things and start the rules\n\t *\n\t * @beta\n\t */\n\tconstructor(options: WorldOptions) {\n\t\tthis.terrain = options.terrain\n\t\tthis.air = new AirNavigation(options.terrain.width, options.terrain.depth)\n\t\tthis.layers = new LayeredNavigation(options.navigation, this.air, options.waterNavigation)\n\t\tthis.nav = this.layers\n\t\tthis.sidePaths = options.sidePaths\n\t\tthis.registry = options.registry\n\t\tthis.log = (options.log ?? rootLogger).child({ level: options.logLevel, context: () => ({ game: this.registry.game, tick: this.tick }) })\n\t\t// what the registry has to say (a part the game does not list) is said by the world it is the registry of\n\t\tthis.registry.log = this.log\n\t\tthis.errorPolicy = options.onError\n\t\tif (options.checks !== undefined) this.checks = checksOf(options.checks)\n\t\t// an event of the game's own that the game does not list is an error (`UnlistedError`)\n\t\tthis.events.watch((type) => {\n\t\t\tif (typeof type === 'string' && !this.registry.lists('event', type)) this.registry.event(type)\n\t\t})\n\t\tthis.hooks = new Hooks(this)\n\t\tfor (const hook of options.hooks ?? coreHooks) this.hooks.add(hook)\n\t\t// a layer of cells that slows one on foot (or a value of it: a style of grass), changed in play: the ways weigh it\n\t\t// again where it changed (EN2). Not a state layer of grass: a fire does not cut the ways again. Which layers slow is\n\t\t// asked as each change comes, of the game as it is then: a style given a speed or made a thicket while the game\n\t\t// plays (`debug.cellStyles`) counts from then on. Only where the ground slowed somewhere as the world was made:\n\t\t// its navigations weigh the ground only then (`RecastNavigationOptions.speedAt`)\n\t\tif (hasGroundSpeeds(this.registry)) {\n\t\t\tthis.events.on(cellsChanged, ({ layer, cells }) => {\n\t\t\t\tif (!slowsOnFoot(this.registry, layer)) return\n\t\t\t\t// a layer with a thicket among its values may have made cells walkable or not\n\t\t\t\tconst walkability = stopsOnFoot(this.registry, layer)\n\t\t\t\tthis.nav.groundChanged?.(cells, walkability)\n\t\t\t\tthis.sidePaths?.groundChanged(cells, walkability)\n\t\t\t})\n\t\t}\n\t\tthis.tickRate = options.tickRate ?? 30\n\t\tthis.dt = 1 / this.tickRate\n\t\tthis.seed = options.seed ?? 1\n\t\tthis.rng = new Rng(this.seed)\n\t\tthis.computers = new Computers(this)\n\t\tfor (const init of options.players) this.players.set(init.id, new Player(init))\n\t\t// a race for each who plays: drawn from the world's numbers only where one is to be drawn\n\t\tsettleRaces(this.players.values(), this.registry, (count) => this.rng.int(0, count - 1), options.randomRaces)\n\t\tthis.grid = new BuildGrid(this.terrain)\n\t\tconst teams = new Set<number>()\n\t\tfor (const player of this.players.values()) if (!player.neutral) teams.add(player.team)\n\t\tthis.fog = new FogOfWar(this.terrain.width, this.terrain.depth, [], this.terrain.levels)\n\t\t// the whole map explored from the start where the rules say (`FogSettings.startExplored`), for the teams there are and\n\t\t// to come. A map says otherwise as the game is made from it (`MapDef.explored`)\n\t\tthis.fog.exploredFromStart = !!this.settings.fog?.startExplored\n\t\tfor (const team of teams) this.fog.addTeam(team)\n\t\tthis.spatial = new SpatialIndex(this.terrain.width, this.terrain.depth)\n\t\t// last: what makes a system may look at the world\n\t\tthis.scheduler = new Scheduler(options.systems(this))\n\t\tthis.areas = new Areas(this, options.areas ?? [])\n\t\tthis.timers = new Timers(this, [...coreTimers, ...(options.timers ?? [])])\n\t\tthis.sequences = new Sequences(this, options.sequences ?? [])\n\t\tthis.objectives = new Objectives(this)\n\t\tthis.dialog = new Dialog(this)\n\t\t// counted ahead of the game's listeners: one that hears of a kill reads the score with it\n\t\tthis.score = new Score(this)\n\t\tconst ids = new Set<string>()\n\t\t// the game's listeners, then the ones its sequences need for what they wait for\n\t\tfor (const listener of [...helpListeners, ...(options.listeners ?? []), ...Sequences.listenersFor(options.sequences ?? [])]) {\n\t\t\tif (ids.has(listener.id)) throw new Error(`Listener \"${listener.id}\" is there twice`)\n\t\t\tids.add(listener.id)\n\t\t\tconst off = `listener:${listener.id}`\n\t\t\tthis.events.on(listener.event, (payload) => {\n\t\t\t\t// one switched off for having thrown no longer hears anything\n\t\t\t\tif (this.disabled.size && this.disabled.has(off)) return\n\t\t\t\tthis.trace?.listener(listener.id)\n\t\t\t\ttry {\n\t\t\t\t\tlistener.run(this, payload)\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthis.caught(error, { kind: 'listener', id: listener.id })\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\t/**\n\t * The systems, in the order they run\n\t *\n\t * @beta\n\t */\n\tget systems(): readonly System[] {\n\t\treturn this.scheduler.systems\n\t}\n\n\t/**\n\t * Adds a system to the running world, like a computer player. It takes its place by its phase, `before` and `after`\n\t *\n\t * @beta\n\t */\n\taddSystem(system: System): void {\n\t\tthis.scheduler.add(system)\n\t\t// in a loaded world, what it kept when the game was saved\n\t\tconst saved = this.savedSystems.get(system.name)\n\t\tif (saved !== undefined && system.restore) {\n\t\t\tthis.savedSystems.delete(system.name)\n\t\t\tsystem.restore(this, saved)\n\t\t}\n\t}\n\n\t/** What systems kept in themselves when the game was saved, for those not added yet */\n\tprivate readonly savedSystems = new Map<string, unknown>()\n\n\t/**\n\t * Gives the systems what they kept in a save (see `System.save`): those there now, and those added later\n\t *\n\t * @beta\n\t */\n\trestoreSystems(saved: Record<string, unknown>): void {\n\t\tthis.savedSystems.clear()\n\t\tfor (const [name, data] of Object.entries(saved)) {\n\t\t\tconst system = this.systems.find((each) => each.name === name)\n\t\t\tif (system?.restore) system.restore(this, data)\n\t\t\telse this.savedSystems.set(name, data)\n\t\t}\n\t}\n\n\t/**\n\t * Takes a system out by name. False when there is none of that name\n\t *\n\t * @beta\n\t */\n\tremoveSystem(name: string): boolean {\n\t\treturn this.scheduler.remove(name)\n\t}\n\n\t/** Seconds of game time that have passed: `tick` times `dt` */\n\tget time(): number {\n\t\treturn this.tick * this.dt\n\t}\n\n\t/**\n\t * A number of the rules as it is tuned now (`TunableDef`): what it was set to while playing, or its default\n\t *\n\t * @beta\n\t */\n\ttunable(id: string): number {\n\t\tconst def = this.registry.tunable(id)\n\t\tif (!def) throw new Error(`The game has no tunable \"${id}\"`)\n\t\treturn this.state(tunings)[id] ?? def.default\n\t}\n\n\t/**\n\t * Tunes a number of the rules, within its bounds, and says so (`tunableChanged`)\n\t *\n\t * @beta\n\t */\n\tsetTunable(id: string, value: number): void {\n\t\tconst def = this.registry.tunable(id)\n\t\tif (!def || !Number.isFinite(value)) return\n\t\tconst set = Math.min(Math.max(value, def.min), def.max)\n\t\tthis.setState(tunings, { ...this.state(tunings), [id]: set })\n\t\tthis.events.emit(tunableChanged, { id, value: set })\n\t}\n\n\t/**\n\t * Changes a definition while the game runs (S61): a unit type's health, an ability's cooldown, as the editor's Data\n\t * panel tries them. What is made of it from then on is made of the new one; a unit type's units already in the world\n\t * take it at once, with as much of their health lost as before. Kept with the world and in its save, and said\n\t * (`definitionChanged`). False for a definition the game does not have. Not held to what the game lets be changed\n\t * (`Rules.editable`), as `layData` and a map's definitions are: any field is taken. The check is the command's that\n\t * the Data panel sends (`redefineCommand`); code that calls this says what it allows itself\n\t *\n\t * @beta\n\t */\n\tredefine(kind: DataKind, id: string, values: DataValues): boolean {\n\t\tif (!redefineIn(this.registry, kind, id, values)) return false\n\t\tconst kept = this.state(redefinitions)\n\t\tconst before = kept[kind] ?? {}\n\t\tthis.setState(redefinitions, { ...kept, [kind]: { ...before, [id]: mergeValues(before[id] ?? {}, values) } })\n\t\tif (kind === 'units') this.retype(new Set([id]))\n\t\tthis.events.emit(definitionChanged, { kind, id, values })\n\t\treturn true\n\t}\n\n\t/**\n\t * The units of these types take their type as the registry has it now, with as much of their health lost as\n\t * before: after it was changed (`redefine`, `reloadGame`). Every type when none are said\n\t *\n\t * @internal\n\t */\n\tretype(types?: ReadonlySet<string>): void {\n\t\tfor (const entity of this.entities.values()) {\n\t\t\tif (types && !types.has(entity.def.id)) continue\n\t\t\tconst def = definitionIn(this.registry, 'units', entity.def.id)\n\t\t\tif (!def || def === entity.def) continue\n\t\t\t// filed again, as a unit that turns into another type is: what it sells, what it is, may be other now\n\t\t\tthis.index.remove(entity)\n\t\t\tentity.retype(def)\n\t\t\tthis.index.add(entity)\n\t\t\tconst hurt = entity.maxHealth - entity.health\n\t\t\tentity.maxHealth = statsOf(this, entity).health\n\t\t\tif (entity.alive) entity.health = Math.max(entity.maxHealth - hurt, 1)\n\t\t}\n\t}\n\n\t/** State of a game module or a mod for the whole game: made from the component's default when first asked for */\n\tstate<T>(key: Component<T, unknown>): T {\n\t\t// one the game does not list is an error (`UnlistedError`)\n\t\tif (!this.registry.lists('component', key.id)) this.registry.used(key.id)\n\t\treturn this.states.get(key)\n\t}\n\n\t/** Sets the whole game's state for a component, replacing what `state` gives for it */\n\tsetState<T>(key: Component<T, unknown>, value: T): void {\n\t\tthis.states.set(key, value)\n\t}\n\n\t/** The game's numbers that are not about any one unit, like the supply cap (`Rules.settings`) */\n\tget settings(): Readonly<RuleSettings> {\n\t\treturn this.registry.settings\n\t}\n\n\t/**\n\t * Hour of the day, 0..24. Noon in a game without days (`clock.hour`)\n\t *\n\t * @beta\n\t */\n\tget hour(): number {\n\t\treturn this.clock.hour\n\t}\n\n\t/**\n\t * Whether the sun is down (`clock.night`): asked for every unit's sight and stats, many times a tick\n\t *\n\t * @beta\n\t */\n\tget night(): boolean {\n\t\treturn this.clock.night\n\t}\n\n\t/**\n\t * Unique id for orders, order groups and projectiles\n\t *\n\t * @beta\n\t */\n\tnewId(): number {\n\t\treturn this.nextId++\n\t}\n\n\t/** The player of this id; throws when there is none */\n\tplayer(id: PlayerId): Player {\n\t\tconst player = this.players.get(id)\n\t\tif (!player) throw new Error(`Unknown player ${id}`)\n\t\treturn player\n\t}\n\n\t/**\n\t * Whether an entity of this id was ever made here: one that died was, one of a number not yet given out never was\n\t *\n\t * @beta\n\t */\n\tmade(id: EntityId): boolean {\n\t\treturn Number.isInteger(id) && id >= 1 && id < this.nextEntityId\n\t}\n\n\t/** Living entity with this id */\n\tget(id: EntityId | undefined): Entity | undefined {\n\t\tif (!id) return undefined\n\t\tconst entity = this.entities.get(id)\n\t\treturn entity?.alive ? entity : undefined\n\t}\n\n\t/**\n\t * The entity of this name, while it lives: one named on the map in the editor, or in code. Nothing once it is\n\t * dead, or when there never was one. A game can say which names there are: `world.named<RoadNames>('gate')`\n\t */\n\tnamed<Name extends string = string>(name: Name): Entity | undefined {\n\t\treturn this.get(this.state(names)[name])\n\t}\n\n\t/**\n\t * The name an entity was given, if any\n\t *\n\t * @beta\n\t */\n\tnameOf(entity: Entity): string | undefined {\n\t\tconst all = this.state(names)\n\t\tfor (const name in all) if (all[name] === entity.id) return name\n\t\treturn undefined\n\t}\n\n\t/**\n\t * Names an entity, for the rules to find it by (`named`), or takes its name away with none. It has one name, and a\n\t * name is one entity's: taking that of another that still lives throws. The name of the dead is free\n\t *\n\t * @beta\n\t */\n\tsetName(entity: Entity, name: string | undefined): void {\n\t\tconst all = this.state(names)\n\t\tconst before = this.nameOf(entity)\n\t\tif (before === name) return\n\t\tif (name !== undefined) {\n\t\t\tconst holder = this.named(name)\n\t\t\tif (holder) throw new Error(`\"${name}\" is the name of ${holder.def.id}#${holder.id} already: ${entity.def.id}#${entity.id} cannot have it too`)\n\t\t\tall[name] = entity.id\n\t\t}\n\t\tif (before !== undefined) delete all[before]\n\t}\n\n\t/**\n\t * What the map this world was made from says that is not an entity: its name, and what the game kept with it\n\t * (`GameMap.data`). Kept in the world, so a save has it. Empty for a world made without a map\n\t */\n\tget map(): WorldMap {\n\t\treturn new WorldMap(this.state(mapInfo))\n\t}\n\n\t/** Whether two players fight each other (`sides.enemies`): asked of every target, every tick */\n\tareEnemies(a: PlayerId, b: PlayerId): boolean {\n\t\treturn this.sides.enemies(a, b)\n\t}\n\n\t/** Whether two players are on one side (`sides.allies`) */\n\tareAllies(a: PlayerId, b: PlayerId): boolean {\n\t\treturn this.sides.allies(a, b)\n\t}\n\n\t/**\n\t * Whether a player may command an entity (`sides.mayCommand`): what every command is checked against\n\t *\n\t * @beta\n\t */\n\tmayCommand(player: PlayerId, entity: Entity): boolean {\n\t\treturn this.sides.mayCommand(player, entity)\n\t}\n\n\t/**\n\t * Whether a team currently sees the entity (`sight.sees`): asked of every entity, team and snapshot\n\t *\n\t * @beta\n\t */\n\tisVisibleTo(entity: Entity, team: number): boolean {\n\t\treturn this.sight.sees(entity, team)\n\t}\n\n\t/**\n\t * Creates an entity. Structures are centered on the grid cells closest to `position`;\n\t * the caller is responsible for checking `grid.canPlace` when that matters.\n\t */\n\t/**\n\t * A prefab put down as one: its objects spawned for the owner given, its camps and areas with them, turned and sized\n\t * around its middle (`spawnPrefab`)\n\t *\n\t * @beta\n\t */\n\tspawnPrefab(prefab: PrefabDef | string, options: SpawnPrefabOptions): SpawnedPrefab {\n\t\treturn spawnPrefab(this, prefab, options)\n\t}\n\n\t/**\n\t * The neutral player, who owns what belongs to nobody (a soul, a mine, a tree): the first of them, the game's\n\t * `MAP_NEUTRAL`. Throws for a game that has none\n\t *\n\t * @beta\n\t */\n\tget neutral(): PlayerId {\n\t\tfor (const player of this.players.values()) if (player.neutral && !player.creeps) return player.id\n\t\tthrow new Error('The world has no neutral player')\n\t}\n\n\t/**\n\t * Puts a new entity of the unit type `typeId` into the world for `owner` at `at`, and returns it:\n\t * `world.spawn('footman', { at: { x: 10, z: 12 }, owner: 1 })`, with the rest of what it may start with\n\t * (`SpawnOptions`: `facing`, `name`, `lifetime`, `data`…) beside them\n\t */\n\tspawn(typeId: string, options: SpawnAt): Entity\n\t/** Puts a new entity of the unit type `typeId` into the world for `owner` at `position`, and returns it */\n\tspawn(typeId: string, owner: PlayerId, position: Vec2, options?: SpawnOptions): Entity\n\tspawn(typeId: string, owner: PlayerId | SpawnAt, position?: Vec2, options: SpawnOptions = {}): Entity {\n\t\tif (typeof owner === 'object') {\n\t\t\tconst { at, owner: player, ...rest } = owner\n\t\t\treturn this.spawning.spawn(typeId, player, at, rest)\n\t\t}\n\t\treturn this.spawning.spawn(typeId, owner, position!, options)\n\t}\n\n\t/**\n\t * What its parts call off as an entity leaves its owner, dying or given away (`Component.onLeave`)\n\t *\n\t * @internal\n\t */\n\tleave(entity: Entity): void {\n\t\tthis.spawning.leave(entity)\n\t}\n\n\t/**\n\t * Turns scenery into an actor, for good: something gave it a reason to be looked at every tick, like a buff\n\t * that has to run out. Whatever does that to an entity calls this; the debug checks catch what forgets to.\n\t *\n\t * @beta\n\t */\n\twake(entity: Entity): void {\n\t\tthis.spawning.wake(entity)\n\t}\n\n\t/**\n\t * Sets cells of one of the game's layers (`Terrain.cells`, `CellLayerDef`) to a value: by their indices, or those in\n\t * a shape. A bush burnt, grass grown. The players who see a cell are told at once (a `cells` event), the others as it\n\t * comes into their sight (`TeamMemory.cells`), and saves keep it. Returns the cells that changed\n\t */\n\t/**\n\t * Changes what the map looks like beyond its ground, as the game goes: a storm rolling in (`weather`), night mist\n\t * (`fog`), the sky going red. Over what it was, field by field; a field given as undefined goes back to none. Every\n\t * player sees it (an `environment` event), a save keeps it, and a player who joins later is told it as it is.\n\t *\n\t * `over` (seconds) has the screens ease into it, from what they show: the rain comes on, the wind gets up, the mist\n\t * thickens. The world has the new look at once: a save or a player who joins sees it as it ends\n\t */\n\tsetEnvironment(change: Partial<MapEnvironment>, options: { over?: number } = {}): void {\n\t\tconst info = this.state(mapInfo)\n\t\tconst environment: MapEnvironment = { ...info.environment }\n\t\tfor (const [key, value] of Object.entries(change) as [keyof MapEnvironment, unknown][]) {\n\t\t\tif (value === undefined) delete environment[key]\n\t\t\telse Object.assign(environment, { [key]: structuredClone(value) })\n\t\t}\n\t\tthis.setState(mapInfo, { ...info, environment })\n\t\tconst over = options.over && options.over > 0 ? options.over : undefined\n\t\tthis.events.emit(environmentChanged, { environment: structuredClone(environment), ...(over && { over }) })\n\t}\n\n\t/**\n\t * Plays one of the view's fx (`GameView.fx.defs`) on the screens of the players who see where it is, or those it is\n\t * for (`to`): at a place (`at`), or on an entity (`on`, at a `point` of its model), with knobs (`params`). Its random\n\t * parts go by a seed, the same on every screen. Nothing it does decides anything: it is not in the world's state, a\n\t * save, or what a player who joins later is told. What it gives back stops it (`stopFx`)\n\t *\n\t * @beta\n\t */\n\tfx(fx: string, options: FxOptions = {}): number {\n\t\treturn playFx(this, fx, options)\n\t}\n\n\t/**\n\t * Stops an fx the rules played (`fx`) on every screen, as its own `stop` says, over `fade` seconds\n\t *\n\t * @beta\n\t */\n\tstopFx(id: number, options: { fade?: number } = {}): void {\n\t\tstopFx(this, id, options)\n\t}\n\n\t/**\n\t * Sets the cells of a cell layer, given as indices or an area, to a value 0..255, and returns the cells that changed.\n\t * `over`: the seconds the screens that see them ease into the value over (grass growing back), told with the cells;\n\t * a screen told of them later, as they come into its sight, eases in as it can\n\t *\n\t * @beta\n\t */\n\tsetCells(layer: string, cells: readonly number[] | AreaShape, value: number, options: { over?: number } = {}): number[] {\n\t\tconst { terrain } = this\n\t\tif (!Number.isInteger(value) || value < 0 || value > 255) throw new Error(`setCells: ${value} is not a value a cell holds, 0 to 255`)\n\t\tconst values = terrain.cellLayer(layer)\n\t\tconst changed: number[] = []\n\t\tconst was: number[] = []\n\t\tfor (const c of Array.isArray(cells) ? cells : cellsIn(terrain, cells as AreaShape)) {\n\t\t\tif (c < 0 || c >= values.length || values[c] === value) continue\n\t\t\twas.push(values[c])\n\t\t\tvalues[c] = value\n\t\t\tchanged.push(c)\n\t\t}\n\t\tif (!changed.length) return changed\n\t\t// what each team that does not see a cell knew of it, for it to be told as it comes into sight (RV7)\n\t\trememberUnseenCells(this, layer, changed, was, value)\n\t\tconst { over } = options\n\t\tthis.events.emit(cellsChanged, { layer, cells: changed, value, ...(over !== undefined && over > 0 && { over }) })\n\t\treturn changed\n\t}\n\n\t/**\n\t * Reshapes a part of the ground as the game goes (`TerrainPatch`): its heights, cliffs, water, paint, what is kept\n\t * off it and the game's layers of cells, all at once, as the editor's Play here pushes the map's ground into the game\n\t * played (`debug.ground`, EQ10). What the rules go by follows: who sees whom from the levels, where can be built, and\n\t * the ways, cut again of the ground as it is now (`Navigation.reshape`: on this thread, every machine the same; only\n\t * the tiles of the ways the patch reaches, a few milliseconds for a field, where the ground is still cut on the same\n\t * grid, else all of them, which is not for nothing on a big map). What stands on it stays where it is. Every player\n\t * is told (a `ground` event), and saves keep it. Throws where the patch does not fit the ground (`terrainPatchProblem`)\n\t *\n\t * @beta\n\t */\n\treshapeGround(patch: TerrainPatch): void {\n\t\tapplyTerrainPatch(this.terrain, patch)\n\t\tthis.fog.levelsChanged()\n\t\tthis.grid.groundChanged(patch)\n\t\t// the part that changed: only what it reaches cut again, where the navigation can\n\t\tconst area = { x: patch.x, z: patch.z, width: patch.width, depth: patch.depth }\n\t\tthis.nav.reshape?.(area)\n\t\tthis.sidePaths?.reshape(area)\n\t\tthis.events.emit(groundReshaped, { patch })\n\t}\n\n\t/**\n\t * Lets a team see a spot for a while, with nothing standing there\n\t *\n\t * @beta\n\t */\n\treveal(team: number, point: Vec2, radius: number, seconds: number, options: { quiet?: boolean } = {}): Reveal {\n\t\tconst reveal: Reveal = { id: this.nextId++, team, x: point.x, z: point.z, radius, left: seconds, ...(options.quiet && { quiet: true }) }\n\t\tthis.reveals.push(reveal)\n\t\treturn reveal\n\t}\n\n\t/** Puts a unit somewhere else, where it stands: the way through is not its concern. Structures stay where they were built */\n\tplace(entity: Entity, point: Vec2): void {\n\t\tthis.spawning.place(entity, point)\n\t}\n\n\t/**\n\t * Gives an entity to another player, from now on in everything: whose it is, whom it fights, what it counts for.\n\t * What it was doing is called off, and what it was making is given back to the one it belonged to\n\t */\n\tsetOwner(entity: Entity, owner: PlayerId): void {\n\t\tthis.spawning.setOwner(entity, owner)\n\t}\n\n\t/**\n\t * Takes a unit out of the world for a while, or puts it back: a worker inside a gold mine, a unit carried in\n\t * something. While hidden it is not found, not seen and in nobody's way, and its orders wait. It comes back at\n\t * `at`, or where it went in, on the nearest ground it can stand on. Structures cannot hide\n\t *\n\t * @beta\n\t */\n\tsetHidden(entity: Entity, hidden: boolean, at?: Vec2): void {\n\t\tthis.spawning.setHidden(entity, hidden, at)\n\t}\n\n\t/**\n\t * Gives an entity a time after which it is gone by itself, like a ward, or takes it away with `null`\n\t *\n\t * @beta\n\t */\n\tsetLifetime(entity: Entity, seconds: number | null): void {\n\t\tthis.spawning.setLifetime(entity, seconds)\n\t}\n\n\t/** Deals damage (`life.damage`): the hooks, armor and shields, health, death */\n\tdamage(target: Entity, amount: number, source?: Entity, options: DamageOptions = {}): void {\n\t\tthis.life.damage(target, amount, source, options)\n\t}\n\n\t/** Heals (`life.heal`): how much it healed */\n\theal(target: Entity, amount: number, source?: Entity): number {\n\t\treturn this.life.heal(target, amount, source)\n\t}\n\n\t/** Kills (`life.kill`) */\n\tkill(entity: Entity, killer?: Entity, attack = false, reason: DeathReason = 'killed'): void {\n\t\tthis.life.kill(entity, killer, attack, reason)\n\t}\n\n\t/**\n\t * Tells a player something, like why what they asked for cannot be done. The world says which message,\n\t * and the player's screen finds the words for it (see `Message`). A bare string is a key without params\n\t */\n\tmessage(player: PlayerId, message: MessageRef, kind: MessageKind = 'error'): void {\n\t\tconst said = toMessage(message)\n\t\t// told while a command of theirs is carried out: why it was refused\n\t\tconst { handling } = this\n\t\tif (handling && handling.player === player && kind === 'error') handling.refusal ??= said\n\t\tthis.events.emit(messageSent, { player, message: said, kind })\n\t}\n\n\t/**\n\t * Gives a player a hint (campaign plan CP5): a message of the kind `hint`, shown for `seconds` (the screen's own\n\t * time when left out), which a player who turned hints off in the settings does not see\n\t *\n\t * @beta\n\t */\n\thint(player: PlayerId, message: MessageRef, options: { seconds?: number } = {}): void {\n\t\tconst said: WorldEvents['messageSent'] = { player, message: toMessage(message), kind: 'hint' }\n\t\tif (options.seconds !== undefined) said.seconds = options.seconds\n\t\tthis.events.emit(messageSent, said)\n\t}\n\n\t/**\n\t * The command being carried out, to find out whether it was refused: see `executeCommand`\n\t *\n\t * @beta\n\t */\n\thandling?: { player: PlayerId; refusal: Message | undefined }\n\n\t/**\n\t * What a save needs that is the world's own business: id counters, the clock and the commands waiting for\n\t * the next tick. For `saveWorld` and `loadWorld` only\n\t *\n\t * @beta\n\t */\n\tinternals(): WorldInternals {\n\t\treturn {\n\t\t\tnextEntityId: this.nextEntityId,\n\t\t\tnextId: this.nextId,\n\t\t\tclockShift: this.clock.shift,\n\t\t\t...(this.clock.still !== undefined && { stillHour: this.clock.still }),\n\t\t\tcommands: this.commands,\n\t\t\t...(this.life.dead.length > 0 && { dead: this.life.dead.map((entity) => entity.id) })\n\t\t}\n\t}\n\n\t/**\n\t * Puts back what `internals` gave, for `loadWorld` only\n\t *\n\t * @beta\n\t */\n\trestoreInternals(internals: WorldInternals): void {\n\t\tthis.nextEntityId = internals.nextEntityId\n\t\tthis.nextId = internals.nextId\n\t\tthis.clock.shift = internals.clockShift\n\t\tthis.clock.still = internals.stillHour\n\t\tthis.commands = [...internals.commands]\n\t\t// the dead are found once the entities are back: see `restoreDead`\n\t}\n\n\t/**\n\t * Puts back who died and waits to be taken out (`WorldInternals.dead`), once the entities are back. For `loadWorld` only\n\t *\n\t * @beta\n\t */\n\trestoreDead(ids: readonly EntityId[]): void {\n\t\tfor (const id of ids) {\n\t\t\tconst entity = this.entities.get(id)\n\t\t\tif (!entity) throw new Error(`Save: the dead ${id} is not in it`)\n\t\t\tthis.life.dead.push(entity)\n\t\t}\n\t}\n\n\t/**\n\t * Queues a player command. It is applied at the start of the next tick; talk (a command whose def says\n\t * `outsideTick`: chat, a ping) given between ticks is carried out at once, a paused game's too (RV14)\n\t */\n\tissue(command: IssuedCommand): void {\n\t\tif (!this.stepping && typeof command?.type === 'string' && this.registry.command(command.type)?.outsideTick) {\n\t\t\t// kept by what records the game where it was given, and carried out there again by its replay\n\t\t\tfor (const watcher of this.watchers) watcher.command?.(command)\n\t\t\texecuteCommand(this, command)\n\t\t\treturn\n\t\t}\n\t\tif (!this.stepping && typeof command?.player === 'number') {\n\t\t\tconst given = (this.given.get(command.player) ?? 0) + 1\n\t\t\tthis.given.set(command.player, given)\n\t\t\tif (given > this.commandLimit) {\n\t\t\t\tthis.overLimit.set(command.player, (this.overLimit.get(command.player) ?? 0) + 1)\n\t\t\t\tif (typeof command.seq === 'number') this.overLimitSeqs.push({ player: command.player, seq: command.seq })\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tthis.commands.push(command)\n\t\t// one given from outside a tick is a player's: what a replay of commands keeps. One given in a tick (a computer\n\t\t// player's, a script's) the tick gives again when it runs again\n\t\tif (!this.stepping) for (const watcher of this.watchers) watcher.command?.(command)\n\t}\n\n\t/**\n\t * Whether a debug command (`debug.*`) waits for a tick: a game paused by `debug.speed` runs the tick it takes, or\n\t * nothing of the debug tools would be done again, the command to go on included\n\t *\n\t * @internal\n\t */\n\tget debugWaiting(): boolean {\n\t\treturn this.commands.some((command) => typeof command?.type === 'string' && command.type.startsWith('debug.'))\n\t}\n\n\t/** What watches the world from outside (`watch`) */\n\tprivate readonly watchers = new Set<WorldWatcher>()\n\n\t/**\n\t * Watches the world from outside, for what records it (a replay of commands, `recordGame`): each command a player\n\t * gives it, each save taken of it, each tick. Changes nothing. Gives what stops watching\n\t *\n\t * @beta\n\t */\n\twatch(watcher: WorldWatcher): () => void {\n\t\tthis.watchers.add(watcher)\n\t\treturn () => void this.watchers.delete(watcher)\n\t}\n\n\t/**\n\t * A save of the world was taken, which put its crowd back (`saveWorld`): told to what watches it. The engine's\n\t *\n\t * @beta\n\t */\n\tsaved(): void {\n\t\tfor (const watcher of this.watchers) watcher.saved?.()\n\t}\n\n\t/** Advances the simulation by one fixed tick */\n\t/**\n\t * The entities that are all of what is asked, for scripts: whose they are, of which type, in which area. Only the\n\t * living, unless asked. A new list: for what runs every tick, go through `index` or `areas` instead; by place and condition, `query`\n\t */\n\tfind(filter: { owner?: PlayerId; type?: string; area?: string; dead?: boolean } = {}): Entity[] {\n\t\tconst from =\n\t\t\tfilter.area !== undefined\n\t\t\t\t? this.areas.inside(filter.area)\n\t\t\t\t: filter.owner !== undefined\n\t\t\t\t\t? this.index.ownedBy(filter.owner)\n\t\t\t\t\t: this.entities.values()\n\t\tconst found: Entity[] = []\n\t\tfor (const entity of from) {\n\t\t\tif (filter.owner !== undefined && entity.owner !== filter.owner) continue\n\t\t\tif (filter.type !== undefined && entity.def.id !== filter.type) continue\n\t\t\tif (!filter.dead && !entity.alive) continue\n\t\t\tfound.push(entity)\n\t\t}\n\t\treturn found\n\t}\n\n\t/**\n\t * What in the world is all a query asks (`WorldQuery`): around a point or a unit (`near`, `radius`), in an area, of\n\t * whom, of which type, kind and layer, what it carries and how hurt it is (`UnitCondition`), what a player sees, or\n\t * code (`where`); in an order (`sort`: `nearest`, `lowestHealthShare`, `random`…), as many as `limit` says. A new list:\n\t * `world.query({ near: hero, radius: 8, is: 'enemy', healthBelow: 0.3, sort: 'nearest', limit: 3 })`\n\t *\n\t * @beta\n\t */\n\tquery(query: WorldQuery = {}): Entity[] {\n\t\treturn queryWorld(this, query)\n\t}\n\n\t/**\n\t * Marks a moment to start again from, like the start of a wave, with what the player is told it is (\"Wave 6\").\n\t * A session keeps a save of the world as it is at the end of this tick, for \"Retry from wave 6\"\n\t */\n\tcheckpoint(label: MessageRef): void {\n\t\tthis.events.emit(checkpoint, { label: toMessage(label) })\n\t}\n\n\t/**\n\t * Steps the world one tick; does nothing once the game failed. In this order:\n\t *\n\t * 1. The commands sent since the last tick are carried out.\n\t * 2. Units are filed by where they stand (`spatial`).\n\t * 3. The systems run, phase by phase (`commands`, `decide`, `move`, `resolve`, `cleanup`).\n\t * 4. The dead are taken out of the world (`remove` hook, `entityRemoved`).\n\t * 5. `tick` goes up by one.\n\t * 6. The tick's events go out to listeners (`world.events.on`), held until now.\n\t *\n\t * So a listener runs after the tick is over: `world.tick` is already the next one, and an entity that died this\n\t * tick is no longer in `world.entities` (the event still carries it; a fallen hero waiting to be brought back\n\t * stays). Hooks run at once, inside the tick, where\n\t * what they are asked about happens\n\t */\n\tstep(): void {\n\t\t// a game that ended on an error stays as it was: nothing of it runs again\n\t\tif (this.failure) return\n\t\tthis.events.hold()\n\t\tthis.stepping = true\n\t\ttry {\n\t\t\tthis.advance()\n\t\t} catch (error) {\n\t\t\t// the tick a game ends in is left where it failed (`caught`): everything else goes on to whoever stepped\n\t\t\tif (!(error instanceof GameEnded)) throw error\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\t// what happened goes out now that the tick is over\n\t\t\t\tthis.events.release()\n\t\t\t} catch (error) {\n\t\t\t\tif (!(error instanceof GameEnded)) throw error\n\t\t\t} finally {\n\t\t\t\tthis.stepping = false\n\t\t\t}\n\t\t}\n\t\t// what the tick's changes of the ground asked of the ways (a slowing layer painted, the ground reshaped), done\n\t\t// together where nothing asked of them since did it: none of it left for between ticks (a save, a screen)\n\t\tthis.nav.settleGround?.()\n\t\tthis.sidePaths?.settleGround()\n\t\tif (this.failure && !this.toldFailure) {\n\t\t\tthis.toldFailure = true\n\t\t\tthis.events.emit(worldFailed, this.failure)\n\t\t}\n\t\tfor (const watcher of this.watchers) watcher.stepped?.()\n\t}\n\n\t/**\n\t * What a part of the game that threw comes to, by what the world says of errors (`errorPolicy`). It returns when\n\t * the part is to be switched off or let go (`disable`): the caller does that, and goes on. It throws otherwise: the\n\t * error itself (`throw`), or what leaves the tick of a game that ends there (`end`)\n\t *\n\t * @beta\n\t */\n\tcaught(error: unknown, where: ErrorSite): void {\n\t\t// already answered further in: a game ending, or an error on its way out\n\t\tif (error instanceof GameEnded) throw error\n\t\tconst judged = typeof error === 'object' && error !== null\n\t\tif (judged && this.thrown.has(error)) throw error\n\t\tconst policy = this.errorPolicy ?? 'throw'\n\t\t// whose it is, in a game with mods\n\t\tconst mod = modOfPart(this.registry.module, where)\n\t\tif (mod) where = { ...where, mod }\n\t\tlet answer = typeof policy === 'function' ? policy(error, where, this) : policy\n\t\t// outside a tick there is no tick to leave: whoever called the world is told\n\t\tif (answer === 'end' && !this.stepping) answer = 'throw'\n\t\tif (answer === 'throw') {\n\t\t\tif (judged) this.thrown.add(error)\n\t\t\tthrow error\n\t\t}\n\t\tconst fields = { ...where, error: errorFields(error) }\n\t\tif (answer === 'disable') {\n\t\t\tconst kept =\n\t\t\t\twhere.kind === 'order' ? 'the order is taken off the unit' : where.kind === 'command' ? 'the command is refused' : 'it is switched off'\n\t\t\tthis.log.error('game', `${siteWords(where)} threw: ${kept}, and the game goes on`, fields)\n\t\t\tif (where.kind !== 'order' && where.kind !== 'command') this.disabled.set(siteKey(where), siteOf(where))\n\t\t\treturn\n\t\t}\n\t\tthis.failure = { message: `The game stopped: ${siteWords(where)} failed`, where, error: errorFields(error), tick: this.tick }\n\t\tthis.log.error('game', `${siteWords(where)} threw: the game ends`, fields)\n\t\tthrow new GameEnded(this.failure)\n\t}\n\n\t/**\n\t * Switches off the parts a save says were (`world.disabled`): the same game goes on as the one that was saved\n\t *\n\t * @beta\n\t */\n\tdisable(sites: Iterable<ErrorSite>): void {\n\t\tfor (const site of sites) {\n\t\t\tthis.disabled.set(siteKey(site), siteOf(site))\n\t\t\tif (site.kind === 'system') this.scheduler.disable(site.id)\n\t\t\telse if (site.kind === 'hook') this.hooks.remove(site.hook as AnyHook, site.id)\n\t\t}\n\t}\n\n\tprivate advance(): void {\n\t\tif (this.checks.scenery) this.checkScenery()\n\t\tif (this.checks.index) this.index.check(this.entities.values())\n\t\t// where everything stood at the start of the tick: the renderer draws in between this and where it ends up\n\t\tfor (const entity of this.units.values()) {\n\t\t\tentity.prevPos.x = entity.pos.x\n\t\t\tentity.prevPos.z = entity.pos.z\n\t\t\tentity.prevFacing = entity.facing\n\t\t}\n\n\t\tthis.given.clear()\n\t\tif (this.overLimit.size) {\n\t\t\tfor (const [player, count] of this.overLimit)\n\t\t\t\tthis.events.emit(commandRejected, {\n\t\t\t\t\tplayer,\n\t\t\t\t\tkind: 'tooMany',\n\t\t\t\t\treason: `tooManyCommands: ${count} past the ${this.commandLimit} a tick takes`\n\t\t\t\t})\n\t\t\tthis.overLimit.clear()\n\t\t}\n\t\tif (this.commands.length) {\n\t\t\tconst commands = this.commands\n\t\t\tthis.commands = []\n\t\t\tfor (const command of commands) executeCommand(this, command)\n\t\t}\n\t\t// and each let go that its sender numbered is answered, refused, after those taken\n\t\tif (this.overLimitSeqs.length) {\n\t\t\tfor (const { player, seq } of this.overLimitSeqs) this.events.emit(commandHandled, { player, seq, refusal: { key: 'tooManyCommands' } })\n\t\t\tthis.overLimitSeqs.length = 0\n\t\t}\n\n\t\tthis.spatial.rebuild(this.units.values())\n\t\tthis.scheduler.run(this)\n\n\t\tif (this.life.dead.length) {\n\t\t\tfor (const entity of this.life.dead) {\n\t\t\t\tthis.entities.delete(entity.id)\n\t\t\t\tthis.units.delete(entity.id)\n\t\t\t\tthis.index.remove(entity)\n\t\t\t\tthis.hooks.run('remove', entity)\n\t\t\t\tthis.events.emit(entityRemoved, entity)\n\t\t\t}\n\t\t\tthis.life.dead.length = 0\n\t\t}\n\t\tthis.tick++\n\t}\n\n\t/** Throws when scenery has something that only units get looked after for. See `debugChecks` */\n\tprivate checkScenery(): void {\n\t\tfor (const entity of this.entities.values()) {\n\t\t\tif (!entity.scenery || !entity.alive) continue\n\t\t\tconst problem =\n\t\t\t\t(!isScenery(entity.def) && 'a type that is not scenery') ||\n\t\t\t\t(!this.player(entity.owner).neutral && 'an owner') ||\n\t\t\t\t(entity.buffs.length > 0 && 'buffs') ||\n\t\t\t\t(entity.orders.length > 0 && 'orders') ||\n\t\t\t\t(entity.hidden && 'been hidden') ||\n\t\t\t\t(entity.get(dashing) && 'a dash') ||\n\t\t\t\t(entity.has(constructionSite) && 'a construction site') ||\n\t\t\t\t(entity.expires !== null && 'a lifetime') ||\n\t\t\t\t((entity.has(exposure) || entity.has(detection)) && 'been exposed or detected')\n\t\t\tif (problem) throw new Error(`Scenery ${entity.def.id}#${entity.id} has ${problem}, but nothing woke it up (World.wake)`)\n\t\t}\n\t}\n\n\t/**\n\t * Whether it was disposed: its navigation is freed, and it is not to be stepped again\n\t *\n\t * @beta\n\t */\n\tget disposed(): boolean {\n\t\treturn this.wasDisposed\n\t}\n\tprivate wasDisposed = false\n\n\t/**\n\t * Frees what the world holds outside of JavaScript's memory: its navigation (a navmesh, its tiles and its crowd, in\n\t * WebAssembly, which is never collected by itself). Whoever made the world disposes it once done with it: the\n\t * session that owns it (`LocalSession`'s `ownsWorld`), the host (`SessionHost`'s), a test. Once is enough: again does\n\t * nothing\n\t */\n\tdispose(): void {\n\t\tif (this.wasDisposed) return\n\t\tthis.wasDisposed = true\n\t\tthis.events.clear()\n\t\tthis.nav.dispose()\n\t\tthis.sidePaths?.dispose()\n\t\tthis.entities.clear()\n\t\tthis.units.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M;GACrD,IAAI,SAAS,MAAM,IAAI,MAAM,WAAW,OAAO,IAAI,GAAG,GAAG,OAAO,GAAG,OAAO,QAAQ,sCAAsC;EACzH;CACD;;;;;;CAOA,IAAI,WAAoB;EACvB,OAAO,KAAK;CACb;CACA,cAAsB;;;;;;;CAQtB,UAAgB;EACf,IAAI,KAAK,aAAa;EACtB,KAAK,cAAc;EACnB,KAAK,OAAO,MAAM;EAClB,KAAK,IAAI,QAAQ;EACjB,KAAK,WAAW,QAAQ;EACxB,KAAK,SAAS,MAAM;EACpB,KAAK,MAAM,MAAM;EACjB,KAAK,MAAM,MAAM;CAClB;AACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@v12-engine/engine",
3
- "version": "0.1.0",
3
+ "version": "0.4.0",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -14,7 +14,7 @@
14
14
  "sideEffects": [
15
15
  "./src/server/navigation-worker.ts",
16
16
  "./src/simulate-worker.ts",
17
- "./dist/navigation-worker.js",
17
+ "./dist/server/navigation-worker.js",
18
18
  "./dist/simulate-worker.js"
19
19
  ],
20
20
  "description": "The simulation of a real-time strategy game: the world, units, orders, hooks, sessions, and a server. Runs anywhere",