@firestone-hs/reference-data 0.1.202 → 0.1.203
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,3 +1,4 @@
|
|
|
1
|
+
import { CardIds } from 'src/card-ids';
|
|
1
2
|
import { GameFormatString } from '../enums/game-format';
|
|
2
3
|
import { ReferenceCard } from '../models/reference-cards/reference-card';
|
|
3
4
|
import { GameFormat } from '../public-api';
|
|
@@ -5,3 +6,4 @@ import { AllCardsService } from './all-cards.service';
|
|
|
5
6
|
export declare const formatFormat: (format: GameFormat) => GameFormatString;
|
|
6
7
|
export declare const isBattlegroundsCard: (card: ReferenceCard) => boolean;
|
|
7
8
|
export declare const getEffectiveTechLevel: (card: ReferenceCard, allCards: AllCardsService) => number;
|
|
9
|
+
export declare const COIN_IDS: CardIds[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getEffectiveTechLevel = exports.isBattlegroundsCard = exports.formatFormat = void 0;
|
|
3
|
+
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) {
|
|
@@ -34,4 +34,20 @@ const getEffectiveTechLevel = (card, allCards) => {
|
|
|
34
34
|
return 1;
|
|
35
35
|
};
|
|
36
36
|
exports.getEffectiveTechLevel = getEffectiveTechLevel;
|
|
37
|
+
exports.COIN_IDS = [
|
|
38
|
+
"GAME_005",
|
|
39
|
+
"DMF_COIN1",
|
|
40
|
+
"DMF_COIN2",
|
|
41
|
+
"BAR_COIN1",
|
|
42
|
+
"BAR_COIN2",
|
|
43
|
+
"BAR_COIN3",
|
|
44
|
+
"SW_COIN1",
|
|
45
|
+
"SW_COIN2",
|
|
46
|
+
"BT_COIN",
|
|
47
|
+
"DRG_COIN",
|
|
48
|
+
"ULD_COIN",
|
|
49
|
+
"DAL_COIN",
|
|
50
|
+
"AV_COIN1",
|
|
51
|
+
"AV_COIN2",
|
|
52
|
+
];
|
|
37
53
|
//# sourceMappingURL=hs-utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hs-utils.js","sourceRoot":"","sources":["../../src/services/hs-utils.ts"],"names":[],"mappings":";;;
|
|
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;;;;;;;;;;;;;;;CAevB,CAAC","sourcesContent":["import { CardIds } from 'src/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.TheCoin1,\r\n\tCardIds.TheCoin2,\r\n\tCardIds.TheCoin3,\r\n\tCardIds.TheCoin4,\r\n\tCardIds.TheCoin5,\r\n\tCardIds.TheCoin6,\r\n\tCardIds.TheCoin7,\r\n\tCardIds.TheCoin8,\r\n\tCardIds.TheCoin9,\r\n\tCardIds.TheCoin10,\r\n\tCardIds.TheCoin11,\r\n\tCardIds.TheCoin12,\r\n\tCardIds.TheCoin13,\r\n];\r\n"]}
|