enefel 2.11.11 → 2.11.16

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,12 +1,12 @@
1
1
  {
2
2
  "name": "enefel",
3
- "version": "2.11.11",
3
+ "version": "2.11.16",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "enefel",
9
- "version": "2.11.11",
9
+ "version": "2.11.16",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "csv-parse": "^6.1.0",
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "enefel",
3
- "version": "2.11.11",
3
+ "version": "2.11.16",
4
4
  "description": "Fantasy Football game engine",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/dist/player.js CHANGED
@@ -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]: 0, // 0 = pas de 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 <= 0)
209
- return CARAC_MIN[PLAYER_CARAC.PA]; // 0 = pas de 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "enefel",
3
- "version": "2.11.11",
3
+ "version": "2.11.16",
4
4
  "description": "Fantasy Football game engine",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/player.ts CHANGED
@@ -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]: 0, // 0 = pas de 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 <= 0) return CARAC_MIN[PLAYER_CARAC.PA]; // 0 = pas de PA
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
  }