Merge pull request #11161 from Kyep/terrorspider_patch_post_newcrit

Terror Spider tweaks
This commit is contained in:
variableundefined
2019-04-07 20:30:48 +08:00
committed by GitHub
6 changed files with 38 additions and 19 deletions
+10
View File
@@ -548,6 +548,16 @@
if(spider_minds.len)
dat += check_role_table("Terror Spiders", spider_minds)
var/count_eggs = 0
var/count_spiderlings = 0
for(var/obj/structure/spider/eggcluster/terror_eggcluster/E in ts_egg_list)
if(is_station_level(E.z))
count_eggs += E.spiderling_number
for(var/obj/structure/spider/spiderling/terror_spiderling/L in ts_spiderling_list)
if(!L.stillborn && is_station_level(L.z))
count_spiderlings += 1
dat += "<table cellspacing=5><TR><TD>Growing TS on-station: [count_eggs] egg[count_eggs != 1 ? "s" : ""], [count_spiderlings] spiderling[count_spiderlings != 1 ? "s" : ""]. </TD></TR></TABLE>"
if(ticker.mode.ert.len)
dat += check_role_table("ERT", ticker.mode.ert)
@@ -24,6 +24,12 @@
canlay = 1000
spider_tier = TS_TIER_5
projectiletype = /obj/item/projectile/terrorqueenspit/empress
icon = 'icons/mob/terrorspider64.dmi'
pixel_x = -16
mob_size = MOB_SIZE_LARGE
icon_state = "terror_empress"
icon_living = "terror_empress"
icon_dead = "terror_empress_dead"
var/datum/action/innate/terrorspider/queen/empress/empresslings/empresslings_action
var/datum/action/innate/terrorspider/queen/empress/empresserase/empresserase_action
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
@@ -42,7 +48,7 @@
queenfakelings_action.button.name = "Empress Lings"
/mob/living/simple_animal/hostile/poison/terror_spider/queen/empress/LayQueenEggs()
var/eggtype = input("What kind of eggs?") as null|anything in list(TS_DESC_QUEEN, TS_DESC_MOTHER, TS_DESC_PRINCE, TS_DESC_PRINCESS, TS_DESC_RED, TS_DESC_GRAY, TS_DESC_GREEN, TS_DESC_BLACK, TS_DESC_PURPLE, TS_DESC_WHITE)
var/eggtype = input("What kind of eggs?") as null|anything in list(TS_DESC_QUEEN, TS_DESC_MOTHER, TS_DESC_PRINCE, TS_DESC_PRINCESS, TS_DESC_RED, TS_DESC_GRAY, TS_DESC_GREEN, TS_DESC_BLACK, TS_DESC_PURPLE, TS_DESC_WHITE, TS_DESC_BROWN)
var/numlings = input("How many in the batch?") as null|anything in list(1, 2, 3, 4, 5, 10, 15, 20, 30, 40, 50)
if(eggtype == null || numlings == null)
to_chat(src, "<span class='danger'>Cancelled.</span>")
@@ -60,6 +66,8 @@
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/purple, numlings)
if(TS_DESC_WHITE)
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/white, numlings)
if(TS_DESC_BROWN)
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/brown, numlings)
if(TS_DESC_PRINCE)
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/prince, numlings)
if(TS_DESC_PRINCESS)
@@ -38,6 +38,8 @@
if(can_die())
if(spider_awaymission && !is_away_level(z))
canspawn = FALSE
if(degenerate)
canspawn = FALSE
if(canspawn)
canspawn = FALSE
for(var/i in 0 to spawn_count)
@@ -142,9 +142,8 @@
visible_message("<span class='danger'>\The [src] looks around warily - then seeks a better nesting ground.</span>")
path_to_vent = 1
else
visible_message("<span class='danger'>\The [src] looks around, searching for the vent that should be there, but isn't. A bluespace portal forms on her, and she is gone.</span>")
qdel(src)
new /obj/effect/portal(get_turf(loc))
neststep = -1
message_admins("Warning: [key_name_admin(src)] was spawned in an area without a vent! This is likely a mapping/spawn mistake. This mob's AI has been permanently deactivated.")
if(1)
// No nest, and we should create one. Start NestMode(), then advance to step 2.
if(world.time > (lastnestsetup + nestfrequency))
+15 -15
View File
@@ -52,10 +52,11 @@
var/egg_progress = 0 // # of on_life() cycles completed, unlike cycle_num this is reset on each hatch event
var/egg_progress_per_hatch = 90 // if egg_progress > this, chance to hatch and reset egg_progress
var/eggs_hatched = 0 // num of hatch events completed
var/eggs_max = 3 // max possible spiderlings you can get from a single infection if its left to run for a very long time
var/awaymission_checked = FALSE
var/awaymission_infection = FALSE // TRUE if infection occurred inside gateway
var/list/types_basic = list(/mob/living/simple_animal/hostile/poison/terror_spider/red, /mob/living/simple_animal/hostile/poison/terror_spider/gray, /mob/living/simple_animal/hostile/poison/terror_spider/green)
var/list/types_basic = list(/mob/living/simple_animal/hostile/poison/terror_spider/red, /mob/living/simple_animal/hostile/poison/terror_spider/gray)
var/list/types_adv = list(/mob/living/simple_animal/hostile/poison/terror_spider/red, /mob/living/simple_animal/hostile/poison/terror_spider/gray, /mob/living/simple_animal/hostile/poison/terror_spider/green)
/obj/item/organ/internal/body_egg/terror_eggs/on_life()
// Safety first.
@@ -78,19 +79,11 @@
qdel(src)
return
// Detect dying hosts, and try to keep them alive (so spiderlings can hatch) at the cost of some growth progress.
if(owner.health < -25)
to_chat(owner,"<span class='notice'>You feel a strange, blissful senstation.</span>")
owner.adjustBruteLoss(-5)
owner.adjustFireLoss(-5)
owner.adjustToxLoss(-5)
egg_progress += 10
// Once at least one egg has hatched from you, you'll need help to reach medbay.
if(eggs_hatched >= 1)
owner.Confused(2)
if(egg_progress > egg_progress_per_hatch && eggs_hatched < eggs_max)
if(egg_progress > egg_progress_per_hatch)
egg_progress -= egg_progress_per_hatch
hatch_egg()
@@ -107,15 +100,22 @@
return extra_progress
/obj/item/organ/internal/body_egg/terror_eggs/proc/hatch_egg()
var/infection_completed = FALSE
var/obj/structure/spider/spiderling/terror_spiderling/S = new(get_turf(owner))
if(eggs_hatched >= 2) // on the third egg...
S.grow_as = /mob/living/simple_animal/hostile/poison/terror_spider/princess
else
S.grow_as = pick(types_basic)
switch(eggs_hatched)
if(0) // First spiderling
S.grow_as = pick(types_basic)
if(1) // Second
S.grow_as = pick(types_adv)
if(2) // Last
S.grow_as = /mob/living/simple_animal/hostile/poison/terror_spider/princess
infection_completed = TRUE
S.immediate_ventcrawl = TRUE
eggs_hatched++
to_chat(owner, "<span class='warning'>A strange prickling sensation moves across your skin... then suddenly the whole world seems to spin around you!</span>")
owner.Paralyse(10)
if(infection_completed && !QDELETED(src))
qdel(src)
/obj/item/organ/internal/body_egg/terror_eggs/remove(var/mob/living/carbon/M, var/special = 0)
..()
Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB