@rpgm-tools/neo-angband-core 0.10.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 (1183) hide show
  1. package/LICENSE.md +43 -0
  2. package/README.md +80 -0
  3. package/dist/agent/act.d.ts +22 -0
  4. package/dist/agent/act.d.ts.map +1 -0
  5. package/dist/agent/act.js +88 -0
  6. package/dist/agent/act.js.map +1 -0
  7. package/dist/agent/controller.d.ts +34 -0
  8. package/dist/agent/controller.d.ts.map +1 -0
  9. package/dist/agent/controller.js +90 -0
  10. package/dist/agent/controller.js.map +1 -0
  11. package/dist/agent/events.d.ts +27 -0
  12. package/dist/agent/events.d.ts.map +1 -0
  13. package/dist/agent/events.js +31 -0
  14. package/dist/agent/events.js.map +1 -0
  15. package/dist/agent/index.d.ts +17 -0
  16. package/dist/agent/index.d.ts.map +1 -0
  17. package/dist/agent/index.js +15 -0
  18. package/dist/agent/index.js.map +1 -0
  19. package/dist/agent/perceive.d.ts +21 -0
  20. package/dist/agent/perceive.d.ts.map +1 -0
  21. package/dist/agent/perceive.js +386 -0
  22. package/dist/agent/perceive.js.map +1 -0
  23. package/dist/agent/types.d.ts +436 -0
  24. package/dist/agent/types.d.ts.map +1 -0
  25. package/dist/agent/types.js +63 -0
  26. package/dist/agent/types.js.map +1 -0
  27. package/dist/bitflag.d.ts +199 -0
  28. package/dist/bitflag.d.ts.map +1 -0
  29. package/dist/bitflag.js +478 -0
  30. package/dist/bitflag.js.map +1 -0
  31. package/dist/cmd.d.ts +164 -0
  32. package/dist/cmd.d.ts.map +1 -0
  33. package/dist/cmd.js +350 -0
  34. package/dist/cmd.js.map +1 -0
  35. package/dist/color.d.ts +104 -0
  36. package/dist/color.d.ts.map +1 -0
  37. package/dist/color.js +240 -0
  38. package/dist/color.js.map +1 -0
  39. package/dist/combat/brand-slay.d.ts +119 -0
  40. package/dist/combat/brand-slay.d.ts.map +1 -0
  41. package/dist/combat/brand-slay.js +264 -0
  42. package/dist/combat/brand-slay.js.map +1 -0
  43. package/dist/combat/hit.d.ts +198 -0
  44. package/dist/combat/hit.d.ts.map +1 -0
  45. package/dist/combat/hit.js +310 -0
  46. package/dist/combat/hit.js.map +1 -0
  47. package/dist/combat/index.d.ts +15 -0
  48. package/dist/combat/index.d.ts.map +1 -0
  49. package/dist/combat/index.js +15 -0
  50. package/dist/combat/index.js.map +1 -0
  51. package/dist/combat/melee.d.ts +261 -0
  52. package/dist/combat/melee.d.ts.map +1 -0
  53. package/dist/combat/melee.js +402 -0
  54. package/dist/combat/melee.js.map +1 -0
  55. package/dist/combat/mon-melee.d.ts +233 -0
  56. package/dist/combat/mon-melee.d.ts.map +1 -0
  57. package/dist/combat/mon-melee.js +883 -0
  58. package/dist/combat/mon-melee.js.map +1 -0
  59. package/dist/combat/ranged.d.ts +89 -0
  60. package/dist/combat/ranged.d.ts.map +1 -0
  61. package/dist/combat/ranged.js +253 -0
  62. package/dist/combat/ranged.js.map +1 -0
  63. package/dist/constants.d.ts +134 -0
  64. package/dist/constants.d.ts.map +1 -0
  65. package/dist/constants.js +171 -0
  66. package/dist/constants.js.map +1 -0
  67. package/dist/dice.d.ts +91 -0
  68. package/dist/dice.d.ts.map +1 -0
  69. package/dist/dice.js +424 -0
  70. package/dist/dice.js.map +1 -0
  71. package/dist/effects/effect-choice.d.ts +15 -0
  72. package/dist/effects/effect-choice.d.ts.map +1 -0
  73. package/dist/effects/effect-choice.js +18 -0
  74. package/dist/effects/effect-choice.js.map +1 -0
  75. package/dist/effects/effect-info.d.ts +124 -0
  76. package/dist/effects/effect-info.d.ts.map +1 -0
  77. package/dist/effects/effect-info.js +706 -0
  78. package/dist/effects/effect-info.js.map +1 -0
  79. package/dist/effects/effect.d.ts +165 -0
  80. package/dist/effects/effect.d.ts.map +1 -0
  81. package/dist/effects/effect.js +452 -0
  82. package/dist/effects/effect.js.map +1 -0
  83. package/dist/effects/handlers.d.ts +70 -0
  84. package/dist/effects/handlers.d.ts.map +1 -0
  85. package/dist/effects/handlers.js +394 -0
  86. package/dist/effects/handlers.js.map +1 -0
  87. package/dist/effects/interpreter.d.ts +291 -0
  88. package/dist/effects/interpreter.d.ts.map +1 -0
  89. package/dist/effects/interpreter.js +325 -0
  90. package/dist/effects/interpreter.js.map +1 -0
  91. package/dist/events.d.ts +188 -0
  92. package/dist/events.d.ts.map +1 -0
  93. package/dist/events.js +138 -0
  94. package/dist/events.js.map +1 -0
  95. package/dist/expression.d.ts +83 -0
  96. package/dist/expression.d.ts.map +1 -0
  97. package/dist/expression.js +333 -0
  98. package/dist/expression.js.map +1 -0
  99. package/dist/game/cave-cmd.d.ts +195 -0
  100. package/dist/game/cave-cmd.d.ts.map +1 -0
  101. package/dist/game/cave-cmd.js +968 -0
  102. package/dist/game/cave-cmd.js.map +1 -0
  103. package/dist/game/char-sheet.d.ts +189 -0
  104. package/dist/game/char-sheet.d.ts.map +1 -0
  105. package/dist/game/char-sheet.js +381 -0
  106. package/dist/game/char-sheet.js.map +1 -0
  107. package/dist/game/chest.d.ts +94 -0
  108. package/dist/game/chest.d.ts.map +1 -0
  109. package/dist/game/chest.js +267 -0
  110. package/dist/game/chest.js.map +1 -0
  111. package/dist/game/context.d.ts +970 -0
  112. package/dist/game/context.d.ts.map +1 -0
  113. package/dist/game/context.js +353 -0
  114. package/dist/game/context.js.map +1 -0
  115. package/dist/game/curse-tick.d.ts +35 -0
  116. package/dist/game/curse-tick.d.ts.map +1 -0
  117. package/dist/game/curse-tick.js +100 -0
  118. package/dist/game/curse-tick.js.map +1 -0
  119. package/dist/game/describe.d.ts +20 -0
  120. package/dist/game/describe.d.ts.map +1 -0
  121. package/dist/game/describe.js +45 -0
  122. package/dist/game/describe.js.map +1 -0
  123. package/dist/game/display.d.ts +196 -0
  124. package/dist/game/display.d.ts.map +1 -0
  125. package/dist/game/display.js +684 -0
  126. package/dist/game/display.js.map +1 -0
  127. package/dist/game/dump-level.d.ts +37 -0
  128. package/dist/game/dump-level.d.ts.map +1 -0
  129. package/dist/game/dump-level.js +110 -0
  130. package/dist/game/dump-level.js.map +1 -0
  131. package/dist/game/effect-attack.d.ts +36 -0
  132. package/dist/game/effect-attack.d.ts.map +1 -0
  133. package/dist/game/effect-attack.js +694 -0
  134. package/dist/game/effect-attack.js.map +1 -0
  135. package/dist/game/effect-detect.d.ts +34 -0
  136. package/dist/game/effect-detect.d.ts.map +1 -0
  137. package/dist/game/effect-detect.js +456 -0
  138. package/dist/game/effect-detect.js.map +1 -0
  139. package/dist/game/effect-env.d.ts +77 -0
  140. package/dist/game/effect-env.d.ts.map +1 -0
  141. package/dist/game/effect-env.js +166 -0
  142. package/dist/game/effect-env.js.map +1 -0
  143. package/dist/game/effect-game-env.d.ts +76 -0
  144. package/dist/game/effect-game-env.d.ts.map +1 -0
  145. package/dist/game/effect-game-env.js +23 -0
  146. package/dist/game/effect-game-env.js.map +1 -0
  147. package/dist/game/effect-general.d.ts +98 -0
  148. package/dist/game/effect-general.d.ts.map +1 -0
  149. package/dist/game/effect-general.js +914 -0
  150. package/dist/game/effect-general.js.map +1 -0
  151. package/dist/game/effect-item.d.ts +124 -0
  152. package/dist/game/effect-item.d.ts.map +1 -0
  153. package/dist/game/effect-item.js +789 -0
  154. package/dist/game/effect-item.js.map +1 -0
  155. package/dist/game/effect-melee.d.ts +43 -0
  156. package/dist/game/effect-melee.d.ts.map +1 -0
  157. package/dist/game/effect-melee.js +477 -0
  158. package/dist/game/effect-melee.js.map +1 -0
  159. package/dist/game/effect-mon-origin.d.ts +67 -0
  160. package/dist/game/effect-mon-origin.d.ts.map +1 -0
  161. package/dist/game/effect-mon-origin.js +164 -0
  162. package/dist/game/effect-mon-origin.js.map +1 -0
  163. package/dist/game/effect-monster.d.ts +29 -0
  164. package/dist/game/effect-monster.d.ts.map +1 -0
  165. package/dist/game/effect-monster.js +281 -0
  166. package/dist/game/effect-monster.js.map +1 -0
  167. package/dist/game/effect-summon.d.ts +37 -0
  168. package/dist/game/effect-summon.d.ts.map +1 -0
  169. package/dist/game/effect-summon.js +113 -0
  170. package/dist/game/effect-summon.js.map +1 -0
  171. package/dist/game/effect-teleport.d.ts +130 -0
  172. package/dist/game/effect-teleport.d.ts.map +1 -0
  173. package/dist/game/effect-teleport.js +529 -0
  174. package/dist/game/effect-teleport.js.map +1 -0
  175. package/dist/game/effect-terrain.d.ts +91 -0
  176. package/dist/game/effect-terrain.d.ts.map +1 -0
  177. package/dist/game/effect-terrain.js +812 -0
  178. package/dist/game/effect-terrain.js.map +1 -0
  179. package/dist/game/energy.d.ts +45 -0
  180. package/dist/game/energy.d.ts.map +1 -0
  181. package/dist/game/energy.js +51 -0
  182. package/dist/game/energy.js.map +1 -0
  183. package/dist/game/equip-cmp.d.ts +138 -0
  184. package/dist/game/equip-cmp.d.ts.map +1 -0
  185. package/dist/game/equip-cmp.js +363 -0
  186. package/dist/game/equip-cmp.js.map +1 -0
  187. package/dist/game/floor.d.ts +182 -0
  188. package/dist/game/floor.d.ts.map +1 -0
  189. package/dist/game/floor.js +435 -0
  190. package/dist/game/floor.js.map +1 -0
  191. package/dist/game/gear.d.ts +408 -0
  192. package/dist/game/gear.d.ts.map +1 -0
  193. package/dist/game/gear.js +1037 -0
  194. package/dist/game/gear.js.map +1 -0
  195. package/dist/game/harness.d.ts +61 -0
  196. package/dist/game/harness.d.ts.map +1 -0
  197. package/dist/game/harness.js +198 -0
  198. package/dist/game/harness.js.map +1 -0
  199. package/dist/game/history.d.ts +49 -0
  200. package/dist/game/history.d.ts.map +1 -0
  201. package/dist/game/history.js +55 -0
  202. package/dist/game/history.js.map +1 -0
  203. package/dist/game/ignore-cmd.d.ts +42 -0
  204. package/dist/game/ignore-cmd.d.ts.map +1 -0
  205. package/dist/game/ignore-cmd.js +59 -0
  206. package/dist/game/ignore-cmd.js.map +1 -0
  207. package/dist/game/inscription-confirm.d.ts +80 -0
  208. package/dist/game/inscription-confirm.d.ts.map +1 -0
  209. package/dist/game/inscription-confirm.js +95 -0
  210. package/dist/game/inscription-confirm.js.map +1 -0
  211. package/dist/game/known.d.ts +297 -0
  212. package/dist/game/known.d.ts.map +1 -0
  213. package/dist/game/known.js +849 -0
  214. package/dist/game/known.js.map +1 -0
  215. package/dist/game/loop.d.ts +139 -0
  216. package/dist/game/loop.d.ts.map +1 -0
  217. package/dist/game/loop.js +631 -0
  218. package/dist/game/loop.js.map +1 -0
  219. package/dist/game/lore-color.d.ts +25 -0
  220. package/dist/game/lore-color.d.ts.map +1 -0
  221. package/dist/game/lore-color.js +95 -0
  222. package/dist/game/lore-color.js.map +1 -0
  223. package/dist/game/mon-cast.d.ts +150 -0
  224. package/dist/game/mon-cast.d.ts.map +1 -0
  225. package/dist/game/mon-cast.js +301 -0
  226. package/dist/game/mon-cast.js.map +1 -0
  227. package/dist/game/mon-cmd.d.ts +51 -0
  228. package/dist/game/mon-cmd.d.ts.map +1 -0
  229. package/dist/game/mon-cmd.js +670 -0
  230. package/dist/game/mon-cmd.js.map +1 -0
  231. package/dist/game/mon-death.d.ts +143 -0
  232. package/dist/game/mon-death.d.ts.map +1 -0
  233. package/dist/game/mon-death.js +328 -0
  234. package/dist/game/mon-death.js.map +1 -0
  235. package/dist/game/mon-group.d.ts +81 -0
  236. package/dist/game/mon-group.d.ts.map +1 -0
  237. package/dist/game/mon-group.js +323 -0
  238. package/dist/game/mon-group.js.map +1 -0
  239. package/dist/game/mon-list.d.ts +85 -0
  240. package/dist/game/mon-list.d.ts.map +1 -0
  241. package/dist/game/mon-list.js +154 -0
  242. package/dist/game/mon-list.js.map +1 -0
  243. package/dist/game/mon-message.d.ts +100 -0
  244. package/dist/game/mon-message.d.ts.map +1 -0
  245. package/dist/game/mon-message.js +336 -0
  246. package/dist/game/mon-message.js.map +1 -0
  247. package/dist/game/mon-place.d.ts +226 -0
  248. package/dist/game/mon-place.d.ts.map +1 -0
  249. package/dist/game/mon-place.js +642 -0
  250. package/dist/game/mon-place.js.map +1 -0
  251. package/dist/game/mon-ranged.d.ts +87 -0
  252. package/dist/game/mon-ranged.d.ts.map +1 -0
  253. package/dist/game/mon-ranged.js +353 -0
  254. package/dist/game/mon-ranged.js.map +1 -0
  255. package/dist/game/mon-shape.d.ts +43 -0
  256. package/dist/game/mon-shape.d.ts.map +1 -0
  257. package/dist/game/mon-shape.js +115 -0
  258. package/dist/game/mon-shape.js.map +1 -0
  259. package/dist/game/mon-side.d.ts +63 -0
  260. package/dist/game/mon-side.d.ts.map +1 -0
  261. package/dist/game/mon-side.js +403 -0
  262. package/dist/game/mon-side.js.map +1 -0
  263. package/dist/game/monster-turn.d.ts +195 -0
  264. package/dist/game/monster-turn.d.ts.map +1 -0
  265. package/dist/game/monster-turn.js +1560 -0
  266. package/dist/game/monster-turn.js.map +1 -0
  267. package/dist/game/obj-cmd.d.ts +453 -0
  268. package/dist/game/obj-cmd.d.ts.map +1 -0
  269. package/dist/game/obj-cmd.js +1530 -0
  270. package/dist/game/obj-cmd.js.map +1 -0
  271. package/dist/game/obj-list.d.ts +92 -0
  272. package/dist/game/obj-list.d.ts.map +1 -0
  273. package/dist/game/obj-list.js +251 -0
  274. package/dist/game/obj-list.js.map +1 -0
  275. package/dist/game/object-inspect.d.ts +37 -0
  276. package/dist/game/object-inspect.d.ts.map +1 -0
  277. package/dist/game/object-inspect.js +106 -0
  278. package/dist/game/object-inspect.js.map +1 -0
  279. package/dist/game/pickup.d.ts +126 -0
  280. package/dist/game/pickup.d.ts.map +1 -0
  281. package/dist/game/pickup.js +367 -0
  282. package/dist/game/pickup.js.map +1 -0
  283. package/dist/game/player-path.d.ts +133 -0
  284. package/dist/game/player-path.d.ts.map +1 -0
  285. package/dist/game/player-path.js +1268 -0
  286. package/dist/game/player-path.js.map +1 -0
  287. package/dist/game/player-side.d.ts +59 -0
  288. package/dist/game/player-side.d.ts.map +1 -0
  289. package/dist/game/player-side.js +506 -0
  290. package/dist/game/player-side.js.map +1 -0
  291. package/dist/game/player-turn.d.ts +161 -0
  292. package/dist/game/player-turn.d.ts.map +1 -0
  293. package/dist/game/player-turn.js +739 -0
  294. package/dist/game/player-turn.js.map +1 -0
  295. package/dist/game/project-cast.d.ts +268 -0
  296. package/dist/game/project-cast.d.ts.map +1 -0
  297. package/dist/game/project-cast.js +496 -0
  298. package/dist/game/project-cast.js.map +1 -0
  299. package/dist/game/project-feat.d.ts +47 -0
  300. package/dist/game/project-feat.d.ts.map +1 -0
  301. package/dist/game/project-feat.js +350 -0
  302. package/dist/game/project-feat.js.map +1 -0
  303. package/dist/game/project-monster.d.ts +106 -0
  304. package/dist/game/project-monster.d.ts.map +1 -0
  305. package/dist/game/project-monster.js +272 -0
  306. package/dist/game/project-monster.js.map +1 -0
  307. package/dist/game/project-obj.d.ts +60 -0
  308. package/dist/game/project-obj.d.ts.map +1 -0
  309. package/dist/game/project-obj.js +245 -0
  310. package/dist/game/project-obj.js.map +1 -0
  311. package/dist/game/project-player.d.ts +120 -0
  312. package/dist/game/project-player.d.ts.map +1 -0
  313. package/dist/game/project-player.js +108 -0
  314. package/dist/game/project-player.js.map +1 -0
  315. package/dist/game/quest.d.ts +101 -0
  316. package/dist/game/quest.d.ts.map +1 -0
  317. package/dist/game/quest.js +192 -0
  318. package/dist/game/quest.js.map +1 -0
  319. package/dist/game/ranged-cmd.d.ts +32 -0
  320. package/dist/game/ranged-cmd.d.ts.map +1 -0
  321. package/dist/game/ranged-cmd.js +372 -0
  322. package/dist/game/ranged-cmd.js.map +1 -0
  323. package/dist/game/scheduler.d.ts +47 -0
  324. package/dist/game/scheduler.d.ts.map +1 -0
  325. package/dist/game/scheduler.js +141 -0
  326. package/dist/game/scheduler.js.map +1 -0
  327. package/dist/game/spell-cmd.d.ts +104 -0
  328. package/dist/game/spell-cmd.d.ts.map +1 -0
  329. package/dist/game/spell-cmd.js +320 -0
  330. package/dist/game/spell-cmd.js.map +1 -0
  331. package/dist/game/spoil.d.ts +28 -0
  332. package/dist/game/spoil.d.ts.map +1 -0
  333. package/dist/game/spoil.js +435 -0
  334. package/dist/game/spoil.js.map +1 -0
  335. package/dist/game/steal.d.ts +35 -0
  336. package/dist/game/steal.d.ts.map +1 -0
  337. package/dist/game/steal.js +145 -0
  338. package/dist/game/steal.js.map +1 -0
  339. package/dist/game/take-hit-hooks.d.ts +52 -0
  340. package/dist/game/take-hit-hooks.d.ts.map +1 -0
  341. package/dist/game/take-hit-hooks.js +127 -0
  342. package/dist/game/take-hit-hooks.js.map +1 -0
  343. package/dist/game/target-loop.d.ts +119 -0
  344. package/dist/game/target-loop.d.ts.map +1 -0
  345. package/dist/game/target-loop.js +408 -0
  346. package/dist/game/target-loop.js.map +1 -0
  347. package/dist/game/target.d.ts +133 -0
  348. package/dist/game/target.d.ts.map +1 -0
  349. package/dist/game/target.js +353 -0
  350. package/dist/game/target.js.map +1 -0
  351. package/dist/game/thrust.d.ts +37 -0
  352. package/dist/game/thrust.d.ts.map +1 -0
  353. package/dist/game/thrust.js +155 -0
  354. package/dist/game/thrust.js.map +1 -0
  355. package/dist/game/trap.d.ts +218 -0
  356. package/dist/game/trap.d.ts.map +1 -0
  357. package/dist/game/trap.js +618 -0
  358. package/dist/game/trap.js.map +1 -0
  359. package/dist/game/ui-entry.d.ts +282 -0
  360. package/dist/game/ui-entry.d.ts.map +1 -0
  361. package/dist/game/ui-entry.js +1838 -0
  362. package/dist/game/ui-entry.js.map +1 -0
  363. package/dist/game/wizard.d.ts +654 -0
  364. package/dist/game/wizard.d.ts.map +1 -0
  365. package/dist/game/wizard.js +1323 -0
  366. package/dist/game/wizard.js.map +1 -0
  367. package/dist/game/world.d.ts +183 -0
  368. package/dist/game/world.d.ts.map +1 -0
  369. package/dist/game/world.js +685 -0
  370. package/dist/game/world.js.map +1 -0
  371. package/dist/gen/cave.d.ts +247 -0
  372. package/dist/gen/cave.d.ts.map +1 -0
  373. package/dist/gen/cave.js +2406 -0
  374. package/dist/gen/cave.js.map +1 -0
  375. package/dist/gen/gen-monster.d.ts +151 -0
  376. package/dist/gen/gen-monster.d.ts.map +1 -0
  377. package/dist/gen/gen-monster.js +473 -0
  378. package/dist/gen/gen-monster.js.map +1 -0
  379. package/dist/gen/generate.d.ts +240 -0
  380. package/dist/gen/generate.d.ts.map +1 -0
  381. package/dist/gen/generate.js +358 -0
  382. package/dist/gen/generate.js.map +1 -0
  383. package/dist/gen/room.d.ts +160 -0
  384. package/dist/gen/room.d.ts.map +1 -0
  385. package/dist/gen/room.js +1910 -0
  386. package/dist/gen/room.js.map +1 -0
  387. package/dist/gen/util.d.ts +466 -0
  388. package/dist/gen/util.d.ts.map +1 -0
  389. package/dist/gen/util.js +1553 -0
  390. package/dist/gen/util.js.map +1 -0
  391. package/dist/generated/dun-profiles.d.ts +44 -0
  392. package/dist/generated/dun-profiles.d.ts.map +1 -0
  393. package/dist/generated/dun-profiles.js +28 -0
  394. package/dist/generated/dun-profiles.js.map +1 -0
  395. package/dist/generated/effects.d.ts +1021 -0
  396. package/dist/generated/effects.d.ts.map +1 -0
  397. package/dist/generated/effects.js +239 -0
  398. package/dist/generated/effects.js.map +1 -0
  399. package/dist/generated/elements.d.ts +83 -0
  400. package/dist/generated/elements.d.ts.map +1 -0
  401. package/dist/generated/elements.js +60 -0
  402. package/dist/generated/elements.js.map +1 -0
  403. package/dist/generated/equip-slots.d.ts +104 -0
  404. package/dist/generated/equip-slots.d.ts.map +1 -0
  405. package/dist/generated/equip-slots.js +34 -0
  406. package/dist/generated/equip-slots.js.map +1 -0
  407. package/dist/generated/history-types.d.ts +52 -0
  408. package/dist/generated/history-types.d.ts.map +1 -0
  409. package/dist/generated/history-types.js +32 -0
  410. package/dist/generated/history-types.js.map +1 -0
  411. package/dist/generated/ignore-types.d.ts +116 -0
  412. package/dist/generated/ignore-types.d.ts.map +1 -0
  413. package/dist/generated/ignore-types.js +64 -0
  414. package/dist/generated/ignore-types.js.map +1 -0
  415. package/dist/generated/index.d.ts +32 -0
  416. package/dist/generated/index.d.ts.map +1 -0
  417. package/dist/generated/index.js +33 -0
  418. package/dist/generated/index.js.map +1 -0
  419. package/dist/generated/kind-flags.d.ts +72 -0
  420. package/dist/generated/kind-flags.d.ts.map +1 -0
  421. package/dist/generated/kind-flags.js +42 -0
  422. package/dist/generated/kind-flags.js.map +1 -0
  423. package/dist/generated/message.d.ts +624 -0
  424. package/dist/generated/message.d.ts.map +1 -0
  425. package/dist/generated/message.js +318 -0
  426. package/dist/generated/message.js.map +1 -0
  427. package/dist/generated/mon-message.d.ts +386 -0
  428. package/dist/generated/mon-message.d.ts.map +1 -0
  429. package/dist/generated/mon-message.js +136 -0
  430. package/dist/generated/mon-message.js.map +1 -0
  431. package/dist/generated/mon-race-flags.d.ts +433 -0
  432. package/dist/generated/mon-race-flags.d.ts.map +1 -0
  433. package/dist/generated/mon-race-flags.js +180 -0
  434. package/dist/generated/mon-race-flags.js.map +1 -0
  435. package/dist/generated/mon-spells.d.ts +380 -0
  436. package/dist/generated/mon-spells.d.ts.map +1 -0
  437. package/dist/generated/mon-spells.js +196 -0
  438. package/dist/generated/mon-spells.js.map +1 -0
  439. package/dist/generated/mon-temp-flags.d.ts +52 -0
  440. package/dist/generated/mon-temp-flags.d.ts.map +1 -0
  441. package/dist/generated/mon-temp-flags.js +32 -0
  442. package/dist/generated/mon-temp-flags.js.map +1 -0
  443. package/dist/generated/mon-timed.d.ts +118 -0
  444. package/dist/generated/mon-timed.d.ts.map +1 -0
  445. package/dist/generated/mon-timed.js +32 -0
  446. package/dist/generated/mon-timed.js.map +1 -0
  447. package/dist/generated/object-flags.d.ts +169 -0
  448. package/dist/generated/object-flags.d.ts.map +1 -0
  449. package/dist/generated/object-flags.js +93 -0
  450. package/dist/generated/object-flags.js.map +1 -0
  451. package/dist/generated/object-modifiers.d.ts +50 -0
  452. package/dist/generated/object-modifiers.d.ts.map +1 -0
  453. package/dist/generated/object-modifiers.js +41 -0
  454. package/dist/generated/object-modifiers.js.map +1 -0
  455. package/dist/generated/options.d.ts +284 -0
  456. package/dist/generated/options.d.ts.map +1 -0
  457. package/dist/generated/options.js +102 -0
  458. package/dist/generated/options.js.map +1 -0
  459. package/dist/generated/origins.d.ts +138 -0
  460. package/dist/generated/origins.d.ts.map +1 -0
  461. package/dist/generated/origins.js +62 -0
  462. package/dist/generated/origins.js.map +1 -0
  463. package/dist/generated/parser-errors.d.ts +264 -0
  464. package/dist/generated/parser-errors.d.ts.map +1 -0
  465. package/dist/generated/parser-errors.js +138 -0
  466. package/dist/generated/parser-errors.js.map +1 -0
  467. package/dist/generated/player-flags.d.ts +62 -0
  468. package/dist/generated/player-flags.d.ts.map +1 -0
  469. package/dist/generated/player-flags.js +46 -0
  470. package/dist/generated/player-flags.js.map +1 -0
  471. package/dist/generated/player-timed.d.ts +273 -0
  472. package/dist/generated/player-timed.d.ts.map +1 -0
  473. package/dist/generated/player-timed.js +116 -0
  474. package/dist/generated/player-timed.js.map +1 -0
  475. package/dist/generated/projections.d.ts +130 -0
  476. package/dist/generated/projections.d.ts.map +1 -0
  477. package/dist/generated/projections.js +101 -0
  478. package/dist/generated/projections.js.map +1 -0
  479. package/dist/generated/randart-properties.d.ts +388 -0
  480. package/dist/generated/randart-properties.d.ts.map +1 -0
  481. package/dist/generated/randart-properties.js +200 -0
  482. package/dist/generated/randart-properties.js.map +1 -0
  483. package/dist/generated/room-flags.d.ts +21 -0
  484. package/dist/generated/room-flags.d.ts.map +1 -0
  485. package/dist/generated/room-flags.js +19 -0
  486. package/dist/generated/room-flags.js.map +1 -0
  487. package/dist/generated/rooms.d.ts +122 -0
  488. package/dist/generated/rooms.d.ts.map +1 -0
  489. package/dist/generated/rooms.js +48 -0
  490. package/dist/generated/rooms.js.map +1 -0
  491. package/dist/generated/square-flags.d.ts +96 -0
  492. package/dist/generated/square-flags.d.ts.map +1 -0
  493. package/dist/generated/square-flags.js +54 -0
  494. package/dist/generated/square-flags.js.map +1 -0
  495. package/dist/generated/stats.d.ts +23 -0
  496. package/dist/generated/stats.d.ts.map +1 -0
  497. package/dist/generated/stats.js +20 -0
  498. package/dist/generated/stats.js.map +1 -0
  499. package/dist/generated/terrain-flags.d.ts +136 -0
  500. package/dist/generated/terrain-flags.d.ts.map +1 -0
  501. package/dist/generated/terrain-flags.js +74 -0
  502. package/dist/generated/terrain-flags.js.map +1 -0
  503. package/dist/generated/terrain.d.ts +83 -0
  504. package/dist/generated/terrain.d.ts.map +1 -0
  505. package/dist/generated/terrain.js +60 -0
  506. package/dist/generated/terrain.js.map +1 -0
  507. package/dist/generated/trap-flags.d.ts +68 -0
  508. package/dist/generated/trap-flags.d.ts.map +1 -0
  509. package/dist/generated/trap-flags.js +40 -0
  510. package/dist/generated/trap-flags.js.map +1 -0
  511. package/dist/generated/tvals.d.ts +152 -0
  512. package/dist/generated/tvals.d.ts.map +1 -0
  513. package/dist/generated/tvals.js +82 -0
  514. package/dist/generated/tvals.js.map +1 -0
  515. package/dist/generated/ui-entry-renderers.d.ts +62 -0
  516. package/dist/generated/ui-entry-renderers.d.ts.map +1 -0
  517. package/dist/generated/ui-entry-renderers.js +22 -0
  518. package/dist/generated/ui-entry-renderers.js.map +1 -0
  519. package/dist/guard.d.ts +43 -0
  520. package/dist/guard.d.ts.map +1 -0
  521. package/dist/guard.js +65 -0
  522. package/dist/guard.js.map +1 -0
  523. package/dist/host/args.d.ts +129 -0
  524. package/dist/host/args.d.ts.map +1 -0
  525. package/dist/host/args.js +251 -0
  526. package/dist/host/args.js.map +1 -0
  527. package/dist/host/bridge.d.ts +61 -0
  528. package/dist/host/bridge.d.ts.map +1 -0
  529. package/dist/host/bridge.js +176 -0
  530. package/dist/host/bridge.js.map +1 -0
  531. package/dist/host/index.d.ts +18 -0
  532. package/dist/host/index.d.ts.map +1 -0
  533. package/dist/host/index.js +18 -0
  534. package/dist/host/index.js.map +1 -0
  535. package/dist/host/io.d.ts +169 -0
  536. package/dist/host/io.d.ts.map +1 -0
  537. package/dist/host/io.js +137 -0
  538. package/dist/host/io.js.map +1 -0
  539. package/dist/host/memory.d.ts +56 -0
  540. package/dist/host/memory.d.ts.map +1 -0
  541. package/dist/host/memory.js +105 -0
  542. package/dist/host/memory.js.map +1 -0
  543. package/dist/host/raw.d.ts +114 -0
  544. package/dist/host/raw.d.ts.map +1 -0
  545. package/dist/host/raw.js +107 -0
  546. package/dist/host/raw.js.map +1 -0
  547. package/dist/index.d.ts +180 -0
  548. package/dist/index.d.ts.map +1 -0
  549. package/dist/index.js +222 -0
  550. package/dist/index.js.map +1 -0
  551. package/dist/loc.d.ts +63 -0
  552. package/dist/loc.d.ts.map +1 -0
  553. package/dist/loc.js +128 -0
  554. package/dist/loc.js.map +1 -0
  555. package/dist/mod/hooks.d.ts +204 -0
  556. package/dist/mod/hooks.d.ts.map +1 -0
  557. package/dist/mod/hooks.js +161 -0
  558. package/dist/mod/hooks.js.map +1 -0
  559. package/dist/mod/ids.d.ts +160 -0
  560. package/dist/mod/ids.d.ts.map +1 -0
  561. package/dist/mod/ids.js +343 -0
  562. package/dist/mod/ids.js.map +1 -0
  563. package/dist/mod/registry-host.d.ts +156 -0
  564. package/dist/mod/registry-host.d.ts.map +1 -0
  565. package/dist/mod/registry-host.js +142 -0
  566. package/dist/mod/registry-host.js.map +1 -0
  567. package/dist/mod/save-blocks.d.ts +201 -0
  568. package/dist/mod/save-blocks.d.ts.map +1 -0
  569. package/dist/mod/save-blocks.js +640 -0
  570. package/dist/mod/save-blocks.js.map +1 -0
  571. package/dist/mod/vocabulary.d.ts +104 -0
  572. package/dist/mod/vocabulary.d.ts.map +1 -0
  573. package/dist/mod/vocabulary.js +0 -0
  574. package/dist/mod/vocabulary.js.map +1 -0
  575. package/dist/mon/bind.d.ts +266 -0
  576. package/dist/mon/bind.d.ts.map +1 -0
  577. package/dist/mon/bind.js +610 -0
  578. package/dist/mon/bind.js.map +1 -0
  579. package/dist/mon/desc.d.ts +72 -0
  580. package/dist/mon/desc.d.ts.map +1 -0
  581. package/dist/mon/desc.js +237 -0
  582. package/dist/mon/desc.js.map +1 -0
  583. package/dist/mon/knowledge-groups.d.ts +61 -0
  584. package/dist/mon/knowledge-groups.d.ts.map +1 -0
  585. package/dist/mon/knowledge-groups.js +121 -0
  586. package/dist/mon/knowledge-groups.js.map +1 -0
  587. package/dist/mon/lore-describe.d.ts +216 -0
  588. package/dist/mon/lore-describe.d.ts.map +1 -0
  589. package/dist/mon/lore-describe.js +1105 -0
  590. package/dist/mon/lore-describe.js.map +1 -0
  591. package/dist/mon/lore.d.ts +117 -0
  592. package/dist/mon/lore.d.ts.map +1 -0
  593. package/dist/mon/lore.js +221 -0
  594. package/dist/mon/lore.js.map +1 -0
  595. package/dist/mon/make.d.ts +147 -0
  596. package/dist/mon/make.d.ts.map +1 -0
  597. package/dist/mon/make.js +353 -0
  598. package/dist/mon/make.js.map +1 -0
  599. package/dist/mon/monster.d.ts +94 -0
  600. package/dist/mon/monster.d.ts.map +1 -0
  601. package/dist/mon/monster.js +90 -0
  602. package/dist/mon/monster.js.map +1 -0
  603. package/dist/mon/predicate.d.ts +87 -0
  604. package/dist/mon/predicate.d.ts.map +1 -0
  605. package/dist/mon/predicate.js +190 -0
  606. package/dist/mon/predicate.js.map +1 -0
  607. package/dist/mon/project-mon.d.ts +129 -0
  608. package/dist/mon/project-mon.d.ts.map +1 -0
  609. package/dist/mon/project-mon.js +652 -0
  610. package/dist/mon/project-mon.js.map +1 -0
  611. package/dist/mon/spell.d.ts +155 -0
  612. package/dist/mon/spell.d.ts.map +1 -0
  613. package/dist/mon/spell.js +355 -0
  614. package/dist/mon/spell.js.map +1 -0
  615. package/dist/mon/steal.d.ts +112 -0
  616. package/dist/mon/steal.d.ts.map +1 -0
  617. package/dist/mon/steal.js +163 -0
  618. package/dist/mon/steal.js.map +1 -0
  619. package/dist/mon/summon.d.ts +62 -0
  620. package/dist/mon/summon.d.ts.map +1 -0
  621. package/dist/mon/summon.js +111 -0
  622. package/dist/mon/summon.js.map +1 -0
  623. package/dist/mon/take-hit.d.ts +75 -0
  624. package/dist/mon/take-hit.d.ts.map +1 -0
  625. package/dist/mon/take-hit.js +122 -0
  626. package/dist/mon/take-hit.js.map +1 -0
  627. package/dist/mon/timed.d.ts +74 -0
  628. package/dist/mon/timed.d.ts.map +1 -0
  629. package/dist/mon/timed.js +219 -0
  630. package/dist/mon/timed.js.map +1 -0
  631. package/dist/mon/types.d.ts +252 -0
  632. package/dist/mon/types.d.ts.map +1 -0
  633. package/dist/mon/types.js +46 -0
  634. package/dist/mon/types.js.map +1 -0
  635. package/dist/msg.d.ts +71 -0
  636. package/dist/msg.d.ts.map +1 -0
  637. package/dist/msg.js +126 -0
  638. package/dist/msg.js.map +1 -0
  639. package/dist/obj/artifact-fake.d.ts +39 -0
  640. package/dist/obj/artifact-fake.d.ts.map +1 -0
  641. package/dist/obj/artifact-fake.js +52 -0
  642. package/dist/obj/artifact-fake.js.map +1 -0
  643. package/dist/obj/artifact-known.d.ts +50 -0
  644. package/dist/obj/artifact-known.d.ts.map +1 -0
  645. package/dist/obj/artifact-known.js +55 -0
  646. package/dist/obj/artifact-known.js.map +1 -0
  647. package/dist/obj/bind.d.ts +219 -0
  648. package/dist/obj/bind.d.ts.map +1 -0
  649. package/dist/obj/bind.js +1239 -0
  650. package/dist/obj/bind.js.map +1 -0
  651. package/dist/obj/chest.d.ts +91 -0
  652. package/dist/obj/chest.d.ts.map +1 -0
  653. package/dist/obj/chest.js +220 -0
  654. package/dist/obj/chest.js.map +1 -0
  655. package/dist/obj/desc.d.ts +79 -0
  656. package/dist/obj/desc.d.ts.map +1 -0
  657. package/dist/obj/desc.js +602 -0
  658. package/dist/obj/desc.js.map +1 -0
  659. package/dist/obj/effects-info.d.ts +78 -0
  660. package/dist/obj/effects-info.d.ts.map +1 -0
  661. package/dist/obj/effects-info.js +240 -0
  662. package/dist/obj/effects-info.js.map +1 -0
  663. package/dist/obj/flavor.d.ts +68 -0
  664. package/dist/obj/flavor.d.ts.map +1 -0
  665. package/dist/obj/flavor.js +201 -0
  666. package/dist/obj/flavor.js.map +1 -0
  667. package/dist/obj/ignore.d.ts +143 -0
  668. package/dist/obj/ignore.d.ts.map +1 -0
  669. package/dist/obj/ignore.js +345 -0
  670. package/dist/obj/ignore.js.map +1 -0
  671. package/dist/obj/knowledge.d.ts +520 -0
  672. package/dist/obj/knowledge.d.ts.map +1 -0
  673. package/dist/obj/knowledge.js +1364 -0
  674. package/dist/obj/knowledge.js.map +1 -0
  675. package/dist/obj/known-object.d.ts +293 -0
  676. package/dist/obj/known-object.d.ts.map +1 -0
  677. package/dist/obj/known-object.js +532 -0
  678. package/dist/obj/known-object.js.map +1 -0
  679. package/dist/obj/make.d.ts +292 -0
  680. package/dist/obj/make.d.ts.map +1 -0
  681. package/dist/obj/make.js +1055 -0
  682. package/dist/obj/make.js.map +1 -0
  683. package/dist/obj/object-info.d.ts +188 -0
  684. package/dist/obj/object-info.d.ts.map +1 -0
  685. package/dist/obj/object-info.js +1407 -0
  686. package/dist/obj/object-info.js.map +1 -0
  687. package/dist/obj/object.d.ts +335 -0
  688. package/dist/obj/object.d.ts.map +1 -0
  689. package/dist/obj/object.js +1051 -0
  690. package/dist/obj/object.js.map +1 -0
  691. package/dist/obj/power.d.ts +65 -0
  692. package/dist/obj/power.d.ts.map +1 -0
  693. package/dist/obj/power.js +580 -0
  694. package/dist/obj/power.js.map +1 -0
  695. package/dist/obj/randart-build.d.ts +223 -0
  696. package/dist/obj/randart-build.d.ts.map +1 -0
  697. package/dist/obj/randart-build.js +1444 -0
  698. package/dist/obj/randart-build.js.map +1 -0
  699. package/dist/obj/randart-data.d.ts +179 -0
  700. package/dist/obj/randart-data.d.ts.map +1 -0
  701. package/dist/obj/randart-data.js +1153 -0
  702. package/dist/obj/randart-data.js.map +1 -0
  703. package/dist/obj/randart.d.ts +128 -0
  704. package/dist/obj/randart.d.ts.map +1 -0
  705. package/dist/obj/randart.js +458 -0
  706. package/dist/obj/randart.js.map +1 -0
  707. package/dist/obj/randname.d.ts +33 -0
  708. package/dist/obj/randname.d.ts.map +1 -0
  709. package/dist/obj/randname.js +116 -0
  710. package/dist/obj/randname.js.map +1 -0
  711. package/dist/obj/recharge.d.ts +28 -0
  712. package/dist/obj/recharge.d.ts.map +1 -0
  713. package/dist/obj/recharge.js +52 -0
  714. package/dist/obj/recharge.js.map +1 -0
  715. package/dist/obj/types.d.ts +584 -0
  716. package/dist/obj/types.d.ts.map +1 -0
  717. package/dist/obj/types.js +104 -0
  718. package/dist/obj/types.js.map +1 -0
  719. package/dist/obj/value.d.ts +64 -0
  720. package/dist/obj/value.d.ts.map +1 -0
  721. package/dist/obj/value.js +176 -0
  722. package/dist/obj/value.js.map +1 -0
  723. package/dist/player/abilities.d.ts +57 -0
  724. package/dist/player/abilities.d.ts.map +1 -0
  725. package/dist/player/abilities.js +118 -0
  726. package/dist/player/abilities.js.map +1 -0
  727. package/dist/player/best-digger.d.ts +42 -0
  728. package/dist/player/best-digger.d.ts.map +1 -0
  729. package/dist/player/best-digger.js +89 -0
  730. package/dist/player/best-digger.js.map +1 -0
  731. package/dist/player/bind.d.ts +270 -0
  732. package/dist/player/bind.d.ts.map +1 -0
  733. package/dist/player/bind.js +698 -0
  734. package/dist/player/bind.js.map +1 -0
  735. package/dist/player/birth.d.ts +258 -0
  736. package/dist/player/birth.d.ts.map +1 -0
  737. package/dist/player/birth.js +639 -0
  738. package/dist/player/birth.js.map +1 -0
  739. package/dist/player/calcs.d.ts +403 -0
  740. package/dist/player/calcs.d.ts.map +1 -0
  741. package/dist/player/calcs.js +1189 -0
  742. package/dist/player/calcs.js.map +1 -0
  743. package/dist/player/combat-regen.d.ts +14 -0
  744. package/dist/player/combat-regen.d.ts.map +1 -0
  745. package/dist/player/combat-regen.js +29 -0
  746. package/dist/player/combat-regen.js.map +1 -0
  747. package/dist/player/exp.d.ts +96 -0
  748. package/dist/player/exp.d.ts.map +1 -0
  749. package/dist/player/exp.js +229 -0
  750. package/dist/player/exp.js.map +1 -0
  751. package/dist/player/history.d.ts +91 -0
  752. package/dist/player/history.d.ts.map +1 -0
  753. package/dist/player/history.js +145 -0
  754. package/dist/player/history.js.map +1 -0
  755. package/dist/player/options.d.ts +123 -0
  756. package/dist/player/options.d.ts.map +1 -0
  757. package/dist/player/options.js +199 -0
  758. package/dist/player/options.js.map +1 -0
  759. package/dist/player/player.d.ts +242 -0
  760. package/dist/player/player.d.ts.map +1 -0
  761. package/dist/player/player.js +119 -0
  762. package/dist/player/player.js.map +1 -0
  763. package/dist/player/shape-lore.d.ts +56 -0
  764. package/dist/player/shape-lore.d.ts.map +1 -0
  765. package/dist/player/shape-lore.js +221 -0
  766. package/dist/player/shape-lore.js.map +1 -0
  767. package/dist/player/spell.d.ts +146 -0
  768. package/dist/player/spell.d.ts.map +1 -0
  769. package/dist/player/spell.js +519 -0
  770. package/dist/player/spell.js.map +1 -0
  771. package/dist/player/take-hit.d.ts +87 -0
  772. package/dist/player/take-hit.d.ts.map +1 -0
  773. package/dist/player/take-hit.js +99 -0
  774. package/dist/player/take-hit.js.map +1 -0
  775. package/dist/player/timed.d.ts +205 -0
  776. package/dist/player/timed.d.ts.map +1 -0
  777. package/dist/player/timed.js +310 -0
  778. package/dist/player/timed.js.map +1 -0
  779. package/dist/player/types.d.ts +390 -0
  780. package/dist/player/types.d.ts.map +1 -0
  781. package/dist/player/types.js +51 -0
  782. package/dist/player/types.js.map +1 -0
  783. package/dist/rational.d.ts +99 -0
  784. package/dist/rational.d.ts.map +1 -0
  785. package/dist/rational.js +345 -0
  786. package/dist/rational.js.map +1 -0
  787. package/dist/rng.d.ts +168 -0
  788. package/dist/rng.d.ts.map +1 -0
  789. package/dist/rng.js +404 -0
  790. package/dist/rng.js.map +1 -0
  791. package/dist/save/buffer.d.ts +120 -0
  792. package/dist/save/buffer.d.ts.map +1 -0
  793. package/dist/save/buffer.js +238 -0
  794. package/dist/save/buffer.js.map +1 -0
  795. package/dist/save/compress.d.ts +79 -0
  796. package/dist/save/compress.d.ts.map +1 -0
  797. package/dist/save/compress.js +97 -0
  798. package/dist/save/compress.js.map +1 -0
  799. package/dist/save/description.d.ts +61 -0
  800. package/dist/save/description.d.ts.map +1 -0
  801. package/dist/save/description.js +51 -0
  802. package/dist/save/description.js.map +1 -0
  803. package/dist/save/integrity.d.ts +59 -0
  804. package/dist/save/integrity.d.ts.map +1 -0
  805. package/dist/save/integrity.js +103 -0
  806. package/dist/save/integrity.js.map +1 -0
  807. package/dist/score/display.d.ts +40 -0
  808. package/dist/score/display.d.ts.map +1 -0
  809. package/dist/score/display.js +86 -0
  810. package/dist/score/display.js.map +1 -0
  811. package/dist/score/score.d.ts +166 -0
  812. package/dist/score/score.d.ts.map +1 -0
  813. package/dist/score/score.js +244 -0
  814. package/dist/score/score.js.map +1 -0
  815. package/dist/score/types.d.ts +98 -0
  816. package/dist/score/types.d.ts.map +1 -0
  817. package/dist/score/types.js +27 -0
  818. package/dist/score/types.js.map +1 -0
  819. package/dist/session/boot.d.ts +207 -0
  820. package/dist/session/boot.d.ts.map +1 -0
  821. package/dist/session/boot.js +151 -0
  822. package/dist/session/boot.js.map +1 -0
  823. package/dist/session/game.d.ts +257 -0
  824. package/dist/session/game.d.ts.map +1 -0
  825. package/dist/session/game.js +2880 -0
  826. package/dist/session/game.js.map +1 -0
  827. package/dist/session/save.d.ts +847 -0
  828. package/dist/session/save.d.ts.map +1 -0
  829. package/dist/session/save.js +1306 -0
  830. package/dist/session/save.js.map +1 -0
  831. package/dist/sound/engine.d.ts +146 -0
  832. package/dist/sound/engine.d.ts.map +1 -0
  833. package/dist/sound/engine.js +332 -0
  834. package/dist/sound/engine.js.map +1 -0
  835. package/dist/sound/index.d.ts +13 -0
  836. package/dist/sound/index.d.ts.map +1 -0
  837. package/dist/sound/index.js +13 -0
  838. package/dist/sound/index.js.map +1 -0
  839. package/dist/sound/sound-prefs-data.d.ts +10 -0
  840. package/dist/sound/sound-prefs-data.d.ts.map +1 -0
  841. package/dist/sound/sound-prefs-data.js +165 -0
  842. package/dist/sound/sound-prefs-data.js.map +1 -0
  843. package/dist/sound/types.d.ts +64 -0
  844. package/dist/sound/types.d.ts.map +1 -0
  845. package/dist/sound/types.js +23 -0
  846. package/dist/sound/types.js.map +1 -0
  847. package/dist/store/bind.d.ts +43 -0
  848. package/dist/store/bind.d.ts.map +1 -0
  849. package/dist/store/bind.js +130 -0
  850. package/dist/store/bind.js.map +1 -0
  851. package/dist/store/price.d.ts +27 -0
  852. package/dist/store/price.d.ts.map +1 -0
  853. package/dist/store/price.js +81 -0
  854. package/dist/store/price.js.map +1 -0
  855. package/dist/store/store-cmd.d.ts +51 -0
  856. package/dist/store/store-cmd.d.ts.map +1 -0
  857. package/dist/store/store-cmd.js +73 -0
  858. package/dist/store/store-cmd.js.map +1 -0
  859. package/dist/store/store.d.ts +156 -0
  860. package/dist/store/store.d.ts.map +1 -0
  861. package/dist/store/store.js +616 -0
  862. package/dist/store/store.js.map +1 -0
  863. package/dist/store/transact.d.ts +198 -0
  864. package/dist/store/transact.d.ts.map +1 -0
  865. package/dist/store/transact.js +383 -0
  866. package/dist/store/transact.js.map +1 -0
  867. package/dist/store/types.d.ts +101 -0
  868. package/dist/store/types.d.ts.map +1 -0
  869. package/dist/store/types.js +14 -0
  870. package/dist/store/types.js.map +1 -0
  871. package/dist/version.d.ts +25 -0
  872. package/dist/version.d.ts.map +1 -0
  873. package/dist/version.js +25 -0
  874. package/dist/version.js.map +1 -0
  875. package/dist/visuals/engine.d.ts +223 -0
  876. package/dist/visuals/engine.d.ts.map +1 -0
  877. package/dist/visuals/engine.js +357 -0
  878. package/dist/visuals/engine.js.map +1 -0
  879. package/dist/visuals/glyph-table.d.ts +112 -0
  880. package/dist/visuals/glyph-table.d.ts.map +1 -0
  881. package/dist/visuals/glyph-table.js +156 -0
  882. package/dist/visuals/glyph-table.js.map +1 -0
  883. package/dist/visuals/grafmode-data.d.ts +4 -0
  884. package/dist/visuals/grafmode-data.d.ts.map +1 -0
  885. package/dist/visuals/grafmode-data.js +88 -0
  886. package/dist/visuals/grafmode-data.js.map +1 -0
  887. package/dist/visuals/grafmode.d.ts +83 -0
  888. package/dist/visuals/grafmode.d.ts.map +1 -0
  889. package/dist/visuals/grafmode.js +82 -0
  890. package/dist/visuals/grafmode.js.map +1 -0
  891. package/dist/visuals/index.d.ts +19 -0
  892. package/dist/visuals/index.d.ts.map +1 -0
  893. package/dist/visuals/index.js +19 -0
  894. package/dist/visuals/index.js.map +1 -0
  895. package/dist/visuals/map-text.d.ts +79 -0
  896. package/dist/visuals/map-text.d.ts.map +1 -0
  897. package/dist/visuals/map-text.js +122 -0
  898. package/dist/visuals/map-text.js.map +1 -0
  899. package/dist/visuals/pref-expr.d.ts +56 -0
  900. package/dist/visuals/pref-expr.d.ts.map +1 -0
  901. package/dist/visuals/pref-expr.js +173 -0
  902. package/dist/visuals/pref-expr.js.map +1 -0
  903. package/dist/visuals/prefs.d.ts +280 -0
  904. package/dist/visuals/prefs.d.ts.map +1 -0
  905. package/dist/visuals/prefs.js +835 -0
  906. package/dist/visuals/prefs.js.map +1 -0
  907. package/dist/visuals/tile-prefs.d.ts +132 -0
  908. package/dist/visuals/tile-prefs.d.ts.map +1 -0
  909. package/dist/visuals/tile-prefs.js +105 -0
  910. package/dist/visuals/tile-prefs.js.map +1 -0
  911. package/dist/world/chunk.d.ts +195 -0
  912. package/dist/world/chunk.d.ts.map +1 -0
  913. package/dist/world/chunk.js +422 -0
  914. package/dist/world/chunk.js.map +1 -0
  915. package/dist/world/feature.d.ts +86 -0
  916. package/dist/world/feature.d.ts.map +1 -0
  917. package/dist/world/feature.js +153 -0
  918. package/dist/world/feature.js.map +1 -0
  919. package/dist/world/flow.d.ts +33 -0
  920. package/dist/world/flow.d.ts.map +1 -0
  921. package/dist/world/flow.js +115 -0
  922. package/dist/world/flow.js.map +1 -0
  923. package/dist/world/project.d.ts +176 -0
  924. package/dist/world/project.d.ts.map +1 -0
  925. package/dist/world/project.js +543 -0
  926. package/dist/world/project.js.map +1 -0
  927. package/dist/world/projection.d.ts +100 -0
  928. package/dist/world/projection.d.ts.map +1 -0
  929. package/dist/world/projection.js +152 -0
  930. package/dist/world/projection.js.map +1 -0
  931. package/dist/world/scatter.d.ts +25 -0
  932. package/dist/world/scatter.d.ts.map +1 -0
  933. package/dist/world/scatter.js +54 -0
  934. package/dist/world/scatter.js.map +1 -0
  935. package/dist/world/trap.d.ts +84 -0
  936. package/dist/world/trap.d.ts.map +1 -0
  937. package/dist/world/trap.js +106 -0
  938. package/dist/world/trap.js.map +1 -0
  939. package/dist/world/view.d.ts +60 -0
  940. package/dist/world/view.d.ts.map +1 -0
  941. package/dist/world/view.js +436 -0
  942. package/dist/world/view.js.map +1 -0
  943. package/dist/z-queue.d.ts +133 -0
  944. package/dist/z-queue.d.ts.map +1 -0
  945. package/dist/z-queue.js +283 -0
  946. package/dist/z-queue.js.map +1 -0
  947. package/package.json +75 -0
  948. package/src/agent/act.ts +114 -0
  949. package/src/agent/controller.ts +109 -0
  950. package/src/agent/events.ts +47 -0
  951. package/src/agent/index.ts +36 -0
  952. package/src/agent/perceive.ts +440 -0
  953. package/src/agent/types.ts +464 -0
  954. package/src/bitflag.ts +536 -0
  955. package/src/cmd.ts +547 -0
  956. package/src/color.ts +267 -0
  957. package/src/combat/brand-slay.ts +360 -0
  958. package/src/combat/hit.ts +471 -0
  959. package/src/combat/index.ts +15 -0
  960. package/src/combat/melee.ts +728 -0
  961. package/src/combat/mon-melee.ts +1153 -0
  962. package/src/combat/ranged.ts +397 -0
  963. package/src/constants.ts +324 -0
  964. package/src/dice.ts +467 -0
  965. package/src/effects/effect-choice.ts +32 -0
  966. package/src/effects/effect-info.ts +859 -0
  967. package/src/effects/effect.ts +560 -0
  968. package/src/effects/handlers.ts +452 -0
  969. package/src/effects/interpreter.ts +603 -0
  970. package/src/events.ts +317 -0
  971. package/src/expression.ts +360 -0
  972. package/src/game/cave-cmd.ts +1147 -0
  973. package/src/game/char-sheet.ts +557 -0
  974. package/src/game/chest.ts +348 -0
  975. package/src/game/context.ts +1218 -0
  976. package/src/game/curse-tick.ts +130 -0
  977. package/src/game/describe.ts +62 -0
  978. package/src/game/display.ts +838 -0
  979. package/src/game/dump-level.ts +114 -0
  980. package/src/game/effect-attack.ts +746 -0
  981. package/src/game/effect-detect.ts +542 -0
  982. package/src/game/effect-env.ts +252 -0
  983. package/src/game/effect-game-env.ts +86 -0
  984. package/src/game/effect-general.ts +1122 -0
  985. package/src/game/effect-item.ts +999 -0
  986. package/src/game/effect-melee.ts +557 -0
  987. package/src/game/effect-mon-origin.ts +196 -0
  988. package/src/game/effect-monster.ts +310 -0
  989. package/src/game/effect-summon.ts +161 -0
  990. package/src/game/effect-teleport.ts +645 -0
  991. package/src/game/effect-terrain.ts +881 -0
  992. package/src/game/energy.ts +61 -0
  993. package/src/game/equip-cmp.ts +476 -0
  994. package/src/game/floor.ts +524 -0
  995. package/src/game/gear.ts +1352 -0
  996. package/src/game/harness.ts +270 -0
  997. package/src/game/history.ts +78 -0
  998. package/src/game/ignore-cmd.ts +68 -0
  999. package/src/game/inscription-confirm.ts +115 -0
  1000. package/src/game/known.ts +960 -0
  1001. package/src/game/loop.ts +671 -0
  1002. package/src/game/lore-color.ts +108 -0
  1003. package/src/game/mon-cast.ts +409 -0
  1004. package/src/game/mon-cmd.ts +767 -0
  1005. package/src/game/mon-death.ts +459 -0
  1006. package/src/game/mon-group.ts +368 -0
  1007. package/src/game/mon-list.ts +213 -0
  1008. package/src/game/mon-message.ts +359 -0
  1009. package/src/game/mon-place.ts +1012 -0
  1010. package/src/game/mon-ranged.ts +405 -0
  1011. package/src/game/mon-shape.ts +161 -0
  1012. package/src/game/mon-side.ts +511 -0
  1013. package/src/game/monster-turn.ts +1750 -0
  1014. package/src/game/obj-cmd.ts +1970 -0
  1015. package/src/game/obj-list.ts +302 -0
  1016. package/src/game/object-inspect.ts +162 -0
  1017. package/src/game/pickup.ts +483 -0
  1018. package/src/game/player-path.ts +1434 -0
  1019. package/src/game/player-side.ts +555 -0
  1020. package/src/game/player-turn.ts +852 -0
  1021. package/src/game/project-cast.ts +766 -0
  1022. package/src/game/project-feat.ts +386 -0
  1023. package/src/game/project-monster.ts +407 -0
  1024. package/src/game/project-obj.ts +298 -0
  1025. package/src/game/project-player.ts +236 -0
  1026. package/src/game/quest.ts +248 -0
  1027. package/src/game/ranged-cmd.ts +417 -0
  1028. package/src/game/scheduler.ts +150 -0
  1029. package/src/game/spell-cmd.ts +404 -0
  1030. package/src/game/spoil.ts +562 -0
  1031. package/src/game/steal.ts +169 -0
  1032. package/src/game/take-hit-hooks.ts +152 -0
  1033. package/src/game/target-loop.ts +501 -0
  1034. package/src/game/target.ts +424 -0
  1035. package/src/game/thrust.ts +174 -0
  1036. package/src/game/trap.ts +791 -0
  1037. package/src/game/ui-entry.ts +2075 -0
  1038. package/src/game/wizard.ts +1760 -0
  1039. package/src/game/world.ts +786 -0
  1040. package/src/gen/cave.ts +2858 -0
  1041. package/src/gen/gen-monster.ts +592 -0
  1042. package/src/gen/generate.ts +523 -0
  1043. package/src/gen/room.ts +2213 -0
  1044. package/src/gen/util.ts +1958 -0
  1045. package/src/generated/dun-profiles.ts +30 -0
  1046. package/src/generated/effects.ts +241 -0
  1047. package/src/generated/elements.ts +62 -0
  1048. package/src/generated/equip-slots.ts +36 -0
  1049. package/src/generated/history-types.ts +34 -0
  1050. package/src/generated/ignore-types.ts +66 -0
  1051. package/src/generated/index.ts +33 -0
  1052. package/src/generated/kind-flags.ts +44 -0
  1053. package/src/generated/message.ts +320 -0
  1054. package/src/generated/mon-message.ts +138 -0
  1055. package/src/generated/mon-race-flags.ts +182 -0
  1056. package/src/generated/mon-spells.ts +198 -0
  1057. package/src/generated/mon-temp-flags.ts +34 -0
  1058. package/src/generated/mon-timed.ts +34 -0
  1059. package/src/generated/object-flags.ts +95 -0
  1060. package/src/generated/object-modifiers.ts +43 -0
  1061. package/src/generated/options.ts +104 -0
  1062. package/src/generated/origins.ts +64 -0
  1063. package/src/generated/parser-errors.ts +140 -0
  1064. package/src/generated/player-flags.ts +48 -0
  1065. package/src/generated/player-timed.ts +118 -0
  1066. package/src/generated/projections.ts +103 -0
  1067. package/src/generated/randart-properties.ts +202 -0
  1068. package/src/generated/room-flags.ts +21 -0
  1069. package/src/generated/rooms.ts +50 -0
  1070. package/src/generated/square-flags.ts +56 -0
  1071. package/src/generated/stats.ts +22 -0
  1072. package/src/generated/terrain-flags.ts +76 -0
  1073. package/src/generated/terrain.ts +62 -0
  1074. package/src/generated/trap-flags.ts +42 -0
  1075. package/src/generated/tvals.ts +84 -0
  1076. package/src/generated/ui-entry-renderers.ts +24 -0
  1077. package/src/guard.ts +70 -0
  1078. package/src/host/args.ts +334 -0
  1079. package/src/host/bridge.ts +193 -0
  1080. package/src/host/index.ts +18 -0
  1081. package/src/host/io.ts +239 -0
  1082. package/src/host/memory.ts +134 -0
  1083. package/src/host/raw.ts +190 -0
  1084. package/src/index.ts +250 -0
  1085. package/src/loc.ts +157 -0
  1086. package/src/mod/hooks.ts +278 -0
  1087. package/src/mod/ids.ts +390 -0
  1088. package/src/mod/registry-host.ts +258 -0
  1089. package/src/mod/save-blocks.ts +787 -0
  1090. package/src/mod/vocabulary.ts +0 -0
  1091. package/src/mon/bind.ts +899 -0
  1092. package/src/mon/desc.ts +212 -0
  1093. package/src/mon/knowledge-groups.ts +164 -0
  1094. package/src/mon/lore-describe.ts +1414 -0
  1095. package/src/mon/lore.ts +306 -0
  1096. package/src/mon/make.ts +422 -0
  1097. package/src/mon/monster.ts +161 -0
  1098. package/src/mon/predicate.ts +220 -0
  1099. package/src/mon/project-mon.ts +855 -0
  1100. package/src/mon/spell.ts +418 -0
  1101. package/src/mon/steal.ts +246 -0
  1102. package/src/mon/summon.ts +145 -0
  1103. package/src/mon/take-hit.ts +195 -0
  1104. package/src/mon/timed.ts +300 -0
  1105. package/src/mon/types.ts +286 -0
  1106. package/src/msg.ts +146 -0
  1107. package/src/obj/artifact-fake.ts +63 -0
  1108. package/src/obj/artifact-known.ts +69 -0
  1109. package/src/obj/bind.ts +1345 -0
  1110. package/src/obj/chest.ts +249 -0
  1111. package/src/obj/desc.ts +699 -0
  1112. package/src/obj/effects-info.ts +349 -0
  1113. package/src/obj/flavor.ts +256 -0
  1114. package/src/obj/ignore.ts +387 -0
  1115. package/src/obj/knowledge.ts +1577 -0
  1116. package/src/obj/known-object.ts +718 -0
  1117. package/src/obj/make.ts +1367 -0
  1118. package/src/obj/object-info.ts +1737 -0
  1119. package/src/obj/object.ts +1296 -0
  1120. package/src/obj/power.ts +674 -0
  1121. package/src/obj/randart-build.ts +1705 -0
  1122. package/src/obj/randart-data.ts +1344 -0
  1123. package/src/obj/randart.ts +552 -0
  1124. package/src/obj/randname.ts +128 -0
  1125. package/src/obj/recharge.ts +62 -0
  1126. package/src/obj/types.ts +559 -0
  1127. package/src/obj/value.ts +215 -0
  1128. package/src/player/abilities.ts +142 -0
  1129. package/src/player/best-digger.ts +118 -0
  1130. package/src/player/bind.ts +1021 -0
  1131. package/src/player/birth.ts +794 -0
  1132. package/src/player/calcs.ts +1522 -0
  1133. package/src/player/combat-regen.ts +33 -0
  1134. package/src/player/exp.ts +275 -0
  1135. package/src/player/history.ts +211 -0
  1136. package/src/player/options.ts +244 -0
  1137. package/src/player/player.ts +356 -0
  1138. package/src/player/shape-lore.ts +250 -0
  1139. package/src/player/spell.ts +627 -0
  1140. package/src/player/take-hit.ts +173 -0
  1141. package/src/player/timed.ts +482 -0
  1142. package/src/player/types.ts +415 -0
  1143. package/src/rational.ts +388 -0
  1144. package/src/rng.ts +476 -0
  1145. package/src/save/buffer.ts +287 -0
  1146. package/src/save/compress.ts +132 -0
  1147. package/src/save/description.ts +70 -0
  1148. package/src/save/integrity.ts +133 -0
  1149. package/src/score/display.ts +125 -0
  1150. package/src/score/score.ts +341 -0
  1151. package/src/score/types.ts +104 -0
  1152. package/src/session/boot.ts +338 -0
  1153. package/src/session/game.ts +3712 -0
  1154. package/src/session/save.ts +2074 -0
  1155. package/src/sound/engine.ts +375 -0
  1156. package/src/sound/index.ts +13 -0
  1157. package/src/sound/sound-prefs-data.ts +173 -0
  1158. package/src/sound/types.ts +68 -0
  1159. package/src/store/bind.ts +145 -0
  1160. package/src/store/price.ts +97 -0
  1161. package/src/store/store-cmd.ts +73 -0
  1162. package/src/store/store.ts +723 -0
  1163. package/src/store/transact.ts +644 -0
  1164. package/src/store/types.ts +110 -0
  1165. package/src/version.ts +26 -0
  1166. package/src/visuals/engine.ts +444 -0
  1167. package/src/visuals/glyph-table.ts +191 -0
  1168. package/src/visuals/grafmode-data.ts +90 -0
  1169. package/src/visuals/grafmode.ts +123 -0
  1170. package/src/visuals/index.ts +19 -0
  1171. package/src/visuals/map-text.ts +152 -0
  1172. package/src/visuals/pref-expr.ts +182 -0
  1173. package/src/visuals/prefs.ts +981 -0
  1174. package/src/visuals/tile-prefs.ts +183 -0
  1175. package/src/world/chunk.ts +531 -0
  1176. package/src/world/feature.ts +215 -0
  1177. package/src/world/flow.ts +128 -0
  1178. package/src/world/project.ts +687 -0
  1179. package/src/world/projection.ts +228 -0
  1180. package/src/world/scatter.ts +72 -0
  1181. package/src/world/trap.ts +155 -0
  1182. package/src/world/view.ts +513 -0
  1183. package/src/z-queue.ts +300 -0
