enefel 1.0.91 → 1.0.95
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/index.js +16 -17
- package/package.json +1 -2
- package/race.js +156 -0
package/index.js
CHANGED
|
@@ -314,18 +314,22 @@ const getBlockAssistance = (
|
|
|
314
314
|
isFoul = false,
|
|
315
315
|
isAttacker = false
|
|
316
316
|
) => {
|
|
317
|
-
|
|
317
|
+
const OtherPlayersThanInvolved = players.filter((player) => {
|
|
318
318
|
return player.id !== attackerPlayer.id && player.id !== defenderPlayer.id;
|
|
319
319
|
});
|
|
320
320
|
|
|
321
|
-
|
|
322
|
-
// 3. Must be standing, and …
|
|
323
|
-
const adjacentEnemyPlayers = players.filter((player) => {
|
|
321
|
+
const isValidAdjacentEnemy = (player, target) => {
|
|
324
322
|
return (
|
|
325
323
|
hasStatusTacleZone(player) &&
|
|
326
|
-
player
|
|
327
|
-
|
|
324
|
+
isAdjacent(player, target) &&
|
|
325
|
+
player.teamId !== target.teamId
|
|
328
326
|
);
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
// 1. Must be adjacent to the enemy player involved in the block,
|
|
330
|
+
// 3. Must be standing, and …
|
|
331
|
+
const adjacentEnemyPlayers = OtherPlayersThanInvolved.filter((player) => {
|
|
332
|
+
return isValidAdjacentEnemy(player, defenderPlayer);
|
|
329
333
|
});
|
|
330
334
|
// 2. Must not be in the tackle zone of any other player from the
|
|
331
335
|
// opposing team, and ...
|
|
@@ -335,12 +339,10 @@ const getBlockAssistance = (
|
|
|
335
339
|
if (hasSkill(adjacentEnemyPlayer, SKILL_NAMES.GUARD)) {
|
|
336
340
|
hasGard = true;
|
|
337
341
|
if (
|
|
338
|
-
isAttacker &&
|
|
339
|
-
|
|
342
|
+
isAttacker && // player is the attacker player.
|
|
343
|
+
[...OtherPlayersThanInvolved, defenderPlayer].some((player) => {
|
|
340
344
|
return (
|
|
341
|
-
|
|
342
|
-
player.teamId !== adjacentEnemyPlayer.teamId &&
|
|
343
|
-
isAdjacent(player, adjacentEnemyPlayer) &&
|
|
345
|
+
isValidAdjacentEnemy(player, adjacentEnemyPlayer) &&
|
|
344
346
|
hasSkill(player, SKILL_NAMES.DEFENSIVE)
|
|
345
347
|
);
|
|
346
348
|
})
|
|
@@ -350,13 +352,10 @@ const getBlockAssistance = (
|
|
|
350
352
|
}
|
|
351
353
|
return (
|
|
352
354
|
(!isFoul && hasGard) ||
|
|
353
|
-
!
|
|
355
|
+
!OtherPlayersThanInvolved.some((player) => {
|
|
354
356
|
return (
|
|
355
|
-
|
|
356
|
-
player
|
|
357
|
-
hasStatusTacleZone(player) && // 4. Must have his tackle zones.
|
|
358
|
-
player.teamId !== adjacentEnemyPlayer.teamId &&
|
|
359
|
-
isAdjacent(player, adjacentEnemyPlayer)
|
|
357
|
+
// 4. Must have his tackle zones.
|
|
358
|
+
isValidAdjacentEnemy(player, adjacentEnemyPlayer)
|
|
360
359
|
);
|
|
361
360
|
})
|
|
362
361
|
);
|
package/package.json
CHANGED
package/race.js
CHANGED
|
@@ -18,6 +18,162 @@ const { SKILL_NAMES } = require("./skill");
|
|
|
18
18
|
// const ranges = [6, 16, 31, 51, 76, 176];
|
|
19
19
|
// https://web.archive.org/web/20090403112513/http://enefel.org/carriere.php
|
|
20
20
|
module.exports = {
|
|
21
|
+
// NORSE
|
|
22
|
+
"norse-lineman": {
|
|
23
|
+
MA: 6,
|
|
24
|
+
ST: 3,
|
|
25
|
+
AG: 3,
|
|
26
|
+
AV: 7,
|
|
27
|
+
normal: "G",
|
|
28
|
+
double: "AS",
|
|
29
|
+
normalCoach: "G",
|
|
30
|
+
icons: ["norse-lineman1"],
|
|
31
|
+
skills: [SKILL_NAMES.BLOCK],
|
|
32
|
+
badge: "norse-career",
|
|
33
|
+
range: 0,
|
|
34
|
+
cost: 50,
|
|
35
|
+
},
|
|
36
|
+
"norse-thrower": {
|
|
37
|
+
MA: 6,
|
|
38
|
+
ST: 3,
|
|
39
|
+
AG: 3,
|
|
40
|
+
AV: 7,
|
|
41
|
+
normal: "GP",
|
|
42
|
+
double: "AS",
|
|
43
|
+
normalCoach: "G",
|
|
44
|
+
icons: ["norse-thrower1"],
|
|
45
|
+
skills: [SKILL_NAMES.BLOCK, SKILL_NAMES.PASS, SKILL_NAMES.SPECIALIST],
|
|
46
|
+
badge: "norse-career",
|
|
47
|
+
range: 1,
|
|
48
|
+
cost: 70,
|
|
49
|
+
},
|
|
50
|
+
"norse-catcher": {
|
|
51
|
+
MA: 7,
|
|
52
|
+
ST: 3,
|
|
53
|
+
AG: 3,
|
|
54
|
+
AV: 7,
|
|
55
|
+
normal: "AG",
|
|
56
|
+
double: "S",
|
|
57
|
+
normalCoach: "G",
|
|
58
|
+
icons: ["norse-catcher1"],
|
|
59
|
+
skills: [SKILL_NAMES.BLOCK, SKILL_NAMES.DAUNTLESS, SKILL_NAMES.SPECIALIST],
|
|
60
|
+
badge: "norse-career",
|
|
61
|
+
range: 2,
|
|
62
|
+
cost: 90,
|
|
63
|
+
},
|
|
64
|
+
"norse-berserker": {
|
|
65
|
+
MA: 6,
|
|
66
|
+
ST: 3,
|
|
67
|
+
AG: 3,
|
|
68
|
+
AV: 7,
|
|
69
|
+
normal: "GS",
|
|
70
|
+
double: "A",
|
|
71
|
+
normalCoach: "G",
|
|
72
|
+
icons: ["norse-berserker1"],
|
|
73
|
+
skills: [
|
|
74
|
+
SKILL_NAMES.BLOCK,
|
|
75
|
+
SKILL_NAMES.JUMP_UP,
|
|
76
|
+
SKILL_NAMES.FRENZY,
|
|
77
|
+
SKILL_NAMES.SPECIALIST,
|
|
78
|
+
],
|
|
79
|
+
badge: "norse-career",
|
|
80
|
+
range: 3,
|
|
81
|
+
cost: 90,
|
|
82
|
+
},
|
|
83
|
+
"norse-ulfwereners": {
|
|
84
|
+
MA: 6,
|
|
85
|
+
ST: 4,
|
|
86
|
+
AG: 2,
|
|
87
|
+
AV: 8,
|
|
88
|
+
normal: "GS",
|
|
89
|
+
double: "A",
|
|
90
|
+
normalCoach: "G",
|
|
91
|
+
icons: ["norse-ulfwereners1"],
|
|
92
|
+
skills: [SKILL_NAMES.FRENZY, SKILL_NAMES.SPECIALIST],
|
|
93
|
+
badge: "norse-career",
|
|
94
|
+
range: 4,
|
|
95
|
+
cost: 105,
|
|
96
|
+
},
|
|
97
|
+
"norse-yhetee": {
|
|
98
|
+
MA: 5,
|
|
99
|
+
ST: 5,
|
|
100
|
+
AG: 1,
|
|
101
|
+
AV: 8,
|
|
102
|
+
normal: "S",
|
|
103
|
+
double: "AG",
|
|
104
|
+
normalCoach: "G",
|
|
105
|
+
icons: ["norse-yhetee1"],
|
|
106
|
+
skills: [
|
|
107
|
+
SKILL_NAMES.CLAW,
|
|
108
|
+
// SKILL_NAMES.DISTURBING_PRESENCE,
|
|
109
|
+
SKILL_NAMES.FRENZY,
|
|
110
|
+
[SKILL_NAMES.LONER, 4],
|
|
111
|
+
SKILL_NAMES.UNCHANNELLED_FURY,
|
|
112
|
+
SKILL_NAMES.STAR,
|
|
113
|
+
],
|
|
114
|
+
badge: "norse-career",
|
|
115
|
+
range: 6,
|
|
116
|
+
cost: 140,
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
// AMAZON
|
|
120
|
+
"amazon-linewomen": {
|
|
121
|
+
MA: 6,
|
|
122
|
+
ST: 3,
|
|
123
|
+
AG: 3,
|
|
124
|
+
AV: 7,
|
|
125
|
+
normal: "G",
|
|
126
|
+
double: "AS",
|
|
127
|
+
normalCoach: "G",
|
|
128
|
+
icons: ["amazon-linewomen1"],
|
|
129
|
+
skills: [SKILL_NAMES.DODGE],
|
|
130
|
+
badge: "amazon-career",
|
|
131
|
+
range: 0,
|
|
132
|
+
cost: 75,
|
|
133
|
+
},
|
|
134
|
+
"amazon-thrower": {
|
|
135
|
+
MA: 6,
|
|
136
|
+
ST: 3,
|
|
137
|
+
AG: 3,
|
|
138
|
+
AV: 7,
|
|
139
|
+
normal: "GP",
|
|
140
|
+
double: "AS",
|
|
141
|
+
normalCoach: "G",
|
|
142
|
+
icons: ["amazon-thrower1"],
|
|
143
|
+
skills: [SKILL_NAMES.PASS, SKILL_NAMES.DODGE, SKILL_NAMES.SPECIALIST],
|
|
144
|
+
badge: "amazon-career",
|
|
145
|
+
range: 1,
|
|
146
|
+
cost: 75,
|
|
147
|
+
},
|
|
148
|
+
"amazon-catcher": {
|
|
149
|
+
MA: 6,
|
|
150
|
+
ST: 3,
|
|
151
|
+
AG: 3,
|
|
152
|
+
AV: 7,
|
|
153
|
+
normal: "AG",
|
|
154
|
+
double: "S",
|
|
155
|
+
normalCoach: "G",
|
|
156
|
+
icons: ["amazon-catcher1"],
|
|
157
|
+
skills: [SKILL_NAMES.CATCH, SKILL_NAMES.DODGE, SKILL_NAMES.SPECIALIST],
|
|
158
|
+
badge: "amazon-career",
|
|
159
|
+
range: 2,
|
|
160
|
+
cost: 75,
|
|
161
|
+
},
|
|
162
|
+
"amazon-blitzer": {
|
|
163
|
+
MA: 6,
|
|
164
|
+
ST: 3,
|
|
165
|
+
AG: 3,
|
|
166
|
+
AV: 7,
|
|
167
|
+
normal: "GS",
|
|
168
|
+
double: "A",
|
|
169
|
+
normalCoach: "G",
|
|
170
|
+
icons: ["amazon-blitzer1"],
|
|
171
|
+
skills: [SKILL_NAMES.BLOCK, SKILL_NAMES.DODGE, SKILL_NAMES.SPECIALIST],
|
|
172
|
+
badge: "amazon-career",
|
|
173
|
+
range: 4,
|
|
174
|
+
cost: 90,
|
|
175
|
+
},
|
|
176
|
+
|
|
21
177
|
// HUMAN
|
|
22
178
|
|
|
23
179
|
"human-lineman": {
|