Files
Bubberstation/code/modules/projectiles/projectile/beams.dm
necromanceranne 8f15d0ea2c Adds .38 Flare, which is a lethal laser bullet casing available for printing with Advanced Beam Weaponry. Adjust ammo material values. (#91726)
## About The Pull Request


![image](https://github.com/user-attachments/assets/1332d28c-8d5f-41b7-a614-b74027210145)

Adds the .38 Flare. It does 20 damage. This round highlights the target
for 2 minutes, and projectiles hitting the target always hit the limb
that the shooter was aiming at. Your shot has effectively perfect limb
accuracy, no matter how far the bullet needs to travel. This also
affects other projectiles hitting the target that aren't the .38 Flare.

To indicate whether or not a round in a magazine is either lead or
laser, I've borrowed the implementation of ammo overlays from the C-20r
toy magazines Now each bullet in the speedloaders for .38 can be a
distinct type visibly. Might be interesting if anyone wants to add
additional unique appearances for some of the other .38 rounds.

Reduces the overall cost of a lot of the ammunition in the sec and
autolathe, such as loose bullets. Also reduces the material quantity
within bullet casings.

## Why It's Good For The Game

> .38 Flare

By popular demand, I've come up with a new idea. And that idea...is an
anti-bullet deviation tool. Most players are probably not conscious of
bullet deviation. But if you're familiar with the mechanic, it's why
sometimes your shots may hit into an arm or a leg even though you were
aiming at the head.

The way this works is that over the course of a bullets flight, it
increases in inaccuracy and the pobability of drifting into a limb. From
my last estimate, shooting somewhere around 5 tiles away will usually
result in bullet drift.

While affected by the flare shot, that does not happen. You shoot at the
head, you hit the head.

To put it into perspective; you could consider bullet deviation a form
of damage loss (its a bit more complicated than this and there are
instances where it is positive), and this projectile eliminates that
problem for everyone shooting the target.

> Ammo cost

Some of these were pretty excessive for the cost, and a notable example
of this include the .357 loose casings, .310 Surplus loose casings, and
most shotgun shells. These should go down to roughly below 3/5th of a
sheet of metal when printed from a fully upgraded lathe.

Meanwhile, a single bullet casing was like a sheet of metal each, which
didn't seem right to me. So they're now by default one fifth of a sheet
of metal on recycle.

## Changelog
🆑
add: .38 Flare, a laser bullet! Available in both .38 speedloader and
BR-38 magazine once Advanced Beam Weaponry is researched.
add: .38 Flare highlights the target in an outline and makes sure your
bullets never accidentally hit any limb except the one you are aiming
at. Never accidentally hit someone in the arm when you were going for a
headshot.
balance: Reduces the printing costs of several ammunition types from the
autolathe and security lathe. Reduces the overall material contents of
said printed ammo/magazines. If you find a material dupe, let a coder
know.
/🆑

---------

Co-authored-by: projectkepler-RU <99981766+projectkepler-ru@users.noreply.github.com>
Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
2025-07-09 17:11:23 +00:00

292 lines
8.3 KiB
Plaintext

/obj/projectile/beam
name = "laser"
icon_state = "laser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 20
damage_type = BURN
hitsound = 'sound/items/weapons/sear.ogg'
hitsound_wall = 'sound/items/weapons/effects/searwall.ogg'
armor_flag = LASER
eyeblur = 4 SECONDS
impact_effect_type = /obj/effect/temp_visual/impact_effect/red_laser
light_system = OVERLAY_LIGHT
light_range = 1
light_power = 1.4
light_color = COLOR_SOFT_RED
ricochets_max = 50 //Honk!
ricochet_chance = 80
reflectable = TRUE
wound_bonus = -20
exposed_wound_bonus = 10
/obj/projectile/beam/laser
tracer_type = /obj/effect/projectile/tracer/laser
muzzle_type = /obj/effect/projectile/muzzle/laser
impact_type = /obj/effect/projectile/impact/laser
wound_bonus = -20
damage = 25
exposed_wound_bonus = 40
/obj/projectile/beam/laser/carbine
icon_state = "carbine_laser"
impact_effect_type = /obj/effect/temp_visual/impact_effect/yellow_laser
damage = 10
/obj/projectile/beam/laser/carbine/practice
name = "practice laser"
impact_effect_type = /obj/effect/temp_visual/impact_effect/yellow_laser
damage = 0
/obj/projectile/beam/laser/carbine/cybersun
name = "red plasma beam"
icon_state = "lava"
light_color = COLOR_DARK_RED
impact_effect_type = /obj/effect/temp_visual/impact_effect/red_laser
damage = 9
wound_bonus = -40
speed = 0.9
//overclocked laser, does a bit more damage but has much higher wound power (-0 vs -20)
/obj/projectile/beam/laser/hellfire
name = "hellfire laser"
icon_state = "hellfire"
wound_bonus = 0
damage = 30
speed = 1.6
light_color = "#FF969D"
/obj/projectile/beam/laser/flare
name = "flare particle"
icon_state = "flare"
light_range = 2
light_power = 3
damage = 20
wound_bonus = -15
exposed_wound_bonus = 15
/obj/projectile/beam/laser/flare/on_hit(atom/target, blocked, pierce_hit)
. = ..()
if(!isliving(target))
return
var/mob/living/designated_target = target
designated_target.apply_status_effect(/datum/status_effect/designated_target)
/obj/projectile/beam/laser/heavylaser
name = "heavy laser"
icon_state = "heavylaser"
damage = 40
tracer_type = /obj/effect/projectile/tracer/heavy_laser
muzzle_type = /obj/effect/projectile/muzzle/heavy_laser
impact_type = /obj/effect/projectile/impact/heavy_laser
/obj/projectile/beam/laser/on_hit(atom/target, blocked = 0, pierce_hit)
. = ..()
if(iscarbon(target))
var/mob/living/carbon/M = target
M.ignite_mob()
else if(isturf(target))
impact_effect_type = /obj/effect/temp_visual/impact_effect/red_laser/wall
/obj/projectile/beam/laser/musket
name = "low-power laser"
icon_state = "laser_musket"
impact_effect_type = /obj/effect/temp_visual/impact_effect/purple_laser
damage = 28
stamina = 35
light_color = COLOR_STRONG_VIOLET
weak_against_armour = TRUE
/obj/projectile/beam/laser/musket/prime
name = "mid-power laser"
damage = 25
stamina = 20
weak_against_armour = FALSE
/obj/projectile/beam/weak
damage = 15
/obj/projectile/beam/weak/penetrator
armour_penetration = 50
/obj/projectile/beam/practice
name = "practice laser"
damage = 0
/obj/projectile/beam/scatter
name = "laser pellet"
icon_state = "scatterlaser"
damage = 7.5
wound_bonus = 5
exposed_wound_bonus = 5
damage_falloff_tile = -0.45
wound_falloff_tile = -2.5
/obj/projectile/beam/scatter/pathetic
name = "extremely weak laser pellet"
damage = 1
wound_bonus = 0
damage_falloff_tile = -0.1
color = "#dbc11d"
hitsound = 'sound/items/bikehorn.ogg' //honk
hitsound_wall = 'sound/items/bikehorn.ogg'
/obj/projectile/beam/xray
name = "\improper X-ray beam"
icon_state = "xray"
damage = 15
range = 15
armour_penetration = 100
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE | PASSCLOSEDTURF | PASSMACHINE | PASSSTRUCTURE | PASSDOORS
impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser
light_color = LIGHT_COLOR_GREEN
tracer_type = /obj/effect/projectile/tracer/xray
muzzle_type = /obj/effect/projectile/muzzle/xray
impact_type = /obj/effect/projectile/impact/xray
/obj/projectile/beam/disabler
name = "disabler beam"
icon_state = "omnilaser"
damage = 30
damage_type = STAMINA
armor_flag = ENERGY
hitsound = 'sound/items/weapons/sear_disabler.ogg'
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
light_color = LIGHT_COLOR_BLUE
tracer_type = /obj/effect/projectile/tracer/disabler
muzzle_type = /obj/effect/projectile/muzzle/disabler
impact_type = /obj/effect/projectile/impact/disabler
/obj/projectile/beam/disabler/weak
damage = 15
/obj/projectile/beam/disabler/scatter
name = "scatter disabler"
icon_state = "scatterdisabler"
damage = 5.5
damage_falloff_tile = -0.5
speed = 1.2
impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser
tracer_type = /obj/effect/projectile/tracer/xray
muzzle_type = /obj/effect/projectile/muzzle/xray
impact_type = /obj/effect/projectile/impact/xray
/obj/projectile/beam/disabler/smoothbore
name = "unfocused disabler beam"
weak_against_armour = TRUE
/obj/projectile/beam/disabler/smoothbore/prime
name = "focused disabler beam"
weak_against_armour = FALSE
damage = 35 //slight increase in damage just for the hell of it
/obj/projectile/beam/pulse
name = "pulse"
icon_state = "u_laser"
damage = 50
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
light_color = LIGHT_COLOR_BLUE
tracer_type = /obj/effect/projectile/tracer/pulse
muzzle_type = /obj/effect/projectile/muzzle/pulse
impact_type = /obj/effect/projectile/impact/pulse
wound_bonus = 10
/obj/projectile/beam/pulse/on_hit(atom/target, blocked = 0, pierce_hit)
. = ..()
if (!QDELETED(target) && (isturf(target) || isstructure(target)))
if(isobj(target))
SSexplosions.med_mov_atom += target
else
SSexplosions.medturf += target
/obj/projectile/beam/pulse/shotgun
damage = 30
/obj/projectile/beam/pulse/heavy
name = "heavy pulse laser"
icon_state = "pulse1_bl"
projectile_piercing = ALL
var/pierce_hits = 2
/obj/projectile/beam/pulse/heavy/on_hit(atom/target, blocked = 0, pierce_hit)
if(pierce_hits <= 0)
projectile_piercing = NONE
pierce_hits -= 1
return ..()
/obj/projectile/beam/emitter
name = "emitter beam"
icon_state = "emitter"
damage = 30
impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser
light_color = LIGHT_COLOR_GREEN
wound_bonus = -40
exposed_wound_bonus = 70
/obj/projectile/beam/emitter/singularity_pull(atom/singularity, current_size)
return //don't want the emitters to miss
/obj/projectile/beam/emitter/hitscan
icon_state = null
hitscan = TRUE
muzzle_type = /obj/effect/projectile/muzzle/laser/emitter
tracer_type = /obj/effect/projectile/tracer/laser/emitter
impact_type = /obj/effect/projectile/impact/laser/emitter
impact_effect_type = null
hitscan_light_intensity = 3
hitscan_light_range = 0.75
hitscan_light_color_override = COLOR_LIME
muzzle_flash_intensity = 6
muzzle_flash_range = 2
muzzle_flash_color_override = COLOR_LIME
impact_light_intensity = 7
impact_light_range = 2.5
impact_light_color_override = COLOR_LIME
/obj/projectile/beam/lasertag
name = "laser tag beam"
icon_state = "omnilaser"
hitsound = null
damage = 0
damage_type = STAMINA
var/suit_types = list(/obj/item/clothing/suit/redtag, /obj/item/clothing/suit/bluetag)
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
light_color = LIGHT_COLOR_BLUE
/obj/projectile/beam/lasertag/on_hit(atom/target, blocked = 0, pierce_hit)
. = ..()
if(ishuman(target))
var/mob/living/carbon/human/M = target
if(istype(M.wear_suit))
if(M.wear_suit.type in suit_types)
M.adjustStaminaLoss(34)
/obj/projectile/beam/lasertag/redtag
icon_state = "laser"
suit_types = list(/obj/item/clothing/suit/bluetag)
impact_effect_type = /obj/effect/temp_visual/impact_effect/red_laser
light_color = COLOR_SOFT_RED
tracer_type = /obj/effect/projectile/tracer/laser
muzzle_type = /obj/effect/projectile/muzzle/laser
impact_type = /obj/effect/projectile/impact/laser
/obj/projectile/beam/lasertag/redtag/hitscan
icon_state = null
hitscan = TRUE
/obj/projectile/beam/lasertag/bluetag
icon_state = "bluelaser"
suit_types = list(/obj/item/clothing/suit/redtag)
tracer_type = /obj/effect/projectile/tracer/laser/blue
muzzle_type = /obj/effect/projectile/muzzle/laser/blue
impact_type = /obj/effect/projectile/impact/laser/blue
/obj/projectile/beam/lasertag/bluetag/hitscan
icon_state = null
hitscan = TRUE
/obj/projectile/magic/shrink/alien
antimagic_flags = NONE
shrink_time = 9 SECONDS