Adds new combat cybernetic implant (#73043)

## About The Pull Request

Adds arm empower implant to the game - a cybernetic implant that will
make your punches deal 13 damage(normal human attacks deal between 1 and
10 damage), and throw your target away(doesn't work if you are lying
down) like a baseball bat does. It is inserted into your arm, and it
works only for the arm it is inserted into.

As an EMP effect it would cause you to fall under your target, or get
paralyzed due to muscle spasms.

## Why It's Good For The Game

Expands the implant system and adds more things to stuff into yourself
if you want to roleplay as a cool robo man.

## Changelog

🆑
add: Added a new cybernetic implant that increases punch damage of a
human
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
This commit is contained in:
SuperSlayer
2023-02-20 15:53:11 -07:00
committed by GitHub
co-authored by san7890
parent 581757ec25
commit 6ad7ea6bb9
3 changed files with 107 additions and 0 deletions
+7
View File
@@ -156,3 +156,10 @@
contains = list(/obj/item/clothing/under/rank/medical/chief_medical_officer/turtleneck,
/obj/item/clothing/under/rank/medical/chief_medical_officer/turtleneck/skirt,
)
/datum/supply_pack/medical/arm_implants
name = "Strong-Arm Implant Set"
desc = "A crate containing two implants, which can be surgically implanted to empower the strength of human arms. Warranty void if exposed to electromagnetic pulses."
cost = CARGO_CRATE_VALUE * 6
contains = list(/obj/item/organ/internal/cyberimp/arm/muscle = 2)
crate_name = "Strong-Arm implant crate"
@@ -334,3 +334,103 @@
/obj/item/surgical_drapes,
/obj/item/knife/combat/cyborg,
)
/obj/item/organ/internal/cyberimp/arm/muscle
name = "\proper Strong-Arm empowered musculature implant"
desc = "When implanted, this cybernetic implant will enhance the muscles of the arm to deliver more power-per-action."
icon_state = "muscle_implant"
zone = BODY_ZONE_R_ARM
slot = ORGAN_SLOT_RIGHT_ARM_AUG
actions_types = list()
///The amount of damage dealt by the empowered attack.
var/punch_damage = 13
///Will the punch smash people into walls?
var/gentle = TRUE
///How far away your attack will throw your oponent
var/attack_throw_range = 1
///Minimum throw power of the attack
var/throw_power_min = 1
///Maximum throw power of the attack
var/throw_power_max = 4
///How long will the implant malfunction if it is EMP'd
var/emp_base_duration = 9 SECONDS
/obj/item/organ/internal/cyberimp/arm/muscle/Insert(mob/living/carbon/reciever, special = FALSE, drop_if_replaced = TRUE)
. = ..()
if(ishuman(reciever)) //Sorry, only humans
RegisterSignal(reciever, COMSIG_HUMAN_EARLY_UNARMED_ATTACK, PROC_REF(on_attack_hand))
/obj/item/organ/internal/cyberimp/arm/muscle/Remove(mob/living/carbon/implant_owner, special = 0)
. = ..()
UnregisterSignal(implant_owner, COMSIG_HUMAN_EARLY_UNARMED_ATTACK)
/obj/item/organ/internal/cyberimp/arm/muscle/emp_act(severity)
. = ..()
if((organ_flags & ORGAN_FAILING) || . & EMP_PROTECT_SELF)
return
owner.balloon_alert(owner, "your arm spasms wildly!")
organ_flags |= ORGAN_FAILING
addtimer(CALLBACK(src, PROC_REF(reboot)), 90 / severity)
/obj/item/organ/internal/cyberimp/arm/muscle/proc/reboot()
organ_flags &= ~ORGAN_FAILING
owner.balloon_alert(owner, "your arm stops spasming!")
/obj/item/organ/internal/cyberimp/arm/muscle/proc/on_attack_hand(mob/living/carbon/human/source, atom/target, proximity, modifiers)
SIGNAL_HANDLER
if(source.get_active_hand() != source.get_bodypart(check_zone(zone)) || !proximity)
return
if(!source.combat_mode || LAZYACCESS(modifiers, RIGHT_CLICK))
return
if(!isliving(target))
return
var/mob/living/living_target = target
source.changeNext_move(CLICK_CD_MELEE)
var/picked_hit_type = pick("punch", "smash", "kick")
if(organ_flags & ORGAN_FAILING)
if(source.body_position != LYING_DOWN && living_target != source && prob(50))
to_chat(source, span_danger("You try to [picked_hit_type] [living_target], but lose your balance and fall!"))
source.Knockdown(3 SECONDS)
source.forceMove(get_turf(living_target))
else
to_chat(source, span_danger("Your muscles spasm!"))
source.Paralyze(1 SECONDS)
return COMPONENT_CANCEL_ATTACK_CHAIN
if(ishuman(target))
var/mob/living/carbon/human/human_target = target
if(human_target.check_shields(source, punch_damage, "[source]'s' [picked_hit_type]"))
source.do_attack_animation(target)
playsound(living_target.loc, 'sound/weapons/punchmiss.ogg', 25, TRUE, -1)
log_combat(source, target, "attempted to [picked_hit_type]", "muscle implant")
return COMPONENT_CANCEL_ATTACK_CHAIN
source.do_attack_animation(target, ATTACK_EFFECT_SMASH)
playsound(living_target.loc, 'sound/weapons/punch1.ogg', 25, TRUE, -1)
living_target.apply_damage(punch_damage, BRUTE)
if(source.body_position != LYING_DOWN) //Throw them if we are standing
var/atom/throw_target = get_edge_target_turf(living_target, source.dir)
living_target.throw_at(throw_target, attack_throw_range, rand(throw_power_min,throw_power_max), source, gentle)
living_target.visible_message(
span_danger("[source] [picked_hit_type]ed [living_target]!"),
span_userdanger("You're [picked_hit_type]ed by [source]!"),
span_hear("You hear a sickening sound of flesh hitting flesh!"),
COMBAT_MESSAGE_RANGE,
source,
)
to_chat(source, span_danger("You [picked_hit_type] [target]!"))
log_combat(source, target, "[picked_hit_type]ed", "muscle implant")
return COMPONENT_CANCEL_ATTACK_CHAIN