enefel 1.0.136 → 1.0.137
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/game.js +3 -1
- package/package.json +1 -1
- package/skill.js +14 -4
- package/time.js +2 -3
package/game.js
CHANGED
|
@@ -40,7 +40,9 @@ const getDateStartHalfTime = (game) => {
|
|
|
40
40
|
const start = new Date(game.date_start);
|
|
41
41
|
const end = new Date(game.date_end);
|
|
42
42
|
return new Date(
|
|
43
|
-
start.getTime() +
|
|
43
|
+
start.getTime() +
|
|
44
|
+
(end.getTime() - start.getTime()) / 2 -
|
|
45
|
+
(getTime(TYPE_TIMER.HALF_TIME_PAUSE) * 1000) / 2
|
|
44
46
|
);
|
|
45
47
|
};
|
|
46
48
|
|
package/package.json
CHANGED
package/skill.js
CHANGED
|
@@ -16,10 +16,8 @@ const SKILL_DURATION = {
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
// TODO
|
|
19
|
-
// Take Root
|
|
20
19
|
// Timmm-ber!
|
|
21
20
|
// SKILL_NAMES.SIDE_STEP, // +1push et +1mouv?
|
|
22
|
-
// SKILL_NAMES.PLAGUE_RIDDEN // Immuniser nurgle
|
|
23
21
|
// Swarming // il en faut autant sur le terrain
|
|
24
22
|
|
|
25
23
|
// Missing for races
|
|
@@ -356,8 +354,18 @@ const helpSkillsToDisplay = {
|
|
|
356
354
|
[SKILL_NAMES.STAND_FIRM]: { actif: false, color: "#550099" },
|
|
357
355
|
};
|
|
358
356
|
|
|
357
|
+
const hasToAgilityJumpUp = (player) => {
|
|
358
|
+
const skill = getSkill(player, SKILL_NAMES.JUMP_UP);
|
|
359
|
+
if (skill && skill.date_next) {
|
|
360
|
+
if (new Date(skill.date_next) > new Date(Date.now())) {
|
|
361
|
+
return true;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
return false;
|
|
366
|
+
};
|
|
367
|
+
|
|
359
368
|
module.exports = {
|
|
360
|
-
helpSkillsToDisplay,
|
|
361
369
|
BIG_GUY_LIMIT,
|
|
362
370
|
getDisturbingPresenceMalus,
|
|
363
371
|
getPlayersWithSkill,
|
|
@@ -368,12 +376,14 @@ module.exports = {
|
|
|
368
376
|
getStarLimit,
|
|
369
377
|
hasSkill,
|
|
370
378
|
hasSkillDisplayableInfo,
|
|
379
|
+
hasToAgilityJumpUp,
|
|
380
|
+
helpSkillsToDisplay,
|
|
371
381
|
isActivableSkills,
|
|
372
382
|
isSpecialSkill,
|
|
383
|
+
SKILL_DURATION,
|
|
373
384
|
SKILL_INFO_ACTIVE,
|
|
374
385
|
SKILL_INFO_INACTIVE,
|
|
375
386
|
SKILL_NAMES,
|
|
376
|
-
SKILL_DURATION,
|
|
377
387
|
SKILLS,
|
|
378
388
|
useSkill,
|
|
379
389
|
};
|
package/time.js
CHANGED
|
@@ -24,7 +24,8 @@ const getTime = (type) => {
|
|
|
24
24
|
const TIME_ACTION = 10 * 60 * 60;
|
|
25
25
|
|
|
26
26
|
// Before game, setup
|
|
27
|
-
const TIME_BEFORE =
|
|
27
|
+
const TIME_BEFORE = 3 * 60 * 60;
|
|
28
|
+
const TIME_HALF_TIME_PAUSE = 3 * 60 * 60;
|
|
28
29
|
|
|
29
30
|
// Total game time = TIME_BEFORE + TIME_GAME
|
|
30
31
|
const TIME_GAME = 5 * 24 * 60 * 60;
|
|
@@ -48,8 +49,6 @@ const getTime = (type) => {
|
|
|
48
49
|
// 2 months, 30 days
|
|
49
50
|
const TIME_SEASON_IF_NO_LEAGUE = 60 * 24 * 60 * 30;
|
|
50
51
|
|
|
51
|
-
const TIME_HALF_TIME_PAUSE = 6 * 60 * 60;
|
|
52
|
-
|
|
53
52
|
switch (type) {
|
|
54
53
|
case TYPE_TIMER.HALF_TIME_GAME:
|
|
55
54
|
return TIME_HALF_TIME_GAME;
|