@firestone-hs/simulate-bgs-battle 1.1.725 → 1.1.726
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/cards/impl/_card-mappings.js +22 -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/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/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/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/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/torrential-ruiner.js +2 -1
- package/dist/cards/impl/minion/torrential-ruiner.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/vigilant-bristlemane.js +1 -1
- package/dist/cards/impl/minion/vigilant-bristlemane.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/package.json +1 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Charisma = void 0;
|
|
4
|
+
const reference_data_1 = require("@firestone-hs/reference-data");
|
|
5
|
+
const cards_in_hand_1 = require("../../../simulation/cards-in-hand");
|
|
6
|
+
const utils_1 = require("../../../utils");
|
|
7
|
+
exports.Charisma = {
|
|
8
|
+
cardIds: ["BG36_MidGameEffect_000t3"],
|
|
9
|
+
rally: (_enchantment, input) => {
|
|
10
|
+
var _a, _b, _c;
|
|
11
|
+
const tribeCounts = new Map();
|
|
12
|
+
for (const entity of input.attackingBoard) {
|
|
13
|
+
if (entity.health <= 0 || entity.definitelyDead)
|
|
14
|
+
continue;
|
|
15
|
+
const tribes = (0, utils_1.getEffectiveTribesForEntity)(entity, input.attackingHero, input.gameState.anomalies, input.gameState.allCards);
|
|
16
|
+
for (const tribe of tribes) {
|
|
17
|
+
if (tribe === reference_data_1.Race.ALL) {
|
|
18
|
+
for (const bgRace of reference_data_1.ALL_BG_RACES) {
|
|
19
|
+
tribeCounts.set(bgRace, ((_a = tribeCounts.get(bgRace)) !== null && _a !== void 0 ? _a : 0) + 1);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
tribeCounts.set(tribe, ((_b = tribeCounts.get(tribe)) !== null && _b !== void 0 ? _b : 0) + 1);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
let mostCommonTribe = null;
|
|
28
|
+
let maxCount = 0;
|
|
29
|
+
for (const [tribe, count] of tribeCounts) {
|
|
30
|
+
if (count > maxCount) {
|
|
31
|
+
maxCount = count;
|
|
32
|
+
mostCommonTribe = tribe;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (mostCommonTribe != null) {
|
|
36
|
+
const cardId = input.gameState.cardsData.getRandomMinionForTribe(mostCommonTribe, (_c = input.attackingHero.tavernTier) !== null && _c !== void 0 ? _c : 6);
|
|
37
|
+
if (cardId) {
|
|
38
|
+
(0, cards_in_hand_1.addCardsInHand)(input.attackingHero, input.attackingBoard, [cardId], input.gameState);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=charisma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"charisma.js","sourceRoot":"","sources":["../../../../src/cards/impl/enchantments/charisma.ts"],"names":[],"mappings":";;;AAIA,iEAAkE;AAElE,qEAAmE;AAEnE,0CAA6D;AAIhD,QAAA,QAAQ,GAAc;IAClC,OAAO,EAAE,4BAA0D;IACnE,KAAK,EAAE,CAAC,YAA8B,EAAE,KAAoB,EAAE,EAAE;;QAC/D,MAAM,WAAW,GAAG,IAAI,GAAG,EAAgB,CAAC;QAC5C,KAAK,MAAM,MAAM,IAAI,KAAK,CAAC,cAAc,EAAE;YAC1C,IAAI,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,MAAM,CAAC,cAAc;gBAAE,SAAS;YAC1D,MAAM,MAAM,GAAG,IAAA,mCAA2B,EACzC,MAAM,EACN,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,SAAS,CAAC,SAAS,EACzB,KAAK,CAAC,SAAS,CAAC,QAAQ,CACxB,CAAC;YACF,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;gBAC3B,IAAI,KAAK,KAAK,qBAAI,CAAC,GAAG,EAAE;oBACvB,KAAK,MAAM,MAAM,IAAI,6BAAY,EAAE;wBAClC,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,MAAA,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;qBAC5D;iBACD;qBAAM;oBACN,WAAW,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,MAAA,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;iBAC1D;aACD;SACD;QACD,IAAI,eAAe,GAAgB,IAAI,CAAC;QACxC,IAAI,QAAQ,GAAG,CAAC,CAAC;QACjB,KAAK,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,WAAW,EAAE;YACzC,IAAI,KAAK,GAAG,QAAQ,EAAE;gBACrB,QAAQ,GAAG,KAAK,CAAC;gBACjB,eAAe,GAAG,KAAK,CAAC;aACxB;SACD;QACD,IAAI,eAAe,IAAI,IAAI,EAAE;YAC5B,MAAM,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,uBAAuB,CAC/D,eAAe,EACf,MAAA,KAAK,CAAC,aAAa,CAAC,UAAU,mCAAI,CAAC,CACnC,CAAC;YACF,IAAI,MAAM,EAAE;gBACX,IAAA,8BAAc,EAAC,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,cAAc,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;aACrF;SACD;QACD,OAAO,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvD,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Charisma (Dark Gift)\r\n * Rally: Get a random minion of your most common type.\r\n */\r\nimport { ALL_BG_RACES, Race } from '@firestone-hs/reference-data';\r\nimport { BoardEnchantment } from '../../../board-entity';\r\nimport { addCardsInHand } from '../../../simulation/cards-in-hand';\r\nimport { OnAttackInput } from '../../../simulation/on-attack';\r\nimport { getEffectiveTribesForEntity } from '../../../utils';\r\nimport { RallyCard } from '../../card.interface';\r\nimport { CardIds } from '../../../services/card-ids';\r\n\r\nexport const Charisma: RallyCard = {\r\n\tcardIds: [CardIds.DarkGifts_CharismaToken_BG36_MidGameEffect_000t3],\r\n\trally: (_enchantment: BoardEnchantment, input: OnAttackInput) => {\r\n\t\tconst tribeCounts = new Map<Race, number>();\r\n\t\tfor (const entity of input.attackingBoard) {\r\n\t\t\tif (entity.health <= 0 || entity.definitelyDead) continue;\r\n\t\t\tconst tribes = getEffectiveTribesForEntity(\r\n\t\t\t\tentity,\r\n\t\t\t\tinput.attackingHero,\r\n\t\t\t\tinput.gameState.anomalies,\r\n\t\t\t\tinput.gameState.allCards,\r\n\t\t\t);\r\n\t\t\tfor (const tribe of tribes) {\r\n\t\t\t\tif (tribe === Race.ALL) {\r\n\t\t\t\t\tfor (const bgRace of ALL_BG_RACES) {\r\n\t\t\t\t\t\ttribeCounts.set(bgRace, (tribeCounts.get(bgRace) ?? 0) + 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttribeCounts.set(tribe, (tribeCounts.get(tribe) ?? 0) + 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tlet mostCommonTribe: Race | null = null;\r\n\t\tlet maxCount = 0;\r\n\t\tfor (const [tribe, count] of tribeCounts) {\r\n\t\t\tif (count > maxCount) {\r\n\t\t\t\tmaxCount = count;\r\n\t\t\t\tmostCommonTribe = tribe;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (mostCommonTribe != null) {\r\n\t\t\tconst cardId = input.gameState.cardsData.getRandomMinionForTribe(\r\n\t\t\t\tmostCommonTribe,\r\n\t\t\t\tinput.attackingHero.tavernTier ?? 6,\r\n\t\t\t);\r\n\t\t\tif (cardId) {\r\n\t\t\t\taddCardsInHand(input.attackingHero, input.attackingBoard, [cardId], input.gameState);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };\r\n\t},\r\n};\r\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Consanguinity = void 0;
|
|
4
|
+
const cards_in_hand_1 = require("../../../simulation/cards-in-hand");
|
|
5
|
+
exports.Consanguinity = {
|
|
6
|
+
cardIds: ["BG36_MidGameEffect_000t80"],
|
|
7
|
+
rally: (_enchantment, input) => {
|
|
8
|
+
const cardsToAdd = Array(2).fill("BG20_GEM");
|
|
9
|
+
(0, cards_in_hand_1.addCardsInHand)(input.attackingHero, input.attackingBoard, cardsToAdd, input.gameState);
|
|
10
|
+
return { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=consanguinity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consanguinity.js","sourceRoot":"","sources":["../../../../src/cards/impl/enchantments/consanguinity.ts"],"names":[],"mappings":";;;AAKA,qEAAmE;AAKtD,QAAA,aAAa,GAAc;IACvC,OAAO,EAAE,6BAAgE;IACzE,KAAK,EAAE,CAAC,YAA8B,EAAE,KAAoB,EAAE,EAAE;QAC/D,MAAM,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,YAAkB,CAAC;QACnD,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 * Consanguinity (Dark Gift)\r\n * Rally: Get 2 Blood Gems.\r\n */\r\nimport { BoardEnchantment } 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 Consanguinity: RallyCard = {\r\n\tcardIds: [CardIds.DarkGifts_ConsanguinityToken_BG36_MidGameEffect_000t80],\r\n\trally: (_enchantment: BoardEnchantment, input: OnAttackInput) => {\r\n\t\tconst cardsToAdd = Array(2).fill(CardIds.BloodGem);\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,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MysticEssence = void 0;
|
|
4
|
+
const cards_in_hand_1 = require("../../../simulation/cards-in-hand");
|
|
5
|
+
exports.MysticEssence = {
|
|
6
|
+
cardIds: ["BG36_MidGameEffect_000t5"],
|
|
7
|
+
deathrattleSpawnEnchantmentEffect: (_enchantment, _minion, input) => {
|
|
8
|
+
const spellId = input.gameState.cardsData.getRandomTavernSpell();
|
|
9
|
+
(0, cards_in_hand_1.addCardsInHand)(input.boardWithDeadEntityHero, input.boardWithDeadEntity, [spellId], input.gameState);
|
|
10
|
+
return [];
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=mystic-essence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mystic-essence.js","sourceRoot":"","sources":["../../../../src/cards/impl/enchantments/mystic-essence.ts"],"names":[],"mappings":";;;AAKA,qEAAmE;AAKtD,QAAA,aAAa,GAAoC;IAC7D,OAAO,EAAE,4BAA+D;IACxE,iCAAiC,EAAE,CAClC,YAA8B,EAC9B,OAAoB,EACpB,KAAgC,EAC/B,EAAE;QACH,MAAM,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,oBAAoB,EAAE,CAAC;QACjE,IAAA,8BAAc,EAAC,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC,mBAAmB,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QACrG,OAAO,EAAE,CAAC;IACX,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Mystic Essence (Dark Gift)\r\n * Deathrattle: Get a random Tavern spell.\r\n */\r\nimport { BoardEnchantment, BoardEntity } from '../../../board-entity';\r\nimport { addCardsInHand } from '../../../simulation/cards-in-hand';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { DeathrattleSpawnEnchantmentCard } from '../../card.interface';\r\nimport { CardIds } from '../../../services/card-ids';\r\n\r\nexport const MysticEssence: DeathrattleSpawnEnchantmentCard = {\r\n\tcardIds: [CardIds.DarkGifts_MysticEssenceToken_BG36_MidGameEffect_000t5],\r\n\tdeathrattleSpawnEnchantmentEffect: (\r\n\t\t_enchantment: BoardEnchantment,\r\n\t\t_minion: BoardEntity,\r\n\t\tinput: DeathrattleTriggeredInput,\r\n\t) => {\r\n\t\tconst spellId = input.gameState.cardsData.getRandomTavernSpell();\r\n\t\taddCardsInHand(input.boardWithDeadEntityHero, input.boardWithDeadEntity, [spellId], 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.BrambleTunneler = void 0;
|
|
4
|
+
const cards_in_hand_1 = require("../../../simulation/cards-in-hand");
|
|
5
|
+
exports.BrambleTunneler = {
|
|
6
|
+
cardIds: ["BG36_331", "BG36_331_G"],
|
|
7
|
+
rally: (minion, input) => {
|
|
8
|
+
const mult = minion.cardId === "BG36_331_G" ? 2 : 1;
|
|
9
|
+
const cardsToAdd = Array(mult).fill(null);
|
|
10
|
+
(0, cards_in_hand_1.addCardsInHand)(input.attackingHero, input.attackingBoard, cardsToAdd, input.gameState);
|
|
11
|
+
return { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=bramble-tunneler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bramble-tunneler.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/bramble-tunneler.ts"],"names":[],"mappings":";;;AAUA,qEAAmE;AAKtD,QAAA,eAAe,GAAc;IACzC,OAAO,EAAE,0BAAsE;IAC/E,KAAK,EAAE,CAAC,MAAmB,EAAE,KAAoB,EAAE,EAAE;QACpD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAuC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1E,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1C,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 * Bramble Tunneler (Tier 4, 3/6)\r\n * Rally: Get a random Choose One card.\r\n *\r\n * Golden Bramble Tunneler (Tier 4, 6/12)\r\n * Rally: Get 2 random Choose One cards.\r\n *\r\n * Choose One cards themselves are tavern-only; the combat impact is the cards-in-hand trigger.\r\n */\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 BrambleTunneler: RallyCard = {\r\n\tcardIds: [CardIds.BrambleTunneler_BG36_331, CardIds.BrambleTunneler_BG36_331_G],\r\n\trally: (minion: BoardEntity, input: OnAttackInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.BrambleTunneler_BG36_331_G ? 2 : 1;\r\n\t\tconst cardsToAdd = Array(mult).fill(null);\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,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BronzeTimewalker = void 0;
|
|
4
|
+
const utils_1 = require("../../../services/utils");
|
|
5
|
+
const cards_in_hand_1 = require("../../../simulation/cards-in-hand");
|
|
6
|
+
const chromadrake_pool_1 = require("./chromadrake-pool");
|
|
7
|
+
exports.BronzeTimewalker = {
|
|
8
|
+
cardIds: ["BG36_242", "BG36_242_G"],
|
|
9
|
+
rally: (minion, input) => {
|
|
10
|
+
const mult = minion.cardId === "BG36_242_G" ? 2 : 1;
|
|
11
|
+
const cardsToAdd = [];
|
|
12
|
+
for (let i = 0; i < mult; i++) {
|
|
13
|
+
const id = (0, utils_1.pickRandom)(chromadrake_pool_1.chromadrakeCardIds);
|
|
14
|
+
if (id) {
|
|
15
|
+
cardsToAdd.push(id);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
(0, cards_in_hand_1.addCardsInHand)(input.attackingHero, input.attackingBoard, cardsToAdd, input.gameState);
|
|
19
|
+
return { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=bronze-timewalker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bronze-timewalker.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/bronze-timewalker.ts"],"names":[],"mappings":";;;AAQA,mDAAqD;AACrD,qEAAmE;AAInE,yDAAwD;AAE3C,QAAA,gBAAgB,GAAc;IAC1C,OAAO,EAAE,0BAAwE;IACjF,KAAK,EAAE,CAAC,MAAmB,EAAE,KAAoB,EAAE,EAAE;QACpD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAwC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3E,MAAM,UAAU,GAAG,EAAE,CAAC;QACtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YAC9B,MAAM,EAAE,GAAG,IAAA,kBAAU,EAAC,qCAAkB,CAAC,CAAC;YAC1C,IAAI,EAAE,EAAE;gBACP,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;aACpB;SACD;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 * Bronze Timewalker (Tier 4, 2/9)\r\n * Rally: Get a random Chromadrake.\r\n *\r\n * Golden Bronze Timewalker (Tier 4, 4/18)\r\n * Rally: Get 2 random Chromadrakes.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { pickRandom } from '../../../services/utils';\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\nimport { chromadrakeCardIds } from './chromadrake-pool';\r\n\r\nexport const BronzeTimewalker: RallyCard = {\r\n\tcardIds: [CardIds.BronzeTimewalker_BG36_242, CardIds.BronzeTimewalker_BG36_242_G],\r\n\trally: (minion: BoardEntity, input: OnAttackInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.BronzeTimewalker_BG36_242_G ? 2 : 1;\r\n\t\tconst cardsToAdd = [];\r\n\t\tfor (let i = 0; i < mult; i++) {\r\n\t\t\tconst id = pickRandom(chromadrakeCardIds);\r\n\t\t\tif (id) {\r\n\t\t\t\tcardsToAdd.push(id);\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"]}
|
|
@@ -5,7 +5,7 @@ const stats_1 = require("../../../simulation/stats");
|
|
|
5
5
|
exports.FleeingFugitive = {
|
|
6
6
|
cardIds: ["BG36_921", "BG36_921_G"],
|
|
7
7
|
onTavernSpellCast: (entity, input) => {
|
|
8
|
-
if (input.target !== entity) {
|
|
8
|
+
if (input.source !== input.hero || input.target !== entity) {
|
|
9
9
|
return;
|
|
10
10
|
}
|
|
11
11
|
const mult = entity.cardId === "BG36_921_G" ? 2 : 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fleeing-fugitive.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/fleeing-fugitive.ts"],"names":[],"mappings":";;;AAQA,qDAAwD;AAI3C,QAAA,eAAe,GAA0B;IACrD,OAAO,EAAE,0BAAsE;IAC/E,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QACjE,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"fleeing-fugitive.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/fleeing-fugitive.ts"],"names":[],"mappings":";;;AAQA,qDAAwD;AAI3C,QAAA,eAAe,GAA0B;IACrD,OAAO,EAAE,0BAAsE;IAC/E,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,iBAAuC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1E,IAAA,mBAAW,EAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAChF,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Fleeing Fugitive (Tier 1, 3/2)\r\n * Whenever you cast a spell on this, gain +1 Health.\r\n *\r\n * Golden Fleeing Fugitive (Tier 1, 6/4)\r\n * Whenever you cast a spell on this, gain +2 Health.\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\nexport const FleeingFugitive: OnTavernSpellCastCard = {\r\n\tcardIds: [CardIds.FleeingFugitive_BG36_921, CardIds.FleeingFugitive_BG36_921_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 mult = entity.cardId === CardIds.FleeingFugitive_BG36_921_G ? 2 : 1;\r\n\t\tmodifyStats(entity, entity, 0, mult, input.board, input.hero, input.gameState);\r\n\t},\r\n};\r\n"]}
|
|
@@ -2,24 +2,19 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GatekeeperAmalgam = void 0;
|
|
4
4
|
const cast_tavern_spell_1 = require("../../../mechanics/cast-tavern-spell");
|
|
5
|
-
const utils_1 = require("../../../services/utils");
|
|
6
5
|
exports.GatekeeperAmalgam = {
|
|
7
6
|
cardIds: ["BG36_640", "BG36_640_G"],
|
|
8
7
|
onTavernSpellCast: (entity, input) => {
|
|
9
|
-
if (input.target !== entity) {
|
|
8
|
+
if (input.source !== input.hero || input.target !== entity) {
|
|
10
9
|
return;
|
|
11
10
|
}
|
|
12
11
|
const loops = entity.cardId === "BG36_640_G" ? 2 : 1;
|
|
13
12
|
for (let i = 0; i < loops; i++) {
|
|
14
|
-
const teaSetTarget = (0, utils_1.pickRandomAlive)(input.board);
|
|
15
|
-
if (!teaSetTarget) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
13
|
(0, cast_tavern_spell_1.castTavernSpell)("BG28_888", {
|
|
19
14
|
...input,
|
|
20
15
|
spellCardId: "BG28_888",
|
|
21
16
|
source: entity,
|
|
22
|
-
target:
|
|
17
|
+
target: null,
|
|
23
18
|
});
|
|
24
19
|
}
|
|
25
20
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gatekeeper-amalgam.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/gatekeeper-amalgam.ts"],"names":[],"mappings":";;;AAWA,4EAAuE;
|
|
1
|
+
{"version":3,"file":"gatekeeper-amalgam.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/gatekeeper-amalgam.ts"],"names":[],"mappings":";;;AAWA,4EAAuE;AAI1D,QAAA,iBAAiB,GAA0B;IACvD,OAAO,EAAE,0BAA0E;IACnF,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,KAAK,GAAG,MAAM,CAAC,MAAM,iBAAyC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;YAC/B,IAAA,mCAAe,cAAmC;gBACjD,GAAG,KAAK;gBACR,WAAW,YAAkC;gBAC7C,MAAM,EAAE,MAAM;gBACd,MAAM,EAAE,IAAI;aACZ,CAAC,CAAC;SACH;IACF,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Gatekeeper Amalgam (Tier 6, 6/6, all minion types)\r\n * Whenever you cast a spell on this, it casts Misplaced Tea Set.\r\n *\r\n * Golden Gatekeeper Amalgam (Tier 6, 12/12, all minion types)\r\n * Whenever you cast a spell on this, it casts Misplaced Tea Set twice.\r\n *\r\n * \"It casts\" means the Amalgam is the source, so the nested cast does not count as one of your own\r\n * spells and does not re-trigger the \"whenever you cast\" effects.\r\n */\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { castTavernSpell } from '../../../mechanics/cast-tavern-spell';\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { CastSpellInput, OnTavernSpellCastCard } from '../../card.interface';\r\n\r\nexport const GatekeeperAmalgam: OnTavernSpellCastCard = {\r\n\tcardIds: [CardIds.GatekeeperAmalgam_BG36_640, CardIds.GatekeeperAmalgam_BG36_640_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 loops = entity.cardId === CardIds.GatekeeperAmalgam_BG36_640_G ? 2 : 1;\r\n\t\tfor (let i = 0; i < loops; i++) {\r\n\t\t\tcastTavernSpell(CardIds.MisplacedTeaSet_BG28_888, {\r\n\t\t\t\t...input,\r\n\t\t\t\tspellCardId: CardIds.MisplacedTeaSet_BG28_888,\r\n\t\t\t\tsource: entity,\r\n\t\t\t\ttarget: null,\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -9,7 +9,8 @@ exports.Glambot = {
|
|
|
9
9
|
cardIds: ["BG36_853", "BG36_853_G"],
|
|
10
10
|
onTavernSpellCast: (entity, input) => {
|
|
11
11
|
const target = input.target;
|
|
12
|
-
if (
|
|
12
|
+
if (input.source !== input.hero ||
|
|
13
|
+
!target ||
|
|
13
14
|
!(0, utils_1.hasCorrectTribe)(target, input.hero, reference_data_1.Race.MECH, input.gameState.anomalies, input.gameState.allCards)) {
|
|
14
15
|
return;
|
|
15
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glambot.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/glambot.ts"],"names":[],"mappings":";;;AAOA,iEAAmE;AAEnE,6DAAkE;AAClE,0CAAiD;AAIjD,MAAM,cAAc,GAAG,CAAC,CAAC;AAEZ,QAAA,OAAO,GAA0B;IAC7C,OAAO,EAAE,0BAAsD;IAC/D,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,MAAM,GAAG,MAAM,CAAC,MAAM,iBAA+B,CAAC;QAC5D,MAAM,eAAe,GAAG,MAAM;YAC7B,CAAC;YACD,CAAC,YAA8D,CAAC;QAEjE,MAAM,SAAS,GAAkB;YAChC,GAAG,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC;YACpD,EAAE,EAAE,eAAe;YACnB,MAAM,EAAE,cAAc,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACzC,MAAM,EAAE,cAAc,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SACzC,CAAC;QACF,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;IACH,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Glambot (Tier 5, 6/6)\r\n * Whenever you cast a spell on a Mech, Magnetize a 6/6 Satellite to it.\r\n *\r\n * Golden Glambot (Tier 5, 12/12)\r\n * Whenever you cast a spell on a Mech, Magnetize a 12/12 Satellite to it.\r\n */\r\nimport { Race, ReferenceCard } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { magnetizeToTarget } from '../../../simulation/magnetize';\r\nimport { hasCorrectTribe } from '../../../utils';\r\nimport { CastSpellInput, OnTavernSpellCastCard } from '../../card.interface';\r\nimport { CardIds } from '../../../services/card-ids';\r\n\r\nconst satelliteStats = 6;\r\n\r\nexport const Glambot: OnTavernSpellCastCard = {\r\n\tcardIds: [CardIds.Glambot_BG36_853, CardIds.Glambot_BG36_853_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.MECH, 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 golden = entity.cardId === CardIds.Glambot_BG36_853_G;\r\n\t\tconst satelliteCardId = golden\r\n\t\t\t? CardIds.MoonsteelJuggernaut_MoonsteelSatelliteToken_BG31_171_Gt\r\n\t\t\t: CardIds.MoonsteelJuggernaut_MoonsteelSatelliteToken_BG31_171t;\r\n\t\t// The stats are part of the card text rather than of the token, so we set them explicitly\r\n\t\tconst satellite: ReferenceCard = {\r\n\t\t\t...input.gameState.allCards.getCard(satelliteCardId),\r\n\t\t\tid: satelliteCardId,\r\n\t\t\tattack: satelliteStats * (golden ? 2 : 1),\r\n\t\t\thealth: satelliteStats * (golden ? 2 : 1),\r\n\t\t};\r\n\t\tmagnetizeToTarget(\r\n\t\t\t[target],\r\n\t\t\tentity,\r\n\t\t\t[satellite],\r\n\t\t\tinput.board,\r\n\t\t\tinput.hero,\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},\r\n};\r\n"]}
|
|
1
|
+
{"version":3,"file":"glambot.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/glambot.ts"],"names":[],"mappings":";;;AAOA,iEAAmE;AAEnE,6DAAkE;AAClE,0CAAiD;AAIjD,MAAM,cAAc,GAAG,CAAC,CAAC;AAEZ,QAAA,OAAO,GAA0B;IAC7C,OAAO,EAAE,0BAAsD;IAC/D,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,MAAM,GAAG,MAAM,CAAC,MAAM,iBAA+B,CAAC;QAC5D,MAAM,eAAe,GAAG,MAAM;YAC7B,CAAC;YACD,CAAC,YAA8D,CAAC;QAEjE,MAAM,SAAS,GAAkB;YAChC,GAAG,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC;YACpD,EAAE,EAAE,eAAe;YACnB,MAAM,EAAE,cAAc,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACzC,MAAM,EAAE,cAAc,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SACzC,CAAC;QACF,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;IACH,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Glambot (Tier 5, 6/6)\r\n * Whenever you cast a spell on a Mech, Magnetize a 6/6 Satellite to it.\r\n *\r\n * Golden Glambot (Tier 5, 12/12)\r\n * Whenever you cast a spell on a Mech, Magnetize a 12/12 Satellite to it.\r\n */\r\nimport { Race, ReferenceCard } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { magnetizeToTarget } from '../../../simulation/magnetize';\r\nimport { hasCorrectTribe } from '../../../utils';\r\nimport { CastSpellInput, OnTavernSpellCastCard } from '../../card.interface';\r\nimport { CardIds } from '../../../services/card-ids';\r\n\r\nconst satelliteStats = 6;\r\n\r\nexport const Glambot: OnTavernSpellCastCard = {\r\n\tcardIds: [CardIds.Glambot_BG36_853, CardIds.Glambot_BG36_853_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.MECH, 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 golden = entity.cardId === CardIds.Glambot_BG36_853_G;\r\n\t\tconst satelliteCardId = golden\r\n\t\t\t? CardIds.MoonsteelJuggernaut_MoonsteelSatelliteToken_BG31_171_Gt\r\n\t\t\t: CardIds.MoonsteelJuggernaut_MoonsteelSatelliteToken_BG31_171t;\r\n\t\t// The stats are part of the card text rather than of the token, so we set them explicitly\r\n\t\tconst satellite: ReferenceCard = {\r\n\t\t\t...input.gameState.allCards.getCard(satelliteCardId),\r\n\t\t\tid: satelliteCardId,\r\n\t\t\tattack: satelliteStats * (golden ? 2 : 1),\r\n\t\t\thealth: satelliteStats * (golden ? 2 : 1),\r\n\t\t};\r\n\t\tmagnetizeToTarget(\r\n\t\t\t[target],\r\n\t\t\tentity,\r\n\t\t\t[satellite],\r\n\t\t\tinput.board,\r\n\t\t\tinput.hero,\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},\r\n};\r\n"]}
|
|
@@ -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,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"]}
|
|
@@ -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"]}
|
|
@@ -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"]}
|
|
@@ -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"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FloatingCandleSet = void 0;
|
|
4
|
+
const utils_1 = require("../../../services/utils");
|
|
5
|
+
const deathrattle_orchestration_1 = require("../../../simulation/deathrattle-orchestration");
|
|
6
|
+
const deathrattle_utils_1 = require("../../../simulation/deathrattle-utils");
|
|
7
|
+
exports.FloatingCandleSet = {
|
|
8
|
+
cardIds: ["BG36_MagicItem_208t"],
|
|
9
|
+
castTavernSpell: (_spellCardId, input) => {
|
|
10
|
+
const target = input.target && (0, deathrattle_utils_1.hasValidDeathrattle)(input.target, input.hero, input.gameState)
|
|
11
|
+
? input.target
|
|
12
|
+
: (0, utils_1.pickRandom)((0, deathrattle_utils_1.getValidDeathrattles)(input.board, input.hero, input.gameState));
|
|
13
|
+
if (!target) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
input.gameState.spectator.registerPowerTarget(input.source, target, input.board, input.hero, input.otherHero);
|
|
17
|
+
const indexFromRight = input.board.length - (input.board.indexOf(target) + 1);
|
|
18
|
+
(0, deathrattle_orchestration_1.processDeathrattleForMinion)(target, indexFromRight, [target], target.friendly ? input.gameState.gameState.player : input.gameState.gameState.opponent, target.friendly ? input.gameState.gameState.opponent : input.gameState.gameState.player, input.gameState, false);
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=floating-candle-set.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floating-candle-set.js","sourceRoot":"","sources":["../../../../src/cards/impl/spellcraft/floating-candle-set.ts"],"names":[],"mappings":";;;AAQA,mDAAqD;AACrD,6FAA4F;AAC5F,6EAAkG;AAGrF,QAAA,iBAAiB,GAAoB;IACjD,OAAO,EAAE,uBAAsE;IAC/E,eAAe,EAAE,CAAC,YAAoB,EAAE,KAAqB,EAAE,EAAE;QAChE,MAAM,MAAM,GACX,KAAK,CAAC,MAAM,IAAI,IAAA,uCAAmB,EAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;YAC7E,CAAC,CAAC,KAAK,CAAC,MAAM;YACd,CAAC,CAAC,IAAA,kBAAU,EAAC,IAAA,wCAAoB,EAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;QAC/E,IAAI,CAAC,MAAM,EAAE;YACZ,OAAO;SACP;QAED,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAC5C,KAAK,CAAC,MAAM,EACZ,MAAM,EACN,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,SAAS,CACf,CAAC;QACF,MAAM,cAAc,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9E,IAAA,uDAA2B,EAC1B,MAAM,EACN,cAAc,EACd,CAAC,MAAM,CAAC,EACR,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,QAAQ,EACvF,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,EACvF,KAAK,CAAC,SAAS,EACf,KAAK,CACL,CAAC;IACH,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Floating Candle Set (Spellcraft token)\r\n * Trigger a friendly minion's Deathrattle.\r\n *\r\n * The trinket itself only generates this token in the tavern; the token can still be cast\r\n * during combat (e.g. Profound Thinker, Lovely Locket, Magicfin Apprentice).\r\n */\r\nimport { CardIds } from '../../../services/card-ids';\r\nimport { pickRandom } from '../../../services/utils';\r\nimport { processDeathrattleForMinion } from '../../../simulation/deathrattle-orchestration';\r\nimport { getValidDeathrattles, hasValidDeathrattle } from '../../../simulation/deathrattle-utils';\r\nimport { CastSpellInput, TavernSpellCard } from '../../card.interface';\r\n\r\nexport const FloatingCandleSet: TavernSpellCard = {\r\n\tcardIds: [CardIds.FloatingCandleSet_FloatingCandleSetToken_BG36_MagicItem_208t],\r\n\tcastTavernSpell: (_spellCardId: string, input: CastSpellInput) => {\r\n\t\tconst target =\r\n\t\t\tinput.target && hasValidDeathrattle(input.target, input.hero, input.gameState)\r\n\t\t\t\t? input.target\r\n\t\t\t\t: pickRandom(getValidDeathrattles(input.board, input.hero, input.gameState));\r\n\t\tif (!target) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\tinput.source,\r\n\t\t\ttarget,\r\n\t\t\tinput.board,\r\n\t\t\tinput.hero,\r\n\t\t\tinput.otherHero,\r\n\t\t);\r\n\t\tconst indexFromRight = input.board.length - (input.board.indexOf(target) + 1);\r\n\t\tprocessDeathrattleForMinion(\r\n\t\t\ttarget,\r\n\t\t\tindexFromRight,\r\n\t\t\t[target],\r\n\t\t\ttarget.friendly ? input.gameState.gameState.player : input.gameState.gameState.opponent,\r\n\t\t\ttarget.friendly ? input.gameState.gameState.opponent : input.gameState.gameState.player,\r\n\t\t\tinput.gameState,\r\n\t\t\tfalse,\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.FlightyPortrait = void 0;
|
|
4
|
+
const stats_1 = require("../../../simulation/stats");
|
|
5
|
+
const FLIGHTY_SCOUT_IDS = new Set(["BG32_330", "BG32_330_G"]);
|
|
6
|
+
const buff = 3;
|
|
7
|
+
const isFlightyScout = (entity) => FLIGHTY_SCOUT_IDS.has(entity.cardId);
|
|
8
|
+
exports.FlightyPortrait = {
|
|
9
|
+
cardIds: ["BG36_MagicItem_820"],
|
|
10
|
+
onTavernSpellCast: (trinket, input) => {
|
|
11
|
+
var _a;
|
|
12
|
+
const scouts = [
|
|
13
|
+
...input.board.filter((e) => e.health > 0 && !e.definitelyDead && isFlightyScout(e)),
|
|
14
|
+
...((_a = input.hero.hand) !== null && _a !== void 0 ? _a : []).filter(isFlightyScout),
|
|
15
|
+
];
|
|
16
|
+
for (const scout of scouts) {
|
|
17
|
+
(0, stats_1.modifyStats)(scout, trinket, buff, buff, input.board, input.hero, input.gameState);
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=flighty-portrait.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flighty-portrait.js","sourceRoot":"","sources":["../../../../src/cards/impl/trinket/flighty-portrait.ts"],"names":[],"mappings":";;;AAQA,qDAAwD;AAIxD,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAS,0BAAgE,CAAC,CAAC;AAC5G,MAAM,IAAI,GAAG,CAAC,CAAC;AAEf,MAAM,cAAc,GAAG,CAAC,MAAmB,EAAW,EAAE,CAAC,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAEjF,QAAA,eAAe,GAA0B;IACrD,OAAO,EAAE,sBAA4C;IACrD,iBAAiB,EAAE,CAAC,OAAqB,EAAE,KAAqB,EAAE,EAAE;;QACnE,MAAM,MAAM,GAAG;YACd,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,IAAI,cAAc,CAAC,CAAC,CAAC,CAAC;YACpF,GAAG,CAAC,MAAA,KAAK,CAAC,IAAI,CAAC,IAAI,mCAAI,EAAE,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC;SACjD,CAAC;QACF,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;YAC3B,IAAA,mBAAW,EAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;SAClF;IACF,CAAC;CACD,CAAC","sourcesContent":["/**\r\n * Flighty Portrait (2 gold)\r\n * Get a Flighty Scout. Whenever you cast a Tavern spell, give Flighty Scouts in your hand and warband +3/+3.\r\n *\r\n * Only the \"whenever you cast\" half is combat-relevant; tavern spells can be cast mid-combat.\r\n */\r\nimport { BoardTrinket } from '../../../bgs-player-entity';\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 FLIGHTY_SCOUT_IDS = new Set<string>([CardIds.FlightyScout_BG32_330, CardIds.FlightyScout_BG32_330_G]);\r\nconst buff = 3;\r\n\r\nconst isFlightyScout = (entity: BoardEntity): boolean => FLIGHTY_SCOUT_IDS.has(entity.cardId);\r\n\r\nexport const FlightyPortrait: OnTavernSpellCastCard = {\r\n\tcardIds: [CardIds.FlightyPortrait_BG36_MagicItem_820],\r\n\tonTavernSpellCast: (trinket: BoardTrinket, input: CastSpellInput) => {\r\n\t\tconst scouts = [\r\n\t\t\t...input.board.filter((e) => e.health > 0 && !e.definitelyDead && isFlightyScout(e)),\r\n\t\t\t...(input.hero.hand ?? []).filter(isFlightyScout),\r\n\t\t];\r\n\t\tfor (const scout of scouts) {\r\n\t\t\tmodifyStats(scout, trinket, buff, buff, input.board, input.hero, input.gameState);\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|