@firestone-hs/reference-data 1.0.60 → 1.0.62

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.
@@ -47,3 +47,4 @@ export * from './services/all-cards.service';
47
47
  export * from './services/bgs-utils';
48
48
  export * from './services/duels-utils';
49
49
  export * from './services/hs-utils';
50
+ export * from './services/mercs-utils';
@@ -59,4 +59,5 @@ __exportStar(require("./services/all-cards.service"), exports);
59
59
  __exportStar(require("./services/bgs-utils"), exports);
60
60
  __exportStar(require("./services/duels-utils"), exports);
61
61
  __exportStar(require("./services/hs-utils"), exports);
62
+ __exportStar(require("./services/mercs-utils"), exports);
62
63
  //# sourceMappingURL=public-api.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,6CAA2B;AAC3B,qDAAmC;AACnC,sDAAoC;AACpC,gDAA8B;AAC9B,uDAAqC;AACrC,qDAAmC;AACnC,sDAAoC;AACpC,mDAAiC;AACjC,iEAA+C;AAC/C,oDAAkC;AAClC,sDAAoC;AACpC,uDAAqC;AACrC,oEAAkD;AAClD,sDAAoC;AACpC,oDAAkC;AAClC,oDAAkC;AAClC,iDAA+B;AAC/B,wEAAsD;AACtD,+DAA6C;AAC7C,6DAA2C;AAC3C,oDAAkC;AAClC,mDAAiC;AACjC,4DAA0C;AAC1C,oDAAkC;AAClC,0DAAwC;AACxC,uDAAqC;AACrC,+CAA6B;AAC7B,2DAAyC;AACzC,4DAA0C;AAC1C,sDAAoC;AACpC,0DAAwC;AACxC,sDAAoC;AACpC,gDAA8B;AAC9B,uDAAqC;AACrC,+CAA6B;AAC7B,mDAAiC;AACjC,sDAAoC;AACpC,+DAA6C;AAC7C,+CAA6B;AAC7B,iDAA+B;AAC/B,uEAAqD;AACrD,0EAAwD;AACxD,kFAAgE;AAChE,8EAA4D;AAC5D,wDAAsC;AACtC,+DAA6C;AAC7C,uDAAqC;AACrC,yDAAuC;AACvC,sDAAoC","sourcesContent":["/*\r\n * Public API Surface of reference-data\r\n */\r\n\r\nexport * from './card-ids';\r\nexport * from './enums/block-type';\r\nexport * from './enums/bnet-region';\r\nexport * from './enums/board';\r\nexport * from './enums/booster-type';\r\nexport * from './enums/card-class';\r\nexport * from './enums/card-rarity';\r\nexport * from './enums/card-set';\r\nexport * from './enums/card-text-builder-type';\r\nexport * from './enums/card-type';\r\nexport * from './enums/choice-type';\r\nexport * from './enums/dk-rune-type';\r\nexport * from './enums/dungeon-crawl-option-type';\r\nexport * from './enums/game-format';\r\nexport * from './enums/game-tags';\r\nexport * from './enums/game-type';\r\nexport * from './enums/locale';\r\nexport * from './enums/mercenaries-bounty-difficulty';\r\nexport * from './enums/mercenaries-map-type';\r\nexport * from './enums/mercenary-selector';\r\nexport * from './enums/meta-tags';\r\nexport * from './enums/mulligan';\r\nexport * from './enums/multi-class-group';\r\nexport * from './enums/playstate';\r\nexport * from './enums/quest-pool-type';\r\nexport * from './enums/quest-status';\r\nexport * from './enums/race';\r\nexport * from './enums/reward-item-type';\r\nexport * from './enums/reward-track-type';\r\nexport * from './enums/reward-type';\r\nexport * from './enums/scenario-groups';\r\nexport * from './enums/scenario-id';\r\nexport * from './enums/scene';\r\nexport * from './enums/spell-school';\r\nexport * from './enums/step';\r\nexport * from './enums/tag-role';\r\nexport * from './enums/task-status';\r\nexport * from './enums/village-visitor-type';\r\nexport * from './enums/zone';\r\nexport * from './models/quest';\r\nexport * from './models/reference-cards/rarity.type';\r\nexport * from './models/reference-cards/reference-card';\r\nexport * from './models/reference-cards/reference-player-class';\r\nexport * from './models/reference-cards/related-cards-data';\r\nexport * from './secondary-race-tags';\r\nexport * from './services/all-cards.service';\r\nexport * from './services/bgs-utils';\r\nexport * from './services/duels-utils';\r\nexport * from './services/hs-utils';\r\n// export * from './services/mercs-utils';\r\n"]}
