lol-constants 2.23.0 → 2.24.0
Sign up to get free protection for your applications and to get access to all the features.
- package/assets/constants/BootsItemNames.js +1 -4
- package/assets/constants/Champion.js +1 -4
- package/assets/constants/Item.js +1 -4
- package/assets/constants/LegendaryItemNames.d.ts +1 -1
- package/assets/constants/LegendaryItemNames.js +4 -5
- package/assets/constants/RunesReforged.js +1 -4
- package/assets/constants/StatRunes.js +1 -4
- package/assets/constants/StatRunesByRow.js +1 -4
- package/assets/constants/Summoner.js +1 -4
- package/assets/index.js +4 -20
- package/assets/scripts/asset-scripts/champion.js +5 -7
- package/assets/scripts/asset-scripts/generate-all.js +4 -6
- package/assets/scripts/asset-scripts/item.js +5 -7
- package/assets/scripts/asset-scripts/runes-reforged.js +5 -7
- package/assets/scripts/asset-scripts/summoner.js +5 -7
- package/assets/scripts/constants/RuneIdComment.js +1 -4
- package/assets/scripts/generate-categorized-item-keys-num.js +15 -17
- package/assets/scripts/generate-categorized-item-keys.js +12 -14
- package/assets/scripts/generate-categorized-item-names.js +12 -14
- package/assets/scripts/generate-champion-ids-by-name.js +5 -7
- package/assets/scripts/generate-champion-ids.js +5 -7
- package/assets/scripts/generate-champion-keys-num.js +7 -9
- package/assets/scripts/generate-champion-keys.js +5 -7
- package/assets/scripts/generate-champion-names.js +5 -7
- package/assets/scripts/generate-item-keys-num.js +7 -9
- package/assets/scripts/generate-item-keys.js +5 -7
- package/assets/scripts/generate-item-names.js +5 -7
- package/assets/scripts/generate-non-stat-rune-ids-num.js +4 -6
- package/assets/scripts/generate-non-stat-rune-ids.js +6 -8
- package/assets/scripts/generate-non-stat-rune-names.js +4 -6
- package/assets/scripts/generate-rune-ids.js +8 -10
- package/assets/scripts/generate-rune-names.js +6 -8
- package/assets/scripts/generate-rune-picking-relationships.js +4 -6
- package/assets/scripts/generate-rune-sets-by-rune-names-num.js +12 -14
- package/assets/scripts/generate-rune-sets-by-rune-names.js +10 -12
- package/assets/scripts/generate-rune-sets.js +7 -9
- package/assets/scripts/generate-spell-ids-by-name.js +5 -7
- package/assets/scripts/generate-spell-ids.js +5 -7
- package/assets/scripts/generate-spell-keys-num.js +7 -9
- package/assets/scripts/generate-spell-keys.js +5 -7
- package/assets/scripts/generate-spell-names.js +5 -7
- package/assets/scripts/generate-stat-rune-ids.js +6 -8
- package/assets/scripts/generate-stat-rune-names.js +4 -6
- package/assets/scripts/helpers/enableEscapedValues.js +1 -5
- package/assets/scripts/helpers/generateIndexFile.js +1 -5
- package/assets/scripts/helpers/getExportStatement.js +6 -10
- package/assets/scripts/helpers/getFmtdComment.js +1 -5
- package/assets/scripts/helpers/validateNumber.js +1 -5
- package/assets/scripts/helpers/writeToTmpFile.js +5 -9
- package/assets/scripts/print-file-names.js +5 -7
- package/core/constants/Abilities.js +6 -11
- package/core/constants/BuildingTypes.js +3 -7
- package/core/constants/Champions/ChampionClasses.d.ts +17 -0
- package/core/constants/Champions/ChampionClasses.js +25 -0
- package/core/constants/Champions/ChampionIds.js +1 -4
- package/core/constants/Champions/ChampionIdsByName.js +1 -4
- package/core/constants/Champions/ChampionKeys.js +1 -4
- package/core/constants/Champions/ChampionKeysNum.js +1 -4
- package/core/constants/Champions/ChampionNames.js +1 -4
- package/core/constants/Continents.js +3 -7
- package/core/constants/DataDragonUrls.d.ts +16 -16
- package/core/constants/DataDragonUrls.js +3 -6
- package/core/constants/DragonTypes.js +3 -7
- package/core/constants/GameModes.js +3 -7
- package/core/constants/GameTypes.js +3 -7
- package/core/constants/Items/BootsItemKeys.js +1 -4
- package/core/constants/Items/BootsItemKeysNum.js +1 -4
- package/core/constants/Items/BootsItemNames.js +1 -4
- package/core/constants/Items/ItemKeys.js +1 -4
- package/core/constants/Items/ItemKeysNum.js +1 -4
- package/core/constants/Items/ItemNames.js +1 -4
- package/core/constants/Items/ItemTypes.js +3 -7
- package/core/constants/Items/LegendaryItemKeys.js +1 -4
- package/core/constants/Items/LegendaryItemKeysNum.js +1 -4
- package/core/constants/Items/LegendaryItemNames.js +1 -4
- package/core/constants/KillTypes.js +3 -7
- package/core/constants/LaneTypes.js +3 -7
- package/core/constants/Lanes.js +3 -7
- package/core/constants/LeagueTexts.js +3 -7
- package/core/constants/Levels.js +3 -7
- package/core/constants/Locales.js +3 -7
- package/core/constants/MapIds.js +3 -7
- package/core/constants/MonsterTypes.d.ts +2 -1
- package/core/constants/MonsterTypes.js +5 -8
- package/core/constants/ParticipantIds.js +3 -7
- package/core/constants/PlatformApiUris.js +3 -7
- package/core/constants/PlatformIds.js +6 -11
- package/core/constants/Positions.js +3 -7
- package/core/constants/QueueIds.js +5 -9
- package/core/constants/QueueTypes.js +3 -7
- package/core/constants/RankedRanks.js +3 -7
- package/core/constants/RankedTiers.js +3 -7
- package/core/constants/RegionalApiUris.js +3 -7
- package/core/constants/Regions.js +6 -11
- package/core/constants/RelativeTeams.js +3 -7
- package/core/constants/Roles.js +3 -7
- package/core/constants/Runes/NonStatRuneIds.js +1 -4
- package/core/constants/Runes/NonStatRuneIdsNum.js +1 -4
- package/core/constants/Runes/NonStatRuneNames.js +1 -4
- package/core/constants/Runes/RuneIconFileNames.js +1 -4
- package/core/constants/Runes/RunePickingRelationships.js +1 -4
- package/core/constants/Runes/RuneSets.js +8 -11
- package/core/constants/Runes/RuneSetsByRuneNames.js +8 -11
- package/core/constants/Runes/RuneSetsByRuneNamesNum.js +8 -11
- package/core/constants/Runes/RuneTreeIds.js +6 -11
- package/core/constants/Runes/RuneTreeIdsNum.js +6 -11
- package/core/constants/Runes/RuneTreeNames.js +6 -11
- package/core/constants/Runes/RuneTreeTypes.js +3 -7
- package/core/constants/SkillSlots.js +3 -7
- package/core/constants/Skills.js +3 -7
- package/core/constants/Spells/SpellIds.js +1 -4
- package/core/constants/Spells/SpellIdsByName.js +1 -4
- package/core/constants/Spells/SpellKeys.js +1 -4
- package/core/constants/Spells/SpellKeysNum.js +1 -4
- package/core/constants/Spells/SpellNames.js +1 -4
- package/core/constants/TeamIds.js +3 -7
- package/core/constants/TowerTypes.js +3 -7
- package/core/constants/WardTypes.js +3 -7
- package/core/helpers/Champions/getChampionIdByKey.js +3 -7
- package/core/helpers/Champions/getChampionIdByName.js +3 -7
- package/core/helpers/Champions/getChampionKeyById.js +3 -7
- package/core/helpers/Champions/getChampionKeyByName.js +4 -8
- package/core/helpers/Champions/getChampionNameById.js +4 -8
- package/core/helpers/Champions/getChampionNameByKey.js +3 -7
- package/core/helpers/Champions/isChampionId.js +3 -7
- package/core/helpers/Champions/isChampionKey.js +3 -7
- package/core/helpers/Champions/isChampionKeyNum.js +3 -7
- package/core/helpers/Champions/isChampionName.js +3 -7
- package/core/helpers/Items/getItemKeyByName.js +3 -7
- package/core/helpers/Items/getItemNameByKey.js +3 -7
- package/core/helpers/Items/isBootsItemKey.js +3 -7
- package/core/helpers/Items/isBootsItemKeyNum.js +3 -7
- package/core/helpers/Items/isBootsItemName.js +3 -7
- package/core/helpers/Items/isItemKey.js +3 -7
- package/core/helpers/Items/isItemKeyNum.js +3 -7
- package/core/helpers/Items/isItemName.js +3 -7
- package/core/helpers/Items/isLegendaryItemKey.js +3 -7
- package/core/helpers/Items/isLegendaryItemKeyNum.js +3 -7
- package/core/helpers/Items/isLegendaryItemName.js +3 -7
- package/core/helpers/Items/isTier2Boots.d.ts +3 -0
- package/core/helpers/Items/isTier2Boots.js +9 -0
- package/core/helpers/Runes/getNonStatRuneIdByName.js +3 -7
- package/core/helpers/Runes/getNonStatRuneNameById.js +3 -7
- package/core/helpers/Runes/getRuneCategoryName.js +8 -12
- package/core/helpers/Runes/getRuneCdnUrl.js +16 -20
- package/core/helpers/Runes/getRuneIdByName.js +3 -7
- package/core/helpers/Runes/getRuneNameById.js +3 -7
- package/core/helpers/Runes/getStatRuneIdByName.js +3 -7
- package/core/helpers/Runes/getStatRuneNameById.js +3 -7
- package/core/helpers/Runes/isDominationRuneId.js +3 -7
- package/core/helpers/Runes/isDominationRuneIdNum.js +3 -7
- package/core/helpers/Runes/isDominationRuneName.js +3 -7
- package/core/helpers/Runes/isInspirationRuneId.js +3 -7
- package/core/helpers/Runes/isInspirationRuneIdNum.js +3 -7
- package/core/helpers/Runes/isInspirationRuneName.js +3 -7
- package/core/helpers/Runes/isKeystoneRuneId.js +3 -7
- package/core/helpers/Runes/isKeystoneRuneIdNum.js +3 -7
- package/core/helpers/Runes/isKeystoneRuneName.js +3 -7
- package/core/helpers/Runes/isNonStatRuneId.js +3 -7
- package/core/helpers/Runes/isNonStatRuneIdNum.js +3 -7
- package/core/helpers/Runes/isNonStatRuneName.js +3 -7
- package/core/helpers/Runes/isPrecisionRuneId.js +3 -7
- package/core/helpers/Runes/isPrecisionRuneIdNum.js +3 -7
- package/core/helpers/Runes/isPrecisionRuneName.js +3 -7
- package/core/helpers/Runes/isResolveRuneId.js +3 -7
- package/core/helpers/Runes/isResolveRuneIdNum.js +3 -7
- package/core/helpers/Runes/isResolveRuneName.js +3 -7
- package/core/helpers/Runes/isRuneId.js +3 -7
- package/core/helpers/Runes/isRuneIdNum.js +3 -7
- package/core/helpers/Runes/isRuneName.js +3 -7
- package/core/helpers/Runes/isSorceryRuneId.js +3 -7
- package/core/helpers/Runes/isSorceryRuneIdNum.js +3 -7
- package/core/helpers/Runes/isSorceryRuneName.js +3 -7
- package/core/helpers/Runes/isStatRuneId.js +3 -7
- package/core/helpers/Runes/isStatRuneIdNum.js +3 -7
- package/core/helpers/Runes/isStatRuneName.js +3 -7
- package/core/helpers/Spells/getSpellIdByKey.js +3 -7
- package/core/helpers/Spells/getSpellIdByName.js +3 -7
- package/core/helpers/Spells/getSpellKeyById.js +3 -7
- package/core/helpers/Spells/getSpellKeyByName.js +4 -8
- package/core/helpers/Spells/getSpellNameById.js +4 -8
- package/core/helpers/Spells/getSpellNameByKey.js +3 -7
- package/core/helpers/Spells/isSpellId.js +3 -7
- package/core/helpers/Spells/isSpellKey.js +3 -7
- package/core/helpers/Spells/isSpellKeyNum.js +3 -7
- package/core/helpers/Spells/isSpellName.js +3 -7
- package/core/helpers/getPositionImageUrl.js +3 -7
- package/core/helpers/isRiotId.js +7 -11
- package/core/helpers/makeRiotId.js +1 -5
- package/core/helpers/splitRiotId.js +1 -5
- package/core/index.d.ts +4 -0
- package/core/index.js +138 -150
- package/core/types/championJson.js +1 -2
- package/core/types/interfaces.js +1 -2
- package/core/types/types.js +1 -2
- package/package.json +9 -7
- package/assets/constants/OrnnItemNames.d.ts +0 -1
- package/assets/constants/OrnnItemNames.js +0 -33
- package/assets/scripts/generate-all.d.ts +0 -23
- package/assets/scripts/generate-all.js +0 -29
- package/core/constants/Items/OrnnItemKeys.d.ts +0 -23
- package/core/constants/Items/OrnnItemKeys.js +0 -4
- package/core/constants/Items/OrnnItemKeysNum.d.ts +0 -23
- package/core/constants/Items/OrnnItemKeysNum.js +0 -4
- package/core/constants/Items/OrnnItemNames.d.ts +0 -23
- package/core/constants/Items/OrnnItemNames.js +0 -4
- package/core/helpers/Items/isOrnnItemKey.d.ts +0 -2
- package/core/helpers/Items/isOrnnItemKey.js +0 -8
- package/core/helpers/Items/isOrnnItemKeyNum.d.ts +0 -2
- package/core/helpers/Items/isOrnnItemKeyNum.js +0 -8
- package/core/helpers/Items/isOrnnItemName.d.ts +0 -2
- package/core/helpers/Items/isOrnnItemName.js +0 -8
@@ -1,47 +1,45 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
const validateNumber_1 = require("./helpers/validateNumber");
|
7
|
-
const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
1
|
+
import { BootsItemNames } from '../constants/BootsItemNames';
|
2
|
+
import { Item } from '../constants/Item';
|
3
|
+
import { LegendaryItemNames } from '../constants/LegendaryItemNames';
|
4
|
+
import { validateNumber } from './helpers/validateNumber';
|
5
|
+
import { writeToTmpFile } from './helpers/writeToTmpFile';
|
8
6
|
(async () => {
|
9
7
|
const itemKeys = {
|
10
8
|
legendary: {},
|
11
9
|
boots: {},
|
12
10
|
};
|
13
11
|
// Add Legendary Items
|
14
|
-
for (const itemName of
|
12
|
+
for (const itemName of LegendaryItemNames) {
|
15
13
|
let itemKey;
|
16
|
-
for (itemKey in
|
17
|
-
const itemData =
|
14
|
+
for (itemKey in Item.data) {
|
15
|
+
const itemData = Item.data[itemKey];
|
18
16
|
// Filter out only for Summoner's Rift
|
19
17
|
if (!itemData.maps[11])
|
20
18
|
continue;
|
21
19
|
if (itemData.name == itemName) {
|
22
|
-
itemKeys.legendary[itemData.name] =
|
20
|
+
itemKeys.legendary[itemData.name] = validateNumber(itemKey, 'legendary-itemKey');
|
23
21
|
}
|
24
22
|
}
|
25
23
|
}
|
26
24
|
// Add Boots
|
27
|
-
for (const itemName of
|
25
|
+
for (const itemName of BootsItemNames) {
|
28
26
|
let itemKey;
|
29
|
-
for (itemKey in
|
30
|
-
const itemData =
|
27
|
+
for (itemKey in Item.data) {
|
28
|
+
const itemData = Item.data[itemKey];
|
31
29
|
// Filter out only for Summoner's Rift
|
32
30
|
if (!itemData.maps[11])
|
33
31
|
continue;
|
34
32
|
if (itemData.name == itemName) {
|
35
|
-
itemKeys.boots[itemData.name] =
|
33
|
+
itemKeys.boots[itemData.name] = validateNumber(itemKey, 'boots-itemKey');
|
36
34
|
}
|
37
35
|
}
|
38
36
|
}
|
39
|
-
|
37
|
+
writeToTmpFile('LegendaryItemKeysNum', {
|
40
38
|
constName: 'LegendaryItemKeysNum',
|
41
39
|
typeName: 'LegendaryItemKeyNum',
|
42
40
|
json: itemKeys.legendary,
|
43
41
|
});
|
44
|
-
|
42
|
+
writeToTmpFile('BootsItemKeysNum', {
|
45
43
|
constName: 'BootsItemKeysNum',
|
46
44
|
typeName: 'BootsItemKeyNum',
|
47
45
|
json: itemKeys.boots,
|
@@ -1,19 +1,17 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
const LegendaryItemNames_1 = require("../constants/LegendaryItemNames");
|
6
|
-
const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
1
|
+
import { BootsItemNames } from '../constants/BootsItemNames';
|
2
|
+
import { Item } from '../constants/Item';
|
3
|
+
import { LegendaryItemNames } from '../constants/LegendaryItemNames';
|
4
|
+
import { writeToTmpFile } from './helpers/writeToTmpFile';
|
7
5
|
(async () => {
|
8
6
|
const itemKeys = {
|
9
7
|
legendary: {},
|
10
8
|
boots: {},
|
11
9
|
};
|
12
10
|
// Add Legendary Items
|
13
|
-
for (const itemName of
|
11
|
+
for (const itemName of LegendaryItemNames) {
|
14
12
|
let itemKey;
|
15
|
-
for (itemKey in
|
16
|
-
const itemData =
|
13
|
+
for (itemKey in Item.data) {
|
14
|
+
const itemData = Item.data[itemKey];
|
17
15
|
// Filter out only for Summoner's Rift
|
18
16
|
if (!itemData.maps[11])
|
19
17
|
continue;
|
@@ -23,10 +21,10 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
23
21
|
}
|
24
22
|
}
|
25
23
|
// Add Boots
|
26
|
-
for (const itemName of
|
24
|
+
for (const itemName of BootsItemNames) {
|
27
25
|
let itemKey;
|
28
|
-
for (itemKey in
|
29
|
-
const itemData =
|
26
|
+
for (itemKey in Item.data) {
|
27
|
+
const itemData = Item.data[itemKey];
|
30
28
|
// Filter out only for Summoner's Rift
|
31
29
|
if (!itemData.maps[11])
|
32
30
|
continue;
|
@@ -35,12 +33,12 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
35
33
|
}
|
36
34
|
}
|
37
35
|
}
|
38
|
-
|
36
|
+
writeToTmpFile('LegendaryItemKeys', {
|
39
37
|
constName: 'LegendaryItemKeys',
|
40
38
|
includeAutoTypeName: true,
|
41
39
|
json: itemKeys.legendary,
|
42
40
|
});
|
43
|
-
|
41
|
+
writeToTmpFile('BootsItemKeys', {
|
44
42
|
constName: 'BootsItemKeys',
|
45
43
|
includeAutoTypeName: true,
|
46
44
|
json: itemKeys.boots,
|
@@ -1,19 +1,17 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
const LegendaryItemNames_1 = require("../constants/LegendaryItemNames");
|
6
|
-
const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
1
|
+
import { BootsItemNames } from '../constants/BootsItemNames';
|
2
|
+
import { Item } from '../constants/Item';
|
3
|
+
import { LegendaryItemNames } from '../constants/LegendaryItemNames';
|
4
|
+
import { writeToTmpFile } from './helpers/writeToTmpFile';
|
7
5
|
(async () => {
|
8
6
|
const itemNames = {
|
9
7
|
legendary: {},
|
10
8
|
boots: {},
|
11
9
|
};
|
12
10
|
// Add Legendary Items
|
13
|
-
for (const itemName of
|
11
|
+
for (const itemName of LegendaryItemNames) {
|
14
12
|
let itemKey;
|
15
|
-
for (itemKey in
|
16
|
-
const itemData =
|
13
|
+
for (itemKey in Item.data) {
|
14
|
+
const itemData = Item.data[itemKey];
|
17
15
|
// Filter out only for Summoner's Rift
|
18
16
|
if (!itemData.maps[11])
|
19
17
|
continue;
|
@@ -23,10 +21,10 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
23
21
|
}
|
24
22
|
}
|
25
23
|
// Add Boots
|
26
|
-
for (const itemName of
|
24
|
+
for (const itemName of BootsItemNames) {
|
27
25
|
let itemKey;
|
28
|
-
for (itemKey in
|
29
|
-
const itemData =
|
26
|
+
for (itemKey in Item.data) {
|
27
|
+
const itemData = Item.data[itemKey];
|
30
28
|
// Filter out only for Summoner's Rift
|
31
29
|
if (!itemData.maps[11])
|
32
30
|
continue;
|
@@ -35,12 +33,12 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
35
33
|
}
|
36
34
|
}
|
37
35
|
}
|
38
|
-
|
36
|
+
writeToTmpFile('LegendaryItemNames', {
|
39
37
|
constName: 'LegendaryItemNames',
|
40
38
|
includeAutoTypeName: true,
|
41
39
|
json: itemNames.legendary,
|
42
40
|
});
|
43
|
-
|
41
|
+
writeToTmpFile('BootsItemNames', {
|
44
42
|
constName: 'BootsItemNames',
|
45
43
|
includeAutoTypeName: true,
|
46
44
|
json: itemNames.boots,
|
@@ -1,18 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
const Champion_1 = require("../constants/Champion");
|
4
|
-
const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
1
|
+
import { Champion } from '../constants/Champion';
|
2
|
+
import { writeToTmpFile } from './helpers/writeToTmpFile';
|
5
3
|
(async () => {
|
6
4
|
const championIds = {};
|
7
5
|
// Extract all Champion IDs
|
8
6
|
let championId;
|
9
|
-
for (championId in
|
10
|
-
const championData =
|
7
|
+
for (championId in Champion.data) {
|
8
|
+
const championData = Champion.data[championId];
|
11
9
|
championIds[championData.name] = championId;
|
12
10
|
}
|
13
11
|
// Write to tmp file
|
14
12
|
const constName = 'ChampionIdsByName';
|
15
|
-
|
13
|
+
writeToTmpFile(constName, {
|
16
14
|
constName,
|
17
15
|
json: championIds,
|
18
16
|
});
|
@@ -1,18 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
const Champion_1 = require("../constants/Champion");
|
4
|
-
const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
1
|
+
import { Champion } from '../constants/Champion';
|
2
|
+
import { writeToTmpFile } from './helpers/writeToTmpFile';
|
5
3
|
(async () => {
|
6
4
|
const championIds = {};
|
7
5
|
// Extract all Champion IDs
|
8
6
|
let championId;
|
9
|
-
for (championId in
|
10
|
-
const championData =
|
7
|
+
for (championId in Champion.data) {
|
8
|
+
const championData = Champion.data[championId];
|
11
9
|
championIds[championData.key] = championId;
|
12
10
|
}
|
13
11
|
// Write to tmp file
|
14
12
|
const constName = 'ChampionIds';
|
15
|
-
|
13
|
+
writeToTmpFile(constName, {
|
16
14
|
constName,
|
17
15
|
includeAutoTypeName: true,
|
18
16
|
json: championIds,
|
@@ -1,20 +1,18 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const validateNumber_1 = require("./helpers/validateNumber");
|
5
|
-
const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
1
|
+
import { Champion } from '../constants/Champion';
|
2
|
+
import { validateNumber } from './helpers/validateNumber';
|
3
|
+
import { writeToTmpFile } from './helpers/writeToTmpFile';
|
6
4
|
(async () => {
|
7
5
|
const championKeys = {};
|
8
6
|
// Add all champions' data to each corresponding key value
|
9
7
|
let championId;
|
10
|
-
for (championId in
|
11
|
-
const championData =
|
12
|
-
championKeys[championId] =
|
8
|
+
for (championId in Champion.data) {
|
9
|
+
const championData = Champion.data[championId];
|
10
|
+
championKeys[championId] = validateNumber(championData.key, 'championKey');
|
13
11
|
}
|
14
12
|
// Write to file
|
15
13
|
const constName = 'ChampionKeysNum';
|
16
14
|
const typeName = 'ChampionKeyNum';
|
17
|
-
|
15
|
+
writeToTmpFile(constName, {
|
18
16
|
constName,
|
19
17
|
typeName,
|
20
18
|
json: championKeys,
|
@@ -1,18 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
const Champion_1 = require("../constants/Champion");
|
4
|
-
const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
1
|
+
import { Champion } from '../constants/Champion';
|
2
|
+
import { writeToTmpFile } from './helpers/writeToTmpFile';
|
5
3
|
(async () => {
|
6
4
|
const championKeys = {};
|
7
5
|
// Add all champions' data to each corresponding key value
|
8
6
|
let championId;
|
9
|
-
for (championId in
|
10
|
-
const championData =
|
7
|
+
for (championId in Champion.data) {
|
8
|
+
const championData = Champion.data[championId];
|
11
9
|
championKeys[championId] = championData.key;
|
12
10
|
}
|
13
11
|
// Write to file
|
14
12
|
const constName = 'ChampionKeys';
|
15
|
-
|
13
|
+
writeToTmpFile(constName, {
|
16
14
|
constName,
|
17
15
|
includeAutoTypeName: true,
|
18
16
|
json: championKeys,
|
@@ -1,18 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
const Champion_1 = require("../constants/Champion");
|
4
|
-
const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
1
|
+
import { Champion } from '../constants/Champion';
|
2
|
+
import { writeToTmpFile } from './helpers/writeToTmpFile';
|
5
3
|
(async () => {
|
6
4
|
const championNames = {};
|
7
5
|
// Extract all champion names from `champion.json`
|
8
6
|
let championId;
|
9
|
-
for (championId in
|
10
|
-
const championData =
|
7
|
+
for (championId in Champion.data) {
|
8
|
+
const championData = Champion.data[championId];
|
11
9
|
championNames[championData.key] = championData.name;
|
12
10
|
}
|
13
11
|
// Write to file
|
14
12
|
const constName = 'ChampionNames';
|
15
|
-
|
13
|
+
writeToTmpFile(constName, {
|
16
14
|
constName,
|
17
15
|
includeAutoTypeName: true,
|
18
16
|
json: championNames,
|
@@ -1,24 +1,22 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const validateNumber_1 = require("./helpers/validateNumber");
|
5
|
-
const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
1
|
+
import { Item } from '../constants/Item';
|
2
|
+
import { validateNumber } from './helpers/validateNumber';
|
3
|
+
import { writeToTmpFile } from './helpers/writeToTmpFile';
|
6
4
|
(async () => {
|
7
5
|
const itemKeys = {};
|
8
6
|
// Add all items' data to each corresponding name value
|
9
7
|
let itemKey;
|
10
|
-
for (itemKey in
|
11
|
-
const itemData =
|
8
|
+
for (itemKey in Item.data) {
|
9
|
+
const itemData = Item.data[itemKey];
|
12
10
|
// Filter out only for Summoner's Rift
|
13
11
|
if (!itemData.maps[11])
|
14
12
|
continue;
|
15
13
|
let htmlEscapedName = itemData.name.replace(/<[^>]*>?/gm, '');
|
16
|
-
itemKeys[htmlEscapedName] =
|
14
|
+
itemKeys[htmlEscapedName] = validateNumber(itemKey, 'itemKey');
|
17
15
|
}
|
18
16
|
// Write to file
|
19
17
|
const constName = 'ItemKeysNum';
|
20
18
|
const typeName = 'ItemKeyNum';
|
21
|
-
|
19
|
+
writeToTmpFile(constName, {
|
22
20
|
constName,
|
23
21
|
typeName,
|
24
22
|
json: itemKeys,
|
@@ -1,13 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
const Item_1 = require("../constants/Item");
|
4
|
-
const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
1
|
+
import { Item } from '../constants/Item';
|
2
|
+
import { writeToTmpFile } from './helpers/writeToTmpFile';
|
5
3
|
(async () => {
|
6
4
|
const itemKeys = {};
|
7
5
|
// Add all items' data to each corresponding name value
|
8
6
|
let itemKey;
|
9
|
-
for (itemKey in
|
10
|
-
const itemData =
|
7
|
+
for (itemKey in Item.data) {
|
8
|
+
const itemData = Item.data[itemKey];
|
11
9
|
// Filter out only for Summoner's Rift
|
12
10
|
if (!itemData.maps[11])
|
13
11
|
continue;
|
@@ -16,7 +14,7 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
16
14
|
}
|
17
15
|
// Write to file
|
18
16
|
const constName = 'ItemKeys';
|
19
|
-
|
17
|
+
writeToTmpFile(constName, {
|
20
18
|
constName,
|
21
19
|
includeAutoTypeName: true,
|
22
20
|
json: itemKeys,
|
@@ -1,13 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
const Item_1 = require("../constants/Item");
|
4
|
-
const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
1
|
+
import { Item } from '../constants/Item';
|
2
|
+
import { writeToTmpFile } from './helpers/writeToTmpFile';
|
5
3
|
(async () => {
|
6
4
|
const itemNames = {};
|
7
5
|
// Add all items' data to each corresponding name value
|
8
6
|
let itemKey;
|
9
|
-
for (itemKey in
|
10
|
-
const itemData =
|
7
|
+
for (itemKey in Item.data) {
|
8
|
+
const itemData = Item.data[itemKey];
|
11
9
|
// Filter out only for Summoner's Rift
|
12
10
|
if (!itemData.maps[11])
|
13
11
|
continue;
|
@@ -16,7 +14,7 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
16
14
|
}
|
17
15
|
// Write to file
|
18
16
|
const constName = 'ItemNames';
|
19
|
-
|
17
|
+
writeToTmpFile(constName, {
|
20
18
|
constName,
|
21
19
|
includeAutoTypeName: true,
|
22
20
|
json: itemNames,
|
@@ -1,11 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
const RunesReforged_1 = require("../constants/RunesReforged");
|
4
|
-
const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
1
|
+
import { RunesReforged } from '../constants/RunesReforged';
|
2
|
+
import { writeToTmpFile } from './helpers/writeToTmpFile';
|
5
3
|
(async () => {
|
6
4
|
const runeIds = {};
|
7
5
|
// Construct the new data and assign it to product object
|
8
|
-
for (const runeTree of
|
6
|
+
for (const runeTree of RunesReforged) {
|
9
7
|
for (const { runes } of runeTree.slots) {
|
10
8
|
for (const rune of runes) {
|
11
9
|
runeIds[rune.name] = rune.id;
|
@@ -15,7 +13,7 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
15
13
|
// Write to file
|
16
14
|
const constName = 'NonStatRuneIdsNum';
|
17
15
|
const typeName = 'NonStatRuneIdNum';
|
18
|
-
|
16
|
+
writeToTmpFile(constName, {
|
19
17
|
constName,
|
20
18
|
typeName,
|
21
19
|
json: runeIds,
|
@@ -1,12 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
5
|
-
const RuneIdComment_1 = require("./constants/RuneIdComment");
|
1
|
+
import { RunesReforged } from '../constants/RunesReforged';
|
2
|
+
import { writeToTmpFile } from './helpers/writeToTmpFile';
|
3
|
+
import { RuneIdComment } from './constants/RuneIdComment';
|
6
4
|
(async () => {
|
7
5
|
const runeIds = {};
|
8
6
|
// Construct the new data and assign it to product object
|
9
|
-
for (const runeTree of
|
7
|
+
for (const runeTree of RunesReforged) {
|
10
8
|
for (const { runes } of runeTree.slots) {
|
11
9
|
for (const rune of runes) {
|
12
10
|
runeIds[rune.name] = String(rune.id);
|
@@ -15,10 +13,10 @@ const RuneIdComment_1 = require("./constants/RuneIdComment");
|
|
15
13
|
}
|
16
14
|
// Write to file
|
17
15
|
const constName = 'NonStatRuneIds';
|
18
|
-
|
16
|
+
writeToTmpFile(constName, {
|
19
17
|
constName,
|
20
18
|
includeAutoTypeName: true,
|
21
|
-
typeComment:
|
19
|
+
typeComment: RuneIdComment,
|
22
20
|
json: runeIds,
|
23
21
|
});
|
24
22
|
})();
|
@@ -1,11 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
const RunesReforged_1 = require("../constants/RunesReforged");
|
4
|
-
const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
1
|
+
import { RunesReforged } from '../constants/RunesReforged';
|
2
|
+
import { writeToTmpFile } from './helpers/writeToTmpFile';
|
5
3
|
(async () => {
|
6
4
|
const runeNames = {};
|
7
5
|
// Construct the new data and assign it to product object
|
8
|
-
for (const runeTree of
|
6
|
+
for (const runeTree of RunesReforged) {
|
9
7
|
for (const { runes } of runeTree.slots) {
|
10
8
|
for (const rune of runes) {
|
11
9
|
runeNames[rune.id] = rune.name;
|
@@ -14,7 +12,7 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
14
12
|
}
|
15
13
|
// Write to file
|
16
14
|
const constName = 'NonStatRuneNames';
|
17
|
-
|
15
|
+
writeToTmpFile(constName, {
|
18
16
|
constName,
|
19
17
|
includeAutoTypeName: true,
|
20
18
|
json: runeNames,
|
@@ -1,13 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
const RuneIdComment_1 = require("./constants/RuneIdComment");
|
6
|
-
const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
1
|
+
import { RunesReforged } from '../constants/RunesReforged';
|
2
|
+
import { StatRunes } from '../constants/StatRunes';
|
3
|
+
import { RuneIdComment } from './constants/RuneIdComment';
|
4
|
+
import { writeToTmpFile } from './helpers/writeToTmpFile';
|
7
5
|
(async () => {
|
8
6
|
const runeIds = {};
|
9
7
|
// Construct the new data and assign it to product object
|
10
|
-
for (const runeTree of
|
8
|
+
for (const runeTree of RunesReforged) {
|
11
9
|
for (const { runes } of runeTree.slots) {
|
12
10
|
for (const rune of runes) {
|
13
11
|
runeIds[rune.name] = String(rune.id);
|
@@ -15,15 +13,15 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
15
13
|
}
|
16
14
|
}
|
17
15
|
// Add Stat Runes
|
18
|
-
for (const { description, id: statRuneId, } of
|
16
|
+
for (const { description, id: statRuneId, } of StatRunes) {
|
19
17
|
runeIds[description] = statRuneId;
|
20
18
|
}
|
21
19
|
// Write to file
|
22
20
|
const constName = 'RuneIds';
|
23
|
-
|
21
|
+
writeToTmpFile(constName, {
|
24
22
|
constName,
|
25
23
|
includeAutoTypeName: true,
|
26
|
-
typeComment:
|
24
|
+
typeComment: RuneIdComment,
|
27
25
|
json: runeIds,
|
28
26
|
});
|
29
27
|
})();
|
@@ -1,12 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const StatRunes_1 = require("../constants/StatRunes");
|
5
|
-
const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
1
|
+
import { RunesReforged } from '../constants/RunesReforged';
|
2
|
+
import { StatRunes } from '../constants/StatRunes';
|
3
|
+
import { writeToTmpFile } from './helpers/writeToTmpFile';
|
6
4
|
(async () => {
|
7
5
|
const runeNames = {};
|
8
6
|
// Construct the new data and assign it to product object
|
9
|
-
for (const runeTree of
|
7
|
+
for (const runeTree of RunesReforged) {
|
10
8
|
for (const { runes } of runeTree.slots) {
|
11
9
|
for (const rune of runes) {
|
12
10
|
runeNames[rune.id] = rune.name;
|
@@ -14,12 +12,12 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
14
12
|
}
|
15
13
|
}
|
16
14
|
// Add Stat Runes
|
17
|
-
for (const { description, id: statRuneId, } of
|
15
|
+
for (const { description, id: statRuneId, } of StatRunes) {
|
18
16
|
runeNames[statRuneId] = description;
|
19
17
|
}
|
20
18
|
// Write to file
|
21
19
|
const constName = 'RuneNames';
|
22
|
-
|
20
|
+
writeToTmpFile(constName, {
|
23
21
|
constName,
|
24
22
|
includeAutoTypeName: true,
|
25
23
|
json: runeNames,
|
@@ -1,7 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
const RunesReforged_1 = require("../constants/RunesReforged");
|
4
|
-
const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
1
|
+
import { RunesReforged } from '../constants/RunesReforged';
|
2
|
+
import { writeToTmpFile } from './helpers/writeToTmpFile';
|
5
3
|
(async () => {
|
6
4
|
const constant = 'RunePickingRelationships';
|
7
5
|
const relationships = {};
|
@@ -10,7 +8,7 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
10
8
|
// It means that they are dependent on that rune
|
11
9
|
// for picking purposes.
|
12
10
|
// Only one rune can be picked per h-set.
|
13
|
-
for (const category of
|
11
|
+
for (const category of RunesReforged) {
|
14
12
|
for (const { runes, } of category.slots) {
|
15
13
|
for (const { id: baseRuneId, } of runes) {
|
16
14
|
// Assign each of the neighboring runes to this rune's r-ship array.
|
@@ -46,7 +44,7 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
46
44
|
}
|
47
45
|
}
|
48
46
|
}
|
49
|
-
await
|
47
|
+
await writeToTmpFile(constant, {
|
50
48
|
constName: constant,
|
51
49
|
comment: `All of the runes and their relationships to other runes in terms of picking. Only one rune can be picked in a rune horizontal-set, each main rune that has a relationship to another rune unselects the other rune if the main rune is picked.`,
|
52
50
|
json: relationships,
|
@@ -1,10 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
const validateNumber_1 = require("./helpers/validateNumber");
|
7
|
-
const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
1
|
+
import { RunesReforged } from '../constants/RunesReforged';
|
2
|
+
import { StatRunesByRow } from '../constants/StatRunesByRow';
|
3
|
+
import { RuneIdComment } from './constants/RuneIdComment';
|
4
|
+
import { validateNumber } from './helpers/validateNumber';
|
5
|
+
import { writeToTmpFile } from './helpers/writeToTmpFile';
|
8
6
|
(async () => {
|
9
7
|
const constant = 'RuneSetsByRuneNamesNum';
|
10
8
|
const runeSets = {
|
@@ -17,7 +15,7 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
17
15
|
};
|
18
16
|
const keystoneHSetIdx = 0;
|
19
17
|
let totalRuneAmt = 0;
|
20
|
-
for (const runeTree of
|
18
|
+
for (const runeTree of RunesReforged) {
|
21
19
|
const runeTreeName = runeTree.name;
|
22
20
|
const horizontalSets = runeTree.slots;
|
23
21
|
let currentHSetIdx = 0;
|
@@ -50,10 +48,10 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
50
48
|
++currentHSetIdx;
|
51
49
|
}
|
52
50
|
}
|
53
|
-
for (let hSetIdx in
|
54
|
-
const hSetRunes =
|
51
|
+
for (let hSetIdx in StatRunesByRow) {
|
52
|
+
const hSetRunes = StatRunesByRow[hSetIdx];
|
55
53
|
for (let [statRuneId, statRuneName] of Object.entries(hSetRunes)) {
|
56
|
-
let statRuneIdNum =
|
54
|
+
let statRuneIdNum = validateNumber(statRuneId, 'statRuneId');
|
57
55
|
// Keep track
|
58
56
|
totalRuneAmt += 1;
|
59
57
|
// Add to StatRuneIds
|
@@ -65,7 +63,7 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
65
63
|
}
|
66
64
|
}
|
67
65
|
// Write to file
|
68
|
-
await
|
66
|
+
await writeToTmpFile(constant, {
|
69
67
|
constName: 'PrimaryRuneTreesByRuneNamesNum',
|
70
68
|
json: runeSets.PrimaryRuneTrees,
|
71
69
|
}, {
|
@@ -77,12 +75,12 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
77
75
|
}, {
|
78
76
|
constName: 'StatRuneIdsNum',
|
79
77
|
typeName: 'StatRuneIdNum',
|
80
|
-
typeComment:
|
78
|
+
typeComment: RuneIdComment,
|
81
79
|
json: runeSets.StatRuneIds,
|
82
80
|
}, {
|
83
81
|
constName: 'RuneIdsNum',
|
84
82
|
typeName: 'RuneIdNum',
|
85
|
-
typeComment:
|
83
|
+
typeComment: RuneIdComment,
|
86
84
|
json: {
|
87
85
|
1: '...PrimaryRuneTreesByRuneNamesNum.Precision',
|
88
86
|
2: '...PrimaryRuneTreesByRuneNamesNum.Domination',
|