mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-17 19:07:26 +01:00
Spider updates (#2562)
CHANGES: Spiders will no longer create massive stacks of cocoons under dead comrades. Fixes #2448 Limbs infested with spider eggs will now take longer to burst. When they do burst, the limb is gibbed. Infested limbs will give out more warning now past a certain stage. Modified the spider event. The moderate severity one will now no longer spawn nurses, so they can't multiply. Added a major severity spider event. It spawns more spiders than the moderate severity one along with nurses.
This commit is contained in:
@@ -54,9 +54,12 @@
|
||||
|
||||
/obj/effect/spider/stickyweb
|
||||
icon_state = "stickyweb1"
|
||||
New()
|
||||
if(prob(50))
|
||||
icon_state = "stickyweb2"
|
||||
|
||||
/obj/effect/spider/stickyweb/Initialize()
|
||||
. = ..()
|
||||
|
||||
if(prob(50))
|
||||
icon_state = "stickyweb2"
|
||||
|
||||
/obj/effect/spider/stickyweb/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
@@ -75,14 +78,16 @@
|
||||
desc = "They seem to pulse slightly with an inner life"
|
||||
icon_state = "eggs"
|
||||
var/amount_grown = 0
|
||||
New()
|
||||
pixel_x = rand(3,-3)
|
||||
pixel_y = rand(3,-3)
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
var/last_itch = 0
|
||||
|
||||
/obj/effect/spider/eggcluster/Initialize(var/mapload, var/atom/parent)
|
||||
. = ..(mapload)
|
||||
|
||||
pixel_x = rand(3,-3)
|
||||
pixel_y = rand(3,-3)
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
/obj/effect/spider/eggcluster/New(var/location, var/atom/parent)
|
||||
get_light_and_color(parent)
|
||||
..()
|
||||
|
||||
/obj/effect/spider/eggcluster/Destroy()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
@@ -94,17 +99,23 @@
|
||||
|
||||
/obj/effect/spider/eggcluster/process()
|
||||
amount_grown += rand(0,2)
|
||||
|
||||
var/obj/item/organ/external/O = null
|
||||
if(isorgan(loc))
|
||||
O = loc
|
||||
|
||||
if(amount_grown >= 100)
|
||||
var/num = rand(6,24)
|
||||
var/obj/item/organ/external/O = null
|
||||
if(istype(loc, /obj/item/organ/external))
|
||||
O = loc
|
||||
|
||||
for(var/i=0, i<num, i++)
|
||||
var/spiderling = new /obj/effect/spider/spiderling(src.loc, src)
|
||||
var/spiderling = new /obj/effect/spider/spiderling(src.loc, src, 0.75)
|
||||
if(O)
|
||||
O.implants += spiderling
|
||||
qdel(src)
|
||||
else if (O && O.owner && prob(1))
|
||||
if(world.time > last_itch + 30 SECONDS)
|
||||
last_itch = world.time
|
||||
to_chat(O.owner, "<span class='notice'>Your [O.name] itches.</span>")
|
||||
|
||||
/obj/effect/spider/spiderling
|
||||
name = "spiderling"
|
||||
@@ -118,16 +129,23 @@
|
||||
var/growth_rate = 1
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/entry_vent
|
||||
var/travelling_in_vent = 0
|
||||
var/list/possible_offspring
|
||||
|
||||
/obj/effect/spider/spiderling/Initialize(var/mapload, var/atom/parent, var/new_rate = 1, var/list/spawns = typesof(/mob/living/simple_animal/hostile/giant_spider))
|
||||
. = ..(mapload)
|
||||
|
||||
/obj/effect/spider/spiderling/New(var/location, var/atom/parent)
|
||||
pixel_x = rand(6,-6)
|
||||
pixel_y = rand(6,-6)
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
//50% chance to grow up
|
||||
if(prob(50))
|
||||
amount_grown = 1
|
||||
|
||||
growth_rate = new_rate
|
||||
|
||||
possible_offspring = spawns
|
||||
|
||||
get_light_and_color(parent)
|
||||
..()
|
||||
|
||||
/obj/effect/spider/spiderling/Destroy()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
@@ -191,9 +209,7 @@
|
||||
new_area.Entered(src)
|
||||
else
|
||||
entry_vent = null
|
||||
//=================
|
||||
|
||||
else if(prob(25))
|
||||
else if(prob(25) && isturf(loc))
|
||||
var/list/nearby = oview(5, src)
|
||||
if(nearby.len)
|
||||
var/target_atom = pick(nearby)
|
||||
@@ -208,33 +224,69 @@
|
||||
walk_to(src, entry_vent, 5)
|
||||
break
|
||||
|
||||
if(prob(1))
|
||||
src.visible_message(span("notice", "\the [src] chitters."))
|
||||
if(isturf(loc) && amount_grown > 0)
|
||||
amount_grown += (rand(0,2)*growth_rate)
|
||||
if(amount_grown >= 100)
|
||||
var/spawn_type = pick(typesof(/mob/living/simple_animal/hostile/giant_spider))
|
||||
new spawn_type(src.loc, src)
|
||||
qdel(src)
|
||||
if(isturf(loc) && amount_grown >= 100)
|
||||
var/spawn_type = pick(possible_offspring)
|
||||
new spawn_type(src.loc, src)
|
||||
qdel(src)
|
||||
else if(isorgan(loc))
|
||||
if(!amount_grown) amount_grown = 1
|
||||
var/obj/item/organ/external/O = loc
|
||||
if(!O.owner || O.owner.stat == DEAD || amount_grown > 80)
|
||||
O.implants -= src
|
||||
src.loc = O.owner ? O.owner.loc : O.loc
|
||||
src.visible_message("<span class='warning'>\A [src] makes its way out of [O.owner ? "[O.owner]'s [O.name]" : "\the [O]"]!</span>")
|
||||
if(O.owner)
|
||||
O.owner.apply_damage(1, BRUTE, O.limb_name)
|
||||
else if(prob(1))
|
||||
O.owner.apply_damage(1, TOX, O.limb_name)
|
||||
if(world.time > last_itch + 30 SECONDS)
|
||||
last_itch = world.time
|
||||
O.owner << "<span class='notice'>Your [O.name] itches...</span>"
|
||||
if(amount_grown > 70)
|
||||
burst_out(O)
|
||||
if (O.owner)
|
||||
if(amount_grown > 40 && prob(1))
|
||||
O.owner.apply_damage(1, TOX, O.limb_name)
|
||||
if(world.time > last_itch + 30 SECONDS)
|
||||
last_itch = world.time
|
||||
O.owner.visible_message(
|
||||
"<span class='warning'>You think you see something moving around in \the [O.owner]'s [O.name].</span>",
|
||||
"<span class='warning'>You [prob(25) ? "see" : "feel"] something large move around in your [O.name]!</span>")
|
||||
else if (prob(1))
|
||||
if(world.time > last_itch + 30 SECONDS)
|
||||
last_itch = world.time
|
||||
to_chat(O.owner, "<span class='notice'>You feel something large move around in your [O.name]!</span>")
|
||||
|
||||
else if(prob(1))
|
||||
src.visible_message("<span class='notice'>\The [src] skitters.</span>")
|
||||
|
||||
if(amount_grown)
|
||||
amount_grown += rand(0,2)
|
||||
if (amount_grown > -1)
|
||||
amount_grown += (rand(0, 1) * growth_rate)
|
||||
|
||||
/**
|
||||
* Makes the organ spew out all of the spiderlings it has. It's triggered at the point
|
||||
* of the first spiderling reaching 80% of more amount grown. This stops them from growing
|
||||
* to full size inside a human.
|
||||
*
|
||||
* The proc also drops the limb if it's on a human, or gibs it if it's on the floor. For
|
||||
* maximum drama, of course!
|
||||
*
|
||||
* @param O The organ/external limb the src is located inside of.
|
||||
*/
|
||||
/obj/effect/spider/spiderling/proc/burst_out(obj/item/organ/external/O = src.loc)
|
||||
if (!istype(O))
|
||||
return
|
||||
|
||||
if (O.owner)
|
||||
O.owner.visible_message(
|
||||
"<span class='danger'>A group of [src] burst out of [O.owner]'s [O]!</span>",
|
||||
"<span class='danger'>A group of [src] burst out of your [O]!</span>")
|
||||
O.owner.emote("scream")
|
||||
else
|
||||
O.visible_message("<span class='danger'>A group of [src] burst out of \the [O]!</span>")
|
||||
|
||||
var/target_loc = O.owner ? O.owner.loc : O.loc
|
||||
|
||||
// Swarm all of the spiders out so we can gib the limb.
|
||||
for (var/obj/effect/spider/spiderling/S in O.implants)
|
||||
O.implants -= S
|
||||
S.forceMove(target_loc)
|
||||
|
||||
// if owner, dismember the shit out of it.
|
||||
if (O.owner)
|
||||
O.droplimb(0, DROPLIMB_BLUNT)
|
||||
else
|
||||
O.visible_message("<span class='danger'>\The [O] explodes into a pile of gore!</span>")
|
||||
gibs(target_loc)
|
||||
qdel(O)
|
||||
|
||||
/obj/effect/decal/cleanable/spiderling_remains
|
||||
name = "spiderling remains"
|
||||
@@ -248,7 +300,9 @@
|
||||
icon_state = "cocoon1"
|
||||
health = 60
|
||||
|
||||
/obj/effect/spider/cocoon/New()
|
||||
/obj/effect/spider/cocoon/Initialize()
|
||||
. = ..()
|
||||
|
||||
icon_state = pick("cocoon1","cocoon2","cocoon3")
|
||||
|
||||
/obj/effect/spider/cocoon/Destroy()
|
||||
|
||||
Reference in New Issue
Block a user