mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
Fixes curse of madness
🆑 coiax fix: Fixes bug where Curse of Madness was not giving proper brain traumas. /🆑 Also adds some messages so magic immune and foil hatted people on the station plus observers will know when a curse of madness is cast/badminned.
This commit is contained in:
@@ -4,26 +4,34 @@
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] sent a curse of madness with the message \"[message]\"!")
|
||||
log_game("[key_name(user)] sent a curse of madness with the message \"[message]\"!")
|
||||
|
||||
for(var/mob/living/carbon/human/H in GLOB.player_list)
|
||||
for(var/M in GLOB.player_list)
|
||||
var/turf/T = get_turf(H)
|
||||
if(M.stat == DEAD || isobserver(M))
|
||||
to_chat(H, "A dark breeze whispers, \"<span class='hypnophrase'>[message]</span>\" into every ear...</span>")
|
||||
continue
|
||||
|
||||
if(!ishuman(M))
|
||||
continue
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(T && !is_station_level(T.z))
|
||||
continue
|
||||
if(H.stat == DEAD)
|
||||
continue
|
||||
if(H.anti_magic_check(TRUE, FALSE))
|
||||
to_chat(H, "<span class='notice'>You have a strange feeling for a moment, but then it passes.</span>")
|
||||
continue
|
||||
if(istype(H.get_item_by_slot(SLOT_HEAD), /obj/item/clothing/head/foilhat))
|
||||
to_chat(H, "<span class='warning'>Your protective headgear successfully deflects mind controlling brainwaves!</span>")
|
||||
continue
|
||||
H.playsound_local(H,'sound/hallucinations/veryfar_noise.ogg',40,1)
|
||||
to_chat(H, "<span class='hypnophrase'>[message]</span>")
|
||||
to_chat(H, "<span class='warning'>Your mind shatters!</span>")
|
||||
switch(rand(1,10))
|
||||
if(1 to 3)
|
||||
H.gain_trauma(BRAIN_TRAUMA_MILD, TRAUMA_RESILIENCE_LOBOTOMY)
|
||||
H.gain_trauma(BRAIN_TRAUMA_MILD, TRAUMA_RESILIENCE_LOBOTOMY)
|
||||
H.gain_trauma_type(BRAIN_TRAUMA_MILD, TRAUMA_RESILIENCE_LOBOTOMY)
|
||||
H.gain_trauma_type(BRAIN_TRAUMA_MILD, TRAUMA_RESILIENCE_LOBOTOMY)
|
||||
if(4 to 6)
|
||||
H.gain_trauma(BRAIN_TRAUMA_SEVERE, TRAUMA_RESILIENCE_LOBOTOMY)
|
||||
H.gain_trauma_type(BRAIN_TRAUMA_SEVERE, TRAUMA_RESILIENCE_LOBOTOMY)
|
||||
if(7 to 8)
|
||||
H.gain_trauma(BRAIN_TRAUMA_MAGIC, TRAUMA_RESILIENCE_LOBOTOMY)
|
||||
H.gain_trauma_type(BRAIN_TRAUMA_MAGIC, TRAUMA_RESILIENCE_LOBOTOMY)
|
||||
if(9 to 10)
|
||||
H.gain_trauma(BRAIN_TRAUMA_SPECIAL, TRAUMA_RESILIENCE_LOBOTOMY)
|
||||
H.gain_trauma_type(BRAIN_TRAUMA_SPECIAL, TRAUMA_RESILIENCE_LOBOTOMY)
|
||||
|
||||
Reference in New Issue
Block a user