Adds a hypnotic flashbang to the uplink (#49137)

Adds a hypnotic flashbang, disguised as a regular flashbang, to the traitor/nuke op uplink. Pretty much an AoE one-use hypnotic flash, but it doesn't require weakening the targets as long as they can be affected by the sound of the grenade, since it causes minor hallucinations.
Why It's Good For The Game

Effectively this is a non-lethal, non-destructive chaos-making tool. Even without the hypnosis it's a better flashbang; if everything goes right you've got a roomful of followers obeying your orders, but on the other hand something might go wrong, and then Poly is the one with the roomful of followers.
Changelog

🆑
add: Added a hypnotic flashbang to the uplink for 12 TC. It can hypnotize people much like a hypnoflash, and the sound will automatically make victims vulnerable to the trance.
/🆑
This commit is contained in:
XDTM
2020-02-22 22:13:27 +13:00
committed by GitHub
parent cdd1244904
commit ef5ef2d463
4 changed files with 74 additions and 1 deletions
+66
View File
@@ -0,0 +1,66 @@
/obj/item/grenade/hypnotic
name = "flashbang"
desc = "A modified flashbang which uses hypnotic flashes and mind-altering soundwaves to induce an instant trance upon detonation."
icon_state = "flashbang"
item_state = "flashbang"
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
var/flashbang_range = 7
/obj/item/grenade/hypnotic/prime()
update_mob()
var/flashbang_turf = get_turf(src)
if(!flashbang_turf)
return
do_sparks(rand(5, 9), FALSE, src)
playsound(flashbang_turf, 'sound/effects/screech.ogg', 100, TRUE, 8, 0.9)
new /obj/effect/dummy/lighting_obj (flashbang_turf, LIGHT_COLOR_PURPLE, (flashbang_range + 2), 4, 2)
for(var/mob/living/M in get_hearers_in_view(flashbang_range, flashbang_turf))
bang(get_turf(M), M)
qdel(src)
/obj/item/grenade/hypnotic/proc/bang(turf/T, mob/living/M)
if(M.stat == DEAD) //They're dead!
return
var/distance = max(0,get_dist(get_turf(src),T))
//Bang
var/hypno_sound = FALSE
//Hearing protection check
if(iscarbon(M))
var/mob/living/carbon/C = M
var/list/reflist = list(1)
SEND_SIGNAL(C, COMSIG_CARBON_SOUNDBANG, reflist)
var/intensity = reflist[1]
var/ear_safety = C.get_ear_protection()
var/effect_amount = intensity - ear_safety
if(effect_amount > 0)
hypno_sound = TRUE
if(!distance || loc == M || loc == M.loc)
M.Paralyze(10)
M.Knockdown(100)
to_chat(M, "<span class='hypnophrase'>The sound echoes in your brain...</span>")
M.hallucination += 50
else
if(distance <= 1)
M.Paralyze(5)
M.Knockdown(30)
if(hypno_sound)
to_chat(M, "<span class='hypnophrase'>The sound echoes in your brain...</span>")
M.hallucination += 50
//Flash
if(M.flash_act(affect_silicon = 1))
M.Paralyze(max(10/max(1,distance), 5))
M.Knockdown(max(100/max(1,distance), 40))
if(iscarbon(M))
var/mob/living/carbon/C = M
if(C.hypnosis_vulnerable()) //The sound causes the necessary conditions unless the target has mindshield or hearing protection
C.apply_status_effect(/datum/status_effect/trance, 100, TRUE)
else
to_chat(C, "<span class='hypnophrase'>The light is so pretty...</span>")
C.confused += min(C.confused + 10, 20)
C.dizziness += min(C.dizziness + 10, 20)
C.drowsyness += min(C.drowsyness + 10, 20)
+1 -1
View File
@@ -278,7 +278,7 @@
user.visible_message("<span class='danger'>[user] blinds [M] with the flash!</span>", "<span class='danger'>You hypno-flash [M]!</span>")
if(!hypnosis)
to_chat(M, "<span class='notice'>The light makes you feel oddly relaxed...</span>")
to_chat(M, "<span class='hypnophrase'>The light makes you feel oddly relaxed...</span>")
M.confused += min(M.confused + 10, 20)
M.dizziness += min(M.dizziness + 10, 20)
M.drowsyness += min(M.drowsyness + 10, 20)
+6
View File
@@ -1369,6 +1369,12 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
item = /obj/item/assembly/flash/hypnotic
cost = 7
/datum/uplink_item/device_tools/hypnotic_grenade
name = "Hypnotic Grenade"
desc = "A modified flashbang grenade able to hypnotize targets. The sound portion of the flashbang causes hallucinations, and will allow the flash to induce a hypnotic trance to viewers."
item = /obj/item/grenade/hypnotic
cost = 12
/datum/uplink_item/device_tools/medgun
name = "Medbeam Gun"
desc = "A wonder of Syndicate engineering, the Medbeam gun, or Medi-Gun enables a medic to keep his fellow \
+1
View File
@@ -1016,6 +1016,7 @@
#include "code\game\objects\items\grenades\flashbang.dm"
#include "code\game\objects\items\grenades\ghettobomb.dm"
#include "code\game\objects\items\grenades\grenade.dm"
#include "code\game\objects\items\grenades\hypno.dm"
#include "code\game\objects\items\grenades\plastic.dm"
#include "code\game\objects\items\grenades\smokebomb.dm"
#include "code\game\objects\items\grenades\spawnergrenade.dm"