Skip to content

Commit

Permalink
Return of the morbius real (fake) (real) (Sector-Echo-13-Team#9)
Browse files Browse the repository at this point in the history
* now everything is actually proper this time

* just a wee bit more I forgord

* AAAAAAAAAAAAAAAAAA

* there

* KILLS YOU KILLS YOU KILLS YOU

* no permanent hungy overlay no thank you
  • Loading branch information
Ms-Mee authored Nov 29, 2023
1 parent ca81997 commit 8be0c7b
Show file tree
Hide file tree
Showing 10 changed files with 300 additions and 29 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/DNA.dm
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
#define NO_BONES 25 //! You don't have any bones for breaking
#define MUTCOLORS_SECONDARY 26 //! A second mutant colour for other things
#define SKINCOLORS 27 //Human skintones
#define NOHEART 28 //Heartless vampires!

//organ slots
#define ORGAN_SLOT_BRAIN "brain"
Expand Down
6 changes: 4 additions & 2 deletions code/controllers/subsystem/processing/quirks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
list("Ananas Affinity","Ananas Aversion"), \
list("Alcohol Tolerance","Light Drinker"), \
list("Clown Fan","Mime Fan"), \
list("Bad Touch", "Friendly"))
list("Bad Touch", "Friendly"), \
list("Blood Deficiency", "Vampirism"))

species_blacklist = list("Blood Deficiency" = list(SPECIES_IPC, SPECIES_JELLYPERSON, SPECIES_PLASMAMAN, SPECIES_VAMPIRE))
species_blacklist = list("Blood Deficiency" = list(SPECIES_IPC, SPECIES_JELLYPERSON, SPECIES_PLASMAMAN, SPECIES_VAMPIRE), \
"Vampirism" = list(SPECIES_IPC, SPECIES_JELLYPERSON, SPECIES_PLASMAMAN, SPECIES_ETHEREAL, SPECIES_VAMPIRE))

for(var/client/client in GLOB.clients)
client?.prefs.check_quirk_compatibility()
Expand Down
23 changes: 14 additions & 9 deletions code/datums/blood_type.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,35 @@

/datum/blood_type/a_minus
name = "A-"
compatible_types = list(/datum/blood_type/a_minus, /datum/blood_type/o_minus)
compatible_types = list(/datum/blood_type/a_minus, /datum/blood_type/o_minus, /datum/blood_type/morbius)

/datum/blood_type/a_plus
name = "A+"
compatible_types = list(/datum/blood_type/a_minus, /datum/blood_type/a_plus, /datum/blood_type/o_minus, /datum/blood_type/o_plus)
compatible_types = list(/datum/blood_type/a_minus, /datum/blood_type/a_plus, /datum/blood_type/o_minus, /datum/blood_type/o_plus, /datum/blood_type/morbius)

/datum/blood_type/b_minus
name = "B-"
compatible_types = list(/datum/blood_type/b_minus, /datum/blood_type/o_minus)
compatible_types = list(/datum/blood_type/b_minus, /datum/blood_type/o_minus, /datum/blood_type/morbius)

/datum/blood_type/b_plus
name = "B+"
compatible_types = list(/datum/blood_type/b_minus, /datum/blood_type/b_plus, /datum/blood_type/o_minus, /datum/blood_type/o_plus)
compatible_types = list(/datum/blood_type/b_minus, /datum/blood_type/b_plus, /datum/blood_type/o_minus, /datum/blood_type/o_plus, /datum/blood_type/morbius)

/datum/blood_type/ab_minus
name = "AB-"
compatible_types = list(/datum/blood_type/b_minus, /datum/blood_type/a_minus, /datum/blood_type/ab_minus, /datum/blood_type/o_minus)
compatible_types = list(/datum/blood_type/b_minus, /datum/blood_type/a_minus, /datum/blood_type/ab_minus, /datum/blood_type/o_minus, /datum/blood_type/morbius)