@@ -0,0 +1,970 @@
1
+ /**
2
+ * The mutable game state the turn loop operates on, plus the square-occupancy
3
+ * helpers the AI and player turn read.
4
+ *
5
+ * struct player upstream carries grid/energy/speed/total_energy; the port's
6
+ * Player (player/player.ts) deliberately omits the world/UI-only members, so
7
+ * this module holds them in a PlayerActor wrapper alongside the Player. Live
8
+ * monsters live in a flat array indexed by midx (index 0 unused, matching
9
+ * cave_monster(cave, i) for i >= 1); Chunk.mon(grid) stores the occupant
10
+ * (0 empty, > 0 a monster's midx, < 0 the player) exactly as upstream's
11
+ * square(c, grid)->mon.
12
+ *
13
+ * The loop couples to the outside world only through injected hooks: a
14
+ * command provider (so it never blocks on real input) and an FOV-update hook
15
+ * (called after the player moves, as game code calls update_view).
16
+ */
17
+ import type { GameEvents } from "../events.js";
18
+ import type { MessageLog, MessageType } from "../msg.js";
19
+ import type { Loc } from "../loc.js";
20
+ import type { Connector } from "../gen/util.js";
21
+ import type { Rng } from "../rng.js";
22
+ import type { Chunk } from "../world/chunk.js";
23
+ import type { Player } from "../player/player.js";
24
+ import type { Monster } from "../mon/monster.js";
25
+ import type { MeleeAttack, PlayerCombatState } from "../combat/melee.js";
26
+ import type { DefenderState } from "../combat/mon-melee.js";
27
+ import type { GameObject } from "../obj/object.js";
28
+ import type { Effect } from "../effects/effect.js";
29
+ import type { Brand, Slay } from "../obj/types.js";
30
+ import type { FlavorAwareDeps, FlavorKnowledge } from "../obj/knowledge.js";
31
+ import type { Gear } from "./gear.js";
32
+ import type { Store } from "../store/store.js";
33
+ /**
34
+ * z_info fields the turn loop and monster AI read (defaults are the shipped
35
+ * constants.txt values). Kept as a plain record so tests can override any
36
+ * single field.
37
+ */
38
+ export interface GameConstants {
39
+ /** z_info->move_energy. */
40
+ moveEnergy: number;
41
+ /** z_info->max_sight (flee_range = max_sight + flee-range). */
42
+ maxSight: number;
43
+ /** z_info->max_range (the projectable / targeting range bound). */
44
+ maxRange: number;
45
+ /** z_info->flee_range. */
46
+ fleeRange: number;
47
+ /** z_info->turn_range (nearby monsters won't run away). */
48
+ turnRange: number;
49
+ /** z_info->repro_monster_max (mon-gen:repro-max): breeder cap per level. */
50
+ reproMonsterMax: number;
51
+ /** z_info->repro_monster_rate (mon-play:mult-rate): 1/(k*rate) breed chance. */
52
+ reproMonsterRate: number;
53
+ /** z_info->glyph_hardness (mon-play:break-glyph): monster glyph-break roll. */
54
+ glyphHardness: number;
55
+ /** z_info->day_length (is_daytime; the town day/night cycle). */
56
+ dayLength: number;
57
+ /** z_info->food_value. */
58
+ foodValue: number;
59
+ /** PY_FOOD_STARVE / _FAINT / _WEAK / _HUNGRY (food_value-scaled grade maxima). */
60
+ foodStarve: number;
61
+ foodFaint: number;
62
+ foodWeak: number;
63
+ /** PY_FOOD_HUNGRY (Hungry grade max, food_value-scaled): fast-metabolism cutoff. */
64
+ foodHungry: number;
65
+ /** z_info->alloc_monster_chance (mon-gen:chance): 1/N ambient spawn chance. */
66
+ allocMonsterChance: number;
67
+ /** z_info->store_turns (store:turns): dungeon turns per store day. */
68
+ storeTurns: number;
69
+ /** z_info->life_drain_percent (mon-play:life-drain): exp-drain scaling. */
70
+ lifeDrainPercent: number;
71
+ /** z_info->level_monster_max (level-max:monsters): monster-list capacity. */
72
+ levelMonsterMax: number;
73
+ /** z_info->floor_size (obj:floor-size): max objects in one floor pile. */
74
+ floorSize: number;
75
+ /** z_info->max_depth (world:max-depth): the trapdoor legality bound. */
76
+ maxDepth: number;
77
+ /** z_info->stair_skip (world:stair-skip): deep-descent increment scale. */
78
+ stairSkip: number;
79
+ }
80
+ /** The shipped constants.txt values, food thresholds scaled by food_value. */
81
+ export declare const DEFAULT_GAME_CONSTANTS: GameConstants;
82
+ /**
83
+ * The player's world/turn-loop state (the struct player members the port's
84
+ * Player omits), plus the combat/defence views combat needs. `combat` backs
85
+ * py_attack (player-attack.c p->state) and `defense` backs make_attack_normal
86
+ * (p->state.ac + p->state.to_a); calc_bonuses that would derive them is
87
+ * deferred (player/calcs.ts), so they are supplied explicitly.
88
+ */
89
+ export interface PlayerActor {
90
+ player: Player;
91
+ /** p->grid. */
92
+ grid: Loc;
93
+ /** p->energy. */
94
+ energy: number;
95
+ /** p->state.speed (net speed after effects; 110 = normal). */
96
+ speed: number;
97
+ /** p->total_energy (cumulative energy spent). */
98
+ totalEnergy: number;
99
+ /** player-attack.c reads this as p->state. */
100
+ combat: PlayerCombatState;
101
+ /** make_attack_normal reads ac + to_a from this. */
102
+ defense: DefenderState;
103
+ /** The wielded melee weapon, or null for unarmed (py_attack). */
104
+ weapon: GameObject | null;
105
+ /** p->state.skills[SKILL_STEALTH]; the AI's hearing math reads it. */
106
+ stealth: number;
107
+ /** p->state.cur_light (calc_light): the derived light radius. */
108
+ light: number;
109
+ /** state.pflags PF_UNLIGHT: the derived unlight status. */
110
+ unlight: boolean;
111
+ }
112
+ /**
113
+ * struct monster_group (mon-group.c): a pack of monsters sharing a leader.
114
+ * `members` is the member midx list; its head is the most recently added
115
+ * member, mirroring upstream's member_list (add prepends).
116
+ */
117
+ export interface MonsterGroup {
118
+ /** The group's index in state.groups. */
119
+ index: number;
120
+ /** midx of the group leader (0 = none). */
121
+ leader: number;
122
+ /** Member midx list, head-first (most recently added). */
123
+ members: number[];
124
+ }
125
+ /**
126
+ * A dungeon level frozen under birth_levels_persist (#30): the exact per-level
127
+ * field-set changeLevel shuffles, plus the game turn it was frozen at. This is
128
+ * the serializable, depth-keyed generalization of session/game.ts' in-memory
129
+ * arena stash (upstream's cave_store into the chunk_list, generate.c L1017).
130
+ * `turn` is the freeze turn (cave_store stamps chunk->turn, generate.c L1032),
131
+ * read by restore_monsters (mon-move.c L2007) to recover the monsters over the
132
+ * turns elapsed while the level was out of play.
133
+ */
134
+ export interface StoredLevel {
135
+ chunk: Chunk;
136
+ monsters: Array<Monster | null>;
137
+ groups: Array<MonsterGroup | null>;
138
+ floor: Map<number, GameObject[]>;
139
+ traps: Map<number, import("./trap.js").Trap[]>;
140
+ known: import("./known.js").KnownMap;
141
+ decoy: Loc | null;
142
+ turn: number;
143
+ /**
144
+ * chunk->join (generate.c L1203-1214): the level's stair connectors, so a
145
+ * re-entered / adjacent persistent level can align up/down stairs via
146
+ * getJoinInfo. Empty when the level recorded no stairs (or for old saves).
147
+ */
148
+ join: Connector[];
149
+ }
150
+ /**
151
+ * The full mutable game state. `turn` is the upstream int32 game-turn counter;
152
+ * `monsters` is indexed by midx with index 0 unused. Signals mirror the
153
+ * upstream player->upkeep flags the loop branches on.
154
+ */
155
+ export interface GameState {
156
+ rng: Rng;
157
+ chunk: Chunk;
158
+ actor: PlayerActor;
159
+ /**
160
+ * The player's gear store (obj-gear.c): a handle -> object map, the pack
161
+ * (non-equipped handles) and the equipment[] handles on actor.player.
162
+ * Populated at birth by outfitPlayer (game/gear.ts).
163
+ */
164
+ gear: Gear;
165
+ /** cave_monster(cave, i): live monsters, index 0 unused (null). */
166
+ monsters: Array<Monster | null>;
167
+ /** cave->monster_groups[]: monster packs, index 0 unused (null). */
168
+ groups: Array<MonsterGroup | null>;
169
+ /**
170
+ * Floor object piles (square(c, grid)->obj), keyed by grid index
171
+ * (y * width + x). Each pile is head-first: pile_insert prepends, so
172
+ * pile[0] is the newest drop, exactly as the upstream linked list.
173
+ * Managed by game/floor.ts (floor_carry / drop_near / excise).
174
+ */
175
+ floor: Map<number, GameObject[]>;
176
+ /**
177
+ * Live traps (square(c, grid)->trap), keyed by grid index, newest
178
+ * first. Managed by game/trap.ts (place_trap / hit_trap / locks).
179
+ * The type import is erased, so no runtime cycle with game/trap.
180
+ */
181
+ traps: Map<number, import("./trap.js").Trap[]>;
182
+ /**
183
+ * The player's map knowledge (the upstream player->cave twin, reduced):
184
+ * remembered terrain and floor objects, possibly stale. Managed by
185
+ * game/known.ts (square_memorize / note_spot / detection).
186
+ */
187
+ known: import("./known.js").KnownMap;
188
+ /**
189
+ * The player's target (target.c's file-statics). Managed by
190
+ * game/target.ts (target_set_monster / target_okay / fix / release).
191
+ */
192
+ target: import("./target.js").TargetState;
193
+ /**
194
+ * The player's ignore settings (obj-ignore.c's file-statics: quality tiers,
195
+ * ego ignore, per-kind flags). Defaults to nothing ignored. Persists in the
196
+ * save. Read through state.isIgnored (built by the session with flavor
197
+ * awareness), so worldless code stays decoupled from flavor knowledge.
198
+ */
199
+ ignore: import("../obj/ignore.js").IgnoreSettings;
200
+ /**
201
+ * The per-kind autoinscription registry (obj-ignore.c note_aware/note_unaware,
202
+ * obj/knowledge.ts AutoinscriptionRegistry). Notes registered through the
203
+ * knowledge-menu manager are applied by game/obj-cmd.ts's applyAutoinscription
204
+ * (wired via ObjCmdDeps.autoNote in session/game.ts) and persist in the save.
205
+ * Optional so the worldless harness (game/harness.ts) stays total: absent,
206
+ * autoinscribe is a no-op.
207
+ */
208
+ autoinscribe?: import("../obj/knowledge.js").AutoinscriptionRegistry;
209
+ /**
210
+ * The per-RUNE autoinscription registry (rune_list[i].note, obj-knowledge.c
211
+ * rune_note / rune_set_note). Separate from `autoinscribe`: upstream
212
+ * apply_autoinscription applies BOTH (runes_autoinscribe first,
213
+ * obj-ignore.c:259). Persists in the save (wr_ignore, save.c:586-605).
214
+ * Optional so the worldless harness stays total.
215
+ */
216
+ runeNotes?: import("../obj/knowledge.js").RuneNoteRegistry;
217
+ /**
218
+ * apply_autoinscription (obj-ignore.c:242) as a seam, for the call sites that
219
+ * have no ObjCmdDeps to hand: inven_carry (obj-gear.c:868, every pickup) and
220
+ * store selling (store.c:1977). Wired by the session; absent in the worldless
221
+ * harness, where autoinscription is a no-op.
222
+ */
223
+ autoinscribeObject?: (obj: GameObject) => void;
224
+ /**
225
+ * autoinscribe_ground + autoinscribe_pack, the pair
226
+ * update_player_object_knowledge tail-calls (obj-knowledge.c:1245-1247).
227
+ * Wired by the session; absent in the worldless harness.
228
+ */
229
+ autoinscribeAll?: () => void;
230
+ /**
231
+ * The bound player classes (players.classes), stashed by wireGame so the
232
+ * bookseller's town-book always-line expansion (object_kind_to_book,
233
+ * store.c:208-231) can resolve which spellbooks are town (non-dungeon) books.
234
+ * Absent in the worldless harness; the expansion then no-ops.
235
+ */
236
+ classes?: readonly import("../player/types.js").PlayerClass[];
237
+ /**
238
+ * ignore_item_ok(obj): whether an object is currently ignored. Installed by
239
+ * the session (wireGame) with the flavor-awareness lookup baked in; absent,
240
+ * nothing is ignored.
241
+ */
242
+ isIgnored?: (obj: GameObject) => boolean;
243
+ /**
244
+ * player->upkeep->notice's PN_IGNORE bit: object_flavor_aware's ignore fix
245
+ * (obj-knowledge.c L2279) raises this when a newly-aware kind carries its
246
+ * ignore-when-aware bit over, requesting an ignore_drop() re-check of the
247
+ * pack. Set by FlavorAwareDeps.requestIgnoreNotice (obj/knowledge.ts) at
248
+ * the in-play becomes-aware sites (store/transact.ts, game/obj-cmd.ts).
249
+ * Consuming/clearing this (running ignore_drop, #25 UI) is a shell concern
250
+ * and is not wired yet - ledgered like the rest of the ignore-drop UI.
251
+ */
252
+ noticeIgnore?: boolean;
253
+ /**
254
+ * object_flavor_is_aware(kind): whether the player has identified this
255
+ * kind's flavour. Installed by the session (wireGame) from flavor
256
+ * knowledge, so presentation code (obj-list.c, #25) stays decoupled from
257
+ * the flavor store the same way isIgnored does; absent, treated as aware.
258
+ */
259
+ isAware?: (kind: import("../obj/types.js").ObjectKind) => boolean;
260
+ /**
261
+ * obj->kind->flavor != NULL: whether flavor_init assigned this kind a
262
+ * flavour. Installed by the session (wireGame) from the per-game
263
+ * FlavorAssignment; absent, presentation falls back to the tval-only test.
264
+ */
265
+ hasFlavor?: (kind: import("../obj/types.js").ObjectKind) => boolean;
266
+ /**
267
+ * obj->kind->flavor->text: the flavour adjective ("Smoky") or scroll title
268
+ * shown for an unaware flavoured object. Installed by wireGame from the
269
+ * FlavorAssignment; absent, no '#' modstr is produced.
270
+ */
271
+ flavorText?: (kind: import("../obj/types.js").ObjectKind) => string;
272
+ /**
273
+ * object_kind_attr / object_kind_char (ui-object.c:97-112): the assigned
274
+ * flavour's display glyph (d_char) and colour NAME (d_attr) for a flavoured
275
+ * kind, so the map renders an unidentified potion/etc. in its flavour colour
276
+ * (use_flavor_glyph) rather than the kind's black placeholder. Installed by
277
+ * wireGame from the FlavorAssignment; absent, the base kind glyph is used.
278
+ */
279
+ flavorGlyph?: (kind: import("../obj/types.js").ObjectKind) => import("../obj/flavor.js").AssignedFlavor | undefined;
280
+ /**
281
+ * The player option store (option.c op_ptr->opt / hitpoint_warn). Built by
282
+ * the session (startGame / loadGame) from OPTION_ENTRIES defaults and the
283
+ * birth-option choices; persists in the save. Optional so worldless tests
284
+ * (game/harness.ts) stay total - each deferred seam reads it as
285
+ * `dep ?? state.options?.get(name) ?? <shipped default>`, so an absent store
286
+ * reproduces the shipped defaults exactly.
287
+ */
288
+ options?: import("../player/options.js").OptionState;
289
+ /**
290
+ * aup_info[] (obj-make.c): the shared per-artifact created flags. The
291
+ * session owns the single per-game instance and threads it into every
292
+ * MakeDeps so no artifact spawns twice; it is serialized in the save.
293
+ * Optional so the worldless harness (game/harness.ts) stays total.
294
+ */
295
+ artifacts?: import("../obj/make.js").ArtifactState;
296
+ /**
297
+ * kind->everseen / ego->everseen (object_kind/ego_item; save.c L397/L533):
298
+ * the per-game "ever seen" flags for object kinds and egos, marked the first
299
+ * time the player sees an item whose name they know (obj-desc.c L633-637) and
300
+ * for each bought start item (player-birth.c L658). Read by the object/ego
301
+ * knowledge browsers; installed by wireGame; serialized in the save. Optional
302
+ * so the worldless harness stays total (absent = nothing ever seen).
303
+ */
304
+ everseen?: import("../obj/knowledge.js").EverseenKnowledge;
305
+ /**
306
+ * The per-game flavor-awareness store (FlavorKnowledge). Installed by wireGame
307
+ * so the game-layer knowledge sweep (game/known.ts updatePlayerObjectKnowledge,
308
+ * the port of update_player_object_knowledge) can flip a kind aware when a
309
+ * rune-learn completes a carried jewel's non-curse runes. Absent in the
310
+ * worldless harness, where the sweep is a no-op (no flavor store to mutate).
311
+ */
312
+ flavorKnown?: FlavorKnowledge;
313
+ /**
314
+ * The in-play FlavorAwareDeps object_flavor_aware needs (the ignore-fix
315
+ * side-channel). Installed by wireGame alongside flavorKnown; absent, the
316
+ * sweep passes the no-op deps.
317
+ */
318
+ flavorAwareDeps?: FlavorAwareDeps;
319
+ /**
320
+ * The live derived player state (upstream p->state), the result of the last
321
+ * calc_bonuses. update_mon (game/known.ts) reads its OF flag set (telepathy /
322
+ * see-invisible) and see_infra to compute monster visibility. Reassigned by
323
+ * the session on every refreshDerived (equip / level / timed change); absent
324
+ * in the worldless harness, where update_mon falls back to the bare race
325
+ * infravision and an empty flag set.
326
+ */
327
+ playerState?: import("../player/calcs.js").PlayerState;
328
+ /**
329
+ * player->upkeep->health_who (health_track reduced to the tracked
330
+ * monster; the health-bar redraw rides presentation, #25).
331
+ */
332
+ healthWho?: Monster | null;
333
+ /**
334
+ * Monster memory (upstream l_list), keyed by race.ridx and created
335
+ * lazily by getLore (mon/lore.ts). Persists across levels and in the
336
+ * save.
337
+ */
338
+ lore: import("../mon/lore.js").LoreStore;
339
+ /** turn (game-world.c): the game-turn counter. */
340
+ turn: number;
341
+ /**
342
+ * cave->num_repro (cave.h): the count of RF_MULTIPLY breeders on the current
343
+ * level, the denominator gate of monster_turn_multiply's cap. Reset and
344
+ * recounted by countMonsterRaces on level load, bumped by placeMonsterLive
345
+ * and dropped by deleteMonster. Absent is treated as 0.
346
+ */
347
+ numRepro?: number;
348
+ /**
349
+ * daycount (game-world.c): the number of store turnovers accrued while in
350
+ * the dungeon; the town stores restock this many days on return. Persists in
351
+ * the save. Absent is treated as 0.
352
+ */
353
+ daycount?: number;
354
+ /**
355
+ * player->resting_turn (player.h:554, u32; save.c:507): the cumulative count
356
+ * of player turns spent resting, shown on the character sheet (ui-player.c:836)
357
+ * and reset only at birth (player-birth.c:449). DISTINCT from resting.turnsRested
358
+ * (the per-session file-static player_turns_rested that gates the x2 regen):
359
+ * resting_turn accumulates for the character's whole life. Bumped once per rested
360
+ * turn (player-util.c:1487). Persists in the save; absent is treated as 0.
361
+ * The live producer (the rest command) lives outside this module - see the
362
+ * WIRING-NEEDED note in session/save.ts.
363
+ */
364
+ restingTurn?: number;
365
+ /**
366
+ * player->skip_cmd_coercion (player.h:560, u8; save.c:490): the bloodlust
367
+ * command-coercion skip state (0/1/2) - set when a bloodlust-forced command was
368
+ * cancelled so the next command is not re-coerced (cmd-core.c:367-385) and
369
+ * decremented by the world clock (game-world.c:856-901). Persists in the save;
370
+ * absent is treated as 0. Live producer is outside this module (WIRING-NEEDED).
371
+ */
372
+ skipCmdCoercion?: number;
373
+ /**
374
+ * player->unignoring (player.h:558, u8; save.c:491): the temporary "show
375
+ * ignored items" toggle (ui-object.c:1841; consulted by obj-ignore.c:624-640
376
+ * and the status line ui-display.c:1282). Persists in the save; absent is
377
+ * treated as 0 (ignoring active). Live producer is outside this module
378
+ * (the UI toggle - WIRING-NEEDED).
379
+ */
380
+ unignoring?: number;
381
+ /**
382
+ * player->opts.name_suffix (option.h:68, u8; save.c:432): the numeric suffix
383
+ * appended to the character name for the high-score table when names collide.
384
+ * Set at birth. Persists in the save; absent is treated as 0. Live producer is
385
+ * outside this module (the birth/score path - WIRING-NEEDED).
386
+ */
387
+ nameSuffix?: number;
388
+ /**
389
+ * The rolling message log (message.c file-statics; msg.ts MessageLog),
390
+ * persisted in the savefile (wr_messages/rd_messages, save.c:339-353 /
391
+ * load.c:471-495). Upstream is a global; the port holds the live instance
392
+ * here so it can be serialized. Absent in the worldless harness and in saves
393
+ * written before message persistence, which load with an empty log. The live
394
+ * append path (routing msg()/msgt() into this log) lives outside this module
395
+ * (session wiring - WIRING-NEEDED).
396
+ */
397
+ messages?: MessageLog;
398
+ z: GameConstants;
399
+ /** Object domain tables for player melee brands/slays (index 0 = none). */
400
+ brands: readonly (Brand | null)[];
401
+ slays: readonly (Slay | null)[];
402
+ /**
403
+ * Rune-learning environment (obj-knowledge.c learn-by-use): registry
404
+ * tables plus equipment access. Built by the session (wireGame); the
405
+ * harness supplies an inert default so worldless tests stay total.
406
+ */
407
+ runeEnv: import("../obj/knowledge.js").RuneEnv;
408
+ /**
409
+ * player->wizard (player.h): the session wizard-mode flag. Client/runtime
410
+ * toggle (not saved as such); the web shell sets it from ^W. Gates the
411
+ * cheat-death escape together with OPT(cheat_live). Absent = false.
412
+ */
413
+ wizard?: boolean;
414
+ /**
415
+ * A fatal wizard/cheat_live blow that is waiting for the shell's in-terminal
416
+ * get_check("Die? ") answer. The callback resumes the same live death chain;
417
+ * it is deliberately runtime-only and is not part of save data.
418
+ */
419
+ pendingDeath?: {
420
+ killer: string;
421
+ resolve: (die: boolean) => void;
422
+ } | undefined;
423
+ playing: boolean;
424
+ /** player->is_dead. */
425
+ isDead: boolean;
426
+ /** player->upkeep->generate_level (a stairs/recall level change). */
427
+ generateLevel: boolean;
428
+ /**
429
+ * The depth the pending level change targets (dungeon_change_level's
430
+ * argument). Set with generateLevel by stairs / trapdoors / deep
431
+ * descent; consumed by the session's changeLevel.
432
+ */
433
+ targetDepth?: number;
434
+ /**
435
+ * choose_profile's NOSCORE_JUMPING request (generate.c L824-836): the answer
436
+ * to the wizard jump command's "Profile name (eg classic): ". The NEXT
437
+ * generation consumes it - the session clears it as it passes it on, matching
438
+ * the C's one-shot `p->noscore &= ~(NOSCORE_JUMPING)`. An unknown name falls
439
+ * through to the ordinary depth-based selection.
440
+ */
441
+ jumpProfileName?: string | undefined;
442
+ /**
443
+ * player->upkeep->create_up_stair / create_down_stair (cmd-cave.c:90-91,
444
+ * 137-138): the arrival staircase the NEXT generated level must lay under the
445
+ * player, so a down-stair lands you on an up-stair and vice versa
446
+ * (birth_connect_stairs). Set only by the stair commands - "up" mirrors
447
+ * create_up_stair (set on descent), "down" mirrors create_down_stair (set on
448
+ * ascent). new_player_spot lays it and player_place clears it; recall/arena
449
+ * level changes leave it unset (no arrival stair), exactly as upstream.
450
+ */
451
+ arrivalStair?: "up" | "down" | null;
452
+ /**
453
+ * player->upkeep->arena_level: the player is in (or headed to) single
454
+ * combat. Set by EF_SINGLE_COMBAT; cleared by the arena exit.
455
+ */
456
+ arenaLevel?: boolean;
457
+ /** player->old_grid: where to stand again after the arena. */
458
+ oldGrid?: Loc;
459
+ /**
460
+ * The running engine's live state (player-path.c). Created lazily by the
461
+ * run action (game/player-path.ts); absent until the player first runs.
462
+ */
463
+ run?: RunState;
464
+ /**
465
+ * player->upkeep->resting + the file-static player_turns_rested
466
+ * (player-util.c:1417,1472). count mirrors upkeep->resting (>0 = timed turns
467
+ * left, or a REST_ special: COMPLETE=-2, ALL_POINTS=-1, SOME_POINTS=-3);
468
+ * turnsRested gates the x2 regen. Set/tracked by the web rest command
469
+ * (packages/web main.ts driveRest); absent when not resting.
470
+ */
471
+ resting?: {
472
+ count: number;
473
+ turnsRested: number;
474
+ };
475
+ /**
476
+ * cmdq: the internal command queue (cmd-core.c). Self-continuing commands
477
+ * (running re-queues CMD_RUN) push here; processPlayer drains it before
478
+ * nextCommand so a run advances without new input. disturb() flushes it.
479
+ */
480
+ cmdQueue?: PlayerCommand[];
481
+ /** cmdq_pop: the next queued player command, or null when input is needed. */
482
+ nextCommand: () => PlayerCommand | null;
483
+ /**
484
+ * check_for_player_interrupt's keyboard poll (ui-game.c:645), hosted. Called
485
+ * from the loop at upstream's EVENT_CHECK_INTERRUPT site while a run, a
486
+ * repeated command or a rest is driving the game - see
487
+ * checkForPlayerInterrupt in game/loop.ts for the contract and why "pause"
488
+ * exists. Absent: the loop never stops for input, as before.
489
+ */
490
+ checkInterrupt?: () => InterruptResponse;
491
+ /** update_view: refresh player FOV after the player moves. */
492
+ updateFov?: (state: GameState) => void;
493
+ /** Renderer-neutral EF_SELECT chooser; the host owns the menu renderer. */
494
+ effectChooser?: (first: Effect | null, count: number) => number;
495
+ /**
496
+ * make_ranged_attack: a monster attempts a spell / breath on its turn,
497
+ * returning true if it spent the turn casting. Installed by
498
+ * installMonsterCasting (game/mon-ranged.ts); absent, monsters never cast.
499
+ */
500
+ monsterCast?: (mon: Monster, state: GameState) => boolean;
501
+ /**
502
+ * multiply_monster (mon-make.c L983): a breeder tries to spawn a copy in an
503
+ * adjacent empty grid, returning true on success. Installed by wireGame
504
+ * (session/game.ts) from game/mon-place.ts multiplyMonster; absent, breeders
505
+ * never actually reproduce (monster_turn_multiply still draws its cap /
506
+ * chance rolls, so the RNG stream is unchanged when it is wired).
507
+ */
508
+ monsterMultiply?: (mon: Monster) => boolean;
509
+ /**
510
+ * square_door_power (cave-square.c): the lock strength on a closed door
511
+ * (0 = unlocked). Door locks are the "door lock" trap (#21), so this seams
512
+ * back the trap system; installed by wireGame. Absent, every door reads as
513
+ * unlocked - the RNG-free path monster_turn_can_move already takes when no
514
+ * trap system is live.
515
+ */
516
+ doorLockPower?: (grid: Loc) => number;
517
+ /** square_set_door_lock: set a closed door's lock strength (trap #21 seam). */
518
+ setDoorLock?: (grid: Loc, power: number) => void;
519
+ /**
520
+ * player_best_digger (player-util.c L744) + the do_cmd_tunnel_aux /
521
+ * compute_rubble_penalty swap: the DIGGING skill the dig should use, having
522
+ * temporarily wielded the pack's best digger and recomputed calc_bonuses.
523
+ * Installed by wireGame (it closes over the live calc_bonuses options).
524
+ * RNG-free (input only). Absent (worldless harnesses), digging falls back to
525
+ * the wielded state's DIGGING skill, as before.
526
+ */
527
+ bestDiggerDigging?: () => number;
528
+ /**
529
+ * square_open_door / square_smash_door remove the "door lock" trap before
530
+ * changing the feature; this seams that removal back to the trap system.
531
+ * Absent, the (harmless, feature-gated) lock trap is simply left in place.
532
+ */
533
+ removeDoorLock?: (grid: Loc) => void;
534
+ /**
535
+ * make_attack_normal's blow-effect environment (game/mon-side.ts): binds a
536
+ * MonBlowEnv to an attacking monster so combat/mon-melee.ts applies the full
537
+ * status / stat / theft / terrain consequences of a melee blow in upstream
538
+ * RNG order. Installed by wireGame; absent, monster melee falls back to the
539
+ * worldless stub-log intents (the physical HP slice only).
540
+ */
541
+ monBlowEnv?: (mon: Monster) => import("../combat/mon-melee.js").MonBlowEnv;
542
+ /**
543
+ * do_cmd_mon_command: while TMD_COMMAND runs, player commands drive the
544
+ * commanded monster instead (upstream swaps the command list,
545
+ * cmd-core.c L333). Installed by installMonCommand (game/mon-cmd.ts);
546
+ * returns the energy spent.
547
+ */
548
+ monCommand?: (state: GameState, cmd: PlayerCommand) => number;
549
+ /**
550
+ * do_autopickup after a step: returns the energy the pickup cost (picked
551
+ * * move_energy / 10, capped). Installed by installPickup (game/pickup.ts);
552
+ * upstream queues CMD_AUTOPICKUP instead - the port folds the identical
553
+ * cost into the step because the command provider is injected.
554
+ */
555
+ autoPickup?: (state: GameState) => number;
556
+ /**
557
+ * Runs after the player steps onto a new grid (move_player's trap /
558
+ * terrain consequences). Installed by installTraps (game/trap.ts).
559
+ */
560
+ onPlayerMoved?: (state: GameState, grid: Loc) => void;
561
+ /**
562
+ * player_leaving (mon-util.c:503-515): fires when the player leaves a grid
563
+ * (delayed traps, decoy range). Installed by installTraps; called from
564
+ * movePlayer so every monster_swap path matches C.
565
+ */
566
+ onPlayerLeaving?: (state: GameState, oldGrid: Loc, newGrid: Loc) => void;
567
+ /**
568
+ * Terrain-only town layout (chunk_write "Town", gen-chunk.c:46 / generate.c
569
+ * L1371-1373). Stored when leaving depth 0 without birth_levels_persist so
570
+ * town_gen can reload the same shops/stairs. Cleared when consumed on re-entry.
571
+ */
572
+ townChunk?: import("../world/chunk.js").Chunk | null;
573
+ /**
574
+ * The walk-into-a-wall seam: consulted by walkAction (game/player-turn.ts)
575
+ * when a walk is blocked, BEFORE the faithful no-energy bump.
576
+ *
577
+ * `null` means NO mod took the walk over, and is the ONLY value that falls
578
+ * through to the bump. A number is the energy a mod spent - **including 0**,
579
+ * which is a mod consuming the keypress without costing the player a turn.
580
+ * Those two are different answers on purpose; collapsing zero into "declined"
581
+ * is the defect this signature exists to prevent, and it would make the hook
582
+ * interface document a case the engine cannot express.
583
+ *
584
+ * Installed by the session (movementAutoDig, game/cave-cmd.ts), which returns
585
+ * null having drawn NO RNG unless a mod supplied the walkBlockedByDiggable
586
+ * hook - so an absent hook keeps movement byte-identical to faithful 4.2.6.
587
+ *
588
+ * Core names no mod and reads no flag here. Which mod is asking, and why, is
589
+ * not core's business.
590
+ */
591
+ autoDigStep?: (state: GameState, grid: Loc) => number | null;
592
+ /**
593
+ * player_kill_monster's reward slice: runs when the PLAYER kills a
594
+ * monster, before it is deleted (experience now; drops/lore/quests join
595
+ * it with their subsystems). Installed by the session (wireGame).
596
+ */
597
+ onPlayerKill?: (mon: Monster) => void;
598
+ /**
599
+ * become_aware (mon-util.c L711, game/known.ts): reveal a camouflaged
600
+ * mimic - clears MFLAG_CAMOUFLAGE, learns RF_UNAWARE, and (once object-mimic
601
+ * placement is ported) drops the fake floor item. Installed by the session
602
+ * (wireGame) and threaded into every existing becomeAware? hook config
603
+ * (mon/take-hit.ts, game/project-monster.ts, game/mon-ranged.ts) plus the
604
+ * direct player/monster melee call sites (game/effect-melee.ts,
605
+ * game/mon-cmd.ts) and the player-adjacent bump paths (game/player-turn.ts
606
+ * walkAction, game/cave-cmd.ts attackBlocker). Absent, camouflaged monsters
607
+ * are attacked instead of unmasked - matching pre-#31 behaviour.
608
+ */
609
+ becomeAware?: (mon: Monster) => void;
610
+ /**
611
+ * object_touch's history_find_artifact call (obj-knowledge.c L971): fires
612
+ * when an artifact enters the pack for the first time. Installed by the
613
+ * session (wireGame); pickup.ts's playerPickupAux calls it, keeping the
614
+ * hook alive across a later installPickup re-registration (which only
615
+ * replaces the message-hook env, not this state-level slot).
616
+ */
617
+ onArtifactFound?: (art: import("../obj/types.js").Artifact) => void;
618
+ /**
619
+ * history_lose_artifact (player-history.c L246): fires when a known artifact
620
+ * is lost - destroyed by an effect (effect-handler-attack/general.c),
621
+ * abandoned on a regenerated level (generate.c), or discarded by a store the
622
+ * player sold it to (store.c do_cmd_sell / store_delete_random / store_maint).
623
+ * Installed by the session (wireGame); marks the artifact's history entry
624
+ * "Missed", or logs a fresh one.
625
+ */
626
+ onArtifactLost?: (art: import("../obj/types.js").Artifact) => void;
627
+ /**
628
+ * py_attack's message slice: runs after the player melees a monster, with
629
+ * the full blow-by-blow result (hits, damage, crit HitType, and whether the
630
+ * monster died). The combat code returns only HitType keys - the text is a UI
631
+ * concern (combat/melee.ts) - so a shell installs this to render faithful
632
+ * "You hit/miss/slay the X" messages. Called before the monster is deleted.
633
+ */
634
+ onMelee?: (mon: Monster, result: MeleeAttack) => void;
635
+ /**
636
+ * Monster-AI override hook (W2.2 mod seam). Consulted at the very top of
637
+ * monsterTurn (monster-turn.ts): returning true takes the monster's whole
638
+ * turn over (the ported AI is skipped for that monster this turn); returning
639
+ * false falls through to the faithful AI. Absent by default, so core
640
+ * behaviour is byte-identical. Installed by a trusted in-process plugin via
641
+ * ModRegistryHost.monsters.setTurnHook (mod/registry-host.ts).
642
+ */
643
+ monsterTurnHook?: (mon: Monster, state: GameState) => boolean;
644
+ /**
645
+ * Named boolean "mod rule" flags: the player's per-patch choices, resolved by
646
+ * the HOST from each enabled mod's manifest `rules` against their saved Fixes
647
+ * & tweaks selections.
648
+ *
649
+ * OPAQUE TO CORE. Core stores this (it is save state, and a save has to record
650
+ * which patches a character was played with) and never branches on it. Every
651
+ * flag name here belongs to a mod, so a core function reading one would be core
652
+ * implementing that mod - which is exactly what the ModHooks seam below exists
653
+ * to stop. The mod itself reads its own flags when it decides which hooks to
654
+ * install; by the time core sees anything, the decision is already a function
655
+ * or an absent field.
656
+ */
657
+ modRules?: Record<string, boolean>;
658
+ /**
659
+ * The behaviour a mod supplies (mod/hooks.ts).
660
+ *
661
+ * ABSENT by default, and absent is the whole contract: with no mod loaded there
662
+ * is no object, no optional call is made, and core runs the faithful 4.2.6 path
663
+ * that is the only path in the branch. Composed by the host in load order from
664
+ * every enabled mod's contributions (composeModHooks), so core holds one object
665
+ * and knows nothing about mod identity, ordering or enablement.
666
+ */
667
+ modHooks?: import("../mod/hooks.js").ModHooks;
668
+ /**
669
+ * PU_BONUS | PU_HP | PU_MANA: recompute the derived state from the
670
+ * current gear (equipment commands call this after changing what is
671
+ * worn). Installed by the session (wireGame).
672
+ */
673
+ updateBonuses?: () => void;
674
+ /** game-world.c:947 pack_overflow(NULL), installed by the live session with
675
+ * its full object/calc_inventory dependencies. */
676
+ overflowPack?: () => void;
677
+ /**
678
+ * state->stat_ind: the six internal stat indices from the last
679
+ * calc_bonuses, kept live (updateBonuses refreshes it in place). The
680
+ * casting math (spell_chance / spell_cast) reads it, and a shell reads it
681
+ * to show live fail chances; absent only before the first bonus calc.
682
+ */
683
+ statInd?: readonly number[];
684
+ /**
685
+ * cave->decoy: the grid of the player's active decoy glyph (EF_GLYPH with
686
+ * GLYPH_DECOY), or absent/null when none is deployed. Level state, like
687
+ * traps; cleared when the decoy trap is destroyed or the level changes.
688
+ */
689
+ decoy?: Loc | null;
690
+ /**
691
+ * birth_levels_persist (#30) frozen-level cache, keyed by depth. The standard
692
+ * dungeon has exactly one level per depth, so `depth` (a number) is the
693
+ * faithful identity for upstream's level NAME key (chunk_find_name of
694
+ * level_by_depth(depth)->name, generate.c L1414); town is depth 0. Populated
695
+ * only while the option is on; the whole persist path in changeLevel is gated
696
+ * on the option, so default play never reads or writes it. Serialized in the
697
+ * save (session/save.ts); absent / empty means no frozen levels.
698
+ */
699
+ levelCache?: Map<number, StoredLevel>;
700
+ /**
701
+ * chunk->join for the level currently in play (generate.c L1203-1214),
702
+ * captured from generateLevel / restored from the frozen cache. Frozen into
703
+ * StoredLevel.join on level change and persisted (session/save.ts) so a
704
+ * first-visit persistent level can seed its stairs from adjacent levels.
705
+ * Only meaningful under birth_levels_persist; undefined otherwise.
706
+ */
707
+ currentJoins?: Connector[];
708
+ /**
709
+ * The preset target-item reference for an item-choosing effect (the port of
710
+ * cmd_get_item's "tgtitem" command argument, cmd-core.c L1056). Set by the
711
+ * object / spell command from cmd.args.tgtitem just before effect_do, read by
712
+ * the getItem seam (session/game.ts resolveTargetItem), and cleared after the
713
+ * run. Absent means the shell did not pre-resolve a pick, so the choosing
714
+ * handler aborts (the upstream cancel path). One-shot: the getItem seam clears
715
+ * it once consumed so a two-prompt effect cannot reuse the same object.
716
+ */
717
+ itemTarget?: ItemTargetRef | null;
718
+ /**
719
+ * The unfulfilled item request left behind when a choosing handler ran with no
720
+ * (or a filter-failing) preset target - the shell's defensive fallback reads
721
+ * it to re-prompt. Absent in the normal probe/pre-resolution flow.
722
+ */
723
+ itemRequest?: import("./effect-item.js").ItemRequest | null;
724
+ /**
725
+ * The preset curse index for EF_REMOVE_CURSE's get_curse selection (the port
726
+ * of cmd_get_arg_choice on a multi-curse item). Set from cmd.args.tgtcurse;
727
+ * read by the chooseCurse seam; cleared after the run. Absent picks the first
728
+ * removable curse (upstream get_curse's default), never a random one.
729
+ */
730
+ curseTarget?: number | null;
731
+ /**
732
+ * The world-event message sink (the recall yank, the deep-descent floor
733
+ * opening). Presentation (#25) installs it; absent, the messages drop.
734
+ */
735
+ msg?: (text: string, type?: MessageType) => void;
736
+ /**
737
+ * sound(msgt): play the sound bound to a MSG_* type (message.c sound()).
738
+ * A front end wires it to its audio engine (the web build emits the core
739
+ * EVENT_SOUND onto its sound bus); absent, sound is silent. The engine's
740
+ * own message->sound map and dedup ride #26; this is only the emit seam.
741
+ */
742
+ sound?: (msgType: number) => void;
743
+ /**
744
+ * The equipped-item curse effect countdown (game/curse-tick.ts
745
+ * processCurseTimeouts), run once per game turn at the tail of
746
+ * decrease_timeouts. The session installs it with the curses registry + the
747
+ * effect stack; absent (worldless callers, or no cursed item equipped) the
748
+ * curse loop is a no-op and draws no RNG, exactly as when it was deferred.
749
+ */
750
+ curseTick?: () => void;
751
+ /**
752
+ * The game event bus (events.ts), when a host attaches one. Core-to-anything
753
+ * seam: the host routes messages/sound through it and mods subscribe (the
754
+ * capability-gated agent/events.ts subscribeEvents). Absent in the worldless
755
+ * harness; core never requires it.
756
+ */
757
+ events?: GameEvents;
758
+ /**
759
+ * The live town stores (store.c `stores`), indexed however the session
760
+ * instantiates them; a shell looks a store up by its entrance feature. Set
761
+ * when the town level is generated; absent in the dungeon.
762
+ */
763
+ stores?: Store[];
764
+ /**
765
+ * process_world upkeep environment (game/world.ts): the bound timed-effect
766
+ * table, take_hit / timed hooks, the ambient-spawn and cave-illuminate
767
+ * hooks, and exp deps the once-every-ten-turns world clock needs. Installed
768
+ * by the session (wireGame) and the test harness. Absent, decrease_timeouts
769
+ * falls back to raw mutation and the damage-over-time / digestion / recharge
770
+ * upkeep is skipped (the ambient-spawn roll is still drawn unconditionally).
771
+ */
772
+ world?: import("./world.js").WorldClockEnv;
773
+ }
774
+ /**
775
+ * A reference to an item-choosing effect's pre-resolved target object: a gear
776
+ * handle (a pack, equipped or quiver object - all live in gear.store) or an
777
+ * index into the floor pile under the player. The shell resolves the pick
778
+ * asynchronously and rides it on the command's args.tgtitem; the getItem seam
779
+ * turns it back into the live object.
780
+ */
781
+ export type ItemTargetRef = {
782
+ handle: number;
783
+ } | {
784
+ floor: number;
785
+ };
786
+ /**
787
+ * What the host's keyboard poll wants the loop to do at upstream's
788
+ * EVENT_CHECK_INTERRUPT point (game-world.c:937).
789
+ *
790
+ * - "go": nothing was pressed; keep driving the run / repeat / rest (the C's
791
+ * EVT_NONE from its non-waiting inkey_ex).
792
+ * - "cancel": a key arrived: flush input, disturb, "Cancelled." (ui-game.c:660).
793
+ * - "pause": the host cannot answer synchronously and needs its event loop; the
794
+ * loop returns LOOP_STATUS.PAUSE with the continuation still queued.
795
+ */
796
+ export type InterruptResponse = "go" | "cancel" | "pause";
797
+ /** One queued player command (a keyed action plus optional direction/args). */
798
+ export interface PlayerCommand {
799
+ /** The action-registry key (e.g. "walk", "hold", "descend"). */
800
+ code: string;
801
+ /** Keypad direction 1..9 for movement commands. */
802
+ dir?: number;
803
+ /**
804
+ * Set by the move-command wrapper (installCaveCommands' bump-open) once it has
805
+ * already run player_confuse_dir on `dir`: walkAction then uses `dir` as-is
806
+ * rather than re-rolling confusion, so the RNG is drawn exactly once per move
807
+ * (cmd-cave.c L1299-1302, matching do_cmd_walk).
808
+ */
809
+ confusedApplied?: boolean;
810
+ /** Free-form arguments a mod-registered action may read. */
811
+ args?: Readonly<Record<string, unknown>>;
812
+ /**
813
+ * cmd-core.c process_command auto-repeat budget (nrepeats): the number of
814
+ * further attempts a repeatable command (tunnel / open / close / disarm /
815
+ * alter / lock) may make before it stops on its own. Absent on a fresh
816
+ * keypress (seeded to CMD_AUTO_REPEAT); each self-requeue decrements it. See
817
+ * queueCommandRepeat.
818
+ */
819
+ repeatRemaining?: number;
820
+ }
821
+ /**
822
+ * cmd-core.c game_cmds: the auto_repeat_n value (99) shared by every repeatable
823
+ * action command - open, close, tunnel, disarm, alter (and the lock alias).
824
+ */
825
+ export declare const CMD_AUTO_REPEAT = 99;
826
+ /**
827
+ * cmd-core.c process_command auto-repeat, the port of `cmd_set_repeat(99)` plus
828
+ * the per-command `if (!more) disturb(player)` (do_cmd_tunnel and friends): a
829
+ * repeatable command whose _aux reports "may continue" (a failed-but-hopeful
830
+ * attempt - still chipping at a wall, still picking a lock) re-queues itself on
831
+ * state.cmdQueue so the player keeps trying on later game turns without pressing
832
+ * the key again, bounded at CMD_AUTO_REPEAT like upstream. When the aux reports
833
+ * done (success, or no hope), nothing is re-queued, which is what upstream's
834
+ * `disturb(player)` achieves for repetition (the player is not running or
835
+ * resting mid-action, so disturb's other effects are moot here). processPlayer
836
+ * drains cmdQueue before asking for input and a full turn passes between
837
+ * attempts, so monsters act between digs; any disturb() during those turns
838
+ * flushes cmdQueue and stops the repeat, exactly as upstream disturb cancels
839
+ * command repetition.
840
+ */
841
+ export declare function queueCommandRepeat(state: GameState, cmd: PlayerCommand, more: boolean): void;
842
+ /**
843
+ * The running engine's state (player-path.c file-statics plus the
844
+ * player->upkeep running counter). Created lazily by the run action; a
845
+ * `running` of 0 means the player is not running. `firstStep` mirrors
846
+ * upstream's running_firststep (the disturb-suppressed first step).
847
+ */
848
+ export interface RunState {
849
+ /** run_cur_dir: the direction we are moving. */
850
+ curDir: number;
851
+ /** run_old_dir: the direction we are considered to have come from. */
852
+ oldDir: number;
853
+ /** run_open_area: in the open on at least one side. */
854
+ openArea: boolean;
855
+ /** run_break_right: wall on the right, stop if it opens. */
856
+ breakRight: boolean;
857
+ /** run_break_left: wall on the left, stop if it opens. */
858
+ breakLeft: boolean;
859
+ /** player->upkeep->running: steps remaining (0 = not running). */
860
+ running: number;
861
+ /** player->upkeep->running_firststep. */
862
+ firstStep: boolean;
863
+ /**
864
+ * player->upkeep->steps: a pathfinding path as forward keypad directions
865
+ * in reverse order (index stepCount-1 is the next step); absent for a
866
+ * plain run. Freed by disturb().
867
+ */
868
+ steps?: number[];
869
+ /** player->upkeep->step_count: steps of `steps` left to take. */
870
+ stepCount: number;
871
+ /** player->upkeep->path_dest: the travel destination (kept across disturb). */
872
+ pathDest?: Loc;
873
+ }
874
+ /**
875
+ * player_resting_is_special (player-util.c:1382): the conditional REST_ modes,
876
+ * which rest until a condition is met rather than for a fixed count.
877
+ * REST_COMPLETE = -2, REST_ALL_POINTS = -1, REST_SOME_POINTS = -3
878
+ * (player-util.h:53-55).
879
+ *
880
+ * This and playerIsResting live here, next to state.resting, because three
881
+ * separate copies of them had grown up around the port - the rest command's, the
882
+ * turn loop's, and display.ts's inline -1/-2/-3 tests - and a predicate with
883
+ * three bodies only agrees by luck.
884
+ */
885
+ export declare function playerRestingIsSpecial(count: number): boolean;
886
+ /**
887
+ * player_is_resting (player-util.c:1397): upkeep->resting > 0 or one of the
888
+ * conditional modes. Absent state.resting is upkeep->resting == 0.
889
+ */
890
+ export declare function playerIsResting(state: GameState): boolean;
891
+ /** player_resting_count (player-util.c:1406) = upkeep->resting. */
892
+ export declare function playerRestingCount(state: GameState): number;
893
+ /** cave_monster_max(cave): one past the highest occupied monster slot. */
894
+ export declare function monsterMax(state: GameState): number;
895
+ /** cave_monster(cave, i): the monster in slot i, or null. */
896
+ export declare function monsterAt(state: GameState, i: number): Monster | null;
897
+ /**
898
+ * mon_pop (mon-make.c L646): the index of a free monster slot, or 0 if the
899
+ * list is full. Its one upstream caller (place_new_monster_one, L1016) must
900
+ * check for 0.
901
+ *
902
+ * The order here is the whole point and the port had it backwards. BELOW
903
+ * level_monster_max upstream always APPENDS - it takes cave_monster_max(c) and
904
+ * grows the array - and only once the array is at the cap does it scan for a
905
+ * hole left by a dead monster. placeMonsterLive used to scan for the first hole
906
+ * every time, which assigns different midx values from the first monster death
907
+ * onward, and midx is turn order (process_monsters walks
908
+ * cave_monster_max(cave) - 1 down to 1, mon-move.c:1899). Holes are removed by
909
+ * compact_monsters' excise pass, not by allocation.
910
+ *
911
+ * `characterDungeon` is upstream's character_dungeon: during generation there
912
+ * is no player to warn.
913
+ */
914
+ export declare function monPop(state: GameState, characterDungeon?: boolean): number;
915
+ /**
916
+ * Add a monster to the state and mark its grid occupied, assigning the next
917
+ * free midx. Mirrors the midx/square bookkeeping place_new_monster does.
918
+ *
919
+ * This is the LOADING path (place_new_monster_one's `loading` branch,
920
+ * mon-make.c L1011-1014): a monster read back from a save keeps its stored slot
921
+ * and mon_max just grows past it, so appending in stored order is the same
922
+ * assignment. Live placement goes through monPop instead.
923
+ */
924
+ export declare function addMonster(state: GameState, mon: Monster): number;
925
+ /** square_monster(c, grid): the monster occupying a grid, or null. */
926
+ export declare function squareMonster(state: GameState, grid: Loc): Monster | null;
927
+ /** square_isplayer(c, grid): the player occupies this grid. */
928
+ export declare function squareIsPlayer(state: GameState, grid: Loc): boolean;
929
+ /**
930
+ * square_isempty reduced to the loop's needs: passable feature, no monster
931
+ * and not the player. (Player-trap / web / object refinements DEFERRED.)
932
+ */
933
+ export declare function squareIsEmpty(state: GameState, grid: Loc): boolean;
934
+ /**
935
+ * monster_swap (mon-util.c:566-677): swap mon markers at two grids, update
936
+ * monster grids, and when the player is involved set actor.grid and fire
937
+ * player_leaving (mon-util.c:609-625 / 656-672) so TRF_DELAY traps run.
938
+ * Used by thrust, mon AI steps, and teleports that trade places.
939
+ */
940
+ export declare function monsterSwap(state: GameState, grid1: Loc, grid2: Loc): void;
941
+ /**
942
+ * delete_monster_idx (mon-make.c): remove the monster from its groups
943
+ * (leader succession / group split happen here), forget its racial
944
+ * occurrence, clear its square and free its slot. The held-object drop,
945
+ * mimic and targeting/redraw bookkeeping are DEFERRED with their subsystems
946
+ * (floor objects, lore); the caller runs monster_death (drops) beforehand.
947
+ */
948
+ export declare function deleteMonster(state: GameState, midx: number): void;
949
+ /**
950
+ * Mark the player's starting grid occupied (square(c, grid)->mon = -1) and
951
+ * set actor.grid, mirroring how the player is placed on a fresh level.
952
+ */
953
+ export declare function placePlayer(state: GameState, grid: Loc): void;
954
+ /**
955
+ * Move the player to a new grid, updating the square-occupancy marker
956
+ * (clear the old grid, mark the new one with the player sentinel -1).
957
+ * Fires player_leaving on the old grid (mon-util.c:612 / 659 via
958
+ * monster_swap) so TRF_DELAY traps run before the post-move enter hooks.
959
+ */
960
+ export declare function movePlayer(state: GameState, grid: Loc): void;
961
+ /**
962
+ * The mon_take_hit arena branch (mon-util.c L1290) for the game-layer
963
+ * kill sites: a lethal player blow in single combat signals the level
964
+ * change (the arena exit finishes the monster) instead of killing.
965
+ * Returns true when the death was intercepted (skip the kill).
966
+ */
967
+ export declare function arenaInterceptDeath(state: GameState, mon: Monster): boolean;
968
+ /** Refresh mon->cdis for every live monster (update_mon does this upstream). */
969
+ export declare function updateMonsterDistances(state: GameState): void;
970
+ //# sourceMappingURL=context.d.ts.map