From 5759758caee3284c505457415c0146197009536f Mon Sep 17 00:00:00 2001 From: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Date: Fri, 12 Jul 2024 05:14:04 +0300 Subject: [PATCH] Experimentor malfunction reduction chance is now multiplicative. Copying is now slightly rarer. (#84858) ## About The Pull Request Alternative / supplementary to #84855. Currently Experimentor's malfunction reduction chance is additive instead of multiplicative, allowing to completely babyproof it. Chance to copy an object also has been lowered from 35% to 20% ## Why It's Good For The Game Copying critical items is a niche but cool thing. Removal of babyproofing will keep some risk of having your item destroyed, as bringing it down low enough to babyproof experimentor again is not possible by standard round's time constraints. ## Changelog :cl: balance: Experimentor's reduction chance is multiplicative, and chance to copy an object has been slightly lowered. /:cl: --- code/modules/research/experimentor.dm | 42 +++++++++++++-------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 2c670daecf212..9adbb641fe693 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -253,16 +253,16 @@ visible_message(span_notice("[exp_on] is gripped in just the right way, enhancing its focus.")) malfunction_probability_coeff_modifier++ RefreshParts() //recalculate malfunction_probability_coeff - else if(prob(EFFECT_PROB_VERYLOW-malfunction_probability_coeff)) + else if(prob(EFFECT_PROB_VERYLOW * (100 - malfunction_probability_coeff) * 0.01)) visible_message(span_danger("[src] malfunctions and destroys [exp_on], lashing its arms out at nearby people!")) for(var/mob/living/m in oview(1, src)) m.apply_damage(15, BRUTE, pick(BODY_ZONE_HEAD,BODY_ZONE_CHEST,BODY_ZONE_CHEST)) investigate_log("Experimentor dealt minor brute to [m].", INVESTIGATE_EXPERIMENTOR) ejectItem(TRUE) - else if(prob(EFFECT_PROB_LOW-malfunction_probability_coeff)) + else if(prob(EFFECT_PROB_LOW * (100 - malfunction_probability_coeff) * 0.01)) visible_message(span_warning("[src] malfunctions!")) exp = SCANTYPE_OBLITERATE - else if(prob(EFFECT_PROB_MEDIUM-malfunction_probability_coeff)) + else if(prob(EFFECT_PROB_MEDIUM * (100 - malfunction_probability_coeff) * 0.01)) visible_message(span_danger("[src] malfunctions, throwing the [exp_on]!")) var/mob/living/target = locate(/mob/living) in oview(7,src) if(target) @@ -274,23 +274,23 @@ //////////////////////////////////////////////////////////////////////////////////////////////// if(exp == SCANTYPE_IRRADIATE) visible_message(span_danger("[src] reflects radioactive rays at [exp_on]!")) - if(prob(EFFECT_PROB_LOW) && criticalReaction) + if(prob(EFFECT_PROB_VERYLOW) && criticalReaction) visible_message(span_notice("[exp_on] has activated an unknown subroutine!")) cloneMode = TRUE investigate_log("Experimentor has made a clone of [exp_on]", INVESTIGATE_EXPERIMENTOR) ejectItem() - else if(prob(EFFECT_PROB_VERYLOW-malfunction_probability_coeff)) + else if(prob(EFFECT_PROB_VERYLOW * (100 - malfunction_probability_coeff) * 0.01)) visible_message(span_danger("[src] malfunctions, melting [exp_on] and leaking radiation!")) radiation_pulse(src, max_range = 6, threshold = 0.3) ejectItem(TRUE) - else if(prob(EFFECT_PROB_LOW-malfunction_probability_coeff)) + else if(prob(EFFECT_PROB_LOW * (100 - malfunction_probability_coeff) * 0.01)) visible_message(span_warning("[src] malfunctions, spewing toxic waste!")) for(var/turf/T in oview(1, src)) if(!T.density) if(prob(EFFECT_PROB_VERYHIGH) && !(locate(/obj/effect/decal/cleanable/greenglow) in T)) var/obj/effect/decal/cleanable/reagentdecal = new/obj/effect/decal/cleanable/greenglow(T) reagentdecal.reagents.add_reagent(/datum/reagent/uranium/radium, 7) - else if(prob(EFFECT_PROB_MEDIUM-malfunction_probability_coeff)) + else if(prob(EFFECT_PROB_MEDIUM * (100 - malfunction_probability_coeff) * 0.01)) var/savedName = "[exp_on]" ejectItem(TRUE) var/newPath = text2path(pick_weight(valid_items())) @@ -307,7 +307,7 @@ if(prob(EFFECT_PROB_LOW) && criticalReaction) visible_message(span_notice("[exp_on] achieves the perfect mix!")) new /obj/item/stack/sheet/mineral/plasma(get_turf(pick(oview(1,src)))) - else if(prob(EFFECT_PROB_VERYLOW-malfunction_probability_coeff)) + else if(prob(EFFECT_PROB_VERYLOW * (100 - malfunction_probability_coeff) * 0.01)) visible_message(span_danger("[src] destroys [exp_on], leaking dangerous gas!")) chosenchem = pick(/datum/reagent/carbon,/datum/reagent/uranium/radium,/datum/reagent/toxin,/datum/reagent/consumable/condensedcapsaicin,/datum/reagent/drug/mushroomhallucinogen,/datum/reagent/drug/space_drugs,/datum/reagent/consumable/ethanol,/datum/reagent/consumable/ethanol/beepsky_smash) var/datum/reagents/tmp_holder = new/datum/reagents(50) @@ -320,7 +320,7 @@ smoke.start() qdel(tmp_holder) ejectItem(TRUE) - else if(prob(EFFECT_PROB_VERYLOW-malfunction_probability_coeff)) + else if(prob(EFFECT_PROB_VERYLOW * (100 - malfunction_probability_coeff) * 0.01)) visible_message(span_danger("[src]'s chemical chamber has sprung a leak!")) chosenchem = pick(/datum/reagent/mutationtoxin/classic,/datum/reagent/cyborg_mutation_nanomachines,/datum/reagent/toxin/acid) var/datum/reagents/tmp_holder = new/datum/reagents(50) @@ -334,10 +334,10 @@ ejectItem(TRUE) warn_admins(usr, "[chosenchem] smoke") investigate_log("Experimentor has released [chosenchem] smoke!", INVESTIGATE_EXPERIMENTOR) - else if(prob(EFFECT_PROB_LOW-malfunction_probability_coeff)) + else if(prob(EFFECT_PROB_LOW * (100 - malfunction_probability_coeff) * 0.01)) visible_message(span_warning("[src] malfunctions, spewing harmless gas.")) throwSmoke(loc) - else if(prob(EFFECT_PROB_MEDIUM-malfunction_probability_coeff)) + else if(prob(EFFECT_PROB_MEDIUM * (100 - malfunction_probability_coeff) * 0.01)) visible_message(span_warning("[src] melts [exp_on], ionizing the air around it!")) empulse(loc, 4, 6) investigate_log("Experimentor has generated an Electromagnetic Pulse.", INVESTIGATE_EXPERIMENTOR) @@ -355,7 +355,7 @@ C.name = "Cup of Suspicious Liquid" C.desc = "It has a large hazard symbol printed on the side in fading ink." investigate_log("Experimentor has made a cup of [chosenchem] coffee.", INVESTIGATE_EXPERIMENTOR) - else if(prob(EFFECT_PROB_VERYLOW-malfunction_probability_coeff)) + else if(prob(EFFECT_PROB_VERYLOW * (100 - malfunction_probability_coeff) * 0.01)) var/turf/start = get_turf(src) var/mob/M = locate(/mob/living) in view(src, 3) var/turf/MT = get_turf(M) @@ -365,12 +365,12 @@ var/obj/projectile/magic/fireball/FB = new /obj/projectile/magic/fireball(start) FB.preparePixelProjectile(MT, start) FB.fire() - else if(prob(EFFECT_PROB_LOW-malfunction_probability_coeff)) + else if(prob(EFFECT_PROB_LOW * (100 - malfunction_probability_coeff) * 0.01)) visible_message(span_danger("[src] malfunctions, melting [exp_on] and releasing a burst of flame!")) explosion(src, devastation_range = -1, flame_range = 2, adminlog = FALSE) investigate_log("Experimentor started a fire.", INVESTIGATE_EXPERIMENTOR) ejectItem(TRUE) - else if(prob(EFFECT_PROB_MEDIUM-malfunction_probability_coeff)) + else if(prob(EFFECT_PROB_MEDIUM * (100 - malfunction_probability_coeff) * 0.01)) visible_message(span_warning("[src] malfunctions, melting [exp_on] and leaking hot air!")) var/datum/gas_mixture/env = loc.return_air() if(env) @@ -379,7 +379,7 @@ air_update_turf(FALSE, FALSE) investigate_log("Experimentor has released hot air.", INVESTIGATE_EXPERIMENTOR) ejectItem(TRUE) - else if(prob(EFFECT_PROB_MEDIUM-malfunction_probability_coeff)) + else if(prob(EFFECT_PROB_MEDIUM * (100 - malfunction_probability_coeff) * 0.01)) visible_message(span_warning("[src] malfunctions, activating its emergency coolant systems!")) throwSmoke(loc) for(var/mob/living/m in oview(1, src)) @@ -399,7 +399,7 @@ C.name = "Cup of Suspicious Liquid" C.desc = "It has a large hazard symbol printed on the side in fading ink." investigate_log("Experimentor has made a cup of [chosenchem] coffee.", INVESTIGATE_EXPERIMENTOR) - else if(prob(EFFECT_PROB_VERYLOW-malfunction_probability_coeff)) + else if(prob(EFFECT_PROB_VERYLOW * (100 - malfunction_probability_coeff) * 0.01)) visible_message(span_danger("[src] malfunctions, shattering [exp_on] and releasing a dangerous cloud of coolant!")) var/datum/reagents/tmp_holder = new/datum/reagents(50) tmp_holder.my_atom = src @@ -411,7 +411,7 @@ smoke.start() qdel(tmp_holder) ejectItem(TRUE) - else if(prob(EFFECT_PROB_LOW-malfunction_probability_coeff)) + else if(prob(EFFECT_PROB_LOW * (100 - malfunction_probability_coeff) * 0.01)) visible_message(span_warning("[src] malfunctions, shattering [exp_on] and leaking cold air!")) var/datum/gas_mixture/env = loc.return_air() if(env) @@ -420,7 +420,7 @@ air_update_turf(FALSE, FALSE) investigate_log("Experimentor has released cold air.", INVESTIGATE_EXPERIMENTOR) ejectItem(TRUE) - else if(prob(EFFECT_PROB_MEDIUM-malfunction_probability_coeff)) + else if(prob(EFFECT_PROB_MEDIUM * (100 - malfunction_probability_coeff) * 0.01)) visible_message(span_warning("[src] malfunctions, releasing a flurry of chilly air as [exp_on] pops out!")) var/datum/effect_system/fluid_spread/smoke/smoke = new smoke.set_up(0, holder = src, location = loc) @@ -432,14 +432,14 @@ if(prob(EFFECT_PROB_LOW) && criticalReaction) visible_message(span_warning("[src]'s crushing mechanism slowly and smoothly descends, flattening the [exp_on]!")) new /obj/item/stack/sheet/plasteel(get_turf(pick(oview(1,src)))) - else if(prob(EFFECT_PROB_VERYLOW-malfunction_probability_coeff)) + else if(prob(EFFECT_PROB_VERYLOW * (100 - malfunction_probability_coeff) * 0.01)) visible_message(span_danger("[src]'s crusher goes way too many levels too high, crushing right through space-time!")) playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE, -3) investigate_log("Experimentor has triggered the 'throw things' reaction.", INVESTIGATE_EXPERIMENTOR) for(var/atom/movable/AM in oview(7,src)) if(!AM.anchored) AM.throw_at(src,10,1) - else if(prob(EFFECT_PROB_LOW-malfunction_probability_coeff)) + else if(prob(EFFECT_PROB_LOW * (100 - malfunction_probability_coeff) * 0.01)) visible_message(span_danger("[src]'s crusher goes one level too high, crushing right into space-time!")) playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE, -3) investigate_log("Experimentor has triggered the 'minor throw things' reaction.", INVESTIGATE_EXPERIMENTOR) @@ -466,7 +466,7 @@ ejectItem() //Global reactions - if(prob(EFFECT_PROB_VERYLOW-malfunction_probability_coeff) && loaded_item) + if(prob(EFFECT_PROB_VERYLOW * (100 - malfunction_probability_coeff) * 0.01) && loaded_item) var/globalMalf = rand(1,100) if(globalMalf < 15) visible_message(span_warning("[src]'s onboard detection system has malfunctioned!"))