@gamepark/mythologies 0.12.4 → 1.0.0

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.
@@ -56,7 +56,7 @@ export declare enum Entity {
56
56
  YanluoWang = 51,
57
57
  SunWukong = 52,
58
58
  Nuwa = 53,
59
- ChangE = 54,
59
+ XiWangmu = 54,
60
60
  Tianlong = 55,
61
61
  Qilin = 56,
62
62
  Fenghuang = 57,
@@ -53,7 +53,7 @@ export var Entity;
53
53
  Entity[Entity["YanluoWang"] = 51] = "YanluoWang";
54
54
  Entity[Entity["SunWukong"] = 52] = "SunWukong";
55
55
  Entity[Entity["Nuwa"] = 53] = "Nuwa";
56
- Entity[Entity["ChangE"] = 54] = "ChangE";
56
+ Entity[Entity["XiWangmu"] = 54] = "XiWangmu";
57
57
  Entity[Entity["Tianlong"] = 55] = "Tianlong";
58
58
  Entity[Entity["Qilin"] = 56] = "Qilin";
59
59
  Entity[Entity["Fenghuang"] = 57] = "Fenghuang";
@@ -23,6 +23,8 @@ export declare enum LocationType {
23
23
  PlayerDiscard = 22,
24
24
  PlayerSelectedCards = 23,
25
25
  GameHelpArea = 24,
26
- CardsCount = 25
26
+ CardsCount = 25,
27
+ SummonGainIcon = 26,
28
+ EntityEffect = 27
27
29
  }
28
30
  export declare const isInSanctuary: (type?: LocationType) => type is LocationType.SanctuaryCreatureSpot | LocationType.SanctuaryGodSpot;
@@ -25,5 +25,7 @@ export var LocationType;
25
25
  LocationType[LocationType["PlayerSelectedCards"] = 23] = "PlayerSelectedCards";
26
26
  LocationType[LocationType["GameHelpArea"] = 24] = "GameHelpArea";
27
27
  LocationType[LocationType["CardsCount"] = 25] = "CardsCount";
28
+ LocationType[LocationType["SummonGainIcon"] = 26] = "SummonGainIcon";
29
+ LocationType[LocationType["EntityEffect"] = 27] = "EntityEffect";
28
30
  })(LocationType || (LocationType = {}));
29
31
  export const isInSanctuary = (type) => type === LocationType.SanctuaryCreatureSpot || type === LocationType.SanctuaryGodSpot;
@@ -9,7 +9,7 @@ import { Kelpie } from './celtic/Kelpie';
9
9
  import { Leprechaun } from './celtic/Leprechaun';
10
10
  import { Morrigan } from './celtic/Morrigan';
11
11
  import { Selkie } from './celtic/Selkie';
12
- import { ChangE } from './chinese/ChangE';
12
+ import { XiWangmu } from './chinese/XiWangmu';
13
13
  import { Fenghuang } from './chinese/Fenghuang';
14
14
  import { Jiangshi } from './chinese/Jiangshi';
15
15
  import { Mogwai } from './chinese/Mogwai';
@@ -135,7 +135,7 @@ export const entities = {
135
135
  [Entity.YanluoWang]: YanluoWang,
136
136
  [Entity.SunWukong]: SunWukong,
137
137
  [Entity.Nuwa]: Nuwa,
138
- [Entity.ChangE]: ChangE,
138
+ [Entity.XiWangmu]: XiWangmu,
139
139
  [Entity.Tianlong]: Tianlong,
140
140
  [Entity.Qilin]: Qilin,
141
141
  [Entity.Fenghuang]: Fenghuang,
@@ -0,0 +1,2 @@
1
+ import { EntityDescription } from '../EntityDescription';
2
+ export declare const XiWangmu: EntityDescription;
@@ -0,0 +1,6 @@
1
+ export const XiWangmu = {
2
+ summon: [{ gem: 1, favor: 2 }, { gem: 2 }, {}],
3
+ effect: {
4
+ gemTax: (space, xiWangmu) => (space.y === xiWangmu.location.y ? 1 : 0)
5
+ }
6
+ };
@@ -6,13 +6,11 @@ import { RuleId } from '../RuleId';
6
6
  export class DullahanEffectRule extends MoveEffectRule {
7
7
  ruleId = RuleId.DullahanEffect;
8
8
  onRuleStart() {
9
- const pantheon = new Pantheon(this.game, this.player);
10
- const targetEntitiesAbleToMove = this.getMovingCards()
11
- .filter((item) => pantheon.isAbleToMove(item))
12
- .getIndexes();
13
- if (targetEntitiesAbleToMove.length === 0) {
9
+ const moveCardsMoves = this.getMoveCardsMoves();
10
+ if (moveCardsMoves.length === 0) {
14
11
  return [this.customMove(CustomMoveType.EndEffect)];
15
12
  }
13
+ const targetEntitiesAbleToMove = moveCardsMoves.map((move) => move.itemIndex);
16
14
  this.memorize(Memory.TargetEntities, targetEntitiesAbleToMove);
17
15
  this.memorize(Memory.EffectCount, targetEntitiesAbleToMove.length);
18
16
  const moves = this.getPlayerMoves();
@@ -129,11 +129,9 @@ export class ResolveEffectsRule extends PlayerTurnRule {
129
129
  if (!moves.some((move) => move.kind === MoveKind.RulesMove)) {
130
130
  moves.push(this.customMove(CustomMoveType.EndEffect));
131
131
  }
132
- console.log('moves', moves);
133
132
  return moves;
134
133
  }
135
134
  onEndEffect() {
136
- console.log('end effect', JSON.stringify(this.remind(Memory.OngoingEffect)), JSON.stringify(this.remind(Memory.PendingEffects)));
137
135
  const moves = [];
138
136
  if (this.remind(Memory.OngoingEffect) !== undefined) {
139
137
  this.forget(Memory.OngoingEffect);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gamepark/mythologies",
3
- "version": "0.12.4",
3
+ "version": "1.0.0",
4
4
  "description": "The rules of Mythologies adapted for Game Park",
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -22,11 +22,10 @@
22
22
  },
23
23
  "peerDependencies": {
24
24
  "@gamepark/rules-api": ">=7",
25
- "es-toolkit": "^1.39.10"
25
+ "es-toolkit": "^1.44.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@gamepark/rules-api": "~7.1.0",
29
- "es-toolkit": "^1.39.10"
30
- },
31
- "gitHead": "79e4ece509152d1701227a9af9c501603ab32452"
28
+ "@gamepark/rules-api": "~7.2.0",
29
+ "es-toolkit": "^1.44.0"
30
+ }
32
31
  }