enefel 1.0.179 → 1.0.180

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/badge.js CHANGED
@@ -11,6 +11,7 @@ const BADGE_NAMES = {
11
11
  NURGLE: "nurgle",
12
12
  SNOTLING: "snotling",
13
13
  WEAPON: "weapon",
14
+ VAMPIRE: "vampire",
14
15
  };
15
16
  const badges = {};
16
17
 
@@ -27,6 +28,7 @@ badges[BADGE_NAMES.DEAD] = [0, 1, 2, 3, 5, 7, 9];
27
28
  badges[BADGE_NAMES.DEAD_FULL_MOON] = [0];
28
29
  badges[BADGE_NAMES.BLOODTHIRSTY] = [0]; // 1 max
29
30
  badges[BADGE_NAMES.NURGLE] = [0];
31
+ badges[BADGE_NAMES.VAMPIRE] = [0]; // Store
30
32
  badges[BADGE_NAMES.ELVEN_UNION] = [0]; // Store
31
33
  badges[BADGE_NAMES.SNOTLING] = [0]; // Store
32
34
  badges[BADGE_NAMES.IMPERIAL] = [0]; // Store
package/career.js CHANGED
@@ -26,6 +26,7 @@ const RACE = {
26
26
  SILVAN: "silvan-career",
27
27
  SNOTLING: "snotling-career",
28
28
  UNDEAD: "undead-career",
29
+ VAMPIRE: "vampire-career",
29
30
  };
30
31
 
31
32
  const AVATAR_RARITY = {
@@ -545,6 +546,44 @@ const CAREER = {
545
546
  cost: 115,
546
547
  hasSprite: true,
547
548
  },
549
+ // VAMPIRE
550
+ "vampire-thrall": {
551
+ MA: 6,
552
+ ST: 3,
553
+ AG: 3,
554
+ AV: 7,
555
+ normal: "G",
556
+ double: "AS",
557
+ normalCoach: "G",
558
+ icons: ["vampire-thrall1"],
559
+ skills: [],
560
+ avatars: [AVATAR.HUMAN, AVATAR.UNDEAD],
561
+ badge: RACE.VAMPIRE,
562
+ range: 0,
563
+ cost: 40,
564
+ hasSprite: true,
565
+ },
566
+ "vampire-vampire": {
567
+ MA: 6,
568
+ ST: 4,
569
+ AG: 2,
570
+ AV: 8,
571
+ normal: "AG",
572
+ double: "S",
573
+ normalCoach: "G",
574
+ icons: ["vampire-vampire1"],
575
+ skills: [
576
+ SKILL_NAMES.ANIMAL_SAVAGERY,
577
+ SKILL_NAMES.REGENERATION,
578
+ SKILL_NAMES.STAR,
579
+ // TODO: SKILL_NAMES.HYPNOTIC_GAZE,
580
+ ],
581
+ avatars: [AVATAR.HUMAN, AVATAR.UNDEAD],
582
+ badge: RACE.VAMPIRE,
583
+ range: 5,
584
+ cost: 110,
585
+ hasSprite: true,
586
+ },
548
587
  // ELVEN_UNION
549
588
  "elven-union-lineman": {
550
589
  MA: 6,
package/index.js CHANGED
@@ -286,6 +286,17 @@ const getPlayerOnCell = (x, y, players) => {
286
286
  );
287
287
  };
288
288
 
289
+ const getHypnoticGazeMalus = (player, target, players) => {
290
+ const adjacentEnemyPlayers = Object.values(players).filter((p) => {
291
+ return (
292
+ p.id !== target.id && // Not the target
293
+ hasStatusTacleZone(p) && // Marking this player
294
+ p.teamId !== player.teamId && // From the other team
295
+ isAdjacent(p, player) // Adjacent
296
+ );
297
+ });
298
+ return adjacentEnemyPlayers.length;
299
+ };
289
300
  // The attacking coach must declare if any of his players will give
290
301
  // an assist first, then the defending coach must add defensive
291
302
  // assists with players from his team.In order to make an assist,
@@ -701,7 +712,14 @@ function getEnemyTackleZones(location, teamId, players) {
701
712
  });
702
713
  }
703
714
 
