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

Commit 8e4db67

Browse files
committed
liquidator
1 parent 2cd3407 commit 8e4db67

File tree

2 files changed

+71
-64
lines changed

2 files changed

+71
-64
lines changed

_maps/_basemap.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//#define LOWMEMORYMODE //uncomment this to load centcom and runtime station and thats it.
1+
#define LOWMEMORYMODE //uncomment this to load centcom and runtime station and thats it.
22

33
#include "map_files\generic\CentCom.dmm"
44

yogstation/code/datums/martial/stealth.dm

Lines changed: 70 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,90 @@
11
///hidden dagger
2-
#define PRE_DAGGER_COMBO "HH"
3-
#define DAGGER_COMBO "HHG"
4-
///injection
5-
#define PRE_INJECTION_COMBO "DG"
6-
#define INJECTION_COMBO "ID"
2+
#define DAGGER_COMBO "HH"
73
///fingergun
8-
#define FINGERGUN_COMBO "HDD"
4+
#define FINGERGUN_COMBO "HG"
95

106
/datum/martial_art/liquidator
117
name = "Liquidator"
128
id = MARTIALART_LIQUIDATOR
139
help_verb = /mob/living/carbon/human/proc/preternis_martial_help
10+
/// List of chemicals and how much is injected, will inject in descending order based on if a target has at least half the designated amount
11+
var/list/injection_chems = list(
12+
/datum/reagent/toxin/sodium_thiopental = 10,
13+
/datum/reagent/toxin/cyanide = 5
14+
)
15+
/// Chem injected if no other chem is valid
16+
var/datum/reagent/default_chem = /datum/reagent/toxin/cyanide
1417

1518
/datum/martial_art/liquidator/can_use(mob/living/carbon/human/H)
16-
return ispreternis(H)
19+
if(!H.combat_mode)
20+
return FALSE
21+
if(!ispreternis(H))
22+
return FALSE
23+
return TRUE
1724

1825
/datum/martial_art/liquidator/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
19-
if(A.combat_mode && A!=D && (can_use(A))) // A!=D prevents grabbing yourself
20-
add_to_streak("G",D)
21-
if(check_streak(A,D)) //if a combo is made no grab upgrade is done
22-
return TRUE
26+
if(!can_use(A))
2327
return FALSE
24-
else
28+
if(A == D)
2529
return FALSE
2630

31+
add_to_streak("G",D)
32+
if(check_streak(A,D)) //if a combo is made no grab upgrade is done (QoL rather than stealth)
33+
return TRUE
34+
return FALSE
35+
2736
/datum/martial_art/liquidator/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
2837
if(!can_use(A))
2938
return FALSE
39+
3040
add_to_streak("H",D)
31-
if(check_streak(A,D))
32-
return TRUE
33-
return FALSE ///We need it work like a generic, non martial art attack
41+
check_streak(A,D)
42+
return FALSE ///We need it work like a generic, non martial art attack at all times
3443

3544

3645
/datum/martial_art/liquidator/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
3746
if(!(can_use(A)))
3847
return FALSE
39-
add_to_streak("D",D)
40-
if(check_streak(A,D))
41-
return TRUE
42-
return FALSE ///Same as with harm_act
48+
49+
injection(A, D)
50+
return FALSE //always looks like a generic push
4351

4452
/datum/martial_art/liquidator/proc/check_streak(mob/living/carbon/human/A, mob/living/carbon/human/D)
4553
if(!can_use(A))
4654
return
47-
if(findtext(streak, PRE_DAGGER_COMBO))
48-
return hidden_knife(A,D)
49-
50-
if(findtext(streak, PRE_INJECTION_COMBO))
51-
inject_one(A,D)
52-
return TRUE
53-
if(findtext(streak, INJECTION_COMBO))
54-
inject_two(A,D)
55-
return TRUE
55+
if(findtext(streak, DAGGER_COMBO))
56+
hidden_knife(A,D)
57+
streak = ""
58+
return FALSE
5659

5760
if(findtext(streak, FINGERGUN_COMBO))
5861
fingergun(A,D)
62+
streak = ""
5963
return FALSE
6064

