Skip to content

Commit

Permalink
Add multi_projectile_effects to gauss shotgun
Browse files Browse the repository at this point in the history
  • Loading branch information
RenechCDDA committed Apr 18, 2024
1 parent 4f952ab commit 536e561
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
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/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
3 changes: 3 additions & 0 deletions src/ranged.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2084,6 +2084,9 @@ static projectile make_gun_projectile( const item &gun )
proj.critical_multiplier = ammo->critical_multiplier;
proj.count = ammo->count;
proj.multi_projectile_effects = ammo->multi_projectile_effects;
if( fx.count( "MULTI_EFFECTS" ) ) {
proj.multi_projectile_effects = true;
}
proj.shot_spread = ammo->shot_spread * gun.gun_shot_spread_multiplier();
if( !ammo->drop.is_null() && x_in_y( ammo->drop_chance, 1.0 ) ) {
item drop( ammo->drop );
Expand Down

0 comments on commit 536e561

Please sign in to comment.