704
- function canBlock(attacker, defender, attackerTeam, game, withModif = true) {
715
+ function canBlock(
716
+ attacker,
717
+ defender,
718
+ attackerTeam,
719
+ game,
720
+ withModif = true,
721
+ checkBlitz = true
722
+ ) {
705
723
  if (
706
724
  !attacker ||
707
725
  !defender ||
@@ -723,18 +741,20 @@ function canBlock(attacker, defender, attackerTeam, game, withModif = true) {
723
741
  return false;
724
742
  }
725
743
 
726
- // No blitz available
727
- if (attackerTeam.date_next_blitz !== null) {
728
- const value = withModif
729
- ? getMaxCarac(attacker, PLAYER_CARAC.MA, game)
730
- : attacker.MA;
731
- return attacker.current_MA === value;
732
- } else {
733
- // Blitz available
744
+ if (checkBlitz) {
745
+ // No blitz available
746
+ if (attackerTeam.date_next_blitz !== null) {
747
+ const value = withModif
748
+ ? getMaxCarac(attacker, PLAYER_CARAC.MA, game)
749
+ : attacker.MA;
750
+ return attacker.current_MA === value;
751
+ } else {
752
+ // Blitz available
734
753
 
735
- // No more move
736
- if (+attacker.current_MA <= 0 && +attacker.current_gfi <= 0) {
737
- return false;
754
+ // No more move
755
+ if (+attacker.current_MA <= 0 && +attacker.current_gfi <= 0) {
756
+ return false;
757
+ }
738
758
  }
739
759
  }
740
760
  return true;
@@ -984,4 +1004,5 @@ module.exports = {
984
1004
  getTeamMoralByPlayer,
985
1005
  getTeamMoral,
986
1006
  getTeamXP,
1007
+ getHypnoticGazeMalus,
987
1008
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "enefel",
3
- "version": "1.0.179",
3
+ "version": "1.0.180",
4
4
  "main": "index.js",
5
5
  "author": "Manest",
6
6
  "license": "MIT",
package/race.js CHANGED
@@ -40,6 +40,11 @@ const hasUnlockRace = (user, race) => {
40
40
  return true;
41
41
  }
42
42
  }
43
+ if (race === RACE.VAMPIRE) {
44
+ if (hasBadge(BADGE_NAMES.VAMPIRE, user)) {
45
+ return true;
46
+ }
47
+ }
43
48
  if (race === RACE.ELVEN_UNION) {
44
49
  if (hasBadge(BADGE_NAMES.ELVEN_UNION, user)) {
45
50
  return true;
@@ -227,6 +232,7 @@ const COMPATIBILITY = {
227
232
  RACE.RAT,
228
233
  RACE.SNOTLING,
229
234
  RACE.NECROMANTIC,
235
+ RACE.VAMPIRE,
230
236
  ],
231
237
  };
232
238
 
package/skill.js CHANGED
@@ -23,7 +23,6 @@ const SKILL_DURATION = {
23
23
 
24
24
  // Missing for races
25
25
  const SKILL_NAMES = {
26
- CHAINSAW: "chainsaw",
27
26
  ACCURATE: "accurate",
28
27
  ALWAYS_HUNGRY: "always-hungry",
29
28
  ANIMAL_SAVAGERY: "animal-salvagery",
@@ -36,6 +35,7 @@ const SKILL_NAMES = {
36
35
  BREAK_TACKLE: "break-tackle",
37
36
  CANNONEER: "cannoneer",
38
37
  CATCH: "catch",
38
+ CHAINSAW: "chainsaw",
39
39
  CLAW: "claw",
40
40
  CLOUD_BURSTER: "cloud-burster",
41
41
  DAUNTLESS: "dauntless",
@@ -53,6 +53,7 @@ const SKILL_NAMES = {
53
53
  FUMBLEROOSKIE: "fumblerooskie",
54
54
  GUARD: "guard",
55
55
  HORNS: "horns",
56
+ HYPNOTIC_GAZE: "hypnotic-gaze",
56
57
  IRON_HARD_SKIN: "iron-hard-skin",
57
58
  JUGGERNAUT: "juggernaut",
58
59
  JUMP_UP: "jump-up",
@@ -110,7 +111,6 @@ const SKILL_TYPE = {
110
111
 
111
112
  // TODO: add text translation when add a skill
112
113
  const SKILLS = {
113
- [SKILL_NAMES.CHAINSAW]: SKILL_TYPE.EXTRAORDINARY,
114
114
  [SKILL_NAMES.ACCURATE]: SKILL_TYPE.PASSING,
115
115
  [SKILL_NAMES.ALWAYS_HUNGRY]: SKILL_TYPE.EXTRAORDINARY,
116
116
  [SKILL_NAMES.ANIMAL_SAVAGERY]: SKILL_TYPE.EXTRAORDINARY,
@@ -123,6 +123,7 @@ const SKILLS = {
123
123
  [SKILL_NAMES.BREAK_TACKLE]: SKILL_TYPE.STRENGTH,
124
124
  [SKILL_NAMES.CANNONEER]: SKILL_TYPE.PASSING,
125
125
  [SKILL_NAMES.CATCH]: SKILL_TYPE.AGILITY,
126
+ [SKILL_NAMES.CHAINSAW]: SKILL_TYPE.EXTRAORDINARY,
126
127
  [SKILL_NAMES.CLAW]: SKILL_TYPE.MUTATION,
127
128
  [SKILL_NAMES.CLOUD_BURSTER]: SKILL_TYPE.PASSING,
128
129
  [SKILL_NAMES.DAUNTLESS]: SKILL_TYPE.GENERAL,
@@ -140,6 +141,7 @@ const SKILLS = {
140
141
  [SKILL_NAMES.FUMBLEROOSKIE]: SKILL_TYPE.PASSING,
141
142
  [SKILL_NAMES.GUARD]: SKILL_TYPE.STRENGTH,
142
143
  [SKILL_NAMES.HORNS]: SKILL_TYPE.MUTATION,
144
+ [SKILL_NAMES.HYPNOTIC_GAZE]: SKILL_TYPE.EXTRAORDINARY,
143
145
  [SKILL_NAMES.IRON_HARD_SKIN]: SKILL_TYPE.MUTATION,
144
146
  [SKILL_NAMES.JUGGERNAUT]: SKILL_TYPE.STRENGTH,
145
147
  [SKILL_NAMES.JUMP_UP]: SKILL_TYPE.AGILITY,
@@ -162,7 +164,6 @@ const SKILLS = {
162
164
  [SKILL_NAMES.SAFE_PASS]: SKILL_TYPE.PASSING,
163
165
  [SKILL_NAMES.SECRET_WEAPON]: SKILL_TYPE.EXTRAORDINARY,
164
166
  [SKILL_NAMES.SHADOWING]: SKILL_TYPE.GENERAL,
165
- // [SKILL_NAMES.SIDE_STEP]: SKILL_TYPE.AGILITY,
166
167
  [SKILL_NAMES.SNEAKY_GIT]: SKILL_TYPE.AGILITY,
167
168
  [SKILL_NAMES.SPECIALIST]: SKILL_TYPE.SPECIAL,
168
169
  [SKILL_NAMES.SPRINT]: SKILL_TYPE.AGILITY,
@@ -183,6 +184,7 @@ const SKILLS = {
183
184
  [SKILL_NAMES.UNCHANNELLED_FURY]: SKILL_TYPE.EXTRAORDINARY,
184
185
  [SKILL_NAMES.VERY_LONG_LEGS]: SKILL_TYPE.MUTATION,
185
186
  [SKILL_NAMES.WRESTLE]: SKILL_TYPE.GENERAL,
187
+ // [SKILL_NAMES.SIDE_STEP]: SKILL_TYPE.AGILITY,
186
188
  };
187
189
 
188
190
  // Strip Ball: When a player with this skill pushes an opposing player during a Block, they will cause the opposing player to drop the ball in square they are pushed back to, even if the opposing player is not Knocked Down.
@@ -341,6 +343,7 @@ function getNoTurnoverSkill() {
341
343
  SKILL_NAMES.TAKE_ROOT,
342
344
  SKILL_NAMES.UNCHANNELLED_FURY,
343
345
  SKILL_NAMES.DUMP_OFF,
346
+ SKILL_NAMES.HYPNOTIC_GAZE,
344
347
  ];
345
348
  }
346
349
 
package/status.js CHANGED
@@ -19,6 +19,7 @@ const hasStatusCanStandup = (player) => {
19
19
  };
20
20
 
21
21
  const hasStatusTacleZone = (player) => {
22
+ // BONE_HEAD doesn't have table zone
22
23
  return player.status === PLAYER_STATUS.STANDING;
23
24
  };
24
25
 
package/store.js CHANGED
@@ -88,6 +88,11 @@ const storeBadges = {
88
88
  isUnique: true,
89
89
  isBadge: true,
90
90
  },
91
+ [BADGE_NAMES.VAMPIRE]: {
92
+ price: STORE_BADGE_PRICE,
93
+ isUnique: true,
94
+ isBadge: true,
95
+ },
91
96
  };
92
97
 
93
98
  module.exports = {