@adatechnology/game-weapons 0.4.5 → 0.5.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/index.js CHANGED
@@ -36,6 +36,980 @@ var sampleCone = (dir, deg, rng) => {
36
36
  ]);
37
37
  };
38
38
 
39
+ // src/data/ammo.json
40
+ var ammo_default = {
41
+ _notes: [
42
+ "Penetration of a projectile at close range (muzzle to about 100 m), at normal incidence, in millimetres of: steel = RHA-equivalent (about 300 HB); concrete = unreinforced structural concrete; brick = fired clay brick masonry; wood = dry hardwood (oak). A game scales it by the energy left at the hit (shotToHit does).",
43
+ "basis 'published' = taken from a manufacturer figure quoted in sources. basis 'estimated' = our estimate from published orders of magnitude (ball ammunition defeats 4 to 6 mm of RHA, steel-core 6 to 8 mm, AP 10 to 22 mm, .50 BMG ball about 14 mm), muzzle energy and bullet construction; the concrete, brick and wood columns scale with penetrator energy and hardness the way test firings against masonry and timber do. They are meant to be refined with datasheets: override any entry with ArsenalOptions.ammo / patch.ammo.",
44
+ "Anchors: Nammo 7.62 mm x 51 Armor Piercing 8 (M993): 18 mm RHA at 100 m, 7 mm at 500 m (https://www.nammo.com/products/ammunition/small-caliber-ammunition/7-62mm-series/7-62-mm-x-51-armor-piercing-8-m993/). Constructions (M80 lead core with gilding-metal jacket, M43 and 7N6 steel cores, M995 and M993 tungsten carbide, M33 lead with steel insert, M2 hardened steel, BZ and B-32 steel core API) follow the usual military ammunition references (TM 43-0001-27, Army small-arms ammunition tables).",
45
+ "core: lead, lead_steel (lead with a steel tip or insert), steel, hardened_steel, tungsten_carbide, copper, none. jacket: gilding_metal, copper, brass, steel (copper-washed or lacquered steel), none. They only feed the ignition rules (rules.ignition.spark).",
46
+ "bulletGrams and muzzleSpeed, when present, replace those of the calibre for this load; absent they are the calibre's."
47
+ ],
48
+ loads: [
49
+ {
50
+ id: "22lr:rimfire",
51
+ caliber: "22lr",
52
+ kind: "rimfire",
53
+ label: ".22 LR lead round nose",
54
+ core: "lead",
55
+ jacket: "none",
56
+ penetration: {
57
+ steel: 1.4,
58
+ concrete: 12,
59
+ brick: 25,
60
+ wood: 60
61
+ },
62
+ basis: "estimated",
63
+ sources: [
64
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
65
+ ]
66
+ },
67
+ {
68
+ id: "380acp:fmj",
69
+ caliber: "380acp",
70
+ kind: "fmj",
71
+ label: ".380 ACP FMJ",
72
+ core: "lead",
73
+ jacket: "gilding_metal",
74
+ penetration: {
75
+ steel: 2.2,
76
+ concrete: 20,
77
+ brick: 40,
78
+ wood: 80
79
+ },
80
+ basis: "estimated",
81
+ sources: [
82
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
83
+ ]
84
+ },
85
+ {
86
+ id: "9x18:fmj",
87
+ caliber: "9x18",
88
+ kind: "fmj",
89
+ label: "9x18 Makarov FMJ",
90
+ core: "lead",
91
+ jacket: "steel",
92
+ penetration: {
93
+ steel: 2.6,
94
+ concrete: 22,
95
+ brick: 45,
96
+ wood: 85
97
+ },
98
+ basis: "estimated",
99
+ sources: [
100
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
101
+ ]
102
+ },
103
+ {
104
+ id: "9x19:fmj",
105
+ caliber: "9x19",
106
+ kind: "fmj",
107
+ label: "9x19 FMJ 124 gr",
108
+ core: "lead",
109
+ jacket: "gilding_metal",
110
+ penetration: {
111
+ steel: 3,
112
+ concrete: 25,
113
+ brick: 50,
114
+ wood: 80
115
+ },
116
+ basis: "estimated",
117
+ sources: [
118
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
119
+ ]
120
+ },
121
+ {
122
+ id: "9x19:hp",
123
+ caliber: "9x19",
124
+ kind: "hp",
125
+ label: "9x19 JHP",
126
+ core: "lead",
127
+ jacket: "gilding_metal",
128
+ penetration: {
129
+ steel: 2,
130
+ concrete: 15,
131
+ brick: 35,
132
+ wood: 55
133
+ },
134
+ basis: "estimated",
135
+ sources: [
136
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
137
+ ]
138
+ },
139
+ {
140
+ id: "40sw:fmj",
141
+ caliber: "40sw",
142
+ kind: "fmj",
143
+ label: ".40 S&W FMJ",
144
+ core: "lead",
145
+ jacket: "gilding_metal",
146
+ penetration: {
147
+ steel: 3,
148
+ concrete: 28,
149
+ brick: 55,
150
+ wood: 85
151
+ },
152
+ basis: "estimated",
153
+ sources: [
154
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
155
+ ]
156
+ },
157
+ {
158
+ id: "45acp:fmj",
159
+ caliber: "45acp",
160
+ kind: "fmj",
161
+ label: ".45 ACP FMJ 230 gr",
162
+ core: "lead",
163
+ jacket: "gilding_metal",
164
+ penetration: {
165
+ steel: 2.8,
166
+ concrete: 28,
167
+ brick: 55,
168
+ wood: 85
169
+ },
170
+ basis: "estimated",
171
+ sources: [
172
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
173
+ ]
174
+ },
175
+ {
176
+ id: "45acp:hp",
177
+ caliber: "45acp",
178
+ kind: "hp",
179
+ label: ".45 ACP JHP",
180
+ core: "lead",
181
+ jacket: "gilding_metal",
182
+ penetration: {
183
+ steel: 1.8,
184
+ concrete: 18,
185
+ brick: 40,
186
+ wood: 60
187
+ },
188
+ basis: "estimated",
189
+ sources: [
190
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
191
+ ]
192
+ },
193
+ {
194
+ id: "5_7x28:fmj",
195
+ caliber: "5_7x28",
196
+ kind: "fmj",
197
+ label: "5.7x28 SS190",
198
+ core: "lead_steel",
199
+ jacket: "gilding_metal",
200
+ penetration: {
201
+ steel: 4,
202
+ concrete: 25,
203
+ brick: 50,
204
+ wood: 100
205
+ },
206
+ basis: "estimated",
207
+ sources: [
208
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
209
+ ]
210
+ },
211
+ {
212
+ id: "38spl:fmj",
213
+ caliber: "38spl",
214
+ kind: "fmj",
215
+ label: ".38 Special lead round nose",
216
+ core: "lead",
217
+ jacket: "none",
218
+ penetration: {
219
+ steel: 2,
220
+ concrete: 20,
221
+ brick: 40,
222
+ wood: 70
223
+ },
224
+ basis: "estimated",
225
+ sources: [
226
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
227
+ ]
228
+ },
229
+ {
230
+ id: "357mag:hp",
231
+ caliber: "357mag",
232
+ kind: "hp",
233
+ label: ".357 Magnum JHP",
234
+ core: "lead",
235
+ jacket: "gilding_metal",
236
+ penetration: {
237
+ steel: 3,
238
+ concrete: 25,
239
+ brick: 45,
240
+ wood: 90
241
+ },
242
+ basis: "estimated",
243
+ sources: [
244
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
245
+ ]
246
+ },
247
+ {
248
+ id: "44mag:fmj",
249
+ caliber: "44mag",
250
+ kind: "fmj",
251
+ label: ".44 Magnum FMJ",
252
+ core: "lead",
253
+ jacket: "gilding_metal",
254
+ penetration: {
255
+ steel: 4,
256
+ concrete: 40,
257
+ brick: 70,
258
+ wood: 150
259
+ },
260
+ basis: "estimated",
261
+ sources: [
262
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
263
+ ]
264
+ },
265
+ {
266
+ id: "50ae:fmj",
267
+ caliber: "50ae",
268
+ kind: "fmj",
269
+ label: ".50 AE FMJ",
270
+ core: "lead",
271
+ jacket: "gilding_metal",
272
+ penetration: {
273
+ steel: 4,
274
+ concrete: 38,
275
+ brick: 65,
276
+ wood: 130
277
+ },
278
+ basis: "estimated",
279
+ sources: [
280
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
281
+ ]
282
+ },
283
+ {
284
+ id: "12ga_00buck:buck",
285
+ caliber: "12ga_00buck",
286
+ kind: "buck",
287
+ label: "12 ga 00 buck (one pellet)",
288
+ core: "lead",
289
+ jacket: "none",
290
+ penetration: {
291
+ steel: 0.8,
292
+ concrete: 10,
293
+ brick: 25,
294
+ wood: 60
295
+ },
296
+ basis: "estimated",
297
+ sources: [
298
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
299
+ ]
300
+ },
301
+ {
302
+ id: "12ga_slug:slug",
303
+ caliber: "12ga_slug",
304
+ kind: "slug",
305
+ label: "12 ga rifled slug",
306
+ core: "lead",
307
+ jacket: "none",
308
+ penetration: {
309
+ steel: 4,
310
+ concrete: 60,
311
+ brick: 100,
312
+ wood: 250
313
+ },
314
+ basis: "estimated",
315
+ sources: [
316
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
317
+ ]
318
+ },
319
+ {
320
+ id: "12ga_birdshot:birdshot",
321
+ caliber: "12ga_birdshot",
322
+ kind: "birdshot",
323
+ label: "12 ga birdshot (one pellet)",
324
+ core: "lead",
325
+ jacket: "none",
326
+ penetration: {
327
+ steel: 0.2,
328
+ concrete: 3,
329
+ brick: 8,
330
+ wood: 20
331
+ },
332
+ basis: "estimated",
333
+ sources: [
334
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
335
+ ]
336
+ },
337
+ {
338
+ id: "20ga_buck:buck",
339
+ caliber: "20ga_buck",
340
+ kind: "buck",
341
+ label: "20 ga buck (one pellet)",
342
+ core: "lead",
343
+ jacket: "none",
344
+ penetration: {
345
+ steel: 0.6,
346
+ concrete: 8,
347
+ brick: 20,
348
+ wood: 50
349
+ },
350
+ basis: "estimated",
351
+ sources: [
352
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
353
+ ]
354
+ },
355
+ {
356
+ id: "5_56x45:fmj",
357
+ caliber: "5_56x45",
358
+ kind: "fmj",
359
+ label: "5.56x45 M855 (steel tip, lead core)",
360
+ core: "lead_steel",
361
+ jacket: "gilding_metal",
362
+ penetration: {
363
+ steel: 4.5,
364
+ concrete: 90,
365
+ brick: 180,
366
+ wood: 280
367
+ },
368
+ basis: "estimated",
369
+ sources: [
370
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
371
+ ]
372
+ },
373
+ {
374
+ id: "5_45x39:fmj",
375
+ caliber: "5_45x39",
376
+ kind: "fmj",
377
+ label: "5.45x39 7N6 (steel core)",
378
+ core: "steel",
379
+ jacket: "steel",
380
+ penetration: {
381
+ steel: 5.5,
382
+ concrete: 90,
383
+ brick: 180,
384
+ wood: 280
385
+ },
386
+ basis: "estimated",
387
+ sources: [
388
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
389
+ ]
390
+ },
391
+ {
392
+ id: "7_62x39:fmj",
393
+ caliber: "7_62x39",
394
+ kind: "fmj",
395
+ label: "7.62x39 M43 (steel core)",
396
+ core: "steel",
397
+ jacket: "steel",
398
+ penetration: {
399
+ steel: 6.5,
400
+ concrete: 110,
401
+ brick: 220,
402
+ wood: 300
403
+ },
404
+ basis: "estimated",
405
+ sources: [
406
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
407
+ ]
408
+ },
409
+ {
410
+ id: "30_30:fmj",
411
+ caliber: "30_30",
412
+ kind: "fmj",
413
+ label: ".30-30 Winchester flat nose",
414
+ core: "lead",
415
+ jacket: "gilding_metal",
416
+ penetration: {
417
+ steel: 3,
418
+ concrete: 80,
419
+ brick: 160,
420
+ wood: 250
421
+ },
422
+ basis: "estimated",
423
+ sources: [
424
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
425
+ ]
426
+ },
427
+ {
428
+ id: "7_62x51:fmj",
429
+ caliber: "7_62x51",
430
+ kind: "fmj",
431
+ label: "7.62x51 M80 ball",
432
+ core: "lead",
433
+ jacket: "gilding_metal",
434
+ penetration: {
435
+ steel: 5,
436
+ concrete: 120,
437
+ brick: 250,
438
+ wood: 330
439
+ },
440
+ basis: "estimated",
441
+ sources: [
442
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
443
+ ]
444
+ },
445
+ {
446
+ id: "7_62x54r:fmj",
447
+ caliber: "7_62x54r",
448
+ kind: "fmj",
449
+ label: "7.62x54R LPS (steel core)",
450
+ core: "steel",
451
+ jacket: "steel",
452
+ penetration: {
453
+ steel: 6.5,
454
+ concrete: 130,
455
+ brick: 260,
456
+ wood: 330
457
+ },
458
+ basis: "estimated",
459
+ sources: [
460
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
461
+ ]
462
+ },
463
+ {
464
+ id: "30_06:fmj",
465
+ caliber: "30_06",
466
+ kind: "fmj",
467
+ label: ".30-06 M1 ball",
468
+ core: "lead",
469
+ jacket: "gilding_metal",
470
+ penetration: {
471
+ steel: 5.5,
472
+ concrete: 130,
473
+ brick: 260,
474
+ wood: 340
475
+ },
476
+ basis: "estimated",
477
+ sources: [
478
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
479
+ ]
480
+ },
481
+ {
482
+ id: "300wm:fmj",
483
+ caliber: "300wm",
484
+ kind: "fmj",
485
+ label: ".300 Win Mag FMJ",
486
+ core: "lead",
487
+ jacket: "gilding_metal",
488
+ penetration: {
489
+ steel: 6.5,
490
+ concrete: 150,
491
+ brick: 290,
492
+ wood: 360
493
+ },
494
+ basis: "estimated",
495
+ sources: [
496
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
497
+ ]
498
+ },
499
+ {
500
+ id: "338lapua:fmj",
501
+ caliber: "338lapua",
502
+ kind: "fmj",
503
+ label: ".338 Lapua Magnum FMJ",
504
+ core: "lead",
505
+ jacket: "gilding_metal",
506
+ penetration: {
507
+ steel: 8,
508
+ concrete: 190,
509
+ brick: 360,
510
+ wood: 450
511
+ },
512
+ basis: "estimated",
513
+ sources: [
514
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
515
+ ]
516
+ },
517
+ {
518
+ id: "408cheytac:fmj",
519
+ caliber: "408cheytac",
520
+ kind: "fmj",
521
+ label: ".408 CheyTac solid",
522
+ core: "copper",
523
+ jacket: "none",
524
+ penetration: {
525
+ steel: 12,
526
+ concrete: 250,
527
+ brick: 450,
528
+ wood: 550
529
+ },
530
+ basis: "estimated",
531
+ sources: [
532
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
533
+ ]
534
+ },
535
+ {
536
+ id: "arrow:arrow",
537
+ caliber: "arrow",
538
+ kind: "arrow",
539
+ label: "Arrow (steel broadhead)",
540
+ core: "steel",
541
+ jacket: "none",
542
+ penetration: {
543
+ steel: 0.5,
544
+ concrete: 5,
545
+ brick: 15,
546
+ wood: 100
547
+ },
548
+ basis: "estimated",
549
+ sources: [
550
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
551
+ ]
552
+ },
553
+ {
554
+ id: "crossbow_bolt:bolt",
555
+ caliber: "crossbow_bolt",
556
+ kind: "bolt",
557
+ label: "Crossbow bolt",
558
+ core: "steel",
559
+ jacket: "none",
560
+ penetration: {
561
+ steel: 0.8,
562
+ concrete: 8,
563
+ brick: 20,
564
+ wood: 120
565
+ },
566
+ basis: "estimated",
567
+ sources: [
568
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
569
+ ]
570
+ },
571
+ {
572
+ id: "4_6x30:fmj",
573
+ caliber: "4_6x30",
574
+ kind: "fmj",
575
+ label: "4.6x30 DM11",
576
+ core: "steel",
577
+ jacket: "gilding_metal",
578
+ penetration: {
579
+ steel: 3.5,
580
+ concrete: 25,
581
+ brick: 50,
582
+ wood: 100
583
+ },
584
+ basis: "estimated",
585
+ sources: [
586
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
587
+ ]
588
+ },
589
+ {
590
+ id: "32acp:fmj",
591
+ caliber: "32acp",
592
+ kind: "fmj",
593
+ label: ".32 ACP FMJ",
594
+ core: "lead",
595
+ jacket: "gilding_metal",
596
+ penetration: {
597
+ steel: 1.8,
598
+ concrete: 15,
599
+ brick: 30,
600
+ wood: 60
601
+ },
602
+ basis: "estimated",
603
+ sources: [
604
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
605
+ ]
606
+ },
607
+ {
608
+ id: "9x19:tracer",
609
+ caliber: "9x19",
610
+ kind: "tracer",
611
+ label: "9x19 tracer",
612
+ core: "lead",
613
+ jacket: "gilding_metal",
614
+ tracer: true,
615
+ penetration: {
616
+ steel: 2.8,
617
+ concrete: 22,
618
+ brick: 45,
619
+ wood: 75
620
+ },
621
+ basis: "estimated",
622
+ sources: [
623
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
624
+ ]
625
+ },
626
+ {
627
+ id: "5_56x45:ap",
628
+ caliber: "5_56x45",
629
+ kind: "ap",
630
+ label: "5.56x45 M995 AP (tungsten carbide)",
631
+ bulletGrams: 3.6,
632
+ muzzleSpeed: 1013,
633
+ core: "tungsten_carbide",
634
+ jacket: "gilding_metal",
635
+ penetration: {
636
+ steel: 10,
637
+ concrete: 110,
638
+ brick: 210,
639
+ wood: 300
640
+ },
641
+ basis: "estimated",
642
+ sources: [
643
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
644
+ ]
645
+ },
646
+ {
647
+ id: "5_56x45:tracer",
648
+ caliber: "5_56x45",
649
+ kind: "tracer",
650
+ label: "5.56x45 M856 tracer",
651
+ bulletGrams: 3.95,
652
+ muzzleSpeed: 914,
653
+ core: "lead",
654
+ jacket: "gilding_metal",
655
+ tracer: true,
656
+ penetration: {
657
+ steel: 3.5,
658
+ concrete: 80,
659
+ brick: 160,
660
+ wood: 260
661
+ },
662
+ basis: "estimated",
663
+ sources: [
664
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
665
+ ]
666
+ },
667
+ {
668
+ id: "5_45x39:tracer",
669
+ caliber: "5_45x39",
670
+ kind: "tracer",
671
+ label: "5.45x39 7T3M tracer",
672
+ core: "lead",
673
+ jacket: "steel",
674
+ tracer: true,
675
+ penetration: {
676
+ steel: 4,
677
+ concrete: 80,
678
+ brick: 160,
679
+ wood: 260
680
+ },
681
+ basis: "estimated",
682
+ sources: [
683
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
684
+ ]
685
+ },
686
+ {
687
+ id: "7_62x39:incendiary",
688
+ caliber: "7_62x39",
689
+ kind: "incendiary",
690
+ label: "7.62x39 BZ API",
691
+ bulletGrams: 7.7,
692
+ muzzleSpeed: 720,
693
+ core: "hardened_steel",
694
+ jacket: "steel",
695
+ incendiary: true,
696
+ penetration: {
697
+ steel: 8,
698
+ concrete: 110,
699
+ brick: 220,
700
+ wood: 300
701
+ },
702
+ basis: "estimated",
703
+ sources: [
704
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
705
+ ]
706
+ },
707
+ {
708
+ id: "7_62x39:tracer",
709
+ caliber: "7_62x39",
710
+ kind: "tracer",
711
+ label: "7.62x39 T-45 tracer",
712
+ core: "lead",
713
+ jacket: "steel",
714
+ tracer: true,
715
+ penetration: {
716
+ steel: 4.5,
717
+ concrete: 100,
718
+ brick: 200,
719
+ wood: 280
720
+ },
721
+ basis: "estimated",
722
+ sources: [
723
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
724
+ ]
725
+ },
726
+ {
727
+ id: "7_62x51:ap",
728
+ caliber: "7_62x51",
729
+ kind: "ap",
730
+ label: "7.62x51 M993 AP (tungsten carbide)",
731
+ bulletGrams: 8.2,
732
+ muzzleSpeed: 930,
733
+ core: "tungsten_carbide",
734
+ jacket: "gilding_metal",
735
+ penetration: {
736
+ steel: 18,
737
+ concrete: 160,
738
+ brick: 300,
739
+ wood: 360
740
+ },
741
+ basis: "published",
742
+ sources: [
743
+ "Nammo, 7.62 mm x 51 Armor Piercing 8 (M993) product page: 18 mm RHA (300 HB) at 100 m, 7 mm at 500 m."
744
+ ]
745
+ },
746
+ {
747
+ id: "7_62x51:tracer",
748
+ caliber: "7_62x51",
749
+ kind: "tracer",
750
+ label: "7.62x51 M62 tracer",
751
+ core: "lead",
752
+ jacket: "gilding_metal",
753
+ tracer: true,
754
+ penetration: {
755
+ steel: 4,
756
+ concrete: 110,
757
+ brick: 230,
758
+ wood: 320
759
+ },
760
+ basis: "estimated",
761
+ sources: [
762
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
763
+ ]
764
+ },
765
+ {
766
+ id: "7_62x54r:ap",
767
+ caliber: "7_62x54r",
768
+ kind: "ap",
769
+ label: "7.62x54R 7N37 AP",
770
+ core: "hardened_steel",
771
+ jacket: "steel",
772
+ penetration: {
773
+ steel: 11,
774
+ concrete: 140,
775
+ brick: 270,
776
+ wood: 340
777
+ },
778
+ basis: "estimated",
779
+ sources: [
780
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
781
+ ]
782
+ },
783
+ {
784
+ id: "7_62x54r:incendiary",
785
+ caliber: "7_62x54r",
786
+ kind: "incendiary",
787
+ label: "7.62x54R B-32 API",
788
+ bulletGrams: 10,
789
+ muzzleSpeed: 830,
790
+ core: "hardened_steel",
791
+ jacket: "steel",
792
+ incendiary: true,
793
+ penetration: {
794
+ steel: 10,
795
+ concrete: 130,
796
+ brick: 260,
797
+ wood: 330
798
+ },
799
+ basis: "estimated",
800
+ sources: [
801
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
802
+ ]
803
+ },
804
+ {
805
+ id: "7_62x54r:tracer",
806
+ caliber: "7_62x54r",
807
+ kind: "tracer",
808
+ label: "7.62x54R T-46 tracer",
809
+ core: "lead",
810
+ jacket: "steel",
811
+ tracer: true,
812
+ penetration: {
813
+ steel: 4.5,
814
+ concrete: 110,
815
+ brick: 220,
816
+ wood: 300
817
+ },
818
+ basis: "estimated",
819
+ sources: [
820
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
821
+ ]
822
+ },
823
+ {
824
+ id: "30_06:ap",
825
+ caliber: "30_06",
826
+ kind: "ap",
827
+ label: ".30-06 M2 AP (hardened steel)",
828
+ bulletGrams: 10.8,
829
+ muzzleSpeed: 860,
830
+ core: "hardened_steel",
831
+ jacket: "gilding_metal",
832
+ penetration: {
833
+ steel: 10,
834
+ concrete: 140,
835
+ brick: 270,
836
+ wood: 340
837
+ },
838
+ basis: "estimated",
839
+ sources: [
840
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
841
+ ]
842
+ },
843
+ {
844
+ id: "30_06:tracer",
845
+ caliber: "30_06",
846
+ kind: "tracer",
847
+ label: ".30-06 M25 tracer",
848
+ core: "lead",
849
+ jacket: "gilding_metal",
850
+ tracer: true,
851
+ penetration: {
852
+ steel: 4,
853
+ concrete: 110,
854
+ brick: 230,
855
+ wood: 320
856
+ },
857
+ basis: "estimated",
858
+ sources: [
859
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
860
+ ]
861
+ },
862
+ {
863
+ id: "338lapua:ap",
864
+ caliber: "338lapua",
865
+ kind: "ap",
866
+ label: ".338 Lapua AP (tungsten)",
867
+ core: "tungsten_carbide",
868
+ jacket: "gilding_metal",
869
+ penetration: {
870
+ steel: 16,
871
+ concrete: 200,
872
+ brick: 380,
873
+ wood: 470
874
+ },
875
+ basis: "estimated",
876
+ sources: [
877
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
878
+ ]
879
+ },
880
+ {
881
+ id: "50bmg:fmj",
882
+ caliber: "50bmg",
883
+ kind: "fmj",
884
+ label: ".50 BMG M33 ball",
885
+ core: "lead_steel",
886
+ jacket: "gilding_metal",
887
+ penetration: {
888
+ steel: 14,
889
+ concrete: 330,
890
+ brick: 560,
891
+ wood: 600
892
+ },
893
+ basis: "estimated",
894
+ sources: [
895
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
896
+ ]
897
+ },
898
+ {
899
+ id: "50bmg:ap",
900
+ caliber: "50bmg",
901
+ kind: "ap",
902
+ label: ".50 BMG M2 AP (hardened steel)",
903
+ core: "hardened_steel",
904
+ jacket: "gilding_metal",
905
+ penetration: {
906
+ steel: 22,
907
+ concrete: 350,
908
+ brick: 580,
909
+ wood: 600
910
+ },
911
+ basis: "estimated",
912
+ sources: [
913
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
914
+ ]
915
+ },
916
+ {
917
+ id: "50bmg:incendiary",
918
+ caliber: "50bmg",
919
+ kind: "incendiary",
920
+ label: ".50 BMG M8 API",
921
+ core: "hardened_steel",
922
+ jacket: "gilding_metal",
923
+ incendiary: true,
924
+ penetration: {
925
+ steel: 18,
926
+ concrete: 340,
927
+ brick: 570,
928
+ wood: 600
929
+ },
930
+ basis: "estimated",
931
+ sources: [
932
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
933
+ ]
934
+ },
935
+ {
936
+ id: "50bmg:tracer",
937
+ caliber: "50bmg",
938
+ kind: "tracer",
939
+ label: ".50 BMG M17 tracer",
940
+ core: "lead",
941
+ jacket: "gilding_metal",
942
+ tracer: true,
943
+ penetration: {
944
+ steel: 9,
945
+ concrete: 300,
946
+ brick: 520,
947
+ wood: 580
948
+ },
949
+ basis: "estimated",
950
+ sources: [
951
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
952
+ ]
953
+ },
954
+ {
955
+ id: "12ga_00buck:incendiary",
956
+ caliber: "12ga_00buck",
957
+ kind: "incendiary",
958
+ label: "12 ga incendiary shell (one pellet, magnesium)",
959
+ core: "none",
960
+ jacket: "none",
961
+ incendiary: true,
962
+ penetration: {
963
+ steel: 0.1,
964
+ concrete: 3,
965
+ brick: 8,
966
+ wood: 15
967
+ },
968
+ basis: "estimated",
969
+ sources: [
970
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
971
+ ]
972
+ },
973
+ {
974
+ id: "45_70_bp:fmj",
975
+ caliber: "45_70_bp",
976
+ kind: "fmj",
977
+ label: ".45-70 Government 405 gr lead",
978
+ core: "lead",
979
+ jacket: "none",
980
+ penetration: {
981
+ steel: 2.5,
982
+ concrete: 75,
983
+ brick: 150,
984
+ wood: 240
985
+ },
986
+ basis: "estimated",
987
+ sources: [
988
+ "Estimated from muzzle energy, bullet construction and the published anchors of this file (see _notes); refine with a datasheet."
989
+ ]
990
+ }
991
+ ]
992
+ };
993
+
994
+ // src/ammo.ts
995
+ var AMMO = ammo_default.loads;
996
+ var ammoId = (caliber, kind) => `${caliber}:${kind}`;
997
+ var resolveLoad = (caliber, ammo, kind) => {
998
+ const k = kind ?? caliber.kind;
999
+ if (k === void 0) return null;
1000
+ const def = ammo.get(ammoId(caliber.id, k));
1001
+ if (!def) return null;
1002
+ const grams = def.bulletGrams ?? caliber.bulletGrams;
1003
+ const speed = def.muzzleSpeed ?? caliber.muzzleSpeed;
1004
+ return { def, kind: k, grams, speed, energy: 0.5 * (grams / 1e3) * speed * speed, penetration: def.penetration };
1005
+ };
1006
+ var ammoIgnition = (def, rules) => {
1007
+ const core = rules.core[def.core] ?? 0;
1008
+ const jacket = rules.jacket[def.jacket] ?? 0;
1009
+ const flame = Math.max(def.incendiary ? rules.flame.incendiary : 0, def.tracer ? rules.flame.tracer : 0);
1010
+ return { spark: 1 - (1 - core) * (1 - jacket), flame };
1011
+ };
1012
+
39
1013
  // src/data/attachments.json
