// Point controlling procs
/mob/camera/blob/proc/can_buy(cost = 15)
if(blob_points < cost)
to_chat(src, "You cannot afford this!")
return 0
add_points(-cost)
return 1
// Power verbs
/mob/camera/blob/verb/transport_core()
set category = "Blob"
set name = "Jump to Core"
set desc = "Transport back to your core."
if(blob_core)
src.loc = blob_core.loc
/mob/camera/blob/verb/jump_to_node()
set category = "Blob"
set name = "Jump to Node"
set desc = "Transport back to a selected node."
if(GLOB.blob_nodes.len)
var/list/nodes = list()
for(var/i = 1; i <= GLOB.blob_nodes.len; i++)
var/obj/structure/blob/node/B = GLOB.blob_nodes[i]
nodes["Blob Node #[i] ([get_location_name(B)])"] = B
var/node_name = tgui_input_list(src, "Choose a node to jump to.", "Node Jump", nodes)
var/obj/structure/blob/node/chosen_node = nodes[node_name]
if(chosen_node)
src.loc = chosen_node.loc
/mob/camera/blob/verb/toggle_node_req()
set category = "Blob"
set name = "Toggle Node Requirement"
set desc = "Toggle requiring nodes to place resource and factory blobs."
nodes_required = !nodes_required
if(nodes_required)
to_chat(src, "You now require a nearby node or core to place factory and resource blobs.")
else
to_chat(src, "You no longer require a nearby node or core to place factory and resource blobs.")
/mob/camera/blob/verb/create_shield_power()
set category = "Blob"
set name = "Create/Upgrade Shield Blob (15)"
set desc = "Create/Upgrade a shield blob. Using this on an existing shield blob turns it into a reflective blob, capable of reflecting most energy projectiles but making it much weaker than usual to brute attacks."
var/turf/T = get_turf(src)
create_shield(T)
/mob/camera/blob/proc/create_shield(turf/T)
var/obj/structure/blob/B = locate(/obj/structure/blob) in T
var/obj/structure/blob/shield/S = locate(/obj/structure/blob/shield) in T
if(!S)
if(!B)//We are on a blob
to_chat(src, "There is no blob here!")
return
else if(!istype(B, /obj/structure/blob/normal))
to_chat(src, "Unable to use this blob, find a normal one.")
return
else if(!can_buy(15))
return
B.color = blob_reagent_datum.color
B.change_to(/obj/structure/blob/shield)
else
if(istype(S, /obj/structure/blob/shield/reflective))
to_chat(src, "There's already a reflector blob here!")
return
else if(S.obj_integrity < S.max_integrity * 0.5)
to_chat(src, "This shield blob is too damaged to be modified properly!")
return
else if(!can_buy(15))
return
to_chat(src, "You secrete a reflective ooze over the shield blob, allowing it to reflect energy projectiles at the cost of reduced intregrity.")
S.change_to(/obj/structure/blob/shield/reflective)
S.color = blob_reagent_datum.color
return
/mob/camera/blob/verb/create_resource()
set category = "Blob"
set name = "Create Resource Blob (40)"
set desc = "Create a resource tower which will generate points for you."
var/turf/T = get_turf(src)
if(!T)
return
var/obj/structure/blob/B = (locate(/obj/structure/blob) in T)
if(!B)//We are on a blob
to_chat(src, "There is no blob here!")
return
if(!istype(B, /obj/structure/blob/normal))
to_chat(src, "Unable to use this blob, find a normal one.")
return
for(var/obj/structure/blob/resource/blob in orange(4, T))
to_chat(src, "There is a resource blob nearby, move more than 4 tiles away from it!")
return
if(nodes_required)
if(!(locate(/obj/structure/blob/node) in orange(3, T)) && !(locate(/obj/structure/blob/core) in orange(4, T)))
to_chat(src, "You need to place this blob closer to a node or core!")
return //handholdotron 2000
if(!can_buy(40))
return
B.color = blob_reagent_datum.color
B.change_to(/obj/structure/blob/resource)
var/obj/structure/blob/resource/R = locate() in T
if(R)
R.overmind = src
return
/mob/camera/blob/verb/create_node()
set category = "Blob"
set name = "Create Node Blob (60)"
set desc = "Create a Node."
var/turf/T = get_turf(src)
if(!T)
return
var/obj/structure/blob/B = (locate(/obj/structure/blob) in T)
if(!B)//We are on a blob
to_chat(src, "There is no blob here!")
return
if(!istype(B, /obj/structure/blob/normal))
to_chat(src, "Unable to use this blob, find a normal one.")
return
for(var/obj/structure/blob/node/blob in orange(5, T))
to_chat(src, "There is another node nearby, move more than 5 tiles away from it!")
return
if(!can_buy(60))
return
B.change_to(/obj/structure/blob/node)
var/obj/structure/blob/node/R = locate() in T
if(R)
R.adjustcolors(blob_reagent_datum.color)
R.overmind = src
return
/mob/camera/blob/verb/create_factory()
set category = "Blob"
set name = "Create Factory Blob (60)"
set desc = "Create a Spore producing blob."
var/turf/T = get_turf(src)
if(!T)
return
var/obj/structure/blob/B = locate(/obj/structure/blob) in T
if(!B)
to_chat(src, "You must be on a blob!")
return
if(!istype(B, /obj/structure/blob/normal))
to_chat(src, "Unable to use this blob, find a normal one.")
return
for(var/obj/structure/blob/factory/blob in orange(7, T))
to_chat(src, "There is a factory blob nearby, move more than 7 tiles away from it!")
return
if(nodes_required)
if(!(locate(/obj/structure/blob/node) in orange(3, T)) && !(locate(/obj/structure/blob/core) in orange(4, T)))
to_chat(src, "You need to place this blob closer to a node or core!")
return //handholdotron 2000
if(!can_buy(60))
return
B.change_to(/obj/structure/blob/factory)
B.color = blob_reagent_datum.color
var/obj/structure/blob/factory/R = locate() in T
if(R)
R.overmind = src
return
/mob/camera/blob/verb/create_blobbernaut()
set category = "Blob"
set name = "Create Blobbernaut (60)"
set desc = "Create a powerful blob-being, a Blobbernaut"
var/turf/T = get_turf(src)
if(!T)
return
var/obj/structure/blob/B = locate(/obj/structure/blob) in T
if(!B)
to_chat(src, "You must be on a blob!")
return
if(!istype(B, /obj/structure/blob/factory))
to_chat(src, "Unable to use this blob, find a factory blob.")
return
if(!can_buy(60))
return
var/mob/living/simple_animal/hostile/blob/blobbernaut/blobber = new /mob/living/simple_animal/hostile/blob/blobbernaut (get_turf(B))
if(blobber)
qdel(B)
add_mob_to_overmind(blobber)
blobber.AIStatus = AI_OFF
blobber.LoseTarget()
spawn()
var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a blobbernaut?", ROLE_BLOB, TRUE, 10 SECONDS, source = blobber, role_cleanname = "blobbernaut")
if(length(candidates) && !QDELETED(blobber))
var/mob/C = pick(candidates)
if(C)
blobber.key = C.key
dust_if_respawnable(C)
to_chat(blobber, "You are a blobbernaut! You must assist all blob lifeforms in their mission to consume everything!")
to_chat(blobber, "You heal while standing on blob structures, however you will decay slowly if you are damaged outside of the blob.")
if(!blobber.ckey)
blobber.AIStatus = AI_ON
return
/mob/camera/blob/verb/relocate_core()
set category = "Blob"
set name = "Relocate Core (80)"
set desc = "Relocates your core to the node you are on, your old core will be turned into a node."
var/turf/T = get_turf(src)
if(!T)
return
var/obj/structure/blob/node/B = locate(/obj/structure/blob/node) in T
if(!B)
to_chat(src, "You must be on a blob node!")
return
if(!can_buy(80))
return
// The old switcharoo.
var/turf/old_turf = blob_core.loc
blob_core.loc = T
B.loc = old_turf
return
/mob/camera/blob/verb/revert()
set category = "Blob"
set name = "Remove Blob"
set desc = "Removes a blob. You will receive 30% cost refund for special Blob structures."
var/turf/T = get_turf(src)
remove_blob(T)
/mob/camera/blob/proc/remove_blob(turf/T)
var/obj/structure/blob/B = locate(/obj/structure/blob) in T
if(!T)
return
if(!B)
to_chat(src, "There is no blob there!")
return
if(B.point_return < 0)
to_chat(src, "Unable to remove this blob.")
return
if(max_blob_points < B.point_return + blob_points)
to_chat(src, "You have too many resources to remove this blob!")
return
if(B.point_return)
add_points(B.point_return)
to_chat(src, "Gained [B.point_return] resources from removing \the [B].")
qdel(B)
return
/mob/camera/blob/verb/expand_blob_power()
set category = "Blob"
set name = "Expand/Attack Blob (5)"
set desc = "Attempts to create a new blob in this tile. If the tile isn't clear we will attack it, which might clear it."
var/turf/T = get_turf(src)
expand_blob(T)
/mob/camera/blob/proc/expand_blob(turf/T)
if(!T)
return
if(!can_attack())
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
var/obj/structure/blob/OB = locate() in circlerange(T, 1)
if(!OB)
var/obj/structure/blob/DB = locate() in range(T, 1)
if(!DB)
to_chat(src, "There is no blob adjacent to you.")
return
if(!can_buy(5))
return
DB.double_expand(T, 0, blob_reagent_datum.color, src)
DB.color = blob_reagent_datum.color
return
if(!can_buy(5))
return
last_attack = world.time
OB.expand(T, 0, blob_reagent_datum.color, src)
blob_core.chemical_attack(T)
OB.color = blob_reagent_datum.color
return
/mob/camera/blob/verb/rally_spores_power()
set category = "Blob"
set name = "Rally Spores"
set desc = "Rally the spores to move to your location."
var/turf/T = get_turf(src)
rally_spores(T)
/mob/camera/blob/proc/rally_spores(turf/T)
to_chat(src, "You rally your spores.")
var/list/surrounding_turfs = block(locate(T.x - 1, T.y - 1, T.z), locate(T.x + 1, T.y + 1, T.z))
if(!surrounding_turfs.len)
return
for(var/mob/living/simple_animal/hostile/blob/blobspore/BS in GLOB.alive_mob_list)
if(isturf(BS.loc) && get_dist(BS, T) <= 35)
BS.LoseTarget()
BS.Goto(pick(surrounding_turfs), BS.move_to_delay)
return
/mob/camera/blob/verb/split_consciousness()
set category = "Blob"
set name = "Split consciousness (100) (One use)"
set desc = "Expend resources to attempt to produce another sentient overmind."
var/turf/T = get_turf(src)
if(!T)
return
if(split_used)
to_chat(src, "You have already produced an offspring.")
return
if(is_offspring)
to_chat(src, "You cannot split as an offspring of another Blob.")
return
var/obj/structure/blob/N = (locate(/obj/structure/blob) in T)
if(!N)
to_chat(src, "A node is required to birth your offspring.")
return
if(!istype(N, /obj/structure/blob/node))
to_chat(src, "A node is required to birth your offspring.")
return
if(!can_buy(100))
return
split_used = TRUE
new /obj/structure/blob/core(get_turf(N), null, blob_core.point_rate, TRUE)
qdel(N)
/mob/camera/blob/verb/blob_broadcast()
set category = "Blob"
set name = "Blob Broadcast"
set desc = "Speak with your blob spores and blobbernauts as your mouthpieces. This action is free."
var/speak_text = clean_input("What would you like to say with your minions?", "Blob Broadcast", null)
if(!speak_text)
return
else
to_chat(usr, "You broadcast with your minions, [speak_text]")
for(var/mob/living/simple_animal/hostile/blob_minion in blob_mobs)
if(blob_minion.stat == CONSCIOUS)
blob_minion.say(speak_text)
/mob/camera/blob/verb/create_storage()
set category = "Blob"
set name = "Create Storage Blob (40)"
set desc = "Create a storage tower which will store extra resources for you. This increases your max resource cap by 50."
var/turf/T = get_turf(src)
if(!T)
return
var/obj/structure/blob/B = (locate(/obj/structure/blob) in T)
if(!B)//We are on a blob
to_chat(src, "There is no blob here!")
return
if(!istype(B, /obj/structure/blob/normal))
to_chat(src, "Unable to use this blob, find a normal one.")
return
for(var/obj/structure/blob/storage/blob in orange(3, T))
to_chat(src, "There is a storage blob nearby, move more than 4 tiles away from it!")
return
if(!can_buy(40))
return
B.color = blob_reagent_datum.color
B.change_to(/obj/structure/blob/storage)
var/obj/structure/blob/storage/R = locate() in T
if(R)
R.overmind = src
R.update_max_blob_points(50)
return
/mob/camera/blob/verb/chemical_reroll()
set category = "Blob"
set name = "Reactive Chemical Adaptation (50)"
set desc = "Replaces your chemical with a random, different one."
if(!can_buy(50))
return
var/datum/reagent/blob/B = pick((subtypesof(/datum/reagent/blob) - blob_reagent_datum.type))
blob_reagent_datum = new B
color = blob_reagent_datum.complementary_color
for(var/obj/structure/blob/BL in GLOB.blobs)
BL.adjustcolors(blob_reagent_datum.color)
for(var/mob/living/simple_animal/hostile/blob/BLO)
BLO.adjustcolors(blob_reagent_datum.complementary_color)
to_chat(src, "Your reagent is now: [blob_reagent_datum.name] - [blob_reagent_datum.description]")
/mob/camera/blob/verb/blob_help()
set category = "Blob"
set name = "*Blob Help*"
set desc = "Help on how to blob."
to_chat(src, "As the overmind, you can control the blob!")
to_chat(src, "Your blob reagent is: [blob_reagent_datum.name] - [blob_reagent_datum.description]")
to_chat(src, "You can expand, which will attack people, damage objects, or place a Normal Blob if the tile is clear.")
to_chat(src, "Normal Blobs will expand your reach and can be upgraded into special blobs that perform certain functions.")
to_chat(src, "You can upgrade normal blobs into the following types of blob:")
to_chat(src, "Shield Blobs are strong and expensive blobs which take more damage. In additon, they are fireproof and can block air, use these to protect yourself from station fires. Upgrading them again will result in a Reflective blob, capable of reflecting laser projectiles at the cost of the strong blob's extra health.")
to_chat(src, "Resource Blobs are blobs which produce more resources for you, build as many of these as possible to consume the station. This type of blob must be placed near node blobs or your core to work.")
to_chat(src, "Factory Blobs are blobs that spawn blob spores which will attack nearby enemies. This type of blob must be placed near node blobs or your core to work.")
to_chat(src, "Blobbernauts can be produced from factories for a cost, and are hard to kill, powerful, but ultimately dumb. The factory used to create one will be destroyed in the process.")
to_chat(src, "Storage Blobs are storage towers which will store extra resources for you. This increases your max resource cap by 50.")
to_chat(src, "Node Blobs are blobs which grow, like the core. Like the core it can activate resource and factory blobs.")
to_chat(src, "In addition to the buttons on your HUD, there are a few click shortcuts to speed up expansion and defense.")
to_chat(src, "Shortcuts: Click = Expand Blob | CTRL Click = Create Shield Blob | Middle Mouse Click = Rally Spores | Alt Click = Remove Blob")
to_chat(src, "Attempting to talk will send a message to all other overminds, allowing you to coordinate with them.")