open-optcg 0.0.0-stage → 0.1.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 (525) hide show
  1. package/LICENSE +26 -0
  2. package/README.md +74 -2
  3. package/dist/cards.js +1 -0
  4. package/dist/chunks/chunk-4I54H2QI.js +1 -0
  5. package/dist/chunks/chunk-5QCGQIMI.js +1 -0
  6. package/dist/decks.js +2 -0
  7. package/dist/engine.js +1 -0
  8. package/dist/protocol.js +1 -0
  9. package/dist/types/cards.d.ts +1 -0
  10. package/dist/types/decks.d.ts +1 -0
  11. package/dist/types/engine.d.ts +1 -0
  12. package/dist/types/internal/cards/src/block-icons.d.ts +26 -0
  13. package/dist/types/internal/cards/src/eb01.d.ts +2 -0
  14. package/dist/types/internal/cards/src/eb02.d.ts +2 -0
  15. package/dist/types/internal/cards/src/eb03.d.ts +2 -0
  16. package/dist/types/internal/cards/src/eb04.d.ts +2 -0
  17. package/dist/types/internal/cards/src/eb05.d.ts +2 -0
  18. package/dist/types/internal/cards/src/generated-blocks.d.ts +3 -0
  19. package/dist/types/internal/cards/src/generated-community.d.ts +5972 -0
  20. package/dist/types/internal/cards/src/generated-eb01.d.ts +2981 -0
  21. package/dist/types/internal/cards/src/generated-eb02.d.ts +2994 -0
  22. package/dist/types/internal/cards/src/generated-eb03.d.ts +3133 -0
  23. package/dist/types/internal/cards/src/generated-eb04.d.ts +3068 -0
  24. package/dist/types/internal/cards/src/generated-eb05.d.ts +3046 -0
  25. package/dist/types/internal/cards/src/generated-op05.d.ts +5816 -0
  26. package/dist/types/internal/cards/src/generated-op06.d.ts +5813 -0
  27. package/dist/types/internal/cards/src/generated-op07.d.ts +5793 -0
  28. package/dist/types/internal/cards/src/generated-op08.d.ts +5833 -0
  29. package/dist/types/internal/cards/src/generated-op09.d.ts +5800 -0
  30. package/dist/types/internal/cards/src/generated-op10.d.ts +5815 -0
  31. package/dist/types/internal/cards/src/generated-op11.d.ts +5787 -0
  32. package/dist/types/internal/cards/src/generated-op12.d.ts +5765 -0
  33. package/dist/types/internal/cards/src/generated-op13.d.ts +5870 -0
  34. package/dist/types/internal/cards/src/generated-op14.d.ts +5926 -0
  35. package/dist/types/internal/cards/src/generated-op15.d.ts +5900 -0
  36. package/dist/types/internal/cards/src/generated-op16.d.ts +5887 -0
  37. package/dist/types/internal/cards/src/generated-op17.d.ts +5961 -0
  38. package/dist/types/internal/cards/src/generated-p.d.ts +5265 -0
  39. package/dist/types/internal/cards/src/generated-prb02.d.ts +891 -0
  40. package/dist/types/internal/cards/src/generated-st10.d.ts +840 -0
  41. package/dist/types/internal/cards/src/generated-st11.d.ts +248 -0
  42. package/dist/types/internal/cards/src/generated-st12.d.ts +832 -0
  43. package/dist/types/internal/cards/src/generated-st13.d.ts +946 -0
  44. package/dist/types/internal/cards/src/generated-st14.d.ts +820 -0
  45. package/dist/types/internal/cards/src/generated-st15.d.ts +246 -0
  46. package/dist/types/internal/cards/src/generated-st16.d.ts +239 -0
  47. package/dist/types/internal/cards/src/generated-st17.d.ts +248 -0
  48. package/dist/types/internal/cards/src/generated-st19.d.ts +256 -0
  49. package/dist/types/internal/cards/src/generated-st20.d.ts +241 -0
  50. package/dist/types/internal/cards/src/generated-st21.d.ts +814 -0
  51. package/dist/types/internal/cards/src/generated-st22.d.ts +822 -0
  52. package/dist/types/internal/cards/src/generated-st24.d.ts +250 -0
  53. package/dist/types/internal/cards/src/generated-st25.d.ts +247 -0
  54. package/dist/types/internal/cards/src/generated-st27.d.ts +258 -0
  55. package/dist/types/internal/cards/src/generated-st29.d.ts +816 -0
  56. package/dist/types/internal/cards/src/generated-st30.d.ts +832 -0
  57. package/dist/types/internal/cards/src/generated.d.ts +4328 -0
  58. package/dist/types/internal/cards/src/index.d.ts +58 -0
  59. package/dist/types/internal/cards/src/op05.d.ts +2 -0
  60. package/dist/types/internal/cards/src/op06.d.ts +2 -0
  61. package/dist/types/internal/cards/src/op07.d.ts +2 -0
  62. package/dist/types/internal/cards/src/op08.d.ts +2 -0
  63. package/dist/types/internal/cards/src/op09.d.ts +2 -0
  64. package/dist/types/internal/cards/src/op10.d.ts +2 -0
  65. package/dist/types/internal/cards/src/op11.d.ts +2 -0
  66. package/dist/types/internal/cards/src/op12.d.ts +2 -0
  67. package/dist/types/internal/cards/src/op13.d.ts +2 -0
  68. package/dist/types/internal/cards/src/op14.d.ts +2 -0
  69. package/dist/types/internal/cards/src/op15.d.ts +2 -0
  70. package/dist/types/internal/cards/src/op16.d.ts +2 -0
  71. package/dist/types/internal/cards/src/op17-rarity.d.ts +3 -0
  72. package/dist/types/internal/cards/src/op17.d.ts +2 -0
  73. package/dist/types/internal/cards/src/p.d.ts +2 -0
  74. package/dist/types/internal/cards/src/prb02.d.ts +2 -0
  75. package/dist/types/internal/cards/src/rules-derivation.d.ts +16 -0
  76. package/dist/types/internal/cards/src/sealed-promo.d.ts +43 -0
  77. package/dist/types/internal/cards/src/st10.d.ts +2 -0
  78. package/dist/types/internal/cards/src/st11.d.ts +2 -0
  79. package/dist/types/internal/cards/src/st12.d.ts +2 -0
  80. package/dist/types/internal/cards/src/st13.d.ts +2 -0
  81. package/dist/types/internal/cards/src/st14.d.ts +2 -0
  82. package/dist/types/internal/cards/src/st15.d.ts +2 -0
  83. package/dist/types/internal/cards/src/st16.d.ts +2 -0
  84. package/dist/types/internal/cards/src/st17.d.ts +2 -0
  85. package/dist/types/internal/cards/src/st19.d.ts +2 -0
  86. package/dist/types/internal/cards/src/st20.d.ts +2 -0
  87. package/dist/types/internal/cards/src/st21.d.ts +2 -0
  88. package/dist/types/internal/cards/src/st22.d.ts +2 -0
  89. package/dist/types/internal/cards/src/st24.d.ts +2 -0
  90. package/dist/types/internal/cards/src/st25.d.ts +2 -0
  91. package/dist/types/internal/cards/src/st27.d.ts +2 -0
  92. package/dist/types/internal/cards/src/st29.d.ts +2 -0
  93. package/dist/types/internal/cards/src/st30.d.ts +2 -0
  94. package/dist/types/internal/cards/src/text.d.ts +20 -0
  95. package/dist/types/internal/cards/src/unimplemented-clauses.d.ts +7 -0
  96. package/dist/types/internal/decks/src/deck-provenance.d.ts +30 -0
  97. package/dist/types/internal/decks/src/decklist.d.ts +3 -0
  98. package/dist/types/internal/decks/src/eb02-luffy-manifest.d.ts +2 -0
  99. package/dist/types/internal/decks/src/eb02-luffy-tournament-manifest.d.ts +2 -0
  100. package/dist/types/internal/decks/src/eb03-vivi-manifest.d.ts +2 -0
  101. package/dist/types/internal/decks/src/eb03-vivi-tournament-manifest.d.ts +2 -0
  102. package/dist/types/internal/decks/src/eb04-bonney-manifest.d.ts +2 -0
  103. package/dist/types/internal/decks/src/eb04-bonney-tournament-manifest.d.ts +2 -0
  104. package/dist/types/internal/decks/src/eb05-robin-manifest.d.ts +2 -0
  105. package/dist/types/internal/decks/src/generated.d.ts +115 -0
  106. package/dist/types/internal/decks/src/index.d.ts +64 -0
  107. package/dist/types/internal/decks/src/legality.d.ts +14 -0
  108. package/dist/types/internal/decks/src/op05-enel-tcgmm-manifest.d.ts +2 -0
  109. package/dist/types/internal/decks/src/op05-luffy-tournament-manifest.d.ts +2 -0
  110. package/dist/types/internal/decks/src/op06-reiju-regional-manifest.d.ts +2 -0
  111. package/dist/types/internal/decks/src/op06-yamato-manifest.d.ts +2 -0
  112. package/dist/types/internal/decks/src/op06-yamato-tournament-manifest.d.ts +2 -0
  113. package/dist/types/internal/decks/src/op07-vegapunk-store-battle-manifest.d.ts +2 -0
  114. package/dist/types/internal/decks/src/op08-pudding-manifest.d.ts +2 -0
  115. package/dist/types/internal/decks/src/op09-buggy-manifest.d.ts +2 -0
  116. package/dist/types/internal/decks/src/op09-buggy-tournament-manifest.d.ts +2 -0
  117. package/dist/types/internal/decks/src/op09-luffy-tournament-manifest.d.ts +2 -0
  118. package/dist/types/internal/decks/src/op09-robin-manifest.d.ts +2 -0
  119. package/dist/types/internal/decks/src/op09-shanks-tournament-manifest.d.ts +2 -0
  120. package/dist/types/internal/decks/src/op10-kid-tournament-manifest.d.ts +2 -0
  121. package/dist/types/internal/decks/src/op10-usopp-manifest.d.ts +2 -0
  122. package/dist/types/internal/decks/src/op11-jinbe-manifest.d.ts +2 -0
  123. package/dist/types/internal/decks/src/op11-jinbe-tournament-manifest.d.ts +2 -0
  124. package/dist/types/internal/decks/src/op11-katakuri-tournament-manifest.d.ts +2 -0
  125. package/dist/types/internal/decks/src/op11-koby-tournament-manifest.d.ts +2 -0
  126. package/dist/types/internal/decks/src/op11-shirahoshi-manifest.d.ts +2 -0
  127. package/dist/types/internal/decks/src/op11-shirahoshi-tournament-manifest.d.ts +2 -0
  128. package/dist/types/internal/decks/src/op12-koala-manifest.d.ts +2 -0
  129. package/dist/types/internal/decks/src/op12-koala-tournament-manifest.d.ts +2 -0
  130. package/dist/types/internal/decks/src/op12-rayleigh-manifest.d.ts +2 -0
  131. package/dist/types/internal/decks/src/op12-rayleigh-tournament-manifest.d.ts +2 -0
  132. package/dist/types/internal/decks/src/op12-sanji-manifest.d.ts +2 -0
  133. package/dist/types/internal/decks/src/op12-sanji-tournament-manifest.d.ts +2 -0
  134. package/dist/types/internal/decks/src/op12-zoro-manifest.d.ts +2 -0
  135. package/dist/types/internal/decks/src/op13-ace-manifest.d.ts +2 -0
  136. package/dist/types/internal/decks/src/op13-ace-tournament-manifest.d.ts +2 -0
  137. package/dist/types/internal/decks/src/op13-imu-manifest.d.ts +2 -0
  138. package/dist/types/internal/decks/src/op13-luffy-miracle-manifest.d.ts +2 -0
  139. package/dist/types/internal/decks/src/op13-roger-manifest.d.ts +2 -0
  140. package/dist/types/internal/decks/src/op13-roger-tournament-manifest.d.ts +2 -0
  141. package/dist/types/internal/decks/src/op13-sabo-tournament-manifest.d.ts +2 -0
  142. package/dist/types/internal/decks/src/op14-crocodile-manifest.d.ts +2 -0
  143. package/dist/types/internal/decks/src/op14-doflamingo-manifest.d.ts +2 -0
  144. package/dist/types/internal/decks/src/op14-doflamingo-tournament-manifest.d.ts +2 -0
  145. package/dist/types/internal/decks/src/op14-hancock-manifest.d.ts +2 -0
  146. package/dist/types/internal/decks/src/op14-hancock-tournament-manifest.d.ts +2 -0
  147. package/dist/types/internal/decks/src/op14-jinbe-manifest.d.ts +2 -0
  148. package/dist/types/internal/decks/src/op14-jinbe-tournament-manifest.d.ts +2 -0
  149. package/dist/types/internal/decks/src/op14-law-manifest.d.ts +2 -0
  150. package/dist/types/internal/decks/src/op14-law-tournament-manifest.d.ts +2 -0
  151. package/dist/types/internal/decks/src/op14-moria-manifest.d.ts +2 -0
  152. package/dist/types/internal/decks/src/op14-moria-tournament-manifest.d.ts +2 -0
  153. package/dist/types/internal/decks/src/op15-brook-manifest.d.ts +2 -0
  154. package/dist/types/internal/decks/src/op15-enel-chinoize-manifest.d.ts +2 -0
  155. package/dist/types/internal/decks/src/op15-krieg-manifest.d.ts +2 -0
  156. package/dist/types/internal/decks/src/op15-lucy-manifest.d.ts +2 -0
  157. package/dist/types/internal/decks/src/op15-luffy-manifest.d.ts +2 -0
  158. package/dist/types/internal/decks/src/op15-rebecca-manifest.d.ts +2 -0
  159. package/dist/types/internal/decks/src/op16-ace-manifest.d.ts +2 -0
  160. package/dist/types/internal/decks/src/op16-ace-open-manifest.d.ts +2 -0
  161. package/dist/types/internal/decks/src/op16-enel-manifest.d.ts +2 -0
  162. package/dist/types/internal/decks/src/op16-nami-manifest.d.ts +2 -0
  163. package/dist/types/internal/decks/src/op16-sengoku-manifest.d.ts +2 -0
  164. package/dist/types/internal/decks/src/op16-teach-manifest.d.ts +2 -0
  165. package/dist/types/internal/decks/src/op16-yamato-manifest.d.ts +2 -0
  166. package/dist/types/internal/decks/src/op17-kaido-field-manifest.d.ts +2 -0
  167. package/dist/types/internal/decks/src/op17-kaido-manifest.d.ts +2 -0
  168. package/dist/types/internal/decks/src/op17-linlin-manifest.d.ts +2 -0
  169. package/dist/types/internal/decks/src/op17-linlin-tournament-manifest.d.ts +2 -0
  170. package/dist/types/internal/decks/src/op17-luffy-ace-manifest.d.ts +2 -0
  171. package/dist/types/internal/decks/src/op17-luffy-manifest.d.ts +2 -0
  172. package/dist/types/internal/decks/src/op17-luffy-tournament-manifest.d.ts +2 -0
  173. package/dist/types/internal/decks/src/op17-newgate-manifest.d.ts +2 -0
  174. package/dist/types/internal/decks/src/op17-shanks-manifest.d.ts +2 -0
  175. package/dist/types/internal/decks/src/op17-shanks-tournament-manifest.d.ts +2 -0
  176. package/dist/types/internal/decks/src/op17-xebec-manifest.d.ts +2 -0
  177. package/dist/types/internal/decks/src/op17-xebec-open-manifest.d.ts +2 -0
  178. package/dist/types/internal/decks/src/sealed.d.ts +73 -0
  179. package/dist/types/internal/decks/src/st18-luffy-manifest.d.ts +2 -0
  180. package/dist/types/internal/decks/src/st21-luffy-open-manifest.d.ts +2 -0
  181. package/dist/types/internal/decks/src/st22-ace-newgate-manifest.d.ts +2 -0
  182. package/dist/types/internal/decks/src/st23-shanks-manifest.d.ts +2 -0
  183. package/dist/types/internal/decks/src/st26-luffy-manifest.d.ts +2 -0
  184. package/dist/types/internal/decks/src/st27-teach-manifest.d.ts +2 -0
  185. package/dist/types/internal/decks/src/st29-luffy-manifest.d.ts +2 -0
  186. package/dist/types/internal/decks/src/st29-luffy-tournament-manifest.d.ts +2 -0
  187. package/dist/types/internal/decks/src/st30-luffy-ace-manifest.d.ts +2 -0
  188. package/dist/types/internal/decks/src/st33-kuzan-tournament-manifest.d.ts +2 -0
  189. package/dist/types/internal/engine-core/src/ability-availability.d.ts +13 -0
  190. package/dist/types/internal/engine-core/src/actions/activate-counter-event.d.ts +2 -0
  191. package/dist/types/internal/engine-core/src/actions/activate-main.d.ts +2 -0
  192. package/dist/types/internal/engine-core/src/actions/attach-don.d.ts +2 -0
  193. package/dist/types/internal/engine-core/src/actions/attack.d.ts +2 -0
  194. package/dist/types/internal/engine-core/src/actions/block.d.ts +2 -0
  195. package/dist/types/internal/engine-core/src/actions/context.d.ts +19 -0
  196. package/dist/types/internal/engine-core/src/actions/counter.d.ts +2 -0
  197. package/dist/types/internal/engine-core/src/actions/index.d.ts +3 -0
  198. package/dist/types/internal/engine-core/src/actions/mulligan-decision.d.ts +2 -0
  199. package/dist/types/internal/engine-core/src/actions/pass.d.ts +2 -0
  200. package/dist/types/internal/engine-core/src/actions/play-card.d.ts +2 -0
  201. package/dist/types/internal/engine-core/src/actions/resolve-effect.d.ts +2 -0
  202. package/dist/types/internal/engine-core/src/actions/resolve-trigger.d.ts +2 -0
  203. package/dist/types/internal/engine-core/src/base-power.d.ts +4 -0
  204. package/dist/types/internal/engine-core/src/battle.d.ts +34 -0
  205. package/dist/types/internal/engine-core/src/board.d.ts +40 -0
  206. package/dist/types/internal/engine-core/src/canonical.d.ts +2 -0
  207. package/dist/types/internal/engine-core/src/card-mechanics.d.ts +57 -0
  208. package/dist/types/internal/engine-core/src/clone.d.ts +1 -0
  209. package/dist/types/internal/engine-core/src/condition-text.d.ts +3 -0
  210. package/dist/types/internal/engine-core/src/damage-replacement.d.ts +8 -0
  211. package/dist/types/internal/engine-core/src/don.d.ts +18 -0
  212. package/dist/types/internal/engine-core/src/effect-options.d.ts +4 -0
  213. package/dist/types/internal/engine-core/src/effects.d.ts +50 -0
  214. package/dist/types/internal/engine-core/src/engine.d.ts +31 -0
  215. package/dist/types/internal/engine-core/src/errors.d.ts +4 -0
  216. package/dist/types/internal/engine-core/src/event-text.d.ts +14 -0
  217. package/dist/types/internal/engine-core/src/hand-price.d.ts +7 -0
  218. package/dist/types/internal/engine-core/src/index.d.ts +26 -0
  219. package/dist/types/internal/engine-core/src/invariants.d.ts +10 -0
  220. package/dist/types/internal/engine-core/src/legal-actions/action-costs.d.ts +13 -0
  221. package/dist/types/internal/engine-core/src/legal-actions/block.d.ts +4 -0
  222. package/dist/types/internal/engine-core/src/legal-actions/counter.d.ts +4 -0
  223. package/dist/types/internal/engine-core/src/legal-actions/index.d.ts +6 -0
  224. package/dist/types/internal/engine-core/src/legal-actions/main/activations.d.ts +4 -0
  225. package/dist/types/internal/engine-core/src/legal-actions/main/attacks.d.ts +4 -0
  226. package/dist/types/internal/engine-core/src/legal-actions/main/don.d.ts +4 -0
  227. package/dist/types/internal/engine-core/src/legal-actions/main/hand.d.ts +4 -0
  228. package/dist/types/internal/engine-core/src/legal-actions/main/index.d.ts +4 -0
  229. package/dist/types/internal/engine-core/src/legal-actions/main/pass.d.ts +3 -0
  230. package/dist/types/internal/engine-core/src/legal-actions/mulligan.d.ts +3 -0
  231. package/dist/types/internal/engine-core/src/legal-actions/pending-effect.d.ts +4 -0
  232. package/dist/types/internal/engine-core/src/legal-actions/trigger.d.ts +3 -0
  233. package/dist/types/internal/engine-core/src/life.d.ts +27 -0
  234. package/dist/types/internal/engine-core/src/mechanic-choices.d.ts +14 -0
  235. package/dist/types/internal/engine-core/src/mechanic-conditions.d.ts +21 -0
  236. package/dist/types/internal/engine-core/src/mechanic-dsl.d.ts +696 -0
  237. package/dist/types/internal/engine-core/src/mechanics/eb01-battle.d.ts +2 -0
  238. package/dist/types/internal/engine-core/src/mechanics/eb01-main.d.ts +7 -0
  239. package/dist/types/internal/engine-core/src/mechanics/eb01-on-play.d.ts +7 -0
  240. package/dist/types/internal/engine-core/src/mechanics/eb01-reactions.d.ts +2 -0
  241. package/dist/types/internal/engine-core/src/mechanics/eb01-replacements.d.ts +2 -0
  242. package/dist/types/internal/engine-core/src/mechanics/eb01-shared.d.ts +7 -0
  243. package/dist/types/internal/engine-core/src/mechanics/eb01-static.d.ts +2 -0
  244. package/dist/types/internal/engine-core/src/mechanics/eb01-triggers.d.ts +2 -0
  245. package/dist/types/internal/engine-core/src/mechanics/eb02-battle.d.ts +2 -0
  246. package/dist/types/internal/engine-core/src/mechanics/eb02-main.d.ts +2 -0
  247. package/dist/types/internal/engine-core/src/mechanics/eb02-on-play.d.ts +8 -0
  248. package/dist/types/internal/engine-core/src/mechanics/eb02-reactions.d.ts +2 -0
  249. package/dist/types/internal/engine-core/src/mechanics/eb02-shared.d.ts +4 -0
  250. package/dist/types/internal/engine-core/src/mechanics/eb02-static.d.ts +2 -0
  251. package/dist/types/internal/engine-core/src/mechanics/eb02-triggers.d.ts +2 -0
  252. package/dist/types/internal/engine-core/src/mechanics/eb03-battle.d.ts +2 -0
  253. package/dist/types/internal/engine-core/src/mechanics/eb03-main.d.ts +5 -0
  254. package/dist/types/internal/engine-core/src/mechanics/eb03-on-play.d.ts +40 -0
  255. package/dist/types/internal/engine-core/src/mechanics/eb03-reactions.d.ts +2 -0
  256. package/dist/types/internal/engine-core/src/mechanics/eb03-replacements.d.ts +2 -0
  257. package/dist/types/internal/engine-core/src/mechanics/eb03-static.d.ts +3 -0
  258. package/dist/types/internal/engine-core/src/mechanics/eb03-triggers.d.ts +2 -0
  259. package/dist/types/internal/engine-core/src/mechanics/eb04-battle.d.ts +2 -0
  260. package/dist/types/internal/engine-core/src/mechanics/eb04-bonney.d.ts +2 -0
  261. package/dist/types/internal/engine-core/src/mechanics/eb04-main.d.ts +5 -0
  262. package/dist/types/internal/engine-core/src/mechanics/eb04-on-play.d.ts +5 -0
  263. package/dist/types/internal/engine-core/src/mechanics/eb04-reactions.d.ts +2 -0
  264. package/dist/types/internal/engine-core/src/mechanics/eb04-replacements.d.ts +2 -0
  265. package/dist/types/internal/engine-core/src/mechanics/eb04-static.d.ts +3 -0
  266. package/dist/types/internal/engine-core/src/mechanics/eb04-triggers.d.ts +2 -0
  267. package/dist/types/internal/engine-core/src/mechanics/eb05-battle.d.ts +2 -0
  268. package/dist/types/internal/engine-core/src/mechanics/eb05-main.d.ts +4 -0
  269. package/dist/types/internal/engine-core/src/mechanics/eb05-on-play.d.ts +4 -0
  270. package/dist/types/internal/engine-core/src/mechanics/eb05-reactions.d.ts +2 -0
  271. package/dist/types/internal/engine-core/src/mechanics/eb05-replacements.d.ts +2 -0
  272. package/dist/types/internal/engine-core/src/mechanics/eb05-shared.d.ts +12 -0
  273. package/dist/types/internal/engine-core/src/mechanics/eb05-static.d.ts +3 -0
  274. package/dist/types/internal/engine-core/src/mechanics/eb05-triggers.d.ts +2 -0
  275. package/dist/types/internal/engine-core/src/mechanics/format-static.d.ts +2 -0
  276. package/dist/types/internal/engine-core/src/mechanics/format.d.ts +2 -0
  277. package/dist/types/internal/engine-core/src/mechanics/index.d.ts +15 -0
  278. package/dist/types/internal/engine-core/src/mechanics/op02.d.ts +2 -0
  279. package/dist/types/internal/engine-core/src/mechanics/op03-static.d.ts +2 -0
  280. package/dist/types/internal/engine-core/src/mechanics/op03.d.ts +2 -0
  281. package/dist/types/internal/engine-core/src/mechanics/op04-static.d.ts +2 -0
  282. package/dist/types/internal/engine-core/src/mechanics/op04.d.ts +2 -0
  283. package/dist/types/internal/engine-core/src/mechanics/op05-battle.d.ts +2 -0
  284. package/dist/types/internal/engine-core/src/mechanics/op05-main.d.ts +6 -0
  285. package/dist/types/internal/engine-core/src/mechanics/op05-on-play.d.ts +5 -0
  286. package/dist/types/internal/engine-core/src/mechanics/op05-reactions.d.ts +2 -0
  287. package/dist/types/internal/engine-core/src/mechanics/op05-replacements.d.ts +2 -0
  288. package/dist/types/internal/engine-core/src/mechanics/op05-shared.d.ts +17 -0
  289. package/dist/types/internal/engine-core/src/mechanics/op05-static.d.ts +2 -0
  290. package/dist/types/internal/engine-core/src/mechanics/op05-triggers.d.ts +2 -0
  291. package/dist/types/internal/engine-core/src/mechanics/op06-battle.d.ts +2 -0
  292. package/dist/types/internal/engine-core/src/mechanics/op06-main.d.ts +8 -0
  293. package/dist/types/internal/engine-core/src/mechanics/op06-on-play.d.ts +2 -0
  294. package/dist/types/internal/engine-core/src/mechanics/op06-reactions.d.ts +2 -0
  295. package/dist/types/internal/engine-core/src/mechanics/op06-shared.d.ts +18 -0
  296. package/dist/types/internal/engine-core/src/mechanics/op06-static.d.ts +3 -0
  297. package/dist/types/internal/engine-core/src/mechanics/op06-triggers.d.ts +2 -0
  298. package/dist/types/internal/engine-core/src/mechanics/op06-yamato.d.ts +2 -0
  299. package/dist/types/internal/engine-core/src/mechanics/op07-battle.d.ts +2 -0
  300. package/dist/types/internal/engine-core/src/mechanics/op07-main.d.ts +2 -0
  301. package/dist/types/internal/engine-core/src/mechanics/op07-on-play.d.ts +2 -0
  302. package/dist/types/internal/engine-core/src/mechanics/op07-reactions.d.ts +2 -0
  303. package/dist/types/internal/engine-core/src/mechanics/op07-replacements.d.ts +2 -0
  304. package/dist/types/internal/engine-core/src/mechanics/op07-shared.d.ts +19 -0
  305. package/dist/types/internal/engine-core/src/mechanics/op07-static.d.ts +3 -0
  306. package/dist/types/internal/engine-core/src/mechanics/op07-triggers.d.ts +2 -0
  307. package/dist/types/internal/engine-core/src/mechanics/op08-battle.d.ts +2 -0
  308. package/dist/types/internal/engine-core/src/mechanics/op08-main.d.ts +6 -0
  309. package/dist/types/internal/engine-core/src/mechanics/op08-on-play.d.ts +4 -0
  310. package/dist/types/internal/engine-core/src/mechanics/op08-reactions.d.ts +2 -0
  311. package/dist/types/internal/engine-core/src/mechanics/op08-replacements.d.ts +2 -0
  312. package/dist/types/internal/engine-core/src/mechanics/op08-shared.d.ts +14 -0
  313. package/dist/types/internal/engine-core/src/mechanics/op08-static.d.ts +3 -0
  314. package/dist/types/internal/engine-core/src/mechanics/op08-triggers.d.ts +10 -0
  315. package/dist/types/internal/engine-core/src/mechanics/op09-battle.d.ts +2 -0
  316. package/dist/types/internal/engine-core/src/mechanics/op09-main.d.ts +2 -0
  317. package/dist/types/internal/engine-core/src/mechanics/op09-on-play.d.ts +2 -0
  318. package/dist/types/internal/engine-core/src/mechanics/op09-reactions.d.ts +2 -0
  319. package/dist/types/internal/engine-core/src/mechanics/op09-replacements.d.ts +2 -0
  320. package/dist/types/internal/engine-core/src/mechanics/op09-shared.d.ts +4 -0
  321. package/dist/types/internal/engine-core/src/mechanics/op09-static.d.ts +3 -0
  322. package/dist/types/internal/engine-core/src/mechanics/op09-triggers.d.ts +2 -0
  323. package/dist/types/internal/engine-core/src/mechanics/op10-battle.d.ts +2 -0
  324. package/dist/types/internal/engine-core/src/mechanics/op10-main.d.ts +4 -0
  325. package/dist/types/internal/engine-core/src/mechanics/op10-on-play.d.ts +2 -0
  326. package/dist/types/internal/engine-core/src/mechanics/op10-reactions.d.ts +2 -0
  327. package/dist/types/internal/engine-core/src/mechanics/op10-replacements.d.ts +2 -0
  328. package/dist/types/internal/engine-core/src/mechanics/op10-shared.d.ts +8 -0
  329. package/dist/types/internal/engine-core/src/mechanics/op10-static.d.ts +3 -0
  330. package/dist/types/internal/engine-core/src/mechanics/op10-triggers.d.ts +2 -0
  331. package/dist/types/internal/engine-core/src/mechanics/op11-battle.d.ts +2 -0
  332. package/dist/types/internal/engine-core/src/mechanics/op11-main.d.ts +4 -0
  333. package/dist/types/internal/engine-core/src/mechanics/op11-on-play.d.ts +2 -0
  334. package/dist/types/internal/engine-core/src/mechanics/op11-reactions.d.ts +2 -0
  335. package/dist/types/internal/engine-core/src/mechanics/op11-replacements.d.ts +2 -0
  336. package/dist/types/internal/engine-core/src/mechanics/op11-shared.d.ts +9 -0
  337. package/dist/types/internal/engine-core/src/mechanics/op11-static.d.ts +3 -0
  338. package/dist/types/internal/engine-core/src/mechanics/op11-triggers.d.ts +2 -0
  339. package/dist/types/internal/engine-core/src/mechanics/op12-battle.d.ts +2 -0
  340. package/dist/types/internal/engine-core/src/mechanics/op12-main.d.ts +6 -0
  341. package/dist/types/internal/engine-core/src/mechanics/op12-on-play.d.ts +10 -0
  342. package/dist/types/internal/engine-core/src/mechanics/op12-reactions.d.ts +2 -0
  343. package/dist/types/internal/engine-core/src/mechanics/op12-replacements.d.ts +2 -0
  344. package/dist/types/internal/engine-core/src/mechanics/op12-rosinante.d.ts +2 -0
  345. package/dist/types/internal/engine-core/src/mechanics/op12-shared.d.ts +2 -0
  346. package/dist/types/internal/engine-core/src/mechanics/op12-static.d.ts +3 -0
  347. package/dist/types/internal/engine-core/src/mechanics/op12-triggers.d.ts +5 -0
  348. package/dist/types/internal/engine-core/src/mechanics/op13-battle.d.ts +4 -0
  349. package/dist/types/internal/engine-core/src/mechanics/op13-main.d.ts +8 -0
  350. package/dist/types/internal/engine-core/src/mechanics/op13-on-play.d.ts +5 -0
  351. package/dist/types/internal/engine-core/src/mechanics/op13-reactions.d.ts +2 -0
  352. package/dist/types/internal/engine-core/src/mechanics/op13-replacements.d.ts +2 -0
  353. package/dist/types/internal/engine-core/src/mechanics/op13-shared.d.ts +7 -0
  354. package/dist/types/internal/engine-core/src/mechanics/op13-static.d.ts +3 -0
  355. package/dist/types/internal/engine-core/src/mechanics/op13-triggers.d.ts +2 -0
  356. package/dist/types/internal/engine-core/src/mechanics/op14-battle.d.ts +2 -0
  357. package/dist/types/internal/engine-core/src/mechanics/op14-main.d.ts +4 -0
  358. package/dist/types/internal/engine-core/src/mechanics/op14-mihawk.d.ts +2 -0
  359. package/dist/types/internal/engine-core/src/mechanics/op14-on-play.d.ts +2 -0
  360. package/dist/types/internal/engine-core/src/mechanics/op14-reactions.d.ts +2 -0
  361. package/dist/types/internal/engine-core/src/mechanics/op14-replacements.d.ts +2 -0
  362. package/dist/types/internal/engine-core/src/mechanics/op14-shared.d.ts +7 -0
  363. package/dist/types/internal/engine-core/src/mechanics/op14-static.d.ts +2 -0
  364. package/dist/types/internal/engine-core/src/mechanics/op14-triggers.d.ts +2 -0
  365. package/dist/types/internal/engine-core/src/mechanics/op15-battle.d.ts +2 -0
  366. package/dist/types/internal/engine-core/src/mechanics/op15-main.d.ts +2 -0
  367. package/dist/types/internal/engine-core/src/mechanics/op15-on-play.d.ts +2 -0
  368. package/dist/types/internal/engine-core/src/mechanics/op15-reactions.d.ts +2 -0
  369. package/dist/types/internal/engine-core/src/mechanics/op15-shared.d.ts +4 -0
  370. package/dist/types/internal/engine-core/src/mechanics/op15-static.d.ts +3 -0
  371. package/dist/types/internal/engine-core/src/mechanics/op15-triggers.d.ts +2 -0
  372. package/dist/types/internal/engine-core/src/mechanics/op16-ace.d.ts +2 -0
  373. package/dist/types/internal/engine-core/src/mechanics/op16-battle.d.ts +2 -0
  374. package/dist/types/internal/engine-core/src/mechanics/op16-enel.d.ts +2 -0
  375. package/dist/types/internal/engine-core/src/mechanics/op16-luffy.d.ts +2 -0
  376. package/dist/types/internal/engine-core/src/mechanics/op16-main.d.ts +2 -0
  377. package/dist/types/internal/engine-core/src/mechanics/op16-nami.d.ts +2 -0
  378. package/dist/types/internal/engine-core/src/mechanics/op16-on-play.d.ts +2 -0
  379. package/dist/types/internal/engine-core/src/mechanics/op16-reactions.d.ts +2 -0
  380. package/dist/types/internal/engine-core/src/mechanics/op16-replacements.d.ts +2 -0
  381. package/dist/types/internal/engine-core/src/mechanics/op16-shared.d.ts +8 -0
  382. package/dist/types/internal/engine-core/src/mechanics/op16-static.d.ts +2 -0
  383. package/dist/types/internal/engine-core/src/mechanics/op16-teach.d.ts +2 -0
  384. package/dist/types/internal/engine-core/src/mechanics/op16-triggers.d.ts +4 -0
  385. package/dist/types/internal/engine-core/src/mechanics/op17-battle.d.ts +2 -0
  386. package/dist/types/internal/engine-core/src/mechanics/op17-kaido.d.ts +2 -0
  387. package/dist/types/internal/engine-core/src/mechanics/op17-luffy-ace.d.ts +2 -0
  388. package/dist/types/internal/engine-core/src/mechanics/op17-main.d.ts +2 -0
  389. package/dist/types/internal/engine-core/src/mechanics/op17-meta.d.ts +2 -0
  390. package/dist/types/internal/engine-core/src/mechanics/op17-on-play.d.ts +2 -0
  391. package/dist/types/internal/engine-core/src/mechanics/op17-replacements.d.ts +2 -0
  392. package/dist/types/internal/engine-core/src/mechanics/op17-static.d.ts +2 -0
  393. package/dist/types/internal/engine-core/src/mechanics/op17-triggers.d.ts +2 -0
  394. package/dist/types/internal/engine-core/src/mechanics/prb02-battle.d.ts +2 -0
  395. package/dist/types/internal/engine-core/src/mechanics/prb02-on-play.d.ts +2 -0
  396. package/dist/types/internal/engine-core/src/mechanics/prb02-replacements.d.ts +2 -0
  397. package/dist/types/internal/engine-core/src/mechanics/prb02-static.d.ts +2 -0
  398. package/dist/types/internal/engine-core/src/mechanics/prb02-triggers.d.ts +2 -0
  399. package/dist/types/internal/engine-core/src/mechanics/promo-battle.d.ts +2 -0
  400. package/dist/types/internal/engine-core/src/mechanics/promo-main.d.ts +6 -0
  401. package/dist/types/internal/engine-core/src/mechanics/promo-on-play.d.ts +2 -0
  402. package/dist/types/internal/engine-core/src/mechanics/promo-reactions.d.ts +2 -0
  403. package/dist/types/internal/engine-core/src/mechanics/promo-replacements.d.ts +2 -0
  404. package/dist/types/internal/engine-core/src/mechanics/promo-shared.d.ts +4 -0
  405. package/dist/types/internal/engine-core/src/mechanics/promo-static.d.ts +3 -0
  406. package/dist/types/internal/engine-core/src/mechanics/promo-triggers.d.ts +2 -0
  407. package/dist/types/internal/engine-core/src/mechanics/reaction-shared.d.ts +7 -0
  408. package/dist/types/internal/engine-core/src/mechanics/registry.d.ts +29 -0
  409. package/dist/types/internal/engine-core/src/mechanics/shared.d.ts +53 -0
  410. package/dist/types/internal/engine-core/src/mechanics/st-main.d.ts +2 -0
  411. package/dist/types/internal/engine-core/src/mechanics/st01.d.ts +2 -0
  412. package/dist/types/internal/engine-core/src/mechanics/st02.d.ts +2 -0
  413. package/dist/types/internal/engine-core/src/mechanics/st06.d.ts +2 -0
  414. package/dist/types/internal/engine-core/src/mechanics/st10-battle.d.ts +2 -0
  415. package/dist/types/internal/engine-core/src/mechanics/st10-main.d.ts +2 -0
  416. package/dist/types/internal/engine-core/src/mechanics/st10-on-play.d.ts +2 -0
  417. package/dist/types/internal/engine-core/src/mechanics/st10-reactions.d.ts +2 -0
  418. package/dist/types/internal/engine-core/src/mechanics/st10-shared.d.ts +5 -0
  419. package/dist/types/internal/engine-core/src/mechanics/st10-static.d.ts +2 -0
  420. package/dist/types/internal/engine-core/src/mechanics/st10-triggers.d.ts +2 -0
  421. package/dist/types/internal/engine-core/src/mechanics/st11.d.ts +2 -0
  422. package/dist/types/internal/engine-core/src/mechanics/st12-battle.d.ts +2 -0
  423. package/dist/types/internal/engine-core/src/mechanics/st12-main.d.ts +4 -0
  424. package/dist/types/internal/engine-core/src/mechanics/st12-on-play.d.ts +2 -0
  425. package/dist/types/internal/engine-core/src/mechanics/st12-shared.d.ts +2 -0
  426. package/dist/types/internal/engine-core/src/mechanics/st12-triggers.d.ts +2 -0
  427. package/dist/types/internal/engine-core/src/mechanics/st13-main.d.ts +2 -0
  428. package/dist/types/internal/engine-core/src/mechanics/st13-on-play.d.ts +2 -0
  429. package/dist/types/internal/engine-core/src/mechanics/st13-shared.d.ts +9 -0
  430. package/dist/types/internal/engine-core/src/mechanics/st13-static.d.ts +2 -0
  431. package/dist/types/internal/engine-core/src/mechanics/st13-triggers.d.ts +2 -0
  432. package/dist/types/internal/engine-core/src/mechanics/st14-battle.d.ts +2 -0
  433. package/dist/types/internal/engine-core/src/mechanics/st14-main.d.ts +2 -0
  434. package/dist/types/internal/engine-core/src/mechanics/st14-on-play.d.ts +2 -0
  435. package/dist/types/internal/engine-core/src/mechanics/st14-shared.d.ts +5 -0
  436. package/dist/types/internal/engine-core/src/mechanics/st14-static.d.ts +3 -0
  437. package/dist/types/internal/engine-core/src/mechanics/st14-triggers.d.ts +2 -0
  438. package/dist/types/internal/engine-core/src/mechanics/st15-static.d.ts +2 -0
  439. package/dist/types/internal/engine-core/src/mechanics/st15.d.ts +2 -0
  440. package/dist/types/internal/engine-core/src/mechanics/st16-static.d.ts +2 -0
  441. package/dist/types/internal/engine-core/src/mechanics/st16.d.ts +2 -0
  442. package/dist/types/internal/engine-core/src/mechanics/st17.d.ts +2 -0
  443. package/dist/types/internal/engine-core/src/mechanics/st18.d.ts +2 -0
  444. package/dist/types/internal/engine-core/src/mechanics/st19-static.d.ts +2 -0
  445. package/dist/types/internal/engine-core/src/mechanics/st19.d.ts +2 -0
  446. package/dist/types/internal/engine-core/src/mechanics/st20.d.ts +2 -0
  447. package/dist/types/internal/engine-core/src/mechanics/st21-battle.d.ts +2 -0
  448. package/dist/types/internal/engine-core/src/mechanics/st21-main.d.ts +2 -0
  449. package/dist/types/internal/engine-core/src/mechanics/st21-shared.d.ts +2 -0
  450. package/dist/types/internal/engine-core/src/mechanics/st21-static.d.ts +2 -0
  451. package/dist/types/internal/engine-core/src/mechanics/st21-triggers.d.ts +2 -0
  452. package/dist/types/internal/engine-core/src/mechanics/st21.d.ts +2 -0
  453. package/dist/types/internal/engine-core/src/mechanics/st22-battle.d.ts +2 -0
  454. package/dist/types/internal/engine-core/src/mechanics/st22-main.d.ts +2 -0
  455. package/dist/types/internal/engine-core/src/mechanics/st22-on-play.d.ts +2 -0
  456. package/dist/types/internal/engine-core/src/mechanics/st22-replacements.d.ts +2 -0
  457. package/dist/types/internal/engine-core/src/mechanics/st22-shared.d.ts +2 -0
  458. package/dist/types/internal/engine-core/src/mechanics/st22-triggers.d.ts +2 -0
  459. package/dist/types/internal/engine-core/src/mechanics/st23-static.d.ts +2 -0
  460. package/dist/types/internal/engine-core/src/mechanics/st23.d.ts +2 -0
  461. package/dist/types/internal/engine-core/src/mechanics/st24.d.ts +2 -0
  462. package/dist/types/internal/engine-core/src/mechanics/st25-static.d.ts +2 -0
  463. package/dist/types/internal/engine-core/src/mechanics/st25.d.ts +2 -0
  464. package/dist/types/internal/engine-core/src/mechanics/st26-static.d.ts +2 -0
  465. package/dist/types/internal/engine-core/src/mechanics/st26.d.ts +2 -0
  466. package/dist/types/internal/engine-core/src/mechanics/st27-static.d.ts +2 -0
  467. package/dist/types/internal/engine-core/src/mechanics/st27.d.ts +2 -0
  468. package/dist/types/internal/engine-core/src/mechanics/st28-static.d.ts +2 -0
  469. package/dist/types/internal/engine-core/src/mechanics/st29-battle.d.ts +4 -0
  470. package/dist/types/internal/engine-core/src/mechanics/st29-main.d.ts +2 -0
  471. package/dist/types/internal/engine-core/src/mechanics/st29-on-play.d.ts +2 -0
  472. package/dist/types/internal/engine-core/src/mechanics/st29-replacements.d.ts +2 -0
  473. package/dist/types/internal/engine-core/src/mechanics/st29-shared.d.ts +2 -0
  474. package/dist/types/internal/engine-core/src/mechanics/st29-static.d.ts +2 -0
  475. package/dist/types/internal/engine-core/src/mechanics/st29-triggers.d.ts +4 -0
  476. package/dist/types/internal/engine-core/src/mechanics/st30-battle.d.ts +2 -0
  477. package/dist/types/internal/engine-core/src/mechanics/st30-main.d.ts +2 -0
  478. package/dist/types/internal/engine-core/src/mechanics/st30-on-play.d.ts +2 -0
  479. package/dist/types/internal/engine-core/src/mechanics/st30-replacements.d.ts +2 -0
  480. package/dist/types/internal/engine-core/src/mechanics/st30-shared.d.ts +4 -0
  481. package/dist/types/internal/engine-core/src/mechanics/st30-static.d.ts +2 -0
  482. package/dist/types/internal/engine-core/src/mechanics/st30-triggers.d.ts +2 -0
  483. package/dist/types/internal/engine-core/src/mechanics/static-shared.d.ts +37 -0
  484. package/dist/types/internal/engine-core/src/mechanics/types.d.ts +177 -0
  485. package/dist/types/internal/engine-core/src/mechanics-replacements.d.ts +10 -0
  486. package/dist/types/internal/engine-core/src/mechanics.d.ts +45 -0
  487. package/dist/types/internal/engine-core/src/model.d.ts +719 -0
  488. package/dist/types/internal/engine-core/src/offered-action.d.ts +9 -0
  489. package/dist/types/internal/engine-core/src/on-play-handlers.d.ts +8 -0
  490. package/dist/types/internal/engine-core/src/pending.d.ts +13 -0
  491. package/dist/types/internal/engine-core/src/program-analysis.d.ts +26 -0
  492. package/dist/types/internal/engine-core/src/provenance.d.ts +8 -0
  493. package/dist/types/internal/engine-core/src/queries.d.ts +26 -0
  494. package/dist/types/internal/engine-core/src/random-walk.d.ts +7 -0
  495. package/dist/types/internal/engine-core/src/reaction-rules.d.ts +60 -0
  496. package/dist/types/internal/engine-core/src/removal.d.ts +16 -0
  497. package/dist/types/internal/engine-core/src/replacement-eligibility.d.ts +16 -0
  498. package/dist/types/internal/engine-core/src/replay.d.ts +21 -0
  499. package/dist/types/internal/engine-core/src/resolve-effect/context.d.ts +15 -0
  500. package/dist/types/internal/engine-core/src/resolve-effect/costs.d.ts +10 -0
  501. package/dist/types/internal/engine-core/src/resolve-effect/deck.d.ts +6 -0
  502. package/dist/types/internal/engine-core/src/resolve-effect/discards.d.ts +11 -0
  503. package/dist/types/internal/engine-core/src/resolve-effect/don.d.ts +4 -0
  504. package/dist/types/internal/engine-core/src/resolve-effect/index.d.ts +3 -0
  505. package/dist/types/internal/engine-core/src/resolve-effect/leaders.d.ts +6 -0
  506. package/dist/types/internal/engine-core/src/resolve-effect/life.d.ts +6 -0
  507. package/dist/types/internal/engine-core/src/resolve-effect/mechanic-choice.d.ts +3 -0
  508. package/dist/types/internal/engine-core/src/resolve-effect/plays.d.ts +5 -0
  509. package/dist/types/internal/engine-core/src/resolve-effect/removal.d.ts +7 -0
  510. package/dist/types/internal/engine-core/src/resolve-effect/replacements.d.ts +7 -0
  511. package/dist/types/internal/engine-core/src/resolve-effect/restrictions.d.ts +7 -0
  512. package/dist/types/internal/engine-core/src/rng.d.ts +1 -0
  513. package/dist/types/internal/engine-core/src/rules-version.d.ts +1 -0
  514. package/dist/types/internal/engine-core/src/service.d.ts +25 -0
  515. package/dist/types/internal/engine-core/src/sha256.d.ts +1 -0
  516. package/dist/types/internal/engine-core/src/simulate.d.ts +19 -0
  517. package/dist/types/internal/engine-core/src/static-abilities.d.ts +102 -0
  518. package/dist/types/internal/engine-core/src/time-limit.d.ts +7 -0
  519. package/dist/types/internal/engine-core/src/turn.d.ts +9 -0
  520. package/dist/types/internal/protocol/src/index.d.ts +756 -0
  521. package/dist/types/internal/protocol/src/rng.d.ts +12 -0
  522. package/dist/types/internal/protocol/src/sha256.d.ts +3 -0
  523. package/dist/types/internal/protocol/src/version.d.ts +1 -0
  524. package/dist/types/protocol.d.ts +1 -0
  525. package/package.json +44 -3
