#define SLAM_COMBO "GH" #define KICK_COMBO "HH" #define RESTRAIN_COMBO "GG" #define PRESSURE_COMBO "DG" #define CONSECUTIVE_COMBO "DDH" /datum/martial_art/cqc name = "CQC" help_verb = /mob/living/carbon/human/proc/CQC_help block_chance = 75 /datum/martial_art/cqc/proc/drop_restraining() restraining = 0 /datum/martial_art/cqc/proc/check_streak(mob/living/carbon/human/A, mob/living/carbon/human/D) if(findtext(streak,SLAM_COMBO)) streak = "" Slam(A,D) return 1 if(findtext(streak,KICK_COMBO)) streak = "" Kick(A,D) return 1 if(findtext(streak,RESTRAIN_COMBO)) streak = "" Restrain(A,D) return 1 if(findtext(streak,PRESSURE_COMBO)) streak = "" Pressure(A,D) return 1 if(findtext(streak,CONSECUTIVE_COMBO)) streak = "" Consecutive(A,D) return 0 /datum/martial_art/cqc/proc/Slam(mob/living/carbon/human/A, mob/living/carbon/human/D) if(!D.stat || !D.weakened) D.visible_message("[A] slams [D] into the ground!", \ "[A] slams you into the ground!") playsound(get_turf(A), 'sound/weapons/slam.ogg', 50, 1, -1) D.apply_damage(10, BRUTE) D.Weaken(6) add_logs(A, D, "cqc slammed") return 1 /datum/martial_art/cqc/proc/Kick(mob/living/carbon/human/A, mob/living/carbon/human/D) if(!D.stat || !D.weakened) D.visible_message("[A] kicks [D] back!", \ "[A] kicks you back!") 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) add_logs(A, D, "cqc kicked") if(D.weakened && !D.stat) D.visible_message("[A] kicks [D]'s head, knocking them out!", \ "[A] kicks your head, knocking you out!") playsound(get_turf(A), 'sound/weapons/genhit1.ogg', 50, 1, -1) D.SetSleeping(15) D.adjustBrainLoss(25) return 1 /datum/martial_art/cqc/proc/Pressure(mob/living/carbon/human/A, mob/living/carbon/human/D) D.visible_message("[A] forces their arm on [D]'s neck!") D.adjustStaminaLoss(60) playsound(get_turf(A), 'sound/weapons/cqchit1.ogg', 50, 1, -1) return 1 /datum/martial_art/cqc/proc/Restrain(mob/living/carbon/human/A, mob/living/carbon/human/D) if(restraining) return if(!D.stat) D.visible_message("[A] locks [D] into a restraining position!", \ "[A] locks you into a restraining position!") D.adjustStaminaLoss(20) D.Stun(5) restraining = 1 addtimer(CALLBACK(src, .proc/drop_restraining), 50, TIMER_UNIQUE) return 1 /datum/martial_art/cqc/proc/Consecutive(mob/living/carbon/human/A, mob/living/carbon/human/D) if(!D.stat) D.visible_message("[A] strikes [D]'s abdomen, neck and back consecutively", \ "[A] strikes your abdomen, neck and back consecutively!") playsound(get_turf(D), 'sound/weapons/cqchit2.ogg', 50, 1, -1) var/obj/item/I = D.get_active_held_item() if(I && D.drop_item()) A.put_in_hands(I) D.adjustStaminaLoss(50) D.apply_damage(25, BRUTE) return 1 /datum/martial_art/cqc/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D) add_to_streak("G",D) if(check_streak(A,D)) return 1 if(A.grab_state >= GRAB_AGGRESSIVE) D.grabbedby(A, 1) else A.start_pulling(D, 1) if(A.pulling) D.stop_pulling() add_logs(A, D, "grabbed", addition="aggressively") A.grab_state = GRAB_AGGRESSIVE //Instant aggressive grab return 1 /datum/martial_art/cqc/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D) add_to_streak("H",D) if(check_streak(A,D)) return 1 add_logs(A, D, "CQC'd") A.do_attack_animation(D) var/picked_hit_type = pick("CQC'd", "Big Bossed") var/bonus_damage = 13 if(D.weakened || D.resting || D.lying) bonus_damage += 5 picked_hit_type = "stomps on" D.apply_damage(bonus_damage, BRUTE) if(picked_hit_type == "kicks" || picked_hit_type == "stomps on") playsound(get_turf(D), 'sound/weapons/cqchit2.ogg', 50, 1, -1) else playsound(get_turf(D), 'sound/weapons/cqchit1.ogg', 50, 1, -1) D.visible_message("[A] [picked_hit_type] [D]!", \ "[A] [picked_hit_type] you!") add_logs(A, D, "[picked_hit_type] with CQC") if(A.resting && !D.stat && !D.weakened) D.visible_message("[A] leg sweeps [D]!", \ "[A] leg sweeps you!") playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, 1, -1) D.apply_damage(10, BRUTE) D.Weaken(3) add_logs(A, D, "cqc sweeped") return 1 /datum/martial_art/cqc/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D) add_to_streak("D",D) var/obj/item/I = null if(check_streak(A,D)) return 1 if(prob(65)) if(!D.stat || !D.weakened || !restraining) I = D.get_active_held_item() D.visible_message("[A] strikes [D]'s jaw with their hand!", \ "[A] strikes your jaw, disorienting you!") playsound(get_turf(D), 'sound/weapons/cqchit1.ogg', 50, 1, -1) if(I && D.drop_item()) A.put_in_hands(I) D.Jitter(2) D.apply_damage(5, BRUTE) else D.visible_message("[A] attempted to disarm [D]!", \ "[A] attempted to disarm [D]!") playsound(D, 'sound/weapons/punchmiss.ogg', 25, 1, -1) add_logs(A, D, "disarmed with CQC", "[I ? " grabbing \the [I]" : ""]") if(restraining && A.pulling == D) D.visible_message("[A] puts [D] into a chokehold!", \ "[A] puts you into a chokehold!") D.SetSleeping(20) restraining = 0 if(A.grab_state < GRAB_NECK) A.grab_state = GRAB_NECK else restraining = 0 return 0 return 1 /mob/living/carbon/human/proc/CQC_help() set name = "Remember The Basics" set desc = "You try to remember some of the basics of CQC." set category = "CQC" to_chat(usr, "You try to remember some of the basics of CQC.") to_chat(usr, "Slam: Grab Harm. Slam opponent into the ground, weakens and knocks down.") to_chat(usr, "CQC Kick: Harm Disarm Harm. Knocks opponent away. Knocks out stunned or weakened opponents.") to_chat(usr, "Restrain: Grab Grab. Locks opponents into a restraining position, disarm to knock them out with a choke hold.") to_chat(usr, "Pressure: Disarm Grab. Decent stamina damage.") to_chat(usr, "Consecutive CQC: Disarm Disarm Harm. Mainly offensive move, huge damage and decent stamina damage.") to_chat(usr, "In addition, by having your throw mode on when being attacked, you enter an active defense mode where you have a chance to block and sometimes even counter attacks done to you.") /obj/item/weapon/cqc_manual name = "old manual" desc = "A small, black manual. There are drawn instructions of tactical hand-to-hand combat." icon = 'icons/obj/library.dmi' icon_state ="cqcmanual" /obj/item/weapon/cqc_manual/attack_self(mob/living/carbon/human/user) if(!istype(user) || !user) return to_chat(user, "You remember the basics of CQC.") var/datum/martial_art/cqc/D = new(null) D.teach(user) user.drop_item() visible_message("[src] beeps ominously, and a moment later it bursts up in flames.") new /obj/effect/decal/cleanable/ash(get_turf(src)) qdel(src)