diff --git a/code/datums/martial/cqc.dm b/code/datums/martial/cqc.dm index adef72af6689..501342bb7f15 100644 --- a/code/datums/martial/cqc.dm +++ b/code/datums/martial/cqc.dm @@ -310,7 +310,7 @@ D.apply_damage(damage2deal, OXY) // respect oxygen damage mods if(D.getOxyLoss() >= 50) return TRUE - +/* I hate yog coders, just check handspells on this shit, dripstation edit, check CQC file in dripstation module ///CQC counter: attacker's weapon is placed in the defender's offhand and they are knocked down /datum/martial_art/cqc/handle_counter(mob/living/carbon/human/user, mob/living/carbon/human/attacker) //I am going to fucking gut whoever did the old counter system also whoever made martial arts if(!can_use(user)) @@ -326,7 +326,7 @@ I.forceMove(get_turf(attacker)) attacker.Knockdown(60) user.adjustStaminaLoss(10) //Can't block forever. Really, if this becomes a problem you're already screwed. - +*/ /** * CQC help proc * diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 3466c56ab751..baa5ed702633 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1679,7 +1679,7 @@ GLOBAL_LIST_EMPTY(features_by_species) var/turf/target_shove_turf = get_step(target.loc, shove_dir) var/mob/living/carbon/human/target_collateral_human var/shove_blocked = FALSE //Used to check if a shove is blocked so that if it is knockdown logic can be applied - var/shove_on_table = FALSE //Used for table check + var/shove_on_table = FALSE //Used for table check, dripstation edit //Thank you based whoneedsspace target_collateral_human = locate(/mob/living/carbon/human) in target_shove_turf.contents diff --git a/modular_dripstation/code/datums/martial/cqc.dm b/modular_dripstation/code/datums/martial/cqc.dm new file mode 100644 index 000000000000..9d4a1c53f475 --- /dev/null +++ b/modular_dripstation/code/datums/martial/cqc.dm @@ -0,0 +1,27 @@ +///CQC counter: attacker's weapon is placed in the defender's offhand and they are knocked down +/datum/martial_art/cqc/handle_counter(mob/living/carbon/human/user, mob/living/carbon/human/attacker) + SIGNAL_HANDLER + if(!can_use(user)) + return + var/obj/item/I = attacker.get_active_held_item() + if(I && istype(I, /obj/item/melee/touch_attack)) + attacker.visible_message(span_warning("[user] twists [attacker]'s arm, sending their [I] back towards them!"), \ + span_userdanger("[user] grabs your arm as you attack and send your [I] back towards you!")) + to_chat(user, span_danger("Making sure to avoid [attacker]'s [I], you twist their arm to send it right back at them!")) + var/obj/item/melee/touch_attack/touch_weapon = I + var/datum/action/cooldown/spell/touch/touch_spell = touch_weapon.spell_which_made_us?.resolve() + if(!touch_spell) + return + INVOKE_ASYNC(touch_spell, /datum/action/cooldown/spell/touch.proc/do_hand_hit, attacker, attacker, touch_weapon) + else + user.do_attack_animation(attacker, ATTACK_EFFECT_DISARM) + attacker.visible_message(span_warning("[user] grabs [attacker]'s arm as they attack and throws them to the ground!"), \ + span_userdanger("[user] grabs your arm as you attack and throws you to the ground!")) + playsound(get_turf(attacker), 'sound/weapons/cqchit1.ogg', 50, 1, -1) + if(I && !HAS_TRAIT(I, TRAIT_NODROP) && !CHECK_BITFIELD(I.item_flags, ABSTRACT)) + if(attacker.temporarilyRemoveItemFromInventory(I)) + var/hand = user.get_inactive_hand_index() + if(!user.put_in_hand(I, hand)) + I.forceMove(get_turf(attacker)) + attacker.Knockdown(60) + user.adjustStaminaLoss(10) //Can't block forever. Really, if this becomes a problem you're already screwed. \ No newline at end of file diff --git a/modular_dripstation/code/datums/martial/trained.dm b/modular_dripstation/code/datums/martial/trained.dm index 9881b16d6e1d..705bc223f2ae 100644 --- a/modular_dripstation/code/datums/martial/trained.dm +++ b/modular_dripstation/code/datums/martial/trained.dm @@ -72,18 +72,30 @@ return FALSE ///CQC-like counter: attacker's weapon is placed in the defender's offhand and they are knocked down -/datum/martial_art/trained/handle_counter(mob/living/carbon/human/user, mob/living/carbon/human/attacker) //I am going to fucking gut whoever did the old counter system also whoever made martial arts +/datum/martial_art/trained/handle_counter(mob/living/carbon/human/user, mob/living/carbon/human/attacker) + SIGNAL_HANDLER if(!can_use(user)) return - user.do_attack_animation(attacker, ATTACK_EFFECT_DISARM) - attacker.visible_message(span_warning("[user] grabs [attacker]'s arm as they attack and throws them to the ground!"), \ - span_userdanger("[user] grabs your arm as you attack and throws you to the ground!")) - playsound(get_turf(attacker), 'sound/weapons/cqchit1.ogg', 50, 1, -1) var/obj/item/I = attacker.get_active_held_item() - if(I && attacker.temporarilyRemoveItemFromInventory(I)) - var/hand = user.get_inactive_hand_index() - if(!user.put_in_hand(I, hand)) - I.forceMove(get_turf(attacker)) + if(I && istype(I, /obj/item/melee/touch_attack)) + attacker.visible_message(span_warning("[user] twists [attacker]'s arm, sending their [I] back towards them!"), \ + span_userdanger("[user] grabs your arm as you attack and send your [I] back towards you!")) + to_chat(user, span_danger("Making sure to avoid [attacker]'s [I], you twist their arm to send it right back at them!")) + var/obj/item/melee/touch_attack/touch_weapon = I + var/datum/action/cooldown/spell/touch/touch_spell = touch_weapon.spell_which_made_us?.resolve() + if(!touch_spell) + return + INVOKE_ASYNC(touch_spell, /datum/action/cooldown/spell/touch.proc/do_hand_hit, attacker, attacker, touch_weapon) + else + user.do_attack_animation(attacker, ATTACK_EFFECT_DISARM) + attacker.visible_message(span_warning("[user] grabs [attacker]'s arm as they attack and throws them to the ground!"), \ + span_userdanger("[user] grabs your arm as you attack and throws you to the ground!")) + playsound(get_turf(attacker), 'sound/weapons/cqchit1.ogg', 50, 1, -1) + if(I && !HAS_TRAIT(I, TRAIT_NODROP) && !CHECK_BITFIELD(I.item_flags, ABSTRACT)) + if(attacker.temporarilyRemoveItemFromInventory(I)) + var/hand = user.get_inactive_hand_index() + if(!user.put_in_hand(I, hand)) + I.forceMove(get_turf(attacker)) attacker.Knockdown(60) user.adjustStaminaLoss(10) //Can't block forever. Really, if this becomes a problem you're already screwed. diff --git a/modular_dripstation/includes.dm b/modular_dripstation/includes.dm index 1b2e65d1e4b0..da8e9fc11f00 100644 --- a/modular_dripstation/includes.dm +++ b/modular_dripstation/includes.dm @@ -8,6 +8,7 @@ #include "code\modules\uplink\velvetfu.dm" #include "code\datums\martial\velvetfu.dm" #include "code\datums\martial\trained.dm" +#include "code\datums\martial\cqc.dm" #include "code\modules\atmospherics\machinery\components\unary_devices\binary_devices.dm" #include "code\modules\atmospherics\machinery\components\unary_devices\unary_devices.dm" #include "code\modules\atmospherics\machinery\portable\scrubber.dm"