diff --git a/code/modules/antagonists/blob/blob_mobs.dm b/code/modules/antagonists/blob/blob_mobs.dm index 6784a4c1da1e..fd46dd784e39 100644 --- a/code/modules/antagonists/blob/blob_mobs.dm +++ b/code/modules/antagonists/blob/blob_mobs.dm @@ -15,8 +15,11 @@ maxbodytemp = 360 unique_name = 1 a_intent = INTENT_HARM + see_in_dark = 8 + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE var/mob/camera/blob/overmind = null var/obj/structure/blob/factory/factory = null + var/independent = FALSE /mob/living/simple_animal/hostile/blob/update_icons() if(overmind) @@ -24,6 +27,13 @@ else remove_atom_colour(FIXED_COLOUR_PRIORITY) +/mob/living/simple_animal/hostile/blob/Initialize() + . = ..() + if(!independent) //no pulling people deep into the blob + verbs -= /mob/living/verb/pulled + else + pass_flags &= ~PASSBLOB + /mob/living/simple_animal/hostile/blob/Destroy() if(overmind) @@ -90,18 +100,20 @@ attacktext = "hits" attack_sound = 'sound/weapons/genhit1.ogg' movement_type = FLYING - del_on_death = 1 + del_on_death = TRUE deathmessage = "explodes into a cloud of gas!" + gold_core_spawnable = HOSTILE_SPAWN var/death_cloud_size = 1 //size of cloud produced from a dying spore var/mob/living/carbon/human/oldguy - var/is_zombie = 0 - gold_core_spawnable = HOSTILE_SPAWN + var/is_zombie = FALSE /mob/living/simple_animal/hostile/blob/blobspore/Initialize(mapload, var/obj/structure/blob/factory/linked_node) if(istype(linked_node)) factory = linked_node factory.spores += src . = ..() + if(linked_node.overmind && istype(linked_node.overmind.blobstrain, /datum/blobstrain/reagent/distributed_neurons) && !istype(src, /mob/living/simple_animal/hostile/blob/blobspore/weak)) + notify_ghosts("A controllable spore has been created in \the [get_area(src)].", source = src, action = NOTIFY_ORBIT, flashwindow = FALSE, header = "Sentient Spore Created") /mob/living/simple_animal/hostile/blob/blobspore/Life() if(!is_zombie && isturf(src.loc)) @@ -113,6 +125,26 @@ death() ..() +/mob/living/simple_animal/hostile/blob/blobspore/attack_ghost(mob/user) + . = ..() + if(.) + return + humanize_pod(user) + +/mob/living/simple_animal/hostile/blob/blobspore/proc/humanize_pod(mob/user) + if((!overmind || istype(src, /mob/living/simple_animal/hostile/blob/blobspore/weak) || !istype(overmind.blobstrain, /datum/blobstrain/reagent/distributed_neurons)) && !is_zombie) + return + if(key || stat) + return + var/pod_ask = alert("Become a blob spore?", "Are you bulbous enough?", "Yes", "No") + if(pod_ask == "No" || !src || QDELETED(src)) + return + if(key) + to_chat(user, "Someone else already took this spore!") + return + key = user.key + log_game("[key_name(src)] took control of [name].") + /mob/living/simple_animal/hostile/blob/blobspore/proc/Zombify(mob/living/carbon/human/H) is_zombie = 1 if(H.wear_suit) @@ -135,6 +167,8 @@ oldguy = H update_icons() visible_message(span_warning("The corpse of [H.name] suddenly rises!")) + if(!key) + notify_ghosts("\A [src] has been created in \the [get_area(src)].", source = src, action = NOTIFY_ORBIT, flashwindow = FALSE, header = "Blob Zombie Created") /mob/living/simple_animal/hostile/blob/blobspore/death(gibbed) // On death, create a small smoke of harmful gas (s-Acid) @@ -215,17 +249,7 @@ force_threshold = 10 pressure_resistance = 50 mob_size = MOB_SIZE_LARGE - see_in_dark = 8 - lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE hud_type = /datum/hud/blobbernaut - var/independent = FALSE - -/mob/living/simple_animal/hostile/blob/blobbernaut/Initialize() - . = ..() - if(!independent) //no pulling people deep into the blob - remove_verb(src, /mob/living/verb/pulled) - else - pass_flags &= ~PASSBLOB /mob/living/simple_animal/hostile/blob/blobbernaut/Life() if(..()) diff --git a/code/modules/antagonists/blob/blobstrains/distributed_neurons.dm b/code/modules/antagonists/blob/blobstrains/distributed_neurons.dm new file mode 100644 index 000000000000..f1076c41ec25 --- /dev/null +++ b/code/modules/antagonists/blob/blobstrains/distributed_neurons.dm @@ -0,0 +1,38 @@ +/datum/blobstrain/reagent/distributed_neurons + name = "Distributed Neurons" + description = "will do very low toxin damage and turns unconscious targets into blob zombies." + effectdesc = "will also produce fragile spores when killed. Spores produced by factories are sentient." + shortdesc = "will do very low toxin damage and will turn unconscious targets into blob zombies for additional resources(for your overmind). Spores produced by factories are sentient." + analyzerdescdamage = "Does very low toxin damage and kills unconscious humans, turning them into blob zombies." + analyzerdesceffect = "Produces spores when killed. Spores produced by factories are sentient." + color = "#E88D5D" + complementary_color = "#823ABB" + message_living = ", and you feel tired" + reagent = /datum/reagent/blob/distributed_neurons + +/datum/blobstrain/reagent/distributed_neurons/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag) + if((damage_flag == "melee" || damage_flag == "bullet" || damage_flag == "laser") && damage <= 20 && B.obj_integrity - damage <= 0 && prob(15)) //if the cause isn't fire or a bomb, the damage is less than 21, we're going to die from that damage, 15% chance of a shitty spore. + B.visible_message("A spore floats free of the blob!") + var/mob/living/simple_animal/hostile/blob/blobspore/weak/BS = new/mob/living/simple_animal/hostile/blob/blobspore/weak(B.loc) + BS.overmind = B.overmind + BS.update_icons() + B.overmind.blob_mobs.Add(BS) + return ..() + +/datum/reagent/blob/distributed_neurons + name = "Distributed Neurons" + color = "#E88D5D" + +/datum/reagent/blob/distributed_neurons/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) + reac_volume = ..() + M.apply_damage(0.6*reac_volume, TOX) + if(O && ishuman(M) && M.stat == UNCONSCIOUS) + M.death() //sleeping in a fight? bad plan. + var/points = rand(5, 10) + var/mob/living/simple_animal/hostile/blob/blobspore/BS = new/mob/living/simple_animal/hostile/blob/blobspore/weak(get_turf(M)) + BS.overmind = O + BS.update_icons() + O.blob_mobs.Add(BS) + BS.Zombify(M) + O.add_points(points) + to_chat(O, "Gained [points] resources from the zombification of [M].") \ No newline at end of file diff --git a/code/modules/antagonists/blob/blobstrains/networked_fibers.dm b/code/modules/antagonists/blob/blobstrains/networked_fibers.dm index 296f116ae069..dbafd521fc5b 100644 --- a/code/modules/antagonists/blob/blobstrains/networked_fibers.dm +++ b/code/modules/antagonists/blob/blobstrains/networked_fibers.dm @@ -1,7 +1,7 @@ //does massive brute and burn damage, but can only expand manually /datum/blobstrain/reagent/networked_fibers name = "Networked Fibers" - description = "will do high brute and burn damage and will generate resources quicker, but can only expand manually." + description = "will do high brute and burn damage and will generate resources quicker, but can only expand manually using the core." shortdesc = "will do high brute and burn damage." effectdesc = "will move your core when manually expanding near it." analyzerdescdamage = "Does high brute and burn damage." @@ -9,6 +9,9 @@ color = "#CDC0B0" complementary_color = "#FFF68F" reagent = /datum/reagent/blob/networked_fibers + core_regen = 5 + point_rate = 3 + /datum/blobstrain/reagent/networked_fibers/expand_reaction(obj/structure/blob/B, obj/structure/blob/newB, turf/T, mob/camera/blob/O) if(!O && newB.overmind) @@ -24,6 +27,9 @@ C.forceMove(T) C.setDir(get_dir(newB, C)) O.add_points(1) + return + O.add_points(4) + qdel(newB) //does massive brute and burn damage, but can only expand manually /datum/reagent/blob/networked_fibers diff --git a/code/modules/antagonists/blob/blobstrains/zombifying_pods.dm b/code/modules/antagonists/blob/blobstrains/zombifying_pods.dm deleted file mode 100644 index e034eceefb68..000000000000 --- a/code/modules/antagonists/blob/blobstrains/zombifying_pods.dm +++ /dev/null @@ -1,46 +0,0 @@ -//kills sleeping targets and turns them into blob zombies, produces fragile spores when killed or on expanding -/datum/blobstrain/reagent/zombifying_pods - name = "Zombifying Pods" - description = "will do very low toxin damage and harvest sleeping targets for additional resources and a blob zombie." - effectdesc = "will also produce fragile spores when killed and on expanding." - shortdesc = "will do very low toxin damage and harvest sleeping targets for additional resources(for your overmind) and a blob zombie." - analyzerdescdamage = "Does very low toxin damage and kills unconscious humans, turning them into blob zombies." - analyzerdesceffect = "Produces spores when expanding and when killed." - color = "#E88D5D" - complementary_color = "#823ABB" - message_living = ", and you feel tired" - reagent = /datum/reagent/blob/zombifying_pods - -/datum/blobstrain/reagent/zombifying_pods/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag) - if((damage_flag == "melee" || damage_flag == "bullet" || damage_flag == "laser") && damage <= 20 && B.obj_integrity - damage <= 0 && prob(30)) //if the cause isn't fire or a bomb, the damage is less than 21, we're going to die from that damage, 20% chance of a shitty spore. - B.visible_message(span_warning("A spore floats free of the blob!")) - var/mob/living/simple_animal/hostile/blob/blobspore/weak/BS = new/mob/living/simple_animal/hostile/blob/blobspore/weak(B.loc) - BS.overmind = B.overmind - BS.update_icons() - B.overmind.blob_mobs.Add(BS) - return ..() - -/datum/blobstrain/reagent/zombifying_pods/expand_reaction(obj/structure/blob/B, obj/structure/blob/newB, turf/T, mob/camera/blob/O) - if(prob(10)) - var/mob/living/simple_animal/hostile/blob/blobspore/weak/BS = new/mob/living/simple_animal/hostile/blob/blobspore/weak(T) - BS.overmind = B.overmind - BS.update_icons() - newB.overmind.blob_mobs.Add(BS) - -/datum/reagent/blob/zombifying_pods - name = "Zombifying Pods" - color = "#E88D5D" - -/datum/reagent/blob/zombifying_pods/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) - reac_volume = ..() - M.apply_damage(0.6*reac_volume, TOX) - if(O && ishuman(M) && M.stat == UNCONSCIOUS) - M.death() //sleeping in a fight? bad plan. - var/points = rand(5, 10) - var/mob/living/simple_animal/hostile/blob/blobspore/BS = new/mob/living/simple_animal/hostile/blob/blobspore/weak(get_turf(M)) - BS.overmind = O - BS.update_icons() - O.blob_mobs.Add(BS) - BS.Zombify(M) - O.add_points(points) - to_chat(O, span_notice("Gained [points] resources from the zombification of [M].")) diff --git a/code/modules/antagonists/blob/overmind.dm b/code/modules/antagonists/blob/overmind.dm index 9e99fc8e936e..3f31797c88a7 100644 --- a/code/modules/antagonists/blob/overmind.dm +++ b/code/modules/antagonists/blob/overmind.dm @@ -39,6 +39,9 @@ GLOBAL_LIST_EMPTY(blob_nodes) var/blobwincount = 400 var/victory_in_progress = FALSE var/rerolling = FALSE + var/announcement_size = 75 + var/announcement_time + var/has_announced = FALSE /mob/camera/blob/Initialize(mapload, starting_points = 60) validate_location() @@ -56,6 +59,7 @@ GLOBAL_LIST_EMPTY(blob_nodes) if(blob_core) blob_core.update_icon() SSshuttle.registerHostileEnvironment(src) + announcement_time = world.time + 6000 . = ..() START_PROCESSING(SSobj, src) @@ -109,7 +113,7 @@ GLOBAL_LIST_EMPTY(blob_nodes) priority_announce("Biohazard has reached critical mass. Station loss is imminent.", "Biohazard Alert") set_security_level("delta") max_blob_points = INFINITY - blob_points = INFINITY + blob_points = INFINITY addtimer(CALLBACK(src, .proc/victory), 450) else if(!free_strain_rerolls && (last_reroll_time + BLOB_REROLL_TIMEYou have gained another free strain re-roll.") @@ -118,6 +122,10 @@ GLOBAL_LIST_EMPTY(blob_nodes) if(!victory_in_progress && max_count < blobs_legit.len) max_count = blobs_legit.len + if((world.time >= announcement_time || blobs_legit.len >= announcement_size) && !has_announced) + priority_announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/ai/default/outbreak5.ogg') + has_announced = TRUE + /mob/camera/blob/proc/victory() sound_to_playing_players('sound/machines/alarm.ogg') sleep(100) diff --git a/code/modules/antagonists/blob/powers.dm b/code/modules/antagonists/blob/powers.dm index 9f43a78b710e..5a8110bfc7ca 100644 --- a/code/modules/antagonists/blob/powers.dm +++ b/code/modules/antagonists/blob/powers.dm @@ -318,7 +318,7 @@ if(!surrounding_turfs.len) return for(var/mob/living/simple_animal/hostile/blob/blobspore/BS in blob_mobs) - if(isturf(BS.loc) && get_dist(BS, T) <= 35) + if(isturf(BS.loc) && get_dist(BS, T) <= 35 && !BS.key) BS.LoseTarget() BS.Goto(pick(surrounding_turfs), BS.move_to_delay) diff --git a/code/modules/antagonists/blob/structures/core.dm b/code/modules/antagonists/blob/structures/core.dm index dd2d7815b7fd..0dc9d8b43dfb 100644 --- a/code/modules/antagonists/blob/structures/core.dm +++ b/code/modules/antagonists/blob/structures/core.dm @@ -19,12 +19,8 @@ return INITIALIZE_HINT_QDEL if(overmind) update_icon() - addtimer(CALLBACK(src, .proc/generate_announcement), 1800) . = ..() -/obj/structure/blob/core/proc/generate_announcement() - priority_announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", ANNOUNCER_OUTBREAK5) - /obj/structure/blob/core/scannerreport() return "Directs the blob's expansion, gradually expands, and sustains nearby blob spores and blobbernauts." diff --git a/yogstation.dme b/yogstation.dme index e24438c62a06..f837bbe64273 100644 --- a/yogstation.dme +++ b/yogstation.dme @@ -1372,7 +1372,7 @@ #include "code\modules\antagonists\blob\blobstrains\replicating_foam.dm" #include "code\modules\antagonists\blob\blobstrains\shifting_fragments.dm" #include "code\modules\antagonists\blob\blobstrains\synchronous_mesh.dm" -#include "code\modules\antagonists\blob\blobstrains\zombifying_pods.dm" +#include "code\modules\antagonists\blob\blobstrains\distributed_neurons.dm" #include "code\modules\antagonists\blob\structures\_blob.dm" #include "code\modules\antagonists\blob\structures\core.dm" #include "code\modules\antagonists\blob\structures\factory.dm"