diff --git a/data/json/items/ammo/exodii.json b/data/json/items/ammo/exodii.json index 7174607c1c005..442e08c217103 100644 --- a/data/json/items/ammo/exodii.json +++ b/data/json/items/ammo/exodii.json @@ -208,5 +208,31 @@ "description": "A long 27.3 Diyua cartridge loaded with a propelling charge, attached to a large high explosive shaped charge grenade several times larger in diameter. It was designed to be muzzle loaded into 27.3x44 Diyua guns. Though the grenade's penetration and fragmentation were ultimately deemed insufficient, this was of no matter to the Exodii who saw value in the explosive potential the grenade added to the Brogyeki '23.", "damage": { "damage_type": "bullet", "amount": 220, "armor_penetration": 35 }, "effects": [ "COOKOFF", "EXPLOSIVE_m433" ] + }, + { + "id": "33naval_ball", + "type": "AMMO", + "name": { "str_sp": "3.3 naval, FMJ" }, + "description": "Initially made for marine combat, this hefty projectile is a go-to round for late-stage Exodii fights.", + "//": "secretly just 23x152mm; 236 x 33 mm of size", + "weight": "450 g", + "volume": "201 ml", + "longest_side": "236 mm", + "price": "22 USD", + "price_postapoc": "25 USD", + "flags": [ "IRREPLACEABLE_CONSUMABLE" ], + "material": [ "steel", "brass", "lead", "powder" ], + "symbol": "=", + "color": "dark_gray", + "count": 1, + "stack_size": 1, + "ammo_type": "33naval", + "casing": "33_naval_casing", + "range": 150, + "//2": "it has 90 kj of muzzle energy, but i just scaled .50 bmg stats. TODO", + "damage": { "damage_type": "bullet", "amount": 589, "armor_penetration": 126 }, + "dispersion": 150, + "recoil": 88917, + "effects": [ "COOKOFF" ] } ] diff --git a/data/json/items/ammo_types.json b/data/json/items/ammo_types.json index bd7e3c9d98835..3fa1618c73213 100644 --- a/data/json/items/ammo_types.json +++ b/data/json/items/ammo_types.json @@ -822,6 +822,12 @@ "name": "27.3x44 Diyua Grenade", "default": "273x44RG" }, + { + "type": "ammunition_type", + "id": "33naval", + "name": "3.3 naval cartridge", + "default": "33naval_ball" + }, { "type": "ammunition_type", "id": "glowstick_juice", diff --git a/data/json/items/generic/casing.json b/data/json/items/generic/casing.json index bb5680bf8a823..0e471d0d18da8 100644 --- a/data/json/items/generic/casing.json +++ b/data/json/items/generic/casing.json @@ -80,6 +80,16 @@ "weight": "7 g", "volume": "10ml" }, + { + "id": "33_naval_casing", + "copy-from": "casing", + "looks_like": "223_casing", + "type": "GENERIC", + "name": { "str": "3.3 naval casing" }, + "description": "An empty casing from a 3.3 naval round. If it wasn't for burns and soot, it could be used as a cup.", + "weight": "80 g", + "volume": "100 ml" + }, { "id": "270win_casing", "copy-from": "casing", diff --git a/data/json/items/gun/exodii.json b/data/json/items/gun/exodii.json index f3334a1c07e8d..a2fa89e27fb18 100644 --- a/data/json/items/gun/exodii.json +++ b/data/json/items/gun/exodii.json @@ -225,5 +225,43 @@ "description": "The most popular gun to use the 12.3ln cartridge was, of course, the PA md. 71. Its predecessor, the md. 68, was viewed by many as a sort of failure: although it was reliable and powerful, it was too heavy to be used as a good infantry weapon, and not really heavy enough to be a good support gun. Enough were made, though, that during the zombie apocalypse, it gained a great deal of resurgent popularity as a light emplacement gun that used readily available ammunition. It perfectly served the purposes of the Exodii, who had far less concern about its unwieldiness. This one has been modified for use in vehicle turrets on Earth." } ] + }, + { + "id": "ree_33", + "copy-from": "rifle_semi", + "looks_like": "m2browning", + "type": "GUN", + "name": { "str": "exodii naval rifle" }, + "description": "Originally designed for naval defense of a small island country, this gun served Exodii as long as they existed, being one of its reliable tools in later stages of world decay. Cheap ammunition, a simple mechanism, and immense power output would make it a great weapon for any survivor who is able to carry nearly a hundred kilo of its weight and is in need to penetrate a small bunker. Unless your body is compatible with Exodii Standard Combat Bodyframe, you can only use it with a heavy-duty tripod, and only while prone. Due to the size of a top-mounted magazine, the user needs to use a scope mounted on the side of a gun.", + "//": "effectively a weird single-shot self-loading Oerlikon KBA (but longer, and of course not an autocannon) with a 23x152mm round", + "variant_type": "gun", + "variants": [ + { + "id": "ree_33", + "name": { + "str_sp": "Ree 3.3 exodii rifle", + "ctxt": "`Ree` in this case is butchered `Roe`, to carry some sort of nautical vibe" + }, + "description": "Originally designed for naval defense of a small island country, this gun served Exodii as long as they existed, being one of its reliable tools in later stages of world decay. Cheap ammunition, a simple mechanism, and immense power output would make it a great weapon for any survivor who is able to carry nearly a hundred kilo of its weight and is in need to penetrate a small bunker. Unless your body is compatible with Exodii Standard Combat Bodyframe, you can only use it with a heavy-duty tripod, and only while prone. Due to the size of a top-mounted magazine, the user needs to use a scope mounted on the side of a gun." + } + ], + "min_strength": 90, + "weight": "77000 g", + "volume": "151425 ml", + "longest_side": "3365 mm", + "barrel_length": "2890 mm", + "price_postapoc": "200 USD", + "to_hit": { "grip": "bad", "length": "long", "surface": "any", "balance": "clumsy" }, + "material": [ "steel" ], + "ammo": [ "33naval" ], + "range": 100, + "dispersion": 130, + "durability": 8, + "min_cycle_recoil": 80000, + "default_mods": [ "ree_33_tripod", "rifle_scope" ], + "flags": [ "NEVER_JAMS" ], + "//2": "desired to be single shot or with attachable mag, but because MAGAZINE and MAGAZINE_WELL are mortal enemies, 4 round magazine is used instead.", + "pocket_data": [ { "pocket_type": "MAGAZINE_WELL", "item_restriction": [ "ree_33_4_mag", "ree_33_53_mag" ] } ], + "melee_damage": { "bash": 7 } } ] diff --git a/data/json/items/gunmod/underbarrel.json b/data/json/items/gunmod/underbarrel.json index 0da178c056d2e..29f0ea62417b4 100644 --- a/data/json/items/gunmod/underbarrel.json +++ b/data/json/items/gunmod/underbarrel.json @@ -592,5 +592,27 @@ "location": "underbarrel", "mod_targets": [ "smg", "pistol" ], "min_skills": [ [ "weapon", 3 ], [ "gun", 1 ] ] + }, + { + "id": "ree_33_tripod", + "type": "GUNMOD", + "name": { "str": "heavy-duty tripod" }, + "description": "Massive tripod, used by Exodii naval rifle so it can be used by lightweight units, providing firearm support. Allows using naval rifle while prone.", + "weight": "6000 g", + "volume": "5800 ml", + "longest_side": "66 cm", + "price_postapoc": "5 USD", + "install_time": "5 m", + "to_hit": { "grip": "none", "length": "short", "surface": "any", "balance": "neutral" }, + "min_str_required_mod_if_prone": -83, + "material": [ "steel" ], + "symbol": ":", + "color": "brown", + "location": "underbarrel", + "mod_targets": [ "ree_33" ], + "handling_modifier": 18, + "min_skills": [ [ "weapon", 2 ] ], + "flags": [ "BIPOD", "SLOW_WIELD" ], + "melee_damage": { "bash": 12 } } ] diff --git a/data/json/items/magazine/exodii.json b/data/json/items/magazine/exodii.json index bec1763fb489e..529569b0fb953 100644 --- a/data/json/items/magazine/exodii.json +++ b/data/json/items/magazine/exodii.json @@ -56,5 +56,55 @@ "reload_time": 110, "flags": [ "MAG_BULKY" ], "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "273x44": 5 } } ] + }, + { + "id": "ree_33_4_mag", + "looks_like": "stanag30", + "type": "MAGAZINE", + "name": { "str": "3.3 naval 4-round magazine" }, + "description": "A bulky 4-round magazine for the Exodii naval rifle. Grants some amount of portability, if the gun itself can be named portable.", + "variant_type": "gun", + "variants": [ + { + "id": "ree_33_4_mag", + "name": { "str": "3.3 naval 4-round magazine" }, + "description": "A bulky 4-round magazine for the Exodii Ree 3.3 rifle. Grants some amount of portability, if the gun itself can be named portable." + } + ], + "weight": "340 g", + "volume": "1200 ml", + "longest_side": "245 mm", + "price_postapoc": "2 USD 50 cent", + "material": [ "steel" ], + "symbol": "#", + "color": "light_gray", + "ammo_type": [ "33naval" ], + "reload_time": 500, + "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "33naval": 4 } } ] + }, + { + "id": "ree_33_53_mag", + "looks_like": "stanag30", + "type": "MAGAZINE", + "name": { "str": "3.3 naval 53-round box magazine" }, + "description": "Giant metal box with a belt, which allows it to be used as a high-capacity magazine for the Exodii naval rifle.", + "variant_type": "gun", + "variants": [ + { + "id": "ree_33_53_mag", + "name": { "str": "3.3 naval 53-round box magazine" }, + "description": "Giant metal box with a belt, which allows it to be used as a high-capacity magazine for the Exodii Ree 3.3 rifle." + } + ], + "weight": "4600 g", + "volume": "14000 ml", + "longest_side": "245 mm", + "price_postapoc": "2 USD 50 cent", + "material": [ "steel" ], + "symbol": "#", + "color": "light_gray", + "ammo_type": [ "33naval" ], + "reload_time": 400, + "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "33naval": 53 } } ] } ] diff --git a/data/json/npcs/exodii/exodii_merchant_itemlist.json b/data/json/npcs/exodii/exodii_merchant_itemlist.json index e2a521cab3452..db75c99650111 100644 --- a/data/json/npcs/exodii/exodii_merchant_itemlist.json +++ b/data/json/npcs/exodii/exodii_merchant_itemlist.json @@ -176,7 +176,17 @@ "subtype": "collection", "items": [ { "item": "273x44thermobaric", "container-item": "box_small_wood", "prob": 10, "count": [ 1, 2 ], "sealed": true }, - { "item": "273x110slugmedium", "container-item": "box_small", "prob": 30, "count": [ 2, 4 ], "sealed": true } + { "item": "273x110slugmedium", "container-item": "box_small", "prob": 30, "count": [ 2, 4 ], "sealed": true }, + { + "collection": [ + { "item": "ree_33", "prob": 100, "count": [ 1, 3 ] }, + { "item": "ree_33_4_mag", "prob": 100, "count": [ 2, 4 ] }, + { "item": "ree_33_53_mag", "prob": 20, "count": [ 1, 3 ] }, + { "item": "33naval_ball", "container-item": "box_medium_wood", "prob": 100, "charges": 200, "sealed": true }, + { "item": "33naval_ball", "container-item": "box_medium_wood", "prob": 50, "charges": 200, "sealed": true } + ], + "prob": 20 + } ] }, { diff --git a/data/mods/Generic_Guns/ammo/gg_ammo_migration.json b/data/mods/Generic_Guns/ammo/gg_ammo_migration.json index 50b9681d2b778..604024f75e677 100644 --- a/data/mods/Generic_Guns/ammo/gg_ammo_migration.json +++ b/data/mods/Generic_Guns/ammo/gg_ammo_migration.json @@ -637,5 +637,10 @@ "id": [ "84x246mm_smoke" ], "type": "MIGRATION", "replace": "rocket_smoke" + }, + { + "id": [ "33naval_ball" ], + "type": "MIGRATION", + "replace": "rifle_ball_cannon" } ] diff --git a/data/mods/Generic_Guns/ammo/gg_casings_migration.json b/data/mods/Generic_Guns/ammo/gg_casings_migration.json index b94f52c304bbe..e6afca5d7d80a 100644 --- a/data/mods/Generic_Guns/ammo/gg_casings_migration.json +++ b/data/mods/Generic_Guns/ammo/gg_casings_migration.json @@ -65,7 +65,8 @@ "762R_casing", "300_casing", "30carbine_casing", - "123ln_casing" + "123ln_casing", + "33_naval_casing" ], "type": "MIGRATION", "replace": "rifle_casing" diff --git a/data/mods/Generic_Guns/ammo/rifle.json b/data/mods/Generic_Guns/ammo/rifle.json index e314b17ed42aa..539dd1e21b08b 100644 --- a/data/mods/Generic_Guns/ammo/rifle.json +++ b/data/mods/Generic_Guns/ammo/rifle.json @@ -97,5 +97,13 @@ "name": { "str_sp": "railgun rifle ammo" }, "description": "Projectile used for a railgun. It's made of a ferromagnetic metal, probably cobalt.", "ammo_type": "ammo_railgun" + }, + { + "id": "rifle_ball_cannon", + "copy-from": "33naval_ball", + "type": "AMMO", + "name": { "str_sp": "foreign cannon rifle ammo, ball" }, + "description": "Foreign cannon rifle ammo brought by the Exodii, capable to destroy lightly armored vehicles, as well as highly armored mutants.", + "ammo_type": "ammo_rifle_cannon" } ] diff --git a/data/mods/Generic_Guns/firearms/gg_firearms_migration.json b/data/mods/Generic_Guns/firearms/gg_firearms_migration.json index 20865d18af0f5..b193e455932e9 100644 --- a/data/mods/Generic_Guns/firearms/gg_firearms_migration.json +++ b/data/mods/Generic_Guns/firearms/gg_firearms_migration.json @@ -396,6 +396,11 @@ "type": "MIGRATION", "replace": "rifle_assault_foreign" }, + { + "id": [ "ree_33" ], + "type": "MIGRATION", + "replace": "rifle_cannon_foreign" + }, { "id": [ "combination_gun", "pipe_combination_gun" ], "type": "MIGRATION", diff --git a/data/mods/Generic_Guns/firearms/rifle.json b/data/mods/Generic_Guns/firearms/rifle.json index 80ef35b8a6516..c59f0c221c961 100644 --- a/data/mods/Generic_Guns/firearms/rifle.json +++ b/data/mods/Generic_Guns/firearms/rifle.json @@ -105,6 +105,23 @@ } ] }, + { + "id": "rifle_cannon_foreign", + "copy-from": "ree_33", + "type": "GUN", + "name": "foreign cannon rifle", + "ammo": [ "ammo_rifle_cannon" ], + "description": "A powerful Exodii rifle, reserved for the later stage of cataclysm. It should be considered an anti-tank rifle in modern world, but the round is bigger than any anti-tank round on Earth.", + "pocket_data": [ + { + "pocket_type": "MAGAZINE_WELL", + "holster": true, + "max_contains_volume": "200 L", + "max_contains_weight": "200 kg", + "item_restriction": [ "rifle_mag_cannon", "rifle_mag_cannon_big" ] + } + ] + }, { "id": "rifle_rail", "copy-from": "hk_g80", diff --git a/data/mods/Generic_Guns/gg_ammunition_types.json b/data/mods/Generic_Guns/gg_ammunition_types.json index 477bc890914a3..539ba3be6e0a8 100644 --- a/data/mods/Generic_Guns/gg_ammunition_types.json +++ b/data/mods/Generic_Guns/gg_ammunition_types.json @@ -41,6 +41,13 @@ "name": "foreign rifle ammo", "default": "rifle_ball_foreign" }, + { + "type": "ammunition_type", + "id": "ammo_rifle_cannon", + "//": "specifically for Ree 3.3", + "name": "foreign cannon ammo", + "default": "rifle_ball_cannon" + }, { "type": "ammunition_type", "id": "ammo_railgun", diff --git a/data/mods/Generic_Guns/magazines/gg_magazines_migration.json b/data/mods/Generic_Guns/magazines/gg_magazines_migration.json index 4c666380d4527..2ef8476b762f4 100644 --- a/data/mods/Generic_Guns/magazines/gg_magazines_migration.json +++ b/data/mods/Generic_Guns/magazines/gg_magazines_migration.json @@ -358,6 +358,16 @@ "type": "MIGRATION", "replace": "rifle_sniper_mag_foreign" }, + { + "id": [ "ree_33_4_mag" ], + "type": "MIGRATION", + "replace": "rifle_mag_cannon" + }, + { + "id": [ "ree_33_53_mag" ], + "type": "MIGRATION", + "replace": "rifle_mag_cannon_big" + }, { "id": [ "hk_g80mag" ], "type": "MIGRATION", diff --git a/data/mods/Generic_Guns/magazines/rifle.json b/data/mods/Generic_Guns/magazines/rifle.json index 6f6ef9da34f2b..2eea7dae8c39b 100644 --- a/data/mods/Generic_Guns/magazines/rifle.json +++ b/data/mods/Generic_Guns/magazines/rifle.json @@ -57,6 +57,24 @@ "ammo_type": [ "ammo_rifle_foreign" ], "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "ammo_rifle_foreign": 10 } } ] }, + { + "id": "rifle_mag_cannon", + "copy-from": "ree_33_4_mag", + "type": "MAGAZINE", + "name": { "str": "cannon rifle magazine" }, + "description": "Small magazine for exodii cannon rifle.", + "ammo_type": [ "ammo_rifle_cannon" ], + "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "ammo_rifle_cannon": 4 } } ] + }, + { + "id": "rifle_mag_cannon_big", + "copy-from": "ree_33_53_mag", + "type": "MAGAZINE", + "name": { "str": "cannon rifle box magazine" }, + "description": "Bulky box magazine for exodii cannon rifle.", + "ammo_type": [ "ammo_rifle_cannon" ], + "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "ammo_rifle_cannon": 53 } } ] + }, { "id": "rifle_rail_mag", "copy-from": "hk_g80mag", diff --git a/src/item.cpp b/src/item.cpp index b696c30f11b63..00564f14160b0 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -205,6 +205,7 @@ static const quality_id qual_BOIL( "BOIL" ); static const quality_id qual_JACK( "JACK" ); static const quality_id qual_LIFT( "LIFT" ); +static const skill_id skill_archery( "archery" ); static const skill_id skill_cooking( "cooking" ); static const skill_id skill_melee( "melee" ); static const skill_id skill_survival( "survival" ); @@ -2502,7 +2503,16 @@ void item::basic_info( std::vector &info, const iteminfo_query *parts, // Display any minimal stat or skill requirements for the item std::vector req; if( get_min_str() > 0 ) { - req.push_back( string_format( "%s %d", _( "strength" ), get_min_str() ) ); + int min_str = 0; + for( const item *mod : gunmods() ) { + min_str += mod->type->gunmod->min_str_required_mod_if_prone; + } + if( min_str != 0 && !get_player_character().is_prone() ) { + req.push_back( string_format( "%s %d (%d %s)", _( "strength" ), get_min_str(), + get_min_str() + min_str, _( "if prone" ) ) ); + } else { + req.push_back( string_format( "%s %d", _( "strength" ), get_min_str() ) ); + } } if( type->min_dex > 0 ) { req.push_back( string_format( "%s %d", _( "dexterity" ), type->min_dex ) ); @@ -6597,7 +6607,8 @@ int item::on_wield_cost( const Character &you ) const } int penalty = get_var( "volume", volume() / units::legacy_volume_factor ) * d; - mv += penalty; + // arbitrary no more than 7 second of penalty + mv += std::min( penalty, 700 ); } // firearms with a folding stock or tool/melee without collapse/retract iuse @@ -15056,11 +15067,18 @@ int item::get_min_str() const const Character &p = get_player_character(); if( type->gun ) { int min_str = type->min_str; - min_str -= p.get_proficiency_bonus( "archery", proficiency_bonus_type::strength ); - + // we really need some better check for bows than its skill + if( type->gun->skill_used == skill_archery ) { + min_str -= p.get_proficiency_bonus( "archery", proficiency_bonus_type::strength ); + } for( const item *mod : gunmods() ) { min_str += mod->type->gunmod->min_str_required_mod; } + if( p.is_prone() ) { + for( const item *mod : gunmods() ) { + min_str += mod->type->gunmod->min_str_required_mod_if_prone; + } + } return min_str > 0 ? min_str : 0; } else { return type->min_str; diff --git a/src/item_factory.cpp b/src/item_factory.cpp index 98a7b7ef87362..dab3a3537ddff 100644 --- a/src/item_factory.cpp +++ b/src/item_factory.cpp @@ -3574,6 +3574,7 @@ void Item_factory::load( islot_gunmod &slot, const JsonObject &jo, const std::st assign( jo, "mode_modifier", slot.mode_modifier ); assign( jo, "reload_modifier", slot.reload_modifier ); assign( jo, "min_str_required_mod", slot.min_str_required_mod ); + assign( jo, "min_str_required_mod_if_prone", slot.min_str_required_mod_if_prone ); if( jo.has_array( "add_mod" ) ) { slot.add_mod.clear(); for( JsonArray curr : jo.get_array( "add_mod" ) ) { diff --git a/src/itype.h b/src/itype.h index b29de877b3917..4066ca32bfb5f 100644 --- a/src/itype.h +++ b/src/itype.h @@ -929,6 +929,9 @@ struct islot_gunmod : common_ranged_data { /** Modifies base strength required */ int min_str_required_mod = 0; + /** Modifies base strength required if user is prone */ + int min_str_required_mod_if_prone = 0; + /** Additional gunmod slots to add to the gun */ std::map add_mod;