@firestone-hs/simulate-bgs-battle 1.1.582 → 1.1.584

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/cards/cards-data.js +4 -4
  2. package/dist/cards/cards-data.js.map +1 -1
  3. package/dist/cards/impl/hero-power/rapid-reanimation.js +1 -3
  4. package/dist/cards/impl/hero-power/rapid-reanimation.js.map +1 -1
  5. package/dist/cards/impl/minion/amplifying-lightspawn.js +6 -2
  6. package/dist/cards/impl/minion/amplifying-lightspawn.js.map +1 -1
  7. package/dist/cards/impl/minion/apprentice-of-sefin.d.ts +2 -2
  8. package/dist/cards/impl/minion/apprentice-of-sefin.js +5 -9
  9. package/dist/cards/impl/minion/apprentice-of-sefin.js.map +1 -1
  10. package/dist/cards/impl/minion/bronze-steward.js +2 -2
  11. package/dist/cards/impl/minion/bronze-steward.js.map +1 -1
  12. package/dist/cards/impl/minion/dastardly-drust.js +7 -3
  13. package/dist/cards/impl/minion/dastardly-drust.js.map +1 -1
  14. package/dist/cards/impl/minion/drustfallen-butcher.js +1 -1
  15. package/dist/cards/impl/minion/drustfallen-butcher.js.map +1 -1
  16. package/dist/cards/impl/minion/fire-forged-evoker.js +1 -1
  17. package/dist/cards/impl/minion/fire-forged-evoker.js.map +1 -1
  18. package/dist/cards/impl/minion/fireworks-fanatic.js +1 -1
  19. package/dist/cards/impl/minion/fireworks-fanatic.js.map +1 -1
  20. package/dist/cards/impl/minion/gentle-stag.js +1 -1
  21. package/dist/cards/impl/minion/gentle-stag.js.map +1 -1
  22. package/dist/cards/impl/minion/goldgrubber.js +1 -1
  23. package/dist/cards/impl/minion/goldgrubber.js.map +1 -1
  24. package/dist/cards/impl/minion/hackerfin.js +10 -6
  25. package/dist/cards/impl/minion/hackerfin.js.map +1 -1
  26. package/dist/cards/impl/minion/lokholar-frostforger.js +1 -1
  27. package/dist/cards/impl/minion/lokholar-frostforger.js.map +1 -1
  28. package/dist/cards/impl/minion/noisul-of-the-many-faces.js +4 -6
  29. package/dist/cards/impl/minion/noisul-of-the-many-faces.js.map +1 -1
  30. package/dist/cards/impl/minion/silithid-burrower.js +1 -1
  31. package/dist/cards/impl/minion/silithid-burrower.js.map +1 -1
  32. package/dist/cards/impl/minion/valiant-tiger.js +1 -1
  33. package/dist/cards/impl/minion/valiant-tiger.js.map +1 -1
  34. package/dist/cards/impl/trinket/battle-horn.js +1 -1
  35. package/dist/cards/impl/trinket/battle-horn.js.map +1 -1
  36. package/dist/cards/impl/trinket/eclectic-shrine.js +5 -3
  37. package/dist/cards/impl/trinket/eclectic-shrine.js.map +1 -1
  38. package/dist/cards/impl/trinket/hogwash-basin.js +1 -1
  39. package/dist/cards/impl/trinket/hogwash-basin.js.map +1 -1
  40. package/dist/cards/impl/trinket/unholy-sanctum.js +1 -1
  41. package/dist/cards/impl/trinket/unholy-sanctum.js.map +1 -1
  42. package/dist/simulation/add-minion-to-board.js +7 -7
  43. package/dist/simulation/add-minion-to-board.js.map +1 -1
  44. package/dist/simulation/deathrattle-effects.js +1 -1
  45. package/dist/simulation/deathrattle-effects.js.map +1 -1
  46. package/dist/simulation/spawn-fail.js +3 -2
  47. package/dist/simulation/spawn-fail.js.map +1 -1
  48. package/dist/simulation/stats.d.ts +1 -1
  49. package/dist/simulation/stats.js +4 -3
  50. package/dist/simulation/stats.js.map +1 -1
  51. package/dist/simulation/utils/golden.js +2 -2
  52. package/dist/simulation/utils/golden.js.map +1 -1
  53. package/dist/utils.d.ts +1 -0
  54. package/dist/utils.js +5 -1
  55. package/dist/utils.js.map +1 -1
  56. package/package.json +1 -1
@@ -51,7 +51,6 @@ class CardsData {
51
51
  .getCards()
52
52
  .filter((card) => (0, reference_data_1.isBattlegroundsCard)(card))
53
53
  .filter((card) => { var _a; return card.isBaconPool || ((_a = this.allCards.getCard(card.battlegroundsNormalDbfId)) === null || _a === void 0 ? void 0 : _a.isBaconPool); })
54
- .filter((card) => !!card.techLevel)
55
54
  .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
55
  .filter((card) => !(0, utils_2.hasMechanic)(card, reference_data_1.GameTag[reference_data_1.GameTag.BACON_BUDDY]))
57
56
  .filter((card) => card.set !== 'Vanilla')
@@ -166,9 +165,10 @@ class CardsData {
166
165
  case "BG27_010_G":
167
166
  case "BG30_MagicItem_437":
168
167
  return 5;
169
- case "BG30_MagicItem_713":
170
168
  case "BG28_Reward_518":
171
169
  return 7;
170
+ case "BG30_MagicItem_713":
171
+ return 8;
172
172
  }
173
173
  return 0;
174
174
  }
@@ -188,13 +188,13 @@ class CardsData {
188
188
  case "BG30_MagicItem_918":
189
189
  return 1;
190
190
  case "BG30_MagicItem_546":
191
- case "BG30_MagicItem_442":
192
191
  return 2;
192
+ case "BG30_MagicItem_442":
193
193
  case "BG30_MagicItem_910":
194
194
  case "BG32_MagicItem_363":
195
195
  return 3;
196
196
  case "BG30_MagicItem_886":
197
- return 4;
197
+ return 5;
198
198
  default:
199
199
  return 0;
200
200
  }
@@ -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,qDAAsE;AACtE,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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BAAQ,CAAC,MAAM,CAAC,CAAA,EAAA,CAAC;aAClE,MAAM,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;IAEM,oBAAoB;QAC1B,OAAO,IAAI,CAAC;IACb,CAAC;CACD;AAtQD,8BAsQC","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, hasDefaultScriptDataNum } 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\tconst defaultScriptDataNumImpl = cardMappings[cardId];\r\n\t\tif (hasDefaultScriptDataNum(defaultScriptDataNumImpl)) {\r\n\t\t\treturn defaultScriptDataNumImpl.defaultScriptDataNum(cardId);\r\n\t\t}\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\tcase CardIds.FaerieDragonScale_BG32_MagicItem_363:\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\tpublic getRandomTavernSpell(): string {\r\n\t\treturn null;\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,qDAAsE;AACtE,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,QAA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9D,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,WAAC,OAAA,CAAA,MAAA,CAAC,CAAC,IAAI,0CAAE,WAAW,EAAE,MAAK,yBAAQ,CAAC,yBAAQ,CAAC,MAAM,CAAC,CAAA,EAAA,CAAC;aAClE,MAAM,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;IAEM,oBAAoB;QAC1B,OAAO,IAAI,CAAC;IACb,CAAC;CACD;AAtQD,8BAsQC","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, hasDefaultScriptDataNum } 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.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.StableAmalgamation_BG28_Reward_518:\r\n\t\t\t\treturn 7;\r\n\t\t\tcase CardIds.BleedingHeart_BG30_MagicItem_713:\r\n\t\t\t\treturn 8;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}\r\n\r\n\tpublic defaultScriptDataNum(cardId: string): number {\r\n\t\tconst defaultScriptDataNumImpl = cardMappings[cardId];\r\n\t\tif (hasDefaultScriptDataNum(defaultScriptDataNumImpl)) {\r\n\t\t\treturn defaultScriptDataNumImpl.defaultScriptDataNum(cardId);\r\n\t\t}\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\t\treturn 2;\r\n\t\t\tcase CardIds.BloodGolemSticker_BG30_MagicItem_442:\r\n\t\t\tcase CardIds.MechagonAdapter_BG30_MagicItem_910:\r\n\t\t\tcase CardIds.FaerieDragonScale_BG32_MagicItem_363:\r\n\t\t\t\treturn 3;\r\n\t\t\tcase CardIds.ReinforcedShield_BG30_MagicItem_886:\r\n\t\t\t\treturn 5;\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\tpublic getRandomTavernSpell(): string {\r\n\t\treturn null;\r\n\t}\r\n}\r\n"]}
@@ -15,9 +15,7 @@ exports.RapidReanimation = {
15
15
  .originEntityId -
16
16
  a.enchantments.find((e) => e.cardId === "BG25_HERO_103pe").originEntityId || b.entityId - a.entityId)[0];
