@@ -25,6 +25,7 @@ import {
25
25
ShipyardConstructionSite ,
26
26
} from '@deities/athena/info/Tile.tsx' ;
27
27
import {
28
+ APU ,
28
29
Artillery ,
29
30
Battleship ,
30
31
Corvette ,
@@ -1185,3 +1186,53 @@ test('activates skills where the unit ratio does not matter', async () => {
1185
1186
EndTurn { current: { funds: 300, player: 2 }, next: { funds: 0, player: 1 }, round: 2, rotatePlayers: null, supply: null, miss: null }"
1186
1187
` ) ;
1187
1188
} ) ;
1189
+
1190
+ test ( 'creates production buildings in the space biome despite not having access to funds buildings' , async ( ) => {
1191
+ const initialMap = MapData . createMap ( {
1192
+ config : {
1193
+ biome : 4 ,
1194
+ } ,
1195
+ map : [
1196
+ 1 , 1 , 1 , 29 , 29 , 1 , 1 , 1 , 29 , 29 , 1 , 1 , 1 , 29 , 1 , 1 , 1 , 1 , 29 , 29 , 1 , 1 ,
1197
+ 1 , 1 , 8 ,
1198
+ ] ,
1199
+ size : {
1200
+ height : 5 ,
1201
+ width : 5 ,
1202
+ } ,
1203
+ teams : [
1204
+ {
1205
+ id : 1 ,
1206
+ name : '' ,
1207
+ players : [ { funds : 0 , id : 1 , userId : 'User-1' } ] ,
1208
+ } ,
1209
+ {
1210
+ id : 2 ,
1211
+ name : '' ,
1212
+ players : [ { funds : 1000 , id : 2 , name : 'AI' } ] ,
1213
+ } ,
1214
+ ] ,
1215
+ } ) ;
1216
+
1217
+ const map = initialMap . copy ( {
1218
+ units : initialMap . units
1219
+ . set ( vec ( 1 , 1 ) , APU . create ( 1 ) )
1220
+ . set ( vec ( 3 , 5 ) , Pioneer . create ( 2 ) )
1221
+ . set ( vec ( 5 , 3 ) , Infantry . create ( 2 ) ) ,
1222
+ } ) ;
1223
+
1224
+ const [ , , gameStateA ] = await executeGameAction (
1225
+ map ,
1226
+ map . createVisionObject ( player1 ) ,
1227
+ new Map ( ) ,
1228
+ EndTurnAction ( ) ,
1229
+ AIRegistry ,
1230
+ ) ;
1231
+
1232
+ expect ( snapshotGameState ( gameStateA ) ) . toMatchInlineSnapshot ( `
1233
+ "Move (3,5 → 5,5) { fuel: 38, completed: null, path: [4,5 → 5,5] }
1234
+ CreateBuilding (5,5) { building: Spawn Platform { id: 19, health: 100, player: 2, completed: true }, free: null }
1235
+ CompleteUnit (5,3)
1236
+ EndTurn { current: { funds: 850, player: 2 }, next: { funds: 0, player: 1 }, round: 2, rotatePlayers: null, supply: null, miss: null }"
1237
+ ` ) ;
1238
+ } ) ;
0 commit comments