@gamepark/mythologies 1.0.15 → 1.0.17
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.
|
@@ -95,9 +95,13 @@ export class Pantheon extends MaterialRulesPart {
|
|
|
95
95
|
moves.push(this.spendGems(4));
|
|
96
96
|
}
|
|
97
97
|
const grid = this.indexGrid;
|
|
98
|
-
const
|
|
98
|
+
const crushedIndex = grid[move.location.y][move.location.x];
|
|
99
99
|
grid[move.location.y][move.location.x] = move.itemIndex;
|
|
100
|
-
|
|
100
|
+
const event = { type: TriggerEventType.SelfPlaced };
|
|
101
|
+
if (crushedIndex !== null) {
|
|
102
|
+
event.crushed = this.material(MaterialType.EntityCard).getItem(crushedIndex).id.front;
|
|
103
|
+
}
|
|
104
|
+
new TriggerEffectsRule(this.game).triggerCardEffect(move.itemIndex, location, event, entity);
|
|
101
105
|
const summoned = this.isSummon;
|
|
102
106
|
if (summoned) {
|
|
103
107
|
moves.push(...this.onSummon(move));
|
|
@@ -14,7 +14,7 @@ export var TriggerEventType;
|
|
|
14
14
|
})(TriggerEventType || (TriggerEventType = {}));
|
|
15
15
|
export const isEndOfGame = (event) => event.type === TriggerEventType.EndOfGame;
|
|
16
16
|
export const isPlaced = (event) => event.type === TriggerEventType.SelfPlaced;
|
|
17
|
-
export const isPlacedCrush = (event) => isPlaced(event) && event.
|
|
17
|
+
export const isPlacedCrush = (event) => isPlaced(event) && !!event.crushed;
|
|
18
18
|
export var LineEventType;
|
|
19
19
|
(function (LineEventType) {
|
|
20
20
|
LineEventType[LineEventType["BonusGain"] = 1] = "BonusGain";
|
|
@@ -3,7 +3,6 @@ import { entityMythology } from '../../material/Entity';
|
|
|
3
3
|
import { SummonEffectRule } from '../../material/entity/PlaceCardEffectRule';
|
|
4
4
|
import { LocationType } from '../../material/LocationType';
|
|
5
5
|
import { MaterialType } from '../../material/MaterialType';
|
|
6
|
-
import { Pantheon } from '../../material/Pantheon';
|
|
7
6
|
import { RuleId } from '../RuleId';
|
|
8
7
|
export class ImpunduluEffectRule extends SummonEffectRule {
|
|
9
8
|
ruleId = RuleId.ImpunduluEffect;
|
|
@@ -31,9 +30,7 @@ export class ImpunduluEffectRule extends SummonEffectRule {
|
|
|
31
30
|
return deck.maxBy((item) => item.location.x);
|
|
32
31
|
}
|
|
33
32
|
get mythology() {
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
const crushed = pantheon.coveredEntities.location((l) => l.x === x && l.y === y).maxBy((item) => item.location.z);
|
|
37
|
-
return entityMythology(crushed.getItem().id.front);
|
|
33
|
+
const { triggerEvent } = this.getEffect();
|
|
34
|
+
return entityMythology(triggerEvent.crushed);
|
|
38
35
|
}
|
|
39
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gamepark/mythologies",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.17",
|
|
4
4
|
"description": "The rules of Mythologies adapted for Game Park",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"es-toolkit": "^1.44.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@gamepark/rules-api": "~7.
|
|
28
|
+
"@gamepark/rules-api": "~7.5.0",
|
|
29
29
|
"es-toolkit": "^1.44.0"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "62da510f4af0d6790751ef8c24e1faba3e3709af"
|
|
32
32
|
}
|