From b4c8c724a2df9ab89f0bf8af951592a7609233c5 Mon Sep 17 00:00:00 2001 From: Chaosvolt Date: Thu, 18 Jan 2024 07:52:48 -0600 Subject: [PATCH 01/10] Commit for remote --- src/ballistics.cpp | 2 +- src/map.cpp | 9 +++++++-- src/map.h | 4 +++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/ballistics.cpp b/src/ballistics.cpp index e3b7e7cb75d7..549639fb93fe 100644 --- a/src/ballistics.cpp +++ b/src/ballistics.cpp @@ -211,7 +211,7 @@ dealt_projectile_attack projectile_attack( const projectile &proj_arg, const tri map &here = get_map(); double target_size = target_critter != nullptr ? target_critter->ranged_target_size() : - here.ranged_target_size( target_arg ); + here.ranged_target_size( target_arg, range ); projectile_attack_aim aim = projectile_attack_roll( dispersion, range, target_size ); // TODO: move to-hit roll back in here diff --git a/src/map.cpp b/src/map.cpp index 82f1a0aadd1a..ac257cfc9d8a 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -2018,7 +2018,7 @@ bool map::valid_move( const tripoint &from, const tripoint &to, // End of move cost -double map::ranged_target_size( const tripoint &p ) const +double map::ranged_target_size( const tripoint &p, double range ) const { if( impassable( p ) ) { return 1.0; @@ -2028,7 +2028,12 @@ double map::ranged_target_size( const tripoint &p ) const return 0.0; } - // TODO: Handle cases like shrubs, trees, furniture, sandbags... + // Coverage of furniture like sandbags gives X% chance to intercept a shot + // Does not apply if you're adjacent, it's assumed you're firing over it + if( x_in_y( coverage( p ), 100 ) && range > 1 ) { + return 1.0; + } + return 0.1; } diff --git a/src/map.h b/src/map.h index 1dc556763b08..13570ab9ca98 100644 --- a/src/map.h +++ b/src/map.h @@ -603,8 +603,10 @@ class map * Size of map objects at `p` for purposes of ranged combat. * Size is in percentage of tile: if 1.0, all attacks going through tile * should hit map objects on it, if 0.0 there is nothing to be hit (air/water). + * Coverage value of furniture adds a percent chance to intercept shots + * unless shooter is adjacent to it. */ - double ranged_target_size( const tripoint &p ) const; + double ranged_target_size( const tripoint &p, double range ) const; // Sees: /** From 2850466f3d538b5d5b6d3f88fee8546cf96f3f4a Mon Sep 17 00:00:00 2001 From: Chaosvolt Date: Thu, 18 Jan 2024 22:51:24 -0600 Subject: [PATCH 02/10] feat(balance): extend and improve ranged_bash_info to allow taking cover behind furniture --- .../furniture-appliances.json | 118 ++++++++++----- .../furniture-barriers.json | 15 +- .../furniture-decorative.json | 28 ++-- .../furniture-fireplaces.json | 22 +-- .../furniture-graves.json | 16 +- .../furniture-industrial.json | 18 ++- .../furniture-medical.json | 60 +++++--- .../furniture_and_terrain/furniture-migo.json | 30 +++- .../furniture-plumbing.json | 23 ++- .../furniture-recreation.json | 41 +++-- .../furniture_and_terrain/furniture-roof.json | 9 +- .../furniture-seats.json | 29 ++-- .../furniture-signs.json | 11 +- .../furniture-sleep.json | 26 ++-- .../furniture-storage.json | 117 ++++++++------ .../furniture-surfaces.json | 29 ++-- .../furniture-terrains.json | 20 ++- .../furniture-tools.json | 143 ++++++++++++------ src/ballistics.cpp | 4 +- src/map.cpp | 50 +++++- src/map.h | 2 +- src/ranged_aoe.cpp | 3 +- 22 files changed, 546 insertions(+), 268 deletions(-) diff --git a/data/json/furniture_and_terrain/furniture-appliances.json b/data/json/furniture_and_terrain/furniture-appliances.json index a417a1e4b243..b9c3a6b88f51 100644 --- a/data/json/furniture_and_terrain/furniture-appliances.json +++ b/data/json/furniture_and_terrain/furniture-appliances.json @@ -37,7 +37,8 @@ { "item": "hose", "count": [ 0, 2 ] }, { "item": "cu_pipe", "count": [ 1, 4 ] }, { "item": "scrap_copper", "count": [ 0, 2 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 50 } } }, { @@ -77,7 +78,8 @@ { "item": "hose", "count": [ 0, 1 ] }, { "item": "e_scrap", "count": [ 5, 10 ] }, { "item": "plastic_chunk", "count": [ 0, 2 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 50 } } }, { @@ -92,7 +94,7 @@ "coverage": 60, "required_str": 13, "max_volume": "200 L", - "flags": [ "CONTAINER", "PLACE_ITEM", "BLOCKSDOOR", "FLAT_SURF", "MINEABLE" ], + "flags": [ "CONTAINER", "PLACE_ITEM", "BLOCKSDOOR", "FLAT_SURF", "MINEABLE", "TRANSPARENT" ], "deconstruct": { "items": [ { "item": "pipe", "count": 1 }, @@ -121,7 +123,8 @@ { "item": "hose", "count": [ 0, 1 ] }, { "item": "cu_pipe", "count": [ 1, 4 ] }, { "item": "scrap_copper", "count": [ 0, 2 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 50, "block_unaimed_chance": "50%" } } }, { @@ -135,7 +138,7 @@ "coverage": 60, "required_str": 12, "max_volume": "37500 ml", - "flags": [ "CONTAINER", "PLACE_ITEM", "BLOCKSDOOR", "FLAT_SURF", "MINEABLE" ], + "flags": [ "CONTAINER", "PLACE_ITEM", "BLOCKSDOOR", "FLAT_SURF", "MINEABLE", "TRANSPARENT" ], "deconstruct": { "items": [ { "item": "scrap", "count": [ 2, 6 ] }, @@ -161,7 +164,8 @@ { "item": "sheet_metal", "count": [ 1, 4 ] }, { "item": "element", "count": [ 1, 3 ] }, { "item": "cable", "charges": [ 1, 15 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 50, "block_unaimed_chance": "50%" } } }, { @@ -287,7 +291,8 @@ { "item": "light_bulb", "count": [ 0, 2 ] }, { "item": "cable", "charges": [ 1, 4 ] }, { "item": "plastic_chunk", "count": [ 2, 4 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 100, "block_unaimed_chance": "25%" } } }, { @@ -361,7 +366,8 @@ { "item": "scrap_copper", "count": [ 0, 2 ] }, { "item": "glass_shard", "count": [ 2, 4 ] }, { "item": "motor_tiny", "prob": 25 } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 50 } } }, { @@ -505,7 +511,8 @@ { "item": "hose", "count": [ 0, 2 ] }, { "item": "cu_pipe", "count": [ 1, 4 ] }, { "item": "scrap_copper", "count": [ 0, 2 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 50 } } }, { @@ -519,7 +526,7 @@ "coverage": 60, "required_str": 12, "max_volume": "30 L", - "flags": [ "CONTAINER", "PLACE_ITEM", "BLOCKSDOOR", "FLAT_SURF", "MINEABLE" ], + "flags": [ "CONTAINER", "PLACE_ITEM", "BLOCKSDOOR", "FLAT_SURF", "MINEABLE", "TRANSPARENT" ], "deconstruct": { "items": [ { "item": "pipe", "count": 1 }, @@ -547,7 +554,8 @@ { "item": "hose", "count": [ 0, 2 ] }, { "item": "cu_pipe", "count": [ 1, 4 ] }, { "item": "scrap_copper", "count": [ 0, 2 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 50, "block_unaimed_chance": "50%" } } }, { @@ -578,7 +586,8 @@ { "item": "element", "count": [ 1, 3 ] }, { "item": "cable", "charges": [ 1, 3 ] }, { "item": "pilot_light", "count": 1 } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 30, "block_unaimed_chance": "50%" } } }, { @@ -612,7 +621,8 @@ { "item": "pilot_light", "count": 1 }, { "item": "water_faucet", "count": 1 }, { "item": "pot", "count": [ 0, 1 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 30, "block_unaimed_chance": "50%" } } }, { @@ -646,7 +656,8 @@ { "item": "2x4", "count": [ 1, 2 ] }, { "item": "scrap", "count": [ 0, 6 ] }, { "item": "wire", "count": [ 1, 3 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 30, "block_unaimed_chance": "50%" } } }, { @@ -683,7 +694,8 @@ { "item": "chain", "count": [ 1, 3 ] }, { "item": "scrap", "count": [ 10, 20 ] }, { "item": "pipe", "count": [ 1, 3 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 30, "block_unaimed_chance": "50%" } } }, { @@ -761,7 +773,8 @@ { "item": "pipe", "count": 1 }, { "item": "e_scrap", "count": [ 20, 50 ] }, { "item": "cable", "charges": [ 2, 8 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 50 } } }, { @@ -803,7 +816,8 @@ { "item": "sheet_metal", "count": [ 1, 2 ] }, { "item": "cable", "charges": [ 1, 15 ] }, { "item": "scrap_copper", "count": [ 0, 2 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 50 } } }, { @@ -892,10 +906,11 @@ "symbol": ":", "color": "blue_white", "move_cost_mod": -1, - "coverage": 90, + "coverage": 60, "required_str": -1, "active": [ "battery", { "max_stored": 10000 } ], "examine_action": "check_power", + "flags": [ "TRANSPARENT" ], "deconstruct": { "items": [ { "item": "solder_wire", "charges": 20 }, @@ -919,7 +934,8 @@ { "item": "pipe", "count": 1 }, { "item": "cable", "charges": [ 2, 8 ] }, { "item": "small_storage_battery", "count": [ 4, 16 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 16, "block_unaimed_chance": "50%" } } }, { @@ -935,6 +951,7 @@ "required_str": -1, "active": [ "battery", { "max_stored": 50000 } ], "examine_action": "check_power", + "flags": [ "TRANSPARENT" ], "deconstruct": { "items": [ { "item": "solder_wire", "charges": 20 }, @@ -958,7 +975,8 @@ { "item": "pipe", "count": 1 }, { "item": "cable", "charges": [ 2, 8 ] }, { "item": "small_storage_battery", "count": [ 20, 80 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 16, "block_unaimed_chance": "75%" } } }, { @@ -997,7 +1015,8 @@ { "item": "pipe", "count": 1 }, { "item": "cable", "charges": [ 2, 8 ] }, { "item": "small_storage_battery", "count": [ 40, 160 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 16 } } }, { @@ -1012,6 +1031,7 @@ "move_cost_mod": 2, "coverage": 10, "active": [ "battery", { "max_stored": 500 } ], + "flags": [ "TRANSPARENT" ], "deconstruct": { "items": [ { "item": "solder_wire", "charges": 10 }, @@ -1096,9 +1116,10 @@ "symbol": ":", "color": "blue_white", "move_cost_mod": -1, - "coverage": 90, + "coverage": 10, "required_str": -1, "active": [ "charger", { "power": 15 } ], + "flags": [ "TRANSPARENT" ], "deconstruct": { "items": [ { "item": "solder_wire", "charges": 20 }, @@ -1114,10 +1135,8 @@ "sound_fail": "clang!", "items": [ { "item": "solder_wire", "charges": [ 10, 20 ] }, - { "item": "scrap", "count": [ 4, 8 ] }, - { "item": "plastic_chunk", "count": [ 1, 2 ] }, - { "item": "sheet_metal_small", "count": [ 1, 4 ] }, - { "item": "pipe", "count": 1 }, + { "item": "e_scrap", "count": [ 0, 1 ] }, + { "item": "plastic_chunk", "count": [ 0, 1 ] }, { "item": "cable", "charges": [ 2, 8 ] } ] } @@ -1131,6 +1150,7 @@ "description": "A vehicle recharging station connected to building's electric grid, providing higher output than consumer battery chargers.", "symbol": ":", "color": "blue_white", + "coverage": 30, "active": [ "charger", { "power": 600 } ], "deconstruct": { "items": [ @@ -1139,6 +1159,19 @@ { "item": "recharge_station", "count": 1 }, { "item": "power_supply", "count": 1 } ] + }, + "bash": { + "str_min": 16, + "str_max": 40, + "sound": "metal screeching!", + "sound_fail": "clang!", + "items": [ + { "item": "solder_wire", "charges": [ 10, 20 ] }, + { "item": "e_scrap", "count": [ 1, 4 ] }, + { "item": "scrap", "count": [ 1, 4 ] }, + { "item": "cable", "charges": [ 2, 8 ] } + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 40, "block_unaimed_chance": "25%" } } }, { @@ -1210,6 +1243,7 @@ "color": "red", "description": "A vehicle welding rig connected to a electrical grid. Has a soldering iron attached.", "extend": { "crafting_pseudo_item": [ "fake_gridsolderingiron" ] }, + "coverage": 60, "deconstruct": { "items": [ { "item": "solder_wire", "charges": 20 }, @@ -1230,7 +1264,8 @@ { "item": "cable", "charges": [ 1, 4 ] }, { "item": "plastic_chunk", "count": [ 1, 2 ] }, { "item": "frame", "count": [ 0, 1 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 30, "block_unaimed_chance": "50%" } } }, { @@ -1278,6 +1313,7 @@ "symbol": "U", "description": "A vehicle forge rig connected to a electrical grid.", "color": "red", + "coverage": 60, "deconstruct": { "items": [ { "item": "solder_wire", "charges": 20 }, @@ -1297,7 +1333,8 @@ { "item": "scrap", "count": [ 0, 2 ] }, { "item": "cable", "charges": [ 1, 4 ] }, { "item": "element", "count": [ 2, 6 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 30, "block_unaimed_chance": "50%" } } }, { @@ -1452,10 +1489,10 @@ "description": "A multi-function crafting station, with a water purifier, food processor, food dehydrator, vacuum sealer, and hand press for making ammo. Draws power from the electrical grid. If you attempt to craft an item that needs one of the kitchen buddy's functions, it will automatically be selected as a tool.", "color": "blue", "move_cost_mod": -1, - "coverage": 80, + "coverage": 60, "required_str": -1, "crafting_pseudo_item": [ "fake_gridfood_processor", "fake_griddehydrator", "fake_gridvac_sealer", "fake_gridwater_purifier", "press" ], - "flags": [ "BLOCKSDOOR", "MINEABLE", "EASY_DECONSTRUCT" ], + "flags": [ "BLOCKSDOOR", "MINEABLE", "EASY_DECONSTRUCT", "TRANSPARENT" ], "deconstruct": { "items": [ { "item": "solder_wire", "charges": 20 }, { "item": "craftrig", "count": 1 }, { "item": "cable", "charges": 5 } ] }, @@ -1474,7 +1511,8 @@ { "charges": 0, "item": "dehydrator", "prob": 50 }, { "charges": 0, "item": "food_processor", "prob": 50 }, { "charges": 0, "item": "press", "prob": 50 } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 50, "block_unaimed_chance": "50%" } } }, { @@ -1554,6 +1592,7 @@ "description": "A vehicle chemistry lab connected to a electrical grid, combining the functions of a hotplate, electrolysis kit, and chemistry tools.", "color": "blue", "crafting_pseudo_item": [ "fake_oven", "fake_chemistry_set", "fake_gridelectrolysis_kit" ], + "coverage": 60, "deconstruct": { "items": [ { "item": "solder_wire", "charges": 20 }, @@ -1573,7 +1612,8 @@ { "item": "glass_shard", "count": [ 0, 2 ] }, { "item": "cable", "charges": [ 2, 8 ] }, { "item": "frame", "count": [ 0, 1 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 30, "block_unaimed_chance": "50%" } } }, { @@ -1639,7 +1679,8 @@ { "item": "cu_pipe", "count": [ 2, 4 ] }, { "item": "scrap_copper", "count": [ 1, 2 ] }, { "item": "motor_tiny", "prob": 25 } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 50 } } }, { @@ -1744,7 +1785,7 @@ "description": "Abstract furniture. If you see this, something went wrong.", "color": "blue", "move_cost_mod": -1, - "coverage": 50, + "coverage": 30, "required_str": -1, "flags": [ "CONTAINER", "PLACE_ITEM", "BLOCKSDOOR", "MINEABLE", "EASY_DECONSTRUCT" ], "deconstruct": { "items": [ { "item": "minifreezer", "count": 1 } ] }, @@ -1760,7 +1801,8 @@ { "item": "scrap", "count": [ 8, 13 ] }, { "item": "hose", "prob": 50 }, { "item": "motor_tiny", "prob": 25 } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 50, "block_unaimed_chance": "25%" } } }, { @@ -1849,7 +1891,8 @@ { "item": "sheet_metal_small", "count": [ 8, 12 ] }, { "item": "sheet_metal", "count": [ 1, 4 ] }, { "item": "cable", "charges": [ 1, 1 ] } - ] + ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 40, "block_unaimed_chance": "50%" } } }, { @@ -2036,7 +2079,8 @@ { "item": "steel_chunk", "count": [ 1, 6 ] }, { "item": "plut_cell", "charges": [ 0, 3 ] }, { "item": "lead", "charges": [ 12, 18 ] } - ] + ], + "ranged": { "reduction": [ 25, 50 ], "destroy_threshold": 75, "block_unaimed_chance": "50%" } }, "deconstruct": { "items": [ diff --git a/data/json/furniture_and_terrain/furniture-barriers.json b/data/json/furniture_and_terrain/furniture-barriers.json index de325dbcab3c..8959a7354cbf 100644 --- a/data/json/furniture_and_terrain/furniture-barriers.json +++ b/data/json/furniture_and_terrain/furniture-barriers.json @@ -17,7 +17,8 @@ "str_max": 40, "sound": "smash!", "sound_fail": "whump.", - "items": [ { "item": "2x4", "count": [ 2, 6 ] }, { "item": "nail", "charges": [ 4, 8 ] }, { "item": "splinter", "count": 1 } ] + "items": [ { "item": "2x4", "count": [ 2, 6 ] }, { "item": "nail", "charges": [ 4, 8 ] }, { "item": "splinter", "count": 1 } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "25%" } } }, { @@ -49,7 +50,8 @@ "str_max": 60, "sound": "rrrip!", "sound_fail": "whump.", - "items": [ { "item": "bag_canvas", "count": [ 10, 16 ] }, { "item": "material_soil", "charges": [ 40, 48 ] } ] + "items": [ { "item": "bag_canvas", "count": [ 10, 16 ] }, { "item": "material_soil", "charges": [ 40, 48 ] } ], + "ranged": { "reduction": [ 75, 75 ], "destroy_threshold": 75, "block_unaimed_chance": "50%" } } }, { @@ -71,7 +73,8 @@ "sound": "rrrip!", "sound_fail": "whump.", "furn_set": "f_earthbag_half", - "items": [ { "item": "bag_canvas", "count": [ 15, 20 ] }, { "item": "material_soil", "charges": [ 50, 60 ] } ] + "items": [ { "item": "bag_canvas", "count": [ 15, 20 ] }, { "item": "material_soil", "charges": [ 50, 60 ] } ], + "ranged": { "reduction": [ 100, 100 ], "destroy_threshold": 100 } } }, { @@ -120,7 +123,8 @@ "str_max": 60, "sound": "rrrip!", "sound_fail": "whump.", - "items": [ { "item": "bag_canvas", "count": [ 10, 16 ] }, { "item": "material_sand", "charges": [ 800, 960 ] } ] + "items": [ { "item": "bag_canvas", "count": [ 10, 16 ] }, { "item": "material_sand", "charges": [ 800, 960 ] } ], + "ranged": { "reduction": [ 75, 75 ], "destroy_threshold": 75, "block_unaimed_chance": "50%" } } }, { @@ -141,7 +145,8 @@ "sound": "rrrip!", "sound_fail": "whump.", "furn_set": "f_sandbag_half", - "items": [ { "item": "bag_canvas", "count": [ 15, 20 ] }, { "item": "material_sand", "charges": [ 1000, 1200 ] } ] + "items": [ { "item": "bag_canvas", "count": [ 15, 20 ] }, { "item": "material_sand", "charges": [ 1000, 1200 ] } ], + "ranged": { "reduction": [ 100, 100 ], "destroy_threshold": 100 } } } ] diff --git a/data/json/furniture_and_terrain/furniture-decorative.json b/data/json/furniture_and_terrain/furniture-decorative.json index 6d6045d645cb..254709865f40 100644 --- a/data/json/furniture_and_terrain/furniture-decorative.json +++ b/data/json/furniture_and_terrain/furniture-decorative.json @@ -17,7 +17,8 @@ "sound_fail": "whack!", "sound_vol": 16, "furn_set": "f_bigmirror_b", - "items": [ { "item": "glass_shard", "count": [ 3, 6 ] } ] + "items": [ { "item": "glass_shard", "count": [ 3, 6 ] } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 5 } } }, { @@ -36,7 +37,8 @@ "str_max": 30, "sound": "metal screeching!", "sound_fail": "clang!", - "items": [ { "item": "scrap", "count": [ 2, 4 ] } ] + "items": [ { "item": "scrap", "count": [ 2, 4 ] } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 30 } } }, { @@ -50,11 +52,12 @@ "coverage": 30, "required_str": 0, "bash": { - "str_min": 80, + "str_min": 50, "str_max": 200, "sound": "metal screeching!", "sound_fail": "clang!", - "items": [ { "item": "steel_chunk", "count": [ 5, 10 ] } ] + "items": [ { "item": "steel_chunk", "count": [ 5, 10 ] } ], + "ranged": { "reduction": [ 25, 50 ], "destroy_threshold": 200, "block_unaimed_chance": "25%" } }, "flags": [ "TRANSPARENT", "MOUNTABLE", "SHORT" ] }, @@ -70,11 +73,12 @@ "coverage": 30, "required_str": 0, "bash": { - "str_min": 80, + "str_min": 50, "str_max": 200, "sound": "metal screeching!", "sound_fail": "clang!", - "items": [ { "item": "steel_chunk", "count": [ 1, 3 ] } ] + "items": [ { "item": "steel_chunk", "count": [ 1, 3 ] } ], + "ranged": { "reduction": [ 25, 50 ], "destroy_threshold": 200, "block_unaimed_chance": "25%" } }, "flags": [ "TRANSPARENT", "SHORT" ] }, @@ -112,7 +116,8 @@ "str_max": 40, "sound": "smash!", "sound_fail": "thump.", - "items": [ { "item": "rock", "count": [ 1, 6 ] } ] + "items": [ { "item": "rock", "count": [ 1, 6 ] } ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 30, "block_unaimed_chance": "50%" } } }, { @@ -123,7 +128,7 @@ "symbol": "@", "color": "brown", "move_cost_mod": 2, - "coverage": 40, + "coverage": 30, "required_str": 5, "flags": [ "PLACE_ITEM", "TRANSPARENT", "FLAMMABLE" ], "bash": { @@ -131,7 +136,8 @@ "str_max": 40, "sound": "smash!", "sound_fail": "whump.", - "items": [ { "item": "splinter", "count": [ 9, 12 ] } ] + "items": [ { "item": "splinter", "count": [ 9, 12 ] } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "25%" } } }, { @@ -142,6 +148,7 @@ "symbol": "o", "color": "light_gray", "move_cost_mod": -1, + "coverage": 30, "required_str": 10, "flags": [ "PLACE_ITEM", "BLOCKSDOOR", "MINEABLE", "LIQUIDCONT" ], "bash": { @@ -149,7 +156,8 @@ "str_max": 40, "sound": "smash!", "sound_fail": "thump.", - "items": [ { "item": "rock", "count": [ 1, 6 ] }, { "item": "rebar", "count": [ 1, 2 ] } ] + "items": [ { "item": "rock", "count": [ 1, 6 ] }, { "item": "rebar", "count": [ 1, 2 ] } ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 15, "block_unaimed_chance": "25%" } } }, { diff --git a/data/json/furniture_and_terrain/furniture-fireplaces.json b/data/json/furniture_and_terrain/furniture-fireplaces.json index f841fd143e41..35743bac7742 100644 --- a/data/json/furniture_and_terrain/furniture-fireplaces.json +++ b/data/json/furniture_and_terrain/furniture-fireplaces.json @@ -7,16 +7,17 @@ "description": "Ah. The relaxation of sitting in front of a fire as the world around you crumbles. Towards the End, you could also get this service on your television.", "bgcolor": "white", "move_cost_mod": 2, - "coverage": 50, + "coverage": 90, "required_str": -1, "flags": [ "TRANSPARENT", "CONTAINER", "FIRE_CONTAINER", "SUPPRESS_SMOKE", "PLACE_ITEM", "MINEABLE" ], "examine_action": "fireplace", "bash": { - "str_min": 30, + "str_min": 50, "str_max": 210, "sound": "crash!", "sound_fail": "whump!", - "items": [ { "item": "rock", "count": [ 15, 30 ] } ] + "items": [ { "item": "rock", "count": [ 15, 30 ] } ], + "ranged": { "reduction": [ 40, 80 ], "destroy_threshold": 80, "block_unaimed_chance": "75%" } } }, { @@ -37,7 +38,8 @@ "str_max": 30, "sound": "metal screeching!", "sound_fail": "clang!", - "items": [ { "item": "scrap", "count": [ 3, 6 ] }, { "item": "pipe", "prob": 50 } ] + "items": [ { "item": "scrap", "count": [ 3, 6 ] }, { "item": "pipe", "prob": 50 } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 30, "block_unaimed_chance": "50%" } }, "deconstruct": { "items": [ { "item": "metal_tank", "count": 1 }, { "item": "pipe", "count": 1 } ] } }, @@ -63,7 +65,8 @@ { "item": "scrap", "count": [ 5, 15 ] }, { "item": "steel_chunk", "count": [ 2, 6 ] }, { "item": "sheet_metal_small", "count": [ 2, 6 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 30, "block_unaimed_chance": "25%" } } }, { @@ -74,7 +77,6 @@ "symbol": "#", "color": "red", "move_cost_mod": 2, - "coverage": 35, "required_str": 4, "flags": [ "PLACE_ITEM", "TRANSPARENT", "FIRE_CONTAINER", "EASY_DECONSTRUCT" ], "deployed_item": "hobo_stove", @@ -101,7 +103,7 @@ "color": "red", "looks_like": "55gal_drum", "move_cost_mod": 2, - "coverage": 35, + "coverage": 60, "required_str": 8, "flags": [ "PLACE_ITEM", "TRANSPARENT", "FIRE_CONTAINER", "EASY_DECONSTRUCT" ], "deployed_item": "55gal_firebarrel", @@ -115,7 +117,8 @@ { "item": "scrap", "count": [ 8, 20 ] }, { "item": "sheet_metal_small", "count": [ 3, 10 ] }, { "item": "sheet_metal", "count": [ 0, 1 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 30, "block_unaimed_chance": "50%" } } }, { @@ -141,7 +144,8 @@ { "item": "scrap", "count": [ 4, 10 ] }, { "item": "sheet_metal_small", "count": [ 2, 5 ] }, { "item": "sheet_metal", "count": [ 0, 1 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 30, "block_unaimed_chance": "25%" } } }, { diff --git a/data/json/furniture_and_terrain/furniture-graves.json b/data/json/furniture_and_terrain/furniture-graves.json index 0e5a1893e744..a12564b517eb 100644 --- a/data/json/furniture_and_terrain/furniture-graves.json +++ b/data/json/furniture_and_terrain/furniture-graves.json @@ -16,7 +16,8 @@ "str_max": 40, "sound": "smash!", "sound_fail": "thump.", - "items": [ { "item": "rock", "count": [ 2, 7 ] } ] + "items": [ { "item": "rock", "count": [ 2, 7 ] } ], + "ranged": { "reduction": [ 20, 40 ], "destroy_threshold": 40, "block_unaimed_chance": "25%" } } }, { @@ -27,6 +28,7 @@ "symbol": "_", "color": "light_gray", "move_cost_mod": 0, + "coverage": 30, "required_str": -1, "crafting_pseudo_item": "boulder_anvil", "flags": [ "MINEABLE", "TRANSPARENT", "SHORT", "NOCOLLIDE", "ALLOW_FIELD_EFFECT", "MOUNTABLE", "PLACE_ITEM" ], @@ -35,7 +37,8 @@ "str_max": 150, "sound": "crash!", "sound_fail": "thump!", - "items": [ { "item": "rock", "count": [ 2, 4 ] } ] + "items": [ { "item": "rock", "count": [ 2, 4 ] } ], + "ranged": { "reduction": [ 40, 80 ], "destroy_threshold": 80, "block_unaimed_chance": "25%" } } }, { @@ -55,7 +58,8 @@ "str_max": 160, "sound": "crash!", "sound_fail": "thump!", - "items": [ { "item": "rock", "count": [ 8, 14 ] } ] + "items": [ { "item": "rock", "count": [ 8, 14 ] } ], + "ranged": { "reduction": [ 50, 100 ], "destroy_threshold": 100, "block_unaimed_chance": "50%" } } }, { @@ -74,7 +78,8 @@ "str_max": 120, "sound": "crash!", "sound_fail": "thump!", - "items": [ { "item": "rock", "count": [ 5, 10 ] } ] + "items": [ { "item": "rock", "count": [ 5, 10 ] } ], + "ranged": { "reduction": [ 30, 60 ], "destroy_threshold": 60, "block_unaimed_chance": "25%" } } }, { @@ -93,7 +98,8 @@ "str_max": 180, "sound": "crash!", "sound_fail": "thunk!", - "items": [ { "item": "rock", "count": [ 18, 30 ] } ] + "items": [ { "item": "rock", "count": [ 18, 30 ] } ], + "ranged": { "reduction": [ 60, 120 ], "destroy_threshold": 120 } } } ] diff --git a/data/json/furniture_and_terrain/furniture-industrial.json b/data/json/furniture_and_terrain/furniture-industrial.json index 541c7aeb2440..6b54e191ebc1 100644 --- a/data/json/furniture_and_terrain/furniture-industrial.json +++ b/data/json/furniture_and_terrain/furniture-industrial.json @@ -10,6 +10,7 @@ "move_cost_mod": -1, "coverage": 35, "required_str": -1, + "flags": [ "TRANSPARENT" ], "bash": { "str_min": 40, "str_max": 150, @@ -25,7 +26,8 @@ { "item": "amplifier", "count": [ 1, 2 ] }, { "item": "plastic_chunk", "count": [ 10, 12 ] }, { "item": "scrap", "count": [ 6, 8 ] } - ] + ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 150, "block_unaimed_chance": "25%" } }, "deconstruct": { "items": [ @@ -53,6 +55,7 @@ "move_cost_mod": -1, "coverage": 40, "required_str": 16, + "flags": [ "TRANSPARENT" ], "bash": { "str_min": 40, "str_max": 150, @@ -64,7 +67,8 @@ { "item": "metal_tank_little", "count": [ 0, 2 ] }, { "item": "jerrycan", "count": [ 0, 2 ] }, { "item": "metal_tank", "count": [ 0, 2 ] } - ] + ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 150, "block_unaimed_chance": "25%" } }, "deconstruct": { "items": [ @@ -86,6 +90,7 @@ "symbol": "&", "bgcolor": "yellow", "move_cost_mod": 3, + "coverage": 30, "required_str": 18, "flags": [ "TRANSPARENT", "MOUNTABLE" ], "deconstruct": { @@ -117,7 +122,8 @@ { "item": "sheet_metal", "prob": 30 }, { "item": "scrap", "count": [ 2, 5 ] }, { "item": "motor", "prob": 30 } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 45, "block_unaimed_chance": "25%" } } }, { @@ -149,7 +155,8 @@ { "item": "steel_lump", "count": [ 120, 240 ] }, { "item": "steel_chunk", "count": [ 120, 240 ] }, { "item": "scrap", "count": [ 120, 240 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 75, "block_unaimed_chance": "75%" } } }, { @@ -200,7 +207,8 @@ { "item": "amplifier", "prob": 40 }, { "item": "plastic_chunk", "count": [ 2, 8 ] }, { "item": "scrap", "count": [ 3, 8 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 80, "block_unaimed_chance": "50%" } } } ] diff --git a/data/json/furniture_and_terrain/furniture-medical.json b/data/json/furniture_and_terrain/furniture-medical.json index def9837696ca..4440e0f62328 100644 --- a/data/json/furniture_and_terrain/furniture-medical.json +++ b/data/json/furniture_and_terrain/furniture-medical.json @@ -22,7 +22,7 @@ ] }, "bash": { - "str_min": 8, + "str_min": 16, "str_max": 150, "sound": "crunch!", "sound_fail": "whack!", @@ -37,7 +37,8 @@ { "item": "amplifier", "prob": 25 }, { "item": "plastic_chunk", "count": [ 4, 10 ], "prob": 50 }, { "item": "scrap", "count": [ 2, 6 ], "prob": 50 } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 75, "block_unaimed_chance": "25%" } } }, { @@ -65,7 +66,8 @@ { "item": "nail", "charges": [ 3, 8 ] }, { "item": "splinter", "count": [ 1, 2 ] }, { "item": "rag", "count": [ 20, 30 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 20, "block_unaimed_chance": "25%" } } }, { @@ -104,7 +106,8 @@ { "item": "hose", "count": [ 0, 2 ] }, { "item": "cu_pipe", "count": [ 1, 4 ] }, { "item": "scrap_copper", "count": [ 0, 2 ] } - ] + ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 40, "block_unaimed_chance": "50%" } } }, { @@ -149,7 +152,8 @@ { "item": "cu_pipe", "count": [ 2, 4 ] }, { "item": "scrap_copper", "count": [ 1, 2 ] }, { "item": "motor_tiny", "prob": 25 } - ] + ], + "ranged": { "reduction": [ 25, 50 ], "destroy_threshold": 80 } } }, { @@ -188,7 +192,8 @@ { "item": "pipe", "count": 1 }, { "item": "cable", "charges": [ 1, 3 ] }, { "item": "cu_pipe", "count": 1 } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 80, "block_unaimed_chance": "50%" } }, "examine_action": "workbench", "workbench": { "multiplier": 1.15, "mass": "300 kg", "volume": "100L" } @@ -237,7 +242,8 @@ { "item": "pipe", "count": 1 }, { "item": "glass_shard", "count": [ 3, 6 ] }, { "item": "cable", "charges": [ 1, 2 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 60, "block_unaimed_chance": "25%" } } }, { @@ -276,7 +282,8 @@ { "item": "sheet_metal", "count": [ 1, 4 ] }, { "item": "element", "count": [ 1, 3 ] }, { "item": "cable", "charges": [ 1, 15 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 60, "block_unaimed_chance": "25%" } } }, { @@ -379,7 +386,8 @@ { "item": "hose", "count": [ 0, 1 ] }, { "item": "e_scrap", "count": [ 5, 10 ] }, { "item": "plastic_chunk", "count": [ 0, 2 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 50, "block_unaimed_chance": "25%" } } }, { @@ -424,7 +432,8 @@ { "item": "hose", "count": [ 0, 1 ] }, { "item": "e_scrap", "count": [ 5, 10 ] }, { "item": "plastic_chunk", "count": [ 0, 2 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 70, "block_unaimed_chance": "25%" } } }, { @@ -465,7 +474,8 @@ { "item": "cable", "charges": [ 1, 15 ] }, { "item": "e_scrap", "count": [ 5, 10 ] }, { "item": "plastic_chunk", "count": [ 0, 2 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 70, "block_unaimed_chance": "25%" } } }, { @@ -505,7 +515,8 @@ { "item": "cable", "charges": [ 1, 15 ] }, { "item": "e_scrap", "count": [ 5, 10 ] }, { "item": "plastic_chunk", "count": [ 0, 2 ] } - ] + ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 70, "block_unaimed_chance": "50%" } } }, { @@ -516,6 +527,7 @@ "symbol": "I", "bgcolor": "white", "move_cost_mod": -1, + "coverage": 90, "required_str": -1, "looks_like": "t_machinery_electronic", "deconstruct": { @@ -544,7 +556,8 @@ { "item": "cable", "charges": [ 1, 15 ] }, { "item": "e_scrap", "count": [ 5, 10 ] }, { "item": "plastic_chunk", "count": [ 0, 2 ] } - ] + ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 70, "block_unaimed_chance": "75%" } } }, { @@ -585,7 +598,8 @@ { "item": "cable", "charges": [ 1, 15 ] }, { "item": "e_scrap", "count": [ 5, 10 ] }, { "item": "plastic_chunk", "count": [ 0, 2 ] } - ] + ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 80, "block_unaimed_chance": "50%" } } }, { @@ -626,7 +640,8 @@ { "item": "cable", "charges": [ 1, 15 ] }, { "item": "e_scrap", "count": [ 5, 10 ] }, { "item": "plastic_chunk", "count": [ 0, 2 ] } - ] + ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 80, "block_unaimed_chance": "50%" } } }, { @@ -661,7 +676,8 @@ { "item": "sheet_metal_small", "count": [ 8, 12 ] }, { "item": "sheet_metal", "count": [ 1, 2 ] }, { "item": "plastic_chunk", "count": [ 5, 10 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 50, "block_unaimed_chance": "25%" } } }, { @@ -707,7 +723,8 @@ { "item": "hose", "count": [ 0, 1 ] }, { "item": "e_scrap", "count": [ 5, 10 ] }, { "item": "plastic_chunk", "count": [ 0, 2 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 50, "block_unaimed_chance": "25%" } } }, { @@ -751,7 +768,8 @@ { "item": "hose", "count": [ 0, 1 ] }, { "item": "e_scrap", "count": [ 5, 10 ] }, { "item": "plastic_chunk", "count": [ 0, 2 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 50, "block_unaimed_chance": "50%" } } }, { @@ -795,7 +813,8 @@ { "item": "hose", "count": [ 0, 1 ] }, { "item": "e_scrap", "count": [ 5, 10 ] }, { "item": "plastic_chunk", "count": [ 0, 2 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 50, "block_unaimed_chance": "25%" } } }, { @@ -899,7 +918,8 @@ { "item": "steel_chunk", "count": [ 0, 3 ] }, { "item": "sheet_metal", "count": [ 1, 3 ] }, { "item": "cable", "charges": [ 1, 15 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 20, "block_unaimed_chance": "25%" } } } ] diff --git a/data/json/furniture_and_terrain/furniture-migo.json b/data/json/furniture_and_terrain/furniture-migo.json index 4c4e23cb4f3a..8bf5d18adca1 100644 --- a/data/json/furniture_and_terrain/furniture-migo.json +++ b/data/json/furniture_and_terrain/furniture-migo.json @@ -39,7 +39,8 @@ "sound": "splorch!", "sound_fail": "whump!", "furn_set": "f_alien_scar_small", - "items": [ { "item": "fetid_goop", "count": [ 3, 7 ], "prob": 100 } ] + "items": [ { "item": "fetid_goop", "count": [ 3, 7 ], "prob": 100 } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 26, "block_unaimed_chance": "25%" } } }, { @@ -61,7 +62,8 @@ "sound": "splorch!", "sound_fail": "whump!", "furn_set": "f_alien_scar_small", - "items": [ { "item": "fetid_goop", "count": [ 15, 25 ], "prob": 100 } ] + "items": [ { "item": "fetid_goop", "count": [ 15, 25 ], "prob": 100 } ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 60, "block_unaimed_chance": "25%" } } }, { @@ -97,7 +99,8 @@ "str_max": 600, "sound": "splorch!", "sound_fail": "splat!", - "items": [ { "item": "fetid_goop", "count": [ 6, 13 ], "prob": 100 } ] + "items": [ { "item": "fetid_goop", "count": [ 6, 13 ], "prob": 100 } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 300, "block_unaimed_chance": "25%" } } }, { @@ -139,7 +142,8 @@ "str_max": 40, "sound": "splorch!", "sound_fail": "whump.", - "items": [ { "item": "fetid_goop", "count": [ 5, 10 ], "prob": 100 }, { "group": "migo_pod_storage", "prob": 50 } ] + "items": [ { "item": "fetid_goop", "count": [ 5, 10 ], "prob": 100 }, { "group": "migo_pod_storage", "prob": 50 } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "25%" } } }, { @@ -160,7 +164,8 @@ "str_max": 40, "sound": "splorch!", "sound_fail": "whump.", - "items": [ { "group": "migo_pod_samples", "prob": 75, "count": [ 1, 2 ] } ] + "items": [ { "group": "migo_pod_samples", "prob": 75, "count": [ 1, 2 ] } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "25%" } } }, { @@ -180,7 +185,8 @@ "str_max": 40, "sound": "splorch!", "sound_fail": "whump.", - "items": [ { "item": "alien_pod_resin", "count": [ 1, 2 ] } ] + "items": [ { "item": "alien_pod_resin", "count": [ 1, 2 ] } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "25%" } } }, { @@ -195,7 +201,14 @@ "required_str": -1, "light_emitted": 12, "flags": [ "TRANSPARENT" ], - "bash": { "str_min": 45, "str_max": 60, "sound": "splorch!", "sound_fail": "whump.", "furn_set": "f_alien_scar" } + "bash": { + "str_min": 45, + "str_max": 60, + "sound": "splorch!", + "sound_fail": "whump.", + "furn_set": "f_alien_scar", + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 60, "block_unaimed_chance": "25%" } + } }, { "type": "furniture", @@ -218,7 +231,8 @@ "sound": "splorch!", "sound_fail": "whump!", "furn_set": "f_alien_scar", - "items": [ { "item": "fetid_goop", "count": [ 3, 5 ], "prob": 100 } ] + "items": [ { "item": "fetid_goop", "count": [ 3, 5 ], "prob": 100 } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "25%" } } } ] diff --git a/data/json/furniture_and_terrain/furniture-plumbing.json b/data/json/furniture_and_terrain/furniture-plumbing.json index be94550a0708..0ea4f88b4854 100644 --- a/data/json/furniture_and_terrain/furniture-plumbing.json +++ b/data/json/furniture_and_terrain/furniture-plumbing.json @@ -22,7 +22,8 @@ { "item": "cu_pipe", "prob": 50 }, { "item": "water_faucet", "prob": 50 }, { "item": "ceramic_shard", "count": [ 6, 18 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 12, "block_unaimed_chance": "25%" } } }, { @@ -48,7 +49,8 @@ { "item": "scrap_copper", "count": [ 0, 2 ] }, { "item": "ceramic_shard", "count": [ 2, 6 ] }, { "item": "glass_shard", "count": [ 1, 2 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 6, "block_unaimed_chance": "25%" } } }, { @@ -59,7 +61,7 @@ "description": "Emergency relief provider. Water isn't running, so it's basically useless.", "color": "white", "move_cost_mod": 2, - "coverage": 60, + "coverage": 45, "required_str": -1, "flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "CONTAINER", "PLACE_ITEM", "MOUNTABLE" ], "bash": { @@ -71,7 +73,8 @@ { "item": "cu_pipe", "prob": 50 }, { "item": "water_faucet", "prob": 50 }, { "item": "ceramic_shard", "count": [ 2, 8 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 8, "block_unaimed_chance": "25%" } } }, { @@ -91,7 +94,8 @@ "str_max": 30, "sound": "porcelain breaking!", "sound_fail": "whunk!", - "items": [ { "item": "cu_pipe", "prob": 50 }, { "item": "ceramic_shard", "count": [ 2, 8 ] }, { "item": "wax", "count": 1 } ] + "items": [ { "item": "cu_pipe", "prob": 50 }, { "item": "ceramic_shard", "count": [ 2, 8 ] }, { "item": "wax", "count": 1 } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 8, "block_unaimed_chance": "25%" } } }, { @@ -112,7 +116,8 @@ "str_max": 30, "sound": "reality shattering!", "sound_fail": "whunk!", - "items": [ { "item": "cu_pipe", "prob": 50 }, { "item": "sheet_metal", "count": [ 2, 8 ] }, { "item": "pipe", "count": 1 } ] + "items": [ { "item": "cu_pipe", "prob": 50 }, { "item": "sheet_metal", "count": [ 2, 8 ] }, { "item": "pipe", "count": 1 } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 30, "block_unaimed_chance": "25%" } } }, { @@ -158,7 +163,8 @@ { "item": "cu_pipe", "count": [ 1, 4 ] }, { "item": "scrap_copper", "count": [ 0, 2 ] }, { "item": "water_faucet", "count": [ 0, 1 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 50, "block_unaimed_chance": "50%" } } }, { @@ -237,7 +243,8 @@ { "item": "e_scrap", "count": [ 5, 10 ] }, { "item": "plastic_chunk", "count": [ 0, 2 ] }, { "item": "cu_pipe", "count": [ 1, 3 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 50, "block_unaimed_chance": "25%" } } } ] diff --git a/data/json/furniture_and_terrain/furniture-recreation.json b/data/json/furniture_and_terrain/furniture-recreation.json index 93e83819b6bf..0949995205af 100644 --- a/data/json/furniture_and_terrain/furniture-recreation.json +++ b/data/json/furniture_and_terrain/furniture-recreation.json @@ -28,7 +28,8 @@ { "item": "steel_chunk", "prob": 50 }, { "item": "pipe", "count": 1 }, { "item": "lead", "charges": [ 1000, 2000 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 60, "block_unaimed_chance": "25%" } } }, { @@ -78,7 +79,8 @@ { "item": "nail", "charges": [ 4, 12 ] }, { "item": "splinter", "count": 1 }, { "item": "felt_patch", "count": [ 0, 2 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 50, "block_unaimed_chance": "50%" } } }, { @@ -107,15 +109,17 @@ "symbol": "@", "color": "black", "move_cost_mod": 2, - "coverage": 40, + "coverage": 60, "required_str": 5, - "flags": [ "PLACE_ITEM", "TRANSPARENT" ], + "flags": [ "PLACE_ITEM", "TRANSPARENT", "EASY_DECONSTRUCT" ], + "deconstruct": { "items": [ { "item": "steel_plate", "count": 1 }, { "item": "pipe", "count": 4 } ] }, "bash": { "str_min": 6, "str_max": 40, - "sound": "smash!", - "sound_fail": "whump.", - "items": [ { "item": "sheet_metal_small", "count": [ 3, 7 ] }, { "item": "pipe", "count": [ 1, 3 ] } ] + "sound": "clang!", + "sound_fail": "ting.", + "items": [ { "item": "steel_plate", "count": 1 }, { "item": "pipe", "count": [ 1, 3 ] } ], + "ranged": { "reduction": [ 40, 40 ], "destroy_threshold": 40, "block_unaimed_chance": "50%" } } }, { @@ -155,7 +159,8 @@ { "item": "circuit", "count": [ 0, 4 ] }, { "item": "power_supply", "prob": 50 }, { "item": "RAM", "count": [ 0, 2 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 35, "block_unaimed_chance": "50%" } } }, { @@ -166,7 +171,7 @@ "symbol": "7", "color": "red", "move_cost_mod": -1, - "coverage": 35, + "coverage": 75, "required_str": 8, "flags": [ "BLOCKSDOOR", "TRANSPARENT" ], "deconstruct": { @@ -202,7 +207,8 @@ { "item": "glass_shard", "count": [ 1, 3 ] }, { "item": "plastic_chunk", "count": [ 1, 3 ] }, { "item": "bearing", "charges": [ 0, 16 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "50%" } } }, { @@ -307,7 +313,8 @@ { "item": "chain", "count": [ 1, 3 ] }, { "item": "leather", "count": [ 4, 12 ] }, { "item": "rag", "count": [ 4, 18 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 20, "block_unaimed_chance": "50%" } } }, { @@ -344,7 +351,8 @@ { "item": "nail", "charges": [ 6, 12 ] }, { "item": "splinter", "count": 1 }, { "item": "plastic_chunk", "count": [ 1, 5 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "50%" } } }, { @@ -383,7 +391,8 @@ { "item": "cable", "charges": [ 1, 3 ] }, { "item": "e_scrap", "prob": 25 }, { "item": "plastic_chunk", "count": [ 0, 1 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 20, "block_unaimed_chance": "50%" } } }, { @@ -443,7 +452,8 @@ { "item": "splinter", "count": 1 }, { "item": "felt_patch", "count": [ 0, 2 ] }, { "item": "scrap", "count": [ 0, 1 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 50, "block_unaimed_chance": "50%" } } }, { @@ -484,7 +494,8 @@ { "item": "plastic_chunk", "count": [ 1, 6 ] }, { "item": "steel_chunk", "count": [ 1, 4 ] }, { "item": "cable", "count": [ 1, 3 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40 } } } ] diff --git a/data/json/furniture_and_terrain/furniture-roof.json b/data/json/furniture_and_terrain/furniture-roof.json index b9f6e25c30d3..e0d8f1f29d87 100644 --- a/data/json/furniture_and_terrain/furniture-roof.json +++ b/data/json/furniture_and_terrain/furniture-roof.json @@ -69,7 +69,8 @@ "str_max": 25, "sound": "whack!", "sound_fail": "whump!", - "items": [ { "item": "brick", "count": [ 5, 30 ] }, { "item": "scrap", "count": [ 3, 6 ] } ] + "items": [ { "item": "brick", "count": [ 5, 30 ] }, { "item": "scrap", "count": [ 3, 6 ] } ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 20, "block_unaimed_chance": "25%" } } }, { @@ -114,7 +115,8 @@ "str_max": 15, "sound": "whack!", "sound_fail": "whump!", - "items": [ { "item": "pipe", "count": [ 1, 2 ] }, { "item": "scrap", "count": [ 1, 3 ] } ] + "items": [ { "item": "pipe", "count": [ 1, 2 ] }, { "item": "scrap", "count": [ 1, 3 ] } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 15, "block_unaimed_chance": "25%" } } }, { @@ -134,7 +136,8 @@ "str_max": 12, "sound": "whack!", "sound_fail": "clang!", - "items": [ { "item": "sheet_metal_small", "count": [ 1, 5 ] }, { "item": "scrap", "count": [ 3, 6 ] } ] + "items": [ { "item": "sheet_metal_small", "count": [ 1, 5 ] }, { "item": "scrap", "count": [ 3, 6 ] } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 15, "block_unaimed_chance": "25%" } } } ] diff --git a/data/json/furniture_and_terrain/furniture-seats.json b/data/json/furniture_and_terrain/furniture-seats.json index 8e599a683e31..88a1d00fcff4 100644 --- a/data/json/furniture_and_terrain/furniture-seats.json +++ b/data/json/furniture_and_terrain/furniture-seats.json @@ -19,7 +19,8 @@ "str_max": 40, "sound": "smash!", "sound_fail": "whump.", - "items": [ { "item": "2x4", "count": [ 1, 3 ] }, { "item": "nail", "charges": [ 2, 6 ] }, { "item": "splinter", "count": 1 } ] + "items": [ { "item": "2x4", "count": [ 1, 3 ] }, { "item": "nail", "charges": [ 2, 6 ] }, { "item": "splinter", "count": 1 } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "25%" } } }, { @@ -30,7 +31,7 @@ "description": "A more comfortable way of sitting down.", "color": "green", "move_cost_mod": 1, - "coverage": 45, + "coverage": 60, "comfort": 3, "floor_bedding_warmth": 500, "bonus_fire_warmth_feet": 1000, @@ -47,7 +48,8 @@ { "item": "nail", "charges": [ 2, 6 ] }, { "item": "splinter", "count": 1 }, { "item": "rag", "count": [ 20, 30 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "50%" } } }, { @@ -77,7 +79,8 @@ { "item": "scrap", "charges": [ 2, 6 ] }, { "item": "rag", "count": [ 20, 30 ] }, { "item": "rope_6" } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "25%" } } }, { @@ -100,7 +103,8 @@ "str_max": 20, "sound": "smash!", "sound_fail": "whump.", - "items": [ { "item": "2x4", "count": [ 1, 3 ] }, { "item": "nail", "charges": [ 2, 6 ] }, { "item": "splinter", "count": 1 } ] + "items": [ { "item": "2x4", "count": [ 1, 3 ] }, { "item": "nail", "charges": [ 2, 6 ] }, { "item": "splinter", "count": 1 } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 20, "block_unaimed_chance": "25%" } } }, { @@ -127,7 +131,8 @@ { "item": "nail", "charges": [ 3, 8 ] }, { "item": "splinter", "count": [ 1, 2 ] }, { "item": "rag", "count": [ 20, 30 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "50%" } } }, { @@ -150,7 +155,8 @@ "str_max": 20, "sound": "smash!", "sound_fail": "whump.", - "items": [ { "item": "2x4", "count": 1 }, { "item": "nail", "charges": [ 1, 5 ] }, { "item": "splinter", "count": 3 } ] + "items": [ { "item": "2x4", "count": 1 }, { "item": "nail", "charges": [ 1, 5 ] }, { "item": "splinter", "count": 3 } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 20, "block_unaimed_chance": "25%" } } }, { @@ -193,7 +199,8 @@ "str_max": 40, "sound": "smash!", "sound_fail": "whump.", - "items": [ { "item": "splinter", "count": [ 2, 6 ] } ] + "items": [ { "item": "splinter", "count": [ 2, 6 ] } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "25%" } } }, { @@ -227,7 +234,8 @@ { "item": "splinter", "count": [ 2, 6 ] }, { "item": "nail", "charges": [ 1, 3 ] }, { "item": "rag", "count": [ 5, 10 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "25%" } } }, { @@ -253,7 +261,8 @@ { "item": "scrap", "count": [ 1, 4 ] }, { "item": "sheet_metal", "count": [ 0, 1 ] }, { "item": "pipe", "count": [ 0, 4 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 200, "block_unaimed_chance": "25%" } }, "deconstruct": { "items": [ { "item": "scrap", "count": 3 }, { "item": "sheet_metal", "count": 1 }, { "item": "pipe", "count": 4 } ] } } diff --git a/data/json/furniture_and_terrain/furniture-signs.json b/data/json/furniture_and_terrain/furniture-signs.json index e550b936c5bc..4fd3ccc73a93 100644 --- a/data/json/furniture_and_terrain/furniture-signs.json +++ b/data/json/furniture_and_terrain/furniture-signs.json @@ -21,7 +21,8 @@ { "item": "2x4", "count": [ 0, 3 ] }, { "item": "nail", "charges": [ 4, 6 ] }, { "item": "splinter", "count": [ 1, 4 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "75%" } } }, { @@ -42,7 +43,8 @@ "str_max": 40, "sound": "smash!", "sound_fail": "whump.", - "items": [ { "item": "2x4", "count": [ 1, 2 ] }, { "item": "nail", "charges": [ 2, 4 ] }, { "item": "splinter", "count": 2 } ] + "items": [ { "item": "2x4", "count": [ 1, 2 ] }, { "item": "nail", "charges": [ 2, 4 ] }, { "item": "splinter", "count": 2 } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "25%" } } }, { @@ -55,7 +57,7 @@ "examine_action": "sign", "looks_like": "f_sign", "move_cost_mod": 1, - "coverage": 35, + "coverage": 50, "required_str": -1, "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "SIGN" ], "deconstruct": { "items": [ { "item": "2x4", "count": 3 }, { "item": "nail", "charges": [ 2, 5 ] } ] }, @@ -64,7 +66,8 @@ "str_max": 40, "sound": "smash!", "sound_fail": "whump.", - "items": [ { "item": "2x4", "count": [ 1, 2 ] }, { "item": "nail", "charges": [ 2, 4 ] }, { "item": "splinter", "count": 2 } ] + "items": [ { "item": "2x4", "count": [ 1, 2 ] }, { "item": "nail", "charges": [ 2, 4 ] }, { "item": "splinter", "count": 2 } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "50%" } } } ] diff --git a/data/json/furniture_and_terrain/furniture-sleep.json b/data/json/furniture_and_terrain/furniture-sleep.json index f224a0c7ffce..6951dc0afc1b 100644 --- a/data/json/furniture_and_terrain/furniture-sleep.json +++ b/data/json/furniture_and_terrain/furniture-sleep.json @@ -24,7 +24,8 @@ { "item": "splinter", "count": [ 3, 6 ] }, { "item": "rag", "count": [ 40, 55 ] }, { "item": "scrap", "count": [ 10, 20 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "25%" } } }, { @@ -36,7 +37,7 @@ "description": "A wooden bunk bed with mattresses for two people.", "color": "magenta", "move_cost_mod": 6, - "coverage": 40, + "coverage": 60, "comfort": 5, "floor_bedding_warmth": 1000, "required_str": -1, @@ -53,7 +54,8 @@ { "item": "splinter", "count": [ 8, 15 ] }, { "item": "rag", "count": [ 80, 110 ] }, { "item": "scrap", "count": [ 20, 40 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "50%" } } }, { @@ -65,7 +67,7 @@ "looks_like": "f_bed", "color": "magenta", "move_cost_mod": 8, - "coverage": 40, + "coverage": 80, "comfort": 5, "floor_bedding_warmth": 1000, "required_str": -1, @@ -88,7 +90,8 @@ { "item": "sheet_metal_small", "count": [ 0, 2 ] }, { "item": "rag", "count": [ 120, 160 ] }, { "item": "scrap", "count": [ 60, 100 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 60, "block_unaimed_chance": "75%" } } }, { @@ -112,7 +115,8 @@ { "item": "2x4", "count": [ 5, 8 ] }, { "item": "nail", "charges": [ 6, 8 ] }, { "item": "splinter", "count": [ 3, 6 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "25%" } } }, { @@ -123,7 +127,7 @@ "symbol": "0", "color": "magenta", "move_cost_mod": 3, - "coverage": 40, + "coverage": 20, "comfort": 4, "floor_bedding_warmth": 800, "required_str": 7, @@ -147,7 +151,7 @@ "symbol": "0", "color": "magenta", "move_cost_mod": 3, - "coverage": 40, + "coverage": 20, "comfort": 4, "floor_bedding_warmth": 800, "required_str": 7, @@ -191,7 +195,8 @@ { "item": "nail", "charges": [ 2, 6 ] }, { "item": "splinter", "count": [ 1, 4 ] }, { "item": "rag", "count": [ 20, 30 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 30, "block_unaimed_chance": "25%" } } }, { @@ -217,7 +222,8 @@ { "item": "stick", "count": [ 2, 3 ] }, { "item": "straw_pile", "count": [ 7, 8 ] }, { "item": "splinter", "count": [ 1, 2 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 20, "block_unaimed_chance": "25%" } } } ] diff --git a/data/json/furniture_and_terrain/furniture-storage.json b/data/json/furniture_and_terrain/furniture-storage.json index aa512e999257..696d93c65a1c 100644 --- a/data/json/furniture_and_terrain/furniture-storage.json +++ b/data/json/furniture_and_terrain/furniture-storage.json @@ -21,7 +21,8 @@ { "item": "2x4", "count": [ 2, 6 ] }, { "item": "nail", "charges": [ 4, 12 ] }, { "item": "splinter", "count": [ 5, 10 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40 } } }, { @@ -48,7 +49,8 @@ { "item": "nail", "charges": [ 4, 20 ] }, { "item": "splinter", "count": [ 6, 10 ] }, { "item": "wood_panel", "count": [ 0, 1 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40 } } }, { @@ -94,7 +96,8 @@ { "item": "splinter", "count": [ 2, 6 ] }, { "item": "nail", "charges": [ 2, 10 ] }, { "item": "rag", "count": [ 8, 12 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "25%" } }, "pry": { "success_message": "You wedge open the coffin.", @@ -135,7 +138,8 @@ { "item": "splinter", "count": [ 2, 6 ] }, { "item": "nail", "charges": [ 2, 10 ] }, { "item": "rag", "count": [ 8, 12 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "25%" } } }, { @@ -166,7 +170,8 @@ "str_max": 40, "sound": "smash!", "sound_fail": "wham!", - "items": [ { "item": "2x4", "count": [ 1, 5 ] }, { "item": "nail", "charges": [ 2, 10 ] } ] + "items": [ { "item": "2x4", "count": [ 1, 5 ] }, { "item": "nail", "charges": [ 2, 10 ] } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "50%" } }, "pry": { "success_message": "You pop open the crate.", @@ -194,7 +199,8 @@ "str_max": 40, "sound": "smash!", "sound_fail": "wham!", - "items": [ { "item": "2x4", "count": [ 1, 5 ] }, { "item": "nail", "charges": [ 2, 10 ] } ] + "items": [ { "item": "2x4", "count": [ 1, 5 ] }, { "item": "nail", "charges": [ 2, 10 ] } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "50%" } } }, { @@ -254,7 +260,8 @@ { "item": "2x4", "count": [ 2, 4 ] }, { "item": "nail", "charges": [ 4, 8 ] }, { "item": "splinter", "count": [ 5, 10 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "50%" } } }, { @@ -266,7 +273,7 @@ "description": "A tall storage cabinet with a clear glass window.", "color": "light_gray", "move_cost_mod": -1, - "coverage": 30, + "coverage": 60, "required_str": 8, "flags": [ "PLACE_ITEM", "TRANSPARENT", "BLOCKSDOOR" ], "deconstruct": { @@ -290,7 +297,8 @@ { "item": "nail", "charges": [ 4, 8 ] }, { "item": "glass_shard", "count": [ 1, 10 ] }, { "item": "scrap", "count": [ 0, 2 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "50%" } } }, { @@ -302,7 +310,7 @@ "color": "light_gray", "looks_like": "f_gunsafe_ml", "move_cost_mod": -1, - "coverage": 30, + "coverage": 75, "required_str": 14, "max_volume": "250 L", "close": "f_gunsafe_c", @@ -316,7 +324,8 @@ { "item": "steel_chunk", "count": [ 1, 5 ] }, { "item": "scrap", "count": [ 1, 5 ] }, { "item": "rock", "count": [ 1, 2 ] } - ] + ], + "ranged": { "reduction": [ 40, 80 ], "destroy_threshold": 200, "block_unaimed_chance": "75%" } } }, { @@ -328,7 +337,7 @@ "color": "light_gray", "looks_like": "f_gunsafe_ml", "move_cost_mod": -1, - "coverage": 30, + "coverage": 75, "required_str": 14, "max_volume": "250 L", "open": "f_gunsafe_o", @@ -342,7 +351,8 @@ { "item": "steel_chunk", "count": [ 1, 5 ] }, { "item": "scrap", "count": [ 1, 5 ] }, { "item": "rock", "count": [ 1, 2 ] } - ] + ], + "ranged": { "reduction": [ 40, 80 ], "destroy_threshold": 200, "block_unaimed_chance": "75%" } } }, { @@ -353,7 +363,7 @@ "symbol": "X", "color": "light_gray", "move_cost_mod": -1, - "coverage": 30, + "coverage": 75, "required_str": 14, "max_volume": "250 L", "flags": [ "TRANSPARENT", "CONTAINER", "SEALED", "PLACE_ITEM", "MOUNTABLE", "MINEABLE" ], @@ -370,7 +380,8 @@ { "item": "steel_chunk", "count": [ 1, 5 ] }, { "item": "scrap", "count": [ 1, 5 ] }, { "item": "rock", "count": [ 1, 2 ] } - ] + ], + "ranged": { "reduction": [ 40, 80 ], "destroy_threshold": 200, "block_unaimed_chance": "75%" } } }, { @@ -382,7 +393,7 @@ "symbol": "X", "color": "light_gray", "move_cost_mod": -1, - "coverage": 30, + "coverage": 75, "required_str": 14, "max_volume": "250 L", "flags": [ "TRANSPARENT", "CONTAINER", "SEALED", "PLACE_ITEM", "MOUNTABLE", "MINEABLE" ], @@ -396,7 +407,8 @@ { "item": "steel_chunk", "count": [ 1, 5 ] }, { "item": "scrap", "count": [ 1, 5 ] }, { "item": "rock", "count": [ 1, 2 ] } - ] + ], + "ranged": { "reduction": [ 40, 80 ], "destroy_threshold": 200, "block_unaimed_chance": "75%" } } }, { @@ -408,7 +420,7 @@ "symbol": "X", "color": "light_gray", "move_cost_mod": -1, - "coverage": 30, + "coverage": 75, "required_str": 14, "max_volume": "250 L", "flags": [ "TRANSPARENT", "CONTAINER", "SEALED", "PLACE_ITEM", "MOUNTABLE", "MINEABLE" ], @@ -423,7 +435,8 @@ { "item": "steel_chunk", "count": [ 1, 5 ] }, { "item": "scrap", "count": [ 1, 5 ] }, { "item": "rock", "count": [ 1, 2 ] } - ] + ], + "ranged": { "reduction": [ 40, 80 ], "destroy_threshold": 200, "block_unaimed_chance": "75%" } } }, { @@ -449,7 +462,8 @@ { "item": "scrap", "count": [ 4, 8 ] }, { "item": "sheet_metal_small", "count": [ 4, 8 ] }, { "item": "pipe", "count": [ 0, 1 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40 } } }, { @@ -542,7 +556,8 @@ { "item": "steel_chunk", "count": [ 2, 4 ] }, { "item": "sheet_metal_small", "count": [ 4, 8 ] }, { "item": "pipe", "count": 1 } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 30, "block_unaimed_chance": "50%" } } }, { @@ -564,7 +579,8 @@ "str_max": 40, "sound": "smash!", "sound_fail": "whump.", - "items": [ { "item": "2x4", "count": [ 2, 6 ] }, { "item": "nail", "charges": [ 20, 40 ] }, { "item": "splinter", "count": 12 } ] + "items": [ { "item": "2x4", "count": [ 2, 6 ] }, { "item": "nail", "charges": [ 20, 40 ] }, { "item": "splinter", "count": 12 } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "50%" } } }, { @@ -575,7 +591,7 @@ "symbol": "Y", "color": "brown", "move_cost_mod": -1, - "coverage": 30, + "coverage": 10, "required_str": 4, "flags": [ "TRANSPARENT", "FLAMMABLE", "PLACE_ITEM", "BLOCKSDOOR", "MOUNTABLE" ], "deconstruct": { "items": [ { "item": "nail", "charges": 8 }, { "item": "2x4", "count": 3 } ] }, @@ -605,7 +621,8 @@ "str_max": 30, "sound": "smash!", "sound_fail": "whump.", - "items": [ { "item": "plastic_chunk", "count": [ 2, 7 ] }, { "item": "pipe", "count": [ 1, 2 ] } ] + "items": [ { "item": "plastic_chunk", "count": [ 2, 7 ] }, { "item": "pipe", "count": [ 1, 2 ] } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 30, "block_unaimed_chance": "25%" } } }, { @@ -632,7 +649,8 @@ { "item": "steel_chunk", "count": [ 1, 5 ] }, { "item": "scrap", "count": [ 1, 5 ] }, { "item": "rock", "count": [ 1, 2 ] } - ] + ], + "ranged": { "reduction": [ 40, 80 ], "destroy_threshold": 200, "block_unaimed_chance": "25%" } } }, { @@ -659,7 +677,8 @@ { "item": "steel_chunk", "count": [ 1, 5 ] }, { "item": "scrap", "count": [ 1, 5 ] }, { "item": "rock", "count": [ 1, 2 ] } - ] + ], + "ranged": { "reduction": [ 40, 80 ], "destroy_threshold": 200, "block_unaimed_chance": "25%" } } }, { @@ -685,7 +704,8 @@ { "item": "steel_chunk", "count": [ 1, 5 ] }, { "item": "scrap", "count": [ 1, 5 ] }, { "item": "rock", "count": [ 1, 2 ] } - ] + ], + "ranged": { "reduction": [ 40, 80 ], "destroy_threshold": 200, "block_unaimed_chance": "25%" } } }, { @@ -739,7 +759,8 @@ { "item": "splinter", "count": [ 4, 10 ] }, { "item": "pipe", "count": [ 0, 1 ] }, { "item": "scrap", "count": [ 2, 5 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40 } } }, { @@ -767,7 +788,8 @@ "str_max": 30, "sound": "metal screeching!", "sound_fail": "clang!", - "items": [ { "item": "scrap", "count": [ 0, 6 ] }, { "item": "sheet_metal", "count": [ 0, 4 ] } ] + "items": [ { "item": "scrap", "count": [ 0, 6 ] }, { "item": "sheet_metal", "count": [ 0, 4 ] } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 30, "block_unaimed_chance": "50%" } } }, { @@ -800,7 +822,8 @@ { "item": "plastic_chunk", "count": [ 1, 6 ] }, { "item": "sheet_metal_small", "count": [ 1, 4 ] }, { "item": "pipe", "count": 1 } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 30, "block_unaimed_chance": "50%" } } }, { @@ -818,8 +841,8 @@ "deconstruct": { "items": [ { "item": "pipe", "count": 12 }, { "item": "sheet_metal", "count": 8 } ] }, "max_volume": "3500 L", "bash": { - "str_min": 8, - "str_max": 30, + "str_min": 16, + "str_max": 40, "sound": "metal screeching!", "sound_fail": "clang!", "items": [ @@ -828,7 +851,8 @@ { "item": "steel_chunk", "count": [ 3, 6 ] }, { "item": "sheet_metal_small", "count": [ 4, 8 ] }, { "item": "pipe", "count": 4 } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 40 } } }, { @@ -865,7 +889,8 @@ { "item": "sheet_metal_small", "count": [ 6, 12 ] }, { "item": "scrap", "count": [ 10, 20 ] }, { "item": "splinter", "count": 1 } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 50, "block_unaimed_chance": "50%" } } }, { @@ -888,7 +913,8 @@ "sound_vol": 16, "sound_fail_vol": 12, "furn_set": "f_displaycase_b", - "items": [ { "item": "glass_shard", "count": [ 1, 5 ] } ] + "items": [ { "item": "glass_shard", "count": [ 1, 5 ] } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 5, "block_unaimed_chance": "75%" } } }, { @@ -908,7 +934,8 @@ "str_max": 30, "sound": "crunch!", "sound_fail": "whump.", - "items": [ { "item": "2x4", "count": [ 3, 6 ] }, { "item": "splinter", "count": [ 2, 4 ] } ] + "items": [ { "item": "2x4", "count": [ 3, 6 ] }, { "item": "splinter", "count": [ 2, 4 ] } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 30, "block_unaimed_chance": "25%" } } }, { @@ -930,7 +957,8 @@ "str_max": 20, "sound": "metal screeching!", "sound_fail": "clang!", - "items": [ { "item": "scrap", "count": [ 8, 32 ] }, { "item": "water_faucet", "prob": 50 } ] + "items": [ { "item": "scrap", "count": [ 8, 32 ] }, { "item": "water_faucet", "prob": 50 } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 20, "block_unaimed_chance": "75%" } } }, { @@ -941,7 +969,7 @@ "symbol": "{", "color": "green", "move_cost_mod": 3, - "coverage": 70, + "coverage": 75, "required_str": 16, "flags": [ "CONTAINER", "PLACE_ITEM", "BLOCKSDOOR", "HIDE_PLACE", "NO_SIGHT" ], "bash": { @@ -953,7 +981,8 @@ { "item": "scrap", "count": [ 2, 8 ] }, { "item": "steel_chunk", "count": [ 1, 3 ] }, { "item": "pipe", "count": [ 1, 2 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 45, "block_unaimed_chance": "75%" } } }, { @@ -965,7 +994,7 @@ "color": "light_cyan", "crafting_pseudo_item": "butter_churn", "move_cost_mod": -1, - "coverage": 70, + "coverage": 30, "required_str": -1, "flags": [ "NOITEM", "SEALED", "ALLOW_FIELD_EFFECT", "TRANSPARENT", "FLAMMABLE", "CONTAINER", "LIQUIDCONT", "EASY_DECONSTRUCT" ], "examine_action": "keg", @@ -983,7 +1012,8 @@ { "item": "sheet_metal_small", "count": [ 6, 12 ] }, { "item": "scrap", "count": [ 10, 20 ] }, { "item": "splinter", "count": [ 1, 20 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 50, "block_unaimed_chance": "25%" } } }, { @@ -994,7 +1024,7 @@ "symbol": "O", "color": "white", "move_cost_mod": 2, - "coverage": 60, + "coverage": 30, "required_str": 10, "looks_like": "f_crate_c", "flags": [ "TRANSPARENT", "CONTAINER", "PLACE_ITEM", "ORGANIC", "MOUNTABLE", "SHORT" ], @@ -1011,7 +1041,8 @@ { "item": "lock", "count": [ 0, 1 ] }, { "item": "scrap", "count": [ 2, 6 ] }, { "item": "hinge", "charges": 2 } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 30, "block_unaimed_chance": "25%" } } } ] diff --git a/data/json/furniture_and_terrain/furniture-surfaces.json b/data/json/furniture_and_terrain/furniture-surfaces.json index 5e4c9755f029..a0d29ee59719 100644 --- a/data/json/furniture_and_terrain/furniture-surfaces.json +++ b/data/json/furniture_and_terrain/furniture-surfaces.json @@ -20,7 +20,8 @@ { "item": "2x4", "count": [ 1, 2 ] }, { "item": "nail", "charges": [ 4, 8 ] }, { "item": "splinter", "count": [ 5, 10 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "50%" } }, "examine_action": "workbench", "workbench": { "multiplier": 1.1, "mass": "200 kg", "volume": "75L" } @@ -47,7 +48,8 @@ { "item": "wood_panel", "count": [ 0, 1 ] }, { "item": "nail", "charges": [ 2, 6 ] }, { "item": "splinter", "count": [ 5, 10 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 30, "block_unaimed_chance": "50%" } }, "examine_action": "workbench", "workbench": { "multiplier": 1.1, "mass": "200 kg", "volume": "75L" } @@ -77,7 +79,8 @@ { "item": "hinge", "charges": [ 0, 1 ] }, { "item": "nail", "charges": [ 4, 8 ] }, { "item": "splinter", "count": [ 5, 10 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "50%" } } }, { @@ -114,7 +117,7 @@ "description": "Sit down at it or work on it.", "color": "light_red", "move_cost_mod": 1, - "coverage": 45, + "coverage": 50, "required_str": 5, "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "CONTAINER", "PLACE_ITEM", "ORGANIC", "MOUNTABLE", "FLAT_SURF" ], "deconstruct": { "items": [ { "item": "2x4", "count": 8 }, { "item": "wood_panel", "count": 2 }, { "item": "nail", "charges": 24 } ] }, @@ -128,7 +131,8 @@ { "item": "wood_panel", "count": [ 0, 1 ] }, { "item": "nail", "charges": [ 10, 16 ] }, { "item": "splinter", "count": [ 4, 12 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 40, "block_unaimed_chance": "50%" } }, "examine_action": "workbench", "workbench": { "multiplier": 1.1, "mass": "200 kg", "volume": "75L" } @@ -141,6 +145,7 @@ "symbol": "#", "color": "red", "move_cost_mod": 2, + "coverage": 50, "required_str": 10, "looks_like": "f_lab_bench", "flags": [ "TRANSPARENT", "PLACE_ITEM", "MOUNTABLE", "FLAT_SURF", "EASY_DECONSTRUCT" ], @@ -156,7 +161,8 @@ { "item": "sheet_metal_small", "count": [ 12, 24 ] }, { "item": "steel_chunk", "count": [ 4, 8 ] }, { "item": "scrap", "count": [ 12, 24 ] } - ] + ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 80, "block_unaimed_chance": "50%" } }, "examine_action": "workbench", "workbench": { "multiplier": 1.2, "mass": "500 kg", "volume": "200L" } @@ -250,7 +256,8 @@ { "item": "scrap", "count": [ 4, 8 ] }, { "item": "pipe", "count": [ 1, 3 ] }, { "item": "sheet_metal_small", "count": [ 4, 8 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 50, "block_unaimed_chance": "50%" } }, "examine_action": "workbench", "workbench": { "multiplier": 1.05, "mass": "100 kg", "volume": "35L" } @@ -277,7 +284,8 @@ { "item": "wood_panel", "count": [ 0, 1 ] }, { "item": "nail", "charges": [ 4, 8 ] }, { "item": "splinter", "count": 1 } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 50, "block_unaimed_chance": "50%" } }, "examine_action": "workbench", "workbench": { "multiplier": 1.1, "mass": "200 kg", "volume": "75L" } @@ -291,7 +299,7 @@ "color": "red", "looks_like": "f_table", "move_cost_mod": 2, - "coverage": 50, + "coverage": 30, "required_str": 5, "flags": [ "TRANSPARENT", "FLAMMABLE", "ORGANIC", "MOUNTABLE", "SHORT", "FLAT_SURF" ], "deconstruct": { "items": [ { "item": "2x4", "count": 2 }, { "item": "wood_panel", "count": 1 }, { "item": "nail", "charges": 8 } ] }, @@ -305,7 +313,8 @@ { "item": "wood_panel", "count": [ 0, 1 ] }, { "item": "nail", "charges": [ 4, 8 ] }, { "item": "splinter", "count": 1 } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 50, "block_unaimed_chance": "25%" } }, "examine_action": "workbench", "workbench": { "multiplier": 0.85, "mass": "200 kg", "volume": "75L" } diff --git a/data/json/furniture_and_terrain/furniture-terrains.json b/data/json/furniture_and_terrain/furniture-terrains.json index 56119f18537c..3e9164ec7d83 100644 --- a/data/json/furniture_and_terrain/furniture-terrains.json +++ b/data/json/furniture_and_terrain/furniture-terrains.json @@ -803,7 +803,8 @@ { "item": "sharp_rock", "count": [ 0, 6 ] }, { "item": "material_limestone", "charges": [ 3, 8 ], "prob": 80 }, { "group": "rock_mining_extra", "prob": 8 } - ] + ], + "ranged": { "reduction": [ 20, 40 ], "destroy_threshold": 40, "block_unaimed_chance": "25%" } } }, { @@ -814,7 +815,7 @@ "symbol": "0", "color": "dark_gray", "move_cost_mod": 6, - "coverage": 45, + "coverage": 60, "required_str": 16, "crafting_pseudo_item": "boulder_anvil", "flags": [ "NOITEM", "TRANSPARENT", "MINEABLE", "UNSTABLE", "MOUNTABLE", "SHORT", "BASHABLE" ], @@ -828,7 +829,8 @@ { "item": "sharp_rock", "count": [ 3, 7 ] }, { "item": "material_limestone", "charges": [ 5, 15 ], "prob": 80 }, { "group": "rock_mining_extra", "prob": 15 } - ] + ], + "ranged": { "reduction": [ 40, 80 ], "destroy_threshold": 80, "block_unaimed_chance": "50%" } } }, { @@ -852,7 +854,8 @@ { "item": "sharp_rock", "count": [ 4, 7 ] }, { "item": "material_limestone", "charges": [ 8, 20 ], "prob": 80 }, { "group": "rock_mining_extra", "prob": 20 } - ] + ], + "ranged": { "reduction": [ 80, 160 ], "destroy_threshold": 160 } } }, { @@ -889,7 +892,8 @@ { "item": "light_bulb", "count": [ 0, 2 ] }, { "item": "cable", "charges": [ 1, 2 ] }, { "item": "plastic_chunk", "count": [ 2, 4 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 100, "block_unaimed_chance": "25%" } } }, { @@ -916,7 +920,8 @@ { "item": "plastic_chunk", "count": [ 1, 3 ] }, { "item": "cable", "charges": [ 1, 3 ] }, { "item": "scrap", "count": [ 3, 12 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 100, "block_unaimed_chance": "25%" } } }, { @@ -941,7 +946,8 @@ { "item": "steel_chunk", "count": [ 2, 4 ] }, { "item": "cable", "charges": [ 0, 1 ] }, { "item": "scrap", "count": [ 3, 5 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 100, "block_unaimed_chance": "25%" } } } ] diff --git a/data/json/furniture_and_terrain/furniture-tools.json b/data/json/furniture_and_terrain/furniture-tools.json index 2f99d9df532f..99fae3b98e12 100644 --- a/data/json/furniture_and_terrain/furniture-tools.json +++ b/data/json/furniture_and_terrain/furniture-tools.json @@ -43,7 +43,8 @@ { "item": "amplifier", "prob": 25 }, { "item": "plastic_chunk", "count": [ 4, 10 ], "prob": 50 }, { "item": "scrap", "count": [ 2, 6 ], "prob": 50 } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 150, "block_unaimed_chance": "50%" } } }, { @@ -76,7 +77,7 @@ }, "bash": { "str_min": 8, - "str_max": 150, + "str_max": 75, "sound": "crunch!", "sound_fail": "whack!", "furn_set": "f_console_broken_table", @@ -91,7 +92,8 @@ { "item": "amplifier", "prob": 25 }, { "item": "plastic_chunk", "count": [ 4, 10 ], "prob": 50 }, { "item": "scrap", "count": [ 2, 6 ], "prob": 50 } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 8, "block_unaimed_chance": "50%" } } }, { @@ -113,7 +115,8 @@ "str_max": 8, "sound": "crunch!", "sound_fail": "whump.", - "items": [ { "item": "char_forge", "count": 1 } ] + "items": [ { "item": "char_forge", "count": 1 } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 8, "block_unaimed_chance": "25%" } } }, { @@ -129,7 +132,14 @@ "crafting_pseudo_item": "anvil", "deconstruct": { "items": [ { "item": "anvil", "count": 1 } ] }, "flags": [ "TRANSPARENT", "NOITEM", "EASY_DECONSTRUCT" ], - "bash": { "str_min": 4, "str_max": 8, "sound": "crunch!", "sound_fail": "whump.", "items": [ { "item": "anvil", "count": 1 } ] } + "bash": { + "str_min": 12, + "str_max": 40, + "sound": "crunch!", + "sound_fail": "whump.", + "items": [ { "item": "anvil", "count": 1 } ], + "ranged": { "reduction": [ 40, 40 ], "destroy_threshold": 40, "block_unaimed_chance": "25%" } + } }, { "type": "furniture", @@ -145,7 +155,14 @@ "crafting_pseudo_item": "still", "deconstruct": { "items": [ { "item": "still", "count": 1 } ] }, "flags": [ "TRANSPARENT", "NOITEM", "EASY_DECONSTRUCT" ], - "bash": { "str_min": 4, "str_max": 8, "sound": "crunch!", "sound_fail": "whump.", "items": [ { "item": "still", "count": 1 } ] } + "bash": { + "str_min": 4, + "str_max": 8, + "sound": "crunch!", + "sound_fail": "whump.", + "items": [ { "item": "still", "count": 1 } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 20, "block_unaimed_chance": "25%" } + } }, { "type": "furniture", @@ -155,7 +172,7 @@ "symbol": "U", "color": "brown", "move_cost_mod": -1, - "coverage": 40, + "coverage": 90, "required_str": -1, "examine_action": "kiln_empty", "max_volume": "125 L", @@ -167,7 +184,8 @@ "str_max": 180, "sound": "crash!", "sound_fail": "whump!", - "items": [ { "item": "rock", "count": [ 15, 30 ] }, { "item": "material_soil", "count": [ 0, 1 ] } ] + "items": [ { "item": "rock", "count": [ 15, 30 ] }, { "item": "material_soil", "count": [ 0, 1 ] } ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 30 } } }, { @@ -179,7 +197,7 @@ "symbol": "U", "color": "brown_red", "move_cost_mod": -1, - "coverage": 40, + "coverage": 90, "required_str": -1, "examine_action": "kiln_full", "flags": [ "NOITEM", "SEALED", "CONTAINER", "FIRE_CONTAINER", "SUPPRESS_SMOKE", "PLACE_ITEM", "EASY_DECONSTRUCT", "MINEABLE" ], @@ -189,7 +207,8 @@ "str_max": 180, "sound": "crash!", "sound_fail": "whump!", - "items": [ { "item": "rock", "count": [ 15, 30 ] }, { "item": "material_soil", "count": [ 0, 1 ] } ] + "items": [ { "item": "rock", "count": [ 15, 30 ] }, { "item": "material_soil", "count": [ 0, 1 ] } ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 30 } } }, { @@ -200,7 +219,7 @@ "symbol": "U", "color": "blue", "move_cost_mod": -1, - "coverage": 40, + "coverage": 90, "required_str": -1, "examine_action": "kiln_empty", "max_volume": "125 L", @@ -216,7 +235,8 @@ { "item": "scrap", "count": [ 2, 4 ] }, { "item": "steel_chunk", "count": [ 0, 3 ] }, { "item": "pipe", "count": [ 0, 4 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 40 } } }, { @@ -228,7 +248,7 @@ "symbol": "U", "color": "blue_red", "move_cost_mod": -1, - "coverage": 40, + "coverage": 90, "required_str": -1, "examine_action": "kiln_full", "flags": [ "NOITEM", "SEALED", "CONTAINER", "FIRE_CONTAINER", "SUPPRESS_SMOKE", "PLACE_ITEM" ], @@ -242,7 +262,8 @@ { "item": "scrap", "count": [ 2, 4 ] }, { "item": "steel_chunk", "count": [ 0, 3 ] }, { "item": "pipe", "count": [ 0, 4 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 40 } } }, { @@ -290,7 +311,8 @@ { "item": "steel_lump", "count": [ 5, 10 ] }, { "item": "steel_chunk", "count": [ 5, 20 ] }, { "item": "scrap", "count": [ 10, 50 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 40 } } }, { @@ -336,7 +358,8 @@ { "item": "steel_lump", "count": [ 5, 10 ] }, { "item": "steel_chunk", "count": [ 5, 20 ] }, { "item": "scrap", "count": [ 10, 50 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 40 } } }, { @@ -438,7 +461,7 @@ "coverage": 40, "required_str": -1, "crafting_pseudo_item": "char_forge", - "flags": [ "SEALED", "CONTAINER", "NOITEM", "EASY_DECONSTRUCT", "MINEABLE" ], + "flags": [ "SEALED", "CONTAINER", "NOITEM", "EASY_DECONSTRUCT", "MINEABLE", "TRANSPARENT" ], "deconstruct": { "items": [ { "item": "rock", "count": 40 }, { "item": "material_soil", "count": 3 } ] }, "examine_action": "reload_furniture", "bash": { @@ -446,7 +469,8 @@ "str_max": 50, "sound": "crash!", "sound_fail": "whump.", - "items": [ { "item": "rock", "count": [ 20, 30 ] }, { "item": "material_soil", "count": [ 0, 2 ] } ] + "items": [ { "item": "rock", "count": [ 20, 30 ] }, { "item": "material_soil", "count": [ 0, 2 ] } ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 30, "block_unaimed_chance": "25%" } } }, { @@ -460,7 +484,7 @@ "coverage": 40, "required_str": -1, "crafting_pseudo_item": "brick_kiln", - "flags": [ "SEALED", "CONTAINER", "NOITEM", "EASY_DECONSTRUCT", "MINEABLE" ], + "flags": [ "SEALED", "CONTAINER", "NOITEM", "EASY_DECONSTRUCT", "MINEABLE", "TRANSPARENT" ], "deconstruct": { "items": [ { "item": "rock", "count": 40 } ] }, "examine_action": "reload_furniture", "bash": { @@ -468,7 +492,8 @@ "str_max": 50, "sound": "crunch!", "sound_fail": "whump.", - "items": [ { "item": "rock", "count": [ 20, 30 ] } ] + "items": [ { "item": "rock", "count": [ 20, 30 ] } ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 30, "block_unaimed_chance": "25%" } } }, { @@ -517,7 +542,8 @@ { "item": "scrap", "count": [ 8, 12 ] }, { "item": "steel_chunk", "count": [ 2, 4 ] }, { "item": "steel_plate", "count": [ 1, 2 ] } - ] + ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 150 } }, "deconstruct": { "items": [ @@ -539,9 +565,9 @@ "symbol": "7", "color": "yellow_red", "move_cost_mod": -1, - "coverage": 40, + "coverage": 75, "required_str": 10, - "flags": [ "BLOCKSDOOR" ], + "flags": [ "BLOCKSDOOR", "TRANSPARENT" ], "bash": { "str_min": 40, "str_max": 150, @@ -552,7 +578,8 @@ { "item": "steel_chunk", "count": [ 2, 4 ] }, { "item": "plastic_chunk", "count": [ 4, 10 ] }, { "item": "steel_plate", "count": [ 2, 4 ] } - ] + ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 150, "block_unaimed_chance": "75%" } }, "deconstruct": { "items": [ @@ -576,7 +603,7 @@ "symbol": "7", "color": "yellow_red", "move_cost_mod": 8, - "coverage": 40, + "coverage": 50, "required_str": 10, "flags": [ "BLOCKSDOOR", "TRANSPARENT", "MOUNTABLE" ], "//": "some day this should be something you can activate to take down and get an item version of. That day is not today.", @@ -590,7 +617,8 @@ { "item": "steel_chunk", "count": [ 2, 4 ] }, { "item": "plastic_chunk", "count": [ 4, 10 ] }, { "item": "steel_plate", "count": [ 2, 4 ] } - ] + ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 150, "block_unaimed_chance": "50%" } }, "deconstruct": { "items": [ @@ -628,7 +656,8 @@ { "item": "steel_chunk", "count": [ 2, 4 ] }, { "item": "plastic_chunk", "count": [ 4, 10 ] }, { "item": "steel_plate", "count": [ 2, 4 ] } - ] + ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 150, "block_unaimed_chance": "25%" } }, "deconstruct": { "items": [ @@ -652,7 +681,7 @@ "symbol": "7", "color": "yellow_cyan", "move_cost_mod": -1, - "coverage": 40, + "coverage": 50, "required_str": 10, "flags": [ "BLOCKSDOOR" ], "bash": { @@ -665,7 +694,8 @@ { "item": "steel_chunk", "count": [ 2, 4 ] }, { "item": "plastic_chunk", "count": [ 4, 10 ] }, { "item": "steel_plate", "count": [ 2, 4 ] } - ] + ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 150, "block_unaimed_chance": "50%" } }, "deconstruct": { "items": [ @@ -689,7 +719,7 @@ "symbol": "7", "color": "yellow_green", "move_cost_mod": 8, - "coverage": 35, + "coverage": 50, "required_str": 14, "flags": [ "BLOCKSDOOR", "TRANSPARENT", "MOUNTABLE" ], "bash": { @@ -702,7 +732,8 @@ { "item": "steel_chunk", "count": [ 2, 4 ] }, { "item": "plastic_chunk", "count": [ 4, 10 ] }, { "item": "steel_plate", "count": [ 2, 4 ] } - ] + ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 150, "block_unaimed_chance": "50%" } }, "deconstruct": { "items": [ @@ -739,7 +770,8 @@ { "item": "steel_chunk", "count": [ 2, 4 ] }, { "item": "plastic_chunk", "count": [ 4, 10 ] }, { "item": "steel_plate", "count": [ 2, 4 ] } - ] + ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 150, "block_unaimed_chance": "25%" } }, "deconstruct": { "items": [ @@ -763,7 +795,7 @@ "symbol": "7", "color": "yellow_magenta", "move_cost_mod": 8, - "coverage": 40, + "coverage": 50, "required_str": 14, "flags": [ "BLOCKSDOOR", "TRANSPARENT", "MOUNTABLE" ], "bash": { @@ -776,7 +808,8 @@ { "item": "steel_chunk", "count": [ 2, 4 ] }, { "item": "plastic_chunk", "count": [ 4, 10 ] }, { "item": "steel_plate", "count": [ 2, 4 ] } - ] + ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 150, "block_unaimed_chance": "50%" } }, "deconstruct": { "items": [ @@ -800,9 +833,9 @@ "symbol": "9", "color": "black_red", "move_cost_mod": -1, - "coverage": 55, + "coverage": 75, "required_str": 16, - "flags": [ "BLOCKSDOOR" ], + "flags": [ "BLOCKSDOOR", "TRANSPARENT" ], "bash": { "str_min": 40, "str_max": 150, @@ -813,7 +846,8 @@ { "item": "steel_chunk", "count": [ 2, 4 ] }, { "item": "steel_lump", "count": [ 1, 2 ] }, { "item": "steel_plate", "count": [ 1, 2 ] } - ] + ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 150, "block_unaimed_chance": "75%" } }, "deconstruct": { "items": [ @@ -837,9 +871,9 @@ "symbol": "4", "color": "cyan_red", "move_cost_mod": -1, - "coverage": 40, + "coverage": 75, "required_str": 16, - "flags": [ "BLOCKSDOOR" ], + "flags": [ "BLOCKSDOOR", "TRANSPARENT" ], "bash": { "str_min": 40, "str_max": 150, @@ -849,7 +883,8 @@ { "item": "scrap", "count": [ 12, 20 ] }, { "item": "steel_chunk", "count": [ 2, 4 ] }, { "item": "steel_lump", "count": [ 1, 2 ] } - ] + ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 150, "block_unaimed_chance": "75%" } }, "deconstruct": { "items": [ @@ -901,7 +936,8 @@ { "item": "hose", "count": [ 0, 1 ] }, { "item": "e_scrap", "count": [ 5, 10 ] }, { "item": "plastic_chunk", "count": [ 0, 2 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 50, "block_unaimed_chance": "75%" } } }, { @@ -1149,9 +1185,16 @@ "move_cost_mod": -1, "coverage": 40, "required_str": 25, - "flags": [ "SEALED", "ALARMED", "BLOCKSDOOR" ], + "flags": [ "SEALED", "ALARMED", "BLOCKSDOOR", "TRANSPARENT" ], "examine_action": "pay_gas", - "bash": { "str_min": 7, "str_max": 30, "sound": "glass breaking!", "sound_fail": "whack!", "furn_set": "f_aut_gas_console_o" } + "bash": { + "str_min": 7, + "str_max": 30, + "sound": "glass breaking!", + "sound_fail": "whack!", + "furn_set": "f_aut_gas_console_o", + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 5, "block_unaimed_chance": "25%" } + } }, { "type": "furniture", @@ -1164,7 +1207,7 @@ "move_cost_mod": -1, "coverage": 40, "required_str": 20, - "flags": [ "BLOCKSDOOR" ], + "flags": [ "BLOCKSDOOR", "TRANSPARENT" ], "bash": { "str_min": 5, "str_max": 45, @@ -1176,7 +1219,8 @@ { "item": "hose", "count": 1 }, { "item": "cu_pipe", "count": [ 1, 4 ] }, { "item": "scrap_copper", "count": [ 0, 2 ] } - ] + ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 45, "block_unaimed_chance": "25%", "flammable": true } } }, { @@ -1202,7 +1246,8 @@ { "item": "glass_shard", "count": [ 1, 3 ] }, { "item": "sheet_metal", "count": [ 0, 2 ] }, { "item": "steel_chunk", "count": [ 1, 5 ] } - ] + ], + "ranged": { "reduction": [ 50, 100 ], "destroy_threshold": 520 } } }, { @@ -1226,7 +1271,8 @@ "sound_vol": 16, "sound_fail_vol": 12, "furn_set": "f_vending_o", - "items": [ { "item": "glass_shard", "count": [ 1, 3 ] } ] + "items": [ { "item": "glass_shard", "count": [ 1, 3 ] } ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 20 } } }, { @@ -1252,7 +1298,8 @@ { "item": "hose", "count": 1 }, { "item": "cu_pipe", "count": [ 1, 4 ] }, { "item": "scrap_copper", "count": [ 0, 2 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 50 } } }, { diff --git a/src/ballistics.cpp b/src/ballistics.cpp index e3b7e7cb75d7..9d2a37c89938 100644 --- a/src/ballistics.cpp +++ b/src/ballistics.cpp @@ -413,7 +413,7 @@ dealt_projectile_attack projectile_attack( const projectile &proj_arg, const tri rand.y = prev_point.y; } if( in_veh == nullptr || veh_pointer_or_null( here.veh_at( rand ) ) != in_veh ) { - here.shoot( rand, proj, false ); + here.shoot( source, rand, proj, false ); if( proj.impact.total_damage() <= 0 ) { //If the projectile stops here move it back a square so it doesn't end up inside the vehicle traj_len = i - 1; @@ -449,7 +449,7 @@ dealt_projectile_attack projectile_attack( const projectile &proj_arg, const tri } else if( in_veh != nullptr && veh_pointer_or_null( here.veh_at( tp ) ) == in_veh ) { // Don't do anything, especially don't call map::shoot as this would damage the vehicle } else { - here.shoot( tp, proj, !no_item_damage && tp == target ); + here.shoot( source, tp, proj, !no_item_damage && tp == target ); has_momentum = proj.impact.total_damage() > 0; } diff --git a/src/map.cpp b/src/map.cpp index 82f1a0aadd1a..c252f09a74c2 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -3801,7 +3801,7 @@ void map::crush( const tripoint &p ) } } -void map::shoot( const tripoint &p, projectile &proj, const bool hit_items ) +void map::shoot( const tripoint &origin, const tripoint &p, projectile &proj, const bool hit_items ) { float initial_damage = 0.0; for( const damage_unit &dam : proj.impact ) { @@ -3827,24 +3827,60 @@ void map::shoot( const tripoint &p, projectile &proj, const bool hit_items ) dam = vp->vehicle().damage( vp->part_index(), dam, inc ? DT_HEAT : DT_STAB, hit_items ); } + furn_id furn_here = furn( p ); + furn_t furn = furn_here.obj(); + ter_id terrain = ter( p ); ter_t ter = terrain.obj(); - if( ter.bash.ranged ) { + if( furn.bash.ranged ) { + double range = rl_dist( origin, p ); + const ranged_bash_info &rfi = *furn.bash.ranged; + if( !hit_items && ( !check( rfi.block_unaimed_chance ) || ( rfi.block_unaimed_chance < 100_pct && + range <= 1 ) ) ) { + // Nothing, it's a miss or we're shooting over nearby furniture + } else if( rfi.reduction_laser && proj.has_effect( ammo_effect_LASER ) ) { + dam -= rng( rfi.reduction_laser->min, rfi.reduction_laser->max ); + } else { + dam -= rng( rfi.reduction.min, rfi.reduction.max ); + // Only print if we hit something we can see enemies through, so we know cover did its job + if( get_avatar().sees( p ) && rfi.block_unaimed_chance < 100_pct ) { + if( dam <= 0 ) { + add_msg( _( "The shot is stopped by the %s!" ), furnname( p ) ); + } else { + add_msg( _( "The shot hits the %s and punches through!" ), furnname( p ) ); + } + } + if( dam > rfi.destroy_threshold ) { + bash_params params{0, false, true, hit_items, 1.0, false}; + bash_furn_success( p, params ); + } + if( rfi.flammable && inc ) { + add_field( p, fd_fire, 1 ); + } + } + } else if( ter.bash.ranged ) { + double range = rl_dist( origin, p ); const ranged_bash_info &ri = *ter.bash.ranged; - if( !hit_items && !check( ri.block_unaimed_chance ) ) { - // Nothing, it's a miss + if( !hit_items && ( !check( ri.block_unaimed_chance ) || ( ri.block_unaimed_chance < 100_pct && + range <= 1 ) ) ) { + // Nothing, it's a miss or we're shooting over nearby terrain } else if( ri.reduction_laser && proj.has_effect( ammo_effect_LASER ) ) { dam -= rng( ri.reduction_laser->min, ri.reduction_laser->max ); } else { dam -= rng( ri.reduction.min, ri.reduction.max ); + // Only print if we hit something we can see enemies through, so we know cover did its job + if( get_avatar().sees( p ) && ri.block_unaimed_chance < 100_pct ) { + if( dam <= 0 ) { + add_msg( _( "The shot is stopped by the %s!" ), tername( p ) ); + } else { + add_msg( _( "The shot hits the %s and punches through!" ), tername( p ) ); + } + } if( dam > ri.destroy_threshold ) { bash_params params{0, false, true, hit_items, 1.0, false}; bash_ter_success( p, params ); } - if( dam <= 0 && is_transparent( p ) && get_avatar().sees( p ) ) { - add_msg( _( "The shot is stopped by the %s!" ), tername( p ) ); - } if( ri.flammable && inc ) { add_field( p, fd_fire, 1 ); } diff --git a/src/map.h b/src/map.h index 1dc556763b08..369cae2458c6 100644 --- a/src/map.h +++ b/src/map.h @@ -1088,7 +1088,7 @@ class map /** Keeps bashing a square until there is no more furniture */ void destroy_furn( const tripoint &p, bool silent = false ); void crush( const tripoint &p ); - void shoot( const tripoint &p, projectile &proj, bool hit_items ); + void shoot( const tripoint &origin, const tripoint &p, projectile &proj, bool hit_items ); /** Checks if a square should collapse, returns the X for the one_in(X) collapse chance */ int collapse_check( const tripoint &p ); /** Causes a collapse at p, such as from destroying a wall */ diff --git a/src/ranged_aoe.cpp b/src/ranged_aoe.cpp index 30ad0651aa66..6c5560262221 100644 --- a/src/ranged_aoe.cpp +++ b/src/ranged_aoe.cpp @@ -86,7 +86,8 @@ void execute_shaped_attack( const shape &sh, const projectile &proj, Creature &a // noop } else { projectile proj_copy = proj; - here.shoot( p, proj_copy, false ); + // Origin and target are same point so AoE can bypass cover mechanics + here.shoot( p, p, proj_copy, false ); // There should be a nicer way than rechecking after shoot if( !aoe_permeable( p ) ) { continue; From 4c50058502555a1d7e1bd59b0c8244b9513c7d0b Mon Sep 17 00:00:00 2001 From: Chaosvolt Date: Thu, 18 Jan 2024 23:22:19 -0600 Subject: [PATCH 03/10] Help convey the feature to player --- data/json/furniture_and_terrain/furniture-barriers.json | 4 ++-- data/json/npcs/hints.json | 4 +++- data/raw/tips.json | 5 ++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/data/json/furniture_and_terrain/furniture-barriers.json b/data/json/furniture_and_terrain/furniture-barriers.json index 8959a7354cbf..2501e025a227 100644 --- a/data/json/furniture_and_terrain/furniture-barriers.json +++ b/data/json/furniture_and_terrain/furniture-barriers.json @@ -28,7 +28,7 @@ "symbol": "#", "looks_like": "f_sandbag_half", "bgcolor": "brown", - "description": "An earthbag barricade, typically used for blocking bullets.", + "description": "An earthbag barricade, typically used for blocking bullets. Stand next to it to fire past it unimpeded.", "move_cost_mod": -1, "coverage": 60, "required_str": -1, @@ -101,7 +101,7 @@ "name": "sandbag barricade", "symbol": "#", "bgcolor": "brown", - "description": "A sandbag barricade, typically used for blocking bullets.", + "description": "A sandbag barricade, typically used for blocking bullets. Stand next to it to fire past it unimpeded.", "move_cost_mod": -1, "coverage": 60, "required_str": -1, diff --git a/data/json/npcs/hints.json b/data/json/npcs/hints.json index d25e65909827..fc91fb3cfe7d 100644 --- a/data/json/npcs/hints.json +++ b/data/json/npcs/hints.json @@ -171,7 +171,9 @@ "Be extra careful on roads. They are easy to travel on, but occasional minefield or a road block can make you feel sorry in an instant. I've even seen a tank once. I ran away like never before.", "I know it's not best of times, but try to sleep well. You're not yourself if you're sleep deprived. Grab a pillow and a blanket. If you can't, even a teddy bear under your head and a pile of clothes to keep you warm can make a difference. And pick a spot well, even a chair or a bench is better than a cold ground.", "There's no rule against wearing more than one set of pants. Well, I mean, there probably is, but nothing stopping you from breaking it!", - "There are two ways of throwing grenades. The smart one is throwing from behind a corner. The less smart one involves getting shot while throwing in the open and being torn apart by the resulting explosion." + "There are two ways of throwing grenades. The smart one is throwing from behind a corner. The less smart one involves getting shot while throwing in the open and being torn apart by the resulting explosion.", + "Watch out for those turrets they set up at road blocks, they just fire on whatever they see. If you run into one, keep sandbags or other hard cover between you and it. Those wooden road barricades only discourage ramming the checkpoint, bullets will just go right through them.", + "Don't trust everyone you meet out there. Some people tend to shoot first and ask questions later. Keep something solid between you and them and fire over whatever cover you can get. A good-sized boulder might crack if it takes a rifle bullet, but it'll save your life." ] } ] diff --git a/data/raw/tips.json b/data/raw/tips.json index 6484a4493f19..a7a09dc50329 100644 --- a/data/raw/tips.json +++ b/data/raw/tips.json @@ -82,7 +82,10 @@ "The floor is too hard to sleep on? Try gathering a pile of leaves.", "Designating a firewood source will make maintaining a fire much simpler.", "With enough parts, your mobile home could be a rolling mobile command center.", - "Having trouble finding pants that fit after hulking out? Some outfits can be given that special touch with a tailor's kit." + "Having trouble finding pants that fit after hulking out? Some outfits can be given that special touch with a tailor's kit.", + "Take cover! Standing next to sandbags other obstacles will let you shoot past them unimpeded, while blocking some return fire.", + "Ballistic windows can take some of the bite out of bullets flying your way. Boulders or other hard obstacles can also block shots unless you're up close.", + "Many types of furniture have a chance to intercept bullets depending on their size, reducing some of the damage taken." ] } ] From 20f0b012d1802d37dd1342a72b1966b7f0386774 Mon Sep 17 00:00:00 2001 From: Chaosvolt Date: Thu, 18 Jan 2024 23:24:53 -0600 Subject: [PATCH 04/10] Update furniture-barriers.json --- data/json/furniture_and_terrain/furniture-barriers.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/furniture_and_terrain/furniture-barriers.json b/data/json/furniture_and_terrain/furniture-barriers.json index 2501e025a227..4b96a891dac4 100644 --- a/data/json/furniture_and_terrain/furniture-barriers.json +++ b/data/json/furniture_and_terrain/furniture-barriers.json @@ -5,7 +5,7 @@ "name": "road barricade", "symbol": "#", "bgcolor": "yellow", - "description": "A road barricade. For barricading roads.", + "description": "A road barricade. For barricading roads. You could stand next to it to fire past without it blocking your shots, not that it will slow them down much.", "move_cost_mod": -1, "coverage": 30, "required_str": 5, From db7eefe33887e7265d23d999e7f71feddecde2dd Mon Sep 17 00:00:00 2001 From: Chaosvolt Date: Thu, 18 Jan 2024 23:30:54 -0600 Subject: [PATCH 05/10] Update furniture.json --- data/mods/Magiclysm/furniture.json | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/data/mods/Magiclysm/furniture.json b/data/mods/Magiclysm/furniture.json index a5a7e0647812..4c0acf6a47f4 100644 --- a/data/mods/Magiclysm/furniture.json +++ b/data/mods/Magiclysm/furniture.json @@ -48,7 +48,8 @@ { "item": "material_zincite", "count": [ 0, 5 ], "prob": 2 }, { "item": "orichalcum_lump", "count": [ 0, 2 ] }, { "item": "orichalcum_sliver", "count": [ 4, 10 ] } - ] + ], + "ranged": { "reduction": [ 80, 160 ], "destroy_threshold": 160 } } }, { @@ -87,7 +88,8 @@ { "item": "pipe", "count": 1 }, { "item": "cable", "charges": [ 1, 3 ] }, { "item": "cu_pipe", "count": 1 } - ] + ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 80, "block_unaimed_chance": "50%" } }, "examine_action": "workbench", "workbench": { "multiplier": 1.15, "mass": "300 kg", "volume": "100L" } @@ -119,7 +121,8 @@ "str_max": 10, "sound": "glass breaking!", "sound_fail": "clang!", - "items": [ { "item": "scrap_copper", "count": [ 10, 20 ] }, { "item": "glass_shard", "count": [ 2, 4 ] } ] + "items": [ { "item": "scrap_copper", "count": [ 10, 20 ] }, { "item": "glass_shard", "count": [ 2, 4 ] } ], + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 4, "block_unaimed_chance": "25%" } } }, { @@ -153,7 +156,8 @@ { "item": "scrap", "count": [ 10, 100 ] }, { "item": "pipe", "count": [ 1, 5 ] }, { "item": "wire", "count": [ 3, 10 ] } - ] + ], + "ranged": { "reduction": [ 10, 20 ], "destroy_threshold": 60, "block_unaimed_chance": "25%" } } }, { @@ -179,7 +183,8 @@ { "item": "crystallized_mana", "charges": [ 0, 100 ] }, { "item": "small_mana_crystal", "count": [ 0, 3 ] }, { "item": "glass_shard", "count": [ 1, 3 ] } - ] + ], + "ranged": { "reduction": [ 15, 30 ], "destroy_threshold": 35, "block_unaimed_chance": "75%" } } }, { @@ -198,7 +203,8 @@ "str_max": 160, "sound": "smash!", "sound_fail": "thump.", - "items": [ { "item": "rock", "count": [ 5, 15 ] }, { "item": "sharp_rock", "count": [ 3, 5 ] } ] + "items": [ { "item": "rock", "count": [ 5, 15 ] }, { "item": "sharp_rock", "count": [ 3, 5 ] } ], + "ranged": { "reduction": [ 80, 160 ], "destroy_threshold": 160 } } }, { @@ -220,7 +226,8 @@ "str_max": 50, "sound": "crash!", "sound_fail": "whump.", - "items": [ { "item": "demon_chitin_piece", "count": [ 20, 30 ] } ] + "items": [ { "item": "demon_chitin_piece", "count": [ 20, 30 ] } ], + "ranged": { "reduction": [ 25, 50 ], "destroy_threshold": 50 } } } ] From 00d340b36d0a8b9c7e92d7ed2e1cf3152b0d0ae2 Mon Sep 17 00:00:00 2001 From: Chaosvolt Date: Fri, 19 Jan 2024 17:27:44 -0600 Subject: [PATCH 06/10] Update tips.json --- data/raw/tips.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/raw/tips.json b/data/raw/tips.json index a7a09dc50329..2c50e5404dcb 100644 --- a/data/raw/tips.json +++ b/data/raw/tips.json @@ -83,9 +83,9 @@ "Designating a firewood source will make maintaining a fire much simpler.", "With enough parts, your mobile home could be a rolling mobile command center.", "Having trouble finding pants that fit after hulking out? Some outfits can be given that special touch with a tailor's kit.", - "Take cover! Standing next to sandbags other obstacles will let you shoot past them unimpeded, while blocking some return fire.", - "Ballistic windows can take some of the bite out of bullets flying your way. Boulders or other hard obstacles can also block shots unless you're up close.", - "Many types of furniture have a chance to intercept bullets depending on their size, reducing some of the damage taken." + "Take cover! Standing next to sandbags or other obstacles will let you shoot past them unimpeded, while blocking some return fire.", + "Ballistic windows can take the bite out of bullets flying your way. Boulders or other hard obstacles can also block shots, or be shot over if you're next to them.", + "Many types of furniture have a chance to intercept bullets, reducing some of the damage taken. The bigger and harder the obstacle, the better." ] } ] From 9e23d7e403900c1f9dd23228c3692fed4fa0db82 Mon Sep 17 00:00:00 2001 From: Chaosvolt Date: Sat, 20 Jan 2024 01:46:05 -0600 Subject: [PATCH 07/10] Revert "Commit for remote" This reverts commit b4c8c724a2df9ab89f0bf8af951592a7609233c5. --- src/ballistics.cpp | 2 +- src/map.cpp | 9 ++------- src/map.h | 4 +--- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/ballistics.cpp b/src/ballistics.cpp index ec763273b7e6..9d2a37c89938 100644 --- a/src/ballistics.cpp +++ b/src/ballistics.cpp @@ -211,7 +211,7 @@ dealt_projectile_attack projectile_attack( const projectile &proj_arg, const tri map &here = get_map(); double target_size = target_critter != nullptr ? target_critter->ranged_target_size() : - here.ranged_target_size( target_arg, range ); + here.ranged_target_size( target_arg ); projectile_attack_aim aim = projectile_attack_roll( dispersion, range, target_size ); // TODO: move to-hit roll back in here diff --git a/src/map.cpp b/src/map.cpp index 1310a86258fd..c252f09a74c2 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -2018,7 +2018,7 @@ bool map::valid_move( const tripoint &from, const tripoint &to, // End of move cost -double map::ranged_target_size( const tripoint &p, double range ) const +double map::ranged_target_size( const tripoint &p ) const { if( impassable( p ) ) { return 1.0; @@ -2028,12 +2028,7 @@ double map::ranged_target_size( const tripoint &p, double range ) const return 0.0; } - // Coverage of furniture like sandbags gives X% chance to intercept a shot - // Does not apply if you're adjacent, it's assumed you're firing over it - if( x_in_y( coverage( p ), 100 ) && range > 1 ) { - return 1.0; - } - + // TODO: Handle cases like shrubs, trees, furniture, sandbags... return 0.1; } diff --git a/src/map.h b/src/map.h index 7bfba3d75ec7..369cae2458c6 100644 --- a/src/map.h +++ b/src/map.h @@ -603,10 +603,8 @@ class map * Size of map objects at `p` for purposes of ranged combat. * Size is in percentage of tile: if 1.0, all attacks going through tile * should hit map objects on it, if 0.0 there is nothing to be hit (air/water). - * Coverage value of furniture adds a percent chance to intercept shots - * unless shooter is adjacent to it. */ - double ranged_target_size( const tripoint &p, double range ) const; + double ranged_target_size( const tripoint &p ) const; // Sees: /** From b96a1489bdc056e9a7324fe4bd718ecafec6513d Mon Sep 17 00:00:00 2001 From: Chaosvolt Date: Sat, 20 Jan 2024 02:26:30 -0600 Subject: [PATCH 08/10] Update furniture-tools.json The one that explodes doesn't need more fire, instead have the initial stage ignite if shot up like gas pump terrain does. --- data/json/furniture_and_terrain/furniture-tools.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/json/furniture_and_terrain/furniture-tools.json b/data/json/furniture_and_terrain/furniture-tools.json index 99fae3b98e12..38c84fbc4b43 100644 --- a/data/json/furniture_and_terrain/furniture-tools.json +++ b/data/json/furniture_and_terrain/furniture-tools.json @@ -1193,7 +1193,7 @@ "sound": "glass breaking!", "sound_fail": "whack!", "furn_set": "f_aut_gas_console_o", - "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 5, "block_unaimed_chance": "25%" } + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 5, "block_unaimed_chance": "25%", "flammable": true } } }, { @@ -1220,7 +1220,7 @@ { "item": "cu_pipe", "count": [ 1, 4 ] }, { "item": "scrap_copper", "count": [ 0, 2 ] } ], - "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 45, "block_unaimed_chance": "25%", "flammable": true } + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 45, "block_unaimed_chance": "25%" } } }, { From 9029bbf0fe3d1a520874d79de31829cdcb86c520 Mon Sep 17 00:00:00 2001 From: Chaosvolt Date: Sat, 20 Jan 2024 02:32:45 -0600 Subject: [PATCH 09/10] On second thought, yes more fire --- data/json/furniture_and_terrain/furniture-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/furniture_and_terrain/furniture-tools.json b/data/json/furniture_and_terrain/furniture-tools.json index 38c84fbc4b43..375bbcfbd184 100644 --- a/data/json/furniture_and_terrain/furniture-tools.json +++ b/data/json/furniture_and_terrain/furniture-tools.json @@ -1220,7 +1220,7 @@ { "item": "cu_pipe", "count": [ 1, 4 ] }, { "item": "scrap_copper", "count": [ 0, 2 ] } ], - "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 45, "block_unaimed_chance": "25%" } + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 45, "block_unaimed_chance": "25%", "flammable": true } } }, { From 235992783fbf4952cc38c8f60820e70c9754642c Mon Sep 17 00:00:00 2001 From: Chaosvolt Date: Sat, 20 Jan 2024 11:47:08 -0600 Subject: [PATCH 10/10] Lil adjustments --- data/json/furniture_and_terrain/furniture-storage.json | 2 +- data/json/furniture_and_terrain/furniture-tools.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/json/furniture_and_terrain/furniture-storage.json b/data/json/furniture_and_terrain/furniture-storage.json index 696d93c65a1c..2266b6194df9 100644 --- a/data/json/furniture_and_terrain/furniture-storage.json +++ b/data/json/furniture_and_terrain/furniture-storage.json @@ -914,7 +914,7 @@ "sound_fail_vol": 12, "furn_set": "f_displaycase_b", "items": [ { "item": "glass_shard", "count": [ 1, 5 ] } ], - "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 5, "block_unaimed_chance": "75%" } + "ranged": { "reduction": [ 1, 6 ], "destroy_threshold": 5, "block_unaimed_chance": "75%" } } }, { diff --git a/data/json/furniture_and_terrain/furniture-tools.json b/data/json/furniture_and_terrain/furniture-tools.json index 375bbcfbd184..30f391422cf3 100644 --- a/data/json/furniture_and_terrain/furniture-tools.json +++ b/data/json/furniture_and_terrain/furniture-tools.json @@ -1193,7 +1193,7 @@ "sound": "glass breaking!", "sound_fail": "whack!", "furn_set": "f_aut_gas_console_o", - "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 5, "block_unaimed_chance": "25%", "flammable": true } + "ranged": { "reduction": [ 5, 10 ], "destroy_threshold": 7, "block_unaimed_chance": "25%", "flammable": true } } }, {