/datum/blood_type/ab_plus
name = "AB+"
compatible_types = list(/datum/blood_type/b_minus, /datum/blood_type/a_minus, /datum/blood_type/ab_minus, /datum/blood_type/o_minus)
compatible_types = list(/datum/blood_type/b_minus, /datum/blood_type/b_plus, /datum/blood_type/a_minus, /datum/blood_type/a_plus, /datum/blood_type/ab_minus, /datum/blood_type/ab_plus, /datum/blood_type/o_minus, /datum/blood_type/o_plus, /datum/blood_type/morbius)

/datum/blood_type/o_minus
name = "O-"
compatible_types = list(/datum/blood_type/o_minus)
compatible_types = list(/datum/blood_type/o_minus, /datum/blood_type/morbius)

/datum/blood_type/o_plus
name = "O+"
compatible_types = list(/datum/blood_type/o_minus, /datum/blood_type/o_plus)
compatible_types = list(/datum/blood_type/o_minus, /datum/blood_type/o_plus, /datum/blood_type/morbius)

/datum/blood_type/xenomorph //for xenomorph gib dna
name = "X"
Expand All @@ -50,7 +50,7 @@
/datum/blood_type/lizard
name = "L"
color = "#009696"
compatible_types = list(/datum/blood_type/lizard)
compatible_types = list(/datum/blood_type/lizard, /datum/blood_type/morbius)

/datum/blood_type/elzuosa
name = "E"
Expand All @@ -62,6 +62,11 @@
color = "#dddeff"
compatible_types = list(/datum/blood_type/synthetic)

/datum/blood_type/morbius //It's morbing blood!!
name = "Draculine"
color = "#6e1b42"
compatible_types = list(/datum/blood_type/b_minus, /datum/blood_type/b_plus, /datum/blood_type/a_minus, /datum/blood_type/a_plus, /datum/blood_type/ab_minus, /datum/blood_type/ab_plus, /datum/blood_type/o_minus, /datum/blood_type/o_plus, /datum/blood_type/lizard, /datum/blood_type/animal, /datum/blood_type/morbius, /datum/blood_type/universal, /datum/blood_type/lizard)

/datum/blood_type/universal
name = "U"

Expand Down
173 changes: 173 additions & 0 deletions code/datums/traits/neutral.dm
Original file line number Diff line number Diff line change
Expand Up @@ -226,3 +226,176 @@

SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, "bad_hair_day", /datum/mood_event/bald)

/datum/quirk/vampire
name = "Vampirism"
desc = "You're a bloodsucking vampire, able to suck the blood of others, heal in coffins, transfer to them your own, and you're undead, do be careful not to run out of blood or give others too much of your own, lest peril come. <b>This is not a license to grief.</b>"
value = 0
gain_text = "<span class='notice'>Your blood is accursed, feed on others lest you become dry and fall apart, however your blood is also helpful to others which are not vampires, and you may gift them, careful for them not to become like you.</span>"
lose_text = "<span class='notice'>You feel blessed, your blood no longer cursed.</span>"
medical_record_text = "Patient is a vampire."
mob_traits = list(TRAIT_NOBREATH, TRAIT_NOHUNGER)
var/old_blood
var/obj/item/organ/heart/old_heart
var/datum/action/vampire_quirk_drain/vampire_drain
var/datum/action/vampire_quirk_transfer/vampire_transfer
var/list/old_traits
var/list/old_biotypes
var/list/species_traits = list(NOHEART, DRINKSBLOOD)

/datum/quirk/vampire/add()
var/mob/living/carbon/human/H = quirk_holder
var/obj/item/organ/heart/current_heart = H.getorganslot(ORGAN_SLOT_HEART)
old_heart = current_heart.type
vampire_drain = new
vampire_transfer = new
vampire_drain.Grant(H)
vampire_transfer.Grant(H)
old_blood = H.dna.blood_type
H.dna.species.exotic_blood = /datum/reagent/blood/true_draculine
H.dna.blood_type = get_blood_type("Draculine")
H.dna.species.species_traits |= species_traits
H.dna.species.inherent_biotypes = MOB_UNDEAD|MOB_HUMANOID

