mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 19:44:58 +01:00
Fix voltaic combat cyberhearts killing toxlovers (#94041)
## About The Pull Request Partial port of https://github.com/Monkestation/Monkestation2.0/pull/9549 this makes it so the voltaic overdrive status effect from the combat cyberheart won't try to heal toxins for toxin lovers also moved the voltaic overdrive status effect to `STATUS_EFFECT_PRIORITY` as it's something where skipping ticks can fuck you over, as it's likely to be active during a fight, and also made it so `updatehealth` is only called once. ## Why It's Good For The Game dying to something that's supposed to give you a second chance kinda sucks, and there's not really any indicator that it would do this until you keel over from blood loss mid-fight.
This commit is contained in:
@@ -33,6 +33,10 @@
|
||||
QDEL_NULL(core)
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/heart/cybernetic/anomalock/examine(mob/user)
|
||||
. = ..()
|
||||
. += span_info("The voltaic boost will avoid healing toxin damage at all in slime-based humanoids, to prevent harmful side effects.")
|
||||
|
||||
/obj/item/organ/heart/cybernetic/anomalock/on_mob_insert(mob/living/carbon/organ_owner, special, movement_flags)
|
||||
. = ..()
|
||||
if(!core)
|
||||
@@ -182,14 +186,19 @@
|
||||
duration = 30 SECONDS
|
||||
alert_type = /atom/movable/screen/alert/status_effect/anomalock_active
|
||||
show_duration = TRUE
|
||||
processing_speed = STATUS_EFFECT_PRIORITY
|
||||
|
||||
/datum/status_effect/voltaic_overdrive/tick(seconds_between_ticks)
|
||||
. = ..()
|
||||
|
||||
if(owner.health <= owner.crit_threshold)
|
||||
owner.heal_overall_damage(5, 5)
|
||||
owner.adjust_oxy_loss(-5)
|
||||
owner.adjust_tox_loss(-5)
|
||||
if(owner.health > owner.crit_threshold)
|
||||
return
|
||||
var/needs_update = FALSE
|
||||
needs_update += owner.heal_overall_damage(brute = 5, burn = 5, updating_health = FALSE)
|
||||
needs_update += owner.adjust_oxy_loss(-5, updating_health = FALSE)
|
||||
if(!HAS_TRAIT(owner, TRAIT_TOXINLOVER))
|
||||
needs_update += owner.adjust_tox_loss(-5, updating_health = FALSE)
|
||||
if(needs_update)
|
||||
owner.updatehealth()
|
||||
|
||||
/datum/status_effect/voltaic_overdrive/on_apply()
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user