@v12-engine/engine 0.1.1 → 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
package/dist/world.d.ts CHANGED
@@ -5,9 +5,9 @@ import { Clock } from './clock';
5
5
  import { Spawning } from './spawning';
6
6
  import { type IssuedCommand } from './commands';
7
7
  import type { Camp } from './camps';
8
- import type { ChatAudience, PingKind } from './talk';
8
+ import type { ChatAudience, PingId } from './talk';
9
9
  import { type DebugChecks } from './debug';
10
- import { type AbilityDef, type AttackDef, type Cost, type DamageType, type EffectDef, type EffectOf, type ResourceKind } from './defs';
10
+ import { type AbilityDef, type AttackDef, type Cost, type DamageType, type EffectDef, type EffectOf, type MorphBack, type ResourceId } from './defs';
11
11
  import { Entity, type EntityId, type ItemInstance, type PlayerId } from './entity';
12
12
  import { EntityIndex } from './entityIndex';
13
13
  import { type ErrorPolicy, type ErrorSite, type RejectedKind, type WorldFailure } from './errors';
@@ -21,7 +21,7 @@ import type { SidePaths } from './navigation/sidePaths';
21
21
  import type { Navigation } from './navigation/navigation';
22
22
  import { Player, type PlayerInit, type SpentOn } from './player';
23
23
  import type { Registry, System } from './registry';
24
- import type { GameRules } from './rules';
24
+ import type { RuleSettings } from './rules';
25
25
  import { Scheduler } from './scheduler';
26
26
  import { Score } from './score';
27
27
  import { Computers } from './computers';
@@ -34,14 +34,17 @@ import { type GroundItem } from './items';
34
34
  import type { Terrain } from './terrain';
35
35
  import { type GroundBase, type TerrainPatch } from './ground';
36
36
  import { type AreaDef, type AreaShape, Areas } from './areas';
37
+ import { type WorldQuery } from './query';
37
38
  import { Dialog, type SaidLine } from './dialog';
38
39
  import { Objectives, type ObjectiveState, type ObjectiveStatus } from './objectives';
39
40
  import { type SequenceDef, Sequences } from './sequences';
40
41
  import { type TimerDef, Timers } from './timers';
41
42
  import type { ListenerDef } from './events';
42
43
  import type { Trace } from './inspect';
44
+ import type { CameraOrder } from './cameraOrders';
45
+ import type { WindGust } from './foliage';
43
46
  import type { CinematicChoice, CinematicCue, CinematicCueSent, CinematicEnded } from './cinematics';
44
- import { type EffectCue, type EffectOptions } from './effects';
47
+ import { type FxCue, type FxOptions } from './effects';
45
48
  import { WorldMap } from './names';
46
49
  import type { MapEnvironment } from './map';
47
50
  import { type PrefabDef, type SpawnedPrefab, type SpawnPrefabOptions } from './prefabs';
@@ -51,27 +54,45 @@ import { type PrefabDef, type SpawnedPrefab, type SpawnPrefabOptions } from './p
51
54
  * @beta
52
55
  */
53
56
  export type PlayerRelation = 'ally' | 'enemy' | 'neutral';
