mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 10:03:50 +01:00
Adds Zombies (Admin-spawn) (#25381)
* fuck it good enough * Apply suggestions from code review Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: Contrabang <91113370+Contrabang@users.noreply.github.com> * TRIPLE-REVIEW * this should do it * wow * bruh * FIX * fix * yeah * sirryan review * aaaaa * Apply suggestions from code review Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Contrabang <91113370+Contrabang@users.noreply.github.com> --------- Signed-off-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
This commit is contained in:
@@ -33,6 +33,8 @@
|
||||
/datum/chemical_reaction/proc/on_reaction(datum/reagents/holder, created_volume)
|
||||
return
|
||||
|
||||
/datum/chemical_reaction/proc/last_can_react_check(datum/reagents/holder)
|
||||
return TRUE
|
||||
|
||||
/datum/chemical_reaction/proc/chemical_mob_spawn(datum/reagents/holder, amount_to_spawn, reaction_name, mob_class = HOSTILE_SPAWN, mob_faction = "chemicalsummon", random = TRUE, gold_core_spawn = FALSE)
|
||||
if(holder && holder.my_atom)
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
var/diet_flags = DIET_OMNI | DIET_HERB | DIET_CARN
|
||||
|
||||
/datum/reagent/consumable/on_mob_life(mob/living/M)
|
||||
var/is_vamp = M.mind?.has_antag_datum(/datum/antagonist/vampire)
|
||||
if(ishuman(M) && !is_vamp)
|
||||
if(ishuman(M) && !M.mind?.has_antag_datum(/datum/antagonist/vampire) && !HAS_TRAIT(M, TRAIT_I_WANT_BRAINS))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.can_eat(diet_flags)) //Make sure the species has it's dietflag set, otherwise it can't digest any nutrients
|
||||
H.adjust_nutrition(nutriment_factor) // For hunger and fatness
|
||||
@@ -32,8 +31,7 @@
|
||||
|
||||
/datum/reagent/consumable/nutriment/on_mob_life(mob/living/M)
|
||||
var/update_flags = STATUS_UPDATE_NONE
|
||||
var/is_vamp = M.mind?.has_antag_datum(/datum/antagonist/vampire)
|
||||
if(ishuman(M) && !is_vamp)
|
||||
if(ishuman(M) && !M.mind?.has_antag_datum(/datum/antagonist/vampire) && !HAS_TRAIT(M, TRAIT_I_WANT_BRAINS))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.can_eat(diet_flags)) //Make sure the species has it's dietflag set, otherwise it can't digest any nutrients
|
||||
if(prob(50))
|
||||
|
||||
@@ -1570,6 +1570,8 @@
|
||||
H.blood_volume += 10
|
||||
for(var/datum/disease/critical/heart_failure/HF in H.viruses)
|
||||
HF.cure() //Won't fix a stopped heart, but it will sure fix a critical one. Shock is not fixed as healing will fix it
|
||||
for(var/datum/disease/zombie/zomb in H.viruses)
|
||||
zomb.cure() // experimental B). Won't save you from the dead organs.
|
||||
for(var/obj/item/organ/O as anything in (H.internal_organs + H.bodyparts))
|
||||
O.germ_level = 0
|
||||
if(M.health < 40)
|
||||
@@ -1605,3 +1607,48 @@
|
||||
update_flags |= M.adjustFireLoss(3*REAGENTS_EFFECT_MULTIPLIER, FALSE)
|
||||
update_flags |= M.adjustToxLoss(3*REAGENTS_EFFECT_MULTIPLIER, FALSE)
|
||||
return ..() | update_flags
|
||||
|
||||
// First level, prevents scratches from infecting you and stops the advance of low-level zombie infections.
|
||||
/datum/reagent/zombie_cure
|
||||
name = "Anti-Plague Sequence Alpha"
|
||||
id = "zombiecure1"
|
||||
description = "The first step towards a cure for zombies. Prevents simple infections from scratches."
|
||||
reagent_state = LIQUID
|
||||
metabolization_rate = 0.1
|
||||
color = "#003602"
|
||||
var/cure_level = 1
|
||||
|
||||
// Cures low-level infections. Weakens zombies when in their system.
|
||||
/datum/reagent/zombie_cure/second
|
||||
name = "Anti-Plague Sequence Beta"
|
||||
id = "zombiecure2"
|
||||
description = "Cures low-level infections. Weakens zombies when in their system."
|
||||
color = "#006238"
|
||||
cure_level = 2
|
||||
|
||||
// Prevents zombies from reviving, but not from healing. Removes all zombie viruses except for the rotting stage.
|
||||
/datum/reagent/zombie_cure/third
|
||||
name = "Anti-Plague Sequence Gamma"
|
||||
id = "zombiecure3"
|
||||
description = "Prevents zombies from reviving, but not from healing. Removes moderate infections."
|
||||
color = "#029779"
|
||||
cure_level = 3
|
||||
|
||||
// Final cure, completely cures being a zombie. Revives all rotten limbs.
|
||||
/datum/reagent/zombie_cure/fourth
|
||||
name = "Anti-Plague Sequence Omega"
|
||||
id = "zombiecure4"
|
||||
description = "Cures all cases of the Necrotizing Plague. Stops zombies from reviving."
|
||||
color = "#001d4d"
|
||||
cure_level = 4
|
||||
|
||||
/datum/reagent/zombie_cure/fourth/on_mob_life(mob/living/M)
|
||||
var/update_flags = STATUS_UPDATE_NONE
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H) && prob(20))
|
||||
for(var/obj/item/organ/limb as anything in H.bodyparts)
|
||||
if(limb.status & ORGAN_DEAD && !limb.is_robotic())
|
||||
limb.status &= ~ORGAN_DEAD
|
||||
H.update_body()
|
||||
break
|
||||
return ..() | update_flags
|
||||
|
||||
@@ -496,6 +496,8 @@
|
||||
min_temp = chem_temp
|
||||
|
||||
if(total_matching_reagents == total_required_reagents && total_matching_catalysts == total_required_catalysts && matching_container && matching_other && chem_temp <= max_temp && chem_temp >= min_temp)
|
||||
if(!C.last_can_react_check(src))
|
||||
continue
|
||||
var/multiplier = min(multipliers)
|
||||
var/preserved_data = null
|
||||
for(var/B in C.required_reagents)
|
||||
|
||||
@@ -492,3 +492,98 @@
|
||||
var/datum/disease/advance/D = locate(/datum/disease/advance) in B.data["viruses"]
|
||||
if(D)
|
||||
D.Devolve()
|
||||
|
||||
// Someday, maybe add some version of doing science on patient zero to discover the recipees.
|
||||
/datum/chemical_reaction/zombie
|
||||
name = "Anti-Plague Sequence Alpha"
|
||||
id = "zombiecure1"
|
||||
result = "zombiecure1"
|
||||
result_amount = 1
|
||||
required_reagents = list("blood" = 1, "diphenhydramine" = 1)
|
||||
mix_message = "The mixture into a dark green paste."
|
||||
/// The cure level of the reagent, level 4 cure requires level 3 cure, which requires level 2 cure, etc
|
||||
var/cure_level = 1
|
||||
/// The amount of reagents to pick from get_possible_cures()
|
||||
var/amt_req_cures = 1
|
||||
/// A virus symptom required to complete this chemical reaction
|
||||
var/datum/symptom/required_symptom
|
||||
|
||||
/datum/chemical_reaction/zombie/New()
|
||||
. = ..()
|
||||
var/possible_cures = get_possible_cures()
|
||||
if(!length(possible_cures))
|
||||
return
|
||||
required_reagents = list()
|
||||
required_reagents["blood"] = 1
|
||||
for(var/i in 1 to amt_req_cures)
|
||||
if(!length(possible_cures))
|
||||
return
|
||||
var/next_cure = pick_n_take(possible_cures)
|
||||
required_reagents[next_cure] = 1
|
||||
|
||||
/datum/chemical_reaction/zombie/last_can_react_check(datum/reagents/holder)
|
||||
var/datum/reagent/blood/blood = locate(/datum/reagent/blood) in holder.reagent_list
|
||||
if(!blood || !blood.data)
|
||||
return FALSE
|
||||
var/datum/disease/zombie/zomb = locate(/datum/disease/zombie) in blood.data["viruses"]
|
||||
if(!zomb)
|
||||
return FALSE
|
||||
if(zomb.cure_stage + 1 > cure_level) // Virus has already been cured to this level
|
||||
return FALSE
|
||||
if(!required_symptom)
|
||||
return TRUE
|
||||
|
||||
for(var/datum/disease/advance/advanced in blood.data["viruses"])
|
||||
for(var/datum/symptom/symptom as anything in advanced.symptoms)
|
||||
if(istype(symptom, required_symptom))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/chemical_reaction/zombie/proc/get_possible_cures()
|
||||
return list()
|
||||
|
||||
/datum/chemical_reaction/zombie/second
|
||||
name = "Anti-Plague Sequence Beta"
|
||||
id = "zombiecure2"
|
||||
result = "zombiecure2"
|
||||
cure_level = 2
|
||||
amt_req_cures = 2
|
||||
|
||||
/datum/chemical_reaction/zombie/second/get_possible_cures()
|
||||
return list("vomit", "fungus", "jenkem", "charcoal", "egg", "salglu_solution", "toxin", "atropine", "lye", "sacid", "facid", "sodawater", "surge", "ultralube", "happiness", "morphine")
|
||||
|
||||
/datum/chemical_reaction/zombie/third
|
||||
name = "Anti-Plague Sequence Gamma"
|
||||
id = "zombiecure3"
|
||||
result = "zombiecure3"
|
||||
cure_level = 3
|
||||
amt_req_cures = 3
|
||||
required_symptom = /datum/symptom/flesh_eating
|
||||
|
||||
/datum/chemical_reaction/zombie/third/get_possible_cures()
|
||||
return list("colorful_reagent", "bacchus_blessing", "pen_acid", "teporone", "glyphosate", "lazarus_reagent", "omnizine", "sarin", "mitocholide", "ants", "clf3", "sorium", "????", "aranesp")
|
||||
|
||||
/datum/chemical_reaction/zombie/four
|
||||
name = "Anti-Plague Sequence Omega"
|
||||
id = "zombiecure4"
|
||||
result = "zombiecure4"
|
||||
cure_level = 4
|
||||
amt_req_cures = 2
|
||||
required_symptom = /datum/symptom/heal/metabolism
|
||||
|
||||
/datum/chemical_reaction/zombie/four/get_possible_cures()
|
||||
return list("entpoly", "tinlux", "earthsblood", "bath_salts", "rezadone", "rotatium", "krokodil", "fliptonium")
|
||||
|
||||
/datum/chemical_reaction/dupe_zomb_cure
|
||||
name = "Duplicate Zombie Cure"
|
||||
id = "dupe_zomb_cure"
|
||||
required_reagents = list("sulfonal" = 1, "sugar" = 1)
|
||||
result_amount = 1
|
||||
|
||||
/datum/chemical_reaction/dupe_zomb_cure/last_can_react_check(datum/reagents/holder)
|
||||
for(var/possible in list("zombiecure4", "zombiecure3", "zombiecure2", "zombiecure1"))
|
||||
if(holder.has_reagent(possible))
|
||||
result = possible // real time bullshit
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user