Skip to content

Commit

Permalink
DFB property changes. (#4590)
Browse files Browse the repository at this point in the history
# About the pull request
part 2 out of 4 
This does a **big** touch up on defibrillation property in research

Well, to start off, max_level = 1 was removed. It appears warcrimes
forgot to remove it since process proc has benefits explicitly for
higher levels. I would call it a bug(oversight rather).

Second: Ghosts get notified when the chem starts to try and defib you,
so you dont just wonder how did you stand up, and pretty neat too.

Third: The >6 level of defib to apply healing like with actual item
defib is too high, so we move requirement down to >1 but make it heal
much, much worse at levels lower than 5.
eg it took 20 units to heal ~20 brute at level 3(you will literally
perma lmao), at level 5, however, this will go at around 2.5 per life
tick, level 8 will give 4 damage heal.
This is a balance change(buff) But hardly so since its research,
Research is already neglecting most of the time this property.

Fourth: removes one letter var, This whole file is entombed with them
but Im not doing that for now.

# Explain why it's good for the game


Defib property is way too underused and crudely made. This fixes it,
partially.

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl: kiVts
add: Ghosts get notified when they are being revived by DFB property
balance: DFB property healing threshold lowered, You can create DFB
property higher than one.
/:cl:

---------

Co-authored-by: Zonespace <[email protected]>
  • Loading branch information
kiVts and Zonespace27 authored Oct 21, 2023
1 parent 7cda2d4 commit de5c696
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 14 deletions.
42 changes: 28 additions & 14 deletions code/modules/reagents/chemistry_properties/prop_positive.dm
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@
rarity = PROPERTY_RARE
category = PROPERTY_TYPE_REACTANT
value = 3
max_level = 1
COOLDOWN_DECLARE(ghost_notif)

/datum/chem_property/positive/defibrillating/on_delete(mob/living/M)
..()
Expand All @@ -574,19 +574,33 @@
/datum/chem_property/positive/defibrillating/process_dead(mob/living/M, potency = 1, delta_time)
if(!ishuman(M))
return
var/mob/living/carbon/human/H = M
H.apply_damage(-H.getOxyLoss(), OXY)
if(H.check_tod() && H.is_revivable() && H.health > HEALTH_THRESHOLD_DEAD)
to_chat(H, SPAN_NOTICE("You feel your heart struggling as you suddenly feel a spark, making it desperately try to continue pumping."))
playsound_client(H.client, 'sound/effects/Heart Beat Short.ogg', 35)
addtimer(CALLBACK(H, TYPE_PROC_REF(/mob/living/carbon/human, handle_revive)), 50, TIMER_UNIQUE)
else if (potency > POTENCY_MAX_TIER_1 && H.check_tod() && H.is_revivable() && H.health < HEALTH_THRESHOLD_DEAD) //Will heal if level is 7 or greater
to_chat(H, SPAN_NOTICE("You feel a faint spark in your chest."))
H.apply_damage(-potency * POTENCY_MULTIPLIER_LOW, BRUTE)
H.apply_damage(-potency * POTENCY_MULTIPLIER_LOW, BURN)
H.apply_damage(-potency * POTENCY_MULTIPLIER_LOW, TOX)
H.apply_damage(-potency * POTENCY_MULTIPLIER_LOW, CLONE)
H.apply_damage(-H.getOxyLoss(), OXY)
var/mob/living/carbon/human/dead = M
var/revivable = dead.check_tod() && dead.is_revivable()
if(revivable && (dead.health > HEALTH_THRESHOLD_DEAD))
addtimer(CALLBACK(dead, TYPE_PROC_REF(/mob/living/carbon/human, handle_revive)), 5 SECONDS)
to_chat(dead, SPAN_NOTICE("You feel your heart struggling as you suddenly feel a spark, making it desperately try to continue pumping."))
playsound_client(dead.client, 'sound/effects/heart_beat_short.ogg', 35)
else if ((potency >= 1) && revivable && dead.health <= HEALTH_THRESHOLD_DEAD) //heals on all level above 1. This is however, minimal.
to_chat(dead, SPAN_NOTICE("You feel a faint spark in your chest."))
dead.apply_damage(-potency * POTENCY_MULTIPLIER_VLOW, BRUTE)
dead.apply_damage(-potency * POTENCY_MULTIPLIER_VLOW, BURN)
dead.apply_damage(-potency * POTENCY_MULTIPLIER_VLOW, TOX)
dead.apply_damage(-potency * POTENCY_MULTIPLIER_VLOW, CLONE)
dead.apply_damage(-dead.getOxyLoss(), OXY)
if(potency > CREATE_MAX_TIER_1) //heal more if higher levels
dead.apply_damage(-potency * POTENCY_MULTIPLIER_LOW, BRUTE)
dead.apply_damage(-potency * POTENCY_MULTIPLIER_LOW, BURN)
dead.apply_damage(-potency * POTENCY_MULTIPLIER_LOW, TOX)
dead.apply_damage(-potency * POTENCY_MULTIPLIER_LOW, CLONE)
if(dead.health < HEALTH_THRESHOLD_DEAD)
return
if(!COOLDOWN_FINISHED(src, ghost_notif))
return
var/mob/dead/observer/ghost = dead.get_ghost()
if(ghost?.client)
COOLDOWN_START(src, ghost_notif, 30 SECONDS)
playsound_client(ghost.client, 'sound/effects/adminhelp_new.ogg')
to_chat(ghost, SPAN_BOLDNOTICE("Your heart is struggling to pump! There is a chance you might get up!(Verbs -> Ghost -> Re-enter corpse, or <a href='?src=\ref[ghost];reentercorpse=1'>click here!</a>)"))
return TRUE

/datum/chem_property/positive/hyperdensificating
Expand Down
File renamed without changes.

0 comments on commit de5c696

Please sign in to comment.