@firestone-hs/reference-data 2.0.147 → 2.0.149

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.
@@ -272,7 +272,7 @@ const getReferenceTribeCardId = (tribe) => {
272
272
  break;
273
273
  case 'pirate':
274
274
  case public_api_1.Race.PIRATE:
275
- referenceCardId = "BGS_061";
275
+ referenceCardId = "BG26_817";
276
276
  break;
277
277
  case 'elemental':
278
278
  case public_api_1.Race.ELEMENTAL:
@@ -550,6 +550,8 @@ const getHeroPower = (heroCardId, allCards) => {
550
550
  return "BG32_HERO_002p";
551
551
  case "BG32_HERO_001":
552
552
  return "BG32_HERO_001p";
553
+ case "BG33_HERO_001":
554
+ return "BG33_HERO_001p";
553
555
  case '':
554
556
  return null;
555
557
  }
@@ -1 +1 @@
1
- {"version":3,"file":"bgs-utils.js","sourceRoot":"","sources":["../../src/services/bgs-utils.ts"],"names":[],"mappings":";;;AAAA,8CAAiG;AACjG,yCAAwD;AAE3C,QAAA,YAAY,GAAG;IAC3B,iBAAI,CAAC,KAAK;IACV,iBAAI,CAAC,KAAK;IACV,iBAAI,CAAC,MAAM;IACX,iBAAI,CAAC,IAAI;IACT,iBAAI,CAAC,MAAM;IACX,iBAAI,CAAC,MAAM;IACX,iBAAI,CAAC,SAAS;IACd,iBAAI,CAAC,QAAQ;IACb,iBAAI,CAAC,IAAI;IACT,iBAAI,CAAC,MAAM;CACX,CAAC;AAEW,QAAA,mBAAmB,GAAG,CAAC,CAAC;AAExB,QAAA,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+FrC,CAAC;AAEW,QAAA,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;CAsBvC,CAAC;AAEW,QAAA,0BAA0B,GAAG;IACzC;QACC,KAAK,8BAAgD;QACrD,KAAK,EAAE,iBAAI,CAAC,MAAM;KACl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AAmD;QACpD;YACC,oCAA6D;QAC9D;YACC,oCAA2D;QAC5D;YACC,oCAAiD;QAClD;YACC,oCAAuD;QACxD;YACC,oCAAoD;QACrD;YACC,6BAA+C;QAChD;YACC,oCAA0D;QAC3D;YACC,oCAAiE;QAClE;YACC,oCAAgD;QACjD;YACC,6BAAsD;QACvD;YACC,oCAAkD;QACnD;YACC,oCAAoD;QACrD;YACC,6BAAmD;QACpD;YACC,oCAAwD;QACzD;YACC,oCAAwD;QACzD;YACC,oCAA0D;QAC3D;YACC,oCAAwD;QACzD;YACC,oCAAmD;QACpD;YACC,oCAAwD;QACzD;YACC,oCAAsD;QACvD;YACC,6BAAmD;QACpD;YACC,oCAAsD;QACvD;YACC,oCAAgD;QACjD;YACC,oCAAyD;QAC1D;YACC,oCAA6D;QAC9D;YACC,oCAAoD;QACrD;YACC,6BAAqD;QACtD;YACC,6BAA+C;QAChD;YACC,6BAA0C;QAC3C;YACC,oCAAsD;QACvD;YACC,oCAAmD;QACpD;YACC,oCAAyD;QAC1D;YACC,oCAAgD;QACjD;YACC,oCAAqD;QACtD;YACC,oCAA0D;QAC3D;YACC,oCAA0D;QAC3D;YACC,6BAAuD;QACxD;YACC,6BAAgD;QACjD;YACC,6BAA6C;QAC9C;YACC,oCAA6D;QAC9D;YACC,oCAA+D;QAChE;YACC,oCAAsD;QACvD;YACC,oCAAkD;QACnD;YACC,6BAAoD;QACrD;YACC,6BAAqD;QACtD;YACC,6BAA8C;QAC/C;YACC,6BAAmD;QACpD;YACC,6BAA+C;QAChD;YACC,6BAAoD;QACrD;YACC,6BAA0C;QAC3C;YACC,6BAAiD;QAClD;YACC,6BAAqD;QACtD;YACC,6BAAmD;QACpD;YACC,6BAAwD;QACzD;YACC,qCAA8D;QAC/D;YACC,6BAAkD;QACnD;YACC,6BAA6C;QAC9C;YACC,6BAAoD;QACrD;YACC,6BAA0C;QAC3C;YACC,6BAA+C;QAChD;YACC,6BAAiD;QAClD;YACC,6BAAmD;QACpD;YACC,6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G,SAAS,CAAC,CAAC;QACpC;YACC,OAAO,8BAAsB,CAAC,IAAI,CAAC,CAAC;KACrC;AACF,CAAC,CAAC;AArEW,QAAA,qBAAqB,yBAqEhC;AAGW,QAAA,sBAAsB,GAAG,qCAA0B,CAAC","sourcesContent":["import { AllCardsService, CardIds, GameTag, GameType, Race, ReferenceCard } from '../public-api';\r\nimport { getEffectiveTribesEnumBase } from './hs-utils';\r\n\r\nexport const ALL_BG_RACES = [\r\n\tRace.BEAST,\r\n\tRace.DEMON,\r\n\tRace.DRAGON,\r\n\tRace.MECH,\r\n\tRace.MURLOC,\r\n\tRace.PIRATE,\r\n\tRace.ELEMENTAL,\r\n\tRace.QUILBOAR,\r\n\tRace.NAGA,\r\n\tRace.UNDEAD,\r\n];\r\n\r\nexport const TOTAL_RACES_IN_GAME = 5;\r\n\r\nexport const NON_BUYABLE_MINION_IDS = [\r\n\tCardIds.Cuddlgam_TB_BaconShop_HP_033t_SKIN_A,\r\n\tCardIds.Cuddlgam_TB_BaconShop_HP_033t_SKIN_A_G,\r\n\tCardIds.AbominableAmalgam_TB_BaconShop_HP_033t_SKIN_D,\r\n\tCardIds.AbominableAmalgam_TB_BaconShop_HP_033t_SKIN_D_G,\r\n\tCardIds.BookEatingAmalgam_TB_BaconShop_HP_033t_SKIN_B,\r\n\tCardIds.BookEatingAmalgam_TB_BaconShop_HP_033t_SKIN_B_G,\r\n\t// CardIds.ArgentBraggart_BG_SCH_149,\r\n\t// CardIds.ArgentBraggart_TB_BaconUps_308,\r\n\tCardIds.AvatarOfNzoth_FishOfNzothToken,\r\n\tCardIds.FishOfNzoth,\r\n\tCardIds.CattlecarpOfNzoth_TB_BaconShop_HP_105t_SKIN_A,\r\n\tCardIds.CattlecarpOfNzoth_TB_BaconShop_HP_105t_SKIN_A_G,\r\n\tCardIds.SnakeTrap_SnakeLegacyToken,\r\n\tCardIds.SnakeTrap_SnakeVanillaToken,\r\n\tCardIds.ImprovedSnakeTrap_SnakeToken,\r\n\tCardIds.ElementEarth_StoneElementalToken,\r\n\tCardIds.BabyKrush_DevilsaurToken,\r\n\tCardIds.Devilsaur,\r\n\t// To remove once the cards list is properly updated\r\n\tCardIds.FriendOfAFriend_BG22_404,\r\n\tCardIds.FriendOfAFriend_BG22_404_G,\r\n\tCardIds.Onyxia_OnyxianWhelpToken,\r\n\tCardIds.MurlocWarleaderCore,\r\n\tCardIds.MurlocWarleaderVanilla,\r\n\t// 23.4, probably not needed since they are already tokens\r\n\tCardIds.Tentacular_OzumatsTentacleToken_BG23_HERO_201pt,\r\n\tCardIds.Tentacular_OzumatsTentacleToken_BG23_HERO_201pt2,\r\n\tCardIds.Tentacular_OzumatsTentacleToken_BG23_HERO_201pt3,\r\n\tCardIds.Tentacular_OzumatsTentacleToken_BG23_HERO_201pt4,\r\n\tCardIds.Tentacular_OzumatsTentacleToken_BG23_HERO_201pt5,\r\n\tCardIds.Tentacular_OzumatsTentacleToken_BG23_HERO_201pt6,\r\n\t// 24.0, same\r\n\tCardIds.EmperorCobraLegacy_BG_EX1_170,\r\n\tCardIds.EmperorCobraLegacy_BG_EX1_170_G,\r\n\tCardIds.EmperorCobraLegacy_EX1_170,\r\n\tCardIds.SnakeLegacyToken,\r\n\tCardIds.SnakeLegacy,\r\n\tCardIds.ElementEarth_StoneElementalToken,\r\n\tCardIds.BolvarFireblood_CORE_ICC_858,\r\n\tCardIds.BolvarFireblood_ICC_858,\r\n\t// 25.2\r\n\tCardIds.HandlessForsaken_HelpingHandToken_BG25_010t,\r\n\tCardIds.HandlessForsaken_HelpingHandToken_BG25_010_Gt,\r\n\tCardIds.GeneralDrakkisath_SmolderwingToken_BG25_309t,\r\n\tCardIds.GeneralDrakkisath_SmolderwingToken_BG25_309_Gt,\r\n\tCardIds.MechaJaraxxus_RustedReggieToken,\r\n\tCardIds.MechaJaraxxus_MagtheridonPrimeToken,\r\n\tCardIds.MechaJaraxxus_BaltharakToken,\r\n\tCardIds.RustedReggie,\r\n\tCardIds.MagtheridonPrime,\r\n\tCardIds.Baltharak,\r\n\tCardIds.Shudderskull_TB_BaconShop_HP_022t_SKIN_C,\r\n\tCardIds.Shudderskull_TB_BaconShop_HP_022t_SKIN_C_G,\r\n\tCardIds.OzumatsTentacle_BG23_HERO_201pt_SKIN_A,\r\n\tCardIds.OzumatsTentacle_BG23_HERO_201pt_SKIN_A_G,\r\n\t// 26.2\r\n\tCardIds.Manasaber_CublingToken_BG26_800t,\r\n\tCardIds.Manasaber_CublingToken_BG26_800_Gt,\r\n\tCardIds.TentacleOfOctosariToken_BG26_803t,\r\n\tCardIds.TentacleOfOctosariToken_BG26_803_Gt,\r\n\t//27.2\r\n\tCardIds.OozelingGladiator_SlimyShieldToken_BG27_002t,\r\n\t// CardIds.SurfNSurf_CrabMountToken_BG27_004t,\r\n\t// CardIds.SurfNSurf_CrabMountToken_BG27_004_Gt,\r\n\t// CardIds.SurfNSurf_CrabToken_BG27_004t2,\r\n\t// CardIds.SurfNSurf_CrabToken_BG27_004_Gt2,\r\n\tCardIds.MechanizedGiftHorse_MechorseToken_BG27_008_Gt,\r\n\tCardIds.MechanizedGiftHorse_MechaponyToken_BG27_008t2,\r\n\tCardIds.MechanizedGiftHorse_MechorseToken_BG27_008_Gt,\r\n\tCardIds.MechanizedGiftHorse_MechaponyToken_BG27_008_Gt2,\r\n\tCardIds.TavernTier2,\r\n\tCardIds.TavernTier3,\r\n\tCardIds.TavernTier4,\r\n\tCardIds.TavernTier5,\r\n\tCardIds.TavernTier6,\r\n\tCardIds.TavernTier7_TB_BaconShopTechUp07_Button,\r\n\tCardIds.TombPillager_WON_340,\r\n\t// 27.2.2\r\n\tCardIds.MechanizedGiftHorse_MechorseToken_BG27_008t,\r\n\tCardIds.MechanizedGiftHorse_MechorseToken_BG27_008_Gt,\r\n\t// 28.6\r\n\tCardIds.StableAmalgamation_TotallyNormalHorseToken_BG28_Reward_518t,\r\n\tCardIds.TotallyNormalHorse_BG28_Reward_518t_G,\r\n\tCardIds.BoonOfBeetles_BeetleToken_BG28_603t,\r\n\tCardIds.Beetle_BG28_603t_G,\r\n\tCardIds.ToxicTumbleweed_TumblingAssassinToken_BG28_641t,\r\n\tCardIds.TumblingAssassin_BG28_641t_G,\r\n\t// 29.2\r\n\tCardIds.SilverGoose_SilverFledglingToken_BG29_801t,\r\n\tCardIds.SilverGoose_SilverFledglingToken_BG29_801_Gt,\r\n\tCardIds.ReplicatingMenace_MicrobotToken_BG_BOT_312t,\r\n\tCardIds.ReplicatingMenace_MicrobotToken_TB_BaconUps_032t,\r\n\tCardIds.TheUninvitedGuest_ShadowToken_BG29_875t,\r\n\tCardIds.TheUninvitedGuest_ShadowToken_BG29_875_Gt,\r\n];\r\n\r\nexport const NON_DISCOVERABLE_BUDDIES = [\r\n\tCardIds.SpiritRaptor_BG22_HERO_001_Buddy,\r\n\tCardIds.RagingContender_TB_BaconShop_HERO_67_Buddy,\r\n\tCardIds.CaptainFairmount_BG21_HERO_000_Buddy,\r\n\tCardIds.FlightTrainer_BG20_HERO_283_Buddy,\r\n\tCardIds.JandicesApprentice_TB_BaconShop_HERO_71_Buddy,\r\n\tCardIds.CrimsonHandCenturion_TB_BaconShop_HERO_60_Buddy,\r\n\tCardIds.CrazyMonkey_TB_BaconShop_HERO_38_Buddy,\r\n\tCardIds.ShadowWarden_TB_BaconShop_HERO_62_Buddy,\r\n\tCardIds.NexusLord_TB_BaconShop_HERO_58_Buddy,\r\n\tCardIds.LeiFlamepaw_BG20_HERO_202_Buddy,\r\n\tCardIds.Watfin_BG23_HERO_303_Buddy,\r\n\tCardIds.NightmareEctoplasm_BG20_HERO_301_Buddy,\r\n\tCardIds.ManyWhelps_BG22_HERO_305_Buddy,\r\n\tCardIds.Tamuzo_BG23_HERO_201_Buddy,\r\n\tCardIds.MaxwellMightySteed_TB_BaconShop_HERO_40_Buddy,\r\n\tCardIds.Crabby_BG22_HERO_000_Buddy,\r\n\tCardIds.Mishmash_TB_BaconShop_HERO_33_Buddy,\r\n\tCardIds.PigeonLord_TB_BaconShop_HERO_12_Buddy,\r\n\tCardIds.VardensAquarrior_BG22_HERO_004_Buddy,\r\n\tCardIds.AcolyteOfYoggSaron_TB_BaconShop_HERO_35_Buddy,\r\n\tCardIds.SubmersibleChef_BG22_HERO_201_Buddy,\r\n];\r\n\r\nexport const BUDDIES_TRIBE_REQUIREMENTS = [\r\n\t{\r\n\t\tbuddy: CardIds.Vaelastrasz_TB_BaconShop_HERO_56_Buddy,\r\n\t\ttribe: Race.DRAGON,\r\n\t},\r\n\t{\r\n\t\tbuddy: CardIds.DeathsHeadSage_BG20_HERO_103_Buddy,\r\n\t\ttribe: Race.QUILBOAR,\r\n\t},\r\n\t{\r\n\t\tbuddy: CardIds.SparkfinSoothsayer_TB_BaconShop_HERO_55_Buddy,\r\n\t\ttribe: Race.MURLOC,\r\n\t},\r\n\t{\r\n\t\tbuddy: CardIds.SubScrubber_BG22_HERO_200_Buddy,\r\n\t\ttribe: Race.MECH,\r\n\t},\r\n\t{\r\n\t\tbuddy: CardIds.CoilfangElite_BG23_HERO_304_Buddy,\r\n\t\ttribe: Race.NAGA,\r\n\t},\r\n\t{\r\n\t\tbuddy: CardIds.Kilrek_TB_BaconShop_HERO_37_Buddy,\r\n\t\ttribe: Race.DEMON,\r\n\t},\r\n\t{\r\n\t\tbuddy: CardIds.ElementiumSquirrelBomb_TB_BaconShop_HERO_17_Buddy,\r\n\t\ttribe: Race.MECH,\r\n\t},\r\n\t{\r\n\t\tbuddy: CardIds.TuskarrRaider_TB_BaconShop_HERO_18_Buddy,\r\n\t\ttribe: Race.PIRATE,\r\n\t},\r\n\t{\r\n\t\tbuddy: CardIds.Festergut_BG25_HERO_100_Buddy,\r\n\t\ttribe: Race.UNDEAD,\r\n\t},\r\n\t{\r\n\t\tbuddy: CardIds.ImperialDefender_BG22_HERO_007_Buddy,\r\n\t\ttribe: Race.NAGA,\r\n\t},\r\n\t{\r\n\t\tbuddy: CardIds.ValithriaDreamwalker_TB_BaconShop_HERO_53_Buddy,\r\n\t\ttribe: Race.DRAGON,\r\n\t},\r\n];\r\n\r\nexport const defaultStartingHp = (\r\n\tgameType: GameType,\r\n\theroCardId: string,\r\n\tallCards: { getCard: (cardId: string | number) => ReferenceCard },\r\n): number => {\r\n\tif (isBattlegrounds(gameType)) {\r\n\t\tconst normalized = normalizeHeroCardId(heroCardId, allCards);\r\n\t\treturn allCards.getCard(normalized).health || 30;\r\n\t}\r\n\treturn 30;\r\n};\r\n\r\nexport const isBattlegrounds = (gameType: GameType): boolean => {\r\n\treturn [\r\n\t\tGameType.GT_BATTLEGROUNDS,\r\n\t\tGameType.GT_BATTLEGROUNDS_FRIENDLY,\r\n\t\tGameType.GT_BATTLEGROUNDS_AI_VS_AI,\r\n\t\tGameType.GT_BATTLEGROUNDS_PLAYER_VS_AI,\r\n\t\tGameType.GT_BATTLEGROUNDS_DUO,\r\n\t\tGameType.GT_BATTLEGROUNDS_DUO_VS_AI,\r\n\t\tGameType.GT_BATTLEGROUNDS_DUO_FRIENDLY,\r\n\t\tGameType.GT_BATTLEGROUNDS_DUO_AI_VS_AI,\r\n\t].includes(gameType as GameType);\r\n};\r\n\r\nexport const isBattlegroundsDuo = (gameType: GameType): boolean => {\r\n\treturn [\r\n\t\tGameType.GT_BATTLEGROUNDS_DUO,\r\n\t\tGameType.GT_BATTLEGROUNDS_DUO_VS_AI,\r\n\t\tGameType.GT_BATTLEGROUNDS_DUO_FRIENDLY,\r\n\t\tGameType.GT_BATTLEGROUNDS_DUO_AI_VS_AI,\r\n\t].includes(gameType as GameType);\r\n};\r\n\r\nexport const normalizeHeroCardId = (\r\n\theroCardId: string,\r\n\tallCards: { getCard: (cardId: string | number) => ReferenceCard },\r\n): string => {\r\n\tif (!heroCardId) {\r\n\t\treturn heroCardId;\r\n\t}\r\n\r\n\tconst normalizedAfterSkin = normalizeHeroCardIdAfterSkin(heroCardId, allCards);\r\n\tswitch (normalizedAfterSkin) {\r\n\t\tcase 'TB_BaconShop_HERO_59t':\r\n\t\t\treturn 'TB_BaconShop_HERO_59';\r\n\t\tcase CardIds.QueenAzshara_NagaQueenAzsharaToken:\r\n\t\t\treturn CardIds.QueenAzshara_BG22_HERO_007;\r\n\t\tdefault:\r\n\t\t\treturn normalizedAfterSkin;\r\n\t}\r\n};\r\n\r\nconst normalizeHeroCardIdAfterSkin = (\r\n\theroCardId: string,\r\n\tallCards: { getCard: (cardId: string | number) => ReferenceCard },\r\n): string => {\r\n\tconst heroCard = allCards.getCard(heroCardId);\r\n\tif (!!heroCard?.battlegroundsHeroParentDbfId) {\r\n\t\tconst parentCard = allCards.getCard(heroCard.battlegroundsHeroParentDbfId);\r\n\t\tif (!!parentCard) {\r\n\t\t\treturn parentCard.id;\r\n\t\t}\r\n\t}\r\n\t// Fallback to regex\r\n\tconst bgHeroSkinMatch = heroCardId.match(/(.*)_SKIN_.*/);\r\n\tif (bgHeroSkinMatch) {\r\n\t\treturn bgHeroSkinMatch[1];\r\n\t}\r\n\treturn heroCardId;\r\n};\r\n\r\n// Used to make the mapping between premium / normal minions\r\nexport const normalizeMinionCardId = (\r\n\tcardId: string,\r\n\tallCards: { getCard: (cardId: string | number) => ReferenceCard },\r\n) => {\r\n\tconst refCard = allCards.getCard(cardId);\r\n\tif (refCard?.battlegroundsNormalDbfId) {\r\n\t\tconst normalCard = allCards.getCard(refCard.battlegroundsNormalDbfId);\r\n\t\treturn normalCard?.id;\r\n\t}\r\n\treturn cardId;\r\n};\r\n\r\nexport const getTribeName = (tribe: Race | GameTag, i18n: { translateString: (input: string) => string }): string => {\r\n\tconst tribeString = Race[tribe] ?? GameTag[tribe];\r\n\treturn i18n.translateString(`app.battlegrounds.tribes.${tribeString?.toLowerCase()}`);\r\n};\r\n\r\nexport const getTribeIcon = (tribe: string | Race | GameTag): string => {\r\n\tconst referenceCardId = getReferenceTribeCardId(tribe);\r\n\treturn `https://static.zerotoheroes.com/hearthstone/cardart/256x/${referenceCardId}.jpg`;\r\n};\r\n\r\nexport const getReferenceTribeCardId = (tribe: string | Race | GameTag): string => {\r\n\tlet referenceCardId: string;\r\n\ttribe = (tribe as string)?.padStart ? (tribe as string).toLowerCase() : tribe;\r\n\tswitch (tribe) {\r\n\t\tcase 'mech':\r\n\t\tcase Race.MECH:\r\n\t\t\treferenceCardId = CardIds.DeflectOBot_BGS_071;\r\n\t\t\tbreak;\r\n\t\tcase 'beast':\r\n\t\tcase Race.BEAST:\r\n\t\t\treferenceCardId = CardIds.GoldrinnTheGreatWolf_BGS_018;\r\n\t\t\tbreak;\r\n\t\tcase 'demon':\r\n\t\tcase Race.DEMON:\r\n\t\t\treferenceCardId = CardIds.ImpulsiveTrickster_BG21_006;\r\n\t\t\tbreak;\r\n\t\tcase 'dragon':\r\n\t\tcase Race.DRAGON:\r\n\t\t\treferenceCardId = CardIds.KalecgosArcaneAspect_BGS_041;\r\n\t\t\tbreak;\r\n\t\tcase 'murloc':\r\n\t\tcase Race.MURLOC:\r\n\t\t\treferenceCardId = CardIds.PrimalfinLookout_BGS_020;\r\n\t\t\tbreak;\r\n\t\tcase 'pirate':\r\n\t\tcase Race.PIRATE:\r\n\t\t\treferenceCardId = CardIds.Scallywag_BGS_061;\r\n\t\t\tbreak;\r\n\t\tcase 'elemental':\r\n\t\tcase Race.ELEMENTAL:\r\n\t\t\treferenceCardId = CardIds.Sellemental_BGS_115;\r\n\t\t\tbreak;\r\n\t\tcase 'naga':\r\n\t\tcase Race.NAGA:\r\n\t\t\treferenceCardId = CardIds.ShellCollector_BG23_002;\r\n\t\t\tbreak;\r\n\t\tcase 'quilboar':\r\n\t\tcase Race.QUILBOAR:\r\n\t\t\treferenceCardId = CardIds.SunBaconRelaxer_BG20_301;\r\n\t\t\tbreak;\r\n\t\tcase 'undead':\r\n\t\tcase Race.UNDEAD:\r\n\t\t\treferenceCardId = CardIds.RisenRider_BG25_001;\r\n\t\t\tbreak;\r\n\t\tcase 'all':\r\n\t\tcase Race.ALL:\r\n\t\t\treferenceCardId = CardIds.AmalgamOfTheDeep_BG_TSC_069;\r\n\t\t\tbreak;\r\n\t\tcase GameTag.PROTOSS:\r\n\t\t\treferenceCardId = CardIds.WarpGate_MothershipToken_BG31_HERO_802pt7;\r\n\t\t\tbreak;\r\n\t\tcase GameTag.ZERG:\r\n\t\t\treferenceCardId = CardIds.KerriganQueenOfBlades_LarvaToken_BG31_HERO_811t;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\treferenceCardId = CardIds.PatientScout_BG24_715;\r\n\t\t\tbreak;\r\n\t}\r\n\treturn referenceCardId;\r\n};\r\n\r\nexport const getHeroPower = (\r\n\theroCardId: string,\r\n\tallCards: { getCard: (cardId: string | number) => ReferenceCard },\r\n): string => {\r\n\tconst normalized = normalizeHeroCardId(heroCardId, allCards);\r\n\tswitch (normalized) {\r\n\t\tcase 'TB_BaconShop_HERO_01':\r\n\t\t\treturn 'TB_BaconShop_HP_001';\r\n\t\tcase 'TB_BaconShop_HERO_02':\r\n\t\t\treturn 'TB_BaconShop_HP_011';\r\n\t\tcase 'TB_BaconShop_HERO_08':\r\n\t\t\treturn 'TB_BaconShop_HP_069';\r\n\t\tcase CardIds.RagnarosTheFirelord_TB_BaconShop_HERO_11:\r\n\t\t\treturn CardIds.DieInsects_TB_BaconShop_HP_087;\r\n\t\tcase 'TB_BaconShop_HERO_12':\r\n\t\t\treturn 'TB_BaconShop_HP_041';\r\n\t\tcase CardIds.QueenWagtoggle_TB_BaconShop_HERO_14:\r\n\t\t\treturn CardIds.WaxWarband;\r\n\t\tcase 'TB_BaconShop_HERO_15':\r\n\t\t\treturn 'TB_BaconShop_HP_010';\r\n\t\tcase 'TB_BaconShop_HERO_16':\r\n\t\t\treturn 'TB_BaconShop_HP_044';\r\n\t\tcase 'TB_BaconShop_HERO_17':\r\n\t\t\treturn 'TB_BaconShop_HP_015';\r\n\t\tcase 'TB_BaconShop_HERO_18':\r\n\t\t\treturn 'TB_BaconShop_HP_072';\r\n\t\tcase 'TB_BaconShop_HERO_20':\r\n\t\t\treturn 'TB_BaconShop_HP_018';\r\n\t\tcase 'TB_BaconShop_HERO_21':\r\n\t\t\treturn 'TB_BaconShop_HP_020';\r\n\t\tcase 'TB_BaconShop_HERO_22':\r\n\t\t\treturn 'TB_BaconShop_HP_024';\r\n\t\tcase CardIds.Shudderwock_TB_BaconShop_HERO_23:\r\n\t\t\treturn CardIds.SnickerSnack;\r\n\t\tcase 'TB_BaconShop_HERO_25':\r\n\t\t\treturn 'TB_BaconShop_HP_049';\r\n\t\tcase 'TB_BaconShop_HERO_27':\r\n\t\t\treturn 'TB_BaconShop_HP_014';\r\n\t\tcase 'TB_BaconShop_HERO_28':\r\n\t\t\treturn 'TB_BaconShop_HP_028';\r\n\t\tcase 'TB_BaconShop_HERO_30':\r\n\t\t\treturn 'TB_BaconShop_HP_043';\r\n\t\tcase 'TB_BaconShop_HERO_31':\r\n\t\t\treturn 'TB_BaconShop_HP_009';\r\n\t\tcase 'TB_BaconShop_HERO_33':\r\n\t\t\treturn 'TB_BaconShop_HP_033';\r\n\t\tcase 'TB_BaconShop_HERO_34':\r\n\t\t\treturn 'TB_BaconShop_HP_035';\r\n\t\tcase 'TB_BaconShop_HERO_35':\r\n\t\t\treturn 'TB_BaconShop_HP_039';\r\n\t\tcase 'TB_BaconShop_HERO_36':\r\n\t\t\treturn 'TB_BaconShop_HP_042';\r\n\t\tcase 'TB_BaconShop_HERO_37':\r\n\t\t\treturn 'TB_BaconShop_HP_036';\r\n\t\tcase 'TB_BaconShop_HERO_38':\r\n\t\t\treturn 'TB_BaconShop_HP_038';\r\n\t\tcase 'TB_BaconShop_HERO_39':\r\n\t\t\treturn 'TB_BaconShop_HP_040';\r\n\t\tcase 'TB_BaconShop_HERO_40':\r\n\t\t\treturn 'TB_BaconShop_HP_057';\r\n\t\tcase 'TB_BaconShop_HERO_41':\r\n\t\t\treturn 'TB_BaconShop_HP_046';\r\n\t\tcase 'TB_BaconShop_HERO_42':\r\n\t\t\treturn 'TB_BaconShop_HP_047';\r\n\t\tcase 'TB_BaconShop_HERO_43':\r\n\t\t\treturn 'TB_BaconShop_HP_048';\r\n\t\t// case 'TB_BaconShop_HERO_44':\r\n\t\t// \treturn 'TB_BaconShop_HP_050';\r\n\t\tcase 'TB_BaconShop_HERO_45':\r\n\t\t\treturn 'TB_BaconShop_HP_053';\r\n\t\tcase 'TB_BaconShop_HERO_47':\r\n\t\t\treturn 'TB_BaconShop_HP_051';\r\n\t\tcase 'TB_BaconShop_HERO_49':\r\n\t\t\treturn 'TB_BaconShop_HP_054';\r\n\t\tcase 'TB_BaconShop_HERO_50':\r\n\t\t\treturn 'TB_BaconShop_HP_077';\r\n\t\tcase 'TB_BaconShop_HERO_52':\r\n\t\t\treturn 'TB_BaconShop_HP_061';\r\n\t\tcase 'TB_BaconShop_HERO_53':\r\n\t\t\treturn 'TB_BaconShop_HP_062';\r\n\t\tcase 'TB_BaconShop_HERO_55':\r\n\t\t\treturn 'TB_BaconShop_HP_056';\r\n\t\tcase 'TB_BaconShop_HERO_56':\r\n\t\t\treturn 'TB_BaconShop_HP_064';\r\n\t\tcase 'TB_BaconShop_HERO_57':\r\n\t\t\treturn 'TB_BaconShop_HP_063';\r\n\t\tcase 'TB_BaconShop_HERO_58':\r\n\t\t\treturn 'TB_BaconShop_HP_052';\r\n\t\tcase 'TB_BaconShop_HERO_59t':\r\n\t\t\treturn 'TB_BaconShop_HP_065t2';\r\n\t\tcase 'TB_BaconShop_HERO_59':\r\n\t\t\treturn 'TB_BaconShop_HP_065';\r\n\t\tcase 'TB_BaconShop_HERO_60':\r\n\t\t\treturn 'TB_BaconShop_HP_066';\r\n\t\tcase 'TB_BaconShop_HERO_61':\r\n\t\t\treturn 'TB_BaconShop_HP_067';\r\n\t\tcase 'TB_BaconShop_HERO_62':\r\n\t\t\treturn 'TB_BaconShop_HP_068';\r\n\t\tcase 'TB_BaconShop_HERO_64':\r\n\t\t\treturn 'TB_BaconShop_HP_074';\r\n\t\tcase CardIds.CaptainHooktusk_TB_BaconShop_HERO_67:\r\n\t\t\treturn CardIds.TrashForTreasure;\r\n\t\tcase 'TB_BaconShop_HERO_68':\r\n\t\t\treturn 'TB_BaconShop_HP_076';\r\n\t\tcase 'TB_BaconShop_HERO_70':\r\n\t\t\treturn 'TB_BaconShop_HP_080';\r\n\t\tcase 'TB_BaconShop_HERO_71':\r\n\t\t\treturn 'TB_BaconShop_HP_084';\r\n\t\tcase 'TB_BaconShop_HERO_72':\r\n\t\t\treturn 'TB_BaconShop_HP_081';\r\n\t\tcase 'TB_BaconShop_HERO_74':\r\n\t\t\treturn 'TB_BaconShop_HP_082';\r\n\t\tcase CardIds.Chenvaala_TB_BaconShop_HERO_78:\r\n\t\t\treturn CardIds.Avalanche_TB_BaconShop_HP_088;\r\n\t\tcase CardIds.Rakanishu_TB_BaconShop_HERO_75:\r\n\t\t\treturn CardIds.TavernLighting;\r\n\t\tcase CardIds.Alakir:\r\n\t\t\treturn CardIds.SwattingInsects;\r\n\t\tcase CardIds.ZephrysTheGreat_TB_BaconShop_HERO_91:\r\n\t\t\treturn CardIds.ThreeWishes;\r\n\t\tcase CardIds.SilasDarkmoon_TB_BaconShop_HERO_90:\r\n\t\t\treturn CardIds.ComeOneComeAll;\r\n\t\tcase CardIds.Cthun_TB_BaconShop_HERO_29:\r\n\t\t\treturn CardIds.SaturdayCthuns;\r\n\t\tcase CardIds.Nzoth:\r\n\t\t\treturn CardIds.AvatarOfNzoth;\r\n\t\tcase CardIds.Yshaarj:\r\n\t\t\treturn CardIds.EmbraceYourRage;\r\n\t\tcase CardIds.Tickatus_TB_BaconShop_HERO_94:\r\n\t\t\treturn CardIds.PrizeWall;\r\n\t\tcase CardIds.Greybough_TB_BaconShop_HERO_95:\r\n\t\t\treturn CardIds.SproutItOut;\r\n\t\tcase CardIds.OverlordSaurfang_BG20_HERO_102:\r\n\t\t\treturn CardIds.OverlordSaurfang_ForTheHorde;\r\n\t\tcase CardIds.DeathSpeakerBlackthorn_BG20_HERO_103:\r\n\t\t\treturn CardIds.DeathSpeakerBlackthorn_Bloodbound;\r\n\t\tcase CardIds.Voljin_BG20_HERO_201:\r\n\t\t\treturn CardIds.Voljin_SpiritSwap_BG20_HERO_201p;\r\n\t\tcase CardIds.Xyrella_BG20_HERO_101:\r\n\t\t\treturn CardIds.Xyrella_SeeTheLight;\r\n\t\tcase CardIds.MutanusTheDevourer_BG20_HERO_301:\r\n\t\t\treturn CardIds.MutanusTheDevourer_Devour;\r\n\t\tcase CardIds.GuffRunetotem_BG20_HERO_242:\r\n\t\t\treturn CardIds.GuffRunetotem_NaturalBalance;\r\n\t\tcase CardIds.KurtrusAshfallen_BG20_HERO_280:\r\n\t\t\treturn CardIds.KurtrusAshfallen_GlaiveRicochet;\r\n\t\tcase CardIds.Galewing:\r\n\t\t\treturn CardIds.Galewing_DungarsGryphon;\r\n\t\tcase CardIds.TradePrinceGallywix_TB_BaconShop_HERO_10:\r\n\t\t\treturn CardIds.SmartSavings;\r\n\t\tcase CardIds.MasterNguyen:\r\n\t\t\treturn CardIds.MasterNguyen_PowerOfTheStorm;\r\n\t\tcase CardIds.CarielRoame_BG21_HERO_000:\r\n\t\t\treturn CardIds.CarielRoame_Conviction;\r\n\t\tcase CardIds.Sneed_BG21_HERO_030:\r\n\t\t\treturn CardIds.Sneed_SneedsReplicator;\r\n\t\tcase CardIds.CookieTheCook_BG21_HERO_020:\r\n\t\t\treturn CardIds.CookieTheCook_StirThePot;\r\n\t\tcase CardIds.TamsinRoame_BG20_HERO_282:\r\n\t\t\treturn CardIds.TamsinRoame_FragrantPhylactery;\r\n\t\tcase CardIds.ScabbsCutterbutter_BG21_HERO_010:\r\n\t\t\treturn CardIds.ScabbsCutterbutter_ISpy;\r\n\t\tcase CardIds.Brukan_BG22_HERO_001:\r\n\t\t\treturn CardIds.Brukan_EmbraceTheElements;\r\n\t\tcase CardIds.Drekthar_BG22_HERO_002:\r\n\t\t\treturn CardIds.Drekthar_LeadTheFrostwolves;\r\n\t\tcase CardIds.VanndarStormpike_BG22_HERO_003:\r\n\t\t\treturn CardIds.VanndarStormpike_LeadTheStormpikes;\r\n\t\tcase CardIds.TavishStormpike_BG22_HERO_000:\r\n\t\t\treturn CardIds.TavishStormpike_Deadeye;\r\n\t\tcase CardIds.VardenDawngrasp_BG22_HERO_004:\r\n\t\t\treturn CardIds.VardenDawngrasp_TwiceAsNice;\r\n\t\tcase CardIds.Rokara_BG20_HERO_100:\r\n\t\t\treturn CardIds.Rokara_GloryOfCombat;\r\n\t\tcase CardIds.Onyxia_BG22_HERO_305:\r\n\t\t\treturn CardIds.Onyxia_Broodmother;\r\n\t\tcase CardIds.AmbassadorFaelin_BG22_HERO_201:\r\n\t\t\treturn CardIds.AmbassadorFaelin_ExpeditionPlans;\r\n\t\tcase CardIds.IniStormcoil_BG22_HERO_200:\r\n\t\t\treturn CardIds.IniStormcoil_Mechgyver;\r\n\t\tcase CardIds.QueenAzshara_BG22_HERO_007:\r\n\t\t\treturn CardIds.QueenAzshara_AzsharasAmbition;\r\n\t\tcase CardIds.QueenAzshara_NagaQueenAzsharaToken:\r\n\t\t\treturn CardIds.QueenAzshara_NagaConquest;\r\n\t\tcase CardIds.Ozumat_BG23_HERO_201:\r\n\t\t\treturn CardIds.Ozumat_Tentacular;\r\n\t\tcase CardIds.LadyVashj_BG23_HERO_304:\r\n\t\t\treturn CardIds.LadyVashj_RelicsOfTheDeep;\r\n\t\tcase CardIds.HeistbaronTogwaggle_BG23_HERO_305:\r\n\t\t\treturn CardIds.HeistbaronTogwaggle_ThePerfectCrime;\r\n\t\tcase CardIds.MurlocHolmes_BG23_HERO_303:\r\n\t\t\treturn CardIds.MurlocHolmes_DetectiveForHire;\r\n\t\tcase CardIds.SireDenathrius_BG24_HERO_100:\r\n\t\t\treturn CardIds.SireDenathrius_Whodunitquestion;\r\n\t\tcase CardIds.SylvanasWindrunner_BG23_HERO_306:\r\n\t\t\treturn CardIds.SylvanasWindrunner_ReclaimedSouls;\r\n\t\tcase CardIds.TheJailer_TB_BaconShop_HERO_702:\r\n\t\t\treturn CardIds.RunicEmpowerment;\r\n\t\tcase CardIds.EnhanceOMechano_BG24_HERO_204:\r\n\t\t\treturn CardIds.EnhanceOMechano_Enhancification;\r\n\t\tcase CardIds.ProfessorPutricide_BG25_HERO_100:\r\n\t\t\treturn CardIds.ProfessorPutricide_BuildAnUndead;\r\n\t\tcase CardIds.TeronGorefiend_BG25_HERO_103:\r\n\t\t\treturn CardIds.TeronGorefiend_RapidReanimation;\r\n\t\tcase CardIds.ETCBandManager_BG25_HERO_105:\r\n\t\t\treturn CardIds.ETCBandManager_SignANewArtist;\r\n\t\tcase CardIds.RockMasterVoone_BG26_HERO_104:\r\n\t\t\treturn CardIds.RockMasterVoone_UpbeatHarmony;\r\n\t\tcase CardIds.IngeTheIronHymn:\r\n\t\t\treturn CardIds.IngeTheIronHymn_MajorHymn;\r\n\t\tcase CardIds.CapnHoggarr_BG26_HERO_101:\r\n\t\t\treturn CardIds.CapnHoggarr_ImTheCapnNow;\r\n\t\t// case CardIds.Diablo:\r\n\t\t// \treturn CardIds.Diablo_RealmOfTerror;\r\n\t\tcase CardIds.ThorimStormlord_BG27_HERO_801:\r\n\t\t\treturn CardIds.ThorimStormlord_ChooseYourChampion_BG27_HERO_801p2;\r\n\t\tcase CardIds.SnakeEyes_BG28_HERO_400:\r\n\t\t\treturn CardIds.SnakeEyes_LuckyRoll_BG28_HERO_400p;\r\n\t\tcase CardIds.TaethelanBloodwatcher_BG28_HERO_800:\r\n\t\t\treturn CardIds.TaethelanBloodwatcher_ReliquaryResearch_BG28_HERO_800p;\r\n\t\tcase CardIds.DoctorHollidae_BG28_HERO_801:\r\n\t\t\treturn CardIds.DoctorHollidae_BlessingOfTheNineFrogs_BG28_HERO_801p;\r\n\t\tcase CardIds.Cho_BGDUO_HERO_222:\r\n\t\t\treturn CardIds.Cho_DoubleTrouble_BGDUO_HERO_222p;\r\n\t\tcase CardIds.Gall_BGDUO_HERO_223:\r\n\t\t\treturn CardIds.Gall_DoubleTrouble_BGDUO_HERO_223p;\r\n\t\tcase CardIds.TheNamelessOne_BGDUO_HERO_100:\r\n\t\t\treturn CardIds.TheNamelessOne_X_BGDUO_HERO_100p;\r\n\t\tcase CardIds.FlobbidinousFloop_BGDUO_HERO_101:\r\n\t\t\treturn CardIds.FlobbidinousFloop_GloriousGloop_BGDUO_HERO_101p;\r\n\t\tcase CardIds.MadamGoya_BGDUO_HERO_104:\r\n\t\t\treturn CardIds.MadamGoya_EfficientExchange_BGDUO_HERO_104p;\r\n\t\tcase CardIds.MarinTheManager_BG30_HERO_304:\r\n\t\t\treturn CardIds.MarinTheManager_FantasticTreasure_BG30_HERO_304p;\r\n\t\tcase CardIds.FarseerNobundo_BG31_HERO_003:\r\n\t\t\treturn CardIds.FarseerNobundo_TheGalaxysLens_BG31_HERO_003p;\r\n\t\tcase CardIds.ExarchOthaar_BG31_HERO_006:\r\n\t\t\treturn CardIds.ExarchOthaar_ArcaneKnowledge_BG31_HERO_006p;\r\n\t\tcase CardIds.ZerekMasterCloner_BG31_HERO_005:\r\n\t\t\treturn CardIds.ZerekMasterCloner_CloningGallery_BG31_HERO_005p;\r\n\t\tcase CardIds.JimRaynor_BG31_HERO_801:\r\n\t\t\treturn CardIds.JimRaynor_LiftOff_BG31_HERO_801p;\r\n\t\tcase CardIds.Artanis_BG31_HERO_802:\r\n\t\t\treturn CardIds.Artanis_WarpGate_BG31_HERO_802p;\r\n\t\tcase CardIds.KerriganQueenOfBlades_BG31_HERO_811:\r\n\t\t\treturn CardIds.KerriganQueenOfBlades_SpawningPool_BG31_HERO_811p;\r\n\t\tcase CardIds.Buttons_BG32_HERO_002:\r\n\t\t\treturn CardIds.Buttons_GrowingCollection_BG32_HERO_002p;\r\n\t\tcase CardIds.ForestLordCenarius_BG32_HERO_001:\r\n\t\t\treturn CardIds.ForestLordCenarius_WisdomOfAncients_BG32_HERO_001p;\r\n\r\n\t\tcase '':\r\n\t\t\treturn null; // new heroes\r\n\t}\r\n};\r\n\r\nexport const getBuddy = (heroCardId: CardIds, allCards: AllCardsService): CardIds | null => {\r\n\tswitch (normalizeHeroCardId(heroCardId, allCards)) {\r\n\t\tcase CardIds.AFKay_TB_BaconShop_HERO_16:\r\n\t\t\treturn CardIds.SnackVendor_TB_BaconShop_HERO_16_Buddy;\r\n\t\tcase CardIds.Alakir:\r\n\t\t\treturn CardIds.SpiritOfAir_TB_BaconShop_HERO_76_Buddy;\r\n\t\tcase CardIds.Alexstrasza_TB_BaconShop_HERO_56:\r\n\t\t\treturn CardIds.Vaelastrasz_TB_BaconShop_HERO_56_Buddy;\r\n\t\tcase CardIds.ArannaStarseeker_ArannaUnleashedToken:\r\n\t\tcase CardIds.ArannaStarseeker_TB_BaconShop_HERO_59:\r\n\t\t\treturn CardIds.SklibbDemonHunter_TB_BaconShop_HERO_59_Buddy;\r\n\t\tcase CardIds.ArchVillainRafaam_TB_BaconShop_HERO_45:\r\n\t\t\treturn CardIds.LoyalHenchman_TB_BaconShop_HERO_45_Buddy;\r\n\t\tcase CardIds.Brukan_BG22_HERO_001:\r\n\t\t\treturn CardIds.SpiritRaptor_BG22_HERO_001_Buddy;\r\n\t\tcase CardIds.CaptainEudora_TB_BaconShop_HERO_64:\r\n\t\t\treturn CardIds.DagwikStickytoe_TB_BaconShop_HERO_64_Buddy;\r\n\t\tcase CardIds.CaptainHooktusk_TB_BaconShop_HERO_67:\r\n\t\t\treturn CardIds.RagingContender_TB_BaconShop_HERO_67_Buddy;\r\n\t\tcase CardIds.CarielRoame_BG21_HERO_000:\r\n\t\t\treturn CardIds.CaptainFairmount_BG21_HERO_000_Buddy;\r\n\t\tcase CardIds.Chenvaala_TB_BaconShop_HERO_78:\r\n\t\t\treturn CardIds.SnowElemental_TB_BaconShop_HERO_78_Buddy;\r\n\t\tcase CardIds.CookieTheCook_BG21_HERO_020:\r\n\t\t\treturn CardIds.SousChef_BG21_HERO_020_Buddy;\r\n\t\tcase CardIds.Cthun_TB_BaconShop_HERO_29:\r\n\t\t\treturn CardIds.TentacleOfCthun_TB_BaconShop_HERO_29_Buddy;\r\n\t\tcase CardIds.DancinDeryl:\r\n\t\t\treturn CardIds.AsherTheHaberdasher_TB_BaconShop_HERO_36_Buddy;\r\n\t\tcase CardIds.DeathSpeakerBlackthorn_BG20_HERO_103:\r\n\t\t\treturn CardIds.DeathsHeadSage_BG20_HERO_103_Buddy;\r\n\t\tcase CardIds.Deathwing_TB_BaconShop_HERO_52:\r\n\t\t\treturn CardIds.LadySinestra_TB_BaconShop_HERO_52_Buddy;\r\n\t\tcase CardIds.DinotamerBrann_TB_BaconShop_HERO_43:\r\n\t\t\treturn CardIds.BrannsEpicEgg_TB_BaconShop_HERO_43_Buddy;\r\n\t\tcase CardIds.Drekthar_BG22_HERO_002:\r\n\t\t\treturn CardIds.FrostwolfLieutenant_BG22_HERO_002_Buddy;\r\n\t\tcase CardIds.EdwinVancleef_TB_BaconShop_HERO_01:\r\n\t\t\treturn CardIds.Si7Scout_TB_BaconShop_HERO_01_Buddy;\r\n\t\tcase CardIds.EliseStarseeker_TB_BaconShop_HERO_42:\r\n\t\t\treturn CardIds.JrNavigator_TB_BaconShop_HERO_42_Buddy;\r\n\t\tcase CardIds.ForestWardenOmu_TB_BaconShop_HERO_74:\r\n\t\t\treturn CardIds.EvergreenBotani_TB_BaconShop_HERO_74_Buddy;\r\n\t\tcase CardIds.FungalmancerFlurgl:\r\n\t\t\treturn CardIds.SparkfinSoothsayer_TB_BaconShop_HERO_55_Buddy;\r\n\t\tcase CardIds.Galakrond:\r\n\t\t\treturn CardIds.ApostleOfGalakrond_TB_BaconShop_HERO_02_Buddy;\r\n\t\tcase CardIds.Galewing:\r\n\t\t\treturn CardIds.FlightTrainer_BG20_HERO_283_Buddy;\r\n\t\tcase CardIds.GeorgeTheFallen_TB_BaconShop_HERO_15:\r\n\t\t\treturn CardIds.KarlTheLost_TB_BaconShop_HERO_15_Buddy;\r\n\t\tcase CardIds.Greybough_TB_BaconShop_HERO_95:\r\n\t\t\treturn CardIds.WanderingTreant_TB_BaconShop_HERO_95_Buddy;\r\n\t\tcase CardIds.GuffRunetotem_BG20_HERO_242:\r\n\t\t\treturn CardIds.BabyKodo_BG20_HERO_242_Buddy;\r\n\t\tcase CardIds.IllidanStormrage_TB_BaconShop_HERO_08:\r\n\t\t\treturn CardIds.EclipsionIllidari_TB_BaconShop_HERO_08_Buddy;\r\n\t\tcase CardIds.InfiniteToki:\r\n\t\t\treturn CardIds.ClockworkAssistant_TB_BaconShop_HERO_28_Buddy;\r\n\t\tcase CardIds.JandiceBarov_TB_BaconShop_HERO_71:\r\n\t\t\treturn CardIds.JandicesApprentice_TB_BaconShop_HERO_71_Buddy;\r\n\t\tcase CardIds.KaelthasSunstrider_TB_BaconShop_HERO_60:\r\n\t\t\treturn CardIds.CrimsonHandCenturion_TB_BaconShop_HERO_60_Buddy;\r\n\t\tcase CardIds.KingMukla_TB_BaconShop_HERO_38:\r\n\t\t\treturn CardIds.CrazyMonkey_TB_BaconShop_HERO_38_Buddy;\r\n\t\tcase CardIds.KurtrusAshfallen_BG20_HERO_280:\r\n\t\t\treturn CardIds.LivingNightmare_BG20_HERO_280_Buddy;\r\n\t\tcase CardIds.LichBazhial:\r\n\t\t\treturn CardIds.UnearthedUnderling_TB_BaconShop_HERO_25_Buddy;\r\n\t\tcase CardIds.LordBarov_TB_BaconShop_HERO_72:\r\n\t\t\treturn CardIds.BarovsApprentice_TB_BaconShop_HERO_72_Buddy;\r\n\t\tcase CardIds.LordJaraxxus_TB_BaconShop_HERO_37:\r\n\t\t\treturn CardIds.Kilrek_TB_BaconShop_HERO_37_Buddy;\r\n\t\tcase CardIds.MaievShadowsong_TB_BaconShop_HERO_62:\r\n\t\t\treturn CardIds.ShadowWarden_TB_BaconShop_HERO_62_Buddy;\r\n\t\tcase CardIds.Malygos:\r\n\t\t\treturn CardIds.NexusLord_TB_BaconShop_HERO_58_Buddy;\r\n\t\tcase CardIds.MasterNguyen:\r\n\t\t\treturn CardIds.LeiFlamepaw_BG20_HERO_202_Buddy;\r\n\t\tcase CardIds.MillhouseManastorm_TB_BaconShop_HERO_49:\r\n\t\t\treturn CardIds.MagnusManastorm_TB_BaconShop_HERO_49_Buddy;\r\n\t\tcase CardIds.MillificentManastorm:\r\n\t\t\treturn CardIds.ElementiumSquirrelBomb_TB_BaconShop_HERO_17_Buddy;\r\n\t\tcase CardIds.MrBigglesworth_TB_BaconShop_HERO_70:\r\n\t\t\treturn CardIds.LilKT_TB_BaconShop_HERO_70_Buddy;\r\n\t\tcase CardIds.MutanusTheDevourer_BG20_HERO_301:\r\n\t\t\treturn CardIds.NightmareEctoplasm_BG20_HERO_301_Buddy;\r\n\t\tcase CardIds.Nozdormu_TB_BaconShop_HERO_57:\r\n\t\t\treturn CardIds.Chromie_TB_BaconShop_HERO_57_Buddy;\r\n\t\tcase CardIds.Nzoth:\r\n\t\t\treturn CardIds.BabyNzoth_TB_BaconShop_HERO_93_Buddy;\r\n\t\tcase CardIds.OverlordSaurfang_BG20_HERO_102:\r\n\t\t\treturn CardIds.DranoshSaurfang_BG20_HERO_102_Buddy;\r\n\t\tcase CardIds.PatchesThePirate_TB_BaconShop_HERO_18:\r\n\t\t\treturn CardIds.TuskarrRaider_TB_BaconShop_HERO_18_Buddy;\r\n\t\tcase CardIds.Patchwerk_TB_BaconShop_HERO_34:\r\n\t\t\treturn CardIds.Weebomination_TB_BaconShop_HERO_34_Buddy;\r\n\t\tcase CardIds.Pyramad:\r\n\t\t\treturn CardIds.TitanicGuardian_TB_BaconShop_HERO_39_Buddy;\r\n\t\tcase CardIds.QueenWagtoggle_TB_BaconShop_HERO_14:\r\n\t\t\treturn CardIds.ElderTaggawag_TB_BaconShop_HERO_14_Buddy;\r\n\t\tcase CardIds.RagnarosTheFirelord_TB_BaconShop_HERO_11:\r\n\t\t\treturn CardIds.Lucifron_TB_BaconShop_HERO_11_Buddy;\r\n\t\tcase CardIds.Rakanishu_TB_BaconShop_HERO_75:\r\n\t\t\treturn CardIds.LanternTender_TB_BaconShop_HERO_75_Buddy;\r\n\t\tcase CardIds.RenoJackson_TB_BaconShop_HERO_41:\r\n\t\t\treturn CardIds.SrTombDiver_TB_BaconShop_HERO_41_Buddy;\r\n\t\tcase CardIds.ScabbsCutterbutter_BG21_HERO_010:\r\n\t\t\treturn CardIds.WardenThelwater_BG21_HERO_010_Buddy;\r\n\t\tcase CardIds.Shudderwock_TB_BaconShop_HERO_23:\r\n\t\t\treturn CardIds.Muckslinger_TB_BaconShop_HERO_23_Buddy;\r\n\t\tcase CardIds.SilasDarkmoon_TB_BaconShop_HERO_90:\r\n\t\t\treturn CardIds.Burth_TB_BaconShop_HERO_90_Buddy;\r\n\t\tcase CardIds.Sindragosa_TB_BaconShop_HERO_27:\r\n\t\t\treturn CardIds.ThawedChampion_TB_BaconShop_HERO_27_Buddy;\r\n\t\tcase CardIds.SirFinleyMrrgglton_TB_BaconShop_HERO_40:\r\n\t\t\treturn CardIds.MaxwellMightySteed_TB_BaconShop_HERO_40_Buddy;\r\n\t\tcase CardIds.SkycapnKragg_TB_BaconShop_HERO_68:\r\n\t\t\treturn CardIds.Sharkbait_TB_BaconShop_HERO_68_Buddy;\r\n\t\tcase CardIds.Sneed_BG21_HERO_030:\r\n\t\t\treturn CardIds.PilotedWhirlOTron_BG21_HERO_030_Buddy;\r\n\t\tcase CardIds.TamsinRoame_BG20_HERO_282:\r\n\t\t\treturn CardIds.Monstrosity_BG20_HERO_282_Buddy;\r\n\t\tcase CardIds.TavishStormpike_BG22_HERO_000:\r\n\t\t\treturn CardIds.Crabby_BG22_HERO_000_Buddy;\r\n\t\tcase CardIds.TessGreymane_TB_BaconShop_HERO_50:\r\n\t\t\treturn CardIds.HunterOfOld_TB_BaconShop_HERO_50_Buddy;\r\n\t\tcase CardIds.TheCurator_TB_BaconShop_HERO_33:\r\n\t\t\treturn CardIds.Mishmash_TB_BaconShop_HERO_33_Buddy;\r\n\t\tcase CardIds.TheGreatAkazamzarak:\r\n\t\t\treturn CardIds.StreetMagician_TB_BaconShop_HERO_21_Buddy;\r\n\t\tcase CardIds.TheLichKing_TB_BaconShop_HERO_22:\r\n\t\t\treturn CardIds.Arfus_TB_BaconShop_HERO_22_Buddy;\r\n\t\tcase CardIds.TheRatKing_TB_BaconShop_HERO_12:\r\n\t\t\treturn CardIds.PigeonLord_TB_BaconShop_HERO_12_Buddy;\r\n\t\tcase CardIds.Tickatus_TB_BaconShop_HERO_94:\r\n\t\t\treturn CardIds.TicketCollector_TB_BaconShop_HERO_94_Buddy;\r\n\t\tcase CardIds.TradePrinceGallywix_TB_BaconShop_HERO_10:\r\n\t\t\treturn CardIds.BilgewaterMogul_TB_BaconShop_HERO_10_Buddy;\r\n\t\tcase CardIds.VanndarStormpike_BG22_HERO_003:\r\n\t\t\treturn CardIds.StormpikeLieutenant_BG22_HERO_003_Buddy;\r\n\t\tcase CardIds.Voljin_BG20_HERO_201:\r\n\t\t\treturn CardIds.MasterGadrin_BG20_HERO_201_Buddy;\r\n\t\tcase CardIds.Xyrella_BG20_HERO_101:\r\n\t\t\treturn CardIds.BabyElekk_BG20_HERO_101_Buddy;\r\n\t\tcase CardIds.YoggSaronHopesEnd_TB_BaconShop_HERO_35:\r\n\t\t\treturn CardIds.AcolyteOfYoggSaron_TB_BaconShop_HERO_35_Buddy;\r\n\t\tcase CardIds.Ysera_TB_BaconShop_HERO_53:\r\n\t\t\treturn CardIds.ValithriaDreamwalker_TB_BaconShop_HERO_53_Buddy;\r\n\t\tcase CardIds.Yshaarj:\r\n\t\t\treturn CardIds.BabyYshaarj_TB_BaconShop_HERO_92_Buddy;\r\n\t\tcase CardIds.ZephrysTheGreat_TB_BaconShop_HERO_91:\r\n\t\t\treturn CardIds.Phyresz_TB_BaconShop_HERO_91_Buddy;\r\n\t\tcase CardIds.VardenDawngrasp_BG22_HERO_004:\r\n\t\t\treturn CardIds.VardensAquarrior_BG22_HERO_004_Buddy;\r\n\t\tcase CardIds.Rokara_BG20_HERO_100:\r\n\t\t\treturn CardIds.IcesnarlTheMighty_BG20_HERO_100_Buddy;\r\n\t\tcase CardIds.Onyxia_BG22_HERO_305:\r\n\t\t\treturn CardIds.ManyWhelps_BG22_HERO_305_Buddy;\r\n\t\tcase CardIds.AmbassadorFaelin_BG22_HERO_201:\r\n\t\t\treturn CardIds.SubmersibleChef_BG22_HERO_201_Buddy;\r\n\t\tcase CardIds.IniStormcoil_BG22_HERO_200:\r\n\t\t\treturn CardIds.SubScrubber_BG22_HERO_200_Buddy;\r\n\t\tcase CardIds.QueenAzshara_BG22_HERO_007:\r\n\t\t\treturn CardIds.ImperialDefender_BG22_HERO_007_Buddy;\r\n\t\tcase CardIds.Ozumat_BG23_HERO_201:\r\n\t\t\treturn CardIds.Tamuzo_BG23_HERO_201_Buddy;\r\n\t\tcase CardIds.LadyVashj_BG23_HERO_304:\r\n\t\t\treturn CardIds.CoilfangElite_BG23_HERO_304_Buddy;\r\n\t\tcase CardIds.HeistbaronTogwaggle_BG23_HERO_305:\r\n\t\t\treturn CardIds.WaxadredTheDrippy_BG23_HERO_305_Buddy;\r\n\t\tcase CardIds.SireDenathrius_BG24_HERO_100:\r\n\t\t\treturn CardIds.ShadyAristocrat_BG24_HERO_100_Buddy;\r\n\t\tcase CardIds.SylvanasWindrunner_BG23_HERO_306:\r\n\t\t\treturn CardIds.NathanosBlightcaller_BG23_HERO_306_Buddy;\r\n\t\tcase CardIds.TheJailer_TB_BaconShop_HERO_702:\r\n\t\t\treturn CardIds.MawswornSoulkeeper_TB_BaconShop_HERO_702_Buddy;\r\n\t\tcase CardIds.EnhanceOMechano_BG24_HERO_204:\r\n\t\t\treturn CardIds.EnhanceOMedico_BG24_HERO_204_Buddy;\r\n\t\tcase CardIds.ProfessorPutricide_BG25_HERO_100:\r\n\t\t\treturn CardIds.Festergut_BG25_HERO_100_Buddy;\r\n\t\tcase CardIds.TeronGorefiend_BG25_HERO_103:\r\n\t\t\treturn CardIds.ShadowyConstruct_BG25_HERO_103_Buddy;\r\n\t\tcase CardIds.MurlocHolmes_BG23_HERO_303:\r\n\t\t\treturn CardIds.Watfin_BG23_HERO_303_Buddy;\r\n\t\tcase CardIds.ETCBandManager_BG25_HERO_105:\r\n\t\t\treturn CardIds.TalentScout_BG25_HERO_105_Buddy;\r\n\t\tcase CardIds.CapnHoggarr_BG26_HERO_101:\r\n\t\t\treturn CardIds.ShiningSailor_BG26_HERO_101_Buddy;\r\n\t\tcase CardIds.IngeTheIronHymn:\r\n\t\t\treturn CardIds.SolemnSerenader_BG26_HERO_102_Buddy;\r\n\t\tcase CardIds.RockMasterVoone_BG26_HERO_104:\r\n\t\t\treturn CardIds.AkaliRockRhino_BG26_HERO_104_Buddy;\r\n\t\tcase CardIds.ThorimStormlord_BG27_HERO_801:\r\n\t\t\treturn CardIds.VeranusStormlordsMount_BG27_HERO_801_Buddy;\r\n\t\tcase CardIds.SnakeEyes_BG28_HERO_400:\r\n\t\t\treturn CardIds.BoxCars_BG28_HERO_400_Buddy;\r\n\t\tcase CardIds.DoctorHollidae_BG28_HERO_801:\r\n\t\t\treturn CardIds.TheNineFrogs_BG28_HERO_801_Buddy;\r\n\t\tcase CardIds.TaethelanBloodwatcher_BG28_HERO_800:\r\n\t\t\treturn CardIds.ReliquaryAttendant_BG28_HERO_800_Buddy;\r\n\t\tcase CardIds.TheNamelessOne_BGDUO_HERO_100:\r\n\t\t\treturn CardIds.FacelessOne_BGDUO_HERO_100_Buddy;\r\n\t\tcase CardIds.Cho_BGDUO_HERO_222:\r\n\t\t\treturn CardIds.HalfusTheMighty_BGDUO_HERO_222_Buddy;\r\n\t\tcase CardIds.Gall_BGDUO_HERO_223:\r\n\t\t\treturn CardIds.HalfusTheWise_BGDUO_HERO_223_Buddy;\r\n\t\tcase CardIds.MadamGoya_BGDUO_HERO_104:\r\n\t\t\treturn CardIds.MisterChu_BGDUO_HERO_104_Buddy;\r\n\t\tcase CardIds.FlobbidinousFloop_BGDUO_HERO_101:\r\n\t\t\treturn CardIds.GloriousGloopling_BGDUO_HERO_101_Buddy;\r\n\t\tdefault:\r\n\t\t\tif (!!heroCardId) {\r\n\t\t\t\tconsole.debug('missing buddy section for ', heroCardId);\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t}\r\n};\r\n\r\nexport const isBaconGhost = (cardId: string): boolean => {\r\n\treturn (\r\n\t\tcardId === CardIds.Kelthuzad_TB_BaconShop_HERO_KelThuzad ||\r\n\t\tcardId === CardIds.LadyDeathwhisper_TB_BaconShop_HERO_Deathwhisper\r\n\t);\r\n};\r\n\r\nexport const getEffectiveTribes = (\r\n\tcard: ReferenceCard,\r\n\tgroupMinionsIntoTheirTribeGroup: boolean,\r\n): readonly string[] => {\r\n\tconst tribes: readonly Race[] = groupMinionsIntoTheirTribeGroup\r\n\t\t? getTribesForInclusion(card, true)\r\n\t\t: getEffectiveTribesEnum(card);\r\n\treturn tribes.map((tribe) => Race[tribe]);\r\n};\r\n\r\n// TODO: use the card tags instead\r\nexport const getTribesForInclusion = (card: ReferenceCard, includeOwnTribe: boolean): readonly Race[] => {\r\n\tif (!card) {\r\n\t\treturn [];\r\n\t}\r\n\tconst nativeRaces = card.races?.map((r) => Race[r]) ?? [];\r\n\tconst cardRaces = includeOwnTribe ? nativeRaces : [];\r\n\tswitch (card.id) {\r\n\t\t// Some cases are only included when specific tribes are\r\n\t\tcase CardIds.BirdBuddy_BG21_002:\r\n\t\tcase CardIds.BirdBuddy_BG21_002_G:\r\n\t\tcase CardIds.PackLeader_BGS_017:\r\n\t\tcase CardIds.PackLeader_TB_BaconUps_086:\r\n\t\tcase CardIds.VirmenSensei_CFM_816:\r\n\t\t// case CardIds.VirmenSensei_TB_BaconUps_074:\r\n\t\tcase CardIds.HoundmasterLegacy:\r\n\t\tcase CardIds.HoundmasterVanilla:\r\n\t\tcase CardIds.Houndmaster_TB_BaconUps_068:\r\n\t\tcase CardIds.Houndmaster_BG_DS1_070:\r\n\t\t\treturn [Race.BEAST, ...cardRaces];\r\n\t\tcase CardIds.ImpatientDoomsayer_BG21_007:\r\n\t\tcase CardIds.ImpatientDoomsayer_BG21_007_G:\r\n\t\tcase CardIds.SoulJuggler_BGS_002:\r\n\t\tcase CardIds.SoulJuggler_TB_BaconUps_075:\r\n\t\tcase CardIds.WrathWeaver_BGS_004:\r\n\t\tcase CardIds.WrathWeaver_TB_BaconUps_079:\r\n\t\tcase CardIds.CultistSthara_BG27_081:\r\n\t\tcase CardIds.CultistSthara_BG27_081_G:\r\n\t\t\treturn [Race.DEMON, ...cardRaces];\r\n\t\tcase CardIds.SeafoodSlinger_BG21_011:\r\n\t\tcase CardIds.SeafoodSlinger_BG21_011_G:\r\n\t\t\treturn [Race.MURLOC, ...cardRaces];\r\n\t\tcase CardIds.NadinaTheRed_BGS_040:\r\n\t\tcase CardIds.NadinaTheRed_TB_BaconUps_154:\r\n\t\t// case CardIds.WaxriderTogwaggle_BGS_035:\r\n\t\t// case CardIds.WaxriderTogwaggle_TB_BaconUps_105:\r\n\t\tcase CardIds.WhelpSmuggler_BG21_013:\r\n\t\tcase CardIds.WhelpSmuggler_BG21_013_G:\r\n\t\t\treturn [Race.DRAGON, ...cardRaces];\r\n\t\tcase CardIds.MajordomoExecutus_BGS_105:\r\n\t\tcase CardIds.MajordomoExecutus_TB_BaconUps_207:\r\n\t\tcase CardIds.MasterOfRealities_BG21_036:\r\n\t\tcase CardIds.MasterOfRealities_BG21_036_G:\r\n\t\tcase CardIds.NomiKitchenNightmare_BGS_104:\r\n\t\tcase CardIds.NomiKitchenNightmare_TB_BaconUps_201:\r\n\t\t\treturn [Race.ELEMENTAL, ...cardRaces];\r\n\t\tcase CardIds.KangorsApprentice_BGS_012:\r\n\t\tcase CardIds.KangorsApprentice_TB_BaconUps_087:\r\n\t\t\treturn [Race.MECH, ...cardRaces];\r\n\t\tcase CardIds.DefiantShipwright_BG21_018:\r\n\t\tcase CardIds.DefiantShipwright_BG21_018_G:\r\n\t\t// case CardIds.TheTideRazor_BGS_079:\r\n\t\t// case CardIds.TheTideRazor_TB_BaconUps_137:\r\n\t\tcase CardIds.CoastGuard_BG31_827:\r\n\t\tcase CardIds.CoastGuard_BG31_827_G:\r\n\t\t\treturn [Race.PIRATE, ...cardRaces];\r\n\t\tcase CardIds.AgamagganTheGreatBoar_BG20_205:\r\n\t\tcase CardIds.AgamagganTheGreatBoar_BG20_205_G:\r\n\t\tcase CardIds.ProphetOfTheBoar_BG20_203:\r\n\t\tcase CardIds.ProphetOfTheBoar_BG20_203_G:\r\n\t\t\treturn [Race.QUILBOAR, ...cardRaces];\r\n\t\tcase CardIds.OrgozoaTheTender_BG23_015:\r\n\t\tcase CardIds.OrgozoaTheTender_BG23_015_G:\r\n\t\t\treturn [Race.NAGA, ...cardRaces];\r\n\t\tcase CardIds.DisguisedGraverobber_BG28_303:\r\n\t\tcase CardIds.DisguisedGraverobber_BG28_303_G:\r\n\t\t\treturn [Race.UNDEAD, ...cardRaces];\r\n\t\tdefault:\r\n\t\t\treturn getEffectiveTribesEnum(card);\r\n\t}\r\n};\r\n\r\n// To avoid braking existing imports\r\nexport const getEffectiveTribesEnum = getEffectiveTribesEnumBase;\r\n"]}
1
+ {"version":3,"file":"bgs-utils.js","sourceRoot":"","sources":["../../src/services/bgs-utils.ts"],"names":[],"mappings":";;;AAAA,8CAAiG;AACjG,yCAAwD;AAE3C,QAAA,YAAY,GAAG;IAC3B,iBAAI,CAAC,KAAK;IACV,iBAAI,CAAC,KAAK;IACV,iBAAI,CAAC,MAAM;IACX,iBAAI,CAAC,IAAI;IACT,iBAAI,CAAC,MAAM;IACX,iBAAI,CAAC,MAAM;IACX,iBAAI,CAAC,SAAS;IACd,iBAAI,CAAC,QAAQ;IACb,iBAAI,CAAC,IAAI;IACT,iBAAI,CAAC,MAAM;CACX,CAAC;AAEW,QAAA,mBAAmB,GAAG,CAAC,CAAC;AAExB,QAAA,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+FrC,CAAC;AAEW,QAAA,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;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D;YACC,6BAA4C;QAC7C;YACC,oCAA4D;QAC7D;YACC,oCAA6D;QAC9D;YACC,oCAA6D;QAC9D;YACC,oCAA+D;QAChE;YACC,oCAAsD;QACvD;YACC,6BAAmD;QACpD;YACC,oCAA6D;QAC9D;YACC,oCAA2D;QAC5D;YACC,oCAAiD;QAClD;YACC,oCAAuD;QACxD;YACC,oCAAoD;QACrD;YACC,6BAA+C;QAChD;YACC,oCAA0D;QAC3D;YACC,oCAAiE;QAClE;YACC,oCAAgD;QACjD;YACC,6BAAsD;QACvD;YACC,oCAAkD;QACnD;YACC,oCAAoD;QACrD;YACC,6BAAmD;QACpD;YACC,oCAAwD;QACzD;YACC,oCAAwD;QACzD;YACC,oCAA0D;QAC3D;YACC,oCAAwD;QACzD;YACC,oCAAmD;QACpD;YACC,oCAAwD;QACzD;YACC,oCAAsD;QACvD;YACC,6BAAmD;QACpD;YACC,oCAAsD;QACvD;YACC,oCAAgD;QACjD;YACC,oCAAyD;QAC1D;YACC,oCAA6D;QAC9D;YACC,oCAAoD;QACrD;YACC,6BAAqD;QACtD;YACC,6BAA+C;QAChD;YACC,6BAA0C;QAC3C;YACC,oCAAsD;QACvD;YACC,oCAAmD;QACpD;YACC,oCAAyD;QAC1D;YACC,oCAAgD;QACjD;YACC,oCAAqD;QACtD;YACC,oCAA0D;QAC3D;YACC,oCAA0D;QAC3D;YACC,6BAAuD;QACxD;YACC,6BAAgD;QACjD;YACC,6BAA6C;QAC9C;YACC,oCAA6D;QAC9D;YACC,oCAA+D;QAChE;YACC,oCAAsD;QACvD;YACC,oCAAkD;QACnD;YACC,6BAAoD;QACrD;YACC,6BAAqD;QACtD;YACC,6BAA8C;QAC/C;YACC,6BAAmD;QACpD;YACC,6BAA+C;QAChD;YACC,6BAAoD;QACrD;YACC,6BAA0C;QAC3C;YACC,6BAAiD;QAClD;YACC,6BAAqD;QACtD;YACC,6BAAmD;QACpD;YACC,6BAAwD;QACzD;YACC,qCAA8D;QAC/D;YACC,6BAAkD;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,OAAO,CAAC,iBAAI,CAAC,IAAI,EAAE,GAAG,SAAS,CAAC,CAAC;QAClC,gBAA2C;QAC3C;YACC,OAAO,CAAC,iBAAI,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;QACpC;YACC,OAAO,8BAAsB,CAAC,IAAI,CAAC,CAAC;KACrC;AACF,CAAC,CAAC;AArEW,QAAA,qBAAqB,yBAqEhC;AAGW,QAAA,sBAAsB,GAAG,qCAA0B,CAAC","sourcesContent":["import { AllCardsService, CardIds, GameTag, GameType, Race, ReferenceCard } from '../public-api';\r\nimport { getEffectiveTribesEnumBase } from './hs-utils';\r\n\r\nexport const ALL_BG_RACES = [\r\n\tRace.BEAST,\r\n\tRace.DEMON,\r\n\tRace.DRAGON,\r\n\tRace.MECH,\r\n\tRace.MURLOC,\r\n\tRace.PIRATE,\r\n\tRace.ELEMENTAL,\r\n\tRace.QUILBOAR,\r\n\tRace.NAGA,\r\n\tRace.UNDEAD,\r\n];\r\n\r\nexport const TOTAL_RACES_IN_GAME = 5;\r\n\r\nexport const NON_BUYABLE_MINION_IDS = [\r\n\tCardIds.Cuddlgam_TB_BaconShop_HP_033t_SKIN_A,\r\n\tCardIds.Cuddlgam_TB_BaconShop_HP_033t_SKIN_A_G,\r\n\tCardIds.AbominableAmalgam_TB_BaconShop_HP_033t_SKIN_D,\r\n\tCardIds.AbominableAmalgam_TB_BaconShop_HP_033t_SKIN_D_G,\r\n\tCardIds.BookEatingAmalgam_TB_BaconShop_HP_033t_SKIN_B,\r\n\tCardIds.BookEatingAmalgam_TB_BaconShop_HP_033t_SKIN_B_G,\r\n\t// CardIds.ArgentBraggart_BG_SCH_149,\r\n\t// CardIds.ArgentBraggart_TB_BaconUps_308,\r\n\tCardIds.AvatarOfNzoth_FishOfNzothToken,\r\n\tCardIds.FishOfNzoth,\r\n\tCardIds.CattlecarpOfNzoth_TB_BaconShop_HP_105t_SKIN_A,\r\n\tCardIds.CattlecarpOfNzoth_TB_BaconShop_HP_105t_SKIN_A_G,\r\n\tCardIds.SnakeTrap_SnakeLegacyToken,\r\n\tCardIds.SnakeTrap_SnakeVanillaToken,\r\n\tCardIds.ImprovedSnakeTrap_SnakeToken,\r\n\tCardIds.ElementEarth_StoneElementalToken,\r\n\tCardIds.BabyKrush_DevilsaurToken,\r\n\tCardIds.Devilsaur,\r\n\t// To remove once the cards list is properly updated\r\n\tCardIds.FriendOfAFriend_BG22_404,\r\n\tCardIds.FriendOfAFriend_BG22_404_G,\r\n\tCardIds.Onyxia_OnyxianWhelpToken,\r\n\tCardIds.MurlocWarleaderCore,\r\n\tCardIds.MurlocWarleaderVanilla,\r\n\t// 23.4, probably not needed since they are already tokens\r\n\tCardIds.Tentacular_OzumatsTentacleToken_BG23_HERO_201pt,\r\n\tCardIds.Tentacular_OzumatsTentacleToken_BG23_HERO_201pt2,\r\n\tCardIds.Tentacular_OzumatsTentacleToken_BG23_HERO_201pt3,\r\n\tCardIds.Tentacular_OzumatsTentacleToken_BG23_HERO_201pt4,\r\n\tCardIds.Tentacular_OzumatsTentacleToken_BG23_HERO_201pt5,\r\n\tCardIds.Tentacular_OzumatsTentacleToken_BG23_HERO_201pt6,\r\n\t// 24.0, same\r\n\tCardIds.EmperorCobraLegacy_BG_EX1_170,\r\n\tCardIds.EmperorCobraLegacy_BG_EX1_170_G,\r\n\tCardIds.EmperorCobraLegacy_EX1_170,\r\n\tCardIds.SnakeLegacyToken,\r\n\tCardIds.SnakeLegacy,\r\n\tCardIds.ElementEarth_StoneElementalToken,\r\n\tCardIds.BolvarFireblood_CORE_ICC_858,\r\n\tCardIds.BolvarFireblood_ICC_858,\r\n\t// 25.2\r\n\tCardIds.HandlessForsaken_HelpingHandToken_BG25_010t,\r\n\tCardIds.HandlessForsaken_HelpingHandToken_BG25_010_Gt,\r\n\tCardIds.GeneralDrakkisath_SmolderwingToken_BG25_309t,\r\n\tCardIds.GeneralDrakkisath_SmolderwingToken_BG25_309_Gt,\r\n\tCardIds.MechaJaraxxus_RustedReggieToken,\r\n\tCardIds.MechaJaraxxus_MagtheridonPrimeToken,\r\n\tCardIds.MechaJaraxxus_BaltharakToken,\r\n\tCardIds.RustedReggie,\r\n\tCardIds.MagtheridonPrime,\r\n\tCardIds.Baltharak,\r\n\tCardIds.Shudderskull_TB_BaconShop_HP_022t_SKIN_C,\r\n\tCardIds.Shudderskull_TB_BaconShop_HP_022t_SKIN_C_G,\r\n\tCardIds.OzumatsTentacle_BG23_HERO_201pt_SKIN_A,\r\n\tCardIds.OzumatsTentacle_BG23_HERO_201pt_SKIN_A_G,\r\n\t// 26.2\r\n\tCardIds.Manasaber_CublingToken_BG26_800t,\r\n\tCardIds.Manasaber_CublingToken_BG26_800_Gt,\r\n\tCardIds.TentacleOfOctosariToken_BG26_803t,\r\n\tCardIds.TentacleOfOctosariToken_BG26_803_Gt,\r\n\t//27.2\r\n\tCardIds.OozelingGladiator_SlimyShieldToken_BG27_002t,\r\n\t// CardIds.SurfNSurf_CrabMountToken_BG27_004t,\r\n\t// CardIds.SurfNSurf_CrabMountToken_BG27_004_Gt,\r\n\t// CardIds.SurfNSurf_CrabToken_BG27_004t2,\r\n\t// CardIds.SurfNSurf_CrabToken_BG27_004_Gt2,\r\n\tCardIds.MechanizedGiftHorse_MechorseToken_BG27_008_Gt,\r\n\tCardIds.MechanizedGiftHorse_MechaponyToken_BG27_008t2,\r\n\tCardIds.MechanizedGiftHorse_MechorseToken_BG27_008_Gt,\r\n\tCardIds.MechanizedGiftHorse_MechaponyToken_BG27_008_Gt2,\r\n\tCardIds.TavernTier2,\r\n\tCardIds.TavernTier3,\r\n\tCardIds.TavernTier4,\r\n\tCardIds.TavernTier5,\r\n\tCardIds.TavernTier6,\r\n\tCardIds.TavernTier7_TB_BaconShopTechUp07_Button,\r\n\tCardIds.TombPillager_WON_340,\r\n\t// 27.2.2\r\n\tCardIds.MechanizedGiftHorse_MechorseToken_BG27_008t,\r\n\tCardIds.MechanizedGiftHorse_MechorseToken_BG27_008_Gt,\r\n\t// 28.6\r\n\tCardIds.StableAmalgamation_TotallyNormalHorseToken_BG28_Reward_518t,\r\n\tCardIds.TotallyNormalHorse_BG28_Reward_518t_G,\r\n\tCardIds.BoonOfBeetles_BeetleToken_BG28_603t,\r\n\tCardIds.Beetle_BG28_603t_G,\r\n\tCardIds.ToxicTumbleweed_TumblingAssassinToken_BG28_641t,\r\n\tCardIds.TumblingAssassin_BG28_641t_G,\r\n\t// 29.2\r\n\tCardIds.SilverGoose_SilverFledglingToken_BG29_801t,\r\n\tCardIds.SilverGoose_SilverFledglingToken_BG29_801_Gt,\r\n\tCardIds.ReplicatingMenace_MicrobotToken_BG_BOT_312t,\r\n\tCardIds.ReplicatingMenace_MicrobotToken_TB_BaconUps_032t,\r\n\tCardIds.TheUninvitedGuest_ShadowToken_BG29_875t,\r\n\tCardIds.TheUninvitedGuest_ShadowToken_BG29_875_Gt,\r\n];\r\n\r\nexport const NON_DISCOVERABLE_BUDDIES = [\r\n\tCardIds.SpiritRaptor_BG22_HERO_001_Buddy,\r\n\tCardIds.RagingContender_TB_BaconShop_HERO_67_Buddy,\r\n\tCardIds.CaptainFairmount_BG21_HERO_000_Buddy,\r\n\tCardIds.FlightTrainer_BG20_HERO_283_Buddy,\r\n\tCardIds.JandicesApprentice_TB_BaconShop_HERO_71_Buddy,\r\n\tCardIds.CrimsonHandCenturion_TB_BaconShop_HERO_60_Buddy,\r\n\tCardIds.CrazyMonkey_TB_BaconShop_HERO_38_Buddy,\r\n\tCardIds.ShadowWarden_TB_BaconShop_HERO_62_Buddy,\r\n\tCardIds.NexusLord_TB_BaconShop_HERO_58_Buddy,\r\n\tCardIds.LeiFlamepaw_BG20_HERO_202_Buddy,\r\n\tCardIds.Watfin_BG23_HERO_303_Buddy,\r\n\tCardIds.NightmareEctoplasm_BG20_HERO_301_Buddy,\r\n\tCardIds.ManyWhelps_BG22_HERO_305_Buddy,\r\n\tCardIds.Tamuzo_BG23_HERO_201_Buddy,\r\n\tCardIds.MaxwellMightySteed_TB_BaconShop_HERO_40_Buddy,\r\n\tCardIds.Crabby_BG22_HERO_000_Buddy,\r\n\tCardIds.Mishmash_TB_BaconShop_HERO_33_Buddy,\r\n\tCardIds.PigeonLord_TB_BaconShop_HERO_12_Buddy,\r\n\tCardIds.VardensAquarrior_BG22_HERO_004_Buddy,\r\n\tCardIds.AcolyteOfYoggSaron_TB_BaconShop_HERO_35_Buddy,\r\n\tCardIds.SubmersibleChef_BG22_HERO_201_Buddy,\r\n];\r\n\r\nexport const BUDDIES_TRIBE_REQUIREMENTS = [\r\n\t{\r\n\t\tbuddy: CardIds.Vaelastrasz_TB_BaconShop_HERO_56_Buddy,\r\n\t\ttribe: Race.DRAGON,\r\n\t},\r\n\t{\r\n\t\tbuddy: CardIds.DeathsHeadSage_BG20_HERO_103_Buddy,\r\n\t\ttribe: Race.QUILBOAR,\r\n\t},\r\n\t{\r\n\t\tbuddy: CardIds.SparkfinSoothsayer_TB_BaconShop_HERO_55_Buddy,\r\n\t\ttribe: Race.MURLOC,\r\n\t},\r\n\t{\r\n\t\tbuddy: CardIds.SubScrubber_BG22_HERO_200_Buddy,\r\n\t\ttribe: Race.MECH,\r\n\t},\r\n\t{\r\n\t\tbuddy: CardIds.CoilfangElite_BG23_HERO_304_Buddy,\r\n\t\ttribe: Race.NAGA,\r\n\t},\r\n\t{\r\n\t\tbuddy: CardIds.Kilrek_TB_BaconShop_HERO_37_Buddy,\r\n\t\ttribe: Race.DEMON,\r\n\t},\r\n\t{\r\n\t\tbuddy: CardIds.ElementiumSquirrelBomb_TB_BaconShop_HERO_17_Buddy,\r\n\t\ttribe: Race.MECH,\r\n\t},\r\n\t{\r\n\t\tbuddy: CardIds.TuskarrRaider_TB_BaconShop_HERO_18_Buddy,\r\n\t\ttribe: Race.PIRATE,\r\n\t},\r\n\t{\r\n\t\tbuddy: CardIds.Festergut_BG25_HERO_100_Buddy,\r\n\t\ttribe: Race.UNDEAD,\r\n\t},\r\n\t{\r\n\t\tbuddy: CardIds.ImperialDefender_BG22_HERO_007_Buddy,\r\n\t\ttribe: Race.NAGA,\r\n\t},\r\n\t{\r\n\t\tbuddy: CardIds.ValithriaDreamwalker_TB_BaconShop_HERO_53_Buddy,\r\n\t\ttribe: Race.DRAGON,\r\n\t},\r\n];\r\n\r\nexport const defaultStartingHp = (\r\n\tgameType: GameType,\r\n\theroCardId: string,\r\n\tallCards: { getCard: (cardId: string | number) => ReferenceCard },\r\n): number => {\r\n\tif (isBattlegrounds(gameType)) {\r\n\t\tconst normalized = normalizeHeroCardId(heroCardId, allCards);\r\n\t\treturn allCards.getCard(normalized).health || 30;\r\n\t}\r\n\treturn 30;\r\n};\r\n\r\nexport const isBattlegrounds = (gameType: GameType): boolean => {\r\n\treturn [\r\n\t\tGameType.GT_BATTLEGROUNDS,\r\n\t\tGameType.GT_BATTLEGROUNDS_FRIENDLY,\r\n\t\tGameType.GT_BATTLEGROUNDS_AI_VS_AI,\r\n\t\tGameType.GT_BATTLEGROUNDS_PLAYER_VS_AI,\r\n\t\tGameType.GT_BATTLEGROUNDS_DUO,\r\n\t\tGameType.GT_BATTLEGROUNDS_DUO_VS_AI,\r\n\t\tGameType.GT_BATTLEGROUNDS_DUO_FRIENDLY,\r\n\t\tGameType.GT_BATTLEGROUNDS_DUO_AI_VS_AI,\r\n\t].includes(gameType as GameType);\r\n};\r\n\r\nexport const isBattlegroundsDuo = (gameType: GameType): boolean => {\r\n\treturn [\r\n\t\tGameType.GT_BATTLEGROUNDS_DUO,\r\n\t\tGameType.GT_BATTLEGROUNDS_DUO_VS_AI,\r\n\t\tGameType.GT_BATTLEGROUNDS_DUO_FRIENDLY,\r\n\t\tGameType.GT_BATTLEGROUNDS_DUO_AI_VS_AI,\r\n\t].includes(gameType as GameType);\r\n};\r\n\r\nexport const normalizeHeroCardId = (\r\n\theroCardId: string,\r\n\tallCards: { getCard: (cardId: string | number) => ReferenceCard },\r\n): string => {\r\n\tif (!heroCardId) {\r\n\t\treturn heroCardId;\r\n\t}\r\n\r\n\tconst normalizedAfterSkin = normalizeHeroCardIdAfterSkin(heroCardId, allCards);\r\n\tswitch (normalizedAfterSkin) {\r\n\t\tcase 'TB_BaconShop_HERO_59t':\r\n\t\t\treturn 'TB_BaconShop_HERO_59';\r\n\t\tcase CardIds.QueenAzshara_NagaQueenAzsharaToken:\r\n\t\t\treturn CardIds.QueenAzshara_BG22_HERO_007;\r\n\t\tdefault:\r\n\t\t\treturn normalizedAfterSkin;\r\n\t}\r\n};\r\n\r\nconst normalizeHeroCardIdAfterSkin = (\r\n\theroCardId: string,\r\n\tallCards: { getCard: (cardId: string | number) => ReferenceCard },\r\n): string => {\r\n\tconst heroCard = allCards.getCard(heroCardId);\r\n\tif (!!heroCard?.battlegroundsHeroParentDbfId) {\r\n\t\tconst parentCard = allCards.getCard(heroCard.battlegroundsHeroParentDbfId);\r\n\t\tif (!!parentCard) {\r\n\t\t\treturn parentCard.id;\r\n\t\t}\r\n\t}\r\n\t// Fallback to regex\r\n\tconst bgHeroSkinMatch = heroCardId.match(/(.*)_SKIN_.*/);\r\n\tif (bgHeroSkinMatch) {\r\n\t\treturn bgHeroSkinMatch[1];\r\n\t}\r\n\treturn heroCardId;\r\n};\r\n\r\n// Used to make the mapping between premium / normal minions\r\nexport const normalizeMinionCardId = (\r\n\tcardId: string,\r\n\tallCards: { getCard: (cardId: string | number) => ReferenceCard },\r\n) => {\r\n\tconst refCard = allCards.getCard(cardId);\r\n\tif (refCard?.battlegroundsNormalDbfId) {\r\n\t\tconst normalCard = allCards.getCard(refCard.battlegroundsNormalDbfId);\r\n\t\treturn normalCard?.id;\r\n\t}\r\n\treturn cardId;\r\n};\r\n\r\nexport const getTribeName = (tribe: Race | GameTag, i18n: { translateString: (input: string) => string }): string => {\r\n\tconst tribeString = Race[tribe] ?? GameTag[tribe];\r\n\treturn i18n.translateString(`app.battlegrounds.tribes.${tribeString?.toLowerCase()}`);\r\n};\r\n\r\nexport const getTribeIcon = (tribe: string | Race | GameTag): string => {\r\n\tconst referenceCardId = getReferenceTribeCardId(tribe);\r\n\treturn `https://static.zerotoheroes.com/hearthstone/cardart/256x/${referenceCardId}.jpg`;\r\n};\r\n\r\nexport const getReferenceTribeCardId = (tribe: string | Race | GameTag): string => {\r\n\tlet referenceCardId: string;\r\n\ttribe = (tribe as string)?.padStart ? (tribe as string).toLowerCase() : tribe;\r\n\tswitch (tribe) {\r\n\t\tcase 'mech':\r\n\t\tcase Race.MECH:\r\n\t\t\treferenceCardId = CardIds.DeflectOBot_BGS_071;\r\n\t\t\tbreak;\r\n\t\tcase 'beast':\r\n\t\tcase Race.BEAST:\r\n\t\t\treferenceCardId = CardIds.GoldrinnTheGreatWolf_BGS_018;\r\n\t\t\tbreak;\r\n\t\tcase 'demon':\r\n\t\tcase Race.DEMON:\r\n\t\t\treferenceCardId = CardIds.ImpulsiveTrickster_BG21_006;\r\n\t\t\tbreak;\r\n\t\tcase 'dragon':\r\n\t\tcase Race.DRAGON:\r\n\t\t\treferenceCardId = CardIds.KalecgosArcaneAspect_BGS_041;\r\n\t\t\tbreak;\r\n\t\tcase 'murloc':\r\n\t\tcase Race.MURLOC:\r\n\t\t\treferenceCardId = CardIds.PrimalfinLookout_BGS_020;\r\n\t\t\tbreak;\r\n\t\tcase 'pirate':\r\n\t\tcase Race.PIRATE:\r\n\t\t\treferenceCardId = CardIds.BladeCollector_BG26_817;\r\n\t\t\tbreak;\r\n\t\tcase 'elemental':\r\n\t\tcase Race.ELEMENTAL:\r\n\t\t\treferenceCardId = CardIds.Sellemental_BGS_115;\r\n\t\t\tbreak;\r\n\t\tcase 'naga':\r\n\t\tcase Race.NAGA:\r\n\t\t\treferenceCardId = CardIds.ShellCollector_BG23_002;\r\n\t\t\tbreak;\r\n\t\tcase 'quilboar':\r\n\t\tcase Race.QUILBOAR:\r\n\t\t\treferenceCardId = CardIds.SunBaconRelaxer_BG20_301;\r\n\t\t\tbreak;\r\n\t\tcase 'undead':\r\n\t\tcase Race.UNDEAD:\r\n\t\t\treferenceCardId = CardIds.RisenRider_BG25_001;\r\n\t\t\tbreak;\r\n\t\tcase 'all':\r\n\t\tcase Race.ALL:\r\n\t\t\treferenceCardId = CardIds.AmalgamOfTheDeep_BG_TSC_069;\r\n\t\t\tbreak;\r\n\t\tcase GameTag.PROTOSS:\r\n\t\t\treferenceCardId = CardIds.WarpGate_MothershipToken_BG31_HERO_802pt7;\r\n\t\t\tbreak;\r\n\t\tcase GameTag.ZERG:\r\n\t\t\treferenceCardId = CardIds.KerriganQueenOfBlades_LarvaToken_BG31_HERO_811t;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\treferenceCardId = CardIds.PatientScout_BG24_715;\r\n\t\t\tbreak;\r\n\t}\r\n\treturn referenceCardId;\r\n};\r\n\r\nexport const getHeroPower = (\r\n\theroCardId: string,\r\n\tallCards: { getCard: (cardId: string | number) => ReferenceCard },\r\n): string => {\r\n\tconst normalized = normalizeHeroCardId(heroCardId, allCards);\r\n\tswitch (normalized) {\r\n\t\tcase 'TB_BaconShop_HERO_01':\r\n\t\t\treturn 'TB_BaconShop_HP_001';\r\n\t\tcase 'TB_BaconShop_HERO_02':\r\n\t\t\treturn 'TB_BaconShop_HP_011';\r\n\t\tcase 'TB_BaconShop_HERO_08':\r\n\t\t\treturn 'TB_BaconShop_HP_069';\r\n\t\tcase CardIds.RagnarosTheFirelord_TB_BaconShop_HERO_11:\r\n\t\t\treturn CardIds.DieInsects_TB_BaconShop_HP_087;\r\n\t\tcase 'TB_BaconShop_HERO_12':\r\n\t\t\treturn 'TB_BaconShop_HP_041';\r\n\t\tcase CardIds.QueenWagtoggle_TB_BaconShop_HERO_14:\r\n\t\t\treturn CardIds.WaxWarband;\r\n\t\tcase 'TB_BaconShop_HERO_15':\r\n\t\t\treturn 'TB_BaconShop_HP_010';\r\n\t\tcase 'TB_BaconShop_HERO_16':\r\n\t\t\treturn 'TB_BaconShop_HP_044';\r\n\t\tcase 'TB_BaconShop_HERO_17':\r\n\t\t\treturn 'TB_BaconShop_HP_015';\r\n\t\tcase 'TB_BaconShop_HERO_18':\r\n\t\t\treturn 'TB_BaconShop_HP_072';\r\n\t\tcase 'TB_BaconShop_HERO_20':\r\n\t\t\treturn 'TB_BaconShop_HP_018';\r\n\t\tcase 'TB_BaconShop_HERO_21':\r\n\t\t\treturn 'TB_BaconShop_HP_020';\r\n\t\tcase 'TB_BaconShop_HERO_22':\r\n\t\t\treturn 'TB_BaconShop_HP_024';\r\n\t\tcase CardIds.Shudderwock_TB_BaconShop_HERO_23:\r\n\t\t\treturn CardIds.SnickerSnack;\r\n\t\tcase 'TB_BaconShop_HERO_25':\r\n\t\t\treturn 'TB_BaconShop_HP_049';\r\n\t\tcase 'TB_BaconShop_HERO_27':\r\n\t\t\treturn 'TB_BaconShop_HP_014';\r\n\t\tcase 'TB_BaconShop_HERO_28':\r\n\t\t\treturn 'TB_BaconShop_HP_028';\r\n\t\tcase 'TB_BaconShop_HERO_30':\r\n\t\t\treturn 'TB_BaconShop_HP_043';\r\n\t\tcase 'TB_BaconShop_HERO_31':\r\n\t\t\treturn 'TB_BaconShop_HP_009';\r\n\t\tcase 'TB_BaconShop_HERO_33':\r\n\t\t\treturn 'TB_BaconShop_HP_033';\r\n\t\tcase 'TB_BaconShop_HERO_34':\r\n\t\t\treturn 'TB_BaconShop_HP_035';\r\n\t\tcase 'TB_BaconShop_HERO_35':\r\n\t\t\treturn 'TB_BaconShop_HP_039';\r\n\t\tcase 'TB_BaconShop_HERO_36':\r\n\t\t\treturn 'TB_BaconShop_HP_042';\r\n\t\tcase 'TB_BaconShop_HERO_37':\r\n\t\t\treturn 'TB_BaconShop_HP_036';\r\n\t\tcase 'TB_BaconShop_HERO_38':\r\n\t\t\treturn 'TB_BaconShop_HP_038';\r\n\t\tcase 'TB_BaconShop_HERO_39':\r\n\t\t\treturn 'TB_BaconShop_HP_040';\r\n\t\tcase 'TB_BaconShop_HERO_40':\r\n\t\t\treturn 'TB_BaconShop_HP_057';\r\n\t\tcase 'TB_BaconShop_HERO_41':\r\n\t\t\treturn 'TB_BaconShop_HP_046';\r\n\t\tcase 'TB_BaconShop_HERO_42':\r\n\t\t\treturn 'TB_BaconShop_HP_047';\r\n\t\tcase 'TB_BaconShop_HERO_43':\r\n\t\t\treturn 'TB_BaconShop_HP_048';\r\n\t\t// case 'TB_BaconShop_HERO_44':\r\n\t\t// \treturn 'TB_BaconShop_HP_050';\r\n\t\tcase 'TB_BaconShop_HERO_45':\r\n\t\t\treturn 'TB_BaconShop_HP_053';\r\n\t\tcase 'TB_BaconShop_HERO_47':\r\n\t\t\treturn 'TB_BaconShop_HP_051';\r\n\t\tcase 'TB_BaconShop_HERO_49':\r\n\t\t\treturn 'TB_BaconShop_HP_054';\r\n\t\tcase 'TB_BaconShop_HERO_50':\r\n\t\t\treturn 'TB_BaconShop_HP_077';\r\n\t\tcase 'TB_BaconShop_HERO_52':\r\n\t\t\treturn 'TB_BaconShop_HP_061';\r\n\t\tcase 'TB_BaconShop_HERO_53':\r\n\t\t\treturn 'TB_BaconShop_HP_062';\r\n\t\tcase 'TB_BaconShop_HERO_55':\r\n\t\t\treturn 'TB_BaconShop_HP_056';\r\n\t\tcase 'TB_BaconShop_HERO_56':\r\n\t\t\treturn 'TB_BaconShop_HP_064';\r\n\t\tcase 'TB_BaconShop_HERO_57':\r\n\t\t\treturn 'TB_BaconShop_HP_063';\r\n\t\tcase 'TB_BaconShop_HERO_58':\r\n\t\t\treturn 'TB_BaconShop_HP_052';\r\n\t\tcase 'TB_BaconShop_HERO_59t':\r\n\t\t\treturn 'TB_BaconShop_HP_065t2';\r\n\t\tcase 'TB_BaconShop_HERO_59':\r\n\t\t\treturn 'TB_BaconShop_HP_065';\r\n\t\tcase 'TB_BaconShop_HERO_60':\r\n\t\t\treturn 'TB_BaconShop_HP_066';\r\n\t\tcase 'TB_BaconShop_HERO_61':\r\n\t\t\treturn 'TB_BaconShop_HP_067';\r\n\t\tcase 'TB_BaconShop_HERO_62':\r\n\t\t\treturn 'TB_BaconShop_HP_068';\r\n\t\tcase 'TB_BaconShop_HERO_64':\r\n\t\t\treturn 'TB_BaconShop_HP_074';\r\n\t\tcase CardIds.CaptainHooktusk_TB_BaconShop_HERO_67:\r\n\t\t\treturn CardIds.TrashForTreasure;\r\n\t\tcase 'TB_BaconShop_HERO_68':\r\n\t\t\treturn 'TB_BaconShop_HP_076';\r\n\t\tcase 'TB_BaconShop_HERO_70':\r\n\t\t\treturn 'TB_BaconShop_HP_080';\r\n\t\tcase 'TB_BaconShop_HERO_71':\r\n\t\t\treturn 'TB_BaconShop_HP_084';\r\n\t\tcase 'TB_BaconShop_HERO_72':\r\n\t\t\treturn 'TB_BaconShop_HP_081';\r\n\t\tcase 'TB_BaconShop_HERO_74':\r\n\t\t\treturn 'TB_BaconShop_HP_082';\r\n\t\tcase CardIds.Chenvaala_TB_BaconShop_HERO_78:\r\n\t\t\treturn CardIds.Avalanche_TB_BaconShop_HP_088;\r\n\t\tcase CardIds.Rakanishu_TB_BaconShop_HERO_75:\r\n\t\t\treturn CardIds.TavernLighting;\r\n\t\tcase CardIds.Alakir:\r\n\t\t\treturn CardIds.SwattingInsects;\r\n\t\tcase CardIds.ZephrysTheGreat_TB_BaconShop_HERO_91:\r\n\t\t\treturn CardIds.ThreeWishes;\r\n\t\tcase CardIds.SilasDarkmoon_TB_BaconShop_HERO_90:\r\n\t\t\treturn CardIds.ComeOneComeAll;\r\n\t\tcase CardIds.Cthun_TB_BaconShop_HERO_29:\r\n\t\t\treturn CardIds.SaturdayCthuns;\r\n\t\tcase CardIds.Nzoth:\r\n\t\t\treturn CardIds.AvatarOfNzoth;\r\n\t\tcase CardIds.Yshaarj:\r\n\t\t\treturn CardIds.EmbraceYourRage;\r\n\t\tcase CardIds.Tickatus_TB_BaconShop_HERO_94:\r\n\t\t\treturn CardIds.PrizeWall;\r\n\t\tcase CardIds.Greybough_TB_BaconShop_HERO_95:\r\n\t\t\treturn CardIds.SproutItOut;\r\n\t\tcase CardIds.OverlordSaurfang_BG20_HERO_102:\r\n\t\t\treturn CardIds.OverlordSaurfang_ForTheHorde;\r\n\t\tcase CardIds.DeathSpeakerBlackthorn_BG20_HERO_103:\r\n\t\t\treturn CardIds.DeathSpeakerBlackthorn_Bloodbound;\r\n\t\tcase CardIds.Voljin_BG20_HERO_201:\r\n\t\t\treturn CardIds.Voljin_SpiritSwap_BG20_HERO_201p;\r\n\t\tcase CardIds.Xyrella_BG20_HERO_101:\r\n\t\t\treturn CardIds.Xyrella_SeeTheLight;\r\n\t\tcase CardIds.MutanusTheDevourer_BG20_HERO_301:\r\n\t\t\treturn CardIds.MutanusTheDevourer_Devour;\r\n\t\tcase CardIds.GuffRunetotem_BG20_HERO_242:\r\n\t\t\treturn CardIds.GuffRunetotem_NaturalBalance;\r\n\t\tcase CardIds.KurtrusAshfallen_BG20_HERO_280:\r\n\t\t\treturn CardIds.KurtrusAshfallen_GlaiveRicochet;\r\n\t\tcase CardIds.Galewing:\r\n\t\t\treturn CardIds.Galewing_DungarsGryphon;\r\n\t\tcase CardIds.TradePrinceGallywix_TB_BaconShop_HERO_10:\r\n\t\t\treturn CardIds.SmartSavings;\r\n\t\tcase CardIds.MasterNguyen:\r\n\t\t\treturn CardIds.MasterNguyen_PowerOfTheStorm;\r\n\t\tcase CardIds.CarielRoame_BG21_HERO_000:\r\n\t\t\treturn CardIds.CarielRoame_Conviction;\r\n\t\tcase CardIds.Sneed_BG21_HERO_030:\r\n\t\t\treturn CardIds.Sneed_SneedsReplicator;\r\n\t\tcase CardIds.CookieTheCook_BG21_HERO_020:\r\n\t\t\treturn CardIds.CookieTheCook_StirThePot;\r\n\t\tcase CardIds.TamsinRoame_BG20_HERO_282:\r\n\t\t\treturn CardIds.TamsinRoame_FragrantPhylactery;\r\n\t\tcase CardIds.ScabbsCutterbutter_BG21_HERO_010:\r\n\t\t\treturn CardIds.ScabbsCutterbutter_ISpy;\r\n\t\tcase CardIds.Brukan_BG22_HERO_001:\r\n\t\t\treturn CardIds.Brukan_EmbraceTheElements;\r\n\t\tcase CardIds.Drekthar_BG22_HERO_002:\r\n\t\t\treturn CardIds.Drekthar_LeadTheFrostwolves;\r\n\t\tcase CardIds.VanndarStormpike_BG22_HERO_003:\r\n\t\t\treturn CardIds.VanndarStormpike_LeadTheStormpikes;\r\n\t\tcase CardIds.TavishStormpike_BG22_HERO_000:\r\n\t\t\treturn CardIds.TavishStormpike_Deadeye;\r\n\t\tcase CardIds.VardenDawngrasp_BG22_HERO_004:\r\n\t\t\treturn CardIds.VardenDawngrasp_TwiceAsNice;\r\n\t\tcase CardIds.Rokara_BG20_HERO_100:\r\n\t\t\treturn CardIds.Rokara_GloryOfCombat;\r\n\t\tcase CardIds.Onyxia_BG22_HERO_305:\r\n\t\t\treturn CardIds.Onyxia_Broodmother;\r\n\t\tcase CardIds.AmbassadorFaelin_BG22_HERO_201:\r\n\t\t\treturn CardIds.AmbassadorFaelin_ExpeditionPlans;\r\n\t\tcase CardIds.IniStormcoil_BG22_HERO_200:\r\n\t\t\treturn CardIds.IniStormcoil_Mechgyver;\r\n\t\tcase CardIds.QueenAzshara_BG22_HERO_007:\r\n\t\t\treturn CardIds.QueenAzshara_AzsharasAmbition;\r\n\t\tcase CardIds.QueenAzshara_NagaQueenAzsharaToken:\r\n\t\t\treturn CardIds.QueenAzshara_NagaConquest;\r\n\t\tcase CardIds.Ozumat_BG23_HERO_201:\r\n\t\t\treturn CardIds.Ozumat_Tentacular;\r\n\t\tcase CardIds.LadyVashj_BG23_HERO_304:\r\n\t\t\treturn CardIds.LadyVashj_RelicsOfTheDeep;\r\n\t\tcase CardIds.HeistbaronTogwaggle_BG23_HERO_305:\r\n\t\t\treturn CardIds.HeistbaronTogwaggle_ThePerfectCrime;\r\n\t\tcase CardIds.MurlocHolmes_BG23_HERO_303:\r\n\t\t\treturn CardIds.MurlocHolmes_DetectiveForHire;\r\n\t\tcase CardIds.SireDenathrius_BG24_HERO_100:\r\n\t\t\treturn CardIds.SireDenathrius_Whodunitquestion;\r\n\t\tcase CardIds.SylvanasWindrunner_BG23_HERO_306:\r\n\t\t\treturn CardIds.SylvanasWindrunner_ReclaimedSouls;\r\n\t\tcase CardIds.TheJailer_TB_BaconShop_HERO_702:\r\n\t\t\treturn CardIds.RunicEmpowerment;\r\n\t\tcase CardIds.EnhanceOMechano_BG24_HERO_204:\r\n\t\t\treturn CardIds.EnhanceOMechano_Enhancification;\r\n\t\tcase CardIds.ProfessorPutricide_BG25_HERO_100:\r\n\t\t\treturn CardIds.ProfessorPutricide_BuildAnUndead;\r\n\t\tcase CardIds.TeronGorefiend_BG25_HERO_103:\r\n\t\t\treturn CardIds.TeronGorefiend_RapidReanimation;\r\n\t\tcase CardIds.ETCBandManager_BG25_HERO_105:\r\n\t\t\treturn CardIds.ETCBandManager_SignANewArtist;\r\n\t\tcase CardIds.RockMasterVoone_BG26_HERO_104:\r\n\t\t\treturn CardIds.RockMasterVoone_UpbeatHarmony;\r\n\t\tcase CardIds.IngeTheIronHymn:\r\n\t\t\treturn CardIds.IngeTheIronHymn_MajorHymn;\r\n\t\tcase CardIds.CapnHoggarr_BG26_HERO_101:\r\n\t\t\treturn CardIds.CapnHoggarr_ImTheCapnNow;\r\n\t\t// case CardIds.Diablo:\r\n\t\t// \treturn CardIds.Diablo_RealmOfTerror;\r\n\t\tcase CardIds.ThorimStormlord_BG27_HERO_801:\r\n\t\t\treturn CardIds.ThorimStormlord_ChooseYourChampion_BG27_HERO_801p2;\r\n\t\tcase CardIds.SnakeEyes_BG28_HERO_400:\r\n\t\t\treturn CardIds.SnakeEyes_LuckyRoll_BG28_HERO_400p;\r\n\t\tcase CardIds.TaethelanBloodwatcher_BG28_HERO_800:\r\n\t\t\treturn CardIds.TaethelanBloodwatcher_ReliquaryResearch_BG28_HERO_800p;\r\n\t\tcase CardIds.DoctorHollidae_BG28_HERO_801:\r\n\t\t\treturn CardIds.DoctorHollidae_BlessingOfTheNineFrogs_BG28_HERO_801p;\r\n\t\tcase CardIds.Cho_BGDUO_HERO_222:\r\n\t\t\treturn CardIds.Cho_DoubleTrouble_BGDUO_HERO_222p;\r\n\t\tcase CardIds.Gall_BGDUO_HERO_223:\r\n\t\t\treturn CardIds.Gall_DoubleTrouble_BGDUO_HERO_223p;\r\n\t\tcase CardIds.TheNamelessOne_BGDUO_HERO_100:\r\n\t\t\treturn CardIds.TheNamelessOne_X_BGDUO_HERO_100p;\r\n\t\tcase CardIds.FlobbidinousFloop_BGDUO_HERO_101:\r\n\t\t\treturn CardIds.FlobbidinousFloop_GloriousGloop_BGDUO_HERO_101p;\r\n\t\tcase CardIds.MadamGoya_BGDUO_HERO_104:\r\n\t\t\treturn CardIds.MadamGoya_EfficientExchange_BGDUO_HERO_104p;\r\n\t\tcase CardIds.MarinTheManager_BG30_HERO_304:\r\n\t\t\treturn CardIds.MarinTheManager_FantasticTreasure_BG30_HERO_304p;\r\n\t\tcase CardIds.FarseerNobundo_BG31_HERO_003:\r\n\t\t\treturn CardIds.FarseerNobundo_TheGalaxysLens_BG31_HERO_003p;\r\n\t\tcase CardIds.ExarchOthaar_BG31_HERO_006:\r\n\t\t\treturn CardIds.ExarchOthaar_ArcaneKnowledge_BG31_HERO_006p;\r\n\t\tcase CardIds.ZerekMasterCloner_BG31_HERO_005:\r\n\t\t\treturn CardIds.ZerekMasterCloner_CloningGallery_BG31_HERO_005p;\r\n\t\tcase CardIds.JimRaynor_BG31_HERO_801:\r\n\t\t\treturn CardIds.JimRaynor_LiftOff_BG31_HERO_801p;\r\n\t\tcase CardIds.Artanis_BG31_HERO_802:\r\n\t\t\treturn CardIds.Artanis_WarpGate_BG31_HERO_802p;\r\n\t\tcase CardIds.KerriganQueenOfBlades_BG31_HERO_811:\r\n\t\t\treturn CardIds.KerriganQueenOfBlades_SpawningPool_BG31_HERO_811p;\r\n\t\tcase CardIds.Buttons_BG32_HERO_002:\r\n\t\t\treturn CardIds.Buttons_GrowingCollection_BG32_HERO_002p;\r\n\t\tcase CardIds.ForestLordCenarius_BG32_HERO_001:\r\n\t\t\treturn CardIds.ForestLordCenarius_WisdomOfAncients_BG32_HERO_001p;\r\n\t\tcase CardIds.LohTheLivingLegend_BG33_HERO_001:\r\n\t\t\treturn CardIds.LohTheLivingLegend_HeroicInspiration_BG33_HERO_001p;\r\n\r\n\t\tcase '':\r\n\t\t\treturn null; // new heroes\r\n\t}\r\n};\r\n\r\nexport const getBuddy = (heroCardId: CardIds, allCards: AllCardsService): CardIds | null => {\r\n\tswitch (normalizeHeroCardId(heroCardId, allCards)) {\r\n\t\tcase CardIds.AFKay_TB_BaconShop_HERO_16:\r\n\t\t\treturn CardIds.SnackVendor_TB_BaconShop_HERO_16_Buddy;\r\n\t\tcase CardIds.Alakir:\r\n\t\t\treturn CardIds.SpiritOfAir_TB_BaconShop_HERO_76_Buddy;\r\n\t\tcase CardIds.Alexstrasza_TB_BaconShop_HERO_56:\r\n\t\t\treturn CardIds.Vaelastrasz_TB_BaconShop_HERO_56_Buddy;\r\n\t\tcase CardIds.ArannaStarseeker_ArannaUnleashedToken:\r\n\t\tcase CardIds.ArannaStarseeker_TB_BaconShop_HERO_59:\r\n\t\t\treturn CardIds.SklibbDemonHunter_TB_BaconShop_HERO_59_Buddy;\r\n\t\tcase CardIds.ArchVillainRafaam_TB_BaconShop_HERO_45:\r\n\t\t\treturn CardIds.LoyalHenchman_TB_BaconShop_HERO_45_Buddy;\r\n\t\tcase CardIds.Brukan_BG22_HERO_001:\r\n\t\t\treturn CardIds.SpiritRaptor_BG22_HERO_001_Buddy;\r\n\t\tcase CardIds.CaptainEudora_TB_BaconShop_HERO_64:\r\n\t\t\treturn CardIds.DagwikStickytoe_TB_BaconShop_HERO_64_Buddy;\r\n\t\tcase CardIds.CaptainHooktusk_TB_BaconShop_HERO_67:\r\n\t\t\treturn CardIds.RagingContender_TB_BaconShop_HERO_67_Buddy;\r\n\t\tcase CardIds.CarielRoame_BG21_HERO_000:\r\n\t\t\treturn CardIds.CaptainFairmount_BG21_HERO_000_Buddy;\r\n\t\tcase CardIds.Chenvaala_TB_BaconShop_HERO_78:\r\n\t\t\treturn CardIds.SnowElemental_TB_BaconShop_HERO_78_Buddy;\r\n\t\tcase CardIds.CookieTheCook_BG21_HERO_020:\r\n\t\t\treturn CardIds.SousChef_BG21_HERO_020_Buddy;\r\n\t\tcase CardIds.Cthun_TB_BaconShop_HERO_29:\r\n\t\t\treturn CardIds.TentacleOfCthun_TB_BaconShop_HERO_29_Buddy;\r\n\t\tcase CardIds.DancinDeryl:\r\n\t\t\treturn CardIds.AsherTheHaberdasher_TB_BaconShop_HERO_36_Buddy;\r\n\t\tcase CardIds.DeathSpeakerBlackthorn_BG20_HERO_103:\r\n\t\t\treturn CardIds.DeathsHeadSage_BG20_HERO_103_Buddy;\r\n\t\tcase CardIds.Deathwing_TB_BaconShop_HERO_52:\r\n\t\t\treturn CardIds.LadySinestra_TB_BaconShop_HERO_52_Buddy;\r\n\t\tcase CardIds.DinotamerBrann_TB_BaconShop_HERO_43:\r\n\t\t\treturn CardIds.BrannsEpicEgg_TB_BaconShop_HERO_43_Buddy;\r\n\t\tcase CardIds.Drekthar_BG22_HERO_002:\r\n\t\t\treturn CardIds.FrostwolfLieutenant_BG22_HERO_002_Buddy;\r\n\t\tcase CardIds.EdwinVancleef_TB_BaconShop_HERO_01:\r\n\t\t\treturn CardIds.Si7Scout_TB_BaconShop_HERO_01_Buddy;\r\n\t\tcase CardIds.EliseStarseeker_TB_BaconShop_HERO_42:\r\n\t\t\treturn CardIds.JrNavigator_TB_BaconShop_HERO_42_Buddy;\r\n\t\tcase CardIds.ForestWardenOmu_TB_BaconShop_HERO_74:\r\n\t\t\treturn CardIds.EvergreenBotani_TB_BaconShop_HERO_74_Buddy;\r\n\t\tcase CardIds.FungalmancerFlurgl:\r\n\t\t\treturn CardIds.SparkfinSoothsayer_TB_BaconShop_HERO_55_Buddy;\r\n\t\tcase CardIds.Galakrond:\r\n\t\t\treturn CardIds.ApostleOfGalakrond_TB_BaconShop_HERO_02_Buddy;\r\n\t\tcase CardIds.Galewing:\r\n\t\t\treturn CardIds.FlightTrainer_BG20_HERO_283_Buddy;\r\n\t\tcase CardIds.GeorgeTheFallen_TB_BaconShop_HERO_15:\r\n\t\t\treturn CardIds.KarlTheLost_TB_BaconShop_HERO_15_Buddy;\r\n\t\tcase CardIds.Greybough_TB_BaconShop_HERO_95:\r\n\t\t\treturn CardIds.WanderingTreant_TB_BaconShop_HERO_95_Buddy;\r\n\t\tcase CardIds.GuffRunetotem_BG20_HERO_242:\r\n\t\t\treturn CardIds.BabyKodo_BG20_HERO_242_Buddy;\r\n\t\tcase CardIds.IllidanStormrage_TB_BaconShop_HERO_08:\r\n\t\t\treturn CardIds.EclipsionIllidari_TB_BaconShop_HERO_08_Buddy;\r\n\t\tcase CardIds.InfiniteToki:\r\n\t\t\treturn CardIds.ClockworkAssistant_TB_BaconShop_HERO_28_Buddy;\r\n\t\tcase CardIds.JandiceBarov_TB_BaconShop_HERO_71:\r\n\t\t\treturn CardIds.JandicesApprentice_TB_BaconShop_HERO_71_Buddy;\r\n\t\tcase CardIds.KaelthasSunstrider_TB_BaconShop_HERO_60:\r\n\t\t\treturn CardIds.CrimsonHandCenturion_TB_BaconShop_HERO_60_Buddy;\r\n\t\tcase CardIds.KingMukla_TB_BaconShop_HERO_38:\r\n\t\t\treturn CardIds.CrazyMonkey_TB_BaconShop_HERO_38_Buddy;\r\n\t\tcase CardIds.KurtrusAshfallen_BG20_HERO_280:\r\n\t\t\treturn CardIds.LivingNightmare_BG20_HERO_280_Buddy;\r\n\t\tcase CardIds.LichBazhial:\r\n\t\t\treturn CardIds.UnearthedUnderling_TB_BaconShop_HERO_25_Buddy;\r\n\t\tcase CardIds.LordBarov_TB_BaconShop_HERO_72:\r\n\t\t\treturn CardIds.BarovsApprentice_TB_BaconShop_HERO_72_Buddy;\r\n\t\tcase CardIds.LordJaraxxus_TB_BaconShop_HERO_37:\r\n\t\t\treturn CardIds.Kilrek_TB_BaconShop_HERO_37_Buddy;\r\n\t\tcase CardIds.MaievShadowsong_TB_BaconShop_HERO_62:\r\n\t\t\treturn CardIds.ShadowWarden_TB_BaconShop_HERO_62_Buddy;\r\n\t\tcase CardIds.Malygos:\r\n\t\t\treturn CardIds.NexusLord_TB_BaconShop_HERO_58_Buddy;\r\n\t\tcase CardIds.MasterNguyen:\r\n\t\t\treturn CardIds.LeiFlamepaw_BG20_HERO_202_Buddy;\r\n\t\tcase CardIds.MillhouseManastorm_TB_BaconShop_HERO_49:\r\n\t\t\treturn CardIds.MagnusManastorm_TB_BaconShop_HERO_49_Buddy;\r\n\t\tcase CardIds.MillificentManastorm:\r\n\t\t\treturn CardIds.ElementiumSquirrelBomb_TB_BaconShop_HERO_17_Buddy;\r\n\t\tcase CardIds.MrBigglesworth_TB_BaconShop_HERO_70:\r\n\t\t\treturn CardIds.LilKT_TB_BaconShop_HERO_70_Buddy;\r\n\t\tcase CardIds.MutanusTheDevourer_BG20_HERO_301:\r\n\t\t\treturn CardIds.NightmareEctoplasm_BG20_HERO_301_Buddy;\r\n\t\tcase CardIds.Nozdormu_TB_BaconShop_HERO_57:\r\n\t\t\treturn CardIds.Chromie_TB_BaconShop_HERO_57_Buddy;\r\n\t\tcase CardIds.Nzoth:\r\n\t\t\treturn CardIds.BabyNzoth_TB_BaconShop_HERO_93_Buddy;\r\n\t\tcase CardIds.OverlordSaurfang_BG20_HERO_102:\r\n\t\t\treturn CardIds.DranoshSaurfang_BG20_HERO_102_Buddy;\r\n\t\tcase CardIds.PatchesThePirate_TB_BaconShop_HERO_18:\r\n\t\t\treturn CardIds.TuskarrRaider_TB_BaconShop_HERO_18_Buddy;\r\n\t\tcase CardIds.Patchwerk_TB_BaconShop_HERO_34:\r\n\t\t\treturn CardIds.Weebomination_TB_BaconShop_HERO_34_Buddy;\r\n\t\tcase CardIds.Pyramad:\r\n\t\t\treturn CardIds.TitanicGuardian_TB_BaconShop_HERO_39_Buddy;\r\n\t\tcase CardIds.QueenWagtoggle_TB_BaconShop_HERO_14:\r\n\t\t\treturn CardIds.ElderTaggawag_TB_BaconShop_HERO_14_Buddy;\r\n\t\tcase CardIds.RagnarosTheFirelord_TB_BaconShop_HERO_11:\r\n\t\t\treturn CardIds.Lucifron_TB_BaconShop_HERO_11_Buddy;\r\n\t\tcase CardIds.Rakanishu_TB_BaconShop_HERO_75:\r\n\t\t\treturn CardIds.LanternTender_TB_BaconShop_HERO_75_Buddy;\r\n\t\tcase CardIds.RenoJackson_TB_BaconShop_HERO_41:\r\n\t\t\treturn CardIds.SrTombDiver_TB_BaconShop_HERO_41_Buddy;\r\n\t\tcase CardIds.ScabbsCutterbutter_BG21_HERO_010:\r\n\t\t\treturn CardIds.WardenThelwater_BG21_HERO_010_Buddy;\r\n\t\tcase CardIds.Shudderwock_TB_BaconShop_HERO_23:\r\n\t\t\treturn CardIds.Muckslinger_TB_BaconShop_HERO_23_Buddy;\r\n\t\tcase CardIds.SilasDarkmoon_TB_BaconShop_HERO_90:\r\n\t\t\treturn CardIds.Burth_TB_BaconShop_HERO_90_Buddy;\r\n\t\tcase CardIds.Sindragosa_TB_BaconShop_HERO_27:\r\n\t\t\treturn CardIds.ThawedChampion_TB_BaconShop_HERO_27_Buddy;\r\n\t\tcase CardIds.SirFinleyMrrgglton_TB_BaconShop_HERO_40:\r\n\t\t\treturn CardIds.MaxwellMightySteed_TB_BaconShop_HERO_40_Buddy;\r\n\t\tcase CardIds.SkycapnKragg_TB_BaconShop_HERO_68:\r\n\t\t\treturn CardIds.Sharkbait_TB_BaconShop_HERO_68_Buddy;\r\n\t\tcase CardIds.Sneed_BG21_HERO_030:\r\n\t\t\treturn CardIds.PilotedWhirlOTron_BG21_HERO_030_Buddy;\r\n\t\tcase CardIds.TamsinRoame_BG20_HERO_282:\r\n\t\t\treturn CardIds.Monstrosity_BG20_HERO_282_Buddy;\r\n\t\tcase CardIds.TavishStormpike_BG22_HERO_000:\r\n\t\t\treturn CardIds.Crabby_BG22_HERO_000_Buddy;\r\n\t\tcase CardIds.TessGreymane_TB_BaconShop_HERO_50:\r\n\t\t\treturn CardIds.HunterOfOld_TB_BaconShop_HERO_50_Buddy;\r\n\t\tcase CardIds.TheCurator_TB_BaconShop_HERO_33:\r\n\t\t\treturn CardIds.Mishmash_TB_BaconShop_HERO_33_Buddy;\r\n\t\tcase CardIds.TheGreatAkazamzarak:\r\n\t\t\treturn CardIds.StreetMagician_TB_BaconShop_HERO_21_Buddy;\r\n\t\tcase CardIds.TheLichKing_TB_BaconShop_HERO_22:\r\n\t\t\treturn CardIds.Arfus_TB_BaconShop_HERO_22_Buddy;\r\n\t\tcase CardIds.TheRatKing_TB_BaconShop_HERO_12:\r\n\t\t\treturn CardIds.PigeonLord_TB_BaconShop_HERO_12_Buddy;\r\n\t\tcase CardIds.Tickatus_TB_BaconShop_HERO_94:\r\n\t\t\treturn CardIds.TicketCollector_TB_BaconShop_HERO_94_Buddy;\r\n\t\tcase CardIds.TradePrinceGallywix_TB_BaconShop_HERO_10:\r\n\t\t\treturn CardIds.BilgewaterMogul_TB_BaconShop_HERO_10_Buddy;\r\n\t\tcase CardIds.VanndarStormpike_BG22_HERO_003:\r\n\t\t\treturn CardIds.StormpikeLieutenant_BG22_HERO_003_Buddy;\r\n\t\tcase CardIds.Voljin_BG20_HERO_201:\r\n\t\t\treturn CardIds.MasterGadrin_BG20_HERO_201_Buddy;\r\n\t\tcase CardIds.Xyrella_BG20_HERO_101:\r\n\t\t\treturn CardIds.BabyElekk_BG20_HERO_101_Buddy;\r\n\t\tcase CardIds.YoggSaronHopesEnd_TB_BaconShop_HERO_35:\r\n\t\t\treturn CardIds.AcolyteOfYoggSaron_TB_BaconShop_HERO_35_Buddy;\r\n\t\tcase CardIds.Ysera_TB_BaconShop_HERO_53:\r\n\t\t\treturn CardIds.ValithriaDreamwalker_TB_BaconShop_HERO_53_Buddy;\r\n\t\tcase CardIds.Yshaarj:\r\n\t\t\treturn CardIds.BabyYshaarj_TB_BaconShop_HERO_92_Buddy;\r\n\t\tcase CardIds.ZephrysTheGreat_TB_BaconShop_HERO_91:\r\n\t\t\treturn CardIds.Phyresz_TB_BaconShop_HERO_91_Buddy;\r\n\t\tcase CardIds.VardenDawngrasp_BG22_HERO_004:\r\n\t\t\treturn CardIds.VardensAquarrior_BG22_HERO_004_Buddy;\r\n\t\tcase CardIds.Rokara_BG20_HERO_100:\r\n\t\t\treturn CardIds.IcesnarlTheMighty_BG20_HERO_100_Buddy;\r\n\t\tcase CardIds.Onyxia_BG22_HERO_305:\r\n\t\t\treturn CardIds.ManyWhelps_BG22_HERO_305_Buddy;\r\n\t\tcase CardIds.AmbassadorFaelin_BG22_HERO_201:\r\n\t\t\treturn CardIds.SubmersibleChef_BG22_HERO_201_Buddy;\r\n\t\tcase CardIds.IniStormcoil_BG22_HERO_200:\r\n\t\t\treturn CardIds.SubScrubber_BG22_HERO_200_Buddy;\r\n\t\tcase CardIds.QueenAzshara_BG22_HERO_007:\r\n\t\t\treturn CardIds.ImperialDefender_BG22_HERO_007_Buddy;\r\n\t\tcase CardIds.Ozumat_BG23_HERO_201:\r\n\t\t\treturn CardIds.Tamuzo_BG23_HERO_201_Buddy;\r\n\t\tcase CardIds.LadyVashj_BG23_HERO_304:\r\n\t\t\treturn CardIds.CoilfangElite_BG23_HERO_304_Buddy;\r\n\t\tcase CardIds.HeistbaronTogwaggle_BG23_HERO_305:\r\n\t\t\treturn CardIds.WaxadredTheDrippy_BG23_HERO_305_Buddy;\r\n\t\tcase CardIds.SireDenathrius_BG24_HERO_100:\r\n\t\t\treturn CardIds.ShadyAristocrat_BG24_HERO_100_Buddy;\r\n\t\tcase CardIds.SylvanasWindrunner_BG23_HERO_306:\r\n\t\t\treturn CardIds.NathanosBlightcaller_BG23_HERO_306_Buddy;\r\n\t\tcase CardIds.TheJailer_TB_BaconShop_HERO_702:\r\n\t\t\treturn CardIds.MawswornSoulkeeper_TB_BaconShop_HERO_702_Buddy;\r\n\t\tcase CardIds.EnhanceOMechano_BG24_HERO_204:\r\n\t\t\treturn CardIds.EnhanceOMedico_BG24_HERO_204_Buddy;\r\n\t\tcase CardIds.ProfessorPutricide_BG25_HERO_100:\r\n\t\t\treturn CardIds.Festergut_BG25_HERO_100_Buddy;\r\n\t\tcase CardIds.TeronGorefiend_BG25_HERO_103:\r\n\t\t\treturn CardIds.ShadowyConstruct_BG25_HERO_103_Buddy;\r\n\t\tcase CardIds.MurlocHolmes_BG23_HERO_303:\r\n\t\t\treturn CardIds.Watfin_BG23_HERO_303_Buddy;\r\n\t\tcase CardIds.ETCBandManager_BG25_HERO_105:\r\n\t\t\treturn CardIds.TalentScout_BG25_HERO_105_Buddy;\r\n\t\tcase CardIds.CapnHoggarr_BG26_HERO_101:\r\n\t\t\treturn CardIds.ShiningSailor_BG26_HERO_101_Buddy;\r\n\t\tcase CardIds.IngeTheIronHymn:\r\n\t\t\treturn CardIds.SolemnSerenader_BG26_HERO_102_Buddy;\r\n\t\tcase CardIds.RockMasterVoone_BG26_HERO_104:\r\n\t\t\treturn CardIds.AkaliRockRhino_BG26_HERO_104_Buddy;\r\n\t\tcase CardIds.ThorimStormlord_BG27_HERO_801:\r\n\t\t\treturn CardIds.VeranusStormlordsMount_BG27_HERO_801_Buddy;\r\n\t\tcase CardIds.SnakeEyes_BG28_HERO_400:\r\n\t\t\treturn CardIds.BoxCars_BG28_HERO_400_Buddy;\r\n\t\tcase CardIds.DoctorHollidae_BG28_HERO_801:\r\n\t\t\treturn CardIds.TheNineFrogs_BG28_HERO_801_Buddy;\r\n\t\tcase CardIds.TaethelanBloodwatcher_BG28_HERO_800:\r\n\t\t\treturn CardIds.ReliquaryAttendant_BG28_HERO_800_Buddy;\r\n\t\tcase CardIds.TheNamelessOne_BGDUO_HERO_100:\r\n\t\t\treturn CardIds.FacelessOne_BGDUO_HERO_100_Buddy;\r\n\t\tcase CardIds.Cho_BGDUO_HERO_222:\r\n\t\t\treturn CardIds.HalfusTheMighty_BGDUO_HERO_222_Buddy;\r\n\t\tcase CardIds.Gall_BGDUO_HERO_223:\r\n\t\t\treturn CardIds.HalfusTheWise_BGDUO_HERO_223_Buddy;\r\n\t\tcase CardIds.MadamGoya_BGDUO_HERO_104:\r\n\t\t\treturn CardIds.MisterChu_BGDUO_HERO_104_Buddy;\r\n\t\tcase CardIds.FlobbidinousFloop_BGDUO_HERO_101:\r\n\t\t\treturn CardIds.GloriousGloopling_BGDUO_HERO_101_Buddy;\r\n\t\tdefault:\r\n\t\t\tif (!!heroCardId) {\r\n\t\t\t\tconsole.debug('missing buddy section for ', heroCardId);\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t}\r\n};\r\n\r\nexport const isBaconGhost = (cardId: string): boolean => {\r\n\treturn (\r\n\t\tcardId === CardIds.Kelthuzad_TB_BaconShop_HERO_KelThuzad ||\r\n\t\tcardId === CardIds.LadyDeathwhisper_TB_BaconShop_HERO_Deathwhisper\r\n\t);\r\n};\r\n\r\nexport const getEffectiveTribes = (\r\n\tcard: ReferenceCard,\r\n\tgroupMinionsIntoTheirTribeGroup: boolean,\r\n): readonly string[] => {\r\n\tconst tribes: readonly Race[] = groupMinionsIntoTheirTribeGroup\r\n\t\t? getTribesForInclusion(card, true)\r\n\t\t: getEffectiveTribesEnum(card);\r\n\treturn tribes.map((tribe) => Race[tribe]);\r\n};\r\n\r\n// TODO: use the card tags instead\r\nexport const getTribesForInclusion = (card: ReferenceCard, includeOwnTribe: boolean): readonly Race[] => {\r\n\tif (!card) {\r\n\t\treturn [];\r\n\t}\r\n\tconst nativeRaces = card.races?.map((r) => Race[r]) ?? [];\r\n\tconst cardRaces = includeOwnTribe ? nativeRaces : [];\r\n\tswitch (card.id) {\r\n\t\t// Some cases are only included when specific tribes are\r\n\t\tcase CardIds.BirdBuddy_BG21_002:\r\n\t\tcase CardIds.BirdBuddy_BG21_002_G:\r\n\t\tcase CardIds.PackLeader_BGS_017:\r\n\t\tcase CardIds.PackLeader_TB_BaconUps_086:\r\n\t\tcase CardIds.VirmenSensei_CFM_816:\r\n\t\t// case CardIds.VirmenSensei_TB_BaconUps_074:\r\n\t\tcase CardIds.HoundmasterLegacy:\r\n\t\tcase CardIds.HoundmasterVanilla:\r\n\t\tcase CardIds.Houndmaster_TB_BaconUps_068:\r\n\t\tcase CardIds.Houndmaster_BG_DS1_070:\r\n\t\t\treturn [Race.BEAST, ...cardRaces];\r\n\t\tcase CardIds.ImpatientDoomsayer_BG21_007:\r\n\t\tcase CardIds.ImpatientDoomsayer_BG21_007_G:\r\n\t\tcase CardIds.SoulJuggler_BGS_002:\r\n\t\tcase CardIds.SoulJuggler_TB_BaconUps_075:\r\n\t\tcase CardIds.WrathWeaver_BGS_004:\r\n\t\tcase CardIds.WrathWeaver_TB_BaconUps_079:\r\n\t\tcase CardIds.CultistSthara_BG27_081:\r\n\t\tcase CardIds.CultistSthara_BG27_081_G:\r\n\t\t\treturn [Race.DEMON, ...cardRaces];\r\n\t\tcase CardIds.SeafoodSlinger_BG21_011:\r\n\t\tcase CardIds.SeafoodSlinger_BG21_011_G:\r\n\t\t\treturn [Race.MURLOC, ...cardRaces];\r\n\t\tcase CardIds.NadinaTheRed_BGS_040:\r\n\t\tcase CardIds.NadinaTheRed_TB_BaconUps_154:\r\n\t\t// case CardIds.WaxriderTogwaggle_BGS_035:\r\n\t\t// case CardIds.WaxriderTogwaggle_TB_BaconUps_105:\r\n\t\tcase CardIds.WhelpSmuggler_BG21_013:\r\n\t\tcase CardIds.WhelpSmuggler_BG21_013_G:\r\n\t\t\treturn [Race.DRAGON, ...cardRaces];\r\n\t\tcase CardIds.MajordomoExecutus_BGS_105:\r\n\t\tcase CardIds.MajordomoExecutus_TB_BaconUps_207:\r\n\t\tcase CardIds.MasterOfRealities_BG21_036:\r\n\t\tcase CardIds.MasterOfRealities_BG21_036_G:\r\n\t\tcase CardIds.NomiKitchenNightmare_BGS_104:\r\n\t\tcase CardIds.NomiKitchenNightmare_TB_BaconUps_201:\r\n\t\t\treturn [Race.ELEMENTAL, ...cardRaces];\r\n\t\tcase CardIds.KangorsApprentice_BGS_012:\r\n\t\tcase CardIds.KangorsApprentice_TB_BaconUps_087:\r\n\t\t\treturn [Race.MECH, ...cardRaces];\r\n\t\tcase CardIds.DefiantShipwright_BG21_018:\r\n\t\tcase CardIds.DefiantShipwright_BG21_018_G:\r\n\t\t// case CardIds.TheTideRazor_BGS_079:\r\n\t\t// case CardIds.TheTideRazor_TB_BaconUps_137:\r\n\t\tcase CardIds.CoastGuard_BG31_827:\r\n\t\tcase CardIds.CoastGuard_BG31_827_G:\r\n\t\t\treturn [Race.PIRATE, ...cardRaces];\r\n\t\tcase CardIds.AgamagganTheGreatBoar_BG20_205:\r\n\t\tcase CardIds.AgamagganTheGreatBoar_BG20_205_G:\r\n\t\tcase CardIds.ProphetOfTheBoar_BG20_203:\r\n\t\tcase CardIds.ProphetOfTheBoar_BG20_203_G:\r\n\t\t\treturn [Race.QUILBOAR, ...cardRaces];\r\n\t\tcase CardIds.OrgozoaTheTender_BG23_015:\r\n\t\tcase CardIds.OrgozoaTheTender_BG23_015_G:\r\n\t\t\treturn [Race.NAGA, ...cardRaces];\r\n\t\tcase CardIds.DisguisedGraverobber_BG28_303:\r\n\t\tcase CardIds.DisguisedGraverobber_BG28_303_G:\r\n\t\t\treturn [Race.UNDEAD, ...cardRaces];\r\n\t\tdefault:\r\n\t\t\treturn getEffectiveTribesEnum(card);\r\n\t}\r\n};\r\n\r\n// To avoid braking existing imports\r\nexport const getEffectiveTribesEnum = getEffectiveTribesEnumBase;\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestone-hs/reference-data",
3
- "version": "2.0.147",
3
+ "version": "2.0.149",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build": "rm -rf dist && tsc",