@firestone-hs/simulate-bgs-battle 1.1.725 → 1.1.727
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-battle-info.d.ts +1 -0
- package/dist/bgs-battle-info.js.map +1 -1
- package/dist/bgs-battle-options.d.ts +1 -0
- package/dist/bgs-battle-options.js.map +1 -1
- package/dist/cards/impl/_card-mappings.js +58 -0
- package/dist/cards/impl/_card-mappings.js.map +1 -1
- package/dist/cards/impl/bg-spell/misplaced-tea-set.js +5 -8
- package/dist/cards/impl/bg-spell/misplaced-tea-set.js.map +1 -1
- package/dist/cards/impl/bg-spell/weapons-forge.d.ts +2 -0
- package/dist/cards/impl/bg-spell/weapons-forge.js +12 -0
- package/dist/cards/impl/bg-spell/weapons-forge.js.map +1 -0
- package/dist/cards/impl/enchantments/charisma.d.ts +2 -0
- package/dist/cards/impl/enchantments/charisma.js +44 -0
- package/dist/cards/impl/enchantments/charisma.js.map +1 -0
- package/dist/cards/impl/enchantments/consanguinity.d.ts +2 -0
- package/dist/cards/impl/enchantments/consanguinity.js +13 -0
- package/dist/cards/impl/enchantments/consanguinity.js.map +1 -0
- package/dist/cards/impl/enchantments/mystic-essence.d.ts +2 -0
- package/dist/cards/impl/enchantments/mystic-essence.js +13 -0
- package/dist/cards/impl/enchantments/mystic-essence.js.map +1 -0
- package/dist/cards/impl/hero-power/die-insects.d.ts +2 -0
- package/dist/cards/impl/hero-power/die-insects.js +21 -0
- package/dist/cards/impl/hero-power/die-insects.js.map +1 -0
- package/dist/cards/impl/hero-power/fire-the-cannons.d.ts +2 -0
- package/dist/cards/impl/hero-power/fire-the-cannons.js +21 -0
- package/dist/cards/impl/hero-power/fire-the-cannons.js.map +1 -0
- package/dist/cards/impl/hero-power/murloc-king-enchantment.d.ts +2 -0
- package/dist/cards/impl/hero-power/murloc-king-enchantment.js +9 -0
- package/dist/cards/impl/hero-power/murloc-king-enchantment.js.map +1 -0
- package/dist/cards/impl/hero-power/murloc-king.d.ts +2 -0
- package/dist/cards/impl/hero-power/murloc-king.js +24 -0
- package/dist/cards/impl/hero-power/murloc-king.js.map +1 -0
- package/dist/cards/impl/hero-power/nefarious-fire.d.ts +2 -0
- package/dist/cards/impl/hero-power/nefarious-fire.js +19 -0
- package/dist/cards/impl/hero-power/nefarious-fire.js.map +1 -0
- package/dist/cards/impl/hero-power/wax-warband.js +5 -1
- package/dist/cards/impl/hero-power/wax-warband.js.map +1 -1
- package/dist/cards/impl/minion/arfus.d.ts +2 -0
- package/dist/cards/impl/minion/arfus.js +17 -0
- package/dist/cards/impl/minion/arfus.js.map +1 -0
- package/dist/cards/impl/minion/bramble-tunneler.d.ts +2 -0
- package/dist/cards/impl/minion/bramble-tunneler.js +14 -0
- package/dist/cards/impl/minion/bramble-tunneler.js.map +1 -0
- package/dist/cards/impl/minion/branns-epic-egg.d.ts +2 -0
- package/dist/cards/impl/minion/branns-epic-egg.js +23 -0
- package/dist/cards/impl/minion/branns-epic-egg.js.map +1 -0
- package/dist/cards/impl/minion/bronze-timewalker.d.ts +2 -0
- package/dist/cards/impl/minion/bronze-timewalker.js +22 -0
- package/dist/cards/impl/minion/bronze-timewalker.js.map +1 -0
- package/dist/cards/impl/minion/choral-mrrrglr.js +15 -5
- package/dist/cards/impl/minion/choral-mrrrglr.js.map +1 -1
- package/dist/cards/impl/minion/elder-taggawag.d.ts +2 -5
- package/dist/cards/impl/minion/elder-taggawag.js +1 -0
- package/dist/cards/impl/minion/elder-taggawag.js.map +1 -1
- package/dist/cards/impl/minion/elementium-squirrel-bomb.d.ts +2 -0
- package/dist/cards/impl/minion/elementium-squirrel-bomb.js +22 -0
- package/dist/cards/impl/minion/elementium-squirrel-bomb.js.map +1 -0
- package/dist/cards/impl/minion/fleeing-fugitive.js +1 -1
- package/dist/cards/impl/minion/fleeing-fugitive.js.map +1 -1
- package/dist/cards/impl/minion/gatekeeper-amalgam.js +2 -7
- package/dist/cards/impl/minion/gatekeeper-amalgam.js.map +1 -1
- package/dist/cards/impl/minion/glambot.js +2 -1
- package/dist/cards/impl/minion/glambot.js.map +1 -1
- package/dist/cards/impl/minion/headhunter-gryphon.d.ts +2 -0
- package/dist/cards/impl/minion/headhunter-gryphon.js +19 -0
- package/dist/cards/impl/minion/headhunter-gryphon.js.map +1 -0
- package/dist/cards/impl/minion/imp-lusionist.d.ts +2 -0
- package/dist/cards/impl/minion/imp-lusionist.js +14 -0
- package/dist/cards/impl/minion/imp-lusionist.js.map +1 -0
- package/dist/cards/impl/minion/kilrek.d.ts +2 -0
- package/dist/cards/impl/minion/kilrek.js +18 -0
- package/dist/cards/impl/minion/kilrek.js.map +1 -0
- package/dist/cards/impl/minion/lady-sinestra.d.ts +2 -0
- package/dist/cards/impl/minion/lady-sinestra.js +14 -0
- package/dist/cards/impl/minion/lady-sinestra.js.map +1 -0
- package/dist/cards/impl/minion/loyal-henchman.d.ts +2 -0
- package/dist/cards/impl/minion/loyal-henchman.js +21 -0
- package/dist/cards/impl/minion/loyal-henchman.js.map +1 -0
- package/dist/cards/impl/minion/mawsworn-soulkeeper.d.ts +2 -0
- package/dist/cards/impl/minion/mawsworn-soulkeeper.js +21 -0
- package/dist/cards/impl/minion/mawsworn-soulkeeper.js.map +1 -0
- package/dist/cards/impl/minion/probius.d.ts +2 -0
- package/dist/cards/impl/minion/probius.js +16 -0
- package/dist/cards/impl/minion/probius.js.map +1 -0
- package/dist/cards/impl/minion/rescue-bot.d.ts +2 -0
- package/dist/cards/impl/minion/rescue-bot.js +14 -0
- package/dist/cards/impl/minion/rescue-bot.js.map +1 -0
- package/dist/cards/impl/minion/shamanic-tidecaller.js +2 -1
- package/dist/cards/impl/minion/shamanic-tidecaller.js.map +1 -1
- package/dist/cards/impl/minion/sr-tomb-diver.d.ts +2 -0
- package/dist/cards/impl/minion/sr-tomb-diver.js +18 -0
- package/dist/cards/impl/minion/sr-tomb-diver.js.map +1 -0
- package/dist/cards/impl/minion/stalwart-kodo.js +3 -1
- package/dist/cards/impl/minion/stalwart-kodo.js.map +1 -1
- package/dist/cards/impl/minion/timewarped-mrrrglr.js +11 -5
- package/dist/cards/impl/minion/timewarped-mrrrglr.js.map +1 -1
- package/dist/cards/impl/minion/torrential-ruiner.js +2 -1
- package/dist/cards/impl/minion/torrential-ruiner.js.map +1 -1
- package/dist/cards/impl/minion/tuskarr-raider.d.ts +2 -0
- package/dist/cards/impl/minion/tuskarr-raider.js +36 -0
- package/dist/cards/impl/minion/tuskarr-raider.js.map +1 -0
- package/dist/cards/impl/minion/twilight-hatchling.js +1 -4
- package/dist/cards/impl/minion/twilight-hatchling.js.map +1 -1
- package/dist/cards/impl/minion/twilight-tidehunter.js +1 -1
- package/dist/cards/impl/minion/twilight-tidehunter.js.map +1 -1
- package/dist/cards/impl/minion/unearthed-underling.d.ts +2 -0
- package/dist/cards/impl/minion/unearthed-underling.js +14 -0
- package/dist/cards/impl/minion/unearthed-underling.js.map +1 -0
- package/dist/cards/impl/minion/vigilant-bristlemane.js +1 -1
- package/dist/cards/impl/minion/vigilant-bristlemane.js.map +1 -1
- package/dist/cards/impl/spell/fleeting-vigor.js +6 -1
- package/dist/cards/impl/spell/fleeting-vigor.js.map +1 -1
- package/dist/cards/impl/spellcraft/floating-candle-set.d.ts +2 -0
- package/dist/cards/impl/spellcraft/floating-candle-set.js +21 -0
- package/dist/cards/impl/spellcraft/floating-candle-set.js.map +1 -0
- package/dist/cards/impl/trinket/flighty-portrait.d.ts +2 -0
- package/dist/cards/impl/trinket/flighty-portrait.js +21 -0
- package/dist/cards/impl/trinket/flighty-portrait.js.map +1 -0
- package/dist/input-clone.js +5 -1
- package/dist/input-clone.js.map +1 -1
- package/dist/input-sanitation.js +3 -0
- package/dist/input-sanitation.js.map +1 -1
- package/dist/services/rng.d.ts +8 -0
- package/dist/services/rng.js +40 -0
- package/dist/services/rng.js.map +1 -0
- package/dist/services/utils.js +3 -2
- package/dist/services/utils.js.map +1 -1
- package/dist/simulate-bgs-battle.d.ts +10 -0
- package/dist/simulate-bgs-battle.js +119 -77
- package/dist/simulate-bgs-battle.js.map +1 -1
- package/dist/simulation/add-minion-to-board.js +8 -6
- package/dist/simulation/add-minion-to-board.js.map +1 -1
- package/dist/simulation/auras.js +42 -41
- package/dist/simulation/auras.js.map +1 -1
- package/dist/simulation/damage-cap.d.ts +2 -0
- package/dist/simulation/damage-cap.js +28 -0
- package/dist/simulation/damage-cap.js.map +1 -0
- package/dist/simulation/deathrattle-spawns.js +0 -57
- package/dist/simulation/deathrattle-spawns.js.map +1 -1
- package/dist/simulation/internal-game-state.d.ts +2 -0
- package/dist/simulation/internal-game-state.js.map +1 -1
- package/dist/simulation/reborn.js +0 -13
- package/dist/simulation/reborn.js.map +1 -1
- package/dist/simulation/shared-state.d.ts +3 -1
- package/dist/simulation/shared-state.js +4 -1
- package/dist/simulation/shared-state.js.map +1 -1
- package/dist/simulation/simulator.d.ts +1 -0
- package/dist/simulation/simulator.js +13 -4
- package/dist/simulation/simulator.js.map +1 -1
- package/dist/simulation/spawns.js +1 -1
- package/dist/simulation/spawns.js.map +1 -1
- package/dist/simulation/start-of-combat/soc-action-processor.js +12 -0
- package/dist/simulation/start-of-combat/soc-action-processor.js.map +1 -1
- package/dist/simulation/stats.js +41 -24
- package/dist/simulation/stats.js.map +1 -1
- package/dist/utils.js +4 -4
- package/dist/utils.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HeadhunterGryphon = void 0;
|
|
4
|
+
const reference_data_1 = require("@firestone-hs/reference-data");
|
|
5
|
+
const cards_in_hand_1 = require("../../../simulation/cards-in-hand");
|
|
6
|
+
exports.HeadhunterGryphon = {
|
|
7
|
+
cardIds: ["BG36_204", "BG36_204_G"],
|
|
8
|
+
rally: (minion, input) => {
|
|
9
|
+
var _a;
|
|
10
|
+
const mult = minion.cardId === "BG36_204_G" ? 2 : 1;
|
|
11
|
+
const cardsToAdd = [];
|
|
12
|
+
for (let i = 0; i < mult; i++) {
|
|
13
|
+
cardsToAdd.push(input.gameState.cardsData.getRandomMinionForTribe(reference_data_1.Race.BEAST, (_a = input.attackingHero.tavernTier) !== null && _a !== void 0 ? _a : 1));
|
|
14
|
+
}
|
|
15
|
+
(0, cards_in_hand_1.addCardsInHand)(input.attackingHero, input.attackingBoard, cardsToAdd, input.gameState);
|
|
16
|
+
return { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=headhunter-gryphon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headhunter-gryphon.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/headhunter-gryphon.ts"],"names":[],"mappings":";;;AAOA,iEAAoD;AAEpD,qEAAmE;AAKtD,QAAA,iBAAiB,GAAc;IAC3C,OAAO,EAAE,0BAA0E;IACnF,KAAK,EAAE,CAAC,MAAmB,EAAE,KAAoB,EAAE,EAAE;;QACpD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAyC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5E,MAAM,UAAU,GAAG,EAAE,CAAC;QACtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YAC9B,UAAU,CAAC,IAAI,CACd,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,uBAAuB,CAChD,qBAAI,CAAC,KAAK,EACV,MAAA,KAAK,CAAC,aAAa,CAAC,UAAU,mCAAI,CAAC,CACnC,CACD,CAAC;SACF;QACD,IAAA,8BAAc,EAAC,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,cAAc,EAAE,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QACvF,OAAO,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvD,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Headhunter Gryphon (Tier 4, 3/5)\r\n * Rally: Get a random Beast.\r\n *\r\n * Golden Headhunter Gryphon (Tier 4, 6/10)\r\n * Rally: Get 2 random Beasts.\r\n */\r\nimport { Race } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { addCardsInHand } from '../../../simulation/cards-in-hand';\r\nimport { OnAttackInput } from '../../../simulation/on-attack';\r\nimport { RallyCard } from '../../card.interface';\r\nimport { CardIds } from '../../../services/card-ids';\r\n\r\nexport const HeadhunterGryphon: RallyCard = {\r\n\tcardIds: [CardIds.HeadhunterGryphon_BG36_204, CardIds.HeadhunterGryphon_BG36_204_G],\r\n\trally: (minion: BoardEntity, input: OnAttackInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.HeadhunterGryphon_BG36_204_G ? 2 : 1;\r\n\t\tconst cardsToAdd = [];\r\n\t\tfor (let i = 0; i < mult; i++) {\r\n\t\t\tcardsToAdd.push(\r\n\t\t\t\tinput.gameState.cardsData.getRandomMinionForTribe(\r\n\t\t\t\t\tRace.BEAST,\r\n\t\t\t\t\tinput.attackingHero.tavernTier ?? 1,\r\n\t\t\t\t),\r\n\t\t\t);\r\n\t\t}\r\n\t\taddCardsInHand(input.attackingHero, input.attackingBoard, cardsToAdd, input.gameState);\r\n\t\treturn { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ImpLusionist = void 0;
|
|
4
|
+
const cards_in_hand_1 = require("../../../simulation/cards-in-hand");
|
|
5
|
+
exports.ImpLusionist = {
|
|
6
|
+
cardIds: ["BG36_731", "BG36_731_G"],
|
|
7
|
+
deathrattleSpawn: (minion, input) => {
|
|
8
|
+
const mult = minion.cardId === "BG36_731_G" ? 2 : 1;
|
|
9
|
+
const cardsToAdd = Array(2 * mult).fill("BG36_880");
|
|
10
|
+
(0, cards_in_hand_1.addCardsInHand)(input.boardWithDeadEntityHero, input.boardWithDeadEntity, cardsToAdd, input.gameState);
|
|
11
|
+
return [];
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=imp-lusionist.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imp-lusionist.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/imp-lusionist.ts"],"names":[],"mappings":";;;AAQA,qEAAmE;AAKtD,QAAA,YAAY,GAAyB;IACjD,OAAO,EAAE,0BAAgE;IACzE,gBAAgB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAAE,EAAE;QAC3E,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAoC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACvE,MAAM,UAAU,GAAG,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,YAAoC,CAAC;QAC5E,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 * Imp-lusionist (Tier 5, 6/3)\r\n * Deathrattle: Get 2 copies of Methodical Madness.\r\n *\r\n * Golden Imp-lusionist (Tier 5, 12/6)\r\n * Deathrattle: Get 4 copies of Methodical Madness.\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 { DeathrattleSpawnCard } from '../../card.interface';\r\nimport { CardIds } from '../../../services/card-ids';\r\n\r\nexport const ImpLusionist: DeathrattleSpawnCard = {\r\n\tcardIds: [CardIds.ImpLusionist_BG36_731, CardIds.ImpLusionist_BG36_731_G],\r\n\tdeathrattleSpawn: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.ImpLusionist_BG36_731_G ? 2 : 1;\r\n\t\tconst cardsToAdd = Array(2 * mult).fill(CardIds.MethodicalMadness_BG36_880);\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,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Kilrek = void 0;
|
|
4
|
+
const utils_1 = require("../../../services/utils");
|
|
5
|
+
const cards_in_hand_1 = require("../../../simulation/cards-in-hand");
|
|
6
|
+
exports.Kilrek = {
|
|
7
|
+
cardIds: ["TB_BaconShop_HERO_37_Buddy", "TB_BaconShop_HERO_37_Buddy_G"],
|
|
8
|
+
deathrattleSpawn: (minion, input) => {
|
|
9
|
+
const mult = minion.cardId === "TB_BaconShop_HERO_37_Buddy_G" ? 2 : 1;
|
|
10
|
+
const cardsToAdd = [];
|
|
11
|
+
for (let i = 0; i < mult; i++) {
|
|
12
|
+
cardsToAdd.push((0, utils_1.pickRandom)(input.gameState.cardsData.demonSpawns));
|
|
13
|
+
}
|
|
14
|
+
(0, cards_in_hand_1.addCardsInHand)(input.boardWithDeadEntityHero, input.boardWithDeadEntity, cardsToAdd, input.gameState);
|
|
15
|
+
return [];
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=kilrek.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kilrek.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/kilrek.ts"],"names":[],"mappings":";;;AAEA,mDAAqD;AACrD,qEAAmE;AAItD,QAAA,MAAM,GAAyB;IAC3C,OAAO,EAAE,8DAAwF;IACjG,gBAAgB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAAE,EAAE;QAC3E,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,mCAAgD,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACnF,MAAM,UAAU,GAAa,EAAE,CAAC;QAChC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YAC9B,UAAU,CAAC,IAAI,CAAC,IAAA,kBAAU,EAAC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;SACnE;QACD,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":["import { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { pickRandom } from '../../../services/utils';\r\nimport { addCardsInHand } from '../../../simulation/cards-in-hand';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { DeathrattleSpawnCard } from '../../card.interface';\r\n\r\nexport const Kilrek: DeathrattleSpawnCard = {\r\n\tcardIds: [CardIds.Kilrek_TB_BaconShop_HERO_37_Buddy, CardIds.Kilrek_TB_BaconShop_HERO_37_Buddy_G],\r\n\tdeathrattleSpawn: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.Kilrek_TB_BaconShop_HERO_37_Buddy_G ? 2 : 1;\r\n\t\tconst cardsToAdd: string[] = [];\r\n\t\tfor (let i = 0; i < mult; i++) {\r\n\t\t\tcardsToAdd.push(pickRandom(input.gameState.cardsData.demonSpawns));\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,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LadySinestra = void 0;
|
|
4
|
+
const stats_1 = require("../../../simulation/stats");
|
|
5
|
+
exports.LadySinestra = {
|
|
6
|
+
cardIds: ["TB_BaconShop_HERO_52_Buddy", "TB_BaconShop_HERO_52_Buddy_G"],
|
|
7
|
+
onStatsChanged: (minion, input) => {
|
|
8
|
+
if (input.attackAmount > 0) {
|
|
9
|
+
const buff = minion.cardId === "TB_BaconShop_HERO_52_Buddy_G" ? 2 : 1;
|
|
10
|
+
(0, stats_1.modifyStats)(input.target, minion, 0, buff, input.board, input.hero, input.gameState);
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=lady-sinestra.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lady-sinestra.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/lady-sinestra.ts"],"names":[],"mappings":";;;AAEA,qDAA6E;AAGhE,QAAA,YAAY,GAAuB;IAC/C,OAAO,EAAE,8DAAoG;IAC7G,cAAc,EAAE,CAAC,MAAmB,EAAE,KAA0B,EAAE,EAAE;QACnE,IAAI,KAAK,CAAC,YAAY,GAAG,CAAC,EAAE;YAC3B,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,mCAAsD,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACzF,IAAA,mBAAW,EAAC,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;SACrF;IACF,CAAC;CACD,CAAC","sourcesContent":["import { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { modifyStats, OnStatsChangedInput } from '../../../simulation/stats';\r\nimport { OnStatsChangedCard } from '../../card.interface';\r\n\r\nexport const LadySinestra: OnStatsChangedCard = {\r\n\tcardIds: [CardIds.LadySinestra_TB_BaconShop_HERO_52_Buddy, CardIds.LadySinestra_TB_BaconShop_HERO_52_Buddy_G],\r\n\tonStatsChanged: (minion: BoardEntity, input: OnStatsChangedInput) => {\r\n\t\tif (input.attackAmount > 0) {\r\n\t\t\tconst buff = minion.cardId === CardIds.LadySinestra_TB_BaconShop_HERO_52_Buddy_G ? 2 : 1;\r\n\t\t\tmodifyStats(input.target, minion, 0, buff, input.board, input.hero, input.gameState);\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LoyalHenchman = void 0;
|
|
4
|
+
const cards_in_hand_1 = require("../../../simulation/cards-in-hand");
|
|
5
|
+
exports.LoyalHenchman = {
|
|
6
|
+
cardIds: ["TB_BaconShop_HERO_45_Buddy", "TB_BaconShop_HERO_45_Buddy_G"],
|
|
7
|
+
onMinionKilled: (minion, input) => {
|
|
8
|
+
var _a;
|
|
9
|
+
if (input.killer.friendly === input.minionKilled.friendly) {
|
|
10
|
+
return { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };
|
|
11
|
+
}
|
|
12
|
+
const kills = ((_a = minion.memory) !== null && _a !== void 0 ? _a : 0) + 1;
|
|
13
|
+
minion.memory = kills;
|
|
14
|
+
if (kills === 2) {
|
|
15
|
+
const mult = minion.cardId === "TB_BaconShop_HERO_45_Buddy_G" ? 2 : 1;
|
|
16
|
+
(0, cards_in_hand_1.addCardsInHand)(input.attackingHero, input.attackingBoard, Array(mult).fill(input.minionKilled.cardId), input.gameState);
|
|
17
|
+
}
|
|
18
|
+
return { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=loyal-henchman.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loyal-henchman.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/loyal-henchman.ts"],"names":[],"mappings":";;;AAGA,qEAAmE;AAGtD,QAAA,aAAa,GAAuB;IAChD,OAAO,EAAE,8DAAsG;IAC/G,cAAc,EAAE,CAAC,MAAmB,EAAE,KAA0B,EAAE,EAAE;;QACnE,IAAI,KAAK,CAAC,MAAM,CAAC,QAAQ,KAAK,KAAK,CAAC,YAAY,CAAC,QAAQ,EAAE;YAC1D,OAAO,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,CAAC;SACtD;QACD,MAAM,KAAK,GAAG,CAAC,MAAC,MAAM,CAAC,MAAiB,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACnD,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC;QACtB,IAAI,KAAK,KAAK,CAAC,EAAE;YAChB,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,mCAAuD,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC1F,IAAA,8BAAc,EACb,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,EAC3C,KAAK,CAAC,SAAS,CACf,CAAC;SACF;QACD,OAAO,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvD,CAAC;CACD,CAAC","sourcesContent":["import { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { OnMinionKilledInput } from '../../../simulation/attack';\r\nimport { addCardsInHand } from '../../../simulation/cards-in-hand';\r\nimport { OnMinionKilledCard } from '../../card.interface';\r\n\r\nexport const LoyalHenchman: OnMinionKilledCard = {\r\n\tcardIds: [CardIds.LoyalHenchman_TB_BaconShop_HERO_45_Buddy, CardIds.LoyalHenchman_TB_BaconShop_HERO_45_Buddy_G],\r\n\tonMinionKilled: (minion: BoardEntity, input: OnMinionKilledInput) => {\r\n\t\tif (input.killer.friendly === input.minionKilled.friendly) {\r\n\t\t\treturn { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };\r\n\t\t}\r\n\t\tconst kills = ((minion.memory as number) ?? 0) + 1;\r\n\t\tminion.memory = kills;\r\n\t\tif (kills === 2) {\r\n\t\t\tconst mult = minion.cardId === CardIds.LoyalHenchman_TB_BaconShop_HERO_45_Buddy_G ? 2 : 1;\r\n\t\t\taddCardsInHand(\r\n\t\t\t\tinput.attackingHero,\r\n\t\t\t\tinput.attackingBoard,\r\n\t\t\t\tArray(mult).fill(input.minionKilled.cardId),\r\n\t\t\t\tinput.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"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MawswornSoulkeeper = void 0;
|
|
4
|
+
const reference_data_1 = require("@firestone-hs/reference-data");
|
|
5
|
+
const deathrattle_spawns_1 = require("../../../simulation/deathrattle-spawns");
|
|
6
|
+
exports.MawswornSoulkeeper = {
|
|
7
|
+
cardIds: [
|
|
8
|
+
"TB_BaconShop_HERO_702_Buddy",
|
|
9
|
+
"TB_BaconShop_HERO_702_Buddy_G",
|
|
10
|
+
],
|
|
11
|
+
deathrattleSpawn: (minion, input) => {
|
|
12
|
+
const numberOfMinionsToSpawn = minion.cardId === "TB_BaconShop_HERO_702_Buddy_G" ? 4 : 2;
|
|
13
|
+
const spawnedEntities = [];
|
|
14
|
+
for (let i = 0; i < numberOfMinionsToSpawn; i++) {
|
|
15
|
+
const minionCardId = input.gameState.cardsData.getRandomMinionForTribe(reference_data_1.Race.UNDEAD, input.boardWithDeadEntityHero.tavernTier);
|
|
16
|
+
spawnedEntities.push(...(0, deathrattle_spawns_1.spawnEntities)(minionCardId, 1, input.boardWithDeadEntity, input.boardWithDeadEntityHero, input.otherBoard, input.otherBoardHero, input.gameState, input.deadEntity.friendly, false));
|
|
17
|
+
}
|
|
18
|
+
return spawnedEntities;
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=mawsworn-soulkeeper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mawsworn-soulkeeper.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/mawsworn-soulkeeper.ts"],"names":[],"mappings":";;;AAAA,iEAAoD;AAIpD,+EAAuE;AAG1D,QAAA,kBAAkB,GAAyB;IACvD,OAAO,EAAE;;;KAGR;IACD,gBAAgB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAAE,EAAE;QAC3E,MAAM,sBAAsB,GAC3B,MAAM,CAAC,MAAM,oCAA6D,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACpF,MAAM,eAAe,GAAkB,EAAE,CAAC;QAC1C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,sBAAsB,EAAE,CAAC,EAAE,EAAE;YAChD,MAAM,YAAY,GAAG,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,uBAAuB,CACrE,qBAAI,CAAC,MAAM,EACX,KAAK,CAAC,uBAAuB,CAAC,UAAU,CACxC,CAAC;YACF,eAAe,CAAC,IAAI,CACnB,GAAG,IAAA,kCAAa,EACf,YAAY,EACZ,CAAC,EACD,KAAK,CAAC,mBAAmB,EACzB,KAAK,CAAC,uBAAuB,EAC7B,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,EACf,KAAK,CAAC,UAAU,CAAC,QAAQ,EACzB,KAAK,CACL,CACD,CAAC;SACF;QACD,OAAO,eAAe,CAAC;IACxB,CAAC;CACD,CAAC","sourcesContent":["import { Race } from '@firestone-hs/reference-data';\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 { DeathrattleSpawnCard } from '../../card.interface';\r\n\r\nexport const MawswornSoulkeeper: DeathrattleSpawnCard = {\r\n\tcardIds: [\r\n\t\tCardIds.MawswornSoulkeeper_TB_BaconShop_HERO_702_Buddy,\r\n\t\tCardIds.MawswornSoulkeeper_TB_BaconShop_HERO_702_Buddy_G,\r\n\t],\r\n\tdeathrattleSpawn: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\tconst numberOfMinionsToSpawn =\r\n\t\t\tminion.cardId === CardIds.MawswornSoulkeeper_TB_BaconShop_HERO_702_Buddy_G ? 4 : 2;\r\n\t\tconst spawnedEntities: BoardEntity[] = [];\r\n\t\tfor (let i = 0; i < numberOfMinionsToSpawn; i++) {\r\n\t\t\tconst minionCardId = input.gameState.cardsData.getRandomMinionForTribe(\r\n\t\t\t\tRace.UNDEAD,\r\n\t\t\t\tinput.boardWithDeadEntityHero.tavernTier,\r\n\t\t\t);\r\n\t\t\tspawnedEntities.push(\r\n\t\t\t\t...spawnEntities(\r\n\t\t\t\t\tminionCardId,\r\n\t\t\t\t\t1,\r\n\t\t\t\t\tinput.boardWithDeadEntity,\r\n\t\t\t\t\tinput.boardWithDeadEntityHero,\r\n\t\t\t\t\tinput.otherBoard,\r\n\t\t\t\t\tinput.otherBoardHero,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t\tinput.deadEntity.friendly,\r\n\t\t\t\t\tfalse,\r\n\t\t\t\t),\r\n\t\t\t);\r\n\t\t}\r\n\t\treturn spawnedEntities;\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Probius = void 0;
|
|
4
|
+
const reference_data_1 = require("@firestone-hs/reference-data");
|
|
5
|
+
const golden_1 = require("../../../simulation/utils/golden");
|
|
6
|
+
const utils_1 = require("../../../utils");
|
|
7
|
+
exports.Probius = {
|
|
8
|
+
cardIds: ["BG31_HERO_802_Buddy", "BG31_HERO_802_Buddy_G"],
|
|
9
|
+
onAfterMagnetizeSelf: (entity, input) => {
|
|
10
|
+
if ((0, utils_1.hasCorrectTribe)(input.magnetizeTarget, input.hero, reference_data_1.Race.MECH, input.gameState.anomalies, input.gameState.allCards)) {
|
|
11
|
+
(0, golden_1.makeMinionGolden)(input.magnetizeTarget, entity, input.board, input.hero, input.otherBoard, input.otherHero, input.gameState);
|
|
12
|
+
input.gameState.spectator.registerPowerTarget(entity, input.magnetizeTarget, input.board, input.hero, input.otherHero);
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=probius.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"probius.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/probius.ts"],"names":[],"mappings":";;;AAAA,iEAAoD;AAIpD,6DAAoE;AACpE,0CAAiD;AAGpC,QAAA,OAAO,GAA6B;IAChD,OAAO,EAAE,gDAA4E;IACrF,oBAAoB,EAAE,CAAC,MAAmB,EAAE,KAA4B,EAAE,EAAE;QAC3E,IACC,IAAA,uBAAe,EACd,KAAK,CAAC,eAAe,EACrB,KAAK,CAAC,IAAI,EACV,qBAAI,CAAC,IAAI,EACT,KAAK,CAAC,SAAS,CAAC,SAAS,EACzB,KAAK,CAAC,SAAS,CAAC,QAAQ,CACxB,EACA;YACD,IAAA,yBAAgB,EACf,KAAK,CAAC,eAAe,EACrB,MAAM,EACN,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,SAAS,EACf,KAAK,CAAC,SAAS,CACf,CAAC;YACF,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAC5C,MAAM,EACN,KAAK,CAAC,eAAe,EACrB,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,SAAS,CACf,CAAC;SACF;IACF,CAAC;CACD,CAAC","sourcesContent":["import { Race } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { OnAfterMagnetizeInput } from '../../../simulation/magnetize';\r\nimport { makeMinionGolden } from '../../../simulation/utils/golden';\r\nimport { hasCorrectTribe } from '../../../utils';\r\nimport { OnAfterMagnetizeSelfCard } from '../../card.interface';\r\n\r\nexport const Probius: OnAfterMagnetizeSelfCard = {\r\n\tcardIds: [CardIds.Probius_BG31_HERO_802_Buddy, CardIds.Probius_BG31_HERO_802_Buddy_G],\r\n\tonAfterMagnetizeSelf: (entity: BoardEntity, input: OnAfterMagnetizeInput) => {\r\n\t\tif (\r\n\t\t\thasCorrectTribe(\r\n\t\t\t\tinput.magnetizeTarget,\r\n\t\t\t\tinput.hero,\r\n\t\t\t\tRace.MECH,\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) {\r\n\t\t\tmakeMinionGolden(\r\n\t\t\t\tinput.magnetizeTarget,\r\n\t\t\t\tentity,\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\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\t\tentity,\r\n\t\t\t\tinput.magnetizeTarget,\r\n\t\t\t\tinput.board,\r\n\t\t\t\tinput.hero,\r\n\t\t\t\tinput.otherHero,\r\n\t\t\t);\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RescueBot = void 0;
|
|
4
|
+
const cards_in_hand_1 = require("../../../simulation/cards-in-hand");
|
|
5
|
+
exports.RescueBot = {
|
|
6
|
+
cardIds: ["BG36_854", "BG36_854_G"],
|
|
7
|
+
deathrattleSpawn: (minion, input) => {
|
|
8
|
+
const mult = minion.cardId === "BG36_854_G" ? 2 : 1;
|
|
9
|
+
const cardsToAdd = Array(mult).fill("BG36_624");
|
|
10
|
+
(0, cards_in_hand_1.addCardsInHand)(input.boardWithDeadEntityHero, input.boardWithDeadEntity, cardsToAdd, input.gameState);
|
|
11
|
+
return [];
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=rescue-bot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rescue-bot.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/rescue-bot.ts"],"names":[],"mappings":";;;AAQA,qEAAmE;AAKtD,QAAA,SAAS,GAAyB;IAC9C,OAAO,EAAE,0BAA0D;IACnE,gBAAgB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAAE,EAAE;QAC3E,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAiC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACpE,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,YAA4B,CAAC;QAChE,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 * Rescue Bot (Tier 3, 5/1)\r\n * Taunt. Deathrattle: Get a Repair Job.\r\n *\r\n * Golden Rescue Bot (Tier 3, 10/2)\r\n * Taunt. Deathrattle: Get 2 Repair Jobs.\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 { DeathrattleSpawnCard } from '../../card.interface';\r\nimport { CardIds } from '../../../services/card-ids';\r\n\r\nexport const RescueBot: DeathrattleSpawnCard = {\r\n\tcardIds: [CardIds.RescueBot_BG36_854, CardIds.RescueBot_BG36_854_G],\r\n\tdeathrattleSpawn: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.RescueBot_BG36_854_G ? 2 : 1;\r\n\t\tconst cardsToAdd = Array(mult).fill(CardIds.RepairJob_BG36_624);\r\n\t\taddCardsInHand(input.boardWithDeadEntityHero, input.boardWithDeadEntity, cardsToAdd, input.gameState);\r\n\t\treturn [];\r\n\t},\r\n};\r\n"]}
|
|
@@ -10,7 +10,8 @@ exports.ShamanicTidecaller = {
|
|
|
10
10
|
onTavernSpellCast: (entity, input) => {
|
|
11
11
|
var _a;
|
|
12
12
|
const target = input.target;
|
|
13
|
-
if (
|
|
13
|
+
if (input.source !== input.hero ||
|
|
14
|
+
!target ||
|
|
14
15
|
!(0, utils_1.hasCorrectTribe)(target, input.hero, reference_data_1.Race.MURLOC, input.gameState.anomalies, input.gameState.allCards)) {
|
|
15
16
|
return;
|
|
16
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shamanic-tidecaller.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/shamanic-tidecaller.ts"],"names":[],"mappings":";;;AAOA,iEAAoD;AAEpD,qDAAwD;AACxD,0CAAiD;AAIjD,MAAM,UAAU,GAAG,CAAC,CAAC;AAER,QAAA,kBAAkB,GAA0B;IACxD,OAAO,EAAE,0BAA4E;IACrF,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;;QACjE,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC5B,IACC,CAAC,MAAM;YACP,CAAC,IAAA,uBAAe,EAAC,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,qBAAI,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,EACrG;YACD,OAAO;SACP;QAED,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAA0C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7E,MAAM,OAAO,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,MAAA,KAAK,CAAC,IAAI,CAAC,IAAI,mCAAI,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CACzE,IAAA,uBAAe,EAAC,CAAC,EAAE,KAAK,CAAC,IAAI,EAAE,qBAAI,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAChG,CAAC;QACF,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;YAC7B,IAAA,mBAAW,EACV,MAAM,EACN,MAAM,EACN,UAAU,GAAG,IAAI,EACjB,UAAU,GAAG,IAAI,EACjB,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,SAAS,CACf,CAAC;SACF;IACF,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Shamanic Tidecaller (Tier 5, 5/7)\r\n * Whenever you cast a spell on a Murloc, give Murlocs in your hand and board +3/+3.\r\n *\r\n * Golden Shamanic Tidecaller (Tier 5, 10/14)\r\n * Whenever you cast a spell on a Murloc, give Murlocs in your hand and board +6/+6.\r\n */\r\nimport { Race } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { hasCorrectTribe } from '../../../utils';\r\nimport { CastSpellInput, OnTavernSpellCastCard } from '../../card.interface';\r\nimport { CardIds } from '../../../services/card-ids';\r\n\r\nconst murlocBuff = 3;\r\n\r\nexport const ShamanicTidecaller: OnTavernSpellCastCard = {\r\n\tcardIds: [CardIds.ShamanicTidecaller_BG36_704, CardIds.ShamanicTidecaller_BG36_704_G],\r\n\tonTavernSpellCast: (entity: BoardEntity, input: CastSpellInput) => {\r\n\t\tconst target = input.target;\r\n\t\tif (\r\n\t\t\t!target ||\r\n\t\t\t!hasCorrectTribe(target, input.hero, Race.MURLOC, input.gameState.anomalies, input.gameState.allCards)\r\n\t\t) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst mult = entity.cardId === CardIds.ShamanicTidecaller_BG36_704_G ? 2 : 1;\r\n\t\tconst murlocs = [...input.board, ...(input.hero.hand ?? [])].filter((e) =>\r\n\t\t\thasCorrectTribe(e, input.hero, Race.MURLOC, input.gameState.anomalies, input.gameState.allCards),\r\n\t\t);\r\n\t\tfor (const murloc of murlocs) {\r\n\t\t\tmodifyStats(\r\n\t\t\t\tmurloc,\r\n\t\t\t\tentity,\r\n\t\t\t\tmurlocBuff * mult,\r\n\t\t\t\tmurlocBuff * mult,\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"]}
|
|
1
|
+
{"version":3,"file":"shamanic-tidecaller.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/shamanic-tidecaller.ts"],"names":[],"mappings":";;;AAOA,iEAAoD;AAEpD,qDAAwD;AACxD,0CAAiD;AAIjD,MAAM,UAAU,GAAG,CAAC,CAAC;AAER,QAAA,kBAAkB,GAA0B;IACxD,OAAO,EAAE,0BAA4E;IACrF,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;;QACjE,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC5B,IACC,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,IAAI;YAC3B,CAAC,MAAM;YACP,CAAC,IAAA,uBAAe,EAAC,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,qBAAI,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,EACrG;YACD,OAAO;SACP;QAED,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAA0C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7E,MAAM,OAAO,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,MAAA,KAAK,CAAC,IAAI,CAAC,IAAI,mCAAI,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CACzE,IAAA,uBAAe,EAAC,CAAC,EAAE,KAAK,CAAC,IAAI,EAAE,qBAAI,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAChG,CAAC;QACF,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;YAC7B,IAAA,mBAAW,EACV,MAAM,EACN,MAAM,EACN,UAAU,GAAG,IAAI,EACjB,UAAU,GAAG,IAAI,EACjB,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,SAAS,CACf,CAAC;SACF;IACF,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Shamanic Tidecaller (Tier 5, 5/7)\r\n * Whenever you cast a spell on a Murloc, give Murlocs in your hand and board +3/+3.\r\n *\r\n * Golden Shamanic Tidecaller (Tier 5, 10/14)\r\n * Whenever you cast a spell on a Murloc, give Murlocs in your hand and board +6/+6.\r\n */\r\nimport { Race } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { hasCorrectTribe } from '../../../utils';\r\nimport { CastSpellInput, OnTavernSpellCastCard } from '../../card.interface';\r\nimport { CardIds } from '../../../services/card-ids';\r\n\r\nconst murlocBuff = 3;\r\n\r\nexport const ShamanicTidecaller: OnTavernSpellCastCard = {\r\n\tcardIds: [CardIds.ShamanicTidecaller_BG36_704, CardIds.ShamanicTidecaller_BG36_704_G],\r\n\tonTavernSpellCast: (entity: BoardEntity, input: CastSpellInput) => {\r\n\t\tconst target = input.target;\r\n\t\tif (\r\n\t\t\tinput.source !== input.hero ||\r\n\t\t\t!target ||\r\n\t\t\t!hasCorrectTribe(target, input.hero, Race.MURLOC, input.gameState.anomalies, input.gameState.allCards)\r\n\t\t) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst mult = entity.cardId === CardIds.ShamanicTidecaller_BG36_704_G ? 2 : 1;\r\n\t\tconst murlocs = [...input.board, ...(input.hero.hand ?? [])].filter((e) =>\r\n\t\t\thasCorrectTribe(e, input.hero, Race.MURLOC, input.gameState.anomalies, input.gameState.allCards),\r\n\t\t);\r\n\t\tfor (const murloc of murlocs) {\r\n\t\t\tmodifyStats(\r\n\t\t\t\tmurloc,\r\n\t\t\t\tentity,\r\n\t\t\t\tmurlocBuff * mult,\r\n\t\t\t\tmurlocBuff * mult,\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,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SrTombDiver = void 0;
|
|
4
|
+
const golden_1 = require("../../../simulation/utils/golden");
|
|
5
|
+
exports.SrTombDiver = {
|
|
6
|
+
cardIds: ["TB_BaconShop_HERO_41_Buddy", "TB_BaconShop_HERO_41_Buddy_G"],
|
|
7
|
+
deathrattleEffect: (minion, input) => {
|
|
8
|
+
const numberToGild = minion.cardId === "TB_BaconShop_HERO_41_Buddy_G" ? 2 : 1;
|
|
9
|
+
const targetBoard = input.boardWithDeadEntity;
|
|
10
|
+
for (let i = 0; i < Math.min(numberToGild, targetBoard.length); i++) {
|
|
11
|
+
const rightMostMinion = targetBoard[targetBoard.length - 1 - i];
|
|
12
|
+
if (rightMostMinion && !rightMostMinion.definitelyDead && rightMostMinion.health > 0) {
|
|
13
|
+
(0, golden_1.makeMinionGolden)(rightMostMinion, minion, input.boardWithDeadEntity, input.boardWithDeadEntityHero, input.otherBoard, input.otherBoardHero, input.gameState);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=sr-tomb-diver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sr-tomb-diver.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/sr-tomb-diver.ts"],"names":[],"mappings":";;;AAGA,6DAAoE;AAGvD,QAAA,WAAW,GAA0B;IACjD,OAAO,EAAE,8DAAkG;IAC3G,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAAE,EAAE;QAC5E,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,mCAAqD,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAChG,MAAM,WAAW,GAAG,KAAK,CAAC,mBAAmB,CAAC;QAE9C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE;YACpE,MAAM,eAAe,GAAG,WAAW,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;YAChE,IAAI,eAAe,IAAI,CAAC,eAAe,CAAC,cAAc,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE;gBACrF,IAAA,yBAAgB,EACf,eAAe,EACf,MAAM,EACN,KAAK,CAAC,mBAAmB,EACzB,KAAK,CAAC,uBAAuB,EAC7B,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,CACf,CAAC;aACF;SACD;IACF,CAAC;CACD,CAAC","sourcesContent":["import { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { makeMinionGolden } from '../../../simulation/utils/golden';\r\nimport { DeathrattleEffectCard } from '../../card.interface';\r\n\r\nexport const SrTombDiver: DeathrattleEffectCard = {\r\n\tcardIds: [CardIds.SrTombDiver_TB_BaconShop_HERO_41_Buddy, CardIds.SrTombDiver_TB_BaconShop_HERO_41_Buddy_G],\r\n\tdeathrattleEffect: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\tconst numberToGild = minion.cardId === CardIds.SrTombDiver_TB_BaconShop_HERO_41_Buddy_G ? 2 : 1;\r\n\t\tconst targetBoard = input.boardWithDeadEntity;\r\n\t\t// Always target the right-most minion, even if it happens to be dead already\r\n\t\tfor (let i = 0; i < Math.min(numberToGild, targetBoard.length); i++) {\r\n\t\t\tconst rightMostMinion = targetBoard[targetBoard.length - 1 - i];\r\n\t\t\tif (rightMostMinion && !rightMostMinion.definitelyDead && rightMostMinion.health > 0) {\r\n\t\t\t\tmakeMinionGolden(\r\n\t\t\t\t\trightMostMinion,\r\n\t\t\t\t\tminion,\r\n\t\t\t\t\tinput.boardWithDeadEntity,\r\n\t\t\t\t\tinput.boardWithDeadEntityHero,\r\n\t\t\t\t\tinput.otherBoard,\r\n\t\t\t\t\tinput.otherBoardHero,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -4,7 +4,9 @@ exports.StalwartKodo = void 0;
|
|
|
4
4
|
const stats_1 = require("../../../simulation/stats");
|
|
5
5
|
exports.StalwartKodo = {
|
|
6
6
|
cardIds: ["BG34_322", "BG34_322_G"],
|
|
7
|
-
defaultCharges: (entity) =>
|
|
7
|
+
defaultCharges: (entity) => entity.scriptDataNum1 != null && Number.isFinite(entity.scriptDataNum1)
|
|
8
|
+
? Math.max(0, entity.scriptDataNum1)
|
|
9
|
+
: 3,
|
|
8
10
|
afterOtherSpawned: (minion, input) => {
|
|
9
11
|
const mult = minion.cardId === "BG34_322_G" ? 2 : 1;
|
|
10
12
|
if (minion.abiityChargesLeft > 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stalwart-kodo.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/stalwart-kodo.ts"],"names":[],"mappings":";;;AAGA,qDAAwD;AAG3C,QAAA,YAAY,GAA+C;IACvE,OAAO,EAAE,0BAAgE;IACzE,cAAc,EAAE,CAAC,MAAmB,EAAE,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"stalwart-kodo.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/stalwart-kodo.ts"],"names":[],"mappings":";;;AAGA,qDAAwD;AAG3C,QAAA,YAAY,GAA+C;IACvE,OAAO,EAAE,0BAAgE;IACzE,cAAc,EAAE,CAAC,MAAmB,EAAE,EAAE,CACvC,MAAM,CAAC,cAAc,IAAI,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,cAAc,CAAC;QACtE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAAwB,EAAE,EAAE;QACpE,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAoC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACvE,IAAI,MAAM,CAAC,iBAAiB,GAAG,CAAC,EAAE;YACjC,MAAM,CAAC,iBAAiB,EAAE,CAAC;YAC3B,IAAA,mBAAW,EACV,KAAK,CAAC,OAAO,EACb,MAAM,EACN,MAAM,CAAC,SAAS,GAAG,IAAI,EACvB,MAAM,CAAC,SAAS,GAAG,IAAI,EACvB,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,SAAS,CACf,CAAC;YACF,OAAO;SACP;IACF,CAAC;CACD,CAAC","sourcesContent":["import { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { OnOtherSpawnInput } from '../../../simulation/add-minion-to-board';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { AfterOtherSpawnedCard, DefaultChargesCard } from '../../card.interface';\r\n\r\nexport const StalwartKodo: AfterOtherSpawnedCard & DefaultChargesCard = {\r\n\tcardIds: [CardIds.StalwartKodo_BG34_322, CardIds.StalwartKodo_BG34_322_G],\r\n\tdefaultCharges: (entity: BoardEntity) =>\r\n\t\tentity.scriptDataNum1 != null && Number.isFinite(entity.scriptDataNum1)\r\n\t\t\t? Math.max(0, entity.scriptDataNum1)\r\n\t\t\t: 3,\r\n\tafterOtherSpawned: (minion: BoardEntity, input: OnOtherSpawnInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.StalwartKodo_BG34_322_G ? 2 : 1;\r\n\t\tif (minion.abiityChargesLeft > 0) {\r\n\t\t\tminion.abiityChargesLeft--;\r\n\t\t\tmodifyStats(\r\n\t\t\t\tinput.spawned,\r\n\t\t\t\tminion,\r\n\t\t\t\tminion.maxAttack * mult,\r\n\t\t\t\tminion.maxHealth * mult,\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\treturn;\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -9,13 +9,19 @@ exports.TimewarpedMrrrglr = {
|
|
|
9
9
|
cardIds: ["BG34_Giant_321", "BG34_Giant_321_G"],
|
|
10
10
|
startOfCombatTiming: 'start-of-combat',
|
|
11
11
|
startOfCombat: (minion, input) => {
|
|
12
|
-
var _a
|
|
12
|
+
var _a;
|
|
13
13
|
const targets = (0, attack_1.getNeighbours)(input.playerBoard, minion);
|
|
14
14
|
const mult = minion.cardId === "BG34_Giant_321_G" ? 2 : 1;
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
15
|
+
const realHand = ((_a = input.playerEntity.hand) !== null && _a !== void 0 ? _a : []).filter((e) => { var _a; return !((_a = e.enchantments) === null || _a === void 0 ? void 0 : _a.some((ench) => ench.cardId === 'TB_BaconShopBadsongE')); });
|
|
16
|
+
const totalAttackInHand = realHand.map((e) => { var _a; return (_a = e.attack) !== null && _a !== void 0 ? _a : 0; }).reduce((a, b) => a + b, 0);
|
|
17
|
+
const totalHealthInHand = realHand.map((e) => { var _a; return (_a = e.health) !== null && _a !== void 0 ? _a : 0; }).reduce((a, b) => a + b, 0);
|
|
18
|
+
const boardHasChorus = input.playerBoard.some((e) => { var _a; return (_a = e.enchantments) === null || _a === void 0 ? void 0 : _a.some((ench) => ench.cardId === "BG26_354e"); });
|
|
19
|
+
const attackBuff = totalAttackInHand ||
|
|
20
|
+
(boardHasChorus || minion.gildedInCombat ? 0 : input.playerEntity.globalInfo.ChoralAttackBuff) ||
|
|
21
|
+
0;
|
|
22
|
+
const healthBuff = totalHealthInHand ||
|
|
23
|
+
(boardHasChorus || minion.gildedInCombat ? 0 : input.playerEntity.globalInfo.ChoralHealthBuff) ||
|
|
24
|
+
0;
|
|
19
25
|
for (let i = 0; i < mult; i++) {
|
|
20
26
|
for (const target of targets) {
|
|
21
27
|
if ((0, utils_1.hasCorrectTribe)(target, input.playerEntity, reference_data_1.Race.MURLOC, input.gameState.anomalies, input.gameState.allCards)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timewarped-mrrrglr.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/timewarped-mrrrglr.ts"],"names":[],"mappings":";;;AAAA,iEAAoD;AAGpD,uDAA2D;AAE3D,qDAAwD;AACxD,0CAAiD;AAGpC,QAAA,iBAAiB,GAAsB;IACnD,OAAO,EAAE,sCAAsF;IAC/F,mBAAmB,EAAE,iBAAiB;IACtC,aAAa,EAAE,CAAC,MAAmB,EAAE,KAAe,EAAE,EAAE;;QACvD,MAAM,OAAO,GAAG,IAAA,sBAAa,EAAC,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAEzD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,uBAA+C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAElF,MAAM,
|
|
1
|
+
{"version":3,"file":"timewarped-mrrrglr.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/timewarped-mrrrglr.ts"],"names":[],"mappings":";;;AAAA,iEAAoD;AAGpD,uDAA2D;AAE3D,qDAAwD;AACxD,0CAAiD;AAGpC,QAAA,iBAAiB,GAAsB;IACnD,OAAO,EAAE,sCAAsF;IAC/F,mBAAmB,EAAE,iBAAiB;IACtC,aAAa,EAAE,CAAC,MAAmB,EAAE,KAAe,EAAE,EAAE;;QACvD,MAAM,OAAO,GAAG,IAAA,sBAAa,EAAC,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAEzD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,uBAA+C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAElF,MAAM,QAAQ,GAAG,CAAC,MAAA,KAAK,CAAC,YAAY,CAAC,IAAI,mCAAI,EAAE,CAAC,CAAC,MAAM,CACtD,CAAC,CAAC,EAAE,EAAE,WAAC,OAAA,CAAC,CAAA,MAAA,CAAC,CAAC,YAAY,0CAAE,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,sBAAsB,CAAC,CAAA,CAAA,EAAA,CAC9E,CAAC;QACF,MAAM,iBAAiB,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,WAAC,OAAA,MAAA,CAAC,CAAC,MAAM,mCAAI,CAAC,CAAA,EAAA,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QACxF,MAAM,iBAAiB,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,WAAC,OAAA,MAAA,CAAC,CAAC,MAAM,mCAAI,CAAC,CAAA,EAAA,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QAGxF,MAAM,cAAc,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,WACnD,OAAA,MAAA,CAAC,CAAC,YAAY,0CAAE,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,gBAA4C,CAAC,CAAA,EAAA,CACvF,CAAC;QACF,MAAM,UAAU,GACf,iBAAiB;YACjB,CAAC,cAAc,IAAI,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,UAAU,CAAC,gBAAgB,CAAC;YAC9F,CAAC,CAAC;QACH,MAAM,UAAU,GACf,iBAAiB;YACjB,CAAC,cAAc,IAAI,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,UAAU,CAAC,gBAAgB,CAAC;YAC9F,CAAC,CAAC;QACH,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YAC9B,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;gBAC7B,IACC,IAAA,uBAAe,EACd,MAAM,EACN,KAAK,CAAC,YAAY,EAClB,qBAAI,CAAC,MAAM,EACX,KAAK,CAAC,SAAS,CAAC,SAAS,EACzB,KAAK,CAAC,SAAS,CAAC,QAAQ,CACxB,EACA;oBACD,IAAA,mBAAW,EACV,MAAM,EACN,MAAM,EACN,UAAU,EACV,UAAU,EACV,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,SAAS,CACf,CAAC;iBACF;aACD;SACD;QACD,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAC","sourcesContent":["import { Race } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { getNeighbours } from '../../../simulation/attack';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { hasCorrectTribe } from '../../../utils';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const TimewarpedMrrrglr: StartOfCombatCard = {\r\n\tcardIds: [CardIds.TimewarpedMrrrglr_BG34_Giant_321, CardIds.TimewarpedMrrrglr_BG34_Giant_321_G],\r\n\tstartOfCombatTiming: 'start-of-combat',\r\n\tstartOfCombat: (minion: BoardEntity, input: SoCInput) => {\r\n\t\tconst targets = getNeighbours(input.playerBoard, minion);\r\n\t\t// Multiplier not needed if relying on global info?\r\n\t\tconst mult = minion.cardId === CardIds.TimewarpedMrrrglr_BG34_Giant_321_G ? 2 : 1;\r\n\t\t// When it's summoned by Y'Shaarj hero power, the info isn't set\r\n\t\tconst realHand = (input.playerEntity.hand ?? []).filter(\r\n\t\t\t(e) => !e.enchantments?.some((ench) => ench.cardId === 'TB_BaconShopBadsongE'),\r\n\t\t);\r\n\t\tconst totalAttackInHand = realHand.map((e) => e.attack ?? 0).reduce((a, b) => a + b, 0);\r\n\t\tconst totalHealthInHand = realHand.map((e) => e.health ?? 0).reduce((a, b) => a + b, 0);\r\n\t\t// Same as ChoralMrrrglr: globalInfo Choral*Buff duplicates stats already on board when\r\n\t\t// the Chorus enchantment is present and hand extract is empty.\r\n\t\tconst boardHasChorus = input.playerBoard.some((e) =>\r\n\t\t\te.enchantments?.some((ench) => ench.cardId === CardIds.ChoralMrrrglr_ChorusEnchantment),\r\n\t\t);\r\n\t\tconst attackBuff =\r\n\t\t\ttotalAttackInHand ||\r\n\t\t\t(boardHasChorus || minion.gildedInCombat ? 0 : input.playerEntity.globalInfo.ChoralAttackBuff) ||\r\n\t\t\t0;\r\n\t\tconst healthBuff =\r\n\t\t\ttotalHealthInHand ||\r\n\t\t\t(boardHasChorus || minion.gildedInCombat ? 0 : input.playerEntity.globalInfo.ChoralHealthBuff) ||\r\n\t\t\t0;\r\n\t\tfor (let i = 0; i < mult; i++) {\r\n\t\t\tfor (const target of targets) {\r\n\t\t\t\tif (\r\n\t\t\t\t\thasCorrectTribe(\r\n\t\t\t\t\t\ttarget,\r\n\t\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\t\tRace.MURLOC,\r\n\t\t\t\t\t\tinput.gameState.anomalies,\r\n\t\t\t\t\t\tinput.gameState.allCards,\r\n\t\t\t\t\t)\r\n\t\t\t\t) {\r\n\t\t\t\t\tmodifyStats(\r\n\t\t\t\t\t\ttarget,\r\n\t\t\t\t\t\tminion,\r\n\t\t\t\t\t\tattackBuff,\r\n\t\t\t\t\t\thealthBuff,\r\n\t\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\t\tinput.gameState,\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n};\r\n"]}
|
|
@@ -8,7 +8,8 @@ exports.TorrentialRuiner = {
|
|
|
8
8
|
cardIds: ["BG36_622", "BG36_622_G"],
|
|
9
9
|
onTavernSpellCast: (entity, input) => {
|
|
10
10
|
const target = input.target;
|
|
11
|
-
if (
|
|
11
|
+
if (input.source !== input.hero ||
|
|
12
|
+
!target ||
|
|
12
13
|
!(0, utils_1.hasCorrectTribe)(target, input.hero, reference_data_1.Race.NAGA, input.gameState.anomalies, input.gameState.allCards)) {
|
|
13
14
|
return;
|
|
14
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"torrential-ruiner.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/torrential-ruiner.ts"],"names":[],"mappings":";;;AAOA,iEAAoD;AAEpD,0CAAkE;AAIlE,MAAM,SAAS,GAAG,CAAC,CAAC;AAEP,QAAA,gBAAgB,GAA0B;IACtD,OAAO,EAAE,0BAAwE;IACjF,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QACjE,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC5B,IACC,CAAC,MAAM;YACP,CAAC,IAAA,uBAAe,EAAC,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,qBAAI,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,EACnG;YACD,OAAO;SACP;QAED,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAwC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3E,IAAA,uBAAe,EAAC,MAAM,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,EAAE,SAAS,GAAG,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IACvG,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Torrential Ruiner (Tier 6, 3/3)\r\n * Whenever you cast a spell on a Naga, give your minions +3/+3.\r\n *\r\n * Golden Torrential Ruiner (Tier 6, 6/6)\r\n * Whenever you cast a spell on a Naga, give your minions +6/+6.\r\n */\r\nimport { Race } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { addStatsToBoard, hasCorrectTribe } from '../../../utils';\r\nimport { CastSpellInput, OnTavernSpellCastCard } from '../../card.interface';\r\nimport { CardIds } from '../../../services/card-ids';\r\n\r\nconst boardBuff = 3;\r\n\r\nexport const TorrentialRuiner: OnTavernSpellCastCard = {\r\n\tcardIds: [CardIds.TorrentialRuiner_BG36_622, CardIds.TorrentialRuiner_BG36_622_G],\r\n\tonTavernSpellCast: (entity: BoardEntity, input: CastSpellInput) => {\r\n\t\tconst target = input.target;\r\n\t\tif (\r\n\t\t\t!target ||\r\n\t\t\t!hasCorrectTribe(target, input.hero, Race.NAGA, input.gameState.anomalies, input.gameState.allCards)\r\n\t\t) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst mult = entity.cardId === CardIds.TorrentialRuiner_BG36_622_G ? 2 : 1;\r\n\t\taddStatsToBoard(entity, input.board, input.hero, boardBuff * mult, boardBuff * mult, input.gameState);\r\n\t},\r\n};\r\n"]}
|
|
1
|
+
{"version":3,"file":"torrential-ruiner.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/torrential-ruiner.ts"],"names":[],"mappings":";;;AAOA,iEAAoD;AAEpD,0CAAkE;AAIlE,MAAM,SAAS,GAAG,CAAC,CAAC;AAEP,QAAA,gBAAgB,GAA0B;IACtD,OAAO,EAAE,0BAAwE;IACjF,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QACjE,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC5B,IACC,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,IAAI;YAC3B,CAAC,MAAM;YACP,CAAC,IAAA,uBAAe,EAAC,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,qBAAI,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,EACnG;YACD,OAAO;SACP;QAED,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAwC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3E,IAAA,uBAAe,EAAC,MAAM,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,EAAE,SAAS,GAAG,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IACvG,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Torrential Ruiner (Tier 6, 3/3)\r\n * Whenever you cast a spell on a Naga, give your minions +3/+3.\r\n *\r\n * Golden Torrential Ruiner (Tier 6, 6/6)\r\n * Whenever you cast a spell on a Naga, give your minions +6/+6.\r\n */\r\nimport { Race } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { addStatsToBoard, hasCorrectTribe } from '../../../utils';\r\nimport { CastSpellInput, OnTavernSpellCastCard } from '../../card.interface';\r\nimport { CardIds } from '../../../services/card-ids';\r\n\r\nconst boardBuff = 3;\r\n\r\nexport const TorrentialRuiner: OnTavernSpellCastCard = {\r\n\tcardIds: [CardIds.TorrentialRuiner_BG36_622, CardIds.TorrentialRuiner_BG36_622_G],\r\n\tonTavernSpellCast: (entity: BoardEntity, input: CastSpellInput) => {\r\n\t\tconst target = input.target;\r\n\t\tif (\r\n\t\t\tinput.source !== input.hero ||\r\n\t\t\t!target ||\r\n\t\t\t!hasCorrectTribe(target, input.hero, Race.NAGA, input.gameState.anomalies, input.gameState.allCards)\r\n\t\t) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst mult = entity.cardId === CardIds.TorrentialRuiner_BG36_622_G ? 2 : 1;\r\n\t\taddStatsToBoard(entity, input.board, input.hero, boardBuff * mult, boardBuff * mult, input.gameState);\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TuskarrRaider = void 0;
|
|
4
|
+
const utils_1 = require("../../../services/utils");
|
|
5
|
+
const cards_in_hand_1 = require("../../../simulation/cards-in-hand");
|
|
6
|
+
const grantRandomBounty = (mult, hero, board, gameState) => {
|
|
7
|
+
const cardsToAdd = [];
|
|
8
|
+
for (let i = 0; i < mult; i++) {
|
|
9
|
+
const bounty = (0, utils_1.pickRandom)(gameState.cardsData.bountyTavernSpellIds);
|
|
10
|
+
if (bounty) {
|
|
11
|
+
cardsToAdd.push(bounty);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
if (cardsToAdd.length) {
|
|
15
|
+
(0, cards_in_hand_1.addCardsInHand)(hero, board, cardsToAdd, gameState);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
exports.TuskarrRaider = {
|
|
19
|
+
cardIds: ["TB_BaconShop_HERO_18_Buddy", "TB_BaconShop_HERO_18_Buddy_G"],
|
|
20
|
+
battlecry: (minion, input) => {
|
|
21
|
+
const mult = minion.cardId === "TB_BaconShop_HERO_18_Buddy_G" ? 2 : 1;
|
|
22
|
+
grantRandomBounty(mult, input.hero, input.board, input.gameState);
|
|
23
|
+
return true;
|
|
24
|
+
},
|
|
25
|
+
deathrattleSpawn: (minion, input) => {
|
|
26
|
+
const mult = minion.cardId === "TB_BaconShop_HERO_18_Buddy_G" ? 2 : 1;
|
|
27
|
+
grantRandomBounty(mult, input.boardWithDeadEntityHero, input.boardWithDeadEntity, input.gameState);
|
|
28
|
+
return [];
|
|
29
|
+
},
|
|
30
|
+
rally: (minion, input) => {
|
|
31
|
+
const mult = minion.cardId === "TB_BaconShop_HERO_18_Buddy_G" ? 2 : 1;
|
|
32
|
+
grantRandomBounty(mult, input.attackingHero, input.attackingBoard, input.gameState);
|
|
33
|
+
return { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=tuskarr-raider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tuskarr-raider.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/tuskarr-raider.ts"],"names":[],"mappings":";;;AAGA,mDAAqD;AAErD,qEAAmE;AAMnE,MAAM,iBAAiB,GAAG,CACzB,IAAY,EACZ,IAAqB,EACrB,KAAoB,EACpB,SAAwB,EACjB,EAAE;IACT,MAAM,UAAU,GAAa,EAAE,CAAC;IAChC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;QAC9B,MAAM,MAAM,GAAG,IAAA,kBAAU,EAAC,SAAS,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;QACpE,IAAI,MAAM,EAAE;YACX,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SACxB;KACD;IACD,IAAI,UAAU,CAAC,MAAM,EAAE;QACtB,IAAA,8BAAc,EAAC,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;KACnD;AACF,CAAC,CAAC;AAEW,QAAA,aAAa,GAAqD;IAC9E,OAAO,EAAE,8DAAsG;IAC/G,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAW,EAAE;QAClE,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,mCAAuD,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1F,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QAClE,OAAO,IAAI,CAAC;IACb,CAAC;IACD,gBAAgB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAAE,EAAE;QAC3E,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,mCAAuD,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1F,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC,mBAAmB,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QACnG,OAAO,EAAE,CAAC;IACX,CAAC;IACD,KAAK,EAAE,CAAC,MAAmB,EAAE,KAAoB,EAAE,EAAE;QACpD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,mCAAuD,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1F,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QACpF,OAAO,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvD,CAAC;CACD,CAAC","sourcesContent":["import { BgsPlayerEntity } from '../../../bgs-player-entity';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { pickRandom } from '../../../services/utils';\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 { OnAttackInput } from '../../../simulation/on-attack';\r\nimport { BattlecryCard, DeathrattleSpawnCard, RallyCard } from '../../card.interface';\r\n\r\nconst grantRandomBounty = (\r\n\tmult: number,\r\n\thero: BgsPlayerEntity,\r\n\tboard: BoardEntity[],\r\n\tgameState: FullGameState,\r\n): void => {\r\n\tconst cardsToAdd: string[] = [];\r\n\tfor (let i = 0; i < mult; i++) {\r\n\t\tconst bounty = pickRandom(gameState.cardsData.bountyTavernSpellIds);\r\n\t\tif (bounty) {\r\n\t\t\tcardsToAdd.push(bounty);\r\n\t\t}\r\n\t}\r\n\tif (cardsToAdd.length) {\r\n\t\taddCardsInHand(hero, board, cardsToAdd, gameState);\r\n\t}\r\n};\r\n\r\nexport const TuskarrRaider: BattlecryCard & DeathrattleSpawnCard & RallyCard = {\r\n\tcardIds: [CardIds.TuskarrRaider_TB_BaconShop_HERO_18_Buddy, CardIds.TuskarrRaider_TB_BaconShop_HERO_18_Buddy_G],\r\n\tbattlecry: (minion: BoardEntity, input: BattlecryInput): boolean => {\r\n\t\tconst mult = minion.cardId === CardIds.TuskarrRaider_TB_BaconShop_HERO_18_Buddy_G ? 2 : 1;\r\n\t\tgrantRandomBounty(mult, input.hero, input.board, input.gameState);\r\n\t\treturn true;\r\n\t},\r\n\tdeathrattleSpawn: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.TuskarrRaider_TB_BaconShop_HERO_18_Buddy_G ? 2 : 1;\r\n\t\tgrantRandomBounty(mult, input.boardWithDeadEntityHero, input.boardWithDeadEntity, input.gameState);\r\n\t\treturn [];\r\n\t},\r\n\trally: (minion: BoardEntity, input: OnAttackInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.TuskarrRaider_TB_BaconShop_HERO_18_Buddy_G ? 2 : 1;\r\n\t\tgrantRandomBounty(mult, input.attackingHero, input.attackingBoard, input.gameState);\r\n\t\treturn { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };\r\n\t},\r\n};\r\n"]}
|
|
@@ -12,10 +12,7 @@ exports.TwilightHatchling = {
|
|
|
12
12
|
e.attackImmediately = true;
|
|
13
13
|
});
|
|
14
14
|
const indexFromRight = input.deadEntityIndexFromRight;
|
|
15
|
-
|
|
16
|
-
spawned.forEach((e) => {
|
|
17
|
-
e.hasAttacked = undefined;
|
|
18
|
-
});
|
|
15
|
+
(0, spawns_1.performEntitySpawns)(spawns, input.boardWithDeadEntity, input.boardWithDeadEntityHero, minion, indexFromRight, input.otherBoard, input.otherBoardHero, input.gameState, true);
|
|
19
16
|
return [];
|
|
20
17
|
},
|
|
21
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"twilight-hatchling.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/twilight-hatchling.ts"],"names":[],"mappings":";;;AAGA,+EAAiF;AACjF,uDAAiE;AAGpD,QAAA,iBAAiB,GAAyB;IACtD,OAAO,EAAE,0BAA0E;IACnF,gBAAgB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAA0B,EAAE;QACnG,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAyC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAE5E,MAAM,MAAM,GAAG,IAAA,4CAAuB,eAAyD,IAAI,EAAE,KAAK,CAAC,CAAC;QAC5G,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YACpB,CAAC,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAC5B,CAAC,CAAC,CAAC;QACH,MAAM,cAAc,GAAG,KAAK,CAAC,wBAAwB,CAAC;QACtD,
|
|
1
|
+
{"version":3,"file":"twilight-hatchling.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/twilight-hatchling.ts"],"names":[],"mappings":";;;AAGA,+EAAiF;AACjF,uDAAiE;AAGpD,QAAA,iBAAiB,GAAyB;IACtD,OAAO,EAAE,0BAA0E;IACnF,gBAAgB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAA0B,EAAE;QACnG,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAyC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAE5E,MAAM,MAAM,GAAG,IAAA,4CAAuB,eAAyD,IAAI,EAAE,KAAK,CAAC,CAAC;QAC5G,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YACpB,CAAC,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAC5B,CAAC,CAAC,CAAC;QACH,MAAM,cAAc,GAAG,KAAK,CAAC,wBAAwB,CAAC;QACtD,IAAA,4BAAmB,EAClB,MAAM,EACN,KAAK,CAAC,mBAAmB,EACzB,KAAK,CAAC,uBAAuB,EAC7B,MAAM,EACN,cAAc,EACd,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,EACf,IAAI,CACJ,CAAC;QAOF,OAAO,EAAE,CAAC;IACX,CAAC;CACD,CAAC","sourcesContent":["import { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { simplifiedSpawnEntities } from '../../../simulation/deathrattle-spawns';\r\nimport { performEntitySpawns } from '../../../simulation/spawns';\r\nimport { DeathrattleSpawnCard } from '../../card.interface';\r\n\r\nexport const TwilightHatchling: DeathrattleSpawnCard = {\r\n\tcardIds: [CardIds.TwilightHatchling_BG34_630, CardIds.TwilightHatchling_BG34_630_G],\r\n\tdeathrattleSpawn: (minion: BoardEntity, input: DeathrattleTriggeredInput): readonly BoardEntity[] => {\r\n\t\tconst mult = minion.cardId === CardIds.TwilightHatchling_BG34_630_G ? 2 : 1;\r\n\r\n\t\tconst spawns = simplifiedSpawnEntities(CardIds.TwilightHatchling_TwilightWhelpToken_BG34_630t, mult, input);\r\n\t\tspawns.forEach((e) => {\r\n\t\t\te.attackImmediately = true;\r\n\t\t});\r\n\t\tconst indexFromRight = input.deadEntityIndexFromRight;\r\n\t\tperformEntitySpawns(\r\n\t\t\tspawns,\r\n\t\t\tinput.boardWithDeadEntity,\r\n\t\t\tinput.boardWithDeadEntityHero,\r\n\t\t\tminion,\r\n\t\t\tindexFromRight,\r\n\t\t\tinput.otherBoard,\r\n\t\t\tinput.otherBoardHero,\r\n\t\t\tinput.gameState,\r\n\t\t\ttrue,\r\n\t\t);\r\n\t\t// Do not clear hasAttacked after attack-immediately. With after-spawn (Stalwart Kodo)\r\n\t\t// resolving before the immediate attack, clearing hasAttacked let whelps swing a second\r\n\t\t// time at full Kodo stats in the same combat segment — far above live.\r\n\t\t// Prior note (re-attack after weak pre-Kodo immediate attack):\r\n\t\t// https://replays.firestoneapp.com/?reviewId=7c838df7-992b-4dae-ad96-c0f8a0d7872a&turn=7&action=0\r\n\r\n\t\treturn [];\r\n\t},\r\n};\r\n"]}
|
|
@@ -7,7 +7,7 @@ exports.TwilightTidehunter = {
|
|
|
7
7
|
cardIds: ["BG36_703", "BG36_703_G"],
|
|
8
8
|
onTavernSpellCast: (entity, input) => {
|
|
9
9
|
var _a;
|
|
10
|
-
if (input.target !== entity) {
|
|
10
|
+
if (input.source !== input.hero || input.target !== entity) {
|
|
11
11
|
return;
|
|
12
12
|
}
|
|
13
13
|
const target = ((_a = input.hero.hand) !== null && _a !== void 0 ? _a : []).filter((e) => !!e.maxHealth && !!e.cardId)[0];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"twilight-tidehunter.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/twilight-tidehunter.ts"],"names":[],"mappings":";;;AAQA,qDAAwD;AAIxD,MAAM,QAAQ,GAAG,CAAC,CAAC;AAEN,QAAA,kBAAkB,GAA0B;IACxD,OAAO,EAAE,0BAA4E;IACrF,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;;QACjE,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"twilight-tidehunter.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/twilight-tidehunter.ts"],"names":[],"mappings":";;;AAQA,qDAAwD;AAIxD,MAAM,QAAQ,GAAG,CAAC,CAAC;AAEN,QAAA,kBAAkB,GAA0B;IACxD,OAAO,EAAE,0BAA4E;IACrF,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;;QACjE,IAAI,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM,EAAE;YAC3D,OAAO;SACP;QAED,MAAM,MAAM,GAAG,CAAC,MAAA,KAAK,CAAC,IAAI,CAAC,IAAI,mCAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACrF,IAAI,CAAC,MAAM,EAAE;YACZ,OAAO;SACP;QAED,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAA0C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7E,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;IACzG,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Twilight Tidehunter (Tier 4, 3/6)\r\n * Whenever you cast a spell on this, give the left-most minion in your hand +6/+6.\r\n *\r\n * Golden Twilight Tidehunter (Tier 4, 6/12)\r\n * Whenever you cast a spell on this, give the left-most minion in your hand +12/+12.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { CastSpellInput, OnTavernSpellCastCard } from '../../card.interface';\r\nimport { CardIds } from '../../../services/card-ids';\r\n\r\nconst handBuff = 6;\r\n\r\nexport const TwilightTidehunter: OnTavernSpellCastCard = {\r\n\tcardIds: [CardIds.TwilightTidehunter_BG36_703, CardIds.TwilightTidehunter_BG36_703_G],\r\n\tonTavernSpellCast: (entity: BoardEntity, input: CastSpellInput) => {\r\n\t\tif (input.source !== input.hero || input.target !== entity) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst target = (input.hero.hand ?? []).filter((e) => !!e.maxHealth && !!e.cardId)[0];\r\n\t\tif (!target) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst mult = entity.cardId === CardIds.TwilightTidehunter_BG36_703_G ? 2 : 1;\r\n\t\tmodifyStats(target, entity, handBuff * mult, handBuff * mult, input.board, input.hero, input.gameState);\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UnearthedUnderling = void 0;
|
|
4
|
+
const stats_1 = require("../../../simulation/stats");
|
|
5
|
+
exports.UnearthedUnderling = {
|
|
6
|
+
cardIds: ["TB_BaconShop_HERO_25_Buddy", "TB_BaconShop_HERO_25_Buddy_G"],
|
|
7
|
+
afterHeroDamaged: (minion, input) => {
|
|
8
|
+
input.hero.hpLeft = input.hero.hpLeft + input.damage;
|
|
9
|
+
const mult = minion.cardId === "TB_BaconShop_HERO_25_Buddy_G" ? 2 : 1;
|
|
10
|
+
const buff = input.damage * mult;
|
|
11
|
+
(0, stats_1.modifyStats)(minion, minion, buff, buff, input.board, input.hero, input.gameState);
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=unearthed-underling.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unearthed-underling.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/unearthed-underling.ts"],"names":[],"mappings":";;;AAGA,qDAAwD;AAG3C,QAAA,kBAAkB,GAAyB;IACvD,OAAO,EAAE,8DAAgH;IACzH,gBAAgB,EAAE,CAAC,MAAmB,EAAE,KAA4B,EAAE,EAAE;QACvE,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QACrD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,mCAA4D,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/F,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;QACjC,IAAA,mBAAW,EAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IACnF,CAAC;CACD,CAAC","sourcesContent":["import { BoardEntity } from '../../../board-entity';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { AfterHeroDamagedInput } from '../../../simulation/damage-to-hero';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { AfterHeroDamagedCard } from '../../card.interface';\r\n\r\nexport const UnearthedUnderling: AfterHeroDamagedCard = {\r\n\tcardIds: [CardIds.UnearthedUnderling_TB_BaconShop_HERO_25_Buddy, CardIds.UnearthedUnderling_TB_BaconShop_HERO_25_Buddy_G],\r\n\tafterHeroDamaged: (minion: BoardEntity, input: AfterHeroDamagedInput) => {\r\n\t\tinput.hero.hpLeft = input.hero.hpLeft + input.damage;\r\n\t\tconst mult = minion.cardId === CardIds.UnearthedUnderling_TB_BaconShop_HERO_25_Buddy_G ? 2 : 1;\r\n\t\tconst buff = input.damage * mult;\r\n\t\tmodifyStats(minion, minion, buff, buff, input.board, input.hero, input.gameState);\r\n\t},\r\n};\r\n"]}
|
|
@@ -6,7 +6,7 @@ const blood_gems_1 = require("../../../simulation/blood-gems");
|
|
|
6
6
|
exports.VigilantBristlemane = {
|
|
7
7
|
cardIds: ["BG36_510", "BG36_510_G"],
|
|
8
8
|
onTavernSpellCast: (entity, input) => {
|
|
9
|
-
if (input.target !== entity) {
|
|
9
|
+
if (input.source !== input.hero || input.target !== entity) {
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
12
|
const gems = entity.cardId === "BG36_510_G" ? 2 : 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vigilant-bristlemane.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/vigilant-bristlemane.ts"],"names":[],"mappings":";;;AAQA,uDAA2D;AAC3D,+DAAiE;AAIpD,QAAA,mBAAmB,GAA0B;IACzD,OAAO,EAAE,0BAA8E;IACvF,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QACjE,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"vigilant-bristlemane.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/vigilant-bristlemane.ts"],"names":[],"mappings":";;;AAQA,uDAA2D;AAC3D,+DAAiE;AAIpD,QAAA,mBAAmB,GAA0B;IACzD,OAAO,EAAE,0BAA8E;IACvF,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QACjE,IAAI,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM,EAAE;YAC3D,OAAO;SACP;QAED,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAA2C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9E,MAAM,UAAU,GAAG,IAAA,sBAAa,EAAC,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACtD,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;YACnC,IAAA,4BAAe,EACd,MAAM,EACN,SAAS,EACT,IAAI,EACJ,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,SAAS,EACf,KAAK,CAAC,SAAS,CACf,CAAC;SACF;IACF,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Vigilant Bristlemane (Tier 5, 3/5)\r\n * Whenever you cast a spell on this, it plays a Blood Gem on adjacent minions.\r\n *\r\n * Golden Vigilant Bristlemane (Tier 5, 6/10)\r\n * Whenever you cast a spell on this, it plays two Blood Gems on adjacent minions.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { getNeighbours } from '../../../simulation/attack';\r\nimport { playBloodGemsOn } from '../../../simulation/blood-gems';\r\nimport { CastSpellInput, OnTavernSpellCastCard } from '../../card.interface';\r\nimport { CardIds } from '../../../services/card-ids';\r\n\r\nexport const VigilantBristlemane: OnTavernSpellCastCard = {\r\n\tcardIds: [CardIds.VigilantBristlemane_BG36_510, CardIds.VigilantBristlemane_BG36_510_G],\r\n\tonTavernSpellCast: (entity: BoardEntity, input: CastSpellInput) => {\r\n\t\tif (input.source !== input.hero || input.target !== entity) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst gems = entity.cardId === CardIds.VigilantBristlemane_BG36_510_G ? 2 : 1;\r\n\t\tconst neighbours = getNeighbours(input.board, entity);\r\n\t\tfor (const neighbour of neighbours) {\r\n\t\t\tplayBloodGemsOn(\r\n\t\t\t\tentity,\r\n\t\t\t\tneighbour,\r\n\t\t\t\tgems,\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}\r\n\t},\r\n};\r\n"]}
|
|
@@ -4,7 +4,12 @@ exports.FleetingVigor = void 0;
|
|
|
4
4
|
const utils_1 = require("../../../utils");
|
|
5
5
|
exports.FleetingVigor = {
|
|
6
6
|
startOfCombat: (secret, input) => {
|
|
7
|
-
|
|
7
|
+
const atk = Number.isFinite(secret.scriptDataNum1) ? secret.scriptDataNum1 : 0;
|
|
8
|
+
const hp = Number.isFinite(secret.scriptDataNum2) ? secret.scriptDataNum2 : 0;
|
|
9
|
+
if (atk === 0 && hp === 0) {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
(0, utils_1.addStatsToBoard)(secret, input.playerBoard, input.playerEntity, atk, hp, input.gameState);
|
|
8
13
|
return true;
|
|
9
14
|
},
|
|
10
15
|
};
|