Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reworks heart of aspiration #2067

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,45 @@
duration = -1
alert_type = null
display_name = "heart"
var/panic_override = FALSE

/datum/status_effect/display/aspiration/on_apply()
. = ..()
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
H.adjust_attribute_buff(JUSTICE_ATTRIBUTE, 10)
H.adjust_attribute_buff(FORTITUDE_ATTRIBUTE, 10)
H.adjust_attribute_buff(FORTITUDE_ATTRIBUTE, 15)

/datum/status_effect/display/aspiration/tick()
. = ..()
var/mob/living/carbon/human/H = owner
H.adjustBruteLoss(1) // Your health slowly ticks down
H.adjustSanityLoss(1) // Your health slowly ticks down
if(H.is_working)
playsound(get_turf(src), 'sound/abnormalities/nothingthere/heartbeat.ogg', 50, 0, 3)
H.adjustSanityLoss(10)
if(H.sanityhealth <= H.maxSanity * 0.2 && !H.sanity_lost)
H.adjustSanityLoss(999)
if(H.sanity_lost)
H.adjustBruteLoss(-4)
SanityCheck()

/datum/status_effect/display/aspiration/proc/SanityCheck()
var/mob/living/carbon/human/status_holder = owner
if(status_holder.sanity_lost)
if(panic_override)
return
QDEL_NULL(status_holder.ai_controller)
status_holder.ai_controller = /datum/ai_controller/insane/murder
status_holder.InitializeAIController()
status_holder.apply_status_effect(/datum/status_effect/panicked_type/murder)
panic_override = TRUE
return
panic_override = FALSE

/datum/status_effect/display/aspiration/on_remove()
. = ..()
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
H.adjust_attribute_buff(JUSTICE_ATTRIBUTE, -10)
H.adjust_attribute_buff(FORTITUDE_ATTRIBUTE, -10)
H.adjust_attribute_buff(FORTITUDE_ATTRIBUTE, -15)

#undef STATUS_EFFECT_ASPIRATION
4 changes: 3 additions & 1 deletion code/modules/paperwork/records/info/tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@
Name : Heart of Aspiration<br>
Risk Class: TETH <br>
- Those who equip The Heart of Aspiration will benefit from increased HP and Justice. <br>
- Heart of aspiration slowly drained the health and sanity of the person using it. "}
- Heart of aspiration slowly drained the sanity of the person using it during work. <br>
- When the person that equipped The Heart of Aspiration has their SP 20% or lower of their max SP, they went mad, <br>
- Should the person that equipped The Heart of Aspiration become insane, the person would become violent quickly."}

//Bracelet
/obj/item/paper/fluff/info/tool/bracelet
Expand Down
Loading