Skip to content

Commit

Permalink
fix4
Browse files Browse the repository at this point in the history
?
  • Loading branch information
MrCastmer committed Feb 2, 2024
1 parent c5040d0 commit efef97a
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 12 deletions.
4 changes: 2 additions & 2 deletions code/datums/martial/cqc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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
*
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 27 additions & 0 deletions modular_dripstation/code/datums/martial/cqc.dm
Original file line number Diff line number Diff line change
@@ -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

Check warning on line 3 in modular_dripstation/code/datums/martial/cqc.dm

View workflow job for this annotation

GitHub Actions / Lints

Can't define procs SpacemanDMM_should_not_sleep outside their initial definition
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.
30 changes: 21 additions & 9 deletions modular_dripstation/code/datums/martial/trained.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check warning on line 76 in modular_dripstation/code/datums/martial/trained.dm

View workflow job for this annotation

GitHub Actions / Lints

Can't define procs SpacemanDMM_should_not_sleep outside their initial definition
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.

Expand Down
1 change: 1 addition & 0 deletions modular_dripstation/includes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit efef97a

Please sign in to comment.