Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 5017c1b

Browse files
committed
Update stealth.dm
1 parent f171b06 commit 5017c1b

File tree

1 file changed

+35
-30
lines changed

1 file changed

+35
-30
lines changed

yogstation/code/datums/martial/stealth.dm

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,19 @@
2222
return FALSE
2323
return TRUE
2424

25+
/datum/martial_art/liquidator/proc/check_streak(mob/living/carbon/human/A, mob/living/carbon/human/D)
26+
if(!can_use(A))
27+
return
28+
if(findtext(streak, DAGGER_COMBO))
29+
hidden_knife(A,D)
30+
streak = ""
31+
return TRUE
32+
33+
if(findtext(streak, FINGERGUN_COMBO))
34+
fingergun(A,D)
35+
streak = ""
36+
return TRUE //don't upgrade the grab
37+
2538
/datum/martial_art/liquidator/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
2639
if(!can_use(A))
2740
return FALSE
@@ -41,37 +54,10 @@
4154
check_streak(A,D)
4255
return FALSE ///We need it work like a generic, non martial art attack at all times
4356

44-
4557
/datum/martial_art/liquidator/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
4658
if(!(can_use(A)))
4759
return FALSE
4860

49-
injection(A, D)
50-
return FALSE //always looks like a generic push
51-
52-
/datum/martial_art/liquidator/proc/check_streak(mob/living/carbon/human/A, mob/living/carbon/human/D)
53-
if(!can_use(A))
54-
return
55-
if(findtext(streak, DAGGER_COMBO))
56-
hidden_knife(A,D)
57-
streak = ""
58-
return
59-
60-
if(findtext(streak, FINGERGUN_COMBO))
61-
fingergun(A,D)
62-
streak = ""
63-
return TRUE //don't upgrade the grab
64-
65-
/datum/martial_art/liquidator/proc/hidden_knife(mob/living/carbon/human/A, mob/living/carbon/human/D) if(findtext(streak, DAGGER_COMBO))
66-
var/selected_zone = A.zone_selected
67-
var/armor_block = D.run_armor_check(selected_zone, MELEE, armour_penetration = 40)
68-
D.apply_damage(A.get_punchdamagehigh() * 4, BRUTE, selected_zone, armor_block, sharpness = SHARP_EDGED) //28 damage
69-
to_chat(A, span_warning("You stab [D] with a hidden blade!"))
70-
to_chat(D, span_userdanger("You are suddenly stabbed with a blade!"))
71-
A.playsound_local(src, 'sound/weapons/batonextend.ogg', 25, TRUE) //sound only to you as audio feedback that you stabbed them
72-
A.playsound_local(src, 'sound/weapons/bladeslice.ogg', 25, TRUE)
73-
74-
/datum/martial_art/liquidator/proc/injection(mob/living/carbon/human/A, mob/living/carbon/human/D)
7561
var/datum/reagent/picked_chem = default_chem
7662
var/amount = injection_chems[picked_chem]
7763

@@ -86,6 +72,21 @@
8672
to_chat(A, span_warning("You inject [initial(picked_chem.name)] into [D]!"))
8773
to_chat(D, span_notice("You feel a tiny prick."))
8874

75+
return FALSE //always looks like a generic push
76+
77+
//////////////////////////////////////////////////////////////////////////////////
78+
//------------------------------Hidden knife------------------------------------//
79+
//////////////////////////////////////////////////////////////////////////////////
80+
/datum/martial_art/liquidator/proc/hidden_knife(mob/living/carbon/human/A, mob/living/carbon/human/D)
81+
var/selected_zone = D.get_bodypart(A.zone_selected) ? A.zone_selected || BODY_ZONE_CHEST //check if the zone exists, if not, default to chest
82+
83+
var/armor_block = D.run_armor_check(selected_zone, MELEE, armour_penetration = 40)
84+
D.apply_damage(A.get_punchdamagehigh() * 4, BRUTE, selected_zone, armor_block, sharpness = SHARP_EDGED) //28 damage by default
85+
to_chat(A, span_warning("You stab [D] with a hidden blade!"))
86+
to_chat(D, span_userdanger("You are suddenly stabbed with a blade!"))
87+
A.playsound_local(A, 'sound/weapons/batonextend.ogg', 35, TRUE) //sound only to you as audio feedback that you stabbed them
88+
A.playsound_local(D, 'sound/weapons/bladeslice.ogg', 25, TRUE)
89+
8990
/*---------------------------------------------------------------
9091
9192
start of fingergun section
@@ -95,9 +96,9 @@
9596
var/obj/item/gun/ballistic/automatic/pistol/martial/gun = new /obj/item/gun/ballistic/automatic/pistol/martial (A) ///I don't check does the user have an item in a hand, because it is a martial art action, and to use it... you need to have a empty hand
9697
gun.gun_owner = A
9798
A.put_in_hands(gun)
98-
A.playsound_local(A, 'sound/items/change_jaws.ogg', 10, TRUE) //sound only to you as audio feedback that you pulled out a gun
99+
A.playsound_local(A, 'sound/items/change_jaws.ogg', 15, TRUE) //sound only to you as audio feedback that you pulled out a gun
99100
to_chat(A, span_notice("You extract a hidden gun from your hand."))
100-
D.Paralyze(1 SECONDS)
101+
D.Stun(1 SECONDS)
101102

102103
/obj/item/gun/ballistic/automatic/pistol/martial
103104
desc = "A concelated version of a stechkin APS pistol, that comes with special Preternis upgrade modules."
@@ -111,7 +112,7 @@
111112
/obj/item/ammo_box/magazine/m10mm/martial
112113
max_ammo = 1
113114

114-
/obj/item/gun/ballistic/automatic/pistol/martial/pre_attack(atom/target, mob/living/user, params)
115+
/obj/item/gun/ballistic/automatic/pistol/martial/pre_attack(atom/target, mob/living/user, params) //prevents using this as a melee weapon, and allows its use in point blank while in combat mode
115116
afterattack(target, user, FALSE, params) //call afterattack so the gun still shoots
116117
return TRUE //prevent the regular attack
117118

@@ -128,6 +129,10 @@
128129
ADD_TRAIT(src, TRAIT_NODROP, "martial")
129130
RegisterSignal(src, COMSIG_ITEM_PREDROPPED, PROC_REF(on_drop))
130131

132+
/obj/item/gun/ballistic/automatic/pistol/martial/Destroy()
133+
UnregisterSignal(src, COMSIG_ITEM_PREDROPPED)
134+
return ..()
135+
131136
/obj/item/gun/ballistic/automatic/pistol/martial/attack_self(mob/living/user)
132137
on_drop()
133138

0 commit comments

Comments
 (0)