From e3585a940692d5df891015fa9d28b359b6fb2ddf Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 20 Sep 2020 01:35:31 +0200 Subject: [PATCH] [MIRROR] Excessive spinning makes you woozy (#878) * Excessive spinning makes you woozy (#53805) When attempting to spin while it's on cooldown carbons get a bit of dizziness and confusion in increments, and once it reaches a certain point they no longer get more confused, instead puking without purging their reagents. This doesn't affect simplemobs, silicons, or using fists of the northstar to beyblade as a tot. * Excessive spinning makes you woozy Co-authored-by: ArcaneDefence <51932756+ArcaneDefence@users.noreply.github.com> --- code/modules/mob/emote.dm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm index 9d9c6cecf6a..8d5835f1f9f 100644 --- a/code/modules/mob/emote.dm +++ b/code/modules/mob/emote.dm @@ -1,3 +1,10 @@ +#define BEYBLADE_PUKE_THRESHOLD 30 //How confused a carbon must be before they will vomit +#define BEYBLADE_PUKE_NUTRIENT_LOSS 60 //How must nutrition is lost when a carbon pukes +#define BEYBLADE_DIZZINESS_PROBABILITY 20 //How often a carbon becomes penalized +#define BEYBLADE_DIZZINESS_VALUE 10 //How long the screenshake lasts +#define BEYBLADE_CONFUSION_INCREMENT 10 //How much confusion a carbon gets when penalized +#define BEYBLADE_CONFUSION_LIMIT 40 //A max for how penalized a carbon will be for beyblading + //The code execution of the emote datum is located at code/datums/emotes.dm /mob/proc/emote(act, m_type = null, message = null, intentional = FALSE) act = lowertext(act) @@ -83,3 +90,29 @@ riding_datum.force_dismount(M) else L.unbuckle_all_mobs() + +/datum/emote/spin/check_cooldown(mob/living/carbon/user, intentional) + . = ..() + if(.) + return + if(!can_run_emote(user, intentional=intentional)) + return + if(!iscarbon(user)) + return + var/current_confusion = user.get_confusion() + if(current_confusion > BEYBLADE_PUKE_THRESHOLD) + user.vomit(BEYBLADE_PUKE_NUTRIENT_LOSS, distance = 0) + return + if(prob(BEYBLADE_DIZZINESS_PROBABILITY)) + to_chat(user, "You feel woozy from spinning.") + user.Dizzy(BEYBLADE_DIZZINESS_VALUE) + if(current_confusion < BEYBLADE_CONFUSION_LIMIT) + user.add_confusion(BEYBLADE_CONFUSION_INCREMENT) + + +#undef BEYBLADE_PUKE_THRESHOLD +#undef BEYBLADE_PUKE_NUTRIENT_LOSS +#undef BEYBLADE_DIZZINESS_PROBABILITY +#undef BEYBLADE_DIZZINESS_VALUE +#undef BEYBLADE_CONFUSION_INCREMENT +#undef BEYBLADE_CONFUSION_LIMIT