enefel 1.0.116 → 1.0.119

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/color.js CHANGED
@@ -1,5 +1,28 @@
1
1
  const _ = require("lodash");
2
2
 
3
+ const colorShade = (col, amt) => {
4
+ col = col.replace(/^#/, "");
5
+ if (col.length === 3)
6
+ col = col[0] + col[0] + col[1] + col[1] + col[2] + col[2];
7
+
8
+ let [r, g, b] = col.match(/.{2}/g);
9
+ [r, g, b] = [
10
+ parseInt(r, 16) + amt,
11
+ parseInt(g, 16) + amt,
12
+ parseInt(b, 16) + amt,
13
+ ];
14
+
15
+ r = Math.max(Math.min(255, r), 0).toString(16);
16
+ g = Math.max(Math.min(255, g), 0).toString(16);
17
+ b = Math.max(Math.min(255, b), 0).toString(16);
18
+
19
+ const rr = (r.length < 2 ? "0" : "") + r;
20
+ const gg = (g.length < 2 ? "0" : "") + g;
21
+ const bb = (b.length < 2 ? "0" : "") + b;
22
+
23
+ return `#${rr}${gg}${bb}`;
24
+ };
25
+
3
26
  function deltaE(rgbA, rgbB) {
4
27
  let labA = rgb2lab(rgbA);
5
28
  let labB = rgb2lab(rgbB);
@@ -97,8 +120,9 @@ const getGameColors = (game) => {
97
120
  };
98
121
 
99
122
  module.exports = {
123
+ colorShade,
124
+ getGameColors,
100
125
  invertColor,
101
126
  isColor,
102
127
  isColorTooClose,
103
- getGameColors,
104
128
  };
package/index.js CHANGED
@@ -160,12 +160,13 @@ const GAME_HISTORY_INFO = {
160
160
  PASS: "p",
161
161
  REJECTION: "r",
162
162
  REROLL_COACH: "rc",
163
- REROLL_RACE_MALUS: "rrm",
164
163
  REROLL_METEO: "rm",
164
+ REROLL_RACE_MALUS: "rrm",
165
165
  REROLL: "re",
166
166
  SCATTER: "sc",
167
167
  SKILL: "sk",
168
168
  SPY: "spy",
169
+ STANDUP: "st",
169
170
  START_FAN: "fan",
170
171
  STATUS: "s",
171
172
  TAKE_BALL: "t",
package/move.js CHANGED
@@ -18,6 +18,7 @@ function bonusDodge(player, adjEnemies, adjDestinationEnemies) {
18
18
 
19
19
  function bonusLeap(player, adjEnemies) {
20
20
  let bonus = 0;
21
+
21
22
  if (adjEnemies.find((p) => hasSkill(p, SKILL_NAMES.PREHENSILE_TAIL))) {
22
23
  bonus -= 1;
23
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "enefel",
3
- "version": "1.0.116",
3
+ "version": "1.0.119",
4
4
  "main": "index.js",
5
5
  "author": "Manest",
6
6
  "license": "MIT",
package/skill.js CHANGED
@@ -9,6 +9,10 @@ const SPECIALIST_LIMIT = 6;
9
9
  const SKILL_INFO_ACTIVE = "active";
10
10
  const SKILL_INFO_INACTIVE = "inactive";
11
11
 
12
+ // TODO
13
+ // Take Root
14
+ // Timmm-ber!
15
+
12
16
  // Missing for races
13
17
  const SKILL_NAMES = {
14
18
  ACCURATE: "accurate",