mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 04:28:12 +01:00
Reduce Clumsy Gene's Obnoxious RNG (#19126)
* clumsy rng * seperate define for this too * there are very harmful too * replace with macros * fixed handling --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -145,3 +145,5 @@
|
||||
// Misc
|
||||
#define TK_DENIED_MESSAGE span_warning("You are too distracted to focus your telekinesis.")
|
||||
#define TK_OUTRANGED_MESSAGE span_notice("Your telekinesis won't reach that far.")
|
||||
#define CLUMSY_FAIL_CHANCE(U) ((CLUMSY in U.mutations) && prob(15))
|
||||
#define CLUMSY_HARM_CHANCE(U) ((CLUMSY in U.mutations) && prob(10))
|
||||
|
||||
@@ -724,7 +724,7 @@ GLOBAL_LIST_INIT(slot_flags_enumeration, list(
|
||||
user.do_attack_animation(M)
|
||||
|
||||
src.add_fingerprint(user)
|
||||
//if((CLUMSY in user.mutations) && prob(50))
|
||||
//if(CLUMSY_HARM_CHANCE(user))
|
||||
// M = user
|
||||
/*
|
||||
to_chat(M, span_warning("You stab yourself in the eye."))
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
return null
|
||||
|
||||
/obj/item/flash/proc/clown_check(var/mob/user)
|
||||
if(user && (CLUMSY in user.mutations) && prob(50))
|
||||
if(user && CLUMSY_FAIL_CHANCE(user))
|
||||
to_chat(user, span_warning("\The [src] slips out of your hand."))
|
||||
user.drop_item()
|
||||
return 0
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
add_fingerprint(user)
|
||||
if(on && user.zone_sel.selecting == O_EYES)
|
||||
|
||||
if((CLUMSY in user.mutations) && prob(50)) //too dumb to use flashlight properly
|
||||
if(CLUMSY_FAIL_CHANCE(user)) //too dumb to use flashlight properly
|
||||
return ..() //just hit them in the head
|
||||
|
||||
var/mob/living/carbon/human/H = M //mob has protective eyewear
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
/obj/item/healthanalyzer/proc/scan_mob(mob/living/M, mob/living/user)
|
||||
var/dat = ""
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
if (CLUMSY_FAIL_CHANCE(user))
|
||||
user.visible_message(span_warning("\The [user] has analyzed the floor's vitals!"), span_warning("You try to analyze the floor's vitals!"))
|
||||
dat += "Analyzing Results for the floor:<br>"
|
||||
dat += "Overall Status: Healthy<br>"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
drop_sound = 'sound/items/drop/device.ogg'
|
||||
|
||||
/obj/item/grenade/proc/clown_check(var/mob/living/user)
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
if(CLUMSY_HARM_CHANCE(user))
|
||||
to_chat(user, span_warning("Huh? How does this thing work?"))
|
||||
|
||||
activate(user)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
if(!user.IsAdvancedToolUser())
|
||||
return
|
||||
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
if (CLUMSY_FAIL_CHANCE(user))
|
||||
to_chat(user, span_warning("Uh ... how do those things work?!"))
|
||||
attempt_to_cuff(user, user)
|
||||
return
|
||||
@@ -227,7 +227,7 @@
|
||||
if(!user.IsAdvancedToolUser())
|
||||
return
|
||||
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
if (CLUMSY_FAIL_CHANCE(user))
|
||||
to_chat(user, span_warning("Uh ... how do those things work?!"))
|
||||
place_legcuffs(user, user)
|
||||
return
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
if(user.a_intent != I_HELP)
|
||||
if(user.zone_sel.selecting == BP_HEAD || user.zone_sel.selecting == O_EYES)
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
if(CLUMSY_HARM_CHANCE(user))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
else
|
||||
@@ -186,7 +186,7 @@
|
||||
|
||||
/* From the time of Clowns. Commented out for posterity, and sanity.
|
||||
/obj/item/material/knife/attack(target as mob, mob/living/user as mob)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
if (CLUMSY_HARM_CHANCE(user))
|
||||
to_chat(user, span_warning("You accidentally cut yourself with \the [src]."))
|
||||
user.take_organ_damage(20)
|
||||
return
|
||||
@@ -212,7 +212,7 @@
|
||||
pickup_sound = 'sound/items/pickup/wooden.ogg'
|
||||
|
||||
/obj/item/material/kitchen/rollingpin/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
if (CLUMSY_HARM_CHANCE(user))
|
||||
to_chat(user, span_warning("\The [src] slips out of your hand and hits your head."))
|
||||
user.take_organ_damage(10)
|
||||
user.Paralyse(2)
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
return
|
||||
|
||||
if (active)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
if (CLUMSY_HARM_CHANCE(user))
|
||||
user.visible_message(span_danger("\The [user] accidentally cuts [user.p_their()] with \the [src]."),\
|
||||
span_danger("You accidentally cut yourself with \the [src]."))
|
||||
user.take_organ_damage(5,5)
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
if (CLUMSY_FAIL_CHANCE(user))
|
||||
to_chat(user, span_warning("You beat yourself in the head with [src]."))
|
||||
user.take_organ_damage(5)
|
||||
active = !active
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/melee/baton/attack(mob/M, mob/user)
|
||||
if(status && (CLUMSY in user.mutations) && prob(50))
|
||||
if(status && CLUMSY_FAIL_CHANCE(user))
|
||||
to_chat(user, span_danger("You accidentally hit yourself with the [src]!"))
|
||||
user.Weaken(30)
|
||||
deductcharge(hitcost)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
pickup_sound = 'sound/items/pickup/crowbar.ogg'
|
||||
|
||||
/obj/item/melee/classic_baton/attack(mob/M as mob, mob/living/user as mob)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
if (CLUMSY_FAIL_CHANCE(user))
|
||||
to_chat(user, span_warning("You club yourself over the head."))
|
||||
user.Weaken(3 * force)
|
||||
if(ishuman(user))
|
||||
@@ -101,7 +101,7 @@
|
||||
|
||||
/obj/item/melee/telebaton/attack(mob/target as mob, mob/living/user as mob)
|
||||
if(on)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
if (CLUMSY_FAIL_CHANCE(user))
|
||||
to_chat(user, span_warning("You club yourself over the head."))
|
||||
user.Weaken(3 * force)
|
||||
if(ishuman(user))
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
return ..()
|
||||
if(user.zone_sel.selecting != O_EYES && user.zone_sel.selecting != BP_HEAD)
|
||||
return ..()
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
if(CLUMSY_HARM_CHANCE(user))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
sleep(rand(2,4))
|
||||
|
||||
|
||||
if((CLUMSY in user.mutations) && prob(50)) //What if he's a clown?
|
||||
if(CLUMSY_FAIL_CHANCE(user)) //What if he's a clown?
|
||||
to_chat(M, span_warning("You accidentally slam yourself with the [src]!"))
|
||||
M.Weaken(1)
|
||||
user.take_organ_damage(2)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
to_chat(user, span_danger("You don't have the dexterity to do this!"))
|
||||
return
|
||||
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
if(CLUMSY_HARM_CHANCE(user))
|
||||
to_chat(user, span_danger("The rod slips out of your hand and hits your head."))
|
||||
user.take_organ_damage(10)
|
||||
user.Paralyse(20)
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
if(!armed)
|
||||
to_chat(user, span_notice("You arm [src]."))
|
||||
else
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
if(CLUMSY_FAIL_CHANCE(user))
|
||||
var/which_hand = BP_L_HAND
|
||||
if(!user.hand)
|
||||
which_hand = BP_R_HAND
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
/obj/item/assembly/mousetrap/attack_hand(var/mob/living/user)
|
||||
if(armed)
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
if(CLUMSY_FAIL_CHANCE(user))
|
||||
var/which_hand = BP_L_HAND
|
||||
if(!user.hand)
|
||||
which_hand = BP_R_HAND
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
|
||||
activation_message="You feel lightheaded."
|
||||
primitive_expression_messages=list("trips.")
|
||||
mutation = CLUMSY
|
||||
|
||||
/datum/trait/negative/disability_coprolalia
|
||||
name = "Coprolalia"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
user.show_message(span_blue("[mode ? "Toggled to cyborg analyzing mode." : "Toggled to cyborg upgrade scan mode."]"), 1)
|
||||
|
||||
/obj/item/robotanalyzer/proc/do_scan(mob/living/M as mob, mob/living/user as mob)
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
if(CLUMSY_FAIL_CHANCE(user))
|
||||
to_chat(user, span_red("You try to analyze the floor's vitals!"))
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(span_red(text("[user] has analyzed the floor's vitals!")), 1)
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if((CLUMSY in usr.mutations) && prob(50))
|
||||
if(CLUMSY_FAIL_CHANCE(usr))
|
||||
to_chat(usr, span_warning("You cut yourself on the paper."))
|
||||
return
|
||||
var/n_name = sanitizeSafe(tgui_input_text(usr, "What would you like to label the paper?", "Paper Labelling", null, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
if(HULK in M.mutations)
|
||||
to_chat(M, span_danger("Your fingers are much too large for the trigger guard!"))
|
||||
return FALSE
|
||||
if((CLUMSY in M.mutations) && prob(40)) //Clumsy handling
|
||||
if(CLUMSY_HARM_CHANCE(M)) //Clumsy handling
|
||||
var/obj/P = consume_next_projectile()
|
||||
if(P)
|
||||
if(process_projectile(P, user, user, pick(BP_L_FOOT, BP_R_FOOT)))
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
if(.)
|
||||
return TRUE
|
||||
if (active)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
if (CLUMSY_HARM_CHANCE(user))
|
||||
user.visible_message(span_danger("\The [user] accidentally cuts [user.p_themselves()] with \the [src]."),\
|
||||
span_danger("You accidentally cut yourself with \the [src]."))
|
||||
user.take_organ_damage(5,5)
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
return
|
||||
|
||||
if(user.a_intent == I_HURT && ismob(target))
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
if(CLUMSY_HARM_CHANCE(user))
|
||||
target = user
|
||||
syringestab(target, user)
|
||||
return
|
||||
|
||||
@@ -1089,7 +1089,7 @@
|
||||
if(.)
|
||||
return TRUE
|
||||
if (active)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
if (CLUMSY_HARM_CHANCE(user))
|
||||
user.visible_message(span_danger("\The [user] accidentally cuts \himself with \the [src]."),\
|
||||
span_danger("You accidentally cut yourself with \the [src]."))
|
||||
user.take_organ_damage(5,5)
|
||||
|
||||
Reference in New Issue
Block a user