61-
/datum/martial_art/liquidator/proc/hidden_knife(mob/living/carbon/human/A, mob/living/carbon/human/D)
62-
if(findtext(streak, DAGGER_COMBO))
63-
var/selected_zone = A.zone_selected
64-
var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(selected_zone))
65-
var/armor_block = D.run_armor_check(affecting, MELEE, armour_penetration = 40)
66-
D.apply_damage(A.get_punchdamagehigh() * 2 + 10, BRUTE, selected_zone, armor_block, sharpness = SHARP_EDGED) //30 damage
67-
to_chat(A, span_warning("You stab [D] with a hidden blade!"))
68-
to_chat(D, span_userdanger("You are suddenly stabbed with a blade!"))
69-
streak = ""
70-
return TRUE
71-
else
72-
var/selected_zone = A.zone_selected
73-
var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(selected_zone))
74-
var/armor_block = D.run_armor_check(affecting, MELEE, armour_penetration = 10)
75-
D.apply_damage(A.get_punchdamagehigh() * 1.5 + 5, STAMINA, affecting, armor_block) //20 stamina
76-
D.apply_damage(A.get_punchdamagehigh() / 2, BRUTE, affecting, armor_block) //5 brute
77-
return FALSE //Because it is a stealthy martial art, we need it to work like... a normal shove, so people nearby couldn't understand so easy that you know a martial art.
78-
79-
80-
/datum/martial_art/liquidator/proc/inject_one(mob/living/carbon/human/A, mob/living/carbon/human/D)
81-
D.reagents.add_reagent(/datum/reagent/toxin/sodium_thiopental, 8)
82-
to_chat(A, span_warning("You inject sodium thiopental into [D]!"))
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', 15, TRUE) //sound only to you as audio feedback that you stabbed them
72+
A.playsound_local(src, 'sound/weapons/bladeslice.ogg', 15, TRUE)
73+
74+
/datum/martial_art/liquidator/proc/injection(mob/living/carbon/human/A, mob/living/carbon/human/D)
75+
var/datum/reagent/picked_chem = default_chem
76+
var/amount = injection_chems[picked_chem]
77+
78+
for(var/i in injection_chems)
79+
var/has_reagent = D.reagents.get_reagent_amount(i)
80+
if(has_reagent <= (injection_chems[i]/2))
81+
picked_chem = i
82+
amount = injection_chems[i]
83+
break
84+
85+
D.reagents.add_reagent(picked_chem, amount)
86+
to_chat(A, span_warning("You inject [initial(picked_chem.name)] into [D]!"))
8387
to_chat(D, span_notice("You feel a tiny prick."))
84-
streak = "I"
85-
86-
/datum/martial_art/liquidator/proc/inject_two(mob/living/carbon/human/A, mob/living/carbon/human/D)
87-
D.reagents.add_reagent(/datum/reagent/toxin/cyanide, 5)
88-
to_chat(A, span_warning("You inject cyanide into [D]!"))
89-
to_chat(D, span_notice("You feel a tiny prick."))
90-
streak = ""
9188

9289
/*---------------------------------------------------------------
9390
@@ -98,9 +95,9 @@
9895
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
9996
gun.gun_owner = A
10097
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
10199
to_chat(A, span_notice("You extract a hidden gun from your hand."))
102100
D.Paralyze(1 SECONDS)
103-
streak = ""
104101

105102
/obj/item/gun/ballistic/automatic/pistol/martial
106103
desc = "A concelated version of a stechkin APS pistol, that comes with special Preternis upgrade modules."
@@ -140,7 +137,6 @@
140137
to_chat(gun_owner, span_notice("You decide that it isn't the best time to use [src]"))
141138
qdel(src)
142139

143-
144140
/*---------------------------------------------------------------
145141
146142
end of fingergun section
@@ -150,11 +146,22 @@
150146
set name = "Refresh Data"
151147
set desc = "You try to remember some basic actions from your covert combat module."
152148
set category = "Remnant Liquidator"
153-
to_chat(usr, "<b><i>You try to remember some basic actions from your covert combat module.</i></b>")
149+
var/list/combined_msg = list()
150+
151+
var/datum/martial_art/liquidator/helper = new()
152+
153+
combined_msg += "<b><i>You try to remember some basic actions from your covert combat module.</i></b>"
154+
155+
combined_msg += "[span_notice("Hidden Blade")]: Harm Harm. You stab the target with a hidden blade, dealing considerable brute damage."
156+
combined_msg += "[span_notice("Finger gun")]: Harm Grab. Briefly paralyse your target and place a stealthy version of a stechkin in your hand."
157+
158+
combined_msg += "[span_notice("Injection")]: Your disarm intent will inject chemicals in a determined order."
159+
combined_msg += span_notice("The chemicals that will be injected in this order are:")
160+
for(var/datum/reagent/chemical as anything in helper.injection_chems)
161+
combined_msg += span_notice("[helper.injection_chems[chemical]]u of [initial(chemical.name)]. But only if there is less than [helper.injection_chems[chemical]/2]u in the target already.")
162+
combined_msg += span_notice("If none of the above chemicals are injected, you will default to [helper.injection_chems[helper.default_chem]]u of [initial(helper.default_chem.name)].")
154163

155-
to_chat(usr, "[span_notice("Hidden Blade")]: Harm Harm Grab. The second strike will deal 20 stamina and 5 brute damage, and finishing the combo will make you stab the victim with a hidden blade, dealing 30 brute damage.")
156-
to_chat(usr, "[span_notice("Injection")]: Disarm Grab Disarm. The second and third input will silently inject 8 units of sodium thiopental and 5 units of cyanide respectively.")
157-
to_chat(usr, "[span_notice("Finger gun")]: Harm Disarm Disarm. Finishing the combo will paralyse your target and place a stealthy version of a stechkin in your hand.")
164+
qdel(helper)
158165

159166
#undef PRE_DAGGER_COMBO
160167
#undef DAGGER_COMBO

0 commit comments

Comments
 (0)