17
17
  if (minionThatWillDie) {
18
- const rapidReanimationIndexFromLeft = input.playerBoard.indexOf(minionThatWillDie) === input.playerBoard.length - 1
19
- ? input.playerBoard.indexOf(minionThatWillDie)
20
- : input.playerBoard.indexOf(minionThatWillDie) + 1;
18
+ const rapidReanimationIndexFromLeft = input.playerBoard.indexOf(minionThatWillDie);
21
19
  input.playerEntity.rapidReanimationIndexFromRight =
22
20
  input.playerBoard.length - 1 - rapidReanimationIndexFromLeft;
23
21
  const minionToCopy = (0, utils_1.copyEntity)(minionThatWillDie);
@@ -1 +1 @@
1
- {"version":3,"file":"rapid-reanimation.js","sourceRoot":"","sources":["../../../../src/cards/impl/hero-power/rapid-reanimation.ts"],"names":[],"mappings":";;;AAEA,iFAA8E;AAE9E,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,SAAS,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,IAAI,EAAE;gBAM1E,MAAM,iBAAiB,GAAG,KAAK,CAAC,WAAW;qBACzC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,sBAAuD,CAAC,CAC3F;qBACA,IAAI,CACJ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACR,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,sBAAuD,CAAC;qBACzF,cAAc;oBACf,CAAC,CAAC,YAAY,CAAC,IAAI,CAClB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,sBAAuD,CACtE,CAAC,cAAc,IAAI,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAC7C,CAAC,CAAC,CAAC,CAAC;gBACN,IAAI,iBAAiB,EAAE;oBAWtB,MAAM,6BAA6B,GAClC,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,iBAAiB,CAAC,KAAK,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC;wBAC5E,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,iBAAiB,CAAC;wBAC9C,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;oBAErD,KAAK,CAAC,YAAY,CAAC,8BAA8B;wBAChD,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,GAAG,6BAA6B,CAAC;oBAC9D,MAAM,YAAY,GAAG,IAAA,kBAAU,EAAC,iBAAiB,CAAC,CAAC;oBAGnD,IAAA,yCAAmB,EAAC,YAAY,EAAE,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;oBAC1F,KAAK,CAAC,YAAY,CAAC,sBAAsB,GAAG,YAAY,CAAC;oBACzD,iBAAiB,CAAC,cAAc,GAAG,IAAI,CAAC;oBACxC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAC5C,KAAK,CAAC,YAAY,EAClB,iBAAiB,EACjB,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 { removeAurasFromSelf } from '../../../simulation/add-minion-to-board';\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\t// Still looks like a HS bug where the minion is resurrected to the right of its supposed position\r\n\t\t\t\t\tconst rapidReanimationIndexFromLeft =\r\n\t\t\t\t\t\tinput.playerBoard.indexOf(minionThatWillDie) === input.playerBoard.length - 1\r\n\t\t\t\t\t\t\t? input.playerBoard.indexOf(minionThatWillDie)\r\n\t\t\t\t\t\t\t: input.playerBoard.indexOf(minionThatWillDie) + 1;\r\n\t\t\t\t\t// 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// Actually we should: a dead Goldrinn is then buffed by the auras upon resummon\r\n\t\t\t\t\tremoveAurasFromSelf(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"]}
1
+ {"version":3,"file":"r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GAAG,IAAA,kBAAU,EAAC,iBAAiB,CAAC,CAAC;oBAGnD,IAAA,yCAAmB,EAAC,YAAY,EAAE,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;oBAC1F,KAAK,CAAC,YAAY,CAAC,sBAAsB,GAAG,YAAY,CAAC;oBACzD,iBAAiB,CAAC,cAAc,GAAG,IAAI,CAAC;oBACxC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAC5C,KAAK,CAAC,YAAY,EAClB,iBAAiB,EACjB,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 { removeAurasFromSelf } from '../../../simulation/add-minion-to-board';\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\t// input.playerBoard.indexOf(minionThatWillDie) === input.playerBoard.length - 1\r\n\t\t\t\t\t// \t? input.playerBoard.indexOf(minionThatWillDie)\r\n\t\t\t\t\t// \t: input.playerBoard.indexOf(minionThatWillDie) + 1;\r\n\t\t\t\t\t// 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// Actually we should: a dead Goldrinn is then buffed by the auras upon resummon\r\n\t\t\t\t\tremoveAurasFromSelf(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"]}
@@ -5,8 +5,12 @@ exports.AmplifyingLightspawn = {
5
5
  cardIds: ["BG32_845", "BG32_845_G"],
6
6
  endOfTurn: (minion, input) => {
7
7
  const mult = minion.cardId === "BG32_845_G" ? 2 : 1;
8
- input.hero.globalInfo.ElementalAttackBuff += 1 * mult;
9
- input.hero.globalInfo.ElementalHealthBuff += 1 * mult;
8
+ if (minion.scriptDataNum1 === 1) {
9
+ input.hero.globalInfo.ElementalAttackBuff += 1 * mult;
10
+ }
11
+ else {
12
+ input.hero.globalInfo.ElementalHealthBuff += 1 * mult;
13
+ }
10
14
  return true;
11
15
  },
12
16
  };
