@gamepark/mythologies 1.0.6 → 1.0.7
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { uniq } from 'es-toolkit';
|
|
2
2
|
import { entityMythology } from '../../Entity';
|
|
3
3
|
import { Mythology } from '../../Mythology';
|
|
4
4
|
import { Pantheon } from '../../Pantheon';
|
|
@@ -13,10 +13,8 @@ export const Osiris = {
|
|
|
13
13
|
const pantheon = new Pantheon(this.game, this.player);
|
|
14
14
|
const grid = pantheon.grid;
|
|
15
15
|
const mythologiesPerLine = grid.map((line) => line.filter((space) => space !== undefined).map(entityMythology));
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
return mythologies.filter((mythology) => mythology !== Mythology.Egyptian).length;
|
|
19
|
-
}));
|
|
16
|
+
const allMythologies = uniq(mythologiesPerLine.flat()).filter((m) => m !== Mythology.Egyptian);
|
|
17
|
+
const otherMythologies = allMythologies.filter((m) => mythologiesPerLine.filter((line) => line.includes(m)).length >= 2).length;
|
|
20
18
|
return otherMythologies > 0 ? [pantheon.gainFavor(otherMythologies * 2)] : [];
|
|
21
19
|
}
|
|
22
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gamepark/mythologies",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "The rules of Mythologies adapted for Game Park",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -27,5 +27,6 @@
|
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@gamepark/rules-api": "~7.2.0",
|
|
29
29
|
"es-toolkit": "^1.44.0"
|
|
30
|
-
}
|
|
30
|
+
},
|
|
31
|
+
"gitHead": "206c518eab1522346aa611cf57e3333f42aae2a7"
|
|
31
32
|
}
|