1
+ {"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,6CAA2B;AAC3B,qDAAmC;AACnC,sDAAoC;AACpC,gDAA8B;AAC9B,uDAAqC;AACrC,qDAAmC;AACnC,sDAAoC;AACpC,mDAAiC;AACjC,iEAA+C;AAC/C,oDAAkC;AAClC,sDAAoC;AACpC,uDAAqC;AACrC,oEAAkD;AAClD,sDAAoC;AACpC,oDAAkC;AAClC,oDAAkC;AAClC,iDAA+B;AAC/B,wEAAsD;AACtD,+DAA6C;AAC7C,6DAA2C;AAC3C,oDAAkC;AAClC,mDAAiC;AACjC,4DAA0C;AAC1C,oDAAkC;AAClC,0DAAwC;AACxC,uDAAqC;AACrC,+CAA6B;AAC7B,2DAAyC;AACzC,4DAA0C;AAC1C,sDAAoC;AACpC,0DAAwC;AACxC,sDAAoC;AACpC,gDAA8B;AAC9B,uDAAqC;AACrC,+CAA6B;AAC7B,mDAAiC;AACjC,sDAAoC;AACpC,+DAA6C;AAC7C,+CAA6B;AAC7B,iDAA+B;AAC/B,uEAAqD;AACrD,0EAAwD;AACxD,kFAAgE;AAChE,8EAA4D;AAC5D,wDAAsC;AACtC,+DAA6C;AAC7C,uDAAqC;AACrC,yDAAuC;AACvC,sDAAoC;AACpC,yDAAuC","sourcesContent":["/*\r\n * Public API Surface of reference-data\r\n */\r\n\r\nexport * from './card-ids';\r\nexport * from './enums/block-type';\r\nexport * from './enums/bnet-region';\r\nexport * from './enums/board';\r\nexport * from './enums/booster-type';\r\nexport * from './enums/card-class';\r\nexport * from './enums/card-rarity';\r\nexport * from './enums/card-set';\r\nexport * from './enums/card-text-builder-type';\r\nexport * from './enums/card-type';\r\nexport * from './enums/choice-type';\r\nexport * from './enums/dk-rune-type';\r\nexport * from './enums/dungeon-crawl-option-type';\r\nexport * from './enums/game-format';\r\nexport * from './enums/game-tags';\r\nexport * from './enums/game-type';\r\nexport * from './enums/locale';\r\nexport * from './enums/mercenaries-bounty-difficulty';\r\nexport * from './enums/mercenaries-map-type';\r\nexport * from './enums/mercenary-selector';\r\nexport * from './enums/meta-tags';\r\nexport * from './enums/mulligan';\r\nexport * from './enums/multi-class-group';\r\nexport * from './enums/playstate';\r\nexport * from './enums/quest-pool-type';\r\nexport * from './enums/quest-status';\r\nexport * from './enums/race';\r\nexport * from './enums/reward-item-type';\r\nexport * from './enums/reward-track-type';\r\nexport * from './enums/reward-type';\r\nexport * from './enums/scenario-groups';\r\nexport * from './enums/scenario-id';\r\nexport * from './enums/scene';\r\nexport * from './enums/spell-school';\r\nexport * from './enums/step';\r\nexport * from './enums/tag-role';\r\nexport * from './enums/task-status';\r\nexport * from './enums/village-visitor-type';\r\nexport * from './enums/zone';\r\nexport * from './models/quest';\r\nexport * from './models/reference-cards/rarity.type';\r\nexport * from './models/reference-cards/reference-card';\r\nexport * from './models/reference-cards/reference-player-class';\r\nexport * from './models/reference-cards/related-cards-data';\r\nexport * from './secondary-race-tags';\r\nexport * from './services/all-cards.service';\r\nexport * from './services/bgs-utils';\r\nexport * from './services/duels-utils';\r\nexport * from './services/hs-utils';\r\nexport * from './services/mercs-utils';\r\n// export * from './services/mercs-utils';\r\n"]}
@@ -1,4 +1,6 @@
1
- import { GameType, Race } from '../public-api';
1
+ import { AllCardsService, GameType, Race } from '../public-api';
2
2
  export declare const ALL_BG_RACES: Race[];
3
3
  export declare const defaultStartingHp: (gameType: GameType, heroCardId: string) => number;
4
4
  export declare const isBattlegrounds: (gameType: GameType) => boolean;
5
+ export declare const normalizeHeroCardId: (heroCardId: string, allCards: AllCardsService) => string;
6
+ export declare const getHeroPower: (heroCardId: string, allCards: AllCardsService) => string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isBattlegrounds = exports.defaultStartingHp = exports.ALL_BG_RACES = void 0;
3
+ exports.getHeroPower = exports.normalizeHeroCardId = exports.isBattlegrounds = exports.defaultStartingHp = exports.ALL_BG_RACES = void 0;
4
4
  const public_api_1 = require("../public-api");
5
5
  exports.ALL_BG_RACES = [
6
6
  public_api_1.Race.BEAST,
@@ -35,4 +35,239 @@ const isBattlegrounds = (gameType) => {
35
35
  ].includes(gameType);
36
36
  };
37
37
  exports.isBattlegrounds = isBattlegrounds;
