mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-29 10:31:34 +00:00
* 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>
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..."))
|