@firestone-hs/simulate-bgs-battle 1.1.501 → 1.1.503

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 (324) hide show
  1. package/dist/bgs-player-entity.d.ts +6 -0
  2. package/dist/bgs-player-entity.js.map +1 -1
  3. package/dist/cards/card.interface.d.ts +114 -1
  4. package/dist/cards/card.interface.js +47 -0
  5. package/dist/cards/card.interface.js.map +1 -1
  6. package/dist/cards/cards-data.d.ts +5 -1
  7. package/dist/cards/cards-data.js +39 -6
  8. package/dist/cards/cards-data.js.map +1 -1
  9. package/dist/cards/impl/_card-mappings.d.ts +4 -0
  10. package/dist/cards/impl/_card-mappings.js +154 -0
  11. package/dist/cards/impl/_card-mappings.js.map +1 -0
  12. package/dist/cards/impl/anomaly/blessed-or-blighted.js +3 -2
  13. package/dist/cards/impl/anomaly/blessed-or-blighted.js.map +1 -1
  14. package/dist/cards/impl/bg-spell/boon-of-beetles.js +1 -1
  15. package/dist/cards/impl/bg-spell/boon-of-beetles.js.map +1 -1
  16. package/dist/cards/impl/enchantments/crystal-infuser-enchantment.d.ts +2 -0
  17. package/dist/cards/impl/enchantments/crystal-infuser-enchantment.js +16 -0
  18. package/dist/cards/impl/enchantments/crystal-infuser-enchantment.js.map +1 -0
  19. package/dist/cards/impl/hero-power/reborn-rites.js +2 -1
  20. package/dist/cards/impl/hero-power/reborn-rites.js.map +1 -1
  21. package/dist/cards/impl/hero-power/swatting-insects.js +5 -3
  22. package/dist/cards/impl/hero-power/swatting-insects.js.map +1 -1
  23. package/dist/cards/impl/hero-power/water-invocation.js +1 -1
  24. package/dist/cards/impl/hero-power/water-invocation.js.map +1 -1
  25. package/dist/cards/impl/minion/amber-guardian.js +1 -1
  26. package/dist/cards/impl/minion/amber-guardian.js.map +1 -1
  27. package/dist/cards/impl/minion/arcane-cannoneer.d.ts +2 -0
  28. package/dist/cards/impl/minion/arcane-cannoneer.js +15 -0
  29. package/dist/cards/impl/minion/arcane-cannoneer.js.map +1 -0
  30. package/dist/cards/impl/minion/bannerboar.d.ts +2 -0
  31. package/dist/cards/impl/minion/bannerboar.js +16 -0
  32. package/dist/cards/impl/minion/bannerboar.js.map +1 -0
  33. package/dist/cards/impl/minion/beetle.d.ts +2 -0
  34. package/dist/cards/impl/minion/beetle.js +16 -0
  35. package/dist/cards/impl/minion/beetle.js.map +1 -0
  36. package/dist/cards/impl/minion/bird-buddy.d.ts +2 -0
  37. package/dist/cards/impl/minion/bird-buddy.js +14 -0
  38. package/dist/cards/impl/minion/bird-buddy.js.map +1 -0
  39. package/dist/cards/impl/minion/blazing-skyfin.d.ts +2 -0
  40. package/dist/cards/impl/minion/blazing-skyfin.js +12 -0
  41. package/dist/cards/impl/minion/blazing-skyfin.js.map +1 -0
  42. package/dist/cards/impl/minion/boar-gamer.d.ts +2 -0
  43. package/dist/cards/impl/minion/boar-gamer.js +12 -0
  44. package/dist/cards/impl/minion/boar-gamer.js.map +1 -0
  45. package/dist/cards/impl/minion/bubble-gunner.d.ts +2 -0
  46. package/dist/cards/impl/minion/bubble-gunner.js +44 -0
  47. package/dist/cards/impl/minion/bubble-gunner.js.map +1 -0
  48. package/dist/cards/impl/minion/buzzing-vermin.d.ts +2 -0
  49. package/dist/cards/impl/minion/buzzing-vermin.js +12 -0
  50. package/dist/cards/impl/minion/buzzing-vermin.js.map +1 -0
  51. package/dist/cards/impl/minion/cadaver-caretaker.d.ts +2 -0
  52. package/dist/cards/impl/minion/cadaver-caretaker.js +12 -0
  53. package/dist/cards/impl/minion/cadaver-caretaker.js.map +1 -0
  54. package/dist/cards/impl/minion/clunker-junker.d.ts +2 -0
  55. package/dist/cards/impl/minion/clunker-junker.js +24 -0
  56. package/dist/cards/impl/minion/clunker-junker.js.map +1 -0
  57. package/dist/cards/impl/minion/deathly-striker.d.ts +2 -0
  58. package/dist/cards/impl/minion/deathly-striker.js +32 -0
  59. package/dist/cards/impl/minion/deathly-striker.js.map +1 -0
  60. package/dist/cards/impl/minion/deflecto-bot.d.ts +2 -0
  61. package/dist/cards/impl/minion/deflecto-bot.js +21 -0
  62. package/dist/cards/impl/minion/deflecto-bot.js.map +1 -0
  63. package/dist/cards/impl/minion/efficient-engineer.d.ts +2 -0
  64. package/dist/cards/impl/minion/efficient-engineer.js +24 -0
  65. package/dist/cards/impl/minion/efficient-engineer.js.map +1 -0
  66. package/dist/cards/impl/minion/electric-synthesizer.d.ts +2 -0
  67. package/dist/cards/impl/minion/electric-synthesizer.js +24 -0
  68. package/dist/cards/impl/minion/electric-synthesizer.js.map +1 -0
  69. package/dist/cards/impl/minion/fairy-gillmother.d.ts +2 -0
  70. package/dist/cards/impl/minion/fairy-gillmother.js +18 -0
  71. package/dist/cards/impl/minion/fairy-gillmother.js.map +1 -0
  72. package/dist/cards/impl/minion/forest-rover.d.ts +2 -0
  73. package/dist/cards/impl/minion/forest-rover.js +23 -0
  74. package/dist/cards/impl/minion/forest-rover.js.map +1 -0
  75. package/dist/cards/impl/minion/fountain-chiller.d.ts +2 -0
  76. package/dist/cards/impl/minion/fountain-chiller.js +27 -0
  77. package/dist/cards/impl/minion/fountain-chiller.js.map +1 -0
  78. package/dist/cards/impl/minion/gem-rat.d.ts +2 -0
  79. package/dist/cards/impl/minion/gem-rat.js +12 -0
  80. package/dist/cards/impl/minion/gem-rat.js.map +1 -0
  81. package/dist/cards/impl/minion/general-drakkisath.d.ts +2 -0
  82. package/dist/cards/impl/minion/general-drakkisath.js +17 -0
  83. package/dist/cards/impl/minion/general-drakkisath.js.map +1 -0
  84. package/dist/cards/impl/minion/gentle-djinni.d.ts +2 -0
  85. package/dist/cards/impl/minion/gentle-djinni.js +25 -0
  86. package/dist/cards/impl/minion/gentle-djinni.js.map +1 -0
  87. package/dist/cards/impl/minion/goldrinn-the-great-wolf.d.ts +2 -0
  88. package/dist/cards/impl/minion/goldrinn-the-great-wolf.js +15 -0
  89. package/dist/cards/impl/minion/goldrinn-the-great-wolf.js.map +1 -0
  90. package/dist/cards/impl/minion/grease-bot.d.ts +2 -0
  91. package/dist/cards/impl/minion/grease-bot.js +13 -0
  92. package/dist/cards/impl/minion/grease-bot.js.map +1 -0
  93. package/dist/cards/impl/minion/gritty-headhunter.d.ts +2 -0
  94. package/dist/cards/impl/minion/gritty-headhunter.js +14 -0
  95. package/dist/cards/impl/minion/gritty-headhunter.js.map +1 -0
  96. package/dist/cards/impl/minion/hackerfin.d.ts +2 -0
  97. package/dist/cards/impl/minion/hackerfin.js +21 -0
  98. package/dist/cards/impl/minion/hackerfin.js.map +1 -0
  99. package/dist/cards/impl/minion/handless-forsaken.d.ts +2 -0
  100. package/dist/cards/impl/minion/handless-forsaken.js +12 -0
  101. package/dist/cards/impl/minion/handless-forsaken.js.map +1 -0
  102. package/dist/cards/impl/minion/harmless-bonehead.d.ts +2 -0
  103. package/dist/cards/impl/minion/harmless-bonehead.js +12 -0
  104. package/dist/cards/impl/minion/harmless-bonehead.js.map +1 -0
  105. package/dist/cards/impl/minion/holo-rover.d.ts +2 -0
  106. package/dist/cards/impl/minion/holo-rover.js +16 -0
  107. package/dist/cards/impl/minion/holo-rover.js.map +1 -0
  108. package/dist/cards/impl/minion/humming-bird.d.ts +2 -5
  109. package/dist/cards/impl/minion/humming-bird.js +1 -0
  110. package/dist/cards/impl/minion/humming-bird.js.map +1 -1
  111. package/dist/cards/impl/minion/hungry-snapjaw.d.ts +2 -0
  112. package/dist/cards/impl/minion/hungry-snapjaw.js +17 -0
  113. package/dist/cards/impl/minion/hungry-snapjaw.js.map +1 -0
  114. package/dist/cards/impl/minion/hunter-of-gatherers.d.ts +2 -0
  115. package/dist/cards/impl/minion/hunter-of-gatherers.js +13 -0
  116. package/dist/cards/impl/minion/hunter-of-gatherers.js.map +1 -0
  117. package/dist/cards/impl/minion/implant-subject.d.ts +2 -0
  118. package/dist/cards/impl/minion/implant-subject.js +42 -0
  119. package/dist/cards/impl/minion/implant-subject.js.map +1 -0
  120. package/dist/cards/impl/minion/impulsive-trickster.d.ts +2 -0
  121. package/dist/cards/impl/minion/impulsive-trickster.js +14 -0
  122. package/dist/cards/impl/minion/impulsive-trickster.js.map +1 -0
  123. package/dist/cards/impl/minion/indomitable-mount.d.ts +2 -0
  124. package/dist/cards/impl/minion/indomitable-mount.js +23 -0
  125. package/dist/cards/impl/minion/indomitable-mount.js.map +1 -0
  126. package/dist/cards/impl/minion/interrogator-whitemane.js +5 -4
  127. package/dist/cards/impl/minion/interrogator-whitemane.js.map +1 -1
  128. package/dist/cards/impl/minion/kalecgos-arcane-aspect.d.ts +2 -0
  129. package/dist/cards/impl/minion/kalecgos-arcane-aspect.js +13 -0
  130. package/dist/cards/impl/minion/kalecgos-arcane-aspect.js.map +1 -0
  131. package/dist/cards/impl/minion/kangors-apprentice.d.ts +2 -0
  132. package/dist/cards/impl/minion/kangors-apprentice.js +21 -0
  133. package/dist/cards/impl/minion/kangors-apprentice.js.map +1 -0
  134. package/dist/cards/impl/minion/karmic-chameleon.d.ts +2 -0
  135. package/dist/cards/impl/minion/karmic-chameleon.js +27 -0
  136. package/dist/cards/impl/minion/karmic-chameleon.js.map +1 -0
  137. package/dist/cards/impl/minion/manasaber.d.ts +2 -0
  138. package/dist/cards/impl/minion/manasaber.js +14 -0
  139. package/dist/cards/impl/minion/manasaber.js.map +1 -0
  140. package/dist/cards/impl/minion/mantid-queen.js +6 -3
  141. package/dist/cards/impl/minion/mantid-queen.js.map +1 -1
  142. package/dist/cards/impl/minion/marquee-ticker.d.ts +2 -0
  143. package/dist/cards/impl/minion/marquee-ticker.js +12 -0
  144. package/dist/cards/impl/minion/marquee-ticker.js.map +1 -0
  145. package/dist/cards/impl/minion/mecha-jaraxxus.d.ts +2 -0
  146. package/dist/cards/impl/minion/mecha-jaraxxus.js +12 -0
  147. package/dist/cards/impl/minion/mecha-jaraxxus.js.map +1 -0
  148. package/dist/cards/impl/minion/mechanized-gift-horse.d.ts +2 -0
  149. package/dist/cards/impl/minion/mechanized-gift-horse.js +13 -0
  150. package/dist/cards/impl/minion/mechanized-gift-horse.js.map +1 -0
  151. package/dist/cards/impl/minion/mechorse.d.ts +2 -0
  152. package/dist/cards/impl/minion/mechorse.js +16 -0
  153. package/dist/cards/impl/minion/mechorse.js.map +1 -0
  154. package/dist/cards/impl/minion/misfit-dragonling.d.ts +2 -5
  155. package/dist/cards/impl/minion/misfit-dragonling.js.map +1 -1
  156. package/dist/cards/impl/minion/moonsteel-juggernaut.d.ts +2 -0
  157. package/dist/cards/impl/minion/moonsteel-juggernaut.js +15 -0
  158. package/dist/cards/impl/minion/moonsteel-juggernaut.js.map +1 -0
  159. package/dist/cards/impl/minion/murky.d.ts +2 -0
  160. package/dist/cards/impl/minion/murky.js +20 -0
  161. package/dist/cards/impl/minion/murky.js.map +1 -0
  162. package/dist/cards/impl/minion/mutated-lasher.d.ts +2 -0
  163. package/dist/cards/impl/minion/mutated-lasher.js +26 -0
  164. package/dist/cards/impl/minion/mutated-lasher.js.map +1 -0
  165. package/dist/cards/impl/minion/neon-agent.d.ts +2 -0
  166. package/dist/cards/impl/minion/neon-agent.js +18 -0
  167. package/dist/cards/impl/minion/neon-agent.js.map +1 -0
  168. package/dist/cards/impl/minion/nest-swarmer.d.ts +2 -0
  169. package/dist/cards/impl/minion/nest-swarmer.js +12 -0
  170. package/dist/cards/impl/minion/nest-swarmer.js.map +1 -0
  171. package/dist/cards/impl/minion/nether-drake.d.ts +2 -0
  172. package/dist/cards/impl/minion/nether-drake.js +15 -0
  173. package/dist/cards/impl/minion/nether-drake.js.map +1 -0
  174. package/dist/cards/impl/minion/niuzao.d.ts +2 -0
  175. package/dist/cards/impl/minion/niuzao.js +21 -0
  176. package/dist/cards/impl/minion/niuzao.js.map +1 -0
  177. package/dist/cards/impl/minion/operatic-belcher.d.ts +2 -0
  178. package/dist/cards/impl/minion/operatic-belcher.js +26 -0
  179. package/dist/cards/impl/minion/operatic-belcher.js.map +1 -0
  180. package/dist/cards/impl/minion/outback-smolderer.d.ts +2 -0
  181. package/dist/cards/impl/minion/outback-smolderer.js +17 -0
  182. package/dist/cards/impl/minion/outback-smolderer.js.map +1 -0
  183. package/dist/cards/impl/minion/parched-wanderer.d.ts +2 -0
  184. package/dist/cards/impl/minion/parched-wanderer.js +20 -0
  185. package/dist/cards/impl/minion/parched-wanderer.js.map +1 -0
  186. package/dist/cards/impl/minion/prized-promo-drake.d.ts +2 -5
  187. package/dist/cards/impl/minion/prized-promo-drake.js.map +1 -1
  188. package/dist/cards/impl/minion/razorgore-the-untamed.d.ts +2 -0
  189. package/dist/cards/impl/minion/razorgore-the-untamed.js +20 -0
  190. package/dist/cards/impl/minion/razorgore-the-untamed.js.map +1 -0
  191. package/dist/cards/impl/minion/reckless-cliffdiver.d.ts +2 -0
  192. package/dist/cards/impl/minion/reckless-cliffdiver.js +19 -0
  193. package/dist/cards/impl/minion/reckless-cliffdiver.js.map +1 -0
  194. package/dist/cards/impl/minion/runed-progenitor.d.ts +2 -0
  195. package/dist/cards/impl/minion/runed-progenitor.js +24 -0
  196. package/dist/cards/impl/minion/runed-progenitor.js.map +1 -0
  197. package/dist/cards/impl/minion/rylak-metalhead.d.ts +2 -0
  198. package/dist/cards/impl/minion/rylak-metalhead.js +22 -0
  199. package/dist/cards/impl/minion/rylak-metalhead.js.map +1 -0
  200. package/dist/cards/impl/minion/salty-hog.d.ts +2 -0
  201. package/dist/cards/impl/minion/salty-hog.js +17 -0
  202. package/dist/cards/impl/minion/salty-hog.js.map +1 -0
  203. package/dist/cards/impl/minion/showy-cyclist.d.ts +2 -0
  204. package/dist/cards/impl/minion/showy-cyclist.js +14 -0
  205. package/dist/cards/impl/minion/showy-cyclist.js.map +1 -0
  206. package/dist/cards/impl/minion/silver-handed-recruit.d.ts +2 -0
  207. package/dist/cards/impl/minion/silver-handed-recruit.js +17 -0
  208. package/dist/cards/impl/minion/silver-handed-recruit.js.map +1 -0
  209. package/dist/cards/impl/minion/sly-raptor.d.ts +2 -0
  210. package/dist/cards/impl/minion/sly-raptor.js +18 -0
  211. package/dist/cards/impl/minion/sly-raptor.js.map +1 -0
  212. package/dist/cards/impl/minion/smolderwing.d.ts +2 -0
  213. package/dist/cards/impl/minion/smolderwing.js +25 -0
  214. package/dist/cards/impl/minion/smolderwing.js.map +1 -0
  215. package/dist/cards/impl/minion/soulsplitter.js +2 -1
  216. package/dist/cards/impl/minion/soulsplitter.js.map +1 -1
  217. package/dist/cards/impl/minion/spacefarer.d.ts +2 -0
  218. package/dist/cards/impl/minion/spacefarer.js +20 -0
  219. package/dist/cards/impl/minion/spacefarer.js.map +1 -0
  220. package/dist/cards/impl/minion/sun-screener.js +1 -1
  221. package/dist/cards/impl/minion/sun-screener.js.map +1 -1
  222. package/dist/cards/impl/minion/swampstriker.d.ts +2 -0
  223. package/dist/cards/impl/minion/swampstriker.js +21 -0
  224. package/dist/cards/impl/minion/swampstriker.js.map +1 -0
  225. package/dist/cards/impl/minion/thousandth-paper-drake.js +2 -1
  226. package/dist/cards/impl/minion/thousandth-paper-drake.js.map +1 -1
  227. package/dist/cards/impl/minion/turquoise-skitterer.d.ts +2 -0
  228. package/dist/cards/impl/minion/turquoise-skitterer.js +25 -0
  229. package/dist/cards/impl/minion/turquoise-skitterer.js.map +1 -0
  230. package/dist/cards/impl/minion/twilight-primordium.d.ts +2 -0
  231. package/dist/cards/impl/minion/twilight-primordium.js +24 -0
  232. package/dist/cards/impl/minion/twilight-primordium.js.map +1 -0
  233. package/dist/cards/impl/minion/ultraviolet-ascendant.d.ts +2 -0
  234. package/dist/cards/impl/minion/ultraviolet-ascendant.js +14 -0
  235. package/dist/cards/impl/minion/ultraviolet-ascendant.js.map +1 -0
  236. package/dist/cards/impl/minion/wandering-wight.d.ts +2 -0
  237. package/dist/cards/impl/minion/wandering-wight.js +12 -0
  238. package/dist/cards/impl/minion/wandering-wight.js.map +1 -0
  239. package/dist/cards/impl/minion/whelp-smuggler.d.ts +2 -0
  240. package/dist/cards/impl/minion/whelp-smuggler.js +17 -0
  241. package/dist/cards/impl/minion/whelp-smuggler.js.map +1 -0
  242. package/dist/cards/impl/minion/wisp-in-the-shell.d.ts +2 -0
  243. package/dist/cards/impl/minion/wisp-in-the-shell.js +19 -0
  244. package/dist/cards/impl/minion/wisp-in-the-shell.js.map +1 -0
  245. package/dist/cards/impl/trinket/eternal-portrait.js +4 -2
  246. package/dist/cards/impl/trinket/eternal-portrait.js.map +1 -1
  247. package/dist/cards/impl/trinket/holly-mallet.js +1 -1
  248. package/dist/cards/impl/trinket/holly-mallet.js.map +1 -1
  249. package/dist/{divine-shield.d.ts → keywords/divine-shield.d.ts} +11 -3
  250. package/dist/{divine-shield.js → keywords/divine-shield.js} +19 -14
  251. package/dist/keywords/divine-shield.js.map +1 -0
  252. package/dist/keywords/reborn.d.ts +10 -0
  253. package/dist/keywords/reborn.js +22 -0
  254. package/dist/keywords/reborn.js.map +1 -0
  255. package/dist/keywords/stealth.d.ts +10 -0
  256. package/dist/keywords/stealth.js +22 -0
  257. package/dist/keywords/stealth.js.map +1 -0
  258. package/dist/keywords/taunt.d.ts +10 -0
  259. package/dist/keywords/taunt.js +22 -0
  260. package/dist/keywords/taunt.js.map +1 -0
  261. package/dist/keywords/venomous.d.ts +10 -0
  262. package/dist/keywords/venomous.js +33 -0
  263. package/dist/keywords/venomous.js.map +1 -0
  264. package/dist/keywords/windfury.d.ts +10 -0
  265. package/dist/keywords/windfury.js +22 -0
  266. package/dist/keywords/windfury.js.map +1 -0
  267. package/dist/simulate-bgs-battle.d.ts +2 -2
  268. package/dist/simulate-bgs-battle.js +20 -5
  269. package/dist/simulate-bgs-battle.js.map +1 -1
  270. package/dist/simulation/add-minion-to-board.d.ts +23 -0
  271. package/dist/simulation/add-minion-to-board.js +50 -33
  272. package/dist/simulation/add-minion-to-board.js.map +1 -1
  273. package/dist/simulation/after-attack.js +2 -1
  274. package/dist/simulation/after-attack.js.map +1 -1
  275. package/dist/simulation/attack.js +7 -24
  276. package/dist/simulation/attack.js.map +1 -1
  277. package/dist/simulation/auras.d.ts +1 -1
  278. package/dist/simulation/auras.js +21 -15
  279. package/dist/simulation/auras.js.map +1 -1
  280. package/dist/simulation/avenge.d.ts +7 -0
  281. package/dist/simulation/avenge.js +223 -229
  282. package/dist/simulation/avenge.js.map +1 -1
  283. package/dist/simulation/battlecries.d.ts +8 -0
  284. package/dist/simulation/battlecries.js +574 -623
  285. package/dist/simulation/battlecries.js.map +1 -1
  286. package/dist/simulation/blood-gems.js +1 -1
  287. package/dist/simulation/blood-gems.js.map +1 -1
  288. package/dist/simulation/cards-in-hand.d.ts +7 -1
  289. package/dist/simulation/cards-in-hand.js +14 -0
  290. package/dist/simulation/cards-in-hand.js.map +1 -1
  291. package/dist/simulation/damage-effects.js +1 -1
  292. package/dist/simulation/damage-effects.js.map +1 -1
  293. package/dist/simulation/deathrattle-effects.d.ts +1 -1
  294. package/dist/simulation/deathrattle-effects.js +468 -517
  295. package/dist/simulation/deathrattle-effects.js.map +1 -1
  296. package/dist/simulation/deathrattle-on-trigger.d.ts +1 -0
  297. package/dist/simulation/deathrattle-on-trigger.js.map +1 -1
  298. package/dist/simulation/deathrattle-spawns.d.ts +2 -0
  299. package/dist/simulation/deathrattle-spawns.js +308 -384
  300. package/dist/simulation/deathrattle-spawns.js.map +1 -1
  301. package/dist/simulation/deathrattle-utils.js +1 -1
  302. package/dist/simulation/deathrattle-utils.js.map +1 -1
  303. package/dist/simulation/frenzy.js +1 -1
  304. package/dist/simulation/frenzy.js.map +1 -1
  305. package/dist/simulation/magnetize.js.map +1 -1
  306. package/dist/simulation/on-attack.d.ts +13 -1
  307. package/dist/simulation/on-attack.js +21 -1
  308. package/dist/simulation/on-attack.js.map +1 -1
  309. package/dist/simulation/on-being-attacked.js +7 -4
  310. package/dist/simulation/on-being-attacked.js.map +1 -1
  311. package/dist/simulation/simulator.js +1 -1
  312. package/dist/simulation/simulator.js.map +1 -1
  313. package/dist/simulation/start-of-combat/soc-action-processor.js +6 -12
  314. package/dist/simulation/start-of-combat/soc-action-processor.js.map +1 -1
  315. package/dist/simulation/stats.d.ts +9 -0
  316. package/dist/simulation/stats.js +23 -14
  317. package/dist/simulation/stats.js.map +1 -1
  318. package/dist/temp-card-ids.d.ts +70 -0
  319. package/dist/temp-card-ids.js.map +1 -1
  320. package/dist/utils.d.ts +0 -1
  321. package/dist/utils.js +30 -36
  322. package/dist/utils.js.map +1 -1
  323. package/package.json +2 -2
  324. package/dist/divine-shield.js.map +0 -1