@@ -1 +1 @@
1
- {"version":3,"file":"amplifying-lightspawn.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/amplifying-lightspawn.ts"],"names":[],"mappings":";;;AAIa,QAAA,oBAAoB,GAAkB;IAClD,OAAO,EAAE,0BAAgF;IACzF,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAW,EAAE;QAClE,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAA4C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/E,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,mBAAmB,IAAI,CAAC,GAAG,IAAI,CAAC;QACtD,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,mBAAmB,IAAI,CAAC,GAAG,IAAI,CAAC;QACtD,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { EndOfTurnCard, EndOfTurnInput } from '../../card.interface';\r\n\r\nexport const AmplifyingLightspawn: EndOfTurnCard = {\r\n\tcardIds: [CardIds.AmplifyingLightspawn_BG32_845, CardIds.AmplifyingLightspawn_BG32_845_G],\r\n\tendOfTurn: (minion: BoardEntity, input: EndOfTurnInput): boolean => {\r\n\t\tconst mult = minion.cardId === CardIds.AmplifyingLightspawn_BG32_845_G ? 2 : 1;\r\n\t\tinput.hero.globalInfo.ElementalAttackBuff += 1 * mult;\r\n\t\tinput.hero.globalInfo.ElementalHealthBuff += 1 * mult;\r\n\t\treturn true;\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"amplifying-lightspawn.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/amplifying-lightspawn.ts"],"names":[],"mappings":";;;AAIa,QAAA,oBAAoB,GAAkB;IAClD,OAAO,EAAE,0BAAgF;IACzF,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAW,EAAE;QAClE,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAA4C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/E,IAAI,MAAM,CAAC,cAAc,KAAK,CAAC,EAAE;YAChC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,mBAAmB,IAAI,CAAC,GAAG,IAAI,CAAC;SACtD;aAAM;YACN,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,mBAAmB,IAAI,CAAC,GAAG,IAAI,CAAC;SACtD;QACD,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { EndOfTurnCard, EndOfTurnInput } from '../../card.interface';\r\n\r\nexport const AmplifyingLightspawn: EndOfTurnCard = {\r\n\tcardIds: [CardIds.AmplifyingLightspawn_BG32_845, CardIds.AmplifyingLightspawn_BG32_845_G],\r\n\tendOfTurn: (minion: BoardEntity, input: EndOfTurnInput): boolean => {\r\n\t\tconst mult = minion.cardId === CardIds.AmplifyingLightspawn_BG32_845_G ? 2 : 1;\r\n\t\tif (minion.scriptDataNum1 === 1) {\r\n\t\t\tinput.hero.globalInfo.ElementalAttackBuff += 1 * mult;\r\n\t\t} else {\r\n\t\t\tinput.hero.globalInfo.ElementalHealthBuff += 1 * mult;\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n};\r\n"]}
@@ -1,6 +1,6 @@
1
1
  import { BgsPlayerEntity } from '../../../bgs-player-entity';
2
2
  import { BoardEntity } from '../../../board-entity';
3
3
  import { FullGameState } from '../../../simulation/internal-game-state';
4
- import { BattlecryCard } from '../../card.interface';
5
- export declare const ApprenticeOfSefin: BattlecryCard;
4
+ import { EndOfTurnCard } from '../../card.interface';
5
+ export declare const ApprenticeOfSefin: EndOfTurnCard;
6
6
  export declare const grantRandomBonusKeywords: (target: BoardEntity, mult: number, board: BoardEntity[], hero: BgsPlayerEntity, otherHero: BgsPlayerEntity, gameState: FullGameState) => void;
@@ -10,19 +10,15 @@ const venomous_1 = require("../../../keywords/venomous");
10
10
  const windfury_1 = require("../../../keywords/windfury");
11
11
  const utils_1 = require("../../../services/utils");
12
12
  const stats_1 = require("../../../simulation/stats");
13
- const utils_2 = require("../../../utils");
14
13
  const cards_data_1 = require("../../cards-data");
15
14
  exports.ApprenticeOfSefin = {
16
15
  cardIds: ["BG32_332", "BG32_332_G"],
17
- battlecry: (minion, input) => {
18
- const murlocs = input.board.filter((e) => (0, utils_2.hasCorrectTribe)(e, input.hero, reference_data_1.Race.MURLOC, input.gameState.anomalies, input.gameState.allCards));
19
- const target = (0, utils_1.pickRandom)(murlocs);
20
- if (!target) {
21
- return true;
22
- }
16
+ endOfTurn: (minion, input) => {
23
17
  const mult = minion.cardId === "BG32_332_G" ? 2 : 1;
24
- (0, exports.grantRandomBonusKeywords)(target, mult, input.board, input.hero, input.otherHero, input.gameState);
25
- (0, stats_1.modifyStats)(target, minion, 4 * mult, 4 * mult, input.board, input.hero, input.gameState);
18
+ for (let i = 0; i < mult; i++) {
19
+ (0, exports.grantRandomBonusKeywords)(minion, mult, input.board, input.hero, input.otherHero, input.gameState);
20
+ }
21
+ (0, stats_1.modifyStats)(minion, minion, 4, 4, input.board, input.hero, input.gameState);
26
22
  return true;
27
23
  },
28
24
  };
@@ -1 +1 @@
1
- {"version":3,"file":"apprentice-of-sefin.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/apprentice-of-sefin.ts"],"names":[],"mappings":";;;AAAA,iEAAsE;AAGtE,mEAAqE;AACrE,qDAAwD;AACxD,uDAA0D;AAC1D,mDAAsD;AACtD,yDAA4D;AAC5D,yDAA4D;AAC5D,mDAAqD;AAGrD,qDAAwD;AACxD,0CAAiD;AAEjD,iDAAsD;AAEzC,QAAA,iBAAiB,GAAkB;IAC/C,OAAO,EAAE,0BAA0E;IACnF,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QACzD,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CACxC,IAAA,uBAAe,EAAC,CAAC,EAAE,KAAK,CAAC,IAAI,EAAE,qBAA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,EAAE,SAAS,CAAC,CAAC;gBAC7D,MAAM;YACP,KAAK,wBAAO,CAAC,QAAQ;gBACpB,IAAA,yBAAc,EAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;gBAChE,MAAM;YACP,KAAK,wBAAO,CAAC,QAAQ;gBACpB,IAAA,yBAAc,EAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;gBAChE,MAAM;YACP,KAAK,wBAAO,CAAC,OAAO;gBACnB,IAAA,uBAAa,EAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;gBAC/D,MAAM;YACP,KAAK,wBAAO,CAAC,MAAM;gBAClB,IAAA,qBAAY,EAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;gBAC9D,MAAM;SACP;KACD;AACF,CAAC,CAAC;AAtDW,QAAA,wBAAwB,4BAsDnC","sourcesContent":["import { CardIds, GameTag, Race } from '@firestone-hs/reference-data';\r\nimport { BgsPlayerEntity } from '../../../bgs-player-entity';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { updateDivineShield } from '../../../keywords/divine-shield';\r\nimport { updateReborn } from '../../../keywords/reborn';\r\nimport { updateStealth } from '../../../keywords/stealth';\r\nimport { updateTaunt } from '../../../keywords/taunt';\r\nimport { updateVenomous } from '../../../keywords/venomous';\r\nimport { updateWindfury } from '../../../keywords/windfury';\r\nimport { pickRandom } from '../../../services/utils';\r\nimport { BattlecryInput } from '../../../simulation/battlecries';\r\nimport { FullGameState } from '../../../simulation/internal-game-state';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { hasCorrectTribe } from '../../../utils';\r\nimport { BattlecryCard } from '../../card.interface';\r\nimport { validBonusKeywords } from '../../cards-data';\r\n\r\nexport const ApprenticeOfSefin: BattlecryCard = {\r\n\tcardIds: [CardIds.ApprenticeOfSefin_BG32_332, CardIds.ApprenticeOfSefin_BG32_332_G],\r\n\tbattlecry: (minion: BoardEntity, input: BattlecryInput) => {\r\n\t\tconst murlocs = input.board.filter((e) =>\r\n\t\t\thasCorrectTribe(e, input.hero, Race.MURLOC, input.gameState.anomalies, input.gameState.allCards),\r\n\t\t);\r\n\t\tconst target = pickRandom(murlocs);\r\n\t\tif (!target) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tconst mult = minion.cardId === CardIds.ApprenticeOfSefin_BG32_332_G ? 2 : 1;\r\n\t\tgrantRandomBonusKeywords(target, mult, input.board, input.hero, input.otherHero, input.gameState);\r\n\t\tmodifyStats(target, minion, 4 * mult, 4 * mult, input.board, input.hero, input.gameState);\r\n\t\treturn true;\r\n\t},\r\n};\r\n\r\nexport const grantRandomBonusKeywords = (\r\n\ttarget: BoardEntity,\r\n\tmult: number,\r\n\tboard: BoardEntity[],\r\n\thero: BgsPlayerEntity,\r\n\totherHero: BgsPlayerEntity,\r\n\tgameState: FullGameState,\r\n) => {\r\n\tlet possibleKeywords = [...validBonusKeywords];\r\n\tfor (let i = 0; i < mult; i++) {\r\n\t\tif (target.divineShield) {\r\n\t\t\tpossibleKeywords = possibleKeywords.filter((possibleKeyword) => possibleKeyword !== GameTag.DIVINE_SHIELD);\r\n\t\t}\r\n\t\tif (target.taunt) {\r\n\t\t\tpossibleKeywords = possibleKeywords.filter((possibleKeyword) => possibleKeyword !== GameTag.TAUNT);\r\n\t\t}\r\n\t\tif (target.venomous) {\r\n\t\t\tpossibleKeywords = possibleKeywords.filter((possibleKeyword) => possibleKeyword !== GameTag.VENOMOUS);\r\n\t\t}\r\n\t\tif (target.windfury) {\r\n\t\t\tpossibleKeywords = possibleKeywords.filter((possibleKeyword) => possibleKeyword !== GameTag.WINDFURY);\r\n\t\t}\r\n\t\tif (target.stealth) {\r\n\t\t\tpossibleKeywords = possibleKeywords.filter((possibleKeyword) => possibleKeyword !== GameTag.STEALTH);\r\n\t\t}\r\n\t\tif (target.reborn) {\r\n\t\t\tpossibleKeywords = possibleKeywords.filter((possibleKeyword) => possibleKeyword !== GameTag.REBORN);\r\n\t\t}\r\n\t\tif (possibleKeywords.length === 0) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tconst targetKeyword = pickRandom(possibleKeywords);\r\n\t\tpossibleKeywords = possibleKeywords.filter((possibleKeyword) => possibleKeyword !== targetKeyword);\r\n\t\tswitch (targetKeyword) {\r\n\t\t\tcase GameTag.DIVINE_SHIELD:\r\n\t\t\t\tupdateDivineShield(target, board, hero, otherHero, true, gameState);\r\n\t\t\t\tbreak;\r\n\t\t\tcase GameTag.TAUNT:\r\n\t\t\t\tupdateTaunt(target, true, board, hero, otherHero, gameState);\r\n\t\t\t\tbreak;\r\n\t\t\tcase GameTag.VENOMOUS:\r\n\t\t\t\tupdateVenomous(target, true, board, hero, otherHero, gameState);\r\n\t\t\t\tbreak;\r\n\t\t\tcase GameTag.WINDFURY:\r\n\t\t\t\tupdateWindfury(target, true, board, hero, otherHero, gameState);\r\n\t\t\t\tbreak;\r\n\t\t\tcase GameTag.STEALTH:\r\n\t\t\t\tupdateStealth(target, true, board, hero, otherHero, gameState);\r\n\t\t\t\tbreak;\r\n\t\t\tcase GameTag.REBORN:\r\n\t\t\t\tupdateReborn(target, true, board, hero, otherHero, gameState);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n};\r\n"]}
1
+ {"version":3,"file":"apprentice-of-sefin.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/apprentice-of-sefin.ts"],"names":[],"mappings":";;;AAAA,iEAAgE;AAGhE,mEAAqE;AACrE,qDAAwD;AACxD,uDAA0D;AAC1D,mDAAsD;AACtD,yDAA4D;AAC5D,yDAA4D;AAC5D,mDAAqD;AAErD,qDAAwD;AAExD,iDAAsD;AAEzC,QAAA,iBAAiB,GAAkB;IAC/C,OAAO,EAAE,0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C,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;gBAChE,MAAM;YACP,KAAK,wBAAO,CAAC,QAAQ;gBACpB,IAAA,yBAAc,EAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;gBAChE,MAAM;YACP,KAAK,wBAAO,CAAC,OAAO;gBACnB,IAAA,uBAAa,EAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;gBAC/D,MAAM;YACP,KAAK,wBAAO,CAAC,MAAM;gBAClB,IAAA,qBAAY,EAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;gBAC9D,MAAM;SACP;KACD;AACF,CAAC,CAAC;AAtDW,QAAA,wBAAwB,4BAsDnC","sourcesContent":["import { CardIds, GameTag } from '@firestone-hs/reference-data';\r\nimport { BgsPlayerEntity } from '../../../bgs-player-entity';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { updateDivineShield } from '../../../keywords/divine-shield';\r\nimport { updateReborn } from '../../../keywords/reborn';\r\nimport { updateStealth } from '../../../keywords/stealth';\r\nimport { updateTaunt } from '../../../keywords/taunt';\r\nimport { updateVenomous } from '../../../keywords/venomous';\r\nimport { updateWindfury } from '../../../keywords/windfury';\r\nimport { pickRandom } from '../../../services/utils';\r\nimport { FullGameState } from '../../../simulation/internal-game-state';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { EndOfTurnCard, EndOfTurnInput } from '../../card.interface';\r\nimport { validBonusKeywords } from '../../cards-data';\r\n\r\nexport const ApprenticeOfSefin: EndOfTurnCard = {\r\n\tcardIds: [CardIds.ApprenticeOfSefin_BG32_332, CardIds.ApprenticeOfSefin_BG32_332_G],\r\n\tendOfTurn: (minion: BoardEntity, input: EndOfTurnInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.ApprenticeOfSefin_BG32_332_G ? 2 : 1;\r\n\t\tfor (let i = 0; i < mult; i++) {\r\n\t\t\tgrantRandomBonusKeywords(minion, mult, input.board, input.hero, input.otherHero, input.gameState);\r\n\t\t}\r\n\t\tmodifyStats(minion, minion, 4, 4, input.board, input.hero, input.gameState);\r\n\t\treturn true;\r\n\t},\r\n};\r\n\r\nexport const grantRandomBonusKeywords = (\r\n\ttarget: BoardEntity,\r\n\tmult: number,\r\n\tboard: BoardEntity[],\r\n\thero: BgsPlayerEntity,\r\n\totherHero: BgsPlayerEntity,\r\n\tgameState: FullGameState,\r\n) => {\r\n\tlet possibleKeywords = [...validBonusKeywords];\r\n\tfor (let i = 0; i < mult; i++) {\r\n\t\tif (target.divineShield) {\r\n\t\t\tpossibleKeywords = possibleKeywords.filter((possibleKeyword) => possibleKeyword !== GameTag.DIVINE_SHIELD);\r\n\t\t}\r\n\t\tif (target.taunt) {\r\n\t\t\tpossibleKeywords = possibleKeywords.filter((possibleKeyword) => possibleKeyword !== GameTag.TAUNT);\r\n\t\t}\r\n\t\tif (target.venomous) {\r\n\t\t\tpossibleKeywords = possibleKeywords.filter((possibleKeyword) => possibleKeyword !== GameTag.VENOMOUS);\r\n\t\t}\r\n\t\tif (target.windfury) {\r\n\t\t\tpossibleKeywords = possibleKeywords.filter((possibleKeyword) => possibleKeyword !== GameTag.WINDFURY);\r\n\t\t}\r\n\t\tif (target.stealth) {\r\n\t\t\tpossibleKeywords = possibleKeywords.filter((possibleKeyword) => possibleKeyword !== GameTag.STEALTH);\r\n\t\t}\r\n\t\tif (target.reborn) {\r\n\t\t\tpossibleKeywords = possibleKeywords.filter((possibleKeyword) => possibleKeyword !== GameTag.REBORN);\r\n\t\t}\r\n\t\tif (possibleKeywords.length === 0) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tconst targetKeyword = pickRandom(possibleKeywords);\r\n\t\tpossibleKeywords = possibleKeywords.filter((possibleKeyword) => possibleKeyword !== targetKeyword);\r\n\t\tswitch (targetKeyword) {\r\n\t\t\tcase GameTag.DIVINE_SHIELD:\r\n\t\t\t\tupdateDivineShield(target, board, hero, otherHero, true, gameState);\r\n\t\t\t\tbreak;\r\n\t\t\tcase GameTag.TAUNT:\r\n\t\t\t\tupdateTaunt(target, true, board, hero, otherHero, gameState);\r\n\t\t\t\tbreak;\r\n\t\t\tcase GameTag.VENOMOUS:\r\n\t\t\t\tupdateVenomous(target, true, board, hero, otherHero, gameState);\r\n\t\t\t\tbreak;\r\n\t\t\tcase GameTag.WINDFURY:\r\n\t\t\t\tupdateWindfury(target, true, board, hero, otherHero, gameState);\r\n\t\t\t\tbreak;\r\n\t\t\tcase GameTag.STEALTH:\r\n\t\t\t\tupdateStealth(target, true, board, hero, otherHero, gameState);\r\n\t\t\t\tbreak;\r\n\t\t\tcase GameTag.REBORN:\r\n\t\t\t\tupdateReborn(target, true, board, hero, otherHero, gameState);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n};\r\n"]}
@@ -12,7 +12,7 @@ exports.BronzeSteward = {
12
12
  .filter((e) => e.entityId !== minion.entityId)
13
13
  .filter((e) => (0, utils_1.hasCorrectTribe)(e, input.hero, reference_data_1.Race.DRAGON, input.gameState.anomalies, input.gameState.allCards));
14
14
  targets.forEach((target) => {
15
- (0, stats_1.modifyStats)(target, minion, 7 * mult, 0, input.board, input.hero, input.gameState);
15
+ (0, stats_1.modifyStats)(target, minion, 10 * mult, 0, input.board, input.hero, input.gameState);
16
16
  });
17
17
  return true;
18
18
  },
@@ -22,7 +22,7 @@ exports.BronzeSteward = {
22
22
  .filter((e) => e.entityId !== minion.entityId)
23
23
  .filter((e) => (0, utils_1.hasCorrectTribe)(e, input.boardWithDeadEntityHero, reference_data_1.Race.DRAGON, input.gameState.anomalies, input.gameState.allCards));
24
24
  targets.forEach((target) => {
25
- (0, stats_1.modifyStats)(target, minion, 7 * mult, 0, input.boardWithDeadEntity, input.boardWithDeadEntityHero, input.gameState);
25
+ (0, stats_1.modifyStats)(target, minion, 10 * mult, 0, input.boardWithDeadEntity, input.boardWithDeadEntityHero, input.gameState);
26
26
  });
27
27
  return [];
28
28
  },
@@ -1 +1 @@
1
- {"version":3,"file":"bronze-steward.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/bronze-steward.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAI7D,qDAAwD;AACxD,0CAAiD;AAGpC,QAAA,aAAa,GAAyC;IAClE,OAAO,EAAE,0BAAkE;IAC3E,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QACzD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAqC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACxE,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK;aACzB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,MAAM,CAAC,QAAQ,CAAC;aAC7C,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CACb,IAAA,uBAAe,EAAC,CAAC,EAAE,KAAK,CAAC,IAAI,EAAE,qBAAI,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAChG,CAAC;QACH,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YAC1B,IAAA,mBAAW,EAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QACpF,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACb,CAAC;IACD,gBAAgB,EAAE,CAAC,MAAmB,EAAE,KAAgC,EAAE,EAAE;QAC3E,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAqC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACxE,MAAM,OAAO,GAAG,KAAK,CAAC,mBAAmB;aACvC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,MAAM,CAAC,QAAQ,CAAC;aAC7C,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CACb,IAAA,uBAAe,EACd,CAAC,EACD,KAAK,CAAC,uBAAuB,EAC7B,qBAAI,CAAC,MAAM,EACX,KAAK,CAAC,SAAS,CAAC,SAAS,EACzB,KAAK,CAAC,SAAS,CAAC,QAAQ,CACxB,CACD,CAAC;QACH,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YAC1B,IAAA,mBAAW,EACV,MAAM,EACN,MAAM,EACN,CAAC,GAAG,IAAI,EACR,CAAC,EACD,KAAK,CAAC,mBAAmB,EACzB,KAAK,CAAC,uBAAuB,EAC7B,KAAK,CAAC,SAAS,CACf,CAAC;QACH,CAAC,CAAC,CAAC;QACH,OAAO,EAAE,CAAC;IACX,CAAC;CACD,CAAC","sourcesContent":["import { CardIds, Race } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { BattlecryInput } from '../../../simulation/battlecries';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { hasCorrectTribe } from '../../../utils';\r\nimport { BattlecryCard, DeathrattleSpawnCard } from '../../card.interface';\r\n\r\nexport const BronzeSteward: BattlecryCard & DeathrattleSpawnCard = {\r\n\tcardIds: [CardIds.BronzeSteward_BG32_824, CardIds.BronzeSteward_BG32_824_G],\r\n\tbattlecry: (minion: BoardEntity, input: BattlecryInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.BronzeSteward_BG32_824_G ? 2 : 1;\r\n\t\tconst targets = input.board\r\n\t\t\t.filter((e) => e.entityId !== minion.entityId)\r\n\t\t\t.filter((e) =>\r\n\t\t\t\thasCorrectTribe(e, input.hero, Race.DRAGON, input.gameState.anomalies, input.gameState.allCards),\r\n\t\t\t);\r\n\t\ttargets.forEach((target) => {\r\n\t\t\tmodifyStats(target, minion, 7 * mult, 0, input.board, input.hero, input.gameState);\r\n\t\t});\r\n\t\treturn true;\r\n\t},\r\n\tdeathrattleSpawn: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.BronzeSteward_BG32_824_G ? 2 : 1;\r\n\t\tconst targets = input.boardWithDeadEntity\r\n\t\t\t.filter((e) => e.entityId !== minion.entityId)\r\n\t\t\t.filter((e) =>\r\n\t\t\t\thasCorrectTribe(\r\n\t\t\t\t\te,\r\n\t\t\t\t\tinput.boardWithDeadEntityHero,\r\n\t\t\t\t\tRace.DRAGON,\r\n\t\t\t\t\tinput.gameState.anomalies,\r\n\t\t\t\t\tinput.gameState.allCards,\r\n\t\t\t\t),\r\n\t\t\t);\r\n\t\ttargets.forEach((target) => {\r\n\t\t\tmodifyStats(\r\n\t\t\t\ttarget,\r\n\t\t\t\tminion,\r\n\t\t\t\t7 * mult,\r\n\t\t\t\t0,\r\n\t\t\t\tinput.boardWithDeadEntity,\r\n\t\t\t\tinput.boardWithDeadEntityHero,\r\n\t\t\t\tinput.gameState,\r\n\t\t\t);\r\n\t\t});\r\n\t\treturn [];\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"bronze-steward.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/bronze-steward.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAI7D,qDAAwD;AACxD,0CAAiD;AAGpC,QAAA,aAAa,GAAyC;IAClE,OAAO,EAAE,0BAAkE;IAC3E,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QACzD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAqC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACxE,MAAM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M,EACN,EAAE,GAAG,IAAI,EACT,CAAC,EACD,KAAK,CAAC,mBAAmB,EACzB,KAAK,CAAC,uBAAuB,EAC7B,KAAK,CAAC,SAAS,CACf,CAAC;QACH,CAAC,CAAC,CAAC;QACH,OAAO,EAAE,CAAC;IACX,CAAC;CACD,CAAC","sourcesContent":["import { CardIds, Race } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { BattlecryInput } from '../../../simulation/battlecries';\r\nimport { DeathrattleTriggeredInput } from '../../../simulation/deathrattle-on-trigger';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { hasCorrectTribe } from '../../../utils';\r\nimport { BattlecryCard, DeathrattleSpawnCard } from '../../card.interface';\r\n\r\nexport const BronzeSteward: BattlecryCard & DeathrattleSpawnCard = {\r\n\tcardIds: [CardIds.BronzeSteward_BG32_824, CardIds.BronzeSteward_BG32_824_G],\r\n\tbattlecry: (minion: BoardEntity, input: BattlecryInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.BronzeSteward_BG32_824_G ? 2 : 1;\r\n\t\tconst targets = input.board\r\n\t\t\t.filter((e) => e.entityId !== minion.entityId)\r\n\t\t\t.filter((e) =>\r\n\t\t\t\thasCorrectTribe(e, input.hero, Race.DRAGON, input.gameState.anomalies, input.gameState.allCards),\r\n\t\t\t);\r\n\t\ttargets.forEach((target) => {\r\n\t\t\tmodifyStats(target, minion, 10 * mult, 0, input.board, input.hero, input.gameState);\r\n\t\t});\r\n\t\treturn true;\r\n\t},\r\n\tdeathrattleSpawn: (minion: BoardEntity, input: DeathrattleTriggeredInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.BronzeSteward_BG32_824_G ? 2 : 1;\r\n\t\tconst targets = input.boardWithDeadEntity\r\n\t\t\t.filter((e) => e.entityId !== minion.entityId)\r\n\t\t\t.filter((e) =>\r\n\t\t\t\thasCorrectTribe(\r\n\t\t\t\t\te,\r\n\t\t\t\t\tinput.boardWithDeadEntityHero,\r\n\t\t\t\t\tRace.DRAGON,\r\n\t\t\t\t\tinput.gameState.anomalies,\r\n\t\t\t\t\tinput.gameState.allCards,\r\n\t\t\t\t),\r\n\t\t\t);\r\n\t\ttargets.forEach((target) => {\r\n\t\t\tmodifyStats(\r\n\t\t\t\ttarget,\r\n\t\t\t\tminion,\r\n\t\t\t\t10 * mult,\r\n\t\t\t\t0,\r\n\t\t\t\tinput.boardWithDeadEntity,\r\n\t\t\t\tinput.boardWithDeadEntityHero,\r\n\t\t\t\tinput.gameState,\r\n\t\t\t);\r\n\t\t});\r\n\t\treturn [];\r\n\t},\r\n};\r\n"]}
@@ -9,10 +9,14 @@ exports.DastardlyDrust = {
9
9
  onCardAddedToHand: (minion, input) => {
10
10
  if ((0, utils_1.hasCorrectTribe)(input.addedCard, input.hero, reference_data_1.Race.PIRATE, input.gameState.anomalies, input.gameState.allCards)) {
11
11
  const mult = minion.cardId === "BG32_234_G" ? 2 : 1;
12
- const targets = input.board.filter((e) => e.entityId !== minion.entityId);
12
+ const targets = input.board;
13
13
  for (const target of targets) {
14
- const buff = (0, utils_1.isGolden)(target.cardId, input.gameState.allCards) ? 2 * mult : 1 * mult;
15
- (0, stats_1.modifyStats)(target, minion, 1 * buff, 1 * buff, input.board, input.hero, input.gameState);
14
+ if ((0, utils_1.isGolden)(target.cardId, input.gameState.allCards)) {
15
+ (0, stats_1.modifyStats)(target, minion, 2 * mult, 3 * mult, input.board, input.hero, input.gameState);
16
+ }
17
+ else {
18
+ (0, stats_1.modifyStats)(target, minion, 1 * mult, 2 * mult, input.board, input.hero, input.gameState);
19
+ }
16
20
  }
17
21
  }
18
22
  },
@@ -1 +1 @@
1
- {"version":3,"file":"dastardly-drust.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/dastardly-drust.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAG7D,qDAAwD;AACxD,0CAA2D;AAG9C,QAAA,cAAc,GAA0B;IACpD,OAAO,EAAE,0BAAoE;IAC7E,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAA6B,EAAE,EAAE;QACzE,IACC,IAAA,uBAAe,EACd,KAAK,CAAC,SAAS,EACf,KAAK,CAAC,IAAI,EACV,qBAAI,CAAC,MAAM,EACX,KAAK,CAAC,SAAS,CAAC,SAAS,EACzB,KAAK,CAAC,SAAS,CAAC,QAAQ,CACxB,EACA;YACD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAsC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACzE,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC1E,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;gBAC7B,MAAM,IAAI,GAAG,IAAA,gBAAQ,EAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;gBACrF,IAAA,mBAAW,EAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;aAC1F;SACD;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds, Race } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { OnCardAddedToHandInput } from '../../../simulation/cards-in-hand';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { hasCorrectTribe, isGolden } from '../../../utils';\r\nimport { OnCardAddedToHandCard } from '../../card.interface';\r\n\r\nexport const DastardlyDrust: OnCardAddedToHandCard = {\r\n\tcardIds: [CardIds.DastardlyDrust_BG32_234, CardIds.DastardlyDrust_BG32_234_G],\r\n\tonCardAddedToHand: (minion: BoardEntity, input: OnCardAddedToHandInput) => {\r\n\t\tif (\r\n\t\t\thasCorrectTribe(\r\n\t\t\t\tinput.addedCard,\r\n\t\t\t\tinput.hero,\r\n\t\t\t\tRace.PIRATE,\r\n\t\t\t\tinput.gameState.anomalies,\r\n\t\t\t\tinput.gameState.allCards,\r\n\t\t\t)\r\n\t\t) {\r\n\t\t\tconst mult = minion.cardId === CardIds.DastardlyDrust_BG32_234_G ? 2 : 1;\r\n\t\t\tconst targets = input.board.filter((e) => e.entityId !== minion.entityId);\r\n\t\t\tfor (const target of targets) {\r\n\t\t\t\tconst buff = isGolden(target.cardId, input.gameState.allCards) ? 2 * mult : 1 * mult;\r\n\t\t\t\tmodifyStats(target, minion, 1 * buff, 1 * buff, input.board, input.hero, input.gameState);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"dastardly-drust.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/dastardly-drust.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAG7D,qDAAwD;AACxD,0CAA2D;AAG9C,QAAA,cAAc,GAA0B;IACpD,OAAO,EAAE,0BAAoE;IAC7E,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAA6B,EAAE,EAAE;QACzE,IACC,IAAA,uBAAe,EACd,KAAK,CAAC,SAAS,EACf,KAAK,CAAC,IAAI,EACV,qBAAI,CAAC,MAAM,EACX,KAAK,CAAC,SAAS,CAAC,SAAS,EACzB,KAAK,CAAC,SAAS,CAAC,QAAQ,CACxB,EACA;YACD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAsC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACzE,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC;YAC5B,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;gBAC7B,IAAI,IAAA,gBAAQ,EAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE;oBACtD,IAAA,mBAAW,EAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;iBAC1F;qBAAM;oBACN,IAAA,mBAAW,EAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;iBAC1F;aACD;SACD;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds, Race } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { OnCardAddedToHandInput } from '../../../simulation/cards-in-hand';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { hasCorrectTribe, isGolden } from '../../../utils';\r\nimport { OnCardAddedToHandCard } from '../../card.interface';\r\n\r\nexport const DastardlyDrust: OnCardAddedToHandCard = {\r\n\tcardIds: [CardIds.DastardlyDrust_BG32_234, CardIds.DastardlyDrust_BG32_234_G],\r\n\tonCardAddedToHand: (minion: BoardEntity, input: OnCardAddedToHandInput) => {\r\n\t\tif (\r\n\t\t\thasCorrectTribe(\r\n\t\t\t\tinput.addedCard,\r\n\t\t\t\tinput.hero,\r\n\t\t\t\tRace.PIRATE,\r\n\t\t\t\tinput.gameState.anomalies,\r\n\t\t\t\tinput.gameState.allCards,\r\n\t\t\t)\r\n\t\t) {\r\n\t\t\tconst mult = minion.cardId === CardIds.DastardlyDrust_BG32_234_G ? 2 : 1;\r\n\t\t\tconst targets = input.board;\r\n\t\t\tfor (const target of targets) {\r\n\t\t\t\tif (isGolden(target.cardId, input.gameState.allCards)) {\r\n\t\t\t\t\tmodifyStats(target, minion, 2 * mult, 3 * mult, input.board, input.hero, input.gameState);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmodifyStats(target, minion, 1 * mult, 2 * mult, input.board, input.hero, input.gameState);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n"]}
@@ -4,7 +4,7 @@ exports.DrustfallenButcher = void 0;
4
4
  const cards_in_hand_1 = require("../../../simulation/cards-in-hand");
5
5
  exports.DrustfallenButcher = {
6
6
  cardIds: ["BG32_324", "BG32_324_G"],
7
- baseAvengeValue: (cardId) => 5,
7
+ baseAvengeValue: (cardId) => 4,
8
8
  avenge: (minion, input) => {
9
9
  const mult = minion.cardId === "BG32_324_G" ? 2 : 1;
10
10
  const cardsToAdd = Array(mult).fill("BG28_604");
@@ -1 +1 @@
1
- {"version":3,"file":"drustfallen-butcher.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/drustfallen-butcher.ts"],"names":[],"mappings":";;;AAGA,qEAAmE;AAGtD,QAAA,kBAAkB,GAAe;IAC7C,OAAO,EAAE,0BAA4E;IACrF,eAAe,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IACtC,MAAM,EAAE,CAAC,MAAmB,EAAE,KAAkB,EAAE,EAAE;QACnD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAA0C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7E,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,YAA6B,CAAC;QACjE,IAAA,8BAAc,EAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IACtE,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { AvengeInput } from '../../../simulation/avenge';\r\nimport { addCardsInHand } from '../../../simulation/cards-in-hand';\r\nimport { AvengeCard } from '../../card.interface';\r\n\r\nexport const DrustfallenButcher: AvengeCard = {\r\n\tcardIds: [CardIds.DrustfallenButcher_BG32_324, CardIds.DrustfallenButcher_BG32_324_G],\r\n\tbaseAvengeValue: (cardId: string) => 5,\r\n\tavenge: (minion: BoardEntity, input: AvengeInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.DrustfallenButcher_BG32_324_G ? 2 : 1;\r\n\t\tconst cardsToAdd = Array(mult).fill(CardIds.Butchering_BG28_604);\r\n\t\taddCardsInHand(input.hero, input.board, cardsToAdd, input.gameState);\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"drustfallen-butcher.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/drustfallen-butcher.ts"],"names":[],"mappings":";;;AAGA,qEAAmE;AAGtD,QAAA,kBAAkB,GAAe;IAC7C,OAAO,EAAE,0BAA4E;IACrF,eAAe,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IACtC,MAAM,EAAE,CAAC,MAAmB,EAAE,KAAkB,EAAE,EAAE;QACnD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAA0C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7E,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,YAA6B,CAAC;QACjE,IAAA,8BAAc,EAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IACtE,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { AvengeInput } from '../../../simulation/avenge';\r\nimport { addCardsInHand } from '../../../simulation/cards-in-hand';\r\nimport { AvengeCard } from '../../card.interface';\r\n\r\nexport const DrustfallenButcher: AvengeCard = {\r\n\tcardIds: [CardIds.DrustfallenButcher_BG32_324, CardIds.DrustfallenButcher_BG32_324_G],\r\n\tbaseAvengeValue: (cardId: string) => 4,\r\n\tavenge: (minion: BoardEntity, input: AvengeInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.DrustfallenButcher_BG32_324_G ? 2 : 1;\r\n\t\tconst cardsToAdd = Array(mult).fill(CardIds.Butchering_BG28_604);\r\n\t\taddCardsInHand(input.hero, input.board, cardsToAdd, input.gameState);\r\n\t},\r\n};\r\n"]}
@@ -8,7 +8,7 @@ exports.FireForgedEvoker = {
8
8
  startOfCombat: (minion, input) => {
9
9
  const mult = minion.cardId === "BG32_822_G" ? 2 : 1;
10
10
  const buff = mult + minion.scriptDataNum2;
11
- (0, utils_1.addStatsToBoard)(minion, input.playerBoard, input.playerEntity, buff, buff, input.gameState, reference_data_1.Race[reference_data_1.Race.DRAGON]);
11
+ (0, utils_1.addStatsToBoard)(minion, input.playerBoard, input.playerEntity, 2 * buff, 1 * buff, input.gameState, reference_data_1.Race[reference_data_1.Race.DRAGON]);
12
12
  return { hasTriggered: true, shouldRecomputeCurrentAttacker: false };
13
13
  },
14
14
  };
@@ -1 +1 @@
1
- {"version":3,"file":"fire-forged-evoker.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/fire-forged-evoker.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAG7D,0CAAiD;AAGpC,QAAA,gBAAgB,GAAsB;IAClD,OAAO,EAAE,0BAAwE;IACjF,aAAa,EAAE,CAAC,MAAmB,EAAE,KAAe,EAAE,EAAE;QACvD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAwC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3E,MAAM,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC,cAAc,CAAC;QAC1C,IAAA,uBAAe,EAAC,MAAM,EAAE,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,SAAS,EAAE,qBAAI,CAAC,qBAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QAC/G,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,8BAA8B,EAAE,KAAK,EAAE,CAAC;IACtE,CAAC;CACD,CAAC","sourcesContent":["import { CardIds, Race } 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 { addStatsToBoard } from '../../../utils';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const FireForgedEvoker: StartOfCombatCard = {\r\n\tcardIds: [CardIds.FireForgedEvoker_BG32_822, CardIds.FireForgedEvoker_BG32_822_G],\r\n\tstartOfCombat: (minion: BoardEntity, input: SoCInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.FireForgedEvoker_BG32_822_G ? 2 : 1;\r\n\t\tconst buff = mult + minion.scriptDataNum2;\r\n\t\taddStatsToBoard(minion, input.playerBoard, input.playerEntity, buff, buff, input.gameState, Race[Race.DRAGON]);\r\n\t\treturn { hasTriggered: true, shouldRecomputeCurrentAttacker: false };\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"fire-forged-evoker.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/fire-forged-evoker.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAG7D,0CAAiD;AAGpC,QAAA,gBAAgB,GAAsB;IAClD,OAAO,EAAE,0BAAwE;IACjF,aAAa,EAAE,CAAC,MAAmB,EAAE,KAAe,EAAE,EAAE;QACvD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAwC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3E,MAAM,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC,cAAc,CAAC;QAC1C,IAAA,uBAAe,EACd,MAAM,EACN,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,YAAY,EAClB,CAAC,GAAG,IAAI,EACR,CAAC,GAAG,IAAI,EACR,KAAK,CAAC,SAAS,EACf,qBAAI,CAAC,qBAAI,CAAC,MAAM,CAAC,CACjB,CAAC;QACF,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,8BAA8B,EAAE,KAAK,EAAE,CAAC;IACtE,CAAC;CACD,CAAC","sourcesContent":["import { CardIds, Race } 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 { addStatsToBoard } from '../../../utils';\r\nimport { StartOfCombatCard } from '../../card.interface';\r\n\r\nexport const FireForgedEvoker: StartOfCombatCard = {\r\n\tcardIds: [CardIds.FireForgedEvoker_BG32_822, CardIds.FireForgedEvoker_BG32_822_G],\r\n\tstartOfCombat: (minion: BoardEntity, input: SoCInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.FireForgedEvoker_BG32_822_G ? 2 : 1;\r\n\t\tconst buff = mult + minion.scriptDataNum2;\r\n\t\taddStatsToBoard(\r\n\t\t\tminion,\r\n\t\t\tinput.playerBoard,\r\n\t\t\tinput.playerEntity,\r\n\t\t\t2 * buff,\r\n\t\t\t1 * buff,\r\n\t\t\tinput.gameState,\r\n\t\t\tRace[Race.DRAGON],\r\n\t\t);\r\n\t\treturn { hasTriggered: true, shouldRecomputeCurrentAttacker: false };\r\n\t},\r\n};\r\n"]}
@@ -18,7 +18,7 @@ exports.FireworksFanatic = {
18
18
  ((_c = input.hero.hand) === null || _c === void 0 ? void 0 : _c.filter((e) => e.entityId !== input.addedCard.entityId).some((e) => e.cardId === input.addedCard.cardId));
19
19
  if (doWeAlreadyHaveThisCard) {
20
20
  const mult = entity.cardId === "BG25_922_G" ? 2 : 1;
21
- (0, utils_1.addStatsToBoard)(entity, input.board, input.hero, 1 * mult, 1 * mult, input.gameState);
21
+ (0, utils_1.addStatsToBoard)(entity, input.board, input.hero, 2 * mult, 2 * mult, input.gameState);
22
22
  }
23
23
  },
24
24
  };
@@ -1 +1 @@
1
- {"version":3,"file":"fireworks-fanatic.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/f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K,CAAC,SAAS,CAAC,CAAC;SACtF;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds, CardType } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { OnCardAddedToHandInput } from '../../../simulation/cards-in-hand';\r\nimport { addStatsToBoard } from '../../../utils';\r\nimport { OnCardAddedToHandCard } from '../../card.interface';\r\n\r\nexport const FireworksFanatic: OnCardAddedToHandCard = {\r\n\tcardIds: [CardIds.FireworksFanatic_BG25_922, CardIds.FireworksFanatic_BG25_922_G],\r\n\tonCardAddedToHand: (entity: BoardEntity, input: OnCardAddedToHandInput) => {\r\n\t\tif (input.addedCard?.cardId == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst refCard = input.gameState.allCards.getCard(input.addedCard.cardId);\r\n\t\tif (refCard?.type?.toUpperCase() !== CardType[CardType.MINION]) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst doWeAlreadyHaveThisCard =\r\n\t\t\tinput.board.some((e) => e.cardId === input.addedCard.cardId) ||\r\n\t\t\tinput.hero.hand\r\n\t\t\t\t?.filter((e) => e.entityId !== input.addedCard.entityId)\r\n\t\t\t\t.some((e) => e.cardId === input.addedCard.cardId);\r\n\t\tif (doWeAlreadyHaveThisCard) {\r\n\t\t\tconst mult = entity.cardId === CardIds.FireworksFanatic_BG25_922_G ? 2 : 1;\r\n\t\t\taddStatsToBoard(entity, input.board, input.hero, 1 * mult, 1 * mult, input.gameState);\r\n\t\t}\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"fireworks-fanatic.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/fireworks-fanatic.ts"],"names":[],"mappings":";;;AAAA,iEAAiE;AAGjE,0CAAiD;AAGpC,QAAA,gBAAgB,GAA0B;IACtD,OAAO,EAAE,0BAAwE;IACjF,iBAAiB,EAAE,CAAC,MAAmB,EAAE,KAA6B,EAAE,EAAE;;QACzE,IAAI,CAAA,MAAA,KAAK,CAAC,SAAS,0CAAE,MAAM,KAAI,IAAI,EAAE;YACpC,OAAO;SACP;QACD,MAAM,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACzE,IAAI,CAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,0CAAE,WAAW,EAAE,MAAK,yBAAQ,CAAC,yBAAQ,CAAC,MAAM,CAAC,EAAE;YAC/D,OAAO;SACP;QACD,MAAM,uBAAuB,GAC5B,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;aAC5D,MAAA,KAAK,CAAC,IAAI,CAAC,IAAI,0CACZ,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,KAAK,CAAC,SAAS,CAAC,QAAQ,EACtD,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA,CAAC;QACpD,IAAI,uBAAuB,EAAE;YAC5B,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAwC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3E,IAAA,uBAAe,EAAC,MAAM,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;SACtF;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds, CardType } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { OnCardAddedToHandInput } from '../../../simulation/cards-in-hand';\r\nimport { addStatsToBoard } from '../../../utils';\r\nimport { OnCardAddedToHandCard } from '../../card.interface';\r\n\r\nexport const FireworksFanatic: OnCardAddedToHandCard = {\r\n\tcardIds: [CardIds.FireworksFanatic_BG25_922, CardIds.FireworksFanatic_BG25_922_G],\r\n\tonCardAddedToHand: (entity: BoardEntity, input: OnCardAddedToHandInput) => {\r\n\t\tif (input.addedCard?.cardId == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst refCard = input.gameState.allCards.getCard(input.addedCard.cardId);\r\n\t\tif (refCard?.type?.toUpperCase() !== CardType[CardType.MINION]) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst doWeAlreadyHaveThisCard =\r\n\t\t\tinput.board.some((e) => e.cardId === input.addedCard.cardId) ||\r\n\t\t\tinput.hero.hand\r\n\t\t\t\t?.filter((e) => e.entityId !== input.addedCard.entityId)\r\n\t\t\t\t.some((e) => e.cardId === input.addedCard.cardId);\r\n\t\tif (doWeAlreadyHaveThisCard) {\r\n\t\t\tconst mult = entity.cardId === CardIds.FireworksFanatic_BG25_922_G ? 2 : 1;\r\n\t\t\taddStatsToBoard(entity, input.board, input.hero, 2 * mult, 2 * mult, input.gameState);\r\n\t\t}\r\n\t},\r\n};\r\n"]}
@@ -11,7 +11,7 @@ exports.GentleStag = {
11
11
  const beasts = input.board.filter((e) => (0, utils_1.hasCorrectTribe)(e, input.hero, reference_data_1.Race.BEAST, input.gameState.anomalies, input.gameState.allCards));
12
12
  const target = beasts[beasts.length - 1];
13
13
  if (target) {
14
- (0, stats_1.modifyStats)(target, minion, 2 * mult, 2 * mult, input.board, input.hero, input.gameState);
14
+ (0, stats_1.modifyStats)(target, minion, 3 * mult, 3 * mult, input.board, input.hero, input.gameState);
15
15
  }
16
16
  },
17
17
  };
@@ -1 +1 @@
1
- {"version":3,"file":"gentle-stag.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/gentle-stag.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAG7D,qDAAwD;AACxD,0CAAiD;AAGpC,QAAA,UAAU,GAAuB;IAC7C,OAAO,EAAE,0BAA4D;IACrE,cAAc,EAAE,CAAC,MAAmB,EAAE,KAAwB,EAAE,EAAE;QACjE,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAkC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrE,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CACvC,IAAA,uBAAe,EAAC,CAAC,EAAE,KAAK,CAAC,IAAI,EAAE,qBAAI,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAC/F,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACzC,IAAI,MAAM,EAAE;YACX,IAAA,mBAAW,EAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;SAC1F;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds, Race } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { OnOtherSpawnInput } from '../../../simulation/add-minion-to-board';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { hasCorrectTribe } from '../../../utils';\r\nimport { OnOtherSpawnedCard } from '../../card.interface';\r\n\r\nexport const GentleStag: OnOtherSpawnedCard = {\r\n\tcardIds: [CardIds.GentleStag_BG31_369, CardIds.GentleStag_BG31_369_G],\r\n\tonOtherSpawned: (minion: BoardEntity, input: OnOtherSpawnInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.GentleStag_BG31_369_G ? 2 : 1;\r\n\t\tconst beasts = input.board.filter((e) =>\r\n\t\t\thasCorrectTribe(e, input.hero, Race.BEAST, input.gameState.anomalies, input.gameState.allCards),\r\n\t\t);\r\n\t\tconst target = beasts[beasts.length - 1];\r\n\t\tif (target) {\r\n\t\t\tmodifyStats(target, minion, 2 * mult, 2 * mult, input.board, input.hero, input.gameState);\r\n\t\t}\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"gentle-stag.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/gentle-stag.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAG7D,qDAAwD;AACxD,0CAAiD;AAGpC,QAAA,UAAU,GAAuB;IAC7C,OAAO,EAAE,0BAA4D;IACrE,cAAc,EAAE,CAAC,MAAmB,EAAE,KAAwB,EAAE,EAAE;QACjE,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAkC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrE,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CACvC,IAAA,uBAAe,EAAC,CAAC,EAAE,KAAK,CAAC,IAAI,EAAE,qBAAI,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAC/F,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACzC,IAAI,MAAM,EAAE;YACX,IAAA,mBAAW,EAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;SAC1F;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds, Race } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { OnOtherSpawnInput } from '../../../simulation/add-minion-to-board';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { hasCorrectTribe } from '../../../utils';\r\nimport { OnOtherSpawnedCard } from '../../card.interface';\r\n\r\nexport const GentleStag: OnOtherSpawnedCard = {\r\n\tcardIds: [CardIds.GentleStag_BG31_369, CardIds.GentleStag_BG31_369_G],\r\n\tonOtherSpawned: (minion: BoardEntity, input: OnOtherSpawnInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.GentleStag_BG31_369_G ? 2 : 1;\r\n\t\tconst beasts = input.board.filter((e) =>\r\n\t\t\thasCorrectTribe(e, input.hero, Race.BEAST, input.gameState.anomalies, input.gameState.allCards),\r\n\t\t);\r\n\t\tconst target = beasts[beasts.length - 1];\r\n\t\tif (target) {\r\n\t\t\tmodifyStats(target, minion, 3 * mult, 3 * mult, input.board, input.hero, input.gameState);\r\n\t\t}\r\n\t},\r\n};\r\n"]}
@@ -9,7 +9,7 @@ exports.GoldGrubber = {
9
9
  const mult = minion.cardId === "TB_BaconUps_130" ? 2 : 1;
10
10
  const goldenMinions = input.board.filter((e) => (0, utils_1.isGolden)(e.cardId, input.gameState.allCards)).length;
11
11
  for (let i = 0; i < goldenMinions; i++) {
12
- (0, stats_1.modifyStats)(minion, minion, 2 * mult, 2 * mult, input.board, input.hero, input.gameState);
12
+ (0, stats_1.modifyStats)(minion, minion, 3 * mult, 3 * mult, input.board, input.hero, input.gameState);
13
13
  }
14
14
  },
15
15
  };
@@ -1 +1 @@
1
- {"version":3,"file":"goldgrubber.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/goldgrubber.ts"],"names":[],"mappings":";;;AAEA,qDAAwD;AACxD,0CAA0C;AAG7B,QAAA,WAAW,GAAkB;IACzC,OAAO,EAAE,8BAAkE;IAC3E,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QACzD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,sBAAwC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3E,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,gBAAQ,EAAC,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;QACrG,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,EAAE,CAAC,EAAE,EAAE;YACvC,IAAA,mBAAW,EAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;SAC1F;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { isGolden } from '../../../utils';\r\nimport { EndOfTurnCard, EndOfTurnInput } from '../../card.interface';\r\n\r\nexport const GoldGrubber: EndOfTurnCard = {\r\n\tcardIds: [CardIds.Goldgrubber_BGS_066, CardIds.Goldgrubber_TB_BaconUps_130],\r\n\tendOfTurn: (minion: BoardEntity, input: EndOfTurnInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.Goldgrubber_TB_BaconUps_130 ? 2 : 1;\r\n\t\tconst goldenMinions = input.board.filter((e) => isGolden(e.cardId, input.gameState.allCards)).length;\r\n\t\tfor (let i = 0; i < goldenMinions; i++) {\r\n\t\t\tmodifyStats(minion, minion, 2 * mult, 2 * mult, input.board, input.hero, input.gameState);\r\n\t\t}\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"goldgrubber.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/goldgrubber.ts"],"names":[],"mappings":";;;AAEA,qDAAwD;AACxD,0CAA0C;AAG7B,QAAA,WAAW,GAAkB;IACzC,OAAO,EAAE,8BAAkE;IAC3E,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QACzD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,sBAAwC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3E,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,gBAAQ,EAAC,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;QACrG,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,EAAE,CAAC,EAAE,EAAE;YACvC,IAAA,mBAAW,EAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;SAC1F;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { isGolden } from '../../../utils';\r\nimport { EndOfTurnCard, EndOfTurnInput } from '../../card.interface';\r\n\r\nexport const GoldGrubber: EndOfTurnCard = {\r\n\tcardIds: [CardIds.Goldgrubber_BGS_066, CardIds.Goldgrubber_TB_BaconUps_130],\r\n\tendOfTurn: (minion: BoardEntity, input: EndOfTurnInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.Goldgrubber_TB_BaconUps_130 ? 2 : 1;\r\n\t\tconst goldenMinions = input.board.filter((e) => isGolden(e.cardId, input.gameState.allCards)).length;\r\n\t\tfor (let i = 0; i < goldenMinions; i++) {\r\n\t\t\tmodifyStats(minion, minion, 3 * mult, 3 * mult, input.board, input.hero, input.gameState);\r\n\t\t}\r\n\t},\r\n};\r\n"]}
@@ -1,23 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Hackerfin = void 0;
4
- const stats_1 = require("../../../simulation/stats");
4
+ const reference_data_1 = require("@firestone-hs/reference-data");
5
+ const utils_1 = require("../../../utils");
5
6
  const cards_data_1 = require("../../cards-data");
6
7
  const baseAttackBuff = 3;
7
8
  const baseHealthBuff = 3;
8
9
  exports.Hackerfin = {
9
10
  cardIds: ["BG31_148", "BG31_148_G"],
10
11
  battlecry: (minion, input) => {
12
+ const mult = minion.cardId === "BG31_148_G" ? 2 : 1;
13
+ let totalWarbandKeywords = 0;
14
+ const keywordsToAttribute = [...cards_data_1.validBonusKeywords];
11
15
  for (const entity of input.board) {
12
- const mult = minion.cardId === "BG31_148_G" ? 2 : 1;
13
- let totalKeywords = 0;
14
- for (const bonusKeyword of cards_data_1.validBonusKeywords) {
16
+ for (const bonusKeyword of keywordsToAttribute) {
15
17
  if ((0, cards_data_1.hasKeyword)(entity, bonusKeyword)) {
16
- totalKeywords++;
18
+ totalWarbandKeywords++;
19
+ keywordsToAttribute.splice(keywordsToAttribute.indexOf(bonusKeyword), 1);
17
20
  }
18
21
  }
19
- (0, stats_1.modifyStats)(minion, minion, totalKeywords * mult * baseAttackBuff, totalKeywords * mult * baseHealthBuff, input.board, input.hero, input.gameState);
20
22
  }
23
+ const baseBuff = 1 + totalWarbandKeywords;
24
+ (0, utils_1.addStatsToBoard)(minion, input.board, input.hero, baseBuff * mult, baseBuff * mult, input.gameState, reference_data_1.Race[reference_data_1.Race.MURLOC]);
21
25
  return true;
22
26
  },
23
27
  };
@@ -1 +1 @@
1
- {"version":3,"file":"hackerfin.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/hackerfin.ts"],"names":[],"mappings":";;;AAGA,qDAAwD;AAExD,iDAAkE;AAElE,MAAM,cAAc,GAAG,CAAC,CAAC;AACzB,MAAM,cAAc,GAAG,CAAC,CAAC;AAEZ,QAAA,SAAS,GAAkB;IACvC,OAAO,EAAE,0BAA0D;IACnE,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QACzD,KAAK,MAAM,MAAM,IAAI,KAAK,CAAC,KAAK,EAAE;YACjC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAiC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACpE,IAAI,aAAa,GAAG,CAAC,CAAC;YACtB,KAAK,MAAM,YAAY,IAAI,+BAAkB,EAAE;gBAC9C,IAAI,IAAA,uBAAU,EAAC,MAAM,EAAE,YAAY,CAAC,EAAE;oBACrC,aAAa,EAAE,CAAC;iBAChB;aACD;YACD,IAAA,mBAAW,EACV,MAAM,EACN,MAAM,EACN,aAAa,GAAG,IAAI,GAAG,cAAc,EACrC,aAAa,GAAG,IAAI,GAAG,cAAc,EACrC,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,SAAS,CACf,CAAC;SACF;QACD,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { BattlecryInput } from '../../../simulation/battlecries';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { BattlecryCard } from '../../card.interface';\r\nimport { hasKeyword, validBonusKeywords } from '../../cards-data';\r\n\r\nconst baseAttackBuff = 3;\r\nconst baseHealthBuff = 3;\r\n\r\nexport const Hackerfin: BattlecryCard = {\r\n\tcardIds: [CardIds.Hackerfin_BG31_148, CardIds.Hackerfin_BG31_148_G],\r\n\tbattlecry: (minion: BoardEntity, input: BattlecryInput) => {\r\n\t\tfor (const entity of input.board) {\r\n\t\t\tconst mult = minion.cardId === CardIds.Hackerfin_BG31_148_G ? 2 : 1;\r\n\t\t\tlet totalKeywords = 0;\r\n\t\t\tfor (const bonusKeyword of validBonusKeywords) {\r\n\t\t\t\tif (hasKeyword(entity, bonusKeyword)) {\r\n\t\t\t\t\ttotalKeywords++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tmodifyStats(\r\n\t\t\t\tminion,\r\n\t\t\t\tminion,\r\n\t\t\t\ttotalKeywords * mult * baseAttackBuff,\r\n\t\t\t\ttotalKeywords * mult * baseHealthBuff,\r\n\t\t\t\tinput.board,\r\n\t\t\t\tinput.hero,\r\n\t\t\t\tinput.gameState,\r\n\t\t\t);\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"hackerfin.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/hackerfin.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAG7D,0CAAiD;AAEjD,iDAAkE;AAElE,MAAM,cAAc,GAAG,CAAC,CAAC;AACzB,MAAM,cAAc,GAAG,CAAC,CAAC;AAEZ,QAAA,SAAS,GAAkB;IACvC,OAAO,EAAE,0BAA0D;IACnE,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QACzD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAAiC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACpE,IAAI,oBAAoB,GAAG,CAAC,CAAC;QAC7B,MAAM,mBAAmB,GAAG,CAAC,GAAG,+BAAkB,CAAC,CAAC;QACpD,KAAK,MAAM,MAAM,IAAI,KAAK,CAAC,KAAK,EAAE;YACjC,KAAK,MAAM,YAAY,IAAI,mBAAmB,EAAE;gBAC/C,IAAI,IAAA,uBAAU,EAAC,MAAM,EAAE,YAAY,CAAC,EAAE;oBACrC,oBAAoB,EAAE,CAAC;oBACvB,mBAAmB,CAAC,MAAM,CAAC,mBAAmB,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC;iBACzE;aACD;SACD;QACD,MAAM,QAAQ,GAAG,CAAC,GAAG,oBAAoB,CAAC;QAC1C,IAAA,uBAAe,EACd,MAAM,EACN,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,IAAI,EACV,QAAQ,GAAG,IAAI,EACf,QAAQ,GAAG,IAAI,EACf,KAAK,CAAC,SAAS,EACf,qBAAI,CAAC,qBAAI,CAAC,MAAM,CAAC,CACjB,CAAC;QACF,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAC","sourcesContent":["import { CardIds, Race } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { BattlecryInput } from '../../../simulation/battlecries';\r\nimport { addStatsToBoard } from '../../../utils';\r\nimport { BattlecryCard } from '../../card.interface';\r\nimport { hasKeyword, validBonusKeywords } from '../../cards-data';\r\n\r\nconst baseAttackBuff = 3;\r\nconst baseHealthBuff = 3;\r\n\r\nexport const Hackerfin: BattlecryCard = {\r\n\tcardIds: [CardIds.Hackerfin_BG31_148, CardIds.Hackerfin_BG31_148_G],\r\n\tbattlecry: (minion: BoardEntity, input: BattlecryInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.Hackerfin_BG31_148_G ? 2 : 1;\r\n\t\tlet totalWarbandKeywords = 0;\r\n\t\tconst keywordsToAttribute = [...validBonusKeywords];\r\n\t\tfor (const entity of input.board) {\r\n\t\t\tfor (const bonusKeyword of keywordsToAttribute) {\r\n\t\t\t\tif (hasKeyword(entity, bonusKeyword)) {\r\n\t\t\t\t\ttotalWarbandKeywords++;\r\n\t\t\t\t\tkeywordsToAttribute.splice(keywordsToAttribute.indexOf(bonusKeyword), 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tconst baseBuff = 1 + totalWarbandKeywords;\r\n\t\taddStatsToBoard(\r\n\t\t\tminion,\r\n\t\t\tinput.board,\r\n\t\t\tinput.hero,\r\n\t\t\tbaseBuff * mult,\r\n\t\t\tbaseBuff * mult,\r\n\t\t\tinput.gameState,\r\n\t\t\tRace[Race.MURLOC],\r\n\t\t);\r\n\t\treturn true;\r\n\t},\r\n};\r\n"]}
@@ -9,7 +9,7 @@ exports.LokholarFrostforgeer = {
9
9
  for (let i = 0; i < mult; i++) {
10
10
  const targets = input.board.filter((e) => e.entityId !== minion.entityId);
11
11
  for (const target of targets) {
12
- (0, stats_1.modifyStats)(target, minion, 2, 2, input.board, input.hero, input.gameState);
12
+ (0, stats_1.modifyStats)(target, minion, 3, 2, input.board, input.hero, input.gameState);
13
13
  }
14
14
  }
15
15
  },
@@ -1 +1 @@
1
- {"version":3,"file":"lokholar-frostforger.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/lokholar-frostforger.ts"],"names":[],"mappings":";;;AAEA,qDAAwD;AAG3C,QAAA,oBAAoB,GAAkB;IAClD,OAAO,EAAE,0BAA8E;IACvF,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QACzD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAA2C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YAC9B,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC1E,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;gBAC7B,IAAA,mBAAW,EAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;aAC5E;SACD;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { EndOfTurnCard, EndOfTurnInput } from '../../card.interface';\r\n\r\nexport const LokholarFrostforgeer: EndOfTurnCard = {\r\n\tcardIds: [CardIds.LokholarFrostforger_BG32_844, CardIds.LokholarFrostforger_BG32_844_G],\r\n\tendOfTurn: (minion: BoardEntity, input: EndOfTurnInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.LokholarFrostforger_BG32_844_G ? 1 : 2;\r\n\t\tfor (let i = 0; i < mult; i++) {\r\n\t\t\tconst targets = input.board.filter((e) => e.entityId !== minion.entityId);\r\n\t\t\tfor (const target of targets) {\r\n\t\t\t\tmodifyStats(target, minion, 2, 2, input.board, input.hero, input.gameState);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"lokholar-frostforger.js","sourceRoot":"","sources":["../../../../src/cards/impl/minion/lokholar-frostforger.ts"],"names":[],"mappings":";;;AAEA,qDAAwD;AAG3C,QAAA,oBAAoB,GAAkB;IAClD,OAAO,EAAE,0BAA8E;IACvF,SAAS,EAAE,CAAC,MAAmB,EAAE,KAAqB,EAAE,EAAE;QACzD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,iBAA2C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YAC9B,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC1E,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;gBAC7B,IAAA,mBAAW,EAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;aAC5E;SACD;IACF,CAAC;CACD,CAAC","sourcesContent":["import { CardIds } from '@firestone-hs/reference-data';\r\nimport { BoardEntity } from '../../../board-entity';\r\nimport { modifyStats } from '../../../simulation/stats';\r\nimport { EndOfTurnCard, EndOfTurnInput } from '../../card.interface';\r\n\r\nexport const LokholarFrostforgeer: EndOfTurnCard = {\r\n\tcardIds: [CardIds.LokholarFrostforger_BG32_844, CardIds.LokholarFrostforger_BG32_844_G],\r\n\tendOfTurn: (minion: BoardEntity, input: EndOfTurnInput) => {\r\n\t\tconst mult = minion.cardId === CardIds.LokholarFrostforger_BG32_844_G ? 1 : 2;\r\n\t\tfor (let i = 0; i < mult; i++) {\r\n\t\t\tconst targets = input.board.filter((e) => e.entityId !== minion.entityId);\r\n\t\t\tfor (const target of targets) {\r\n\t\t\t\tmodifyStats(target, minion, 3, 2, input.board, input.hero, input.gameState);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};\r\n"]}
@@ -2,20 +2,18 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NoisulOfTheManyFaces = void 0;
4
4
  const reference_data_1 = require("@firestone-hs/reference-data");
5
- const utils_1 = require("../../../services/utils");
6
5
  const stats_1 = require("../../../simulation/stats");
7
- const utils_2 = require("../../../utils");
6
+ const utils_1 = require("../../../utils");
8
7
  exports.NoisulOfTheManyFaces = {
9
8
  cardIds: ["BG32_325", "BG32_325_G"],
10
9
  onOtherSpawned: (minion, input) => {
11
- if (!(0, utils_2.hasCorrectTribe)(input.spawned, input.hero, reference_data_1.Race.UNDEAD, input.gameState.anomalies, input.gameState.allCards)) {
10
+ if (!(0, utils_1.hasCorrectTribe)(input.spawned, input.hero, reference_data_1.Race.UNDEAD, input.gameState.anomalies, input.gameState.allCards)) {
12
11
  return;
13
12
  }
14
- const undead = input.board.filter((e) => (0, utils_2.hasCorrectTribe)(e, input.hero, reference_data_1.Race.UNDEAD, input.gameState.anomalies, input.gameState.allCards));
15
- const targets = (0, utils_1.shuffleArray)(undead).slice(0, 4);
13
+ const targets = input.board.filter((e) => (0, utils_1.hasCorrectTribe)(e, input.hero, reference_data_1.Race.UNDEAD, input.gameState.anomalies, input.gameState.allCards));
16
14
  const mult = minion.cardId === "BG32_325_G" ? 2 : 1;
17
15
  for (const target of targets) {
18
- (0, stats_1.modifyStats)(target, minion, 1 * mult, 1 * mult, input.board, input.hero, input.gameState);
16
+ (0, stats_1.modifyStats)(target, minion, 2 * mult, 1 * mult, input.board, input.hero, input.gameState);
19
17
  }
20
18
  },
21
19
  };