38
+ const normalizeHeroCardId = (heroCardId, allCards) => {
39
+ if (!heroCardId) {
40
+ return heroCardId;
41
+ }
42
+ const normalizedAfterSkin = normalizeHeroCardIdAfterSkin(heroCardId, allCards);
43
+ switch (normalizedAfterSkin) {
44
+ case 'TB_BaconShop_HERO_59t':
45
+ return 'TB_BaconShop_HERO_59';
46
+ case "BG22_HERO_007t":
47
+ return "BG22_HERO_007";
48
+ default:
49
+ return normalizedAfterSkin;
50
+ }
51
+ };
52
+ exports.normalizeHeroCardId = normalizeHeroCardId;
53
+ const normalizeHeroCardIdAfterSkin = (heroCardId, allCards) => {
54
+ const heroCard = allCards.getCard(heroCardId);
55
+ if (!!(heroCard === null || heroCard === void 0 ? void 0 : heroCard.battlegroundsHeroParentDbfId)) {
56
+ const parentCard = allCards.getCardFromDbfId(heroCard.battlegroundsHeroParentDbfId);
57
+ if (!!parentCard) {
58
+ return parentCard.id;
59
+ }
60
+ }
61
+ const bgHeroSkinMatch = heroCardId.match(/(.*)_SKIN_.*/);
62
+ if (bgHeroSkinMatch) {
63
+ return bgHeroSkinMatch[1];
64
+ }
65
+ return heroCardId;
66
+ };
67
+ const getHeroPower = (heroCardId, allCards) => {
68
+ const normalized = exports.normalizeHeroCardId(heroCardId, allCards);
69
+ switch (normalized) {
70
+ case 'TB_BaconShop_HERO_01':
71
+ return 'TB_BaconShop_HP_001';
72
+ case 'TB_BaconShop_HERO_02':
73
+ return 'TB_BaconShop_HP_011';
74
+ case 'TB_BaconShop_HERO_08':
75
+ return 'TB_BaconShop_HP_069';
76
+ case "TB_BaconShop_HERO_11":
77
+ return "TB_BaconShop_HP_087";
78
+ case 'TB_BaconShop_HERO_12':
79
+ return 'TB_BaconShop_HP_041';
80
+ case "TB_BaconShop_HERO_14":
81
+ return "TB_BaconShop_HP_037a";
82
+ case 'TB_BaconShop_HERO_15':
83
+ return 'TB_BaconShop_HP_010';
84
+ case 'TB_BaconShop_HERO_16':
85
+ return 'TB_BaconShop_HP_044';
86
+ case 'TB_BaconShop_HERO_17':
87
+ return 'TB_BaconShop_HP_015';
88
+ case 'TB_BaconShop_HERO_18':
89
+ return 'TB_BaconShop_HP_072';
90
+ case 'TB_BaconShop_HERO_20':
91
+ return 'TB_BaconShop_HP_018';
92
+ case 'TB_BaconShop_HERO_21':
93
+ return 'TB_BaconShop_HP_020';
94
+ case 'TB_BaconShop_HERO_22':
95
+ return 'TB_BaconShop_HP_024';
96
+ case 'TB_BaconShop_HERO_23':
97
+ return 'TB_BaconShop_HP_022';
98
+ case 'TB_BaconShop_HERO_25':
99
+ return 'TB_BaconShop_HP_049';
100
+ case 'TB_BaconShop_HERO_27':
101
+ return 'TB_BaconShop_HP_014';
102
+ case 'TB_BaconShop_HERO_28':
103
+ return 'TB_BaconShop_HP_028';
104
+ case 'TB_BaconShop_HERO_30':
105
+ return 'TB_BaconShop_HP_043';
106
+ case 'TB_BaconShop_HERO_31':
107
+ return 'TB_BaconShop_HP_009';
108
+ case 'TB_BaconShop_HERO_33':
109
+ return 'TB_BaconShop_HP_033';
110
+ case 'TB_BaconShop_HERO_34':
111
+ return 'TB_BaconShop_HP_035';
112
+ case 'TB_BaconShop_HERO_35':
113
+ return 'TB_BaconShop_HP_039';
114
+ case 'TB_BaconShop_HERO_36':
115
+ return 'TB_BaconShop_HP_042';
116
+ case 'TB_BaconShop_HERO_37':
117
+ return 'TB_BaconShop_HP_036';
118
+ case 'TB_BaconShop_HERO_38':
119
+ return 'TB_BaconShop_HP_038';
120
+ case 'TB_BaconShop_HERO_39':
121
+ return 'TB_BaconShop_HP_040';
122
+ case 'TB_BaconShop_HERO_40':
123
+ return 'TB_BaconShop_HP_057';
124
+ case 'TB_BaconShop_HERO_41':
125
+ return 'TB_BaconShop_HP_046';
126
+ case 'TB_BaconShop_HERO_42':
127
+ return 'TB_BaconShop_HP_047';
128
+ case 'TB_BaconShop_HERO_43':
129
+ return 'TB_BaconShop_HP_048';
130
+ case 'TB_BaconShop_HERO_45':
131
+ return 'TB_BaconShop_HP_053';
132
+ case 'TB_BaconShop_HERO_47':
133
+ return 'TB_BaconShop_HP_051';
134
+ case 'TB_BaconShop_HERO_49':
135
+ return 'TB_BaconShop_HP_054';
136
+ case 'TB_BaconShop_HERO_50':
137
+ return 'TB_BaconShop_HP_077';
138
+ case 'TB_BaconShop_HERO_52':
139
+ return 'TB_BaconShop_HP_061';
140
+ case 'TB_BaconShop_HERO_53':
141
+ return 'TB_BaconShop_HP_062';
142
+ case 'TB_BaconShop_HERO_55':
143
+ return 'TB_BaconShop_HP_056';
144
+ case 'TB_BaconShop_HERO_56':
145
+ return 'TB_BaconShop_HP_064';
146
+ case 'TB_BaconShop_HERO_57':
147
+ return 'TB_BaconShop_HP_063';
148
+ case 'TB_BaconShop_HERO_58':
149
+ return 'TB_BaconShop_HP_052';
150
+ case 'TB_BaconShop_HERO_59t':
151
+ return 'TB_BaconShop_HP_065t2';
152
+ case 'TB_BaconShop_HERO_59':
153
+ return 'TB_BaconShop_HP_065';
154
+ case 'TB_BaconShop_HERO_60':
155
+ return 'TB_BaconShop_HP_066';
156
+ case 'TB_BaconShop_HERO_61':
157
+ return 'TB_BaconShop_HP_067';
158
+ case 'TB_BaconShop_HERO_62':
159
+ return 'TB_BaconShop_HP_068';
160
+ case 'TB_BaconShop_HERO_64':
161
+ return 'TB_BaconShop_HP_074';
162
+ case "TB_BaconShop_HERO_67":
163
+ return "TB_BaconShop_HP_075";
164
+ case 'TB_BaconShop_HERO_68':
165
+ return 'TB_BaconShop_HP_076';
166
+ case 'TB_BaconShop_HERO_70':
167
+ return 'TB_BaconShop_HP_080';
168
+ case 'TB_BaconShop_HERO_71':
169
+ return 'TB_BaconShop_HP_084';
170
+ case 'TB_BaconShop_HERO_72':
171
+ return 'TB_BaconShop_HP_081';
172
+ case 'TB_BaconShop_HERO_74':
173
+ return 'TB_BaconShop_HP_082';
174
+ case "TB_BaconShop_HERO_78":
175
+ return "TB_BaconShop_HP_088";
176
+ case "TB_BaconShop_HERO_75":
177
+ return "TB_BaconShop_HP_085";
178
+ case "TB_BaconShop_HERO_76":
179
+ return "TB_BaconShop_HP_086";
180
+ case "TB_BaconShop_HERO_91":
181
+ return "TB_BaconShop_HP_102";
182
+ case "TB_BaconShop_HERO_90":
183
+ return "TB_BaconShop_HP_101";
184
+ case "TB_BaconShop_HERO_29":
185
+ return "TB_BaconShop_HP_104";
186
+ case "TB_BaconShop_HERO_93":
187
+ return "TB_BaconShop_HP_105";
188
+ case "TB_BaconShop_HERO_92":
189
+ return "TB_BaconShop_HP_103";
190
+ case "TB_BaconShop_HERO_94":
191
+ return "TB_BaconShop_HP_106";
192
+ case "TB_BaconShop_HERO_95":
193
+ return "TB_BaconShop_HP_107";
194
+ case "BG20_HERO_102":
195
+ return "BG20_HERO_102p";
196
+ case "BG20_HERO_103":
197
+ return "BG20_HERO_103p";
198
+ case "BG20_HERO_201":
199
+ return "BG20_HERO_201p";
200
+ case "BG20_HERO_101":
201
+ return "BG20_HERO_101p";
202
+ case "BG20_HERO_301":
203
+ return "BG20_HERO_301p";
204
+ case "BG20_HERO_242":
205
+ return "BG20_HERO_242p";
206
+ case "BG20_HERO_280":
207
+ return "BG20_HERO_280p";
208
+ case "BG20_HERO_283":
209
+ return "BG20_HERO_283p";
210
+ case "TB_BaconShop_HERO_10":
211
+ return "TB_BaconShop_HP_008";
212
+ case "BG20_HERO_202":
213
+ return "BG20_HERO_202p";
214
+ case "BG21_HERO_000":
215
+ return "BG21_HERO_000p";
216
+ case "BG20_HERO_666":
217
+ return "BG20_HERO_666p";
218
+ case "BG21_HERO_030":
219
+ return "BG21_HERO_030p";
220
+ case "BG21_HERO_020":
221
+ return "BG21_HERO_020p";
222
+ case "BG20_HERO_282":
223
+ return "BG20_HERO_282p";
224
+ case "BG21_HERO_010":
225
+ return "BG21_HERO_010p";
226
+ case "BG22_HERO_001":
227
+ return "BG22_HERO_001p";
228
+ case "BG22_HERO_002":
229
+ return "BG22_HERO_002p";
230
+ case "BG22_HERO_003":
231
+ return "BG22_HERO_003p";
232
+ case "BG22_HERO_000":
233
+ return "BG22_HERO_000p";
234
+ case "BG22_HERO_004":
235
+ return "BG22_HERO_004p";
236
+ case "BG20_HERO_100":
237
+ return "BG20_HERO_100p";
238
+ case "BG22_HERO_305":
239
+ return "BG22_HERO_305p";
240
+ case "BG22_HERO_201":
241
+ return "BG22_HERO_201p";
242
+ case "BG22_HERO_200":
243
+ return "BG22_HERO_200p";
244
+ case "BG22_HERO_007":
245
+ return "BG22_HERO_007p";
246
+ case "BG22_HERO_007t":
247
+ return "BG22_HERO_007p2";
248
+ case "BG23_HERO_201":
249
+ return "BG23_HERO_201p";
250
+ case "BG23_HERO_304":
251
+ return "BG23_HERO_304p";
252
+ case "BG23_HERO_305":
253
+ return "BG23_HERO_305p";
254
+ case "BG23_HERO_303":
255
+ return "BG23_HERO_303p2";
256
+ case "BG24_HERO_100":
257
+ return "BG24_HERO_100p";
258
+ case "BG23_HERO_306":
259
+ return "BG23_HERO_306p";
260
+ case "TB_BaconShop_HERO_702":
261
+ return "TB_BaconShop_HP_702";
262
+ case "BG24_HERO_204":
263
+ return "BG24_HERO_204p";
264
+ case "BG25_HERO_100":
265
+ return "BG25_HERO_100p";
266
+ case "BG25_HERO_103":
267
+ return "BG25_HERO_103p";
268
+ case '':
269
+ return null;
270
+ }
271
+ };
272
+ exports.getHeroPower = getHeroPower;
38
273
  //# sourceMappingURL=bgs-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bgs-utils.js","sourceRoot":"","sources":["../../src/services/bgs-utils.ts"],"names":[],"mappings":";;;AAAA,8CAAwD;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;AAEK,MAAM,iBAAiB,GAAG,CAAC,QAAkB,EAAE,UAAkB,EAAU,EAAE;IACnF,IAAI,uBAAe,CAAC,QAAQ,CAAC,EAAE;QAC9B,QAAQ,UAAU,EAAE;YACnB;gBACC,OAAO,EAAE,CAAC;YACX;gBACC,OAAO,EAAE,CAAC;SACX;KACD;IACD,OAAO,EAAE,CAAC;AACX,CAAC,CAAC;AAVW,QAAA,iBAAiB,qBAU5B;AAEK,MAAM,eAAe,GAAG,CAAC,QAAkB,EAAW,EAAE;IAC9D,OAAO;QACN,qBAAQ,CAAC,gBAAgB;QACzB,qBAAQ,CAAC,yBAAyB;QAClC,qBAAQ,CAAC,yBAAyB;QAClC,qBAAQ,CAAC,6BAA6B;KACtC,CAAC,QAAQ,CAAC,QAAoB,CAAC,CAAC;AAClC,CAAC,CAAC;AAPW,QAAA,eAAe,mBAO1B","sourcesContent":["import { CardIds, GameType, Race } from '../public-api';\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 defaultStartingHp = (gameType: GameType, heroCardId: string): number => {\r\n\tif (isBattlegrounds(gameType)) {\r\n\t\tswitch (heroCardId) {\r\n\t\t\tcase CardIds.PatchwerkBattlegrounds:\r\n\t\t\t\treturn 60;\r\n\t\t\tdefault:\r\n\t\t\t\treturn 40;\r\n\t\t}\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].includes(gameType as GameType);\r\n};\r\n"]}