40
1014
  var attachments_default = [
41
1015
  {
@@ -1538,6 +2512,7 @@ var archetypes_default = [
1538
2512
  magazine: 6,
1539
2513
  reload: 0.6,
1540
2514
  perRound: true,
2515
+ family: "pump",
1541
2516
  barrel: 1,
1542
2517
  spreadDeg: 1,
1543
2518
  bloomDeg: 0.5,
@@ -2611,6 +3586,7 @@ var calibers_default = [
2611
3586
  dragPer100m: 0.12,
2612
3587
  kind: "arrow",
2613
3588
  noise: 20,
3589
+ propellant: "none",
2614
3590
  sources: [
2615
3591
  "sdk"
2616
3592
  ]
@@ -2624,6 +3600,7 @@ var calibers_default = [
2624
3600
  dragPer100m: 0.12,
2625
3601
  kind: "bolt",
2626
3602
  noise: 25,
3603
+ propellant: "none",
2627
3604
  sources: [
2628
3605
  "sdk"
2629
3606
  ]
@@ -2671,6 +3648,28 @@ var calibers_default = [
2671
3648
  "reference",
2672
3649
  "derived"
2673
3650
  ]
3651
+ },
3652
+ {
3653
+ id: "45_70_bp",
3654
+ label: ".45-70 Government (black powder)",
3655
+ diameter: 11.43,
3656
+ bulletGrams: 26.2,
3657
+ muzzleSpeed: 400,
3658
+ dragPer100m: 0.09,
3659
+ kind: "fmj",
3660
+ noise: 350,
3661
+ caseType: "rifle",
3662
+ rim: "rimmed",
3663
+ propellant: "black_powder",
3664
+ cartridge: {
3665
+ caseDiameter: 12.07,
3666
+ overallLength: 66.5,
3667
+ caseLength: 53.3,
3668
+ projectileDiameter: 11.43
3669
+ },
3670
+ sources: [
3671
+ "sdk"
3672
+ ]
2674
3673
  }
2675
3674
  ];
2676
3675
 
@@ -2767,6 +3766,18 @@ var explosives_default = [
2767
3766
  0.6
2768
3767
  ]
2769
3768
  },
3769
+ mass: 28,
3770
+ leak: {
3771
+ fluid: "gas",
3772
+ liters: 24,
3773
+ pressurized: true,
3774
+ igniteDelay: 0.8,
3775
+ hissSeconds: 0.8
3776
+ },
3777
+ shell: {
3778
+ launchSpeed: 13,
3779
+ trailSeconds: 1.8
3780
+ },
2770
3781
  sources: [
2771
3782
  "arsenal",
2772
3783
  "lab",
@@ -11339,6 +12350,8 @@ var checkExplosiveNumbers = (explosive) => {
11339
12350
  if (explosive.fuseLength !== void 0 && !(explosive.fuseLength > 0)) problems.push(`explosive "${explosive.id}" has a fuse length of ${explosive.fuseLength} m`);
11340
12351
  if (explosive.burnRate !== void 0 && !(explosive.burnRate > 0)) problems.push(`explosive "${explosive.id}" has a burn rate of ${explosive.burnRate} s/m`);
11341
12352
  if (explosive.burnTolerance !== void 0 && !(explosive.burnTolerance >= 0 && explosive.burnTolerance < 1)) problems.push(`explosive "${explosive.id}" has a burn tolerance of ${explosive.burnTolerance}`);
12353
+ if (explosive.leak && !(explosive.leak.liters > 0 && explosive.leak.igniteDelay >= 0 && (explosive.leak.hissSeconds ?? 0) >= 0)) problems.push(`explosive "${explosive.id}" has a leak of ${explosive.leak.liters} l that lights after ${explosive.leak.igniteDelay} s`);
12354
+ if (explosive.shell && !(explosive.shell.launchSpeed >= 0 && explosive.shell.trailSeconds >= 0)) problems.push(`explosive "${explosive.id}" has a shell that leaves at ${explosive.shell.launchSpeed} m/s and trails fire for ${explosive.shell.trailSeconds} s`);
11342
12355
  if (explosive.tripwire && !(explosive.tripwire.length > 0)) problems.push(`explosive "${explosive.id}" has a trip wire of ${explosive.tripwire.length} m`);
11343
12356
  return problems;
11344
12357
  };
@@ -11373,10 +12386,26 @@ var checkRuleDefaults = (rules) => {
11373
12386
  if (!rules.ammoQualities.some((quality) => quality.id === rules.defaultAmmoQuality)) problems.push(`the default ammunition quality "${rules.defaultAmmoQuality}" is not one of the qualities`);
11374
12387
  return problems;
11375
12388
  };
11376
- var checkArsenal = ({ weapons, calibers, explosives, attachments, rules }) => [
12389
+ var PENETRATION_KEYS = ["steel", "concrete", "brick", "wood"];
12390
+ var checkAmmo = (ammo, calibers) => {
12391
+ if (!ammo) return [];
12392
+ const problems = [];
12393
+ for (const load of ammo.values()) {
12394
+ const label = `ammo "${load.id}"`;
12395
+ if (load.id !== `${load.caliber}:${load.kind}`) problems.push(`${label} should be called "${load.caliber}:${load.kind}"`);
12396
+ if (!calibers.has(load.caliber)) problems.push(`${label} is for unknown calibre "${load.caliber}"`);
12397
+ if (load.bulletGrams !== void 0 && !(load.bulletGrams > 0)) problems.push(`${label} weighs ${load.bulletGrams} g`);
12398
+ if (load.muzzleSpeed !== void 0 && !(load.muzzleSpeed > 0)) problems.push(`${label} leaves at ${load.muzzleSpeed} m/s`);
12399
+ for (const key of PENETRATION_KEYS) if (!(load.penetration?.[key] >= 0)) problems.push(`${label} has no penetration for ${key}`);
12400
+ }
12401
+ for (const caliber of calibers.values()) if (caliber.kind !== void 0 && !ammo.has(`${caliber.id}:${caliber.kind}`)) problems.push(`calibre "${caliber.id}" has no ammo "${caliber.id}:${caliber.kind}" in the table`);
12402
+ return problems;
12403
+ };
12404
+ var checkArsenal = ({ weapons, calibers, explosives, attachments, ammo, rules }) => [
11377
12405
  ...[...weapons.values()].flatMap((def) => [...checkFirearm(def, calibers), ...checkTimings(def), ...checkExplosiveReference(def, explosives), ...checkFitted(def, attachments)]),
11378
12406
  ...[...attachments?.values() ?? []].flatMap((attachment) => checkAttachment(attachment, weapons)),
11379
12407
  ...[...explosives.values()].flatMap(checkExplosiveNumbers),
12408
+ ...checkAmmo(ammo, calibers),
11380
12409
  ...checkRuleDefaults(rules)
11381
12410
  ];
11382
12411
 
@@ -11452,11 +12481,34 @@ var locales = {
11452
12481
  hacksaw: "Hacksaw",
11453
12482
  utility_knife: "Utility knife",
11454
12483
  claw_hammer: "Claw hammer",
11455
- extinguisher: "Fire extinguisher"
12484
+ extinguisher: "Fire extinguisher",
12485
+ boito_double_barrel: "Boito double-barrel",
12486
+ hunting_rifle_30_06: ".30-06 hunting rifle",
12487
+ m2_flamethrower: "M2 flamethrower",
12488
+ improvised_flamethrower: "Improvised flamethrower",
12489
+ m79: "M79 grenade launcher"
11456
12490
  },
11457
12491
  modes: modesEn,
11458
12492
  categories: categoriesEn,
11459
- explosives: {},
12493
+ explosives: {
12494
+ m67: "M67 fragmentation grenade",
12495
+ molotov: "Molotov cocktail",
12496
+ pipe_bomb: "Pipe bomb",
12497
+ propane_p13: "P13 propane cylinder",
12498
+ dynamite: "Dynamite",
12499
+ c4: "C4 charge",
12500
+ claymore: "Claymore mine",
12501
+ flashbang: "Flashbang",
12502
+ m79_40mm: "40 mm grenade",
12503
+ m72_66mm: "66 mm HEAT rocket",
12504
+ at4_84mm: "84 mm HEAT rocket",
12505
+ pg7v: "PG-7V rocket",
12506
+ carl_gustaf_84mm: "84 mm HE/HEAT round",
12507
+ fuel_barrel: "Fuel barrel",
12508
+ car_fuel_tank: "Car fuel tank",
12509
+ fuel_pump: "Fuel pump",
12510
+ fuel_station_tank: "Fuel station tank"
12511
+ },
11460
12512
  faults: faultsEn,
11461
12513
  conditions: conditionsEn
11462
12514
  },
@@ -11589,6 +12641,7 @@ var resolveThrowables = (weapons, explosives) => {
11589
12641
  };
11590
12642
 
11591
12643
  // src/rules.ts
12644
+ import { DEFAULT_IGNITION_RULES } from "@adatechnology/game-contracts";
11592
12645
  var DEFAULT_HEAT = {
11593
12646
  cap: 140,
11594
12647
  displayMax: 120,
@@ -11596,8 +12649,13 @@ var DEFAULT_HEAT = {
11596
12649
  decayPerPoint: 0.03,
11597
12650
  faultFrom: 60,
11598
12651
  faultSpan: 40,
11599
- perShot: { shell: 6, big: 9, tiny: 1.2, pistol: 3, rifle: 4.5 },
11600
- perRocket: 35
12652
+ perShot: { shell: 3, big: 6, tiny: 0.5, pistol: 1.2, rifle: 2 },
12653
+ perRocket: 35,
12654
+ visual: { smokeFrom: 70, smokeSeconds: 2.5, glowFrom: 80, glowSpan: 40 }
12655
+ };
12656
+ var GALLERY_HEAT = {
12657
+ ...DEFAULT_HEAT,
12658
+ perShot: { shell: 6, big: 9, tiny: 1.2, pistol: 3, rifle: 4.5 }
11601
12659
  };
11602
12660
  var defaultFaultChance = (context) => {
11603
12661
  const factor = context.def.action.kind === "firearm" ? context.def.action.faultFactor ?? 1 : 1;
@@ -11637,6 +12695,14 @@ var DEFAULT_RULES = {
11637
12695
  { stat: "spread", mul: 1.15 }
11638
12696
  ]
11639
12697
  },
12698
+ // Modelo do kit (2026-10-24, decisão do dono): não existe tabela pública de ignição por cartucho. Ordem de grandeza: bala comum (chumbo com camisa de
12699
+ // cobre) quase nunca acende um tanque; núcleo de aço e perfurante (aço temperado, carbeto de tungstênio) faíscam em aço; incendiária e traçante
12700
+ // acendem por conta própria (a literatura de vulnerabilidade de tanques de combustível cita API como a munição que acende de fato). Troque por jogo.
12701
+ ignition: {
12702
+ core: { lead: 5e-3, lead_steel: 0.04, steel: 0.12, hardened_steel: 0.25, tungsten_carbide: 0.25, copper: 0.01, none: 0 },
12703
+ jacket: { gilding_metal: 5e-3, copper: 5e-3, brass: 0.01, steel: 0.08, none: 0 },
12704
+ flame: { incendiary: DEFAULT_IGNITION_RULES.flameDefaults.incendiary, tracer: DEFAULT_IGNITION_RULES.flameDefaults.tracer }
12705
+ },
11640
12706
  draw: 0.35,
11641
12707
  clear: 1.2,
11642
12708
  startSafe: false
@@ -11922,6 +12988,7 @@ var beltSwap = [
11922
12988
  { stage: "cover_close", at: 0.581 },
11923
12989
  { stage: "charge", at: 0.742 }
11924
12990
  ];
12991
+ var LOADS_THEN_WORKS = /* @__PURE__ */ new Set(["top_load_semi", "tube_semi", "pump", "lever"]);
11925
12992
  var RELOAD_STAGES = {
11926
12993
  pistol: byMagazine(0.872),
11927
12994
  magazine: byMagazine(0.701),
@@ -11962,6 +13029,8 @@ var RELOAD_STAGES = {
11962
13029
  };
11963
13030
 
11964
13031
  // src/reload.ts
13032
+ var ACTION_WORK_SECONDS = 0.5;
13033
+ var ACTION_DELAY_SECONDS = 0.6;
11965
13034
  var isReloadable = (action) => action.kind === "firearm" || action.kind === "launcher";
11966
13035
  var baseSeconds = (action) => action.timings?.reload ?? action.reload;
11967
13036
  var secondsPerRound = (action) => {
@@ -11977,14 +13046,19 @@ var pickKind = (action, ammo, oneAtATime, request) => {
11977
13046
  };
11978
13047
  var planReload = (action, ammo, capacity, reserve, request) => {
11979
13048
  const perRound = secondsPerRound(action);
13049
+ const revolver = action.kind === "firearm" && action.family === "revolver";
11980
13050
  const oneAtATime = perRound !== void 0 && request !== "full";
11981
13051
  const kind = pickKind(action, ammo, oneAtATime, request);
11982
- if (kind === "one_by_one" && perRound !== void 0) {
13052
+ if (perRound !== void 0 && oneAtATime && (kind === "one_by_one" || kind === "empty" && action.kind === "firearm" && !revolver)) {
11983
13053
  const rounds = Math.max(1, Math.min(capacity - ammo, reserve));
11984
- return { kind, step: perRound, first: perRound, total: rounds * perRound };
13054
+ const loading = rounds * perRound;
13055
+ const works = kind === "empty" && action.kind === "firearm" && action.family !== void 0 && LOADS_THEN_WORKS.has(action.family);
13056
+ const closingAt = works && action.family ? RELOAD_STAGES[action.family].empty.find((entry) => entry.stage !== "round_in")?.at ?? 0.88 : 0.88;
13057
+ const tail = works ? Math.max(ACTION_DELAY_SECONDS + (action.timings?.cycle ?? ACTION_WORK_SECONDS), (loading + ACTION_DELAY_SECONDS) / closingAt - loading) : 0;
13058
+ return { kind, step: perRound, first: perRound, total: loading + tail, rounds, tail };
11985
13059
  }
11986
13060
  const seconds = kind === "empty" ? action.timings?.reloadEmpty ?? baseSeconds(action) : baseSeconds(action);
11987
- return { kind, step: null, first: seconds, total: seconds };
13061
+ return { kind, step: null, first: seconds, total: seconds, rounds: 0, tail: 0 };
11988
13062
  };
11989
13063
  var reloadStages = (action, plan, startAt) => {
11990
13064
  if (!action.family) return [];
@@ -12192,6 +13266,8 @@ var WeaponCore = class {
12192
13266
  __publicField(this, "reloadEnd", 0);
12193
13267
  /** Seconds per round while a one-by-one reload runs; null when the magazine goes in at once. */
12194
13268
  __publicField(this, "loadStep", null);
13269
+ /** Seconds of the action worked after the last round of an empty tube. */
13270
+ __publicField(this, "reloadTail", 0);
12195
13271
  __publicField(this, "_locked", false);
12196
13272
  __publicField(this, "reloadKind", "tactical");
12197
13273
  __publicField(this, "drawEnd", 0);
@@ -12202,6 +13278,9 @@ var WeaponCore = class {
12202
13278
  __publicField(this, "_heat", 0);
12203
13279
  __publicField(this, "_condition");
12204
13280
  __publicField(this, "_ammoQuality");
13281
+ /** Kind of round loaded; undefined = the calibre's own. */
13282
+ __publicField(this, "_ammoKind");
13283
+ __publicField(this, "ammoTable");
12205
13284
  /** Times of the shots that still count for the noise of a burst. */
12206
13285
  __publicField(this, "recentShots", []);
12207
13286
  __publicField(this, "events", []);
@@ -12217,6 +13296,8 @@ var WeaponCore = class {
12217
13296
  this.faultRng = createRng((init.seed ^ FAULT_RNG_SALT) >>> 0);
12218
13297
  this.fuseRng = createRng((init.seed ^ FUSE_RNG_SALT) >>> 0);
12219
13298
  this.explosive = init.explosive ?? null;
13299
+ this.ammoTable = init.ammo;
13300
+ this._ammoKind = init.ammoKind ?? init.snapshot?.ammoKind;
12220
13301
  this._safety = init.rules.startSafe;
12221
13302
  this._condition = findById(init.rules.conditions, init.condition ?? init.rules.defaultCondition, "condition");
12222
13303
  this._ammoQuality = findById(init.rules.ammoQualities, init.ammoQuality ?? init.rules.defaultAmmoQuality, "ammo quality");
@@ -12282,6 +13363,9 @@ var WeaponCore = class {
12282
13363
  get condition() {
12283
13364
  return this._condition.id;
12284
13365
  }
13366
+ get ammoKind() {
13367
+ return this._ammoKind ?? this.caliber?.kind;
13368
+ }
12285
13369
  get ammoQuality() {
12286
13370
  return this._ammoQuality.id;
12287
13371
  }
@@ -12342,8 +13426,13 @@ var WeaponCore = class {
12342
13426
  this.reserve -= 1;
12343
13427
  this.emit({ type: "feed", at: doneAt });
12344
13428
  }
12345
- if (this._ammo >= this._capacity || this.reserve <= 0) this.finishReload(doneAt);
12346
- else this.reloadEnd += this.loadStep;
13429
+ if (this._ammo >= this._capacity || this.reserve <= 0) {
13430
+ this.loadStep = null;
13431
+ if (this.reloadTail > 0) {
13432
+ this.reloadEnd = doneAt + this.reloadTail;
13433
+ this.reloadTail = 0;
13434
+ } else this.finishReload(doneAt);
13435
+ } else this.reloadEnd += this.loadStep;
12347
13436
  } else {
12348
13437
  const take = Math.min(this._capacity - this._ammo, this.reserve);
12349
13438
  this._ammo += take;
@@ -12397,6 +13486,12 @@ var WeaponCommands = class extends WeaponCore {
12397
13486
  setAmmoQuality(id) {
12398
13487
  this._ammoQuality = findById(this.rules.ammoQualities, id, "ammo quality");
12399
13488
  }
13489
+ setAmmoKind(kind) {
13490
+ const cal = this.caliber;
13491
+ if (!cal) throw new Error(`game-weapons: "${this.def.id}" has no calibre to load`);
13492
+ if (!this.ammoTable?.has(ammoId(cal.id, kind))) throw new Error(`game-weapons: no ammo "${ammoId(cal.id, kind)}" in the table`);
13493
+ this._ammoKind = kind;
13494
+ }
12400
13495
  setFuseLength(metres) {
12401
13496
  this.fuseLengthOverride = metres;
12402
13497
  }
@@ -12424,6 +13519,7 @@ var WeaponCommands = class extends WeaponCore {
12424
13519
  const plan = planReload(a, this._ammo, this._capacity, this.reserve, request);
12425
13520
  this._reloading = true;
12426
13521
  this.loadStep = plan.step;
13522
+ this.reloadTail = plan.tail;
12427
13523
  this.reloadKind = plan.kind;
12428
13524
  this.reloadEnd = this.clock + plan.first;
12429
13525
  this._phase = { id: "reload", start: this.clock, end: this.clock + plan.total };
@@ -12706,6 +13802,7 @@ var WeaponAttachments = class extends WeaponCommands {
12706
13802
  mode: this.mode,
12707
13803
  condition: this._condition.id,
12708
13804
  ammoQuality: this._ammoQuality.id,
13805
+ ...this._ammoKind !== void 0 ? { ammoKind: this._ammoKind } : {},
12709
13806
  ...launcher ? { underbarrel: launcher } : {}
12710
13807
  };
12711
13808
  }
@@ -12834,8 +13931,10 @@ var WeaponFirearm = class extends WeaponAttachments {
12834
13931
  fireOne(a, origin, dir, t, res, source) {
12835
13932
  const cal = this.caliber;
12836
13933
  const isFirstRound = res.shots.length === 0;
12837
- const speed = weaponSpeed(a, cal);
12838
- const energy = 0.5 * (cal.bulletGrams / 1e3) * speed * speed;
13934
+ const load = this.ammoTable ? resolveLoad(cal, this.ammoTable, this._ammoKind) : null;
13935
+ const speed = load && load.speed !== cal.muzzleSpeed ? weaponSpeed(a, cal) * (load.speed / cal.muzzleSpeed) : weaponSpeed(a, cal);
13936
+ const grams = load ? load.grams : cal.bulletGrams;
13937
+ const energy = 0.5 * (grams / 1e3) * speed * speed;
12839
13938
  const drag = cal.dragPer100m ?? 0.1;
12840
13939
  const energyAt = (distance2) => {
12841
13940
  const f = Math.pow(1 - drag, Math.max(0, distance2) / 100);
@@ -12854,12 +13953,19 @@ var WeaponFirearm = class extends WeaponAttachments {
12854
13953
  caliber: cal.diameter,
12855
13954
  caliberId: cal.id,
12856
13955
  speed,
12857
- mass: cal.bulletGrams,
13956
+ mass: grams,
12858
13957
  energyAt,
12859
13958
  pellet: p,
12860
13959
  weapon: this.def.id
12861
13960
  };
12862
13961
  if (source !== void 0) shot.source = source;
13962
+ if (load) {
13963
+ shot.ammo = load.kind;
13964
+ shot.penetration = { ...load.penetration };
13965
+ if (load.def.incendiary) shot.incendiary = true;
13966
+ if (load.def.tracer) shot.tracer = true;
13967
+ shot.ignition = ammoIgnition(load.def, this.rules.ignition);
13968
+ }
12863
13969
  res.shots.push(shot);
12864
13970
  }
12865
13971
  this._ammo -= 1;
@@ -13091,15 +14197,18 @@ var dropOrphanLaunchers = (attachments, weapons, added) => {
13091
14197
  var createArsenal = (options = {}) => {
13092
14198
  const calibers = mergeById(CALIBERS, options.calibers);
13093
14199
  const explosives = mergeById(EXPLOSIVES, options.explosives);
14200
+ const ammo = mergeById(AMMO, options.ammo);
13094
14201
  const weapons = mergeById(WEAPONS, options.weapons);
13095
14202
  const attachments = mergeById(ATTACHMENTS, options.attachments);
13096
14203
  applyPatches(calibers, options.patch?.calibers);
13097
14204
  applyPatches(explosives, options.patch?.explosives);
14205
+ applyPatches(ammo, options.patch?.ammo);
13098
14206
  applyPatches(attachments, options.patch?.attachments);
13099
14207
  resolveThrowables(weapons, explosives);
13100
14208
  applyPatches(weapons, options.patch?.weapons);
13101
14209
  removeIds(calibers, options.remove?.calibers);
13102
14210
  removeIds(explosives, options.remove?.explosives);
14211
+ removeIds(ammo, options.remove?.ammo);
13103
14212
  removeIds(attachments, options.remove?.attachments);
13104
14213
  removeIds(weapons, options.remove?.weapons);
13105
14214
  if (options.include) {
@@ -13111,8 +14220,9 @@ var createArsenal = (options = {}) => {
13111
14220
  ...findDuplicateIds("calibre", options.calibers),
13112
14221
  ...findDuplicateIds("weapon", options.weapons),
13113
14222
  ...findDuplicateIds("explosive", options.explosives),
14223
+ ...findDuplicateIds("ammo", options.ammo),
13114
14224
  ...findDuplicateIds("attachment", options.attachments),
13115
- ...checkArsenal({ weapons, calibers, explosives, attachments, rules })
14225
+ ...checkArsenal({ weapons, calibers, explosives, attachments, ammo, rules })
13116
14226
  ];
13117
14227
  if (problems.length > 0) throw new Error(`game-weapons: the arsenal is not consistent:
13118
14228
  ${problems.map((problem) => ` - ${problem}`).join("\n")}`);
@@ -13126,12 +14236,13 @@ ${problems.map((problem) => ` - ${problem}`).join("\n")}`);
13126
14236
  counter += 1;
13127
14237
  const seed = opts.seed ?? baseSeed + Math.imul(counter, 2654435761) >>> 0;
13128
14238
  const explosive = explosiveOf(def, explosives);
13129
- return new WeaponRuntime({ def, caliber, seed, reserve: opts.reserve, rules, explosive, condition: opts.condition, ammoQuality: opts.ammoQuality, attachments, isCompatible: options.isCompatible, snapshot: opts.snapshot, makeUnderbarrel: (launcherId, launcherSeed, launcherSnapshot) => create(launcherId, { seed: launcherSeed, snapshot: launcherSnapshot }) });
14239
+ return new WeaponRuntime({ def, caliber, seed, reserve: opts.reserve, rules, explosive, condition: opts.condition, ammoQuality: opts.ammoQuality, ammoKind: opts.ammoKind, ammo, attachments, isCompatible: options.isCompatible, snapshot: opts.snapshot, makeUnderbarrel: (launcherId, launcherSeed, launcherSnapshot) => create(launcherId, { seed: launcherSeed, snapshot: launcherSnapshot }) });
13130
14240
  };
13131
14241
  return {
13132
14242
  calibers,
13133
14243
  weapons,
13134
14244
  explosives,
14245
+ ammo,
13135
14246
  attachments,
13136
14247
  rules,
13137
14248
  create,
@@ -13145,7 +14256,14 @@ ${problems.map((problem) => ` - ${problem}`).join("\n")}`);
13145
14256
  return canFit(def, part, fitted, { caliber, catalogue: attachments, isCompatible: options.isCompatible }, opts.mount);
13146
14257
  },
13147
14258
  restore(snapshot, opts = {}) {
13148
- return create(snapshot.id, { seed: opts.seed, reserve: snapshot.reserve, condition: snapshot.condition, ammoQuality: snapshot.ammoQuality, snapshot });
14259
+ return create(snapshot.id, { seed: opts.seed, reserve: snapshot.reserve, condition: snapshot.condition, ammoQuality: snapshot.ammoQuality, ammoKind: snapshot.ammoKind, snapshot });
14260
+ },
14261
+ loadOf(caliber, kind) {
14262
+ const c = calibers.get(caliber);
14263
+ if (!c) throw new Error(`game-weapons: unknown calibre "${caliber}"`);
14264
+ const load = resolveLoad(c, ammo, kind);
14265
+ if (!load) throw new Error(`game-weapons: no ammo "${caliber}:${kind ?? c.kind ?? ""}" in the table`);
14266
+ return load;
13149
14267
  },
13150
14268
  muzzleEnergy(caliber, barrel = 1) {
13151
14269
  const c = calibers.get(caliber);
@@ -13207,7 +14325,76 @@ var tripwireSegment = (use) => {
13207
14325
  const from = [use.origin[0], use.origin[1] + wire.height, use.origin[2]];
13208
14326
  return { from, to: [from[0] + dx * wire.length, from[1], from[2] + dz * wire.length] };
13209
14327
  };
14328
+
14329
+ // src/data/muzzle-smoke.json
14330
+ var muzzle_smoke_default = {
14331
+ smokeless: {
14332
+ puffs: 2,
14333
+ radius: 0.01,
14334
+ opacity: 0.14,
14335
+ life: 0.7,
14336
+ drift: 0.2,
14337
+ rise: 0.06,
14338
+ growth: 2.1,
14339
+ flash: 1
14340
+ },
14341
+ black_powder: {
14342
+ puffs: 8,
14343
+ radius: 0.022,
14344
+ opacity: 0.55,
14345
+ life: 5.5,
14346
+ drift: 0.12,
14347
+ rise: 0.04,
14348
+ growth: 2.8,
14349
+ flash: 1
14350
+ },
14351
+ suppressed: {
14352
+ puffs: 1,
14353
+ radius: 6e-3,
14354
+ opacity: 0.08,
14355
+ life: 0.5,
14356
+ drift: 0.15,
14357
+ rise: 0.05,
14358
+ growth: 2.1,
14359
+ flash: 0.15
14360
+ },
14361
+ none: {
14362
+ puffs: 0,
14363
+ radius: 0,
14364
+ opacity: 0,
14365
+ life: 0,
14366
+ drift: 0,
14367
+ rise: 0,
14368
+ growth: 0,
14369
+ flash: 0
14370
+ },
14371
+ gallery: {
14372
+ puffs: 6,
14373
+ radius: 0.013,
14374
+ opacity: 0.45,
14375
+ life: 1.3,
14376
+ lifeSpread: 0.6,
14377
+ drift: 0.15,
14378
+ driftSpread: 0.35,
14379
+ rise: 0.03,
14380
+ riseSpread: 0.12,
14381
+ sideSpread: 0.14,
14382
+ growth: 2.1,
14383
+ flash: 1
14384
+ }
14385
+ };
14386
+
14387
+ // src/muzzle-smoke.ts
14388
+ var MUZZLE_SMOKE = muzzle_smoke_default;
14389
+ function muzzleSmokeOf({ caliber, weapon, suppressed }) {
14390
+ if (suppressed) return MUZZLE_SMOKE.suppressed;
14391
+ const override = weapon?.muzzleSmoke;
14392
+ if (override && override in MUZZLE_SMOKE) return MUZZLE_SMOKE[override];
14393
+ const id = caliber?.propellant === "black_powder" ? "black_powder" : caliber?.propellant === "none" ? "none" : "smokeless";
14394
+ return MUZZLE_SMOKE[id];
14395
+ }
13210
14396
  export {
14397
+ AMMO,
13211
14398
  ARCHETYPE_IDS,
13212
14399
  ATTACHMENTS,
13213
14400
  CALIBERS,
@@ -13215,8 +14402,12 @@ export {
13215
14402
  DEFAULT_RULES,
13216
14403
  EXPLOSIVES,
13217
14404
  ExplosiveBody,
14405
+ GALLERY_HEAT,
14406
+ MUZZLE_SMOKE,
13218
14407
  RELOAD_STAGES,
13219
14408
  WEAPONS,
14409
+ ammoId,
14410
+ ammoIgnition,
13220
14411
  backblastEffect,
13221
14412
  blastEffect,
13222
14413
  canFit,
@@ -13227,7 +14418,9 @@ export {
13227
14418
  createRng,
13228
14419
  locales,
13229
14420
  muzzleEnergy,
14421
+ muzzleSmokeOf,
13230
14422
  nominalFuse,
14423
+ resolveLoad,
13231
14424
  resolveLoadout,
13232
14425
  resolveStrings,
13233
14426
  sampleFuse,