/datum/quirk/vampire/post_add()
if(!quirk_holder.mind || quirk_holder.mind.special_role)
return
to_chat(quirk_holder, "<span class='big bold info'>Please note that your vampirism does NOT give you the right to attack people or otherwise cause any interference to \
the round without reason or escalation. You are not an antagonist, and the rules will treat you the same as other crewmembers.</span>")

/datum/quirk/vampire/remove()
if(quirk_holder)
var/mob/living/carbon/human/H = quirk_holder
if(vampire_drain)
vampire_drain.Remove(H)
if(vampire_transfer)
vampire_transfer.Remove(H)
H.dna.species.exotic_blood = ""
H.dna.blood_type = old_blood
if(!H.getorganslot(ORGAN_SLOT_HEART))
old_heart = new
old_heart.Insert(H)
H.dna.species.species_traits ^= species_traits
H.dna.species.inherent_biotypes = old_biotypes

/datum/quirk/vampire/on_process()
var/mob/living/carbon/human/C = quirk_holder
if(istype(C.loc, /obj/structure/closet/crate/coffin))
C.heal_overall_damage(2,2,0, BODYPART_ORGANIC)
C.adjustToxLoss(-2)
C.adjustOxyLoss(-2)
C.adjustCloneLoss(-2)
return
if(!C.client) //Can't blame no one for no disconnects
return
C.blood_volume -= max(C.blood_volume/3500, 0.07)
if(C.blood_volume <= BLOOD_VOLUME_BAD)
if(prob(5) && C.blood_volume > BLOOD_VOLUME_SURVIVE)
to_chat(C, "<span class='danger'>You're running out of blood!</span>")
if(C.blood_volume <= BLOOD_VOLUME_SURVIVE)
to_chat(C, "<span class='danger'>You ran out of blood!</span>")
C.death()
C.Drain()

#define VAMP_DRAIN_AMOUNT 20

/datum/action/vampire_quirk_drain
name = "Drain Victim"
desc = "Leech blood from any compatible victim you are passively grabbing."
check_flags = AB_CHECK_CONSCIOUS
icon_icon = 'icons/effects/bleed.dmi'
button_icon_state = "bleed1"

/datum/action/vampire_quirk_drain/Trigger()
. = ..()
if(iscarbon(owner))
var/mob/living/carbon/H = owner
if(H.quirk_cooldown["Vampire"] >= world.time)
return
while(H.pulling && iscarbon(H.pulling) && H.grab_state == GRAB_PASSIVE)
var/mob/living/carbon/victim = H.pulling
if(H.blood_volume >= BLOOD_VOLUME_MAXIMUM)
to_chat(H, "<span class='warning'>You're already full!</span>")
break
if(victim.stat == DEAD)
to_chat(H, "<span class='warning'>You need a living victim!</span>")
break
if(!victim.blood_volume || (victim.dna && ((NOBLOOD in victim.dna.species.species_traits) || !(victim.dna.blood_type.type in H.dna.blood_type.compatible_types))))
to_chat(H, "<span class='warning'>[victim] doesn't have suitable blood!</span>")
break
H.quirk_cooldown["Vampire"] = world.time + 30
if(victim.anti_magic_check(FALSE, TRUE, FALSE, 0))
to_chat(victim, "<span class='warning'>[H] tries to bite you, but stops before touching you!</span>")
to_chat(H, "<span class='warning'>[victim] is blessed! You stop just in time to avoid catching fire.</span>")
break
if(victim?.reagents?.has_reagent(/datum/reagent/consumable/garlic))
to_chat(victim, "<span class='warning'>[H] tries to bite you, but recoils in disgust!</span>")
to_chat(H, "<span class='warning'>[victim] reeks of garlic! you can't bring yourself to drain such tainted blood.</span>")
break
if(!do_after(H, 30, target = victim))
break
var/blood_volume_difference = BLOOD_VOLUME_MAXIMUM - H.blood_volume //How much capacity we have left to absorb blood
var/drained_blood = min(victim.blood_volume, VAMP_DRAIN_AMOUNT, blood_volume_difference)
to_chat(victim, "<span class='danger'>[H] is draining your blood!</span>")
to_chat(H, "<span class='notice'>You drain some blood!</span>")
playsound(H, 'sound/items/drink.ogg', 30, TRUE, -2)
victim.blood_volume = clamp(victim.blood_volume - drained_blood, 0, BLOOD_VOLUME_MAXIMUM)
H.blood_volume = clamp(H.blood_volume + drained_blood, 0, BLOOD_VOLUME_MAXIMUM)
if(!victim.blood_volume)
to_chat(H, "<span class='notice'>You finish off [victim]'s blood supply.</span>")