1
+ {"version":3,"file":"bgs-utils.js","sourceRoot":"","sources":["../../src/services/bgs-utils.ts"],"names":[],"mappings":";;;AAAA,8CAAyE;AAE5D,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;AAEK,MAAM,iBAAiB,GAAG,CAAC,QAAkB,EAAE,UAAkB,EAAU,EAAE;IACnF,IAAI,uBAAe,CAAC,QAAQ,CAAC,EAAE;QAC9B,QAAQ,UAAU,EAAE;YACnB;gBACC,OAAO,EAAE,CAAC;YACX;gBACC,OAAO,EAAE,CAAC;SACX;KACD;IACD,OAAO,EAAE,CAAC;AACX,CAAC,CAAC;AAVW,QAAA,iBAAiB,qBAU5B;AAEK,MAAM,eAAe,GAAG,CAAC,QAAkB,EAAW,EAAE;IAC9D,OAAO;QACN,qBAAQ,CAAC,gBAAgB;QACzB,qBAAQ,CAAC,yBAAyB;QAClC,qBAAQ,CAAC,yBAAyB;QAClC,qBAAQ,CAAC,6BAA6B;KACtC,CAAC,QAAQ,CAAC,QAAoB,CAAC,CAAC;AAClC,CAAC,CAAC;AAPW,QAAA,eAAe,mBAO1B;AAEK,MAAM,mBAAmB,GAAG,CAAC,UAAkB,EAAE,QAAyB,EAAU,EAAE;IAC5F,IAAI,CAAC,UAAU,EAAE;QAChB,OAAO,UAAU,CAAC;KAClB;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,wBAAiD;QAClD;YACC,wBAAgD;QACjD;YACC,wBAAmC;QACpC;YACC,wBAAyC;QAC1C;YACC,wBAA4C;QAC7C;YACC,wBAA8C;QAC/C;YACC,wBAAuC;QACxC;YACC,6BAAyC;QAC1C;YACC,wBAA4C;QAC7C;YACC,wBAA2C;QAC5C;YACC,wBAAoC;QACrC;YACC,wBAAsC;QACvC;YACC,wBAAwC;QACzC;YACC,wBAA8C;QAC/C;YACC,wBAAuC;QACxC;YACC,wBAAyC;QAC1C;YACC,wBAA2C;QAC5C;YACC,wBAAkD;QACnD;YACC,wBAAuC;QACxC;YACC,wBAA2C;QAC5C;YACC,wBAAoC;QACrC;YACC,wBAAkC;QACnC;YACC,wBAAgD;QACjD;YACC,wBAAsC;QACvC;YACC,wBAA6C;QAC9C;YACC,yBAAyC;QAC1C;YACC,wBAAiC;QAClC;YACC,wBAAyC;QAC1C;YACC,wBAAmD;QACpD;YACC,yBAA6C;QAC9C;YACC,wBAA+C;QAChD;YACC,wBAAiD;QAClD;YACC,6BAA6C;QAC9C;YACC,wBAA+C;QAChD;YACC,wBAAgD;QACjD;YACC,wBAA+C;QAEhD,KAAK,EAAE;YACN,OAAO,IAAI,CAAC;KACb;AACF,CAAC,CAAC;AA/MW,QAAA,YAAY,gBA+MvB","sourcesContent":["import { AllCardsService, CardIds, GameType, Race } from '../public-api';\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 defaultStartingHp = (gameType: GameType, heroCardId: string): number => {\r\n\tif (isBattlegrounds(gameType)) {\r\n\t\tswitch (heroCardId) {\r\n\t\t\tcase CardIds.PatchwerkBattlegrounds:\r\n\t\t\t\treturn 60;\r\n\t\t\tdefault:\r\n\t\t\t\treturn 40;\r\n\t\t}\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].includes(gameType as GameType);\r\n};\r\n\r\nexport const normalizeHeroCardId = (heroCardId: string, allCards: AllCardsService): 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 = (heroCardId: string, allCards: AllCardsService): string => {\r\n\tconst heroCard = allCards.getCard(heroCardId);\r\n\tif (!!heroCard?.battlegroundsHeroParentDbfId) {\r\n\t\tconst parentCard = allCards.getCardFromDbfId(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\nexport const getHeroPower = (heroCardId: string, allCards: AllCardsService): 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.RagnarosTheFirelordBattlegrounds:\r\n\t\t\treturn CardIds.DieInsectsBattlegrounds_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.QueenWagtoggleBattlegrounds:\r\n\t\t\treturn CardIds.WaxWarbandBattlegrounds;\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 'TB_BaconShop_HERO_23':\r\n\t\t\treturn 'TB_BaconShop_HP_022';\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.CaptainHooktuskBattlegrounds:\r\n\t\t\treturn CardIds.TrashForTreasureBattlegrounds;\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.ChenvaalaBattlegrounds:\r\n\t\t\treturn CardIds.AvalancheBattlegrounds;\r\n\t\tcase CardIds.RakanishuBattlegrounds:\r\n\t\t\treturn CardIds.TavernLightingBattlegrounds;\r\n\t\tcase CardIds.AlakirBattlegrounds:\r\n\t\t\treturn CardIds.SwattingInsectsBattlegrounds;\r\n\t\tcase CardIds.ZephrysTheGreatBattlegrounds:\r\n\t\t\treturn CardIds.ThreeWishesBattlegrounds;\r\n\t\tcase CardIds.SilasDarkmoonBattlegrounds:\r\n\t\t\treturn CardIds.ComeOneComeAllBattlegrounds;\r\n\t\tcase CardIds.CthunBattlegrounds:\r\n\t\t\treturn CardIds.SaturdayCthunsBattlegrounds;\r\n\t\tcase CardIds.NzothBattlegrounds:\r\n\t\t\treturn CardIds.AvatarOfNzothBattlegrounds;\r\n\t\tcase CardIds.YshaarjBattlegrounds:\r\n\t\t\treturn CardIds.EmbraceYourRageBattlegrounds;\r\n\t\tcase CardIds.TickatusBattlegrounds:\r\n\t\t\treturn CardIds.PrizeWallBattlegrounds;\r\n\t\tcase CardIds.GreyboughBattlegrounds:\r\n\t\t\treturn CardIds.SproutItOutBattlegrounds;\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_FinalShowdown;\r\n\t\tcase CardIds.Galewing:\r\n\t\t\treturn CardIds.Galewing_DungarsGryphon;\r\n\t\tcase CardIds.TradePrinceGallywixBattlegrounds:\r\n\t\t\treturn CardIds.SmartSavingsBattlegrounds;\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_ConvictionRank1;\r\n\t\tcase CardIds.Diablo:\r\n\t\t\treturn CardIds.Diablo_RealmOfTerror;\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.TheJailerBattlegrounds:\r\n\t\t\treturn CardIds.RunicEmpowermentBattlegrounds;\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\r\n\t\tcase '':\r\n\t\t\treturn null; // new heroes\r\n\t}\r\n};\r\n"]}
@@ -0,0 +1,3 @@
1
+ import { GameType } from '../public-api';
2
+ export declare const isMercenariesPvP: (gameType: GameType | string) => boolean;
3
+ export declare const isMercenariesPvE: (gameType: GameType | string) => boolean;
@@ -1 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isMercenariesPvE = exports.isMercenariesPvP = void 0;
4
+ const public_api_1 = require("../public-api");
5
+ const isMercenariesPvP = (gameType) => {
6
+ return gameType === public_api_1.GameType.GT_MERCENARIES_PVP || gameType === 'mercenaries-pvp';
7
+ };
8
+ exports.isMercenariesPvP = isMercenariesPvP;
9
+ const isMercenariesPvE = (gameType) => {
10
+ return (gameType === public_api_1.GameType.GT_MERCENARIES_PVE ||
11
+ gameType === public_api_1.GameType.GT_MERCENARIES_PVE_COOP ||
12
+ gameType === 'mercenaries-pve' ||
13
+ gameType === 'mercenaries-pve-coop');
14
+ };
15
+ exports.isMercenariesPvE = isMercenariesPvE;
1
16
  //# sourceMappingURL=mercs-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mercs-utils.js","sourceRoot":"","sources":["../../src/services/mercs-utils.ts"],"names":[],"mappings":"","sourcesContent":["// export const CASTERS = [\r\n// \t'SWL_10H_01', // Anduin\r\n// \t'SWL_01H_01', // Antonidas\r\n// \t'LETL_030H_01', // Baron geddon\r\n// \t'SWL_14H_01', // Bilnk Fox\r\n// \t'LETL_032H_01', // Brightwing\r\n// \t'LETL_029H_01', // Bru'kan\r\n// \t'LETL_036H_01', // Guff Runetotem\r\n// \t'BARL_010H_01', // Gul'dan\r\n// \t'SWL_25H_01', // Jaina Proudmoore\r\n// \t'LETL_005H_01', // Millhouse Manastorm\r\n// \t'LETL_027H_01', // Morgl the Oracle\r\n// \t'LETL_011H_01', // Natalie Seline\r\n// \t'LETL_014H_01', // Prophet Velen\r\n// \t'LETL_040H_01', // Tamsin Roane\r\n// \t'SWL_13H_01', // Uther\r\n// \t'LETL_017H_01', // Varden Dawngrasp\r\n// \t'BARL_005H_01', // Vol'jin\r\n// \t'LETL_021H_01', // Xyrella\r\n// ];\r\n\r\n// export const FIGHTERS = [\r\n// \t'BARL_024H_01', // Blademaster Samuro\r\n// \t'SWL_26H_01', // Diablo\r\n// \t'LETL_003H_01', // Illidan Stormrage\r\n// \t'LETL_037H_01', // King Krush\r\n// \t'BARL_007H_01', // Lady Anacondra\r\n// \t'BARL_008H_01', // Mutanus\r\n// \t'LETL_026H_01', // Old murk-eye\r\n// \t'BARL_023H_01', // Rathorian\r\n// \t'LETL_015H_01', // Rexxar\r\n// \t'LETL_016H_01', // Rokara\r\n// \t'BARL_002H_01', // Saurfang\r\n// \t'LETL_010H_01', // Scabbs Cutterbutter\r\n// \t'LETL_001H_01', // Sylvanas Windrunner\r\n// \t'LETL_039H_01', // Tavish Stormpike\r\n// \t'LETL_002H_01', // Tirion Fordring\r\n// \t'BARL_016H_01', // Tyrande\r\n// \t'BARL_009H_01', // War Master Voone\r\n// \t'LETL_019H_01', // Valeera Sanguinar\r\n// ];\r\n\r\n// export const PROTECTORS = [\r\n// \t'LETL_031H_01', // Alexstrasza\r\n// \t'LETL_034H_01', // Cairne Bloodhoof\r\n// \t'LETL_020H_01', // Cariel Roame\r\n// \t'SWL_06H_01', // Cornelius Roame\r\n// \t'BARL_013H_01', // Garrosh Hellscream\r\n// \t'LETL_009H_01', // Grommash Hellscream\r\n// \t'LETL_033H_01', // Gruul\r\n// \t'LETL_038H_01', // King Mukla\r\n// \t'LETL_007H_01', // Kurtrus Ashfallen\r\n// \t'LETL_041H_01', // The Lich King\r\n// \t'LETL_006H_01', // Lord Jaraxxus\r\n// \t'BARL_017H_01', // Malfurion Stormrage\r\n// \t'BARL_012H_01', // Mannoroth\r\n// \t'LETL_028H_01', // Ragnaros\r\n// \t'BARL_025H_01', // Thrall\r\n// \t'LETL_012H_01', // Varian Wrynn\r\n// ];\r\n\r\n// export const HERO_EQUIPMENT = {\r\n// \t'SWL_10H_01': ['LETL_425_01', 'LETL_424_01', 'LETL_423_01'],\r\n// \t'SWL_01H_01': ['LETL_453_01', 'LETL_455_01', 'LETL_454_01'],\r\n// \t'LETL_030H_01': ['LETL_700_01', 'LETL_702_01', 'LETL_701_01'],\r\n// \t'SWL_14H_01': ['LETL_696_01', 'LETL_697_01', 'LETL_698_01'],\r\n// \t'LETL_032H_01': ['LETL_612_01', 'LETL_613_01', 'LETL_614_01'],\r\n// \t'LETL_029H_01': ['LETL_704_01', 'LETL_705_01', 'LETL_703_01'],\r\n// \t'LETL_036H_01': ['LETL_464_01', 'LETL_465_01', 'LETL_466_01'],\r\n// \t'BARL_010H_01': ['LETL_304_01', 'LETL_303_01', 'LETL_305_01'],\r\n// \t'SWL_25H_01': ['LETL_632_01', 'LETL_668_01', 'LETL_669_01'],\r\n// \t'LETL_005H_01': ['LETL_655_01', 'LETL_653_01', 'LETL_654_01'],\r\n// \t'LETL_027H_01': ['LETL_606_01', 'LETL_605_01', 'LETL_609_01'],\r\n// \t'LETL_011H_01': ['LETL_334_01', 'LETL_333_01', 'LETL_335_01'],\r\n// \t'LETL_014H_01': ['LETL_243_01', 'LETL_244_01', 'LETL_245_04'],\r\n// \t'LETL_040H_01': ['LETL_662_01', 'LETL_663_01', 'LETL_040P5_01'],\r\n// \t'SWL_13H_01': ['LETL_433_01', 'LETL_437_01', 'LETL_436_01'],\r\n// \t'LETL_017H_01': ['LETL_631_01', 'LETL_670_01', 'LETL_634_01'],\r\n// \t'BARL_005H_01': ['LETL_323_01', 'LETL_327_01', 'LETL_326_01'],\r\n// \t'LETL_021H_01': ['LETL_715_01', 'LETL_716_01', 'LETL_717_0'],\r\n// \t'BARL_024H_01': ['LETL_639_01', 'LETL_640_01', 'LETL_638_01'],\r\n// \t'SWL_26H_01': ['LETL_699_01', 'LETL_672_01', 'LETL_666_01'],\r\n// \t'LETL_003H_01': ['LETL_642_01', 'LETL_643_01', 'LETL_644_01'],\r\n// \t'LETL_037H_01': ['LETL_273_01', 'LETL_272_01', 'LETL_271_01'],\r\n// \t'BARL_007H_01': ['LETL_343_01', 'LETL_375_01', 'LETL_374_01'],\r\n// \t'BARL_008H_01': ['LETL_285_01', 'LETL_284_01', 'LETL_283_01'],\r\n// \t'LETL_026H_01': ['LETL_608_01', 'LETL_607_01', 'LETL_610_01'],\r\n// \t'BARL_023H_01': ['LETL_259_01', 'LETL_260_01', 'LETL_253_01'],\r\n// \t'LETL_015H_01': ['LETL_265_01', 'LETL_267_01', 'LETL_266_01'],\r\n// \t'LETL_016H_01': ['LETL_677_01', 'LETL_678_01', 'LETL_679_01'],\r\n// \t'BARL_002H_01': ['LETL_635_01', 'LETL_637_01', 'LETL_636_01'],\r\n// \t'LETL_010H_01': ['LETL_482_01', 'LETL_483_01', 'LETL_484_01'],\r\n// \t'LETL_001H_01': ['LETL_652_01', 'LETL_651_01', 'LETL_001P7_01'],\r\n// \t'LETL_039H_01': ['LETL_712_01', 'LETL_713_01', 'LETL_714_01'],\r\n// \t'LETL_002H_01': ['LETL_681_01', 'LETL_680_01', 'LETL_682_01'],\r\n// \t'BARL_016H_01': ['LETL_693_01', 'LETL_694_01', 'LETL_695_01'],\r\n// \t'BARL_009H_01': ['LETL_661_01', 'LETL_660_01', 'LETL_293_01'],\r\n// \t'LETL_019H_01': ['LETL_615_01', 'LETL_710_01', 'LETL_711_01'],\r\n\r\n// \t'LETL_031H_01': ['LETL_611_01', 'LETL_658_01', 'LETL_659_01'],\r\n// \t'LETL_034H_01': ['LETL_247_01', 'LETL_248_01', 'LETL_034P1_01'],\r\n// \t'LETL_020H_01': ['LETL_686_01', 'LETL_684_01', 'LETL_685_01'],\r\n// \t'SWL_06H_01': ['LETL_443_01', 'LETL_444_01', 'LETL_434_01'],\r\n// \t'BARL_013H_01': ['LETL_623_01', 'LETL_625_01', 'LETL_624_01'],\r\n// \t'LETL_009H_01': ['LETL_675_01', 'LETL_674_01', 'LETL_676_01'],\r\n// \t'LETL_033H_01': ['LETL_486_01', 'LETL_485_01', 'LETL_487_01'],\r\n// \t'LETL_038H_01': ['LETL_277_01', 'LETL_278_01', 'LETL_279_01'],\r\n// \t'LETL_007H_01': ['LETL_648_01', 'LETL_647_01', 'LETL_007P8_01'],\r\n// \t'LETL_041H_01': ['LETL_689_01', 'LETL_688_01', 'LETL_687_01'],\r\n// \t'LETL_006H_01': ['LETL_601_01', 'LETL_602_01', 'LETL_604_01'],\r\n// \t'BARL_017H_01': ['LETL_709_01', 'LETL_706_01', 'LETL_707_01'],\r\n// \t'BARL_012H_01': ['LETL_255_01', 'LETL_261_01', 'LETL_254_01'],\r\n// \t'LETL_028H_01': ['LETL_446_01', 'LETL_447_01', 'LETL_448_01'],\r\n// \t'BARL_025H_01': ['LETL_620_01', 'LETL_621_01', 'LETL_622_01'],\r\n// \t'LETL_012H_01': ['LETL_690_01', 'LETL_691_01', 'LETL_692_01'],\r\n// };\r\n\r\n// export const HERO_SKILLS = {\r\n// \t'LETL_031H_01': ['LETL_031P7_01', 'LETL_031P4_01', 'LETL_031P2_01'],\r\n// \t'LETL_034H_01': ['LETL_034P3_01', 'LETL_319_01', 'LETL_246_01'],\r\n// \t'LETL_020H_01': ['LETL_406_01', 'LETL_409_01', 'LETL_020P6_01'],\r\n// \t'SWL_06H_01': ['LETL_440_01', 'LETL_441_01', 'LETL_002P5_01'],\r\n// \t'BARL_013H_01': ['LETL_229_01', 'LETL_224_01', 'LETL_309_01'],\r\n// \t'LETL_009H_01': ['LETL_009P7_01', 'LETL_414_01', 'LETL_413_01'],\r\n// \t'LETL_033H_01': ['LETL_033P5_01', 'LETL_033P2_01', 'LETL_033P4_01'],\r\n// \t'LETL_038H_01': ['LETL_274_01', 'LETL_275_01', 'LETL_276_01'],\r\n// \t'LETL_007H_01': ['LETL_007P7_01', 'LETL_007P5_01', 'LETL_007P4_01'],\r\n// \t'LETL_041H_01': ['LETL_316_01', 'LETL_317_01', 'LETL_318_01'],\r\n// \t'LETL_006H_01': ['LETL_006P8_01', 'LETL_006P9_01', 'LETL_006P1_01'],\r\n// \t'BARL_017H_01': ['LETL_470_01', 'LETL_471_01', 'LETL_472_01'],\r\n// \t'BARL_012H_01': ['LETL_250_01', 'LETL_257_01', 'LETL_251_01'],\r\n// \t'LETL_028H_03': ['LETL_028P11_01', 'LETL_028P9_01', 'LETL_005P3_01'],\r\n// \t'BARL_025H_01': ['LETL_220_01', 'LETL_222_01', 'LETL_225_01'],\r\n// \t'LETL_012H_01': ['LETL_012P7_01', 'LETL_012P6_01', 'LETL_012P4_01'],\r\n\r\n// \t'BARL_024H_01': ['LETL_232_01', 'LETL_233_01', 'LETL_234_01'],\r\n// \t'SWL_26H_01': ['LETL_235_01', 'LETL_236_01', 'LETL_237_01'],\r\n// \t'LETL_003H_01': ['LETL_003P8_01', 'LETL_003P1_01', 'LETL_003P4_01'],\r\n// \t'LETL_037H_01': ['LETL_282_01', 'LETL_037P2_01', 'LETL_269_01'],\r\n// \t'BARL_007H_01': ['LETL_340_01', 'LETL_342_01', 'LETL_341_01'],\r\n// \t'BARL_008H_01': ['LETL_280_01', 'LETL_004P1_01', 'LETL_281_01'],\r\n// \t'LETL_026H_01': ['LETL_026P8_01', 'LETL_027P3_01', 'LETL_026P4_01'],\r\n// \t'BARL_023H_01': ['LETL_256_01', 'LETL_252_01', 'LETL_258_01'],\r\n// \t'LETL_015H_01': ['LETL_262_01', 'LETL_263_01', 'LETL_015P9_01'],\r\n// \t'LETL_016H_01': ['LETL_410_01', 'LETL_411_01', 'LETL_412_01'],\r\n// \t'BARL_002H_01': ['LETL_009P9_01', 'LETL_009P6_01', 'LETL_009P1_01'],\r\n// \t'LETL_010H_01': ['LETL_010P2_01', 'LETL_480_01', 'LETL_481_01'],\r\n// \t'LETL_001H_01': ['LETL_001P9_01', 'LETL_001P5_01', 'LETL_001P3_01'],\r\n// \t'LETL_039H_01': ['LETL_039P8_01', 'LETL_039P5_01', 'LETL_039P6_01'],\r\n// \t'LETL_002H_01': ['LETL_002P7_01', 'LETL_002P4_01', 'LETL_002P3_01'],\r\n// \t'BARL_016H_01': ['LETL_403_01', 'LETL_404_01', 'LETL_405_01'],\r\n// \t'BARL_009H_01': ['LETL_290_01', 'LETL_292_01', 'LETL_291_01'],\r\n// \t'LETL_019H_01': ['LETL_010P5_01', 'LETL_019P1_01', 'LETL_013P3_01'],\r\n\r\n// \t'SWL_10H_01': ['LETL_420_01', 'LETL_014P3_01', 'LETL_422_01'],\r\n// \t'SWL_01H_01': ['LETL_450_01', 'LETL_451_01', 'LETL_452_01'],\r\n// \t'LETL_030H_01': ['LETL_030P3_01', 'LETL_030P4_01', 'LETL_030P6_01'],\r\n// \t'SWL_14H_01': ['LETL_336_01', 'LETL_337_01', 'LETL_338_01'],\r\n// \t'LETL_032H_01': ['LETL_032P6_01', 'LETL_032P4_01', 'LETL_032P5_01'],\r\n// \t'LETL_029H_01': ['LETL_029P5_01', 'LETL_029P10_01', 'LETL_029P6_01'],\r\n// \t'LETL_036H_01': ['LETL_460_01', 'LETL_463_01', 'LETL_462_01'],\r\n// \t'BARL_010H_01': ['LETL_300_01', 'LETL_302_01', 'LETL_301_01'],\r\n// \t'SWL_25H_01': ['LETL_017P6_01', 'LETL_017P2_01', 'LETL_308_01'],\r\n// \t'LETL_005H_01': ['LETL_005P4_01', 'LETL_005P8_01', 'LETL_022P4_01'],\r\n// \t'LETL_027H_01': ['LETL_027P6_01', 'LETL_027P2_01', 'LETL_029P12_01'],\r\n// \t'LETL_011H_01': ['LETL_331_01', 'LETL_330_01', 'LETL_332_01a'],\r\n// \t'LETL_014H_01': ['LETL_021P5_01', 'LETL_014P2_01', 'LETL_014P6_01'],\r\n// \t'LETL_040H_01': ['LETL_040P3_01', 'LETL_040P7_01', 'LETL_040P9_01'],\r\n// \t'SWL_13H_01': ['LETL_430_01', 'LETL_431_01', 'LETL_432_01'],\r\n// \t'LETL_017H_01': ['LETL_306_01', 'LETL_307_01', 'LETL_017P7_01'],\r\n// \t'BARL_005H_01': ['LETL_320_01', 'LETL_324_01', 'LETL_328_01'],\r\n// \t'LETL_021H_01': ['LETL_014P1_01', 'LETL_407_01', 'LETL_408_01'],\r\n// };\r\n"]}
