enefel 1.0.184 → 1.0.185

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 CHANGED
@@ -521,6 +521,42 @@ const CAREER = {
521
521
  cost: 40,
522
522
  hasSprite: true,
523
523
  },
524
+ "gobelin-looney": {
525
+ MA: 6,
526
+ ST: 2,
527
+ AG: 3,
528
+ AV: 7,
529
+ normal: "A",
530
+ double: "GS",
531
+ normalCoach: "G",
532
+ icons: ["gobelin-looney1"],
533
+ skills: [
534
+ [SKILL_NAMES.CHAINSAW, 3],
535
+ SKILL_NAMES.SECRET_WEAPON,
536
+ SKILL_NAMES.STUNTY,
537
+ ],
538
+ avatars: [AVATAR.GOBELIN],
539
+ badge: RACE.GOBELIN,
540
+ range: 2,
541
+ cost: 40,
542
+ hasSprite: true,
543
+ },
544
+ "gobelin-pogoer": {
545
+ MA: 7,
546
+ ST: 2,
547
+ AG: 3,
548
+ AV: 7,
549
+ normal: "A",
550
+ double: "GPS",
551
+ normalCoach: "G",
552
+ icons: ["gobelin-pogoer1"],
553
+ skills: [SKILL_NAMES.DODGE, SKILL_NAMES.POGO_STICK, SKILL_NAMES.STUNTY],
554
+ avatars: [AVATAR.GOBELIN],
555
+ badge: RACE.GOBELIN,
556
+ range: 3,
557
+ cost: 75,
558
+ hasSprite: true,
559
+ },
524
560
  "gobelin-troll": {
525
561
  MA: 4,
526
562
  ST: 5,
package/index.js CHANGED
@@ -51,8 +51,8 @@ const PLAYER_STAT = {
51
51
  CASUALTY_DEAD: "cd",
52
52
  CASUALTY_LASTING_INJURY: "cli",
53
53
  CASUALTY_RECEIVE_BADLY_HURT: "crbh",
54
- CASUALTY_RECEIVE_DEAD: "crd",
55
54
  CASUALTY_RECEIVE_DEAD_FULL_MOON: "crdfm",
55
+ CASUALTY_RECEIVE_DEAD: "crd",
56
56
  CASUALTY_RECEIVE_LASTING_INJURY: "crli",
57
57
  CASUALTY_RECEIVE_SERIOUS_INJURY: "crsi",
58
58
  CASUALTY_RECEIVE_SERIOUSLY_HURT: "crsh",
@@ -60,8 +60,8 @@ const PLAYER_STAT = {
60
60
  CASUALTY_SERIOUSLY_HURT: "csh",
61
61
  DODGE_FAIL: "dF",
62
62
  DODGE_SUCCESS: "dS",
63
- EXPERIENCE: "exp",
64
63
  EXPERIENCE_COACH: "expc",
64
+ EXPERIENCE: "exp",
65
65
  FACEUP: "fu",
66
66
  FOUL_ASSISTANCE_ATTACK: "faa",
67
67
  FOUL_ASSISTANCE_DEFENSE: "fad",
@@ -83,6 +83,8 @@ const PLAYER_STAT = {
83
83
  INJURY_KO: "iko",
84
84
  INTERCEPTION_FAIL: "iF",
85
85
  INTERCEPTION_SUCCESS: "iS",
86
+ JUMP_FAIL: "jf",
87
+ JUMP_SUCCESS: "js",
86
88
  MOVE: "m",
87
89
  PASS_COMPLETED: "pc",
88
90
  PASS_FAIL: "pF",
@@ -161,7 +163,8 @@ const GAME_HISTORY_INFO = {
161
163
  KICKOFF: "k",
162
164
  KO: "ko",
163
165
  LANDING: "la",
164
- LEAP: "l",
166
+ JUMP: "j",
167
+ LEAP: "l", // DEPRECATED
165
168
  METEO: "met",
166
169
  MOVE: "m",
167
170
  PASS: "p",
package/move.js CHANGED
@@ -1,3 +1,4 @@
1
+ const { getEnemyTackleZones } = require(".");
1
2
  const { hasSkill, SKILL_NAMES } = require("./skill");
2
3
 
3
4
  function bonusDodge(player, adjEnemies, adjDestinationEnemies) {
@@ -21,20 +22,60 @@ function bonusDodge(player, adjEnemies, adjDestinationEnemies) {
21
22
  return bonus;
22
23
  }
23
24
 
24
- function bonusLeap(player, adjEnemies) {
25
- let bonus = 0;
25
+ function malusJumpingLocation(destination, playerTeamId, players) {
26
+ const enemies = getEnemyTackleZones(destination, playerTeamId, players);
27
+ let malus = 0;
28
+ malus += enemies.length;
29
+ if (enemies.find((p) => hasSkill(p, SKILL_NAMES.PREHENSILE_TAIL))) {
30
+ malus += 1;
31
+ }
32
+ return malus;
33
+ }
26
34
 
27
- if (adjEnemies.find((p) => hasSkill(p, SKILL_NAMES.PREHENSILE_TAIL))) {
28
- bonus -= 1;
35
+ function modifJumping(player, destination, playerTeamId, players) {
36
+ let malusCurrent = malusJumpingLocation(player, playerTeamId, players);
37
+ let malusDestination = malusJumpingLocation(
38
+ destination,
39
+ playerTeamId,
40
+ players
41
+ );
42
+
43
+ // Apply a negative modifier equal to the number of players that were Marking
44
+ // the jumping player in the square they jumped from or equal to the number of players that are Marking
45
+ // the jumping player in the square they have jumped into, whichever is the greatest.
46
+ let modif = -Math.max(malusCurrent, malusDestination);
47
+ let enemies =
48
+ malusCurrent.length > malusDestination.length
49
+ ? getEnemyTackleZones(player, playerTeamId, players)
50
+ : getEnemyTackleZones(destination, playerTeamId, players);
51
+
52
+ if (hasSkill(player, SKILL_NAMES.POGO_STICK)) {
53
+ // when this player makes an Agility test to Jump over a Prone or Stunned player, or to Leap over an empty square or a square occupied by a Standing player,
54
+ // they may ignore any negative modifiers that would normally be applied for being Marked in the square they jumped or leaped from and/or for being Marked in the square they have jumped or leaped into.
55
+
56
+ modif = 0;
57
+ // A player with this Trait cannot also have the Leap skill.
58
+ } else if (hasSkill(player, SKILL_NAMES.LEAP)) {
59
+ // This player may reduce any negative modifier applied to the Agility test
60
+ // (when they attempt to Jump over a Prone or Stunned player, or to Leap over an empty square or a square occupied by a Standing player)
61
+ // by 1, to a minimum of -1.
62
+ if (modif < -1) {
63
+ modif += 1;
64
+ }
29
65
  }
30
66
 
67
+ // This player may reduce any negative modifier applied to the Agility test
68
+ // (when they attempt to Jump over a Prone or Stunned player (or to Leap over an empty square or a square occupied by a Standing player, if this player has the Leap skill)
69
+ // by 1, to a minimum of -1.
31
70
  if (hasSkill(player, SKILL_NAMES.VERY_LONG_LEGS)) {
32
- bonus += 1;
71
+ if (modif < -1) {
72
+ modif += 1;
73
+ }
33
74
  }
34
- return bonus;
75
+ return { modif, enemies };
35
76
  }
36
77
 
37
78
  module.exports = {
38
79
  bonusDodge,
39
- bonusLeap,
80
+ modifJumping,
40
81
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "enefel",
3
- "version": "1.0.184",
3
+ "version": "1.0.185",
4
4
  "main": "index.js",
5
5
  "author": "Manest",
6
6
  "license": "MIT",
package/skill.js CHANGED
@@ -23,6 +23,7 @@ const SKILL_DURATION = {
23
23
 
24
24
  // Missing for races
25
25
  const SKILL_NAMES = {
26
+ // SIDE_STEP: "side-step",
26
27
  ACCURATE: "accurate",
27
28
  ALWAYS_HUNGRY: "always-hungry",
28
29
  ANIMAL_SAVAGERY: "animal-salvagery",
@@ -67,6 +68,7 @@ const SKILL_NAMES = {
67
68
  PASS: "pass",
68
69
  PILE_DRIVER: "pile-driver",
69
70
  PLAGUE_RIDDEN: "plague-ridden",
71
+ POGO_STICK: "pogo-stick",
70
72
  PREHENSILE_TAIL: "prehensile-tail",
71
73
  PROJECTILE_VOMIT: "projectile-vomit",
72
74
  REALLY_STUPID: "really-stupid",
@@ -76,7 +78,6 @@ const SKILL_NAMES = {
76
78
  SAFE_PASS: "safe-pass",
77
79
  SECRET_WEAPON: "secret-weapon",
78
80
  SHADOWING: "shadowing",
79
- // SIDE_STEP: "side-step",
80
81
  SNEAKY_GIT: "sneaky-git",
81
82
  SPECIALIST: "specialist",
82
83
  SPRINT: "sprint",
@@ -155,6 +156,7 @@ const SKILLS = {
155
156
  [SKILL_NAMES.PASS]: SKILL_TYPE.PASSING,
156
157
  [SKILL_NAMES.PILE_DRIVER]: SKILL_TYPE.STRENGTH,
157
158
  [SKILL_NAMES.PLAGUE_RIDDEN]: SKILL_TYPE.EXTRAORDINARY,
159
+ [SKILL_NAMES.POGO_STICK]: SKILL_TYPE.EXTRAORDINARY,
158
160
  [SKILL_NAMES.PREHENSILE_TAIL]: SKILL_TYPE.MUTATION,
159
161
  [SKILL_NAMES.PROJECTILE_VOMIT]: SKILL_TYPE.EXTRAORDINARY,
160
162
  [SKILL_NAMES.REALLY_STUPID]: SKILL_TYPE.EXTRAORDINARY,
@@ -383,14 +385,14 @@ const isSpecialSkill = (skill) => {
383
385
  };
384
386
 
385
387
  const helpSkillsToDisplay = {
386
- [SKILL_NAMES.DODGE]: { actif: false, color: "#FFFF00" },
387
- [SKILL_NAMES.GUARD]: { actif: false, color: "#555555" },
388
388
  [SKILL_NAMES.BLOCK]: { actif: false, color: "#FF0000" },
389
- [SKILL_NAMES.TACKLE]: { actif: false, color: "#f200ff" },
390
389
  [SKILL_NAMES.DEFENSIVE]: { actif: false, color: "#0000FF" },
391
390
  [SKILL_NAMES.DISTURBING_PRESENCE]: { actif: false, color: "#00FF44" },
391
+ [SKILL_NAMES.DODGE]: { actif: false, color: "#FFFF00" },
392
+ [SKILL_NAMES.GUARD]: { actif: false, color: "#555555" },
392
393
  [SKILL_NAMES.SHADOWING]: { actif: false, color: "#995500" },
393
394
  [SKILL_NAMES.STAND_FIRM]: { actif: false, color: "#550099" },
395
+ [SKILL_NAMES.TACKLE]: { actif: false, color: "#f200ff" },
394
396
  };
395
397
 
396
398
  const hasToAgilityJumpUp = (player) => {