@@ -1,12 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.spawnEntitiesFromEnchantments = exports.spawnEntitiesFromDeathrattle = exports.spawnEntities = void 0;
3
+ exports.spawnEntitiesFromEnchantments = exports.spawnEntitiesFromDeathrattle = exports.spawnEntities = exports.simplifiedSpawnEntities = void 0;
4
4
  const reference_data_1 = require("@firestone-hs/reference-data");
5
+ const card_interface_1 = require("../cards/card.interface");
6
+ const _card_mappings_1 = require("../cards/impl/_card-mappings");
5
7
  const utils_1 = require("../services/utils");
6
8
  const utils_2 = require("../utils");
7
9
  const cards_in_hand_1 = require("./cards-in-hand");
8
10
  const deathrattle_effects_1 = require("./deathrattle-effects");
9
11
  const deathrattle_on_trigger_1 = require("./deathrattle-on-trigger");
12
+ const simplifiedSpawnEntities = (cardId, quantity, input, boardEntityToSpawn = null) => {
13
+ return (0, exports.spawnEntities)(cardId, quantity, input.boardWithDeadEntity, input.boardWithDeadEntityHero, input.otherBoard, input.otherBoardHero, input.gameState.allCards, input.gameState.cardsData, input.gameState.sharedState, input.gameState.spectator, input.deadEntity.friendly, false, false, false, boardEntityToSpawn);
14
+ };
15
+ exports.simplifiedSpawnEntities = simplifiedSpawnEntities;
10
16
  const spawnEntities = (cardId, quantity, boardToSpawnInto, boardToSpawnIntoHero, otherBoard, otherHero, allCards, cardsData, sharedState, spectator, friendly, limitSpawns, spawnReborn = false, useKhadgar = true, boardEntityToSpawn = null, originalEntity = null) => {
11
17
  if (!cardId) {
12
18
  console.error('Cannot spawn a minion without any cardId defined', (0, utils_2.stringifySimple)(boardToSpawnInto, allCards), new Error().stack);
@@ -47,397 +53,315 @@ const spawnEntitiesFromDeathrattle = (deadEntity, boardWithDeadEntity, boardWith
47
53
  const cardIds = [deadEntity.cardId, ...((_a = deadEntity.additionalCards) !== null && _a !== void 0 ? _a : [])];
48
54
  for (const deadEntityCardId of cardIds) {
49
55
  let hasTriggered = true;
50
- switch (deadEntityCardId) {
51
- case "BOT_445":
52
- spawnedEntities.push(...(0, exports.spawnEntities)("BOT_445t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
53
- break;
54
- case "TB_BaconUps_002":
55
- spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_002t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
56
- break;
57
- case "BG30_125":
58
- case "BG30_125_G":
59
- spawnedEntities.push(...(0, exports.spawnEntities)(deadEntity.cardId === "BG30_125"
60
- ? "BG_ICC_026t"
61
- : "BG_ICC_026t_G", 4, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
62
- break;
63
- case "BG29_611":
64
- case "BG29_611_G":
65
- spawnedEntities.push(...(0, exports.spawnEntities)(deadEntity.cardId === "BG29_611"
66
- ? "BG_BOT_312t"
67
- : "TB_BaconUps_032t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
68
- break;
69
- case "BG26_800":
70
- case "BG26_800_G":
71
- const cublingId = deadEntity.cardId === "BG26_800_G"
72
- ? "BG26_800_Gt"
73
- : "BG26_800t";
74
- spawnedEntities.push(...(0, exports.spawnEntities)(cublingId, 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
75
- break;
76
- case "BG_AV_309":
77
- case "BG_AV_309_G":
78
- spawnedEntities.push(...(0, exports.spawnEntities)(deadEntityCardId === "BG_AV_309_G"
79
- ? "BG_AV_309t"
80
- : "AV_309t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
81
- break;
82
- case "BG25_010":
83
- case "BG25_010_G":
84
- spawnedEntities.push(...(0, exports.spawnEntities)(deadEntityCardId === "BG25_010_G"
85
- ? "BG25_010_Gt"
86
- : "BG25_010t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
87
- break;
88
- case "BG25_009":
89
- case "BG25_009_G":
90
- spawnedEntities.push(...(0, exports.spawnEntities)(deadEntityCardId === "BG25_009_G"
91
- ? "BG25_008_G"
92
- : "BG25_008", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
93
- break;
94
- case "BGS_061":
95
- spawnedEntities.push(...(0, exports.spawnEntities)("BGS_061t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
96
- break;
97
- case "TB_BaconUps_141":
98
- spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_141t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
99
- break;
100
- case "BG21_029":
101
- spawnedEntities.push(...(0, exports.spawnEntities)("BRM_006t", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
102
- break;
103
- case "BG21_029_G":
104
- spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_030t", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
105
- break;
106
- case "BG_EX1_556":
107
- spawnedEntities.push(...(0, exports.spawnEntities)("skele21", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
108
- break;
109
- case "TB_BaconUps_006":
110
- spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_006t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
111
- break;
112
- case "BG19_010":
113
- spawnedEntities.push(...(0, exports.spawnEntities)("BG19_010t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
114
- break;
115
- case "BG19_010_G":
116
- spawnedEntities.push(...(0, exports.spawnEntities)("BG19_010_Gt", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
117
- break;
118
- case "TB_BaconShop_HERO_702_Buddy":
119
- case "TB_BaconShop_HERO_702_Buddy_G":
120
- const minionsToSpawnMawsworn = deadEntityCardId === "TB_BaconShop_HERO_702_Buddy_G" ? 6 : 3;
121
- for (let i = 0; i < minionsToSpawnMawsworn; i++) {
122
- const minionCardId = gameState.cardsData.getRandomMinionForTavernTier(1);
123
- spawnedEntities.push(...(0, exports.spawnEntities)(minionCardId, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
124
- }
125
- break;
126
- case "BG25_HERO_100_Buddy":
127
- case "BG25_HERO_100_Buddy_G":
128
- const minionsToSpawnFestergut = deadEntityCardId === "BG25_HERO_100_Buddy_G" ? 2 : 1;
129
- for (let i = 0; i < minionsToSpawnFestergut; i++) {
130
- const randomUndeadCreation = (0, utils_2.buildRandomUndeadCreation)(boardWithDeadEntityHero, boardWithDeadEntity, gameState.allCards, deadEntity.friendly, gameState.cardsData, gameState.sharedState);
131
- spawnedEntities.push(...(0, exports.spawnEntities)(randomUndeadCreation.cardId, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false, false, true, randomUndeadCreation));
132
- }
133
- break;
134
- case "BG_KAR_005":
135
- spawnedEntities.push(...(0, exports.spawnEntities)("BG_KAR_005a", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
136
- break;
137
- case "TB_BaconUps_004":
138
- spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_004t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
139
- break;
140
- case "BG_CFM_316":
141
- spawnedEntities.push(...(0, exports.spawnEntities)("BG_CFM_316t", Math.min(7, deadEntity.attack), boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
142
- break;
143
- case "TB_BaconUps_027":
144
- spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_027t", Math.min(7, deadEntity.attack), boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
145
- break;
146
- case "BGS_014":
147
- spawnedEntities.push(...(0, exports.spawnEntities)("BRM_006t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
148
- break;
149
- case "TB_BaconUps_113":
150
- spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_030t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
151
- break;
152
- case "OG_216":
153
- spawnedEntities.push(...(0, exports.spawnEntities)("OG_216a", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
154
- break;
155
- case "TB_BaconUps_026":
156
- spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_026t", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
157
- break;
158
- case "BG_BOT_312":
159
- spawnedEntities.push(...(0, exports.spawnEntities)("BG_BOT_312t", 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
160
- break;
161
- case "TB_BaconUps_032":
162
- spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_032t", 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
163
- break;
164
- case "BOT_537":
165
- spawnedEntities.push(...(0, exports.spawnEntities)("BOT_537t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
166
- break;
167
- case "TB_BaconUps_039":
168
- spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_039t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
169
- break;
170
- case "BG_EX1_534":
171
- spawnedEntities.push(...(0, exports.spawnEntities)("BG_EX1_534t", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
172
- break;
173
- case "TB_BaconUps_049":
174
- spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_049t", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
175
- break;
176
- case "BG_DMF_533":
177
- spawnedEntities.push(...(0, exports.spawnEntities)("BG_DMF_533t", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
178
- break;
179
- case "TB_BaconUps_309":
180
- spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_309t", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
181
- break;
182
- case "UNG_010":
183
- spawnedEntities.push(...(0, exports.spawnEntities)("UNG_201t", 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
184
- break;
185
- case "TB_BaconUps_052":
186
- spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_052t", 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
187
- break;
188
- case "BGS_008":
189
- spawnedEntities.push(...[
190
- ...(0, exports.spawnEntities)(gameState.cardsData.ghastcoilerSpawns[Math.floor(Math.random() * gameState.cardsData.ghastcoilerSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
191
- ...(0, exports.spawnEntities)(gameState.cardsData.ghastcoilerSpawns[Math.floor(Math.random() * gameState.cardsData.ghastcoilerSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
192
- ]);
193
- break;
194
- case "BGS_121":
195
- case "TB_BaconUps_165":
196
- const djinniSpawns = [];
197
- const djinniToSpawnQuandtity = deadEntity.cardId === "TB_BaconUps_165" ? 2 : 1;
198
- for (let i = 0; i < djinniToSpawnQuandtity; i++) {
199
- djinniSpawns.push((0, utils_1.pickRandom)(gameState.cardsData.gentleDjinniSpawns));
200
- }
201
- for (const djinniSpawn of djinniSpawns) {
202
- spawnedEntities.push(...(0, exports.spawnEntities)(djinniSpawn, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
203
- }
204
- (0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, djinniSpawns, gameState);
205
- break;
206
- case "TB_BaconShop_HERO_37_Buddy":
207
- case "TB_BaconShop_HERO_37_Buddy_G":
208
- const kilrekCardsToAddQuantity = deadEntity.cardId === "TB_BaconShop_HERO_37_Buddy_G" ? 2 : 1;
209
- const kilrekCardsToAdd = [];
210
- for (let i = 0; i < kilrekCardsToAddQuantity; i++) {
211
- kilrekCardsToAdd.push((0, utils_1.pickRandom)(gameState.cardsData.demonSpawns));
212
- }
213
- (0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, kilrekCardsToAdd, gameState);
214
- break;
215
- case "TB_BaconShop_HERO_43_Buddy":
216
- case "TB_BaconShop_HERO_43_Buddy_G":
217
- const brannSpawns = [];
218
- const brannToSpawnQuandtity = deadEntity.cardId === "TB_BaconShop_HERO_43_Buddy_G" ? 2 : 1;
219
- for (let i = 0; i < brannToSpawnQuandtity; i++) {
220
- brannSpawns.push((0, utils_1.pickRandom)(gameState.cardsData.battlecryMinions));
221
- }
222
- for (const brannSpawn of brannSpawns) {
223
- spawnedEntities.push(...(0, exports.spawnEntities)(brannSpawn, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
224
- }
225
- (0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, brannSpawns, gameState);
226
- break;
227
- case "TRLA_149":
228
- case "TB_BaconUps_057":
229
- const ghastcoilerLoop = deadEntity.cardId === "TB_BaconUps_057" ? 4 : 2;
230
- for (let i = 0; i < ghastcoilerLoop; i++) {
56
+ const spawnEntityImpl = _card_mappings_1.cardMappings[deadEntityCardId];
57
+ if ((0, card_interface_1.hasDeathrattleSpawn)(spawnEntityImpl)) {
58
+ const spawned = spawnEntityImpl.deathrattleSpawn(deadEntity, deathrattleTriggeredInput);
59
+ if (spawned === null || spawned === void 0 ? void 0 : spawned.length) {
60
+ spawnedEntities.push(...spawned);
61
+ }
62
+ }
63
+ else {
64
+ switch (deadEntityCardId) {
65
+ case "BOT_445":
66
+ spawnedEntities.push(...(0, exports.spawnEntities)("BOT_445t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
67
+ break;
68
+ case "TB_BaconUps_002":
69
+ spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_002t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
70
+ break;
71
+ case "BG29_611":
72
+ case "BG29_611_G":
73
+ spawnedEntities.push(...(0, exports.spawnEntities)(deadEntity.cardId === "BG29_611"
74
+ ? "BG_BOT_312t"
75
+ : "TB_BaconUps_032t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
76
+ break;
77
+ case "BG_AV_309":
78
+ case "BG_AV_309_G":
79
+ spawnedEntities.push(...(0, exports.spawnEntities)(deadEntityCardId === "BG_AV_309_G"
80
+ ? "BG_AV_309t"
81
+ : "AV_309t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
82
+ break;
83
+ case "BG25_009":
84
+ case "BG25_009_G":
85
+ spawnedEntities.push(...(0, exports.spawnEntities)(deadEntityCardId === "BG25_009_G"
86
+ ? "BG25_008_G"
87
+ : "BG25_008", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
88
+ break;
89
+ case "BGS_061":
90
+ spawnedEntities.push(...(0, exports.spawnEntities)("BGS_061t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
91
+ break;
92
+ case "TB_BaconUps_141":
93
+ spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_141t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
94
+ break;
95
+ case "BG21_029":
96
+ spawnedEntities.push(...(0, exports.spawnEntities)("BRM_006t", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
97
+ break;
98
+ case "BG21_029_G":
99
+ spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_030t", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
100
+ break;
101
+ case "BG_EX1_556":
102
+ spawnedEntities.push(...(0, exports.spawnEntities)("skele21", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
103
+ break;
104
+ case "TB_BaconUps_006":
105
+ spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_006t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
106
+ break;
107
+ case "BG19_010":
108
+ spawnedEntities.push(...(0, exports.spawnEntities)("BG19_010t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
109
+ break;
110
+ case "BG19_010_G":
111
+ spawnedEntities.push(...(0, exports.spawnEntities)("BG19_010_Gt", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
112
+ break;
113
+ case "TB_BaconShop_HERO_702_Buddy":
114
+ case "TB_BaconShop_HERO_702_Buddy_G":
115
+ const minionsToSpawnMawsworn = deadEntityCardId === "TB_BaconShop_HERO_702_Buddy_G" ? 6 : 3;
116
+ for (let i = 0; i < minionsToSpawnMawsworn; i++) {
117
+ const minionCardId = gameState.cardsData.getRandomMinionForTavernTier(1);
118
+ spawnedEntities.push(...(0, exports.spawnEntities)(minionCardId, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
119
+ }
120
+ break;
121
+ case "BG25_HERO_100_Buddy":
122
+ case "BG25_HERO_100_Buddy_G":
123
+ const minionsToSpawnFestergut = deadEntityCardId === "BG25_HERO_100_Buddy_G" ? 2 : 1;
124
+ for (let i = 0; i < minionsToSpawnFestergut; i++) {
125
+ const randomUndeadCreation = (0, utils_2.buildRandomUndeadCreation)(boardWithDeadEntityHero, boardWithDeadEntity, gameState.allCards, deadEntity.friendly, gameState.cardsData, gameState.sharedState);
126
+ spawnedEntities.push(...(0, exports.spawnEntities)(randomUndeadCreation.cardId, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false, false, true, randomUndeadCreation));
127
+ }
128
+ break;
129
+ case "BG_KAR_005":
130
+ spawnedEntities.push(...(0, exports.spawnEntities)("BG_KAR_005a", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
131
+ break;
132
+ case "TB_BaconUps_004":
133
+ spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_004t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
134
+ break;
135
+ case "BG_CFM_316":
136
+ spawnedEntities.push(...(0, exports.spawnEntities)("BG_CFM_316t", Math.min(7, deadEntity.attack), boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
137
+ break;
138
+ case "TB_BaconUps_027":
139
+ spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_027t", Math.min(7, deadEntity.attack), boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
140
+ break;
141
+ case "BGS_014":
142
+ spawnedEntities.push(...(0, exports.spawnEntities)("BRM_006t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
143
+ break;
144
+ case "TB_BaconUps_113":
145
+ spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_030t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
146
+ break;
147
+ case "OG_216":
148
+ spawnedEntities.push(...(0, exports.spawnEntities)("OG_216a", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
149
+ break;
150
+ case "TB_BaconUps_026":
151
+ spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_026t", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
152
+ break;
153
+ case "BG_BOT_312":
154
+ spawnedEntities.push(...(0, exports.spawnEntities)("BG_BOT_312t", 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
155
+ break;
156
+ case "TB_BaconUps_032":
157
+ spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_032t", 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
158
+ break;
159
+ case "BOT_537":
160
+ spawnedEntities.push(...(0, exports.spawnEntities)("BOT_537t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
161
+ break;
162
+ case "TB_BaconUps_039":
163
+ spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_039t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
164
+ break;
165
+ case "BG_EX1_534":
166
+ spawnedEntities.push(...(0, exports.spawnEntities)("BG_EX1_534t", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
167
+ break;
168
+ case "TB_BaconUps_049":
169
+ spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_049t", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
170
+ break;
171
+ case "BG_DMF_533":
172
+ spawnedEntities.push(...(0, exports.spawnEntities)("BG_DMF_533t", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
173
+ break;
174
+ case "TB_BaconUps_309":
175
+ spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_309t", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
176
+ break;
177
+ case "UNG_010":
178
+ spawnedEntities.push(...(0, exports.spawnEntities)("UNG_201t", 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
179
+ break;
180
+ case "TB_BaconUps_052":
181
+ spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_052t", 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
182
+ break;
183
+ case "BGS_008":
231
184
  spawnedEntities.push(...[
232
185
  ...(0, exports.spawnEntities)(gameState.cardsData.ghastcoilerSpawns[Math.floor(Math.random() * gameState.cardsData.ghastcoilerSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
186
+ ...(0, exports.spawnEntities)(gameState.cardsData.ghastcoilerSpawns[Math.floor(Math.random() * gameState.cardsData.ghastcoilerSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
233
187
  ]);
234
- }
235
- break;
236
- case "BG_LOOT_368":
237
- spawnedEntities.push(...(0, exports.spawnEntities)("BG_CS2_065", 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
238
- break;
239
- case "TB_BaconUps_059":
240
- spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_059t", 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
241
- break;
242
- case "BG26_ETC_321":
243
- case "BG26_ETC_321_G":
244
- const annoyOTroupeSpawns = deadEntity.cardId === "BG26_ETC_321_G"
245
- ? "BG_GVG_085_G"
246
- : "BG_GVG_085";
247
- spawnedEntities.push(...(0, exports.spawnEntities)(annoyOTroupeSpawns, 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
248
- break;
249
- case "BG21_025":
250
- case "BG21_025_G":
251
- const cardParam = 6;
252
- const entitiesToSpawn = Math.max(0, Math.min(cardParam, 7 - boardWithDeadEntity.length - spawnedEntities.length));
253
- const buffAmount = (deadEntityCardId === "BG21_025_G" ? 2 : 1) * (cardParam - entitiesToSpawn);
254
- spawnedEntities.push(...(0, exports.spawnEntities)(deadEntityCardId === "BG21_025_G"
255
- ? "TB_BaconUps_032t"
256
- : "BG_BOT_312t", entitiesToSpawn, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, true));
257
- (0, utils_2.addStatsToBoard)(deadEntity, boardWithDeadEntity, boardWithDeadEntityHero, buffAmount, buffAmount, gameState, reference_data_1.Race[reference_data_1.Race.MECH]);
258
- (0, utils_2.addStatsToBoard)(deadEntity, spawnedEntities, boardWithDeadEntityHero, buffAmount, buffAmount, gameState, reference_data_1.Race[reference_data_1.Race.MECH]);
259
- break;
260
- case "BGS_012":
261
- const cardIdsToSpawn = gameState.sharedState.deaths
262
- .filter((entity) => entity.friendly === deadEntity.friendly)
263
- .filter((entity) => (0, utils_2.hasCorrectTribe)(entity, boardWithDeadEntityHero, reference_data_1.Race.MECH, gameState.allCards))
264
- .slice(0, 2)
265
- .map((entity) => entity.cardId);
266
- cardIdsToSpawn.forEach((cardId) => spawnedEntities.push(...(0, exports.spawnEntities)(cardId, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false)));
267
- break;
268
- case "TB_BaconUps_087":
269
- const cardIdsToSpawn2 = gameState.sharedState.deaths
270
- .filter((entity) => entity.friendly === deadEntity.friendly)
271
- .filter((entity) => (0, utils_2.hasCorrectTribe)(entity, boardWithDeadEntityHero, reference_data_1.Race.MECH, gameState.allCards))
272
- .slice(0, 4)
273
- .map((entity) => entity.cardId);
274
- cardIdsToSpawn2.forEach((cardId) => spawnedEntities.push(...(0, exports.spawnEntities)(cardId, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false)));
275
- break;
276
- case "BGS_079":
277
- spawnedEntities.push(...[
278
- ...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
279
- ...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
280
- ...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
281
- ]);
282
- break;
283
- case "TB_BaconUps_137":
284
- spawnedEntities.push(...[
285
- ...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
286
- ...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
287
- ...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
288
- ...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
289
- ...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
290
- ...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
291
- ]);
292
- break;
293
- case "BG25_806":
294
- case "BG25_806_G":
295
- const raptorStat = deadEntity.cardId === "BG25_806_G" ? 14 : 7;
296
- const beastPool = gameState.cardsData.beastSpawns.filter((id) => id !== "BG25_806");
297
- const beastsFromRaptor = (0, exports.spawnEntities)(beastPool[Math.floor(Math.random() * beastPool.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false);
298
- beastsFromRaptor.forEach((b) => {
299
- b.attack = raptorStat;
300
- b.health = raptorStat;
301
- });
302
- spawnedEntities.push(...beastsFromRaptor);
303
- break;
304
- case "BG26_804":
305
- case "BG26_804_G":
306
- const stats = deadEntity.scriptDataNum1 ||
307
- ((_b = gameState.sharedState.deaths.find((e) => e.friendly === deadEntity.friendly && e.cardId === deadEntity.cardId)) === null || _b === void 0 ? void 0 : _b.scriptDataNum1);
308
- const octosariSpawn = deadEntity.cardId === "BG26_804_G"
309
- ? "BG26_803_Gt"
310
- : "BG26_803t";
311
- const octoSpawns = (0, exports.spawnEntities)(octosariSpawn, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false);
312
- octoSpawns.forEach((b) => {
313
- b.attack = stats;
314
- b.health = stats;
315
- });
316
- spawnedEntities.push(...octoSpawns);
317
- break;
318
- case "BG26_350":
319
- case "BG26_350_G":
320
- const bassgillIterations = deadEntity.cardId === "BG26_350_G" ? 2 : 1;
321
- for (let i = 0; i < bassgillIterations; i++) {
322
- const hand = (_d = (_c = boardWithDeadEntityHero.hand) === null || _c === void 0 ? void 0 : _c.filter((e) => (0, utils_2.hasCorrectTribe)(e, boardWithDeadEntityHero, reference_data_1.Race.MURLOC, gameState.allCards)).filter((e) => !!(e === null || e === void 0 ? void 0 : e.cardId)).filter((e) => !e.locked)) !== null && _d !== void 0 ? _d : [];
323
- const highestHealth = Math.max(...hand.filter((c) => c.health).map((c) => c.health));
324
- const highestHealthMinions = highestHealth
325
- ? hand.filter((c) => c.health === highestHealth)
326
- : null;
327
- const spawn = !!(highestHealthMinions === null || highestHealthMinions === void 0 ? void 0 : highestHealthMinions.length)
328
- ? (0, utils_1.pickRandom)(highestHealthMinions)
329
- : hand.filter((c) => c.cardId).length
330
- ? (0, utils_1.pickRandom)(hand.filter((c) => c.cardId))
188
+ break;
189
+ case "TB_BaconShop_HERO_37_Buddy":
190
+ case "TB_BaconShop_HERO_37_Buddy_G":
191
+ const kilrekCardsToAddQuantity = deadEntity.cardId === "TB_BaconShop_HERO_37_Buddy_G" ? 2 : 1;
192
+ const kilrekCardsToAdd = [];
193
+ for (let i = 0; i < kilrekCardsToAddQuantity; i++) {
194
+ kilrekCardsToAdd.push((0, utils_1.pickRandom)(gameState.cardsData.demonSpawns));
195
+ }
196
+ (0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, kilrekCardsToAdd, gameState);
197
+ break;
198
+ case "TB_BaconShop_HERO_43_Buddy":
199
+ case "TB_BaconShop_HERO_43_Buddy_G":
200
+ const brannSpawns = [];
201
+ const brannToSpawnQuandtity = deadEntity.cardId === "TB_BaconShop_HERO_43_Buddy_G" ? 2 : 1;
202
+ for (let i = 0; i < brannToSpawnQuandtity; i++) {
203
+ brannSpawns.push((0, utils_1.pickRandom)(gameState.cardsData.battlecryMinions));
204
+ }
205
+ for (const brannSpawn of brannSpawns) {
206
+ spawnedEntities.push(...(0, exports.spawnEntities)(brannSpawn, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
207
+ }
208
+ (0, cards_in_hand_1.addCardsInHand)(boardWithDeadEntityHero, boardWithDeadEntity, brannSpawns, gameState);
209
+ break;
210
+ case "TRLA_149":
211
+ case "TB_BaconUps_057":
212
+ const ghastcoilerLoop = deadEntity.cardId === "TB_BaconUps_057" ? 4 : 2;
213
+ for (let i = 0; i < ghastcoilerLoop; i++) {
214
+ spawnedEntities.push(...[
215
+ ...(0, exports.spawnEntities)(gameState.cardsData.ghastcoilerSpawns[Math.floor(Math.random() * gameState.cardsData.ghastcoilerSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
216
+ ]);
217
+ }
218
+ break;
219
+ case "BG_LOOT_368":
220
+ spawnedEntities.push(...(0, exports.spawnEntities)("BG_CS2_065", 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
221
+ break;
222
+ case "TB_BaconUps_059":
223
+ spawnedEntities.push(...(0, exports.spawnEntities)("TB_BaconUps_059t", 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
224
+ break;
225
+ case "BG26_ETC_321":
226
+ case "BG26_ETC_321_G":
227
+ const annoyOTroupeSpawns = deadEntity.cardId === "BG26_ETC_321_G"
228
+ ? "BG_GVG_085_G"
229
+ : "BG_GVG_085";
230
+ spawnedEntities.push(...(0, exports.spawnEntities)(annoyOTroupeSpawns, 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
231
+ break;
232
+ case "BG21_025":
233
+ case "BG21_025_G":
234
+ const cardParam = 6;
235
+ const entitiesToSpawn = Math.max(0, Math.min(cardParam, 7 - boardWithDeadEntity.length - spawnedEntities.length));
236
+ const buffAmount = (deadEntityCardId === "BG21_025_G" ? 2 : 1) *
237
+ (cardParam - entitiesToSpawn);
238
+ spawnedEntities.push(...(0, exports.spawnEntities)(deadEntityCardId === "BG21_025_G"
239
+ ? "TB_BaconUps_032t"
240
+ : "BG_BOT_312t", entitiesToSpawn, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, true));
241
+ (0, utils_2.addStatsToBoard)(deadEntity, boardWithDeadEntity, boardWithDeadEntityHero, buffAmount, buffAmount, gameState, reference_data_1.Race[reference_data_1.Race.MECH]);
242
+ (0, utils_2.addStatsToBoard)(deadEntity, spawnedEntities, boardWithDeadEntityHero, buffAmount, buffAmount, gameState, reference_data_1.Race[reference_data_1.Race.MECH]);
243
+ break;
244
+ case "BGS_079":
245
+ spawnedEntities.push(...[
246
+ ...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
247
+ ...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
248
+ ...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
249
+ ]);
250
+ break;
251
+ case "TB_BaconUps_137":
252
+ spawnedEntities.push(...[
253
+ ...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
254
+ ...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
255
+ ...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
256
+ ...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
257
+ ...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
258
+ ...(0, exports.spawnEntities)(gameState.cardsData.pirateSpawns[Math.floor(Math.random() * gameState.cardsData.pirateSpawns.length)], 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false),
259
+ ]);
260
+ break;
261
+ case "BG26_804":
262
+ case "BG26_804_G":
263
+ const stats = deadEntity.scriptDataNum1 ||
264
+ ((_b = gameState.sharedState.deaths.find((e) => e.friendly === deadEntity.friendly && e.cardId === deadEntity.cardId)) === null || _b === void 0 ? void 0 : _b.scriptDataNum1);
265
+ const octosariSpawn = deadEntity.cardId === "BG26_804_G"
266
+ ? "BG26_803_Gt"
267
+ : "BG26_803t";
268
+ const octoSpawns = (0, exports.spawnEntities)(octosariSpawn, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false);
269
+ octoSpawns.forEach((b) => {
270
+ b.attack = stats;
271
+ b.health = stats;
272
+ });
273
+ spawnedEntities.push(...octoSpawns);
274
+ break;
275
+ case "BG26_350":
276
+ case "BG26_350_G":
277
+ const bassgillIterations = deadEntity.cardId === "BG26_350_G" ? 2 : 1;
278
+ for (let i = 0; i < bassgillIterations; i++) {
279
+ const hand = (_d = (_c = boardWithDeadEntityHero.hand) === null || _c === void 0 ? void 0 : _c.filter((e) => (0, utils_2.hasCorrectTribe)(e, boardWithDeadEntityHero, reference_data_1.Race.MURLOC, gameState.allCards)).filter((e) => !!(e === null || e === void 0 ? void 0 : e.cardId)).filter((e) => !e.locked)) !== null && _d !== void 0 ? _d : [];
280
+ const highestHealth = Math.max(...hand.filter((c) => c.health).map((c) => c.health));
281
+ const highestHealthMinions = highestHealth
282
+ ? hand.filter((c) => c.health === highestHealth)
331
283
  : null;
332
- if (spawn) {
333
- spawn.locked = true;
334
- const bassgillSpawns = (0, exports.spawnEntities)(spawn.cardId, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false, false, true, { ...spawn });
335
- for (const s of bassgillSpawns) {
336
- s.onCanceledSummon = () => (spawn.locked = false);
284
+ const spawn = !!(highestHealthMinions === null || highestHealthMinions === void 0 ? void 0 : highestHealthMinions.length)
285
+ ? (0, utils_1.pickRandom)(highestHealthMinions)
286
+ : hand.filter((c) => c.cardId).length
287
+ ? (0, utils_1.pickRandom)(hand.filter((c) => c.cardId))
288
+ : null;
289
+ if (spawn) {
290
+ spawn.locked = true;
291
+ const bassgillSpawns = (0, exports.spawnEntities)(spawn.cardId, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false, false, true, { ...spawn });
292
+ for (const s of bassgillSpawns) {
293
+ s.onCanceledSummon = () => (spawn.locked = false);
294
+ }
295
+ spawnedEntities.push(...bassgillSpawns);
337
296
  }
338
- spawnedEntities.push(...bassgillSpawns);
339
297
  }
340
- }
341
- break;
342
- case "BG27_008":
343
- case "BG27_008_G":
344
- spawnedEntities.push(...(0, exports.spawnEntities)(deadEntity.cardId === "BG27_008_G"
345
- ? "BG27_008_Gt"
346
- : "BG27_008t", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
347
- break;
348
- case "BG27_008t":
349
- case "BG27_008_Gt":
350
- spawnedEntities.push(...(0, exports.spawnEntities)(deadEntity.cardId === "BG27_008_Gt"
351
- ? "BG27_008_Gt2"
352
- : "BG27_008t2", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
353
- break;
354
- case "BG26_018":
355
- case "BG26_018_G":
356
- spawnedEntities.push(...(0, exports.spawnEntities)(deadEntity.cardId === "BG26_018_G"
357
- ? "TB_BaconUps_141"
358
- : "BGS_061", 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
359
- break;
360
- case "BG27_081":
361
- case "BG27_081_G":
362
- const cultistStharaSpawnNumber = deadEntity.cardId === "BG27_081_G" ? 2 : 1;
363
- const cultistStharaSpawnCandidates = gameState.sharedState.deaths
364
- .filter((entity) => entity.friendly === deadEntity.friendly)
365
- .filter((entity) => (0, utils_2.hasCorrectTribe)(entity, boardWithDeadEntityHero, reference_data_1.Race.DEMON, gameState.allCards))
366
- .slice(0, cultistStharaSpawnNumber);
367
- cultistStharaSpawnCandidates.forEach((candidate) => {
368
- const spawns = (0, exports.spawnEntities)(candidate.cardId, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false, false, true);
369
- spawns.forEach((spawn) => {
370
- var _a, _b;
371
- spawn.attack = (_a = candidate.maxAttack) !== null && _a !== void 0 ? _a : candidate.attack;
372
- spawn.health = (_b = candidate.maxHealth) !== null && _b !== void 0 ? _b : candidate.health;
373
- spawn.maxHealth = spawn.health;
298
+ break;
299
+ case "BG26_018":
300
+ case "BG26_018_G":
301
+ spawnedEntities.push(...(0, exports.spawnEntities)(deadEntity.cardId === "BG26_018_G"
302
+ ? "TB_BaconUps_141"
303
+ : "BGS_061", 3, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
304
+ break;
305
+ case "BG27_081":
306
+ case "BG27_081_G":
307
+ const cultistStharaSpawnNumber = deadEntity.cardId === "BG27_081_G" ? 2 : 1;
308
+ const cultistStharaSpawnCandidates = gameState.sharedState.deaths
309
+ .filter((entity) => entity.friendly === deadEntity.friendly)
310
+ .filter((entity) => (0, utils_2.hasCorrectTribe)(entity, boardWithDeadEntityHero, reference_data_1.Race.DEMON, gameState.allCards))
311
+ .slice(0, cultistStharaSpawnNumber);
312
+ cultistStharaSpawnCandidates.forEach((candidate) => {
313
+ const spawns = (0, exports.spawnEntities)(candidate.cardId, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false, false, true);
314
+ spawns.forEach((spawn) => {
315
+ var _a, _b;
316
+ spawn.attack = (_a = candidate.maxAttack) !== null && _a !== void 0 ? _a : candidate.attack;
317
+ spawn.health = (_b = candidate.maxHealth) !== null && _b !== void 0 ? _b : candidate.health;
318
+ spawn.maxHealth = spawn.health;
319
+ });
320
+ spawnedEntities.push(...spawns);
374
321
  });
375
- spawnedEntities.push(...spawns);
376
- });
377
- break;
378
- case "BG28_300":
379
- case "BG28_300_G":
380
- const harmlessBoneheadStats = deadEntity.cardId === "BG28_300_G" ? 2 : 1;
381
- spawnedEntities.push(...(0, exports.spawnEntities)("BG_ICC_026t", 2, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false, false, true).map((e) => ({
382
- ...e,
383
- attack: harmlessBoneheadStats,
384
- health: harmlessBoneheadStats,
385
- })));
386
- break;
387
- case "BG29_864":
388
- case "BG29_864_G":
389
- const aridAtrocityStatsMultiplier = deadEntity.cardId === "BG29_864_G" ? 2 : 1;
390
- const friendlyDeadEntities = gameState.sharedState.deaths.filter((e) => e.friendly === deadEntity.friendly);
391
- const types = (0, utils_2.getMinionsOfDifferentTypes)(friendlyDeadEntities, boardWithDeadEntityHero, gameState);
392
- const constaridAtrocityStats = aridAtrocityStatsMultiplier * 7 * types.length;
393
- spawnedEntities.push(...(0, exports.spawnEntities)(deadEntityCardId === "BG29_864_G"
394
- ? "BG29_864_Gt"
395
- : "BG29_864t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false, false, true).map((e) => ({
396
- ...e,
397
- attack: e.attack + constaridAtrocityStats,
398
- health: e.health + constaridAtrocityStats,
399
- })));
400
- break;
401
- case "BGDUO_105":
402
- case "BGDUO_105_G":
403
- const magnanimooseCopies = deadEntity.cardId === "BGDUO_105_G" ? 2 : 1;
404
- for (let i = 0; i < magnanimooseCopies; i++) {
405
- const teammateState = (0, utils_2.getTeammateInitialState)(gameState.gameState, boardWithDeadEntityHero);
406
- const teammateBoard = (_e = teammateState === null || teammateState === void 0 ? void 0 : teammateState.board) !== null && _e !== void 0 ? _e : [];
407
- const copied = [];
408
- const minionToCopy = (0, utils_1.pickRandom)(teammateBoard.filter((e) => !copied.includes(e.entityId)));
409
- if (minionToCopy) {
410
- const copy = {
411
- ...minionToCopy,
412
- health: 1,
413
- maxHealth: 1,
414
- enchantments: [...minionToCopy.enchantments],
415
- pendingAttackBuffs: [],
416
- };
417
- spawnedEntities.push(...(0, exports.spawnEntities)(copy.cardId, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false, false, true, copy));
418
- copied.push(copy.entityId);
419
- }
420
- }
421
- break;
422
- case "BG30_105":
423
- case "BG30_105_G":
424
- const tiersToSummon = [3, 4, 5];
425
- for (const tier of tiersToSummon) {
426
- const candidates = gameState.cardsData.beastSpawns.filter((id) => gameState.allCards.getCard(id).techLevel === tier);
427
- let spawnId = (0, utils_1.pickRandom)(candidates);
428
- if (deadEntity.cardId === "BG30_105_G") {
429
- const premiumDbfId = gameState.allCards.getCard(spawnId).battlegroundsPremiumDbfId;
430
- spawnId = gameState.allCards.getCard(premiumDbfId).id;
322
+ break;
323
+ case "BG29_864":
324
+ case "BG29_864_G":
325
+ const aridAtrocityStatsMultiplier = deadEntity.cardId === "BG29_864_G" ? 2 : 1;
326
+ const friendlyDeadEntities = gameState.sharedState.deaths.filter((e) => e.friendly === deadEntity.friendly);
327
+ const types = (0, utils_2.getMinionsOfDifferentTypes)(friendlyDeadEntities, boardWithDeadEntityHero, gameState);
328
+ const constaridAtrocityStats = aridAtrocityStatsMultiplier * 7 * types.length;
329
+ spawnedEntities.push(...(0, exports.spawnEntities)(deadEntityCardId === "BG29_864_G"
330
+ ? "BG29_864_Gt"
331
+ : "BG29_864t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false, false, true).map((e) => ({
332
+ ...e,
333
+ attack: e.attack + constaridAtrocityStats,
334
+ health: e.health + constaridAtrocityStats,
335
+ })));
336
+ break;
337
+ case "BGDUO_105":
338
+ case "BGDUO_105_G":
339
+ const magnanimooseCopies = deadEntity.cardId === "BGDUO_105_G" ? 2 : 1;
340
+ for (let i = 0; i < magnanimooseCopies; i++) {
341
+ const teammateState = (0, utils_2.getTeammateInitialState)(gameState.gameState, boardWithDeadEntityHero);
342
+ const teammateBoard = (_e = teammateState === null || teammateState === void 0 ? void 0 : teammateState.board) !== null && _e !== void 0 ? _e : [];
343
+ const copied = [];
344
+ const minionToCopy = (0, utils_1.pickRandom)(teammateBoard.filter((e) => !copied.includes(e.entityId)));
345
+ if (minionToCopy) {
346
+ const copy = {
347
+ ...minionToCopy,
348
+ health: 1,
349
+ maxHealth: 1,
350
+ enchantments: [...minionToCopy.enchantments],
351
+ pendingAttackBuffs: [],
352
+ };
353
+ spawnedEntities.push(...(0, exports.spawnEntities)(copy.cardId, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false, false, true, copy));
354
+ copied.push(copy.entityId);
355
+ }
431
356
  }
432
- spawnedEntities.push(...(0, exports.spawnEntities)(spawnId, 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
433
- }
434
- break;
435
- case "BG26_RLK_833":
436
- spawnedEntities.push(...(0, exports.spawnEntities)("RLK_833t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
437
- break;
438
- default:
439
- hasTriggered = false;
440
- break;
357
+ break;
358
+ case "BG26_RLK_833":
359
+ spawnedEntities.push(...(0, exports.spawnEntities)("RLK_833t", 1, boardWithDeadEntity, boardWithDeadEntityHero, otherBoard, otherBoardHero, gameState.allCards, gameState.cardsData, gameState.sharedState, gameState.spectator, deadEntity.friendly, false));
360
+ break;
361
+ default:
362
+ hasTriggered = false;
363
+ break;
364
+ }
441
365
  }
442
366
  if (hasTriggered) {
443
367
  (0, deathrattle_on_trigger_1.onDeathrattleTriggered)(deathrattleTriggeredInput);