Skip to content

Commit d9bbb07

Browse files
authored
Небольшие изменения в вирусологии (#3612)
1 parent c78c990 commit d9bbb07

File tree

7 files changed

+198
-3
lines changed

7 files changed

+198
-3
lines changed

baystation12.dme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3444,6 +3444,7 @@
34443444
#include "mods\_master_files\code\modules\events\gravity.dm"
34453445
#include "mods\_master_files\code\modules\maps\map_template.dm"
34463446
#include "mods\_master_files\code\modules\mob\living\life.dm"
3447+
#include "mods\_master_files\code\modules\mob\living\carbon\viruses.dm"
34473448
#include "mods\_master_files\code\modules\mob\living\carbon\human\human_helpers.dm"
34483449
#include "mods\_master_files\code\modules\mob\new_player\new_player.dm"
34493450
#include "mods\_master_files\code\modules\multiz\turf.dm"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
/mob/living/carbon/virus_immunity()
3+
if(reagents)
4+
var/antibiotic_boost = reagents.get_reagent_amount(/datum/reagent/spaceacillin) / (REAGENTS_OVERDOSE/2)
5+
return max(immunity/100 * (1+antibiotic_boost), antibiotic_boost)

mods/virusology/code/disease2.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ LEGACY_RECORD_STRUCTURE(virus_records, virus_record)
6969
return
7070

7171
if(stage <= 1 && clicks == 0) // with a certain chance, the mob may become immune to the disease before it starts properly
72-
if(prob(mob.virus_immunity() * 0.05))
72+
if(prob(mob.virus_immunity() * 0.025))
7373
cure(mob, 1)
7474
return
7575

@@ -88,7 +88,7 @@ LEGACY_RECORD_STRUCTURE(virus_records, virus_record)
8888
cure(mob,1)
8989
//Waiting out the disease the old way
9090
if(stage == max_stage && clicks > max(stage*100, 300))
91-
if(prob(mob.virus_immunity() * 0.05 + 100-infectionchance))
91+
if(prob(mob.virus_immunity() * 0.5))
9292
cure(mob, 1)
9393

9494
var/top_badness = 1

mods/virusology/code/effect.dm

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,75 @@
183183
mob.emote("cough")
184184
to_chat(mob, "<span class='warning'>You cough up the [S]!</span>")
185185

186+
187+
/datum/disease2/effect/zombie
188+
name = "Corruption Syndrome"
189+
stage = 4
190+
badness = VIRUS_EXOTIC
191+
chance_max = 80
192+
delay = 20 SECONDS
193+
var/first_message_shown = FALSE
194+
var/time_of_first_tick = 0
195+
var/total_trasformation = 0
196+
var/time_to_trasform = 5 MINUTES
197+
198+
199+
/datum/disease2/effect/zombie/activate(mob/living/carbon/human/mob, multiplier)
200+
if(mob.is_species(SPECIES_ZOMBIE))
201+
return
202+
if(!first_message_shown)
203+
first_message_shown = TRUE
204+
time_of_first_tick = world.time
205+
total_trasformation = time_of_first_tick + time_to_trasform
206+
to_chat(mob, "<span class='notice'>You feel as something hungry is woke up inside you!</span>")
207+
if(prob(50))
208+
to_chat(mob, "<span class='warning'>You feel uncontrollable rage filling you! Your hunger is killing you! You want to eat!</span>")
209+
if (mob.reagents.get_reagent_amount(/datum/reagent/hyperzine) < 10)
210+
mob.reagents.add_reagent(/datum/reagent/hyperzine, 4)
211+
mob.adjust_nutrition(-50)
212+
if(prob(50) && mob.check_has_mouth())//go crazy and bite someone
213+
var/list/mouth_status = mob.can_eat_status()
214+
if (mouth_status[1] == 1)//if no mouth HUMAN_EATING_NBP_MOUTH
215+
to_chat(mob, "<span class='warning'>You angrily attempt to bite someone but you can't without a mouth!</span>")
216+
return
217+
if (mouth_status[1] == 2)//if something covers mouth HUMAN_EATING_BLOCKED_MOUTH
218+
to_chat(mob, "<span class='warning'>You angrily chew \the [mouth_status[2]] covering your mouth!</span>")
219+
return
220+
var/list/mobs_to_bite = list()
221+
for (var/mob/living/carbon/L in range(1))
222+
if (L == mob)
223+
continue
224+
mobs_to_bite += L
225+
if (LAZYLEN(mobs_to_bite) < 1)//nobody to bite
226+
return
227+
var/mob/living/Target = pick(mobs_to_bite)
228+
mob.visible_message("<span class='warning'>[mob] violently bites [Target]!</span>")
229+
Target.adjustBruteLoss(5)
230+
if (prob(50))
231+
infect_virus2(Target, src, 1)
232+
if(total_trasformation)
233+
var/time_left = total_trasformation - world.time
234+
var/transform_chance = (time_left/total_trasformation)*100
235+
if(prob(100-transform_chance))
236+
mob.zombify()
237+
186238
////////////////////////STAGE 3/////////////////////////////////
187239

240+
/datum/disease2/effect/hiv
241+
name = "Immunodeficiency"
242+
stage = 3
243+
multiplier_max = 3
244+
chance = 50
245+
chance_max = 100
246+
badness = VIRUS_COMMON
247+
/datum/disease2/effect/hiv/activate(mob/living/carbon/human/mob)
248+
mob.immunity -= 30
249+
mob.immunity_norm -= 15
250+
251+
/datum/disease2/effect/hiv/deactivate(mob/living/carbon/human/mob)
252+
mob.immunity_norm = 100
253+
254+
188255
/datum/disease2/effect/toxins
189256
name = "Hyperacidity"
190257
stage = 3

mods/virusology/code/helpers.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
var/list/antibodies_in_common = M.antibodies & disease.antigen
101101
if(LAZYLEN(antibodies_in_common))
102102
return
103-
if(prob(100 * M.reagents.get_reagent_amount(/datum/reagent/spaceacillin) / (REAGENTS_OVERDOSE/2)))
103+
if(M.reagents && prob(100 * M.reagents.get_reagent_amount(/datum/reagent/spaceacillin) / (REAGENTS_OVERDOSE/2)))
104104
return
105105

106106
if(!LAZYLEN(disease.affected_species))

mods/virusology/code/human_process.dm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
if(life_tick % 5 && immunity < 15 && chem_effects[CE_ANTIVIRAL] < VIRUS_COMMON && !LAZYLEN(virus2))
4646
var/infection_prob = 5 - immunity
4747
var/turf/simulated/T = get_turf(src)
48+
if(istype(T,/turf/space))
49+
return
4850
if(istype(T))
4951
infection_prob += T.dirt
5052
if(T.dirt >= 50)

mods/virusology/code/pre_made_viruses.dm

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,123 @@
119119
E4.chance = 2
120120
effects += E4
121121
E4.multiplier = rand(1,E4.multiplier_max)
122+
123+
124+
125+
126+
/datum/disease2/disease/zombie
127+
128+
infectionchance = 80
129+
speed = 8
130+
spreadtype = "Contact"
131+
max_stage = 4
132+
affected_species = list(HUMAN_SPECIES,SPECIES_TAJARA,SPECIES_RESOMI,SPECIES_MONKEY,SPECIES_SPACER,SPECIES_GRAVWORLDER,SPECIES_VATGROWN,SPECIES_VOX,SPECIES_FARWA,SPECIES_MULE,SPECIES_STOK,SPECIES_SKRELL,SPECIES_UNATHI,SPECIES_YEOSA,SPECIES_TRITONIAN,SPECIES_RESOMI,SPECIES_MONKEY,SPECIES_ZOMBIE)
133+
134+
135+
/datum/disease2/disease/zombie/New()
136+
..()
137+
antigen = list(pick(ALL_ANTIGENS))
138+
antigen |= pick(ALL_ANTIGENS)
139+
infectionchance = rand(50,100)
140+
var/datum/disease2/effect/gunck/E1 = new()
141+
E1.stage = 1
142+
E1.chance = 20
143+
effects += E1
144+
E1.multiplier = rand(1,E1.multiplier_max)
145+
var/datum/disease2/effect/hungry/E2 = new()
146+
E2.stage = 2
147+
E2.chance = 25
148+
effects += E2
149+
E2.multiplier = rand(1,E2.multiplier_max)
150+
var/datum/disease2/effect/hiv/E3 = new()
151+
E3.stage = 3
152+
E3.chance = 50
153+
effects += E3
154+
E3.multiplier = rand(3,E3.multiplier_max)
155+
var/datum/disease2/effect/zombie/E4 = new()
156+
E4.stage = 4
157+
E4.chance = 80
158+
effects += E4
159+
E4.multiplier = rand(1,E4.multiplier_max)
160+
161+
162+
////////ЕСЛИ ЗАХОТИМ НА ДЕРЕЛИКТ ДЕЛАТЬ СИМПЛМОБОВ ЗАРАЖЕННЫХ ВИРУСОМ ЗОМБЕЙ, ТО СЮДА ПРОПИСЫВАЕМ ИХ, САМ ПРЕМЕЙД ЕСТЬ ВЫШЕ/////
163+
164+
/// ПРЯМ СЮДА ^
165+
// |
166+
167+
/mob/living/carbon/human/zombify()
168+
if (!(species.name in GLOB.zombie_species) || is_species(SPECIES_DIONA) || is_zombie() || isSynthetic())
169+
return
170+
171+
adjustHalLoss(100)
172+
adjustBruteLoss(50)
173+
make_jittery(300)
174+
175+
var/turf/T = get_turf(src)
176+
new /obj/decal/cleanable/vomit(T)
177+
playsound(T, 'sound/effects/splat.ogg', 20, 1)
178+
179+
var/obj/item/held_l = get_equipped_item(slot_l_hand)
180+
var/obj/item/held_r = get_equipped_item(slot_r_hand)
181+
if(held_l)
182+
drop_from_inventory(held_l)
183+
if(held_r)
184+
drop_from_inventory(held_r)
185+
if(prob(70))
186+
addtimer(new Callback(src, PROC_REF(transform_zombie)), 20)
187+
else
188+
addtimer(new Callback(src, PROC_REF(transform_zombie_smart)), 20)
189+
190+
191+
/singleton/species/zombie/handle_post_spawn(mob/living/carbon/human/H)
192+
. = ..()
193+
var/datum/disease2/disease/zombie = new()
194+
natural_armour_values = list(
195+
melee = ARMOR_MELEE_RESISTANT,
196+
bullet = ARMOR_BALLISTIC_SMALL,
197+
laser = ARMOR_LASER_SMALL,
198+
bomb = ARMOR_BOMB_PADDED,
199+
bio = ARMOR_BIO_SHIELDED,
200+
rad = ARMOR_RAD_RESISTANT
201+
)
202+
infect_virus2(H, zombie, 1)
203+
H.immunity = 10
204+
H.immunity_norm = 10
205+
206+
207+
/singleton/species/zombie/handle_environment_special(mob/living/carbon/human/H)
208+
var/datum/disease2/disease/zombie = new()
209+
if (H.stat == CONSCIOUS)
210+
if (prob(5))
211+
playsound(H.loc, 'sound/hallucinations/far_noise.ogg', 15, 1)
212+
else if (prob(5))
213+
playsound(H.loc, 'sound/hallucinations/veryfar_noise.ogg', 15, 1)
214+
else if (prob(5))
215+
playsound(H.loc, 'sound/hallucinations/wail.ogg', 15, 1)
216+
217+
if (H.stat != DEAD)
218+
for(var/obj/item/organ/organ in (H.organs + H.internal_organs))
219+
if (organ.damage > 0)
220+
organ.heal_damage(heal_rate, heal_rate, 1)
221+
if (H.getToxLoss())
222+
H.adjustToxLoss(-heal_rate)
223+
if (prob(5))
224+
H.resuscitate()
225+
H.vessel.add_reagent(/datum/reagent/blood, min(heal_rate * 20, blood_volume - H.vessel.total_volume))
226+
227+
else
228+
var/list/victims = ohearers(rand(1, 2), H)
229+
for(var/mob/living/carbon/human/M in victims) // Post-mortem infection
230+
if (H == M || M.is_zombie())
231+
continue
232+
if (M.isSynthetic() || M.is_species(SPECIES_DIONA) || !(M.species.name in GLOB.zombie_species))
233+
continue
234+
if (M.wear_mask && (M.wear_mask.item_flags & ITEM_FLAG_AIRTIGHT)) // If they're protected by a mask
235+
continue
236+
if (M.head && (M.head.item_flags & ITEM_FLAG_AIRTIGHT)) // If they're protected by a helmet
237+
continue
238+
239+
var/vuln = 1 - M.get_blocked_ratio(BP_HEAD, DAMAGE_TOXIN, damage_flags = DAMAGE_FLAG_BIO) // Are they protected by hazmat clothing?
240+
if (vuln > 0.10 && prob(8))
241+
infect_virus2(H, zombie, 1)

0 commit comments

Comments
 (0)