powergrid-engine 1.10.0 → 1.12.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/src/maps.ts CHANGED
@@ -7,19 +7,21 @@ import { map as benelux } from './maps/benelux';
7
7
  import { map as brazil } from './maps/brazil';
8
8
  import { map as centraleurope } from './maps/centraleurope';
9
9
  import { map as china } from './maps/china';
10
+ import { map as europe } from './maps/europe';
10
11
  import { map as france } from './maps/france';
11
12
  import { map as germany, mapRecharged as germanyRecharged } from './maps/germany';
12
13
  import { map as indian } from './maps/indian';
13
14
  import { map as italy } from './maps/italy';
15
+ // import { map as japan } from './maps/japan';
16
+ import { map as korea } from './maps/korea';
14
17
  import { map as middleeast } from './maps/middleeast';
18
+ import { map as northamerica } from './maps/northamerica';
19
+ import { map as northerneurope } from './maps/northerneurope';
15
20
  import { map as quebec } from './maps/quebec';
16
21
  import { map as russia } from './maps/russia';
22
+ import { map as southafrica } from './maps/southafrica';
17
23
  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
- // import { map as southafrica } from './maps/southafrica';
22
- // import { map as ukireland } from './maps/ukireland';
24
+ import { map as ukireland } from './maps/ukireland';
23
25
 
24
26
  export interface City {
25
27
  name: string;
@@ -30,6 +32,16 @@ export interface City {
30
32
  // and connecting to them costs a fixed price (transregionalConnectionCost on the GameMap)
31
33
  // instead of the normal dijkstra path cost.
32
34
  transregional?: boolean;
35
+ // South Africa's six cross-border foreign-country spaces: only one player ever
36
+ // builds here (cap 1 instead of the standard 3), and the build skips the
37
+ // 10+position*5 house-base cost — the dijkstra path cost (the 30-Elektro edge)
38
+ // is the complete cost.
39
+ singleOccupancy?: boolean;
40
+ // UK & Ireland: which physical island this city sits on ('gb' or 'ie'). Used
41
+ // together with GameMap.crossIslandSurcharge to model the two-network mechanic
42
+ // (no sea edges; starting a network on a new island costs a flat surcharge on
43
+ // top of the first-house base cost).
44
+ island?: string;
33
45
  }
34
46
 
35
47
  export interface Connection {
@@ -55,6 +67,10 @@ export interface GameMap {
55
67
  powerPlantMarketPosition?: [number, number];
56
68
  actualMarketWidth?: number;
57
69
  mapPosition?: [number, number];
70
+ // Optional rotation in degrees (clockwise) applied around the centroid of
71
+ // the city coordinates. Useful for fitting non-rectangular maps into the
72
+ // viewBox (e.g., Europe).
73
+ mapRotation?: number;
58
74
  buttonsPosition?: [number, number];
59
75
  playerBoardsPosition?: [number, number];
60
76
  supplyPosition?: [number, number];
@@ -62,6 +78,14 @@ export interface GameMap {
62
78
  resupply?: number[][][];
63
79
  startingResources?: number[];
64
80
  startingSupply?: number[];
81
+ // Korea: parallel North-side resupply / starting tables. Indexed as
82
+ // [resource][playerCount-2][step-1] for resupplyNorth, and [coal, oil, garbage]
83
+ // for the starting arrays (no uranium row — North bans nuclear).
84
+ resupplyNorth?: number[][][];
85
+ startingResourcesNorth?: number[];
86
+ coalPricesNorth?: number[];
87
+ oilPricesNorth?: number[];
88
+ garbagePricesNorth?: number[];
65
89
  maxPriceAvailable?: number[]; // For India, only limited sections of the supply are available in step 1 and 2.
66
90
  coalPrices?: number[];
67
91
  oilPrices?: number[];
@@ -76,7 +100,19 @@ export interface GameMap {
76
100
  futureMarket: PowerPlant[];
77
101
  powerPlantsDeck: PowerPlant[];
78
102
  };
103
+ regionalPowerPlants?: Record<string, PowerPlant[]>;
104
+ // UK & Ireland: extra Elektro paid to start a network on an island where the
105
+ // player has no city yet. Builds on the new island skip the dijkstra path
106
+ // cost (there is no sea edge) and pay 10+position*5 + this surcharge.
107
+ crossIslandSurcharge?: number;
79
108
  mapSpecificRules?: string;
109
+ // Dev-only: when set, the viewer renders an `<image>` backdrop behind the
110
+ // map and logs click positions (in local SVG coords) to the console as
111
+ // ready-to-paste `{ name, region, x, y }` lines. Intended for authoring
112
+ // city coordinates against a photo of the printed board. Set `adjustRatio`
113
+ // to [1,1] and `mapRotation` to 0 while picking so the logged coords are
114
+ // in the same space you'll save them in.
115
+ devBackdrop?: { src: string; width: number; height: number; opacity?: number };
80
116
  }
81
117
 
82
118
  export const maps: GameMap[] = [
@@ -94,12 +130,14 @@ export const maps: GameMap[] = [
94
130
  russia,
95
131
  centraleurope,
96
132
  badenwurttemberg,
133
+ northerneurope,
134
+ korea,
135
+ europe,
136
+ northamerica,
137
+ southafrica,
138
+ ukireland,
97
139
  // australia,
98
140
  // japan,
99
- // korea,
100
- // northerneurope,
101
- // southafrica,
102
- // ukireland,
103
141
  ];
104
142
 
105
143
  export const mapsRecharged: GameMap[] = [
@@ -117,11 +155,13 @@ export const mapsRecharged: GameMap[] = [
117
155
  russia,
118
156
  centraleurope,
119
157
  badenwurttemberg,
158
+ northerneurope,
159
+ korea,
160
+ europe,
161
+ northamerica,
162
+ southafrica,
163
+ ukireland,
120
164
  // australia,
121
165
  // china,
122
166
  // japan,
123
- // korea,
124
- // northerneurope,
125
- // southafrica,
126
- // ukireland,
127
167
  ];
package/src/move.ts CHANGED
@@ -27,6 +27,13 @@ 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';
33
+ // South Africa: coal bought from the storage pool below the market
34
+ // ($8 flat) rather than from the market. Omitted on all other maps
35
+ // and on regular SA market buys.
36
+ fromStorage?: boolean;
30
37
  };
31
38
  fromSupply?: boolean;
32
39
  }