Files
Bubberstation/code/modules/admin/smites/bad_luck.dm
ChungusGamer666 dff70625e7 Bible refactor (#75350)
## About The Pull Request

This started as a simple addition where burning a bible would curse you,
but then I realized... Bibles aren't even proper books, thus can't be
burned!
So yeah, since that is not necessary due to how atom_storage works, I
reworked that.

## Why It's Good For The Game

Because burning bibles and getting cursed for it is funny.

![image](https://github.com/tgstation/tgstation/assets/82850673/2a8489ce-ecd6-45ee-9eb9-168ff820af65)

![image](https://github.com/tgstation/tgstation/assets/82850673/ebe98ad6-2d0d-4d20-9ea1-5d472d6ca465)

## Changelog

🆑
add: You can burn bibles now! But heresy has a steep cost...
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-05-15 04:27:43 +00:00

27 lines
1.1 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/permanent
/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"
permanent = tgui_alert(user, "Would you like this to be permanent or removed automatically after the first accident?", "Permanent?", list("Permanent", "Temporary")) == "Permanent"
/datum/smite/bad_luck/effect(client/user, mob/living/target)
. = ..()
//if permanent, replace any existing omen
if(permanent)
var/existing_component = target.GetComponent(/datum/component/omen)
qdel(existing_component)
target.AddComponent(/datum/component/omen/smite, permanent = permanent)
if(silent)
return
to_chat(target, span_warning("You get a bad feeling..."))
if(permanent)
to_chat(target, span_warning("A <b>very</b> bad feeling... As if malevolent forces are watching you..."))