Files
Bubberstation/code/modules/surgery/experimental_dissection.dm
moo 8fcf42eff9 Experimental Cobbisection [150+ Hours and Ready] (#44821)
About The Pull Request & Why
Dissection (Prev Experimental Dissection) Is Now Roundstart

Goal:give medbay a task they can do outside of normal healing on the off chance they're overstaffed and/or are in need of work.
Dissection (Prev Experimental Dissection) Is Now Tiered

Goal: I'm still not seeing competition in the medical tree that I'd like to see. Now that science benefits from going to this tree, I expect it to be a prominent if not the main pick.

Goal: Provide Medical bargaining power with Science. Want you cool gear bros? Better indulge us a bit if you want us to farm corpses.

NOTE: You will NOT be punished for doing low tiered surgeries then unlocking further tiers. It adjusts your rewards depending on if the body has been experimented on before and gives you the difference, it will not block you from doing the surgery entirely.
Repeatability

Goal: Make it less balanced around the all/nothing mechanic and more with rewarding constantly running the surgery.

Failing the surgery will give you a pity amount (1%, something slightly more than none in grand scheme) but more importantly will NOT add the trait that disables you from using that body for the surgery again.
Silicons can now perform dissection

Since It's not All/Nothing I decided to allow silicons to be able to help out. This is the first (and only) surgery that they can potentially fail.
Nerfs (yikes!)

Needed to nerf it to compensate for the fact that it was now roundstart. The hardest one was pointgain. I decided to mega nerf it so tiered would be desired. This was also a result in the shift of balance off the RNG and more on the repeatability.
Dissection Can Now Be Performed on ANY LIVING MOB

Goal: Cooperation between Mining (returning Mobs) and Medbay (turning these mobs into points)

The foundation is really lacking imo since I didn't want to dance around with numbers in this PR. Currently all mobs that aren't human and aren't explicitly listed in check_value are 300 points per surgery.

I hope you guys can add more mobs to the pool with better rewards (imagine dissecting the dragon for science!)
Dissection Surgery Minor Edits
Step Configuration Edit

Needed to change just for repeatability in the dissect step (didn't like the end step being the proceeding step).

I replaced the incision step with a post-dissection clamp step to keep the theme of scalpel > hemo (dissection uses scalpel)
Implement Changes / Probability Effects

Rewards using the researched tools (further integrates medsci coop), lowers standard gear to appropriately balance higher tiers.
MISC
Prices are Define Bound

Everything is relative to a single number via calculating off a define instead of independent values. Balance discussion shifts from "Is X number fair" to a more tangible "Is this mob worth X times the amount of a normal human". If everything is strong/low we can just edit a single number!
Let me know if there's any undoc'd changes!
Changelog

cl Cobby x Medbay
balance: (Experimental) Dissection is now roundstart.
balance: (Experimental) Dissection is now tiered and give higher point outputs than their predecessors.
add: All living mobs with corpses can be dissected.
code: Attention, all ss13 gamers! I need YOUR help adding mobs to the pool so they don't get the lame 60% of normal human pricing! You can dissect DRAGONS FOR CRY IT OUT LOUD!
balance: You are NOT punished for doing the lower tier surgeries then unlocking higher ones!
add: Borgs can perform dissection but they are not 100% successful.
tweak: Shifts balance of dissection surgery towards spammability vs. rng mechanic.
balance: All point rewards are severely nerfed to promote doing this multiple times (since it's now available from the getgo).
tweak: If you fail the dissection step, you get a pity reward (1% credits) and can repeat the step until you successfully dissect the being.
tweak: Lowered probabilty of success on default tools, increased probability for researched tools.
tweak: removed 2nd incision step, added clamp step post dissection (repeatability purposes).
/cl
2019-07-09 11:57:26 +12:00

110 lines
4.4 KiB
Plaintext

#define BASE_HUMAN_REWARD 500
#define EXPDIS_FAIL_MSG "<span class='notice'>You dissect [target], but do not find anything particularly interesting.</span>"
/datum/surgery/advanced/experimental_dissection
name = "Dissection"
desc = "A surgical procedure which analyzes the biology of a corpse, and automatically adds new findings to the research database."
steps = list(/datum/surgery_step/incise,
/datum/surgery_step/retract_skin,
/datum/surgery_step/clamp_bleeders,
/datum/surgery_step/dissection,
/datum/surgery_step/clamp_bleeders,
/datum/surgery_step/close)
possible_locs = list(BODY_ZONE_CHEST)
target_mobtypes = list(/mob/living) //Feel free to dissect devils but they're magic.
replaced_by = /datum/surgery/advanced/experimental_dissection/adv
requires_tech = FALSE
var/value_multiplier = 1
/datum/surgery/advanced/experimental_dissection/can_start(mob/user, mob/living/target)
. = ..()
if(HAS_TRAIT_FROM(target, TRAIT_DISSECTED,"[name]"))
return FALSE
if(target.stat != DEAD)
return FALSE
/datum/surgery_step/dissection
name = "dissection"
implements = list(/obj/item/scalpel/augment = 75, /obj/item/scalpel/advanced = 60, /obj/item/scalpel = 45, /obj/item/kitchen/knife = 20, /obj/item/shard = 10)// special tools not only cut down time but also improve probability
time = 125
silicons_obey_prob = TRUE
repeatable = TRUE
/datum/surgery_step/dissection/preop(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] starts dissecting [target].", "<span class='notice'>You start dissecting [target].</span>")
/datum/surgery_step/dissection/proc/check_value(mob/living/target, datum/surgery/advanced/experimental_dissection/ED)
var/cost = BASE_HUMAN_REWARD
var/multi_surgery_adjust = 0
//determine bonus applied
if(isalienroyal(target))
cost = (BASE_HUMAN_REWARD*10)
else if(isalienadult(target))
cost = (BASE_HUMAN_REWARD*5)
else if(ismonkey(target))
cost = (BASE_HUMAN_REWARD*0.5)
else if(ishuman(target))
var/mob/living/carbon/human/H = target
if(H?.dna?.species)
if(isabductor(H))
cost = (BASE_HUMAN_REWARD*4)
else if(isgolem(H) || iszombie(H))
cost = (BASE_HUMAN_REWARD*3)
else if(isjellyperson(H) || ispodperson(H))
cost = (BASE_HUMAN_REWARD*2)
else
cost = (BASE_HUMAN_REWARD * 0.6)
//now we do math for surgeries already done (no double dipping!).
for(var/i in typesof(/datum/surgery/advanced/experimental_dissection))
var/datum/surgery/advanced/experimental_dissection/cringe = i
if(HAS_TRAIT_FROM(target,TRAIT_DISSECTED,"[initial(cringe.name)]"))
multi_surgery_adjust = max(multi_surgery_adjust,initial(cringe.value_multiplier)) - 1
multi_surgery_adjust *= cost
//multiply by multiplier in surgery
cost *= ED.value_multiplier
return (cost-multi_surgery_adjust)
/datum/surgery_step/dissection/success(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery)
var/points_earned = check_value(target, surgery)
user.visible_message("[user] dissects [target], discovering [points_earned] point\s of data!", "<span class='notice'>You dissect [target], and add your [points_earned] point\s worth of discoveries to the research database!</span>")
SSresearch.science_tech.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = points_earned))
var/obj/item/bodypart/L = target.get_bodypart(BODY_ZONE_CHEST)
target.apply_damage(80, BRUTE, L)
ADD_TRAIT(target, TRAIT_DISSECTED, "[surgery.name]")
repeatable = FALSE
return TRUE
/datum/surgery_step/dissection/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] dissects [target]!", EXPDIS_FAIL_MSG)
SSresearch.science_tech.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = (round(check_value(target, surgery) * 0.01))))
var/obj/item/bodypart/L = target.get_bodypart(BODY_ZONE_CHEST)
target.apply_damage(80, BRUTE, L)
return TRUE
/datum/surgery/advanced/experimental_dissection/adv
name = "Thorough Dissection"
value_multiplier = 2
replaced_by = /datum/surgery/advanced/experimental_dissection/exp
requires_tech = TRUE
/datum/surgery/advanced/experimental_dissection/exp
name = "Experimental Dissection"
value_multiplier = 5
replaced_by = /datum/surgery/advanced/experimental_dissection/alien
requires_tech = TRUE
/datum/surgery/advanced/experimental_dissection/alien
name = "Extraterrestrial Dissection"
value_multiplier = 10
requires_tech = TRUE
#undef BASE_HUMAN_REWARD
#undef EXPDIS_FAIL_MSG