Merge pull request #1616 from ProbablyCarl/command_cqc

Kinaris Reflex Booster
This commit is contained in:
Dahlular
2022-05-14 20:05:57 -06:00
committed by GitHub
6 changed files with 160 additions and 3 deletions
+2 -1
View File
@@ -7,4 +7,5 @@
#define MARTIALART_MUSHPUNCH "mushroom punch"
#define MARTIALART_KRAVMAGA "krav maga"
#define MARTIALART_CQC "CQC"
#define MARTIALART_PLASMAFIST "plasma fist"
#define MARTIALART_PLASMAFIST "plasma fist"
#define MARTIALART_KNS_CQC "KNS CQC"
+116
View File
@@ -0,0 +1,116 @@
#define KNS_KICK_COMBO "DG"
#define KNS_RESTRAIN_COMBO "GG"
/datum/martial_art/kinaris
name = "KNS CQC"
id = MARTIALART_KNS_CQC
help_verb = /mob/living/carbon/human/proc/KNS_CQC_help
block_chance = 75
/datum/martial_art/kinaris/proc/drop_restraining()
restraining = FALSE
/datum/martial_art/kinaris/proc/check_streak(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(!can_use(A))
return FALSE
if(findtext(streak,KNS_KICK_COMBO))
streak = ""
Kick(A,D)
return TRUE
if(findtext(streak,KNS_RESTRAIN_COMBO))
streak = ""
Restrain(A,D)
return TRUE
return FALSE
/datum/martial_art/kinaris/proc/Kick(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(!can_use(A))
return FALSE
if(!D.stat || !D.IsKnockdown())
D.visible_message("<span class='warning'>[A] kicks [D] back!</span>", \
"<span class='userdanger'>[A] kicks you back!</span>")
playsound(get_turf(A), 'sound/weapons/cqchit1.ogg', 50, 1, -1)
var/atom/throw_target = get_edge_target_turf(D, A.dir)
D.throw_at(throw_target, 1, 14, A)
D.apply_damage(10, BRUTE)
log_combat(A, D, "kicked (KNS CQC)")
if(D.IsKnockdown() && !D.stat)
D.visible_message("<span class='warning'>[A] kicks [D]'s head, knocking [D.p_them()] out!</span>", \
"<span class='userdanger'>[A] kicks your head, knocking you out!</span>")
playsound(get_turf(A), 'sound/weapons/genhit1.ogg', 50, 1, -1)
D.SetSleeping(300)
D.adjustOrganLoss(ORGAN_SLOT_BRAIN, 15, 150)
return TRUE
/datum/martial_art/kinaris/proc/Restrain(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(restraining)
return
if(!can_use(A))
return FALSE
if(!D.stat)
D.visible_message("<span class='warning'>[A] locks [D] into a restraining position!</span>", \
"<span class='userdanger'>[A] locks you into a restraining position!</span>")
D.adjustStaminaLoss(20)
D.Stun(100)
restraining = TRUE
addtimer(CALLBACK(src, .proc/drop_restraining), 50, TIMER_UNIQUE)
return TRUE
/datum/martial_art/kinaris/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(!can_use(A))
return FALSE
add_to_streak("G",D)
if(check_streak(A,D))
return TRUE
if(A.grab_state >= GRAB_AGGRESSIVE)
D.grabbedby(A, 1)
else
A.start_pulling(D, 1)
if(A.pulling)
D.stop_pulling()
log_combat(A, D, "grabbed", addition="aggressively")
A.grab_state = GRAB_AGGRESSIVE //Instant aggressive grab
return TRUE
/datum/martial_art/kinaris/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(!can_use(A))
return FALSE
add_to_streak("D",D)
var/obj/item/I = null
if(check_streak(A,D))
return TRUE
if(prob(65))
if(!D.stat || !D.IsKnockdown() || !restraining)
I = D.get_active_held_item()
D.visible_message("<span class='warning'>[A] strikes [D]'s jaw with their hand!</span>", \
"<span class='userdanger'>[A] strikes your jaw, disorienting you!</span>")
playsound(get_turf(D), 'sound/weapons/cqchit1.ogg', 50, 1, -1)
if(I && D.temporarilyRemoveItemFromInventory(I))
A.put_in_hands(I)
D.Jitter(2)
D.apply_damage(5, BRUTE)
else
D.visible_message("<span class='danger'>[A] attempted to disarm [D]!</span>", \
"<span class='userdanger'>[A] attempted to disarm [D]!</span>")
playsound(D, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
log_combat(A, D, "disarmed (KNS CQC)", "[I ? " grabbing \the [I]" : ""]")
if(restraining && A.pulling == D)
D.visible_message("<span class='danger'>[A] puts [D] into a chokehold!</span>", \
"<span class='userdanger'>[A] puts you into a chokehold!</span>")
D.SetSleeping(400)
restraining = FALSE
if(A.grab_state < GRAB_NECK)
A.grab_state = GRAB_NECK
else
restraining = FALSE
return FALSE
return TRUE
/mob/living/carbon/human/proc/KNS_CQC_help()
set name = "Remember The Basics"
set desc = "You try to remember some of the basics of training."
set category = "KNS CQC"
to_chat(usr, "<b><i>You try to remember some of your training, undertaken when entering Kinaris employ.</i></b>")
to_chat(usr, "<span class='notice'>CQC Kick</span>: Disarm Grab. Knocks opponent away. Knocks out stunned or knocked down opponents.")
to_chat(usr, "<span class='notice'>Restrain</span>: Grab Grab. Locks opponents into a restraining position, disarm to knock them out with a choke hold.")
@@ -0,0 +1,38 @@
/obj/item/implant/kinaris
name = "KNS ENH implant"
desc = "Enables enhanced reflexes, permitting the user to deploy specialised training."
icon = 'icons/obj/implants.dmi'
icon_state ="adrenal"
activated = 1
var/datum/martial_art/kinaris/style = new
/obj/item/implant/kinaris/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> KNS ENH Implant<BR>
<b>Life:</b> Roughly twelve hours after death of host<BR>
<b>Implant Details:</b> <BR>
<b>Function:</b> Forces certain sections of the brain and body into a state of higher function, permitting the user to deploy specialised training."}
return dat
/obj/item/implant/kinaris/activate()
. = ..()
var/mob/living/carbon/human/H = imp_in
if(!ishuman(H))
return
if(!H.mind)
return
if(H.mind.has_martialart(MARTIALART_KNS_CQC))
style.remove(H)
to_chat(H, "<span class='notice'>You disable your reflex implant.</span>")
else
style.teach(H,1)
to_chat(H, "<span class='notice'>You feel your body burn briefly as you enable your reflex implant.</span>")
/obj/item/implanter/kinaris
name = "implanter (KNS ENH)"
imp_type = /obj/item/implant/kinaris
/obj/item/implantcase/kinaris
name = "implant case - 'KNS ENH'"
desc = "A glass case containing an implant that can enhance the body of the user."
imp_type = /obj/item/implant/kinaris
+1 -1
View File
@@ -65,7 +65,7 @@ Captain
satchel = /obj/item/storage/backpack/satchel/cap
duffelbag = /obj/item/storage/backpack/duffelbag/captain
implants = list(/obj/item/implant/mindshield)
implants = list(/obj/item/implant/mindshield, /obj/item/implant/kinaris)
accessory = /obj/item/clothing/accessory/medal/gold/captain
chameleon_extras = list(/obj/item/gun/energy/e_gun, /obj/item/stamp/captain)
+1 -1
View File
@@ -62,7 +62,7 @@ Head of Security
duffelbag = /obj/item/storage/backpack/duffelbag/sec
box = /obj/item/storage/box/security
implants = list(/obj/item/implant/mindshield)
implants = list(/obj/item/implant/mindshield, /obj/item/implant/kinaris)
chameleon_extras = list(/obj/item/gun/energy/e_gun/hos, /obj/item/stamp/hos)
+2
View File
@@ -510,6 +510,7 @@
#include "code\datums\looping_sounds\weather.dm"
#include "code\datums\martial\boxing.dm"
#include "code\datums\martial\cqc.dm"
#include "code\datums\martial\kinaris.dm"
#include "code\datums\martial\krav_maga.dm"
#include "code\datums\martial\mushpunch.dm"
#include "code\datums\martial\plasma_fist.dm"
@@ -983,6 +984,7 @@
#include "code\game\objects\items\implants\implant_exile.dm"
#include "code\game\objects\items\implants\implant_explosive.dm"
#include "code\game\objects\items\implants\implant_freedom.dm"
#include "code\game\objects\items\implants\implant_kinaris.dm"
#include "code\game\objects\items\implants\implant_krav_maga.dm"
#include "code\game\objects\items\implants\implant_mindshield.dm"
#include "code\game\objects\items\implants\implant_misc.dm"