@firestone-hs/simulate-bgs-battle 1.1.751 → 1.1.753

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 (131) hide show
  1. package/dist/bgs-player-entity.d.ts +1 -0
  2. package/dist/bgs-player-entity.js.map +1 -1
  3. package/dist/board-secret.d.ts +5 -0
  4. package/dist/board-secret.js.map +1 -1
  5. package/dist/cards/card.interface.d.ts +34 -0
  6. package/dist/cards/card.interface.js +10 -2
  7. package/dist/cards/card.interface.js.map +1 -1
  8. package/dist/cards/impl/_card-mappings.js +66 -0
  9. package/dist/cards/impl/_card-mappings.js.map +1 -1
  10. package/dist/cards/impl/bg-spell/energizing-chamber.d.ts +2 -0
  11. package/dist/cards/impl/bg-spell/energizing-chamber.js +27 -0
  12. package/dist/cards/impl/bg-spell/energizing-chamber.js.map +1 -0
  13. package/dist/cards/impl/bg-spell/sludge-corrosion.d.ts +2 -0
  14. package/dist/cards/impl/bg-spell/sludge-corrosion.js +28 -0
  15. package/dist/cards/impl/bg-spell/sludge-corrosion.js.map +1 -0
  16. package/dist/cards/impl/minion/cthrax-wrecker.d.ts +2 -0
  17. package/dist/cards/impl/minion/cthrax-wrecker.js +25 -0
  18. package/dist/cards/impl/minion/cthrax-wrecker.js.map +1 -0
  19. package/dist/cards/impl/minion/cthun.d.ts +2 -0
  20. package/dist/cards/impl/minion/cthun.js +29 -0
  21. package/dist/cards/impl/minion/cthun.js.map +1 -0
  22. package/dist/cards/impl/minion/cutthroat-kthir.d.ts +2 -0
  23. package/dist/cards/impl/minion/cutthroat-kthir.js +16 -0
  24. package/dist/cards/impl/minion/cutthroat-kthir.js.map +1 -0
  25. package/dist/cards/impl/minion/dark-paradox.d.ts +4 -0
  26. package/dist/cards/impl/minion/dark-paradox.js +109 -0
  27. package/dist/cards/impl/minion/dark-paradox.js.map +1 -0
  28. package/dist/cards/impl/minion/dark-puppeteer.d.ts +2 -0
  29. package/dist/cards/impl/minion/dark-puppeteer.js +13 -0
  30. package/dist/cards/impl/minion/dark-puppeteer.js.map +1 -0
  31. package/dist/cards/impl/minion/de-volition-ist.d.ts +2 -0
  32. package/dist/cards/impl/minion/de-volition-ist.js +23 -0
  33. package/dist/cards/impl/minion/de-volition-ist.js.map +1 -0
  34. package/dist/cards/impl/minion/drifting-sacrifice.d.ts +2 -0
  35. package/dist/cards/impl/minion/drifting-sacrifice.js +14 -0
  36. package/dist/cards/impl/minion/drifting-sacrifice.js.map +1 -0
  37. package/dist/cards/impl/minion/faceless-converter.d.ts +2 -0
  38. package/dist/cards/impl/minion/faceless-converter.js +14 -0
  39. package/dist/cards/impl/minion/faceless-converter.js.map +1 -0
  40. package/dist/cards/impl/minion/fetid-corroder.d.ts +2 -0
  41. package/dist/cards/impl/minion/fetid-corroder.js +13 -0
  42. package/dist/cards/impl/minion/fetid-corroder.js.map +1 -0
  43. package/dist/cards/impl/minion/hackerfin.js +4 -3
  44. package/dist/cards/impl/minion/hackerfin.js.map +1 -1
  45. package/dist/cards/impl/minion/harbinger-aphlass.d.ts +2 -0
  46. package/dist/cards/impl/minion/harbinger-aphlass.js +17 -0
  47. package/dist/cards/impl/minion/harbinger-aphlass.js.map +1 -0
  48. package/dist/cards/impl/minion/heroic-broodmother.d.ts +2 -0
  49. package/dist/cards/impl/minion/heroic-broodmother.js +27 -0
  50. package/dist/cards/impl/minion/heroic-broodmother.js.map +1 -0
  51. package/dist/cards/impl/minion/hopebringer.d.ts +2 -0
  52. package/dist/cards/impl/minion/hopebringer.js +26 -0
  53. package/dist/cards/impl/minion/hopebringer.js.map +1 -0
  54. package/dist/cards/impl/minion/iron-groundskeeper.d.ts +2 -0
  55. package/dist/cards/impl/minion/iron-groundskeeper.js +13 -0
  56. package/dist/cards/impl/minion/iron-groundskeeper.js.map +1 -0
  57. package/dist/cards/impl/minion/joyous.d.ts +2 -0
  58. package/dist/cards/impl/minion/joyous.js +15 -0
  59. package/dist/cards/impl/minion/joyous.js.map +1 -0
  60. package/dist/cards/impl/minion/lichling-hoarder.d.ts +2 -0
  61. package/dist/cards/impl/minion/lichling-hoarder.js +26 -0
  62. package/dist/cards/impl/minion/lichling-hoarder.js.map +1 -0
  63. package/dist/cards/impl/minion/mindbender-ghursha.d.ts +2 -0
  64. package/dist/cards/impl/minion/mindbender-ghursha.js +19 -0
  65. package/dist/cards/impl/minion/mindbender-ghursha.js.map +1 -0
  66. package/dist/cards/impl/minion/mysterious-kthir.d.ts +2 -0
  67. package/dist/cards/impl/minion/mysterious-kthir.js +25 -0
  68. package/dist/cards/impl/minion/mysterious-kthir.js.map +1 -0
  69. package/dist/cards/impl/minion/nightmare-corroder.d.ts +2 -0
  70. package/dist/cards/impl/minion/nightmare-corroder.js +13 -0
  71. package/dist/cards/impl/minion/nightmare-corroder.js.map +1 -0
  72. package/dist/cards/impl/minion/nraqi-sapper.d.ts +2 -0
  73. package/dist/cards/impl/minion/nraqi-sapper.js +20 -0
  74. package/dist/cards/impl/minion/nraqi-sapper.js.map +1 -0
  75. package/dist/cards/impl/minion/parasitic-fleshling.d.ts +2 -0
  76. package/dist/cards/impl/minion/parasitic-fleshling.js +18 -0
  77. package/dist/cards/impl/minion/parasitic-fleshling.js.map +1 -0
  78. package/dist/cards/impl/minion/resourceful-robot.d.ts +2 -0
  79. package/dist/cards/impl/minion/resourceful-robot.js +21 -0
  80. package/dist/cards/impl/minion/resourceful-robot.js.map +1 -0
  81. package/dist/cards/impl/minion/sha-of-fear.d.ts +2 -0
  82. package/dist/cards/impl/minion/sha-of-fear.js +18 -0
  83. package/dist/cards/impl/minion/sha-of-fear.js.map +1 -0
  84. package/dist/cards/impl/minion/the-shadow-of-doubt.d.ts +2 -0
  85. package/dist/cards/impl/minion/the-shadow-of-doubt.js +14 -0
  86. package/dist/cards/impl/minion/the-shadow-of-doubt.js.map +1 -0
  87. package/dist/cards/impl/minion/underrot-spawn.d.ts +2 -0
  88. package/dist/cards/impl/minion/underrot-spawn.js +21 -0
  89. package/dist/cards/impl/minion/underrot-spawn.js.map +1 -0
  90. package/dist/cards/impl/minion/unwilling-slacker.d.ts +2 -0
  91. package/dist/cards/impl/minion/unwilling-slacker.js +14 -0
  92. package/dist/cards/impl/minion/unwilling-slacker.js.map +1 -0
  93. package/dist/cards/impl/minion/vicious-mindslasher.d.ts +2 -0
  94. package/dist/cards/impl/minion/vicious-mindslasher.js +22 -0
  95. package/dist/cards/impl/minion/vicious-mindslasher.js.map +1 -0
  96. package/dist/cards/impl/minion/yshaarj.d.ts +2 -0
  97. package/dist/cards/impl/minion/yshaarj.js +30 -0
  98. package/dist/cards/impl/minion/yshaarj.js.map +1 -0
  99. package/dist/cards/impl/trinket/converter-portrait.d.ts +2 -0
  100. package/dist/cards/impl/trinket/converter-portrait.js +19 -0
  101. package/dist/cards/impl/trinket/converter-portrait.js.map +1 -0
  102. package/dist/cards/impl/trinket/corrupted-baton.d.ts +2 -0
  103. package/dist/cards/impl/trinket/corrupted-baton.js +12 -0
  104. package/dist/cards/impl/trinket/corrupted-baton.js.map +1 -0
  105. package/dist/cards/impl/trinket/snarky-portrait.d.ts +2 -0
  106. package/dist/cards/impl/trinket/snarky-portrait.js +24 -0
  107. package/dist/cards/impl/trinket/snarky-portrait.js.map +1 -0
  108. package/dist/mechanics/player-global-effects.d.ts +1 -0
  109. package/dist/mechanics/player-global-effects.js +24 -1
  110. package/dist/mechanics/player-global-effects.js.map +1 -1
  111. package/dist/services/card-ids.d.ts +314 -5
  112. package/dist/services/card-ids.js.map +1 -1
  113. package/dist/simulation/after-attack.js +13 -0
  114. package/dist/simulation/after-attack.js.map +1 -1
  115. package/dist/simulation/auras.js +31 -30
  116. package/dist/simulation/auras.js.map +1 -1
  117. package/dist/simulation/battlecries.js +2 -0
  118. package/dist/simulation/battlecries.js.map +1 -1
  119. package/dist/simulation/death-effects.js +2 -0
  120. package/dist/simulation/death-effects.js.map +1 -1
  121. package/dist/simulation/deity.d.ts +13 -0
  122. package/dist/simulation/deity.js +125 -0
  123. package/dist/simulation/deity.js.map +1 -0
  124. package/dist/simulation/discard.d.ts +5 -0
  125. package/dist/simulation/discard.js +49 -0
  126. package/dist/simulation/discard.js.map +1 -0
  127. package/dist/temp-card-ids.js.map +1 -1
  128. package/dist/utils.d.ts +1 -0
  129. package/dist/utils.js +13 -2
  130. package/dist/utils.js.map +1 -1
  131. package/package.json +1 -1
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CThun = void 0;
4
+ const stats_1 = require("../../../simulation/stats");
5
+ exports.CThun = {
6
+ cardIds: ["BGFYM_000", "BGFYM_000_G"],
7
+ onAwaken: (minion, input) => {
8
+ var _a, _b;
9
+ const others = input.board.filter((e) => e.entityId !== minion.entityId && e.health > 0 && !e.definitelyDead);
10
+ if (!others.length) {
11
+ return;
12
+ }
13
+ const double = minion.cardId === "BGFYM_000_G" ? 2 : 1;
14
+ let remainingAttack = ((_a = minion.attack) !== null && _a !== void 0 ? _a : 0) * double;
15
+ let remainingHealth = ((_b = minion.health) !== null && _b !== void 0 ? _b : 0) * double;
16
+ const baseAttack = Math.floor(remainingAttack / others.length);
17
+ const baseHealth = Math.floor(remainingHealth / others.length);
18
+ remainingAttack -= baseAttack * others.length;
19
+ remainingHealth -= baseHealth * others.length;
20
+ for (let i = 0; i < others.length; i++) {
21
+ const extraAtk = remainingAttack > 0 ? 1 : 0;
22
+ const extraHp = remainingHealth > 0 ? 1 : 0;
23
+ remainingAttack -= extraAtk;
24
+ remainingHealth -= extraHp;
25
+ (0, stats_1.modifyStats)(others[i], minion, baseAttack + extraAtk, baseHealth + extraHp, input.board, input.hero, input.gameState);
26
+ }
27
+ },
28
+ };
29
+ //# sourceMappingURL=cthun.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cthun.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/cthun.ts"],"names":[],"mappings":";;;AAUA,qDAAwD;AAI3C,QAAA,KAAK,GAAc;IAC/B,OAAO,EAAE,4BAAoD;IAC7D,QAAQ,EAAE,CAAC,MAAmB,EAAE,KAAuB,EAAE,EAAE;;QAC1D,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,MAAM,CAAC,QAAQ,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;QAC9G,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;YACnB,OAAO;SACP;QACD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,kBAA8B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACnE,IAAI,eAAe,GAAG,CAAC,MAAA,MAAM,CAAC,MAAM,mCAAI,CAAC,CAAC,GAAG,MAAM,CAAC;QACpD,IAAI,eAAe,GAAG,CAAC,MAAA,MAAM,CAAC,MAAM,mCAAI,CAAC,CAAC,GAAG,MAAM,CAAC;QACpD,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QAC/D,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QAC/D,eAAe,IAAI,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;QAC9C,eAAe,IAAI,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;QAC9C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACvC,MAAM,QAAQ,GAAG,eAAe,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC7C,MAAM,OAAO,GAAG,eAAe,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5C,eAAe,IAAI,QAAQ,CAAC;YAC5B,eAAe,IAAI,OAAO,CAAC;YAC3B,IAAA,mBAAW,EACV,MAAM,CAAC,CAAC,CAAC,EACT,MAAM,EACN,UAAU,GAAG,QAAQ,EACrB,UAAU,GAAG,OAAO,EACpB,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,SAAS,CACf,CAAC;SACF;IACF,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * C'Thun (Tier 3, 1/1)\r\n * Deity. After this awakens, give this minion's stats split amongst your other minions.\r\n *\r\n * Golden C'Thun (Tier 3, 2/2)\r\n * Deity. After this awakens, give double this minion's stats split amongst your other minions.\r\n *\r\n * Only fires on BG_OldGod awaken, not generic spawn / reborn.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { DeityAwakenInput, DeityCard } from '../../card.interface';\r\n\r\nexport const CThun: DeityCard = {\r\n\tcardIds: [CardIds.Cthun_BGFYM_000, CardIds.Cthun_BGFYM_000_G],\r\n\tonAwaken: (minion: BoardEntity, input: DeityAwakenInput) => {\r\n\t\tconst others = input.board.filter((e) => e.entityId !== minion.entityId && e.health > 0 && !e.definitelyDead);\r\n\t\tif (!others.length) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst double = minion.cardId === CardIds.Cthun_BGFYM_000_G ? 2 : 1;\r\n\t\tlet remainingAttack = (minion.attack ?? 0) * double;\r\n\t\tlet remainingHealth = (minion.health ?? 0) * double;\r\n\t\tconst baseAttack = Math.floor(remainingAttack / others.length);\r\n\t\tconst baseHealth = Math.floor(remainingHealth / others.length);\r\n\t\tremainingAttack -= baseAttack * others.length;\r\n\t\tremainingHealth -= baseHealth * others.length;\r\n\t\tfor (let i = 0; i < others.length; i++) {\r\n\t\t\tconst extraAtk = remainingAttack > 0 ? 1 : 0;\r\n\t\t\tconst extraHp = remainingHealth > 0 ? 1 : 0;\r\n\t\t\tremainingAttack -= extraAtk;\r\n\t\t\tremainingHealth -= extraHp;\r\n\t\t\tmodifyStats(\r\n\t\t\t\tothers[i],\r\n\t\t\t\tminion,\r\n\t\t\t\tbaseAttack + extraAtk,\r\n\t\t\t\tbaseHealth + extraHp,\r\n\t\t\t\tinput.board,\r\n\t\t\t\tinput.hero,\r\n\t\t\t\tinput.gameState,\r\n\t\t\t);\r\n\t\t}\r\n\t},\r\n};\r\n"]}
@@ -0,0 +1,2 @@
1
+ import { OnDiscardCard } from '../../card.interface';
2
+ export declare const CutthroatKthir: OnDiscardCard;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CutthroatKthir = void 0;
4
+ const deity_1 = require("../../../simulation/deity");
5
+ const stats_1 = require("../../../simulation/stats");
6
+ exports.CutthroatKthir = {
7
+ cardIds: ["BG36_106", "BG36_106_G"],
8
+ onDiscard: (minion, input) => {
9
+ var _a, _b;
10
+ const atk = (_a = minion.scriptDataNum1) !== null && _a !== void 0 ? _a : (minion.cardId === "BG36_106_G" ? 8 : 4);
11
+ const hp = (_b = minion.scriptDataNum2) !== null && _b !== void 0 ? _b : atk;
12
+ (0, stats_1.modifyStats)(minion, minion, atk, hp, input.board, input.hero, input.gameState);
13
+ (0, deity_1.buffYourDeity)(input.hero, input.board, minion, atk, hp, input.gameState);
14
+ },
15
+ };
16
+ //# sourceMappingURL=cutthroat-kthir.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cutthroat-kthir.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/cutthroat-kthir.ts"],"names":[],"mappings":";;;AAQA,qDAA0D;AAC1D,qDAAwD;AAI3C,QAAA,cAAc,GAAkB;IAC5C,OAAO,EAAE,0BAAoE;IAC7E,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAmB,EAAE,EAAE;;QACvD,MAAM,GAAG,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,CAAC,MAAM,CAAC,MAAM,iBAAsC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACnG,MAAM,EAAE,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,GAAG,CAAC;QACxC,IAAA,mBAAW,EAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QAC/E,IAAA,qBAAa,EAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAC1E,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Cutthroat K'Thir (Tier 4, 4/4)\r\n * Whenever you discard a card, give this and your Deity +4/+4.\r\n *\r\n * Golden Cutthroat K'Thir (Tier 4, 8/8)\r\n * Whenever you discard a card, give this and your Deity +8/+8.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { buffYourDeity } from '../../../simulation/deity';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { DiscardInput, OnDiscardCard } from '../../card.interface';\r\n\r\nexport const CutthroatKthir: OnDiscardCard = {\r\n\tcardIds: [CardIds.CutthroatKthir_BG36_106, CardIds.CutthroatKthir_BG36_106_G],\r\n\tonDiscard: (minion: BoardEntity, input: DiscardInput) => {\r\n\t\tconst atk = minion.scriptDataNum1 ?? (minion.cardId === CardIds.CutthroatKthir_BG36_106_G ? 8 : 4);\r\n\t\tconst hp = minion.scriptDataNum2 ?? atk;\r\n\t\tmodifyStats(minion, minion, atk, hp, input.board, input.hero, input.gameState);\r\n\t\tbuffYourDeity(input.hero, input.board, minion, atk, hp, input.gameState);\r\n\t},\r\n};\r\n"]}
@@ -0,0 +1,4 @@
1
+ import { DeathrattleSpawnCard, OnDespawnedCard, OnGlobalInfoUpdatedCard, OnSpawnedCard, RallyCard } from '../../card.interface';
2
+ export declare const DarkParadoxRally: RallyCard;
3
+ export declare const DarkParadoxBattlecry: OnSpawnedCard & OnDespawnedCard & OnGlobalInfoUpdatedCard;
4
+ export declare const DarkParadoxGolem: DeathrattleSpawnCard;
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DarkParadoxGolem = exports.DarkParadoxBattlecry = exports.DarkParadoxRally = void 0;
4
+ const reference_data_1 = require("@firestone-hs/reference-data");
5
+ const cards_in_hand_1 = require("../../../simulation/cards-in-hand");
6
+ const deathrattle_spawns_1 = require("../../../simulation/deathrattle-spawns");
7
+ const stats_1 = require("../../../simulation/stats");
8
+ const utils_1 = require("../../../utils");
9
+ exports.DarkParadoxRally = {
10
+ cardIds: ["BG36_360t5", "BG36_360_Gt5"],
11
+ rally: (minion, input) => {
12
+ var _a, _b, _c;
13
+ const copies = minion.cardId === "BG36_360_Gt5" ? 2 : 1;
14
+ const tribeCounts = new Map();
15
+ for (const entity of input.attackingBoard) {
16
+ if (entity.health <= 0 || entity.definitelyDead) {
17
+ continue;
18
+ }
19
+ const tribes = (0, utils_1.getEffectiveTribesForEntity)(entity, input.attackingHero, input.gameState.anomalies, input.gameState.allCards);
20
+ for (const tribe of tribes) {
21
+ if (tribe === reference_data_1.Race.ALL) {
22
+ for (const bgRace of reference_data_1.ALL_BG_RACES) {
23
+ tribeCounts.set(bgRace, ((_a = tribeCounts.get(bgRace)) !== null && _a !== void 0 ? _a : 0) + 1);
24
+ }
25
+ }
26
+ else {
27
+ tribeCounts.set(tribe, ((_b = tribeCounts.get(tribe)) !== null && _b !== void 0 ? _b : 0) + 1);
28
+ }
29
+ }
30
+ }
31
+ let mostCommonTribe = null;
32
+ let maxCount = 0;
33
+ for (const [tribe, count] of tribeCounts) {
34
+ if (count > maxCount) {
35
+ maxCount = count;
36
+ mostCommonTribe = tribe;
37
+ }
38
+ }
39
+ if (mostCommonTribe != null) {
40
+ const cardsToAdd = [];
41
+ for (let i = 0; i < copies; i++) {
42
+ const cardId = input.gameState.cardsData.getRandomMinionForTribe(mostCommonTribe, (_c = input.attackingHero.tavernTier) !== null && _c !== void 0 ? _c : 6);
43
+ if (cardId) {
44
+ cardsToAdd.push(cardId);
45
+ }
46
+ }
47
+ if (cardsToAdd.length) {
48
+ (0, cards_in_hand_1.addCardsInHand)(input.attackingHero, input.attackingBoard, cardsToAdd, input.gameState);
49
+ }
50
+ }
51
+ return { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };
52
+ },
53
+ };
54
+ const battlecryAuraPerTrigger = (minion) => {
55
+ var _a, _b;
56
+ const golden = minion.cardId === "BG36_360_Gt6";
57
+ return {
58
+ attack: (_a = minion.scriptDataNum1) !== null && _a !== void 0 ? _a : (golden ? 4 : 2),
59
+ health: (_b = minion.scriptDataNum2) !== null && _b !== void 0 ? _b : (golden ? 4 : 2),
60
+ };
61
+ };
62
+ exports.DarkParadoxBattlecry = {
63
+ cardIds: ["BG36_360t6", "BG36_360_Gt6"],
64
+ onSpawned: (minion, input) => {
65
+ var _a;
66
+ const { attack, health } = battlecryAuraPerTrigger(minion);
67
+ const triggers = (_a = input.hero.globalInfo.BattlecriesTriggeredThisGame) !== null && _a !== void 0 ? _a : 0;
68
+ (0, stats_1.modifyStats)(minion, null, input.applyAttackAuras ? attack * triggers : 0, input.applyHealthAuras ? health * triggers : 0, input.board, input.hero, input.gameState, false);
69
+ },
70
+ onDespawned: (minion, input) => {
71
+ var _a;
72
+ const { attack, health } = battlecryAuraPerTrigger(minion);
73
+ const triggers = (_a = input.hero.globalInfo.BattlecriesTriggeredThisGame) !== null && _a !== void 0 ? _a : 0;
74
+ if (input.applyAttackAuras) {
75
+ minion.attack = Math.max(0, minion.attack - attack * triggers);
76
+ }
77
+ if (input.applyHealthAuras) {
78
+ minion.health = Math.max(Math.min(minion.health, 1), minion.health - health * triggers);
79
+ }
80
+ },
81
+ onGlobalInfoUpdated: (minion, input) => {
82
+ const { attack, health } = battlecryAuraPerTrigger(minion);
83
+ for (const value of input.values) {
84
+ if (value.type === 'BattlecriesTriggeredThisGame') {
85
+ const delta = value.newValue - value.oldValue;
86
+ minion.attack += delta * attack;
87
+ minion.maxAttack = minion.attack;
88
+ minion.health += delta * health;
89
+ minion.maxHealth = Math.max(minion.maxHealth, minion.health);
90
+ }
91
+ }
92
+ },
93
+ };
94
+ exports.DarkParadoxGolem = {
95
+ cardIds: ["BG36_360t9", "BG36_360_Gt9"],
96
+ deathrattleSpawn: (minion, input) => {
97
+ var _a, _b;
98
+ const mult = minion.cardId === "BG36_360_Gt9" ? 2 : 1;
99
+ const spawns = (0, deathrattle_spawns_1.simplifiedSpawnEntities)("BG30_MagicItem_442t", 1, input);
100
+ for (const spawn of spawns) {
101
+ spawn.attack = ((_a = minion.maxAttack) !== null && _a !== void 0 ? _a : minion.attack) * mult;
102
+ spawn.maxAttack = spawn.attack;
103
+ spawn.health = ((_b = minion.maxHealth) !== null && _b !== void 0 ? _b : minion.health) * mult;
104
+ spawn.maxHealth = spawn.health;
105
+ }
106
+ return spawns;
107
+ },
108
+ };
109
+ //# sourceMappingURL=dark-paradox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dark-paradox.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/dark-paradox.ts"],"names":[],"mappings":"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","sourcesContent":["/**\r\n * Dark Paradox variants with combat behaviour.\r\n *\r\n * Rally (BG36_360t5): Get a random minion of your most common type.\r\n * Battlecry aura (BG36_360t6): Has +2/+2 for each Battlecry you've triggered this game (wherever this is).\r\n * Golem (BG36_360t9): Deathrattle: Summon a Golem with this minion's stats.\r\n */\r\nimport { ALL_BG_RACES, Race } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { OnGlobalInfoUpdatedInput } from '../../../mechanics/player-global-effects';\r\nimport { OnDespawnInput, OnSpawnInput } from '../../../simulation/add-minion-to-board';\r\nimport { addCardsInHand } from '../../../simulation/cards-in-hand';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { simplifiedSpawnEntities } from '../../../simulation/deathrattle-spawns';\r\nimport { OnAttackInput } from '../../../simulation/on-attack';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { getEffectiveTribesForEntity } from '../../../utils';\r\nimport {\r\n\tDeathrattleSpawnCard,\r\n\tOnDespawnedCard,\r\n\tOnGlobalInfoUpdatedCard,\r\n\tOnSpawnedCard,\r\n\tRallyCard,\r\n} from '../../card.interface';\r\n\r\nexport const DarkParadoxRally: RallyCard = {\r\n\tcardIds: [CardIds.DarkParadox_DarkParadoxToken_BG36_360t5, CardIds.DarkParadox_DarkParadoxToken_BG36_360_Gt5],\r\n\trally: (minion: BoardEntity, input: OnAttackInput) => {\r\n\t\tconst copies = minion.cardId === CardIds.DarkParadox_DarkParadoxToken_BG36_360_Gt5 ? 2 : 1;\r\n\t\tconst tribeCounts = new Map<Race, number>();\r\n\t\tfor (const entity of input.attackingBoard) {\r\n\t\t\tif (entity.health <= 0 || entity.definitelyDead) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tconst tribes = getEffectiveTribesForEntity(\r\n\t\t\t\tentity,\r\n\t\t\t\tinput.attackingHero,\r\n\t\t\t\tinput.gameState.anomalies,\r\n\t\t\t\tinput.gameState.allCards,\r\n\t\t\t);\r\n\t\t\tfor (const tribe of tribes) {\r\n\t\t\t\tif (tribe === Race.ALL) {\r\n\t\t\t\t\tfor (const bgRace of ALL_BG_RACES) {\r\n\t\t\t\t\t\ttribeCounts.set(bgRace, (tribeCounts.get(bgRace) ?? 0) + 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttribeCounts.set(tribe, (tribeCounts.get(tribe) ?? 0) + 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tlet mostCommonTribe: Race | null = null;\r\n\t\tlet maxCount = 0;\r\n\t\tfor (const [tribe, count] of tribeCounts) {\r\n\t\t\tif (count > maxCount) {\r\n\t\t\t\tmaxCount = count;\r\n\t\t\t\tmostCommonTribe = tribe;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (mostCommonTribe != null) {\r\n\t\t\tconst cardsToAdd = [];\r\n\t\t\tfor (let i = 0; i < copies; i++) {\r\n\t\t\t\tconst cardId = input.gameState.cardsData.getRandomMinionForTribe(\r\n\t\t\t\t\tmostCommonTribe,\r\n\t\t\t\t\tinput.attackingHero.tavernTier ?? 6,\r\n\t\t\t\t);\r\n\t\t\t\tif (cardId) {\r\n\t\t\t\t\tcardsToAdd.push(cardId);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (cardsToAdd.length) {\r\n\t\t\t\taddCardsInHand(input.attackingHero, input.attackingBoard, cardsToAdd, input.gameState);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };\r\n\t},\r\n};\r\n\r\nconst battlecryAuraPerTrigger = (minion: BoardEntity): { attack: number; health: number } => {\r\n\tconst golden = minion.cardId === CardIds.DarkParadox_DarkParadoxToken_BG36_360_Gt6;\r\n\treturn {\r\n\t\tattack: minion.scriptDataNum1 ?? (golden ? 4 : 2),\r\n\t\thealth: minion.scriptDataNum2 ?? (golden ? 4 : 2),\r\n\t};\r\n};\r\n\r\nexport const DarkParadoxBattlecry: OnSpawnedCard & OnDespawnedCard & OnGlobalInfoUpdatedCard = {\r\n\tcardIds: [CardIds.DarkParadox_DarkParadoxToken_BG36_360t6, CardIds.DarkParadox_DarkParadoxToken_BG36_360_Gt6],\r\n\tonSpawned: (minion: BoardEntity, input: OnSpawnInput) => {\r\n\t\tconst { attack, health } = battlecryAuraPerTrigger(minion);\r\n\t\tconst triggers = input.hero.globalInfo.BattlecriesTriggeredThisGame ?? 0;\r\n\t\tmodifyStats(\r\n\t\t\tminion,\r\n\t\t\tnull,\r\n\t\t\tinput.applyAttackAuras ? attack * triggers : 0,\r\n\t\t\tinput.applyHealthAuras ? health * triggers : 0,\r\n\t\t\tinput.board,\r\n\t\t\tinput.hero,\r\n\t\t\tinput.gameState,\r\n\t\t\tfalse,\r\n\t\t);\r\n\t},\r\n\tonDespawned: (minion: BoardEntity, input: OnDespawnInput) => {\r\n\t\tconst { attack, health } = battlecryAuraPerTrigger(minion);\r\n\t\tconst triggers = input.hero.globalInfo.BattlecriesTriggeredThisGame ?? 0;\r\n\t\tif (input.applyAttackAuras) {\r\n\t\t\tminion.attack = Math.max(0, minion.attack - attack * triggers);\r\n\t\t}\r\n\t\tif (input.applyHealthAuras) {\r\n\t\t\tminion.health = Math.max(Math.min(minion.health, 1), minion.health - health * triggers);\r\n\t\t}\r\n\t},\r\n\tonGlobalInfoUpdated: (minion: BoardEntity, input: OnGlobalInfoUpdatedInput) => {\r\n\t\tconst { attack, health } = battlecryAuraPerTrigger(minion);\r\n\t\tfor (const value of input.values) {\r\n\t\t\tif (value.type === 'BattlecriesTriggeredThisGame') {\r\n\t\t\t\tconst delta = value.newValue - value.oldValue;\r\n\t\t\t\tminion.attack += delta * attack;\r\n\t\t\t\tminion.maxAttack = minion.attack;\r\n\t\t\t\tminion.health += delta * health;\r\n\t\t\t\tminion.maxHealth = Math.max(minion.maxHealth, minion.health);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n\r\nexport const DarkParadoxGolem: DeathrattleSpawnCard = {\r\n\tcardIds: [CardIds.DarkParadox_DarkParadoxToken_BG36_360t9, CardIds.DarkParadox_DarkParadoxToken_BG36_360_Gt9],\r\n\tdeathrattleSpawn: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.DarkParadox_DarkParadoxToken_BG36_360_Gt9 ? 2 : 1;\r\n\t\tconst spawns = simplifiedSpawnEntities(CardIds.BloodGolemSticker_BloodGolemToken_BG30_MagicItem_442t, 1, input);\r\n\t\tfor (const spawn of spawns) {\r\n\t\t\tspawn.attack = (minion.maxAttack ?? minion.attack) * mult;\r\n\t\t\tspawn.maxAttack = spawn.attack;\r\n\t\t\tspawn.health = (minion.maxHealth ?? minion.health) * mult;\r\n\t\t\tspawn.maxHealth = spawn.health;\r\n\t\t}\r\n\t\treturn spawns;\r\n\t},\r\n};\r\n"]}
@@ -0,0 +1,2 @@
1
+ import { DeathrattleEffectCard } from '../../card.interface';
2
+ export declare const DarkPuppeteer: DeathrattleEffectCard;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DarkPuppeteer = void 0;
4
+ exports.DarkPuppeteer = {
5
+ cardIds: ["BG36_104", "BG36_104_G"],
6
+ deathrattleEffect: (minion, input) => {
7
+ var _a, _b;
8
+ const amount = (_a = minion.scriptDataNum1) !== null && _a !== void 0 ? _a : (minion.cardId === "BG36_104_G" ? 8 : 4);
9
+ input.boardWithDeadEntityHero.globalInfo.TavernSpellHealthBuff =
10
+ ((_b = input.boardWithDeadEntityHero.globalInfo.TavernSpellHealthBuff) !== null && _b !== void 0 ? _b : 0) + amount;
11
+ },
12
+ };
13
+ //# sourceMappingURL=dark-puppeteer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dark-puppeteer.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/dark-puppeteer.ts"],"names":[],"mappings":";;;AAYa,QAAA,aAAa,GAA0B;IACnD,OAAO,EAAE,0BAAkE;IAC3E,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAAE,EAAE;;QAC5E,MAAM,MAAM,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,CAAC,MAAM,CAAC,MAAM,iBAAqC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrG,KAAK,CAAC,uBAAuB,CAAC,UAAU,CAAC,qBAAqB;YAC7D,CAAC,MAAA,KAAK,CAAC,uBAAuB,CAAC,UAAU,CAAC,qBAAqB,mCAAI,CAAC,CAAC,GAAG,MAAM,CAAC;IACjF,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Dark Puppeteer (Tier 6, 8/4)\r\n * Deathrattle: Your Tavern spells give an extra +4 Health this game.\r\n *\r\n * Golden Dark Puppeteer (Tier 6, 16/8)\r\n * Deathrattle: Your Tavern spells give an extra +8 Health this game.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { DeathrattleEffectCard } from '../../card.interface';\r\n\r\nexport const DarkPuppeteer: DeathrattleEffectCard = {\r\n\tcardIds: [CardIds.DarkPuppeteer_BG36_104, CardIds.DarkPuppeteer_BG36_104_G],\r\n\tdeathrattleEffect: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\tconst amount = minion.scriptDataNum1 ?? (minion.cardId === CardIds.DarkPuppeteer_BG36_104_G ? 8 : 4);\r\n\t\tinput.boardWithDeadEntityHero.globalInfo.TavernSpellHealthBuff =\r\n\t\t\t(input.boardWithDeadEntityHero.globalInfo.TavernSpellHealthBuff ?? 0) + amount;\r\n\t},\r\n};\r\n"]}
@@ -0,0 +1,2 @@
1
+ import { AfterThisAttacksCard } from '../../card.interface';
2
+ export declare const DeVolitionIst: AfterThisAttacksCard;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeVolitionIst = void 0;
4
+ const utils_1 = require("../../../services/utils");
5
+ const attack_1 = require("../../../simulation/attack");
6
+ exports.DeVolitionIst = {
7
+ cardIds: ["BG36_102", "BG36_102_G"],
8
+ afterThisAttacks: (minion, input) => {
9
+ var _a;
10
+ if (minion.health <= 0 || minion.definitelyDead) {
11
+ return { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };
12
+ }
13
+ const target = (0, utils_1.pickRandomHighestHealth)(input.defendingBoard);
14
+ if (!target) {
15
+ return { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };
16
+ }
17
+ const mult = minion.cardId === "BG36_102_G" ? 2 : 1;
18
+ const damage = ((_a = minion.attack) !== null && _a !== void 0 ? _a : 0) * mult;
19
+ const dmg = (0, attack_1.dealDamageToMinion)(target, input.defendingBoard, input.defendingHero, minion, damage, input.attackingBoard, input.attackingHero, input.gameState);
20
+ return { dmgDoneByAttacker: dmg, dmgDoneByDefender: 0 };
21
+ },
22
+ };
23
+ //# sourceMappingURL=de-volition-ist.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"de-volition-ist.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/de-volition-ist.ts"],"names":[],"mappings":";;;AAQA,mDAAkE;AAClE,uDAAgE;AAKnD,QAAA,aAAa,GAAyB;IAClD,OAAO,EAAE,0BAAkE;IAC3E,gBAAgB,EAAE,CAAC,MAAmB,EAAE,KAAoB,EAAE,EAAE;;QAC/D,IAAI,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,MAAM,CAAC,cAAc,EAAE;YAChD,OAAO,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,CAAC;SACtD;QACD,MAAM,MAAM,GAAG,IAAA,+BAAuB,EAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QAC7D,IAAI,CAAC,MAAM,EAAE;YACZ,OAAO,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,CAAC;SACtD;QACD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAqC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,CAAC,MAAA,MAAM,CAAC,MAAM,mCAAI,CAAC,CAAC,GAAG,IAAI,CAAC;QAC3C,MAAM,GAAG,GAAG,IAAA,2BAAkB,EAC7B,MAAM,EACN,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,aAAa,EACnB,MAAM,EACN,MAAM,EACN,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,SAAS,CACf,CAAC;QACF,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACzD,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * De-volition-ist (Tier 5, 4/8)\r\n * After this attacks, deal damage equal to this minion's Attack to the highest-Health enemy minion.\r\n *\r\n * Golden De-volition-ist (Tier 5, 8/16)\r\n * After this attacks, deal damage equal to double this minion's Attack to the highest-Health enemy minion.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { pickRandomHighestHealth } from '../../../services/utils';\r\nimport { dealDamageToMinion } from '../../../simulation/attack';\r\nimport { OnAttackInput } from '../../../simulation/on-attack';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { AfterThisAttacksCard } from '../../card.interface';\r\n\r\nexport const DeVolitionIst: AfterThisAttacksCard = {\r\n\tcardIds: [CardIds.DeVolitionIst_BG36_102, CardIds.DeVolitionIst_BG36_102_G],\r\n\tafterThisAttacks: (minion: BoardEntity, input: OnAttackInput) => {\r\n\t\tif (minion.health <= 0 || minion.definitelyDead) {\r\n\t\t\treturn { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };\r\n\t\t}\r\n\t\tconst target = pickRandomHighestHealth(input.defendingBoard);\r\n\t\tif (!target) {\r\n\t\t\treturn { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };\r\n\t\t}\r\n\t\tconst mult = minion.cardId === CardIds.DeVolitionIst_BG36_102_G ? 2 : 1;\r\n\t\tconst damage = (minion.attack ?? 0) * mult;\r\n\t\tconst dmg = dealDamageToMinion(\r\n\t\t\ttarget,\r\n\t\t\tinput.defendingBoard,\r\n\t\t\tinput.defendingHero,\r\n\t\t\tminion,\r\n\t\t\tdamage,\r\n\t\t\tinput.attackingBoard,\r\n\t\t\tinput.attackingHero,\r\n\t\t\tinput.gameState,\r\n\t\t);\r\n\t\treturn { dmgDoneByAttacker: dmg, dmgDoneByDefender: 0 };\r\n\t},\r\n};\r\n"]}
@@ -0,0 +1,2 @@
1
+ import { DeathrattleEffectCard } from '../../card.interface';
2
+ export declare const DriftingSacrifice: DeathrattleEffectCard;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DriftingSacrifice = void 0;
4
+ const deity_1 = require("../../../simulation/deity");
5
+ exports.DriftingSacrifice = {
6
+ cardIds: ["BG36_113", "BG36_113_G"],
7
+ deathrattleEffect: (minion, input) => {
8
+ var _a, _b;
9
+ const atk = (_a = minion.scriptDataNum1) !== null && _a !== void 0 ? _a : (minion.cardId === "BG36_113_G" ? 4 : 2);
10
+ const hp = (_b = minion.scriptDataNum2) !== null && _b !== void 0 ? _b : (minion.cardId === "BG36_113_G" ? 2 : 1);
11
+ (0, deity_1.buffYourDeity)(input.boardWithDeadEntityHero, input.boardWithDeadEntity, minion, atk, hp, input.gameState);
12
+ },
13
+ };
14
+ //# sourceMappingURL=drifting-sacrifice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drifting-sacrifice.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/drifting-sacrifice.ts"],"names":[],"mappings":";;;AAQA,qDAA0D;AAK7C,QAAA,iBAAiB,GAA0B;IACvD,OAAO,EAAE,0BAA0E;IACnF,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAAE,EAAE;;QAC5E,MAAM,GAAG,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,CAAC,MAAM,CAAC,MAAM,iBAAyC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACtG,MAAM,EAAE,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,CAAC,MAAM,CAAC,MAAM,iBAAyC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrG,IAAA,qBAAa,EACZ,KAAK,CAAC,uBAAuB,EAC7B,KAAK,CAAC,mBAAmB,EACzB,MAAM,EACN,GAAG,EACH,EAAE,EACF,KAAK,CAAC,SAAS,CACf,CAAC;IACH,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Drifting Sacrifice (Tier 3, 2/1)\r\n * Reborn. Deathrattle: Give your Deity +2/+1.\r\n *\r\n * Golden Drifting Sacrifice (Tier 3, 4/2)\r\n * Reborn. Deathrattle: Give your Deity +4/+2.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { buffYourDeity } from '../../../simulation/deity';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { DeathrattleEffectCard } from '../../card.interface';\r\n\r\nexport const DriftingSacrifice: DeathrattleEffectCard = {\r\n\tcardIds: [CardIds.DriftingSacrifice_BG36_113, CardIds.DriftingSacrifice_BG36_113_G],\r\n\tdeathrattleEffect: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\tconst atk = minion.scriptDataNum1 ?? (minion.cardId === CardIds.DriftingSacrifice_BG36_113_G ? 4 : 2);\r\n\t\tconst hp = minion.scriptDataNum2 ?? (minion.cardId === CardIds.DriftingSacrifice_BG36_113_G ? 2 : 1);\r\n\t\tbuffYourDeity(\r\n\t\t\tinput.boardWithDeadEntityHero,\r\n\t\t\tinput.boardWithDeadEntity,\r\n\t\t\tminion,\r\n\t\t\tatk,\r\n\t\t\thp,\r\n\t\t\tinput.gameState,\r\n\t\t);\r\n\t},\r\n};\r\n"]}
@@ -0,0 +1,2 @@
1
+ import { DeathrattleEffectCard } from '../../card.interface';
2
+ export declare const FacelessConverter: DeathrattleEffectCard;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FacelessConverter = void 0;
4
+ const deity_1 = require("../../../simulation/deity");
5
+ exports.FacelessConverter = {
6
+ cardIds: ["BG36_318", "BG36_318_G"],
7
+ deathrattleEffect: (minion, input) => {
8
+ var _a;
9
+ const base = minion.cardId === "BG36_318_G" ? 2 : 1;
10
+ const amount = base + ((_a = input.boardWithDeadEntityHero.globalInfo.TavernSpellsCastThisGame) !== null && _a !== void 0 ? _a : 0);
11
+ (0, deity_1.buffYourDeity)(input.boardWithDeadEntityHero, input.boardWithDeadEntity, minion, amount, amount, input.gameState);
12
+ },
13
+ };
14
+ //# sourceMappingURL=faceless-converter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"faceless-converter.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/faceless-converter.ts"],"names":[],"mappings":";;;AAQA,qDAA0D;AAK7C,QAAA,iBAAiB,GAA0B;IACvD,OAAO,EAAE,0BAA0E;IACnF,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAAE,EAAE;;QAC5E,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAyC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5E,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,MAAA,KAAK,CAAC,uBAAuB,CAAC,UAAU,CAAC,wBAAwB,mCAAI,CAAC,CAAC,CAAC;QAC/F,IAAA,qBAAa,EACZ,KAAK,CAAC,uBAAuB,EAC7B,KAAK,CAAC,mBAAmB,EACzB,MAAM,EACN,MAAM,EACN,MAAM,EACN,KAAK,CAAC,SAAS,CACf,CAAC;IACH,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Faceless Converter (Tier 5, 5/5)\r\n * Deathrattle: Give your Deity +1/+1 (improved by each Tavern spell you've cast this game).\r\n *\r\n * Golden Faceless Converter (Tier 5, 10/10)\r\n * Deathrattle: Give your Deity +2/+2 (improved by each Tavern spell you've cast this game).\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { buffYourDeity } from '../../../simulation/deity';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { DeathrattleEffectCard } from '../../card.interface';\r\n\r\nexport const FacelessConverter: DeathrattleEffectCard = {\r\n\tcardIds: [CardIds.FacelessConverter_BG36_318, CardIds.FacelessConverter_BG36_318_G],\r\n\tdeathrattleEffect: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\tconst base = minion.cardId === CardIds.FacelessConverter_BG36_318_G ? 2 : 1;\r\n\t\tconst amount = base + (input.boardWithDeadEntityHero.globalInfo.TavernSpellsCastThisGame ?? 0);\r\n\t\tbuffYourDeity(\r\n\t\t\tinput.boardWithDeadEntityHero,\r\n\t\t\tinput.boardWithDeadEntity,\r\n\t\t\tminion,\r\n\t\t\tamount,\r\n\t\t\tamount,\r\n\t\t\tinput.gameState,\r\n\t\t);\r\n\t},\r\n};\r\n"]}
@@ -0,0 +1,2 @@
1
+ import { BattlecryCard } from '../../card.interface';
2
+ export declare const FetidCorroder: BattlecryCard;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FetidCorroder = void 0;
4
+ const cards_in_hand_1 = require("../../../simulation/cards-in-hand");
5
+ exports.FetidCorroder = {
6
+ cardIds: ["BG36_112", "BG36_112_G"],
7
+ battlecry: (minion, input) => {
8
+ const mult = minion.cardId === "BG36_112_G" ? 2 : 1;
9
+ (0, cards_in_hand_1.addCardsInHand)(input.hero, input.board, Array(mult).fill("BG36_301t"), input.gameState);
10
+ return true;
11
+ },
12
+ };
13
+ //# sourceMappingURL=fetid-corroder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetid-corroder.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/fetid-corroder.ts"],"names":[],"mappings":";;;AASA,qEAAmE;AAItD,QAAA,aAAa,GAAkB;IAC3C,OAAO,EAAE,0BAAkE;IAC3E,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QACzD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAqC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACxE,IAAA,8BAAc,EAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,aAAwC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QACnH,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Fetid Corroder (Tier 3, 3/3)\r\n * Battlecry: Get a Sludge Corrosion.\r\n *\r\n * Golden Fetid Corroder (Tier 3, 6/6)\r\n * Battlecry: Get 2 Sludge Corrosions.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { BattlecryInput } from '../../../simulation/battlecries';\r\nimport { addCardsInHand } from '../../../simulation/cards-in-hand';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { BattlecryCard } from '../../card.interface';\r\n\r\nexport const FetidCorroder: BattlecryCard = {\r\n\tcardIds: [CardIds.FetidCorroder_BG36_112, CardIds.FetidCorroder_BG36_112_G],\r\n\tbattlecry: (minion: BoardEntity, input: BattlecryInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.FetidCorroder_BG36_112_G ? 2 : 1;\r\n\t\taddCardsInHand(input.hero, input.board, Array(mult).fill(CardIds.SludgeCorrosionToken_BG36_301t), input.gameState);\r\n\t\treturn true;\r\n\t},\r\n};\r\n"]}
@@ -4,7 +4,7 @@ exports.Hackerfin = void 0;
4
4
  const stats_1 = require("../../../simulation/stats");