1
+ {"version":3,"file":"mercs-utils.js","sourceRoot":"","sources":["../../src/services/mercs-utils.ts"],"names":[],"mappings":";;;AAAA,8CAAyC;AAElC,MAAM,gBAAgB,GAAG,CAAC,QAA2B,EAAW,EAAE;IACxE,OAAO,QAAQ,KAAK,qBAAQ,CAAC,kBAAkB,IAAI,QAAQ,KAAK,iBAAiB,CAAC;AACnF,CAAC,CAAC;AAFW,QAAA,gBAAgB,oBAE3B;AAEK,MAAM,gBAAgB,GAAG,CAAC,QAA2B,EAAW,EAAE;IACxE,OAAO,CACN,QAAQ,KAAK,qBAAQ,CAAC,kBAAkB;QACxC,QAAQ,KAAK,qBAAQ,CAAC,uBAAuB;QAC7C,QAAQ,KAAK,iBAAiB;QAC9B,QAAQ,KAAK,sBAAsB,CACnC,CAAC;AACH,CAAC,CAAC;AAPW,QAAA,gBAAgB,oBAO3B","sourcesContent":["import { GameType } from '../public-api';\r\n\r\nexport const isMercenariesPvP = (gameType: GameType | string): boolean => {\r\n\treturn gameType === GameType.GT_MERCENARIES_PVP || gameType === 'mercenaries-pvp';\r\n};\r\n\r\nexport const isMercenariesPvE = (gameType: GameType | string): boolean => {\r\n\treturn (\r\n\t\tgameType === GameType.GT_MERCENARIES_PVE ||\r\n\t\tgameType === GameType.GT_MERCENARIES_PVE_COOP ||\r\n\t\tgameType === 'mercenaries-pve' ||\r\n\t\tgameType === 'mercenaries-pve-coop'\r\n\t);\r\n};\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestone-hs/reference-data",
3
- "version": "1.0.60",
3
+ "version": "1.0.62",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "lint": "eslint --color --fix --ext .ts .",