@gamepark/mythologies 0.9.2 → 0.9.3

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.
@@ -76,7 +76,7 @@ var MythologiesSetup = (function (_super) {
76
76
  }); }));
77
77
  var _loop_1 = function (mythology) {
78
78
  this_1.material(MaterialType_1.MaterialType.EntityCard).createItems((0, lodash_1.shuffle)((0, lodash_1.range)(1, 5)).map(function (god) { return ({
79
- id: { front: mythology * 10 + god, back: { mythology: mythology, entityType: Entity_1.EntityType.God } },
79
+ id: { front: mythology * 10 + god, back: { mythology: mythology, entityType: Entity_1.EntityType.Divinity } },
80
80
  location: {
81
81
  type: LocationType_1.LocationType.GodsDeck,
82
82
  id: mythology
@@ -85,7 +85,7 @@ export declare enum Entity {
85
85
  Dullahan = 80
86
86
  }
87
87
  export declare enum EntityType {
88
- God = 1,
88
+ Divinity = 1,
89
89
  Creature = 2
90
90
  }
91
91
  export type EntityId = {
@@ -86,12 +86,12 @@ var Entity;
86
86
  })(Entity = exports.Entity || (exports.Entity = {}));
87
87
  var EntityType;
88
88
  (function (EntityType) {
89
- EntityType[EntityType["God"] = 1] = "God";
89
+ EntityType[EntityType["Divinity"] = 1] = "Divinity";
90
90
  EntityType[EntityType["Creature"] = 2] = "Creature";
91
91
  })(EntityType = exports.EntityType || (exports.EntityType = {}));
92
- var getEntityType = function (entity) { return ((entity - 1) % 10 < 4 ? EntityType.God : EntityType.Creature); };
92
+ var getEntityType = function (entity) { return ((entity - 1) % 10 < 4 ? EntityType.Divinity : EntityType.Creature); };
93
93
  exports.getEntityType = getEntityType;
94
- var isGod = function (entity) { return entity !== undefined && (0, exports.getEntityType)(entity) === EntityType.God; };
94
+ var isGod = function (entity) { return entity !== undefined && (0, exports.getEntityType)(entity) === EntityType.Divinity; };
95
95
  exports.isGod = isGod;
96
96
  var isCreature = function (entity) { return entity !== undefined && (0, exports.getEntityType)(entity) === EntityType.Creature; };
97
97
  exports.isCreature = isCreature;
@@ -9,4 +9,5 @@ export declare class CobraEffectRule extends SacrificeEffectRule {
9
9
  }
10
10
  export declare class CobraInvokeEffect extends InvokeEffectRule {
11
11
  getCardsToPlace(): import("@gamepark/rules-api").Material<number, number, number>;
12
+ onRuleEnd(): never[];
12
13
  }
@@ -52,6 +52,10 @@ var CobraInvokeEffect = (function (_super) {
52
52
  CobraInvokeEffect.prototype.getCardsToPlace = function () {
53
53
  return this.material(MaterialType_1.MaterialType.EntityCard).index(this.remind(Memory_1.Memory.TargetEntities));
54
54
  };
55
+ CobraInvokeEffect.prototype.onRuleEnd = function () {
56
+ this.forget(Memory_1.Memory.TargetEntities);
57
+ return [];
58
+ };
55
59
  return CobraInvokeEffect;
56
60
  }(PlaceCardEffectRule_1.InvokeEffectRule));
57
61
  exports.CobraInvokeEffect = CobraInvokeEffect;
@@ -12,4 +12,5 @@ export declare class GarudaSacrificeRule extends SacrificeEffectRule {
12
12
  onRuleStart(): MaterialMove<number, number, number, number>[];
13
13
  getCardsToSacrifice(): import("@gamepark/rules-api").Material<number, number, number>;
14
14
  onSacrifice(): CustomMove<number>[];
15
+ onRuleEnd(): never[];
15
16
  }
@@ -104,6 +104,10 @@ var GarudaSacrificeRule = (function (_super) {
104
104
  return [this.customMove(CustomMoveType_1.CustomMoveType.EndEffect)];
105
105
  }
106
106
  };
107
+ GarudaSacrificeRule.prototype.onRuleEnd = function () {
108
+ this.forget(Memory_1.Memory.TargetPlane);
109
+ return [];
110
+ };
107
111
  return GarudaSacrificeRule;
108
112
  }(SacrificeEffectRule_1.SacrificeEffectRule));
109
113
  exports.GarudaSacrificeRule = GarudaSacrificeRule;
@@ -9,4 +9,5 @@ export declare class KinnaraEffectRule extends PlayerEffectRule {
9
9
  }
10
10
  export declare class KinnaraPlaceEffectRule extends PlaceCardEffectRule {
11
11
  getCardsToPlace(): import("@gamepark/rules-api").Material<number, number, number>;
12
+ onRuleEnd(): never[];
12
13
  }
@@ -86,6 +86,10 @@ var KinnaraPlaceEffectRule = (function (_super) {
86
86
  KinnaraPlaceEffectRule.prototype.getCardsToPlace = function () {
87
87
  return this.material(MaterialType_1.MaterialType.EntityCard).index(this.remind(Memory_1.Memory.TargetEntities));
88
88
  };
89
+ KinnaraPlaceEffectRule.prototype.onRuleEnd = function () {
90
+ this.forget(Memory_1.Memory.TargetEntities);
91
+ return [];
92
+ };
89
93
  return KinnaraPlaceEffectRule;
90
94
  }(PlaceCardEffectRule_1.PlaceCardEffectRule));
91
95
  exports.KinnaraPlaceEffectRule = KinnaraPlaceEffectRule;
@@ -51,6 +51,7 @@ var NuwaEffectRule = (function (_super) {
51
51
  try {
52
52
  for (var _b = __values(this.game.rule.players), _c = _b.next(); !_c.done; _c = _b.next()) {
53
53
  var player = _c.value;
54
+ console.log(this.game.memory);
54
55
  this.memorize(Memory_1.Memory.TargetEntities, this.getCardsToSacrifice(player).getIndexes(), player);
55
56
  }
56
57
  }
@@ -10,4 +10,5 @@ export declare class UkukuEffectRule extends PlayerEffectRule {
10
10
  export declare class UkukuPlaceEffectRule extends PlaceCardEffectRule {
11
11
  getCardsToPlace(): import("@gamepark/rules-api").Material<number, number, number>;
12
12
  getAvailableDestinations(cardIndex: number): import("@gamepark/rules-api").XYCoordinates[];
13
+ onRuleEnd(): never[];
13
14
  }
@@ -57,6 +57,10 @@ var UkukuPlaceEffectRule = (function (_super) {
57
57
  var ukuku = this.material(MaterialType_1.MaterialType.EntityCard).getItem(cardIndex);
58
58
  return new Pantheon_1.Pantheon(this.game, this.player).legalSpaces.filter(function (space) { return space.x === ukuku.location.x; });
59
59
  };
60
+ UkukuPlaceEffectRule.prototype.onRuleEnd = function () {
61
+ this.forget(Memory_1.Memory.TargetEntities);
62
+ return [];
63
+ };
60
64
  return UkukuPlaceEffectRule;
61
65
  }(PlaceCardEffectRule_1.PlaceCardEffectRule));
62
66
  exports.UkukuPlaceEffectRule = UkukuPlaceEffectRule;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gamepark/mythologies",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
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": "5ced6a4b41d759e4af00a06e973df4d6a13c2134"
32
+ "gitHead": "7c778cb2470a469d0d8cbec9baf0ef3e79a3b7d9"
33
33
  }