Skip to content

Commit

Permalink
final changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Qwertytoforty committed Nov 23, 2024
1 parent e93951f commit 66f9687
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
17 changes: 13 additions & 4 deletions code/datums/status_effects/buffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -673,14 +673,23 @@
/datum/status_effect/hope/tick()
if(owner.stat == DEAD || owner.health <= HEALTH_THRESHOLD_DEAD) // No dead healing, or healing in dead crit
return
var/heal_multiplier = 0
switch(owner.health)
if(50 to INFINITY)
heal_multiplier = 1
if(0 to 50)
heal_multiplier = 2
if(-50 to 0)
heal_multiplier = 3
if(-100 to -50)
heal_multiplier = 4
owner.adjustBruteLoss(-heal_multiplier)
owner.adjustFireLoss(-heal_multiplier)
owner.adjustOxyLoss(-heal_multiplier)
if(owner.health > 50)
if(prob(0.5))
hope_message()
return
var/heal_multiplier = min(3, ((50 - owner.health) / 50 + 1)) // 1 hp at 50 health, 2 at 0, 3 at -50
owner.adjustBruteLoss(-heal_multiplier * 0.5)
owner.adjustFireLoss(-heal_multiplier * 0.5)
owner.adjustOxyLoss(-heal_multiplier)
if(prob(heal_multiplier * 2))
hope_message()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
friendly_fire_check = TRUE


//Pandora's loot: Hope //Hope I know what to make it do
//Pandora's loot: Hope
/obj/item/clothing/accessory/necklace/pandora_hope
name = "Hope"
desc = "Found at the bottom of Pandora. After all the evil was released, this was the only thing left inside."
Expand Down
11 changes: 10 additions & 1 deletion code/modules/surgery/organs/augments_internal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,8 @@
var/revive_cost = 0 SECONDS
/// Are we in the progress of healing the user?
var/reviving = FALSE
/// Have we defibed someone this heal period? If so, do not heal past crit without an upgraded heart, as it is low on juice.
var/has_defibed = FALSE
/// How long we are on cooldown for
COOLDOWN_DECLARE(reviver_cooldown)
/// How long till we can try to defib again
Expand Down Expand Up @@ -705,12 +707,16 @@
if(owner.health <= 0 || owner.stat == DEAD)
revive_cost = 0
reviving = TRUE
has_defibed = FALSE
to_chat(owner, "<span class='notice'>You feel a faint buzzing as your reviver implant starts patching your wounds...</span>")
COOLDOWN_START(src, defib_cooldown, 8 SECONDS) // 5 seconds after heal proc delay

/obj/item/organ/internal/cyberimp/chest/reviver/proc/heal()
if(QDELETED(owner))
return
// This is not on defib check so it doesnt revive IPCs either in a demon.
if(HAS_TRAIT(owner, TRAIT_UNREVIVABLE))
return
if(COOLDOWN_FINISHED(src, defib_cooldown))
revive_dead()
/// boolean that stands for if PHYSICAL damage being patched
Expand Down Expand Up @@ -775,6 +781,7 @@
owner.Paralyse(10 SECONDS)
owner.emote("gasp")
owner.Jitter(20 SECONDS)
has_defibed = TRUE
SEND_SIGNAL(owner, COMSIG_LIVING_MINOR_SHOCK)
add_attack_logs(owner, owner, "Revived with [src]")

Expand All @@ -801,7 +808,9 @@
var/mob/living/carbon/human/H = owner
var/heal_threshold = 0
var/obj/item/organ/internal/heart/cybernetic/upgraded/U = H.get_int_organ(/obj/item/organ/internal/heart/cybernetic/upgraded)
if(U) //The heart assists in healing, and will heal you out of shock.
if(U) // The heart assists in healing, and will heal you out of shock.
heal_threshold = 25
if(!has_defibed) // Not low on power, can heal you out of shock.
heal_threshold = 25
if(H.health > heal_threshold)
return TRUE
Expand Down

0 comments on commit 66f9687

Please sign in to comment.