Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(balance): extend and improve ranged_bash_info to allow taking cover behind furniture #4129

Merged
merged 18 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 81 additions & 37 deletions data/json/furniture_and_terrain/furniture-appliances.json

Large diffs are not rendered by default.

21 changes: 13 additions & 8 deletions data/json/furniture_and_terrain/furniture-barriers.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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%" }
}
},
{
Expand All @@ -27,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,
Expand All @@ -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%" }
}
},
{
Expand All @@ -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 }
}
},
{
Expand All @@ -98,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.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this line should be programmatically generated for all terrain that has bash.ranged, unless it'd be too much code duplication.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That'd be a bit of effort yeah. We'd also have to restrict it to only ones that use block_unaimed_chance.

"move_cost_mod": -1,
"coverage": 60,
"required_str": -1,
Expand All @@ -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%" }
}
},
{
Expand All @@ -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 }
}
}
]
28 changes: 18 additions & 10 deletions data/json/furniture_and_terrain/furniture-decorative.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}
},
{
Expand All @@ -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 }
}
},
{
Expand All @@ -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" ]
},
Expand All @@ -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" ]
},
Expand Down Expand Up @@ -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%" }
}
},
{
Expand All @@ -123,15 +128,16 @@
"symbol": "@",
"color": "brown",
"move_cost_mod": 2,
"coverage": 40,
"coverage": 30,
"required_str": 5,
"flags": [ "PLACE_ITEM", "TRANSPARENT", "FLAMMABLE" ],
"bash": {
"str_min": 6,
"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%" }
}
},
{
Expand All @@ -142,14 +148,16 @@
"symbol": "o",
"color": "light_gray",
"move_cost_mod": -1,
"coverage": 30,
"required_str": 10,
"flags": [ "PLACE_ITEM", "BLOCKSDOOR", "MINEABLE", "LIQUIDCONT" ],
"bash": {
"str_min": 16,
"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%" }
}
},
{
Expand Down
22 changes: 13 additions & 9 deletions data/json/furniture_and_terrain/furniture-fireplaces.json
Original file line number Diff line number Diff line change
Expand Up @@ -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%" }
}
},
{
Expand All @@ -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 } ] }
},
Expand All @@ -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%" }
}
},
{
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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%" }
}
},
{
Expand All @@ -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%" }
}
},
{
Expand Down
16 changes: 11 additions & 5 deletions data/json/furniture_and_terrain/furniture-graves.json
Original file line number Diff line number Diff line change
Expand Up @@ -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%" }
}
},
{
Expand All @@ -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" ],
Expand All @@ -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%" }
}
},
{
Expand All @@ -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%" }
}
},
{
Expand All @@ -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%" }
}
},
{
Expand All @@ -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 }
}
}
]
18 changes: 13 additions & 5 deletions data/json/furniture_and_terrain/furniture-industrial.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"move_cost_mod": -1,
"coverage": 35,
"required_str": -1,
"flags": [ "TRANSPARENT" ],
"bash": {
"str_min": 40,
"str_max": 150,
Expand All @@ -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": [
Expand Down Expand Up @@ -53,6 +55,7 @@
"move_cost_mod": -1,
"coverage": 40,
"required_str": 16,
"flags": [ "TRANSPARENT" ],
"bash": {
"str_min": 40,
"str_max": 150,
Expand All @@ -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": [
Expand All @@ -86,6 +90,7 @@
"symbol": "&",
"bgcolor": "yellow",
"move_cost_mod": 3,
"coverage": 30,
"required_str": 18,
"flags": [ "TRANSPARENT", "MOUNTABLE" ],
"deconstruct": {
Expand Down Expand Up @@ -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%" }
}
},
{
Expand Down Expand Up @@ -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%" }
}
},
{
Expand Down Expand Up @@ -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%" }
}
}
]
Loading
Loading