@firestone-hs/reference-data 0.1.191 → 0.1.195
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"all-cards.service.js","sourceRoot":"","sources":["../../src/services/all-cards.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,mCAA+B;AAE/B,MAAM,aAAa,GAAG,uDAAuD,CAAC;AAE9E,MAAa,eAAe;IAK3B;QAHQ,UAAK,GAAwC,EAAE,CAAC;QAChD,eAAU,GAA2C,EAAE,CAAC;IAMhE,CAAC;IAIM,OAAO,CAAC,EAAU,EAAE,kBAAkB,GAAG,IAAI;;QACnD,aAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,mCAAK,EAAoB,CAAC;IAYhD,CAAC;IAEM,gBAAgB,CAAC,KAAa;;QACpC,aAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,mCAAK,EAAoB,CAAC;IACxD,CAAC;IAEM,kBAAkB,CAAC,MAAgB;QACzC,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5D,CAAC;IAEM,QAAQ;QACd,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAEY,iBAAiB,CAAC,OAAO,GAAG,EAAE,EAAE,SAAS,GAAG,iBAAiB;;YAEzE,OAAO,IAAI,OAAO,CAAO,CAAO,OAAO,EAAE,MAAM,EAAE,EAAE;gBAClD,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAC3C,IAAI,CAAC,EAAC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAA,EAAE;oBAEvB,OAAO,EAAE,CAAC;oBACV,OAAO;iBACP;gBACD,IA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AgC;QACjC;YACC,iBAAgC;QACjC;YACC,iBAAgC;QAGjC,gBAAgD;QAChD;YACC,iBAA8B;QAC/B,gBAA0D;QAC1D;YACC,iBAAmC;QACpC,gBAA0C;QAC1C;YACC,iBAA2B;QAC5B,gBAA4C;QAC5C;YACC,iBAA4B;QAC7B,gBAAkD;QAClD;YACC,iBAA+B;QAChC,gBAAkD;QAClD;YACC,iBAA+B;QAChC,gBAAkD;QAClD;YACC,iBAA+B;QAChC,gBAAsD;QACtD;YACC,iBAAiC;QAClC,gBAAsC;QACtC;YACC,iBAAyB;QAC1B,gBAA8C;QAC9C;YACC,iBAA6B;KAG9B;IAED,IAAI,MAAM,CAAC,UAAU,WAAyB,EAAE;QAC/C,iBAA+B;KAC/B;IAED,OAAO,MAAM,CAAC;AACf,CAAC,CAAC;AAhMW,QAAA,aAAa,iBAgMxB","sourcesContent":["import { CardIds } from '../card-ids';\r\nimport { ReferenceCard } from '../models/reference-cards/reference-card';\r\nimport { http } from './utils';\r\n\r\nconst CARDS_CDN_URL = 'https://static.zerotoheroes.com/hearthstone/jsoncards';\r\n\r\nexport class AllCardsService {\r\n\t// private allCards: ReferenceCard[];\r\n\tprivate cache: { [cardId: string]: ReferenceCard } = {};\r\n\tprivate cacheDbfId: { [cardDbfId: string]: ReferenceCard } = {};\r\n\r\n\tconstructor() {\r\n\t\t// We don't call it in the constructor because we want the app to be in control\r\n\t\t// of how they load the cards, and for it to be aware of when cards have been loaded\r\n\t\t// this.retrieveAllCards();\r\n\t}\r\n\r\n\t// We keep this synchronous because we ensure, in the game init pipeline, that loading cards\r\n\t// is the first thing we do\r\n\tpublic getCard(id: string, errorWhenUndefined = true): ReferenceCard {\r\n\t\treturn this.cache[id] ?? ({} as ReferenceCard);\r\n\t\t// if (this.cache[id]) {\r\n\t\t// }\r\n\t\t// const candidates = Object.values(this.cache).filter((card) => card.id === id);\r\n\t\t// if (errorWhenUndefined && (!candidates || candidates.length === 0)) {\r\n\t\t// \tconsole.debug('Could not find card for id', id, new Error().stack);\r\n\t\t// \treturn {} as ReferenceCard;\r\n\t\t// }\r\n\t\t// if (candidates.length === 1) {\r\n\t\t// \tthis.cache[id] = candidates[0];\r\n\t\t// }\r\n\t\t// return candidates[0];\r\n\t}\r\n\r\n\tpublic getCardFromDbfId(dbfId: number): ReferenceCard {\r\n\t\treturn this.cacheDbfId[dbfId] ?? ({} as ReferenceCard);\r\n\t}\r\n\r\n\tpublic getCardsFromDbfIds(dbfIds: number[]): ReferenceCard[] {\r\n\t\treturn dbfIds.map((dbfId) => this.getCardFromDbfId(dbfId));\r\n\t}\r\n\r\n\tpublic getCards(): ReferenceCard[] {\r\n\t\treturn Object.values(this.cache);\r\n\t}\r\n\r\n\tpublic async initializeCardsDb(version = '', cardsFile = 'cards_enUS.json'): Promise<void> {\r\n\t\t// console.debug('[all-cards] asked to retrieve cards from CDN', version, new Error().stack);\r\n\t\treturn new Promise<void>(async (resolve, reject) => {\r\n\t\t\tconst allCards = Object.values(this.cache);\r\n\t\t\tif (!!allCards?.length) {\r\n\t\t\t\t// console.debug('[all-cards] already loaded all cards');\r\n\t\t\t\tresolve();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis.cache = {};\r\n\t\t\tthis.cacheDbfId = {};\r\n\t\t\tconst url = `${CARDS_CDN_URL}/${cardsFile}?v=${version}`;\r\n\t\t\tconst cardsStr: string = await http(url);\r\n\t\t\tif (!cardsStr || cardsStr.length === 0 || cardsStr.startsWith('<')) {\r\n\t\t\t\tconsole.error('[all-cards] could not load cards', url, cardsStr);\r\n\t\t\t} else {\r\n\t\t\t\t// console.debug('[all-cards] retrieved all cards');\r\n\t\t\t\tconst allCards: readonly ReferenceCard[] = JSON.parse(cardsStr);\r\n\t\t\t\tfor (const card of allCards) {\r\n\t\t\t\t\tif (card.id) {\r\n\t\t\t\t\t\tthis.cache[card.id] = card;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (card.dbfId) {\r\n\t\t\t\t\t\tthis.cacheDbfId[card.dbfId] = card;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n}\r\n\r\n// The spellstones are present in the AI decklist in their basic version\r\n// However, if the AI plays the spellstone's upgraded version, we need to remove\r\n// the basic one from the decklist\r\nexport const getBaseCardId = (cardId: string): string => {\r\n\tif (!cardId) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\tswitch (cardId) {\r\n\t\t// The spellstones\r\n\t\tcase 'LOOT_103t1':\r\n\t\tcase 'LOOT_103t2':\r\n\t\t\treturn 'LOOT_103';\r\n\t\tcase 'LOOT_043t2':\r\n\t\tcase 'LOOT_043t3':\r\n\t\t\treturn 'LOOT_043';\r\n\t\tcase 'LOOT_051t1':\r\n\t\tcase 'LOOT_051t2':\r\n\t\t\treturn 'LOOT_051';\r\n\t\tcase 'LOOT_064t1':\r\n\t\tcase 'LOOT_064t2':\r\n\t\t\treturn 'LOOT_064';\r\n\t\tcase 'LOOT_080t2':\r\n\t\tcase 'LOOT_080t3':\r\n\t\t\treturn 'LOOT_080';\r\n\t\tcase 'LOOT_091t1':\r\n\t\tcase 'LOOT_091t2':\r\n\t\t\treturn 'LOOT_091';\r\n\t\tcase 'LOOT_203t2':\r\n\t\tcase 'LOOT_203t3':\r\n\t\t\treturn 'LOOT_203';\r\n\t\tcase 'LOOT_503t':\r\n\t\tcase 'LOOT_503t2':\r\n\t\t\treturn 'LOOT_503';\r\n\t\tcase 'LOOT_507t':\r\n\t\tcase 'LOOT_507t2':\r\n\t\t\treturn 'LOOT_507';\r\n\t\tcase 'FB_Champs_LOOT_080t2':\r\n\t\tcase 'FB_Champs_LOOT_080t3':\r\n\t\t\treturn 'FB_Champs_LOOT_080';\r\n\t\t// The \"unidentified\" spells\r\n\t\tcase 'LOOT_278t1':\r\n\t\t\treturn 'LOOT_278';\r\n\t\tcase 'LOOT_278t2':\r\n\t\t\treturn 'LOOT_278';\r\n\t\tcase 'LOOT_278t3':\r\n\t\t\treturn 'LOOT_278';\r\n\t\tcase 'LOOT_278t4':\r\n\t\t\treturn 'LOOT_278';\r\n\t\tcase 'LOOT_285t':\r\n\t\t\treturn 'LOOT_285';\r\n\t\tcase 'LOOT_285t2':\r\n\t\t\treturn 'LOOT_285';\r\n\t\tcase 'LOOT_285t3':\r\n\t\t\treturn 'LOOT_285';\r\n\t\tcase 'LOOT_285t4':\r\n\t\t\treturn 'LOOT_285';\r\n\t\tcase 'LOOT_286t1':\r\n\t\t\treturn 'LOOT_286';\r\n\t\tcase 'LOOT_286t2':\r\n\t\t\treturn 'LOOT_286';\r\n\t\tcase 'LOOT_286t3':\r\n\t\t\treturn 'LOOT_286';\r\n\t\tcase 'LOOT_286t4':\r\n\t\t\treturn 'LOOT_286';\r\n\t\tcase 'DAL_366t1':\r\n\t\t\treturn 'DAL_366';\r\n\t\tcase 'DAL_366t2':\r\n\t\t\treturn 'DAL_366';\r\n\t\tcase 'DAL_366t3':\r\n\t\t\treturn 'DAL_366';\r\n\t\tcase 'DAL_366t4':\r\n\t\t\treturn 'DAL_366';\r\n\t\t// Galakrond\r\n\t\tcase CardIds.GalakrondTheTempest_GalakrondTheApocalypseToken:\r\n\t\tcase CardIds.GalakrondTheTempest_GalakrondAzerothsEndToken:\r\n\t\t\treturn CardIds.GalakrondTheTempest;\r\n\t\tcase CardIds.GalakrondTheWretched_GalakrondTheApocalypseToken:\r\n\t\tcase CardIds.GalakrondTheWretched_GalakrondAzerothsEndToken:\r\n\t\t\treturn CardIds.GalakrondTheWretched;\r\n\t\tcase CardIds.GalakrondTheUnspeakable_GalakrondTheApocalypseToken:\r\n\t\tcase CardIds.GalakrondTheUnspeakable_GalakrondAzerothsEndToken:\r\n\t\t\treturn CardIds.GalakrondTheUnspeakable;\r\n\t\tcase CardIds.GalakrondTheNightmare_GalakrondTheApocalypseToken:\r\n\t\tcase CardIds.GalakrondTheNightmare_GalakrondAzerothsEndToken:\r\n\t\t\treturn CardIds.GalakrondTheNightmare;\r\n\t\tcase CardIds.GalakrondTheUnbreakable_GalakrondTheApocalypseToken:\r\n\t\tcase CardIds.GalakrondTheUnbreakable_GalakrondAzerothsEndToken:\r\n\t\t\treturn CardIds.GalakrondTheUnbreakable;\r\n\t\t// Corrupted\r\n\t\tcase 'DMF_054t':\r\n\t\t\treturn 'DMF_054';\r\n\t\tcase 'DMF_061t':\r\n\t\t\treturn 'DMF_061';\r\n\t\tcase 'DMF_064t':\r\n\t\t\treturn 'DMF_064';\r\n\t\tcase 'DMF_073t':\r\n\t\t\treturn 'DMF_073';\r\n\t\tcase 'DMF_078t':\r\n\t\t\treturn 'DMF_078';\r\n\t\tcase 'DMF_080t':\r\n\t\t\treturn 'DMF_080';\r\n\t\tcase 'DMF_082t':\r\n\t\t\treturn 'DMF_082';\r\n\t\tcase 'DMF_083t':\r\n\t\t\treturn 'DMF_083';\r\n\t\tcase 'DMF_090t':\r\n\t\t\treturn 'DMF_090';\r\n\t\tcase 'DMF_101t':\r\n\t\t\treturn 'DMF_101';\r\n\t\tcase 'DMF_105t':\r\n\t\t\treturn 'DMF_105';\r\n\t\tcase 'DMF_117t':\r\n\t\t\treturn 'DMF_117';\r\n\t\tcase 'DMF_117t2':\r\n\t\t\treturn 'DMF_117';\r\n\t\tcase 'DMF_118t':\r\n\t\t\treturn 'DMF_118';\r\n\t\tcase 'DMF_124t':\r\n\t\t\treturn 'DMF_124';\r\n\t\tcase 'DMF_163t':\r\n\t\t\treturn 'DMF_163';\r\n\t\tcase 'DMF_174t':\r\n\t\t\treturn 'DMF_174';\r\n\t\tcase 'DMF_184t':\r\n\t\t\treturn 'DMF_184';\r\n\t\tcase 'DMF_186a':\r\n\t\t\treturn 'DMF_186';\r\n\t\tcase 'DMF_244t':\r\n\t\t\treturn 'DMF_244';\r\n\t\tcase 'DMF_247t':\r\n\t\t\treturn 'DMF_247';\r\n\t\tcase 'DMF_248t':\r\n\t\t\treturn 'DMF_248';\r\n\t\tcase 'DMF_517a':\r\n\t\t\treturn 'DMF_517';\r\n\t\tcase 'DMF_526a':\r\n\t\t\treturn 'DMF_526';\r\n\t\tcase 'DMF_701t':\r\n\t\t\treturn 'DMF_701';\r\n\t\tcase 'DMF_703t':\r\n\t\t\treturn 'DMF_703';\r\n\t\tcase 'DMF_730t':\r\n\t\t\treturn 'DMF_730';\r\n\t\tcase 'DMF_526a':\r\n\t\t\treturn 'DMF_526';\r\n\t\tcase CardIds.DreamingDrake_DreamingDrakeToken:\r\n\t\t\treturn CardIds.DreamingDrake;\r\n\t\tcase CardIds.LibramOfJudgment_LibramOfJudgmentToken:\r\n\t\t\treturn CardIds.LibramOfJudgment;\r\n\t\tcase CardIds.LuckysoulHoarder_LuckysoulHoarderToken:\r\n\t\t\treturn CardIds.LuckysoulHoarder;\r\n\t\tcase CardIds.NitroboostPoison_NitroboostPoisonToken:\r\n\t\t\treturn CardIds.NitroboostPoison;\r\n\t\t// The \"improve during run\" cards in Duels\r\n\t\t// Upgradable ranked spells\r\n\t\tcase CardIds.TameBeastRank1_TameBeastRank2Token:\r\n\t\tcase CardIds.TameBeastRank1_TameBeastRank3Token:\r\n\t\t\treturn CardIds.TameBeastRank1;\r\n\t\tcase CardIds.ChainLightningRank1_ChainLightningRank2Token:\r\n\t\tcase CardIds.ChainLightningRank1_ChainLightningRank3Token:\r\n\t\t\treturn CardIds.ChainLightningRank1;\r\n\t\tcase CardIds.FlurryRank1_FlurryRank2Token:\r\n\t\tcase CardIds.FlurryRank1_FlurryRank3Token:\r\n\t\t\treturn CardIds.FlurryRank1;\r\n\t\tcase CardIds.CondemnRank1_CondemnRank2Token:\r\n\t\tcase CardIds.CondemnRank1_CondemnRank3Token:\r\n\t\t\treturn CardIds.CondemnRank1;\r\n\t\tcase CardIds.WickedStabRank1_WickedStabRank2Token:\r\n\t\tcase CardIds.WickedStabRank1_WickedStabRank3Token:\r\n\t\t\treturn CardIds.WickedStabRank1;\r\n\t\tcase CardIds.LivingSeedRank1_LivingSeedRank2Token:\r\n\t\tcase CardIds.LivingSeedRank1_LivingSeedRank3Token:\r\n\t\t\treturn CardIds.LivingSeedRank1;\r\n\t\tcase CardIds.ConvictionRank1_ConvictionRank2Token:\r\n\t\tcase CardIds.ConvictionRank1_ConvictionRank3Token:\r\n\t\t\treturn CardIds.ConvictionRank1;\r\n\t\tcase CardIds.ConditioningRank1_ConditioningRank2Token:\r\n\t\tcase CardIds.ConditioningRank1_ConditioningRank3Token:\r\n\t\t\treturn CardIds.ConditioningRank1;\r\n\t\tcase CardIds.FuryRank1_FuryRank2Token:\r\n\t\tcase CardIds.FuryRank1_FuryRank3Token:\r\n\t\t\treturn CardIds.FuryRank1;\r\n\t\tcase CardIds.ImpSwarmRank1_ImpSwarmRank2Token:\r\n\t\tcase CardIds.ImpSwarmRank1_ImpSwarmRank3Token:\r\n\t\t\treturn CardIds.ImpSwarmRank1;\r\n\r\n\t\t// Transfer Student should be handled on a case by case basis\r\n\t}\r\n\r\n\tif (cardId.startsWith(CardIds.TransferStudent)) {\r\n\t\treturn CardIds.TransferStudent;\r\n\t}\r\n\r\n\treturn cardId;\r\n};\r\n"]}
|
|
1
|
+
{"version":3,"file":"all-cards.service.js","sourceRoot":"","sources":["../../src/services/all-cards.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,mCAA+B;AAE/B,MAAM,aAAa,GAAG,uDAAuD,CAAC;AAE9E,MAAa,eAAe;IAK3B;QAHQ,UAAK,GAAwC,EAAE,CAAC;QAChD,eAAU,GAA2C,EAAE,CAAC;IAMhE,CAAC;IAIM,OAAO,CAAC,EAAU,EAAE,kBAAkB,GAAG,IAAI;;QACnD,OAAO,MAAA,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,mCAAK,EAAoB,CAAC;IAYhD,CAAC;IAEM,gBAAgB,CAAC,KAAa;;QACpC,OAAO,MAAA,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,mCAAK,EAAoB,CAAC;IACxD,CAAC;IAEM,kBAAkB,CAAC,MAAgB;QACzC,OAAO,MAAM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,KAAK,UAAU;YACd,OAAO,SAAS,CAAC;QAClB,KAAK,UAAU;YACd,OAAO,SAAS,CAAC;QAClB,KAAK,UAAU;YACd,OAAO,SAAS,CAAC;QAClB,KAAK,UAAU;YACd,OAAO,SAAS,CAAC;QAClB,KAAK,UAAU;YACd,OAAO,SAAS,CAAC;QAClB,KAAK,UAAU;YACd,OAAO,SAAS,CAAC;QAClB,KAAK,UAAU;YACd,OAAO,SAAS,CAAC;QAClB,KAAK,UAAU;YACd,OAAO,SAAS,CAAC;QAClB,KAAK,UAAU;YACd,OAAO,SAAS,CAAC;QAClB,KAAK,UAAU;YACd,OAAO,SAAS,CAAC;QAClB,KAAK,UAAU;YACd,OAAO,SAAS,CAAC;QAClB,KAAK,UAAU;YACd,OAAO,SAAS,CAAC;QAClB,KAAK,UAAU;YACd,OAAO,SAAS,CAAC;QAClB;YACC,iBAA6B;QAC9B;YACC,iBAAgC;QACjC;YACC,iBAAgC;QACjC;YACC,iBAAgC;QAGjC,gBAAgD;QAChD;YACC,iBAA8B;QAC/B,gBAA0D;QAC1D;YACC,iBAAmC;QACpC,gBAA0C;QAC1C;YACC,iBAA2B;QAC5B,gBAA4C;QAC5C;YACC,iBAA4B;QAC7B,gBAAkD;QAClD;YACC,iBAA+B;QAChC,gBAAkD;QAClD;YACC,iBAA+B;QAChC,gBAAkD;QAClD;YACC,iBAA+B;QAChC,gBAAsD;QACtD;YACC,iBAAiC;QAClC,gBAAsC;QACtC;YACC,iBAAyB;QAC1B,gBAA8C;QAC9C;YACC,iBAA6B;KAG9B;IAED,IAAI,MAAM,CAAC,UAAU,WAAyB,EAAE;QAC/C,iBAA+B;KAC/B;IAED,OAAO,MAAM,CAAC;AACf,CAAC,CAAC;AAhMW,QAAA,aAAa,iBAgMxB","sourcesContent":["import { CardIds } from '../card-ids';\r\nimport { ReferenceCard } from '../models/reference-cards/reference-card';\r\nimport { http } from './utils';\r\n\r\nconst CARDS_CDN_URL = 'https://static.zerotoheroes.com/hearthstone/jsoncards';\r\n\r\nexport class AllCardsService {\r\n\t// private allCards: ReferenceCard[];\r\n\tprivate cache: { [cardId: string]: ReferenceCard } = {};\r\n\tprivate cacheDbfId: { [cardDbfId: string]: ReferenceCard } = {};\r\n\r\n\tconstructor() {\r\n\t\t// We don't call it in the constructor because we want the app to be in control\r\n\t\t// of how they load the cards, and for it to be aware of when cards have been loaded\r\n\t\t// this.retrieveAllCards();\r\n\t}\r\n\r\n\t// We keep this synchronous because we ensure, in the game init pipeline, that loading cards\r\n\t// is the first thing we do\r\n\tpublic getCard(id: string, errorWhenUndefined = true): ReferenceCard {\r\n\t\treturn this.cache[id] ?? ({} as ReferenceCard);\r\n\t\t// if (this.cache[id]) {\r\n\t\t// }\r\n\t\t// const candidates = Object.values(this.cache).filter((card) => card.id === id);\r\n\t\t// if (errorWhenUndefined && (!candidates || candidates.length === 0)) {\r\n\t\t// \tconsole.debug('Could not find card for id', id, new Error().stack);\r\n\t\t// \treturn {} as ReferenceCard;\r\n\t\t// }\r\n\t\t// if (candidates.length === 1) {\r\n\t\t// \tthis.cache[id] = candidates[0];\r\n\t\t// }\r\n\t\t// return candidates[0];\r\n\t}\r\n\r\n\tpublic getCardFromDbfId(dbfId: number): ReferenceCard {\r\n\t\treturn this.cacheDbfId[dbfId] ?? ({} as ReferenceCard);\r\n\t}\r\n\r\n\tpublic getCardsFromDbfIds(dbfIds: number[]): ReferenceCard[] {\r\n\t\treturn dbfIds.map((dbfId) => this.getCardFromDbfId(dbfId));\r\n\t}\r\n\r\n\tpublic getCards(): ReferenceCard[] {\r\n\t\treturn Object.values(this.cache);\r\n\t}\r\n\r\n\tpublic async initializeCardsDb(version = '', cardsFile = 'cards_enUS.json'): Promise<void> {\r\n\t\t// console.debug('[all-cards] asked to retrieve cards from CDN', version, new Error().stack);\r\n\t\treturn new Promise<void>(async (resolve, reject) => {\r\n\t\t\tconst allCards = Object.values(this.cache);\r\n\t\t\tif (!!allCards?.length) {\r\n\t\t\t\t// console.debug('[all-cards] already loaded all cards');\r\n\t\t\t\tresolve();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis.cache = {};\r\n\t\t\tthis.cacheDbfId = {};\r\n\t\t\tconst url = `${CARDS_CDN_URL}/${cardsFile}?v=${version}`;\r\n\t\t\tconst cardsStr: string = await http(url);\r\n\t\t\tif (!cardsStr || cardsStr.length === 0 || cardsStr.startsWith('<')) {\r\n\t\t\t\tconsole.error('[all-cards] could not load cards', url, cardsStr);\r\n\t\t\t} else {\r\n\t\t\t\t// console.debug('[all-cards] retrieved all cards');\r\n\t\t\t\tconst allCards: readonly ReferenceCard[] = JSON.parse(cardsStr);\r\n\t\t\t\tfor (const card of allCards) {\r\n\t\t\t\t\tif (card.id) {\r\n\t\t\t\t\t\tthis.cache[card.id] = card;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (card.dbfId) {\r\n\t\t\t\t\t\tthis.cacheDbfId[card.dbfId] = card;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n}\r\n\r\n// The spellstones are present in the AI decklist in their basic version\r\n// However, if the AI plays the spellstone's upgraded version, we need to remove\r\n// the basic one from the decklist\r\nexport const getBaseCardId = (cardId: string): string => {\r\n\tif (!cardId) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\tswitch (cardId) {\r\n\t\t// The spellstones\r\n\t\tcase 'LOOT_103t1':\r\n\t\tcase 'LOOT_103t2':\r\n\t\t\treturn 'LOOT_103';\r\n\t\tcase 'LOOT_043t2':\r\n\t\tcase 'LOOT_043t3':\r\n\t\t\treturn 'LOOT_043';\r\n\t\tcase 'LOOT_051t1':\r\n\t\tcase 'LOOT_051t2':\r\n\t\t\treturn 'LOOT_051';\r\n\t\tcase 'LOOT_064t1':\r\n\t\tcase 'LOOT_064t2':\r\n\t\t\treturn 'LOOT_064';\r\n\t\tcase 'LOOT_080t2':\r\n\t\tcase 'LOOT_080t3':\r\n\t\t\treturn 'LOOT_080';\r\n\t\tcase 'LOOT_091t1':\r\n\t\tcase 'LOOT_091t2':\r\n\t\t\treturn 'LOOT_091';\r\n\t\tcase 'LOOT_203t2':\r\n\t\tcase 'LOOT_203t3':\r\n\t\t\treturn 'LOOT_203';\r\n\t\tcase 'LOOT_503t':\r\n\t\tcase 'LOOT_503t2':\r\n\t\t\treturn 'LOOT_503';\r\n\t\tcase 'LOOT_507t':\r\n\t\tcase 'LOOT_507t2':\r\n\t\t\treturn 'LOOT_507';\r\n\t\tcase 'FB_Champs_LOOT_080t2':\r\n\t\tcase 'FB_Champs_LOOT_080t3':\r\n\t\t\treturn 'FB_Champs_LOOT_080';\r\n\t\t// The \"unidentified\" spells\r\n\t\tcase 'LOOT_278t1':\r\n\t\t\treturn 'LOOT_278';\r\n\t\tcase 'LOOT_278t2':\r\n\t\t\treturn 'LOOT_278';\r\n\t\tcase 'LOOT_278t3':\r\n\t\t\treturn 'LOOT_278';\r\n\t\tcase 'LOOT_278t4':\r\n\t\t\treturn 'LOOT_278';\r\n\t\tcase 'LOOT_285t':\r\n\t\t\treturn 'LOOT_285';\r\n\t\tcase 'LOOT_285t2':\r\n\t\t\treturn 'LOOT_285';\r\n\t\tcase 'LOOT_285t3':\r\n\t\t\treturn 'LOOT_285';\r\n\t\tcase 'LOOT_285t4':\r\n\t\t\treturn 'LOOT_285';\r\n\t\tcase 'LOOT_286t1':\r\n\t\t\treturn 'LOOT_286';\r\n\t\tcase 'LOOT_286t2':\r\n\t\t\treturn 'LOOT_286';\r\n\t\tcase 'LOOT_286t3':\r\n\t\t\treturn 'LOOT_286';\r\n\t\tcase 'LOOT_286t4':\r\n\t\t\treturn 'LOOT_286';\r\n\t\tcase 'DAL_366t1':\r\n\t\t\treturn 'DAL_366';\r\n\t\tcase 'DAL_366t2':\r\n\t\t\treturn 'DAL_366';\r\n\t\tcase 'DAL_366t3':\r\n\t\t\treturn 'DAL_366';\r\n\t\tcase 'DAL_366t4':\r\n\t\t\treturn 'DAL_366';\r\n\t\t// Galakrond\r\n\t\tcase CardIds.GalakrondTheTempest_GalakrondTheApocalypseToken:\r\n\t\tcase CardIds.GalakrondTheTempest_GalakrondAzerothsEndToken:\r\n\t\t\treturn CardIds.GalakrondTheTempest;\r\n\t\tcase CardIds.GalakrondTheWretched_GalakrondTheApocalypseToken:\r\n\t\tcase CardIds.GalakrondTheWretched_GalakrondAzerothsEndToken:\r\n\t\t\treturn CardIds.GalakrondTheWretched;\r\n\t\tcase CardIds.GalakrondTheUnspeakable_GalakrondTheApocalypseToken:\r\n\t\tcase CardIds.GalakrondTheUnspeakable_GalakrondAzerothsEndToken:\r\n\t\t\treturn CardIds.GalakrondTheUnspeakable;\r\n\t\tcase CardIds.GalakrondTheNightmare_GalakrondTheApocalypseToken:\r\n\t\tcase CardIds.GalakrondTheNightmare_GalakrondAzerothsEndToken:\r\n\t\t\treturn CardIds.GalakrondTheNightmare;\r\n\t\tcase CardIds.GalakrondTheUnbreakable_GalakrondTheApocalypseToken:\r\n\t\tcase CardIds.GalakrondTheUnbreakable_GalakrondAzerothsEndToken:\r\n\t\t\treturn CardIds.GalakrondTheUnbreakable;\r\n\t\t// Corrupted\r\n\t\tcase 'DMF_054t':\r\n\t\t\treturn 'DMF_054';\r\n\t\tcase 'DMF_061t':\r\n\t\t\treturn 'DMF_061';\r\n\t\tcase 'DMF_064t':\r\n\t\t\treturn 'DMF_064';\r\n\t\tcase 'DMF_073t':\r\n\t\t\treturn 'DMF_073';\r\n\t\tcase 'DMF_078t':\r\n\t\t\treturn 'DMF_078';\r\n\t\tcase 'DMF_080t':\r\n\t\t\treturn 'DMF_080';\r\n\t\tcase 'DMF_082t':\r\n\t\t\treturn 'DMF_082';\r\n\t\tcase 'DMF_083t':\r\n\t\t\treturn 'DMF_083';\r\n\t\tcase 'DMF_090t':\r\n\t\t\treturn 'DMF_090';\r\n\t\tcase 'DMF_101t':\r\n\t\t\treturn 'DMF_101';\r\n\t\tcase 'DMF_105t':\r\n\t\t\treturn 'DMF_105';\r\n\t\tcase 'DMF_117t':\r\n\t\t\treturn 'DMF_117';\r\n\t\tcase 'DMF_117t2':\r\n\t\t\treturn 'DMF_117';\r\n\t\tcase 'DMF_118t':\r\n\t\t\treturn 'DMF_118';\r\n\t\tcase 'DMF_124t':\r\n\t\t\treturn 'DMF_124';\r\n\t\tcase 'DMF_163t':\r\n\t\t\treturn 'DMF_163';\r\n\t\tcase 'DMF_174t':\r\n\t\t\treturn 'DMF_174';\r\n\t\tcase 'DMF_184t':\r\n\t\t\treturn 'DMF_184';\r\n\t\tcase 'DMF_186a':\r\n\t\t\treturn 'DMF_186';\r\n\t\tcase 'DMF_244t':\r\n\t\t\treturn 'DMF_244';\r\n\t\tcase 'DMF_247t':\r\n\t\t\treturn 'DMF_247';\r\n\t\tcase 'DMF_248t':\r\n\t\t\treturn 'DMF_248';\r\n\t\tcase 'DMF_517a':\r\n\t\t\treturn 'DMF_517';\r\n\t\tcase 'DMF_526a':\r\n\t\t\treturn 'DMF_526';\r\n\t\tcase 'DMF_701t':\r\n\t\t\treturn 'DMF_701';\r\n\t\tcase 'DMF_703t':\r\n\t\t\treturn 'DMF_703';\r\n\t\tcase 'DMF_730t':\r\n\t\t\treturn 'DMF_730';\r\n\t\tcase 'DMF_526a':\r\n\t\t\treturn 'DMF_526';\r\n\t\tcase CardIds.DreamingDrake_DreamingDrakeToken:\r\n\t\t\treturn CardIds.DreamingDrake;\r\n\t\tcase CardIds.LibramOfJudgment_LibramOfJudgmentToken:\r\n\t\t\treturn CardIds.LibramOfJudgment;\r\n\t\tcase CardIds.LuckysoulHoarder_LuckysoulHoarderToken:\r\n\t\t\treturn CardIds.LuckysoulHoarder;\r\n\t\tcase CardIds.NitroboostPoison_NitroboostPoisonToken:\r\n\t\t\treturn CardIds.NitroboostPoison;\r\n\t\t// The \"improve during run\" cards in Duels\r\n\t\t// Upgradable ranked spells\r\n\t\tcase CardIds.TameBeastRank1_TameBeastRank2Token:\r\n\t\tcase CardIds.TameBeastRank1_TameBeastRank3Token:\r\n\t\t\treturn CardIds.TameBeastRank1;\r\n\t\tcase CardIds.ChainLightningRank1_ChainLightningRank2Token:\r\n\t\tcase CardIds.ChainLightningRank1_ChainLightningRank3Token:\r\n\t\t\treturn CardIds.ChainLightningRank1;\r\n\t\tcase CardIds.FlurryRank1_FlurryRank2Token:\r\n\t\tcase CardIds.FlurryRank1_FlurryRank3Token:\r\n\t\t\treturn CardIds.FlurryRank1;\r\n\t\tcase CardIds.CondemnRank1_CondemnRank2Token:\r\n\t\tcase CardIds.CondemnRank1_CondemnRank3Token:\r\n\t\t\treturn CardIds.CondemnRank1;\r\n\t\tcase CardIds.WickedStabRank1_WickedStabRank2Token:\r\n\t\tcase CardIds.WickedStabRank1_WickedStabRank3Token:\r\n\t\t\treturn CardIds.WickedStabRank1;\r\n\t\tcase CardIds.LivingSeedRank1_LivingSeedRank2Token:\r\n\t\tcase CardIds.LivingSeedRank1_LivingSeedRank3Token:\r\n\t\t\treturn CardIds.LivingSeedRank1;\r\n\t\tcase CardIds.ConvictionRank1_ConvictionRank2Token:\r\n\t\tcase CardIds.ConvictionRank1_ConvictionRank3Token:\r\n\t\t\treturn CardIds.ConvictionRank1;\r\n\t\tcase CardIds.ConditioningRank1_ConditioningRank2Token:\r\n\t\tcase CardIds.ConditioningRank1_ConditioningRank3Token:\r\n\t\t\treturn CardIds.ConditioningRank1;\r\n\t\tcase CardIds.FuryRank1_FuryRank2Token:\r\n\t\tcase CardIds.FuryRank1_FuryRank3Token:\r\n\t\t\treturn CardIds.FuryRank1;\r\n\t\tcase CardIds.ImpSwarmRank1_ImpSwarmRank2Token:\r\n\t\tcase CardIds.ImpSwarmRank1_ImpSwarmRank3Token:\r\n\t\t\treturn CardIds.ImpSwarmRank1;\r\n\r\n\t\t// Transfer Student should be handled on a case by case basis\r\n\t}\r\n\r\n\tif (cardId.startsWith(CardIds.TransferStudent)) {\r\n\t\treturn CardIds.TransferStudent;\r\n\t}\r\n\r\n\treturn cardId;\r\n};\r\n"]}
|
|
@@ -8,3 +8,15 @@ export declare const duelsActivePool2UltraRare: CardIds[];
|
|
|
8
8
|
export declare const allDuelsTreasureCardIds: CardIds[];
|
|
9
9
|
export declare const allDuelsHeroes: CardIds[];
|
|
10
10
|
export declare const normalizeDuelsHeroCardId: (heroCardId: string) => string;
|
|
11
|
+
export declare const allDuelsSignatureTreasures: CardIds[];
|
|
12
|
+
export declare const duelsHeroConfigs: ({
|
|
13
|
+
hero: CardIds;
|
|
14
|
+
heroPowers: CardIds[];
|
|
15
|
+
signatureTreasures: CardIds[];
|
|
16
|
+
alternateHeroes?: undefined;
|
|
17
|
+
} | {
|
|
18
|
+
hero: CardIds;
|
|
19
|
+
alternateHeroes: CardIds[];
|
|
20
|
+
heroPowers: CardIds[];
|
|
21
|
+
signatureTreasures: CardIds[];
|
|
22
|
+
})[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.normalizeDuelsHeroCardId = exports.allDuelsHeroes = exports.allDuelsTreasureCardIds = exports.duelsActivePool2UltraRare = exports.duelsActivePool2 = exports.duelsActivePool1 = exports.duelsPassivePool2UltraRare = exports.duelsPassivePool2 = exports.duelsPassivePool1 = void 0;
|
|
3
|
+
exports.duelsHeroConfigs = exports.allDuelsSignatureTreasures = exports.normalizeDuelsHeroCardId = exports.allDuelsHeroes = exports.allDuelsTreasureCardIds = exports.duelsActivePool2UltraRare = exports.duelsActivePool2 = exports.duelsActivePool1 = exports.duelsPassivePool2UltraRare = exports.duelsPassivePool2 = exports.duelsPassivePool1 = void 0;
|
|
4
4
|
exports.duelsPassivePool1 = [
|
|
5
5
|
"PVPDR_SCH_Passive18",
|
|
6
6
|
"PVPDR_BAR_Passive02",
|
|
@@ -198,4 +198,267 @@ const normalizeDuelsHeroCardId = (heroCardId) => {
|
|
|
198
198
|
}
|
|
199
199
|
};
|
|
200
200
|
exports.normalizeDuelsHeroCardId = normalizeDuelsHeroCardId;
|
|
201
|
+
exports.allDuelsSignatureTreasures = [
|
|
202
|
+
"PVPDR_YOP_DemonHuntert2",
|
|
203
|
+
"PVPDR_YOP_DemonHuntert1",
|
|
204
|
+
"PVPDR_035",
|
|
205
|
+
"PVPDR_DMF_DemonHuntert1",
|
|
206
|
+
"PVPDR_SCH_DemonHuntert2",
|
|
207
|
+
"PVPDR_YOP_DruidT1",
|
|
208
|
+
"PVPDR_SCH_Druidt6",
|
|
209
|
+
"PVPDR_SCH_Druidt5",
|
|
210
|
+
"PVPDR_DMF_Druidt1",
|
|
211
|
+
"PVPDR_SCH_Druidt2",
|
|
212
|
+
"PVPDR_YOP_DruShaT1",
|
|
213
|
+
"PVPDR_SCH_Huntert2",
|
|
214
|
+
"PVPDR_YOP_HunterT2",
|
|
215
|
+
"PVPDR_YOP_HunterT1",
|
|
216
|
+
"PVPDR_036",
|
|
217
|
+
"PVPDR_DMF_Huntert2",
|
|
218
|
+
"PVPDR_YOP_DemHun",
|
|
219
|
+
"PVPDR_YOP_RogMagT1",
|
|
220
|
+
"PVPDR_042",
|
|
221
|
+
"PVPDR_YOP_MageT3",
|
|
222
|
+
"PVPDR_SCH_Maget5",
|
|
223
|
+
"PVPDR_SCH_Maget3",
|
|
224
|
+
"PVPDR_YOP_MageT1",
|
|
225
|
+
"PVPDR_DMF_Paladint2",
|
|
226
|
+
"PVPDR_YOP_PaladinT1",
|
|
227
|
+
"PVPDR_YOP_PaladinT3",
|
|
228
|
+
"PVPDR_DMF_Paladint1",
|
|
229
|
+
"PVPDR_SCH_Paladint1",
|
|
230
|
+
"PVPDR_YOP_WarPalT1",
|
|
231
|
+
"PVPDR_DMF_Priestt2",
|
|
232
|
+
"PVPDR_SCH_Priestt1",
|
|
233
|
+
"PVPDR_YOP_PriestT2",
|
|
234
|
+
"PVPDR_YOP_LocPriT1",
|
|
235
|
+
"PVPDR_DMF_Priestt1",
|
|
236
|
+
"PVPDR_YOP_PriestT1",
|
|
237
|
+
"PVPDR_SCH_Roguet1",
|
|
238
|
+
"PVPDR_DMF_Roguet2",
|
|
239
|
+
"PVPDR_SCH_Roguet2",
|
|
240
|
+
"PVPDR_YOP_RogueT1",
|
|
241
|
+
"PVPDR_DMF_Roguet1",
|
|
242
|
+
"PVPDR_YOP_ShamanT2",
|
|
243
|
+
"PVPDR_SCH_Shamant2",
|
|
244
|
+
"PVPDR_DMF_Shamant2",
|
|
245
|
+
"PVPDR_YOP_ShamanT1",
|
|
246
|
+
"PVPDR_DMF_Shamant1",
|
|
247
|
+
"PVPDR_SCH_Warlockt4",
|
|
248
|
+
"PVPDR_SCH_Warlockt5",
|
|
249
|
+
"PVPDR_DMF_Warlockt3",
|
|
250
|
+
"PVPDR_022",
|
|
251
|
+
"PVPDR_SCH_Warlockt2",
|
|
252
|
+
"PVPDR_SCH_Warriort1",
|
|
253
|
+
"PVPDR_DMF_Warriort2",
|
|
254
|
+
"PVPDR_DMF_Warriort1",
|
|
255
|
+
"PVPDR_YOP_WarriorT1",
|
|
256
|
+
"PVPDR_SCH_Warriort2",
|
|
257
|
+
"PVPDR_GUEST_Diablot3",
|
|
258
|
+
"PVPDR_GUEST_Diablot1",
|
|
259
|
+
"PVPDR_GUEST_Diablot2",
|
|
260
|
+
"PVPDR_GUEST_Diablot5",
|
|
261
|
+
"PVPDR_GUEST_Diablot4",
|
|
262
|
+
"PVPDR_GUEST_Diablot6s4",
|
|
263
|
+
"PVPDR_AV_Neutralt7",
|
|
264
|
+
"PVPDR_AV_Neutralt8",
|
|
265
|
+
"PVPDR_AV_Neutralt9",
|
|
266
|
+
"PVPDR_AV_Neutralt10",
|
|
267
|
+
"PVPDR_AV_Neutralt11",
|
|
268
|
+
"PVPDR_AV_Neutralt12",
|
|
269
|
+
"PVPDR_AV_Neutralt1",
|
|
270
|
+
"PVPDR_AV_Neutralt2",
|
|
271
|
+
"PVPDR_AV_Neutralt3",
|
|
272
|
+
"PVPDR_AV_Neutralt4",
|
|
273
|
+
"PVPDR_AV_Neutralt5",
|
|
274
|
+
"PVPDR_AV_Neutralt6",
|
|
275
|
+
];
|
|
276
|
+
exports.duelsHeroConfigs = [
|
|
277
|
+
{
|
|
278
|
+
hero: "PVPDR_Hero_Stelina",
|
|
279
|
+
heroPowers: [
|
|
280
|
+
"PVPDR_SCH_DemonHunterp1",
|
|
281
|
+
"PVPDR_DMF_DemonHunterp1",
|
|
282
|
+
"PVPDR_YOP_DemonHunterP1",
|
|
283
|
+
],
|
|
284
|
+
signatureTreasures: [
|
|
285
|
+
"PVPDR_SCH_DemonHuntert2",
|
|
286
|
+
"PVPDR_DMF_DemonHuntert1",
|
|
287
|
+
"PVPDR_035",
|
|
288
|
+
"PVPDR_YOP_DemonHuntert1",
|
|
289
|
+
"PVPDR_YOP_DemonHuntert2",
|
|
290
|
+
"PVPDR_YOP_DemHun",
|
|
291
|
+
],
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
hero: "PVPDR_Hero_Omu",
|
|
295
|
+
heroPowers: [
|
|
296
|
+
"PVPDR_SCH_Druidp3",
|
|
297
|
+
"PVPDR_DMF_Druidp1",
|
|
298
|
+
"PVPDR_YOP_DruidP1",
|
|
299
|
+
],
|
|
300
|
+
signatureTreasures: [
|
|
301
|
+
"PVPDR_SCH_Druidt2",
|
|
302
|
+
"PVPDR_DMF_Druidt1",
|
|
303
|
+
"PVPDR_SCH_Druidt6",
|
|
304
|
+
"PVPDR_SCH_Druidt5",
|
|
305
|
+
"PVPDR_YOP_DruidT1",
|
|
306
|
+
"PVPDR_YOP_DruShaT1",
|
|
307
|
+
],
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
hero: "PVPDR_Hero_Slate",
|
|
311
|
+
heroPowers: [
|
|
312
|
+
"PVPDR_SCH_Hunterp1",
|
|
313
|
+
"PVPDR_DMF_Hunterp1",
|
|
314
|
+
"PVPDR_YOP_HunterP1",
|
|
315
|
+
],
|
|
316
|
+
signatureTreasures: [
|
|
317
|
+
"PVPDR_036",
|
|
318
|
+
"PVPDR_SCH_Huntert2",
|
|
319
|
+
"PVPDR_DMF_Huntert2",
|
|
320
|
+
"PVPDR_YOP_HunterT1",
|
|
321
|
+
"PVPDR_YOP_HunterT2",
|
|
322
|
+
"PVPDR_YOP_DemHun",
|
|
323
|
+
],
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
hero: "PVPDR_Hero_Mozaki",
|
|
327
|
+
heroPowers: ["PVPDR_SCH_Magep3", "PVPDR_DMF_Magep1", "PVPDR_YOP_MageP1"],
|
|
328
|
+
signatureTreasures: [
|
|
329
|
+
"PVPDR_SCH_Maget3",
|
|
330
|
+
"PVPDR_042",
|
|
331
|
+
"PVPDR_SCH_Maget5",
|
|
332
|
+
"PVPDR_YOP_MageT3",
|
|
333
|
+
"PVPDR_YOP_MageT1",
|
|
334
|
+
"PVPDR_YOP_RogMagT1",
|
|
335
|
+
],
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
hero: "PVPDR_Hero_Turalyon",
|
|
339
|
+
heroPowers: [
|
|
340
|
+
"PVPDR_SCH_Paladinp1",
|
|
341
|
+
"PVPDR_DMF_Paladinp1",
|
|
342
|
+
"PVPDR_YOP_PaladinP1",
|
|
343
|
+
],
|
|
344
|
+
signatureTreasures: [
|
|
345
|
+
"PVPDR_SCH_Paladint1",
|
|
346
|
+
"PVPDR_DMF_Paladint1",
|
|
347
|
+
"PVPDR_DMF_Paladint2",
|
|
348
|
+
"PVPDR_YOP_PaladinT1",
|
|
349
|
+
"PVPDR_YOP_PaladinT3",
|
|
350
|
+
"PVPDR_YOP_WarPalT1",
|
|
351
|
+
],
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
hero: "PVPDR_Hero_Illucia",
|
|
355
|
+
heroPowers: ["PVPDR_SCH_Priestp1", "PVPDR_DMF_Priestp1", "PVPDR_YOP_PriestP1"],
|
|
356
|
+
signatureTreasures: [
|
|
357
|
+
"PVPDR_SCH_Priestt1",
|
|
358
|
+
"PVPDR_DMF_Priestt2",
|
|
359
|
+
"PVPDR_DMF_Priestt1",
|
|
360
|
+
"PVPDR_YOP_PriestT1",
|
|
361
|
+
"PVPDR_YOP_PriestT2",
|
|
362
|
+
"PVPDR_YOP_LocPriT1",
|
|
363
|
+
],
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
hero: "PVPDR_Hero_Lilian",
|
|
367
|
+
heroPowers: [
|
|
368
|
+
"PVPDR_SCH_Roguep1",
|
|
369
|
+
"PVPDR_DMF_Roguep1",
|
|
370
|
+
"PVPDR_YOP_RogueP1",
|
|
371
|
+
],
|
|
372
|
+
signatureTreasures: [
|
|
373
|
+
"PVPDR_SCH_Roguet2",
|
|
374
|
+
"PVPDR_DMF_Roguet1",
|
|
375
|
+
"PVPDR_DMF_Roguet2",
|
|
376
|
+
"PVPDR_SCH_Roguet1",
|
|
377
|
+
"PVPDR_YOP_RogueT1",
|
|
378
|
+
"PVPDR_YOP_RogMagT1",
|
|
379
|
+
],
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
hero: "PVPDR_Hero_Willow",
|
|
383
|
+
heroPowers: ["PVPDR_SCH_Warlockp2", "PVPDR_DMF_Warlockp1", "PVPDR_SCH_Warlockp3"],
|
|
384
|
+
signatureTreasures: [
|
|
385
|
+
"PVPDR_022",
|
|
386
|
+
"PVPDR_DMF_Warlockt3",
|
|
387
|
+
"PVPDR_SCH_Warlockt2",
|
|
388
|
+
"PVPDR_SCH_Warlockt5",
|
|
389
|
+
"PVPDR_SCH_Warlockt4",
|
|
390
|
+
"PVPDR_YOP_LocPriT1",
|
|
391
|
+
],
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
hero: "PVPDR_Hero_Diablo",
|
|
395
|
+
heroPowers: [
|
|
396
|
+
"PVPDR_GUEST_Diablop1",
|
|
397
|
+
"PVPDR_GUEST_Diablop2",
|
|
398
|
+
"PVPDR_GUEST_Diablop3",
|
|
399
|
+
],
|
|
400
|
+
signatureTreasures: [
|
|
401
|
+
"PVPDR_GUEST_Diablot1",
|
|
402
|
+
"PVPDR_GUEST_Diablot2",
|
|
403
|
+
"PVPDR_GUEST_Diablot3",
|
|
404
|
+
"PVPDR_GUEST_Diablot4",
|
|
405
|
+
"PVPDR_GUEST_Diablot5",
|
|
406
|
+
"PVPDR_GUEST_Diablot6",
|
|
407
|
+
],
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
hero: "PVPDR_Hero_Rattlegore",
|
|
411
|
+
heroPowers: ["PVPDR_SCH_Warriorp1", "PVPDR_DMF_Warriorp1", "PVPDR_YOP_WarriorP1"],
|
|
412
|
+
signatureTreasures: [
|
|
413
|
+
"PVPDR_SCH_Warriort1",
|
|
414
|
+
"PVPDR_DMF_Warriort1",
|
|
415
|
+
"PVPDR_DMF_Warriort2",
|
|
416
|
+
"PVPDR_YOP_WarriorT1",
|
|
417
|
+
"PVPDR_SCH_Warriort2",
|
|
418
|
+
"PVPDR_YOP_WarPalT1",
|
|
419
|
+
],
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
hero: "PVPDR_Hero_DrekThar",
|
|
423
|
+
alternateHeroes: [
|
|
424
|
+
"PVPDR_Hero_DrekTharv1",
|
|
425
|
+
"PVPDR_Hero_DrekTharv2",
|
|
426
|
+
"PVPDR_Hero_DrekTharv3",
|
|
427
|
+
"PVPDR_Hero_DrekTharv4",
|
|
428
|
+
"PVPDR_Hero_DrekTharv5",
|
|
429
|
+
],
|
|
430
|
+
heroPowers: [
|
|
431
|
+
"PVPDR_AV_Neutralp4",
|
|
432
|
+
"PVPDR_AV_Neutralp5",
|
|
433
|
+
"PVPDR_AV_Neutralp6",
|
|
434
|
+
],
|
|
435
|
+
signatureTreasures: [
|
|
436
|
+
"PVPDR_AV_Neutralt7",
|
|
437
|
+
"PVPDR_AV_Neutralt8",
|
|
438
|
+
"PVPDR_AV_Neutralt9",
|
|
439
|
+
"PVPDR_AV_Neutralt10",
|
|
440
|
+
"PVPDR_AV_Neutralt11",
|
|
441
|
+
"PVPDR_AV_Neutralt12",
|
|
442
|
+
],
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
hero: "PVPDR_Hero_Vanndar",
|
|
446
|
+
alternateHeroes: [
|
|
447
|
+
"PVPDR_Hero_Vanndarv1",
|
|
448
|
+
"PVPDR_Hero_Vanndarv2",
|
|
449
|
+
"PVPDR_Hero_Vanndarv3",
|
|
450
|
+
"PVPDR_Hero_Vanndarv4",
|
|
451
|
+
"PVPDR_Hero_Vanndarv5",
|
|
452
|
+
],
|
|
453
|
+
heroPowers: ["PVPDR_AV_Neutralp1", "PVPDR_AV_Neutralp2", "PVPDR_AV_Neutralp3"],
|
|
454
|
+
signatureTreasures: [
|
|
455
|
+
"PVPDR_AV_Neutralt1",
|
|
456
|
+
"PVPDR_AV_Neutralt2",
|
|
457
|
+
"PVPDR_AV_Neutralt3",
|
|
458
|
+
"PVPDR_AV_Neutralt4",
|
|
459
|
+
"PVPDR_AV_Neutralt5",
|
|
460
|
+
"PVPDR_AV_Neutralt6",
|
|
461
|
+
],
|
|
462
|
+
},
|
|
463
|
+
];
|
|
201
464
|
//# sourceMappingURL=duels-utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"duels-utils.js","sourceRoot":"","sources":["../../src/services/duels-utils.ts"],"names":[],"mappings":";;;AAEa,QAAA,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDhC,CAAC;AAEW,QAAA,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4ChC,CAAC;AAEW,QAAA,0BAA0B,GAAG;;;;;;;;CAQzC,CAAC;AAEW,QAAA,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2C/B,CAAC;AAEW,QAAA,gBAAgB,GAAG;;;;;;;;;;;;;;;;CAgB/B,CAAC;AAEW,QAAA,yBAAyB,GAAG;;;;;;;CAOxC,CAAC;AAEW,QAAA,uBAAuB,GAAG;IACtC,GAAG,yBAAiB;IACpB,GAAG,yBAAiB;IACpB,GAAG,kCAA0B;IAC7B,GAAG,wBAAgB;IACnB,GAAG,wBAAgB;IACnB,GAAG,iCAAyB;CAC5B,CAAC;AAEW,QAAA,cAAc,GAAG;;;;;;;;;;;;;CAa7B,CAAC;AAEK,MAAM,wBAAwB,GAAG,CAAC,UAAkB,EAAU,EAAE;IACtE,QAAQ,UAAU,EAAE;QACnB;YACC,OAAO,UAAU,CAAC;KACnB;AACF,CAAC,CAAC;AALW,QAAA,wBAAwB,4BAKnC","sourcesContent":["import { CardIds } from '../card-ids';\r\n\r\nexport const duelsPassivePool1 = [\r\n\tCardIds.AllShallServeTavernBrawl,\r\n\tCardIds.AllTogetherNowTavernBrawl,\r\n\tCardIds.ArcaneFluxTavernBrawl,\r\n\tCardIds.ArcaniteCrystalTavernBrawl,\r\n\tCardIds.ArcticArmorTavernBrawl,\r\n\tCardIds.BitterColdTavernBrawl,\r\n\tCardIds.BookOfWonders,\r\n\tCardIds.CannibalismTavernBrawl,\r\n\t// CardIds.ConduitOfTheStormsTavernBrawl,\r\n\tCardIds.CrystalGemTavernBrawl,\r\n\tCardIds.DivineIlluminationTavernBrawl,\r\n\tCardIds.DragonbloodTavernBrawl,\r\n\tCardIds.DragonAffinityTavernBrawl,\r\n\t// CardIds.EverChangingElixirTavernBrawl,\r\n\tCardIds.FirekeepersIdolTavernBrawl,\r\n\t// CardIds.FireshaperTavernBrawl,\r\n\tCardIds.FreezeSolidTavernBrawl,\r\n\tCardIds.FromTheSwampTavernBrawl,\r\n\tCardIds.GrommashsArmguardsTavernBrawl,\r\n\tCardIds.HoldTheLineTavernBrawl,\r\n\tCardIds.InspiringPresenceTavernBrawl,\r\n\tCardIds.InvigoratingLightTavernBrawl,\r\n\tCardIds.KindlingFlameTavernBrawl,\r\n\tCardIds.LegendaryLootTavernBrawl,\r\n\tCardIds.MendingPoolsTavernBrawl,\r\n\tCardIds.MysteriousTomeTavernBrawl,\r\n\tCardIds.NaturalForceTavernBrawl,\r\n\tCardIds.OpenTheDoorwaysTavernBrawl,\r\n\tCardIds.PillageTheFallenTavernBrawl,\r\n\tCardIds.PlaguebringerTavernBrawl,\r\n\tCardIds.PotionOfSparkingTavernBrawl,\r\n\tCardIds.RecyclingTavernBrawl,\r\n\t// CardIds.RhoninsScryingOrbTavernBrawl,\r\n\tCardIds.RighteousReservesTavernBrawl,\r\n\tCardIds.RingOfPhaseshiftingTavernBrawl,\r\n\tCardIds.RobeOfTheApprenticeTavernBrawl,\r\n\tCardIds.RobesOfShrinkingTavernBrawl,\r\n\tCardIds.RocketBackpacksTavernBrawl,\r\n\t// CardIds.ScatteredCaltropsTavernBrawl,\r\n\tCardIds.Shadowcasting101TavernBrawl,\r\n\tCardIds.SmallBackpacksTavernBrawl,\r\n\t// CardIds.SmallPouchesTavernBrawl,\r\n\tCardIds.StaffOfPainTavernBrawl,\r\n\tCardIds.StakingAClaimTavernBrawl,\r\n\tCardIds.StarvingTavernBrawl,\r\n\tCardIds.StickyFingersTavernBrawl,\r\n\tCardIds.TheFloorIsLavaTavernBrawl,\r\n\tCardIds.UnholyGiftTavernBrawl,\r\n\tCardIds.UnlockedPotential,\r\n\tCardIds.WitherTheWeakTavernBrawl,\r\n];\r\n\r\nexport const duelsPassivePool2 = [\r\n\tCardIds.AvengingArmamentsTavernBrawl,\r\n\tCardIds.BattleStanceTavernBrawl,\r\n\tCardIds.BattleTotem2,\r\n\t// CardIds.Caltrops,\r\n\tCardIds.BronzeSignetTavernBrawl,\r\n\tCardIds.CloakOfEmeraldDreamsTavernBrawl,\r\n\tCardIds.CorruptedFelstoneTavernBrawl,\r\n\tCardIds.DeathlyDeathTavernBrawl,\r\n\tCardIds.DisksOfLegend,\r\n\tCardIds.DoubleTime,\r\n\tCardIds.DraconicDreamTavernBrawl,\r\n\tCardIds.DragonboneRitualTavernBrawl,\r\n\tCardIds.EerieStoneTavernBrawl,\r\n\tCardIds.ElixirOfVigorTavernBrawl,\r\n\tCardIds.EmeraldGogglesTavernBrawl,\r\n\tCardIds.EnduranceTrainingTavernBrawl,\r\n\tCardIds.FlamesOfTheKirinTorTavernBrawl,\r\n\tCardIds.FlameWavesTavernBrawl,\r\n\tCardIds.GlacialDownpourTavernBrawl,\r\n\tCardIds.GreedyGainsTavernBrawl,\r\n\tCardIds.GuardianLightTavernBrawl,\r\n\tCardIds.HagathasEmbraceTavernBrawl,\r\n\tCardIds.HeavyArmorTavernBrawl,\r\n\tCardIds.IdolsOfEluneTavernBrawl,\r\n\tCardIds.ImpCredibleTrousersTavernBrawl,\r\n\tCardIds.IronRootsTavernBrawl,\r\n\tCardIds.KhadgarsScryingOrb,\r\n\tCardIds.MeekMasteryTavernBrawl,\r\n\tCardIds.MulchMadnessTavernBrawl,\r\n\tCardIds.MummyMagic,\r\n\tCardIds.OopsAllSpellsTavernBrawl,\r\n\tCardIds.OrbOfRevelationTavernBrawl,\r\n\tCardIds.PartyReplacementTavernBrawl,\r\n\tCardIds.RallyTheTroopsTavernBrawl,\r\n\tCardIds.RingOfBlackIceTavernBrawl,\r\n\tCardIds.RingOfRefreshmentTavernBrawl,\r\n\tCardIds.RunicHelmTavernBrawl,\r\n\tCardIds.ScepterOfSummoning,\r\n\tCardIds.SpecialDeliveryTavernBrawl,\r\n\tCardIds.SpreadingSaplingsTavernBrawl,\r\n\tCardIds.SunstridersCrownTavernBrawl,\r\n\tCardIds.TotemOfTheDead2,\r\n\tCardIds.UnstableMagicTavernBrawl,\r\n];\r\n\r\nexport const duelsPassivePool2UltraRare = [\r\n\tCardIds.BandOfBeesTavernBrawl,\r\n\tCardIds.CapturedFlag,\r\n\tCardIds.ExpeditedBurialTavernBrawl,\r\n\tCardIds.ManastormTavernBrawl,\r\n\tCardIds.MantleOfIgnitionTavernBrawl,\r\n\tCardIds.RobeOfTheMagi,\r\n\tCardIds.Stargazing,\r\n];\r\n\r\nexport const duelsActivePool1 = [\r\n\tCardIds.AmalgamateTavernBrawl,\r\n\tCardIds.AstralPortalTavernBrawl,\r\n\tCardIds.BeastlyBeautyTavernBrawl,\r\n\tCardIds.BubbaTavernBrawl,\r\n\tCardIds.ButchTavernBrawl,\r\n\tCardIds.BladeOfQueldelarTavernBrawl,\r\n\tCardIds.BloodMoonTavernBrawl,\r\n\tCardIds.ClockworkAssistantTavernBrawl,\r\n\tCardIds.CoinPouchTavernBrawl,\r\n\tCardIds.CreepyCurioTavernBrawl,\r\n\tCardIds.CrustyTheCrustaceanTavernBrawl,\r\n\tCardIds.Queldelar_HiltOfQueldelar,\r\n\tCardIds.Deathcharger,\r\n\tCardIds.Enrage,\r\n\tCardIds.GentlemansTopHat,\r\n\tCardIds.GoldenKobold,\r\n\tCardIds.GreedyPickaxeTavernBrawl,\r\n\tCardIds.HolyBookTavernBrawl,\r\n\tCardIds.HuntersInsightTavernBrawl,\r\n\tCardIds.JawsTavernBrawl,\r\n\tCardIds.LoyalHenchmanTavernBrawl,\r\n\tCardIds.LoyalSidekickTavernBrawl,\r\n\tCardIds.LoomingPresence,\r\n\tCardIds.MageArmorTavernBrawl,\r\n\tCardIds.MaskOfMimicryTavernBrawl,\r\n\tCardIds.MindpocalypseTavernBrawl,\r\n\tCardIds.MurlocHolmesTavernBrawl,\r\n\tCardIds.MutatingInjection,\r\n\tCardIds.NecroticPoisonTavernBrawl,\r\n\tCardIds.OldMilitiaHornTavernBrawl,\r\n\tCardIds.PartyPortalTavernBrawl2,\r\n\tCardIds.PrincessTavernBrawl,\r\n\tCardIds.PureColdTavernBrawl,\r\n\tCardIds.PuzzleBoxTavernBrawl,\r\n\tCardIds.RoyalGift,\r\n\tCardIds.SowTheSeedsTavernBrawl,\r\n\tCardIds.SpyglassTavernBrawl,\r\n\tCardIds.SuperchargeTavernBrawl,\r\n\tCardIds.SurlyMobTavernBrawl,\r\n\tCardIds.TheExorcisorTavernBrawl,\r\n\tCardIds.VampiricFangsToken,\r\n\tCardIds.WorshipperHeroic,\r\n];\r\n\r\nexport const duelsActivePool2 = [\r\n\tCardIds.ArchmageStaffTavernBrawl,\r\n\tCardIds.BagOfCoinsTavernBrawl,\r\n\tCardIds.BookOfTheDeadTavernBrawl,\r\n\tCardIds.GrimmerPatron,\r\n\tCardIds.HyperblasterTavernBrawl,\r\n\tCardIds.AncientReflectionsTavernBrawl,\r\n\tCardIds.BagOfStuffingTavernBrawl,\r\n\tCardIds.Questionquestionquestion_BlackSoulstoneTavernBrawl,\r\n\tCardIds.BladeOfTheBurningSun,\r\n\tCardIds.GnomishArmyKnife,\r\n\tCardIds.BananaSplitTavernBrawl,\r\n\tCardIds.CanopicJarsTavernBrawl,\r\n\tCardIds.PhaorisBlade,\r\n\tCardIds.StaffOfScales,\r\n\tCardIds.WandOfDisintegrationTavernBrawl,\r\n];\r\n\r\nexport const duelsActivePool2UltraRare = [\r\n\tCardIds.ChaosTheoryTavernBrawl,\r\n\tCardIds.OverpoweredTavernBrawl,\r\n\tCardIds.DreamgroveRing,\r\n\tCardIds.EmbersOfRagnarosTavernBrawl,\r\n\tCardIds.WaxRager,\r\n\tCardIds.WishTavernBrawl,\r\n];\r\n\r\nexport const allDuelsTreasureCardIds = [\r\n\t...duelsPassivePool1,\r\n\t...duelsPassivePool2,\r\n\t...duelsPassivePool2UltraRare,\r\n\t...duelsActivePool1,\r\n\t...duelsActivePool2,\r\n\t...duelsActivePool2UltraRare,\r\n];\r\n\r\nexport const allDuelsHeroes = [\r\n\tCardIds.MindrenderIlluciaTavernBrawl,\r\n\tCardIds.RattlegoreTavernBrawl,\r\n\tCardIds.TuralyonTheTenuredTavernBrawl,\r\n\tCardIds.StarStudentStelinaTavernBrawl,\r\n\tCardIds.ProfessorSlateTavernBrawl,\r\n\tCardIds.ForestWardenOmuTavernBrawl,\r\n\tCardIds.MozakiMasterDuelistTavernBrawl,\r\n\tCardIds.ArchwitchWillowTavernBrawl,\r\n\tCardIds.InstructorFireheartTavernBrawlToken,\r\n\tCardIds.InfiltratorLilianTavernBrawl,\r\n\tCardIds.VanndarStormpikeTavernBrawl,\r\n\tCardIds.DrektharTavernBrawl,\r\n];\r\n\r\nexport const normalizeDuelsHeroCardId = (heroCardId: string): string => {\r\n\tswitch (heroCardId) {\r\n\t\tdefault:\r\n\t\t\treturn heroCardId;\r\n\t}\r\n};\r\n"]}
|
|
1
|
+
{"version":3,"file":"duels-utils.js","sourceRoot":"","sources":["../../src/services/duels-utils.ts"],"names":[],"mappings":";;;AAEa,QAAA,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDhC,CAAC;AAEW,QAAA,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4ChC,CAAC;AAEW,QAAA,0BAA0B,GAAG;;;;;;;;CAQzC,CAAC;AAEW,QAAA,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2C/B,CAAC;AAEW,QAAA,gBAAgB,GAAG;;;;;;;;;;;;;;;;CAgB/B,CAAC;AAEW,QAAA,yBAAyB,GAAG;;;;;;;CAOxC,CAAC;AAEW,QAAA,uBAAuB,GAAG;IACtC,GAAG,yBAAiB;IACpB,GAAG,yBAAiB;IACpB,GAAG,kCAA0B;IAC7B,GAAG,wBAAgB;IACnB,GAAG,wBAAgB;IACnB,GAAG,iCAAyB;CAC5B,CAAC;AAEW,QAAA,cAAc,GAAG;;;;;;;;;;;;;CAa7B,CAAC;AAEK,MAAM,wBAAwB,GAAG,CAAC,UAAkB,EAAU,EAAE;IACtE,QAAQ,UAAU,EAAE;QACnB;YACC,OAAO,UAAU,CAAC;KACnB;AACF,CAAC,CAAC;AALW,QAAA,wBAAwB,4BAKnC;AAEW,QAAA,0BAA0B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4EzC,CAAC;AAIW,QAA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assivePool1 = [\r\n\tCardIds.AllShallServeTavernBrawl,\r\n\tCardIds.AllTogetherNowTavernBrawl,\r\n\tCardIds.ArcaneFluxTavernBrawl,\r\n\tCardIds.ArcaniteCrystalTavernBrawl,\r\n\tCardIds.ArcticArmorTavernBrawl,\r\n\tCardIds.BitterColdTavernBrawl,\r\n\tCardIds.BookOfWonders,\r\n\tCardIds.CannibalismTavernBrawl,\r\n\t// CardIds.ConduitOfTheStormsTavernBrawl,\r\n\tCardIds.CrystalGemTavernBrawl,\r\n\tCardIds.DivineIlluminationTavernBrawl,\r\n\tCardIds.DragonbloodTavernBrawl,\r\n\tCardIds.DragonAffinityTavernBrawl,\r\n\t// CardIds.EverChangingElixirTavernBrawl,\r\n\tCardIds.FirekeepersIdolTavernBrawl,\r\n\t// CardIds.FireshaperTavernBrawl,\r\n\tCardIds.FreezeSolidTavernBrawl,\r\n\tCardIds.FromTheSwampTavernBrawl,\r\n\tCardIds.GrommashsArmguardsTavernBrawl,\r\n\tCardIds.HoldTheLineTavernBrawl,\r\n\tCardIds.InspiringPresenceTavernBrawl,\r\n\tCardIds.InvigoratingLightTavernBrawl,\r\n\tCardIds.KindlingFlameTavernBrawl,\r\n\tCardIds.LegendaryLootTavernBrawl,\r\n\tCardIds.MendingPoolsTavernBrawl,\r\n\tCardIds.MysteriousTomeTavernBrawl,\r\n\tCardIds.NaturalForceTavernBrawl,\r\n\tCardIds.OpenTheDoorwaysTavernBrawl,\r\n\tCardIds.PillageTheFallenTavernBrawl,\r\n\tCardIds.PlaguebringerTavernBrawl,\r\n\tCardIds.PotionOfSparkingTavernBrawl,\r\n\tCardIds.RecyclingTavernBrawl,\r\n\t// CardIds.RhoninsScryingOrbTavernBrawl,\r\n\tCardIds.RighteousReservesTavernBrawl,\r\n\tCardIds.RingOfPhaseshiftingTavernBrawl,\r\n\tCardIds.RobeOfTheApprenticeTavernBrawl,\r\n\tCardIds.RobesOfShrinkingTavernBrawl,\r\n\tCardIds.RocketBackpacksTavernBrawl,\r\n\t// CardIds.ScatteredCaltropsTavernBrawl,\r\n\tCardIds.Shadowcasting101TavernBrawl,\r\n\tCardIds.SmallBackpacksTavernBrawl,\r\n\t// CardIds.SmallPouchesTavernBrawl,\r\n\tCardIds.StaffOfPainTavernBrawl,\r\n\tCardIds.StakingAClaimTavernBrawl,\r\n\tCardIds.StarvingTavernBrawl,\r\n\tCardIds.StickyFingersTavernBrawl,\r\n\tCardIds.TheFloorIsLavaTavernBrawl,\r\n\tCardIds.UnholyGiftTavernBrawl,\r\n\tCardIds.UnlockedPotential,\r\n\tCardIds.WitherTheWeakTavernBrawl,\r\n];\r\n\r\nexport const duelsPassivePool2 = [\r\n\tCardIds.AvengingArmamentsTavernBrawl,\r\n\tCardIds.BattleStanceTavernBrawl,\r\n\tCardIds.BattleTotem2,\r\n\t// CardIds.Caltrops,\r\n\tCardIds.BronzeSignetTavernBrawl,\r\n\tCardIds.CloakOfEmeraldDreamsTavernBrawl,\r\n\tCardIds.CorruptedFelstoneTavernBrawl,\r\n\tCardIds.DeathlyDeathTavernBrawl,\r\n\tCardIds.DisksOfLegend,\r\n\tCardIds.DoubleTime,\r\n\tCardIds.DraconicDreamTavernBrawl,\r\n\tCardIds.DragonboneRitualTavernBrawl,\r\n\tCardIds.EerieStoneTavernBrawl,\r\n\tCardIds.ElixirOfVigorTavernBrawl,\r\n\tCardIds.EmeraldGogglesTavernBrawl,\r\n\tCardIds.EnduranceTrainingTavernBrawl,\r\n\tCardIds.FlamesOfTheKirinTorTavernBrawl,\r\n\tCardIds.FlameWavesTavernBrawl,\r\n\tCardIds.GlacialDownpourTavernBrawl,\r\n\tCardIds.GreedyGainsTavernBrawl,\r\n\tCardIds.GuardianLightTavernBrawl,\r\n\tCardIds.HagathasEmbraceTavernBrawl,\r\n\tCardIds.HeavyArmorTavernBrawl,\r\n\tCardIds.IdolsOfEluneTavernBrawl,\r\n\tCardIds.ImpCredibleTrousersTavernBrawl,\r\n\tCardIds.IronRootsTavernBrawl,\r\n\tCardIds.KhadgarsScryingOrb,\r\n\tCardIds.MeekMasteryTavernBrawl,\r\n\tCardIds.MulchMadnessTavernBrawl,\r\n\tCardIds.MummyMagic,\r\n\tCardIds.OopsAllSpellsTavernBrawl,\r\n\tCardIds.OrbOfRevelationTavernBrawl,\r\n\tCardIds.PartyReplacementTavernBrawl,\r\n\tCardIds.RallyTheTroopsTavernBrawl,\r\n\tCardIds.RingOfBlackIceTavernBrawl,\r\n\tCardIds.RingOfRefreshmentTavernBrawl,\r\n\tCardIds.RunicHelmTavernBrawl,\r\n\tCardIds.ScepterOfSummoning,\r\n\tCardIds.SpecialDeliveryTavernBrawl,\r\n\tCardIds.SpreadingSaplingsTavernBrawl,\r\n\tCardIds.SunstridersCrownTavernBrawl,\r\n\tCardIds.TotemOfTheDead2,\r\n\tCardIds.UnstableMagicTavernBrawl,\r\n];\r\n\r\nexport const duelsPassivePool2UltraRare = [\r\n\tCardIds.BandOfBeesTavernBrawl,\r\n\tCardIds.CapturedFlag,\r\n\tCardIds.ExpeditedBurialTavernBrawl,\r\n\tCardIds.ManastormTavernBrawl,\r\n\tCardIds.MantleOfIgnitionTavernBrawl,\r\n\tCardIds.RobeOfTheMagi,\r\n\tCardIds.Stargazing,\r\n];\r\n\r\nexport const duelsActivePool1 = [\r\n\tCardIds.AmalgamateTavernBrawl,\r\n\tCardIds.AstralPortalTavernBrawl,\r\n\tCardIds.BeastlyBeautyTavernBrawl,\r\n\tCardIds.BubbaTavernBrawl,\r\n\tCardIds.ButchTavernBrawl,\r\n\tCardIds.BladeOfQueldelarTavernBrawl,\r\n\tCardIds.BloodMoonTavernBrawl,\r\n\tCardIds.ClockworkAssistantTavernBrawl,\r\n\tCardIds.CoinPouchTavernBrawl,\r\n\tCardIds.CreepyCurioTavernBrawl,\r\n\tCardIds.CrustyTheCrustaceanTavernBrawl,\r\n\tCardIds.Queldelar_HiltOfQueldelar,\r\n\tCardIds.Deathcharger,\r\n\tCardIds.Enrage,\r\n\tCardIds.GentlemansTopHat,\r\n\tCardIds.GoldenKobold,\r\n\tCardIds.GreedyPickaxeTavernBrawl,\r\n\tCardIds.HolyBookTavernBrawl,\r\n\tCardIds.HuntersInsightTavernBrawl,\r\n\tCardIds.JawsTavernBrawl,\r\n\tCardIds.LoyalHenchmanTavernBrawl,\r\n\tCardIds.LoyalSidekickTavernBrawl,\r\n\tCardIds.LoomingPresence,\r\n\tCardIds.MageArmorTavernBrawl,\r\n\tCardIds.MaskOfMimicryTavernBrawl,\r\n\tCardIds.MindpocalypseTavernBrawl,\r\n\tCardIds.MurlocHolmesTavernBrawl,\r\n\tCardIds.MutatingInjection,\r\n\tCardIds.NecroticPoisonTavernBrawl,\r\n\tCardIds.OldMilitiaHornTavernBrawl,\r\n\tCardIds.PartyPortalTavernBrawl2,\r\n\tCardIds.PrincessTavernBrawl,\r\n\tCardIds.PureColdTavernBrawl,\r\n\tCardIds.PuzzleBoxTavernBrawl,\r\n\tCardIds.RoyalGift,\r\n\tCardIds.SowTheSeedsTavernBrawl,\r\n\tCardIds.SpyglassTavernBrawl,\r\n\tCardIds.SuperchargeTavernBrawl,\r\n\tCardIds.SurlyMobTavernBrawl,\r\n\tCardIds.TheExorcisorTavernBrawl,\r\n\tCardIds.VampiricFangsToken,\r\n\tCardIds.WorshipperHeroic,\r\n];\r\n\r\nexport const duelsActivePool2 = [\r\n\tCardIds.ArchmageStaffTavernBrawl,\r\n\tCardIds.BagOfCoinsTavernBrawl,\r\n\tCardIds.BookOfTheDeadTavernBrawl,\r\n\tCardIds.GrimmerPatron,\r\n\tCardIds.HyperblasterTavernBrawl,\r\n\tCardIds.AncientReflectionsTavernBrawl,\r\n\tCardIds.BagOfStuffingTavernBrawl,\r\n\tCardIds.Questionquestionquestion_BlackSoulstoneTavernBrawl,\r\n\tCardIds.BladeOfTheBurningSun,\r\n\tCardIds.GnomishArmyKnife,\r\n\tCardIds.BananaSplitTavernBrawl,\r\n\tCardIds.CanopicJarsTavernBrawl,\r\n\tCardIds.PhaorisBlade,\r\n\tCardIds.StaffOfScales,\r\n\tCardIds.WandOfDisintegrationTavernBrawl,\r\n];\r\n\r\nexport const duelsActivePool2UltraRare = [\r\n\tCardIds.ChaosTheoryTavernBrawl,\r\n\tCardIds.OverpoweredTavernBrawl,\r\n\tCardIds.DreamgroveRing,\r\n\tCardIds.EmbersOfRagnarosTavernBrawl,\r\n\tCardIds.WaxRager,\r\n\tCardIds.WishTavernBrawl,\r\n];\r\n\r\nexport const allDuelsTreasureCardIds = [\r\n\t...duelsPassivePool1,\r\n\t...duelsPassivePool2,\r\n\t...duelsPassivePool2UltraRare,\r\n\t...duelsActivePool1,\r\n\t...duelsActivePool2,\r\n\t...duelsActivePool2UltraRare,\r\n];\r\n\r\nexport const allDuelsHeroes = [\r\n\tCardIds.MindrenderIlluciaTavernBrawl,\r\n\tCardIds.RattlegoreTavernBrawl,\r\n\tCardIds.TuralyonTheTenuredTavernBrawl,\r\n\tCardIds.StarStudentStelinaTavernBrawl,\r\n\tCardIds.ProfessorSlateTavernBrawl,\r\n\tCardIds.ForestWardenOmuTavernBrawl,\r\n\tCardIds.MozakiMasterDuelistTavernBrawl,\r\n\tCardIds.ArchwitchWillowTavernBrawl,\r\n\tCardIds.InstructorFireheartTavernBrawlToken,\r\n\tCardIds.InfiltratorLilianTavernBrawl,\r\n\tCardIds.VanndarStormpikeTavernBrawl,\r\n\tCardIds.DrektharTavernBrawl,\r\n];\r\n\r\nexport const normalizeDuelsHeroCardId = (heroCardId: string): string => {\r\n\tswitch (heroCardId) {\r\n\t\tdefault:\r\n\t\t\treturn heroCardId;\r\n\t}\r\n};\r\n\r\nexport const allDuelsSignatureTreasures = [\r\n\tCardIds.BladeOfQuickeningTavernBrawlToken,\r\n\tCardIds.BindingChainsTavernBrawlToken,\r\n\tCardIds.GiftOfTheLegionTavernBrawl,\r\n\tCardIds.MoargOutcastTavernBrawlToken,\r\n\tCardIds.SummoningRitualTavernBrawlToken,\r\n\tCardIds.AwakenedAncientTavernBrawl,\r\n\tCardIds.HerdingHornTavernBrawlToken,\r\n\tCardIds.MarvelousMyceliumTavernBrawlToken,\r\n\tCardIds.MoonbeastTavernBrawlToken,\r\n\tCardIds.WardensInsightTavernBrawlToken,\r\n\tCardIds.ZukaraTheWildTavernBrawl,\r\n\tCardIds.BonecrusherTavernBrawlToken,\r\n\tCardIds.CarrotOnAStickTavernBrawl,\r\n\tCardIds.DeathstriderTavernBrawl,\r\n\tCardIds.SlatesSyringeTavernBrawl,\r\n\tCardIds.StalkingPrideTavernBrawlToken,\r\n\tCardIds.TraktamerAelessaTavernBrawl,\r\n\tCardIds.BritzBlazebucketTavernBrawl,\r\n\tCardIds.ElementalLearningTavernBrawl,\r\n\tCardIds.EmbercasterTavernBrawl,\r\n\tCardIds.InfiniteArcaneTavernBrawlToken,\r\n\tCardIds.WandOfDuelingTavernBrawlToken,\r\n\tCardIds.YoggTasticTastiesTavernBrawl,\r\n\tCardIds.DrocomurchanicasTavernBrawlToken,\r\n\tCardIds.FavoredRacerTavernBrawl,\r\n\tCardIds.HumbleBlessingsTavernBrawl,\r\n\tCardIds.MenAtArmsTavernBrawlToken,\r\n\tCardIds.RoyalGreatswordTavernBrawlToken,\r\n\tCardIds.SuLeadfootTavernBrawl,\r\n\tCardIds.DropletOfInsanityTavernBrawlToken,\r\n\tCardIds.FracturedSpiritsTavernBrawlToken,\r\n\tCardIds.HeraldOfTheScaledOnesTavernBrawl,\r\n\tCardIds.JorasThuldoomTavernBrawl,\r\n\tCardIds.ScionOfTheDeepTavernBrawlToken,\r\n\tCardIds.ShadowWordVoidTavernBrawl,\r\n\tCardIds.AceInTheHoleTavernBrawlToken,\r\n\tCardIds.AcquiredAlliesTavernBrawlToken,\r\n\tCardIds.DeadlyWeapons101TavernBrawlToken,\r\n\tCardIds.GreenTortollanShellTavernBrawl,\r\n\tCardIds.NerubianPeddlerTavernBrawlToken,\r\n\tCardIds.ChaosStormTavernBrawl,\r\n\tCardIds.FluctuatingTotemTavernBrawlToken,\r\n\tCardIds.InvokeTheVoidTavernBrawlToken,\r\n\tCardIds.PayloadTotemSpecialistTavernBrawl,\r\n\tCardIds.TempestsFuryTavernBrawlToken,\r\n\tCardIds.Demonology101TavernBrawlToken,\r\n\tCardIds.DemonizerTavernBrawlToken,\r\n\tCardIds.GiftOfTheOldGodsTavernBrawlToken,\r\n\tCardIds.ImpishAidTavernBrawl,\r\n\tCardIds.KillmoxTheBanishedOneTavernBrawlToken,\r\n\tCardIds.AutoArmamentsTavernBrawlToken,\r\n\tCardIds.BrewsterTheBrutalTavernBrawlToken,\r\n\tCardIds.CollectorsIreTavernBrawlToken,\r\n\tCardIds.ScrapmetalDemolitionistTavernBrawl,\r\n\tCardIds.SpikedArmsTavernBrawlToken,\r\n\r\n\tCardIds.ApocalypseTavernBrawlToken,\r\n\tCardIds.ClawsOfTerrorTavernBrawlToken,\r\n\tCardIds.FireStompTavernBrawlToken,\r\n\tCardIds.HornsOfFlameTavernBrawlToken,\r\n\tCardIds.SoulstoneTrapTavernBrawlToken,\r\n\tCardIds.Questionquestionquestion_BlackSoulstoneTavernBrawl,\r\n\r\n\tCardIds.ValorousDisplayTavernBrawlToken,\r\n\tCardIds.ElementalChaosTavernBrawlToken,\r\n\tCardIds.PactOfTheLichTavernBrawlToken,\r\n\tCardIds.MagisterUnchainedTavernBrawlToken,\r\n\tCardIds.GiftOfTheHeartTavernBrawlToken,\r\n\tCardIds.ForTheHordeTavernBrawlToken,\r\n\tCardIds.ForgeInLightTavernBrawlToken,\r\n\tCardIds.SpymastersGambitTavernBrawlToken,\r\n\tCardIds.StalkersSuppliesTavernBrawlToken,\r\n\tCardIds.RendingAmbushTavernBrawlToken,\r\n\tCardIds.DevoutBlessingsTavernBrawlToken,\r\n\tCardIds.ForTheAllianceTavernBrawlToken,\r\n];\r\n\r\n// Maybe it's possible to extract this from the game files or memory somehow?\r\n// Since it doesn't change often it's ok to maintain it manually, at least for now\r\nexport const duelsHeroConfigs = [\r\n\t{\r\n\t\thero: CardIds.StarStudentStelinaTavernBrawl,\r\n\t\theroPowers: [\r\n\t\t\tCardIds.InfernalStrikeTavernBrawl,\r\n\t\t\tCardIds.OutlanderTavernBrawl,\r\n\t\t\tCardIds.IllidariStrikeTavernBrawl,\r\n\t\t],\r\n\t\tsignatureTreasures: [\r\n\t\t\tCardIds.SummoningRitualTavernBrawlToken,\r\n\t\t\tCardIds.MoargOutcastTavernBrawlToken,\r\n\t\t\tCardIds.GiftOfTheLegionTavernBrawl,\r\n\t\t\tCardIds.BindingChainsTavernBrawlToken,\r\n\t\t\tCardIds.BladeOfQuickeningTavernBrawlToken,\r\n\t\t\tCardIds.TraktamerAelessaTavernBrawl,\r\n\t\t],\r\n\t},\r\n\t{\r\n\t\thero: CardIds.ForestWardenOmuTavernBrawl,\r\n\t\theroPowers: [\r\n\t\t\tCardIds.NaturesGiftsTavernBrawl,\r\n\t\t\tCardIds.InvigoratingBloomTavernBrawl,\r\n\t\t\tCardIds.HarvestTimeTavernBrawl,\r\n\t\t],\r\n\t\tsignatureTreasures: [\r\n\t\t\tCardIds.WardensInsightTavernBrawlToken,\r\n\t\t\tCardIds.MoonbeastTavernBrawlToken,\r\n\t\t\tCardIds.HerdingHornTavernBrawlToken,\r\n\t\t\tCardIds.MarvelousMyceliumTavernBrawlToken,\r\n\t\t\tCardIds.AwakenedAncientTavernBrawl,\r\n\t\t\tCardIds.ZukaraTheWildTavernBrawl,\r\n\t\t],\r\n\t},\r\n\t{\r\n\t\thero: CardIds.ProfessorSlateTavernBrawl,\r\n\t\theroPowers: [\r\n\t\t\tCardIds.SurvivalTrainingTavernBrawl,\r\n\t\t\tCardIds.DeathGamesTavernBrawl,\r\n\t\t\tCardIds.SavageSecretsTavernBrawl,\r\n\t\t],\r\n\t\tsignatureTreasures: [\r\n\t\t\tCardIds.SlatesSyringeTavernBrawl,\r\n\t\t\tCardIds.BonecrusherTavernBrawlToken,\r\n\t\t\tCardIds.StalkingPrideTavernBrawlToken,\r\n\t\t\tCardIds.DeathstriderTavernBrawl,\r\n\t\t\tCardIds.CarrotOnAStickTavernBrawl,\r\n\t\t\tCardIds.TraktamerAelessaTavernBrawl,\r\n\t\t],\r\n\t},\r\n\t{\r\n\t\thero: CardIds.MozakiMasterDuelistTavernBrawl,\r\n\t\theroPowers: [CardIds.WyrmBoltTavernBrawl, CardIds.SecretStudiesTavernBrawl, CardIds.FrostShardsTavernBrawl],\r\n\t\tsignatureTreasures: [\r\n\t\t\tCardIds.WandOfDuelingTavernBrawlToken,\r\n\t\t\tCardIds.ElementalLearningTavernBrawl,\r\n\t\t\tCardIds.InfiniteArcaneTavernBrawlToken,\r\n\t\t\tCardIds.EmbercasterTavernBrawl,\r\n\t\t\tCardIds.YoggTasticTastiesTavernBrawl,\r\n\t\t\tCardIds.BritzBlazebucketTavernBrawl,\r\n\t\t],\r\n\t},\r\n\t{\r\n\t\thero: CardIds.TuralyonTheTenuredTavernBrawl,\r\n\t\theroPowers: [\r\n\t\t\tCardIds.FromGoldenLightTavernBrawl,\r\n\t\t\tCardIds.BringOnRecruitsTavernBrawl,\r\n\t\t\tCardIds.ModestAspirationsTavernBrawl,\r\n\t\t],\r\n\t\tsignatureTreasures: [\r\n\t\t\tCardIds.RoyalGreatswordTavernBrawlToken,\r\n\t\t\tCardIds.MenAtArmsTavernBrawlToken,\r\n\t\t\tCardIds.DrocomurchanicasTavernBrawlToken,\r\n\t\t\tCardIds.FavoredRacerTavernBrawl,\r\n\t\t\tCardIds.HumbleBlessingsTavernBrawl,\r\n\t\t\tCardIds.SuLeadfootTavernBrawl,\r\n\t\t],\r\n\t},\r\n\t{\r\n\t\thero: CardIds.MindrenderIlluciaTavernBrawl,\r\n\t\theroPowers: [CardIds.ShadowMendTavernBrawl, CardIds.MindTetherTavernBrawl, CardIds.CallOfMadnessTavernBrawl],\r\n\t\tsignatureTreasures: [\r\n\t\t\tCardIds.FracturedSpiritsTavernBrawlToken,\r\n\t\t\tCardIds.DropletOfInsanityTavernBrawlToken,\r\n\t\t\tCardIds.ScionOfTheDeepTavernBrawlToken,\r\n\t\t\tCardIds.ShadowWordVoidTavernBrawl,\r\n\t\t\tCardIds.HeraldOfTheScaledOnesTavernBrawl,\r\n\t\t\tCardIds.JorasThuldoomTavernBrawl,\r\n\t\t],\r\n\t},\r\n\t{\r\n\t\thero: CardIds.InfiltratorLilianTavernBrawl,\r\n\t\theroPowers: [\r\n\t\t\tCardIds.RoguishManeuversTavernBrawl,\r\n\t\t\tCardIds.ConnectionsTavernBrawl,\r\n\t\t\tCardIds.VileConcoctionTavernBrawl,\r\n\t\t],\r\n\t\tsignatureTreasures: [\r\n\t\t\tCardIds.DeadlyWeapons101TavernBrawlToken,\r\n\t\t\tCardIds.NerubianPeddlerTavernBrawlToken,\r\n\t\t\tCardIds.AcquiredAlliesTavernBrawlToken,\r\n\t\t\tCardIds.AceInTheHoleTavernBrawlToken,\r\n\t\t\tCardIds.GreenTortollanShellTavernBrawl,\r\n\t\t\tCardIds.BritzBlazebucketTavernBrawl,\r\n\t\t],\r\n\t},\r\n\t{\r\n\t\thero: CardIds.ArchwitchWillowTavernBrawl,\r\n\t\theroPowers: [CardIds.DarkArtsTavernBrawl, CardIds.DemonBloodTavernBrawl, CardIds.SoulcialStudiesTavernBrawl],\r\n\t\tsignatureTreasures: [\r\n\t\t\tCardIds.ImpishAidTavernBrawl,\r\n\t\t\tCardIds.GiftOfTheOldGodsTavernBrawlToken,\r\n\t\t\tCardIds.KillmoxTheBanishedOneTavernBrawlToken,\r\n\t\t\tCardIds.DemonizerTavernBrawlToken,\r\n\t\t\tCardIds.Demonology101TavernBrawlToken,\r\n\t\t\tCardIds.JorasThuldoomTavernBrawl,\r\n\t\t],\r\n\t},\r\n\t{\r\n\t\thero: CardIds.DiabloTavernBrawl,\r\n\t\theroPowers: [\r\n\t\t\tCardIds.DoomChargeTavernBrawl,\r\n\t\t\tCardIds.PrimalPowerTavernBrawl,\r\n\t\t\tCardIds.DemonicTransformationTavernBrawl,\r\n\t\t],\r\n\t\tsignatureTreasures: [\r\n\t\t\tCardIds.ClawsOfTerrorTavernBrawlToken,\r\n\t\t\tCardIds.FireStompTavernBrawlToken,\r\n\t\t\tCardIds.ApocalypseTavernBrawlToken,\r\n\t\t\tCardIds.SoulstoneTrapTavernBrawlToken,\r\n\t\t\tCardIds.HornsOfFlameTavernBrawlToken,\r\n\t\t\tCardIds.QuestionquestionquestionTavernBrawlToken,\r\n\t\t],\r\n\t},\r\n\t{\r\n\t\thero: CardIds.RattlegoreTavernBrawl,\r\n\t\theroPowers: [CardIds.NoGutsNoGloryTavernBrawl, CardIds.BruisingTavernBrawl, CardIds.MagneticMinesTavernBrawl],\r\n\t\tsignatureTreasures: [\r\n\t\t\tCardIds.AutoArmamentsTavernBrawlToken,\r\n\t\t\tCardIds.CollectorsIreTavernBrawlToken,\r\n\t\t\tCardIds.BrewsterTheBrutalTavernBrawlToken,\r\n\t\t\tCardIds.ScrapmetalDemolitionistTavernBrawl,\r\n\t\t\tCardIds.SpikedArmsTavernBrawlToken,\r\n\t\t\tCardIds.SuLeadfootTavernBrawl,\r\n\t\t],\r\n\t},\r\n\t{\r\n\t\thero: CardIds.DrektharTavernBrawl,\r\n\t\talternateHeroes: [\r\n\t\t\tCardIds.Drekthar_DrektharTavernBrawl1,\r\n\t\t\tCardIds.Drekthar_DrektharTavernBrawl2,\r\n\t\t\tCardIds.Drekthar_DrektharTavernBrawl3,\r\n\t\t\tCardIds.Drekthar_DrektharTavernBrawl4,\r\n\t\t\tCardIds.Drekthar_DrektharTavernBrawl5,\r\n\t\t],\r\n\t\theroPowers: [\r\n\t\t\tCardIds.WarmastersFrenzyTavernBrawl,\r\n\t\t\tCardIds.HarnessTheElementsTavernBrawl,\r\n\t\t\tCardIds.WarCommandsTavernBrawl,\r\n\t\t],\r\n\t\tsignatureTreasures: [\r\n\t\t\tCardIds.ValorousDisplayTavernBrawlToken,\r\n\t\t\tCardIds.ElementalChaosTavernBrawlToken,\r\n\t\t\tCardIds.PactOfTheLichTavernBrawlToken,\r\n\t\t\tCardIds.MagisterUnchainedTavernBrawlToken,\r\n\t\t\tCardIds.GiftOfTheHeartTavernBrawlToken,\r\n\t\t\tCardIds.ForTheHordeTavernBrawlToken,\r\n\t\t],\r\n\t},\r\n\t{\r\n\t\thero: CardIds.VanndarStormpikeTavernBrawl,\r\n\t\talternateHeroes: [\r\n\t\t\tCardIds.VanndarStormpike_VanndarStormpikeTavernBrawl1,\r\n\t\t\tCardIds.VanndarStormpike_VanndarStormpikeTavernBrawl2,\r\n\t\t\tCardIds.VanndarStormpike_VanndarStormpikeTavernBrawl3,\r\n\t\t\tCardIds.VanndarStormpike_VanndarStormpikeTavernBrawl4,\r\n\t\t\tCardIds.VanndarStormpike_VanndarStormpikeTavernBrawl5,\r\n\t\t],\r\n\t\theroPowers: [CardIds.PromoteTavernBrawl, CardIds.SendInTheScoutTavernBrawl, CardIds.BattleTacticsTavernBrawl],\r\n\t\tsignatureTreasures: [\r\n\t\t\tCardIds.ForgeInLightTavernBrawlToken,\r\n\t\t\tCardIds.SpymastersGambitTavernBrawlToken,\r\n\t\t\tCardIds.StalkersSuppliesTavernBrawlToken,\r\n\t\t\tCardIds.RendingAmbushTavernBrawlToken,\r\n\t\t\tCardIds.DevoutBlessingsTavernBrawlToken,\r\n\t\t\tCardIds.ForTheAllianceTavernBrawlToken,\r\n\t\t],\r\n\t},\r\n];\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hs-utils.js","sourceRoot":"","sources":["../../src/services/hs-utils.ts"],"names":[],"mappings":";;;AAEA,8CAA2C;AAGpC,MAAM,YAAY,GAAG,CAAC,MAAkB,EAAoB,EAAE;IACpE,QAAQ,MAAM,EAAE;QACf,KAAK,uBAAU,CAAC,WAAW;YAC1B,OAAO,UAAU,CAAC;QACnB,KAAK,uBAAU,CAAC,UAAU;YACzB,OAAO,SAAS,CAAC;QAClB,KAAK,uBAAU,CAAC,OAAO,CAAC;QACxB;YACC,OAAO,MAAM,CAAC;KACf;AACF,CAAC,C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I,IAAI,CAAC,SAAS,EAAE;QACnB,OAAO,IAAI,CAAC,SAAS,CAAC;KACtB;IAED,IAAI,IAAI,CAAC,wBAAwB,EAAE;QAClC,MAAM,UAAU,GAAG,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QAC5E,OAAO,MAAA,UAAU,CAAC,SAAS,mCAAI,CAAC,CAAC;KACjC;IAED,IAAI,IAAI,CAAC,yBAAyB,EAAE;QACnC,MAAM,WAAW,GAAG,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;QAC9E,OAAO,MAAA,WAAW,CAAC,SAAS,mCAAI,CAAC,CAAC;KAClC;IAED,OAAO,CAAC,CAAC;AACV,CAAC,CAAC;AAhBW,QAAA,qBAAqB,yBAgBhC","sourcesContent":["import { GameFormatString } from '../enums/game-format';\r\nimport { ReferenceCard } from '../models/reference-cards/reference-card';\r\nimport { GameFormat } from '../public-api';\r\nimport { AllCardsService } from './all-cards.service';\r\n\r\nexport const formatFormat = (format: GameFormat): GameFormatString => {\r\n\tswitch (format) {\r\n\t\tcase GameFormat.FT_STANDARD:\r\n\t\t\treturn 'standard';\r\n\t\tcase GameFormat.FT_CLASSIC:\r\n\t\t\treturn 'classic';\r\n\t\tcase GameFormat.FT_WILD:\r\n\t\tdefault:\r\n\t\t\treturn 'wild';\r\n\t}\r\n};\r\n\r\nexport const isBattlegroundsCard = (card: ReferenceCard): boolean => {\r\n\treturn !!card.techLevel || !!card.battlegroundsNormalDbfId || !!card.battlegroundsPremiumDbfId;\r\n};\r\n\r\nexport const getEffectiveTechLevel = (card: ReferenceCard, allCards: AllCardsService): number => {\r\n\tif (card.techLevel) {\r\n\t\treturn card.techLevel;\r\n\t}\r\n\r\n\tif (card.battlegroundsNormalDbfId) {\r\n\t\tconst normalCard = allCards.getCardFromDbfId(card.battlegroundsNormalDbfId);\r\n\t\treturn normalCard.techLevel ?? 1;\r\n\t}\r\n\r\n\tif (card.battlegroundsPremiumDbfId) {\r\n\t\tconst premiumCard = allCards.getCardFromDbfId(card.battlegroundsPremiumDbfId);\r\n\t\treturn premiumCard.techLevel ?? 1;\r\n\t}\r\n\r\n\treturn 1;\r\n};\r\n"]}
|