enefel 2.11.5 → 2.11.15
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/dist/index.js +1 -1
- package/dist/package-lock.json +2 -2
- package/dist/package.json +2 -2
- package/dist/player.js +4 -4
- package/index.ts +1 -1
- package/npm-publish.sh +0 -17
- package/package.json +2 -2
- package/player.ts +3 -3
- package/teams/README.md +1 -1
package/dist/index.js
CHANGED
|
@@ -565,7 +565,7 @@ const availableSquaresToPushBack = (p1, p2) => {
|
|
|
565
565
|
exports.availableSquaresToPushBack = availableSquaresToPushBack;
|
|
566
566
|
// playerFrom, pointTo, foe
|
|
567
567
|
const isOnLine = (A, B, C) => {
|
|
568
|
-
//
|
|
568
|
+
// Interception table reference
|
|
569
569
|
const AC = (0, calcul_1.distance)(A, C);
|
|
570
570
|
const BC = (0, calcul_1.distance)(B, C);
|
|
571
571
|
const AB = (0, calcul_1.distance)(A, B);
|
package/dist/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "enefel",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.15",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "enefel",
|
|
9
|
-
"version": "2.11.
|
|
9
|
+
"version": "2.11.15",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"csv-parse": "^6.1.0",
|
package/dist/package.json
CHANGED
package/dist/player.js
CHANGED
|
@@ -45,7 +45,7 @@ var PLAYER_CARAC;
|
|
|
45
45
|
PLAYER_CARAC["ST"] = "ST";
|
|
46
46
|
PLAYER_CARAC["PA"] = "PA";
|
|
47
47
|
})(PLAYER_CARAC || (exports.PLAYER_CARAC = PLAYER_CARAC = {}));
|
|
48
|
-
// Valeurs maximales absolues des caractéristiques (
|
|
48
|
+
// Valeurs maximales absolues des caractéristiques (rulebook 2020)
|
|
49
49
|
const CARAC_MAX = {
|
|
50
50
|
[PLAYER_CARAC.MA]: 9,
|
|
51
51
|
[PLAYER_CARAC.ST]: 8,
|
|
@@ -59,7 +59,7 @@ const CARAC_MIN = {
|
|
|
59
59
|
[PLAYER_CARAC.MA]: 1,
|
|
60
60
|
[PLAYER_CARAC.ST]: 1,
|
|
61
61
|
[PLAYER_CARAC.AG]: 1, // interne 1 = affichage 6+
|
|
62
|
-
[PLAYER_CARAC.PA]:
|
|
62
|
+
[PLAYER_CARAC.PA]: 1, // interne 1 = affichage 6+
|
|
63
63
|
[PLAYER_CARAC.AV]: 2, // interne 2 = affichage 3+
|
|
64
64
|
};
|
|
65
65
|
exports.CARAC_MIN = CARAC_MIN;
|
|
@@ -205,8 +205,8 @@ function getMaxMA(player, game) {
|
|
|
205
205
|
return c;
|
|
206
206
|
}
|
|
207
207
|
function clampPA(c) {
|
|
208
|
-
if (c
|
|
209
|
-
return CARAC_MIN[PLAYER_CARAC.PA];
|
|
208
|
+
if (c < CARAC_MIN[PLAYER_CARAC.PA])
|
|
209
|
+
return CARAC_MIN[PLAYER_CARAC.PA];
|
|
210
210
|
if (c > CARAC_MAX[PLAYER_CARAC.PA])
|
|
211
211
|
return CARAC_MAX[PLAYER_CARAC.PA];
|
|
212
212
|
return c;
|
package/index.ts
CHANGED
|
@@ -617,7 +617,7 @@ const availableSquaresToPushBack = (p1: Point, p2: Point) => {
|
|
|
617
617
|
|
|
618
618
|
// playerFrom, pointTo, foe
|
|
619
619
|
const isOnLine = (A: Point, B: Point, C: Point) => {
|
|
620
|
-
//
|
|
620
|
+
// Interception table reference
|
|
621
621
|
const AC = distance(A, C);
|
|
622
622
|
const BC = distance(B, C);
|
|
623
623
|
const AB = distance(A, B);
|
package/npm-publish.sh
CHANGED
|
@@ -67,23 +67,6 @@ esac
|
|
|
67
67
|
echo -e "${BLUE}Construction du package...${NC}"
|
|
68
68
|
npm run build
|
|
69
69
|
|
|
70
|
-
# Proposer un dry-run
|
|
71
|
-
echo -e "${BLUE}Souhaitez-vous effectuer une simulation de publication (dry-run) avant de publier ?${NC}"
|
|
72
|
-
read -p "Simuler la publication (o/n): " dry_run
|
|
73
|
-
|
|
74
|
-
if [[ $dry_run == "o" || $dry_run == "O" || $dry_run == "oui" || $dry_run == "Oui" ]]; then
|
|
75
|
-
echo -e "${BLUE}Simulation de publication...${NC}"
|
|
76
|
-
npm publish --dry-run
|
|
77
|
-
|
|
78
|
-
echo -e "${BLUE}Voulez-vous continuer avec la publication réelle ?${NC}"
|
|
79
|
-
read -p "Publier (o/n): " confirm_publish
|
|
80
|
-
|
|
81
|
-
if [[ $confirm_publish != "o" && $confirm_publish != "O" && $confirm_publish != "oui" && $confirm_publish != "Oui" ]]; then
|
|
82
|
-
echo -e "${YELLOW}Publication annulée.${NC}"
|
|
83
|
-
exit 0
|
|
84
|
-
fi
|
|
85
|
-
fi
|
|
86
|
-
|
|
87
70
|
# Publier le package
|
|
88
71
|
echo -e "${BLUE}Publication du package...${NC}"
|
|
89
72
|
npm publish
|
package/package.json
CHANGED
package/player.ts
CHANGED
|
@@ -21,7 +21,7 @@ enum PLAYER_CARAC {
|
|
|
21
21
|
PA = "PA",
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
// Valeurs maximales absolues des caractéristiques (
|
|
24
|
+
// Valeurs maximales absolues des caractéristiques (rulebook 2020)
|
|
25
25
|
const CARAC_MAX: Record<PLAYER_CARAC, number> = {
|
|
26
26
|
[PLAYER_CARAC.MA]: 9,
|
|
27
27
|
[PLAYER_CARAC.ST]: 8,
|
|
@@ -35,7 +35,7 @@ const CARAC_MIN: Record<PLAYER_CARAC, number> = {
|
|
|
35
35
|
[PLAYER_CARAC.MA]: 1,
|
|
36
36
|
[PLAYER_CARAC.ST]: 1,
|
|
37
37
|
[PLAYER_CARAC.AG]: 1, // interne 1 = affichage 6+
|
|
38
|
-
[PLAYER_CARAC.PA]:
|
|
38
|
+
[PLAYER_CARAC.PA]: 1, // interne 1 = affichage 6+
|
|
39
39
|
[PLAYER_CARAC.AV]: 2, // interne 2 = affichage 3+
|
|
40
40
|
};
|
|
41
41
|
|
|
@@ -196,7 +196,7 @@ function getMaxMA(player: Player, game: Game) {
|
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
function clampPA(c: number): number {
|
|
199
|
-
if (c
|
|
199
|
+
if (c < CARAC_MIN[PLAYER_CARAC.PA]) return CARAC_MIN[PLAYER_CARAC.PA];
|
|
200
200
|
if (c > CARAC_MAX[PLAYER_CARAC.PA]) return CARAC_MAX[PLAYER_CARAC.PA];
|
|
201
201
|
return c;
|
|
202
202
|
}
|
package/teams/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## convert-csv-to-career.ts
|
|
4
4
|
|
|
5
|
-
Ce script convertit le fichier CSV `players_clean.csv` en un fichier TypeScript `career_v2025.ts` similaire à `career.ts` mais avec les nouvelles équipes et races
|
|
5
|
+
Ce script convertit le fichier CSV `players_clean.csv` en un fichier TypeScript `career_v2025.ts` similaire à `career.ts` mais avec les nouvelles équipes et races de la version 2025.
|
|
6
6
|
|
|
7
7
|
### Utilisation
|
|
8
8
|
|