@gamepark/mythologies 0.7.0 → 0.7.1
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/material/Destiny.d.ts +1 -0
- package/dist/material/Destiny.js +9 -0
- package/dist/material/LocationType.d.ts +2 -1
- package/dist/material/LocationType.js +1 -0
- package/dist/material/MaterialType.d.ts +2 -1
- package/dist/material/MaterialType.js +1 -0
- package/dist/material/Pantheon.js +2 -4
- package/dist/rules/PlaceCardsRule.d.ts +2 -0
- package/dist/rules/PlaceCardsRule.js +15 -3
- package/dist/rules/RuleId.d.ts +4 -1
- package/dist/rules/RuleId.js +3 -0
- package/package.json +2 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MaterialRulesPart } from '@gamepark/rules-api';
|
|
2
2
|
import { PlayerColor } from '../PlayerColor';
|
|
3
3
|
export declare class Destiny extends MaterialRulesPart {
|
|
4
|
+
get mythologies(): import("./Mythology").Mythology[];
|
|
4
5
|
getMythologyBoard(player: PlayerColor): import("@gamepark/rules-api").Material<number, number, number>;
|
|
5
6
|
getMythology(player: PlayerColor): import("./Mythology").Mythology;
|
|
6
7
|
getDestinyMap(destiny: number): PlayerColor[][];
|
package/dist/material/Destiny.js
CHANGED
|
@@ -25,6 +25,15 @@ var Destiny = (function (_super) {
|
|
|
25
25
|
function Destiny() {
|
|
26
26
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
27
27
|
}
|
|
28
|
+
Object.defineProperty(Destiny.prototype, "mythologies", {
|
|
29
|
+
get: function () {
|
|
30
|
+
return this.material(MaterialType_1.MaterialType.MythologyBoard)
|
|
31
|
+
.getItems()
|
|
32
|
+
.map(function (item) { return item.id.mythology; });
|
|
33
|
+
},
|
|
34
|
+
enumerable: false,
|
|
35
|
+
configurable: true
|
|
36
|
+
});
|
|
28
37
|
Destiny.prototype.getMythologyBoard = function (player) {
|
|
29
38
|
var destiny = this.material(MaterialType_1.MaterialType.DestinyCard)
|
|
30
39
|
.location(LocationType_1.LocationType.CurrentDestiny)
|
|
@@ -26,6 +26,7 @@ var LocationType;
|
|
|
26
26
|
LocationType[LocationType["PlayerFavor"] = 21] = "PlayerFavor";
|
|
27
27
|
LocationType[LocationType["PlayerDiscard"] = 22] = "PlayerDiscard";
|
|
28
28
|
LocationType[LocationType["PlayerBufferArea"] = 23] = "PlayerBufferArea";
|
|
29
|
+
LocationType[LocationType["GameHelpArea"] = 24] = "GameHelpArea";
|
|
29
30
|
})(LocationType = exports.LocationType || (exports.LocationType = {}));
|
|
30
31
|
var isInSanctuary = function (type) { return type === LocationType.SanctuaryCreatureSpot || type === LocationType.SanctuaryGodSpot; };
|
|
31
32
|
exports.isInSanctuary = isInSanctuary;
|
|
@@ -13,4 +13,5 @@ var MaterialType;
|
|
|
13
13
|
MaterialType[MaterialType["RoundCounterBoard"] = 8] = "RoundCounterBoard";
|
|
14
14
|
MaterialType[MaterialType["RoundToken"] = 9] = "RoundToken";
|
|
15
15
|
MaterialType[MaterialType["DestinyCard"] = 10] = "DestinyCard";
|
|
16
|
+
MaterialType[MaterialType["HelpCard"] = 11] = "HelpCard";
|
|
16
17
|
})(MaterialType = exports.MaterialType || (exports.MaterialType = {}));
|
|
@@ -58,6 +58,7 @@ var Memory_1 = require("../Memory");
|
|
|
58
58
|
var MythologiesRules_1 = require("../MythologiesRules");
|
|
59
59
|
var PermanentEffectsRule_1 = require("../rules/effects/PermanentEffectsRule");
|
|
60
60
|
var TriggerEffectsRule_1 = require("../rules/effects/TriggerEffectsRule");
|
|
61
|
+
var Destiny_1 = require("./Destiny");
|
|
61
62
|
var Entity_1 = require("./Entity");
|
|
62
63
|
var Effect_1 = require("./entity/Effect");
|
|
63
64
|
var EntityDescription_1 = require("./entity/EntityDescription");
|
|
@@ -431,10 +432,7 @@ var Pantheon = (function (_super) {
|
|
|
431
432
|
});
|
|
432
433
|
Object.defineProperty(Pantheon.prototype, "missingMythologies", {
|
|
433
434
|
get: function () {
|
|
434
|
-
|
|
435
|
-
.getItems()
|
|
436
|
-
.map(function (item) { return item.id.mythology; });
|
|
437
|
-
return (0, lodash_1.difference)(mythologies, this.mythologies);
|
|
435
|
+
return (0, lodash_1.difference)(new Destiny_1.Destiny(this.game).mythologies, this.mythologies);
|
|
438
436
|
},
|
|
439
437
|
enumerable: false,
|
|
440
438
|
configurable: true
|
|
@@ -2,6 +2,8 @@ import { CustomMove, ItemMove, MaterialMove, PlayerTurnRule } from '@gamepark/ru
|
|
|
2
2
|
import { RuleId } from './RuleId';
|
|
3
3
|
export declare class PlaceCardsRule extends PlayerTurnRule {
|
|
4
4
|
isInvoke: boolean;
|
|
5
|
+
onRuleStart(): import("@gamepark/rules-api").MoveItem<number, number, number>[];
|
|
6
|
+
get selectedCards(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
5
7
|
getPlayerMoves(): MaterialMove<number, number, number, number>[];
|
|
6
8
|
get infiniteEffects(): import("../material/entity/Effect").PendingEffect<import("../material/entity/Effect").TriggerEvent>[];
|
|
7
9
|
isOncePerTurnAvailable(cardIndex: number): boolean;
|
|
@@ -72,12 +72,22 @@ var PlaceCardsRule = (function (_super) {
|
|
|
72
72
|
_this.isInvoke = true;
|
|
73
73
|
return _this;
|
|
74
74
|
}
|
|
75
|
+
PlaceCardsRule.prototype.onRuleStart = function () {
|
|
76
|
+
return this.selectedCards.rotation(function (rotation) { return rotation !== undefined; }).rotateItems(undefined);
|
|
77
|
+
};
|
|
78
|
+
Object.defineProperty(PlaceCardsRule.prototype, "selectedCards", {
|
|
79
|
+
get: function () {
|
|
80
|
+
var tokens = this.tokens.getItems();
|
|
81
|
+
return this.material(MaterialType_1.MaterialType.EntityCard).index(tokens.map(function (token) { return token.location.parent; }));
|
|
82
|
+
},
|
|
83
|
+
enumerable: false,
|
|
84
|
+
configurable: true
|
|
85
|
+
});
|
|
75
86
|
PlaceCardsRule.prototype.getPlayerMoves = function () {
|
|
76
87
|
var e_1, _a;
|
|
77
88
|
var _this = this;
|
|
78
89
|
var moves = this.infiniteEffects.map(function (effect) { return _this.customMove(CustomMoveType_1.CustomMoveType.PlayEffect, effect); });
|
|
79
|
-
var
|
|
80
|
-
var cards = this.material(MaterialType_1.MaterialType.EntityCard).index(tokens.map(function (token) { return token.location.parent; }));
|
|
90
|
+
var cards = this.selectedCards;
|
|
81
91
|
if (cards.length) {
|
|
82
92
|
var cardsICanInvoke = new Pantheon_1.Pantheon(this.game, this.player).gems < 4 ? cards.id(function (id) { return !(0, Entity_1.isGod)(id.front); }) : cards;
|
|
83
93
|
try {
|
|
@@ -135,7 +145,9 @@ var PlaceCardsRule = (function (_super) {
|
|
|
135
145
|
});
|
|
136
146
|
PlaceCardsRule.prototype.beforeItemMove = function (move) {
|
|
137
147
|
var moves = [];
|
|
138
|
-
if ((0, rules_api_1.isMoveItemType)(MaterialType_1.MaterialType.EntityCard)(move)
|
|
148
|
+
if ((0, rules_api_1.isMoveItemType)(MaterialType_1.MaterialType.EntityCard)(move) &&
|
|
149
|
+
move.location.type !== LocationType_1.LocationType.SanctuaryCreatureSpot &&
|
|
150
|
+
move.location.type !== LocationType_1.LocationType.SanctuaryGodSpot) {
|
|
139
151
|
var token = this.tokens.parent(move.itemIndex);
|
|
140
152
|
if (token.length) {
|
|
141
153
|
moves.push(token.moveItem({ type: LocationType_1.LocationType.PlayerHand, player: this.player }));
|
package/dist/rules/RuleId.d.ts
CHANGED
package/dist/rules/RuleId.js
CHANGED
|
@@ -61,4 +61,7 @@ var RuleId;
|
|
|
61
61
|
RuleId[RuleId["LeprechaunEffect"] = 59] = "LeprechaunEffect";
|
|
62
62
|
RuleId[RuleId["SelkieEffect"] = 60] = "SelkieEffect";
|
|
63
63
|
RuleId[RuleId["DullahanEffect"] = 61] = "DullahanEffect";
|
|
64
|
+
RuleId[RuleId["Mythology"] = 1000] = "Mythology";
|
|
65
|
+
RuleId[RuleId["Creature"] = 1001] = "Creature";
|
|
66
|
+
RuleId[RuleId["Divinity"] = 1002] = "Divinity";
|
|
64
67
|
})(RuleId = exports.RuleId || (exports.RuleId = {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gamepark/mythologies",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
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": "c14d682186f3955885026c16a9446734b4002eb0"
|
|
33
33
|
}
|