From 9c78cdafa5d0edf8c9f5e454cdb0a7084f7196cd Mon Sep 17 00:00:00 2001 From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Date: Tue, 30 Aug 2022 11:53:31 -0400 Subject: [PATCH] Blob now punishes crawlers. [TM pls] (#18917) * Blob now punishes crawlers. * Spacing Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com> Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com> --- code/game/gamemodes/blob/powers.dm | 16 +++++++++------- code/game/gamemodes/blob/theblob.dm | 25 ++++++++++++++++++++++--- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/code/game/gamemodes/blob/powers.dm b/code/game/gamemodes/blob/powers.dm index 730441f95aa..c91e5e51a9e 100644 --- a/code/game/gamemodes/blob/powers.dm +++ b/code/game/gamemodes/blob/powers.dm @@ -318,6 +318,13 @@ return var/obj/structure/blob/B = locate() in T if(B) + var/mob/living/M = locate() in T + if(M) + if(!can_buy(5)) + return + to_chat(src, "You attack [M]!") + blob_core.chemical_attack(T) + return to_chat(src, "There is a blob here!") return @@ -329,13 +336,8 @@ if(!can_buy(5)) return last_attack = world.time - OB.expand(T, 0, blob_reagent_datum.color) - for(var/mob/living/L in T) - if(ROLE_BLOB in L.faction) //no friendly/dead fire - continue - var/mob_protection = L.get_permeability_protection() - blob_reagent_datum.reaction_mob(L, REAGENT_TOUCH, 25, 1, mob_protection) - blob_reagent_datum.send_message(L) + OB.expand(T, 0, blob_reagent_datum.color, src) + blob_core.chemical_attack(T) OB.color = blob_reagent_datum.color return diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm index 0e281b8ec44..787d459a94b 100644 --- a/code/game/gamemodes/blob/theblob.dm +++ b/code/game/gamemodes/blob/theblob.dm @@ -33,6 +33,7 @@ atmosblock = FALSE air_update_turf(1) GLOB.blobs -= src + overmind = null // let us not have gc issues if(isturf(loc)) //Necessary because Expand() is screwed up and spawns a blob and then deletes it playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) return ..() @@ -76,11 +77,23 @@ // All blobs heal over time when pulsed, but it has a cool down if(health_timestamp > world.time) return 0 + var/turf/T = get_turf(src) + chemical_attack(T) if(obj_integrity < max_integrity) obj_integrity = min(max_integrity, obj_integrity + 1) check_integrity() - health_timestamp = world.time + 10 // 1 seconds + health_timestamp = world.time + 10 // 1 seconds +/obj/structure/blob/proc/chemical_attack(turf/T) + for(var/mob/living/L in T) + if(ROLE_BLOB in L.faction) //no friendly/dead fire + continue + if(!overmind) + continue + var/mob_protection = L.get_permeability_protection() + overmind.blob_reagent_datum.reaction_mob(L, REAGENT_TOUCH, 25, 1, mob_protection) + overmind.blob_reagent_datum.send_message(L) + L.blob_act(src) /obj/structure/blob/proc/Pulse(pulse = 0, origin_dir = 0, a_color)//Todo: Fix spaceblob expand RegenHealth() @@ -101,7 +114,7 @@ var/turf/T = get_step(src, dirn) var/obj/structure/blob/B = (locate(/obj/structure/blob) in T) if(!B) - expand(T,1,a_color)//No blob here so try and expand + expand(T, 1, a_color, overmind)//No blob here so try and expand return B.adjustcolors(a_color) @@ -119,7 +132,7 @@ if(iswallturf(loc)) loc.blob_act(src) //don't ask how a wall got on top of the core, just eat it -/obj/structure/blob/proc/expand(turf/T = null, prob = 1, a_color) +/obj/structure/blob/proc/expand(turf/T = null, prob = 1, a_color, _overmind = null) if(prob && !prob(obj_integrity)) return if(istype(T, /turf/space) && prob(75)) return @@ -136,6 +149,7 @@ var/obj/structure/blob/normal/B = new /obj/structure/blob/normal(src.loc, min(obj_integrity, 30)) B.color = a_color B.density = TRUE + B.overmind = _overmind if(T.Enter(B,src))//Attempt to move into the tile B.density = initial(B.density) B.loc = T @@ -145,6 +159,11 @@ qdel(B) for(var/atom/A in T)//Hit everything in the turf + if(isliving(A) && !A.density && overmind) // Crawling mob / small mob? Extra damage. + var/mob/living/M = A + var/mob_protection = M.get_permeability_protection() + overmind.blob_reagent_datum.reaction_mob(M, REAGENT_TOUCH, 25, 1, mob_protection) + overmind.blob_reagent_datum.send_message(M) A.blob_act(src) return 1