@gamepark/mythologies 0.7.3 → 0.7.4

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.
@@ -39,6 +39,7 @@ export declare class Pantheon extends MaterialRulesPart {
39
39
  getPiles(predicate?: (space: XYCoordinates) => boolean): Material[];
40
40
  getPile({ x, y }: XYCoordinates, fullPantheon?: Material<number, number, number>): Material;
41
41
  isAbleToMove(entity: EntityItem): boolean;
42
+ isVisible(entity: EntityItem): boolean;
42
43
  get mythologies(): import("./Mythology").Mythology[];
43
44
  get missingMythologies(): import("./Mythology").Mythology[];
44
45
  onEntitySacrificed(card: Material): void;
@@ -420,7 +420,10 @@ var Pantheon = (function (_super) {
420
420
  return fullPantheon.location(function (l) { return l.x === x && l.y === y; }).sort(function (item) { return item.location.z; });
421
421
  };
422
422
  Pantheon.prototype.isAbleToMove = function (entity) {
423
- return new PermanentEffectsRule_1.PermanentEffectsRule(this.game).canMove(entity);
423
+ return !this.isVisible(entity) || new PermanentEffectsRule_1.PermanentEffectsRule(this.game).canMove(entity);
424
+ };
425
+ Pantheon.prototype.isVisible = function (entity) {
426
+ return this.getPile(entity.location).length - 1 === entity.location.z;
424
427
  };
425
428
  Object.defineProperty(Pantheon.prototype, "mythologies", {
426
429
  get: function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gamepark/mythologies",
3
- "version": "0.7.3",
3
+ "version": "0.7.4",
4
4
  "description": "The rules of Mythologies adapted for Game Park",
5
5
  "sideEffects": false,
6
6
  "main": "dist/index.js",
@@ -29,5 +29,5 @@
29
29
  "i18next": "^22.0.3",
30
30
  "lodash": "^4.17.21"
31
31
  },
32
- "gitHead": "dea6a9053b6c44493df694a064d2b1288ae86a3b"
32
+ "gitHead": "5775c7ed56e3ac920aa4e85663de4803319b542c"
33
33
  }