Merge pull request #6679 from Kyep/terrorspiders-PR5

Terror Spiders 5 - Fixes & Tweaks II
This commit is contained in:
Fox McCloud
2017-03-27 02:27:19 -04:00
committed by GitHub
11 changed files with 1364 additions and 1338 deletions
+2 -1
View File
@@ -536,7 +536,8 @@
for(var/mob/living/simple_animal/hostile/poison/terror_spider/S in ts_spiderlist)
if(S.ckey)
spider_minds += S.mind
dat += check_role_table("Terror Spiders", spider_minds)
if(spider_minds.len)
dat += check_role_table("Terror Spiders", spider_minds)
if(ticker.mode.ert.len)
dat += check_role_table("ERT", ticker.mode.ert)
@@ -90,6 +90,17 @@
var/mob/living/simple_animal/hostile/poison/terror_spider/queen/user = owner
user.QueenFakeLings()
// ---------- EMPRESS
/datum/action/innate/terrorspider/queen/empress/empresserase
name = "Erase Brood"
icon_icon = 'icons/effects/blood.dmi'
button_icon_state = "mgibbl1"
/datum/action/innate/terrorspider/queen/empress/empresserase/Activate()
var/mob/living/simple_animal/hostile/poison/terror_spider/queen/empress/user = owner
user.EraseBrood()
// ---------- WEB
/mob/living/simple_animal/hostile/poison/terror_spider/proc/Web(var/thick = 0)
@@ -109,6 +120,10 @@
W.creator_ckey = ckey
if(thick)
W.opacity = 1
W.name = "thick terror web"
if(web_infects)
W.infectious = 1
W.name = "sharp terror web"
/obj/effect/spider/terrorweb
name = "terror web"
@@ -119,6 +134,7 @@
health = 20 // two welders, or one laser shot (15 for the normal spider webs)
icon_state = "stickyweb1"
var/creator_ckey = null
var/infectious = 0
/obj/effect/spider/terrorweb/New()
..()
@@ -146,8 +162,14 @@
M.Weaken(4) // 8 seconds.
DeCloakNearby()
if(iscarbon(mover))
var/mob/living/carbon/C = mover
if(!IsTSInfected(C) && infectious)
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>")
new /obj/item/organ/internal/body_egg/terror_eggs(C)
spawn(70)
if(mover.loc == loc)
if(C.loc == loc)
qdel(src)
return 1
else
@@ -198,11 +220,12 @@
C.pixel_x = cocoon_target.pixel_x
C.pixel_y = cocoon_target.pixel_y
for(var/obj/O in C.loc)
if(istype(O, /obj/item))
O.loc = C
else if(istype(O, /obj/machinery) || istype(O, /obj/structure))
O.loc = C
large_cocoon = 1
if(!O.anchored)
if(istype(O, /obj/item))
O.loc = C
else if(istype(O, /obj/machinery) || istype(O, /obj/structure))
O.loc = C
large_cocoon = 1
for(var/mob/living/L in C.loc)
if(istype(L, /mob/living/simple_animal/hostile/poison/terror_spider))
continue
@@ -228,16 +251,17 @@
stop_automated_movement = 0
/mob/living/simple_animal/hostile/poison/terror_spider/proc/DoVentSmash()
for(var/obj/machinery/atmospherics/unary/vent_pump/P in view(1,src))
if(P.welded)
P.welded = 0
P.update_icon()
visible_message("<span class='danger'>[src] smashes the welded cover off [P]!</span>")
return
for(var/obj/machinery/atmospherics/unary/vent_scrubber/C in view(1,src))
if(C.welded)
C.welded = 0
C.update_icon()
visible_message("<span class='danger'>[src] smashes the welded cover off [C]!</span>")
return
to_chat(src, "<span class='danger'>There is no unwelded vent close enough to do this.</span>")
if(do_after(src, 40, target = loc))
for(var/obj/machinery/atmospherics/unary/vent_pump/P in view(1, src))
if(P.welded)
P.welded = 0
P.update_icon()
P.visible_message("<span class='danger'>[src] smashes the welded cover off [P]!</span>")
return
for(var/obj/machinery/atmospherics/unary/vent_scrubber/C in view(1, src))
if(C.welded)
C.welded = 0
C.update_icon()
C.visible_message("<span class='danger'>[src] smashes the welded cover off [C]!</span>")
return
to_chat(src, "<span class='danger'>There is no welded vent or scrubber close enough to do this.</span>")
@@ -31,16 +31,3 @@
M.EyeBlurry(6)
M.Paralyse(5)
..()
// Terror Spider, Queen Toxin
/datum/reagent/terror_queen_toxin
name = "Terror Queen venom"
id = "terror_queen_toxin"
description = "A royally potent venom."
color = "#CF3600"
metabolization_rate = 2
/datum/reagent/terror_queen_toxin/on_mob_life(mob/living/M)
// make them hallucinate a lot, like a changeling sting
M.AdjustHallucinate(50, bound_upper = 400)
@@ -24,9 +24,16 @@
rapid = 1
canlay = 1000
spider_tier = TS_TIER_5
projectiletype = /obj/item/projectile/terrorqueenspit/empress
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)
/mob/living/simple_animal/hostile/poison/terror_spider/queen/empress/New()
..()
empresserase_action = new()
empresserase_action.Grant(src)
/mob/living/simple_animal/hostile/poison/terror_spider/queen/empress/handle_automated_action()
return
@@ -88,5 +95,10 @@
qdel(T)
for(var/obj/effect/spider/spiderling/terror_spiderling/T in ts_spiderling_list)
T.stillborn = 1
to_chat(src, "<span class='userdanger'>Brood will die off shortly.</span>")
to_chat(src, "<span class='userdanger'>All Terror Spiders, except yourself, will die off shortly.</span>")
/obj/item/projectile/terrorqueenspit/empress
damage_type = BURN
damage = 30
bonus_tox = 0
@@ -30,7 +30,7 @@
var/lastnestsetup = 0
var/neststep = 0
var/hasnested = 0
var/spider_max_per_nest = 20 // above this, queen stops spawning more, and declares war.
var/spider_max_per_nest = 25 // above this, AI queens become stable
var/canlay = 4 // main counter for egg-laying ability! # = num uses, incremented at intervals
var/eggslaid = 0
var/spider_can_fakelings = 3 // spawns defective spiderlings that don't grow up, used to freak out crew, atmosphere
@@ -251,6 +251,8 @@
I.flicker()
/mob/living/simple_animal/hostile/poison/terror_spider/queen/proc/LayQueenEggs()
if(stat == DEAD)
return
if(!hasnested)
to_chat(src, "<span class='danger'>You must nest before doing this.</span>")
return
@@ -344,12 +346,13 @@
damage = 0
icon_state = "toxin"
damage_type = TOX
var/bonus_tox = 30
/obj/item/projectile/terrorqueenspit/on_hit(mob/living/carbon/target)
if(ismob(target))
var/mob/living/L = target
if(L.reagents)
if(L.can_inject(null, 0, "chest", 0))
L.reagents.add_reagent("terror_queen_toxin", 15)
L.Hallucinate(400)
if(!isterrorspider(L))
L.adjustToxLoss(30)
L.adjustToxLoss(bonus_tox)
@@ -54,6 +54,6 @@
if(health > (maxHealth/2))
enrage = 1
visible_message("<span class='notice'>[src] retracts its fangs a little.</span>")
melee_damage_lower = melee_damage_lower_rage0
melee_damage_upper = melee_damage_upper_rage0
melee_damage_lower = melee_damage_lower_rage1
melee_damage_upper = melee_damage_upper_rage1
..()
@@ -21,7 +21,7 @@
continue
if(iscarbon(H))
var/mob/living/carbon/C = H
if(IsInfected(C)) // only target the infected if they're attacking us. Even then, lowest priority.
if(IsTSInfected(C)) // only target the infected if they're attacking us. Even then, lowest priority.
if(C in enemies)
targets3 += C
continue
@@ -65,15 +65,13 @@
targets2 += H
else
targets3 += H
if(health < maxHealth)
// if we're hurt, and ONLY if we're hurt, do the additional check for mechs/space pods. Save processing time.
for(var/obj/mecha/M in view(src, vision_range))
if(get_dist(M, src) <= 2)
targets2 += M
else
targets3 += M
for(var/obj/spacepod/S in view(src, vision_range))
targets3 += S
for(var/obj/mecha/M in view(src, vision_range))
if(get_dist(M, src) <= 2)
targets2 += M
else
targets3 += M
for(var/obj/spacepod/S in view(src, vision_range))
targets3 += S
if(targets1.len)
return targets1
if(targets2.len)
@@ -140,7 +138,10 @@
last_spins_webs = world.time
var/obj/effect/spider/terrorweb/T = locate() in get_turf(src)
if(!T)
new /obj/effect/spider/terrorweb(get_turf(src))
var/obj/effect/spider/terrorweb/W = new /obj/effect/spider/terrorweb(loc)
if(web_infects)
W.infectious = 1
W.name = "sharp terror web"
visible_message("<span class='notice'>[src] puts up some spider webs.</span>")
else if(ai_ventcrawls && world.time > (last_ventcrawl_time + my_ventcrawl_freq))
if(prob(idle_ventcrawl_chance))
@@ -181,7 +182,6 @@
var/mob/living/M = A
if(!("terrorspiders" in M.faction))
enemies |= M
visible_message("<span class='danger'>[src] glares at [M]!</span>")
else if(istype(A, /obj/mecha))
var/obj/mecha/M = A
if(M.occupant)
@@ -211,7 +211,7 @@
if(m2 == mylocation)
chasecycles++
ClearObstacle(get_turf(mygoal))
if(chasecycles >= 2)
if(chasecycles >= 1)
chasecycles = 0
if(spider_opens_doors)
var/tgt_dir = get_dir(src,mygoal)
@@ -130,6 +130,7 @@ var/global/list/ts_spiderling_list = list()
var/spider_myqueen = null
var/mylocation = null
var/chasecycles = 0
var/web_infects = 0
var/datum/action/innate/terrorspider/web/web_action
var/datum/action/innate/terrorspider/wrap/wrap_action
@@ -263,7 +264,6 @@ var/global/list/ts_spiderling_list = list()
// these are static spiders, specifically for the UO71 away mission, make them stay in place
ai_ventcrawls = 0
spider_placed = 1
wander = 0
else
ts_count_alive_station++
// after 30 seconds, assuming nobody took control of it yet, offer it to ghosts.
@@ -22,6 +22,7 @@
move_to_delay = 4
spider_tier = TS_TIER_2
loot = list(/obj/item/clothing/accessory/medal)
web_infects = 1
/mob/living/simple_animal/hostile/poison/terror_spider/white/LoseTarget()
@@ -42,8 +43,8 @@
return
var/inject_target = pick("chest","head")
L.attack_animal(src)
if(L.stunned || L.paralysis || L.can_inject(null,0,inject_target,0))
if(!IsInfected(L))
if(L.stunned || L.paralysis || L.can_inject(null, 0, inject_target, 0))
if(!IsTSInfected(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)
@@ -54,7 +55,7 @@
L.Weaken(5)
L.Stun(5)
/mob/living/simple_animal/hostile/poison/terror_spider/proc/IsInfected(mob/living/carbon/C) // Terror AI requires this
/proc/IsTSInfected(mob/living/carbon/C) // Terror AI requires this
if(C.get_int_organ(/obj/item/organ/internal/body_egg))
return 1
return 0
+4 -4
View File
@@ -60,8 +60,8 @@
// the spider eggs secrete stimulants to keep their host alive until they hatch
switch(current_cycle)
if(1) // immediately
to_chat(owner,"<span class='danger'>Your spider bite wound hurts horribly! </span>")
if(istype(get_area(owner), /area/awaycontent) || istype(get_area(owner), /area/awaymission))
to_chat(owner,"<span class='danger'>Your wound hurts horribly! </span>")
if(is_away_level(owner.z))
awaymission_infection = 1
if(15) // 30s... enough time for the nerve agent to kick in, the pain to be blocked, and healing to begin
to_chat(owner,"<span class='notice'>The pain has faded, and stopped bleeding, though the skin around it has turned black.</span>")
@@ -76,7 +76,7 @@
if(110) // 3m40s...
to_chat(owner,"<span class='danger'>The black flesh splits open completely, revealing a cluster of small black oval shapes inside you, shapes that seem to be moving!</span>")
if(120) // 4m...
if(awaymission_infection && is_away_level(owner.z))
if(awaymission_infection && !is_away_level(owner.z))
// we started in the awaymission, we ended on the station.
// To prevent someone bringing an infection back, we're going to trigger an alternate, equally-bad result here.
// Actually, let's make it slightly worse... just to discourage people from bringing back infections.
@@ -108,7 +108,7 @@
owner.gib()
else
owner.adjustToxLoss(rand(100,180)) // normal case, range: 100-180, average 140, almost crit (150).
if(190) // 6m 30s
if(130) // 4m 20s
to_chat(owner,"<span class='danger'>The spiderlings are gone. Your wound, though, looks worse than ever. Remnants of tiny spider eggs, and dead spiders, inside your flesh. Disgusting.</span>")
qdel(src)