diff --git a/data/json/items/ammo.json b/data/json/items/ammo.json index 0ad101a1fb855..5e7981c4ac925 100644 --- a/data/json/items/ammo.json +++ b/data/json/items/ammo.json @@ -273,7 +273,7 @@ "dispersion": 14, "loudness": 0, "count": 10, - "effects": [ "NEVER_MISFIRES" ] + "effects": [ "NEVER_MISFIRES", "NON-FOULING" ] }, { "type": "AMMO", @@ -332,7 +332,7 @@ "dispersion": 14, "loudness": 0, "count": 50, - "effects": [ "NEVER_MISFIRES" ] + "effects": [ "NEVER_MISFIRES", "NON-FOULING" ] }, { "type": "AMMO", @@ -351,7 +351,7 @@ "count": 500, "stack_size": 200, "loudness": 9, - "effects": [ "NOGIB", "NEVER_MISFIRES" ] + "effects": [ "NOGIB", "NEVER_MISFIRES", "NON-FOULING" ] }, { "type": "AMMO", diff --git a/data/json/items/ammo/flintlock.json b/data/json/items/ammo/flintlock.json index a39ee42632498..93e6293996b35 100644 --- a/data/json/items/ammo/flintlock.json +++ b/data/json/items/ammo/flintlock.json @@ -19,7 +19,7 @@ "dispersion": 90, "recoil": 1500, "loudness": 70, - "effects": [ "COOKOFF", "MUZZLE_SMOKE" ] + "effects": [ "COOKOFF", "MUZZLE_SMOKE", "BLACKPOWDER" ] }, { "id": "flintlock_shot", @@ -41,6 +41,6 @@ "dispersion": 20, "recoil": 1500, "loudness": 90, - "effects": [ "COOKOFF", "MUZZLE_SMOKE", "SHOT" ] + "effects": [ "COOKOFF", "MUZZLE_SMOKE", "SHOT", "BLACKPOWDER" ] } ] diff --git a/data/json/items/ammo/metal_rail.json b/data/json/items/ammo/metal_rail.json index 4e1d99cf27335..64a7289cb2c7f 100644 --- a/data/json/items/ammo/metal_rail.json +++ b/data/json/items/ammo/metal_rail.json @@ -20,7 +20,7 @@ "damage": 70, "pierce": 25, "dispersion": 150, - "effects": [ "RECYCLED" ] + "effects": [ "RECYCLED", "NON-FOULING" ] }, { "id": "steel_rail", @@ -36,7 +36,7 @@ "material": [ "steel" ], "color": "light_gray", "dispersion": 0, - "effects": [ "NEVER_MISFIRES" ], + "effects": [ "NEVER_MISFIRES", "NON-FOULING" ], "relative": { "range": 10, "damage": -5, "pierce": 15 } } ] diff --git a/data/json/items/ammo/nail.json b/data/json/items/ammo/nail.json index a2054549af5bf..e488465e5d62f 100644 --- a/data/json/items/ammo/nail.json +++ b/data/json/items/ammo/nail.json @@ -29,6 +29,7 @@ "range": 3, "damage": 4, "pierce": 3, - "dispersion": 120 + "dispersion": 120, + "effects": [ "NON-FOULING" ] } ] diff --git a/data/json/items/ammo/shot.json b/data/json/items/ammo/shot.json index 59ed21ea86d93..4e1d1cc3fc359 100644 --- a/data/json/items/ammo/shot.json +++ b/data/json/items/ammo/shot.json @@ -50,7 +50,7 @@ "type": "AMMO", "name": "blackpowder birdshot", "proportional": { "price": 0.6, "damage": 0.8, "dispersion": 1.2 }, - "extend": { "effects": [ "RECYCLED", "MUZZLE_SMOKE" ] }, + "extend": { "effects": [ "RECYCLED", "MUZZLE_SMOKE", "BLACKPOWDER" ] }, "delete": { "effects": [ "NEVER_MISFIRES" ] } }, { @@ -59,7 +59,7 @@ "type": "AMMO", "name": "blackpowder dragon's breath shell", "proportional": { "price": 0.6, "damage": 0.8, "dispersion": 1.2 }, - "extend": { "effects": [ "RECYCLED", "MUZZLE_SMOKE" ] }, + "extend": { "effects": [ "RECYCLED", "MUZZLE_SMOKE", "BLACKPOWDER" ] }, "delete": { "effects": [ "NEVER_MISFIRES" ] } }, { @@ -67,7 +67,7 @@ "copy-from": "shot_00", "type": "AMMO", "name": "blackpowder 00 shot", - "extend": { "effects": [ "RECYCLED", "MUZZLE_SMOKE" ] }, + "extend": { "effects": [ "RECYCLED", "MUZZLE_SMOKE", "BLACKPOWDER" ] }, "delete": { "effects": [ "NEVER_MISFIRES" ] } }, { @@ -76,7 +76,7 @@ "type": "AMMO", "name": "blackpowder flechette shell", "proportional": { "price": 0.6, "damage": 0.8, "dispersion": 1.2 }, - "extend": { "effects": [ "RECYCLED", "MUZZLE_SMOKE" ] }, + "extend": { "effects": [ "RECYCLED", "MUZZLE_SMOKE", "BLACKPOWDER" ] }, "delete": { "effects": [ "NEVER_MISFIRES" ] } }, { @@ -85,7 +85,7 @@ "type": "AMMO", "name": "blackpowder shotgun slug", "proportional": { "price": 0.6, "damage": 0.8, "dispersion": 1.2 }, - "extend": { "effects": [ "RECYCLED", "MUZZLE_SMOKE" ] }, + "extend": { "effects": [ "RECYCLED", "MUZZLE_SMOKE", "BLACKPOWDER" ] }, "delete": { "effects": [ "NEVER_MISFIRES" ] } }, { diff --git a/data/json/items/classes/gun.json b/data/json/items/classes/gun.json index ac52b068bd36a..4b6626546eb24 100644 --- a/data/json/items/classes/gun.json +++ b/data/json/items/classes/gun.json @@ -6,7 +6,7 @@ "name": "base gun", "symbol": "(", "color": "light_gray", - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ] + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ] }, { "abstract": "flamethrower_base", @@ -30,7 +30,7 @@ "modes": [ [ "DEFAULT", "single", 1, "NPC_AVOID" ] ], "valid_mod_locations": [ [ "accessories", 2 ], [ "barrel", 1 ], [ "sights", 1 ], [ "sling", 1 ] ], "flags": [ "RELOAD_ONE", "RELOAD_EJECT", "NEVER_JAMS" ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged" ] + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ] }, { "abstract": "pistol_base", @@ -81,7 +81,7 @@ "proportional": { "reload": 0.7 }, "extend": { "flags": [ "RELOAD_ONE", "RELOAD_EJECT", "NEVER_JAMS" ] }, "//": "Revolvers exclude the muzzle location preventing installation of suppressors", - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "valid_mod_locations": [ [ "accessories", 2 ], [ "barrel", 1 ], @@ -102,7 +102,7 @@ "reload": 150, "extend": { "flags": [ "RELOAD_ONE", "NO_UNLOAD" ] }, "//": "Slower reloads, no unloading. Base, unskilled person should take 1.5 seconds per chamber. No underbarrel mods, that's where the ram goes.", - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "valid_mod_locations": [ [ "accessories", 2 ], [ "barrel", 1 ], @@ -142,7 +142,7 @@ "name": "rifle with manual actions", "name_plural": "rifles with manual actions", "//": "Manual actions exclude the magazine location preventing installation of belt-feed adaptors", - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "valid_mod_locations": [ [ "accessories", 4 ], [ "barrel", 1 ], @@ -199,7 +199,7 @@ "name": "pump action shotgun", "reload_noise": "chuk chuk.", "flags": [ "RELOAD_ONE", "PUMP_ACTION" ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged" ] + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ] }, { "abstract": "smg_base", diff --git a/data/json/items/gun/22.json b/data/json/items/gun/22.json index 8dad295c9c71e..7e31cf8e6cf4d 100644 --- a/data/json/items/gun/22.json +++ b/data/json/items/gun/22.json @@ -36,7 +36,7 @@ [ "stock", 1 ], [ "underbarrel", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazines": [ [ "22", [ "a180mag" ] ] ] }, { @@ -76,7 +76,7 @@ [ "stock", 1 ], [ "underbarrel", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "flags": [ "RELOAD_ONE" ] }, { @@ -109,7 +109,7 @@ [ "stock mount", 1 ], [ "underbarrel mount", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "flags": [ "RELOAD_ONE", "NEVER_JAMS", "RELOAD_EJECT" ] }, { @@ -147,7 +147,7 @@ [ "sights mount", 1 ], [ "underbarrel mount", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "flags": [ "RELOAD_EJECT" ] }, { @@ -184,7 +184,7 @@ [ "stock", 1 ], [ "underbarrel", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazines": [ [ "22", [ "360_200_mag", "360_400_mag" ] ] ], "flags": [ "WATERPROOF_GUN", "NEVER_JAMS" ] }, @@ -224,7 +224,7 @@ [ "stock", 1 ], [ "underbarrel", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazine_well": 1, "magazines": [ [ "22", [ "ruger1022mag", "ruger1022bigmag" ] ] ] }, @@ -272,7 +272,7 @@ [ "stock", 1 ], [ "underbarrel", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazine_well": 1, "magazines": [ [ "22", [ "mosquitomag" ] ] ] }, @@ -314,7 +314,7 @@ "dispersion": 600, "durability": 5, "min_cycle_recoil": 39, - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazines": [ [ "22", [ "j22mag" ] ] ] }, { diff --git a/data/json/items/gun/223.json b/data/json/items/gun/223.json index 1902a783b2faf..3ba0c229f2964 100644 --- a/data/json/items/gun/223.json +++ b/data/json/items/gun/223.json @@ -353,7 +353,7 @@ [ "sights mount", 1 ], [ "underbarrel mount", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "flags": [ "RELOAD_EJECT" ] }, { diff --git a/data/json/items/gun/3006.json b/data/json/items/gun/3006.json index 8e94e7021f254..4680cdf2909dd 100644 --- a/data/json/items/gun/3006.json +++ b/data/json/items/gun/3006.json @@ -35,7 +35,7 @@ [ "stock", 1 ], [ "underbarrel", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "magazine_well": 1, "magazines": [ [ "3006", [ "blrmag" ] ] ] }, @@ -72,7 +72,7 @@ [ "stock", 1 ], [ "underbarrel", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazine_well": 1, "magazines": [ [ "3006", [ "garandclip" ] ] ] }, @@ -147,7 +147,7 @@ [ "stock", 1 ], [ "underbarrel", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazines": [ [ "3006", [ "m1918mag", "m1918bigmag" ] ] ] }, { @@ -208,7 +208,7 @@ [ "sights mount", 1 ], [ "underbarrel mount", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "flags": [ "RELOAD_EJECT" ] }, { diff --git a/data/json/items/gun/308.json b/data/json/items/gun/308.json index 7b6fb57adcd96..d2e1a61019d52 100644 --- a/data/json/items/gun/308.json +++ b/data/json/items/gun/308.json @@ -70,7 +70,7 @@ "reload": 400, "valid_mod_locations": [ [ "brass catcher", 1 ], [ "sling", 1 ], [ "rail mount", 1 ], [ "sights mount", 1 ] ], "modes": [ [ "DEFAULT", "low auto", 50 ], [ "AUTO", "high auto", 100 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "magazines": [ [ "308", [ "belt308" ] ] ], "flags": [ "NEVER_JAMS", "MOUNTED_GUN" ] }, diff --git a/data/json/items/gun/32.json b/data/json/items/gun/32.json index 7f7f8ca02b450..60a45d4b4f255 100644 --- a/data/json/items/gun/32.json +++ b/data/json/items/gun/32.json @@ -32,7 +32,7 @@ [ "stock", 1 ], [ "underbarrel", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazine_well": 1, "magazines": [ [ "32", [ "sigp230mag" ] ] ] }, @@ -72,7 +72,7 @@ [ "stock", 1 ], [ "underbarrel", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazines": [ [ "32", [ "skorpion61mag" ] ] ] }, { @@ -108,7 +108,7 @@ [ "stock", 1 ], [ "underbarrel", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazine_well": 1, "magazines": [ [ "32", [ "ppkmag" ] ] ] }, diff --git a/data/json/items/gun/38.json b/data/json/items/gun/38.json index 781465e80a304..3e90d7224714a 100644 --- a/data/json/items/gun/38.json +++ b/data/json/items/gun/38.json @@ -30,7 +30,7 @@ [ "rail mount", 1 ], [ "stock mount", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "flags": [ "RELOAD_ONE", "RELOAD_EJECT" ] }, { @@ -62,7 +62,7 @@ [ "stock mount", 1 ], [ "underbarrel mount", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "flags": [ "RELOAD_ONE", "NEVER_JAMS", "RELOAD_EJECT" ] }, { @@ -99,7 +99,7 @@ [ "sights mount", 1 ], [ "underbarrel mount", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "flags": [ "RELOAD_EJECT" ] }, { @@ -202,7 +202,7 @@ [ "stock", 1 ], [ "underbarrel", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazine_well": 1, "magazines": [ [ "38", [ "taurus38mag" ] ] ] } diff --git a/data/json/items/gun/40.json b/data/json/items/gun/40.json index 0f60f2313ef75..38b9ea39926fb 100644 --- a/data/json/items/gun/40.json +++ b/data/json/items/gun/40.json @@ -34,7 +34,7 @@ [ "stock", 1 ], [ "underbarrel", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazine_well": 1, "magazines": [ [ "40", [ "glock40mag", "glock40bigmag" ] ] ] }, @@ -72,7 +72,7 @@ [ "sights mount", 1 ], [ "underbarrel mount", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "flags": [ "RELOAD_EJECT" ] }, { @@ -108,7 +108,7 @@ [ "stock", 1 ], [ "underbarrel", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazine_well": 1, "magazines": [ [ "40", [ "sig40mag" ] ] ] }, @@ -184,7 +184,7 @@ [ "underbarrel", 1 ], [ "rail mount", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "flags": [ "RELOAD_ONE", "NEVER_JAMS", "RELOAD_EJECT" ] }, { diff --git a/data/json/items/gun/44.json b/data/json/items/gun/44.json index a4c239f22ebc0..ade01e1e26322 100644 --- a/data/json/items/gun/44.json +++ b/data/json/items/gun/44.json @@ -33,7 +33,7 @@ [ "stock", 1 ], [ "underbarrel", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazine_well": 1, "magazines": [ [ "44", [ "deaglemag" ] ] ] }, @@ -106,7 +106,7 @@ [ "sights mount", 1 ], [ "underbarrel mount", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "flags": [ "RELOAD_EJECT" ] }, { diff --git a/data/json/items/gun/45.json b/data/json/items/gun/45.json index 2dcb39c36d378..efe45ffd50ba3 100644 --- a/data/json/items/gun/45.json +++ b/data/json/items/gun/45.json @@ -33,7 +33,7 @@ [ "stock", 1 ], [ "underbarrel", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazine_well": 2, "magazines": [ [ "45", [ "tdi_mag" ] ] ] }, @@ -72,7 +72,7 @@ [ "stock", 1 ], [ "underbarrel", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazines": [ [ "45", [ "ump45mag" ] ] ] }, { @@ -145,7 +145,7 @@ [ "stock", 1 ], [ "underbarrel", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazine_well": 1, "magazines": [ [ "45", [ "mac10mag" ] ] ] }, @@ -184,7 +184,7 @@ [ "sights mount", 1 ], [ "underbarrel mount", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "flags": [ "RELOAD_EJECT" ] }, { @@ -285,7 +285,7 @@ [ "stock", 1 ], [ "underbarrel", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazines": [ [ "45", [ "thompson_mag", "thompson_bigmag", "thompson_drum" ] ] ] }, { diff --git a/data/json/items/gun/46.json b/data/json/items/gun/46.json index b44e2145b0977..e10f0cbb196a2 100644 --- a/data/json/items/gun/46.json +++ b/data/json/items/gun/46.json @@ -33,7 +33,7 @@ [ "stock", 1 ], [ "underbarrel", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazine_well": 1, "magazines": [ [ "46", [ "hk46mag", "hk46bigmag" ] ] ] } diff --git a/data/json/items/gun/460.json b/data/json/items/gun/460.json index d100bb54ec71a..0714108e5c7b9 100644 --- a/data/json/items/gun/460.json +++ b/data/json/items/gun/460.json @@ -94,7 +94,7 @@ [ "rail mount", 1 ], [ "stock mount", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "flags": [ "RELOAD_ONE" ] } ] diff --git a/data/json/items/gun/57.json b/data/json/items/gun/57.json index 02e4655068908..dc9c8698600ce 100644 --- a/data/json/items/gun/57.json +++ b/data/json/items/gun/57.json @@ -32,7 +32,7 @@ [ "underbarrel", 1 ] ], "magazine_well": 1, - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazines": [ [ "57", [ "fn57mag" ] ] ] }, { @@ -69,7 +69,7 @@ [ "underbarrel", 1 ] ], "magazine_well": 2, - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazines": [ [ "57", [ "fnp90mag" ] ] ] } ] diff --git a/data/json/items/gun/762x25.json b/data/json/items/gun/762x25.json index aefaba094d9ab..5390e997bf5e0 100644 --- a/data/json/items/gun/762x25.json +++ b/data/json/items/gun/762x25.json @@ -35,7 +35,7 @@ [ "underbarrel", 1 ], [ "rail mount", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazines": [ [ "762x25", [ "ppshmag", "ppshdrum" ] ] ] }, { diff --git a/data/json/items/gun/9mm.json b/data/json/items/gun/9mm.json index bd43e897144ab..542d29cd3ea68 100644 --- a/data/json/items/gun/9mm.json +++ b/data/json/items/gun/9mm.json @@ -36,7 +36,7 @@ [ "stock", 1 ], [ "underbarrel", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazine_well": 1, "magazines": [ [ "9mm", [ "calicomag" ] ] ] }, @@ -76,7 +76,7 @@ [ "stock", 1 ], [ "underbarrel", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazine_well": 1, "magazines": [ [ "9mm", [ "m9bigmag", "m9mag" ] ] ] }, @@ -139,7 +139,7 @@ [ "sling", 1 ], [ "stock", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazines": [ [ "9mm", [ "mp5mag", "mp5bigmag" ] ] ] }, { @@ -271,7 +271,7 @@ [ "sights", 1 ], [ "sling", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazine_well": 1, "magazines": [ [ "9mm", [ "glockmag", "glockbigmag", "glock17_17", "glock17_22", "glock_drum_50rd", "glock_drum_100rd" ] ] ] }, @@ -390,7 +390,7 @@ [ "sights mount", 1 ], [ "underbarrel mount", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "flags": [ "RELOAD_EJECT" ] }, { @@ -463,7 +463,7 @@ [ "sights mount", 1 ], [ "underbarrel mount", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazines": [ [ "9mm", [ "stenmag", "survivor9mm_mag" ] ] ] }, { @@ -501,7 +501,7 @@ [ "stock", 1 ], [ "underbarrel", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged", "fault_gun_chamber_spent" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "magazine_well": 1, "magazines": [ [ "9mm", [ "tec9mag" ] ] ] }, diff --git a/data/json/items/gun/faults_gun.json b/data/json/items/gun/faults_gun.json index a9a8c0a24bf07..4c483f4cfb25d 100644 --- a/data/json/items/gun/faults_gun.json +++ b/data/json/items/gun/faults_gun.json @@ -3,8 +3,8 @@ "id": "fault_gun_blackpowder", "type": "fault", "name": "Blackpowder fouling", - "description": "Firing blackpowder loads from a gun fouls it, which reduces reliability and, if left uncleaned, leads to rust.", - "time": "50 s", + "description": "Firing blackpowder loads from a gun fouls it, which reduces reliability and, if left uncleaned, leads to rust. It fouls the gun much faster than the use of modern smokeless powder cartridges. Fouling is only a significant impact on reliability at high levels, but black powder fouling accumulates quickly.", + "time": "50 m", "skills": [ [ "mechanics", 1 ] ], "requirements": { "qualities": [ { "id": "SCREW", "level": 1 } ], @@ -21,11 +21,11 @@ "requirements": { } }, { - "id": "fault_gun_clogged", + "id": "fault_gun_dirt", "type": "fault", - "name": "Clogging", - "description": "Clogging is usually caused by firing many blackpowder loads without cleaning; it prevents firing the gun until cleaned. Some guns are more resistant to this than others.", - "time": "5 m", + "name": "Fouling", + "description": "Fouling is caused by firing gunpowder loads repeatedly, which reduces reliability and can eventually cause damage to the gun. Fouling accumulates slowly (unless blackpowder is used) due to the design of modern smokeless powder found in the vast majority of retail cartridges and it is not a significant problem until high levels of fouling are reached due to firing thousands of rounds without cleaning your firearm.", + "time": "50 m", "skills": [ [ "mechanics", 1 ] ], "requirements": { "qualities": [ { "id": "SCREW", "level": 1 } ], diff --git a/data/json/items/gun/flintlock.json b/data/json/items/gun/flintlock.json index 0b42d0d1992ba..8a8c2a8ed0295 100644 --- a/data/json/items/gun/flintlock.json +++ b/data/json/items/gun/flintlock.json @@ -48,6 +48,7 @@ "ranged_damage": 2, "dispersion": 620, "durability": 6, + "blackpowder_tolerance": 96, "clip_size": 1, "reload": 600, "valid_mod_locations": [ @@ -80,6 +81,7 @@ "ranged_damage": 10, "dispersion": 180, "durability": 6, + "blackpowder_tolerance": 96, "clip_size": 1, "reload": 1200, "valid_mod_locations": [ diff --git a/data/json/items/ranged.json b/data/json/items/ranged.json index 245ebc6b4de98..7d4824f38da5e 100644 --- a/data/json/items/ranged.json +++ b/data/json/items/ranged.json @@ -284,7 +284,7 @@ "loudness": 25, "barrel_length": 2, "built_in_mods": [ "combination_gun_shotgun_pipe" ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "valid_mod_locations": [ [ "muzzle", 1 ], [ "sling", 1 ], @@ -305,7 +305,7 @@ "description": "A multistroke pneumatic rifle handcrafted from scrap. It is very quiet and deadly.", "price": 240000, "material": [ "steel", "wood" ], - "flags": [ "STR_RELOAD", "RELOAD_ONE" ], + "flags": [ "STR_RELOAD", "RELOAD_ONE", "NON-FOULING" ], "skill": "rifle", "ammo": "pebble", "weight": "4211 g", @@ -341,7 +341,7 @@ "description": "An eight-shot, revolving barrel, pneumatic bolt driver handcrafted from scrap. It is very quiet and deadly.", "price": 290000, "material": [ "steel", "wood" ], - "flags": [ "RELOAD_ONE", "STR_RELOAD" ], + "flags": [ "RELOAD_ONE", "STR_RELOAD", "NON-FOULING" ], "skill": "rifle", "ammo": "bolt", "weight": "3110 g", @@ -377,7 +377,7 @@ "description": "A double-barreled pneumatic air shotgun handcrafted from scrap. Though it's firepower is lacking compared to more conventional shotguns, this thing can still pack quite a punch. That is, if your target is directly in front of you.", "price": 220000, "material": [ "steel", "wood" ], - "flags": [ "RELOAD_ONE", "STR_RELOAD" ], + "flags": [ "RELOAD_ONE", "STR_RELOAD", "NON-FOULING" ], "skill": "shotgun", "ammo": "shotcanister", "weight": "3410 g", @@ -613,7 +613,7 @@ "loudness": 25, "barrel_length": 2, "built_in_mods": [ "combination_gun_shotgun" ], - "faults": [ "fault_gun_blackpowder", "fault_gun_clogged" ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "valid_mod_locations": [ [ "accessories", 4 ], [ "barrel", 1 ], diff --git a/data/json/monsterdrops/zombie_cop.json b/data/json/monsterdrops/zombie_cop.json index 19bd98445ce59..2ace5aae10dfb 100644 --- a/data/json/monsterdrops/zombie_cop.json +++ b/data/json/monsterdrops/zombie_cop.json @@ -12,7 +12,7 @@ { "group": "cop_pants", "damage": [ 1, 4 ] }, { "group": "cop_shoes", "damage": [ 1, 4 ] }, { "group": "cop_torso", "damage": [ 1, 4 ] }, - { "group": "cop_weapons", "prob": 50, "damage": [ 0, 1 ] }, + { "group": "cop_weapons", "prob": 50, "damage": [ 0, 1 ], "dirt": [ 1500, 7050 ] }, { "group": "underwear", "damage": [ 1, 4 ] }, { "group": "clothing_glasses", "prob": 5 }, { "group": "clothing_watch", "prob": 5 }, diff --git a/data/json/obsolete.json b/data/json/obsolete.json index 0aec148cd75cd..402d6f4d9e530 100644 --- a/data/json/obsolete.json +++ b/data/json/obsolete.json @@ -399,5 +399,12 @@ "symbol": ",", "color": "white", "use_action": "WASH_HARD_ITEMS" + }, + { + "id": "fault_gun_clogged", + "type": "fault", + "name": "Dusty", + "description": "It's dusty. Has no effect - obsolete fault.", + "time": "1 s" } ] diff --git a/src/activity_handlers.cpp b/src/activity_handlers.cpp index 800d76ebae05d..8ea18a55c2ed8 100644 --- a/src/activity_handlers.cpp +++ b/src/activity_handlers.cpp @@ -2514,6 +2514,9 @@ void activity_handlers::mend_item_finish( player_activity *act, player *p ) p->invalidate_crafting_inventory(); target->faults.erase( *f ); + if( act->name == "fault_gun_blackpowder" || act->name == "fault_gun_dirt" ) { + target->set_var( "dirt", 0 ); + } add_msg( m_good, _( "You successfully mended the %s." ), target->tname() ); } diff --git a/src/avatar_action.cpp b/src/avatar_action.cpp index 7bc194a3e4cc8..1e91d0f2b6e2f 100644 --- a/src/avatar_action.cpp +++ b/src/avatar_action.cpp @@ -61,8 +61,6 @@ static const efftype_id effect_stunned( "stunned" ); static const efftype_id effect_ridden( "ridden" ); static const efftype_id effect_harnessed( "harnessed" ); -static const fault_id fault_gun_clogged( "fault_gun_clogged" ); - bool avatar_action::move( avatar &you, map &m, int dx, int dy, int dz ) { if( ( !g->check_safe_mode_allowed() ) || you.has_active_mutation( trait_SHELL2 ) ) { @@ -634,11 +632,6 @@ bool avatar_action::fire_check( avatar &you, const map &m, const targeting_data return false; } - if( weapon.faults.count( fault_gun_clogged ) ) { - add_msg( m_info, _( "Your %s is too clogged with blackpowder fouling to fire." ), gun->tname() ); - return false; - } - if( gun->has_flag( "FIRE_TWOHAND" ) && ( !you.has_two_arms() || you.worn_with_flag( "RESTRICT_HANDS" ) ) ) { add_msg( m_info, _( "You need two free hands to fire your %s." ), gun->tname() ); diff --git a/src/item.cpp b/src/item.cpp index 5c44e078c21b3..ab99ade0885d7 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -114,6 +114,7 @@ const efftype_id effect_weed_high( "weed_high" ); const material_id mat_leather( "leather" ); const material_id mat_kevlar( "kevlar" ); +const fault_id fault_gun_dirt( "fault_gun_dirt" ); const fault_id fault_gun_blackpowder( "fault_gun_blackpowder" ); const trait_id trait_small2( "SMALL2" ); @@ -3429,7 +3430,35 @@ std::string item::tname( unsigned int quantity, bool with_prefix, unsigned int t { std::stringstream ret; + int dirt_level = get_var( "dirt", 0 ) / 2000; + std::string dirt_symbol; // TODO: MATERIALS put this in json + + // these symbols are unicode square characeters of different heights, representing a rough + // estimation of fouling in a gun. This appears instead of "faulty" + // since most guns will have some level of fouling in them, and usually it is not a big deal. + switch( dirt_level ) { + case 0: + dirt_symbol = ""; + break; + case 1: + dirt_symbol = "\u2581"; + break; + case 2: + dirt_symbol = "\u2583"; + break; + case 3: + dirt_symbol = "\u2585"; + break; + case 4: + dirt_symbol = "\u2587"; + break; + case 5: + dirt_symbol = "\u2588"; + break; + default: + dirt_symbol = ""; + } std::string damtext; // for portions of string that have 0 ) { + new_item.set_var( "dirt", random_dirt ); + new_item.faults.emplace( "fault_gun_dirt" ); + } int ch = ( charges.first == charges.second ) ? charges.first : rng( charges.first, charges.second ); diff --git a/src/item_group.h b/src/item_group.h index 9c7f6c676303f..c2be082a8706d 100644 --- a/src/item_group.h +++ b/src/item_group.h @@ -155,6 +155,7 @@ class Item_modifier * Charges to spawn the item with, if this turns out to * be negative, the default charges are used. */ + std::pair dirt; std::pair charges; /** * Ammo for guns. If NULL the gun spawns without ammo. diff --git a/src/ranged.cpp b/src/ranged.cpp index cc8cf62a24ec1..1701ab0fe13d2 100644 --- a/src/ranged.cpp +++ b/src/ranged.cpp @@ -78,7 +78,7 @@ static const trait_id trait_PYROMANIA( "PYROMANIA" ); const trap_str_id tr_practice_target( "tr_practice_target" ); static const fault_id fault_gun_blackpowder( "fault_gun_blackpowder" ); -static const fault_id fault_gun_clogged( "fault_gun_clogged" ); +static const fault_id fault_gun_dirt( "fault_gun_dirt" ); static const fault_id fault_gun_chamber_spent( "fault_gun_chamber_spent" ); static projectile make_gun_projectile( const item &gun ); @@ -157,20 +157,28 @@ bool player::handle_gun_damage( item &it ) return false; } - if( it.faults.count( fault_gun_chamber_spent ) || it.faults.count( fault_gun_clogged ) ) { + int dirt = it.get_var( "dirt", 0 ); + int dirtadder = 0; + double dirt_dbl = static_cast( dirt ); + if( it.faults.count( fault_gun_chamber_spent ) ) { return false; } const auto &curammo_effects = it.ammo_effects(); const cata::optional &firing = it.type->gun; + if( !it.has_flag( "NEVER_JAMS" ) && + x_in_y( dirt_dbl * dirt_dbl * dirt_dbl, 1000000000000.0 ) ) { + add_msg_player_or_npc( _( "Your %s misfires with a muffled click!" ), + _( "'s %s misfires with a muffled click!" ), + it.tname() ); + return false; + } + // Here we check if we're underwater and whether we should misfire. // As a result this causes no damage to the firearm, note that some guns are waterproof // and so are immune to this effect, note also that WATERPROOF_GUN status does not // mean the gun will actually be accurate underwater. int effective_durability = firing->durability; - if( it.faults.count( fault_gun_blackpowder ) && effective_durability > 2 ) { - effective_durability -= 1; - } if( is_underwater() && !it.has_flag( "WATERPROOF_GUN" ) && one_in( effective_durability ) ) { add_msg_player_or_npc( _( "Your %s misfires with a wet click!" ), _( "'s %s misfires with a wet click!" ), @@ -179,43 +187,20 @@ bool player::handle_gun_damage( item &it ) // Here we check for a chance for the weapon to suffer a mechanical malfunction. // Note that some weapons never jam up 'NEVER_JAMS' and thus are immune to this // effect as current guns have a durability between 5 and 9 this results in - // a chance of mechanical failure between 1/64 and 1/1024 on any given shot. - // the malfunction may cause damage, but never enough to push the weapon beyond 'shattered' - } else if( ( one_in( 2 << effective_durability ) ) && !it.has_flag( "NEVER_JAMS" ) ) { + // a chance of mechanical failure between 1/(64*3) and 1/(1024*3) on any given shot. + // the malfunction can't cause damage + } else if( one_in( ( 2 << effective_durability ) * 3 ) && !it.has_flag( "NEVER_JAMS" ) ) { add_msg_player_or_npc( _( "Your %s malfunctions!" ), _( "'s %s malfunctions!" ), it.tname() ); - if( it.damage() < it.max_damage() && one_in( 4 * effective_durability ) ) { - add_msg_player_or_npc( m_bad, _( "Your %s is damaged by the mechanical malfunction!" ), - _( "'s %s is damaged by the mechanical malfunction!" ), - it.tname() ); - // Don't increment until after the message - it.inc_damage(); - } - return false; - // Here we check for a chance for the weapon to suffer a misfire due to - // using OEM bullets. Note that these misfires cause no damage to the weapon and - // some types of ammunition are immune to this effect via the NEVER_MISFIRES effect. - } else if( !curammo_effects.count( "NEVER_MISFIRES" ) && one_in( 1728 ) ) { - add_msg_player_or_npc( _( "Your %s misfires with a dry click!" ), - _( "'s %s misfires with a dry click!" ), - it.tname() ); return false; // Here we check for a chance for the weapon to suffer a misfire due to // using player-made 'RECYCLED' bullets. Note that not all forms of - // player-made ammunition have this effect the misfire may cause damage, but never - // enough to push the weapon beyond 'shattered'. + // player-made ammunition have this effect. } else if( curammo_effects.count( "RECYCLED" ) && one_in( 256 ) ) { add_msg_player_or_npc( _( "Your %s misfires with a muffled click!" ), _( "'s %s misfires with a muffled click!" ), it.tname() ); - if( it.damage() < it.max_damage() && one_in( effective_durability ) ) { - add_msg_player_or_npc( m_bad, _( "Your %s is damaged by the misfired round!" ), - _( "'s %s is damaged by the misfired round!" ), - it.tname() ); - // Don't increment until after the message - it.inc_damage(); - } return false; // Here we check for a chance for attached mods to get damaged if they are flagged as 'CONSUMABLE'. // This is mostly for crappy handmade expedient stuff or things that rarely receive damage during normal usage. @@ -255,27 +240,44 @@ bool player::handle_gun_damage( item &it ) } } } - if( curammo_effects.count( "BLACKPOWDER" ) ) { - if( !it.faults.count( fault_gun_blackpowder ) && - it.faults_potential().count( fault_gun_blackpowder ) ) { - it.faults.insert( fault_gun_blackpowder ); + if( !curammo_effects.count( "NON-FOULING" ) && !it.has_flag( "NON-FOULING" ) ) { + if( curammo_effects.count( "BLACKPOWDER" ) ) { + if( ( it.ammo_data()->ammo->recoil < firing->min_cycle_recoil ) && + it.faults_potential().count( fault_gun_chamber_spent ) ) { + add_msg_player_or_npc( m_bad, _( "Your %s fails to cycle!" ), + _( "'s %s fails to cycle!" ), + it.tname() ); + it.faults.insert( fault_gun_chamber_spent ); + // Don't return false in this case; this shot happens, follow-up ones won't. + } + } + // These are the dirtying/fouling mechanics + if( dirt < 10000 ) { + dirtadder = curammo_effects.count( "BLACKPOWDER" ) * ( 200 - ( firing->blackpowder_tolerance * + 2 ) ); + if( dirtadder < 0 ) { + dirtadder = 0; + } + it.set_var( "dirt", std::min( 10000, dirt + dirtadder + 1 ) ); + } + dirt = it.get_var( "dirt", 0 ); + dirt_dbl = static_cast( dirt ); + if( dirt > 0 && !it.faults.count( fault_gun_blackpowder ) ) { + it.faults.insert( fault_gun_dirt ); } - if( ( it.ammo_data()->ammo->recoil < firing->min_cycle_recoil ) && - it.faults_potential().count( fault_gun_chamber_spent ) ) { - add_msg_player_or_npc( m_bad, _( "Your %s fails to cycle!" ), - _( "'s %s fails to cycle!" ), - it.tname() ); - it.faults.insert( fault_gun_chamber_spent ); - // Don't return false in this case; this shot happens, follow-up ones won't. - } - if( one_in( firing->blackpowder_tolerance ) && - it.faults_potential().count( fault_gun_clogged ) ) { - add_msg_player_or_npc( m_bad, _( "Your %s is clogged up with blackpowder fouling!" ), - _( "'s %s is clogged up with blackpowder fouling!" ), - it.tname() ); - it.faults.insert( fault_gun_clogged ); - // Don't return false in this case; this shot happens, follow-up ones won't. + if( dirt > 0 && curammo_effects.count( "BLACKPOWDER" ) ) { + it.faults.erase( fault_gun_dirt ); + it.faults.insert( fault_gun_blackpowder ); } + // end fouling mechanics + } + if( dirt_dbl > 5000 && + x_in_y( dirt_dbl * dirt_dbl * dirt_dbl, 5555555555555 ) ) { + add_msg_player_or_npc( m_bad, _( "Your %s is damaged by the high pressure!" ), + _( "'s %s is damaged by the high pressure!" ), + it.tname() ); + // Don't increment until after the message + it.inc_damage(); } return true; }