powergrid-engine 1.11.0 → 1.12.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/src/maps.ts CHANGED
@@ -7,6 +7,7 @@ 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';
@@ -14,12 +15,13 @@ import { map as italy } from './maps/italy';
14
15
  // import { map as japan } from './maps/japan';
15
16
  import { map as korea } from './maps/korea';
16
17
  import { map as middleeast } from './maps/middleeast';
18
+ import { map as northamerica } from './maps/northamerica';
17
19
  import { map as northerneurope } from './maps/northerneurope';
18
20
  import { map as quebec } from './maps/quebec';
19
21
  import { map as russia } from './maps/russia';
22
+ import { map as southafrica } from './maps/southafrica';
20
23
  import { map as spainportugal } from './maps/spainportugal';
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];
@@ -85,7 +101,18 @@ export interface GameMap {
85
101
  powerPlantsDeck: PowerPlant[];
86
102
  };
87
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;
88
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 };
89
116
  }
90
117
 
91
118
  export const maps: GameMap[] = [
@@ -105,10 +132,12 @@ export const maps: GameMap[] = [
105
132
  badenwurttemberg,
106
133
  northerneurope,
107
134
  korea,
135
+ europe,
136
+ northamerica,
137
+ southafrica,
138
+ ukireland,
108
139
  // australia,
109
140
  // japan,
110
- // southafrica,
111
- // ukireland,
112
141
  ];
113
142
 
114
143
  export const mapsRecharged: GameMap[] = [
@@ -128,9 +157,11 @@ export const mapsRecharged: GameMap[] = [
128
157
  badenwurttemberg,
129
158
  northerneurope,
130
159
  korea,
160
+ europe,
161
+ northamerica,
162
+ southafrica,
163
+ ukireland,
131
164
  // australia,
132
165
  // china,
133
166
  // japan,
134
- // southafrica,
135
- // ukireland,
136
167
  ];
package/src/move.ts CHANGED
@@ -30,6 +30,10 @@ export declare namespace Moves {
30
30
  // Korea: which side's market the resource was bought from.
31
31
  // Omitted on all other maps.
32
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;
33
37
  };
34
38
  fromSupply?: boolean;
35
39
  }