Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Mark of Rust now arms grenades instead of instantly detonating them #4637

Merged
merged 1 commit into from
Dec 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions code/__DEFINES/~monkestation/antagonists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@
#define BORER_HIDING (1<<3)
/// If the borer can produce eggs without a host
#define BORER_ALONE_PRODUCTION (1<<4)

/// How much heretic Mark of Rust mark does to items
#define RUST_MARK_DAMAGE 50
2 changes: 1 addition & 1 deletion code/modules/antagonists/heretic/heretic_knowledge.dm
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@
if(!istype(mark))
return FALSE

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

/**
Expand Down
14 changes: 8 additions & 6 deletions code/modules/antagonists/heretic/status_effects/mark_effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
/**
* Called when the mark is activated by the heretic.
*/
/datum/status_effect/eldritch/proc/on_effect()
/datum/status_effect/eldritch/proc/on_effect(mob/living/activator) // monkestation edit: add "activator" arg to /datum/status_effect/eldritch/proc/on_effect()
SHOULD_CALL_PARENT(TRUE)

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

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

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

/* monkestation removal: reimplemented in [monkestation/code/modules/antagonists/heretic/status_effects/mark_effects.dm]
/datum/status_effect/eldritch/rust/on_effect()
if(iscarbon(owner))
var/mob/living/carbon/carbon_owner = owner
Expand All @@ -119,13 +120,14 @@
thing.take_damage(50) //monkestation edit end

return ..()
monkestation end */

// MARK OF VOID

/datum/status_effect/eldritch/void
effect_icon_state = "emark4"

/datum/status_effect/eldritch/void/on_effect()
/datum/status_effect/eldritch/void/on_effect(mob/living/activator) // monkestation edit: add "activator" arg to /datum/status_effect/eldritch/proc/on_effect()
owner.apply_status_effect(/datum/status_effect/void_chill/major)
owner.adjust_silence(10 SECONDS)
return ..()
Expand Down Expand Up @@ -235,7 +237,7 @@
QDEL_NULL(cosmic_diamond)
return ..()

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

/datum/status_effect/eldritch/moon/on_effect()
/datum/status_effect/eldritch/moon/on_effect(mob/living/activator) // monkestation edit: add "activator" arg to /datum/status_effect/eldritch/proc/
owner.adjust_confusion(30 SECONDS)
owner.adjustOrganLoss(ORGAN_SLOT_BRAIN, 25, 160)
owner.emote(pick("giggle", "laugh"))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/datum/status_effect/eldritch/rust/on_effect(mob/living/activator)
if(iscarbon(owner))
var/mob/living/carbon/carbon_owner = owner
var/static/list/organs_to_damage = list(
ORGAN_SLOT_BRAIN,
ORGAN_SLOT_EARS,
ORGAN_SLOT_EYES,
ORGAN_SLOT_LIVER,
ORGAN_SLOT_LUNGS,
ORGAN_SLOT_STOMACH,
ORGAN_SLOT_HEART,
)

// Roughly 25% of their organs will take a bit of damage
for(var/organ_slot in organs_to_damage)
if(prob(25))
carbon_owner.adjustOrganLoss(organ_slot, 20)

var/list/grenades = list()
// And roughly 50% of their items will take a smack, too
for(var/obj/item/thing in carbon_owner.get_all_gear())
if(QDELETED(thing) || prob(50))
continue
// ignore abstract items and such
if(thing.item_flags & (ABSTRACT | EXAMINE_SKIP | HAND_ITEM))
continue
// don't delete people's ID cards
if(istype(thing, /obj/item/card/id))
continue
// special handling for grenades
if(istype(thing, /obj/item/grenade))
var/obj/item/grenade/grenade = thing
if(grenade.active) // primed grenades are just turned into duds
grenade.dud_flags |= GRENADE_DUD
continue
if(!grenade.dud_flags)
grenades["[grenade::name]"]++ // so you can't name/label a grenade something stupidly long to annoy them
log_bomber(activator, "has primed a", grenade, "via damage from Mark of Rust")
grenade.arm_grenade(delayoverride = max(round(grenade.det_time * 0.75, 0.5 SECONDS), 2 SECONDS))
continue
thing.take_damage(RUST_MARK_DAMAGE)

var/grenade_amt = length(grenades)
if(grenade_amt)
var/list/msg = list()
for(var/name in grenades)
msg += "[grenades[name]]x [name]"
owner.balloon_alert(activator, "triggered [english_list(msg)]")
owner.balloon_alert_to_viewers("[grenade_amt > 1 ? "several grenades" : "grenade"] damaged and activated!", ignored_mobs = activator)
return ..()
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -6394,6 +6394,7 @@
#include "monkestation\code\modules\antagonists\heretic\knowledge\rust_lore.dm"
#include "monkestation\code\modules\antagonists\heretic\knowledge\sacrifice_knowledge\sacrifice_buff.dm"
#include "monkestation\code\modules\antagonists\heretic\knowledge\sacrifice_knowledge\sacrifice_knowledge.dm"
#include "monkestation\code\modules\antagonists\heretic\status_effects\mark_effects.dm"
#include "monkestation\code\modules\antagonists\monster_hunters\hunter_datum.dm"
#include "monkestation\code\modules\antagonists\monster_hunters\hunter_rulesets.dm"
#include "monkestation\code\modules\antagonists\monster_hunters\hunting_contracts.dm"
Expand Down
Loading