@gamepark/mythologies 0.9.1 → 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.
- package/dist/Memory.d.ts +1 -1
- package/dist/Memory.js +1 -1
- package/dist/MythologiesSetup.js +1 -1
- package/dist/material/Entity.d.ts +3 -3
- package/dist/material/Entity.js +5 -5
- package/dist/rules/RuleId.d.ts +2 -1
- package/dist/rules/RuleId.js +1 -0
- package/dist/rules/effects/CobraEffectRule.d.ts +1 -0
- package/dist/rules/effects/CobraEffectRule.js +4 -0
- package/dist/rules/effects/GarudaEffectRule.d.ts +1 -0
- package/dist/rules/effects/GarudaEffectRule.js +6 -2
- package/dist/rules/effects/IllapaEffectRule.js +4 -4
- package/dist/rules/effects/KinnaraEffectRule.d.ts +1 -0
- package/dist/rules/effects/KinnaraEffectRule.js +4 -0
- package/dist/rules/effects/MinotaurEffectRule.js +3 -3
- package/dist/rules/effects/NuwaEffectRule.js +1 -0
- package/dist/rules/effects/UkukuEffectRule.d.ts +1 -0
- package/dist/rules/effects/UkukuEffectRule.js +4 -0
- package/package.json +2 -2
package/dist/Memory.d.ts
CHANGED
package/dist/Memory.js
CHANGED
|
@@ -13,6 +13,6 @@ var Memory;
|
|
|
13
13
|
Memory[Memory["EffectCount"] = 8] = "EffectCount";
|
|
14
14
|
Memory[Memory["EntityMoved"] = 9] = "EntityMoved";
|
|
15
15
|
Memory[Memory["TargetMythology"] = 10] = "TargetMythology";
|
|
16
|
-
Memory[Memory["
|
|
16
|
+
Memory[Memory["TargetPlane"] = 11] = "TargetPlane";
|
|
17
17
|
Memory[Memory["TargetLocations"] = 12] = "TargetLocations";
|
|
18
18
|
})(Memory = exports.Memory || (exports.Memory = {}));
|
package/dist/MythologiesSetup.js
CHANGED
|
@@ -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.
|
|
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
|
|
@@ -44,8 +44,8 @@ export declare enum Entity {
|
|
|
44
44
|
Vetala = 39,
|
|
45
45
|
Kinnara = 40,
|
|
46
46
|
Viracocha = 41,
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
MamaQucha = 42,
|
|
48
|
+
Illapa = 43,
|
|
49
49
|
Inti = 44,
|
|
50
50
|
Puma = 45,
|
|
51
51
|
Amaru = 46,
|
|
@@ -85,7 +85,7 @@ export declare enum Entity {
|
|
|
85
85
|
Dullahan = 80
|
|
86
86
|
}
|
|
87
87
|
export declare enum EntityType {
|
|
88
|
-
|
|
88
|
+
Divinity = 1,
|
|
89
89
|
Creature = 2
|
|
90
90
|
}
|
|
91
91
|
export type EntityId = {
|
package/dist/material/Entity.js
CHANGED
|
@@ -44,8 +44,8 @@ var Entity;
|
|
|
44
44
|
Entity[Entity["Vetala"] = 39] = "Vetala";
|
|
45
45
|
Entity[Entity["Kinnara"] = 40] = "Kinnara";
|
|
46
46
|
Entity[Entity["Viracocha"] = 41] = "Viracocha";
|
|
47
|
-
Entity[Entity["
|
|
48
|
-
Entity[Entity["
|
|
47
|
+
Entity[Entity["MamaQucha"] = 42] = "MamaQucha";
|
|
48
|
+
Entity[Entity["Illapa"] = 43] = "Illapa";
|
|
49
49
|
Entity[Entity["Inti"] = 44] = "Inti";
|
|
50
50
|
Entity[Entity["Puma"] = 45] = "Puma";
|
|
51
51
|
Entity[Entity["Amaru"] = 46] = "Amaru";
|
|
@@ -86,12 +86,12 @@ var Entity;
|
|
|
86
86
|
})(Entity = exports.Entity || (exports.Entity = {}));
|
|
87
87
|
var EntityType;
|
|
88
88
|
(function (EntityType) {
|
|
89
|
-
EntityType[EntityType["
|
|
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.
|
|
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.
|
|
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;
|
package/dist/rules/RuleId.d.ts
CHANGED
package/dist/rules/RuleId.js
CHANGED
|
@@ -65,4 +65,5 @@ var RuleId;
|
|
|
65
65
|
RuleId[RuleId["Mythology"] = 1000] = "Mythology";
|
|
66
66
|
RuleId[RuleId["Creature"] = 1001] = "Creature";
|
|
67
67
|
RuleId[RuleId["Divinity"] = 1002] = "Divinity";
|
|
68
|
+
RuleId[RuleId["Destined"] = 1003] = "Destined";
|
|
68
69
|
})(RuleId = exports.RuleId || (exports.RuleId = {}));
|
|
@@ -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
|
}
|
|
@@ -62,7 +62,7 @@ var GarudaEffectRule = (function (_super) {
|
|
|
62
62
|
};
|
|
63
63
|
GarudaEffectRule.prototype.onCustomMove = function (move) {
|
|
64
64
|
if (move.type === CustomMoveType_1.CustomMoveType.ChoosePlan) {
|
|
65
|
-
this.memorize(Memory_1.Memory.
|
|
65
|
+
this.memorize(Memory_1.Memory.TargetPlane, move.data);
|
|
66
66
|
return [this.startRule(RuleId_1.RuleId.GarudaSacrifice)];
|
|
67
67
|
}
|
|
68
68
|
return _super.prototype.onCustomMove.call(this, move);
|
|
@@ -91,7 +91,7 @@ var GarudaSacrificeRule = (function (_super) {
|
|
|
91
91
|
};
|
|
92
92
|
GarudaSacrificeRule.prototype.getCardsToSacrifice = function () {
|
|
93
93
|
var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
|
|
94
|
-
var plan = this.remind(Memory_1.Memory.
|
|
94
|
+
var plan = this.remind(Memory_1.Memory.TargetPlane);
|
|
95
95
|
return pantheon.visibleEntities.id(function (id) { return (0, Entity_1.isCreature)(id.front); }).location(function (l) { return l.y === plan; });
|
|
96
96
|
};
|
|
97
97
|
GarudaSacrificeRule.prototype.onSacrifice = function () {
|
|
@@ -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;
|
|
@@ -37,10 +37,10 @@ var IllapaEffectRule = (function (_super) {
|
|
|
37
37
|
};
|
|
38
38
|
IllapaEffectRule.prototype.onCustomMove = function (move) {
|
|
39
39
|
if (move.type === CustomMoveType_1.CustomMoveType.ChoosePlan) {
|
|
40
|
-
this.memorize(Memory_1.Memory.
|
|
40
|
+
this.memorize(Memory_1.Memory.TargetPlane, move.data);
|
|
41
41
|
var moves = new IllapaSacrificeRule(this.game).playEffect();
|
|
42
42
|
if (!moves.some(rules_api_1.isStartSimultaneousRule)) {
|
|
43
|
-
this.forget(Memory_1.Memory.
|
|
43
|
+
this.forget(Memory_1.Memory.TargetPlane);
|
|
44
44
|
moves.push(this.customMove(CustomMoveType_1.CustomMoveType.EndEffect));
|
|
45
45
|
}
|
|
46
46
|
return moves;
|
|
@@ -62,13 +62,13 @@ var IllapaSacrificeRule = (function (_super) {
|
|
|
62
62
|
return this.game.players.filter(function (player) { return _this.isOpponent(player); });
|
|
63
63
|
};
|
|
64
64
|
IllapaSacrificeRule.prototype.getCardsToSacrifice = function (player) {
|
|
65
|
-
var line = this.remind(Memory_1.Memory.
|
|
65
|
+
var line = this.remind(Memory_1.Memory.TargetPlane);
|
|
66
66
|
return _super.prototype.getCardsToSacrifice.call(this, player)
|
|
67
67
|
.id(function (id) { return (0, Entity_1.isCreature)(id.front); })
|
|
68
68
|
.location(function (l) { return l.y === line; });
|
|
69
69
|
};
|
|
70
70
|
IllapaSacrificeRule.prototype.onRuleEnd = function () {
|
|
71
|
-
this.forget(Memory_1.Memory.
|
|
71
|
+
this.forget(Memory_1.Memory.TargetPlane);
|
|
72
72
|
return [];
|
|
73
73
|
};
|
|
74
74
|
return IllapaSacrificeRule;
|
|
@@ -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;
|
|
@@ -29,19 +29,19 @@ var MinotaurEffectRule = (function (_super) {
|
|
|
29
29
|
return _this;
|
|
30
30
|
}
|
|
31
31
|
MinotaurEffectRule.prototype.onRuleStart = function () {
|
|
32
|
-
this.memorize(Memory_1.Memory.
|
|
32
|
+
this.memorize(Memory_1.Memory.TargetPlane, this.card.location.x);
|
|
33
33
|
return _super.prototype.onRuleStart.call(this);
|
|
34
34
|
};
|
|
35
35
|
MinotaurEffectRule.prototype.getMovingCards = function (player) {
|
|
36
36
|
var _a;
|
|
37
|
-
var column = (_a = this.remind(Memory_1.Memory.
|
|
37
|
+
var column = (_a = this.remind(Memory_1.Memory.TargetPlane)) !== null && _a !== void 0 ? _a : this.card.location.x;
|
|
38
38
|
return new Pantheon_1.Pantheon(this.game, player).visibleEntities.location(function (l) { return l.x === column; }).id(function (id) { return (0, Entity_1.isCreature)(id.front); });
|
|
39
39
|
};
|
|
40
40
|
MinotaurEffectRule.prototype.isLegalDestination = function (space, cardLocation) {
|
|
41
41
|
return space.y === cardLocation.y;
|
|
42
42
|
};
|
|
43
43
|
MinotaurEffectRule.prototype.onRuleEnd = function () {
|
|
44
|
-
this.forget(Memory_1.Memory.
|
|
44
|
+
this.forget(Memory_1.Memory.TargetPlane);
|
|
45
45
|
return [];
|
|
46
46
|
};
|
|
47
47
|
return MinotaurEffectRule;
|
|
@@ -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.
|
|
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": "
|
|
32
|
+
"gitHead": "7c778cb2470a469d0d8cbec9baf0ef3e79a3b7d9"
|
|
33
33
|
}
|