mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 02:24:11 +01:00
Merge remote-tracking branch 'upstream/master' into lavaland-udpate-split
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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, "<span class='danger'>You get stuck in [src] for a moment.</span>")
|
||||
M.Stun(4) // 8 seconds.
|
||||
M.Weaken(4) // 8 seconds.
|
||||
DeCloakNearby()
|
||||
if(iscarbon(mover))
|
||||
var/mob/living/carbon/C = mover
|
||||
web_special_ability(C)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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("<span class='danger'>[src] bites [target]!</span>")
|
||||
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("<span class='notice'>[src] hides in the vent.</span>")
|
||||
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("<span class='notice'>[src] finishes setting up its trap in [get_area(src)].</span>")
|
||||
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("<span class='notice'>[src] spins a web.</span>")
|
||||
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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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("<span class='danger'>[src] rams into [L], knocking [L.p_them()] to the floor!</span>")
|
||||
do_attack_animation(L)
|
||||
L.Weaken(5)
|
||||
L.Stun(5)
|
||||
else
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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("<span class='danger'>[src] smashes the [L.name].</span>")
|
||||
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 -----------------------------
|
||||
// --------------------------------------------------------------------------------
|
||||
|
||||
@@ -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++
|
||||
|
||||
@@ -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("<span class='danger'>[src] buries its long fangs deep into the [inject_target] of [L]!</span>")
|
||||
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, "<span class='danger'>[src] slices into you!</span>")
|
||||
|
||||
Reference in New Issue
Block a user