@@ -0,0 +1,57 @@
1
+ import { type CardDatabase, type ClauseMarker } from "../../cards/src/index.js";
2
+ import type { PlayerId, PublicEvent } from "../../protocol/src/index.js";
3
+ import { type MechanicContext, type MechanicEffect, type MechanicInvocation, type MechanicPendingChoice, type MechanicProgram, type MechanicSignal } from "./mechanics.js";
4
+ import type { CardInstance, GameState } from "./model.js";
5
+ import type { ActivateMainProgram, CounterEventProgram, EventMainProgram, LeaderWatcherProgram, OnOpponentAttackProgram, WhenAttackingProgram, WhenRestedProgram } from "./mechanics/types.js";
6
+ export type { ActivateMainProgram, CounterEventProgram, EventMainProgram, LeaderWatcherProgram, OnOpponentAttackProgram, WhenAttackingProgram, WhenRestedProgram, } from "./mechanics/types.js";
7
+ export declare function getCounterEventProgram(cardNumber: string): CounterEventProgram | undefined;
8
+ export declare function getOnOpponentAttackProgram(cardNumber: string): OnOpponentAttackProgram | undefined;
9
+ export declare function getLeaderWatcherProgram(cardNumber: string): LeaderWatcherProgram | undefined;
10
+ export declare function getActivateMainProgram(cardNumber: string): ActivateMainProgram | undefined;
11
+ export declare function getWhenAttackingMechanicProgram(cardNumber: string): WhenAttackingProgram | undefined;
12
+ export declare function getWhenRestedProgram(cardNumber: string): WhenRestedProgram | undefined;
13
+ export declare function whenRestedInvocation(state: GameState, ownerId: PlayerId, card: CardInstance, restedBy?: {
14
+ sourcePlayerId: PlayerId;
15
+ sourceIsCharacter: boolean;
16
+ }): MechanicInvocation | null;
17
+ export declare function getEventMainProgram(cardNumber: string): EventMainProgram | undefined;
18
+ export declare function onBlockInvocation(state: GameState, playerId: PlayerId, card: CardInstance): {
19
+ invocation: MechanicInvocation;
20
+ oncePerTurnKey: string;
21
+ } | null;
22
+ export declare function getOnEndOfYourTurnMechanicProgram(cardNumber: string): MechanicProgram | undefined;
23
+ export declare function getOnStartOfYourTurnMechanicProgram(cardNumber: string): MechanicProgram | undefined;
24
+ export declare function mechanicProgramCards(): ReadonlySet<string>;
25
+ export interface DonCountReaders {
26
+ reactions: ReadonlySet<string>;
27
+ ceilings: ReadonlySet<string>;
28
+ ramps: ReadonlyMap<string, number>;
29
+ opponent: ReadonlySet<string>;
30
+ }
31
+ export declare function donCountReaders(): DonCountReaders;
32
+ export declare function mechanicProgramsByClause(): ReadonlyMap<string, ReadonlySet<string>>;
33
+ export declare function getOnPlayMechanicProgram(cardNumber: string): MechanicProgram | undefined;
34
+ export declare function getOnKoMechanicProgram(cardNumber: string, cause?: "battle" | "effect", byOwnEffect?: boolean): MechanicProgram | undefined;
35
+ export declare function mechanicProgramEffects<K extends MechanicEffect["kind"]>(program: MechanicProgram, kind: K): readonly Extract<MechanicEffect, {
36
+ kind: K;
37
+ }>[];
38
+ export declare function getTriggerMechanicProgram(cardNumber: string): MechanicProgram | undefined;
39
+ export declare function triggerProgramCanAct(state: GameState, playerId: PlayerId, card: CardInstance, db?: CardDatabase): boolean;
40
+ export declare function programCanAct(state: GameState, context: MechanicContext, program: MechanicProgram, db?: CardDatabase, bindings?: Record<string, string[]>): boolean;
41
+ export declare function leaderReactionSpent(state: GameState, playerId: PlayerId): boolean;
42
+ export declare function applyMechanicReactions(state: GameState, signals: readonly MechanicSignal[], db?: CardDatabase): MechanicDispatchResult;
43
+ export declare function getMechanicSignalInvocations(state: GameState, signals: readonly MechanicSignal[], includeOnKo?: boolean, db?: CardDatabase, includeOnPlay?: boolean): MechanicInvocation[];
44
+ export declare function onceKeyOf(effect: MechanicEffect | undefined): string | undefined;
45
+ export declare function orderSimultaneous(state: GameState, invocations: readonly MechanicInvocation[]): MechanicInvocation[];
46
+ export interface MechanicDispatchResult {
47
+ pending: MechanicPendingChoice | null;
48
+ invocation: MechanicInvocation | null;
49
+ continuations: MechanicInvocation[];
50
+ events: PublicEvent[];
51
+ }
52
+ export declare function dispatchMechanicInvocations(state: GameState, queued: readonly MechanicInvocation[], db?: CardDatabase): MechanicDispatchResult;
53
+ export declare const duringEffect: (invocation: MechanicInvocation) => MechanicInvocation;
54
+ export declare function withoutDuringEffect(invocation: MechanicInvocation): MechanicInvocation;
55
+ export declare function dispatchMechanicSignals(state: GameState, signals: readonly MechanicSignal[], db?: CardDatabase): MechanicDispatchResult;
56
+ export declare function optionalClauseMarker(cardNumber: string): ClauseMarker | undefined;
57
+ export declare function isClauseOpeningOptional(cardNumber: string, effect: unknown): boolean;
@@ -0,0 +1 @@
1
+ export declare function cloneGameData<T>(value: T): T;
@@ -0,0 +1,3 @@
1
+ import type { MechanicCondition } from "./mechanics.js";
2
+ export declare function describeMechanicCondition(condition: MechanicCondition): string | null;
3
+ export declare function conditionFixedForGame(condition: MechanicCondition): boolean;
@@ -0,0 +1,8 @@
1
+ import type { PlayerId } from "../../protocol/src/index.js";
2
+ import type { BoardCard, GameState } from "./model.js";
3
+ export interface DamageReplacementProgram {
4
+ cost: "trash-self";
5
+ }
6
+ export declare function registerDamageReplacements(programs: ReadonlyMap<string, DamageReplacementProgram>): void;
7
+ export declare function damageReplacementProtectors(state: GameState, playerId: PlayerId): BoardCard[];
8
+ export declare const damageReplacementOption: (instanceId: string) => string;
@@ -0,0 +1,18 @@
1
+ import type { PlayerId, PublicEvent } from "../../protocol/src/index.js";
2
+ import type { GameState } from "./model.js";
3
+ export declare const DON_POOL_ACTIVE = "active";
4
+ export declare const DON_POOL_RESTED = "rested";
5
+ export declare function fieldDonCount(state: GameState, playerId: PlayerId): number;
6
+ export declare function addDonFromDeck(state: GameState, playerId: PlayerId, count: number, posture: "active" | "rested"): number;
7
+ export declare function donReturnedReactionCards(): readonly string[];
8
+ export declare function returnDonToDeck(state: GameState, playerId: PlayerId, count: number, source: {
9
+ cardNumber: string;
10
+ instanceId: string;
11
+ }, events: PublicEvent[], from?: "active"): number;
12
+ export declare function donReturnPools(state: GameState, playerId: PlayerId, unplacedOrigins: readonly string[], onFieldAtPayment?: readonly string[]): string[];
13
+ export declare function donReturnHasChoice(state: GameState, playerId: PlayerId, unplacedOrigins: readonly string[], onFieldAtPayment?: readonly string[]): boolean;
14
+ export declare function donPoolSize(state: GameState, playerId: PlayerId, pool: string, onFieldAtPayment?: readonly string[]): number;
15
+ export declare const DON_CARD_NUMBER = "DON!!";
16
+ export declare function activeDonOwner(state: GameState, instanceId: string): PlayerId | undefined;
17
+ export declare function fieldDonIds(state: GameState, playerId: PlayerId): string[];
18
+ export declare function placeReturnedDon(state: GameState, playerId: PlayerId, origins: readonly string[], pool: string, onFieldAtPayment?: readonly string[]): string[];
@@ -0,0 +1,4 @@
1
+ import { type CardDatabase } from "../../cards/src/index.js";
2
+ import type { EffectOption, PlayerId } from "../../protocol/src/index.js";
3
+ import type { GameState } from "./model.js";
4
+ export declare function describeEffectOption(state: GameState, decidingPlayerId: PlayerId, optionId: string, db?: CardDatabase): EffectOption;
@@ -0,0 +1,50 @@
1
+ import { type CardDatabase } from "../../cards/src/index.js";
2
+ import type { PlayerId, PublicEvent } from "../../protocol/src/index.js";
3
+ import { type MechanicInvocation, type MechanicPendingChoice, type MechanicProgram } from "./mechanics.js";
4
+ import type { CardInstance, GameState, PendingEffect } from "./model.js";
5
+ export { onPlayHandlerCards, hasOnPlayHandler, runOnPlayHandler, } from "./on-play-handlers.js";
6
+ export interface OnPlayResult {
7
+ pending: PendingEffect | null;
8
+ events: PublicEvent[];
9
+ }
10
+ export declare function placeCharacter(state: GameState, playerId: PlayerId, card: CardInstance, rested?: boolean, db?: CardDatabase): OnPlayResult;
11
+ export declare function mechanicPendingEffect(invocation: MechanicInvocation, choice: MechanicPendingChoice, continuations: MechanicInvocation[], endOfTurn?: boolean, activatedBy?: PlayerId): PendingEffect;
12
+ export declare const leaderInstanceId: (playerId: PlayerId) => string;
13
+ export declare const opponentOf: (playerId: PlayerId) => PlayerId;
14
+ export declare const isSlash: (cardNumber: string, db: CardDatabase) => boolean;
15
+ export declare const effectSource: (effect: {
16
+ sourceCardNumber: string;
17
+ sourceInstanceId: string;
18
+ }) => CardInstance;
19
+ export declare function drawCards(state: GameState, playerId: PlayerId, count: number, sourceCardNumber?: string): PublicEvent[];
20
+ export declare function applyPowerModifier(state: GameState, playerId: PlayerId, targetInstanceId: string, amount: number, expiresAtTurn: number, source?: CardInstance): void;
21
+ export declare function fieldStrawHatCount(state: GameState, playerId: PlayerId, db: CardDatabase): number;
22
+ export declare function searchTopFive(state: GameState, playerId: PlayerId, source: CardInstance, excludeName: string | undefined, db: CardDatabase): PendingEffect;
23
+ export declare function searchBigMomTopThree(state: GameState, playerId: PlayerId, source: CardInstance, db: CardDatabase): PendingEffect;
24
+ export declare function searchImpelDownTopThree(state: GameState, playerId: PlayerId, source: CardInstance, db: CardDatabase): PendingEffect;
25
+ export declare function createSupernovaSearch(state: GameState, playerId: PlayerId, source: CardInstance, charactersOnly: boolean, db?: CardDatabase): Extract<PendingEffect, {
26
+ kind: "search-top-five";
27
+ }>;
28
+ export declare function createPuddingSearch(state: GameState, playerId: PlayerId, source: CardInstance, db?: CardDatabase): PendingEffect;
29
+ export declare function createEnelSearch(state: GameState, playerId: PlayerId, source: CardInstance): PendingEffect;
30
+ export declare function createHiyoriSearch(state: GameState, playerId: PlayerId, source: CardInstance, db?: CardDatabase): PendingEffect;
31
+ export declare function createOnKoEffect(state: GameState, playerId: PlayerId, source: CardInstance, resumePlayerId: PlayerId, db?: CardDatabase): PendingEffect | null;
32
+ export declare function createOnKoResult(state: GameState, playerId: PlayerId, source: CardInstance, resumePlayerId: PlayerId, db?: CardDatabase, cause?: "battle" | "effect"): OnPlayResult;
33
+ export declare function createOnEndOfYourTurnResult(state: GameState, playerId: PlayerId, source: CardInstance, db?: CardDatabase): OnPlayResult;
34
+ export declare function runEndOfTurnProgram(state: GameState, playerId: PlayerId, source: CardInstance, mechanicProgram: MechanicProgram, db?: CardDatabase, bindings?: Record<string, string[]>): OnPlayResult;
35
+ export declare function createOnStartOfYourTurnResult(state: GameState, playerId: PlayerId, source: CardInstance, db?: CardDatabase): OnPlayResult;
36
+ export declare function createTriggerResult(state: GameState, playerId: PlayerId, source: CardInstance, db?: CardDatabase, reactions?: readonly MechanicInvocation[], held?: readonly MechanicInvocation[]): OnPlayResult;
37
+ export declare function restEffect(state: GameState, playerId: PlayerId, source: CardInstance, maxCost: number, remaining?: number, afterRest?: "give-three-don-to-leader" | "schedule-active-don"): PendingEffect | null;
38
+ export declare function triggerPerona(state: GameState, playerId: PlayerId): PublicEvent[];
39
+ export declare function applyAfterRest(state: GameState, playerId: PlayerId, afterRest: "give-three-don-to-leader" | "schedule-active-don" | undefined): PublicEvent[];
40
+ export declare function queuePendingContinuations(state: GameState, invocations: readonly MechanicInvocation[]): void;
41
+ export declare function releaseDamageReactions(state: GameState): void;
42
+ export declare function drainPendingContinuations(state: GameState, db?: CardDatabase): PublicEvent[];
43
+ export declare function createOnPlayEffect(state: GameState, playerId: PlayerId, source: CardInstance, db?: CardDatabase): OnPlayResult;
44
+ interface EffectOption {
45
+ optionId: string;
46
+ summary: string;
47
+ optionCardNumber?: string;
48
+ }
49
+ export declare function getEffectOptions(state: GameState, db?: CardDatabase): EffectOption[];
50
+ export declare function resolveEffect(state: GameState, optionId: string, db?: CardDatabase): PublicEvent[];
@@ -0,0 +1,31 @@
1
+ import { type CardDatabase } from "../../cards/src/index.js";
2
+ import { type GameObservation, type LegalAction, type PlayerId, type ResolvedDeck, type TimeLimit } from "../../protocol/src/index.js";
3
+ import type { GameAction, GameState, TransitionResult } from "./model.js";
4
+ export interface Callback<T> {
5
+ handle(event: T): void;
6
+ readonly readOnly?: boolean;
7
+ }
8
+ export interface GameTransitionEvent {
9
+ previousState: GameState;
10
+ action: GameAction;
11
+ legalAction: LegalAction;
12
+ result: TransitionResult;
13
+ }
14
+ export declare function notifyCallbacks<T>(callbacks: readonly Callback<T>[], event: T, clone?: (event: T) => T): unknown[];
15
+ export declare function cloneTransitionEvent(event: GameTransitionEvent): GameTransitionEvent;
16
+ export declare function createGame(input: {
17
+ gameId: string;
18
+ p1: ResolvedDeck;
19
+ p2: ResolvedDeck;
20
+ seed: string;
21
+ seedMode?: "seat" | "matchup";
22
+ startingPlayer?: PlayerId | "random";
23
+ cards?: CardDatabase;
24
+ timeLimit?: TimeLimit;
25
+ }): GameState;
26
+ export declare function getLegalActions(state: GameState, playerId: PlayerId, db?: CardDatabase): LegalAction[];
27
+ export declare function canActivate(state: GameState, playerId: PlayerId, sourceInstanceId: string): boolean;
28
+ export declare function applyAction(current: GameState, action: GameAction, db?: CardDatabase): TransitionResult;
29
+ export declare function applyOfferedAction(current: GameState, action: GameAction, offered: LegalAction | undefined, db?: CardDatabase): TransitionResult;
30
+ export declare function observe(state: GameState, viewer: PlayerId, db?: CardDatabase, legalActions?: LegalAction[]): GameObservation;
31
+ export declare function hashedPosition(state: GameState): Partial<GameState>;
@@ -0,0 +1,4 @@
1
+ export declare class EngineError extends Error {
2
+ readonly code: "STALE_ACTION" | "ILLEGAL_ACTION" | "GAME_FINISHED";
3
+ constructor(code: "STALE_ACTION" | "ILLEGAL_ACTION" | "GAME_FINISHED", message: string);
4
+ }
@@ -0,0 +1,14 @@
1
+ import type { GrantableKeyword, PlayerId, PublicEvent, TimeLimitProcedure } from "../../protocol/src/index.js";
2
+ export declare function formatCompactStat(value: number): string;
3
+ export declare function gameEndText(reason: string, procedure?: TimeLimitProcedure | null): string;
4
+ export declare function seat(playerId: PlayerId, viewer: PlayerId | undefined): string;
5
+ export declare function seatOwns(playerId: PlayerId, viewer: PlayerId | undefined): string;
6
+ export declare function cardLabel(cardNumber: string | null): string;
7
+ export declare function sourceSuffix(sourceCardNumber: string | undefined): string;
8
+ export type CardInstanceNames = ReadonlyMap<string, string>;
9
+ export declare function collectCardInstances(events: readonly PublicEvent[], seed?: readonly (readonly [string, string])[]): Map<string, string>;
10
+ export declare const GRANTED_KEYWORD_CONSEQUENCE: Record<GrantableKeyword, string>;
11
+ export declare function restrictionClause(event: Extract<PublicEvent, {
12
+ type: "player-restricted";
13
+ }>, subject: string, possessive: string): string;
14
+ export declare function eventText(event: PublicEvent, viewer?: PlayerId, names?: CardInstanceNames): string;
@@ -0,0 +1,7 @@
1
+ import { type CardDatabase } from "../../cards/src/index.js";
2
+ import type { PlayerId } from "../../protocol/src/index.js";
3
+ import type { GameState } from "./model.js";
4
+ export declare function playCostFromHand(state: GameState, playerId: PlayerId, cardNumber: string, printedCost: number, options?: {
5
+ spend: boolean;
6
+ }, db?: CardDatabase): number;
7
+ export declare function eventActivationCost(state: GameState, playerId: PlayerId, cardNumber: string, programCost: number, db?: CardDatabase): number;
@@ -0,0 +1,26 @@
1
+ export { EngineError } from "./errors.js";
2
+ export { applyAction, applyOfferedAction, createGame, getLegalActions, observe, type Callback, type GameTransitionEvent, } from "./engine.js";
3
+ export { canAttack, counterEventPower, couldAttackThisTurn, hasKeyword, } from "./board.js";
4
+ export type { ResolvedDeck } from "../../protocol/src/index.js";
5
+ export type { ActiveAttack, BoardCard, CardInstance, GameState, RngState, } from "./model.js";
6
+ export { GameService } from "./service.js";
7
+ export { battleAttackPower, currentPower, donPowerApplies, effectiveCost, recordDeckTopKnowledge, searchRevealIsPublic, } from "./queries.js";
8
+ export { fieldDonCount, returnDonToDeck } from "./don.js";
9
+ export { playCostFromHand } from "./hand-price.js";
10
+ export { createOnKoEffect, createOnKoResult, createOnPlayEffect, hasOnPlayHandler, onPlayHandlerCards, runOnPlayHandler, createTriggerResult, getEffectOptions, resolveEffect, } from "./effects.js";
11
+ export { executeMechanicProgram, getMechanicChoiceOptions, resolveMechanicChoice, programBuffsOwnPowerForTheTurn, type MechanicInvocation, type MechanicProgram, } from "./mechanics.js";
12
+ export { dispatchMechanicInvocations, donCountReaders, type DonCountReaders, mechanicProgramCards, mechanicProgramsByClause, mechanicProgramEffects, getOnKoMechanicProgram, getOnPlayMechanicProgram, } from "./card-mechanics.js";
13
+ export { mergeSetMechanics, type MergedMechanics, type SetMechanics, } from "./mechanics/registry.js";
14
+ export { leaderEffectsNegated, STATIC_ABILITIES } from "./static-abilities.js";
15
+ export { knockOut, replacementOptionsFor } from "./removal.js";
16
+ export { cardLabel, collectCardInstances, eventText, formatCompactStat, gameEndText, restrictionClause, seat, seatOwns, sourceSuffix, GRANTED_KEYWORD_CONSEQUENCE, type CardInstanceNames, } from "./event-text.js";
17
+ export { canonicalJson, hashState } from "./canonical.js";
18
+ export { cloneGameData } from "./clone.js";
19
+ export { RULES_VERSION, describeStampMismatch, rulesStamp, type RulesStamp, } from "./provenance.js";
20
+ export { nextInt, seedRng } from "./rng.js";
21
+ export { sha256Hex } from "./sha256.js";
22
+ export { findOfferedAction, reorderAction } from "./offered-action.js";
23
+ export { replayActions, type ReplayCheckpoint, type ReplayFixture, } from "./replay.js";
24
+ export { simulateAction, simulateLine, toGameAction, type Plan, type Simulate, type SimulatedLine, } from "./simulate.js";
25
+ export { walkLegalActions } from "./random-walk.js";
26
+ export { GameInvariantError, assertGameStateInvariants } from "./invariants.js";
@@ -0,0 +1,10 @@
1
+ import { type CardDatabase } from "../../cards/src/index.js";
2
+ import type { GameState } from "./model.js";
3
+ export declare class GameInvariantError extends Error {
4
+ constructor(message: string);
5
+ }
6
+ export declare function assertGameStateInvariants(state: GameState, options?: {
7
+ exactDonCount?: boolean;
8
+ uniqueIdentities?: boolean;
9
+ }, db?: CardDatabase): void;
10
+ export declare function assertTransitionInvariants(previous: GameState, next: GameState): void;
@@ -0,0 +1,13 @@
1
+ import type { MechanicEffect, MechanicProgram } from "../mechanics.js";
2
+ import { type ActionCost, type PayoffKind } from "../../../protocol/src/index.js";
3
+ export declare function costOfEffect(effect: MechanicEffect): ActionCost | undefined;
4
+ export declare function costOfProgram(program: MechanicProgram): ActionCost | undefined;
5
+ export declare function donAddedByProgram(program: MechanicProgram): {
6
+ active: number;
7
+ rested: number;
8
+ } | undefined;
9
+ export declare function donAddedByOptionalPayoff(effect: MechanicEffect): {
10
+ active: number;
11
+ rested: number;
12
+ } | undefined;
13
+ export declare function payoffOfEffect(effect: MechanicEffect): readonly PayoffKind[] | undefined;
@@ -0,0 +1,4 @@
1
+ import { type GameState } from "../model.js";
2
+ import { type CardDatabase } from "../../../cards/src/index.js";
3
+ import { type LegalAction, type PlayerId } from "../../../protocol/src/index.js";
4
+ export declare function blockActions(state: GameState, playerId: PlayerId, db?: CardDatabase): LegalAction[];
@@ -0,0 +1,4 @@
1
+ import { type GameState } from "../model.js";
2
+ import { type CardDatabase } from "../../../cards/src/index.js";
3
+ import { type LegalAction, type PlayerId } from "../../../protocol/src/index.js";
4
+ export declare function counterActions(state: GameState, playerId: PlayerId, db?: CardDatabase): LegalAction[];
@@ -0,0 +1,6 @@
1
+ export { blockActions } from "./block.js";
2
+ export { counterActions } from "./counter.js";
3
+ export { mainActions } from "./main/index.js";
4
+ export { mulliganActions } from "./mulligan.js";
5
+ export { pendingEffectActions } from "./pending-effect.js";
6
+ export { triggerActions } from "./trigger.js";
@@ -0,0 +1,4 @@
1
+ import type { GameState } from "../../model.js";
2
+ import { type CardDatabase } from "../../../../cards/src/index.js";
3
+ import type { LegalAction, PlayerId } from "../../../../protocol/src/index.js";
4
+ export declare function mechanicActivationOffers(state: GameState, playerId: PlayerId, db: CardDatabase): LegalAction[];
@@ -0,0 +1,4 @@
1
+ import type { GameState } from "../../model.js";
2
+ import { type CardDatabase } from "../../../../cards/src/index.js";
3
+ import type { LegalAction, PlayerId } from "../../../../protocol/src/index.js";
4
+ export declare function attackOffers(state: GameState, playerId: PlayerId, db: CardDatabase): LegalAction[];
@@ -0,0 +1,4 @@
1
+ import type { GameState } from "../../model.js";
2
+ import type { CardDatabase } from "../../../../cards/src/index.js";
3
+ import type { LegalAction, PlayerId } from "../../../../protocol/src/index.js";
4
+ export declare function donOffers(state: GameState, playerId: PlayerId, db: CardDatabase): LegalAction[];
@@ -0,0 +1,4 @@
1
+ import type { GameState } from "../../model.js";
2
+ import type { CardDatabase } from "../../../../cards/src/index.js";
3
+ import type { LegalAction, PlayerId } from "../../../../protocol/src/index.js";
4
+ export declare function handOffers(state: GameState, playerId: PlayerId, db: CardDatabase): LegalAction[];
@@ -0,0 +1,4 @@
1
+ import { type CardDatabase } from "../../../../cards/src/index.js";
2
+ import { type LegalAction, type PlayerId } from "../../../../protocol/src/index.js";
3
+ import { type GameState } from "../../model.js";
4
+ export declare function mainActions(state: GameState, playerId: PlayerId, db?: CardDatabase): LegalAction[];
@@ -0,0 +1,3 @@
1
+ import type { GameState } from "../../model.js";
2
+ import type { LegalAction, PlayerId } from "../../../../protocol/src/index.js";
3
+ export declare function passOffer(state: GameState, playerId: PlayerId, actions: readonly LegalAction[]): LegalAction;
@@ -0,0 +1,3 @@
1
+ import { type GameState } from "../model.js";
2
+ import { type LegalAction } from "../../../protocol/src/index.js";
3
+ export declare function mulliganActions(state: GameState): LegalAction[];
@@ -0,0 +1,4 @@
1
+ import { type CardDatabase } from "../../../cards/src/index.js";
2
+ import { type GameState } from "../model.js";
3
+ import { type LegalAction, type PlayerId } from "../../../protocol/src/index.js";
4
+ export declare function pendingEffectActions(state: GameState, playerId: PlayerId, db?: CardDatabase): LegalAction[];
@@ -0,0 +1,3 @@
1
+ import { type GameState } from "../model.js";
2
+ import { type LegalAction } from "../../../protocol/src/index.js";
3
+ export declare function triggerActions(state: GameState): LegalAction[];
@@ -0,0 +1,27 @@
1
+ import type { CardZoneName, PlayerId, PublicEvent } from "../../protocol/src/index.js";
2
+ import type { CardInstance, GameState } from "./model.js";
3
+ import { faceUpLifeBanksToDeck } from "./static-abilities.js";
4
+ export declare function bankDamagedLifeCard(state: GameState, playerId: PlayerId, card: CardInstance, db?: Parameters<typeof faceUpLifeBanksToDeck>[2]): PublicEvent[];
5
+ export type LifePosition = "top" | "bottom";
6
+ export declare function addToLife(state: GameState, playerId: PlayerId, card: CardInstance, options: {
7
+ from: CardZoneName;
8
+ position?: LifePosition;
9
+ faceUp?: boolean;
10
+ sourceCardNumber?: string;
11
+ }): PublicEvent[];
12
+ export declare function takeFromLife(state: GameState, playerId: PlayerId, instanceId: string, options: {
13
+ to: CardZoneName;
14
+ sourceCardNumber?: string;
15
+ }): {
16
+ card: CardInstance;
17
+ events: PublicEvent[];
18
+ } | null;
19
+ export declare function takeLifeAt(state: GameState, playerId: PlayerId, position: LifePosition, options: {
20
+ to: CardZoneName;
21
+ sourceCardNumber?: string;
22
+ }): {
23
+ card: CardInstance;
24
+ events: PublicEvent[];
25
+ } | null;
26
+ export declare function dealDamage(state: GameState, playerId: PlayerId, banish?: boolean): PublicEvent[];
27
+ export declare function flipLife(state: GameState, playerId: PlayerId, instanceId: string, faceUp: boolean, sourceCardNumber?: string): PublicEvent[];
@@ -0,0 +1,14 @@
1
+ import { type CardDatabase } from "../../cards/src/index.js";
2
+ import type { GameState } from "./model.js";
3
+ import type { MechanicPendingChoice, MechanicResult } from "./mechanic-dsl.js";
4
+ type GiftChoice = Extract<MechanicPendingChoice, {
5
+ kind: "give-rested-don";
6
+ }>;
7
+ export declare function parseGiftOption(state: GameState, pending: GiftChoice, optionId: string): {
8
+ recipient: string;
9
+ count: number;
10
+ } | undefined;
11
+ export declare function getMechanicChoiceOptions(state: GameState, pending: MechanicPendingChoice, db?: CardDatabase): string[];
12
+ export declare function takeForcedChoices(state: GameState, pending: MechanicPendingChoice, db: CardDatabase): void;
13
+ export declare function resolveMechanicChoice(state: GameState, pending: MechanicPendingChoice, optionId: string, db?: CardDatabase): MechanicResult;
14
+ export {};
@@ -0,0 +1,21 @@
1
+ import { type CardDatabase } from "../../cards/src/index.js";
2
+ import type { PlayerId } from "../../protocol/src/index.js";
3
+ import type { BasePowerSetter, BoardCard, CardInstance, GameState } from "./model.js";
4
+ import { type CardSelector, type MechanicCondition, type MechanicContext, type MechanicEffect, type MechanicExecution, type MechanicProgram } from "./mechanic-dsl.js";
5
+ export declare function boardCardAttributes(state: GameState, card: BoardCard, db?: CardDatabase): readonly string[];
6
+ export declare function givenDonOfBinding(state: GameState, execution: MechanicExecution, binding: string): number;
7
+ export declare function printedCostOfBinding(state: GameState, execution: MechanicExecution, binding: string, db: CardDatabase): number;
8
+ export declare function stagePlay(state: GameState, instanceId: string, context: MechanicContext, db: CardDatabase): boolean;
9
+ export declare function eventPlay(state: GameState, instanceId: string, db: CardDatabase): boolean;
10
+ export declare function selectCards(state: GameState, context: MechanicContext, selector: CardSelector, bindings: Record<string, string[]>, db?: CardDatabase): CardInstance[];
11
+ export declare function baseCardPower(state: GameState, instanceId: string, db: CardDatabase): number | undefined;
12
+ export declare function addBasePowerSetter(state: GameState, instanceId: string, setter: BasePowerSetter, db: CardDatabase): {
13
+ owner: PlayerId;
14
+ outrankedBy?: number;
15
+ } | undefined;
16
+ export declare function setBaseCardPower(state: GameState, instanceId: string, value: number, scope: "turn" | "battle", db: CardDatabase): void;
17
+ export declare function currentPowerOfBoardCard(state: GameState, playerId: PlayerId, instanceId: string, db: CardDatabase): number;
18
+ export declare function conditionMatches(state: GameState, context: MechanicContext, condition: MechanicCondition, bindings: Record<string, string[]>, db?: CardDatabase): boolean;
19
+ export declare function bareGateCondition(program: MechanicProgram): MechanicCondition | null;
20
+ export declare function programSelectsNothing(state: GameState, context: MechanicContext, program: MechanicProgram, db?: CardDatabase): boolean;
21
+ export declare function stepIsPriceOnly(context: MechanicContext, effect: MechanicEffect): boolean;