powergrid-engine 1.9.9 → 1.11.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.
- package/dist/src/available-moves.d.ts +1 -0
- package/dist/src/available-moves.js +44 -9
- package/dist/src/engine.js +219 -49
- package/dist/src/gamestate.d.ts +12 -1
- package/dist/src/maps/korea.js +107 -0
- package/dist/src/maps/northerneurope.js +75 -0
- package/dist/src/maps.d.ts +6 -0
- package/dist/src/maps.js +7 -4
- package/dist/src/move.d.ts +1 -0
- package/package.json +1 -1
- package/src/available-moves.ts +71 -10
- package/src/engine.ts +237 -42
- package/src/gamestate.ts +24 -4
- package/src/maps/korea.ts +109 -0
- package/src/maps/northerneurope.ts +76 -0
- package/src/maps.ts +16 -7
- package/src/move.ts +3 -0
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// by John and Cici
|
|
2
|
+
import { PowerPlantType } from './../gamestate';
|
|
1
3
|
import { GameMap } from './../maps';
|
|
2
4
|
|
|
3
5
|
export enum Regions {
|
|
@@ -100,6 +102,80 @@ export const map: GameMap = {
|
|
|
100
102
|
{ name: Cities.Bergen, region: Regions.Red, x: 68, y: 586 },
|
|
101
103
|
{ name: Cities.Stavanger, region: Regions.Red, x: 72, y: 647 },
|
|
102
104
|
],
|
|
105
|
+
layout: 'Portrait',
|
|
106
|
+
adjustRatio: [1.2, 1.0],
|
|
107
|
+
mapPosition: [80, 30],
|
|
108
|
+
startingResources: [18, 18, 12, 6],
|
|
109
|
+
resupply: [
|
|
110
|
+
// Coal
|
|
111
|
+
[
|
|
112
|
+
[2, 4, 3], // 2P
|
|
113
|
+
[3, 4, 4], // 3P
|
|
114
|
+
[4, 5, 5], // 4P
|
|
115
|
+
[4, 5, 6], // 5P
|
|
116
|
+
[6, 8, 5], // 6P
|
|
117
|
+
],
|
|
118
|
+
// Oil
|
|
119
|
+
[
|
|
120
|
+
[1, 2, 3],
|
|
121
|
+
[2, 2, 3],
|
|
122
|
+
[2, 3, 4],
|
|
123
|
+
[3, 4, 5],
|
|
124
|
+
[4, 5, 6],
|
|
125
|
+
],
|
|
126
|
+
// Garbage
|
|
127
|
+
[
|
|
128
|
+
[1, 2, 3],
|
|
129
|
+
[1, 2, 3],
|
|
130
|
+
[2, 3, 4],
|
|
131
|
+
[3, 3, 5],
|
|
132
|
+
[3, 5, 6],
|
|
133
|
+
],
|
|
134
|
+
// Uranium
|
|
135
|
+
[
|
|
136
|
+
[1, 2, 2],
|
|
137
|
+
[1, 2, 2],
|
|
138
|
+
[2, 3, 2],
|
|
139
|
+
[2, 4, 3],
|
|
140
|
+
[2, 4, 4],
|
|
141
|
+
],
|
|
142
|
+
],
|
|
143
|
+
regionalPowerPlants: {
|
|
144
|
+
[Regions.Orange]: [
|
|
145
|
+
// Denmark
|
|
146
|
+
{ number: 19, type: PowerPlantType.Oil, cost: 2, citiesPowered: 4 },
|
|
147
|
+
{ number: 26, type: PowerPlantType.Coal, cost: 3, citiesPowered: 5 },
|
|
148
|
+
],
|
|
149
|
+
[Regions.Red]: [
|
|
150
|
+
// Norway
|
|
151
|
+
{ number: 7, type: PowerPlantType.Wind, cost: 0, citiesPowered: 1 },
|
|
152
|
+
{ number: 46, type: PowerPlantType.Wind, cost: 0, citiesPowered: 6 },
|
|
153
|
+
],
|
|
154
|
+
[Regions.Purple]: [
|
|
155
|
+
// Sweden South
|
|
156
|
+
{ number: 10, type: PowerPlantType.Uranium, cost: 2, citiesPowered: 3 },
|
|
157
|
+
{ number: 39, type: PowerPlantType.Wind, cost: 0, citiesPowered: 5 },
|
|
158
|
+
],
|
|
159
|
+
[Regions.Yellow]: [
|
|
160
|
+
// Sweden North
|
|
161
|
+
{ number: 21, type: PowerPlantType.Wind, cost: 0, citiesPowered: 2 },
|
|
162
|
+
{ number: 25, type: PowerPlantType.Uranium, cost: 1, citiesPowered: 4 },
|
|
163
|
+
],
|
|
164
|
+
[Regions.Brown]: [
|
|
165
|
+
// Finland
|
|
166
|
+
{ number: 32, type: PowerPlantType.Garbage, cost: 2, citiesPowered: 6 },
|
|
167
|
+
{ number: 44, type: PowerPlantType.Uranium, cost: 1, citiesPowered: 7 },
|
|
168
|
+
],
|
|
169
|
+
[Regions.Pink]: [
|
|
170
|
+
// Baltic States
|
|
171
|
+
{ number: 18, type: PowerPlantType.Coal, cost: 1, citiesPowered: 3 },
|
|
172
|
+
{ number: 22, type: PowerPlantType.Wind, cost: 0, citiesPowered: 3 },
|
|
173
|
+
],
|
|
174
|
+
},
|
|
175
|
+
mapSpecificRules:
|
|
176
|
+
'Nuclear plants may only be purchased by players with at least one city in Sweden, Finland, or the Baltic States. ' +
|
|
177
|
+
'Players with cities only in Norway or Denmark may not bid on or buy nuclear plants. ' +
|
|
178
|
+
'Resources start at: coal 3 Elektro, oil 3 Elektro, garbage 5 Elektro, uranium 7 Elektro.',
|
|
103
179
|
connections: [
|
|
104
180
|
{ nodes: [Cities.Bood, Cities.Tromso], cost: 17 },
|
|
105
181
|
{ nodes: [Cities.Tromso, Cities.Oulu], cost: 25 },
|
package/src/maps.ts
CHANGED
|
@@ -11,13 +11,13 @@ import { map as france } from './maps/france';
|
|
|
11
11
|
import { map as germany, mapRecharged as germanyRecharged } from './maps/germany';
|
|
12
12
|
import { map as indian } from './maps/indian';
|
|
13
13
|
import { map as italy } from './maps/italy';
|
|
14
|
+
// import { map as japan } from './maps/japan';
|
|
15
|
+
import { map as korea } from './maps/korea';
|
|
14
16
|
import { map as middleeast } from './maps/middleeast';
|
|
17
|
+
import { map as northerneurope } from './maps/northerneurope';
|
|
15
18
|
import { map as quebec } from './maps/quebec';
|
|
16
19
|
import { map as russia } from './maps/russia';
|
|
17
20
|
import { map as spainportugal } from './maps/spainportugal';
|
|
18
|
-
// import { map as japan } from './maps/japan';
|
|
19
|
-
// import { map as korea } from './maps/korea';
|
|
20
|
-
// import { map as northerneurope } from './maps/northerneurope';
|
|
21
21
|
// import { map as southafrica } from './maps/southafrica';
|
|
22
22
|
// import { map as ukireland } from './maps/ukireland';
|
|
23
23
|
|
|
@@ -62,6 +62,14 @@ export interface GameMap {
|
|
|
62
62
|
resupply?: number[][][];
|
|
63
63
|
startingResources?: number[];
|
|
64
64
|
startingSupply?: number[];
|
|
65
|
+
// Korea: parallel North-side resupply / starting tables. Indexed as
|
|
66
|
+
// [resource][playerCount-2][step-1] for resupplyNorth, and [coal, oil, garbage]
|
|
67
|
+
// for the starting arrays (no uranium row — North bans nuclear).
|
|
68
|
+
resupplyNorth?: number[][][];
|
|
69
|
+
startingResourcesNorth?: number[];
|
|
70
|
+
coalPricesNorth?: number[];
|
|
71
|
+
oilPricesNorth?: number[];
|
|
72
|
+
garbagePricesNorth?: number[];
|
|
65
73
|
maxPriceAvailable?: number[]; // For India, only limited sections of the supply are available in step 1 and 2.
|
|
66
74
|
coalPrices?: number[];
|
|
67
75
|
oilPrices?: number[];
|
|
@@ -76,6 +84,7 @@ export interface GameMap {
|
|
|
76
84
|
futureMarket: PowerPlant[];
|
|
77
85
|
powerPlantsDeck: PowerPlant[];
|
|
78
86
|
};
|
|
87
|
+
regionalPowerPlants?: Record<string, PowerPlant[]>;
|
|
79
88
|
mapSpecificRules?: string;
|
|
80
89
|
}
|
|
81
90
|
|
|
@@ -94,10 +103,10 @@ export const maps: GameMap[] = [
|
|
|
94
103
|
russia,
|
|
95
104
|
centraleurope,
|
|
96
105
|
badenwurttemberg,
|
|
106
|
+
northerneurope,
|
|
107
|
+
korea,
|
|
97
108
|
// australia,
|
|
98
109
|
// japan,
|
|
99
|
-
// korea,
|
|
100
|
-
// northerneurope,
|
|
101
110
|
// southafrica,
|
|
102
111
|
// ukireland,
|
|
103
112
|
];
|
|
@@ -117,11 +126,11 @@ export const mapsRecharged: GameMap[] = [
|
|
|
117
126
|
russia,
|
|
118
127
|
centraleurope,
|
|
119
128
|
badenwurttemberg,
|
|
129
|
+
northerneurope,
|
|
130
|
+
korea,
|
|
120
131
|
// australia,
|
|
121
132
|
// china,
|
|
122
133
|
// japan,
|
|
123
|
-
// korea,
|
|
124
|
-
// northerneurope,
|
|
125
134
|
// southafrica,
|
|
126
135
|
// ukireland,
|
|
127
136
|
];
|
package/src/move.ts
CHANGED
|
@@ -27,6 +27,9 @@ export declare namespace Moves {
|
|
|
27
27
|
name: MoveName.BuyResource;
|
|
28
28
|
data: {
|
|
29
29
|
resource: ResourceType;
|
|
30
|
+
// Korea: which side's market the resource was bought from.
|
|
31
|
+
// Omitted on all other maps.
|
|
32
|
+
side?: 'north' | 'south';
|
|
30
33
|
};
|
|
31
34
|
fromSupply?: boolean;
|
|
32
35
|
}
|