mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Fixes and Updates CQC
This commit is contained in:
@@ -34,8 +34,6 @@
|
||||
SEND_SIGNAL(user, COMSIG_MOB_ITEM_ATTACK, M, user)
|
||||
if(flags & (NOBLUDGEON))
|
||||
return 0
|
||||
if(check_martial_counter(M, user))
|
||||
return 0
|
||||
if(can_operate(M)) //Checks if mob is lying down on table for surgery
|
||||
if(istype(src,/obj/item/robot_parts))//popup override for direct attach
|
||||
if(!attempt_initiate_surgery(src, M, user,1))
|
||||
|
||||
@@ -769,7 +769,9 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
|
||||
desc = "A manual that teaches a single user tactical Close-Quarters Combat before self-destructing. Does not restrict weapon usage, but cannot be used alongside Gloves of the North Star."
|
||||
reference = "CQC"
|
||||
item = /obj/item/CQC_manual
|
||||
cost = 9
|
||||
gamemodes = list(/datum/game_mode/nuclear)
|
||||
cost = 13
|
||||
surplus = 0
|
||||
|
||||
/datum/uplink_item/stealthy_weapons/throwingweapons
|
||||
name = "Box of Throwing Weapons"
|
||||
|
||||
@@ -562,11 +562,4 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
|
||||
return TRUE
|
||||
|
||||
/obj/item/attack_hulk(mob/living/carbon/human/user)
|
||||
return FALSE
|
||||
|
||||
/obj/item/proc/check_martial_counter(mob/living/carbon/human/target, mob/living/carbon/human/user) //handles block for CQC
|
||||
if(target.check_block())
|
||||
target.visible_message("<span class='danger'>[target.name] blocks [src] and twists [user]'s arm behind [user.p_their()] back!</span>",
|
||||
"<span class='userdanger'>You block the attack!</span>")
|
||||
user.Stun(2)
|
||||
return TRUE
|
||||
return FALSE
|
||||
@@ -1,6 +1,13 @@
|
||||
/obj/item/melee
|
||||
needs_permit = 1
|
||||
|
||||
/obj/item/melee/proc/check_martial_counter(mob/living/carbon/human/target, mob/living/carbon/human/user)
|
||||
if(target.check_block())
|
||||
target.visible_message("<span class='danger'>[target.name] blocks [src] and twists [user]'s arm behind [user.p_their()] back!</span>",
|
||||
"<span class='userdanger'>You block the attack!</span>")
|
||||
user.Stun(2)
|
||||
return TRUE
|
||||
|
||||
/obj/item/melee/chainofcommand
|
||||
name = "chain of command"
|
||||
desc = "A tool used by great men to placate the frothing masses."
|
||||
|
||||
@@ -141,6 +141,12 @@
|
||||
if(isrobot(M))
|
||||
..()
|
||||
return
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(check_martial_counter(H, user))
|
||||
return
|
||||
|
||||
if(!isliving(M))
|
||||
return
|
||||
|
||||
@@ -166,8 +172,6 @@
|
||||
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(check_martial_counter(L, user))
|
||||
return
|
||||
if(H.check_shields(0, "[user]'s [name]", src, MELEE_ATTACK)) //No message; check_shields() handles that
|
||||
playsound(L, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
return
|
||||
|
||||
@@ -52,7 +52,9 @@
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(H.check_shields(0, "[user]'s [name]", src, MELEE_ATTACK))
|
||||
return 0
|
||||
return
|
||||
if(check_martial_counter(H, user))
|
||||
return
|
||||
playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1)
|
||||
target.Weaken(3)
|
||||
add_attack_logs(user, target, "Stunned with [src]")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#define SLAM_COMBO "HG"
|
||||
#define SLAM_COMBO "GH"
|
||||
#define KICK_COMBO "HH"
|
||||
#define RESTRAIN_COMBO "GG"
|
||||
#define PRESSURE_COMBO "DG"
|
||||
@@ -8,15 +8,24 @@
|
||||
name = "CQC"
|
||||
help_verb = /mob/living/carbon/human/proc/CQC_help
|
||||
block_chance = 75
|
||||
var/just_a_cook = FALSE
|
||||
var/static/list/areas_under_siege = typecacheof(list(/area/crew_quarters/kitchen,
|
||||
/area/crew_quarters/cafeteria,
|
||||
/area/crew_quarters/bar))
|
||||
|
||||
/datum/martial_art/cqc/can_use(mob/living/carbon/human/H)
|
||||
if(istype(H.gloves, /obj/item/clothing/gloves/fingerless/rapid))
|
||||
return FALSE
|
||||
return ..()
|
||||
/datum/martial_art/cqc/under_siege
|
||||
name = "Close Quarters Cooking"
|
||||
just_a_cook = TRUE
|
||||
|
||||
/datum/martial_art/cqc/proc/drop_restraining()
|
||||
restraining = FALSE
|
||||
|
||||
/datum/martial_art/cqc/can_use(mob/living/carbon/human/H)
|
||||
var/area/A = get_area(H)
|
||||
if(just_a_cook && !(is_type_in_typecache(A, areas_under_siege)))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/martial_art/cqc/proc/check_streak(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!can_use(A))
|
||||
return FALSE
|
||||
@@ -44,17 +53,13 @@
|
||||
/datum/martial_art/cqc/proc/Slam(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!can_use(A))
|
||||
return FALSE
|
||||
if(!D.stat || !D.weakened)
|
||||
if(!D.weakened || !D.resting || !D.lying)
|
||||
D.visible_message("<span class='warning'>[A] slams [D] into the ground!</span>", \
|
||||
"<span class='userdanger'>[A] slams you into the ground!</span>")
|
||||
playsound(get_turf(A), 'sound/weapons/slam.ogg', 50, 1, -1)
|
||||
D.apply_damage(10, BRUTE)
|
||||
D.Weaken(6)
|
||||
add_attack_logs(A, D, "Melee attacked with martial-art [src] : Slam", ATKLOG_ALL)
|
||||
else //if target can't be slammed, do a regular grab attack then clear the streak
|
||||
streak = ""
|
||||
grab_act(A, D)
|
||||
streak = ""
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/cqc/proc/Kick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
@@ -68,17 +73,13 @@
|
||||
D.throw_at(throw_target, 1, 14, A)
|
||||
D.apply_damage(10, BRUTE)
|
||||
add_attack_logs(A, D, "Melee attacked with martial-art [src] : Kick", ATKLOG_ALL)
|
||||
if(D.weakened && !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(15)
|
||||
D.adjustBrainLoss(15, 150)
|
||||
add_attack_logs(A, D, "Knocked out with martial-art [src] : Kick", ATKLOG_ALL)
|
||||
else //if target can't be kicked, do a regular harm attack then clear the streak
|
||||
streak = ""
|
||||
harm_act(A, D)
|
||||
streak = ""
|
||||
if(D.weakened && !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(15)
|
||||
D.adjustBrainLoss(15)
|
||||
add_attack_logs(A, D, "Knocked out with martial-art [src] : Kick", ATKLOG_ALL)
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/cqc/proc/Pressure(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
@@ -118,10 +119,6 @@
|
||||
D.adjustStaminaLoss(50)
|
||||
D.apply_damage(25, BRUTE)
|
||||
add_attack_logs(A, D, "Melee attacked with martial-art [src] : Consecutive", ATKLOG_ALL)
|
||||
else //if target can't be hit, do a regular harm attack then clear the streak
|
||||
streak = ""
|
||||
harm_act(A, D)
|
||||
streak = ""
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/cqc/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
@@ -133,6 +130,8 @@
|
||||
var/obj/item/grab/G = D.grabbedby(A, 1)
|
||||
if(G)
|
||||
G.state = GRAB_AGGRESSIVE //Instant aggressive grab
|
||||
add_attack_logs(A, D, "Melee attacked with martial-art [src] : aggressively grabbed", ATKLOG_ALL)
|
||||
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/cqc/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
@@ -141,8 +140,9 @@
|
||||
add_to_streak("H", D)
|
||||
if(check_streak(A, D))
|
||||
return TRUE
|
||||
add_attack_logs(A, D, "Melee attacked with martial-art [src]", ATKLOG_ALL)
|
||||
A.do_attack_animation(D)
|
||||
var/picked_hit_type = pick("CQC'd", "neck chopped", "gut punched")
|
||||
var/picked_hit_type = pick("CQC'd", "Big Bossed")
|
||||
var/bonus_damage = 13
|
||||
if(D.weakened || D.resting || D.lying)
|
||||
bonus_damage += 5
|
||||
@@ -154,7 +154,7 @@
|
||||
playsound(get_turf(D), 'sound/weapons/cqchit1.ogg', 50, 1, -1)
|
||||
D.visible_message("<span class='danger'>[A] [picked_hit_type] [D]!</span>", \
|
||||
"<span class='userdanger'>[A] [picked_hit_type] you!</span>")
|
||||
add_attack_logs(A, D, "Melee attacked with martial-art [src]", ATKLOG_ALL)
|
||||
add_attack_logs(A, D, "Melee attacked with martial-art [src] : [picked_hit_type]", ATKLOG_ALL)
|
||||
if(A.resting && !D.stat && !D.weakened)
|
||||
D.visible_message("<span class='warning'>[A] leg sweeps [D]!", \
|
||||
"<span class='userdanger'>[A] leg sweeps you!</span>")
|
||||
@@ -168,21 +168,31 @@
|
||||
if(!can_use(A))
|
||||
return FALSE
|
||||
add_to_streak("D", D)
|
||||
var/obj/item/I = null
|
||||
if(check_streak(A, D))
|
||||
return TRUE
|
||||
if(!restraining)
|
||||
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)
|
||||
D.Jitter(2)
|
||||
D.apply_damage(5, BRUTE)
|
||||
add_attack_logs(A, D, "Melee attacked with martial-art [src] : Disarm", ATKLOG_ALL)
|
||||
if(restraining)
|
||||
if(prob(65))
|
||||
if(!D.stat || !D.weakened || !restraining)
|
||||
I = D.get_active_hand()
|
||||
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.drop_item())
|
||||
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)
|
||||
add_attack_logs(A, D, "Melee attacked with martial-art [src] : Disarmed [I ? " grabbing \the [I]" : ""]", ATKLOG_ALL)
|
||||
var/obj/item/grab/G = A.get_inactive_hand()
|
||||
if(restraining && istype(G) && G.affecting == 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(20)
|
||||
restraining = FALSE
|
||||
add_attack_logs(A, D, "Knocked out with martial-art [src] : Choke hold", ATKLOG_ALL)
|
||||
if(G.state < GRAB_NECK)
|
||||
G.state = GRAB_NECK
|
||||
else
|
||||
restraining = FALSE
|
||||
return FALSE
|
||||
@@ -194,11 +204,10 @@
|
||||
set category = "CQC"
|
||||
to_chat(usr, "<b><i>You try to remember some of the basics of CQC.</i></b>")
|
||||
|
||||
to_chat(usr, "<span class='notice'>Slam</span>: Harm Grab. Slam opponent into the ground, knocking them down.")
|
||||
to_chat(usr, "<span class='notice'>CQC Kick</span>: Harm Harm. Knocks opponent away. Knocks out stunned or knocked down opponents.")
|
||||
to_chat(usr, "<span class='notice'>Restrain</span>: Grab Switch Hand Grab. Locks opponent into a restraining position, stunning them.")
|
||||
to_chat(usr, "<span class='notice'>Choke Hold</span>: Restrain Disarm. Knocks out an opponent you have restrained.")
|
||||
to_chat(usr, "<span class='notice'>Slam</span>: Grab Harm. Slam opponent into the ground, knocking them down.")
|
||||
to_chat(usr, "<span class='notice'>CQC Kick</span>: Disarm Harm Harm. 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.")
|
||||
to_chat(usr, "<span class='notice'>Pressure</span>: Disarm Grab. Decent stamina damage.")
|
||||
to_chat(usr, "<span class='notice'>Consecutive CQC</span>: Disarm Disarm Harm. Mainly offensive move, huge damage and decent stamina damage.")
|
||||
|
||||
to_chat(usr, "<b><i>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 melee attacks done to you.</i></b>")
|
||||
to_chat(usr, "<b><i>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.</i></b>")
|
||||
@@ -156,7 +156,7 @@ emp_act
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/check_block()
|
||||
/mob/living/carbon/human/proc/check_block()
|
||||
if(martial_art && prob(martial_art.block_chance) && martial_art.can_use(src) && in_throw_mode && !incapacitated(FALSE, TRUE))
|
||||
return TRUE
|
||||
|
||||
@@ -219,6 +219,10 @@ emp_act
|
||||
if(check_shields(I.force, "the [I.name]", I, MELEE_ATTACK, I.armour_penetration))
|
||||
return 0
|
||||
|
||||
if(check_block())
|
||||
visible_message("<span class='warning'>[src] blocks [I]!</span>")
|
||||
return FALSE
|
||||
|
||||
if(istype(I,/obj/item/card/emag))
|
||||
emag_act(user, affecting)
|
||||
|
||||
|
||||
@@ -318,7 +318,7 @@
|
||||
user.do_cpr(target)
|
||||
|
||||
/datum/species/proc/grab(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
|
||||
if(target.check_block()) //cqc
|
||||
if(target.check_block())
|
||||
target.visible_message("<span class='warning'>[target] blocks [user]'s grab attempt!</span>")
|
||||
return FALSE
|
||||
if(attacker_style && attacker_style.grab_act(user, target))
|
||||
@@ -347,7 +347,7 @@
|
||||
add_attack_logs(user, target, "vampirebit")
|
||||
return
|
||||
//end vampire codes
|
||||
if(target.check_block()) //cqc
|
||||
if(target.check_block())
|
||||
target.visible_message("<span class='warning'>[target] blocks [user]'s attack!</span>")
|
||||
return FALSE
|
||||
if(attacker_style && attacker_style.harm_act(user, target))
|
||||
@@ -388,7 +388,7 @@
|
||||
target.forcesay(GLOB.hit_appends)
|
||||
|
||||
/datum/species/proc/disarm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
|
||||
if(target.check_block()) //cqc
|
||||
if(target.check_block())
|
||||
target.visible_message("<span class='warning'>[target] blocks [user]'s disarm attempt!</span>")
|
||||
return FALSE
|
||||
if(attacker_style && attacker_style.disarm_act(user, target))
|
||||
|
||||
@@ -336,8 +336,4 @@
|
||||
return TRUE
|
||||
if(INTENT_DISARM)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
return TRUE
|
||||
|
||||
//defined here, overridden for humans in human_defense. By default, living mobs don't get to block anything
|
||||
/mob/living/proc/check_block()
|
||||
return FALSE
|
||||
return TRUE
|
||||
Reference in New Issue
Block a user