Skip to content

Commit e254edd

Browse files
committed
Mark of Rust now arms grenades instead of instantly detonating them
1 parent 2a64625 commit e254edd

File tree

5 files changed

+63
-7
lines changed

5 files changed

+63
-7
lines changed

code/__DEFINES/~monkestation/antagonists.dm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,6 @@
5353
#define BORER_HIDING (1<<3)
5454
/// If the borer can produce eggs without a host
5555
#define BORER_ALONE_PRODUCTION (1<<4)
56+
57+
/// How much heretic Mark of Rust mark does to items
58+
#define RUST_MARK_DAMAGE 50

code/modules/antagonists/heretic/heretic_knowledge.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@
343343
if(!istype(mark))
344344
return FALSE
345345

346-
mark.on_effect()
346+
mark.on_effect(source) // monkestation edit: add "activator" arg to /datum/status_effect/eldritch/proc/on_effect()
347347
return TRUE
348348

349349
/**

code/modules/antagonists/heretic/status_effects/mark_effects.dm

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
/**
4545
* Called when the mark is activated by the heretic.
4646
*/
47-
/datum/status_effect/eldritch/proc/on_effect()
47+
/datum/status_effect/eldritch/proc/on_effect(mob/living/activator) // monkestation edit: add "activator" arg to /datum/status_effect/eldritch/proc/on_effect()
4848
SHOULD_CALL_PARENT(TRUE)
4949

5050
playsound(owner, 'sound/magic/repulse.ogg', 75, TRUE)
@@ -57,7 +57,7 @@
5757
/datum/status_effect/eldritch/flesh
5858
effect_icon_state = "emark1"
5959

60-
/datum/status_effect/eldritch/flesh/on_effect()
60+
/datum/status_effect/eldritch/flesh/on_effect(mob/living/activator) // monkestation edit: add "activator" arg to /datum/status_effect/eldritch/proc/on_effect()
6161
if(ishuman(owner))
6262
var/mob/living/carbon/human/human_owner = owner
6363
var/obj/item/bodypart/bodypart = pick(human_owner.bodyparts)
@@ -76,7 +76,7 @@
7676
. = ..()
7777
src.repetitions = max(1, repetition)
7878

79-
/datum/status_effect/eldritch/ash/on_effect()
79+
/datum/status_effect/eldritch/ash/on_effect(mob/living/activator) // monkestation edit: add "activator" arg to /datum/status_effect/eldritch/proc/on_effect()
8080
if(iscarbon(owner))
8181
var/mob/living/carbon/carbon_owner = owner
8282
carbon_owner.stamina.adjust(-6 * repetitions) // first one = 30 stam
@@ -94,6 +94,7 @@
9494
/datum/status_effect/eldritch/rust
9595
effect_icon_state = "emark3"
9696

97+
/* monkestation removal: reimplemented in [monkestation/code/modules/antagonists/heretic/status_effects/mark_effects.dm]
9798
/datum/status_effect/eldritch/rust/on_effect()
9899
if(iscarbon(owner))
99100
var/mob/living/carbon/carbon_owner = owner
@@ -119,13 +120,14 @@
119120
thing.take_damage(50) //monkestation edit end
120121
121122
return ..()
123+
monkestation end */
122124

123125
// MARK OF VOID
124126

125127
/datum/status_effect/eldritch/void
126128
effect_icon_state = "emark4"
127129

128-
/datum/status_effect/eldritch/void/on_effect()
130+
/datum/status_effect/eldritch/void/on_effect(mob/living/activator) // monkestation edit: add "activator" arg to /datum/status_effect/eldritch/proc/on_effect()
129131
owner.apply_status_effect(/datum/status_effect/void_chill/major)
130132
owner.adjust_silence(10 SECONDS)
131133
return ..()
@@ -235,7 +237,7 @@
235237
QDEL_NULL(cosmic_diamond)
236238
return ..()
237239

