@firestone-hs/reference-data 1.0.18 → 1.0.21

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,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LIBRAM_IDS = exports.WATCH_POST_IDS = exports.COIN_IDS = exports.getEffectiveTechLevel = exports.isBattlegroundsCard = exports.formatFormat = void 0;
3
+ exports.RELIC_IDS = exports.LIBRAM_IDS = exports.WATCH_POST_IDS = exports.COIN_IDS = exports.getEffectiveTechLevel = exports.isBattlegroundsCard = exports.formatFormat = void 0;
4
4
  const public_api_1 = require("../public-api");
5
5
  const formatFormat = (format) => {
6
6
  switch (format) {
@@ -66,4 +66,5 @@ exports.LIBRAM_IDS = [
66
66
  "Story_04_LibramofHoliness",
67
67
  "Story_04_LibramofCompassion",
68
68
  ];
69
+ exports.RELIC_IDS = ["REV_508", "REV_834", "REV_943"];
69
70
  //# sourceMappingURL=hs-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hs-utils.js","sourceRoot":"","sources":["../../src/services/hs-utils.ts"],"names":[],"mappings":";;;AAGA,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,CAAC;AAVW,QAAA,YAAY,gBAUvB;AAEK,MAAM,mBAAmB,GAAG,CAAC,IAAmB,EAAW,EAAE;IACnE,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC,IAAI,CAAC,wBAAwB,IAAI,CAAC,CAAC,IAAI,CAAC,yBAAyB,CAAC;AAChG,CAAC,CAAC;AAFW,QAAA,mBAAmB,uBAE9B;AAEK,MAAM,qBAAqB,GAAG,CAAC,IAAmB,EAAE,QAAyB,EAAU,EAAE;;IAC/F,IAAI,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,aAAO,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,aAAO,WAAW,CAAC,SAAS,mCAAI,CAAC,CAAC;KAClC;IAED,OAAO,CAAC,CAAC;AACV,CAAC,CAAC;AAhBW,QAAA,qBAAqB,yBAgBhC;AAEW,QAAA,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;CAmBvB,CAAC;AAEW,QAAA,cAAc,GAAG,iCAA6E,CAAC;AAE/F,QAAA,UAAU,GAAG;;;;;;;;;;CAUzB,CAAC","sourcesContent":["import { CardIds } from '../card-ids';\r\nimport { 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\r\nexport const COIN_IDS = [\r\n\tCardIds.TheCoinCore,\r\n\tCardIds.TheCoin_AV_COIN1,\r\n\tCardIds.TheCoin_AV_COIN2,\r\n\tCardIds.TheCoin_BAR_COIN1,\r\n\tCardIds.TheCoin_BAR_COIN2,\r\n\tCardIds.TheCoin_BAR_COIN3,\r\n\tCardIds.TheCoin_BT_COIN,\r\n\tCardIds.TheCoin_DAL_COIN,\r\n\tCardIds.TheCoin_DMF_COIN1,\r\n\tCardIds.TheCoin_DMF_COIN2,\r\n\tCardIds.TheCoin_DRG_COIN,\r\n\tCardIds.TheCoin_SW_COIN1,\r\n\tCardIds.TheCoin_SW_COIN2,\r\n\tCardIds.TheCoin_TSC_COIN1,\r\n\tCardIds.TheCoin_TSC_COIN2,\r\n\tCardIds.TheCoin_ULD_COIN,\r\n\tCardIds.TheCoin_REV_COIN1,\r\n\tCardIds.TheCoin_REV_COIN2,\r\n];\r\n\r\nexport const WATCH_POST_IDS = [CardIds.FarWatchPost, CardIds.MorshanWatchPost, CardIds.CrossroadsWatchPost];\r\n\r\nexport const LIBRAM_IDS = [\r\n\tCardIds.LibramOfJustice_BT_011,\r\n\tCardIds.LibramOfJustice_Story_04_LibramofJustice,\r\n\tCardIds.LibramOfHope,\r\n\tCardIds.LibramOfWisdom_BT_025,\r\n\tCardIds.LibramOfWisdom_Story_01_LibramofWisdom,\r\n\tCardIds.LibramOfJudgment,\r\n\tCardIds.LibramOfJudgment_LibramOfJudgmentToken,\r\n\tCardIds.LibramOfHoliness,\r\n\tCardIds.LibramOfCompassion,\r\n];\r\n"]}
1
+ {"version":3,"file":"hs-utils.js","sourceRoot":"","sources":["../../src/services/hs-utils.ts"],"names":[],"mappings":";;;AAGA,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,CAAC;AAVW,QAAA,YAAY,gBAUvB;AAEK,MAAM,mBAAmB,GAAG,CAAC,IAAmB,EAAW,EAAE;IACnE,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC,IAAI,CAAC,wBAAwB,IAAI,CAAC,CAAC,IAAI,CAAC,yBAAyB,CAAC;AAChG,CAAC,CAAC;AAFW,QAAA,mBAAmB,uBAE9B;AAEK,MAAM,qBAAqB,GAAG,CAAC,IAAmB,EAAE,QAAyB,EAAU,EAAE;;IAC/F,IAAI,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,aAAO,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,aAAO,WAAW,CAAC,SAAS,mCAAI,CAAC,CAAC;KAClC;IAED,OAAO,CAAC,CAAC;AACV,CAAC,CAAC;AAhBW,QAAA,qBAAqB,yBAgBhC;AAEW,QAAA,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;CAmBvB,CAAC;AAEW,QAAA,cAAc,GAAG,iCAA6E,CAAC;AAE/F,QAAA,UAAU,GAAG;;;;;;;;;;CAUzB,CAAC;AAEW,QAAA,SAAS,GAAG,iCAAgF,CAAC","sourcesContent":["import { CardIds } from '../card-ids';\r\nimport { 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\r\nexport const COIN_IDS = [\r\n\tCardIds.TheCoinCore,\r\n\tCardIds.TheCoin_AV_COIN1,\r\n\tCardIds.TheCoin_AV_COIN2,\r\n\tCardIds.TheCoin_BAR_COIN1,\r\n\tCardIds.TheCoin_BAR_COIN2,\r\n\tCardIds.TheCoin_BAR_COIN3,\r\n\tCardIds.TheCoin_BT_COIN,\r\n\tCardIds.TheCoin_DAL_COIN,\r\n\tCardIds.TheCoin_DMF_COIN1,\r\n\tCardIds.TheCoin_DMF_COIN2,\r\n\tCardIds.TheCoin_DRG_COIN,\r\n\tCardIds.TheCoin_SW_COIN1,\r\n\tCardIds.TheCoin_SW_COIN2,\r\n\tCardIds.TheCoin_TSC_COIN1,\r\n\tCardIds.TheCoin_TSC_COIN2,\r\n\tCardIds.TheCoin_ULD_COIN,\r\n\tCardIds.TheCoin_REV_COIN1,\r\n\tCardIds.TheCoin_REV_COIN2,\r\n];\r\n\r\nexport const WATCH_POST_IDS = [CardIds.FarWatchPost, CardIds.MorshanWatchPost, CardIds.CrossroadsWatchPost];\r\n\r\nexport const LIBRAM_IDS = [\r\n\tCardIds.LibramOfJustice_BT_011,\r\n\tCardIds.LibramOfJustice_Story_04_LibramofJustice,\r\n\tCardIds.LibramOfHope,\r\n\tCardIds.LibramOfWisdom_BT_025,\r\n\tCardIds.LibramOfWisdom_Story_01_LibramofWisdom,\r\n\tCardIds.LibramOfJudgment,\r\n\tCardIds.LibramOfJudgment_LibramOfJudgmentToken,\r\n\tCardIds.LibramOfHoliness,\r\n\tCardIds.LibramOfCompassion,\r\n];\r\n\r\nexport const RELIC_IDS = [CardIds.RelicOfDimensions, CardIds.RelicOfExtinction, CardIds.RelicOfPhantasms];\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestone-hs/reference-data",
3
- "version": "1.0.18",
3
+ "version": "1.0.21",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "lint": "eslint --color --fix --ext .ts .",