@firestone-hs/simulate-bgs-battle 1.1.543 → 1.1.544
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/cards-data.js +1 -1
- package/dist/cards/cards-data.js.map +1 -1
- package/dist/cards/impl/hero-power/aim-high.js +2 -1
- package/dist/cards/impl/hero-power/aim-high.js.map +1 -1
- package/dist/cards/impl/hero-power/aim-left.js +2 -1
- package/dist/cards/impl/hero-power/aim-left.js.map +1 -1
- package/dist/cards/impl/hero-power/aim-low.js +2 -1
- package/dist/cards/impl/hero-power/aim-low.js.map +1 -1
- package/dist/cards/impl/hero-power/aim-right.js +2 -1
- package/dist/cards/impl/hero-power/aim-right.js.map +1 -1
- package/dist/cards/impl/hero-power/earth-invocation.js +2 -1
- package/dist/cards/impl/hero-power/earth-invocation.js.map +1 -1
- package/dist/cards/impl/hero-power/embrace-your-rage.js +2 -1
- package/dist/cards/impl/hero-power/embrace-your-rage.js.map +1 -1
- package/dist/cards/impl/hero-power/fire-invocation.js +2 -1
- package/dist/cards/impl/hero-power/fire-invocation.js.map +1 -1
- package/dist/cards/impl/hero-power/fragrant-phylactery.js +2 -1
- package/dist/cards/impl/hero-power/fragrant-phylactery.js.map +1 -1
- package/dist/cards/impl/hero-power/glorious-gloop.js +1 -1
- package/dist/cards/impl/hero-power/glorious-gloop.js.map +1 -1
- package/dist/cards/impl/hero-power/lightning-invocation.js +2 -1
- package/dist/cards/impl/hero-power/lightning-invocation.js.map +1 -1
- package/dist/cards/impl/hero-power/rapid-reanimation.js +2 -1
- package/dist/cards/impl/hero-power/rapid-reanimation.js.map +1 -1
- package/dist/cards/impl/hero-power/reborn-rites.js +2 -1
- package/dist/cards/impl/hero-power/reborn-rites.js.map +1 -1
- package/dist/cards/impl/hero-power/water-invocation.js +2 -1
- package/dist/cards/impl/hero-power/water-invocation.js.map +1 -1
- package/dist/cards/impl/hero-power/wax-warband.js +2 -1
- package/dist/cards/impl/hero-power/wax-warband.js.map +1 -1
- package/dist/cards/impl/minion/battlecruiser.js +1 -1
- package/dist/cards/impl/minion/battlecruiser.js.map +1 -1
- package/dist/cards/impl/minion/corrupted-myrmidon.js +1 -1
- package/dist/cards/impl/minion/corrupted-myrmidon.js.map +1 -1
- package/dist/cards/impl/minion/mutalisk.js +3 -0
- package/dist/cards/impl/minion/mutalisk.js.map +1 -1
- package/dist/cards/impl/minion/ultralisk.js +1 -1
- package/dist/cards/impl/minion/ultralisk.js.map +1 -1
- package/dist/simulation/spectator/game-action.js +8 -8
- package/dist/simulation/spectator/game-action.js.map +1 -1
- package/package.json +1 -1
package/dist/cards/cards-data.js
CHANGED
|
@@ -50,7 +50,7 @@ class CardsData {
|
|
|
50
50
|
const poolWithGolden = this.allCards
|
|
51
51
|
.getCards()
|
|
52
52
|
.filter((card) => (0, reference_data_1.isBattlegroundsCard)(card))
|
|
53
|
-
.filter((card) => card.isBaconPool)
|
|
53
|
+
.filter((card) => { var _a; return card.isBaconPool || ((_a = this.allCards.getCard(card.battlegroundsNormalDbfId)) === null || _a === void 0 ? void 0 : _a.isBaconPool); })
|
|
54
54
|
.filter((card) => !!card.techLevel)
|
|
55
55
|
.filter((card) => { var _a; return ((_a = card.type) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === reference_data_1.CardType[reference_data_1.CardType.MINION]; })
|
|
56
56
|
.filter((card) => !(0, utils_2.hasMechanic)(card, reference_data_1.GameTag[reference_data_1.GameTag.BACON_BUDDY]))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cards-data.js","sourceRoot":"","sources":["../../src/cards/cards-data.ts"],"names":[],"mappings":";;;AAAA,iEAQsC;AAEtC,6CAAgE;AAChE,oCAAoE;AACpE,qDAA6C;AAC7C,0DAAqD;AAExC,QAAA,cAAc,GAAG;;;;CAI7B,CAAC;AAEW,QAAA,kBAAkB,GAAG;IACjC,wBAAO,CAAC,KAAK;IACb,wBAAO,CAAC,aAAa;IACrB,wBAAO,CAA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AM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,IAAI,gBAAgB,CAAC,CAAC;QACjD,OAAO,MAAA,IAAA,kBAAU,EAAC,IAAI,CAAC,0CAAE,EAAE,CAAC;IAC7B,CAAC;IAEM,QAAQ,CAAC,IAAmB;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;IAEO,YAAY,CAAC,WAA4B,EAAE,SAA4B,EAAE,eAAe,GAAG,IAAI;QACtG,IAAI,CAAC,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,MAAM,CAAA,IAAI,eAAe,EAAE;YAC1C,OAAO,IAAI,CAAC;SACZ;QACD,OAAO,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAC;aACtB,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,mBAAW,EAAC,IAAI,CAAC,CAAC;aAChC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,KAAK,qBAAI,CAAC,GAAG,IAAI,CAAC,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,MAAM,CAAA,IAAI,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IACvG,CAAC;CACD;AA5PD,8BA4PC","sourcesContent":["import {\r\n\tAllCardsService,\r\n\tCardIds,\r\n\tCardType,\r\n\tGameTag,\r\n\tisBattlegroundsCard,\r\n\tRace,\r\n\tReferenceCard,\r\n} from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../board-entity';\r\nimport { groupByFunction, pickRandom } from '../services/utils';\r\nimport { getRaceEnum, hasMechanic, isCorrectTribe } from '../utils';\r\nimport { hasAvenge } from './card.interface';\r\nimport { cardMappings } from './impl/_card-mappings';\r\n\r\nexport const WHELP_CARD_IDS = [\r\n\tCardIds.RedWhelp_BGS_019,\r\n\tCardIds.RedWhelp_TB_BaconUps_102,\r\n\tCardIds.Onyxia_OnyxianWhelpToken,\r\n];\r\n\r\nexport const validBonusKeywords = [\r\n\tGameTag.TAUNT,\r\n\tGameTag.DIVINE_SHIELD,\r\n\tGameTag.VENOMOUS,\r\n\tGameTag.POISONOUS,\r\n\tGameTag.WINDFURY,\r\n\tGameTag.STEALTH,\r\n\tGameTag.REBORN,\r\n];\r\n\r\nexport const hasKeyword = (entity: BoardEntity, keyword: GameTag) => {\r\n\tswitch (keyword) {\r\n\t\tcase GameTag.TAUNT:\r\n\t\t\treturn entity.taunt;\r\n\t\tcase GameTag.DIVINE_SHIELD:\r\n\t\t\treturn entity.divineShield;\r\n\t\tcase GameTag.VENOMOUS:\r\n\t\t\treturn entity.venomous;\r\n\t\tcase GameTag.WINDFURY:\r\n\t\t\treturn entity.windfury;\r\n\t\tcase GameTag.STEALTH:\r\n\t\t\treturn entity.stealth;\r\n\t\tcase GameTag.REBORN:\r\n\t\t\treturn entity.reborn;\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t}\r\n};\r\n\r\nexport class CardsData {\r\n\tpublic ghastcoilerSpawns: readonly string[];\r\n\tpublic impMamaSpawns: readonly string[];\r\n\tpublic demonSpawns: readonly string[];\r\n\tpublic gentleDjinniSpawns: readonly string[];\r\n\tpublic kilrekSpawns: readonly string[];\r\n\tpublic battlecryMinions: readonly string[];\r\n\tpublic deathrattleMinions: readonly string[];\r\n\tpublic pirateSpawns: readonly string[];\r\n\tpublic beastSpawns: readonly string[];\r\n\tpublic scrapScraperSpawns: readonly string[];\r\n\tpublic endOfTurnMinions: readonly string[];\r\n\r\n\tpublic putricidePool1: readonly string[];\r\n\tpublic putricidePool2: readonly string[];\r\n\tpublic putridicePool2ForEternalSummoner: readonly string[];\r\n\r\n\tprivate pool: readonly ReferenceCard[];\r\n\tprivate minionsForTier: { [key: string]: readonly ReferenceCard[] };\r\n\r\n\tconstructor(private readonly allCards: AllCardsService, init = true) {\r\n\t\tif (init) {\r\n\t\t\tthis.inititialize();\r\n\t\t}\r\n\t}\r\n\r\n\tpublic inititialize(validTribes?: readonly Race[], anomalies?: readonly string[]): void {\r\n\t\tconst poolWithGolden = this.allCards\r\n\t\t\t.getCards()\r\n\t\t\t.filter((card) => isBattlegroundsCard(card))\r\n\t\t\t.filter((card) => card.isBaconPool)\r\n\t\t\t.filter((card) => !!card.techLevel)\r\n\t\t\t.filter((card) => card.type?.toUpperCase() === CardType[CardType.MINION])\r\n\t\t\t.filter((card) => !hasMechanic(card, GameTag[GameTag.BACON_BUDDY]))\r\n\t\t\t.filter((card) => card.set !== 'Vanilla')\r\n\t\t\t.filter((card) =>\r\n\t\t\t\tanomalies?.includes(CardIds.BigLeague_BG27_Anomaly_100)\r\n\t\t\t\t\t? card.techLevel >= 3\r\n\t\t\t\t\t: anomalies?.includes(CardIds.LittleLeague_BG27_Anomaly_800)\r\n\t\t\t\t\t? card.techLevel <= 4\r\n\t\t\t\t\t: true,\r\n\t\t\t);\r\n\t\tthis.pool = poolWithGolden\r\n\t\t\t.filter((card) => this.isValidTribe(validTribes, card.races))\r\n\t\t\t.filter((card) =>\r\n\t\t\t\tanomalies?.includes(CardIds.TheGoldenArena_BG27_Anomaly_801)\r\n\t\t\t\t\t? this.isGolden(card)\r\n\t\t\t\t\t: !this.isGolden(card),\r\n\t\t\t);\r\n\t\tthis.minionsForTier = groupByFunction((card: ReferenceCard) => card.techLevel)(this.pool);\r\n\t\tthis.ghastcoilerSpawns = this.pool\r\n\t\t\t.filter((card) => card.id !== 'BGS_008')\r\n\t\t\t.filter((card) => hasMechanic(card, 'DEATHRATTLE'))\r\n\t\t\t.filter((card) => this.isValidTribe(validTribes, card.races))\r\n\t\t\t.map((card) => card.id);\r\n\t\tthis.demonSpawns = this.pool.filter((card) => isCorrectTribe(card.races, Race.DEMON)).map((card) => card.id);\r\n\t\tthis.impMamaSpawns = this.demonSpawns.filter((cardId) => cardId !== CardIds.ImpMama_BGS_044);\r\n\t\tthis.gentleDjinniSpawns = this.pool\r\n\t\t\t.filter((card) => isCorrectTribe(card.races, Race.ELEMENTAL))\r\n\t\t\t.filter((card) => card.id !== CardIds.GentleDjinni_BGS_121)\r\n\t\t\t.map((card) => card.id);\r\n\t\t// FIXME: just spawn a random undead instead of an Undead Creation\r\n\t\t// this.festergutSpawns = pool\r\n\t\t// \t.filter((card) => !this.isGolden(card))\r\n\t\t// \t.filter((card) => isCorrectTribe(card.races, Race.UNDEAD))\r\n\t\t// \t.filter((card) => card.id !== CardIds.Festergut_BG25_HERO_100_Buddy)\r\n\t\t// \t// .filter((card) => REMOVED_CARD_IDS.indexOf(card.id) === -1)\r\n\t\t// \t.map((card) => card.id);\r\n\t\tthis.kilrekSpawns = this.pool\r\n\t\t\t.filter((card) => isCorrectTribe(card.races, Race.DEMON))\r\n\t\t\t.filter((card) => card.id !== CardIds.Kilrek_TB_BaconShop_HERO_37_Buddy)\r\n\t\t\t.map((card) => card.id);\r\n\t\tthis.battlecryMinions = this.pool.filter((card) => hasMechanic(card, 'BATTLECRY')).map((card) => card.id);\r\n\t\tthis.deathrattleMinions = this.pool\r\n\t\t\t.filter((card) => hasMechanic(card, GameTag[GameTag.DEATHRATTLE]))\r\n\t\t\t.map((card) => card.id);\r\n\t\tthis.pirateSpawns = this.pool.filter((card) => isCorrectTribe(card.races, Race.PIRATE)).map((card) => card.id);\r\n\t\tthis.beastSpawns = this.pool.filter((card) => isCorrectTribe(card.races, Race.BEAST)).map((card) => card.id);\r\n\t\tthis.scrapScraperSpawns = this.pool\r\n\t\t\t.filter((card) => hasMechanic(card, GameTag[GameTag.MAGNETIC]))\r\n\t\t\t.map((card) => card.id);\r\n\t\tthis.endOfTurnMinions = this.pool\r\n\t\t\t.filter((card) => hasMechanic(card, GameTag[GameTag.END_OF_TURN]))\r\n\t\t\t.map((card) => card.id);\r\n\r\n\t\tthis.putricidePool1 = this.allCards\r\n\t\t\t.getCards()\r\n\t\t\t.filter((card) => card.battlegroundsPutridicePool1)\r\n\t\t\t.map((card) => card.id);\r\n\t\tthis.putricidePool2 = this.allCards\r\n\t\t\t.getCards()\r\n\t\t\t.filter((card) => card.battlegroundsPutridicePool2)\r\n\t\t\t.map((card) => card.id);\r\n\t\tthis.putridicePool2ForEternalSummoner = this.allCards\r\n\t\t\t.getCards()\r\n\t\t\t.filter((card) => card.battlegroundsPutridicePool2)\r\n\t\t\t.filter((card) => !card.battlegroundsPutridiceSummonerExclusion)\r\n\t\t\t.map((card) => card.id);\r\n\t}\r\n\r\n\tpublic avengeValue(cardId: string): number {\r\n\t\tconst avengeImpl = cardMappings[cardId];\r\n\t\tif (hasAvenge(avengeImpl)) {\r\n\t\t\treturn avengeImpl.baseAvengeValue(cardId);\r\n\t\t}\r\n\t\tswitch (cardId) {\r\n\t\t\tcase CardIds.HungeringAbomination_BG25_014:\r\n\t\t\tcase CardIds.HungeringAbomination_BG25_014_G:\r\n\t\t\t// Not technically an avenge, but behaves as if\r\n\t\t\t// case CardIds.ShadowyConstruct_BG25_HERO_103_Buddy:\r\n\t\t\t// case CardIds.ShadowyConstruct_BG25_HERO_103_Buddy_G:\r\n\t\t\tcase CardIds.IceSickle:\r\n\t\t\t\treturn 1;\r\n\t\t\tcase CardIds.GhoulOfTheFeast_BG25_002:\r\n\t\t\tcase CardIds.GhoulOfTheFeast_BG25_002_G:\r\n\t\t\tcase CardIds.MechanoTank_BG21_023:\r\n\t\t\tcase CardIds.MechanoTank_BG21_023_G:\r\n\t\t\tcase CardIds.PalescaleCrocolisk_BG21_001:\r\n\t\t\tcase CardIds.PalescaleCrocolisk_BG21_001_G:\r\n\t\t\tcase CardIds.StormpikeLieutenant_BG22_HERO_003_Buddy:\r\n\t\t\tcase CardIds.StormpikeLieutenant_BG22_HERO_003_Buddy_G:\r\n\t\t\tcase CardIds.VanndarStormpike_LeadTheStormpikes:\r\n\t\t\tcase CardIds.Drekthar_LeadTheFrostwolves:\r\n\t\t\tcase CardIds.Bristlebach_BG26_157:\r\n\t\t\tcase CardIds.Bristlebach_BG26_157_G:\r\n\t\t\t\treturn 2;\r\n\t\t\tcase CardIds.BuddingGreenthumb_BG21_030:\r\n\t\t\tcase CardIds.BuddingGreenthumb_BG21_030_G:\r\n\t\t\t// case CardIds.FrostwolfLieutenant:\r\n\t\t\t// case CardIds.FrostwolfLieutenantBattlegrounds:\r\n\t\t\tcase CardIds.PashmarTheVengeful_BG23_014:\r\n\t\t\tcase CardIds.PashmarTheVengeful_BG23_014_G:\r\n\t\t\tcase CardIds.WitchwingNestmatron_BG21_038:\r\n\t\t\tcase CardIds.WitchwingNestmatron_BG21_038_G:\r\n\t\t\tcase CardIds.BoomSquad_BG27_Reward_502:\r\n\t\t\tcase CardIds.TremblingTrolley_BG28_967:\r\n\t\t\tcase CardIds.TremblingTrolley_BG28_967_G:\r\n\t\t\tcase CardIds.FridgeMagnet_BG30_MagicItem_545:\r\n\t\t\t\treturn 3;\r\n\t\t\tcase CardIds.GilneanThornedRose_BG30_MagicItem_864:\r\n\t\t\tcase CardIds.Onyxia_Broodmother:\r\n\t\t\tcase CardIds.ImpatientDoomsayer_BG21_007:\r\n\t\t\tcase CardIds.ImpatientDoomsayer_BG21_007_G:\r\n\t\t\tcase CardIds.Sisefin_BG21_009:\r\n\t\t\tcase CardIds.Sisefin_BG21_009_G:\r\n\t\t\tcase CardIds.TonyTwoTusk_BG21_031:\r\n\t\t\tcase CardIds.TonyTwoTusk_BG21_031_G:\r\n\t\t\t// case CardIds.ScrapScraper_BG26_148:\r\n\t\t\t// case CardIds.ScrapScraper_BG26_148_G:\r\n\t\t\tcase CardIds.RelentlessSentry_BG25_003:\r\n\t\t\tcase CardIds.RelentlessSentry_BG25_003_G:\r\n\t\t\tcase CardIds.PhaerixWrathOfTheSun_BG28_403:\r\n\t\t\tcase CardIds.PhaerixWrathOfTheSun_BG28_403_G:\r\n\t\t\tcase CardIds.TumblingDisaster_BG28_Reward_505:\r\n\t\t\tcase CardIds.CycleOfEnergy_BG28_Reward_504:\r\n\t\t\tcase CardIds.AugmentedLaborer_BG28_740:\r\n\t\t\tcase CardIds.AugmentedLaborer_BG28_740_G:\r\n\t\t\tcase CardIds.MurglMkIi_BG29_991:\r\n\t\t\tcase CardIds.MurglMkIi_BG29_991_G:\r\n\t\t\tcase CardIds.QuilligraphySet_QuilligraphySetToken_BG30_MagicItem_410t2:\r\n\t\t\tcase CardIds.QuilligraphySet_BG30_MagicItem_410:\r\n\t\t\t\treturn 4;\r\n\t\t\tcase CardIds.RelentlessMurghoul_BG27_010:\r\n\t\t\tcase CardIds.RelentlessMurghoul_BG27_010_G:\r\n\t\t\tcase CardIds.StaffOfTheScourge_BG30_MagicItem_437:\r\n\t\t\t\treturn 5;\r\n\t\t\tcase CardIds.BleedingHeart_BG30_MagicItem_713:\r\n\t\t\tcase CardIds.StableAmalgamation_BG28_Reward_518:\r\n\t\t\t\treturn 7;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}\r\n\r\n\tpublic defaultScriptDataNum(cardId: string): number {\r\n\t\tswitch (cardId) {\r\n\t\t\tcase CardIds.TumblingDisaster_BG28_Reward_505:\r\n\t\t\tcase CardIds.TwinSkyLanterns_BG30_MagicItem_822:\r\n\t\t\tcase CardIds.TwinSkyLanterns_TwinSkyLanternsToken_BG30_MagicItem_822t2:\r\n\t\t\tcase CardIds.BoomController_BG30_MagicItem_440:\r\n\t\t\tcase CardIds.AllianceKeychain_BG30_MagicItem_433:\r\n\t\t\tcase CardIds.AllianceKeychain_AllianceKeychainToken_BG30_MagicItem_433t:\r\n\t\t\tcase CardIds.DeathlyPhylactery_BG30_MagicItem_700:\r\n\t\t\tcase CardIds.PromoPortrait_BG30_MagicItem_918:\r\n\t\t\t\treturn 1;\r\n\t\t\tcase CardIds.JarOGems_BG30_MagicItem_546:\r\n\t\t\tcase CardIds.BloodGolemSticker_BG30_MagicItem_442:\r\n\t\t\t\treturn 2;\r\n\t\t\tcase CardIds.MechagonAdapter_BG30_MagicItem_910:\r\n\t\t\t\treturn 3;\r\n\t\t\tcase CardIds.ReinforcedShield_BG30_MagicItem_886:\r\n\t\t\t\treturn 4;\r\n\t\t\tdefault:\r\n\t\t\t\treturn 0;\r\n\t\t}\r\n\t}\r\n\r\n\tpublic getTavernLevel(cardId: string): number {\r\n\t\treturn this.allCards.getCard(cardId).techLevel ?? 1;\r\n\t}\r\n\r\n\tpublic getRandomMinionForTavernTier(tavernTier: number): string {\r\n\t\t// Tzvern tier can be undefined for hero-power specific tokens, like the Amalgam, or when\r\n\t\t// for some reason tokens end up in the shop. For now, defaulting to 1 for tavern\r\n\t\t// level seems to work in all cases\r\n\t\tconst minionsForTier = this.minionsForTier[tavernTier ?? 1];\r\n\t\tif (!minionsForTier?.length) {\r\n\t\t\tconsole.error('incorrect minions for tier', tavernTier);\r\n\t\t}\r\n\t\treturn pickRandom(this.minionsForTier[tavernTier ?? 1])?.id;\r\n\t}\r\n\r\n\tpublic getRandomMechToMagnetize(tavernLimitUpper: number): string {\r\n\t\tconst magneticMechs = this.pool\r\n\t\t\t.filter((m) => m.type?.toUpperCase() === CardType[CardType.MINION])\r\n\t\t\t.filter((m) => hasMechanic(m, GameTag[GameTag.MODULAR]));\r\n\t\tconst pool = magneticMechs.filter((m) => m.techLevel <= tavernLimitUpper);\r\n\t\treturn pickRandom(pool)?.id;\r\n\t}\r\n\r\n\tpublic getRandomMinionForTribe(\r\n\t\ttribe: Race,\r\n\t\ttavernLimitUpper: number,\r\n\t\texcludedCards: readonly string[] = [],\r\n\t): string {\r\n\t\tconst pool = this.pool\r\n\t\t\t.filter((m) => this.isValidTribe([tribe], m.races, false))\r\n\t\t\t.filter((m) => m.type?.toUpperCase() === CardType[CardType.MINION])\r\n\t\t\t.filter((m) => m.techLevel <= tavernLimitUpper)\r\n\t\t\t.filter((m) => !excludedCards.includes(m.id));\r\n\t\treturn pickRandom(pool)?.id;\r\n\t}\r\n\r\n\tpublic getRandomProtossMinion(tavernLimitUpper: number): string {\r\n\t\tconst pool = this.pool\r\n\t\t\t.filter((m) => m.mechanics?.includes(GameTag[GameTag.PROTOSS]))\r\n\t\t\t.filter((m) => m.type?.toUpperCase() === CardType[CardType.MINION])\r\n\t\t\t.filter((m) => m.techLevel <= tavernLimitUpper);\r\n\t\treturn pickRandom(pool)?.id;\r\n\t}\r\n\r\n\tpublic isGolden(card: ReferenceCard): boolean {\r\n\t\treturn card.premium;\r\n\t}\r\n\r\n\tprivate isValidTribe(validTribes: readonly Race[], cardRaces: readonly string[], allowEmptyRaces = true): boolean {\r\n\t\tif (!cardRaces?.length && allowEmptyRaces) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn (cardRaces ?? [])\r\n\t\t\t.map((race) => getRaceEnum(race))\r\n\t\t\t.some((raceEnum) => raceEnum === Race.ALL || !validTribes?.length || validTribes.includes(raceEnum));\r\n\t}\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"cards-data.js","sourceRoot":"","sources":["../../src/cards/cards-data.ts"],"names":[],"mappings":";;;AAAA,iEAQsC;AAEtC,6CAAgE;AAChE,oCAAoE;AACpE,qDAA6C;AAC7C,0DAAqD;AAExC,QAAA,cAAc,GAAG;;;;CAI7B,CAAC;AAEW,QAAA,kBAAkB,GAAG;IACjC,wBAAO,CAAC,KAAK;IACb,wBAAO,CAAC,aAAa;IACrB,wBAAO,CAAC,QAAQ;IAChB,wBAAO,CAAC,SAAS;IACjB,wBAAO,CAAC,QAAQ;IAChB,wBAAO,CAAC,OAAO;IACf,wBAAO,CAAC,MAAM;CACd,CAAC;AAEK,MAAM,UAAU,GAAG,CAAC,MAAmB,EAAE,OAAgB,EAAE,EAAE;IACnE,QAAQ,OAAO,EAAE;QAChB,KAAK,wBAAO,CAAC,KAAK;YACjB,OAAO,MAAM,CAAC,KAAK,CAAC;QACrB,KAAK,wBAAO,CAAC,aAAa;YACzB,OAAO,MAAM,CAAC,YAAY,CAAC;QAC5B,KAAK,wBAAO,CAAC,QAAQ;YACpB,OAAO,MAAM,CAAC,QAAQ,CAAC;QACxB,KAAK,wBAAO,CAAC,QAAQ;YACpB,OAAO,MAAM,CAAC,QAAQ,CAAC;QACxB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IAAI,eAAe,EAAE;YAC1C,OAAO,IAAI,CAAC;SACZ;QACD,OAAO,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAC;aACtB,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,mBAAW,EAAC,IAAI,CAAC,CAAC;aAChC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,KAAK,qBAAI,CAAC,GAAG,IAAI,CAAC,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,MAAM,CAAA,IAAI,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IACvG,CAAC;CACD;AA7PD,8BA6PC","sourcesContent":["import {\r\n\tAllCardsService,\r\n\tCardIds,\r\n\tCardType,\r\n\tGameTag,\r\n\tisBattlegroundsCard,\r\n\tRace,\r\n\tReferenceCard,\r\n} from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../board-entity';\r\nimport { groupByFunction, pickRandom } from '../services/utils';\r\nimport { getRaceEnum, hasMechanic, isCorrectTribe } from '../utils';\r\nimport { hasAvenge } from './card.interface';\r\nimport { cardMappings } from './impl/_card-mappings';\r\n\r\nexport const WHELP_CARD_IDS = [\r\n\tCardIds.RedWhelp_BGS_019,\r\n\tCardIds.RedWhelp_TB_BaconUps_102,\r\n\tCardIds.Onyxia_OnyxianWhelpToken,\r\n];\r\n\r\nexport const validBonusKeywords = [\r\n\tGameTag.TAUNT,\r\n\tGameTag.DIVINE_SHIELD,\r\n\tGameTag.VENOMOUS,\r\n\tGameTag.POISONOUS,\r\n\tGameTag.WINDFURY,\r\n\tGameTag.STEALTH,\r\n\tGameTag.REBORN,\r\n];\r\n\r\nexport const hasKeyword = (entity: BoardEntity, keyword: GameTag) => {\r\n\tswitch (keyword) {\r\n\t\tcase GameTag.TAUNT:\r\n\t\t\treturn entity.taunt;\r\n\t\tcase GameTag.DIVINE_SHIELD:\r\n\t\t\treturn entity.divineShield;\r\n\t\tcase GameTag.VENOMOUS:\r\n\t\t\treturn entity.venomous;\r\n\t\tcase GameTag.WINDFURY:\r\n\t\t\treturn entity.windfury;\r\n\t\tcase GameTag.STEALTH:\r\n\t\t\treturn entity.stealth;\r\n\t\tcase GameTag.REBORN:\r\n\t\t\treturn entity.reborn;\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t}\r\n};\r\n\r\nexport class CardsData {\r\n\tpublic ghastcoilerSpawns: readonly string[];\r\n\tpublic impMamaSpawns: readonly string[];\r\n\tpublic demonSpawns: readonly string[];\r\n\tpublic gentleDjinniSpawns: readonly string[];\r\n\tpublic kilrekSpawns: readonly string[];\r\n\tpublic battlecryMinions: readonly string[];\r\n\tpublic deathrattleMinions: readonly string[];\r\n\tpublic pirateSpawns: readonly string[];\r\n\tpublic beastSpawns: readonly string[];\r\n\tpublic scrapScraperSpawns: readonly string[];\r\n\tpublic endOfTurnMinions: readonly string[];\r\n\r\n\tpublic putricidePool1: readonly string[];\r\n\tpublic putricidePool2: readonly string[];\r\n\tpublic putridicePool2ForEternalSummoner: readonly string[];\r\n\r\n\tprivate pool: readonly ReferenceCard[];\r\n\tprivate minionsForTier: { [key: string]: readonly ReferenceCard[] };\r\n\r\n\tconstructor(private readonly allCards: AllCardsService, init = true) {\r\n\t\tif (init) {\r\n\t\t\tthis.inititialize();\r\n\t\t}\r\n\t}\r\n\r\n\tpublic inititialize(validTribes?: readonly Race[], anomalies?: readonly string[]): void {\r\n\t\tconst poolWithGolden = this.allCards\r\n\t\t\t.getCards()\r\n\t\t\t.filter((card) => isBattlegroundsCard(card))\r\n\t\t\t// Premiums are not in bacon pool\r\n\t\t\t.filter((card) => card.isBaconPool || this.allCards.getCard(card.battlegroundsNormalDbfId)?.isBaconPool)\r\n\t\t\t.filter((card) => !!card.techLevel)\r\n\t\t\t.filter((card) => card.type?.toUpperCase() === CardType[CardType.MINION])\r\n\t\t\t.filter((card) => !hasMechanic(card, GameTag[GameTag.BACON_BUDDY]))\r\n\t\t\t.filter((card) => card.set !== 'Vanilla')\r\n\t\t\t.filter((card) =>\r\n\t\t\t\tanomalies?.includes(CardIds.BigLeague_BG27_Anomaly_100)\r\n\t\t\t\t\t? card.techLevel >= 3\r\n\t\t\t\t\t: anomalies?.includes(CardIds.LittleLeague_BG27_Anomaly_800)\r\n\t\t\t\t\t? card.techLevel <= 4\r\n\t\t\t\t\t: true,\r\n\t\t\t);\r\n\t\tthis.pool = poolWithGolden\r\n\t\t\t.filter((card) => this.isValidTribe(validTribes, card.races))\r\n\t\t\t.filter((card) =>\r\n\t\t\t\tanomalies?.includes(CardIds.TheGoldenArena_BG27_Anomaly_801)\r\n\t\t\t\t\t? this.isGolden(card)\r\n\t\t\t\t\t: !this.isGolden(card),\r\n\t\t\t);\r\n\t\tthis.minionsForTier = groupByFunction((card: ReferenceCard) => card.techLevel)(this.pool);\r\n\t\tthis.ghastcoilerSpawns = this.pool\r\n\t\t\t.filter((card) => card.id !== 'BGS_008')\r\n\t\t\t.filter((card) => hasMechanic(card, 'DEATHRATTLE'))\r\n\t\t\t.filter((card) => this.isValidTribe(validTribes, card.races))\r\n\t\t\t.map((card) => card.id);\r\n\t\tthis.demonSpawns = this.pool.filter((card) => isCorrectTribe(card.races, Race.DEMON)).map((card) => card.id);\r\n\t\tthis.impMamaSpawns = this.demonSpawns.filter((cardId) => cardId !== CardIds.ImpMama_BGS_044);\r\n\t\tthis.gentleDjinniSpawns = this.pool\r\n\t\t\t.filter((card) => isCorrectTribe(card.races, Race.ELEMENTAL))\r\n\t\t\t.filter((card) => card.id !== CardIds.GentleDjinni_BGS_121)\r\n\t\t\t.map((card) => card.id);\r\n\t\t// FIXME: just spawn a random undead instead of an Undead Creation\r\n\t\t// this.festergutSpawns = pool\r\n\t\t// \t.filter((card) => !this.isGolden(card))\r\n\t\t// \t.filter((card) => isCorrectTribe(card.races, Race.UNDEAD))\r\n\t\t// \t.filter((card) => card.id !== CardIds.Festergut_BG25_HERO_100_Buddy)\r\n\t\t// \t// .filter((card) => REMOVED_CARD_IDS.indexOf(card.id) === -1)\r\n\t\t// \t.map((card) => card.id);\r\n\t\tthis.kilrekSpawns = this.pool\r\n\t\t\t.filter((card) => isCorrectTribe(card.races, Race.DEMON))\r\n\t\t\t.filter((card) => card.id !== CardIds.Kilrek_TB_BaconShop_HERO_37_Buddy)\r\n\t\t\t.map((card) => card.id);\r\n\t\tthis.battlecryMinions = this.pool.filter((card) => hasMechanic(card, 'BATTLECRY')).map((card) => card.id);\r\n\t\tthis.deathrattleMinions = this.pool\r\n\t\t\t.filter((card) => hasMechanic(card, GameTag[GameTag.DEATHRATTLE]))\r\n\t\t\t.map((card) => card.id);\r\n\t\tthis.pirateSpawns = this.pool.filter((card) => isCorrectTribe(card.races, Race.PIRATE)).map((card) => card.id);\r\n\t\tthis.beastSpawns = this.pool.filter((card) => isCorrectTribe(card.races, Race.BEAST)).map((card) => card.id);\r\n\t\tthis.scrapScraperSpawns = this.pool\r\n\t\t\t.filter((card) => hasMechanic(card, GameTag[GameTag.MAGNETIC]))\r\n\t\t\t.map((card) => card.id);\r\n\t\tthis.endOfTurnMinions = this.pool\r\n\t\t\t.filter((card) => hasMechanic(card, GameTag[GameTag.END_OF_TURN]))\r\n\t\t\t.map((card) => card.id);\r\n\r\n\t\tthis.putricidePool1 = this.allCards\r\n\t\t\t.getCards()\r\n\t\t\t.filter((card) => card.battlegroundsPutridicePool1)\r\n\t\t\t.map((card) => card.id);\r\n\t\tthis.putricidePool2 = this.allCards\r\n\t\t\t.getCards()\r\n\t\t\t.filter((card) => card.battlegroundsPutridicePool2)\r\n\t\t\t.map((card) => card.id);\r\n\t\tthis.putridicePool2ForEternalSummoner = this.allCards\r\n\t\t\t.getCards()\r\n\t\t\t.filter((card) => card.battlegroundsPutridicePool2)\r\n\t\t\t.filter((card) => !card.battlegroundsPutridiceSummonerExclusion)\r\n\t\t\t.map((card) => card.id);\r\n\t}\r\n\r\n\tpublic avengeValue(cardId: string): number {\r\n\t\tconst avengeImpl = cardMappings[cardId];\r\n\t\tif (hasAvenge(avengeImpl)) {\r\n\t\t\treturn avengeImpl.baseAvengeValue(cardId);\r\n\t\t}\r\n\t\tswitch (cardId) {\r\n\t\t\tcase CardIds.HungeringAbomination_BG25_014:\r\n\t\t\tcase CardIds.HungeringAbomination_BG25_014_G:\r\n\t\t\t// Not technically an avenge, but behaves as if\r\n\t\t\t// case CardIds.ShadowyConstruct_BG25_HERO_103_Buddy:\r\n\t\t\t// case CardIds.ShadowyConstruct_BG25_HERO_103_Buddy_G:\r\n\t\t\tcase CardIds.IceSickle:\r\n\t\t\t\treturn 1;\r\n\t\t\tcase CardIds.GhoulOfTheFeast_BG25_002:\r\n\t\t\tcase CardIds.GhoulOfTheFeast_BG25_002_G:\r\n\t\t\tcase CardIds.MechanoTank_BG21_023:\r\n\t\t\tcase CardIds.MechanoTank_BG21_023_G:\r\n\t\t\tcase CardIds.PalescaleCrocolisk_BG21_001:\r\n\t\t\tcase CardIds.PalescaleCrocolisk_BG21_001_G:\r\n\t\t\tcase CardIds.StormpikeLieutenant_BG22_HERO_003_Buddy:\r\n\t\t\tcase CardIds.StormpikeLieutenant_BG22_HERO_003_Buddy_G:\r\n\t\t\tcase CardIds.VanndarStormpike_LeadTheStormpikes:\r\n\t\t\tcase CardIds.Drekthar_LeadTheFrostwolves:\r\n\t\t\tcase CardIds.Bristlebach_BG26_157:\r\n\t\t\tcase CardIds.Bristlebach_BG26_157_G:\r\n\t\t\t\treturn 2;\r\n\t\t\tcase CardIds.BuddingGreenthumb_BG21_030:\r\n\t\t\tcase CardIds.BuddingGreenthumb_BG21_030_G:\r\n\t\t\t// case CardIds.FrostwolfLieutenant:\r\n\t\t\t// case CardIds.FrostwolfLieutenantBattlegrounds:\r\n\t\t\tcase CardIds.PashmarTheVengeful_BG23_014:\r\n\t\t\tcase CardIds.PashmarTheVengeful_BG23_014_G:\r\n\t\t\tcase CardIds.WitchwingNestmatron_BG21_038:\r\n\t\t\tcase CardIds.WitchwingNestmatron_BG21_038_G:\r\n\t\t\tcase CardIds.BoomSquad_BG27_Reward_502:\r\n\t\t\tcase CardIds.TremblingTrolley_BG28_967:\r\n\t\t\tcase CardIds.TremblingTrolley_BG28_967_G:\r\n\t\t\tcase CardIds.FridgeMagnet_BG30_MagicItem_545:\r\n\t\t\t\treturn 3;\r\n\t\t\tcase CardIds.GilneanThornedRose_BG30_MagicItem_864:\r\n\t\t\tcase CardIds.Onyxia_Broodmother:\r\n\t\t\tcase CardIds.ImpatientDoomsayer_BG21_007:\r\n\t\t\tcase CardIds.ImpatientDoomsayer_BG21_007_G:\r\n\t\t\tcase CardIds.Sisefin_BG21_009:\r\n\t\t\tcase CardIds.Sisefin_BG21_009_G:\r\n\t\t\tcase CardIds.TonyTwoTusk_BG21_031:\r\n\t\t\tcase CardIds.TonyTwoTusk_BG21_031_G:\r\n\t\t\t// case CardIds.ScrapScraper_BG26_148:\r\n\t\t\t// case CardIds.ScrapScraper_BG26_148_G:\r\n\t\t\tcase CardIds.RelentlessSentry_BG25_003:\r\n\t\t\tcase CardIds.RelentlessSentry_BG25_003_G:\r\n\t\t\tcase CardIds.PhaerixWrathOfTheSun_BG28_403:\r\n\t\t\tcase CardIds.PhaerixWrathOfTheSun_BG28_403_G:\r\n\t\t\tcase CardIds.TumblingDisaster_BG28_Reward_505:\r\n\t\t\tcase CardIds.CycleOfEnergy_BG28_Reward_504:\r\n\t\t\tcase CardIds.AugmentedLaborer_BG28_740:\r\n\t\t\tcase CardIds.AugmentedLaborer_BG28_740_G:\r\n\t\t\tcase CardIds.MurglMkIi_BG29_991:\r\n\t\t\tcase CardIds.MurglMkIi_BG29_991_G:\r\n\t\t\tcase CardIds.QuilligraphySet_QuilligraphySetToken_BG30_MagicItem_410t2:\r\n\t\t\tcase CardIds.QuilligraphySet_BG30_MagicItem_410:\r\n\t\t\t\treturn 4;\r\n\t\t\tcase CardIds.RelentlessMurghoul_BG27_010:\r\n\t\t\tcase CardIds.RelentlessMurghoul_BG27_010_G:\r\n\t\t\tcase CardIds.StaffOfTheScourge_BG30_MagicItem_437:\r\n\t\t\t\treturn 5;\r\n\t\t\tcase CardIds.BleedingHeart_BG30_MagicItem_713:\r\n\t\t\tcase CardIds.StableAmalgamation_BG28_Reward_518:\r\n\t\t\t\treturn 7;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}\r\n\r\n\tpublic defaultScriptDataNum(cardId: string): number {\r\n\t\tswitch (cardId) {\r\n\t\t\tcase CardIds.TumblingDisaster_BG28_Reward_505:\r\n\t\t\tcase CardIds.TwinSkyLanterns_BG30_MagicItem_822:\r\n\t\t\tcase CardIds.TwinSkyLanterns_TwinSkyLanternsToken_BG30_MagicItem_822t2:\r\n\t\t\tcase CardIds.BoomController_BG30_MagicItem_440:\r\n\t\t\tcase CardIds.AllianceKeychain_BG30_MagicItem_433:\r\n\t\t\tcase CardIds.AllianceKeychain_AllianceKeychainToken_BG30_MagicItem_433t:\r\n\t\t\tcase CardIds.DeathlyPhylactery_BG30_MagicItem_700:\r\n\t\t\tcase CardIds.PromoPortrait_BG30_MagicItem_918:\r\n\t\t\t\treturn 1;\r\n\t\t\tcase CardIds.JarOGems_BG30_MagicItem_546:\r\n\t\t\tcase CardIds.BloodGolemSticker_BG30_MagicItem_442:\r\n\t\t\t\treturn 2;\r\n\t\t\tcase CardIds.MechagonAdapter_BG30_MagicItem_910:\r\n\t\t\t\treturn 3;\r\n\t\t\tcase CardIds.ReinforcedShield_BG30_MagicItem_886:\r\n\t\t\t\treturn 4;\r\n\t\t\tdefault:\r\n\t\t\t\treturn 0;\r\n\t\t}\r\n\t}\r\n\r\n\tpublic getTavernLevel(cardId: string): number {\r\n\t\treturn this.allCards.getCard(cardId).techLevel ?? 1;\r\n\t}\r\n\r\n\tpublic getRandomMinionForTavernTier(tavernTier: number): string {\r\n\t\t// Tzvern tier can be undefined for hero-power specific tokens, like the Amalgam, or when\r\n\t\t// for some reason tokens end up in the shop. For now, defaulting to 1 for tavern\r\n\t\t// level seems to work in all cases\r\n\t\tconst minionsForTier = this.minionsForTier[tavernTier ?? 1];\r\n\t\tif (!minionsForTier?.length) {\r\n\t\t\tconsole.error('incorrect minions for tier', tavernTier);\r\n\t\t}\r\n\t\treturn pickRandom(this.minionsForTier[tavernTier ?? 1])?.id;\r\n\t}\r\n\r\n\tpublic getRandomMechToMagnetize(tavernLimitUpper: number): string {\r\n\t\tconst magneticMechs = this.pool\r\n\t\t\t.filter((m) => m.type?.toUpperCase() === CardType[CardType.MINION])\r\n\t\t\t.filter((m) => hasMechanic(m, GameTag[GameTag.MODULAR]));\r\n\t\tconst pool = magneticMechs.filter((m) => m.techLevel <= tavernLimitUpper);\r\n\t\treturn pickRandom(pool)?.id;\r\n\t}\r\n\r\n\tpublic getRandomMinionForTribe(\r\n\t\ttribe: Race,\r\n\t\ttavernLimitUpper: number,\r\n\t\texcludedCards: readonly string[] = [],\r\n\t): string {\r\n\t\tconst pool = this.pool\r\n\t\t\t.filter((m) => this.isValidTribe([tribe], m.races, false))\r\n\t\t\t.filter((m) => m.type?.toUpperCase() === CardType[CardType.MINION])\r\n\t\t\t.filter((m) => m.techLevel <= tavernLimitUpper)\r\n\t\t\t.filter((m) => !excludedCards.includes(m.id));\r\n\t\treturn pickRandom(pool)?.id;\r\n\t}\r\n\r\n\tpublic getRandomProtossMinion(tavernLimitUpper: number): string {\r\n\t\tconst pool = this.pool\r\n\t\t\t.filter((m) => m.mechanics?.includes(GameTag[GameTag.PROTOSS]))\r\n\t\t\t.filter((m) => m.type?.toUpperCase() === CardType[CardType.MINION])\r\n\t\t\t.filter((m) => m.techLevel <= tavernLimitUpper);\r\n\t\treturn pickRandom(pool)?.id;\r\n\t}\r\n\r\n\tpublic isGolden(card: ReferenceCard): boolean {\r\n\t\treturn card.premium;\r\n\t}\r\n\r\n\tprivate isValidTribe(validTribes: readonly Race[], cardRaces: readonly string[], allowEmptyRaces = true): boolean {\r\n\t\tif (!cardRaces?.length && allowEmptyRaces) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn (cardRaces ?? [])\r\n\t\t\t.map((race) => getRaceEnum(race))\r\n\t\t\t.some((raceEnum) => raceEnum === Race.ALL || !validTribes?.length || validTribes.includes(raceEnum));\r\n\t}\r\n}\r\n"]}
|
|
@@ -5,10 +5,11 @@ const utils_1 = require("../../../services/utils");
|
|
|
5
5
|
const attack_1 = require("../../../simulation/attack");
|
|
6
6
|
exports.AimHigh = {
|
|
7
7
|
startOfCombatTiming: 'start-of-combat',
|
|
8
|
+
cardIds: ["BG22_HERO_000p_t3"],
|
|
8
9
|
startOfCombat: (trinket, input) => {
|
|
9
10
|
var _a;
|
|
10
11
|
for (const heroPower of input.playerEntity.heroPowers) {
|
|
11
|
-
if (heroPower.used) {
|
|
12
|
+
if (exports.AimHigh.cardIds.includes(heroPower.cardId) && heroPower.used) {
|
|
12
13
|
const highestHealthMinion = [...input.opponentBoard].sort((a, b) => b.health - a.health)[0];
|
|
13
14
|
const target = (0, utils_1.pickRandom)(input.opponentBoard.filter((e) => e.health === highestHealthMinion.health));
|
|
14
15
|
const damageDone = (0, attack_1.dealDamageToMinion)(target, input.opponentBoard, input.opponentEntity, null, (_a = heroPower.info2) !== null && _a !== void 0 ? _a : 0, input.playerBoard, input.playerEntity, input.gameState);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aim-high.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/aim-high.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"aim-high.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/aim-high.ts"],"names":[],"mappings":";;;AAEA,mDAAqD;AACrD,uDAAgE;AAInD,QAAA,OAAO,GAAsB;IACzC,mBAAmB,EAAE,iBAAiB;IACtC,OAAO,EAAE,qBAAsB;IAC/B,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;;QACzD,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE;YACtD,IAAI,eAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,IAAI,EAAE;gBACjE,MAAM,mBAAmB,GAAG,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC5F,MAAM,MAAM,GAAG,IAAA,kBAAU,EAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC;gBACtG,MAAM,UAAU,GAAG,IAAA,2BAAkB,EACpC,MAAM,EACN,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,IAAI,EACJ,MAAA,SAAS,CAAC,KAAK,mCAAI,CAAC,EACpB,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,SAAS,CACf,CAAC;gBAEF,KAAK,CAAC,YAAY,CAAC,iBAAiB,GAAG,UAAU,CAAC;gBAClD,OAAO,IAAI,CAAC;aACZ;SACD;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { pickRandom } from '../../../services/utils';\r\nimport { dealDamageToMinion } from '../../../simulation/attack';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const AimHigh: StartOfCombatCard = {\r\n\tstartOfCombatTiming: 'start-of-combat',\r\n\tcardIds: [CardIds.AimHighToken],\r\n\tstartOfCombat: (trinket: BoardTrinket, input: SoCInput) => {\r\n\t\tfor (const heroPower of input.playerEntity.heroPowers) {\r\n\t\t\tif (AimHigh.cardIds.includes(heroPower.cardId) && heroPower.used) {\r\n\t\t\t\tconst highestHealthMinion = [...input.opponentBoard].sort((a, b) => b.health - a.health)[0];\r\n\t\t\t\tconst target = pickRandom(input.opponentBoard.filter((e) => e.health === highestHealthMinion.health));\r\n\t\t\t\tconst damageDone = dealDamageToMinion(\r\n\t\t\t\t\ttarget,\r\n\t\t\t\t\tinput.opponentBoard,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\theroPower.info2 ?? 0,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t);\r\n\t\t\t\t// processMinionDeath(playerBoard, playerEntity, opponentBoard, opponentEntity, allCards, cardsData, sharedState, spectator);\r\n\t\t\t\tinput.playerEntity.deadEyeDamageDone = damageDone;\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -4,10 +4,11 @@ exports.AimLeft = void 0;
|
|
|
4
4
|
const attack_1 = require("../../../simulation/attack");
|
|
5
5
|
exports.AimLeft = {
|
|
6
6
|
startOfCombatTiming: 'start-of-combat',
|
|
7
|
+
cardIds: ["BG22_HERO_000p_t1"],
|
|
7
8
|
startOfCombat: (trinket, input) => {
|
|
8
9
|
var _a;
|
|
9
10
|
for (const heroPower of input.playerEntity.heroPowers) {
|
|
10
|
-
if (heroPower.used) {
|
|
11
|
+
if (exports.AimLeft.cardIds.includes(heroPower.cardId) && heroPower.used) {
|
|
11
12
|
const target = input.opponentBoard[0];
|
|
12
13
|
const damageDone = (0, attack_1.dealDamageToMinion)(target, input.opponentBoard, input.opponentEntity, null, (_a = heroPower.info2) !== null && _a !== void 0 ? _a : 0, input.playerBoard, input.playerEntity, input.gameState);
|
|
13
14
|
input.playerEntity.deadEyeDamageDone = damageDone;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aim-left.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/aim-left.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"aim-left.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/aim-left.ts"],"names":[],"mappings":";;;AAEA,uDAAgE;AAInD,QAAA,OAAO,GAAsB;IACzC,mBAAmB,EAAE,iBAAiB;IACtC,OAAO,EAAE,qBAAsB;IAC/B,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;;QACzD,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE;YACtD,IAAI,eAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,IAAI,EAAE;gBACjE,MAAM,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;gBACtC,MAAM,UAAU,GAAG,IAAA,2BAAkB,EACpC,MAAM,EACN,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,IAAI,EACJ,MAAA,SAAS,CAAC,KAAK,mCAAI,CAAC,EACpB,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,SAAS,CACf,CAAC;gBACF,KAAK,CAAC,YAAY,CAAC,iBAAiB,GAAG,UAAU,CAAC;gBAClD,OAAO,IAAI,CAAC;aACZ;SACD;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { dealDamageToMinion } from '../../../simulation/attack';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const AimLeft: StartOfCombatCard = {\r\n\tstartOfCombatTiming: 'start-of-combat',\r\n\tcardIds: [CardIds.AimLeftToken],\r\n\tstartOfCombat: (trinket: BoardTrinket, input: SoCInput) => {\r\n\t\tfor (const heroPower of input.playerEntity.heroPowers) {\r\n\t\t\tif (AimLeft.cardIds.includes(heroPower.cardId) && heroPower.used) {\r\n\t\t\t\tconst target = input.opponentBoard[0];\r\n\t\t\t\tconst damageDone = dealDamageToMinion(\r\n\t\t\t\t\ttarget,\r\n\t\t\t\t\tinput.opponentBoard,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\theroPower.info2 ?? 0,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t);\r\n\t\t\t\tinput.playerEntity.deadEyeDamageDone = damageDone;\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -5,10 +5,11 @@ const utils_1 = require("../../../services/utils");
|
|
|
5
5
|
const attack_1 = require("../../../simulation/attack");
|
|
6
6
|
exports.AimLow = {
|
|
7
7
|
startOfCombatTiming: 'start-of-combat',
|
|
8
|
+
cardIds: ["BG22_HERO_000p_t2"],
|
|
8
9
|
startOfCombat: (trinket, input) => {
|
|
9
10
|
var _a;
|
|
10
11
|
for (const heroPower of input.playerEntity.heroPowers) {
|
|
11
|
-
if (heroPower.used) {
|
|
12
|
+
if (exports.AimLow.cardIds.includes(heroPower.cardId) && heroPower.used) {
|
|
12
13
|
const smallestHealthMinion = [...input.opponentBoard].sort((a, b) => a.health - b.health)[0];
|
|
13
14
|
const target = (0, utils_1.pickRandom)(input.opponentBoard.filter((e) => e.health === smallestHealthMinion.health));
|
|
14
15
|
const damageDone = (0, attack_1.dealDamageToMinion)(target, input.opponentBoard, input.opponentEntity, null, (_a = heroPower.info2) !== null && _a !== void 0 ? _a : 0, input.playerBoard, input.playerEntity, input.gameState);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aim-low.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/aim-low.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"aim-low.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/aim-low.ts"],"names":[],"mappings":";;;AAEA,mDAAqD;AACrD,uDAAgE;AAInD,QAAA,MAAM,GAAsB;IACxC,mBAAmB,EAAE,iBAAiB;IACtC,OAAO,EAAE,qBAAqB;IAC9B,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;;QACzD,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE;YACtD,IAAI,cAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,IAAI,EAAE;gBAChE,MAAM,oBAAoB,GAAG,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC7F,MAAM,MAAM,GAAG,IAAA,kBAAU,EAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC;gBACvG,MAAM,UAAU,GAAG,IAAA,2BAAkB,EACpC,MAAM,EACN,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,IAAI,EACJ,MAAA,SAAS,CAAC,KAAK,mCAAI,CAAC,EACpB,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,SAAS,CACf,CAAC;gBAEF,KAAK,CAAC,YAAY,CAAC,iBAAiB,GAAG,UAAU,CAAC;gBAClD,OAAO,IAAI,CAAC;aACZ;SACD;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { pickRandom } from '../../../services/utils';\r\nimport { dealDamageToMinion } from '../../../simulation/attack';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const AimLow: StartOfCombatCard = {\r\n\tstartOfCombatTiming: 'start-of-combat',\r\n\tcardIds: [CardIds.AimLowToken],\r\n\tstartOfCombat: (trinket: BoardTrinket, input: SoCInput) => {\r\n\t\tfor (const heroPower of input.playerEntity.heroPowers) {\r\n\t\t\tif (AimLow.cardIds.includes(heroPower.cardId) && heroPower.used) {\r\n\t\t\t\tconst smallestHealthMinion = [...input.opponentBoard].sort((a, b) => a.health - b.health)[0];\r\n\t\t\t\tconst target = pickRandom(input.opponentBoard.filter((e) => e.health === smallestHealthMinion.health));\r\n\t\t\t\tconst damageDone = dealDamageToMinion(\r\n\t\t\t\t\ttarget,\r\n\t\t\t\t\tinput.opponentBoard,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\theroPower.info2 ?? 0,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t);\r\n\t\t\t\t// processMinionDeath(playerBoard, playerEntity, opponentBoard, opponentEntity, allCards, cardsData, sharedState, spectator);\r\n\t\t\t\tinput.playerEntity.deadEyeDamageDone = damageDone;\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -4,10 +4,11 @@ exports.AimRight = void 0;
|
|
|
4
4
|
const attack_1 = require("../../../simulation/attack");
|
|
5
5
|
exports.AimRight = {
|
|
6
6
|
startOfCombatTiming: 'start-of-combat',
|
|
7
|
+
cardIds: ["BG22_HERO_000p_t4"],
|
|
7
8
|
startOfCombat: (trinket, input) => {
|
|
8
9
|
var _a;
|
|
9
10
|
for (const heroPower of input.playerEntity.heroPowers) {
|
|
10
|
-
if (heroPower.used) {
|
|
11
|
+
if (exports.AimRight.cardIds.includes(heroPower.cardId) && heroPower.used) {
|
|
11
12
|
const target = input.opponentBoard[input.opponentBoard.length - 1];
|
|
12
13
|
const damageDone = (0, attack_1.dealDamageToMinion)(target, input.opponentBoard, input.opponentEntity, null, (_a = heroPower.info2) !== null && _a !== void 0 ? _a : 0, input.playerBoard, input.playerEntity, input.gameState);
|
|
13
14
|
input.playerEntity.deadEyeDamageDone = damageDone;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aim-right.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/aim-right.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"aim-right.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/aim-right.ts"],"names":[],"mappings":";;;AAEA,uDAAgE;AAInD,QAAA,QAAQ,GAAsB;IAC1C,mBAAmB,EAAE,iBAAiB;IACtC,OAAO,EAAE,qBAAuB;IAChC,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;;QACzD,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE;YACtD,IAAI,gBAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,IAAI,EAAE;gBAClE,MAAM,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;gBACnE,MAAM,UAAU,GAAG,IAAA,2BAAkB,EACpC,MAAM,EACN,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,IAAI,EACJ,MAAA,SAAS,CAAC,KAAK,mCAAI,CAAC,EACpB,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,SAAS,CACf,CAAC;gBACF,KAAK,CAAC,YAAY,CAAC,iBAAiB,GAAG,UAAU,CAAC;gBAClD,OAAO,IAAI,CAAC;aACZ;SACD;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { dealDamageToMinion } from '../../../simulation/attack';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const AimRight: StartOfCombatCard = {\r\n\tstartOfCombatTiming: 'start-of-combat',\r\n\tcardIds: [CardIds.AimRightToken],\r\n\tstartOfCombat: (trinket: BoardTrinket, input: SoCInput) => {\r\n\t\tfor (const heroPower of input.playerEntity.heroPowers) {\r\n\t\t\tif (AimRight.cardIds.includes(heroPower.cardId) && heroPower.used) {\r\n\t\t\t\tconst target = input.opponentBoard[input.opponentBoard.length - 1];\r\n\t\t\t\tconst damageDone = dealDamageToMinion(\r\n\t\t\t\t\ttarget,\r\n\t\t\t\t\tinput.opponentBoard,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\theroPower.info2 ?? 0,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t);\r\n\t\t\t\tinput.playerEntity.deadEyeDamageDone = damageDone;\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -4,9 +4,10 @@ exports.EarthInvocation = void 0;
|
|
|
4
4
|
const deathrattle_effects_1 = require("../../../simulation/deathrattle-effects");
|
|
5
5
|
exports.EarthInvocation = {
|
|
6
6
|
startOfCombatTiming: 'pre-combat',
|
|
7
|
+
cardIds: ["BG22_HERO_001p_t1", "BG22_HERO_001p_t1_s"],
|
|
7
8
|
startOfCombat: (trinket, input) => {
|
|
8
9
|
for (const heroPower of input.playerEntity.heroPowers) {
|
|
9
|
-
if (heroPower.used) {
|
|
10
|
+
if (exports.EarthInvocation.cardIds.includes(heroPower.cardId) && heroPower.used) {
|
|
10
11
|
(0, deathrattle_effects_1.applyEarthInvocationEnchantment)(input.playerBoard, null, input.playerEntity, input.gameState);
|
|
11
12
|
return true;
|
|
12
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"earth-invocation.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/earth-invocation.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"earth-invocation.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/earth-invocation.ts"],"names":[],"mappings":";;;AAEA,iFAA0F;AAI7E,QAAA,eAAe,GAAsB;IACjD,mBAAmB,EAAE,YAAY;IACjC,OAAO,EAAE,4CAAuD;IAChE,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;QACzD,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE;YACtD,IAAI,uBAAe,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,IAAI,EAAE;gBACzE,IAAA,qDAA+B,EAAC,KAAK,CAAC,WAAW,EAAE,IAAI,EAAE,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;gBAC9F,OAAO,IAAI,CAAC;aACZ;SACD;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { applyEarthInvocationEnchantment } from '../../../simulation/deathrattle-effects';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const EarthInvocation: StartOfCombatCard = {\r\n\tstartOfCombatTiming: 'pre-combat',\r\n\tcardIds: [CardIds.EarthInvocationToken, CardIds.EarthInvocation],\r\n\tstartOfCombat: (trinket: BoardTrinket, input: SoCInput) => {\r\n\t\tfor (const heroPower of input.playerEntity.heroPowers) {\r\n\t\t\tif (EarthInvocation.cardIds.includes(heroPower.cardId) && heroPower.used) {\r\n\t\t\t\tapplyEarthInvocationEnchantment(input.playerBoard, null, input.playerEntity, input.gameState);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -6,9 +6,10 @@ const deathrattle_spawns_1 = require("../../../simulation/deathrattle-spawns");
|
|
|
6
6
|
const spawns_1 = require("../../../simulation/spawns");
|
|
7
7
|
exports.EmbraceYourRage = {
|
|
8
8
|
startOfCombatTiming: 'pre-combat',
|
|
9
|
+
cardIds: ["TB_BaconShop_HP_103"],
|
|
9
10
|
startOfCombat: (trinket, input) => {
|
|
10
11
|
for (const heroPower of input.playerEntity.heroPowers) {
|
|
11
|
-
if (heroPower.used) {
|
|
12
|
+
if (exports.EmbraceYourRage.cardIds.includes(heroPower.cardId) && heroPower.used) {
|
|
12
13
|
const createdCardId = heroPower.info;
|
|
13
14
|
if (!(createdCardId === null || createdCardId === void 0 ? void 0 : createdCardId.length)) {
|
|
14
15
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embrace-your-rage.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/embrace-your-rage.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"embrace-your-rage.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/embrace-your-rage.ts"],"names":[],"mappings":";;;AAEA,qEAAmE;AACnE,+EAAuE;AACvE,uDAAiE;AAIpD,QAAA,eAAe,GAAsB;IACjD,mBAAmB,EAAE,YAAY;IACjC,OAAO,EAAE,uBAAyB;IAClC,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;QACzD,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE;YACtD,IAAI,uBAAe,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,SAAS,CAA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AmB,CAC5C,KAAK,CAAC,YAAY,EAClB,MAAM,CAAC,CAAC,CAAC,EACT,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,cAAc,CACpB,CAAC;oBACF,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,8BAA8B,EAAE,IAAI,EAAE,CAAC;iBACpE;aACD;SACD;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { addCardsInHand } from '../../../simulation/cards-in-hand';\r\nimport { spawnEntities } from '../../../simulation/deathrattle-spawns';\r\nimport { performEntitySpawns } from '../../../simulation/spawns';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const EmbraceYourRage: StartOfCombatCard = {\r\n\tstartOfCombatTiming: 'pre-combat',\r\n\tcardIds: [CardIds.EmbraceYourRage],\r\n\tstartOfCombat: (trinket: BoardTrinket, input: SoCInput) => {\r\n\t\tfor (const heroPower of input.playerEntity.heroPowers) {\r\n\t\t\tif (EmbraceYourRage.cardIds.includes(heroPower.cardId) && heroPower.used) {\r\n\t\t\t\tconst createdCardId = heroPower.info as string;\r\n\t\t\t\tif (!createdCardId?.length) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst spawns = spawnEntities(\r\n\t\t\t\t\tcreatedCardId,\r\n\t\t\t\t\t1,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.opponentBoard,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\tinput.gameState.allCards,\r\n\t\t\t\t\tinput.gameState.cardsData,\r\n\t\t\t\t\tinput.gameState.sharedState,\r\n\t\t\t\t\tinput.gameState.spectator,\r\n\t\t\t\t\tinput.playerEntity.friendly,\r\n\t\t\t\t\tfalse,\r\n\t\t\t\t\tfalse,\r\n\t\t\t\t\tfalse,\r\n\t\t\t\t);\r\n\t\t\t\tconst indexFromRight = 0;\r\n\t\t\t\tconst spawned = performEntitySpawns(\r\n\t\t\t\t\tspawns,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tindexFromRight,\r\n\t\t\t\t\tinput.opponentBoard,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t);\r\n\t\t\t\tif (spawned?.length) {\r\n\t\t\t\t\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\t\tspawns[0],\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.opponentEntity,\r\n\t\t\t\t\t);\r\n\t\t\t\t\taddCardsInHand(input.playerEntity, input.playerBoard, spawns, input.gameState);\r\n\t\t\t\t\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\t\tspawns[0],\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.opponentEntity,\r\n\t\t\t\t\t);\r\n\t\t\t\t\treturn { hasTriggered: true, shouldRecomputeCurrentAttacker: true };\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -4,9 +4,10 @@ exports.FireInvocation = void 0;
|
|
|
4
4
|
const deathrattle_effects_1 = require("../../../simulation/deathrattle-effects");
|
|
5
5
|
exports.FireInvocation = {
|
|
6
6
|
startOfCombatTiming: 'pre-combat',
|
|
7
|
+
cardIds: ["BG22_HERO_001p_t2", "BG22_HERO_001p_t2_s"],
|
|
7
8
|
startOfCombat: (trinket, input) => {
|
|
8
9
|
for (const heroPower of input.playerEntity.heroPowers) {
|
|
9
|
-
if (heroPower.used) {
|
|
10
|
+
if (exports.FireInvocation.cardIds.includes(heroPower.cardId) && heroPower.used) {
|
|
10
11
|
(0, deathrattle_effects_1.applyFireInvocationEnchantment)(input.playerBoard, input.playerEntity, null, input.playerEntity, input.gameState);
|
|
11
12
|
return true;
|
|
12
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fire-invocation.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/fire-invocation.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"fire-invocation.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/fire-invocation.ts"],"names":[],"mappings":";;;AAEA,iFAAyF;AAI5E,QAAA,cAAc,GAAsB;IAChD,mBAAmB,EAAE,YAAY;IACjC,OAAO,EAAE,4CAAqD;IAC9D,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;QACzD,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE;YACtD,IAAI,sBAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,IAAI,EAAE;gBACxE,IAAA,oDAA8B,EAC7B,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,IAAI,EACJ,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,SAAS,CACf,CAAC;gBACF,OAAO,IAAI,CAAC;aACZ;SACD;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { applyFireInvocationEnchantment } from '../../../simulation/deathrattle-effects';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const FireInvocation: StartOfCombatCard = {\r\n\tstartOfCombatTiming: 'pre-combat',\r\n\tcardIds: [CardIds.FireInvocationToken, CardIds.FireInvocation],\r\n\tstartOfCombat: (trinket: BoardTrinket, input: SoCInput) => {\r\n\t\tfor (const heroPower of input.playerEntity.heroPowers) {\r\n\t\t\tif (FireInvocation.cardIds.includes(heroPower.cardId) && heroPower.used) {\r\n\t\t\t\tapplyFireInvocationEnchantment(\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -5,9 +5,10 @@ const utils_1 = require("../../../services/utils");
|
|
|
5
5
|
const stats_1 = require("../../../simulation/stats");
|
|
6
6
|
exports.FragrantPhylactery = {
|
|
7
7
|
startOfCombatTiming: 'pre-combat',
|
|
8
|
+
cardIds: ["BG20_HERO_282p"],
|
|
8
9
|
startOfCombat: (trinket, input) => {
|
|
9
10
|
for (const heroPower of input.playerEntity.heroPowers) {
|
|
10
|
-
if (heroPower.used) {
|
|
11
|
+
if (exports.FragrantPhylactery.cardIds.includes(heroPower.cardId) && heroPower.used) {
|
|
11
12
|
const chosenEntity = (0, utils_1.pickRandomLowestHealth)(input.playerBoard);
|
|
12
13
|
if (!chosenEntity) {
|
|
13
14
|
console.warn('could not pick any entity for tamsin');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fragrant-phylactery.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/fragrant-phylactery.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"fragrant-phylactery.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/fragrant-phylactery.ts"],"names":[],"mappings":";;;AAEA,mDAAiE;AAEjE,qDAAwD;AAG3C,QAAA,kBAAkB,GAAsB;IACpD,mBAAmB,EAAE,YAAY;IACjC,OAAO,EAAE,kBA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,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { pickRandomLowestHealth } from '../../../services/utils';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const FragrantPhylactery: StartOfCombatCard = {\r\n\tstartOfCombatTiming: 'pre-combat',\r\n\tcardIds: [CardIds.TamsinRoame_FragrantPhylactery],\r\n\tstartOfCombat: (trinket: BoardTrinket, input: SoCInput) => {\r\n\t\tfor (const heroPower of input.playerEntity.heroPowers) {\r\n\t\t\tif (FragrantPhylactery.cardIds.includes(heroPower.cardId) && heroPower.used) {\r\n\t\t\t\tconst chosenEntity = pickRandomLowestHealth(input.playerBoard);\r\n\t\t\t\tif (!chosenEntity) {\r\n\t\t\t\t\tconsole.warn('could not pick any entity for tamsin');\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tchosenEntity,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t);\r\n\t\t\t\tconst newBoard = input.playerBoard.filter((e) => e.entityId !== chosenEntity.entityId);\r\n\t\t\t\t// How to mark the minion as dead\r\n\t\t\t\tchosenEntity.definitelyDead = true;\r\n\t\t\t\tnewBoard.forEach((e) => {\r\n\t\t\t\t\tmodifyStats(\r\n\t\t\t\t\t\te,\r\n\t\t\t\t\t\tchosenEntity.attack,\r\n\t\t\t\t\t\tchosenEntity.health,\r\n\t\t\t\t\t\tnewBoard,\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\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\t\t\t\tchosenEntity,\r\n\t\t\t\t\t\te,\r\n\t\t\t\t\t\tnewBoard,\r\n\t\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\t);\r\n\t\t\t\t});\r\n\t\t\t\t// Tamsin's hero power somehow happens before the current attacker is chosen.\r\n\t\t\t\t// See http://replays.firestoneapp.com/?reviewId=bce94e6b-c807-48e4-9c72-2c5c04421213&turn=6&action=9\r\n\t\t\t\t// Even worse: if a scallywag token pops, it attacks before the first attacker is recomputed\r\n\t\t\t\treturn { hasTriggered: true, shouldRecomputeCurrentAttacker: true };\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -9,7 +9,7 @@ exports.GloriousGloop = {
|
|
|
9
9
|
startOfCombat: (trinket, input) => {
|
|
10
10
|
var _a, _b;
|
|
11
11
|
for (const heroPower of input.playerEntity.heroPowers) {
|
|
12
|
-
if (heroPower.used) {
|
|
12
|
+
if (exports.GloriousGloop.cardIds.includes(heroPower.cardId) && heroPower.used) {
|
|
13
13
|
if (!((_a = input.playerBoard) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
14
14
|
return false;
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glorious-gloop.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/glorious-gloop.ts"],"names":[],"mappings":";;;AAGA,mDAAqD;AAErD,0CAA8E;AAGjE,QAAA,aAAa,GAAsB;IAC/C,OAAO,EAAE,mBAAyD;IAClE,mBAAmB,EAAE,YAAY;IACjC,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;;QACzD,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE;YACtD,IAAI,SAAS,CAAC,IAAI,EAAE;
|
|
1
|
+
{"version":3,"file":"glorious-gloop.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/glorious-gloop.ts"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UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,MAAM,CAC5C,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,KAAK,WAAW,CACrF,CAAC;gBACF,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;oBACvB,OAAO,KAAK,CAAC;iBACb;gBACD,MAAM,iBAAiB,GAAG,IAAA,kBAAU,EAAC,UAAU,CAAC,CAAC;gBACjD,MAAM,KAAK,GAAgB,IAAA,2BAAmB,EAC7C;oBACC,GAAG,iBAAiB;oBACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,eAAe,EAAE;oBACvD,oBAAoB,EAAE,IAAI;oBAC1B,cAAc,EAAE,KAAK;oBACrB,iBAAiB,EAAE,KAAK;iBACxB,EACD,KAAK,CAAC,SAAS,CAAC,SAAS,CACzB,CAAC;gBACF,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAC5C,KAAK,CAAC,YAAY,EAClB,MAAM,EACN,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,cAAc,CACpB,CAAC;gBAEF,MAAM,KAAK,GAAG,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;gBAChD,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;gBAC1C,OAAO,IAAI,CAAC;aACZ;SACD;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { pickRandom } from '../../../services/utils';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { addImpliedMechanics, getTeammateInitialState } from '../../../utils';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const GloriousGloop: StartOfCombatCard = {\r\n\tcardIds: [CardIds.FlobbidinousFloop_GloriousGloop_BGDUO_HERO_101p],\r\n\tstartOfCombatTiming: 'pre-combat',\r\n\tstartOfCombat: (trinket: BoardTrinket, input: SoCInput) => {\r\n\t\tfor (const heroPower of input.playerEntity.heroPowers) {\r\n\t\t\tif (GloriousGloop.cardIds.includes(heroPower.cardId) && heroPower.used) {\r\n\t\t\t\tif (!input.playerBoard?.length) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\tconst target = input.playerBoard.find((m) =>\r\n\t\t\t\t\tm.enchantments?.some(\r\n\t\t\t\t\t\t(e) => e.cardId === CardIds.GloriousGloop_InTheGloopEnchantment_BGDUO_HERO_101pe2,\r\n\t\t\t\t\t),\r\n\t\t\t\t);\r\n\t\t\t\tif (!target) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst teammateState = getTeammateInitialState(input.gameState.gameState, input.playerEntity);\r\n\t\t\t\tif (!teammateState?.board?.length) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\tconst highestTier = Math.max(\r\n\t\t\t\t\t...teammateState.board.map((entity) => input.gameState.allCards.getCard(entity.cardId).techLevel),\r\n\t\t\t\t);\r\n\t\t\t\tconst candidates = teammateState.board.filter(\r\n\t\t\t\t\t(entity) => input.gameState.allCards.getCard(entity.cardId).techLevel === highestTier,\r\n\t\t\t\t);\r\n\t\t\t\tif (!candidates.length) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\tconst highestTierMinion = pickRandom(candidates);\r\n\t\t\t\tconst clone: BoardEntity = addImpliedMechanics(\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t...highestTierMinion,\r\n\t\t\t\t\t\tentityId: input.gameState.sharedState.currentEntityId++,\r\n\t\t\t\t\t\tlastAffectedByEntity: null,\r\n\t\t\t\t\t\tdefinitelyDead: false,\r\n\t\t\t\t\t\tattackImmediately: false,\r\n\t\t\t\t\t},\r\n\t\t\t\t\tinput.gameState.cardsData,\r\n\t\t\t\t);\r\n\t\t\t\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\ttarget,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t);\r\n\t\t\t\t// Replace the \"target\" minion with the \"clone\"\r\n\t\t\t\tconst index = input.playerBoard.indexOf(target);\r\n\t\t\t\tinput.playerBoard.splice(index, 1, clone);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -4,9 +4,10 @@ exports.LightningInvocation = void 0;
|
|
|
4
4
|
const deathrattle_effects_1 = require("../../../simulation/deathrattle-effects");
|
|
5
5
|
exports.LightningInvocation = {
|
|
6
6
|
startOfCombatTiming: 'pre-combat',
|
|
7
|
+
cardIds: ["BG22_HERO_001p_t4", "BG22_HERO_001p_t4_s"],
|
|
7
8
|
startOfCombat: (trinket, input) => {
|
|
8
9
|
for (const heroPower of input.playerEntity.heroPowers) {
|
|
9
|
-
if (heroPower.used) {
|
|
10
|
+
if (exports.LightningInvocation.cardIds.includes(heroPower.cardId) && heroPower.used) {
|
|
10
11
|
(0, deathrattle_effects_1.applyLightningInvocationEnchantment)(input.playerBoard, input.playerEntity, null, input.opponentBoard, input.opponentEntity, input.gameState);
|
|
11
12
|
return true;
|
|
12
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lightning-invocation.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/lightning-invocation.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"lightning-invocation.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/lightning-invocation.ts"],"names":[],"mappings":";;;AAEA,iFAA8F;AAIjF,QAAA,mBAAmB,GAAsB;IACrD,mBAAmB,EAAE,YAAY;IACjC,OAAO,EAAE,4CAA+D;IACxE,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;QACzD,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE;YACtD,IAAI,2BAAmB,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,IAAI,EAAE;gBAC7E,IAAA,yDAAmC,EAClC,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,IAAI,EACJ,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,CACf,CAAC;gBACF,OAAO,IAAI,CAAC;aACZ;SACD;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { applyLightningInvocationEnchantment } from '../../../simulation/deathrattle-effects';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const LightningInvocation: StartOfCombatCard = {\r\n\tstartOfCombatTiming: 'pre-combat',\r\n\tcardIds: [CardIds.LightningInvocationToken, CardIds.LightningInvocation],\r\n\tstartOfCombat: (trinket: BoardTrinket, input: SoCInput) => {\r\n\t\tfor (const heroPower of input.playerEntity.heroPowers) {\r\n\t\t\tif (LightningInvocation.cardIds.includes(heroPower.cardId) && heroPower.used) {\r\n\t\t\t\tapplyLightningInvocationEnchantment(\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tinput.opponentBoard,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -4,9 +4,10 @@ exports.RapidReanimation = void 0;
|
|
|
4
4
|
const utils_1 = require("../../../utils");
|
|
5
5
|
exports.RapidReanimation = {
|
|
6
6
|
startOfCombatTiming: 'pre-combat',
|
|
7
|
+
cardIds: ["BG25_HERO_103p"],
|
|
7
8
|
startOfCombat: (trinket, input) => {
|
|
8
9
|
for (const heroPower of input.playerEntity.heroPowers) {
|
|
9
|
-
if (heroPower.used) {
|
|
10
|
+
if (exports.RapidReanimation.cardIds.includes(heroPower.cardId) && heroPower.used) {
|
|
10
11
|
const minionThatWillDie = input.playerBoard
|
|
11
12
|
.filter((m) => m.enchantments.some((e) => e.cardId === "BG25_HERO_103pe"))
|
|
12
13
|
.sort((a, b) => b.enchantments.find((e) => e.cardId === "BG25_HERO_103pe")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rapid-reanimation.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/rapid-reanimation.ts"],"names":[],"mappings":";;;AAGA,0CAA4C;AAG/B,QAAA,gBAAgB,GAAsB;IAClD,mBAAmB,EAAE,YAAY;IACjC,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;QACzD,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE;YACtD,IAAI,SAAS,CAAC,IAAI,EAAE;
|
|
1
|
+
{"version":3,"file":"rapid-reanimation.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/rapid-reanimation.ts"],"names":[],"mappings":";;;AAGA,0CAA4C;AAG/B,QAAA,gBAAgB,GAAsB;IAClD,mBAAmB,EAAE,YAAY;IACjC,OAAO,EAAE,kBAAyC;IAClD,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;QACzD,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE;YACtD,IAAI,wBAAgB,CAAC,OAAO,CAAC,QAAQ,CAAC,SAA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BAA8B,EAAE,IAAI,EAAE,CAAC;iBACpE;aACD;SACD;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { copyEntity } from '../../../utils';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const RapidReanimation: StartOfCombatCard = {\r\n\tstartOfCombatTiming: 'pre-combat',\r\n\tcardIds: [CardIds.TeronGorefiend_RapidReanimation],\r\n\tstartOfCombat: (trinket: BoardTrinket, input: SoCInput) => {\r\n\t\tfor (const heroPower of input.playerEntity.heroPowers) {\r\n\t\t\tif (RapidReanimation.cardIds.includes(heroPower.cardId) && heroPower.used) {\r\n\t\t\t\t// Getting the right enchantment can be tricky. The RapidReanimation enchantment can sometimes be\r\n\t\t\t\t// in the Graveyard zone, so we can't filter them out. In that case, we can have multiple\r\n\t\t\t\t// enchantments\r\n\t\t\t\t// However, because of how things are handled in the logs, we should be able to always take the one *\r\n\t\t\t\t// with the biggest entityId\r\n\t\t\t\tconst minionThatWillDie = input.playerBoard\r\n\t\t\t\t\t.filter((m) =>\r\n\t\t\t\t\t\tm.enchantments.some((e) => e.cardId === CardIds.RapidReanimation_ImpendingDeathEnchantment),\r\n\t\t\t\t\t)\r\n\t\t\t\t\t.sort(\r\n\t\t\t\t\t\t(a, b) =>\r\n\t\t\t\t\t\t\tb.enchantments.find((e) => e.cardId === CardIds.RapidReanimation_ImpendingDeathEnchantment)\r\n\t\t\t\t\t\t\t\t.originEntityId -\r\n\t\t\t\t\t\t\t\ta.enchantments.find(\r\n\t\t\t\t\t\t\t\t\t(e) => e.cardId === CardIds.RapidReanimation_ImpendingDeathEnchantment,\r\n\t\t\t\t\t\t\t\t).originEntityId || b.entityId - a.entityId,\r\n\t\t\t\t\t)[0];\r\n\t\t\t\tif (minionThatWillDie) {\r\n\t\t\t\t\t// So this is a bit tricky (as all the stuff with indices...). Because in practice it's more likely that players use Rapid Reanimation\r\n\t\t\t\t\t// on minions that they want to die quickly, most of the time they will be placed\r\n\t\t\t\t\t// to the left of the board\r\n\t\t\t\t\t// So using a left-based index (usually 0) is more likely to be correct after minions spawn on the board\r\n\t\t\t\t\t// Update: this looks like it's not the case, and looking at\r\n\t\t\t\t\t// http://replays.firestoneapp.com/?reviewId=2e6b389f-d904-43a2-a7cd-928a60d973ce&turn=11&action=1\r\n\t\t\t\t\t// the index seems to be right-based at least in some cases\r\n\t\t\t\t\t// Looks like even this is wrong:\r\n\t\t\t\t\t// http://replays.firestoneapp.com/?reviewId=9a46ab39-ccf0-478c-a010-68f2abb06c6f&turn=9&action=0\r\n\t\t\t\t\tconst rapidReanimationIndexFromLeft = input.playerBoard.indexOf(minionThatWillDie);\r\n\t\t\t\t\tinput.playerEntity.rapidReanimationIndexFromRight =\r\n\t\t\t\t\t\tinput.playerBoard.length - 1 - rapidReanimationIndexFromLeft;\r\n\t\t\t\t\tconst minionToCopy = copyEntity(minionThatWillDie);\r\n\t\t\t\t\t// We don't reapply auras when resummoning\r\n\t\t\t\t\t// removeAurasFromSelf(minionToCopy, input.playerBoard, input.playerEntity, input.gameState);\r\n\t\t\t\t\tinput.playerEntity.rapidReanimationMinion = minionToCopy;\r\n\t\t\t\t\tminionThatWillDie.definitelyDead = true;\r\n\t\t\t\t\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\t\tminionThatWillDie,\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.opponentEntity,\r\n\t\t\t\t\t);\r\n\t\t\t\t\treturn { hasTriggered: true, shouldRecomputeCurrentAttacker: true };\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -4,9 +4,10 @@ exports.RebornRites = void 0;
|
|
|
4
4
|
const reborn_1 = require("../../../keywords/reborn");
|
|
5
5
|
exports.RebornRites = {
|
|
6
6
|
startOfCombatTiming: 'pre-combat',
|
|
7
|
+
cardIds: ["TB_BaconShop_HP_024"],
|
|
7
8
|
startOfCombat: (trinket, input) => {
|
|
8
9
|
for (const heroPower of input.playerEntity.heroPowers) {
|
|
9
|
-
if (heroPower.used) {
|
|
10
|
+
if (exports.RebornRites.cardIds.includes(heroPower.cardId) && heroPower.used) {
|
|
10
11
|
const targetEntityId = heroPower.info;
|
|
11
12
|
const target = input.playerBoard.find((entity) => entity.entityId === targetEntityId);
|
|
12
13
|
if (!target || target.reborn) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reborn-rites.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/reborn-rites.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"reborn-rites.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/reborn-rites.ts"],"names":[],"mappings":";;;AAEA,qDAAwD;AAI3C,QAAA,WAAW,GAAsB;IAC7C,mBAAmB,EAAE,YAAY;IACjC,OAAO,EAAE,uBAAqB;IAC9B,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;QACzD,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE;YACtD,IAAI,mBAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,IAAI,EAAE;gBACrE,MAAM,cAAc,GAAG,SAAS,CAAC,IAAc,CAAC;gBAChD,MAAM,MAAM,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,KAAK,cAAc,CAAC,CAAC;gBACtF,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE;oBAC7B,OAAO,KAAK,CAAC;iBACb;gBAED,IAAA,qBAAY,EACX,MAAM,EACN,IAAI,EACJ,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,SAAS,CACf,CAAC;gBACF,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAC5C,KAAK,CAAC,YAAY,EAClB,MAAM,EACN,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,cAAc,CACpB,CAAC;gBACF,OAAO,IAAI,CAAC;aACZ;SACD;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { updateReborn } from '../../../keywords/reborn';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const RebornRites: StartOfCombatCard = {\r\n\tstartOfCombatTiming: 'pre-combat',\r\n\tcardIds: [CardIds.RebornRites],\r\n\tstartOfCombat: (trinket: BoardTrinket, input: SoCInput) => {\r\n\t\tfor (const heroPower of input.playerEntity.heroPowers) {\r\n\t\t\tif (RebornRites.cardIds.includes(heroPower.cardId) && heroPower.used) {\r\n\t\t\t\tconst targetEntityId = heroPower.info as number;\r\n\t\t\t\tconst target = input.playerBoard.find((entity) => entity.entityId === targetEntityId);\r\n\t\t\t\tif (!target || target.reborn) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tupdateReborn(\r\n\t\t\t\t\ttarget,\r\n\t\t\t\t\ttrue,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t);\r\n\t\t\t\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\ttarget,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -4,9 +4,10 @@ exports.WaterInvocation = void 0;
|
|
|
4
4
|
const deathrattle_effects_1 = require("../../../simulation/deathrattle-effects");
|
|
5
5
|
exports.WaterInvocation = {
|
|
6
6
|
startOfCombatTiming: 'pre-combat',
|
|
7
|
+
cardIds: ["BG22_HERO_001p_t3", "BG22_HERO_001p_t3_s"],
|
|
7
8
|
startOfCombat: (trinket, input) => {
|
|
8
9
|
for (const heroPower of input.playerEntity.heroPowers) {
|
|
9
|
-
if (heroPower.used) {
|
|
10
|
+
if (exports.WaterInvocation.cardIds.includes(heroPower.cardId) && heroPower.used) {
|
|
10
11
|
(0, deathrattle_effects_1.applyWaterInvocationEnchantment)(input.playerBoard, input.playerEntity, null, null, input.playerEntity, input.gameState);
|
|
11
12
|
return true;
|
|
12
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"water-invocation.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/water-invocation.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"water-invocation.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/water-invocation.ts"],"names":[],"mappings":";;;AAEA,iFAA0F;AAI7E,QAAA,eAAe,GAAsB;IACjD,mBAAmB,EAAE,YAAY;IACjC,OAAO,EAAE,4CAAuD;IAChE,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;QACzD,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE;YACtD,IAAI,uBAAe,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,IAAI,EAAE;gBACzE,IAAA,qDAA+B,EAC9B,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,IAAI,EACJ,IAAI,EACJ,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,SAAS,CACf,CAAC;gBACF,OAAO,IAAI,CAAC;aACZ;SACD;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { applyWaterInvocationEnchantment } from '../../../simulation/deathrattle-effects';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const WaterInvocation: StartOfCombatCard = {\r\n\tstartOfCombatTiming: 'pre-combat',\r\n\tcardIds: [CardIds.WaterInvocationToken, CardIds.WaterInvocation],\r\n\tstartOfCombat: (trinket: BoardTrinket, input: SoCInput) => {\r\n\t\tfor (const heroPower of input.playerEntity.heroPowers) {\r\n\t\t\tif (WaterInvocation.cardIds.includes(heroPower.cardId) && heroPower.used) {\r\n\t\t\t\tapplyWaterInvocationEnchantment(\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n"]}
|
|
@@ -7,9 +7,10 @@ const stats_1 = require("../../../simulation/stats");
|
|
|
7
7
|
const utils_2 = require("../../../utils");
|
|
8
8
|
exports.WaxWarband = {
|
|
9
9
|
startOfCombatTiming: 'pre-combat',
|
|
10
|
+
cardIds: ["TB_BaconShop_HP_037a"],
|
|
10
11
|
startOfCombat: (trinket, input) => {
|
|
11
12
|
for (const heroPower of input.playerEntity.heroPowers) {
|
|
12
|
-
if (heroPower.used) {
|
|
13
|
+
if (exports.WaxWarband.cardIds.includes(heroPower.cardId) && heroPower.used) {
|
|
13
14
|
if (input.playerBoard.length > 0) {
|
|
14
15
|
const boardWithTribes = input.playerBoard.filter((e) => !!(0, utils_2.getEffectiveTribesForEntity)(e, input.playerEntity, input.gameState.allCards).length);
|
|
15
16
|
const boardWithoutAll = boardWithTribes.filter((e) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wax-warband.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/wax-warband.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"wax-warband.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/wax-warband.ts"],"names":[],"mappings":";;;AAAA,iEAA4F;AAG5F,mDAAuD;AAEvD,qDAAwD;AACxD,0CAA6D;AAGhD,QAAA,UAAU,GAAsB;IAC5C,mBAAmB,EAAE,YAAY;IACjC,OAAO,EAAE,wBAAoB;IAC7B,aAAa,EAAE,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;QACzD,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE;YACtD,IAAI,kBAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,IAAI,EAAE;gBACpE,IAAI,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;oBACjC,MAAM,eAAe,GAAG,KAAK,CAAC,WAAW,CAAC,MAAM,CAC/C,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAA,mCAA2B,EAAC,CAAC,EAAE,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,MAAM,CAC5F,CAAC;oBACF,MAAM,eAAe,GAAG,eAAe,CAAC,MAAM,CAC7C,CAAC,CAAC,EAAE,EAAE;;wBACL,OAAA,CAAC,CAAA,MAAA,IAAA,mCAA2B,EAAC,CAAC,EAAE,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,0CAAE,QAAQ,CACtF,q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QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,mCAAI,EAAE,EAAE;YAChE,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE;gBAC3B,cAAc,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;aAC3B;YACD,cAAc,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SACnC;KACD;IACD,KAAK,MAAM,KAAK,IAAI,6BAAY,EAAE;QACjC,cAAc,CAAC,KAAK,CAAC,GAAG,IAAA,oBAAY,EAAC,MAAA,cAAc,CAAC,qBAAI,CAAC,KAAK,CAAC,CAAC,mCAAI,EAAE,CAAC,CAAC;KACxE;IAED,MAAM,eAAe,GAAkB,EAAE,CAAC;IAG1C,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;QAC3B,IAAI,cAAc,CAAC,KAAK,CAAC,EAAE;YAC1B,cAAc,CAAC,KAAK,CAAC,CAAC,IAAI,CACzB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,CAC3F,CAAC;YACF,KAAK,MAAM,MAAM,IAAI,cAAc,CAAC,KAAK,CAAC,EAAE;gBAC3C,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;oBACtC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;oBAC7B,MAAM;iBACN;aACD;SACD;KACD;IAGD,OAAO,eAAe,CAAC;AACxB,CAAC,CAAC","sourcesContent":["import { ALL_BG_RACES, AllCardsService, CardIds, Race } from '@firestone-hs/reference-data';\r\nimport { BoardTrinket } from '../../../bgs-player-entity';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { shuffleArray } from '../../../services/utils';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { getEffectiveTribesForEntity } from '../../../utils';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const WaxWarband: StartOfCombatCard = {\r\n\tstartOfCombatTiming: 'pre-combat',\r\n\tcardIds: [CardIds.WaxWarband],\r\n\tstartOfCombat: (trinket: BoardTrinket, input: SoCInput) => {\r\n\t\tfor (const heroPower of input.playerEntity.heroPowers) {\r\n\t\t\tif (WaxWarband.cardIds.includes(heroPower.cardId) && heroPower.used) {\r\n\t\t\t\tif (input.playerBoard.length > 0) {\r\n\t\t\t\t\tconst boardWithTribes = input.playerBoard.filter(\r\n\t\t\t\t\t\t(e) => !!getEffectiveTribesForEntity(e, input.playerEntity, input.gameState.allCards).length,\r\n\t\t\t\t\t);\r\n\t\t\t\t\tconst boardWithoutAll = boardWithTribes.filter(\r\n\t\t\t\t\t\t(e) =>\r\n\t\t\t\t\t\t\t!getEffectiveTribesForEntity(e, input.playerEntity, input.gameState.allCards)?.includes(\r\n\t\t\t\t\t\t\t\tRace.ALL,\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t);\r\n\t\t\t\t\tconst selectedMinions = selectMinions(boardWithoutAll, ALL_BG_RACES, input.gameState.allCards);\r\n\t\t\t\t\tconst allMinions = [\r\n\t\t\t\t\t\t...selectedMinions,\r\n\t\t\t\t\t\t...boardWithTribes.filter((e) =>\r\n\t\t\t\t\t\t\tgetEffectiveTribesForEntity(e, input.playerEntity, input.gameState.allCards)?.includes(\r\n\t\t\t\t\t\t\t\tRace.ALL,\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t];\r\n\t\t\t\t\tallMinions.forEach((e) => {\r\n\t\t\t\t\t\tmodifyStats(\r\n\t\t\t\t\t\t\te,\r\n\t\t\t\t\t\t\tinput.gameState.cardsData.getTavernLevel(e.cardId),\r\n\t\t\t\t\t\t\tinput.gameState.cardsData.getTavernLevel(e.cardId),\r\n\t\t\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\t\t\tinput.gameState,\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\t\t\te,\r\n\t\t\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t});\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n\r\n// Not perfect, as I don't think this solves the issue where some cards are mutually exclusive\r\nconst selectMinions = (minions: BoardEntity[], tribes: Race[], allCards: AllCardsService): BoardEntity[] => {\r\n\t// Step 1\r\n\tconst minionsByTribe: { [tribe: string]: BoardEntity[] } = {};\r\n\tfor (const minion of minions) {\r\n\t\tfor (const tribe of allCards.getCard(minion.cardId).races ?? []) {\r\n\t\t\tif (!minionsByTribe[tribe]) {\r\n\t\t\t\tminionsByTribe[tribe] = [];\r\n\t\t\t}\r\n\t\t\tminionsByTribe[tribe].push(minion);\r\n\t\t}\r\n\t}\r\n\tfor (const tribe of ALL_BG_RACES) {\r\n\t\tminionsByTribe[tribe] = shuffleArray(minionsByTribe[Race[tribe]] ?? []);\r\n\t}\r\n\r\n\tconst selectedMinions: BoardEntity[] = [];\r\n\r\n\t// Step 3\r\n\tfor (const tribe of tribes) {\r\n\t\tif (minionsByTribe[tribe]) {\r\n\t\t\tminionsByTribe[tribe].sort(\r\n\t\t\t\t(a, b) => allCards.getCard(a.cardId).races.length - allCards.getCard(b.cardId).races.length,\r\n\t\t\t);\r\n\t\t\tfor (const minion of minionsByTribe[tribe]) {\r\n\t\t\t\tif (!selectedMinions.includes(minion)) {\r\n\t\t\t\t\tselectedMinions.push(minion);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Step 4\r\n\treturn selectedMinions;\r\n};\r\n"]}
|
|
@@ -27,7 +27,7 @@ exports.Battlecruiser = {
|
|
|
27
27
|
},
|
|
28
28
|
rebornEffect: (minion, input) => {
|
|
29
29
|
var _a;
|
|
30
|
-
const ultraCapacitor = (_a =
|
|
30
|
+
const ultraCapacitor = (_a = input.initialEntity.enchantments) === null || _a === void 0 ? void 0 : _a.find((e) => e.cardId === "BG31_HERO_801ptje");
|
|
31
31
|
if (!ultraCapacitor) {
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"battlecruiser.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/battlecruiser.ts"],"names":[],"mappings":";;;AAEA,uDAAgE;AAKhE,qDAAwD;AACxD,0CAAkE;AAGrD,QAAA,aAAa,GAAgF;IACzG,OAAO,EAAE,wCAA6F;IACtG,aAAa,EAAE,CAAC,MAAmB,EAAE,KAAe,EAAE,EAAE;;QACvD,MAAM,YAAY,GAAG,MAAA,MAAM,CAAC,YAAY,0CAAE,IAAI,CAC7C,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,wBAAmE,CAClF,CAAC;QACF,IAAI,CAAC,YAAY,EAAE;YAClB,OAAO,KAAK,CAAC;SACb;QAED,MAAM,MAAM,GAAG,YAAY,CAAC,iBAAiB,CAAC;QAC9C,MAAM,MAAM,GAAG,IAAA,wCAAgC,EAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QACrE,IAAI,CAAC,CAAC,MAAM,EAAE;YACb,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CACvC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,uBAAsD,CACrE;gBACA,CAAC,CAAC,CAAC;gBACH,CAAC,CAAC,CAAC,CAAC;YACL,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;gBAC/B,IAAA,2BAAkB,EACjB,MAAM,EACN,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,EACpB,MAAM,EACN,MAAM,EACN,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,SAAS,CACf,CAAC;gBACF,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAC5C,MAAM,EACN,MAAM,EACN,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,cAAc,CACpB,CAAC;aACF;SACD;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IACD,YAAY,EAAE,CAAC,MAAmB,EAAE,KAAwB,EAAE,EAAE;;QAC/D,MAAM,cAAc,GAAG,MAAA,
|
|
1
|
+
{"version":3,"file":"battlecruiser.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/battlecruiser.ts"],"names":[],"mappings":";;;AAEA,uDAAgE;AAKhE,qDAAwD;AACxD,0CAAkE;AAGrD,QAAA,aAAa,GAAgF;IACzG,OAAO,EAAE,wCAA6F;IACtG,aAAa,EAAE,CAAC,MAAmB,EAAE,KAAe,EAAE,EAAE;;QACvD,MAAM,YAAY,GAAG,MAAA,MAAM,CAAC,YAAY,0CAAE,IAAI,CAC7C,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,wBAAmE,CAClF,CAAC;QACF,IAAI,CAAC,YAAY,EAAE;YAClB,OAAO,KAAK,CAAC;SACb;QAED,MAAM,MAAM,GAAG,YAAY,CAAC,iBAAiB,CAAC;QAC9C,MAAM,MAAM,GAAG,IAAA,wCAAgC,EAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QACrE,IAAI,CAAC,CAAC,MAAM,EAAE;YACb,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,IAA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AED,MAAM,MAAM,GAAG,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;QAC5C,IAAI,CAAC,MAAM,EAAE;YACZ,OAAO;SACP;QAED,MAAM,IAAI,GAAG,eAAe,CAAC,iBAAiB,CAAC;QAC/C,IAAA,mBAAW,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,mBAAmB,EAAE,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAC5G,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { dealDamageToMinion } from '../../../simulation/attack';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { OnAttackInput } from '../../../simulation/on-attack';\r\nimport { RebornEffectInput } from '../../../simulation/reborn';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { getRandomMinionWithHighestHealth } from '../../../utils';\r\nimport { DeathrattleEffectCard, OnAttackCard, RebornEffectCard, StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const Battlecruiser: StartOfCombatCard & RebornEffectCard & OnAttackCard & DeathrattleEffectCard = {\r\n\tcardIds: [CardIds.LiftOff_BattlecruiserToken_BG31_HERO_801pt, CardIds.Battlecruiser_BG31_HERO_801pt_G],\r\n\tstartOfCombat: (minion: BoardEntity, input: SoCInput) => {\r\n\t\tconst yamatoCannon = minion.enchantments?.find(\r\n\t\t\t(e) => e.cardId === CardIds.YamatoCannon_YamatoCannonEnchantment_BG31_HERO_801ptce,\r\n\t\t);\r\n\t\tif (!yamatoCannon) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tconst damage = yamatoCannon.tagScriptDataNum1;\r\n\t\tconst target = getRandomMinionWithHighestHealth(input.opponentBoard);\r\n\t\tif (!!target) {\r\n\t\t\tconst loops = !!minion.enchantments.find(\r\n\t\t\t\t(e) => e.cardId === CardIds.Battlecruiser_MissilePod_BG31_HERO_801pti,\r\n\t\t\t)\r\n\t\t\t\t? 2\r\n\t\t\t\t: 1;\r\n\t\t\tfor (let i = 0; i < loops; i++) {\r\n\t\t\t\tdealDamageToMinion(\r\n\t\t\t\t\ttarget,\r\n\t\t\t\t\tinput.opponentBoard,\r\n\t\t\t\t\tinput.opponentEntity,\r\n\t\t\t\t\tminion,\r\n\t\t\t\t\tdamage,\r\n\t\t\t\t\tinput.playerBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.gameState,\r\n\t\t\t\t);\r\n\t\t\t\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\t\t\tminion,\r\n\t\t\t\t\ttarget,\r\n\t\t\t\t\tinput.opponentBoard,\r\n\t\t\t\t\tinput.playerEntity,\r\n\t\t\t\t\tinput.opponentEntity,\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\trebornEffect: (minion: BoardEntity, input: RebornEffectInput) => {\r\n\t\tconst ultraCapacitor = input.initialEntity.enchantments?.find(\r\n\t\t\t(e) => e.cardId === CardIds.UltraCapacitor_UltraCapacitorEnchantment_BG31_HERO_801ptje,\r\n\t\t);\r\n\t\tif (!ultraCapacitor) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tminion.enchantments = input.initialEntity.enchantments;\r\n\t\tminion.attack = input.initialEntity.maxAttack;\r\n\t\tminion.maxAttack = input.initialEntity.maxAttack;\r\n\t\tminion.health = input.initialEntity.maxHealth;\r\n\t\tminion.maxHealth = input.initialEntity.maxHealth;\r\n\t\tminion.divineShield = input.initialEntity.hadDivineShield;\r\n\t\tminion.taunt = input.initialEntity.taunt;\r\n\t\tminion.windfury = input.initialEntity.windfury;\r\n\t\tminion.poisonous = input.initialEntity.poisonous;\r\n\t},\r\n\tonAttack: (\r\n\t\tminion: BoardEntity,\r\n\t\tinput: OnAttackInput,\r\n\t): {\r\n\t\tdmgDoneByAttacker: number;\r\n\t\tdmgDoneByDefender: number;\r\n\t} => {\r\n\t\tconst advancedBallistics = minion.enchantments?.find(\r\n\t\t\t(e) => e.cardId === CardIds.AdvancedBallistics_AdvancedBallisticsEnchantment_BG31_HERO_801ptde,\r\n\t\t);\r\n\t\tif (!advancedBallistics) {\r\n\t\t\treturn { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };\r\n\t\t}\r\n\r\n\t\tconst buff = advancedBallistics.tagScriptDataNum1;\r\n\t\tconst targets = input.attackingBoard.filter((entity) => entity !== minion);\r\n\t\tfor (const target of targets) {\r\n\t\t\tmodifyStats(target, buff, 0, input.attackingBoard, input.attackingHero, input.gameState);\r\n\t\t}\r\n\t\treturn { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };\r\n\t},\r\n\tdeathrattleEffect: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\tconst caduceusReactor = minion.enchantments?.find(\r\n\t\t\t(e) => e.cardId === CardIds.CaduceusReactor_CaduceusReactorEnchantment_BG31_HERO_801ptee,\r\n\t\t);\r\n\t\tif (!caduceusReactor) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst target = input.boardWithDeadEntity[0];\r\n\t\tif (!target) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst buff = caduceusReactor.tagScriptDataNum1;\r\n\t\tmodifyStats(target, buff, buff, input.boardWithDeadEntity, input.boardWithDeadEntityHero, input.gameState);\r\n\t},\r\n};\r\n"]}
|
|
@@ -5,7 +5,7 @@ const stats_1 = require("../../../simulation/stats");
|
|
|
5
5
|
exports.CorruptedMyrmidon = {
|
|
6
6
|
cardIds: ["BG23_012", "BG23_012_G"],
|
|
7
7
|
startOfCombat: (minion, input) => {
|
|
8
|
-
const multiplier = minion.cardId === "BG23_012_G" ?
|
|
8
|
+
const multiplier = minion.cardId === "BG23_012_G" ? 2 : 1;
|
|
9
9
|
(0, stats_1.modifyStats)(minion, multiplier * minion.attack, multiplier * minion.health, input.playerBoard, input.playerEntity, input.gameState);
|
|
10
10
|
input.gameState.spectator.registerPowerTarget(minion, minion, input.playerBoard, input.playerEntity, input.opponentEntity);
|
|
11
11
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"corrupted-myrmidon.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/corrupted-myrmidon.ts"],"names":[],"mappings":";;;AAGA,qDAAwD;AAG3C,QAAA,iBAAiB,GAAsB;IACnD,OAAO,EAAE,0BAA0E;IACnF,aAAa,EAAE,CAAC,MAAmB,EAAE,KAAe,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"corrupted-myrmidon.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/corrupted-myrmidon.ts"],"names":[],"mappings":";;;AAGA,qDAAwD;AAG3C,QAAA,iBAAiB,GAAsB;IACnD,OAAO,EAAE,0BAA0E;IACnF,aAAa,EAAE,CAAC,MAAmB,EAAE,KAAe,EAAE,EAAE;QAEvD,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,iBAAyC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAClF,IAAA,mBAAW,EACV,MAAM,EACN,UAAU,GAAG,MAAM,CAAC,MAAM,EAC1B,UAAU,GAAG,MAAM,CAAC,MAAM,EAC1B,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,SAAS,CACf,CAAC;QACF,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAC5C,MAAM,EACN,MAAM,EACN,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,cAAc,CACpB,CAAC;QACF,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const CorruptedMyrmidon: StartOfCombatCard = {\r\n\tcardIds: [CardIds.CorruptedMyrmidon_BG23_012, CardIds.CorruptedMyrmidon_BG23_012_G],\r\n\tstartOfCombat: (minion: BoardEntity, input: SoCInput) => {\r\n\t\t// We add these stats\r\n\t\tconst multiplier = minion.cardId === CardIds.CorruptedMyrmidon_BG23_012_G ? 2 : 1;\r\n\t\tmodifyStats(\r\n\t\t\tminion,\r\n\t\t\tmultiplier * minion.attack,\r\n\t\t\tmultiplier * minion.health,\r\n\t\t\tinput.playerBoard,\r\n\t\t\tinput.playerEntity,\r\n\t\t\tinput.gameState,\r\n\t\t);\r\n\t\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\tminion,\r\n\t\t\tminion,\r\n\t\t\tinput.playerBoard,\r\n\t\t\tinput.playerEntity,\r\n\t\t\tinput.opponentEntity,\r\n\t\t);\r\n\t\treturn true;\r\n\t},\r\n};\r\n"]}
|
|
@@ -5,6 +5,9 @@ const stats_1 = require("../../../simulation/stats");
|
|
|
5
5
|
exports.Mutalisk = {
|
|
6
6
|
cardIds: ["BG31_HERO_811t6", "BG31_HERO_811t6_G"],
|
|
7
7
|
onMinionKilled: (minion, input) => {
|
|
8
|
+
if (!minion.attacking) {
|
|
9
|
+
return { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };
|
|
10
|
+
}
|
|
8
11
|
const mult = minion.cardId === "BG31_HERO_811t6_G" ? 2 : 1;
|
|
9
12
|
(0, stats_1.modifyStats)(minion, 4 * mult, 4 * mult, input.attackingBoard, input.attackingHero, input.gameState);
|
|
10
13
|
return { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutalisk.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/mutalisk.ts"],"names":[],"mappings":";;;AAGA,qDAAwD;AAG3C,QAAA,QAAQ,GAAuB;IAC3C,OAAO,EAAE,wCAAiG;IAC1G,cAAc,EAAE,CACf,MAAmB,EACnB,KAA0B,EACiC,EAAE;QAC7D,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,wBAAuC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1E,IAAA,mBAAW,EAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QACpG,OAAO,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvD,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { OnMinionKilledInput } from '../../../simulation/attack';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { OnMinionKilledCard } from '../../card.interface';\r\n\r\nexport const Mutalisk: OnMinionKilledCard = {\r\n\tcardIds: [CardIds.KerriganQueenOfBlades_MutaliskToken_BG31_HERO_811t6, CardIds.Mutalisk_BG31_HERO_811t6_G],\r\n\tonMinionKilled: (\r\n\t\tminion: BoardEntity,\r\n\t\tinput: OnMinionKilledInput,\r\n\t): { dmgDoneByAttacker: number; dmgDoneByDefender: number } => {\r\n\t\tconst mult = minion.cardId === CardIds.Mutalisk_BG31_HERO_811t6_G ? 2 : 1;\r\n\t\tmodifyStats(minion, 4 * mult, 4 * mult, input.attackingBoard, input.attackingHero, input.gameState);\r\n\t\treturn { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };\r\n\t},\r\n};\r\n"]}
|
|
1
|
+
{"version":3,"file":"mutalisk.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/mutalisk.ts"],"names":[],"mappings":";;;AAGA,qDAAwD;AAG3C,QAAA,QAAQ,GAAuB;IAC3C,OAAO,EAAE,wCAAiG;IAC1G,cAAc,EAAE,CACf,MAAmB,EACnB,KAA0B,EACiC,EAAE;QAC7D,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;YACtB,OAAO,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,CAAC;SACtD;QAED,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,wBAAuC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1E,IAAA,mBAAW,EAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QACpG,OAAO,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvD,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { OnMinionKilledInput } from '../../../simulation/attack';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { OnMinionKilledCard } from '../../card.interface';\r\n\r\nexport const Mutalisk: OnMinionKilledCard = {\r\n\tcardIds: [CardIds.KerriganQueenOfBlades_MutaliskToken_BG31_HERO_811t6, CardIds.Mutalisk_BG31_HERO_811t6_G],\r\n\tonMinionKilled: (\r\n\t\tminion: BoardEntity,\r\n\t\tinput: OnMinionKilledInput,\r\n\t): { dmgDoneByAttacker: number; dmgDoneByDefender: number } => {\r\n\t\tif (!minion.attacking) {\r\n\t\t\treturn { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };\r\n\t\t}\r\n\r\n\t\tconst mult = minion.cardId === CardIds.Mutalisk_BG31_HERO_811t6_G ? 2 : 1;\r\n\t\tmodifyStats(minion, 4 * mult, 4 * mult, input.attackingBoard, input.attackingHero, 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.Ultralisk = {
|
|
6
6
|
cardIds: ["BG31_HERO_811t10", "BG31_HERO_811t10_G"],
|
|
7
7
|
startOfCombat: (minion, input) => {
|
|
8
|
-
const multiplier = minion.cardId === "BG31_HERO_811t10_G" ?
|
|
8
|
+
const multiplier = minion.cardId === "BG31_HERO_811t10_G" ? 2 : 1;
|
|
9
9
|
(0, stats_1.modifyStats)(minion, multiplier * minion.attack, multiplier * minion.health, input.playerBoard, input.playerEntity, input.gameState);
|
|
10
10
|
input.gameState.spectator.registerPowerTarget(minion, minion, input.playerBoard, input.playerEntity, input.opponentEntity);
|
|
11
11
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ultralisk.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/ultralisk.ts"],"names":[],"mappings":";;;AAGA,qDAAwD;AAG3C,QAAA,SAAS,GAAsB;IAC3C,OAAO,EAAE,0CAAqG;IAC9G,aAAa,EAAE,CAAC,MAAmB,EAAE,KAAe,EAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"ultralisk.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/ultralisk.ts"],"names":[],"mappings":";;;AAGA,qDAAwD;AAG3C,QAAA,SAAS,GAAsB;IAC3C,OAAO,EAAE,0CAAqG;IAC9G,aAAa,EAAE,CAAC,MAAmB,EAAE,KAAe,EAAW,EAAE;QAEhE,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,yBAAyC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAClF,IAAA,mBAAW,EACV,MAAM,EACN,UAAU,GAAG,MAAM,CAAC,MAAM,EAC1B,UAAU,GAAG,MAAM,CAAC,MAAM,EAC1B,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,SAAS,CACf,CAAC;QACF,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAC5C,MAAM,EACN,MAAM,EACN,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,cAAc,CACpB,CAAC;QACF,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { SoCInput } from '../../../simulation/start-of-combat/start-of-combat-input';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const Ultralisk: StartOfCombatCard = {\r\n\tcardIds: [CardIds.KerriganQueenOfBlades_UltraliskToken_BG31_HERO_811t10, CardIds.Ultralisk_BG31_HERO_811t10_G],\r\n\tstartOfCombat: (minion: BoardEntity, input: SoCInput): boolean => {\r\n\t\t// We add the stats, so mults are -1\r\n\t\tconst multiplier = minion.cardId === CardIds.Ultralisk_BG31_HERO_811t10_G ? 2 : 1;\r\n\t\tmodifyStats(\r\n\t\t\tminion,\r\n\t\t\tmultiplier * minion.attack,\r\n\t\t\tmultiplier * minion.health,\r\n\t\t\tinput.playerBoard,\r\n\t\t\tinput.playerEntity,\r\n\t\t\tinput.gameState,\r\n\t\t);\r\n\t\tinput.gameState.spectator.registerPowerTarget(\r\n\t\t\tminion,\r\n\t\t\tminion,\r\n\t\t\tinput.playerBoard,\r\n\t\t\tinput.playerEntity,\r\n\t\t\tinput.opponentEntity,\r\n\t\t);\r\n\t\treturn true;\r\n\t},\r\n};\r\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildGameAction = void 0;
|
|
4
4
|
const buildGameAction = (playerHero, opponentHero, action) => {
|
|
5
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15;
|
|
5
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17;
|
|
6
6
|
const isPlayerSireD = (_a = playerHero === null || playerHero === void 0 ? void 0 : playerHero.cardId) === null || _a === void 0 ? void 0 : _a.startsWith("BG24_HERO_100");
|
|
7
7
|
const isOpponentSireD = (_b = opponentHero === null || opponentHero === void 0 ? void 0 : opponentHero.cardId) === null || _b === void 0 ? void 0 : _b.startsWith("BG24_HERO_100");
|
|
8
8
|
const result = {
|
|
@@ -27,19 +27,19 @@ const buildGameAction = (playerHero, opponentHero, action) => {
|
|
|
27
27
|
opponentSecrets: ((_y = opponentHero === null || opponentHero === void 0 ? void 0 : opponentHero.secrets) !== null && _y !== void 0 ? _y : []).filter((s) => !s.triggered),
|
|
28
28
|
opponentCardId: opponentHero === null || opponentHero === void 0 ? void 0 : opponentHero.cardId,
|
|
29
29
|
opponentEntityId: opponentHero === null || opponentHero === void 0 ? void 0 : opponentHero.entityId,
|
|
30
|
-
opponentHeroPowerCardId: (_3 = (_0 = (_z = opponentHero === null || opponentHero === void 0 ? void 0 : opponentHero.trinkets.find((t) => t.scriptDataNum6 === 3)) === null || _z === void 0 ? void 0 : _z.cardId) !== null && _0 !== void 0 ? _0 : (isOpponentSireD ? (_2 = (_1 = opponentHero.questRewardEntities) === null || _1 === void 0 ? void 0 : _1[0]) === null || _2 === void 0 ? void 0 : _2.cardId : null)) !== null && _3 !== void 0 ? _3 : opponentHero === null || opponentHero === void 0 ? void 0 : opponentHero.heroPowerId,
|
|
30
|
+
opponentHeroPowerCardId: (_5 = (_3 = (_0 = (_z = opponentHero === null || opponentHero === void 0 ? void 0 : opponentHero.trinkets.find((t) => t.scriptDataNum6 === 3)) === null || _z === void 0 ? void 0 : _z.cardId) !== null && _0 !== void 0 ? _0 : (isOpponentSireD ? (_2 = (_1 = opponentHero.questRewardEntities) === null || _1 === void 0 ? void 0 : _1[0]) === null || _2 === void 0 ? void 0 : _2.cardId : null)) !== null && _3 !== void 0 ? _3 : (_4 = opponentHero === null || opponentHero === void 0 ? void 0 : opponentHero.heroPowers[0]) === null || _4 === void 0 ? void 0 : _4.cardId) !== null && _5 !== void 0 ? _5 : opponentHero === null || opponentHero === void 0 ? void 0 : opponentHero.heroPowerId,
|
|
31
31
|
opponentHeroPowerEntityId: 200000002,
|
|
32
32
|
opponentHeroPowerUsed: opponentHero === null || opponentHero === void 0 ? void 0 : opponentHero.heroPowerUsed,
|
|
33
33
|
opponentHeroPowers: opponentHero === null || opponentHero === void 0 ? void 0 : opponentHero.heroPowers,
|
|
34
|
-
opponentRewardCardId: isOpponentSireD && ((
|
|
34
|
+
opponentRewardCardId: isOpponentSireD && ((_6 = opponentHero === null || opponentHero === void 0 ? void 0 : opponentHero.questRewardEntities) === null || _6 === void 0 ? void 0 : _6.length) < 2
|
|
35
35
|
? null
|
|
36
|
-
: (
|
|
37
|
-
opponentRewardEntityId: isOpponentSireD && ((
|
|
36
|
+
: (_9 = (_8 = (_7 = opponentHero === null || opponentHero === void 0 ? void 0 : opponentHero.questRewardEntities) === null || _7 === void 0 ? void 0 : _7[1]) === null || _8 === void 0 ? void 0 : _8.cardId) !== null && _9 !== void 0 ? _9 : (_10 = opponentHero === null || opponentHero === void 0 ? void 0 : opponentHero.questRewards) === null || _10 === void 0 ? void 0 : _10[0],
|
|
37
|
+
opponentRewardEntityId: isOpponentSireD && ((_11 = opponentHero === null || opponentHero === void 0 ? void 0 : opponentHero.questRewardEntities) === null || _11 === void 0 ? void 0 : _11.length) < 2
|
|
38
38
|
? null
|
|
39
|
-
: (
|
|
40
|
-
opponentRewardData: isOpponentSireD && ((
|
|
39
|
+
: (_13 = (_12 = opponentHero === null || opponentHero === void 0 ? void 0 : opponentHero.questRewardEntities) === null || _12 === void 0 ? void 0 : _12[1]) === null || _13 === void 0 ? void 0 : _13.entityId,
|
|
40
|
+
opponentRewardData: isOpponentSireD && ((_14 = opponentHero === null || opponentHero === void 0 ? void 0 : opponentHero.questRewardEntities) === null || _14 === void 0 ? void 0 : _14.length) < 2
|
|
41
41
|
? null
|
|
42
|
-
: (
|
|
42
|
+
: (_17 = (_16 = (_15 = opponentHero === null || opponentHero === void 0 ? void 0 : opponentHero.questRewardEntities) === null || _15 === void 0 ? void 0 : _15[0]) === null || _16 === void 0 ? void 0 : _16.scriptDataNum1) !== null && _17 !== void 0 ? _17 : 0,
|
|
43
43
|
opponentTrinkets: opponentHero === null || opponentHero === void 0 ? void 0 : opponentHero.trinkets,
|
|
44
44
|
};
|
|
45
45
|
return result;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"game-action.js","sourceRoot":"","sources":["../../../src/simulation/spectator/game-action.ts"],"names":[],"mappings":";;;AA0DO,MAAM,eAAe,GAAG,CAC9B,UAA2B,EAC3B,YAA6B,EAC7B,MAA2B,EACd,EAAE;;IACf,MAAM,aAAa,GAAG,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM,0CAAE,UAAU,iBAAsC,CAAC;IAC3F,MAAM,eAAe,GAAG,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,MAAM,0CAAE,UAAU,iBAAsC,CAAC;IAC/F,MAAM,MAAM,GAAe;QAC1B,GAAG,MAAM;QAET,aAAa,EAAE,CAAC,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,mCAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACtE,YAAY,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM;QAChC,cAAc,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,QAAQ;QAEpC,qBAAq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AAmB,4CAAE,MAAM,IAAG,CAAC;YAC/D,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,OAAA,OAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,mBAAmB,4CAAG,CAAC,CAAC,4CAAE,QAAQ;QACpD,kBAAkB,EACjB,eAAe,IAAI,CAAA,OAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,mBAAmB,4CAAE,MAAM,IAAG,CAAC;YAC/D,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,OAAA,OAAA,OAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,mBAAmB,4CAAG,CAAC,CAAC,4CAAE,cAAc,qCAAI,CAAC;QAC/D,gBAAgB,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,QAAQ;KAC1B,CAAC;IAChB,OAAO,MAAM,CAAC;AACf,CAAC,CAAC;AA9DW,QAAA,eAAe,mBA8D1B","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BgsHeroPower, BgsPlayerEntity, BoardTrinket } from '../../bgs-player-entity';\r\nimport { BoardEntity } from '../../board-entity';\r\nimport { BoardSecret } from '../../board-secret';\r\n\r\nexport interface GameAction {\r\n\ttype:\r\n\t\t| 'damage'\r\n\t\t| 'attack'\r\n\t\t| 'spawn'\r\n\t\t| 'minion-death'\r\n\t\t| 'power-target'\r\n\t\t| 'start-of-combat'\r\n\t\t| 'player-attack'\r\n\t\t| 'opponent-attack';\r\n\tplayerBoard: readonly BoardEntity[];\r\n\tplayerHand: readonly BoardEntity[];\r\n\tplayerSecrets: readonly BoardSecret[];\r\n\tplayerTrinkets: readonly BoardTrinket[];\r\n\topponentBoard: readonly BoardEntity[];\r\n\topponentHand: readonly BoardEntity[];\r\n\topponentSecrets: readonly BoardSecret[];\r\n\topponentTrinkets: readonly BoardTrinket[];\r\n\tplayerCardId: string;\r\n\tplayerEntityId: number;\r\n\tplayerHeroPowerCardId: string;\r\n\tplayerHeroPowerEntityId: number;\r\n\tplayerHeroPowerUsed: boolean;\r\n\tplayerHeroPowers: readonly BgsHeroPower[];\r\n\topponentCardId: string;\r\n\topponentEntityId: number;\r\n\topponentHeroPowerCardId: string;\r\n\topponentHeroPowerEntityId: number;\r\n\topponentHeroPowerUsed: boolean;\r\n\topponentHeroPowers: readonly BgsHeroPower[];\r\n\tplayerRewardCardId: string;\r\n\tplayerRewardEntityId: number;\r\n\tplayerRewardData: number;\r\n\topponentRewardCardId: string;\r\n\topponentRewardEntityId: number;\r\n\topponentRewardData: number;\r\n\tsourceEntityId?: number;\r\n\t/** @deprecated */\r\n\ttargetEntityId?: number;\r\n\ttargetEntityIds?: number[];\r\n\r\n\tdamages?: Damage[];\r\n\tspawns?: readonly BoardEntity[];\r\n\tdeaths?: readonly BoardEntity[];\r\n\tdeadMinionsPositionsOnBoard?: readonly number[];\r\n}\r\n\r\nexport interface Damage {\r\n\treadonly sourceEntityId?: number;\r\n\treadonly targetEntityId?: number;\r\n\treadonly damage?: number;\r\n}\r\n\r\nexport const buildGameAction = (\r\n\tplayerHero: BgsPlayerEntity,\r\n\topponentHero: BgsPlayerEntity,\r\n\taction: Partial<GameAction>,\r\n): GameAction => {\r\n\tconst isPlayerSireD = playerHero?.cardId?.startsWith(CardIds.SireDenathrius_BG24_HERO_100);\r\n\tconst isOpponentSireD = opponentHero?.cardId?.startsWith(CardIds.SireDenathrius_BG24_HERO_100);\r\n\tconst result: GameAction = {\r\n\t\t...action,\r\n\r\n\t\tplayerSecrets: (playerHero?.secrets ?? []).filter((s) => !s.triggered),\r\n\t\tplayerCardId: playerHero?.cardId,\r\n\t\tplayerEntityId: playerHero?.entityId,\r\n\r\n\t\tplayerHeroPowerCardId:\r\n\t\t\tplayerHero?.trinkets.find((t) => t.scriptDataNum6 === 3)?.cardId ??\r\n\t\t\t(isPlayerSireD ? playerHero.questRewardEntities?.[0]?.cardId : null) ??\r\n\t\t\tplayerHero?.heroPowers[0]?.cardId,\r\n\t\tplayerHeroPowerEntityId: 100000002,\r\n\t\tplayerHeroPowerUsed: playerHero?.heroPowers[0]?.used,\r\n\t\tplayerHeroPowers: playerHero?.heroPowers,\r\n\r\n\t\tplayerRewardCardId:\r\n\t\t\tisPlayerSireD && playerHero?.questRewardEntities?.length < 2\r\n\t\t\t\t? null\r\n\t\t\t\t: playerHero?.questRewardEntities?.[1]?.cardId ?? playerHero?.questRewards?.[0],\r\n\t\tplayerRewardEntityId:\r\n\t\t\tisPlayerSireD && playerHero?.questRewardEntities?.length < 2\r\n\t\t\t\t? null\r\n\t\t\t\t: playerHero?.questRewardEntities?.[1]?.entityId,\r\n\t\tplayerRewardData:\r\n\t\t\tisPlayerSireD && playerHero?.questRewardEntities?.length < 2\r\n\t\t\t\t? null\r\n\t\t\t\t: playerHero?.questRewardEntities?.[0]?.scriptDataNum1 ?? 0,\r\n\t\tplayerTrinkets: playerHero?.trinkets,\r\n\r\n\t\topponentSecrets: (opponentHero?.secrets ?? []).filter((s) => !s.triggered),\r\n\t\topponentCardId: opponentHero?.cardId,\r\n\t\topponentEntityId: opponentHero?.entityId,\r\n\t\topponentHeroPowerCardId:\r\n\t\t\topponentHero?.trinkets.find((t) => t.scriptDataNum6 === 3)?.cardId ??\r\n\t\t\t(isOpponentSireD ? opponentHero.questRewardEntities?.[0]?.cardId : null) ??\r\n\t\t\topponentHero?.heroPowers[0]?.cardId ??\r\n\t\t\topponentHero?.heroPowerId,\r\n\t\topponentHeroPowerEntityId: 200000002,\r\n\t\topponentHeroPowerUsed: opponentHero?.heroPowerUsed,\r\n\t\topponentHeroPowers: opponentHero?.heroPowers,\r\n\t\topponentRewardCardId:\r\n\t\t\tisOpponentSireD && opponentHero?.questRewardEntities?.length < 2\r\n\t\t\t\t? null\r\n\t\t\t\t: opponentHero?.questRewardEntities?.[1]?.cardId ?? opponentHero?.questRewards?.[0],\r\n\t\topponentRewardEntityId:\r\n\t\t\tisOpponentSireD && opponentHero?.questRewardEntities?.length < 2\r\n\t\t\t\t? null\r\n\t\t\t\t: opponentHero?.questRewardEntities?.[1]?.entityId,\r\n\t\topponentRewardData:\r\n\t\t\tisOpponentSireD && opponentHero?.questRewardEntities?.length < 2\r\n\t\t\t\t? null\r\n\t\t\t\t: opponentHero?.questRewardEntities?.[0]?.scriptDataNum1 ?? 0,\r\n\t\topponentTrinkets: opponentHero?.trinkets,\r\n\t} as GameAction;\r\n\treturn result;\r\n};\r\n"]}
|