mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 20:11:04 +01:00
Blobs can now spawn up to three cores per event (#21377)
Blobs are too trivial, this should make them exciting. Requirements for this event to proc are two engineers, so in the worst-case you still have two people with an emitter each who can each destroy one blob and circle to the third after. Could use scrutiny from someone more familiar with event code than myself, I feel I've stepped on something here. <img width="980" height="895" alt="image" src="https://github.com/user-attachments/assets/38e15dfb-70a1-475e-b9b0-120765b507d5" />
This commit is contained in:
@@ -16,22 +16,27 @@
|
||||
var/health
|
||||
var/regen_rate = 5
|
||||
|
||||
// damage gets divided by these modifiers, based on damage type
|
||||
/// Damage gets divided by these modifiers, based on damage type
|
||||
var/brute_resist = 4.3
|
||||
var/fire_resist = 0.8
|
||||
var/laser_resist = 2 // Special resist for laser based weapons - Emitters or handheld energy weaponry. Damage is divided by this and THEN by fire_resist.
|
||||
/// Special resist for laser based weapons - Emitters or handheld energy weaponry. Damage is divided by this and THEN by fire_resist.
|
||||
var/laser_resist = 2
|
||||
|
||||
var/expandType = /obj/effect/blob
|
||||
var/secondary_core_growth_chance = 5 //% chance to grow a secondary blob core instead of whatever was supposed to grow. Secondary cores are considerably weaker, but still nasty.
|
||||
/// % chance to grow a secondary blob core instead of whatever was supposed to grow. Secondary cores are considerably weaker, but still nasty.
|
||||
var/secondary_core_growth_chance = 5
|
||||
var/damage_min = 15
|
||||
var/damage_max = 25
|
||||
var/pruned = FALSE
|
||||
var/product = /obj/item/blob_tendril
|
||||
var/attack_time = 0
|
||||
var/attack_cooldown = 60 // time in deciseconds before next attack will occur
|
||||
/// Time in deciseconds before next attack will occur
|
||||
var/attack_cooldown = 60
|
||||
|
||||
var/obj/effect/blob/parent_core // the core this blob piece belongs to
|
||||
var/is_core = FALSE // determines how to pass core inheritance
|
||||
/// The core this blob piece belongs to
|
||||
var/obj/effect/blob/parent_core
|
||||
/// Determines how to pass core inheritance
|
||||
var/is_core = FALSE
|
||||
|
||||
/obj/effect/blob/Initialize()
|
||||
. = ..()
|
||||
|
||||
+19
-20
@@ -1,7 +1,6 @@
|
||||
/datum/event/blob
|
||||
announceWhen = 12
|
||||
|
||||
var/obj/effect/blob/core/Blob
|
||||
// Quite a short fuse due to the potential severity of this event.
|
||||
announceWhen = 12
|
||||
ic_name = "a biohazard"
|
||||
|
||||
/datum/event/blob/announce()
|
||||
@@ -10,22 +9,22 @@
|
||||
/datum/event/blob/start()
|
||||
..()
|
||||
|
||||
var/turf/T = pick_subarea_turf(/area/horizon/maintenance, list(/proc/is_station_turf, /proc/not_turf_contains_dense_objects))
|
||||
if(!T)
|
||||
log_and_message_admins("Blob failed to find a viable turf.")
|
||||
kill(TRUE)
|
||||
return
|
||||
// This stores the list of the possible number of blobs, weighted towards 2. Adjust if a different weighting if desired.
|
||||
var/list/numberOfBlobs = list(1 = 1, 2 = 2, 3 = 1)
|
||||
|
||||
log_and_message_admins("Blob spawned at \the [get_area(T)]", location = T)
|
||||
Blob = new /obj/effect/blob/core(T)
|
||||
for(var/i = 1; i < rand(3, 4); i++)
|
||||
Blob.process()
|
||||
// We pick randomly from the list to determine how many we spawn.
|
||||
for(var/i = 1 to pickweight(numberOfBlobs))
|
||||
var/turf/T = pick_subarea_turf(/area/horizon/maintenance, list(/proc/is_station_turf, /proc/not_turf_contains_dense_objects))
|
||||
if(!T)
|
||||
// If we can't find a turf anywhere, we aren't going to find one in subsequent loops and we can call it here.
|
||||
log_and_message_admins("Blob event failed to find a viable turf.")
|
||||
kill(TRUE)
|
||||
return
|
||||
|
||||
/datum/event/blob/tick()
|
||||
if(!Blob || !Blob.loc)
|
||||
Blob = null
|
||||
end()
|
||||
kill()
|
||||
return
|
||||
if(IsMultiple(activeFor, 3))
|
||||
Blob.process()
|
||||
log_and_message_admins("Blob spawned at \the [get_area(T)]", location = T)
|
||||
// Spawn the blob in.
|
||||
var/obj/effect/blob/core/Blob = new /obj/effect/blob/core(T)
|
||||
|
||||
// Blobs receive a burst of growth from the moment they spawn!
|
||||
for(var/int = 1 to rand(3, 4))
|
||||
Blob.process()
|
||||
|
||||
Reference in New Issue
Block a user