mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Giant spider nurses now have a chance of injecting their victims with spider eggs.
Spider nurses now have poison_per_bite chance (currently 10%) to inject a random non-robotic external limb with spider eggs. These eggs will eventually hatch a number of spiderlings that will slowly grow inside their host, causing minor tox damage over time. If the organ is removed from the host, the host dies, or the spiderling has matured sufficiently it will crawl out into freedom. Medical scanners will register eggs and spiderlings as foreign bodies.
This commit is contained in:
@@ -78,18 +78,28 @@
|
||||
New()
|
||||
pixel_x = rand(3,-3)
|
||||
pixel_y = rand(3,-3)
|
||||
processing_objects.Add(src)
|
||||
|
||||
processing_objects |= src
|
||||
|
||||
/obj/effect/spider/eggcluster/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
processing_objects -= src
|
||||
if(istype(loc, /obj/item/organ/external))
|
||||
var/obj/item/organ/external/O = loc
|
||||
O.implants -= src
|
||||
|
||||
..()
|
||||
|
||||
/obj/effect/spider/eggcluster/process()
|
||||
amount_grown += rand(0,2)
|
||||
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/obj/effect/spider/spiderling/spiderling = new(src.loc)
|
||||
if(O)
|
||||
O.implants += spiderling
|
||||
spiderling.color = color
|
||||
spiderling.set_light(light_range, light_power, light_color)
|
||||
qdel(src)
|
||||
@@ -101,6 +111,7 @@
|
||||
anchored = 0
|
||||
layer = 2.7
|
||||
health = 3
|
||||
var/last_itch = 0
|
||||
var/amount_grown = -1
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/entry_vent
|
||||
var/travelling_in_vent = 0
|
||||
@@ -171,32 +182,47 @@
|
||||
else
|
||||
entry_vent = null
|
||||
//=================
|
||||
else if(isturf(loc))
|
||||
if(prob(25))
|
||||
var/list/nearby = trange(5, src) - loc
|
||||
if(nearby.len)
|
||||
var/target_atom = pick(nearby)
|
||||
walk_to(src, target_atom, 5)
|
||||
if(prob(25))
|
||||
src.visible_message("<span class='notice'>\The [src] skitters[pick(" away"," around","")].</span>")
|
||||
else if(prob(5))
|
||||
//vent crawl!
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in view(7,src))
|
||||
if(!v.welded)
|
||||
entry_vent = v
|
||||
walk_to(src, entry_vent, 5)
|
||||
break
|
||||
|
||||
else if(prob(25))
|
||||
var/list/nearby = oview(5, src)
|
||||
if(nearby.len)
|
||||
var/target_atom = pick(nearby)
|
||||
walk_to(src, target_atom, 5)
|
||||
if(prob(25))
|
||||
src.visible_message("\blue \the [src] skitters[pick(" away"," around","")].")
|
||||
else if(prob(5))
|
||||
//vent crawl!
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in view(7,src))
|
||||
if(!v.welded)
|
||||
entry_vent = v
|
||||
walk_to(src, entry_vent, 5)
|
||||
break
|
||||
|
||||
if(prob(1))
|
||||
src.visible_message("\blue \the [src] chitters.")
|
||||
if(isturf(loc) && amount_grown > 0)
|
||||
amount_grown += rand(0,2)
|
||||
if(amount_grown >= 100)
|
||||
var/spawn_type = pick(typesof(/mob/living/simple_animal/hostile/giant_spider))
|
||||
var/mob/spiderspawn = new spawn_type(src.loc)
|
||||
spiderspawn.color = color
|
||||
spiderspawn.set_light(light_range, light_power, light_color)
|
||||
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>"
|
||||
else if(prob(1))
|
||||
src.visible_message("<span class='notice'>\The [src] skitters.</span>")
|
||||
|
||||
if(amount_grown)
|
||||
amount_grown += rand(0,2)
|
||||
|
||||
/obj/effect/decal/cleanable/spiderling_remains
|
||||
name = "spiderling remains"
|
||||
@@ -214,7 +240,7 @@
|
||||
icon_state = pick("cocoon1","cocoon2","cocoon3")
|
||||
|
||||
/obj/effect/spider/cocoon/Destroy()
|
||||
src.visible_message("\red \the [src] splits open.")
|
||||
src.visible_message("<span class='warning'>\The [src] splits open.</span>")
|
||||
for(var/atom/movable/A in contents)
|
||||
A.loc = src.loc
|
||||
return ..()
|
||||
|
||||
@@ -64,15 +64,24 @@
|
||||
move_to_delay = 4
|
||||
|
||||
/mob/living/simple_animal/hostile/giant_spider/AttackingTarget()
|
||||
..()
|
||||
if(isliving(target_mob))
|
||||
var/mob/living/L = target_mob
|
||||
var/target = ..()
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
if(L.reagents)
|
||||
L.reagents.add_reagent("toxin", poison_per_bite)
|
||||
if(prob(poison_per_bite))
|
||||
L << "\red You feel a tiny prick."
|
||||
L.reagents.add_reagent(poison_type, 5)
|
||||
|
||||
/mob/living/simple_animal/hostile/giant_spider/nurse/AttackingTarget()
|
||||
var/target = ..()
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(prob(poison_per_bite))
|
||||
var/obj/item/organ/external/O = pick(H.organs)
|
||||
if(!(O.status & ORGAN_ROBOT))
|
||||
O.implants += new/obj/effect/spider/eggcluster(O)
|
||||
|
||||
/mob/living/simple_animal/hostile/giant_spider/Life()
|
||||
..()
|
||||
if(!stat)
|
||||
|
||||
Reference in New Issue
Block a user