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

Reasonable incendiary ammo & dragon's breath #73069

Merged
merged 5 commits into from
Apr 29, 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
18 changes: 16 additions & 2 deletions data/json/ammo_effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,14 @@
{
"id": "INCENDIARY",
"type": "ammo_effect",
"//": "Creature, that got hit with this projectile, would be ignited for a short duration, up to 4 seconds, (6 if creature is made out of flammable material or made out of veggy). Hardcoded"
"//": "Creature, that got hit with this projectile, would be ignited for a short duration, up to 4 seconds, (6 if creature is made out of flammable material or made out of veggy). Hardcoded in projectile::apply_effects_damage",
"//2": "10% chance to start fires on flammable (has flag FLAMMABLE_ASH) furniture/terrain **with defined shoot data**, hardcoded in map::shoot"
},
{
"id": "IGNITE",
"type": "ammo_effect",
"//": "Same as INCENDIARY, creature that got hit with this projectile, would be ignited for a short duration, up to 6 seconds, (10 if creature is made out of flammable material or made out of veggy). Hardcoded"
"//": "Same as INCENDIARY, creature that got hit with this projectile, would be ignited for a short duration, up to 6 seconds, (10 if creature is made out of flammable material or made out of veggy). Hardcoded",
"//2": "Guaranteed to start fires on flammable (has flag FLAMMABLE_ASH) furniture/terrain **with defined shoot data**, hardcoded in map::shoot"
},
{
"id": "JET",
Expand Down Expand Up @@ -389,6 +391,12 @@
"//": "Creates a trail of smoke",
"trail": { "field_type": "fd_smoke", "intensity_min": 1, "intensity_max": 2, "chance": 75 }
},
{
"id": "STREAM_TINY",
"type": "ammo_effect",
"//": "Sometimes leaves a trail of small fire fields. All of these STREAM_XXXXXX effects have hardcoded interactions in projectile_attack (ballistics.cpp)",
"trail": { "field_type": "fd_fire", "intensity_min": 1, "intensity_max": 1, "chance": 10 }
},
{
"id": "STREAM",
"type": "ammo_effect",
Expand All @@ -401,6 +409,12 @@
"//": "Leaves a trail of intense fire fields",
"trail": { "field_type": "fd_fire", "intensity_min": 2, "intensity_max": 2, "chance": 75 }
},
{
"id": "PYROTECHNIC_DISPLAY",
"type": "ammo_effect",
"//": "Looks like huge fires, but doesn't actually burn stuff.",
"trail": { "field_type": "fd_fire_FAKE", "intensity_min": 1, "intensity_max": 3, "chance": 85 }
},
{
"id": "STREAM_GAS_FUNGICIDAL",
"type": "ammo_effect",
Expand Down
15 changes: 15 additions & 0 deletions data/json/field_type.json
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,21 @@
"display_items": false,
"display_field": true
},
{
"id": "fd_fire_FAKE",
"looks_like": "fd_fire",
"type": "field_type",
"intensity_levels": [
{ "name": "glittering embers", "sym": "4", "color": "yellow", "light_emitted": 5, "translucency": 0.7 },
{ "name": "spark shower", "color": "light_red", "light_emitted": 15, "translucency": 0.4 },
{ "name": "wall of flames", "color": "red", "light_emitted": 40, "translucency": 0.1 }
],
"priority": 4,
"half_life": "1 seconds",
"phase": "plasma",
"display_items": false,
"display_field": true
},
{
"id": "fd_extinguisher",
"type": "field_type",
Expand Down
2 changes: 1 addition & 1 deletion data/json/items/ammo/shot.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
"price": "10 USD",
"price_postapoc": "16 USD",
"proportional": { "damage": { "damage_type": "bullet", "amount": 0.2 }, "recoil": 0.6, "loudness": 0.8, "range": 0.5 },
"extend": { "effects": [ "INCENDIARY", "STREAM", "NOGIB" ] }
"extend": { "effects": [ "INCENDIARY", "STREAM_TINY", "PYROTECHNIC_DISPLAY", "NOGIB" ] }
},
{
"id": "shot_flechette",
Expand Down
10 changes: 5 additions & 5 deletions data/json/items/fuel.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"ammo_type": "diesel",
"damage": { "damage_type": "heat", "amount": 5, "armor_penetration": 4 },
"range": 4,
"effects": [ "FLAME", "STREAM", "INCENDIARY", "NEVER_MISFIRES" ]
"effects": [ "FLAME", "STREAM", "IGNITE", "NEVER_MISFIRES" ]
},
{
"id": "jp8",
Expand All @@ -99,7 +99,7 @@
"ammo_type": "jp8",
"damage": { "damage_type": "heat", "amount": 5, "armor_penetration": 5 },
"range": 4,
"effects": [ "FLAME", "STREAM", "INCENDIARY", "NEVER_MISFIRES" ]
"effects": [ "FLAME", "STREAM", "IGNITE", "NEVER_MISFIRES" ]
},
{
"id": "avgas",
Expand All @@ -122,7 +122,7 @@
"ammo_type": "avgas",
"damage": { "damage_type": "heat", "amount": 5, "armor_penetration": 5 },
"range": 4,
"effects": [ "FLAME", "STREAM", "INCENDIARY", "NEVER_MISFIRES" ]
"effects": [ "FLAME", "STREAM", "IGNITE", "NEVER_MISFIRES" ]
},
{
"id": "biodiesel",
Expand Down Expand Up @@ -155,7 +155,7 @@
"ammo_type": "gasoline",
"damage": { "damage_type": "heat", "amount": 5, "armor_penetration": 5 },
"range": 4,
"effects": [ "FLAME", "STREAM", "INCENDIARY", "NEVER_MISFIRES" ]
"effects": [ "FLAME", "STREAM", "IGNITE", "NEVER_MISFIRES" ]
},
{
"id": "lamp_oil",
Expand Down Expand Up @@ -223,7 +223,7 @@
"ammo_type": "flammable",
"damage": { "damage_type": "heat", "amount": 15, "armor_penetration": 30 },
"range": 6,
"effects": [ "FLAME", "STREAM_BIG", "INCENDIARY", "NEVER_MISFIRES" ]
"effects": [ "FLAME", "STREAM_BIG", "IGNITE", "NEVER_MISFIRES" ]
},
{
"id": "gelled_gasoline",
Expand Down
6 changes: 3 additions & 3 deletions data/json/items/gun/ups.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"energy_drain": "20 kJ",
"reload": 0,
"modes": [ [ "DEFAULT", "3 rd.", 3 ], [ "BURST", "5 rd.", 5 ], [ "AUTO", "high auto", 15 ] ],
"ammo_effects": [ "LASER", "PLASMA_BUBBLE", "INCENDIARY" ],
"ammo_effects": [ "LASER", "PLASMA_BUBBLE", "IGNITE" ],
"flags": [ "NO_UNLOAD", "NEVER_JAMS", "NO_UNWIELD", "NO_SALVAGE", "NO_REPAIR", "UNBREAKABLE_MELEE", "NON_FOULING", "USE_UPS" ],
"overheat_threshold": 200,
"cooling_value": 2,
Expand Down Expand Up @@ -97,7 +97,7 @@
"loudness": 1,
"energy_drain": "50 kJ",
"reload": 0,
"ammo_effects": [ "LASER", "PLASMA_BUBBLE", "INCENDIARY" ],
"ammo_effects": [ "LASER", "PLASMA_BUBBLE", "IGNITE" ],
"flags": [
"NO_UNLOAD",
"NEVER_JAMS",
Expand Down Expand Up @@ -154,7 +154,7 @@
[ "stock accessory", 1 ],
[ "underbarrel", 1 ]
],
"ammo_effects": [ "LASER", "INCENDIARY" ],
"ammo_effects": [ "LASER", "IGNITE" ],
"flags": [ "NEVER_JAMS", "NO_UNLOAD", "NON_FOULING", "NEEDS_NO_LUBE", "USE_UPS", "OVERHEATS" ],
"faults": [ "fault_overheat_melting", "fault_overheat_safety" ],
"melee_damage": { "bash": 12 }
Expand Down
5 changes: 5 additions & 0 deletions data/mods/Aftershock/ammo_effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,10 @@
"id": "SEISMIC_MAPPING",
"type": "ammo_effect",
"aoe": { "field_type": "fd_clairvoyant", "intensity_min": 10, "intensity_max": 10 }
},
{
"id": "MULTI_EFFECTS",
"type": "ammo_effect",
"//": "Applies multi_projectile_effects to all ammo used by this weapon, even if the ammo doesn't normally have it. Hardcoded in projectile_attack (ranged.cpp)"
}
]
2 changes: 1 addition & 1 deletion data/mods/Aftershock/items/ammo/flashbulb.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"recoil": 45,
"count": 4,
"stack_size": 1,
"effects": [ "COOKOFF", "NEVER_MISFIRES", "LASER", "INCENDIARY", "DAZZLE_BEAM", "PUMP_LASER", "PLASMA_BUBBLE" ]
"effects": [ "COOKOFF", "NEVER_MISFIRES", "LASER", "IGNITE", "DAZZLE_BEAM", "PUMP_LASER", "PLASMA_BUBBLE" ]
}
]
2 changes: 1 addition & 1 deletion data/mods/Aftershock/items/ammo/plasma.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"ammo_type": "afs_shydrogen",
"range": 0,
"count": 1,
"effects": [ "INCENDIARY" ]
"effects": [ "IGNITE" ]
}
]
4 changes: 2 additions & 2 deletions data/mods/Aftershock/items/gun/laser.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
[ "stock mount", 1 ],
[ "underbarrel mount", 1 ]
],
"ammo_effects": [ "LASER", "INCENDIARY" ],
"ammo_effects": [ "LASER", "IGNITE" ],
"flags": [ "NO_UNLOAD", "NON_FOULING", "NEEDS_NO_LUBE", "USE_UPS" ],
"melee_damage": { "bash": 4 }
},
Expand Down Expand Up @@ -168,7 +168,7 @@
"overheat_threshold": 150,
"modes": [ [ "DEFAULT", "pulse", 1 ], [ "BURST", "2s sequence", 2 ] ],
"ammo_to_fire": 0,
"ammo_effects": [ "INCENDIARY", "DAZZLE_BEAM", "PLASMA_BUBBLE" ],
"ammo_effects": [ "IGNITE", "DAZZLE_BEAM", "PLASMA_BUBBLE" ],
"delete": { "flags": [ "NO_UNLOAD", "NO_RELOAD" ] },
"energy_drain": "30 kJ",
"built_in_mods": [ "afs_holo_aim_assist" ],
Expand Down
2 changes: 1 addition & 1 deletion data/mods/Aftershock/items/gunmods/shotguns.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"mod_targets": [ "shotgun" ],
"damage_modifier": { "damage_type": "electric", "amount": 3, "armor_penetration": 7 },
"energy_drain_modifier": "20 kJ",
"ammo_effects": [ "SMALL_ELECTRIC_BURST" ],
"ammo_effects": [ "SMALL_ELECTRIC_BURST", "MULTI_EFFECTS" ],
"dispersion_modifier": 15,
"range_modifier": 5,
"handling_modifier": -2,
Expand Down
2 changes: 1 addition & 1 deletion data/mods/CrazyCataclysm/crazy_items.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"durability": 10,
"loudness": 50,
"reload": 0,
"ammo_effects": [ "PLASMA", "EXPLOSIVE_HUGE", "STREAM_BIG", "INCENDIARY", "WIDE" ],
"ammo_effects": [ "PLASMA", "EXPLOSIVE_HUGE", "STREAM_BIG", "IGNITE", "WIDE" ],
"flags": [ "NEVER_JAMS", "NO_UNLOAD", "TRADER_AVOID", "BIONIC_WEAPON", "USES_BIONIC_POWER" ],
"melee_damage": { "bash": 12 }
},
Expand Down
2 changes: 1 addition & 1 deletion data/mods/Generic_Guns/ammo/shot.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"dispersion": 1.2,
"range": 0.5
},
"extend": { "effects": [ "INCENDIARY", "STREAM", "NOGIB" ] }
"extend": { "effects": [ "INCENDIARY", "PYROTECHNIC_DISPLAY", "STREAM_TINY", "NOGIB" ] }
},
{
"id": "shot_explosive",
Expand Down
2 changes: 1 addition & 1 deletion data/mods/Magiclysm/items/fuel.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"ammo_type": "dragon_blood",
"damage": { "damage_type": "stab", "amount": 5, "armor_penetration": 5 },
"range": 4,
"effects": [ "FLAME", "STREAM", "INCENDIARY", "NEVER_MISFIRES" ]
"effects": [ "FLAME", "STREAM", "IGNITE", "NEVER_MISFIRES" ]
},
{
"id": "blood_tainted",
Expand Down
2 changes: 1 addition & 1 deletion data/mods/MindOverMatter/items/teleporter_start_items.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"loudness": 20,
"reload": 200,
"range": 45,
"ammo_effects": [ "PLASMA", "PLASMA_BUBBLE", "INCENDIARY" ],
"ammo_effects": [ "PLASMA", "PLASMA_BUBBLE", "IGNITE" ],
"ammo": [ "mom_fusion_ammo" ],
"pocket_data": [ { "pocket_type": "MAGAZINE_WELL", "magazine_well": "25 ml", "item_restriction": [ "mom_fusion_mag" ] } ],
"flags": [ "NEVER_JAMS", "NON_FOULING", "NEEDS_NO_LUBE" ]
Expand Down
2 changes: 1 addition & 1 deletion data/mods/MindOverMatter/items/weapons.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
[ "underbarrel", 1 ]
],
"ammo": [ "mom_pulse_rifle_ammo" ],
"ammo_effects": [ "LASER", "INCENDIARY" ],
"ammo_effects": [ "LASER", "IGNITE" ],
"flags": [ "NEVER_JAMS", "NO_UNLOAD", "NON_FOULING", "NEEDS_NO_LUBE", "NO_REPAIR", "OVERHEATS" ],
"faults": [ "fault_overheat_explosion", "fault_overheat_melting" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "ammo_restriction": { "mom_pulse_rifle_ammo": 1 } } ],
Expand Down
2 changes: 1 addition & 1 deletion data/mods/Xedra_Evolved/items/ammo.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"range": 12,
"count": 1,
"recoil": 900,
"effects": [ "INCENDIARY" ],
"effects": [ "IGNITE" ],
"flags": [ "ZERO_WEIGHT" ]
},
{
Expand Down
6 changes: 3 additions & 3 deletions data/mods/Xedra_Evolved/items/inventor/gun.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
[ "stock accessory", 1 ],
[ "underbarrel", 1 ]
],
"ammo_effects": [ "LASER", "INCENDIARY" ],
"ammo_effects": [ "LASER", "IGNITE" ],
"faults": [ "fault_overheat_explosion", "fault_overheat_venting", "fault_overheat_melting", "fault_overheat_safety" ],
"flags": [
"NEVER_JAMS",
Expand Down Expand Up @@ -162,7 +162,7 @@
[ "stock accessory", 1 ],
[ "underbarrel", 1 ]
],
"ammo_effects": [ "LASER", "INCENDIARY" ],
"ammo_effects": [ "LASER", "IGNITE" ],
"faults": [ "fault_overheat_explosion", "fault_overheat_venting", "fault_overheat_melting", "fault_overheat_safety" ],
"flags": [
"NEVER_JAMS",
Expand Down Expand Up @@ -222,7 +222,7 @@
[ "stock accessory", 1 ],
[ "underbarrel", 1 ]
],
"ammo_effects": [ "LASER", "PLASMA_BUBBLE", "INCENDIARY" ],
"ammo_effects": [ "LASER", "PLASMA_BUBBLE", "IGNITE" ],
"faults": [ "fault_overheat_explosion", "fault_overheat_venting", "fault_overheat_melting", "fault_overheat_safety" ],
"flags": [
"NEVER_JAMS",
Expand Down
1 change: 1 addition & 0 deletions doc/JSON_INFO.md
Original file line number Diff line number Diff line change
Expand Up @@ -3467,6 +3467,7 @@ See [GAME_BALANCE.md](GAME_BALANCE.md)'s `MELEE_WEAPONS` section for the criteri
"dispersion" : 0, // Inaccuracy of ammo, measured in 100ths of Minutes Of Angle (MOA)
"shot_counter": 5, // Increases amount of shots produced by gun by this amount. `"shot_counter": 5` means each shot will be counted as 6 shots (1 you actually perform + 5); designed for using in suppressor mod breakage and for stuff like replaceable barrels, but not used anywhere at this moment
"projectile_count": 5,// amount of pellets, that the ammo will shot, like in shotgun-like weapon; if used, shot_damage should be specified
"multi_projectile_effects": true,// (Optional) Boolean, default false. If the projectile_count is greater than 1, determines if the extra projectiles will also trigger any ammo effects. (For more on ammo effects see below)
"shot_damage": { "damage_type": "bullet", "amount": 15 } // Optional field specifying the damage caused by a single projectile fired from this round. If present projectile_count must also be specified; syntax is equal to damage
"critical_multiplier": 4, // All ranged damage dealt would be multiplied by this, if it was a critical hit
"shot_spread": 100, // Optional field specifying the additional dispersion of single projectiles. Only meaningful if shot_count is present.
Expand Down
1 change: 1 addition & 0 deletions src/ballistics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ dealt_projectile_attack projectile_attack( const projectile &proj_arg, const tri
const auto &proj_effects = proj.proj_effects;

const bool stream = proj_effects.count( "STREAM" ) > 0 ||
proj_effects.count( "STREAM_TINY" ) > 0 ||
proj_effects.count( "STREAM_BIG" ) > 0 ||
proj_effects.count( "JET" ) > 0;
const char bullet = stream ? '#' : '*';
Expand Down
56 changes: 30 additions & 26 deletions src/creature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -879,34 +879,38 @@ void projectile::apply_effects_damage( Creature &target, Creature *source,

Character &player_character = get_player_character();
if( proj_effects.count( "INCENDIARY" ) ) {
if( target.made_of( material_veggy ) || target.made_of_any( Creature::cmat_flammable ) ) {
target.add_effect( effect_source( source ), effect_onfire, rng( 2_turns, 6_turns ),
dealt_dam.bp_hit );
} else if( target.made_of_any( Creature::cmat_flesh ) && one_in( 4 ) ) {
target.add_effect( effect_source( source ), effect_onfire, rng( 1_turns, 4_turns ),
dealt_dam.bp_hit );
}
if( player_character.has_trait( trait_PYROMANIA ) &&
!player_character.has_morale( MORALE_PYROMANIA_STARTFIRE ) &&
player_character.sees( target ) ) {
player_character.add_msg_if_player( m_good,
_( "You feel a surge of euphoria as flame engulfs %s!" ), target.get_name() );
player_character.add_morale( MORALE_PYROMANIA_STARTFIRE, 15, 15, 8_hours, 6_hours );
player_character.rem_morale( MORALE_PYROMANIA_NOFIRE );
if( x_in_y( 1, 100 ) ) { // 1% chance
if( target.made_of( material_veggy ) || target.made_of_any( Creature::cmat_flammable ) ) {
target.add_effect( effect_source( source ), effect_onfire, rng( 2_turns, 6_turns ),
dealt_dam.bp_hit );
} else if( target.made_of_any( Creature::cmat_flesh ) && one_in( 4 ) ) {
target.add_effect( effect_source( source ), effect_onfire, rng( 1_turns, 4_turns ),
dealt_dam.bp_hit );
}
if( player_character.has_trait( trait_PYROMANIA ) &&
!player_character.has_morale( MORALE_PYROMANIA_STARTFIRE ) &&
player_character.sees( target ) ) {
player_character.add_msg_if_player( m_good,
_( "You feel a surge of euphoria as flame engulfs %s!" ), target.get_name() );
player_character.add_morale( MORALE_PYROMANIA_STARTFIRE, 15, 15, 8_hours, 6_hours );
player_character.rem_morale( MORALE_PYROMANIA_NOFIRE );
}
}
} else if( proj_effects.count( "IGNITE" ) ) {
if( target.made_of( material_veggy ) || target.made_of_any( Creature::cmat_flammable ) ) {
target.add_effect( effect_source( source ), effect_onfire, 6_turns, dealt_dam.bp_hit );
} else if( target.made_of_any( Creature::cmat_flesh ) ) {
target.add_effect( effect_source( source ), effect_onfire, 10_turns, dealt_dam.bp_hit );
}
if( player_character.has_trait( trait_PYROMANIA ) &&
!player_character.has_morale( MORALE_PYROMANIA_STARTFIRE ) &&
player_character.sees( target ) ) {
player_character.add_msg_if_player( m_good,
_( "You feel a surge of euphoria as flame engulfs %s!" ), target.get_name() );
player_character.add_morale( MORALE_PYROMANIA_STARTFIRE, 15, 15, 8_hours, 6_hours );
player_character.rem_morale( MORALE_PYROMANIA_NOFIRE );
if( x_in_y( 1, 2 ) ) { // 50% chance
if( target.made_of( material_veggy ) || target.made_of_any( Creature::cmat_flammable ) ) {
target.add_effect( effect_source( source ), effect_onfire, 10_turns, dealt_dam.bp_hit );
} else if( target.made_of_any( Creature::cmat_flesh ) ) {
target.add_effect( effect_source( source ), effect_onfire, 6_turns, dealt_dam.bp_hit );
}
if( player_character.has_trait( trait_PYROMANIA ) &&
!player_character.has_morale( MORALE_PYROMANIA_STARTFIRE ) &&
player_character.sees( target ) ) {
player_character.add_msg_if_player( m_good,
_( "You feel a surge of euphoria as flame engulfs %s!" ), target.get_name() );
player_character.add_morale( MORALE_PYROMANIA_STARTFIRE, 15, 15, 8_hours, 6_hours );
player_character.rem_morale( MORALE_PYROMANIA_NOFIRE );
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3087,9 +3087,9 @@ void item::ammo_info( std::vector<iteminfo> &info, const iteminfo_query *parts,
}
}
}
if( ammo.ammo_effects.count( "INCENDIARY" ) &&
if( ( ammo.ammo_effects.count( "INCENDIARY" ) || ammo.ammo_effects.count( "IGNITE" ) ) &&
parts->test( iteminfo_parts::AMMO_FX_INCENDIARY ) ) {
fx.emplace_back( _( "This ammo <neutral>starts fires</neutral>." ) );
fx.emplace_back( _( "This ammo <neutral>may start fires</neutral>." ) );
}
if( !fx.empty() ) {
insert_separation_line( info );
Expand Down
1 change: 1 addition & 0 deletions src/item_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2679,6 +2679,7 @@ void islot_ammo::load( const JsonObject &jo )
assign( jo, "drop_chance", drop_chance, strict, 0.0f, 1.0f );
optional( jo, was_loaded, "drop_active", drop_active, true );
optional( jo, was_loaded, "projectile_count", count, 1 );
optional( jo, was_loaded, "multi_projectile_effects", multi_projectile_effects, false );
optional( jo, was_loaded, "shot_spread", shot_spread, 0 );
assign( jo, "shot_damage", shot_damage, strict );
// Damage instance assign reader handles pierce and prop_damage
Expand Down
4 changes: 4 additions & 0 deletions src/itype.h
Original file line number Diff line number Diff line change
Expand Up @@ -992,6 +992,10 @@ struct islot_ammo : common_ranged_data {
* Number of projectiles fired per round, e.g. shotgun shot.
*/
int count = 1;
/**
* Whether this multi-projectile shot has its effects applied to all projectiles
*/
bool multi_projectile_effects = false;
/**
* Spread/dispersion between projectiles fired from the same round.
*/
Expand Down
Loading
Loading