@firestone-hs/simulate-bgs-battle 1.1.751 → 1.1.752
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.
- package/dist/bgs-player-entity.d.ts +1 -0
- package/dist/bgs-player-entity.js.map +1 -1
- package/dist/board-secret.d.ts +5 -0
- package/dist/board-secret.js.map +1 -1
- package/dist/cards/card.interface.d.ts +34 -0
- package/dist/cards/card.interface.js +10 -2
- package/dist/cards/card.interface.js.map +1 -1
- package/dist/cards/impl/_card-mappings.js +66 -0
- package/dist/cards/impl/_card-mappings.js.map +1 -1
- package/dist/cards/impl/bg-spell/energizing-chamber.d.ts +2 -0
- package/dist/cards/impl/bg-spell/energizing-chamber.js +27 -0
- package/dist/cards/impl/bg-spell/energizing-chamber.js.map +1 -0
- package/dist/cards/impl/bg-spell/sludge-corrosion.d.ts +2 -0
- package/dist/cards/impl/bg-spell/sludge-corrosion.js +28 -0
- package/dist/cards/impl/bg-spell/sludge-corrosion.js.map +1 -0
- package/dist/cards/impl/minion/cthrax-wrecker.d.ts +2 -0
- package/dist/cards/impl/minion/cthrax-wrecker.js +25 -0
- package/dist/cards/impl/minion/cthrax-wrecker.js.map +1 -0
- package/dist/cards/impl/minion/cthun.d.ts +2 -0
- package/dist/cards/impl/minion/cthun.js +29 -0
- package/dist/cards/impl/minion/cthun.js.map +1 -0
- package/dist/cards/impl/minion/cutthroat-kthir.d.ts +2 -0
- package/dist/cards/impl/minion/cutthroat-kthir.js +16 -0
- package/dist/cards/impl/minion/cutthroat-kthir.js.map +1 -0
- package/dist/cards/impl/minion/dark-paradox.d.ts +4 -0
- package/dist/cards/impl/minion/dark-paradox.js +109 -0
- package/dist/cards/impl/minion/dark-paradox.js.map +1 -0
- package/dist/cards/impl/minion/dark-puppeteer.d.ts +2 -0
- package/dist/cards/impl/minion/dark-puppeteer.js +13 -0
- package/dist/cards/impl/minion/dark-puppeteer.js.map +1 -0
- package/dist/cards/impl/minion/de-volition-ist.d.ts +2 -0
- package/dist/cards/impl/minion/de-volition-ist.js +23 -0
- package/dist/cards/impl/minion/de-volition-ist.js.map +1 -0
- package/dist/cards/impl/minion/drifting-sacrifice.d.ts +2 -0
- package/dist/cards/impl/minion/drifting-sacrifice.js +14 -0
- package/dist/cards/impl/minion/drifting-sacrifice.js.map +1 -0
- package/dist/cards/impl/minion/faceless-converter.d.ts +2 -0
- package/dist/cards/impl/minion/faceless-converter.js +14 -0
- package/dist/cards/impl/minion/faceless-converter.js.map +1 -0
- package/dist/cards/impl/minion/fetid-corroder.d.ts +2 -0
- package/dist/cards/impl/minion/fetid-corroder.js +13 -0
- package/dist/cards/impl/minion/fetid-corroder.js.map +1 -0
- package/dist/cards/impl/minion/hackerfin.js +4 -3
- package/dist/cards/impl/minion/hackerfin.js.map +1 -1
- package/dist/cards/impl/minion/harbinger-aphlass.d.ts +2 -0
- package/dist/cards/impl/minion/harbinger-aphlass.js +17 -0
- package/dist/cards/impl/minion/harbinger-aphlass.js.map +1 -0
- package/dist/cards/impl/minion/heroic-broodmother.d.ts +2 -0
- package/dist/cards/impl/minion/heroic-broodmother.js +27 -0
- package/dist/cards/impl/minion/heroic-broodmother.js.map +1 -0
- package/dist/cards/impl/minion/hopebringer.d.ts +2 -0
- package/dist/cards/impl/minion/hopebringer.js +26 -0
- package/dist/cards/impl/minion/hopebringer.js.map +1 -0
- package/dist/cards/impl/minion/iron-groundskeeper.d.ts +2 -0
- package/dist/cards/impl/minion/iron-groundskeeper.js +13 -0
- package/dist/cards/impl/minion/iron-groundskeeper.js.map +1 -0
- package/dist/cards/impl/minion/joyous.d.ts +2 -0
- package/dist/cards/impl/minion/joyous.js +15 -0
- package/dist/cards/impl/minion/joyous.js.map +1 -0
- package/dist/cards/impl/minion/lichling-hoarder.d.ts +2 -0
- package/dist/cards/impl/minion/lichling-hoarder.js +26 -0
- package/dist/cards/impl/minion/lichling-hoarder.js.map +1 -0
- package/dist/cards/impl/minion/mindbender-ghursha.d.ts +2 -0
- package/dist/cards/impl/minion/mindbender-ghursha.js +19 -0
- package/dist/cards/impl/minion/mindbender-ghursha.js.map +1 -0
- package/dist/cards/impl/minion/mysterious-kthir.d.ts +2 -0
- package/dist/cards/impl/minion/mysterious-kthir.js +25 -0
- package/dist/cards/impl/minion/mysterious-kthir.js.map +1 -0
- package/dist/cards/impl/minion/nightmare-corroder.d.ts +2 -0
- package/dist/cards/impl/minion/nightmare-corroder.js +13 -0
- package/dist/cards/impl/minion/nightmare-corroder.js.map +1 -0
- package/dist/cards/impl/minion/nraqi-sapper.d.ts +2 -0
- package/dist/cards/impl/minion/nraqi-sapper.js +20 -0
- package/dist/cards/impl/minion/nraqi-sapper.js.map +1 -0
- package/dist/cards/impl/minion/parasitic-fleshling.d.ts +2 -0
- package/dist/cards/impl/minion/parasitic-fleshling.js +18 -0
- package/dist/cards/impl/minion/parasitic-fleshling.js.map +1 -0
- package/dist/cards/impl/minion/resourceful-robot.d.ts +2 -0
- package/dist/cards/impl/minion/resourceful-robot.js +21 -0
- package/dist/cards/impl/minion/resourceful-robot.js.map +1 -0
- package/dist/cards/impl/minion/sha-of-fear.d.ts +2 -0
- package/dist/cards/impl/minion/sha-of-fear.js +18 -0
- package/dist/cards/impl/minion/sha-of-fear.js.map +1 -0
- package/dist/cards/impl/minion/the-shadow-of-doubt.d.ts +2 -0
- package/dist/cards/impl/minion/the-shadow-of-doubt.js +14 -0
- package/dist/cards/impl/minion/the-shadow-of-doubt.js.map +1 -0
- package/dist/cards/impl/minion/underrot-spawn.d.ts +2 -0
- package/dist/cards/impl/minion/underrot-spawn.js +22 -0
- package/dist/cards/impl/minion/underrot-spawn.js.map +1 -0
- package/dist/cards/impl/minion/unwilling-slacker.d.ts +2 -0
- package/dist/cards/impl/minion/unwilling-slacker.js +14 -0
- package/dist/cards/impl/minion/unwilling-slacker.js.map +1 -0
- package/dist/cards/impl/minion/vicious-mindslasher.d.ts +2 -0
- package/dist/cards/impl/minion/vicious-mindslasher.js +22 -0
- package/dist/cards/impl/minion/vicious-mindslasher.js.map +1 -0
- package/dist/cards/impl/minion/yshaarj.d.ts +2 -0
- package/dist/cards/impl/minion/yshaarj.js +30 -0
- package/dist/cards/impl/minion/yshaarj.js.map +1 -0
- package/dist/cards/impl/trinket/converter-portrait.d.ts +2 -0
- package/dist/cards/impl/trinket/converter-portrait.js +19 -0
- package/dist/cards/impl/trinket/converter-portrait.js.map +1 -0
- package/dist/cards/impl/trinket/corrupted-baton.d.ts +2 -0
- package/dist/cards/impl/trinket/corrupted-baton.js +12 -0
- package/dist/cards/impl/trinket/corrupted-baton.js.map +1 -0
- package/dist/cards/impl/trinket/snarky-portrait.d.ts +2 -0
- package/dist/cards/impl/trinket/snarky-portrait.js +24 -0
- package/dist/cards/impl/trinket/snarky-portrait.js.map +1 -0
- package/dist/mechanics/player-global-effects.d.ts +1 -0
- package/dist/mechanics/player-global-effects.js +24 -1
- package/dist/mechanics/player-global-effects.js.map +1 -1
- package/dist/services/card-ids.d.ts +314 -5
- package/dist/services/card-ids.js.map +1 -1
- package/dist/simulation/after-attack.js +13 -0
- package/dist/simulation/after-attack.js.map +1 -1
- package/dist/simulation/auras.js +31 -30
- package/dist/simulation/auras.js.map +1 -1
- package/dist/simulation/battlecries.js +2 -0
- package/dist/simulation/battlecries.js.map +1 -1
- package/dist/simulation/death-effects.js +2 -0
- package/dist/simulation/death-effects.js.map +1 -1
- package/dist/simulation/deity.d.ts +13 -0
- package/dist/simulation/deity.js +125 -0
- package/dist/simulation/deity.js.map +1 -0
- package/dist/simulation/discard.d.ts +5 -0
- package/dist/simulation/discard.js +49 -0
- package/dist/simulation/discard.js.map +1 -0
- package/dist/temp-card-ids.js.map +1 -1
- package/dist/utils.d.ts +1 -0
- package/dist/utils.js +13 -2
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MindbenderGhursha = void 0;
|
|
4
|
+
const stats_1 = require("../../../simulation/stats");
|
|
5
|
+
exports.MindbenderGhursha = {
|
|
6
|
+
cardIds: ["BG36_097", "BG36_097_G"],
|
|
7
|
+
onDiscard: (minion, input) => {
|
|
8
|
+
var _a, _b;
|
|
9
|
+
const atk = (_a = minion.scriptDataNum1) !== null && _a !== void 0 ? _a : (minion.cardId === "BG36_097_G" ? 6 : 3);
|
|
10
|
+
const hp = (_b = minion.scriptDataNum2) !== null && _b !== void 0 ? _b : atk;
|
|
11
|
+
for (const target of input.board) {
|
|
12
|
+
if (target.entityId === minion.entityId || target.health <= 0 || target.definitelyDead) {
|
|
13
|
+
continue;
|
|
14
|
+
}
|
|
15
|
+
(0, stats_1.modifyStats)(target, minion, atk, hp, input.board, input.hero, input.gameState);
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=mindbender-ghursha.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mindbender-ghursha.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/mindbender-ghursha.ts"],"names":[],"mappings":";;;AASA,qDAAwD;AAG3C,QAAA,iBAAiB,GAAkB;IAC/C,OAAO,EAAE,0BAA0E;IACnF,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAmB,EAAE,EAAE;;QACvD,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,GAAG,CAAC;QACxC,KAAK,MAAM,MAAM,IAAI,KAAK,CAAC,KAAK,EAAE;YACjC,IAAI,MAAM,CAAC,QAAQ,KAAK,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,MAAM,CAAC,cAAc,EAAE;gBACvF,SAAS;aACT;YACD,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;IACF,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Mindbender Ghur'sha (Tier 5, 3/9)\r\n * Whenever you discard a card, give your other minions +3/+3.\r\n *\r\n * Golden Mindbender Ghur'sha (Tier 5, 6/18)\r\n * Whenever you discard a card, give your other minions +6/+6.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { DiscardInput, OnDiscardCard } from '../../card.interface';\r\n\r\nexport const MindbenderGhursha: OnDiscardCard = {\r\n\tcardIds: [CardIds.MindbenderGhursha_BG36_097, CardIds.MindbenderGhursha_BG36_097_G],\r\n\tonDiscard: (minion: BoardEntity, input: DiscardInput) => {\r\n\t\tconst atk = minion.scriptDataNum1 ?? (minion.cardId === CardIds.MindbenderGhursha_BG36_097_G ? 6 : 3);\r\n\t\tconst hp = minion.scriptDataNum2 ?? atk;\r\n\t\tfor (const target of input.board) {\r\n\t\t\tif (target.entityId === minion.entityId || target.health <= 0 || target.definitelyDead) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tmodifyStats(target, minion, atk, hp, input.board, input.hero, input.gameState);\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MysteriousKthir = void 0;
|
|
4
|
+
const discard_1 = require("../../../simulation/discard");
|
|
5
|
+
const stats_1 = require("../../../simulation/stats");
|
|
6
|
+
const utils_1 = require("../../../utils");
|
|
7
|
+
exports.MysteriousKthir = {
|
|
8
|
+
cardIds: ["BG36_320", "BG36_320_G"],
|
|
9
|
+
endOfTurn: (minion, input) => {
|
|
10
|
+
var _a, _b, _c, _d;
|
|
11
|
+
const count = (_a = minion.scriptDataNum3) !== null && _a !== void 0 ? _a : 3;
|
|
12
|
+
const atk = (_b = minion.scriptDataNum1) !== null && _b !== void 0 ? _b : (minion.cardId === "BG36_320_G" ? 16 : 8);
|
|
13
|
+
const hp = (_c = minion.scriptDataNum2) !== null && _c !== void 0 ? _c : atk;
|
|
14
|
+
const toDiscard = ((_d = input.hero.hand) !== null && _d !== void 0 ? _d : [])
|
|
15
|
+
.filter((card) => (0, utils_1.isBattlegroundsSpell)(card.cardId, input.gameState.allCards))
|
|
16
|
+
.slice(0, count);
|
|
17
|
+
const discarded = (0, discard_1.discardCards)(toDiscard, input.hero, input.board, input.otherBoard, input.otherHero, input.gameState);
|
|
18
|
+
if (discarded > 0) {
|
|
19
|
+
for (let i = 0; i < discarded; i++) {
|
|
20
|
+
(0, stats_1.modifyStats)(minion, minion, atk, hp, input.board, input.hero, input.gameState);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=mysterious-kthir.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mysterious-kthir.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/mysterious-kthir.ts"],"names":[],"mappings":";;;AAWA,yDAA2D;AAC3D,qDAAwD;AACxD,0CAAsD;AAGzC,QAAA,eAAe,GAAkB;IAC7C,OAAO,EAAE,0BAAsE;IAC/E,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;;QACzD,MAAM,KAAK,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,CAAC,CAAC;QACzC,MAAM,GAAG,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,CAAC,MAAM,CAAC,MAAM,iBAAuC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrG,MAAM,EAAE,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,GAAG,CAAC;QACxC,MAAM,SAAS,GAAG,CAAC,MAAA,KAAK,CAAC,IAAI,CAAC,IAAI,mCAAI,EAAE,CAAC;aACvC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,4BAAoB,EAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;aAC7E,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QAClB,MAAM,SAAS,GAAG,IAAA,sBAAY,EAC7B,SAAS,EACT,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,SAAS,EACf,KAAK,CAAC,SAAS,CACf,CAAC;QACF,IAAI,SAAS,GAAG,CAAC,EAAE;YAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE,EAAE;gBACnC,IAAA,mBAAW,EAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;aAC/E;SACD;IACF,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Mysterious K'Thir (Tier 5, 8/8)\r\n * At the end of your turn, discard your 3 left-most Tavern spells.\r\n * Gain +8/+8 for each discarded.\r\n *\r\n * Golden Mysterious K'Thir (Tier 5, 16/16)\r\n * At the end of your turn, discard your 3 left-most Tavern spells.\r\n * Gain +16/+16 for each discarded.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { discardCards } from '../../../simulation/discard';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { isBattlegroundsSpell } from '../../../utils';\r\nimport { EndOfTurnCard, EndOfTurnInput } from '../../card.interface';\r\n\r\nexport const MysteriousKthir: EndOfTurnCard = {\r\n\tcardIds: [CardIds.MysteriousKthir_BG36_320, CardIds.MysteriousKthir_BG36_320_G],\r\n\tendOfTurn: (minion: BoardEntity, input: EndOfTurnInput) => {\r\n\t\tconst count = minion.scriptDataNum3 ?? 3;\r\n\t\tconst atk = minion.scriptDataNum1 ?? (minion.cardId === CardIds.MysteriousKthir_BG36_320_G ? 16 : 8);\r\n\t\tconst hp = minion.scriptDataNum2 ?? atk;\r\n\t\tconst toDiscard = (input.hero.hand ?? [])\r\n\t\t\t.filter((card) => isBattlegroundsSpell(card.cardId, input.gameState.allCards))\r\n\t\t\t.slice(0, count);\r\n\t\tconst discarded = discardCards(\r\n\t\t\ttoDiscard,\r\n\t\t\tinput.hero,\r\n\t\t\tinput.board,\r\n\t\t\tinput.otherBoard,\r\n\t\t\tinput.otherHero,\r\n\t\t\tinput.gameState,\r\n\t\t);\r\n\t\tif (discarded > 0) {\r\n\t\t\tfor (let i = 0; i < discarded; i++) {\r\n\t\t\t\tmodifyStats(minion, minion, atk, hp, input.board, input.hero, input.gameState);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NightmareCorroder = void 0;
|
|
4
|
+
const cards_in_hand_1 = require("../../../simulation/cards-in-hand");
|
|
5
|
+
exports.NightmareCorroder = {
|
|
6
|
+
cardIds: ["BG36_115", "BG36_115_G"],
|
|
7
|
+
deathrattleSpawn: (minion, input) => {
|
|
8
|
+
const mult = minion.cardId === "BG36_115_G" ? 2 : 1;
|
|
9
|
+
(0, cards_in_hand_1.addCardsInHand)(input.boardWithDeadEntityHero, input.boardWithDeadEntity, Array(mult).fill("BG36_301t"), input.gameState);
|
|
10
|
+
return [];
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=nightmare-corroder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nightmare-corroder.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/nightmare-corroder.ts"],"names":[],"mappings":";;;AAQA,qEAAmE;AAKtD,QAAA,iBAAiB,GAAyB;IACtD,OAAO,EAAE,0BAA0E;IACnF,gBAAgB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAAE,EAAE;QAC3E,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAyC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5E,IAAA,8BAAc,EACb,KAAK,CAAC,uBAAuB,EAC7B,KAAK,CAAC,mBAAmB,EACzB,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,aAAwC,EACxD,KAAK,CAAC,SAAS,CACf,CAAC;QACF,OAAO,EAAE,CAAC;IACX,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Nightmare Corroder (Tier 4, 7/4)\r\n * Deathrattle: Get a Sludge Corrosion.\r\n *\r\n * Golden Nightmare Corroder (Tier 4, 14/8)\r\n * Deathrattle: Get 2 Sludge Corrosions.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { addCardsInHand } from '../../../simulation/cards-in-hand';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { DeathrattleSpawnCard } from '../../card.interface';\r\n\r\nexport const NightmareCorroder: DeathrattleSpawnCard = {\r\n\tcardIds: [CardIds.NightmareCorroder_BG36_115, CardIds.NightmareCorroder_BG36_115_G],\r\n\tdeathrattleSpawn: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.NightmareCorroder_BG36_115_G ? 2 : 1;\r\n\t\taddCardsInHand(\r\n\t\t\tinput.boardWithDeadEntityHero,\r\n\t\t\tinput.boardWithDeadEntity,\r\n\t\t\tArray(mult).fill(CardIds.SludgeCorrosionToken_BG36_301t),\r\n\t\t\tinput.gameState,\r\n\t\t);\r\n\t\treturn [];\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NraqiSapper = void 0;
|
|
4
|
+
const cards_in_hand_1 = require("../../../simulation/cards-in-hand");
|
|
5
|
+
const addChambers = (minion, hero, board, gameState) => {
|
|
6
|
+
const mult = minion.cardId === "BG36_103_G" ? 2 : 1;
|
|
7
|
+
(0, cards_in_hand_1.addCardsInHand)(hero, board, Array(mult).fill("BG36_371"), gameState);
|
|
8
|
+
};
|
|
9
|
+
exports.NraqiSapper = {
|
|
10
|
+
cardIds: ["BG36_103", "BG36_103_G"],
|
|
11
|
+
battlecry: (minion, input) => {
|
|
12
|
+
addChambers(minion, input.hero, input.board, input.gameState);
|
|
13
|
+
return true;
|
|
14
|
+
},
|
|
15
|
+
deathrattleSpawn: (minion, input) => {
|
|
16
|
+
addChambers(minion, input.boardWithDeadEntityHero, input.boardWithDeadEntity, input.gameState);
|
|
17
|
+
return [];
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=nraqi-sapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nraqi-sapper.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/nraqi-sapper.ts"],"names":[],"mappings":";;;AAUA,qEAAmE;AAMnE,MAAM,WAAW,GAAG,CACnB,MAAmB,EACnB,IAAqB,EACrB,KAAoB,EACpB,SAAwB,EACvB,EAAE;IACH,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAmC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACtE,IAAA,8BAAc,EAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,YAAoC,EAAE,SAAS,CAAC,CAAC;AAC9F,CAAC,CAAC;AAEW,QAAA,WAAW,GAAyC;IAChE,OAAO,EAAE,0BAA8D;IACvE,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QACzD,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QAC9D,OAAO,IAAI,CAAC;IACb,CAAC;IACD,gBAAgB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAAE,EAAE;QAC3E,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC,mBAAmB,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QAC/F,OAAO,EAAE,CAAC;IACX,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * N'raqi Sapper (Tier 5, 6/3)\r\n * Battlecry and Deathrattle: Get an Energizing Chamber.\r\n *\r\n * Golden N'raqi Sapper (Tier 5, 12/6)\r\n * Battlecry and Deathrattle: Get 2 Energizing Chambers.\r\n */\r\nimport { BgsPlayerEntity } from '../../../bgs-player-entity';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { BattlecryInput } from '../../../simulation/battlecries';\r\nimport { addCardsInHand } from '../../../simulation/cards-in-hand';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { FullGameState } from '../../../simulation/internal-game-state';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { BattlecryCard, DeathrattleSpawnCard } from '../../card.interface';\r\n\r\nconst addChambers = (\r\n\tminion: BoardEntity,\r\n\thero: BgsPlayerEntity,\r\n\tboard: BoardEntity[],\r\n\tgameState: FullGameState,\r\n) => {\r\n\tconst mult = minion.cardId === CardIds.NraqiSapper_BG36_103_G ? 2 : 1;\r\n\taddCardsInHand(hero, board, Array(mult).fill(CardIds.EnergizingChamber_BG36_371), gameState);\r\n};\r\n\r\nexport const NraqiSapper: BattlecryCard & DeathrattleSpawnCard = {\r\n\tcardIds: [CardIds.NraqiSapper_BG36_103, CardIds.NraqiSapper_BG36_103_G],\r\n\tbattlecry: (minion: BoardEntity, input: BattlecryInput) => {\r\n\t\taddChambers(minion, input.hero, input.board, input.gameState);\r\n\t\treturn true;\r\n\t},\r\n\tdeathrattleSpawn: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\taddChambers(minion, input.boardWithDeadEntityHero, input.boardWithDeadEntity, input.gameState);\r\n\t\treturn [];\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ParasiticFleshling = void 0;
|
|
4
|
+
const stats_1 = require("../../../simulation/stats");
|
|
5
|
+
exports.ParasiticFleshling = {
|
|
6
|
+
cardIds: ["BG36_114", "BG36_114_G"],
|
|
7
|
+
endOfTurn: (minion, input) => {
|
|
8
|
+
var _a;
|
|
9
|
+
const target = input.board.find((e) => e.health > 0 && !e.definitelyDead);
|
|
10
|
+
if (!target) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const base = minion.cardId === "BG36_114_G" ? 4 : 2;
|
|
14
|
+
const discards = (_a = input.hero.globalInfo.CardsDiscardedThisGame) !== null && _a !== void 0 ? _a : 0;
|
|
15
|
+
(0, stats_1.modifyStats)(target, minion, base + discards, base + discards, input.board, input.hero, input.gameState);
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=parasitic-fleshling.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parasitic-fleshling.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/parasitic-fleshling.ts"],"names":[],"mappings":";;;AAWA,qDAAwD;AAG3C,QAAA,kBAAkB,GAAkB;IAChD,OAAO,EAAE,0BAA4E;IACrF,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;;QACzD,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;QAC1E,IAAI,CAAC,MAAM,EAAE;YACZ,OAAO;SACP;QACD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAA0C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7E,MAAM,QAAQ,GAAG,MAAA,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,sBAAsB,mCAAI,CAAC,CAAC;QACnE,IAAA,mBAAW,EAAC,MAAM,EAAE,MAAM,EAAE,IAAI,GAAG,QAAQ,EAAE,IAAI,GAAG,QAAQ,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IACzG,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Parasitic Fleshling (Tier 4, 4/6)\r\n * At the end of your turn, give your left-most minion +2/+2\r\n * (improved by each card you've discarded this game).\r\n *\r\n * Golden Parasitic Fleshling (Tier 4, 8/12)\r\n * At the end of your turn, give your left-most minion +4/+4\r\n * (improved by each card you've discarded this game).\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { EndOfTurnCard, EndOfTurnInput } from '../../card.interface';\r\n\r\nexport const ParasiticFleshling: EndOfTurnCard = {\r\n\tcardIds: [CardIds.ParasiticFleshling_BG36_114, CardIds.ParasiticFleshling_BG36_114_G],\r\n\tendOfTurn: (minion: BoardEntity, input: EndOfTurnInput) => {\r\n\t\tconst target = input.board.find((e) => e.health > 0 && !e.definitelyDead);\r\n\t\tif (!target) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst base = minion.cardId === CardIds.ParasiticFleshling_BG36_114_G ? 4 : 2;\r\n\t\tconst discards = input.hero.globalInfo.CardsDiscardedThisGame ?? 0;\r\n\t\tmodifyStats(target, minion, base + discards, base + discards, input.board, input.hero, input.gameState);\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ResourcefulRobot = void 0;
|
|
4
|
+
const cards_in_hand_1 = require("../../../simulation/cards-in-hand");
|
|
5
|
+
const magnetize_1 = require("../../../simulation/magnetize");
|
|
6
|
+
exports.ResourcefulRobot = {
|
|
7
|
+
cardIds: ["BG36_366", "BG36_366_G"],
|
|
8
|
+
endOfTurn: (minion, input) => {
|
|
9
|
+
var _a;
|
|
10
|
+
const copies = minion.cardId === "BG36_366_G" ? 2 : 1;
|
|
11
|
+
for (let i = 0; i < copies; i++) {
|
|
12
|
+
const volumizer = input.gameState.cardsData.getRandomMagneticVolumizer(input.hero, input.gameState.anomalies, (_a = input.hero.tavernTier) !== null && _a !== void 0 ? _a : 6, minion, minion);
|
|
13
|
+
if (!volumizer) {
|
|
14
|
+
continue;
|
|
15
|
+
}
|
|
16
|
+
(0, magnetize_1.magnetizeToTarget)([minion], minion, [volumizer], input.board, input.hero, input.otherBoard, input.otherHero, input.gameState);
|
|
17
|
+
(0, cards_in_hand_1.addCardsInHand)(input.hero, input.board, [volumizer], input.gameState);
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=resourceful-robot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceful-robot.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/resourceful-robot.ts"],"names":[],"mappings":";;;AASA,qEAAmE;AACnE,6DAAkE;AAGrD,QAAA,gBAAgB,GAAkB;IAC9C,OAAO,EAAE,0BAAwE;IACjF,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;;QACzD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,iBAAwC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;YAChC,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,0BAA0B,CACrE,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,SAAS,CAAC,SAAS,EACzB,MAAA,KAAK,CAAC,IAAI,CAAC,UAAU,mCAAI,CAAC,EAC1B,MAAM,EACN,MAAM,CACN,CAAC;YACF,IAAI,CAAC,SAAS,EAAE;gBACf,SAAS;aACT;YACD,IAAA,6BAAiB,EAChB,CAAC,MAAM,CAAC,EACR,MAAM,EACN,CAAC,SAAS,CAAC,EACX,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,SAAS,EACf,KAAK,CAAC,SAAS,CACf,CAAC;YACF,IAAA,8BAAc,EAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;SACtE;IACF,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Resourceful Robot (Tier 5, 4/8)\r\n * At the end of your turn, Magnetize a random Volumizer to this. Get a copy of it.\r\n *\r\n * Golden Resourceful Robot (Tier 5, 8/16)\r\n * At the end of your turn, Magnetize 2 random Volumizers to this. Get copies of them.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { addCardsInHand } from '../../../simulation/cards-in-hand';\r\nimport { magnetizeToTarget } from '../../../simulation/magnetize';\r\nimport { EndOfTurnCard, EndOfTurnInput } from '../../card.interface';\r\n\r\nexport const ResourcefulRobot: EndOfTurnCard = {\r\n\tcardIds: [CardIds.ResourcefulRobot_BG36_366, CardIds.ResourcefulRobot_BG36_366_G],\r\n\tendOfTurn: (minion: BoardEntity, input: EndOfTurnInput) => {\r\n\t\tconst copies = minion.cardId === CardIds.ResourcefulRobot_BG36_366_G ? 2 : 1;\r\n\t\tfor (let i = 0; i < copies; i++) {\r\n\t\t\tconst volumizer = input.gameState.cardsData.getRandomMagneticVolumizer(\r\n\t\t\t\tinput.hero,\r\n\t\t\t\tinput.gameState.anomalies,\r\n\t\t\t\tinput.hero.tavernTier ?? 6,\r\n\t\t\t\tminion,\r\n\t\t\t\tminion,\r\n\t\t\t);\r\n\t\t\tif (!volumizer) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tmagnetizeToTarget(\r\n\t\t\t\t[minion],\r\n\t\t\t\tminion,\r\n\t\t\t\t[volumizer],\r\n\t\t\t\tinput.board,\r\n\t\t\t\tinput.hero,\r\n\t\t\t\tinput.otherBoard,\r\n\t\t\t\tinput.otherHero,\r\n\t\t\t\tinput.gameState,\r\n\t\t\t);\r\n\t\t\taddCardsInHand(input.hero, input.board, [volumizer], input.gameState);\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ShaOfFear = void 0;
|
|
4
|
+
const deity_1 = require("../../../simulation/deity");
|
|
5
|
+
const stats_1 = require("../../../simulation/stats");
|
|
6
|
+
exports.ShaOfFear = {
|
|
7
|
+
cardIds: ["BG36_111", "BG36_111_G"],
|
|
8
|
+
onTavernSpellCast: (minion, input) => {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
const atk = (_a = minion.scriptDataNum1) !== null && _a !== void 0 ? _a : (minion.cardId === "BG36_111_G" ? 8 : 4);
|
|
11
|
+
const hp = (_b = minion.scriptDataNum2) !== null && _b !== void 0 ? _b : (minion.cardId === "BG36_111_G" ? 6 : 3);
|
|
12
|
+
for (const target of input.board) {
|
|
13
|
+
(0, stats_1.modifyStats)(target, minion, atk, hp, input.board, input.hero, input.gameState);
|
|
14
|
+
}
|
|
15
|
+
(0, deity_1.incrementDeitySecretStats)(input.hero, atk, hp);
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=sha-of-fear.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sha-of-fear.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/sha-of-fear.ts"],"names":[],"mappings":";;;AAQA,qDAAsE;AACtE,qDAAwD;AAI3C,QAAA,SAAS,GAA0B;IAC/C,OAAO,EAAE,0BAA0D;IACnE,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;;QACjE,MAAM,GAAG,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,CAAC,MAAM,CAAC,MAAM,iBAAiC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9F,MAAM,EAAE,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,CAAC,MAAM,CAAC,MAAM,iBAAiC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7F,KAAK,MAAM,MAAM,IAAI,KAAK,CAAC,KAAK,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,IAAA,iCAAyB,EAAC,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;IAChD,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Sha of Fear (Tier 7, 9/12)\r\n * Whenever you cast a Tavern spell, give your minions and Deity +4/+3.\r\n *\r\n * Golden Sha of Fear (Tier 7, 18/24)\r\n * Whenever you cast a Tavern spell, give your minions and Deity +8/+6.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { incrementDeitySecretStats } from '../../../simulation/deity';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { CastSpellInput, OnTavernSpellCastCard } from '../../card.interface';\r\n\r\nexport const ShaOfFear: OnTavernSpellCastCard = {\r\n\tcardIds: [CardIds.ShaOfFear_BG36_111, CardIds.ShaOfFear_BG36_111_G],\r\n\tonTavernSpellCast: (minion: BoardEntity, input: CastSpellInput) => {\r\n\t\tconst atk = minion.scriptDataNum1 ?? (minion.cardId === CardIds.ShaOfFear_BG36_111_G ? 8 : 4);\r\n\t\tconst hp = minion.scriptDataNum2 ?? (minion.cardId === CardIds.ShaOfFear_BG36_111_G ? 6 : 3);\r\n\t\tfor (const target of input.board) {\r\n\t\t\tmodifyStats(target, minion, atk, hp, input.board, input.hero, input.gameState);\r\n\t\t}\r\n\t\tincrementDeitySecretStats(input.hero, atk, hp);\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TheShadowOfDoubt = void 0;
|
|
4
|
+
const deity_1 = require("../../../simulation/deity");
|
|
5
|
+
exports.TheShadowOfDoubt = {
|
|
6
|
+
cardIds: ["BG36_109", "BG36_109_G"],
|
|
7
|
+
onCardAddedToHand: (minion, input) => {
|
|
8
|
+
var _a, _b;
|
|
9
|
+
const atk = (_a = minion.scriptDataNum1) !== null && _a !== void 0 ? _a : (minion.cardId === "BG36_109_G" ? 6 : 3);
|
|
10
|
+
const hp = (_b = minion.scriptDataNum2) !== null && _b !== void 0 ? _b : (minion.cardId === "BG36_109_G" ? 8 : 4);
|
|
11
|
+
(0, deity_1.buffYourDeity)(input.hero, input.board, minion, atk, hp, input.gameState);
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=the-shadow-of-doubt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"the-shadow-of-doubt.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/the-shadow-of-doubt.ts"],"names":[],"mappings":";;;AASA,qDAA0D;AAI7C,QAAA,gBAAgB,GAA0B;IACtD,OAAO,EAAE,0BAAwE;IACjF,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAA6B,EAAE,EAAE;;QACzE,MAAM,GAAG,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,CAAC,MAAM,CAAC,MAAM,iBAAwC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrG,MAAM,EAAE,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,CAAC,MAAM,CAAC,MAAM,iBAAwC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACpG,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 * The Shadow of Doubt (Tier 6, 6/8)\r\n * Whenever a card is added to your hand, give your Deity +3/+4.\r\n *\r\n * Golden The Shadow of Doubt (Tier 6, 12/16)\r\n * Whenever a card is added to your hand, give your Deity +6/+8.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { OnCardAddedToHandInput } from '../../../simulation/cards-in-hand';\r\nimport { buffYourDeity } from '../../../simulation/deity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { OnCardAddedToHandCard } from '../../card.interface';\r\n\r\nexport const TheShadowOfDoubt: OnCardAddedToHandCard = {\r\n\tcardIds: [CardIds.TheShadowOfDoubt_BG36_109, CardIds.TheShadowOfDoubt_BG36_109_G],\r\n\tonCardAddedToHand: (minion: BoardEntity, input: OnCardAddedToHandInput) => {\r\n\t\tconst atk = minion.scriptDataNum1 ?? (minion.cardId === CardIds.TheShadowOfDoubt_BG36_109_G ? 6 : 3);\r\n\t\tconst hp = minion.scriptDataNum2 ?? (minion.cardId === CardIds.TheShadowOfDoubt_BG36_109_G ? 8 : 4);\r\n\t\tbuffYourDeity(input.hero, input.board, minion, atk, hp, input.gameState);\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UnderrotSpawn = void 0;
|
|
4
|
+
const deathrattle_spawns_1 = require("../../../simulation/deathrattle-spawns");
|
|
5
|
+
const stats_1 = require("../../../simulation/stats");
|
|
6
|
+
exports.UnderrotSpawn = {
|
|
7
|
+
cardIds: ["BG36_116", "BG36_116_G"],
|
|
8
|
+
deathrattleSpawn: (minion, input) => {
|
|
9
|
+
var _a;
|
|
10
|
+
const quantity = minion.cardId === "BG36_116_G" ? 2 : 1;
|
|
11
|
+
const atk = (_a = minion.scriptDataNum1) !== null && _a !== void 0 ? _a : quantity;
|
|
12
|
+
const tentacleId = minion.cardId === "BG36_116_G"
|
|
13
|
+
? "BGFYM_002t_G"
|
|
14
|
+
: "BGFYM_002t";
|
|
15
|
+
const spawns = [...(0, deathrattle_spawns_1.simplifiedSpawnEntities)(tentacleId, quantity, input)];
|
|
16
|
+
for (const target of input.boardWithDeadEntity) {
|
|
17
|
+
(0, stats_1.modifyStats)(target, minion, atk, 0, input.boardWithDeadEntity, input.boardWithDeadEntityHero, input.gameState);
|
|
18
|
+
}
|
|
19
|
+
return spawns;
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=underrot-spawn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"underrot-spawn.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/underrot-spawn.ts"],"names":[],"mappings":";;;AASA,+EAAiF;AACjF,qDAAwD;AAI3C,QAAA,aAAa,GAAyB;IAClD,OAAO,EAAE,0BAAkE;IAC3E,gBAAgB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAAE,EAAE;;QAC3E,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,iBAAqC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5E,MAAM,GAAG,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,QAAQ,CAAC;QAC9C,MAAM,UAAU,GACf,MAAM,CAAC,MAAM,iBAAqC;YACjD,CAAC;YACD,CAAC,aAAyC,CAAC;QAC7C,MAAM,MAAM,GAAG,CAAC,GAAG,IAAA,4CAAuB,EAAC,UAAU,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;QACzE,KAAK,MAAM,MAAM,IAAI,KAAK,CAAC,mBAAmB,EAAE;YAC/C,IAAA,mBAAW,EAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,mBAAmB,EAAE,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;SAC/G;QACD,OAAO,MAAM,CAAC;IACf,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Underrot Spawn (Tier 2, 2/2)\r\n * Deathrattle: Summon a 0/2 Tentacle with Taunt. Give your minions +1 Attack.\r\n *\r\n * Golden Underrot Spawn (Tier 2, 4/4)\r\n * Deathrattle: Summon two 0/2 Tentacles with Taunt. Give your minions +2 Attack.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { simplifiedSpawnEntities } from '../../../simulation/deathrattle-spawns';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { DeathrattleSpawnCard } from '../../card.interface';\r\n\r\nexport const UnderrotSpawn: DeathrattleSpawnCard = {\r\n\tcardIds: [CardIds.UnderrotSpawn_BG36_116, CardIds.UnderrotSpawn_BG36_116_G],\r\n\tdeathrattleSpawn: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\tconst quantity = minion.cardId === CardIds.UnderrotSpawn_BG36_116_G ? 2 : 1;\r\n\t\tconst atk = minion.scriptDataNum1 ?? quantity;\r\n\t\tconst tentacleId =\r\n\t\t\tminion.cardId === CardIds.UnderrotSpawn_BG36_116_G\r\n\t\t\t\t? CardIds.AberrantTentacle_BGFYM_002t_G\r\n\t\t\t\t: CardIds.AberrantTentacleToken_BGFYM_002t;\r\n\t\tconst spawns = [...simplifiedSpawnEntities(tentacleId, quantity, input)];\r\n\t\tfor (const target of input.boardWithDeadEntity) {\r\n\t\t\tmodifyStats(target, minion, atk, 0, input.boardWithDeadEntity, input.boardWithDeadEntityHero, input.gameState);\r\n\t\t}\r\n\t\treturn spawns;\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UnwillingSlacker = void 0;
|
|
4
|
+
const cards_in_hand_1 = require("../../../simulation/cards-in-hand");
|
|
5
|
+
exports.UnwillingSlacker = {
|
|
6
|
+
cardIds: ["BG36_101", "BG36_101_G"],
|
|
7
|
+
deathrattleSpawn: (minion, input) => {
|
|
8
|
+
const mult = minion.cardId === "BG36_101_G" ? 2 : 1;
|
|
9
|
+
const cardsToAdd = Array.from({ length: mult }).map(() => input.gameState.cardsData.getRandomTavernSpell({ exactTavernTier: 1 }));
|
|
10
|
+
(0, cards_in_hand_1.addCardsInHand)(input.boardWithDeadEntityHero, input.boardWithDeadEntity, cardsToAdd, input.gameState);
|
|
11
|
+
return [];
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=unwilling-slacker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unwilling-slacker.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/unwilling-slacker.ts"],"names":[],"mappings":";;;AAQA,qEAAmE;AAKtD,QAAA,gBAAgB,GAAyB;IACrD,OAAO,EAAE,0BAAwE;IACjF,gBAAgB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAAE,EAAE;QAC3E,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAwC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3E,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CACxD,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,oBAAoB,CAAC,EAAE,eAAe,EAAE,CAAC,EAAE,CAAC,CACtE,CAAC;QACF,IAAA,8BAAc,EAAC,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC,mBAAmB,EAAE,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QACtG,OAAO,EAAE,CAAC;IACX,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Unwilling Slacker (Tier 2, 1/1)\r\n * Deathrattle: Get a random 1-Cost Tavern spell.\r\n *\r\n * Golden Unwilling Slacker (Tier 2, 2/2)\r\n * Deathrattle: Get two random 1-Cost Tavern spells.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { addCardsInHand } from '../../../simulation/cards-in-hand';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { DeathrattleSpawnCard } from '../../card.interface';\r\n\r\nexport const UnwillingSlacker: DeathrattleSpawnCard = {\r\n\tcardIds: [CardIds.UnwillingSlacker_BG36_101, CardIds.UnwillingSlacker_BG36_101_G],\r\n\tdeathrattleSpawn: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.UnwillingSlacker_BG36_101_G ? 2 : 1;\r\n\t\tconst cardsToAdd = Array.from({ length: mult }).map(() =>\r\n\t\t\tinput.gameState.cardsData.getRandomTavernSpell({ exactTavernTier: 1 }),\r\n\t\t);\r\n\t\taddCardsInHand(input.boardWithDeadEntityHero, input.boardWithDeadEntity, cardsToAdd, input.gameState);\r\n\t\treturn [];\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ViciousMindslasher = void 0;
|
|
4
|
+
const attack_1 = require("../../../simulation/attack");
|
|
5
|
+
const deity_1 = require("../../../simulation/deity");
|
|
6
|
+
const stats_1 = require("../../../simulation/stats");
|
|
7
|
+
exports.ViciousMindslasher = {
|
|
8
|
+
cardIds: ["BG36_108", "BG36_108_G"],
|
|
9
|
+
onTavernSpellCast: (minion, input) => {
|
|
10
|
+
var _a, _b, _c;
|
|
11
|
+
const atk = (_a = minion.scriptDataNum1) !== null && _a !== void 0 ? _a : (minion.cardId === "BG36_108_G" ? 2 : 1);
|
|
12
|
+
const hp = (_b = minion.scriptDataNum2) !== null && _b !== void 0 ? _b : (minion.cardId === "BG36_108_G" ? 6 : 3);
|
|
13
|
+
(0, stats_1.modifyStats)(minion, minion, atk, hp, input.board, input.hero, input.gameState);
|
|
14
|
+
(0, deity_1.buffYourDeity)(input.hero, input.board, minion, atk, hp, input.gameState);
|
|
15
|
+
if ((_c = input.hero.trinkets) === null || _c === void 0 ? void 0 : _c.some((t) => t.cardId === "BG36_MagicItem_402")) {
|
|
16
|
+
for (const neighbour of (0, attack_1.getNeighbours)(input.board, minion)) {
|
|
17
|
+
(0, stats_1.modifyStats)(neighbour, minion, atk, hp, input.board, input.hero, input.gameState);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=vicious-mindslasher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vicious-mindslasher.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/vicious-mindslasher.ts"],"names":[],"mappings":";;;AAUA,uDAA2D;AAC3D,qDAA0D;AAC1D,qDAAwD;AAI3C,QAAA,kBAAkB,GAA0B;IACxD,OAAO,EAAE,0BAA4E;IACrF,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;;QACjE,MAAM,GAAG,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,CAAC,MAAM,CAAC,MAAM,iBAA0C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACvG,MAAM,EAAE,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,CAAC,MAAM,CAAC,MAAM,iBAA0C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACtG,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;QACzE,IAAI,MAAA,KAAK,CAAC,IAAI,CAAC,QAAQ,0CAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,yBAAmD,CAAC,EAAE;YAClG,KAAK,MAAM,SAAS,IAAI,IAAA,sBAAa,EAAC,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE;gBAC3D,IAAA,mBAAW,EAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;aAClF;SACD;IACF,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Vicious Mindslasher (Tier 3, 3/1)\r\n * Whenever you cast a Tavern spell, give this and your Deity +1/+3.\r\n *\r\n * Golden Vicious Mindslasher (Tier 3, 6/2)\r\n * Whenever you cast a Tavern spell, give this and your Deity +2/+6.\r\n *\r\n * Mindslasher Portrait: also give the stats to adjacent minions.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { getNeighbours } from '../../../simulation/attack';\r\nimport { buffYourDeity } from '../../../simulation/deity';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { CastSpellInput, OnTavernSpellCastCard } from '../../card.interface';\r\n\r\nexport const ViciousMindslasher: OnTavernSpellCastCard = {\r\n\tcardIds: [CardIds.ViciousMindslasher_BG36_108, CardIds.ViciousMindslasher_BG36_108_G],\r\n\tonTavernSpellCast: (minion: BoardEntity, input: CastSpellInput) => {\r\n\t\tconst atk = minion.scriptDataNum1 ?? (minion.cardId === CardIds.ViciousMindslasher_BG36_108_G ? 2 : 1);\r\n\t\tconst hp = minion.scriptDataNum2 ?? (minion.cardId === CardIds.ViciousMindslasher_BG36_108_G ? 6 : 3);\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\tif (input.hero.trinkets?.some((t) => t.cardId === CardIds.MindslasherPortrait_BG36_MagicItem_402)) {\r\n\t\t\tfor (const neighbour of getNeighbours(input.board, minion)) {\r\n\t\t\t\tmodifyStats(neighbour, minion, atk, hp, input.board, input.hero, input.gameState);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.YShaarj = void 0;
|
|
4
|
+
const deathrattle_spawns_1 = require("../../../simulation/deathrattle-spawns");
|
|
5
|
+
const deity_1 = require("../../../simulation/deity");
|
|
6
|
+
exports.YShaarj = {
|
|
7
|
+
cardIds: ["BGFYM_011", "BGFYM_011_G"],
|
|
8
|
+
deathrattleSpawn: (minion, input) => {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
const numberToSpawn = minion.scriptDataNum1 || (minion.cardId === "BGFYM_011_G" ? 4 : 2);
|
|
11
|
+
const candidates = input.gameState.sharedState.deaths
|
|
12
|
+
.filter((entity) => entity.friendly === minion.friendly &&
|
|
13
|
+
!(0, deity_1.isDeityCard)(entity.cardId, input.gameState.allCards) &&
|
|
14
|
+
(0, deity_1.isAberration)(entity, input.boardWithDeadEntityHero, input.gameState))
|
|
15
|
+
.slice(0, numberToSpawn);
|
|
16
|
+
const spawned = [];
|
|
17
|
+
for (const candidate of candidates) {
|
|
18
|
+
const spawns = (0, deathrattle_spawns_1.spawnEntities)(candidate.cardId, 1, input.boardWithDeadEntity, input.boardWithDeadEntityHero, input.otherBoard, input.otherBoardHero, input.gameState, minion.friendly, false, false, true);
|
|
19
|
+
for (const spawn of spawns) {
|
|
20
|
+
spawn.attack = (_a = candidate.maxAttack) !== null && _a !== void 0 ? _a : candidate.attack;
|
|
21
|
+
spawn.maxAttack = spawn.attack;
|
|
22
|
+
spawn.health = (_b = candidate.maxHealth) !== null && _b !== void 0 ? _b : candidate.health;
|
|
23
|
+
spawn.maxHealth = spawn.health;
|
|
24
|
+
}
|
|
25
|
+
spawned.push(...spawns);
|
|
26
|
+
}
|
|
27
|
+
return spawned;
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=yshaarj.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yshaarj.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/yshaarj.ts"],"names":[],"mappings":";;;AAYA,+EAAuE;AACvE,qDAAsE;AAGzD,QAAA,OAAO,GAAyB;IAC5C,OAAO,EAAE,4BAAwD;IACjE,gBAAgB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAA0B,EAAE;;QACnG,MAAM,aAAa,GAAG,MAAM,CAAC,cAAc,IAAI,CAAC,MAAM,CAAC,MAAM,kBAAgC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACvG,MAAM,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,MAAM;aACnD,MAAM,CACN,CAAC,MAAM,EAAE,EAAE,CACV,MAAM,CAAC,QAAQ,KAAK,MAAM,CAAC,QAAQ;YACnC,CAAC,IAAA,mBAAW,EAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC;YACrD,IAAA,oBAAY,EAAC,MAAM,EAAE,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC,SAAS,CAAC,CACrE;aACA,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;QAC1B,MAAM,OAAO,GAAkB,EAAE,CAAC;QAClC,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;YACnC,MAAM,MAAM,GAAG,IAAA,kCAAa,EAC3B,SAAS,CAAC,MAAM,EAChB,CAAC,EACD,KAAK,CAAC,mBAAmB,EACzB,KAAK,CAAC,uBAAuB,EAC7B,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,EACf,MAAM,CAAC,QAAQ,EACf,KAAK,EACL,KAAK,EACL,IAAI,CACJ,CAAC;YACF,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;gBAC3B,KAAK,CAAC,MAAM,GAAG,MAAA,SAAS,CAAC,SAAS,mCAAI,SAAS,CAAC,MAAM,CAAC;gBACvD,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC;gBAC/B,KAAK,CAAC,MAAM,GAAG,MAAA,SAAS,CAAC,SAAS,mCAAI,SAAS,CAAC,MAAM,CAAC;gBACvD,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC;aAC/B;YACD,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC;SACxB;QACD,OAAO,OAAO,CAAC;IAChB,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Y'Shaarj (Tier 3, 1/1)\r\n * Deity. Deathrattle: Summon your first 2 Aberrations that died this combat\r\n * with their maximum stats (except Deities).\r\n *\r\n * Golden Y'Shaarj (Tier 3, 2/2)\r\n * Deity. Deathrattle: Summon your first 4 Aberrations that died this combat\r\n * with their maximum stats (except Deities).\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 { spawnEntities } from '../../../simulation/deathrattle-spawns';\r\nimport { isAberration, isDeityCard } from '../../../simulation/deity';\r\nimport { DeathrattleSpawnCard } from '../../card.interface';\r\n\r\nexport const YShaarj: DeathrattleSpawnCard = {\r\n\tcardIds: [CardIds.Yshaarj_BGFYM_011, CardIds.Yshaarj_BGFYM_011_G],\r\n\tdeathrattleSpawn: (minion: BoardEntity, input: DeathrattleTriggeredInput): readonly BoardEntity[] => {\r\n\t\tconst numberToSpawn = minion.scriptDataNum1 || (minion.cardId === CardIds.Yshaarj_BGFYM_011_G ? 4 : 2);\r\n\t\tconst candidates = input.gameState.sharedState.deaths\r\n\t\t\t.filter(\r\n\t\t\t\t(entity) =>\r\n\t\t\t\t\tentity.friendly === minion.friendly &&\r\n\t\t\t\t\t!isDeityCard(entity.cardId, input.gameState.allCards) &&\r\n\t\t\t\t\tisAberration(entity, input.boardWithDeadEntityHero, input.gameState),\r\n\t\t\t)\r\n\t\t\t.slice(0, numberToSpawn);\r\n\t\tconst spawned: BoardEntity[] = [];\r\n\t\tfor (const candidate of candidates) {\r\n\t\t\tconst spawns = spawnEntities(\r\n\t\t\t\tcandidate.cardId,\r\n\t\t\t\t1,\r\n\t\t\t\tinput.boardWithDeadEntity,\r\n\t\t\t\tinput.boardWithDeadEntityHero,\r\n\t\t\t\tinput.otherBoard,\r\n\t\t\t\tinput.otherBoardHero,\r\n\t\t\t\tinput.gameState,\r\n\t\t\t\tminion.friendly,\r\n\t\t\t\tfalse,\r\n\t\t\t\tfalse,\r\n\t\t\t\ttrue,\r\n\t\t\t);\r\n\t\t\tfor (const spawn of spawns) {\r\n\t\t\t\tspawn.attack = candidate.maxAttack ?? candidate.attack;\r\n\t\t\t\tspawn.maxAttack = spawn.attack;\r\n\t\t\t\tspawn.health = candidate.maxHealth ?? candidate.health;\r\n\t\t\t\tspawn.maxHealth = spawn.health;\r\n\t\t\t}\r\n\t\t\tspawned.push(...spawns);\r\n\t\t}\r\n\t\treturn spawned;\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConverterPortrait = void 0;
|
|
4
|
+
const reborn_1 = require("../../../keywords/reborn");
|
|
5
|
+
exports.ConverterPortrait = {
|
|
6
|
+
cardIds: ["BG36_MagicItem_600"],
|
|
7
|
+
startOfCombat: (trinket, input) => {
|
|
8
|
+
let triggered = false;
|
|
9
|
+
for (const minion of input.playerBoard) {
|
|
10
|
+
if (minion.cardId === "BG36_318" ||
|
|
11
|
+
minion.cardId === "BG36_318_G") {
|
|
12
|
+
(0, reborn_1.updateReborn)(minion, true, input.playerBoard, input.playerEntity, input.opponentEntity, input.gameState);
|
|
13
|
+
triggered = true;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return triggered;
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=converter-portrait.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"converter-portrait.js","sourceRoot":"","sources":["../../../../src/cards/impl/trinket/converter-portrait.ts"],"names":[],"mappings":";;;AAKA,qDAAwD;AAK3C,QAAA,iBAAiB,GAAsB;IACnD,OAAO,EAAE,sBAA8C;IACvD,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;QACzD,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,KAAK,MAAM,MAAM,IAAI,KAAK,CAAC,WAAW,EAAE;YACvC,IACC,MAAM,CAAC,MAAM,eAAuC;gBACpD,MAAM,CAAC,MAAM,iBAAyC,EACrD;gBACD,IAAA,qBAAY,EAAC,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;gBACzG,SAAS,GAAG,IAAI,CAAC;aACjB;SACD;QACD,OAAO,SAAS,CAAC;IAClB,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Converter Portrait\r\n * Start of Combat: Give your Faceless Converters Reborn.\r\n */\r\nimport { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { updateReborn } from '../../../keywords/reborn';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const ConverterPortrait: StartOfCombatCard = {\r\n\tcardIds: [CardIds.ConverterPortrait_BG36_MagicItem_600],\r\n\tstartOfCombat: (trinket: BoardTrinket, input: SoCInput) => {\r\n\t\tlet triggered = false;\r\n\t\tfor (const minion of input.playerBoard) {\r\n\t\t\tif (\r\n\t\t\t\tminion.cardId === CardIds.FacelessConverter_BG36_318 ||\r\n\t\t\t\tminion.cardId === CardIds.FacelessConverter_BG36_318_G\r\n\t\t\t) {\r\n\t\t\t\tupdateReborn(minion, true, input.playerBoard, input.playerEntity, input.opponentEntity, input.gameState);\r\n\t\t\t\ttriggered = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn triggered;\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CorruptedBaton = void 0;
|
|
4
|
+
const deity_1 = require("../../../simulation/deity");
|
|
5
|
+
exports.CorruptedBaton = {
|
|
6
|
+
cardIds: ["BG36_MagicItem_404", "BG36_MagicItem_404t"],
|
|
7
|
+
afterTavernSpellCast: (trinket, input) => {
|
|
8
|
+
const amount = trinket.cardId === "BG36_MagicItem_404t" ? 10 : 4;
|
|
9
|
+
(0, deity_1.buffYourDeity)(input.hero, input.board, input.hero, amount, amount, input.gameState);
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=corrupted-baton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"corrupted-baton.js","sourceRoot":"","sources":["../../../../src/cards/impl/trinket/corrupted-baton.ts"],"names":[],"mappings":";;;AAKA,qDAA0D;AAI7C,QAAA,cAAc,GAA6B;IACvD,OAAO,EAAE,6CAA2G;IACpH,oBAAoB,EAAE,CAAC,OAAqB,EAAE,KAAqB,EAAE,EAAE;QACtE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,0BAAmE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1G,IAAA,qBAAa,EAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IACrF,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Corrupted Baton (lesser): After you cast a Tavern spell, give your Deity +4/+4.\r\n * Corrupted Baton (greater): After you cast a Tavern spell, give your Deity +10/+10.\r\n */\r\nimport { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { buffYourDeity } from '../../../simulation/deity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { AfterTavernSpellCastCard, CastSpellInput } from '../../card.interface';\r\n\r\nexport const CorruptedBaton: AfterTavernSpellCastCard = {\r\n\tcardIds: [CardIds.CorruptedBaton_BG36_MagicItem_404, CardIds.CorruptedBaton_CorruptedBatonToken_BG36_MagicItem_404t],\r\n\tafterTavernSpellCast: (trinket: BoardTrinket, input: CastSpellInput) => {\r\n\t\tconst amount = trinket.cardId === CardIds.CorruptedBaton_CorruptedBatonToken_BG36_MagicItem_404t ? 10 : 4;\r\n\t\tbuffYourDeity(input.hero, input.board, input.hero, amount, amount, input.gameState);\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SnarkyPortrait = void 0;
|
|
4
|
+
const reference_data_1 = require("@firestone-hs/reference-data");
|
|
5
|
+
const stats_1 = require("../../../simulation/stats");
|
|
6
|
+
const utils_1 = require("../../../utils");
|
|
7
|
+
exports.SnarkyPortrait = {
|
|
8
|
+
cardIds: ["BG36_MagicItem_450"],
|
|
9
|
+
onAfterFriendlyMinionDeath: (trinket, input) => {
|
|
10
|
+
var _a, _b;
|
|
11
|
+
if (input.deadEntity.cardId !== "BG36_205" &&
|
|
12
|
+
input.deadEntity.cardId !== "BG36_205_G") {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const amount = 4 + ((_a = trinket.scriptDataNum1) !== null && _a !== void 0 ? _a : 0);
|
|
16
|
+
for (const minion of input.board) {
|
|
17
|
+
if ((0, utils_1.hasCorrectTribe)(minion, input.hero, reference_data_1.Race.BEAST, input.gameState.anomalies, input.gameState.allCards)) {
|
|
18
|
+
(0, stats_1.modifyStats)(minion, input.deadEntity, amount, amount, input.board, input.hero, input.gameState);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
trinket.scriptDataNum1 = ((_b = trinket.scriptDataNum1) !== null && _b !== void 0 ? _b : 0) + 4;
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=snarky-portrait.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snarky-portrait.js","sourceRoot":"","sources":["../../../../src/cards/impl/trinket/snarky-portrait.ts"],"names":[],"mappings":";;;AAIA,iEAAoD;AAIpD,qDAAwD;AACxD,0CAAiD;AAGpC,QAAA,cAAc,GAAmC;IAC7D,OAAO,EAAE,sBAA2C;IACpD,0BAA0B,EAAE,CAAC,OAAqB,EAAE,KAAsC,EAAE,EAAE;;QAC7F,IACC,KAAK,CAAC,UAAU,CAAC,MAAM,eAA8B;YACrD,KAAK,CAAC,UAAU,CAAC,MAAM,iBAAgC,EACtD;YACD,OAAO;SACP;QACD,MAAM,MAAM,GAAG,CAAC,GAAG,CAAC,MAAA,OAAO,CAAC,cAAc,mCAAI,CAAC,CAAC,CAAC;QACjD,KAAK,MAAM,MAAM,IAAI,KAAK,CAAC,KAAK,EAAE;YACjC,IACC,IAAA,uBAAe,EACd,MAAM,EACN,KAAK,CAAC,IAAI,EACV,qBAAI,CAAC,KAAK,EACV,KAAK,CAAC,SAAS,CAAC,SAAS,EACzB,KAAK,CAAC,SAAS,CAAC,QAAQ,CACxB,EACA;gBACD,IAAA,mBAAW,EAAC,MAAM,EAAE,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;aAChG;SACD;QACD,OAAO,CAAC,cAAc,GAAG,CAAC,MAAA,OAAO,CAAC,cAAc,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IAC5D,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Snarky Portrait\r\n * Whenever a Fishbait dies, give your Beasts +4/+4 and improve this.\r\n */\r\nimport { Race } from '@firestone-hs/reference-data';\r\nimport { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { OnAfterFriendlyMinionDeathInput } from '../../../simulation/attack';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { hasCorrectTribe } from '../../../utils';\r\nimport { OnAfterFriendlyMinionDeathCard } from '../../card.interface';\r\n\r\nexport const SnarkyPortrait: OnAfterFriendlyMinionDeathCard = {\r\n\tcardIds: [CardIds.SnarkyPortrait_BG36_MagicItem_450],\r\n\tonAfterFriendlyMinionDeath: (trinket: BoardTrinket, input: OnAfterFriendlyMinionDeathInput) => {\r\n\t\tif (\r\n\t\t\tinput.deadEntity.cardId !== CardIds.Fishbait_BG36_205 &&\r\n\t\t\tinput.deadEntity.cardId !== CardIds.Fishbait_BG36_205_G\r\n\t\t) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst amount = 4 + (trinket.scriptDataNum1 ?? 0);\r\n\t\tfor (const minion of input.board) {\r\n\t\t\tif (\r\n\t\t\t\thasCorrectTribe(\r\n\t\t\t\t\tminion,\r\n\t\t\t\t\tinput.hero,\r\n\t\t\t\t\tRace.BEAST,\r\n\t\t\t\t\tinput.gameState.anomalies,\r\n\t\t\t\t\tinput.gameState.allCards,\r\n\t\t\t\t)\r\n\t\t\t) {\r\n\t\t\t\tmodifyStats(minion, input.deadEntity, amount, amount, input.board, input.hero, input.gameState);\r\n\t\t\t}\r\n\t\t}\r\n\t\ttrinket.scriptDataNum1 = (trinket.scriptDataNum1 ?? 0) + 4;\r\n\t},\r\n};\r\n"]}
|
|
@@ -2,6 +2,7 @@ import { BgsPlayerEntity, BgsPlayerGlobalInfo } from '../bgs-player-entity';
|
|
|
2
2
|
import { BoardEntity } from '../board-entity';
|
|
3
3
|
import { FullGameState } from '../simulation/internal-game-state';
|
|
4
4
|
export declare const updateVolumizerBuffs: (hero: BgsPlayerEntity, board: BoardEntity[], attackBuff: number, healthBuff: number, gameState: FullGameState) => void;
|
|
5
|
+
export declare const incrementBattlecriesTriggeredThisGame: (hero: BgsPlayerEntity, board: BoardEntity[], gameState: FullGameState) => void;
|
|
5
6
|
export declare const incrementDeathrattlesTriggeredThisGame: (hero: BgsPlayerEntity, board: BoardEntity[], gameState: FullGameState) => void;
|
|
6
7
|
export interface OnGlobalInfoUpdatedInput {
|
|
7
8
|
values: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.incrementDeathrattlesTriggeredThisGame = exports.updateVolumizerBuffs = void 0;
|
|
3
|
+
exports.incrementDeathrattlesTriggeredThisGame = exports.incrementBattlecriesTriggeredThisGame = exports.updateVolumizerBuffs = void 0;
|
|
4
4
|
const card_interface_1 = require("../cards/card.interface");
|
|
5
5
|
const _card_mappings_1 = require("../cards/impl/_card-mappings");
|
|
6
6
|
const stats_1 = require("../simulation/stats");
|
|
@@ -15,6 +15,29 @@ const updateVolumizerBuffs = (hero, board, attackBuff, healthBuff, gameState) =>
|
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
exports.updateVolumizerBuffs = updateVolumizerBuffs;
|
|
18
|
+
const incrementBattlecriesTriggeredThisGame = (hero, board, gameState) => {
|
|
19
|
+
var _a;
|
|
20
|
+
const previousValue = (_a = hero.globalInfo.BattlecriesTriggeredThisGame) !== null && _a !== void 0 ? _a : 0;
|
|
21
|
+
hero.globalInfo.BattlecriesTriggeredThisGame = previousValue + 1;
|
|
22
|
+
for (const entity of board) {
|
|
23
|
+
const cardImpl = _card_mappings_1.cardMappings[entity.cardId];
|
|
24
|
+
if ((0, card_interface_1.hasOnGlobalInfoUpdated)(cardImpl)) {
|
|
25
|
+
cardImpl.onGlobalInfoUpdated(entity, {
|
|
26
|
+
values: [
|
|
27
|
+
{
|
|
28
|
+
type: 'BattlecriesTriggeredThisGame',
|
|
29
|
+
oldValue: previousValue,
|
|
30
|
+
newValue: hero.globalInfo.BattlecriesTriggeredThisGame,
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
hero: hero,
|
|
34
|
+
board: board,
|
|
35
|
+
gameState: gameState,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
exports.incrementBattlecriesTriggeredThisGame = incrementBattlecriesTriggeredThisGame;
|
|
18
41
|
const incrementDeathrattlesTriggeredThisGame = (hero, board, gameState) => {
|
|
19
42
|
var _a;
|
|
20
43
|
const previousValue = (_a = hero.globalInfo.DeathrattlesTriggeredThisGame) !== null && _a !== void 0 ? _a : 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"player-global-effects.js","sourceRoot":"","sources":["../../src/mechanics/player-global-effects.ts"],"names":[],"mappings":";;;AAEA,4DAAiE;AACjE,iEAA4D;AAE5D,+CAAkD;AAClD,oCAAuC;AAEhC,MAAM,oBAAoB,GAAG,CACnC,IAAqB,EACrB,KAAoB,EACpB,UAAkB,EAClB,UAAkB,EAClB,SAAwB,EACvB,EAAE;IACH,IAAI,CAAC,UAAU,CAAC,mBAAmB,IAAI,UAAU,CAAC;IAClD,IAAI,CAAC,UAAU,CAAC,mBAAmB,IAAI,UAAU,CAAC;IAClD,KAAK,MAAM,MAAM,IAAI,KAAK,EAAE;QAC3B,IAAI,IAAA,mBAAW,EAAC,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC,QAAQ,CAAC,EAAE;YAC9E,IAAA,mBAAW,EAAC,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;SAC1E;KAOD;AACF,CAAC,CAAC;AApBW,QAAA,oBAAoB,wBAoB/B;AAEK,MAAM,sCAAsC,GAAG,CACrD,IAAqB,EACrB,KAAoB,EACpB,SAAwB,EACvB,EAAE;;IACH,MAAM,aAAa,GAAG,MAAA,IAAI,CAAC,UAAU,CAAC,6BAA6B,mCAAI,CAAC,CAAC;IACzE,IAAI,CAAC,UAAU,CAAC,6BAA6B,GAAG,aAAa,GAAG,CAAC,CAAC;IAClE,KAAK,MAAM,MAAM,IAAI,KAAK,EAAE;QAC3B,MAAM,QAAQ,GAAG,6BAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,IAAA,uCAAsB,EAAC,QAAQ,CAAC,EAAE;YACrC,QAAQ,CAAC,mBAAmB,CAAC,MAAM,EAAE;gBACpC,MAAM,EAAE;oBACP;wBACC,IAAI,EAAE,+BAA+B;wBACrC,QAAQ,EAAE,aAAa;wBACvB,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,6BAA6B;qBACvD;iBACD;gBACD,IAAI,EAAE,IAAI;gBACV,KAAK,EAAE,KAAK;gBACZ,SAAS,EAAE,SAAS;aACpB,CAAC,CAAC;SACH;KACD;AACF,CAAC,CAAC;AAxBW,QAAA,sCAAsC,0CAwBjD","sourcesContent":["import { BgsPlayerEntity, BgsPlayerGlobalInfo } from '../bgs-player-entity';\r\nimport { BoardEntity } from '../board-entity';\r\nimport { hasOnGlobalInfoUpdated } from '../cards/card.interface';\r\nimport { cardMappings } from '../cards/impl/_card-mappings';\r\nimport { FullGameState } from '../simulation/internal-game-state';\r\nimport { modifyStats } from '../simulation/stats';\r\nimport { isVolumizer } from '../utils';\r\n\r\nexport const updateVolumizerBuffs = (\r\n\thero: BgsPlayerEntity,\r\n\tboard: BoardEntity[],\r\n\tattackBuff: number,\r\n\thealthBuff: number,\r\n\tgameState: FullGameState,\r\n) => {\r\n\thero.globalInfo.VolumizerAttackBuff += attackBuff;\r\n\thero.globalInfo.VolumizerHealthBuff += healthBuff;\r\n\tfor (const entity of board) {\r\n\t\tif (isVolumizer(entity.cardId, hero, gameState.anomalies, gameState.allCards)) {\r\n\t\t\tmodifyStats(entity, hero, attackBuff, healthBuff, board, hero, gameState);\r\n\t\t}\r\n\t\t// for (const enchantment of entity.enchantments) {\r\n\t\t// \tconst rootDbfId = gameState.allCards.getCard(enchantment.cardId).entityDbfIf;\r\n\t\t// \tif (isVolumizer(rootDbfId, hero, gameState.anomalies, gameState.allCards)) {\r\n\t\t// \t\tmodifyStats(entity, hero, attackBuff, healthBuff, board, hero, gameState);\r\n\t\t// \t}\r\n\t\t// }\r\n\t}\r\n};\r\n\r\nexport const incrementDeathrattlesTriggeredThisGame = (\r\n\thero: BgsPlayerEntity,\r\n\tboard: BoardEntity[],\r\n\tgameState: FullGameState,\r\n) => {\r\n\tconst previousValue = hero.globalInfo.DeathrattlesTriggeredThisGame ?? 0;\r\n\thero.globalInfo.DeathrattlesTriggeredThisGame = previousValue + 1;\r\n\tfor (const entity of board) {\r\n\t\tconst cardImpl = cardMappings[entity.cardId];\r\n\t\tif (hasOnGlobalInfoUpdated(cardImpl)) {\r\n\t\t\tcardImpl.onGlobalInfoUpdated(entity, {\r\n\t\t\t\tvalues: [\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttype: 'DeathrattlesTriggeredThisGame',\r\n\t\t\t\t\t\toldValue: previousValue,\r\n\t\t\t\t\t\tnewValue: hero.globalInfo.DeathrattlesTriggeredThisGame,\r\n\t\t\t\t\t},\r\n\t\t\t\t],\r\n\t\t\t\thero: hero,\r\n\t\t\t\tboard: board,\r\n\t\t\t\tgameState: gameState,\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n};\r\n\r\nexport interface OnGlobalInfoUpdatedInput {\r\n\tvalues: {\r\n\t\ttype: keyof BgsPlayerGlobalInfo;\r\n\t\toldValue: number;\r\n\t\tnewValue: number;\r\n\t}[];\r\n\thero: BgsPlayerEntity;\r\n\tboard: BoardEntity[];\r\n\tgameState: FullGameState;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"player-global-effects.js","sourceRoot":"","sources":["../../src/mechanics/player-global-effects.ts"],"names":[],"mappings":";;;AAEA,4DAAiE;AACjE,iEAA4D;AAE5D,+CAAkD;AAClD,oCAAuC;AAEhC,MAAM,oBAAoB,GAAG,CACnC,IAAqB,EACrB,KAAoB,EACpB,UAAkB,EAClB,UAAkB,EAClB,SAAwB,EACvB,EAAE;IACH,IAAI,CAAC,UAAU,CAAC,mBAAmB,IAAI,UAAU,CAAC;IAClD,IAAI,CAAC,UAAU,CAAC,mBAAmB,IAAI,UAAU,CAAC;IAClD,KAAK,MAAM,MAAM,IAAI,KAAK,EAAE;QAC3B,IAAI,IAAA,mBAAW,EAAC,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC,QAAQ,CAAC,EAAE;YAC9E,IAAA,mBAAW,EAAC,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;SAC1E;KAOD;AACF,CAAC,CAAC;AApBW,QAAA,oBAAoB,wBAoB/B;AAEK,MAAM,qCAAqC,GAAG,CACpD,IAAqB,EACrB,KAAoB,EACpB,SAAwB,EACvB,EAAE;;IACH,MAAM,aAAa,GAAG,MAAA,IAAI,CAAC,UAAU,CAAC,4BAA4B,mCAAI,CAAC,CAAC;IACxE,IAAI,CAAC,UAAU,CAAC,4BAA4B,GAAG,aAAa,GAAG,CAAC,CAAC;IACjE,KAAK,MAAM,MAAM,IAAI,KAAK,EAAE;QAC3B,MAAM,QAAQ,GAAG,6BAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,IAAA,uCAAsB,EAAC,QAAQ,CAAC,EAAE;YACrC,QAAQ,CAAC,mBAAmB,CAAC,MAAM,EAAE;gBACpC,MAAM,EAAE;oBACP;wBACC,IAAI,EAAE,8BAA8B;wBACpC,QAAQ,EAAE,aAAa;wBACvB,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,4BAA4B;qBACtD;iBACD;gBACD,IAAI,EAAE,IAAI;gBACV,KAAK,EAAE,KAAK;gBACZ,SAAS,EAAE,SAAS;aACpB,CAAC,CAAC;SACH;KACD;AACF,CAAC,CAAC;AAxBW,QAAA,qCAAqC,yCAwBhD;AAEK,MAAM,sCAAsC,GAAG,CACrD,IAAqB,EACrB,KAAoB,EACpB,SAAwB,EACvB,EAAE;;IACH,MAAM,aAAa,GAAG,MAAA,IAAI,CAAC,UAAU,CAAC,6BAA6B,mCAAI,CAAC,CAAC;IACzE,IAAI,CAAC,UAAU,CAAC,6BAA6B,GAAG,aAAa,GAAG,CAAC,CAAC;IAClE,KAAK,MAAM,MAAM,IAAI,KAAK,EAAE;QAC3B,MAAM,QAAQ,GAAG,6BAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,IAAA,uCAAsB,EAAC,QAAQ,CAAC,EAAE;YACrC,QAAQ,CAAC,mBAAmB,CAAC,MAAM,EAAE;gBACpC,MAAM,EAAE;oBACP;wBACC,IAAI,EAAE,+BAA+B;wBACrC,QAAQ,EAAE,aAAa;wBACvB,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,6BAA6B;qBACvD;iBACD;gBACD,IAAI,EAAE,IAAI;gBACV,KAAK,EAAE,KAAK;gBACZ,SAAS,EAAE,SAAS;aACpB,CAAC,CAAC;SACH;KACD;AACF,CAAC,CAAC;AAxBW,QAAA,sCAAsC,0CAwBjD","sourcesContent":["import { BgsPlayerEntity, BgsPlayerGlobalInfo } from '../bgs-player-entity';\r\nimport { BoardEntity } from '../board-entity';\r\nimport { hasOnGlobalInfoUpdated } from '../cards/card.interface';\r\nimport { cardMappings } from '../cards/impl/_card-mappings';\r\nimport { FullGameState } from '../simulation/internal-game-state';\r\nimport { modifyStats } from '../simulation/stats';\r\nimport { isVolumizer } from '../utils';\r\n\r\nexport const updateVolumizerBuffs = (\r\n\thero: BgsPlayerEntity,\r\n\tboard: BoardEntity[],\r\n\tattackBuff: number,\r\n\thealthBuff: number,\r\n\tgameState: FullGameState,\r\n) => {\r\n\thero.globalInfo.VolumizerAttackBuff += attackBuff;\r\n\thero.globalInfo.VolumizerHealthBuff += healthBuff;\r\n\tfor (const entity of board) {\r\n\t\tif (isVolumizer(entity.cardId, hero, gameState.anomalies, gameState.allCards)) {\r\n\t\t\tmodifyStats(entity, hero, attackBuff, healthBuff, board, hero, gameState);\r\n\t\t}\r\n\t\t// for (const enchantment of entity.enchantments) {\r\n\t\t// \tconst rootDbfId = gameState.allCards.getCard(enchantment.cardId).entityDbfIf;\r\n\t\t// \tif (isVolumizer(rootDbfId, hero, gameState.anomalies, gameState.allCards)) {\r\n\t\t// \t\tmodifyStats(entity, hero, attackBuff, healthBuff, board, hero, gameState);\r\n\t\t// \t}\r\n\t\t// }\r\n\t}\r\n};\r\n\r\nexport const incrementBattlecriesTriggeredThisGame = (\r\n\thero: BgsPlayerEntity,\r\n\tboard: BoardEntity[],\r\n\tgameState: FullGameState,\r\n) => {\r\n\tconst previousValue = hero.globalInfo.BattlecriesTriggeredThisGame ?? 0;\r\n\thero.globalInfo.BattlecriesTriggeredThisGame = previousValue + 1;\r\n\tfor (const entity of board) {\r\n\t\tconst cardImpl = cardMappings[entity.cardId];\r\n\t\tif (hasOnGlobalInfoUpdated(cardImpl)) {\r\n\t\t\tcardImpl.onGlobalInfoUpdated(entity, {\r\n\t\t\t\tvalues: [\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttype: 'BattlecriesTriggeredThisGame',\r\n\t\t\t\t\t\toldValue: previousValue,\r\n\t\t\t\t\t\tnewValue: hero.globalInfo.BattlecriesTriggeredThisGame,\r\n\t\t\t\t\t},\r\n\t\t\t\t],\r\n\t\t\t\thero: hero,\r\n\t\t\t\tboard: board,\r\n\t\t\t\tgameState: gameState,\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n};\r\n\r\nexport const incrementDeathrattlesTriggeredThisGame = (\r\n\thero: BgsPlayerEntity,\r\n\tboard: BoardEntity[],\r\n\tgameState: FullGameState,\r\n) => {\r\n\tconst previousValue = hero.globalInfo.DeathrattlesTriggeredThisGame ?? 0;\r\n\thero.globalInfo.DeathrattlesTriggeredThisGame = previousValue + 1;\r\n\tfor (const entity of board) {\r\n\t\tconst cardImpl = cardMappings[entity.cardId];\r\n\t\tif (hasOnGlobalInfoUpdated(cardImpl)) {\r\n\t\t\tcardImpl.onGlobalInfoUpdated(entity, {\r\n\t\t\t\tvalues: [\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttype: 'DeathrattlesTriggeredThisGame',\r\n\t\t\t\t\t\toldValue: previousValue,\r\n\t\t\t\t\t\tnewValue: hero.globalInfo.DeathrattlesTriggeredThisGame,\r\n\t\t\t\t\t},\r\n\t\t\t\t],\r\n\t\t\t\thero: hero,\r\n\t\t\t\tboard: board,\r\n\t\t\t\tgameState: gameState,\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n};\r\n\r\nexport interface OnGlobalInfoUpdatedInput {\r\n\tvalues: {\r\n\t\ttype: keyof BgsPlayerGlobalInfo;\r\n\t\toldValue: number;\r\n\t\tnewValue: number;\r\n\t}[];\r\n\thero: BgsPlayerEntity;\r\n\tboard: BoardEntity[];\r\n\tgameState: FullGameState;\r\n}\r\n"]}
|