Files
Bubberstation/code/modules/projectiles/projectile/bullets/junk.dm
necromanceranne 8ef3c0c04d Improves pipe pistols, changes their bane effect to an on-hit effect of the projectile, fixes a mild bug with bayonets on pipe pistols (#84960)
## About The Pull Request

Pipeguns and all subtypes have a 3 tiles knockback when fired
pointblank, much like shotguns.

Pipe pistols unload the entire magazine in a single rapid burst. This
feature extends to the (otherwise unobtainable) regal pipe pistol.

Fixes pipe pistols being able to be bayoneted.

Junk rounds have their on-hit effects with regards to particular mob
biotype effects.

## Why It's Good For The Game

Pipe pistols aren't quite as useful as their pipegun counterparts. While
every shot together would outdamage the pipegun, the pipegun is just
generally more reliable and accurate, even at close range. People prefer
to use the pipegun's dependable functionality than gamble with trying to
land three shots with the pistol in a melee.

So, to encourage the use of pipe pistols up close where they are
strongest and make them less of a gamble, the pipe pistol has a much
deadlier close range potency while still suffering at long range, which
is what the pipegun rifle excels at while having slightly lower damage
overall. Also it makes the gun feel more like its a duckfoot gun or
something, which is fun.

The knockback effect was something lost from when they were a shotgun
subtype. I just never got around to re-adding it to any of the
iterations of pipeguns. It's a cool feature that is a bit of a shame to
lose.

It has been a few months with no fix in sight for the element, and I'm
not particularly hopeful about it either. It's easier to just have this
effect baked into the bullets themselves.

## Changelog
🆑
add: Pipe pistols now magdump their entire magazine when fired.
add: Pipeguns and their subtypes have a knockback effect.
fix: Pipe pistols cannot be bayoneted, as intended.
fix: Junk rounds now actually do their extra damage effects against
certain mob types. Borgs across the Spinward tremble at the knowledge
that these junk weapons can obliterate them with ease.
/🆑
2024-07-15 15:09:48 +01:00

108 lines
3.3 KiB
Plaintext

// Junk (Pipe Pistols and Pipeguns)
/obj/projectile/bullet/junk
name = "junk bullet"
icon_state = "trashball"
damage = 30
embed_type = /datum/embed_data/bullet_junk
/// What biotype does our junk projectile especially harm?
var/extra_damage_mob_biotypes = MOB_ROBOTIC
/// How much do we multiply our total base damage?
var/extra_damage_multiplier = 1.5
/// How much extra damage do we do on top of this total damage? Separate from the multiplier and unaffected by it.
var/extra_damage_added_damage = 0
/// What damage type is our extra damage?
var/extra_damage_type = BRUTE
/obj/projectile/bullet/junk/on_hit(atom/target, blocked = 0, pierce_hit)
. = ..()
if(!isliving(target))
return
var/mob/living/living_target = target
var/is_correct_biotype = living_target.mob_biotypes & extra_damage_mob_biotypes
if(extra_damage_mob_biotypes && is_correct_biotype)
var/multiplied_damage = extra_damage_multiplier ? ((damage * extra_damage_multiplier) - damage) : 0
var/finalized_damage = multiplied_damage + extra_damage_added_damage
if(finalized_damage)
living_target.apply_damage(finalized_damage, damagetype = extra_damage_type, def_zone = BODY_ZONE_CHEST, wound_bonus = wound_bonus)
/datum/embed_data/bullet_junk
embed_chance=15
fall_chance=3
jostle_chance=4
ignore_throwspeed_threshold=TRUE
pain_stam_pct=0.4
pain_mult=5
jostle_pain_mult=6
rip_time=10
/obj/projectile/bullet/incendiary/fire/junk
name = "burning oil"
damage = 30
fire_stacks = 5
suppressed = SUPPRESSED_NONE
/obj/projectile/bullet/junk/phasic
name = "junk phasic bullet"
icon_state = "gaussphase"
projectile_phasing = PASSTABLE | PASSGLASS | PASSGRILLE | PASSCLOSEDTURF | PASSMACHINE | PASSSTRUCTURE | PASSDOORS
/obj/projectile/bullet/junk/shock
name = "bundle of live electrical parts"
icon_state = "tesla_projectile"
damage = 15
embed_type = null
shrapnel_type = null
extra_damage_added_damage = 30
extra_damage_type = BURN
/obj/projectile/bullet/junk/shock/on_hit(atom/target, blocked = 0, pierce_hit)
. = ..()
if(isliving(target))
var/mob/living/victim = target
victim.electrocute_act(damage, src, siemens_coeff = 1, flags = SHOCK_NOSTUN)
/obj/projectile/bullet/junk/hunter
name = "junk hunter bullet"
icon_state = "gauss"
extra_damage_mob_biotypes = MOB_ROBOTIC | MOB_BEAST | MOB_SPECIAL
extra_damage_multiplier = 0
extra_damage_added_damage = 50
/obj/projectile/bullet/junk/ripper
name = "junk ripper bullet"
icon_state = "redtrac"
damage = 10
embed_type = /datum/embed_data/bullet_junk_ripper
wound_bonus = 10
bare_wound_bonus = 30
/datum/embed_data/bullet_junk_ripper
embed_chance=100
fall_chance=3
jostle_chance=4
ignore_throwspeed_threshold=TRUE
pain_stam_pct=0.4
pain_mult=5
jostle_pain_mult=6
rip_time=10
/obj/projectile/bullet/junk/reaper
name = "junk reaper bullet"
tracer_type = /obj/effect/projectile/tracer/sniper
impact_type = /obj/effect/projectile/impact/sniper
muzzle_type = /obj/effect/projectile/muzzle/sniper
hitscan = TRUE
impact_effect_type = null
hitscan_light_intensity = 3
hitscan_light_range = 0.75
hitscan_light_color_override = LIGHT_COLOR_DIM_YELLOW
muzzle_flash_intensity = 5
muzzle_flash_range = 1
muzzle_flash_color_override = LIGHT_COLOR_DIM_YELLOW
impact_light_intensity = 5
impact_light_range = 1
impact_light_color_override = LIGHT_COLOR_DIM_YELLOW