mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-18 13:43:27 +00:00
* Genetics Rebalance: Negative mutations add stability, standarized instability cost for mutations * Modular * Update mobs.dm * Update human_helpers.dm * Update human_update_icons.dm * Fixing a missing old stuff * Fixes months old prerequisites that was missed from "https://github.com/Skyrat-SS13/Skyrat-tg/pull/27244" * fix tails.dm * Revert "Fixes months old prerequisites that was missed" This reverts commit ce86da89ec110b69dbc9ed3653bf2abc2000a8c9. * Update tails.dm --------- Co-authored-by: carlarctg <53100513+carlarctg@users.noreply.github.com> Co-authored-by: SpaceLoveSs13 <68121607+SpaceLoveSs13@users.noreply.github.com>
43 lines
1.3 KiB
Plaintext
43 lines
1.3 KiB
Plaintext
/datum/mutation/human/self_amputation
|
|
name = "Autotomy"
|
|
desc = "Allows a creature to voluntary discard a random appendage."
|
|
quality = POSITIVE
|
|
text_gain_indication = span_notice("Your joints feel loose.")
|
|
instability = POSITIVE_INSTABILITY_MINOR
|
|
power_path = /datum/action/cooldown/spell/self_amputation
|
|
|
|
energy_coeff = 1
|
|
synchronizer_coeff = 1
|
|
|
|
/datum/action/cooldown/spell/self_amputation
|
|
name = "Drop a limb"
|
|
desc = "Concentrate to make a random limb pop right off your body."
|
|
button_icon_state = "autotomy"
|
|
|
|
cooldown_time = 10 SECONDS
|
|
spell_requirements = NONE
|
|
|
|
/datum/action/cooldown/spell/self_amputation/is_valid_target(atom/cast_on)
|
|
return iscarbon(cast_on)
|
|
|
|
/datum/action/cooldown/spell/self_amputation/cast(mob/living/carbon/cast_on)
|
|
. = ..()
|
|
if(HAS_TRAIT(cast_on, TRAIT_NODISMEMBER))
|
|
to_chat(cast_on, span_notice("You concentrate really hard, but nothing happens."))
|
|
return
|
|
|
|
var/list/parts = list()
|
|
for(var/obj/item/bodypart/to_remove as anything in cast_on.bodyparts)
|
|
if(to_remove.body_zone == BODY_ZONE_HEAD || to_remove.body_zone == BODY_ZONE_CHEST)
|
|
continue
|
|
if(to_remove.bodypart_flags & BODYPART_UNREMOVABLE)
|
|
continue
|
|
parts += to_remove
|
|
|
|
if(!length(parts))
|
|
to_chat(cast_on, span_notice("You can't shed any more limbs!"))
|
|
return
|
|
|
|
var/obj/item/bodypart/to_remove = pick(parts)
|
|
to_remove.dismember()
|