diff --git a/_maps/map_files/RandomZLevels/terrorspiders.dmm b/_maps/map_files/RandomZLevels/terrorspiders.dmm index 583ae8c74c9..143385681b3 100644 --- a/_maps/map_files/RandomZLevels/terrorspiders.dmm +++ b/_maps/map_files/RandomZLevels/terrorspiders.dmm @@ -5645,7 +5645,6 @@ /obj/effect/decal/cleanable/dirt, /obj/machinery/atmospherics/pipe/manifold/hidden/supply, /mob/living/simple_animal/hostile/poison/terror_spider/red{ - ai_ventcrawls = 0; wander = 0 }, /turf/simulated/floor/plasteel{ diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/__defines.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/__defines.dm index 0c777002ae0..c2b420c2511 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/__defines.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/__defines.dm @@ -4,9 +4,6 @@ #define MOVING_TO_TARGET 3 #define SPINNING_COCOON 4 -#define TS_AI_AGGRESSIVE 0 -#define TS_AI_DEFENSIVE 1 - #define TS_DAMAGE_SIMPLE 0 #define TS_DAMAGE_POISON 1 #define TS_DAMAGE_BRUTE 2 diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/actions.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/actions.dm index 0cb0faa16cd..957be60b2cd 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/actions.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/actions.dm @@ -148,12 +148,6 @@ if(prob(50)) icon_state = "stickyweb2" -/obj/structure/spider/terrorweb/proc/DeCloakNearby() - for(var/mob/living/simple_animal/hostile/poison/terror_spider/gray/G in view(6,src)) - if(!G.ckey && G.stat != DEAD) - G.GrayDeCloak() - G.Aggro() - /obj/structure/spider/terrorweb/CanPass(atom/movable/mover, turf/target) if(istype(mover, /mob/living/simple_animal/hostile/poison/terror_spider)) return 1 @@ -167,7 +161,6 @@ to_chat(mover, "You get stuck in [src] for a moment.") M.Stun(4) // 8 seconds. M.Weaken(4) // 8 seconds. - DeCloakNearby() if(iscarbon(mover)) var/mob/living/carbon/C = mover web_special_ability(C) diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/empress.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/empress.dm index 90550dccdca..1c6fcdb6e5d 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/empress.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/empress.dm @@ -19,7 +19,6 @@ ventcrawler = 1 idle_ventcrawl_chance = 0 ai_playercontrol_allowtype = 0 - ai_type = TS_AI_AGGRESSIVE rapid = 3 canlay = 1000 spider_tier = TS_TIER_5 @@ -39,7 +38,7 @@ empresserase_action = new() empresserase_action.Grant(src) -/mob/living/simple_animal/hostile/poison/terror_spider/queen/empress/handle_automated_action() +/mob/living/simple_animal/hostile/poison/terror_spider/queen/empress/spider_special_action() return /mob/living/simple_animal/hostile/poison/terror_spider/queen/empress/NestMode() diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/ghost.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/ghost.dm index dd170c1c177..283cbb6ad0d 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/ghost.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/ghost.dm @@ -26,6 +26,8 @@ error_on_humanize = "Dying spiders are not player-controllable." else if(stat == DEAD) error_on_humanize = "Dead spiders are not player-controllable." + else if(!(user in GLOB.respawnable_list)) + error_on_humanize = "You are not able to rejoin the round." if(jobban_isbanned(user, "Syndicate") || jobban_isbanned(user, "alien")) to_chat(user,"You are jobbanned from role of syndicate and/or alien lifeform.") return diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/gray.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/gray.dm index 36ec67df0cd..14aa2b9299a 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/gray.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/gray.dm @@ -10,23 +10,35 @@ /mob/living/simple_animal/hostile/poison/terror_spider/gray name = "Gray Terror spider" - desc = "An ominous-looking gray spider. It twitches occasionally, always seeming ready to pounce." - spider_role_summary = "Stealth spider that ambushes weak humans from vents." + desc = "An ominous-looking gray spider. It seems to blend into webs, making it hard to see." + spider_role_summary = "Stealth spider that ambushes weak humans." ai_target_method = TS_DAMAGE_BRUTE icon_state = "terror_gray" icon_living = "terror_gray" icon_dead = "terror_gray_dead" - maxHealth = 120 // same health as hunter spider, aka, pretty weak.. but its almost invisible. + maxHealth = 120 // same health as hunter spider, aka, pretty weak.. but its almost invisible while on webs. health = 120 melee_damage_lower = 10 melee_damage_upper = 20 - regen_points_per_hp = 2 // 50% higher regen speed stat_attack = UNCONSCIOUS // ensures they will target people in crit, too! - wander = 0 // wandering defeats the purpose of stealth - vision_range = 3 // very low idle vision range delay_web = 20 // double speed web_type = /obj/structure/spider/terrorweb/gray + ai_spins_webs = FALSE // uses massweb instead + var/prob_ai_massweb = 10 +/mob/living/simple_animal/hostile/poison/terror_spider/gray/Move(turf/T) + . = ..(T) + if(stat == DEAD) + icon_state = icon_dead + else + var/obj/structure/spider/terrorweb/W = locate() in get_turf(src) + if(W) + if(icon_state == "terror_gray") + icon_state = "terror_gray_cloaked" + icon_living = "terror_gray_cloaked" + else if(icon_state != "terror_gray") + icon_state = "terror_gray" + icon_living = "terror_gray" /mob/living/simple_animal/hostile/poison/terror_spider/gray/spider_specialattack(mob/living/carbon/human/L, poisonable) var/obj/structure/spider/terrorweb/W = locate() in get_turf(L) @@ -40,101 +52,13 @@ visible_message("[src] bites [target]!") L.attack_animal(src) -/mob/living/simple_animal/hostile/poison/terror_spider/gray/adjustBruteLoss(damage) - . = ..(damage) - if(invisibility > 0) - GrayDeCloak() - -/mob/living/simple_animal/hostile/poison/terror_spider/gray/adjustFireLoss(damage) - . = ..(damage) - if(invisibility > 0) - GrayDeCloak() - -/mob/living/simple_animal/hostile/poison/terror_spider/gray/Aggro() - GrayDeCloak() - ..() - -/mob/living/simple_animal/hostile/poison/terror_spider/gray/AttackingTarget() - if(invisibility > 0) - GrayDeCloak() - else - return ..() - -/mob/living/simple_animal/hostile/poison/terror_spider/proc/GrayCloak() - visible_message("[src] hides in the vent.") - invisibility = SEE_INVISIBLE_LEVEL_ONE - icon_state = "terror_gray_cloaked" - icon_living = "terror_gray_cloaked" - if(!ckey) - vision_range = 3 - // Bugged, does not work yet. Also spams webs. Also doesn't look great. But... planned. - move_to_delay = 15 // while invisible, slow. - -/mob/living/simple_animal/hostile/poison/terror_spider/proc/GrayDeCloak() - invisibility = 0 - icon_state = "terror_gray" - icon_living = "terror_gray" - vision_range = 9 - move_to_delay = 5 - prob_ai_hides_in_vents = 10 - - /mob/living/simple_animal/hostile/poison/terror_spider/gray/spider_special_action() - if(prob(prob_ai_hides_in_vents)) - var/obj/machinery/atmospherics/unary/vent_pump/e = locate() in get_turf(src) - if(e) - if(!e.welded || spider_awaymission) - if(invisibility != SEE_INVISIBLE_LEVEL_ONE) // aka: 35. ghosts have 15 with no darkness, 60 with darkness. Weird... - var/list/g_turfs_webbed = ListWebbedTurfs() - var/webcount = g_turfs_webbed.len - if(webcount >= 4) - // if there are already at least 4 webs around us, then we have a good web setup already. Cloak. - GrayCloak() - // I wonder if we should settle down here forever? - var/foundqueen = 0 - for(var/mob/living/H in view(src, 10)) - if(istype(H, /mob/living/simple_animal/hostile/poison/terror_spider/queen)) - foundqueen = 1 - break - if(!foundqueen) - var/list/g_turfs_visible = ListVisibleTurfs() - if(g_turfs_visible.len >= 12) - // So long as the room isn't tiny, and it has no queen in it, sure, settle there - // since we are settled now, disable most AI behaviors so we don't waste CPU. - ai_ventcrawls = 0 - ai_spins_webs = 0 - ai_break_lights = 0 - prob_ai_hides_in_vents = 3 - visible_message("[src] finishes setting up its trap in [get_area(src)].") - else - var/list/g_turfs_valid = ListValidTurfs() - var/turfcount = g_turfs_valid.len - if(turfcount == 0) - // if there is literally nowhere else we could put a web, cloak. - GrayCloak() - else - // otherwise, pick one of the valid turfs with no web to create a web there. - new /obj/structure/spider/terrorweb(pick(g_turfs_valid)) - visible_message("[src] spins a web.") - else - if(invisibility == SEE_INVISIBLE_LEVEL_ONE) - // if our vent is welded, decloak - GrayDeCloak() - else - if(invisibility == SEE_INVISIBLE_LEVEL_ONE) - // if there is no vent under us, and we are cloaked, decloak - GrayDeCloak() - var/vdistance = 99 - var/temp_vent = null - for(var/obj/machinery/atmospherics/unary/vent_pump/v in view(7,src)) - if(!v.welded) - if(get_dist(src,v) < vdistance) - temp_vent = v - vdistance = get_dist(src,v) - if(temp_vent) - if(get_dist(src,temp_vent) > 0 && get_dist(src,temp_vent) < 5) - step_to(src,temp_vent) - // if you're bumped off your vent, try to get back to it + if(prob(prob_ai_massweb)) + for(var/turf/simulated/T in oview(2,get_turf(src))) + if(T.density == 0) + var/obj/structure/spider/terrorweb/W = locate() in T + if(!W) + new web_type(T) /obj/structure/spider/terrorweb/gray alpha = 100 diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/hive.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/hive.dm index c3ee3dd6a35..d4b1886e49e 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/hive.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/hive.dm @@ -18,21 +18,6 @@ hsline += " AI " to_chat(src,hsline) -/mob/living/simple_animal/hostile/poison/terror_spider/proc/SetHiveCommand(set_ai, set_ventcrawl) - var/numspiders = 0 - for(var/mob/living/simple_animal/hostile/poison/terror_spider/T in ts_spiderlist) - if(spider_awaymission && !T.spider_awaymission) - continue - else if(!spider_awaymission && T.spider_awaymission) - continue - numspiders += 1 - if(spider_tier >= T.spider_tier) - if(T.ai_type != set_ai) - T.ai_type = set_ai - if(T.idle_ventcrawl_chance != set_ventcrawl) - T.idle_ventcrawl_chance = set_ventcrawl - return numspiders - /mob/living/simple_animal/hostile/poison/terror_spider/proc/CountSpiders() var/numspiders = 0 for(var/mob/living/simple_animal/hostile/poison/terror_spider/T in ts_spiderlist) diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/prince.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/prince.dm index d0ddc369517..646e9e50660 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/prince.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/prince.dm @@ -22,7 +22,7 @@ melee_damage_lower = 30 melee_damage_upper = 40 ventcrawler = 0 - ai_ventcrawls = 0 + ai_ventcrawls = FALSE environment_smash = ENVIRONMENT_SMASH_RWALLS idle_ventcrawl_chance = 0 spider_tier = TS_TIER_3 @@ -38,6 +38,7 @@ /mob/living/simple_animal/hostile/poison/terror_spider/prince/spider_specialattack(mob/living/carbon/human/L) if(prob(15)) visible_message("[src] rams into [L], knocking [L.p_them()] to the floor!") + do_attack_animation(L) L.Weaken(5) L.Stun(5) else diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm index 7f522b3382e..ea4753866c2 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm @@ -25,7 +25,7 @@ speed = 0 // '0' (also the default for human mobs) converts to 2.5 total delay, or 4 tiles/sec. spider_opens_doors = 2 ventcrawler = 0 - ai_ventcrawls = 0 + ai_ventcrawls = FALSE environment_smash = ENVIRONMENT_SMASH_RWALLS idle_ventcrawl_chance = 0 // stick to the queen! web_type = /obj/structure/spider/terrorweb/purple diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm index 2839dedb237..24a6375282d 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm @@ -22,6 +22,9 @@ melee_damage_lower = 10 melee_damage_upper = 20 ventcrawler = 1 + ai_break_lights = FALSE + ai_spins_webs = FALSE + ai_ventcrawls = FALSE idle_ventcrawl_chance = 0 force_threshold = 18 // outright immune to anything of force under 18, this means welders can't hurt it, only guns can ranged = 1 @@ -32,13 +35,13 @@ spider_tier = TS_TIER_4 spider_opens_doors = 2 web_type = /obj/structure/spider/terrorweb/queen - var/spider_spawnfrequency = 1200 // 120 seconds - var/spider_spawnfrequency_stable = 1200 // 120 seconds. Spawnfrequency is set to this on ai spiders once nest setup is complete. + var/spider_spawnfrequency = 1200 // 120 seconds. Default for player queens and NPC queens on station. Awaymission queens have this changed in New() + var/spider_spawnfrequency_stable = 1200 // 120 seconds. Spawnfrequency is set to this on awaymission spiders once nest setup is complete. var/spider_lastspawn = 0 var/nestfrequency = 300 // 30 seconds var/lastnestsetup = 0 var/neststep = 0 - var/hasnested = 0 + var/hasnested = FALSE var/spider_max_per_nest = 35 // above this, AI queens become stable var/canlay = 4 // main counter for egg-laying ability! # = num uses, incremented at intervals var/eggslaid = 0 @@ -82,7 +85,6 @@ /mob/living/simple_animal/hostile/poison/terror_spider/queen/death(gibbed) if(can_die() && !hasdied) - SetHiveCommand(0, 15) // Hive becomes very aggressive. if(spider_uo71) UnlockBlastDoors("UO71_Caves") // When a queen dies, so do her player-controlled purple-type guardians. Intended as a motivator for purples to ensure they guard her. @@ -104,17 +106,16 @@ return TRUE return FALSE -/mob/living/simple_animal/hostile/poison/terror_spider/queen/handle_automated_action() - ..() - if(!stat && !ckey && AIStatus != AI_OFF && !target && !path_to_vent) +/mob/living/simple_animal/hostile/poison/terror_spider/queen/spider_special_action() + if(!stat && !ckey) switch(neststep) if(0) // No nest. If current location is eligible for nesting, advance to step 1. - var/ok_to_nest = 1 + var/ok_to_nest = TRUE var/area/new_area = get_area(loc) if(new_area) if(findtext(new_area.name, "hall")) - ok_to_nest = 0 + ok_to_nest = FALSE // nesting in a hallway would be very stupid - crew would find and kill you almost instantly var/numhostiles = 0 for(var/mob/living/H in oview(10, src)) @@ -123,7 +124,7 @@ numhostiles += 1 // nesting RIGHT NEXT TO SOMEONE is even worse if(numhostiles > 0) - ok_to_nest = 0 + ok_to_nest = FALSE var/vdistance = 99 for(var/obj/machinery/atmospherics/unary/vent_pump/v in view(10, src)) if(!v.welded) @@ -131,7 +132,7 @@ entry_vent = v vdistance = get_dist(src, v) if(!entry_vent) - ok_to_nest = 0 + ok_to_nest = FALSE // don't nest somewhere with no vent - your brood won't be able to get out! if(ok_to_nest && entry_vent) nest_vent = entry_vent @@ -151,14 +152,14 @@ neststep = 2 NestMode() if(2) - // Create initial pair of purple nest guards. + // Create initial four purple nest guards. if(world.time > (lastnestsetup + nestfrequency)) lastnestsetup = world.time spider_lastspawn = world.time - DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/purple, 2) + DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/purple, 4) neststep = 3 if(3) - // Create spiders (random T1 types) until nest is full. + // Create spiders (random types) until nest is full. if(world.time > (spider_lastspawn + spider_spawnfrequency)) if(prob(20)) if(ai_nest_is_full()) @@ -166,18 +167,14 @@ spider_spawnfrequency = spider_spawnfrequency_stable neststep = 4 else - var/obj/structure/spider/eggcluster/terror_eggcluster/N = locate() in get_turf(src) - if(!N) - spider_lastspawn = world.time - DoLayTerrorEggs(pick(spider_types_standard), 2) + spider_lastspawn = world.time + var/spiders_left_to_spawn = Clamp( (spider_max_per_nest - CountSpiders()), 1, 10) + DoLayTerrorEggs(pick(spider_types_standard), spiders_left_to_spawn) if(4) - // Nest should be full. If so, pulse attack command. Otherwise, start replenishing nest (stage 5). + // Nest should be full. Otherwise, start replenishing nest (stage 5). if(world.time > (spider_lastspawn + spider_spawnfrequency)) - if(prob(20)) - if(ai_nest_is_full()) - SetHiveCommand(0, 15) // AI=0 (attack everyone), ventcrawl=15%/tick - else - neststep = 5 + if(prob(20) && !ai_nest_is_full()) + neststep = 5 if(5) // If already replenished, go idle (stage 4). Otherwise, replenish nest. if(world.time > (spider_lastspawn + spider_spawnfrequency)) @@ -185,20 +182,18 @@ if(ai_nest_is_full()) neststep = 4 else - var/obj/structure/spider/eggcluster/terror_eggcluster/N = locate() in get_turf(src) - if(!N) - spider_lastspawn = world.time - var/num_purple = CountSpidersType(/mob/living/simple_animal/hostile/poison/terror_spider/purple) - var/num_white = CountSpidersType(/mob/living/simple_animal/hostile/poison/terror_spider/white) - var/num_brown = CountSpidersType(/mob/living/simple_animal/hostile/poison/terror_spider/brown) - if(num_purple < 4) - DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/purple, 2) - else if(num_white < 2) - DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/white, 2) - else if(num_brown < 2) - DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/brown, 2) - else - DoLayTerrorEggs(pick(spider_types_standard), 2) + spider_lastspawn = world.time + var/num_purple = CountSpidersType(/mob/living/simple_animal/hostile/poison/terror_spider/purple) + var/num_white = CountSpidersType(/mob/living/simple_animal/hostile/poison/terror_spider/white) + var/num_brown = CountSpidersType(/mob/living/simple_animal/hostile/poison/terror_spider/brown) + if(num_purple < 4) + DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/purple, 2) + else if(num_white < 2) + DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/white, 2) + else if(num_brown < 4) + DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/brown, 4) + else + DoLayTerrorEggs(pick(spider_types_standard), 5) /mob/living/simple_animal/hostile/poison/terror_spider/queen/proc/NestPrompt() var/confirm = alert(src, "Are you sure you want to nest? You will be able to lay eggs, and smash walls, but not ventcrawl.","Nest?","Yes","No") @@ -213,9 +208,9 @@ queensense_action = new() queensense_action.Grant(src) queennest_action.Remove(src) - hasnested = 1 + hasnested = TRUE ventcrawler = 0 - ai_ventcrawls = 0 + ai_ventcrawls = FALSE environment_smash = ENVIRONMENT_SMASH_RWALLS DoQueenScreech(8, 100, 8, 100) MassFlicker() diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm index cded24e3d51..c0c53014f8f 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm @@ -13,8 +13,6 @@ continue if(H.stat == UNCONSCIOUS && !stat_attack) continue - if(ai_type == TS_AI_DEFENSIVE && !(H in enemies)) - continue if(isterrorspider(H)) if(H in enemies) targets3 += H @@ -92,10 +90,18 @@ // --------------------- TERROR SPIDERS: AI BEHAVIOR CODE ------------------------- // -------------------------------------------------------------------------------- + /mob/living/simple_animal/hostile/poison/terror_spider/handle_automated_action() - if (stat || ckey) - return ..() - if(AIStatus != AI_OFF && !target) + if(target) + CreatePath(target) + return ..() + +/mob/living/simple_animal/hostile/poison/terror_spider/handle_automated_movement() + // Putting the main terror spider AI code in handle_automated_movement() rather than handle_automated_action() ensures it will still run when the spider AIStatus == AI_IDLE + // This is necessary for the terror spiders in the away mission to work properly. + if(AIStatus != AI_IDLE) + return + if(!target) var/my_ventcrawl_freq = freq_ventcrawl_idle if(ts_count_dead > 0) if(world.time < (ts_death_last + ts_death_window)) @@ -131,10 +137,10 @@ step_to(src,L) L.on = 1 L.broken() - L.do_attack_animation(src) + do_attack_animation(L) visible_message("[src] smashes the [L.name].") - break - else if(web_type && ai_spins_webs && world.time > (last_spins_webs + freq_spins_webs)) + return + else if(ai_spins_webs && web_type && world.time > (last_spins_webs + freq_spins_webs)) last_spins_webs = world.time var/obj/structure/spider/terrorweb/T = locate() in get_turf(src) if(!T) @@ -154,9 +160,7 @@ else // If none of the general actions apply, check for class-specific actions. spider_special_action() - else if(AIStatus != AI_OFF && target) - CreatePath(target) - ..() + ..() /mob/living/simple_animal/hostile/poison/terror_spider/adjustBruteLoss(damage) . = ..(damage) @@ -344,6 +348,11 @@ vturfs += T return vturfs +/mob/living/simple_animal/hostile/poison/terror_spider/DestroySurroundings() + if(!target) + return + . = ..() + // -------------------------------------------------------------------------------- // --------------------- TERROR SPIDERS: MISC AI CODE ----------------------------- // -------------------------------------------------------------------------------- diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm index 0fd357b0f11..f84ec5f90d7 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm @@ -37,7 +37,7 @@ var/global/list/ts_spiderling_list = list() // Movement pass_flags = PASSTABLE - turns_per_move = 5 // number of turns before AI-controlled spiders wander around. No effect on actual player or AI movement speed! + turns_per_move = 3 // number of turns before AI-controlled spiders wander around. No effect on actual player or AI movement speed! move_to_delay = 6 // AI spider speed at chasing down targets. Higher numbers mean slower speed. Divide 20 (server tick rate / second) by this to get tiles/sec. // 5 = 4 tiles/sec, 6 = 3.3 tiles/sec. 3 = 6.6 tiles/sec. @@ -55,8 +55,8 @@ var/global/list/ts_spiderling_list = list() // Ventcrawling ventcrawler = 1 // allows player ventcrawling - var/ai_ventcrawls = 1 - var/idle_ventcrawl_chance = 3 // default 3% chance to ventcrawl when not in combat to a random exit vent + var/ai_ventcrawls = TRUE + var/idle_ventcrawl_chance = 15 var/freq_ventcrawl_combat = 1800 // 3 minutes var/freq_ventcrawl_idle = 9000 // 15 minutes var/last_ventcrawl_time = -9000 // Last time the spider crawled. Used to prevent excessive crawling. Setting to freq*-1 ensures they can crawl once on spawn. @@ -99,17 +99,16 @@ var/global/list/ts_spiderling_list = list() sight = SEE_MOBS // AI aggression settings - var/ai_type = TS_AI_AGGRESSIVE // 0 = aggressive to everyone, 1 = defends self only var/ai_target_method = TS_DAMAGE_SIMPLE // AI player control by ghosts var/ai_playercontrol_allowtype = 1 // if 0, this specific class of spider is not player-controllable. Default set in code for each class, cannot be changed. - var/ai_break_lights = 1 // AI lightbreaking behavior + var/ai_break_lights = TRUE // AI lightbreaking behavior var/freq_break_light = 600 var/last_break_light = 0 // leave this, changed by procs. - var/ai_spins_webs = 1 // AI web-spinning behavior + var/ai_spins_webs = TRUE // AI web-spinning behavior var/freq_spins_webs = 600 var/last_spins_webs = 0 // leave this, changed by procs. var/delay_web = 40 // delay between starting to spin web, and finishing @@ -117,8 +116,6 @@ var/global/list/ts_spiderling_list = list() var/freq_cocoon_object = 1200 // two minutes between each attempt var/last_cocoon_object = 0 // leave this, changed by procs. - var/prob_ai_hides_in_vents = 15 // probabily of a gray spider hiding in a vent - var/spider_opens_doors = 1 // all spiders can open firedoors (they have no security). 1 = can open depowered doors. 2 = can open powered doors faction = list("terrorspiders") var/spider_awaymission = 0 // if 1, limits certain behavior in away missions @@ -271,12 +268,12 @@ var/global/list/ts_spiderling_list = list() spider_awaymission = 1 ts_count_alive_awaymission++ if(spider_tier >= 3) - ai_ventcrawls = 0 // means that pre-spawned bosses on away maps won't ventcrawl. Necessary to keep prince/mother in one place. + ai_ventcrawls = FALSE // means that pre-spawned bosses on away maps won't ventcrawl. Necessary to keep prince/mother in one place. if(istype(get_area(src), /area/awaymission/UO71)) // if we are playing the away mission with our special spiders... spider_uo71 = 1 if(world.time < 600) // these are static spiders, specifically for the UO71 away mission, make them stay in place - ai_ventcrawls = 0 + ai_ventcrawls = FALSE spider_placed = 1 else ts_count_alive_station++ diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/white.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/white.dm index a121a641db8..9a7dcbd7eff 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/white.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/white.dm @@ -41,7 +41,7 @@ var/inject_target = pick("chest","head") L.attack_animal(src) if(L.stunned || L.paralysis || L.can_inject(null, 0, inject_target, 0)) - if(!IsTSInfected(L)) + if(!IsTSInfected(L) && ishuman(L)) visible_message("[src] buries its long fangs deep into the [inject_target] of [L]!") new /obj/item/organ/internal/body_egg/terror_eggs(L) if(!ckey) @@ -64,7 +64,7 @@ /obj/structure/spider/terrorweb/white/web_special_ability(mob/living/carbon/C) if(istype(C)) - if(!IsTSInfected(C)) + if(!IsTSInfected(C) && ishuman(C)) var/inject_target = pick("chest","head") if(C.can_inject(null, 0, inject_target, 0)) to_chat(C, "[src] slices into you!") diff --git a/code/modules/surgery/organs/parasites.dm b/code/modules/surgery/organs/parasites.dm index f330df260eb..48cc4a408d5 100644 --- a/code/modules/surgery/organs/parasites.dm +++ b/code/modules/surgery/organs/parasites.dm @@ -81,7 +81,7 @@ // Once at least one egg has hatched from you, you'll need help to reach medbay. if(eggs_hatched >= 1) - owner.Confused(2) + owner.SetConfused(45) if(egg_progress > egg_progress_per_hatch) egg_progress -= egg_progress_per_hatch diff --git a/icons/mob/terrorspider.dmi b/icons/mob/terrorspider.dmi index a01e3225d5a..08ebbc02aa5 100644 Binary files a/icons/mob/terrorspider.dmi and b/icons/mob/terrorspider.dmi differ