238-
/datum/status_effect/eldritch/cosmic/on_effect()
240+
/datum/status_effect/eldritch/cosmic/on_effect(mob/living/activator) // monkestation edit: add "activator" arg to /datum/status_effect/eldritch/proc/on_effect()
239241
owner.adjust_confusion(7 SECONDS) //monkestation edit
240242
new teleport_effect(get_turf(owner))
241243
new /obj/effect/forcefield/cosmic_field(get_turf(owner))
@@ -295,7 +297,7 @@
295297
REMOVE_TRAIT(owner, TRAIT_PACIFISM, id)
296298
owner.balloon_alert(owner, "you feel able to once again strike!")
297299

298-
/datum/status_effect/eldritch/moon/on_effect()
300+
/datum/status_effect/eldritch/moon/on_effect(mob/living/activator) // monkestation edit: add "activator" arg to /datum/status_effect/eldritch/proc/
299301
owner.adjust_confusion(30 SECONDS)
300302
owner.adjustOrganLoss(ORGAN_SLOT_BRAIN, 25, 160)
301303
owner.emote(pick("giggle", "laugh"))
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/datum/status_effect/eldritch/rust/on_effect(mob/living/activator)
2+
if(iscarbon(owner))
3+
var/mob/living/carbon/carbon_owner = owner
4+
var/static/list/organs_to_damage = list(
5+
ORGAN_SLOT_BRAIN,
6+
ORGAN_SLOT_EARS,
7+
ORGAN_SLOT_EYES,
8+
ORGAN_SLOT_LIVER,
9+
ORGAN_SLOT_LUNGS,
10+
ORGAN_SLOT_STOMACH,
11+
ORGAN_SLOT_HEART,
12+
)
13+
14+
// Roughly 25% of their organs will take a bit of damage
15+
for(var/organ_slot in organs_to_damage)
16+
if(prob(25))
17+
carbon_owner.adjustOrganLoss(organ_slot, 20)
18+
19+
var/list/grenades = list()
20+
// And roughly 50% of their items will take a smack, too
21+
for(var/obj/item/thing in carbon_owner.get_all_gear())
22+
if(QDELETED(thing) || prob(50))
23+
continue
24+
// ignore abstract items and such
25+
if(thing.item_flags & (ABSTRACT | EXAMINE_SKIP | HAND_ITEM))
26+
continue
27+
// don't delete people's ID cards
28+
if(istype(thing, /obj/item/card/id))
29+
continue
30+
// special handling for grenades
31+
if(istype(thing, /obj/item/grenade))
32+
var/obj/item/grenade/grenade = thing
33+
if(grenade.active) // primed grenades are just turned into duds
34+
grenade.dud_flags |= GRENADE_DUD
35+
continue
36+
if(!grenade.dud_flags)
37+
grenades["[grenade::name]"]++
38+
log_bomber(activator, "has primed a", grenade, "via damage from Mark of Rust")
39+
grenade.arm_grenade(delayoverride = max(round(grenade.det_time * 0.75, 0.5 SECONDS), 2 SECONDS))
40+
continue
41+
thing.take_damage(RUST_MARK_DAMAGE)
42+
43+
var/grenade_amt = length(grenades)
44+
if(grenade_amt)
45+
var/list/msg = list()
46+
for(var/name in grenades)
47+
msg += "[grenades[name]]x [name]"
48+
owner.balloon_alert(activator, "triggered [english_list(msg)]")
49+
owner.balloon_alert_to_viewers("[grenade_amt > 1 ? "several grenades" : "grenade"] damaged and activated!", ignored_mobs = activator)
50+
return ..()

tgstation.dme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6394,6 +6394,7 @@
63946394
#include "monkestation\code\modules\antagonists\heretic\knowledge\rust_lore.dm"
63956395
#include "monkestation\code\modules\antagonists\heretic\knowledge\sacrifice_knowledge\sacrifice_buff.dm"
63966396
#include "monkestation\code\modules\antagonists\heretic\knowledge\sacrifice_knowledge\sacrifice_knowledge.dm"
6397+
#include "monkestation\code\modules\antagonists\heretic\status_effects\mark_effects.dm"
63976398
#include "monkestation\code\modules\antagonists\monster_hunters\hunter_datum.dm"
63986399
#include "monkestation\code\modules\antagonists\monster_hunters\hunter_rulesets.dm"
63996400
#include "monkestation\code\modules\antagonists\monster_hunters\hunting_contracts.dm"

0 commit comments

Comments
 (0)