enefel 1.0.167 → 1.0.169
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/career.js +2 -2
- package/game.js +5 -0
- package/index.js +8 -1
- package/package.json +1 -1
- package/time.js +2 -2
package/career.js
CHANGED
package/game.js
CHANGED
|
@@ -18,6 +18,10 @@ const GAME_STATUS = {
|
|
|
18
18
|
HALFTIME: 6,
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
+
const isGameFinish = (game) => {
|
|
22
|
+
return game.status === GAME_STATUS.END || game.status === GAME_STATUS.FINISH;
|
|
23
|
+
};
|
|
24
|
+
|
|
21
25
|
const hasGameCasualty = (game) => {
|
|
22
26
|
return game.type !== GAME_TYPE.FRIENDLY;
|
|
23
27
|
};
|
|
@@ -65,4 +69,5 @@ module.exports = {
|
|
|
65
69
|
getGameFanBonus,
|
|
66
70
|
hasGameCasualty,
|
|
67
71
|
isGameFirstHalfTime,
|
|
72
|
+
isGameFinish,
|
|
68
73
|
};
|
package/index.js
CHANGED
|
@@ -203,6 +203,8 @@ const PLAYER_HISTORY_TYPE = {
|
|
|
203
203
|
REMOVE_FROM_TEAM: "rt",
|
|
204
204
|
SKILL: "s",
|
|
205
205
|
RAZ: "raz",
|
|
206
|
+
RETIRED: "ret",
|
|
207
|
+
RETIRED_END: "retend",
|
|
206
208
|
};
|
|
207
209
|
|
|
208
210
|
const PLAYER_HISTORY_INFO = {
|
|
@@ -922,7 +924,12 @@ const getInactiveDays = (isDev = false) => {
|
|
|
922
924
|
};
|
|
923
925
|
|
|
924
926
|
const getMaxPlayers = (isDev = false) => {
|
|
925
|
-
|
|
927
|
+
let maxPlayers = MAX_PLAYER_USER;
|
|
928
|
+
if (isDev) {
|
|
929
|
+
maxPlayers = 10000;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
return maxPlayers;
|
|
926
933
|
};
|
|
927
934
|
|
|
928
935
|
module.exports = {
|
package/package.json
CHANGED
package/time.js
CHANGED
|
@@ -46,8 +46,8 @@ const getTime = (type) => {
|
|
|
46
46
|
// between each league games
|
|
47
47
|
const TIME_BETWEEN_GAME_LEAGUE = TIME_GAME + 2 * 24 * 60 * 60;
|
|
48
48
|
|
|
49
|
-
// 2 months
|
|
50
|
-
const TIME_SEASON_IF_NO_LEAGUE = 60 * 24 * 60 * 30;
|
|
49
|
+
// 2 months
|
|
50
|
+
const TIME_SEASON_IF_NO_LEAGUE = 60 * 24 * 60 * 30 * 2;
|
|
51
51
|
|
|
52
52
|
switch (type) {
|
|
53
53
|
case TYPE_TIMER.HALF_TIME_GAME:
|