From fd1ade998226396799030eef8985e39e5fbd3e70 Mon Sep 17 00:00:00 2001 From: Anewbe Date: Tue, 31 Jan 2017 21:57:39 -0600 Subject: [PATCH] Spiders inject fewer spiderlings --- code/game/objects/effects/spiders.dm | 8 +++++++- .../living/simple_animal/hostile/giant_spider.dm | 13 +++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index b7b258f5d6..1077d757ae 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -77,6 +77,8 @@ desc = "They seem to pulse slightly with an inner life" icon_state = "eggs" var/amount_grown = 0 + var/spiders_min = 6 + var/spiders_max = 24 New() pixel_x = rand(3,-3) pixel_y = rand(3,-3) @@ -97,7 +99,7 @@ /obj/effect/spider/eggcluster/process() amount_grown += rand(0,2) if(amount_grown >= 100) - var/num = rand(6,24) + var/num = rand(spiders_min, spiders_max) var/obj/item/organ/external/O = null if(istype(loc, /obj/item/organ/external)) O = loc @@ -108,6 +110,10 @@ O.implants += spiderling qdel(src) +/obj/effect/spider/eggcluster/small + spiders_min = 1 + spiders_max = 3 + /obj/effect/spider/spiderling name = "spiderling" desc = "It never stays still for long." diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm index 030f9b8e6b..52704d85cd 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -29,7 +29,7 @@ cold_damage_per_tick = 20 var/poison_per_bite = 5 var/poison_chance = 10 - var/poison_type = "toxin" + var/poison_type = "spidertoxin" faction = "spiders" var/busy = 0 pass_flags = PASSTABLE @@ -85,9 +85,14 @@ if(prob(5)) var/obj/item/organ/external/O = pick(H.organs) if(!(O.robotic >= ORGAN_ROBOT)) - var/eggs = PoolOrNew(/obj/effect/spider/eggcluster/, list(O, src)) - O.implants += eggs - H << "The [src] injects something into your [O.name]!" + var/eggcount + for(var/obj/I in O.implants) + if(istype(I, /obj/effect/spider/eggcluster)) + eggcount ++ + if(!eggcount) + var/eggs = PoolOrNew(/obj/effect/spider/eggcluster/small, list(O, src)) + O.implants += eggs + H << "The [src] injects something into your [O.name]!" /mob/living/simple_animal/hostile/giant_spider/Life() ..()