Files
MrMelbertandGitHub c06d6eac81 Rework to cursed/omen effects (#96529)
## About The Pull Request

- Cursed/omen: Vending machines will have a chance to tip over onto you
when you purchase something, rather than passively as you walk around
them.

- Cursed/omen: Airlocks will now have a chance to crush you if you stand
on them when they try to close, rather than passively as you walk
through them.

- Cursed/omen: Light fixtures will now have a chance to shock you if
they break or are turned on/off, rather than passively as you walk
around them.

- Cursed/omen: Mirror reaction will only trigger if you step up to a
mirror, rather than if you step within two tiles of a mirror.

- Cursed/omen: Several chat descriptions of events have been rewritten
to be more "final destination", less "you're being haunted".

- Bad luck smite set to infinite can no longer be blessed to be removed.

- Fixes and refactors for Omen

## Why It's Good For The Game

Cursed is a very fun idea for a quirk but it is quite miserable to play.
Just navigating around results in you being hardstunned every minute as
you break literally every light fixture in your department.

I wanted to lessen this misery a bit while still keeping the theme of
the quirk/component. I figure it'd be more appropriate/fair if these
unlucky interactions happen as a consequence of something you (probably)
did rather than just existing.

## Changelog

🆑 Melbert
balance: Cursed: Vending machines will have a chance to tip over onto
you when you purchase something, rather than passively as you walk
around them.
balance: Cursed: Airlocks will now have a chance to crush you if you
stand on them when they try to close, rather than passively as you walk
through them.
balance: Cursed: Nearby light fixtures will now have a chance to shock
you if they break or are turned on/off, rather than passively as you
walk around them.
balance: Cursed: Mirror reaction will only trigger if you step up to a
mirror, rather than if you step within two tiles of a mirror.
spellcheck: Cursed: Several chat feedback messages have been rewritten
to be less "overt" about their nature. (More "final destination", less
"a demon is haunting you".)
admin: Bad luck smite set to "permanent" can no longer be removed by
chaplains.
admin: Bad luck smite set to "permanent" won't gib the guy on death if
they've experienced one bad luck event.
refactor: Cursed/omen/bad luck has been refactored, report any oddities
with it.
/🆑
2026-07-02 09:33:30 +02:00

41 lines
1.3 KiB
Plaintext

/// Gives the target bad luck, optionally permanently
/datum/smite/bad_luck
name = "Bad Luck"
/// Should the target know they've received bad luck?
var/silent
/// Is this permanent?
var/incidents
/datum/smite/bad_luck/configure(client/user)
silent = tgui_alert(user, "Do you want to apply the omen with a player notification?", "Notify Player?", list("Notify", "Silent")) == "Silent"
incidents = tgui_input_number(user, "For how many incidents will the omen last? 0 means permanent.", "Duration?", default = 0, round_value = 1)
if(incidents == 0)
incidents = INFINITY
/datum/smite/bad_luck/effect(client/user, mob/living/target)
. = ..()
//if permanent, replace any existing omen
if(incidents == INFINITY)
qdel(target.GetComponent(/datum/component/omen))
target.AddComponent( \
/datum/component/omen, \
incidents_left = incidents, \
on_death = CALLBACK(src, PROC_REF(on_death)), \
bless_fixable = incidents != INFINITY, \
)
if(silent)
return
to_chat(target, span_warning("You get a bad feeling..."))
if(incidents == INFINITY)
to_chat(target, span_warning("A <b>very</b> bad feeling... As if malevolent forces are watching you..."))
/datum/smite/bad_luck/proc/on_death(datum/component/omen/omen)
if(omen.incidents_left == INFINITY)
return
var/mob/living/our_guy = omen.parent
omen.death_explode(our_guy)
our_guy.gib(DROP_ALL_REMAINS)