Files
fulpstation/code/__HELPERS/honkerblast.dm
John Willard 7199947c08 [MDB IGNORE] [IDB IGNORE] WIP TGU (#1427)
Several months worth of updates.

---------

Co-authored-by: A miscellaneous Fern <80640114+FernandoJ8@users.noreply.github.com>
Co-authored-by: Pepsilawn <reisenrui@gmail.com>
Co-authored-by: Ray <64306407+OneAsianTortoise@users.noreply.github.com>
Co-authored-by: Cure221 <106662180+Cure221@users.noreply.github.com>
2025-11-06 08:20:20 -05:00

45 lines
1.7 KiB
Plaintext

///Unleashes a honkerblast similar to the honkmech weapon, but with more granular control.
/proc/honkerblast(atom/origin, light_range = 1, medium_range = 0, heavy_range = 0)
var/origin_turf = get_turf(origin)
var/list/lightly_honked = list()
var/list/properly_honked = list()
var/list/severely_honked = list()
playsound(origin_turf, 'sound/items/airhorn/airhorn.ogg', 100, TRUE)
for(var/mob/living/carbon/victim in hearers(max(light_range, medium_range, heavy_range), origin_turf))
if(!victim.can_hear())
continue
var/distance = get_dist(origin_turf, victim.loc)
if(distance <= heavy_range)
severely_honked += victim
else if(distance <= medium_range)
properly_honked += victim
else if(distance <= light_range)
lightly_honked += victim
for(var/mob/living/carbon/victim in severely_honked)
victim.Unconscious(40)
victim.Stun(100)
victim.adjust_stutter(30 SECONDS)
victim.set_jitter_if_lower(1000 SECONDS)
victim.sound_damage(10, 30 SECONDS)
to_chat(victim, "<font color='red' size='8'>HONK</font>")
var/obj/item/clothing/shoes/victim_shoes = victim.get_item_by_slot(ITEM_SLOT_FEET)
if(!victim_shoes || victim_shoes.fastening_type == SHOES_SLIPON)
continue
victim_shoes.adjust_laces(SHOES_KNOTTED)
for(var/mob/living/carbon/victim in properly_honked)
victim.Paralyze(20)
victim.Stun(50)
victim.set_jitter_if_lower(500 SECONDS)
victim.sound_damage(7, 20 SECONDS)
to_chat(victim, "<font color='red' size='5'>HONK</font>")
for(var/mob/living/carbon/victim in lightly_honked)
victim.Knockdown(20)
victim.set_jitter_if_lower(200 SECONDS)
victim.sound_damage(4, 10 SECONDS)
to_chat(victim, "<font color='red' size='2'>HONK</font>")