Files
Bubberstation/code/modules/admin/smites/bad_luck.dm
SkyratBot d3f2386664 [MIRROR] Bible refactor [MDB IGNORE] (#21190)
* Bible refactor

* Delete book.dm

* updatepaths

* you're meaning to tell me i have to edit CODE??

---------

Co-authored-by: ChungusGamer666 <82850673+ChungusGamer666@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
Co-authored-by: Jolly-66 <70232195+Jolly-66@users.noreply.github.com>
2023-05-16 09:34:10 -04: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..."))