5
5
  const cards_data_1 = require("../../cards-data");
6
6
  const baseAttackBuff = 3;
7
- const baseHealthBuff = 3;
7
+ const baseHealthBuff = 2;
8
8
  exports.Hackerfin = {
9
9
  cardIds: ["BG31_148", "BG31_148_G"],
10
10
  battlecry: (minion, input) => {
@@ -19,10 +19,11 @@ exports.Hackerfin = {
19
19
  }
20
20
  }
21
21
  }
22
- const baseBuff = 1 + totalWarbandKeywords;
22
+ const atk = (baseAttackBuff + totalWarbandKeywords) * mult;
23
+ const hp = (baseHealthBuff + totalWarbandKeywords) * mult;
23
24
  const targetBoard = input.board.filter((e) => e.entityId !== minion.entityId);
24
25
  for (const target of targetBoard) {
25
- (0, stats_1.modifyStats)(target, minion, baseBuff * mult, baseBuff * mult, input.board, input.hero, input.gameState);
26
+ (0, stats_1.modifyStats)(target, minion, atk, hp, input.board, input.hero, input.gameState);
26
27
  }
27
28
  return true;
28
29
  },
@@ -1 +1 @@
1
- {"version":3,"file":"hackerfin.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/hackerfin.ts"],"names":[],"mappings":";;;AAGA,qDAAwD;AAExD,iDAAkE;AAElE,MAAM,cAAc,GAAG,CAAC,CAAC;AACzB,MAAM,cAAc,GAAG,CAAC,CAAC;AAEZ,QAAA,SAAS,GAAkB;IACvC,OAAO,EAAE,0BAA0D;IACnE,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QACzD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAiC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACpE,IAAI,oBAAoB,GAAG,CAAC,CAAC;QAC7B,MAAM,mBAAmB,GAAG,CAAC,GAAG,+BAAkB,CAAC,CAAC;QACpD,KAAK,MAAM,MAAM,IAAI,KAAK,CAAC,KAAK,EAAE;YACjC,KAAK,MAAM,YAAY,IAAI,mBAAmB,EAAE;gBAC/C,IAAI,IAAA,uBAAU,EAAC,MAAM,EAAE,YAAY,CAAC,EAAE;oBACrC,oBAAoB,EAAE,CAAC;oBACvB,mBAAmB,CAAC,MAAM,CAAC,mBAAmB,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC;iBACzE;aACD;SACD;QACD,MAAM,QAAQ,GAAG,CAAC,GAAG,oBAAoB,CAAC;QAC1C,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC9E,KAAK,MAAM,MAAM,IAAI,WAAW,EAAE;YACjC,IAAA,mBAAW,EAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;SACxG;QACD,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '../../../services/card-ids';\nimport { BoardEntity } from '../../../board-entity';\r\nimport { BattlecryInput } from '../../../simulation/battlecries';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { BattlecryCard } from '../../card.interface';\r\nimport { hasKeyword, validBonusKeywords } from '../../cards-data';\r\n\r\nconst baseAttackBuff = 3;\r\nconst baseHealthBuff = 3;\r\n\r\nexport const Hackerfin: BattlecryCard = {\r\n\tcardIds: [CardIds.Hackerfin_BG31_148, CardIds.Hackerfin_BG31_148_G],\r\n\tbattlecry: (minion: BoardEntity, input: BattlecryInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.Hackerfin_BG31_148_G ? 2 : 1;\r\n\t\tlet totalWarbandKeywords = 0;\r\n\t\tconst keywordsToAttribute = [...validBonusKeywords];\r\n\t\tfor (const entity of input.board) {\r\n\t\t\tfor (const bonusKeyword of keywordsToAttribute) {\r\n\t\t\t\tif (hasKeyword(entity, bonusKeyword)) {\r\n\t\t\t\t\ttotalWarbandKeywords++;\r\n\t\t\t\t\tkeywordsToAttribute.splice(keywordsToAttribute.indexOf(bonusKeyword), 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tconst baseBuff = 1 + totalWarbandKeywords;\r\n\t\tconst targetBoard = input.board.filter((e) => e.entityId !== minion.entityId);\r\n\t\tfor (const target of targetBoard) {\r\n\t\t\tmodifyStats(target, minion, baseBuff * mult, baseBuff * mult, input.board, input.hero, input.gameState);\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"hackerfin.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/hackerfin.ts"],"names":[],"mappings":";;;AAGA,qDAAwD;AAExD,iDAAkE;AAElE,MAAM,cAAc,GAAG,CAAC,CAAC;AACzB,MAAM,cAAc,GAAG,CAAC,CAAC;AAEZ,QAAA,SAAS,GAAkB;IACvC,OAAO,EAAE,0BAA0D;IACnE,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QACzD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAiC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACpE,IAAI,oBAAoB,GAAG,CAAC,CAAC;QAC7B,MAAM,mBAAmB,GAAG,CAAC,GAAG,+BAAkB,CAAC,CAAC;QACpD,KAAK,MAAM,MAAM,IAAI,KAAK,CAAC,KAAK,EAAE;YACjC,KAAK,MAAM,YAAY,IAAI,mBAAmB,EAAE;gBAC/C,IAAI,IAAA,uBAAU,EAAC,MAAM,EAAE,YAAY,CAAC,EAAE;oBACrC,oBAAoB,EAAE,CAAC;oBACvB,mBAAmB,CAAC,MAAM,CAAC,mBAAmB,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC;iBACzE;aACD;SACD;QACD,MAAM,GAAG,GAAG,CAAC,cAAc,GAAG,oBAAoB,CAAC,GAAG,IAAI,CAAC;QAC3D,MAAM,EAAE,GAAG,CAAC,cAAc,GAAG,oBAAoB,CAAC,GAAG,IAAI,CAAC;QAC1D,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC9E,KAAK,MAAM,MAAM,IAAI,WAAW,EAAE;YACjC,IAAA,mBAAW,EAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;SAC/E;QACD,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '../../../services/card-ids';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { BattlecryInput } from '../../../simulation/battlecries';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { BattlecryCard } from '../../card.interface';\r\nimport { hasKeyword, validBonusKeywords } from '../../cards-data';\r\n\r\nconst baseAttackBuff = 3;\r\nconst baseHealthBuff = 2;\r\n\r\nexport const Hackerfin: BattlecryCard = {\r\n\tcardIds: [CardIds.Hackerfin_BG31_148, CardIds.Hackerfin_BG31_148_G],\r\n\tbattlecry: (minion: BoardEntity, input: BattlecryInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.Hackerfin_BG31_148_G ? 2 : 1;\r\n\t\tlet totalWarbandKeywords = 0;\r\n\t\tconst keywordsToAttribute = [...validBonusKeywords];\r\n\t\tfor (const entity of input.board) {\r\n\t\t\tfor (const bonusKeyword of keywordsToAttribute) {\r\n\t\t\t\tif (hasKeyword(entity, bonusKeyword)) {\r\n\t\t\t\t\ttotalWarbandKeywords++;\r\n\t\t\t\t\tkeywordsToAttribute.splice(keywordsToAttribute.indexOf(bonusKeyword), 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tconst atk = (baseAttackBuff + totalWarbandKeywords) * mult;\r\n\t\tconst hp = (baseHealthBuff + totalWarbandKeywords) * mult;\r\n\t\tconst targetBoard = input.board.filter((e) => e.entityId !== minion.entityId);\r\n\t\tfor (const target of targetBoard) {\r\n\t\t\tmodifyStats(target, minion, atk, hp, input.board, input.hero, input.gameState);\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n};\r\n"]}
@@ -0,0 +1,2 @@
1
+ import { OnDiscardCard } from '../../card.interface';
2
+ export declare const HarbingerAphlass: OnDiscardCard;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HarbingerAphlass = void 0;
4
+ const deity_1 = require("../../../simulation/deity");
5
+ exports.HarbingerAphlass = {
6
+ cardIds: ["BGFYM_005", "BGFYM_005_G"],
7
+ onDiscard: (minion, input) => {
8
+ var _a, _b;
9
+ const step = minion.cardId === "BGFYM_005_G" ? 2 : 1;
10
+ const atk = (_a = minion.scriptDataNum1) !== null && _a !== void 0 ? _a : step;
11
+ const hp = (_b = minion.scriptDataNum2) !== null && _b !== void 0 ? _b : step;
12
+ (0, deity_1.buffYourDeity)(input.hero, input.board, minion, atk, hp, input.gameState);
13
+ minion.scriptDataNum1 = atk + step;
14
+ minion.scriptDataNum2 = hp + step;
15
+ },
16
+ };
17
+ //# sourceMappingURL=harbinger-aphlass.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"harbinger-aphlass.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/harbinger-aphlass.ts"],"names":[],"mappings":";;;AAQA,qDAA0D;AAI7C,QAAA,gBAAgB,GAAkB;IAC9C,OAAO,EAAE,4BAA0E;IACnF,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAmB,EAAE,EAAE;;QACvD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,kBAAyC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5E,MAAM,GAAG,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,IAAI,CAAC;QAC1C,MAAM,EAAE,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,IAAI,CAAC;QACzC,IAAA,qBAAa,EAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QACzE,MAAM,CAAC,cAAc,GAAG,GAAG,GAAG,IAAI,CAAC;QACnC,MAAM,CAAC,cAAc,GAAG,EAAE,GAAG,IAAI,CAAC;IACnC,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Harbinger Aph'lass (Tier 6, 3/6)\r\n * Whenever you discard a card, give your Deity +1/+1 and improve this.\r\n *\r\n * Golden Harbinger Aph'lass (Tier 6, 6/12)\r\n * Whenever you discard a card, give your Deity +2/+2 and improve this.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { buffYourDeity } from '../../../simulation/deity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { DiscardInput, OnDiscardCard } from '../../card.interface';\r\n\r\nexport const HarbingerAphlass: OnDiscardCard = {\r\n\tcardIds: [CardIds.HarbingerAphlass_BGFYM_005, CardIds.HarbingerAphlass_BGFYM_005_G],\r\n\tonDiscard: (minion: BoardEntity, input: DiscardInput) => {\r\n\t\tconst step = minion.cardId === CardIds.HarbingerAphlass_BGFYM_005_G ? 2 : 1;\r\n\t\tconst atk = minion.scriptDataNum1 ?? step;\r\n\t\tconst hp = minion.scriptDataNum2 ?? step;\r\n\t\tbuffYourDeity(input.hero, input.board, minion, atk, hp, input.gameState);\r\n\t\tminion.scriptDataNum1 = atk + step;\r\n\t\tminion.scriptDataNum2 = hp + step;\r\n\t},\r\n};\r\n"]}
@@ -0,0 +1,2 @@
1
+ import { RallyCard, StartOfCombatCard } from '../../card.interface';
2
+ export declare const HeroicBroodmother: RallyCard & StartOfCombatCard;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HeroicBroodmother = void 0;
4
+ const divine_shield_1 = require("../../../keywords/divine-shield");
5
+ const attack_1 = require("../../../simulation/attack");
6
+ exports.HeroicBroodmother = {
7
+ cardIds: ["BG36_849", "BG36_849_G"],
8
+ rally: (minion, input) => {
9
+ (0, divine_shield_1.updateDivineShield)(minion, input.attackingBoard, input.attackingHero, input.defendingHero, true, input.gameState);
10
+ return { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };
11
+ },
12
+ startOfCombat: (minion, input) => {
13
+ const attacks = minion.cardId === "BG36_849_G" ? 2 : 1;
14
+ const previousHasAttacked = minion.hasAttacked;
15
+ for (let i = 0; i < attacks; i++) {
16
+ if (minion.health <= 0 || minion.definitelyDead || !input.opponentBoard.length) {
17
+ break;
18
+ }
19
+ minion.attackImmediately = true;
20
+ (0, attack_1.simulateAttack)(input.playerBoard, input.playerEntity, input.opponentBoard, input.opponentEntity, input.gameState);
21
+ minion.attackImmediately = false;
22
+ minion.hasAttacked = previousHasAttacked;
23
+ }
24
+ return { hasTriggered: true, shouldRecomputeCurrentAttacker: true };
25
+ },
26
+ };
27
+ //# sourceMappingURL=heroic-broodmother.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"heroic-broodmother.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/heroic-broodmother.ts"],"names":[],"mappings":";;;AAQA,mEAAqE;AACrE,uDAA4D;AAM/C,QAAA,iBAAiB,GAAkC;IAC/D,OAAO,EAAE,0BAA0E;IACnF,KAAK,EAAE,CAAC,MAAmB,EAAE,KAAoB,EAAE,EAAE;QACpD,IAAA,kCAAkB,EAAC,MAAM,EAAE,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QAClH,OAAO,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvD,CAAC;IACD,aAAa,EAAE,CAAC,MAAmB,EAAE,KAAe,EAAE,EAAE;QACvD,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,iBAAyC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/E,MAAM,mBAAmB,GAAG,MAAM,CAAC,WAAW,CAAC;QAC/C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,EAAE,EAAE;YACjC,IAAI,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,MAAM,CAAC,cAAc,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE;gBAC/E,MAAM;aACN;YACD,MAAM,CAAC,iBAAiB,GAAG,IAAI,CAAC;YAChC,IAAA,uBAAc,EACb,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,CACf,CAAC;YACF,MAAM,CAAC,iBAAiB,GAAG,KAAK,CAAC;YACjC,MAAM,CAAC,WAAW,GAAG,mBAAmB,CAAC;SACzC;QACD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,8BAA8B,EAAE,IAAI,EAAE,CAAC;IACrE,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Heroic Broodmother (Tier 6, 7/7)\r\n * Rally: Gain Divine Shield. Start of Combat: Attack immediately.\r\n *\r\n * Golden Heroic Broodmother (Tier 6, 14/14)\r\n * Rally: Gain Divine Shield. Start of Combat: Attack immediately twice.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { updateDivineShield } from '../../../keywords/divine-shield';\r\nimport { simulateAttack } from '../../../simulation/attack';\r\nimport { OnAttackInput } from '../../../simulation/on-attack';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { RallyCard, StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const HeroicBroodmother: RallyCard & StartOfCombatCard = {\r\n\tcardIds: [CardIds.HeroicBroodmother_BG36_849, CardIds.HeroicBroodmother_BG36_849_G],\r\n\trally: (minion: BoardEntity, input: OnAttackInput) => {\r\n\t\tupdateDivineShield(minion, input.attackingBoard, input.attackingHero, input.defendingHero, true, input.gameState);\r\n\t\treturn { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };\r\n\t},\r\n\tstartOfCombat: (minion: BoardEntity, input: SoCInput) => {\r\n\t\tconst attacks = minion.cardId === CardIds.HeroicBroodmother_BG36_849_G ? 2 : 1;\r\n\t\tconst previousHasAttacked = minion.hasAttacked;\r\n\t\tfor (let i = 0; i < attacks; i++) {\r\n\t\t\tif (minion.health <= 0 || minion.definitelyDead || !input.opponentBoard.length) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tminion.attackImmediately = true;\r\n\t\t\tsimulateAttack(\r\n\t\t\t\tinput.playerBoard,\r\n\t\t\t\tinput.playerEntity,\r\n\t\t\t\tinput.opponentBoard,\r\n\t\t\t\tinput.opponentEntity,\r\n\t\t\t\tinput.gameState,\r\n\t\t\t);\r\n\t\t\tminion.attackImmediately = false;\r\n\t\t\tminion.hasAttacked = previousHasAttacked;\r\n\t\t}\r\n\t\treturn { hasTriggered: true, shouldRecomputeCurrentAttacker: true };\r\n\t},\r\n};\r\n"]}
@@ -0,0 +1,2 @@
1
+ import { OnDivineShieldUpdatedCard, StartOfCombatCard } from '../../card.interface';
2
+ export declare const Hopebringer: StartOfCombatCard & OnDivineShieldUpdatedCard;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Hopebringer = void 0;
4
+ const stats_1 = require("../../../simulation/stats");
5
+ exports.Hopebringer = {
6
+ cardIds: ["BG36_364", "BG36_364_G"],
7
+ startOfCombat: (minion, input) => {
8
+ var _a, _b;
9
+ const atk = (_a = minion.scriptDataNum1) !== null && _a !== void 0 ? _a : (minion.cardId === "BG36_364_G" ? 6 : 3);
10
+ const hp = (_b = minion.scriptDataNum2) !== null && _b !== void 0 ? _b : atk;
11
+ for (const target of input.playerBoard) {
12
+ (0, stats_1.modifyStats)(target, minion, atk, hp, input.playerBoard, input.playerEntity, input.gameState);
13
+ }
14
+ return true;
15
+ },
16
+ onDivineShieldUpdated: (minion, input) => {
17
+ var _a, _b;
18
+ if (input.newValue) {
19
+ return;
20
+ }
21
+ const step = minion.cardId === "BG36_364_G" ? 6 : 3;
22
+ minion.scriptDataNum1 = ((_a = minion.scriptDataNum1) !== null && _a !== void 0 ? _a : step) + step;
23
+ minion.scriptDataNum2 = ((_b = minion.scriptDataNum2) !== null && _b !== void 0 ? _b : step) + step;
24
+ },
25
+ };
26
+ //# sourceMappingURL=hopebringer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hopebringer.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/hopebringer.ts"],"names":[],"mappings":";;;AAWA,qDAAwD;AAI3C,QAAA,WAAW,GAAkD;IACzE,OAAO,EAAE,0BAA8D;IACvE,aAAa,EAAE,CAAC,MAAmB,EAAE,KAAe,EAAE,EAAE;;QACvD,MAAM,GAAG,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,CAAC,MAAM,CAAC,MAAM,iBAAmC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAChG,MAAM,EAAE,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,GAAG,CAAC;QACxC,KAAK,MAAM,MAAM,IAAI,KAAK,CAAC,WAAW,EAAE;YACvC,IAAA,mBAAW,EAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;SAC7F;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IACD,qBAAqB,EAAE,CAAC,MAAmB,EAAE,KAAiC,EAAE,EAAE;;QACjF,IAAI,KAAK,CAAC,QAAQ,EAAE;YACnB,OAAO;SACP;QACD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAmC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACtE,MAAM,CAAC,cAAc,GAAG,CAAC,MAAA,MAAM,CAAC,cAAc,mCAAI,IAAI,CAAC,GAAG,IAAI,CAAC;QAC/D,MAAM,CAAC,cAAc,GAAG,CAAC,MAAA,MAAM,CAAC,cAAc,mCAAI,IAAI,CAAC,GAAG,IAAI,CAAC;IAChE,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Hopebringer (Tier 5, 3/3)\r\n * Start of Combat: Give your minions +3/+3.\r\n * Permanently improves after a friendly minion loses Divine Shield.\r\n *\r\n * Golden Hopebringer (Tier 5, 6/6)\r\n * Start of Combat: Give your minions +6/+6.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { OnDivineShieldUpdatedInput } from '../../../keywords/divine-shield';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { OnDivineShieldUpdatedCard, StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const Hopebringer: StartOfCombatCard & OnDivineShieldUpdatedCard = {\r\n\tcardIds: [CardIds.Hopebringer_BG36_364, CardIds.Hopebringer_BG36_364_G],\r\n\tstartOfCombat: (minion: BoardEntity, input: SoCInput) => {\r\n\t\tconst atk = minion.scriptDataNum1 ?? (minion.cardId === CardIds.Hopebringer_BG36_364_G ? 6 : 3);\r\n\t\tconst hp = minion.scriptDataNum2 ?? atk;\r\n\t\tfor (const target of input.playerBoard) {\r\n\t\t\tmodifyStats(target, minion, atk, hp, input.playerBoard, input.playerEntity, input.gameState);\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\tonDivineShieldUpdated: (minion: BoardEntity, input: OnDivineShieldUpdatedInput) => {\r\n\t\tif (input.newValue) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst step = minion.cardId === CardIds.Hopebringer_BG36_364_G ? 6 : 3;\r\n\t\tminion.scriptDataNum1 = (minion.scriptDataNum1 ?? step) + step;\r\n\t\tminion.scriptDataNum2 = (minion.scriptDataNum2 ?? step) + step;\r\n\t},\r\n};\r\n"]}
@@ -0,0 +1,2 @@
1
+ import { BattlecryCard } from '../../card.interface';
2
+ export declare const IronGroundskeeper: BattlecryCard;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IronGroundskeeper = void 0;
4
+ const cards_in_hand_1 = require("../../../simulation/cards-in-hand");
5
+ exports.IronGroundskeeper = {
6
+ cardIds: ["BG27_000", "BG27_000_G"],
7
+ battlecry: (minion, input) => {
8
+ const copies = minion.cardId === "BG27_000_G" ? 4 : 2;
9
+ (0, cards_in_hand_1.addCardsInHand)(input.hero, input.board, Array(copies).fill("BG28_503"), input.gameState);
10
+ return true;
11
+ },
12
+ };
13
+ //# sourceMappingURL=iron-groundskeeper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iron-groundskeeper.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/iron-groundskeeper.ts"],"names":[],"mappings":";;;AAUA,qEAAmE;AAGtD,QAAA,iBAAiB,GAAkB;IAC/C,OAAO,EAAE,0BAA0E;IACnF,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QACzD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,iBAAyC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9E,IAAA,8BAAc,EAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,YAA0B,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QACvG,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Iron Groundskeeper (Tier 3, 2/2)\r\n * Battlecry: Get 2 copies of Fortify.\r\n *\r\n * Golden Iron Groundskeeper\r\n * Battlecry: Get 4 copies of Fortify.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { BattlecryInput } from '../../../simulation/battlecries';\r\nimport { addCardsInHand } from '../../../simulation/cards-in-hand';\r\nimport { BattlecryCard } from '../../card.interface';\r\n\r\nexport const IronGroundskeeper: BattlecryCard = {\r\n\tcardIds: [CardIds.IronGroundskeeper_BG27_000, CardIds.IronGroundskeeper_BG27_000_G],\r\n\tbattlecry: (minion: BoardEntity, input: BattlecryInput) => {\r\n\t\tconst copies = minion.cardId === CardIds.IronGroundskeeper_BG27_000_G ? 4 : 2;\r\n\t\taddCardsInHand(input.hero, input.board, Array(copies).fill(CardIds.Fortify_BG28_503), input.gameState);\r\n\t\treturn true;\r\n\t},\r\n};\r\n"]}
@@ -0,0 +1,2 @@
1
+ import { BattlecryCard } from '../../card.interface';
2
+ export declare const Joyous: BattlecryCard;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Joyous = void 0;
4
+ const deity_1 = require("../../../simulation/deity");
5
+ exports.Joyous = {
6
+ cardIds: ["BG36_110", "BG36_110_G"],
7
+ battlecry: (minion, input) => {
8
+ var _a, _b;
9
+ const atk = (_a = minion.scriptDataNum1) !== null && _a !== void 0 ? _a : (minion.cardId === "BG36_110_G" ? 4 : 2);
10
+ const hp = (_b = minion.scriptDataNum2) !== null && _b !== void 0 ? _b : atk;
11
+ (0, deity_1.buffYourDeity)(input.hero, input.board, minion, atk, hp, input.gameState);
12
+ return true;
13
+ },
14
+ };
15
+ //# sourceMappingURL=joyous.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"joyous.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/joyous.ts"],"names":[],"mappings":";;;AASA,qDAA0D;AAI7C,QAAA,MAAM,GAAkB;IACpC,OAAO,EAAE,0BAAoD;IAC7D,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;;QACzD,MAAM,GAAG,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,CAAC,MAAM,CAAC,MAAM,iBAA8B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3F,MAAM,EAAE,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,GAAG,CAAC;QACxC,IAAA,qBAAa,EAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QACzE,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Joyous (Tier 1, 2/3)\r\n * Battlecry: Give your Deity +2/+2.\r\n *\r\n * Golden Joyous (Tier 1, 4/6)\r\n * Battlecry: Give your Deity +4/+4.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { BattlecryInput } from '../../../simulation/battlecries';\r\nimport { buffYourDeity } from '../../../simulation/deity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { BattlecryCard } from '../../card.interface';\r\n\r\nexport const Joyous: BattlecryCard = {\r\n\tcardIds: [CardIds.Joyous_BG36_110, CardIds.Joyous_BG36_110_G],\r\n\tbattlecry: (minion: BoardEntity, input: BattlecryInput) => {\r\n\t\tconst atk = minion.scriptDataNum1 ?? (minion.cardId === CardIds.Joyous_BG36_110_G ? 4 : 2);\r\n\t\tconst hp = minion.scriptDataNum2 ?? atk;\r\n\t\tbuffYourDeity(input.hero, input.board, minion, atk, hp, input.gameState);\r\n\t\treturn true;\r\n\t},\r\n};\r\n"]}
@@ -0,0 +1,2 @@
1
+ import { AvengeCard, StartOfCombatCard } from '../../card.interface';
2
+ export declare const LichlingHoarder: AvengeCard & StartOfCombatCard;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LichlingHoarder = void 0;
4
+ const utils_1 = require("../../../services/utils");
5
+ const cards_in_hand_1 = require("../../../simulation/cards-in-hand");
6
+ exports.LichlingHoarder = {
7
+ cardIds: ["BG36_848", "BG36_848_G"],
8
+ baseAvengeValue: () => 4,
9
+ startOfCombat: (minion, input) => {
10
+ minion.memory = input.playerBoard
11
+ .filter((e) => e.entityId !== minion.entityId)
12
+ .map((e) => e.cardId);
13
+ return false;
14
+ },
15
+ avenge: (minion, input) => {
16
+ var _a;
17
+ const snapshot = (_a = minion.memory) !== null && _a !== void 0 ? _a : [];
18
+ const cardId = (0, utils_1.pickRandom)(snapshot);
19
+ if (!cardId) {
20
+ return;
21
+ }
22
+ const copies = minion.cardId === "BG36_848_G" ? 2 : 1;
23
+ (0, cards_in_hand_1.addCardsInHand)(input.hero, input.board, Array(copies).fill(cardId), input.gameState);
24
+ },
25
+ };
26
+ //# sourceMappingURL=lichling-hoarder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lichling-hoarder.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/lichling-hoarder.ts"],"names":[],"mappings":";;;AAQA,mDAAqD;AAErD,qEAAmE;AAKtD,QAAA,eAAe,GAAmC;IAC9D,OAAO,EAAE,0BAAsE;IAC/E,eAAe,EAAE,GAAG,EAAE,CAAC,CAAC;IACxB,aAAa,EAAE,CAAC,MAAmB,EAAE,KAAe,EAAE,EAAE;QACvD,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,WAAW;aAC/B,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,MAAM,CAAC,QAAQ,CAAC;aAC7C,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QACvB,OAAO,KAAK,CAAC;IACd,CAAC;IACD,MAAM,EAAE,CAAC,MAAmB,EAAE,KAAkB,EAAE,EAAE;;QACnD,MAAM,QAAQ,GAAa,MAAA,MAAM,CAAC,MAAM,mCAAI,EAAE,CAAC;QAC/C,MAAM,MAAM,GAAG,IAAA,kBAAU,EAAC,QAAQ,CAAC,CAAC;QACpC,IAAI,CAAC,MAAM,EAAE;YACZ,OAAO;SACP;QACD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,iBAAuC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5E,IAAA,8BAAc,EAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IACtF,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Lichling Hoarder (Tier 5, 5/10)\r\n * Avenge (4): Get a plain copy of a minion that started in your warband this combat.\r\n *\r\n * Golden Lichling Hoarder (Tier 5, 10/20)\r\n * Avenge (4): Get 2 plain copies of a minion that started in your warband this combat.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { pickRandom } from '../../../services/utils';\r\nimport { AvengeInput } from '../../../simulation/avenge';\r\nimport { addCardsInHand } from '../../../simulation/cards-in-hand';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { AvengeCard, StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const LichlingHoarder: AvengeCard & StartOfCombatCard = {\r\n\tcardIds: [CardIds.LichlingHoarder_BG36_848, CardIds.LichlingHoarder_BG36_848_G],\r\n\tbaseAvengeValue: () => 4,\r\n\tstartOfCombat: (minion: BoardEntity, input: SoCInput) => {\r\n\t\tminion.memory = input.playerBoard\r\n\t\t\t.filter((e) => e.entityId !== minion.entityId)\r\n\t\t\t.map((e) => e.cardId);\r\n\t\treturn false;\r\n\t},\r\n\tavenge: (minion: BoardEntity, input: AvengeInput) => {\r\n\t\tconst snapshot: string[] = minion.memory ?? [];\r\n\t\tconst cardId = pickRandom(snapshot);\r\n\t\tif (!cardId) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst copies = minion.cardId === CardIds.LichlingHoarder_BG36_848_G ? 2 : 1;\r\n\t\taddCardsInHand(input.hero, input.board, Array(copies).fill(cardId), input.gameState);\r\n\t},\r\n};\r\n"]}
@@ -0,0 +1,2 @@
1
+ import { OnDiscardCard } from '../../card.interface';
2
+ export declare const MindbenderGhursha: OnDiscardCard;