mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Makes Blobs more useful.
This commit is contained in:
@@ -51,6 +51,15 @@ var/list/blobs = list()
|
||||
return TRUE
|
||||
if(istype(mover) && mover.checkpass(PASSBLOB))
|
||||
return TRUE
|
||||
else if(istype(mover, /mob/living))
|
||||
var/mob/living/L = mover
|
||||
if(L.faction == "blob")
|
||||
return TRUE
|
||||
else if(istype(mover, /obj/item/projectile))
|
||||
var/obj/item/projectile/P = mover
|
||||
if(P.firer && P.firer.faction == "blob")
|
||||
return TRUE
|
||||
return FALSE
|
||||
else
|
||||
return FALSE
|
||||
// return ..()
|
||||
@@ -248,6 +257,9 @@ var/list/blobs = list()
|
||||
if(!P)
|
||||
return
|
||||
|
||||
if(P.firer && P.firer.faction == "blob")
|
||||
return
|
||||
|
||||
var/damage = P.get_structure_damage() // So tasers don't hurt the blob.
|
||||
if(!damage)
|
||||
return
|
||||
|
||||
@@ -38,6 +38,9 @@ var/list/blob_cores = list()
|
||||
/obj/structure/blob/core/grey_goo
|
||||
desired_blob_type = /datum/blob_type/grey_goo
|
||||
|
||||
/obj/structure/blob/core/fabrication_swarm
|
||||
desired_blob_type = /datum/blob_type/fabrication_swarm
|
||||
|
||||
/obj/structure/blob/core/electromagnetic_web
|
||||
desired_blob_type = /datum/blob_type/electromagnetic_web
|
||||
|
||||
@@ -71,6 +74,9 @@ var/list/blob_cores = list()
|
||||
/obj/structure/blob/core/radioactive_ooze
|
||||
desired_blob_type = /datum/blob_type/radioactive_ooze
|
||||
|
||||
/obj/structure/blob/core/volatile_alluvium
|
||||
desired_blob_type = /datum/blob_type/volatile_alluvium
|
||||
|
||||
/obj/structure/blob/core/classic
|
||||
desired_blob_type = /datum/blob_type/classic
|
||||
|
||||
|
||||
@@ -16,8 +16,10 @@
|
||||
|
||||
/obj/structure/blob/factory/Destroy()
|
||||
for(var/mob/living/simple_animal/hostile/blob/spore/spore in spores)
|
||||
if(spore.factory == src)
|
||||
if(istype(spore) && spore.factory == src)
|
||||
spore.factory = null
|
||||
else
|
||||
spore.nest = null
|
||||
spores = null
|
||||
return ..()
|
||||
|
||||
@@ -32,6 +34,21 @@
|
||||
var/mob/living/simple_animal/hostile/blob/spore/S = null
|
||||
if(overmind)
|
||||
S = new overmind.blob_type.spore_type(src.loc, src)
|
||||
S.overmind = overmind
|
||||
S.faction = "blob"
|
||||
if(istype(S))
|
||||
S.overmind = overmind
|
||||
overmind.blob_mobs.Add(S)
|
||||
if(overmind.blob_type.ranged_spores)
|
||||
S.ranged = TRUE
|
||||
S.projectiletype = overmind.blob_type.spore_projectile
|
||||
S.projectilesound = overmind.blob_type.spore_firesound
|
||||
S.shoot_range = overmind.blob_type.spore_range
|
||||
else //Other mobs don't add themselves in New. Ew.
|
||||
S.nest = src
|
||||
spores += S
|
||||
S.update_icons()
|
||||
overmind.blob_mobs.Add(S)
|
||||
|
||||
/obj/structure/blob/factory/sluggish // Capable of producing MORE spores, but quite a bit slower than normal.
|
||||
name = "sluggish factory blob"
|
||||
max_spores = 4
|
||||
spore_cooldown = 16 SECONDS
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
max_integrity = 40
|
||||
point_return = 15
|
||||
var/resource_delay = 0
|
||||
var/resource_cooldown = 4 SECONDS
|
||||
|
||||
/obj/structure/blob/resource/New(var/newloc, var/new_overmind)
|
||||
..(newloc, new_overmind)
|
||||
@@ -25,6 +26,12 @@
|
||||
flick("blob_resource_glow", src)
|
||||
if(overmind)
|
||||
overmind.add_points(1)
|
||||
resource_delay = world.time + 4 SECONDS + (overmind.resource_blobs.len * 2.5) //4 seconds plus a quarter second for each resource blob the overmind has
|
||||
resource_delay = world.time + resource_cooldown + (overmind.resource_blobs.len * 2.5) //4 seconds plus a quarter second for each resource blob the overmind has
|
||||
else
|
||||
resource_delay = world.time + 4 SECONDS
|
||||
resource_delay = world.time + resource_cooldown
|
||||
|
||||
/obj/structure/blob/resource/sluggish // Tankier, but really slow.
|
||||
name = "sluggish resource blob"
|
||||
desc = "A thin spire of occasionally convulsing tendrils."
|
||||
max_integrity = 80
|
||||
resource_cooldown = 8 SECONDS
|
||||
|
||||
@@ -94,4 +94,4 @@ var/list/overminds = list()
|
||||
|
||||
if(blob_points >= 100)
|
||||
if(!auto_factory() && !auto_resource())
|
||||
auto_node()
|
||||
auto_node()
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
create_shield()
|
||||
|
||||
/mob/observer/blob/proc/create_shield(turf/T)
|
||||
createSpecial(15, /obj/structure/blob/shield, 0, 0, T)
|
||||
createSpecial(15, blob_type.shield_type, 0, 0, T)
|
||||
|
||||
/mob/observer/blob/verb/create_resource()
|
||||
set category = "Blob"
|
||||
@@ -55,7 +55,7 @@
|
||||
if(!blob_type.can_build_resources)
|
||||
return FALSE
|
||||
|
||||
createSpecial(40, /obj/structure/blob/resource, 4, 1)
|
||||
createSpecial(40, blob_type.resource_type, 4, 1)
|
||||
|
||||
/mob/observer/blob/verb/auto_resource()
|
||||
set category = "Blob"
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
if(B)
|
||||
forceMove(B.loc)
|
||||
return createSpecial(40, /obj/structure/blob/resource, 4, 1, B.loc)
|
||||
return createSpecial(40, blob_type.resource_type, 4, 1, B.loc)
|
||||
|
||||
|
||||
/mob/observer/blob/verb/create_factory()
|
||||
@@ -96,7 +96,7 @@
|
||||
if(!blob_type.can_build_factories)
|
||||
return FALSE
|
||||
|
||||
createSpecial(60, /obj/structure/blob/factory, 7, 1)
|
||||
createSpecial(60, blob_type.factory_type, 7, 1)
|
||||
|
||||
/mob/observer/blob/verb/auto_factory()
|
||||
set category = "Blob"
|
||||
@@ -126,7 +126,7 @@
|
||||
|
||||
if(B)
|
||||
forceMove(B.loc)
|
||||
return createSpecial(60, /obj/structure/blob/factory, 7, 1, B.loc)
|
||||
return createSpecial(60, blob_type.factory_type, 7, 1, B.loc)
|
||||
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
if(!blob_type.can_build_nodes)
|
||||
return FALSE
|
||||
|
||||
createSpecial(100, /obj/structure/blob/node, 5, 0)
|
||||
createSpecial(100, blob_type.node_type, 5, 0)
|
||||
|
||||
/mob/observer/blob/verb/auto_node()
|
||||
set category = "Blob"
|
||||
@@ -166,7 +166,7 @@
|
||||
|
||||
if(B)
|
||||
forceMove(B.loc)
|
||||
return createSpecial(100, /obj/structure/blob/node, 5, 0, B.loc)
|
||||
return createSpecial(100, blob_type.node_type, 5, 0, B.loc)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -33,6 +33,15 @@
|
||||
var/can_build_nodes = TRUE // Ditto, for nodes.
|
||||
|
||||
var/spore_type = /mob/living/simple_animal/hostile/blob/spore
|
||||
var/ranged_spores = FALSE // For proper spores of the type above.
|
||||
var/spore_firesound = 'sound/effects/slime_squish.ogg'
|
||||
var/spore_range = 7 // The range the spore can fire.
|
||||
var/spore_projectile = /obj/item/projectile/energy/blob
|
||||
|
||||
var/factory_type = /obj/structure/blob/factory
|
||||
var/resource_type = /obj/structure/blob/resource
|
||||
var/node_type = /obj/structure/blob/node
|
||||
var/shield_type = /obj/structure/blob/shield
|
||||
|
||||
// Called when a blob receives damage. This needs to return the final damage or blobs will be immortal.
|
||||
/datum/blob_type/proc/on_received_damage(var/obj/structure/blob/B, damage, damage_type)
|
||||
@@ -82,13 +91,49 @@
|
||||
slow_spread_with_size = FALSE
|
||||
ai_aggressiveness = 80
|
||||
can_build_resources = TRUE
|
||||
attack_message = "The tide tries to shallow you"
|
||||
attack_message = "The tide tries to swallow you"
|
||||
attack_message_living = ", and you feel your skin dissolve"
|
||||
attack_message_synth = ", and your external plating dissolves"
|
||||
|
||||
/datum/blob_type/grey_goo/on_emp(obj/structure/blob/B, severity)
|
||||
B.adjust_integrity(-(20 / severity))
|
||||
|
||||
// Slow, tanky blobtype which uses not spores, but hivebots, as its soldiers.
|
||||
/datum/blob_type/fabrication_swarm
|
||||
name = "iron tide"
|
||||
desc = "A swarm of self replicating construction nanites. Incredibly illegal, but only mildly dangerous."
|
||||
effect_desc = "Slow-spreading, but incredibly resiliant. It has a chance to harden itself against attacks automatically for no resource cost, and uses cheaply-constructed hivebots as soldiers."
|
||||
ai_desc = "defensive"
|
||||
difficulty = BLOB_DIFFICULTY_MEDIUM // Emitters are okay, EMP is great.
|
||||
color = "#666666"
|
||||
complementary_color = "#B7410E"
|
||||
spread_modifier = 0.2
|
||||
can_build_factories = TRUE
|
||||
can_build_resources = TRUE
|
||||
attack_message = "The tide tries to shove you away"
|
||||
attack_message_living = ", and your skin itches"
|
||||
attack_message_synth = ", and your external plating dulls"
|
||||
attack_verb = "shoves"
|
||||
armor_pen = 40
|
||||
damage_lower = 10
|
||||
damage_upper = 25
|
||||
brute_multiplier = 0.25
|
||||
burn_multiplier = 0.6
|
||||
ai_aggressiveness = 50 //Really doesn't like you near it.
|
||||
spore_type = /mob/living/simple_animal/hostile/hivebot/swarm
|
||||
|
||||
/datum/blob_type/fabrication_swarm/on_received_damage(var/obj/structure/blob/B, damage, damage_type, mob/living/attacker)
|
||||
if(istype(B, /obj/structure/blob/normal))
|
||||
if(damage > 0)
|
||||
var/reinforce_probability = min(damage, 70)
|
||||
if(prob(reinforce_probability))
|
||||
B.visible_message("<span class='danger'>The [name] quakes, before rapidly hardening!</span>")
|
||||
new/obj/structure/blob/shield(get_turf(B), B.overmind)
|
||||
qdel(B)
|
||||
return ..()
|
||||
|
||||
/datum/blob_type/fabrication_swarm/on_emp(obj/structure/blob/B, severity)
|
||||
B.adjust_integrity(-(30 / severity))
|
||||
|
||||
// A blob meant to be fought like a fire.
|
||||
/datum/blob_type/blazing_oil
|
||||
@@ -218,17 +263,23 @@
|
||||
/datum/blob_type/fulminant_organism/on_expand(var/obj/structure/blob/B, var/obj/structure/blob/new_B, var/turf/T, var/mob/observer/blob/O)
|
||||
if(prob(10)) // 10% chance to make a weak spore when expanding.
|
||||
var/mob/living/simple_animal/hostile/blob/S = new spore_type(T)
|
||||
S.overmind = O
|
||||
if(istype(S))
|
||||
S.overmind = O
|
||||
O.blob_mobs.Add(S)
|
||||
else
|
||||
S.faction = "blob"
|
||||
S.update_icons()
|
||||
O.blob_mobs.Add(S)
|
||||
|
||||
/datum/blob_type/fulminant_organism/on_death(obj/structure/blob/B)
|
||||
if(prob(33)) // 33% chance to make a spore when dying.
|
||||
var/mob/living/simple_animal/hostile/blob/S = new spore_type(get_turf(B))
|
||||
B.visible_message("<span class='danger'>A spore floats free from the [name]!</span>")
|
||||
S.overmind = B.overmind
|
||||
B.visible_message("<span class='danger'>\The [S] floats free from the [name]!</span>")
|
||||
if(istype(S))
|
||||
S.overmind = B.overmind
|
||||
B.overmind.blob_mobs.Add(S)
|
||||
else
|
||||
S.faction = "blob"
|
||||
S.update_icons()
|
||||
B.overmind.blob_mobs.Add(S)
|
||||
|
||||
|
||||
// Auto-retaliates against melee attacks. Weak to projectiles.
|
||||
@@ -542,4 +593,52 @@
|
||||
attack_verb = "splashes"
|
||||
|
||||
/datum/blob_type/radioactive_ooze/on_pulse(var/obj/structure/blob/B)
|
||||
radiation_repository.radiate(B, 200)
|
||||
radiation_repository.radiate(B, 200)
|
||||
|
||||
/datum/blob_type/volatile_alluvium
|
||||
name = "volatile alluvium"
|
||||
desc = "A churning, earthy mass that moves in waves."
|
||||
ai_desc = "earthen"
|
||||
effect_desc = "Moves slowly, producing weak ranged spores to defend itself, and inflicts brute attacks. Attempts to disarm nearby attackers. Weak to water."
|
||||
difficulty = BLOB_DIFFICULTY_HARD //Slow-starting, but can be overwhelming if left alone.
|
||||
color = "#6B481E"
|
||||
complementary_color = "#7F471F"
|
||||
damage_lower = 10
|
||||
damage_upper = 20
|
||||
armor_pen = 40
|
||||
brute_multiplier = 0.7
|
||||
burn_multiplier = 0.5
|
||||
spread_modifier = 0.5
|
||||
ai_aggressiveness = 50
|
||||
attack_message = "The alluvium crashes against you"
|
||||
attack_verb = "crashes against"
|
||||
can_build_factories = TRUE
|
||||
can_build_resources = TRUE
|
||||
spore_type = /mob/living/simple_animal/hostile/blob/spore/weak
|
||||
ranged_spores = TRUE
|
||||
spore_range = 3
|
||||
spore_projectile = /obj/item/projectile/energy/blob/splattering
|
||||
factory_type = /obj/structure/blob/factory/sluggish
|
||||
resource_type = /obj/structure/blob/resource/sluggish
|
||||
|
||||
/datum/blob_type/volatile_alluvium/on_received_damage(var/obj/structure/blob/B, damage, damage_type, mob/living/attacker)
|
||||
if(damage > 0 && attacker && get_dist(B, attacker) <= 2 && prob(min(damage, 70)) && istype(attacker, /mob/living/carbon/human)) // Melee weapons of any type carried by a human will have a high chance of being stolen.
|
||||
var/mob/living/carbon/human/H = attacker
|
||||
var/obj/item/I = H.get_active_hand()
|
||||
H.drop_item()
|
||||
if(I)
|
||||
if((I.sharp || I.edge) && !istype(I, /obj/item/weapon/gun))
|
||||
I.forceMove(get_turf(B)) // Disarmed entirely.
|
||||
B.visible_message("<span class='danger'>The [name] heaves, \the [attacker]'s weapon becoming stuck in the churning mass!</span>")
|
||||
else
|
||||
I.throw_at(B, 2, 4) // Just yoinked.
|
||||
B.visible_message("<span class='danger'>The [name] heaves, pulling \the [attacker]'s weapon from their hands!</span>")
|
||||
B.blob_attack_animation(attacker, B.overmind)
|
||||
return ..()
|
||||
|
||||
/datum/blob_type/volatile_alluvium/on_water(obj/structure/blob/B, amount)
|
||||
spawn(1)
|
||||
var/damage = amount * 2
|
||||
B.adjust_integrity(-(damage))
|
||||
if(B && prob(damage))
|
||||
B.visible_message("<span class='danger'>The [name] begins to crumble!</span>")
|
||||
|
||||
Reference in New Issue
Block a user