#undef VAMP_DRAIN_AMOUNT

#define VAMP_TRANSFER_AMOUNT 5

/datum/action/vampire_quirk_transfer
name = "Blood Transfer"
desc = "Transfer your own tainted blood to one from which you could feed."
check_flags = AB_CHECK_CONSCIOUS
icon_icon = 'icons/effects/bleed.dmi'
button_icon_state = "bleed9"

/datum/action/vampire_quirk_transfer/Trigger()
. = ..()
if(iscarbon(owner))
var/mob/living/carbon/H = owner
if(H.quirk_cooldown["Vampire Transfer"] >= world.time)
return
if(H.pulling && iscarbon(H.pulling) && H.grab_state == GRAB_PASSIVE)
var/mob/living/carbon/victim = H.pulling
if(victim.blood_volume >= BLOOD_VOLUME_MAXIMUM)
to_chat(H, "<span class='warning'>They're already full!</span>")
return
if(victim.stat == DEAD)
to_chat(H, "<span class='warning'>You need to transfer blood to a living being!</span>")
return
if(!victim.blood_volume || (victim.dna && ((NOBLOOD in victim.dna.species.species_traits) || !(victim.dna.blood_type.type in H.dna.blood_type.compatible_types))))
to_chat(H, "<span class='warning'>[victim] doesn't have suitable blood!</span>")
return
H.quirk_cooldown["Vampire Transfer"] = world.time + 20
if(victim.anti_magic_check(FALSE, TRUE, FALSE, 0))
to_chat(victim, "<span class='warning'>[H] tries to twist you, but stops before touching you!</span>")
to_chat(H, "<span class='warning'>[victim] is blessed! You stop just in time to avoid catching fire.</span>")
return
if(victim?.reagents?.has_reagent(/datum/reagent/consumable/garlic))
to_chat(victim, "<span class='warning'>[H] tries to twist you, but recoils in disgust!</span>")
to_chat(H, "<span class='warning'>[victim] reeks of garlic! you can't bring yourself to twist such tainted blood.</span>")
return
if(!do_after(H, 20, target = victim))
return
var/blood_volume_difference = BLOOD_VOLUME_MAXIMUM - victim.blood_volume //How much capacity we have left to transfer blood
var/transfered_blood = min(H.blood_volume, VAMP_TRANSFER_AMOUNT, blood_volume_difference)
to_chat(victim, "<span class='danger'>You feel darkness leaving[H] and entering you!</span>")
to_chat(H, "<span class='notice'>You transfer blood to [victim]!</span>")
playsound(H, 'sound/items/drink.ogg', 30, TRUE, -2)
H.blood_volume = clamp(H.blood_volume - transfered_blood, 0, BLOOD_VOLUME_MAXIMUM)
var/blood_id = H.get_blood_id()
var/list/blood_data = H.get_blood_data(blood_id)
victim.reagents.add_reagent(blood_id, transfered_blood, blood_data, H.bodytemperature)

#undef VAMP_TRANSFER_AMOUNT


/mob/living/carbon/get_status_tab_items()
. = ..()
if(has_quirk(/datum/quirk/vampire))
. += "Current blood level: [blood_volume]/[BLOOD_VOLUME_MAXIMUM]."
10 changes: 7 additions & 3 deletions code/game/machinery/cryopod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,12 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/computer/cryopod/retro, 17)

