Skip to content

Commit 29e21ad

Browse files
authored
Merge pull request #11540 from philcampeau/1812-updates
[1812] multiple pre-alpha updates
2 parents c0782cf + 53f922e commit 29e21ad

File tree

10 files changed

+531
-328
lines changed

10 files changed

+531
-328
lines changed

lib/engine/game/g_1812/entities.rb

+78-51
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module G1812
66
module Entities
77
COMPANIES = [
88
{
9-
name: 'Tanfield Railway',
9+
name: '1. Tanfield Railway',
1010
sym: 'P1',
1111
value: 15,
1212
min_price: 5,
@@ -15,7 +15,7 @@ module Entities
1515
abilities: [],
1616
},
1717
{
18-
name: 'Middleton Railway',
18+
name: '2. Middleton Railway',
1919
sym: 'P2',
2020
value: 20,
2121
min_price: 15,
@@ -29,21 +29,26 @@ module Entities
2929
}],
3030
},
3131
{
32-
name: 'Wylam Railway',
32+
name: '3. Wylam Railway',
3333
sym: 'P3',
3434
value: 20,
3535
min_price: 15,
3636
revenue: 5,
3737
desc: 'A corporation owning the Wylam Railway gains a +£10 bonus for all G-train runs to Newcastle Port (F3).',
38-
abilities: [], # G-train bonus is defined in game.rb revenue_for method
38+
abilities: [{
39+
type: 'hex_bonus',
40+
owner_type: 'corporation',
41+
hexes: ['F3'],
42+
amount: 10,
43+
}],
3944
},
4045
{
41-
name: 'Sheffeild & Rotherham Railway',
46+
name: '4. Sheffield & Rotherham Railway',
4247
sym: 'P4',
4348
value: 20,
4449
min_price: 15,
4550
revenue: 5,
46-
desc: 'A corporation owning the Sheffeild & Rotherham Railway gains a +£10 bonus for all runs to Sheffield (C18).',
51+
desc: 'A corporation owning the Sheffield & Rotherham Railway gains a +£10 bonus for all runs to Sheffield (C18).',
4752
abilities: [{
4853
type: 'hex_bonus',
4954
owner_type: 'corporation',
@@ -52,7 +57,7 @@ module Entities
5257
}],
5358
},
5459
{
55-
name: 'Leeds & Selby Railway',
60+
name: '5. Leeds & Selby Railway',
5661
sym: 'P5',
5762
value: 40,
5863
min_price: 30,
@@ -78,7 +83,7 @@ module Entities
7883
],
7984
},
8085
{
81-
name: 'Stephenson’s Engine Works',
86+
name: '6. Stephenson’s Engine Works',
8287
sym: 'P6',
8388
value: 40,
8489
min_price: 30,
@@ -95,7 +100,7 @@ module Entities
95100
}],
96101
},
97102
{
98-
name: 'Stockton & Darlington Railway',
103+
name: '7. Stockton & Darlington Railway',
99104
sym: 'P7',
100105
value: 40,
101106
min_price: 30,
@@ -121,45 +126,59 @@ module Entities
121126
],
122127
},
123128
{
124-
name: 'Stanhope & Tyne Railway',
129+
name: '8. Stanhope & Tyne Railway',
125130
sym: 'P8',
126131
value: 40,
127132
min_price: 30,
128133
revenue: 10,
129134
desc: 'A corporation owning the Stanhope & Tyne Railway gains a +£10 bonus for all G-train runs to Newcastle '\
130135
'Port (F3). Additionally, the owning corporation may lay 2 extra yellow tiles, in hexes C6 and D7.',
131-
abilities: [{
132-
type: 'tile_lay',
133-
owner_type: 'corporation',
134-
hexes: %w[C6 D7],
135-
special: false,
136-
when: 'track',
137-
tiles: [],
138-
cost: 0,
139-
}],
140-
# G-train bonus is defined in game.rb revenue_for method
136+
abilities: [
137+
{
138+
type: 'tile_lay',
139+
owner_type: 'corporation',
140+
hexes: %w[C6 D7],
141+
special: false,
142+
when: 'track',
143+
tiles: [],
144+
cost: 0,
145+
},
146+
{
147+
type: 'hex_bonus',
148+
owner_type: 'corporation',
149+
hexes: ['F3'],
150+
amount: 10,
151+
},
152+
],
141153
},
142154
{
143-
name: 'Whitby & Pickering Railway',
155+
name: '9. Whitby & Pickering Railway',
144156
sym: 'P9',
145157
value: 40,
146158
min_price: 30,
147159
revenue: 10,
148160
desc: 'A corporation owning the Whitby & Pickering Railway gains a +£10 bonus for all G-train runs to Whitby '\
149161
'Port (H9). Additionally, the owning corporation may lay 3 extra yellow tiles, in hexes F13, G12, and G10.',
150-
abilities: [{
151-
type: 'tile_lay',
152-
owner_type: 'corporation',
153-
hexes: %w[F13 G10 G12],
154-
special: false,
155-
when: 'track',
156-
tiles: [],
157-
cost: 0,
158-
}],
159-
# G-train bonus is defined in game.rb revenue_for method
162+
abilities: [
163+
{
164+
type: 'tile_lay',
165+
owner_type: 'corporation',
166+
hexes: %w[F13 G10 G12],
167+
special: false,
168+
when: 'track',
169+
tiles: [],
170+
cost: 0,
171+
},
172+
{
173+
type: 'hex_bonus',
174+
owner_type: 'corporation',
175+
hexes: ['H9'],
176+
amount: 10,
177+
},
178+
],
160179
},
161180
{
162-
name: 'Newcastle & Carlisle Railway',
181+
name: '10. Newcastle & Carlisle Railway',
163182
sym: 'P10',
164183
value: 40,
165184
min_price: 30,
@@ -185,7 +204,7 @@ module Entities
185204
],
186205
},
187206
{
188-
name: 'Hull Docks Company',
207+
name: '11. Hull Docks Company',
189208
sym: 'P11',
190209
value: 40,
191210
min_price: 30,
@@ -198,14 +217,11 @@ module Entities
198217
hexes: ['G16'],
199218
amount: 20,
200219
},
201-
{
202-
type: 'close',
203-
when: 'never',
204-
},
220+
{ type: 'close', on_phase: 'never' },
205221
],
206222
},
207223
{
208-
name: 'Hartlepool Docks Company',
224+
name: '12. Hartlepool Docks Company',
209225
sym: 'P12',
210226
value: 40,
211227
min_price: 30,
@@ -223,10 +239,12 @@ module Entities
223239
cost: 0,
224240
},
225241
{
226-
type: 'close',
227-
when: 'never',
242+
type: 'hex_bonus',
243+
owner_type: 'corporation',
244+
hexes: ['G6'],
245+
amount: 10,
228246
},
229-
# G-train bonus is defined in game.rb revenue_for method
247+
{ type: 'close', on_phase: 'never' },
230248
],
231249
},
232250
].freeze
@@ -239,7 +257,7 @@ module Entities
239257
float_percent: 20,
240258
always_market_price: true,
241259
tokens: [0, 40, 100, 100],
242-
type: 'public',
260+
type: 'major',
243261
color: '#025aaa',
244262
},
245263
{
@@ -249,7 +267,7 @@ module Entities
249267
float_percent: 20,
250268
always_market_price: true,
251269
tokens: [0, 40, 100, 100],
252-
type: 'public',
270+
type: 'major',
253271
color: '#32763f',
254272
}, {
255273
sym: 'LYR',
@@ -258,7 +276,7 @@ module Entities
258276
float_percent: 20,
259277
always_market_price: true,
260278
tokens: [0, 40, 100, 100],
261-
type: 'public',
279+
type: 'major',
262280
color: '#FFFFFFF',
263281
},
264282
{
@@ -268,7 +286,7 @@ module Entities
268286
float_percent: 20,
269287
always_market_price: true,
270288
tokens: [0, 40, 100, 100],
271-
type: 'public',
289+
type: 'major',
272290
color: '#d1232a',
273291
},
274292
{
@@ -278,16 +296,15 @@ module Entities
278296
float_percent: 20,
279297
always_market_price: true,
280298
tokens: [0, 40, 100, 100],
299+
type: 'major',
281300
color: :'#FFF500',
282301
text_color: 'black',
283-
}
284-
].freeze
285-
286-
MINORS = [
302+
},
287303
{
288304
sym: '1',
289305
name: 'Doncaster & Peterborough Railway',
290306
logo: '1812/1',
307+
float_percent: 100,
291308
tokens: [0],
292309
shares: [100],
293310
max_ownership_percent: 100,
@@ -299,6 +316,7 @@ module Entities
299316
sym: '2',
300317
name: 'Hull & Selby Railway',
301318
logo: '1812/2',
319+
float_percent: 100,
302320
tokens: [0],
303321
shares: [100],
304322
max_ownership_percent: 100,
@@ -310,6 +328,7 @@ module Entities
310328
sym: '3',
311329
name: 'Leeds Northern Railway',
312330
logo: '1812/3',
331+
float_percent: 100,
313332
tokens: [0],
314333
shares: [100],
315334
max_ownership_percent: 100,
@@ -322,6 +341,7 @@ module Entities
322341
sym: '4',
323342
name: 'Manchester & Leeds Railway',
324343
logo: '1812/4',
344+
float_percent: 100,
325345
tokens: [0],
326346
shares: [100],
327347
max_ownership_percent: 100,
@@ -334,6 +354,7 @@ module Entities
334354
sym: '5',
335355
name: 'Newcastle & Berwick Railway',
336356
logo: '1812/5',
357+
float_percent: 100,
337358
tokens: [0],
338359
shares: [100],
339360
max_ownership_percent: 100,
@@ -346,18 +367,20 @@ module Entities
346367
sym: '6',
347368
name: 'Newcastle & Darlington Railway',
348369
logo: '1812/6',
370+
float_percent: 100,
349371
tokens: [0],
350372
shares: [100],
351373
max_ownership_percent: 100,
352374
type: 'minor',
353-
coordinates: 'C14',
375+
coordinates: 'E4',
354376
city: 0,
355377
color: '#777777',
356378
},
357379
{
358380
sym: '7',
359381
name: ' North Midland Railway',
360382
logo: '1812/7',
383+
float_percent: 100,
361384
tokens: [0],
362385
shares: [100],
363386
max_ownership_percent: 100,
@@ -370,6 +393,7 @@ module Entities
370393
sym: '8',
371394
name: 'Sheffield, Ashton & Manchester Railway',
372395
logo: '1812/8',
396+
float_percent: 100,
373397
tokens: [0],
374398
shares: [100],
375399
max_ownership_percent: 100,
@@ -381,25 +405,28 @@ module Entities
381405
sym: '9',
382406
name: 'York & Darlington Railway',
383407
logo: '1812/9',
408+
float_percent: 100,
384409
tokens: [0],
385410
shares: [100],
386411
max_ownership_percent: 100,
387412
type: 'minor',
388413
coordinates: 'E14',
414+
city: 1,
389415
color: '#777777',
390416
},
391417
{
392418
sym: '10',
393419
name: 'York & North Midland Railway ',
394420
logo: '1812/10',
421+
float_percent: 100,
395422
tokens: [0],
396423
shares: [100],
397424
max_ownership_percent: 100,
398425
type: 'minor',
399426
coordinates: 'E14',
400427
city: 0,
401428
color: '#777777',
402-
},
429+
}
403430
].freeze
404431
end
405432
end

0 commit comments

Comments
 (0)