From 1e8227346cae23c9384e4ac704f7f12a3357b444 Mon Sep 17 00:00:00 2001 From: Seris02 Date: Sat, 30 Nov 2019 00:50:27 +0800 Subject: [PATCH 1/5] adds sleeping carp wrist wrench/violent grab hallucination --- code/modules/flufftext/Hallucination.dm | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index b5f02b79d7..cf2c3ace61 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -1294,3 +1294,29 @@ GLOBAL_LIST_INIT(hallucination_list, list( H.preparePixelProjectile(target, start) H.fire() qdel(src) + +/datum/hallucination/sleeping_carp + +/datum/hallucination/sleeping_carp/New(mob/living/carbon/C, forced = TRUE) + set waitfor = FALSE + ..() + var/list/mobsyup = list() + for (var/mob/living/carbon/A in orange(C,2)) + if (get_dist(C,A) < 2 && C != A) + mobsyup += list(A) + if (mobsyup.len == 0) + qdel(src) + return + var/mob/living/carbon/G = pick(mobsyup) + if (rand(0,1)) + C.visible_message("[C] falls to the ground screaming and clutching [G.p_their()] wrist!", \ + "[G] grabs your wrist and violently wrenches it to the side!") + C.emote("scream") + C.dropItemToGround(C.get_active_held_item()) + C.Knockdown(60) + qdel(src) + return + else + to_chat(C,"[G] violently grabs you!") + qdel(src) + return \ No newline at end of file From a4fb86df48eaa699cc996cec00742d4d376286da Mon Sep 17 00:00:00 2001 From: Seris02 Date: Sat, 30 Nov 2019 01:00:23 +0800 Subject: [PATCH 2/5] forgot to add it to the list of hallucinations you can have --- code/modules/flufftext/Hallucination.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index cf2c3ace61..84aff0f061 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -21,7 +21,8 @@ GLOBAL_LIST_INIT(hallucination_list, list( /datum/hallucination/delusion = 2, /datum/hallucination/shock = 1, /datum/hallucination/death = 1, - /datum/hallucination/oh_yeah = 1 + /datum/hallucination/oh_yeah = 1, + /datum/hallucination/sleeping_carp = 1 )) From 84c2b7cef6d81fe8c44515bdd15da3d8415cb675 Mon Sep 17 00:00:00 2001 From: Seris02 <49109742+Seris02@users.noreply.github.com> Date: Sat, 30 Nov 2019 10:02:23 +0800 Subject: [PATCH 3/5] Update code/modules/flufftext/Hallucination.dm Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com> --- code/modules/flufftext/Hallucination.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 84aff0f061..663591dda6 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -1310,7 +1310,7 @@ GLOBAL_LIST_INIT(hallucination_list, list( return var/mob/living/carbon/G = pick(mobsyup) if (rand(0,1)) - C.visible_message("[C] falls to the ground screaming and clutching [G.p_their()] wrist!", \ + C.visible_message("[C] falls to the ground screaming and clutching [C.p_their()] wrist!", \ "[G] grabs your wrist and violently wrenches it to the side!") C.emote("scream") C.dropItemToGround(C.get_active_held_item()) @@ -1320,4 +1320,4 @@ GLOBAL_LIST_INIT(hallucination_list, list( else to_chat(C,"[G] violently grabs you!") qdel(src) - return \ No newline at end of file + return From 9788586bb2c6c67524a463091fe97e7c831810d3 Mon Sep 17 00:00:00 2001 From: Seris02 Date: Sat, 30 Nov 2019 10:23:22 +0800 Subject: [PATCH 4/5] fixes some things :hjonk: --- code/modules/flufftext/Hallucination.dm | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 84aff0f061..f3c2fba686 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -1301,23 +1301,20 @@ GLOBAL_LIST_INIT(hallucination_list, list( /datum/hallucination/sleeping_carp/New(mob/living/carbon/C, forced = TRUE) set waitfor = FALSE ..() - var/list/mobsyup = list() - for (var/mob/living/carbon/A in orange(C,2)) - if (get_dist(C,A) < 2 && C != A) - mobsyup += list(A) - if (mobsyup.len == 0) + var/list/mobsyup + for (var/mob/living/carbon/A in orange(C,1)) + if (get_dist(C,A) < 2) + LAZYADD(mobsyup,A) + if (!LAZYLEN(mobsyup)) qdel(src) return var/mob/living/carbon/G = pick(mobsyup) if (rand(0,1)) - C.visible_message("[C] falls to the ground screaming and clutching [G.p_their()] wrist!", \ + C.visible_message("[C] falls to the ground screaming and clutching [C.p_their()] wrist!", \ "[G] grabs your wrist and violently wrenches it to the side!") C.emote("scream") C.dropItemToGround(C.get_active_held_item()) C.Knockdown(60) - qdel(src) - return else to_chat(C,"[G] violently grabs you!") - qdel(src) - return \ No newline at end of file + qdel(src) \ No newline at end of file From cebf2d2de293fc40f344da3ee8a478e3bdb9e6bb Mon Sep 17 00:00:00 2001 From: Seris02 <49109742+Seris02@users.noreply.github.com> Date: Mon, 2 Dec 2019 00:30:20 +0800 Subject: [PATCH 5/5] does putnam's suggestion I edited this on a web browser so if it breaks blame putnam --- code/modules/flufftext/Hallucination.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 2efea6db8c..f5262742e2 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -1309,7 +1309,7 @@ GLOBAL_LIST_INIT(hallucination_list, list( qdel(src) return var/mob/living/carbon/G = pick(mobsyup) - if (rand(0,1)) + if (prob(50)) C.visible_message("[C] falls to the ground screaming and clutching [C.p_their()] wrist!", \ "[G] grabs your wrist and violently wrenches it to the side!") C.emote("scream")