enefel 2.9.1 → 2.11.0
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.
- package/.claude/settings.local.json +7 -0
- package/2025/newSkills.ts +769 -0
- package/2025/raceMigration.ts +66 -0
- package/2025/rawTeamsData.ts +1726 -0
- package/2025/skillMigration.ts +155 -0
- package/avatarsSeason.ts +61 -0
- package/career.ts +64 -8
- package/career2025.ts +2752 -0
- package/dice.ts +40 -8
- package/dist/2025/newSkills.d.ts +10 -0
- package/dist/2025/newSkills.js +663 -0
- package/dist/2025/raceMigration.d.ts +10 -0
- package/dist/2025/raceMigration.js +53 -0
- package/dist/2025/rawTeamsData.d.ts +12 -0
- package/dist/2025/rawTeamsData.js +1699 -0
- package/dist/2025/skillMigration.d.ts +31 -0
- package/dist/2025/skillMigration.js +95 -0
- package/dist/avatarsSeason.d.ts +22 -0
- package/dist/avatarsSeason.js +54 -0
- package/dist/career.d.ts +13 -4
- package/dist/career.js +36 -7
- package/dist/career2025.d.ts +192 -0
- package/dist/career2025.js +2611 -0
- package/dist/dice.d.ts +10 -2
- package/dist/dice.js +31 -8
- package/dist/index.d.ts +17 -2
- package/dist/index.js +44 -5
- package/dist/move.d.ts +6 -2
- package/dist/move.js +35 -0
- package/dist/package-lock.json +913 -7
- package/dist/package.json +6 -2
- package/dist/pitch.d.ts +10 -1
- package/dist/pitch.js +16 -0
- package/dist/player.d.ts +8 -4
- package/dist/player.js +104 -20
- package/dist/position.d.ts +4 -0
- package/dist/position.js +17 -1
- package/dist/race.d.ts +23 -12
- package/dist/race.js +210 -2
- package/dist/skill.d.ts +26 -3
- package/dist/skill.js +199 -81
- package/dist/skills/hitAndRun.d.ts +10 -0
- package/dist/skills/hitAndRun.js +12 -0
- package/dist/skills/safePairOfHands.d.ts +28 -0
- package/dist/skills/safePairOfHands.js +18 -0
- package/dist/skills/sidestep.d.ts +21 -0
- package/dist/skills/sidestep.js +20 -0
- package/dist/status.d.ts +4 -1
- package/dist/status.js +14 -4
- package/dist/store.d.ts +3 -0
- package/dist/store.js +3 -0
- package/dist/teams/career_v2025.d.ts +246 -0
- package/dist/teams/career_v2025.js +3512 -0
- package/dist/teams/convert-csv-to-career.d.ts +1 -0
- package/dist/teams/convert-csv-to-career.js +1085 -0
- package/dist/types/models.d.ts +4 -0
- package/index.ts +57 -4
- package/jest.config.js +3 -0
- package/move.ts +50 -2
- package/npm-login.sh +0 -0
- package/package.json +6 -2
- package/pitch.ts +22 -0
- package/player.ts +105 -22
- package/position.ts +16 -0
- package/race.ts +227 -13
- package/skill.ts +217 -83
- package/skills/hitAndRun.ts +14 -0
- package/skills/safePairOfHands.ts +33 -0
- package/skills/sidestep.ts +25 -0
- package/status.ts +15 -3
- package/store.ts +3 -0
- package/teams/README.md +53 -0
- package/teams/clean-stats.js +54 -0
- package/teams/convert-csv-to-career.ts +1209 -0
- package/teams/players_clean.csv +107 -0
- package/teams/players_next.csv +21 -0
- package/types/models.ts +4 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { RACE as RACE_LEGACY } from "../career";
|
|
2
|
+
import { RACE as RACE_NEXT } from "../career2025";
|
|
3
|
+
|
|
4
|
+
type RaceMigrationRow = {
|
|
5
|
+
key: string;
|
|
6
|
+
legacy?: RACE_LEGACY;
|
|
7
|
+
next?: RACE_NEXT;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const synonymKey = (value: string): string => {
|
|
11
|
+
const normalized = value
|
|
12
|
+
.replace(/-?career/i, "")
|
|
13
|
+
.replace(/-/g, " ")
|
|
14
|
+
.trim()
|
|
15
|
+
.toLowerCase();
|
|
16
|
+
|
|
17
|
+
const aliases: Record<string, string> = {
|
|
18
|
+
gobelin: "goblin",
|
|
19
|
+
goblin: "goblin",
|
|
20
|
+
rat: "skaven",
|
|
21
|
+
skaven: "skaven",
|
|
22
|
+
"dark elfe": "dark elf",
|
|
23
|
+
"dark elf": "dark elf",
|
|
24
|
+
silvan: "wood elf",
|
|
25
|
+
"wood elf": "wood elf",
|
|
26
|
+
"imperial nobility": "imperial",
|
|
27
|
+
"old world alliance": "old world alliance",
|
|
28
|
+
"chaos renegate": "chaos renegade",
|
|
29
|
+
"chaos renegade": "chaos renegade",
|
|
30
|
+
"necromantic horror": "necromantic",
|
|
31
|
+
chaos: "chaos",
|
|
32
|
+
"chaos chosen": "chaos",
|
|
33
|
+
undead: "undead",
|
|
34
|
+
"shambling undead": "undead",
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
return aliases[normalized] ?? normalized;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const buildRaceMigrationRows = (): RaceMigrationRow[] => {
|
|
41
|
+
const legacy = (Object.values(RACE_LEGACY) as string[]).map((race) => ({
|
|
42
|
+
key: synonymKey(race),
|
|
43
|
+
legacy: race as RACE_LEGACY,
|
|
44
|
+
}));
|
|
45
|
+
|
|
46
|
+
const next = (Object.values(RACE_NEXT) as string[]).map((race) => ({
|
|
47
|
+
key: synonymKey(race),
|
|
48
|
+
next: race as RACE_NEXT,
|
|
49
|
+
}));
|
|
50
|
+
|
|
51
|
+
const map = new Map<string, RaceMigrationRow>();
|
|
52
|
+
|
|
53
|
+
legacy.forEach(({ key, legacy: value }) => {
|
|
54
|
+
map.set(key, { ...(map.get(key) ?? {}), key, legacy: value });
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
next.forEach(({ key, next: value }) => {
|
|
58
|
+
map.set(key, { ...(map.get(key) ?? {}), key, next: value });
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
return Array.from(map.values()).sort((a, b) => a.key.localeCompare(b.key));
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const raceMigrationRows = buildRaceMigrationRows();
|
|
65
|
+
|
|
66
|
+
export { buildRaceMigrationRows, RaceMigrationRow, raceMigrationRows };
|