mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 07:27:57 +01:00
Merge pull request #10327 from Fox-McCloud/fix-cqc
Fixes and Updates CQC
This commit is contained in:
@@ -157,7 +157,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
|
||||
|
||||
@@ -220,6 +220,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)
|
||||
|
||||
|
||||
@@ -319,7 +319,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))
|
||||
@@ -348,7 +348,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))
|
||||
@@ -393,7 +393,7 @@
|
||||
SEND_SIGNAL(target, COMSIG_PARENT_ATTACKBY)
|
||||
|
||||
/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))
|
||||
|
||||
@@ -337,8 +337,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