enefel 1.0.174 → 1.0.176

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
@@ -626,6 +626,7 @@ const CAREER = {
626
626
  badge: RACE.UNDEAD,
627
627
  range: 0,
628
628
  cost: 40,
629
+ hasSprite: true,
629
630
  },
630
631
  "undead-zombie": {
631
632
  MA: 4,
@@ -641,6 +642,7 @@ const CAREER = {
641
642
  badge: RACE.UNDEAD,
642
643
  range: 1,
643
644
  cost: 40,
645
+ hasSprite: true,
644
646
  },
645
647
  "undead-ghoul": {
646
648
  MA: 7,
@@ -656,6 +658,7 @@ const CAREER = {
656
658
  badge: RACE.UNDEAD,
657
659
  range: 2,
658
660
  cost: 75,
661
+ hasSprite: true,
659
662
  },
660
663
  "undead-wight": {
661
664
  MA: 6,
@@ -675,6 +678,7 @@ const CAREER = {
675
678
  badge: RACE.UNDEAD,
676
679
  range: 3,
677
680
  cost: 90,
681
+ hasSprite: true,
678
682
  },
679
683
  "undead-mummies": {
680
684
  MA: 3,
@@ -694,6 +698,7 @@ const CAREER = {
694
698
  badge: RACE.UNDEAD,
695
699
  range: 5,
696
700
  cost: 125,
701
+ hasSprite: true,
697
702
  },
698
703
 
699
704
  // LIZARDMEN
package/index.js CHANGED
@@ -142,6 +142,7 @@ const GAME_HISTORY_INFO = {
142
142
  ARMOR: "ar",
143
143
  BALL: "ball",
144
144
  BLOCK: "b",
145
+ BRIBE: "br",
145
146
  CARAC_CHANGE: "cc",
146
147
  CASUALTY: "ca",
147
148
  DODGE: "d",
package/inducement.js CHANGED
@@ -6,11 +6,12 @@ const INDUCEMENT = {
6
6
  HALFLING_MASTER_CHEF: { key: "hmc" },
7
7
  SPY: { key: "spy" },
8
8
  XXX: { key: "xxx" },
9
+ BRIBE: { key: "bribe", isMulti: true },
9
10
  };
10
11
 
11
12
  const getInducements = (team, inducementList) => {
12
13
  let random = Object.values(INDUCEMENT).filter((value) => {
13
- return !inducementList.includes(value.key);
14
+ return !inducementList.includes(value.key) || value.isMulti === true;
14
15
  });
15
16
 
16
17
  if (random.length === 0) {
@@ -33,6 +34,14 @@ const getGameInducements = (game) => {
33
34
  return [teamId, inducementList];
34
35
  };
35
36
 
37
+ const hasInducement = (game, currentTeamId, inducement) => {
38
+ const [teamId, inducementList] = getGameInducements(game);
39
+ if (currentTeamId === teamId) {
40
+ return inducementList.includes(inducement.key);
41
+ }
42
+ return false;
43
+ };
44
+
36
45
  const burnInducement = (game, inducementKey) => {
37
46
  const [teamId, inducements] = game.inducements.split(";");
38
47
  if (inducements) {
@@ -53,4 +62,5 @@ module.exports = {
53
62
  getInducements,
54
63
  INDUCEMENT,
55
64
  MAX_INDUCEMENT,
65
+ hasInducement,
56
66
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "enefel",
3
- "version": "1.0.174",
3
+ "version": "1.0.176",
4
4
  "main": "index.js",
5
5
  "author": "Manest",
6
6
  "license": "MIT",