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

[MIRROR] Hemophagus, The Hemophage Revamp, DLC Chapter V: This PR Sucks (Blood) #724

Merged
merged 1 commit into from
Nov 20, 2023
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 @@ -118,7 +118,13 @@
// if you drained from a human with a client, congrats
var/drained_multiplier = (is_target_human_with_client ? BLOOD_DRAIN_MULTIPLIER_CKEY : 1)

victim.blood_volume = clamp(victim.blood_volume - drained_blood, 0, BLOOD_VOLUME_MAXIMUM)
var/obj/item/organ/internal/stomach/hemophage/stomach_reference = hemophage.get_organ_slot(ORGAN_SLOT_STOMACH)
if(isnull(stomach_reference))
victim.blood_volume = clamp(victim.blood_volume - drained_blood, 0, BLOOD_VOLUME_MAXIMUM)

else
if(!victim.transfer_blood_to(stomach_reference, drained_blood, forced = TRUE))
victim.blood_volume = clamp(victim.blood_volume - drained_blood, 0, BLOOD_VOLUME_MAXIMUM)
hemophage.blood_volume = clamp(hemophage.blood_volume + (drained_blood * drained_multiplier), 0, BLOOD_VOLUME_MAXIMUM)

log_combat(hemophage, victim, "drained [drained_blood]u of blood from", addition = " (NEW BLOOD VOLUME: [victim.blood_volume] cL)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,53 @@

AddComponent(/datum/component/organ_corruption/liver, time_to_corrupt = ORGAN_CORRUPTION_INSTANT)

/obj/item/organ/internal/liver/hemophage/handle_chemical(mob/living/carbon/affected_mob, datum/reagent/chem, seconds_per_tick, times_fired)
. = ..()

// parent returned COMSIG_MOB_STOP_REAGENT_CHECK or we are failing
if((. & COMSIG_MOB_STOP_REAGENT_CHECK) || (organ_flags & ORGAN_FAILING))
return

// hemophages drink blood so blood must be pretty good for them
if(!istype(chem, /datum/reagent/blood))
return

var/feedback_delivered = FALSE
for(var/datum/wound/iter_wound as anything in affected_mob.all_wounds)
if(!SPT_PROB(5, seconds_per_tick))
continue

var/helped = iter_wound.blood_life_process()
if(feedback_delivered || !helped)
continue

to_chat(affected_mob, span_notice("A euphoric feeling hits you as blood's warmth washes through your insides. Your body feels more alive, your wounds healthier."))
feedback_delivered = TRUE


// Different handling, different name.
// Returns FALSE by default so broken bones and 'loss' wounds don't give a false message
/datum/wound/proc/blood_life_process()
return FALSE

// Slowly increase (gauzed) clot rate, better than tea.
/datum/wound/pierce/bleed/blood_life_process()
gauzed_clot_rate += 0.1
return TRUE

// Slowly increase clot rate, better than tea.
/datum/wound/slash/flesh/blood_life_process()
clot_rate += 0.2
return TRUE

// Brought over from tea as well.
/datum/wound/burn/flesh/blood_life_process()
// Sanitizes and heals, but with a limit
if(flesh_healing <= 0.1)
flesh_healing += 0.02
infestation_rate = max(infestation_rate - 0.005, 0)
return TRUE


/obj/item/organ/internal/stomach/hemophage
name = "stomach" // Name change is handled by /datum/component/organ_corruption/corrupt_organ()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/// How much brute damage their body regenerates per second while using blood regeneration.
#define BLOOD_REGEN_BRUTE_AMOUNT 0.75
#define BLOOD_REGEN_BRUTE_AMOUNT 2
/// How much burn damage their body regenerates per second while using blood regeneration.
#define BLOOD_REGEN_BURN_AMOUNT 0.75
#define BLOOD_REGEN_BURN_AMOUNT 2
/// How much toxin damage their body regenerates per second while using blood regeneration.
#define BLOOD_REGEN_TOXIN_AMOUNT 0.5
#define BLOOD_REGEN_TOXIN_AMOUNT 1.5
/// How much cellular damage their body regenerates per second while using blood regeneration.
#define BLOOD_REGEN_CELLULAR_AMOUNT 0.25
#define BLOOD_REGEN_CELLULAR_AMOUNT 1.50

/datum/status_effect/blood_thirst_satiated
id = "blood_thirst_satiated"
Expand Down
Loading