54
- /** @beta */
57
+ /**
58
+ * A shot in flight to a target or a point; it deals its damage when it lands (`world.projectiles`)
59
+ *
60
+ * @beta
61
+ */
55
62
  export interface Projectile {
63
+ /** The projectile's id, from `world.newId` */
56
64
  id: number;
65
+ /** The entity that fired it */
57
66
  source: EntityId;
67
+ /** The player whose unit fired it, who is credited with what it does */
58
68
  owner: PlayerId;
69
+ /** The entity it is after; 0 or gone for a shot that hits an area */
59
70
  target: EntityId;
71
+ /** Where it is now, east-west, in world units */
60
72
  x: number;
73
+ /** Where it is now, north-south, in world units */
61
74
  z: number;
75
+ /** Where it was at the last tick, east-west, for the screen to blend by */
62
76
  prevX: number;
77
+ /** Where it was at the last tick, north-south, for the screen to blend by */
63
78
  prevZ: number;
64
79
  /** Where it is heading. Follows the target while it lives */
65
80
  tx: number;
81
+ /** The north-south coordinate it is heading for */
66
82
  tz: number;
83
+ /** World units it flies per second */
67
84
  speed: number;
85
+ /** The damage it deals on landing */
68
86
  damage: number;
87
+ /** The type of damage it deals */
69
88
  type: DamageType;
89
+ /** Whether the hit is a critical one */
70
90
  crit: boolean;
71
91
  /** Fired uphill and going to miss: it flies all the way and does nothing when it comes down */
72
92
  miss: boolean;
73
93
  /** Where it was fired from */
74
94
  sx: number;
95
+ /** North-south coordinate it was fired from */
75
96
  sz: number;
76
97
  /** Set for shots that hit an area instead of a target */
77
98
  splash?: {
@@ -96,25 +117,39 @@ export interface Projectile {
96
117
  * @beta
97
118
  */
98
119
  export interface Missile {
120
+ /** The missile's id, from `world.newId` */
99
121
  id: number;
122
+ /** The player whose unit sent it */
100
123
  owner: PlayerId;
124
+ /** The caster entity that sent it */
101
125
  source: EntityId;
126
+ /** The id of the ability it was sent by */
102
127
  ability: string;
128
+ /** The ability's level when it was sent */
103
129
  level: number;
130
+ /** Where it is now, east-west, in world units */
104
131
  x: number;
132
+ /** Where it is now, north-south, in world units */
105
133
  z: number;
134
+ /** Where it was at the last tick, east-west */
106
135
  prevX: number;
136
+ /** Where it was at the last tick, north-south */
107
137
  prevZ: number;
108
138
  /** Direction, of length 1 */
109
139
  dx: number;
140
+ /** North-south part of its direction */
110
141
  dz: number;
142
+ /** World units it travels per second */
111
143
  speed: number;
112
144
  /** How far it still goes */
113
145
  left: number;
114
146
  /** Seconds until it sets off, and how long that took in all */
115
147
  delay: number;
148
+ /** Seconds it takes to take shape before it sets off: `delay` starts from it and counts down */
116
149
  forms: number;
150
+ /** How far from its path it hits things, in world units */
117
151
  radius: number;
152
+ /** The missile effect of the ability that made it, which says what it does to what it hits */
118
153
  effect: EffectOf<'missile'>;
119
154
  /** Whom it has passed through already. Missiles sent together share it: what one of them hit the others pass by */
120
155
  hit: Set<EntityId>;
@@ -130,6 +165,18 @@ export interface Missile {
130
165
  bounces: number;
131
166
  /** Something got in its way: what happens where it ends does not */
132
167
  stopped: boolean;
168
+ /** On its way back to the caster (`EffectFields.returns`): it touches nobody (unless it `hitsOnReturn`), and ends where the caster is */
169
+ returning?: boolean;
170
+ /** How many it went through, for one that goes through so many (`pierce`) or less on each (`falloff`) */
171
+ struck?: number;
172
+ /** The last one it hit, for what happens where it meets a wall (`onWall`) */
173
+ last?: EntityId;
174
+ /** The level of the ground it set off from, for one that stops at a wall (`onWall`): a cliff above it is a wall */
175
+ floor?: number;
176
+ /** Where its owner steers it (`steer`, `steerMissile`) */
177
+ steerTo?: Vec2;
178
+ /** How full the ability that sent it was held (`EffectContext.held`), for one held and let go */
179
+ held?: number;
133
180
  }
134
181
  /**
135
182
  * Something an ability does a while after it was cast
@@ -137,14 +184,24 @@ export interface Missile {
137
184
  * @beta
138
185
  */
139
186
  export interface Delayed {
187
+ /** Seconds until its effects happen */
140
188
  left: number;
189
+ /** The unit that cast the ability */
141
190
  caster: Entity;
191
+ /** The ability whose effects are waiting */
142
192
  ability: AbilityDef;
193
+ /** The ability's level when it was cast */
143
194
  level: number;
195
+ /** Where the effects happen */
144
196
  point: Vec2;
197
+ /** The effects to run when the time is up */
145
198
  effects: EffectDef[];
146
199
  /** What its arrival goes by, when not the ability */
147
200
  impact?: string;
201
+ /** Where the effects went off from and the way they faced as it was cast, for those with a shape (`EffectCommon.shape`) */
202
+ from?: Vec2;
203
+ /** The way the effects faced as it was cast, in radians as a unit's `facing` (0 along +z), for those with a shape */
204
+ heading?: number;
148
205
  }
149
206
  /**
150
207
  * Ground an ability goes on working on for a while
@@ -152,22 +209,51 @@ export interface Delayed {
152
209
  * @beta
153
210
  */
154
211
  export interface Zone {
212
+ /** The zone's id, from `world.newId` */
155
213
  id: number;
214
+ /** The unit that cast the ability */
156
215
  caster: Entity;
216
+ /** The ability that made the zone */
157
217
  ability: AbilityDef;
218
+ /** The ability's level when it was cast */
158
219
  level: number;
220
+ /** Centre of the zone, east-west */
159
221
  x: number;
222
+ /** Centre of the zone, north-south */
160
223
  z: number;
224
+ /** Seconds the zone goes on */
161
225
  left: number;
162
226
  /** Seconds until what is inside is next seen to */
163
227
  next: number;
228
+ /** The zone effect that says what it does to what is inside */
164
229
  effect: EffectOf<'zone'>;
230
+ /**
231
+ * Where the effects went off from and the way they faced as it was cast, kept for what it holds with a shape
232
+ * (`EffectCommon.shape`): a cone of it goes off from there, the way it faced. Left out for one with no shape
233
+ */
234
+ from?: Vec2;
235
+ /** 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 */
236
+ heading?: number;
237
+ /** The unit it goes with (`follow`) */
238
+ follows?: EntityId;
239
+ /** Who is in it now, by id from the lowest, for one that sees to who comes and goes (`onEnter`, `onLeave`, `edge`) */
240
+ inside?: EntityId[];
165
241
  }
166
- /** @beta */
242
+ /**
243
+ * How a message to a player is shown: an error, information or a hint
244
+ *
245
+ * @beta
246
+ */
167
247
  export type MessageKind = 'error' | 'info' | 'hint';
168
- /** @beta */
248
+ /**
249
+ * The events a world emits (`world.events`), by name, each with its payload; what hooks do not cover and listeners and sessions hear
250
+ *
251
+ * @beta
252
+ */
169
253
  export interface WorldEvents {
254
+ /** An entity was added to the world */
170
255
  entitySpawned: Entity;
256
+ /** An entity left the world, dead or taken away */
171
257
  entityRemoved: Entity;
172
258
  /**
173
259
  * `cause`: the blow, for what died of damage. `how`: what the rules made of the death in the `death` hook, for the
@@ -196,6 +282,7 @@ export interface WorldEvents {
196
282
  buff: string;
197
283
  expired: boolean;
198
284
  };
285
+ /** Damage was dealt to a target: how much, of which type, by whom and by what ability or attack */
199
286
  damaged: {
200
287
  target: Entity;
201
288
  source?: Entity;
@@ -213,6 +300,7 @@ export interface WorldEvents {
213
300
  source?: Entity;
214
301
  target?: Entity;
215
302
  };
303
+ /** A target was healed by an amount, by a source when it has one */
216
304
  healed: {
217
305
  target: Entity;
218
306
  source?: Entity;
@@ -224,7 +312,18 @@ export interface WorldEvents {
224
312
  target?: Entity;
225
313
  weapon: number;
226
314
  };
315
+ /**
316
+ * A swing called off before its blow (`cancelSwing`): the unit was told something else, its target went, it was
317
+ * stunned. What it was swinging at, where it was at something, and with which of its attacks
318
+ */
319
+ swingCancelled: {
320
+ attacker: Entity;
321
+ target?: Entity;
322
+ weapon: number;
323
+ };
324
+ /** A projectile was fired */
227
325
  projectileSpawned: Projectile;
326
+ /** A projectile landed or was taken away */
228
327
  projectileRemoved: Projectile;
229
328
  /** An attack that hits an area came down */
230
329
  impact: {
@@ -233,7 +332,9 @@ export interface WorldEvents {
233
332
  radius: number;
234
333
  owner: PlayerId;
235
334
  };
335
+ /** A building's construction began, its site placed */
236
336
  constructionStarted: Entity;
337
+ /** A building was completed */
237
338
  constructionFinished: Entity;
238
339
  /** A construction was called off by its owner: it dies next, with the reason `cancelled` */
239
340
  constructionCancelled: Entity;
@@ -248,6 +349,7 @@ export interface WorldEvents {
248
349
  entity: Entity;
249
350
  into: string;
250
351
  };
352
+ /** A building finished training a unit */
251
353
  unitTrained: {
252
354
  building: Entity;
253
355
  unit: Entity;
@@ -257,6 +359,13 @@ export interface WorldEvents {
257
359
  entity: Entity;
258
360
  from: string;
259
361
  };
362
+ /** A hero in a form turned back into what it was (`leaveForm`): `form`, the type it was in; `why`, what turned it back */
363
+ morphedBack: {
364
+ entity: Entity;
365
+ form: string;
366
+ why?: MorphBack | (string & {});
367
+ };
368
+ /** A player was defeated, out of the game */
260
369
  playerDefeated: Player;
261
370
  /** A player gave up (see `surrender`): `playerDefeated` follows */
262
371
  playerSurrendered: {
@@ -268,6 +377,7 @@ export interface WorldEvents {
268
377
  seconds: number;
269
378
  left: number;
270
379
  };
380
+ /** The game ended; `winner` is the winning team */
271
381
  gameOver: {
272
382
  winner: number;
273
383
  };
@@ -284,10 +394,12 @@ export interface WorldEvents {
284
394
  unit: Entity;
285
395
  player: PlayerId;
286
396
  };
397
+ /** A unit got out of a transport */
287
398
  unloaded: {
288
399
  passenger: Entity;
289
400
  transport: Entity;
290
401
  };
402
+ /** A hero reached a new level */
291
403
  heroLevelUp: {
292
404
  hero: Entity;
293
405
  level: number;
@@ -319,6 +431,7 @@ export interface WorldEvents {
319
431
  amount: number;
320
432
  reason?: string;
321
433
  };
434
+ /** A fallen hero was brought back */
322
435
  heroRevived: Entity;
323
436
  /** `duration`: seconds of the wind-up */
324
437
  castStarted: {
@@ -327,23 +440,36 @@ export interface WorldEvents {
327
440
  point?: Vec2;
328
441
  duration: number;
329
442
  };
443
+ /**
444
+ * A wind-up called off before it went off: the caster stunned, killed, or ordered elsewhere. `ability`: the one wound up,
445
+ * where it is still known (an item's, gone with the item, is not)
446
+ */
447
+ castCancelled: {
448
+ caster: Entity;
449
+ ability?: AbilityDef;
450
+ };
330
451
  /** A channelled ability started to be kept up, or ended: done, or `interrupted` */
331
452
  channelStarted: {
332
453
  caster: Entity;
333
454
  ability: AbilityDef;
334
455
  duration: number;
335
456
  };
457
+ /** A channelled ability stopped being kept up; `interrupted` when it was broken off */
336
458
  channelEnded: {
337
459
  caster: Entity;
338
460
  ability: AbilityDef;
339
461
  interrupted: boolean;
340
462
  };
463
+ /** A missile was sent on its way */
341
464
  missileSpawned: Missile;
465
+ /** A missile passed through a target */
342
466
  missileHit: {
343
467
  missile: Missile;
344
468
  target: Entity;
345
469
  };
470
+ /** A missile ended or was taken away */
346
471
  missileRemoved: Missile;
472
+ /** An ability was cast: by whom, at what level, at which target or point, and whether it used a charge */
347
473
  abilityCast: {
348
474
  caster: Entity;
349
475
  ability: AbilityDef;
@@ -352,7 +478,11 @@ export interface WorldEvents {
352
478
  point: Vec2;
353
479
  charged?: boolean;
354
480
  };
355
- /** What an ability set off arrived: a missile hit, a rush ended, the time was up */
481
+ /**
482
+ * What an ability set off arrived: a missile hit, a rush ended, the time was up. `from`: where it went off from,
483
+ * when not the caster (`EffectContext.origin`). `effect`: the effect of the ability whose arrival it is (a missile, a
484
+ * delay, a zone at its end), where the list that landed is one of the ability's
485
+ */
356
486
  abilityImpact: {
357
487
  caster: Entity;
358
488
  ability: AbilityDef;
@@ -361,17 +491,28 @@ export interface WorldEvents {
361
491
  point: Vec2;
362
492
  radius: number;
363
493
  impact?: string;
494
+ from?: Vec2;
495
+ effect?: EffectDef;
364
496
  };
497
+ /** A building finished researching an upgrade, to this level */
365
498
  researchFinished: {
366
499
  building: Entity;
367
500
  upgrade: string;
368
501
  level: number;
369
502
  };
503
+ /** An item came to lie on the ground */
370
504
  itemDropped: GroundItem;
505
+ /** An entity picked an item up from the ground */
371
506
  itemPicked: {
372
507
  entity: Entity;
373
508
  item: ItemInstance;
374
509
  };
510
+ /** A hero took a purchase back at a shop (`undoBuy`): what it cost came back, the parts it used up came back */
511
+ itemUndone: {
512
+ entity: Entity;
513
+ item: string;
514
+ shop: number;
515
+ };
375
516
  /** Every creep of a camp is gone. It comes back after a while, when it says so (see `Camp.respawn`) */
376
517
  campCleared: {
377
518
  camp: Camp;
@@ -384,7 +525,7 @@ export interface WorldEvents {
384
525
  pinged: {
385
526
  player: PlayerId;
386
527
  point: Vec2;
387
- kind: PingKind;
528
+ kind: PingId;
388
529
  to: ChatAudience;
389
530
  by?: string;
390
531
  };
@@ -415,6 +556,7 @@ export interface WorldEvents {
415
556
  inventoryChanged: {
416
557
  entity: Entity;
417
558
  };
559
+ /** A player was paid a bounty of this amount for an entity's death */
418
560
  bounty: {
419
561
  entity: Entity;
420
562
  player: PlayerId;
@@ -434,7 +576,7 @@ export interface WorldEvents {
434
576
  resourcesDeposited: {
435
577
  entity: Entity;
436
578
  player: PlayerId;
437
- kind: ResourceKind;
579
+ kind: ResourceId;
438
580
  amount: number;
439
581
  upkeep?: number;
440
582
  };
@@ -478,7 +620,7 @@ export interface WorldEvents {
478
620
  kind: MessageKind;
479
621
  seconds?: number;
480
622
  };
481
- /** A unit walked into an area of the game (`GameModule.areas`) */
623
+ /** A unit walked into an area of the game (`Rules.areas`) */
482
624
  enteredArea: {
483
625
  area: string;
484
626
  entity: Entity;
@@ -515,14 +657,18 @@ export interface WorldEvents {
515
657
  cinematicCue: CinematicCue;
516
658
  /** The rules cue the cinematic playing on some screens, or everyone's (see `cueCinematic`) */
517
659
  cinematicCued: CinematicCueSent;
660
+ /** The rules pan or shake one player's camera (see `cameraFor`) */
661
+ cameraOrdered: {
662
+ player: PlayerId;
663
+ } & Pick<CameraOrder, 'pan' | 'shake'>;
518
664
  /** A cinematic the rules played is over on a player's screen, as their screen said (see `cinematic`'s `wait`) */
519
665
  cinematicEnded: CinematicEnded;
520
666
  /** A player picked an answer of a cinematic's choice, as their screen said (see `cinematicChose`) */
521
667
  cinematicChoice: CinematicChoice;
522
- /** The rules play one of the view's effects at a place or on an entity, for everyone who sees it (see `world.effect`) */
523
- effectStarted: EffectCue;
524
- /** The rules stop an effect they played (see `world.stopEffect`) */
525
- effectStopped: {
668
+ /** The rules play one of the view's effects at a place or on an entity, for everyone who sees it (see `world.fx`) */
669
+ fxStarted: FxCue;
670
+ /** The rules stop an effect they played (see `world.stopFx`) */
671
+ fxStopped: {
526
672
  id: number;
527
673
  fade?: number;
528
674
  };
@@ -539,14 +685,25 @@ export interface WorldEvents {
539
685
  entered: boolean;
540
686
  teams?: number[];
541
687
  };
688
+ /**
689
+ * A gust of wind blew at a place (`gust`, `WindGust`): where, and the gust. Told to the players who see the place,
690
+ * for their screens to bend the grass and bushes there
691
+ */
692
+ gusted: {
693
+ x: number;
694
+ z: number;
695
+ gust: WindGust;
696
+ };
542
697
  /**
543
698
  * Cells of a layer (`Terrain.cells`) were set to a value (`setCells`): told to the players who see them, the others
544
- * as they come into sight (`cellsSeen`)
699
+ * as they come into sight (`cellsSeen`). `over`: the seconds the screens ease into it over, where the rules said
700
+ * (grass growing back)
545
701
  */
546
702
  cellsChanged: {
547
703
  layer: string;
548
704
  cells: number[];
549
705
  value: number;
706
+ over?: number;
550
707
  };
551
708
  /**
552
709
  * Cells of a layer that changed out of a team's sight came into it (`TeamMemory.cells`): told to that team's players,
@@ -586,13 +743,17 @@ export interface WorldChecks {
586
743
  * @beta
587
744
  */
588
745
  export interface WorldOptions extends WorldChecks {
746
+ /** The ground the world stands on */
589
747
  terrain: Terrain;
748
+ /** The navigation units on the ground walk by */
590
749
  navigation: Navigation;
591
750
  /** Where boats go (`UnitTypeDef.naval`): the deep water. None for a map without, and boats go on the ground */
592
751
  waterNavigation?: Navigation;
593
- /** The navigations the sides plan their routes on, of what each knows (`GameModule.paths: 'seen'`). None when left out */
752
+ /** The navigations the sides plan their routes on, of what each knows (`Rules.paths: 'seen'`). None when left out */
594
753
  sidePaths?: SidePaths;
754
+ /** The game's definitions: unit types, abilities, orders and the rest */
595
755
  registry: Registry;
756
+ /** The players of the world, in order, from which its `Player`s are made */
596
757
  players: PlayerInit[];
597
758
  /** The races one is drawn from for a player given `random`: all of the game's when left out */
598
759
  randomRaces?: readonly string[];
@@ -608,17 +769,22 @@ export interface WorldOptions extends WorldChecks {
608
769
  timers?: TimerDef[];
609
770
  /** Scripts of steps the game can start, by id */
610
771
  sequences?: SequenceDef[];
772
+ /** Seed for the world's random generator; 1 when left out */
611
773
  seed?: number;
612
774
  /** Simulation steps per second */
613
775
  tickRate?: number;
614
776
  /** The logger the world's own is made under (`world.log`): the root one when left out */
615
777
  log?: Logger;
616
- /** The least an entry of the world's log must matter to be said (`GameModule.log`) */
778
+ /** The least an entry of the world's log must matter to be said (`Rules.log`) */
617
779
  logLevel?: LogLevel;
618
- /** What becomes of a part of the game that throws (`GameModule.onError`): it throws on, when left out */
780
+ /** What becomes of a part of the game that throws (`Rules.onError`): it throws on, when left out */
619
781
  onError?: ErrorPolicy;
620
782
  }
621
- /** @beta */
783
+ /**
784
+ * How a blow is described to `world.damage`: its type, whether it is an attack or crit, its ability, tags and how it kills
785
+ *
786
+ * @beta
787
+ */
622
788
  export interface DamageOptions {
623
789
  /** Physical when left out */
624
790
  damageType?: DamageType;
@@ -632,8 +798,6 @@ export interface DamageOptions {
632
798
  tags?: string[];
633
799
  /** How what this blow kills dies, for the screen (`'burnt'`): the death's `how` (`AttackDef.how`, `AbilityDef.how`) */
634
800
  how?: string;
635
- /** The attack's type by the game's damage table (`GameRules.combat.damageTable`): an ability's say, where a basic attack has its `AttackDef.attackType` */
636
- attackType?: string;
637
801
  }
638
802
  /**
639
803
  * What killed something that died of damage: the blow that did it
@@ -641,13 +805,17 @@ export interface DamageOptions {
641
805
  * @beta
642
806
  */
643
807
  export interface DeathCause {
808
+ /** The type of damage that killed */
644
809
  type: DamageType;
645
810
  /** What the blow took off */
646
811
  amount: number;
647
812
  /** How much more it was than there was health left */
648
813
  overkill: number;
814
+ /** Whether the killing blow was a critical hit */
649
815
  crit: boolean;
816
+ /** The id of the ability that dealt the blow, when it was one */
650
817
  ability?: string;
818
+ /** Words of the game's own about the blow (`DamageOptions.tags`) */
651
819
  tags?: string[];
652
820
  /** How the blow says what it kills dies (`DamageOptions.how`) */
653
821
  how?: string;
@@ -667,23 +835,43 @@ export type DeathReason = 'damage' | 'killed' | 'cancelled' | 'expired' | 'deple
667
835
  * @beta
668
836
  */
669
837
  export interface Reveal {
838
+ /** The reveal's id, from `world.newId` */
670
839
  id: number;
840
+ /** The team that sees the spot */
671
841
  team: number;
842
+ /** Centre of the revealed spot, east-west */
672
843
  x: number;
844
+ /** Centre of the revealed spot, north-south */
673
845
  z: number;
846
+ /** How far from the centre it reveals, in world units */
674
847
  radius: number;
675
848
  /** Seconds it goes on */
676
849
  left: number;
677
850
  /** Shown, and nothing drawn for it: what the rules show a player, as a cinematic looks at it. A spell's, when left out */
678
851
  quiet?: boolean;
679
852
  }
680
- /** @beta */
853
+ /**
854
+ * What `world.spawn` is told besides type, owner and position: facing, size, look and the rest
855
+ *
856
+ * @beta
857
+ */
681
858
  export interface SpawnOptions {
859
+ /** The way it faces, in radians; the engine's default facing when left out */
682
860
  facing?: number;
683
861
  /** How big it is drawn */
684
862
  scale?: number;
685
863
  /** Which of the models of its type it is drawn with, for things that come in kinds like trees */
686
864
  look?: string;
865
+ /**
866
+ * Drawn as this entity is: its type's model, its owner's colour, its size and its look, while the new one stays what
867
+ * its own type and owner say it is (a soul in the fallen's shape). `scale` and `look` here win over the entity's
868
+ */
869
+ looksLike?: Entity;
870
+ /**
871
+ * Components it starts with, by id, as `Component.default` would not give them: `{ 'warden.soul': { hero: 4 } }`.
872
+ * They are on it before the hooks of its making run. An id the game does not have throws
873
+ */
874
+ data?: Record<string, unknown>;
687
875
  /** A name of its own, for the rules to find it by: `world.named('gate')` */
688
876
  name?: string;
689
877
  /** Seconds it lasts, when that is not what its type says */
@@ -694,6 +882,17 @@ export interface SpawnOptions {
694
882
  paid?: Cost;
695
883
  };
696
884
  }
885
+ /**
886
+ * Where a new entity goes and whose it is, with what else it starts with (`World.spawn(type, { at, owner })`)
887
+ *
888
+ * @public
889
+ */
890
+ export interface SpawnAt extends SpawnOptions {
891
+ /** Where it stands, in cells; a building is centred on the cells nearest it */
892
+ at: Vec2;
893
+ /** The player it belongs to */
894
+ owner: PlayerId;
895
+ }
697
896
  /** See `World.internals` */
698
897
  export interface WorldInternals {
699
898
  nextEntityId: number;
@@ -719,17 +918,38 @@ export interface WorldWatcher {
719
918
  /** A tick ran */
720
919
  stepped?(): void;
721
920
  }
722
- /** @beta */
921
+ /**
922
+ * The simulation: the ground, entities, players, systems and rules of one game, stepped a tick at a time with `step`
923
+ *
924
+ * @public
925
+ */
723
926
  export declare class World {
724
- /** Obstacles the navigation had no room for (`RecastNavigationOptions.maxObstacles`): what is put down past it does not block the way */
927
+ /**
928
+ * Obstacles the navigation had no room for (`RecastNavigationOptions.maxObstacles`): what is put down past it does not block the way
929
+ *
930
+ * @beta
931
+ */
725
932
  obstaclesRefused: number;
933
+ /**
934
+ * The ground the world stands on
935
+ *
936
+ * @beta
937
+ */
726
938
  readonly terrain: Terrain;
727
- /** The ground it started on, where it was made from a map (S36): what a save keeps only the changes of */
939
+ /**
940
+ * The ground it started on, where it was made from a map (S36): what a save keeps only the changes of
941
+ *
942
+ * @beta
943
+ */
728
944
  ground?: GroundBase;
729
- /** The ground and the air. Agents find their own layer, everything else is about the ground */
945
+ /**
946
+ * The ground and the air. Agents find their own layer, everything else is about the ground
947
+ *
948
+ * @beta
949
+ */
730
950
  readonly nav: Navigation;
731
951
  /**
732
- * The navigations the sides plan their routes on, of the buildings each knows (`GameModule.paths: 'seen'`): routes
952
+ * The navigations the sides plan their routes on, of the buildings each knows (`Rules.paths: 'seen'`): routes
733
953
  * of ground units are planned on their side's, and walked on `nav`. None where routes know everything
734
954
  *
735
955
  * @beta
@@ -737,12 +957,42 @@ export declare class World {
737
957
  readonly sidePaths?: SidePaths;
738
958
  /** The ground, the air and the water, to find where a kind of unit can be */
739
959
  private readonly layers;
960
+ /**
961
+ * The navigation an entity walks by: the air, the water or the ground, by its layer
962
+ *
963
+ * @beta
964
+ */
740
965
  navFor(entity: Entity): Navigation;
741
- /** The air alone */
966
+ /**
967
+ * The air alone
968
+ *
969
+ * @beta
970
+ */
742
971
  readonly air: Navigation;
972
+ /** The game's definitions: unit types, abilities, orders and the rest */
743
973
  readonly registry: Registry;
974
+ /**
975
+ * Which cells are taken by buildings and what can be built where
976
+ *
977
+ * @beta
978
+ */
744
979
  readonly grid: BuildGrid;
980
+ /**
981
+ * What each team has seen and sees, per cell
982
+ *
983
+ * @beta
984
+ */
745
985
  readonly fog: FogOfWar;
986
+ /**
987
+ * Index of entities by position, for asking what is near a point.
988
+ *
989
+ * Units are filed once a tick, where they stand as it starts (after the commands, before the systems: `step`).
990
+ * A unit that moves during the tick (the `move` phase) is still filed where it was until the next, so a query in
991
+ * `resolve` searches by where units started and checks distance against where they are now: a unit that walked
992
+ * into range this tick may be found only the next. Structures are filed where they stand, as they are made
993
+ *
994
+ * @beta
995
+ */
746
996
  readonly spatial: SpatialIndex;
747
997
  /** What happened, for whoever watches: sessions, tests. Sent out at the end of each tick. Rules use `hooks` */
748
998
  readonly events: Emitter;
@@ -755,11 +1005,21 @@ export declare class World {
755
1005
  /**
756
1006
  * The engine's checks on itself this world runs (`DebugChecks`): what it was made with (`CreateWorldOptions.checks`),
757
1007
  * the process's (`setDebugChecks`) when it says nothing. Slow: tests and development
1008
+ *
1009
+ * @beta
758
1010
  */
759
1011
  checks: DebugChecks;
760
- /** Moved on by `invalidateStats` without an entity: every entity's stats are added up again when next asked for */
1012
+ /**
1013
+ * Moved on by `invalidateStats` without an entity: every entity's stats are added up again when next asked for
1014
+ *
1015
+ * @beta
1016
+ */
761
1017
  statsVersion: number;
762
- /** What the debug tools follow of the rules as they run: hooks and listeners. Null when nobody asks, see `EventLog` */
1018
+ /**
1019
+ * What the debug tools follow of the rules as they run: hooks and listeners. Null when nobody asks, see `EventLog`
1020
+ *
1021
+ * @beta
1022
+ */
763
1023
  trace: Trace | null;
764
1024
  /** Where game modules and mods take part in damage, deaths, orders and the like, see `HookEvents` */
765
1025
  readonly hooks: Hooks;
@@ -772,7 +1032,7 @@ export declare class World {
772
1032
  /** What each player is set to do, in a mission */
773
1033
  readonly objectives: Objectives;
774
1034
  /**
775
- * What the game counts of its players (`GameRules.score`): `world.score.add(player, 'towersLost')`, `get`, `team`.
1035
+ * What the game counts of its players (`RuleSettings.score`): `world.score.add(player, 'towersLost')`, `get`, `team`.
776
1036
  * Counts nothing in a game that does not ask
777
1037
  *
778
1038
  * @beta
@@ -780,27 +1040,68 @@ export declare class World {
780
1040
  readonly score: Score;
781
1041
  /** What is said, by whom, to whom: `world.dialog.say(player, line)`, or `talk` in a sequence */
782
1042
  readonly dialog: Dialog;
1043
+ /** The world's seeded random generator; the only source of randomness the simulation uses */
783
1044
  readonly rng: Rng;
1045
+ /** Every player of the world, by id */
784
1046
  readonly players: Map<number, Player>;
785
- /** Everything in the world, by id. Fallen heroes stay in here while they wait to be brought back */
1047
+ /**
1048
+ * Everything in the world, by id. Fallen heroes stay in here while they wait to be brought back
1049
+ *
1050
+ * @beta
1051
+ */
786
1052
  readonly entities: Map<number, Entity>;
787
1053
  /**
788
- * The entities that are not scenery: the ones that move, act or change by themselves. Systems that run
789
- * every tick go through these instead of `entities`, which on a big map is mostly trees.
1054
+ * The entities that act: the ones that move, fight, build or change by themselves, which is everything but scenery.
1055
+ * Systems that run every tick go through these instead of `entities`, which on a big map is mostly trees.
1056
+ *
1057
+ * In the order each became a unit, which is the order of ids except for scenery woken later (`Spawning.wake`: a
1058
+ * tree given a buff), which comes last, after units made before it. A save keeps this order, so a loaded world
1059
+ * walks it the same. A component's index (`EntityIndex`, `SystemDef.over`) walks in id order instead, so code that
1060
+ * picks the first of equals breaks the tie by id, not by which it met first, to stay the same either way
790
1061
  */
791
- readonly actors: Map<number, Entity>;
1062
+ readonly units: Map<number, Entity>;
792
1063
  /**
793
1064
  * The scenery each team sees right now, by team. Kept by the fog system whenever it works out what everyone sees:
794
1065
  * scenery never moves, so this only changes then. Lets a session describe what is in sight without testing every tree
1066
+ *
1067
+ * @beta
795
1068
  */
796
1069
  readonly sceneryInSight: Map<number, Set<Entity>>;
797
- /** Entities by owner, heroes by owner, shops. For questions that would otherwise go through every entity */
1070
+ /**
1071
+ * Entities by owner, heroes by owner, shops. For questions that would otherwise go through every entity
1072
+ *
1073
+ * @beta
1074
+ */
798
1075
  readonly index: EntityIndex;
1076
+ /**
1077
+ * The shots in flight
1078
+ *
1079
+ * @beta
1080
+ */
799
1081
  readonly projectiles: Projectile[];
1082
+ /**
1083
+ * The missiles in flight
1084
+ *
1085
+ * @beta
1086
+ */
800
1087
  readonly missiles: Missile[];
1088
+ /**
1089
+ * Effects waiting for their time to come
1090
+ *
1091
+ * @beta
1092
+ */
801
1093
  readonly delayed: Delayed[];
1094
+ /**
1095
+ * The zones that are working on the ground now
1096
+ *
1097
+ * @beta
1098
+ */
802
1099
  readonly zones: Zone[];
803
- /** Switches for trying things out. A game that is played for real leaves them off */
1100
+ /**
1101
+ * Switches for trying things out. A game that is played for real leaves them off
1102
+ *
1103
+ * @beta
1104
+ */
804
1105
  readonly cheats: {
805
1106
  /** Abilities and what is carried can be used again at once */
806
1107
  noCooldowns: boolean;
@@ -814,51 +1115,111 @@ export declare class World {
814
1115
  /**
815
1116
  * Players who may use the debug commands (`debug.*`, see `debugCommands.ts`): who a session lets, a seat in the page
816
1117
  * that asked, a server started to. Not in a save: whoever loads it says again
1118
+ *
1119
+ * @beta
817
1120
  */
818
1121
  readonly debugPlayers: Set<number>;
819
1122
  /**
820
1123
  * The entity each object of the map became, by the object's id (`MapObject.id`): what the map put down as the world
821
1124
  * was made of it (`createWorldFromMap`), and what the editor's Play here put down since (`debug.mapObject`), for the
822
1125
  * editor to find again what it moves and takes away (EQ10). Kept in a save
1126
+ *
1127
+ * @beta
1128
+ */
1129
+ readonly fromMap: Map<number, number>;
1130
+ /**
1131
+ * Spots a team sees for a while without anything there to see them
1132
+ *
1133
+ * @beta
823
1134
  */
824
- readonly mapEntities: Map<number, number>;
825
- /** Spots a team sees for a while without anything there to see them */
826
1135
  readonly reveals: Reveal[];
827
- /** State of game modules and mods for the whole game, see `state` */
1136
+ /**
1137
+ * State of game modules and mods for the whole game, see `state`
1138
+ *
1139
+ * @beta
1140
+ */
828
1141
  readonly states: StateStore;
829
- /** Items lying on the ground */
1142
+ /**
1143
+ * Items lying on the ground
1144
+ *
1145
+ * @beta
1146
+ */
830
1147
  readonly items: GroundItem[];
831
- /** Runs the systems, in order, each as often as it asks */
1148
+ /**
1149
+ * Runs the systems, in order, each as often as it asks
1150
+ *
1151
+ * @beta
1152
+ */
832
1153
  readonly scheduler: Scheduler;
833
1154
  /** The computer players: who is seated, kept in a save and seated again by a load (`world.computers.seat`) */
834
1155
  readonly computers: Computers;
835
- /** 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 */
1156
+ /**
1157
+ * 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
1158
+ *
1159
+ * @beta
1160
+ */
836
1161
  readonly seed: number;
1162
+ /** Simulation ticks per second */
837
1163
  readonly tickRate: number;
838
- /** Seconds per tick */
1164
+ /**
1165
+ * Seconds per tick
1166
+ *
1167
+ * @beta
1168
+ */
839
1169
  readonly dt: number;
1170
+ /** The tick number the world is at, from 0; it goes up by one for each `step` */
840
1171
  tick: number;
841
- /** How things are hurt, healed and die (`Life`) */
1172
+ /**
1173
+ * How things are hurt, healed and die (`Life`)
1174
+ *
1175
+ * @beta
1176
+ */
842
1177
  readonly life: Life;
843
- /** What each team sees of the entities (`Sight`): the fog, what is invisible, the game's say */
1178
+ /**
1179
+ * What each team sees of the entities (`Sight`): the fog, what is invisible, the game's say
1180
+ *
1181
+ * @beta
1182
+ */
844
1183
  readonly sight: Sight;
845
- /** Who is on whose side (`Sides`): teams, relations, shared vision and control */
1184
+ /**
1185
+ * Who is on whose side (`Sides`): teams, relations, shared vision and control
1186
+ *
1187
+ * @beta
1188
+ */
846
1189
  readonly sides: Sides;
847
- /** How entities come into the world and are moved about in it (`Spawning`) */
1190
+ /**
1191
+ * How entities come into the world and are moved about in it (`Spawning`)
1192
+ *
1193
+ * @beta
1194
+ */
848
1195
  readonly spawning: Spawning;
849
- /** The time of day (`Clock`): the hour, night, turned forward or stopped */
1196
+ /**
1197
+ * The time of day (`Clock`): the hour, night, turned forward or stopped
1198
+ *
1199
+ * @beta
1200
+ */
850
1201
  readonly clock: Clock;
851
1202
  /** Team that won, once the game is decided */
852
1203
  winner: number | null;
853
1204
  /**
854
1205
  * What becomes of a part of the game that throws: a hook's handler, a listener, a system, a timer, an order, a
855
- * command (`ErrorPolicy`). The game's own (`GameModule.onError`), or whoever runs the world's; with neither it
1206
+ * command (`ErrorPolicy`). The game's own (`Rules.onError`), or whoever runs the world's; with neither it
856
1207
  * throws, as it always did. A server and a launched game end the game where nothing is said (`??= 'end'`)
1208
+ *
1209
+ * @beta
857
1210
  */
858
1211
  errorPolicy?: ErrorPolicy;
859
- /** Why the game ended on an error, once it has (`end`): the world is not stepped again */
1212
+ /**
1213
+ * Why the game ended on an error, once it has (`end`): the world is not stepped again
1214
+ *
1215
+ * @beta
1216
+ */
860
1217
  failure: WorldFailure | null;
861
- /** The parts switched off for having thrown (`disable`), by name (`siteKey`): kept in a save, and off again when it is loaded */
1218
+ /**
1219
+ * The parts switched off for having thrown (`disable`), by name (`siteKey`): kept in a save, and off again when it is loaded
1220
+ *
1221
+ * @beta
1222
+ */
862
1223
  readonly disabled: Map<string, ErrorSite>;
863
1224
  /** True through a tick: an error then can end the game; outside one it is whoever called's */
864
1225
  private stepping;
@@ -884,42 +1245,95 @@ export declare class World {
884
1245
  * @beta
885
1246
  */
886
1247
  commandLimit: number;
1248
+ /**
1249
+ * Makes an empty world of the options' terrain, rules and players; a game makes one with `createWorld` or
1250
+ * `createWorldFromMap`, which also place the map's things and start the rules
1251
+ *
1252
+ * @beta
1253
+ */
887
1254
  constructor(options: WorldOptions);
888
- /** The systems, in the order they run */
1255
+ /**
1256
+ * The systems, in the order they run
1257
+ *
1258
+ * @beta
1259
+ */
889
1260
  get systems(): readonly System[];
890
- /** Adds a system to the running world, like a computer player. It takes its place by its phase, `before` and `after` */
1261
+ /**
1262
+ * Adds a system to the running world, like a computer player. It takes its place by its phase, `before` and `after`
1263
+ *
1264
+ * @beta
1265
+ */
891
1266
  addSystem(system: System): void;
892
1267
  /** What systems kept in themselves when the game was saved, for those not added yet */
893
1268
  private readonly savedSystems;
894
- /** Gives the systems what they kept in a save (see `System.save`): those there now, and those added later */
1269
+ /**
1270
+ * Gives the systems what they kept in a save (see `System.save`): those there now, and those added later
1271
+ *
1272
+ * @beta
1273
+ */
895
1274
  restoreSystems(saved: Record<string, unknown>): void;
896
- /** Takes a system out by name. False when there is none of that name */
1275
+ /**
1276
+ * Takes a system out by name. False when there is none of that name
1277
+ *
1278
+ * @beta
1279
+ */
897
1280
  removeSystem(name: string): boolean;
1281
+ /** Seconds of game time that have passed: `tick` times `dt` */
898
1282
  get time(): number;
899
- /** A number of the rules as it is tuned now (`TunableDef`): what it was set to while playing, or its default */
1283
+ /**
1284
+ * A number of the rules as it is tuned now (`TunableDef`): what it was set to while playing, or its default
1285
+ *
1286
+ * @beta
1287
+ */
900
1288
  tunable(id: string): number;
901
- /** Tunes a number of the rules, within its bounds, and says so (`tunableChanged`) */
1289
+ /**
1290
+ * Tunes a number of the rules, within its bounds, and says so (`tunableChanged`)
1291
+ *
1292
+ * @beta
1293
+ */
902
1294
  setTunable(id: string, value: number): void;
903
1295
  /**
904
1296
  * Changes a definition while the game runs (S61): a unit type's health, an ability's cooldown, as the editor's Data
905
1297
  * 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
906
1298
  * take it at once, with as much of their health lost as before. Kept with the world and in its save, and said
907
- * (`definitionChanged`). False for a definition the game does not have
1299
+ * (`definitionChanged`). False for a definition the game does not have. Not held to what the game lets be changed
1300
+ * (`Rules.editable`), as `layData` and a map's definitions are: any field is taken. The check is the command's that
1301
+ * the Data panel sends (`redefineCommand`); code that calls this says what it allows itself
1302
+ *
1303
+ * @beta
908
1304
  */
909
1305
  redefine(kind: DataKind, id: string, values: DataValues): boolean;
910
1306
  /** State of a game module or a mod for the whole game: made from the component's default when first asked for */
911
1307
  state<T>(key: Component<T, unknown>): T;
1308
+ /** Sets the whole game's state for a component, replacing what `state` gives for it */
912
1309
  setState<T>(key: Component<T, unknown>, value: T): void;
913
- /** The game's numbers that are not about any one unit, like the supply cap (`GameModule.rules`) */
914
- get rules(): Readonly<GameRules>;
915
- /** Hour of the day, 0..24. Noon in a game without days (`clock.hour`) */
1310
+ /** The game's numbers that are not about any one unit, like the supply cap (`Rules.settings`) */
1311
+ get settings(): Readonly<RuleSettings>;
1312
+ /**
1313
+ * Hour of the day, 0..24. Noon in a game without days (`clock.hour`)
1314
+ *
1315
+ * @beta
1316
+ */
916
1317
  get hour(): number;
917
- /** Whether the sun is down (`clock.night`): asked for every unit's sight and stats, many times a tick */
1318
+ /**
1319
+ * Whether the sun is down (`clock.night`): asked for every unit's sight and stats, many times a tick
1320
+ *
1321
+ * @beta
1322
+ */
918
1323
  get night(): boolean;
919
- /** Unique id for orders, order groups and projectiles */
1324
+ /**
1325
+ * Unique id for orders, order groups and projectiles
1326
+ *
1327
+ * @beta
1328
+ */
920
1329
  newId(): number;
1330
+ /** The player of this id; throws when there is none */
921
1331
  player(id: PlayerId): Player;
922
- /** Whether an entity of this id was ever made here: one that died was, one of a number not yet given out never was */
1332
+ /**
1333
+ * Whether an entity of this id was ever made here: one that died was, one of a number not yet given out never was
1334
+ *
1335
+ * @beta
1336
+ */
923
1337
  made(id: EntityId): boolean;
924
1338
  /** Living entity with this id */
925
1339
  get(id: EntityId | undefined): Entity | undefined;
@@ -928,11 +1342,17 @@ export declare class World {
928
1342
  * dead, or when there never was one. A game can say which names there are: `world.named<RoadNames>('gate')`
929
1343
  */
930
1344
  named<Name extends string = string>(name: Name): Entity | undefined;
931
- /** The name an entity was given, if any */
1345
+ /**
1346
+ * The name an entity was given, if any
1347
+ *
1348
+ * @beta
1349
+ */
932
1350
  nameOf(entity: Entity): string | undefined;
933
1351
  /**
934
1352
  * Names an entity, for the rules to find it by (`named`), or takes its name away with none. It has one name, and a
935
1353
  * name is one entity's: taking that of another that still lives throws. The name of the dead is free
1354
+ *
1355
+ * @beta
936
1356
  */
937
1357
  setName(entity: Entity, name: string | undefined): void;
938
1358
  /**
@@ -944,9 +1364,17 @@ export declare class World {
944
1364
  areEnemies(a: PlayerId, b: PlayerId): boolean;
945
1365
  /** Whether two players are on one side (`sides.allies`) */
946
1366
  areAllies(a: PlayerId, b: PlayerId): boolean;
947
- /** Whether a player may command an entity (`sides.mayCommand`): what every command is checked against */
1367
+ /**
1368
+ * Whether a player may command an entity (`sides.mayCommand`): what every command is checked against
1369
+ *
1370
+ * @beta
1371
+ */
948
1372
  mayCommand(player: PlayerId, entity: Entity): boolean;
949
- /** Whether a team currently sees the entity (`sight.sees`): asked of every entity, team and snapshot */
1373
+ /**
1374
+ * Whether a team currently sees the entity (`sight.sees`): asked of every entity, team and snapshot
1375
+ *
1376
+ * @beta
1377
+ */
950
1378
  isVisibleTo(entity: Entity, team: number): boolean;
951
1379
  /**
952
1380
  * Creates an entity. Structures are centered on the grid cells closest to `position`;
@@ -959,10 +1387,26 @@ export declare class World {
959
1387
  * @beta
960
1388
  */
961
1389
  spawnPrefab(prefab: PrefabDef | string, options: SpawnPrefabOptions): SpawnedPrefab;
1390
+ /**
1391
+ * The neutral player, who owns what belongs to nobody (a soul, a mine, a tree): the first of them, the game's
1392
+ * `MAP_NEUTRAL`. Throws for a game that has none
1393
+ *
1394
+ * @beta
1395
+ */
1396
+ get neutral(): PlayerId;
1397
+ /**
1398
+ * Puts a new entity of the unit type `typeId` into the world for `owner` at `at`, and returns it:
1399
+ * `world.spawn('footman', { at: { x: 10, z: 12 }, owner: 1 })`, with the rest of what it may start with
1400
+ * (`SpawnOptions`: `facing`, `name`, `lifetime`, `data`…) beside them
1401
+ */
1402
+ spawn(typeId: string, options: SpawnAt): Entity;
1403
+ /** Puts a new entity of the unit type `typeId` into the world for `owner` at `position`, and returns it */
962
1404
  spawn(typeId: string, owner: PlayerId, position: Vec2, options?: SpawnOptions): Entity;
963
1405
  /**
964
1406
  * Turns scenery into an actor, for good: something gave it a reason to be looked at every tick, like a buff
965
1407
  * that has to run out. Whatever does that to an entity calls this; the debug checks catch what forgets to.
1408
+ *
1409
+ * @beta
966
1410
  */
967
1411
  wake(entity: Entity): void;
968
1412
  /**
@@ -982,35 +1426,49 @@ export declare class World {
982
1426
  over?: number;
983
1427
  }): void;
984
1428
  /**
985
- * Plays one of the view's effects (`GameView.fx.defs`) on the screens of the players who see where it is, or those it is
1429
+ * 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
986
1430
  * for (`to`): at a place (`at`), or on an entity (`on`, at a `point` of its model), with knobs (`params`). Its random
987
1431
  * parts go by a seed, the same on every screen. Nothing it does decides anything: it is not in the world's state, a
988
- * save, or what a player who joins later is told. What it gives back stops it (`stopEffect`)
1432
+ * save, or what a player who joins later is told. What it gives back stops it (`stopFx`)
989
1433
  *
990
1434
  * @beta
991
1435
  */
992
- effect(effect: string, options?: EffectOptions): number;
1436
+ fx(fx: string, options?: FxOptions): number;
993
1437
  /**
994
- * Stops an effect the rules played (`effect`) on every screen, as its own `stop` says, over `fade` seconds
1438
+ * Stops an fx the rules played (`fx`) on every screen, as its own `stop` says, over `fade` seconds
995
1439
  *
996
1440
  * @beta
997
1441
  */
998
- stopEffect(id: number, options?: {
1442
+ stopFx(id: number, options?: {
999
1443
  fade?: number;
1000
1444
  }): void;
1001
- setCells(layer: string, cells: readonly number[] | AreaShape, value: number): number[];
1445
+ /**
1446
+ * Sets the cells of a cell layer, given as indices or an area, to a value 0..255, and returns the cells that changed.
1447
+ * `over`: the seconds the screens that see them ease into the value over (grass growing back), told with the cells;
1448
+ * a screen told of them later, as they come into its sight, eases in as it can
1449
+ *
1450
+ * @beta
1451
+ */
1452
+ setCells(layer: string, cells: readonly number[] | AreaShape, value: number, options?: {
1453
+ over?: number;
1454
+ }): number[];
1002
1455
  /**
1003
1456
  * Reshapes a part of the ground as the game goes (`TerrainPatch`): its heights, cliffs, water, paint, what is kept
1004
1457
  * 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
1005
1458
  * played (`debug.ground`, EQ10). What the rules go by follows: who sees whom from the levels, where can be built, and
1006
- * the ways, cut again of the ground as it is now (`Navigation.reshape`: on this thread, every machine the same, and
1007
- * not for nothing on a big map). What stands on it stays where it is. Every player is told (a `ground` event), and
1008
- * saves keep it. Throws where the patch does not fit the ground (`terrainPatchProblem`)
1459
+ * the ways, cut again of the ground as it is now (`Navigation.reshape`: on this thread, every machine the same; only
1460
+ * the tiles of the ways the patch reaches, a few milliseconds for a field, where the ground is still cut on the same
1461
+ * grid, else all of them, which is not for nothing on a big map). What stands on it stays where it is. Every player
1462
+ * is told (a `ground` event), and saves keep it. Throws where the patch does not fit the ground (`terrainPatchProblem`)
1009
1463
  *
1010
1464
  * @beta
1011
1465
  */
1012
1466
  reshapeGround(patch: TerrainPatch): void;
1013
- /** Lets a team see a spot for a while, with nothing standing there */
1467
+ /**
1468
+ * Lets a team see a spot for a while, with nothing standing there
1469
+ *
1470
+ * @beta
1471
+ */
1014
1472
  reveal(team: number, point: Vec2, radius: number, seconds: number, options?: {
1015
1473
  quiet?: boolean;
1016
1474
  }): Reveal;
@@ -1025,9 +1483,15 @@ export declare class World {
1025
1483
  * Takes a unit out of the world for a while, or puts it back: a worker inside a gold mine, a unit carried in
1026
1484
  * something. While hidden it is not found, not seen and in nobody's way, and its orders wait. It comes back at
1027
1485
  * `at`, or where it went in, on the nearest ground it can stand on. Structures cannot hide
1486
+ *
1487
+ * @beta
1028
1488
  */
1029
1489
  setHidden(entity: Entity, hidden: boolean, at?: Vec2): void;
1030
- /** Gives an entity a time after which it is gone by itself, like a ward, or takes it away with `null` */
1490
+ /**
1491
+ * Gives an entity a time after which it is gone by itself, like a ward, or takes it away with `null`
1492
+ *
1493
+ * @beta
1494
+ */
1031
1495
  setLifetime(entity: Entity, seconds: number | null): void;
1032
1496
  /** Deals damage (`life.damage`): the hooks, armor and shields, health, death */
1033
1497
  damage(target: Entity, amount: number, source?: Entity, options?: DamageOptions): void;
@@ -1043,11 +1507,17 @@ export declare class World {
1043
1507
  /**
1044
1508
  * Gives a player a hint (campaign plan CP5): a message of the kind `hint`, shown for `seconds` (the screen's own
1045
1509
  * time when left out), which a player who turned hints off in the settings does not see
1510
+ *
1511
+ * @beta
1046
1512
  */
1047
1513
  hint(player: PlayerId, message: MessageRef, options?: {
1048
1514
  seconds?: number;
1049
1515
  }): void;
1050
- /** The command being carried out, to find out whether it was refused: see `executeCommand` */
1516
+ /**
1517
+ * The command being carried out, to find out whether it was refused: see `executeCommand`
1518
+ *
1519
+ * @beta
1520
+ */
1051
1521
  handling?: {
1052
1522
  player: PlayerId;
1053
1523
  refusal: Message | undefined;
@@ -1055,11 +1525,21 @@ export declare class World {
1055
1525
  /**
1056
1526
  * What a save needs that is the world's own business: id counters, the clock and the commands waiting for
1057
1527
  * the next tick. For `saveWorld` and `loadWorld` only
1528
+ *
1529
+ * @beta
1058
1530
  */
1059
1531
  internals(): WorldInternals;
1060
- /** Puts back what `internals` gave, for `loadWorld` only */
1532
+ /**
1533
+ * Puts back what `internals` gave, for `loadWorld` only
1534
+ *
1535
+ * @beta
1536
+ */
1061
1537
  restoreInternals(internals: WorldInternals): void;
1062
- /** Puts back who died and waits to be taken out (`WorldInternals.dead`), once the entities are back. For `loadWorld` only */
1538
+ /**
1539
+ * Puts back who died and waits to be taken out (`WorldInternals.dead`), once the entities are back. For `loadWorld` only
1540
+ *
1541
+ * @beta
1542
+ */
1063
1543
  restoreDead(ids: readonly EntityId[]): void;
1064
1544
  /**
1065
1545
  * Queues a player command. It is applied at the start of the next tick; talk (a command whose def says
@@ -1075,12 +1555,16 @@ export declare class World {
1075
1555
  * @beta
1076
1556
  */
1077
1557
  watch(watcher: WorldWatcher): () => void;
1078
- /** A save of the world was taken, which put its crowd back (`saveWorld`): told to what watches it. The engine's */
1558
+ /**
1559
+ * A save of the world was taken, which put its crowd back (`saveWorld`): told to what watches it. The engine's
1560
+ *
1561
+ * @beta
1562
+ */
1079
1563
  saved(): void;
1080
1564
  /** Advances the simulation by one fixed tick */
1081
1565
  /**
1082
1566
  * The entities that are all of what is asked, for scripts: whose they are, of which type, in which area. Only the
1083
- * living, unless asked. A new list: for what runs every tick, go through `index` or `areas` instead
1567
+ * living, unless asked. A new list: for what runs every tick, go through `index` or `areas` instead; by place and condition, `query`
1084
1568
  */
1085
1569
  find(filter?: {
1086
1570
  owner?: PlayerId;
@@ -1088,24 +1572,58 @@ export declare class World {
1088
1572
  area?: string;
1089
1573
  dead?: boolean;
1090
1574
  }): Entity[];
1575
+ /**
1576
+ * What in the world is all a query asks (`WorldQuery`): around a point or a unit (`near`, `radius`), in an area, of
1577
+ * whom, of which type, kind and layer, what it carries and how hurt it is (`UnitCondition`), what a player sees, or
1578
+ * code (`where`); in an order (`sort`: `nearest`, `lowestHealthShare`, `random`…), as many as `limit` says. A new list:
1579
+ * `world.query({ near: hero, radius: 8, is: 'enemy', healthBelow: 0.3, sort: 'nearest', limit: 3 })`
1580
+ *
1581
+ * @beta
1582
+ */
1583
+ query(query?: WorldQuery): Entity[];
1091
1584
  /**
1092
1585
  * Marks a moment to start again from, like the start of a wave, with what the player is told it is ("Wave 6").
1093
1586
  * A session keeps a save of the world as it is at the end of this tick, for "Retry from wave 6"
1094
1587
  */
1095
1588
  checkpoint(label: MessageRef): void;
1589
+ /**
1590
+ * Steps the world one tick; does nothing once the game failed. In this order:
1591
+ *
1592
+ * 1. The commands sent since the last tick are carried out.
1593
+ * 2. Units are filed by where they stand (`spatial`).
1594
+ * 3. The systems run, phase by phase (`commands`, `decide`, `move`, `resolve`, `cleanup`).
1595
+ * 4. The dead are taken out of the world (`remove` hook, `entityRemoved`).
1596
+ * 5. `tick` goes up by one.
1597
+ * 6. The tick's events go out to listeners (`world.events.on`), held until now.
1598
+ *
1599
+ * So a listener runs after the tick is over: `world.tick` is already the next one, and an entity that died this
1600
+ * tick is no longer in `world.entities` (the event still carries it; a fallen hero waiting to be brought back
1601
+ * stays). Hooks run at once, inside the tick, where
1602
+ * what they are asked about happens
1603
+ */
1096
1604
  step(): void;
1097
1605
  /**
1098
1606
  * What a part of the game that threw comes to, by what the world says of errors (`errorPolicy`). It returns when
1099
1607
  * the part is to be switched off or let go (`disable`): the caller does that, and goes on. It throws otherwise: the
1100
1608
  * error itself (`throw`), or what leaves the tick of a game that ends there (`end`)
1609
+ *
1610
+ * @beta
1101
1611
  */
1102
1612
  caught(error: unknown, where: ErrorSite): void;
1103
- /** Switches off the parts a save says were (`world.disabled`): the same game goes on as the one that was saved */
1613
+ /**
1614
+ * Switches off the parts a save says were (`world.disabled`): the same game goes on as the one that was saved
1615
+ *
1616
+ * @beta
1617
+ */
1104
1618
  disable(sites: Iterable<ErrorSite>): void;
1105
1619
  private advance;
1106
- /** Throws when scenery has something that only actors get looked after for. See `debugChecks` */
1620
+ /** Throws when scenery has something that only units get looked after for. See `debugChecks` */
1107
1621
  private checkScenery;
1108
- /** Whether it was disposed: its navigation is freed, and it is not to be stepped again */
1622
+ /**
1623
+ * Whether it was disposed: its navigation is freed, and it is not to be stepped again
1624
+ *
1625
+ * @beta
1626
+ */
1109
1627
  get disposed(): boolean;
1110
1628
  private wasDisposed;
1111
1629
  /**