mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-19 13:35:10 +00:00
## 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.   ## Changelog 🆑 add: You can burn bibles now! But heresy has a steep cost... /🆑 --------- Co-authored-by: san7890 <the@san7890.com>
27 lines
1.1 KiB
Plaintext
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..."))
|