/obj/machinery/cryopod/apply_effects_to_mob(mob/living/carbon/sleepyhead)
//it always sucks a little to get up
sleepyhead.set_nutrition(200)
if(HAS_TRAIT(sleepyhead, TRAIT_NOHUNGER))
to_chat(sleepyhead, "<span class='notice'>Unlike most, you're fortunate enough to feel no hunger...")
else
sleepyhead.set_nutrition(200)
to_chat(sleepyhead, "<span class='userdanger'>A dull hunger pangs in your stomach as you awaken...")
sleepyhead.SetSleeping(60) //if you read this comment and feel like shitting together something to adjust elzu and IPC charge on wakeup, be my guest.
to_chat(sleepyhead, "<span class='userdanger'>A dull hunger pangs in your stomach as you awaken...")



Expand All @@ -442,7 +445,8 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/computer/cryopod/retro, 17)
desc = "Keeps crew frozen in cryostasis until they are needed in order to cut down on supply usage. This one seems cheaply made."

/obj/machinery/cryopod/poor/apply_effects_to_mob(mob/living/carbon/sleepyhead)
sleepyhead.set_nutrition(200)
if(!HAS_TRAIT(sleepyhead, TRAIT_NOHUNGER))
sleepyhead.set_nutrition(200)
sleepyhead.SetSleeping(80)
if(prob(90))
sleepyhead.apply_effect(rand(5,15), EFFECT_DROWSY)
Expand Down
22 changes: 11 additions & 11 deletions code/modules/mob/dead/new_player/new_player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -314,17 +314,6 @@
if(isliving(equip)) //Borgs get borged in the equip, so we need to make sure we handle the new mob.
character = equip

if(job && !job.override_latejoin_spawn(character))
var/atom/spawn_point = pick(ship.shuttle_port.spawn_points)
spawn_point.join_player_here(character)
var/atom/movable/screen/splash/Spl = new(character.client, TRUE)
Spl.Fade(TRUE)
character.playsound_local(get_turf(character), 'sound/voice/ApproachingTG.ogg', 25)

character.update_parallax_teleport()

character.client.init_verbs() // init verbs for the late join

if(ishuman(character)) //These procs all expect humans
var/mob/living/carbon/human/humanc = character
ship.manifest_inject(humanc, client, job)
Expand All @@ -342,6 +331,17 @@
if(CONFIG_GET(flag/roundstart_traits))
SSquirks.AssignQuirks(humanc, humanc.client, TRUE)

if(job && !job.override_latejoin_spawn(character))
var/atom/spawn_point = pick(ship.shuttle_port.spawn_points)
spawn_point.join_player_here(character)
var/atom/movable/screen/splash/Spl = new(character.client, TRUE)
Spl.Fade(TRUE)
character.playsound_local(get_turf(character), 'sound/voice/ApproachingTG.ogg', 25)

character.update_parallax_teleport()

character.client.init_verbs() // init verbs for the late join

GLOB.joined_player_list += character.ckey

log_manifest(character.mind.key, character.mind, character, TRUE)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/blood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
nutrition_ratio *= 1.25
adjust_nutrition(-nutrition_ratio * HUNGER_FACTOR)
blood_volume = min(BLOOD_VOLUME_NORMAL, blood_volume + 0.5 * nutrition_ratio)
if(blood_volume < BLOOD_VOLUME_NORMAL && HAS_TRAIT(src, TRAIT_NOHUNGER)) //blood regen for non eaters
if(blood_volume < BLOOD_VOLUME_NORMAL && HAS_TRAIT(src, TRAIT_NOHUNGER) && !(NOHEART in dna.species.species_traits)) //blood regen for non eaters
blood_volume = min(BLOOD_VOLUME_NORMAL, blood_volume + 0.5 * 1.25) //assumes best nutrition conditions for non eaters because they don't eat

//Effects of bloodloss
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
/mob/living/carbon/proc/needs_heart()
if(HAS_TRAIT(src, TRAIT_STABLEHEART))
return FALSE
if(dna && dna.species && (NOBLOOD in dna.species.species_traits)) //not all carbons have species!
if(dna && dna.species && (NOBLOOD in dna.species.species_traits) || (NOHEART in dna.species.species_traits)) //not all carbons have species!
return FALSE
return TRUE

Expand Down
Loading

0 comments on commit 8be0c7b

Please sign in to comment.