Attempting to guarantee immunity to viruses for virus_immune var.

This commit is contained in:
Zuhayr
2015-05-25 15:00:14 +09:30
parent 74dfd82072
commit d6e3df5fba
3 changed files with 27 additions and 19 deletions

View File

@@ -53,14 +53,15 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
// if hidden[2] is true, then virus is hidden from PANDEMIC machine
/datum/disease/proc/stage_act()
// Some species are immune to viruses entirely.
if(affected_mob && istype(affected_mob, /mob/living/carbon/human))
var/mob/living/carbon/human/H = affected_mob
if(H.species.virus_immune)
cure()
return
age++
var/cure_present = has_cure()
//world << "[cure_present]"
if(carrier&&!cure_present)
//world << "[affected_mob] is carrier"
return
spread = (cure_present?"Remissive":initial_spread)
if(stage > max_stages)
stage = max_stages
@@ -126,7 +127,7 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
source = affected_mob
else //no source and no mob affected. Rogue disease. Break
return
if(affected_mob.reagents != null)
if(affected_mob)
if(affected_mob.reagents.has_reagent("spaceacillin"))

View File

@@ -66,6 +66,12 @@
if(prob(5))
mob.antibodies |= antigen // 20% immunity is a good chance IMO, because it allows finding an immune person easily
// Some species are flat out immune to organic viruses.
var/mob/living/carbon/human/H = mob
if(istype(H) && H.species.virus_immune)
cure(mob)
return
if(mob.radiation > 50)
if(prob(1))
majormutate()

View File

@@ -3,25 +3,26 @@ proc/infection_check(var/mob/living/carbon/M, var/vector = "Airborne")
if (!istype(M))
return 0
var/mob/living/carbon/human/H = M
if(istype(H) && H.species.virus_immune)
return 0
var/protection = M.getarmor(null, "bio") //gets the full body bio armour value, weighted by body part coverage.
var/score = round(0.06*protection) //scales 100% protection to 6.
switch(vector)
if("Airborne")
if(M.internal)
score = 6 //not breathing infected air helps greatly
var/obj/item/I = M.wear_mask
//masks provide a small bonus and can replace overall bio protection
if(I)
score = max(score, round(0.06*I.armor["bio"]))
if (istype(I, /obj/item/clothing/mask))
score += 1 //this should be added after
if(M.internal) //not breathing infected air helps greatly
return 0
var/obj/item/I = M.wear_mask
//masks provide a small bonus and can replace overall bio protection
if(I)
score = max(score, round(0.06*I.armor["bio"]))
if (istype(I, /obj/item/clothing/mask))
score += 1 //this should be added after
if("Contact")
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(istype(H))
//gloves provide a larger bonus
if (istype(H.gloves, /obj/item/clothing/gloves))
score += 2