mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 15:45:25 +01:00
Merge branch 'master' into freegolemtweaks
This commit is contained in:
@@ -178,7 +178,7 @@ var/global/sent_strike_team = 0
|
||||
equip_to_slot_or_del(new /obj/item/flashlight(src), slot_in_backpack)
|
||||
equip_to_slot_or_del(new /obj/item/pinpointer(src), slot_in_backpack)
|
||||
if(is_leader)
|
||||
equip_to_slot_or_del(new /obj/item/disk/nuclear(src), slot_in_backpack)
|
||||
equip_to_slot_or_del(new /obj/item/disk/nuclear/unrestricted(src), slot_in_backpack)
|
||||
else
|
||||
equip_to_slot_or_del(new /obj/item/grenade/plastic/x4(src), slot_in_backpack)
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ var/global/sent_syndicate_strike_team = 0
|
||||
equip_to_slot_or_del(new /obj/item/grenade/plastic/x4(src), slot_in_backpack)
|
||||
if(is_leader)
|
||||
equip_to_slot_or_del(new /obj/item/pinpointer(src), slot_in_backpack)
|
||||
equip_to_slot_or_del(new /obj/item/disk/nuclear(src), slot_in_backpack)
|
||||
equip_to_slot_or_del(new /obj/item/disk/nuclear/unrestricted(src), slot_in_backpack)
|
||||
else
|
||||
equip_to_slot_or_del(new /obj/item/grenade/plastic/x4(src), slot_in_backpack)
|
||||
equip_to_slot_or_del(new /obj/item/card/emag(src), slot_r_store)
|
||||
|
||||
@@ -1476,6 +1476,13 @@
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
icon_state = "ssscratches_backpack"
|
||||
|
||||
/obj/item/storage/backpack/duffel/fluff/thebrew //Greey: Korala Ice
|
||||
name = "The Brew"
|
||||
desc = "Amber colored duffle bag resembling a long lost friend, a spirit long forgotten."
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
icon_state = "greeyfluff"
|
||||
item_state = "greeyfluff"
|
||||
|
||||
/obj/item/clothing/head/wizard/fake/fluff/dreamy //phantasmicdream : Dreamy Rockwall
|
||||
name = "strange witch hat"
|
||||
desc = "A shapeshifting witch hat. A strange aura comes from it..."
|
||||
|
||||
@@ -33,7 +33,9 @@
|
||||
SA.key = SG.key
|
||||
SA.universal_speak = 1
|
||||
SA.sentience_act()
|
||||
SA.maxHealth = max(SA.maxHealth, 200)
|
||||
SA.maxHealth = max(SA.maxHealth + 200)
|
||||
SA.melee_damage_lower = max(SA.melee_damage_lower + 15)
|
||||
SA.melee_damage_upper = max(SA.melee_damage_upper + 15)
|
||||
SA.health = SA.maxHealth
|
||||
SA.del_on_death = FALSE
|
||||
greet_sentient(SA)
|
||||
|
||||
@@ -36,9 +36,23 @@
|
||||
spider_type = /mob/living/simple_animal/hostile/poison/terror_spider/mother
|
||||
spawncount = 1
|
||||
while(spawncount >= 1 && vents.len)
|
||||
var/obj/vent = pick(vents)
|
||||
var/obj/structure/spider/spiderling/terror_spiderling/S = new(vent.loc)
|
||||
S.grow_as = spider_type
|
||||
S.amount_grown = 90
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/vent = pick(vents)
|
||||
|
||||
if(vent.welded)
|
||||
vents -= vent
|
||||
continue
|
||||
|
||||
// If the vent we picked has any living mob nearby, just remove it from the list, loop again, and pick something else.
|
||||
|
||||
var/turf/T = get_turf(vent)
|
||||
var/hostiles_present = FALSE
|
||||
for(var/mob/living/L in viewers(T))
|
||||
if(L.stat != DEAD)
|
||||
hostiles_present = TRUE
|
||||
break
|
||||
|
||||
vents -= vent
|
||||
spawncount--
|
||||
if(!hostiles_present)
|
||||
new spider_type(vent.loc)
|
||||
spawncount--
|
||||
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
var/obj/item/radio/radio = null // For use with the radio MMI upgrade
|
||||
var/datum/action/generic/configure_mmi_radio/radio_action = null
|
||||
|
||||
// Used for cases when mmi or one of it's children commits suicide.
|
||||
// Needed to fix a rather insane bug when a posibrain/robotic brain commits suicide
|
||||
var/dead_icon = "mmi_dead"
|
||||
|
||||
/obj/item/mmi/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
if(istype(O, /obj/item/organ/internal/brain/crystal))
|
||||
to_chat(user, "<span class='warning'> This brain is too malformed to be able to use with the [src].</span>")
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
if(!.)
|
||||
return FALSE
|
||||
if(!gibbed && container && istype(container, /obj/item/mmi))//If not gibbed but in a container.
|
||||
var/obj/item/mmi/mmi = container
|
||||
visible_message("<span class='danger'>[src]'s MMI flatlines!</span>", "<span class='warning'>You hear something flatline.</span>")
|
||||
container.icon_state = "mmi_dead"
|
||||
mmi.icon_state = mmi.dead_icon
|
||||
|
||||
/mob/living/carbon/brain/gib()
|
||||
// can we muster a parent call here?
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
var/mob/living/carbon/human/imprinted_master = null
|
||||
var/ejected_flavor_text = "circuit"
|
||||
|
||||
dead_icon = "boris_blank"
|
||||
|
||||
/obj/item/mmi/robotic_brain/Destroy()
|
||||
imprinted_master = null
|
||||
return ..()
|
||||
@@ -232,3 +234,4 @@
|
||||
silenced = TRUE
|
||||
requires_master = FALSE
|
||||
ejected_flavor_text = "metal cube"
|
||||
dead_icon = "posibrain"
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#define TS_DESC_PURPLE "Purple - Guard"
|
||||
#define TS_DESC_BROWN "Brown - Breacher"
|
||||
#define TS_DESC_PRINCE "Prince - WAR"
|
||||
#define TS_DESC_PRINCESS "Princess - HORDE"
|
||||
#define TS_DESC_MOTHER "Mother - HORROR"
|
||||
#define TS_DESC_QUEEN "Queen - LEADER"
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
/datum/action/innate/terrorspider/web/Activate()
|
||||
var/mob/living/simple_animal/hostile/poison/terror_spider/user = owner
|
||||
user.Web(0)
|
||||
user.Web()
|
||||
|
||||
/datum/action/innate/terrorspider/wrap
|
||||
name = "Wrap"
|
||||
@@ -30,16 +30,6 @@
|
||||
var/mob/living/simple_animal/hostile/poison/terror_spider/green/user = owner
|
||||
user.DoLayGreenEggs()
|
||||
|
||||
// ---------- PRINCE ACTIONS
|
||||
|
||||
/datum/action/innate/terrorspider/thickweb
|
||||
name = "Thick Web"
|
||||
icon_icon = 'icons/effects/effects.dmi'
|
||||
button_icon_state = "stickyweb2"
|
||||
|
||||
/datum/action/innate/terrorspider/thickweb/Activate()
|
||||
var/mob/living/simple_animal/hostile/poison/terror_spider/user = owner
|
||||
user.Web(1)
|
||||
|
||||
// ---------- BOSS ACTIONS
|
||||
|
||||
@@ -52,6 +42,28 @@
|
||||
var/mob/living/simple_animal/hostile/poison/terror_spider/user = owner
|
||||
user.DoVentSmash()
|
||||
|
||||
// ---------- PRINCESS ACTIONS
|
||||
|
||||
/datum/action/innate/terrorspider/evolvequeen
|
||||
name = "Evolve Queen"
|
||||
icon_icon = 'icons/mob/terrorspider.dmi'
|
||||
button_icon_state = "terror_queen"
|
||||
|
||||
/datum/action/innate/terrorspider/evolvequeen/Activate()
|
||||
var/mob/living/simple_animal/hostile/poison/terror_spider/princess/user = owner
|
||||
if(!istype(user))
|
||||
to_chat(user, "<span class='warning'>ERROR: attempt to use evolve queen ability on a non-princess</span>")
|
||||
return
|
||||
var/feedings_left = user.feedings_to_evolve - user.fed
|
||||
if(feedings_left > 0)
|
||||
to_chat(user, "<span class='warning'>You must wrap [feedings_left] more humanoid prey before you can do this!</span>")
|
||||
return
|
||||
for(var/mob/living/simple_animal/hostile/poison/terror_spider/queen/Q in ts_spiderlist)
|
||||
if(Q.spider_awaymission == user.spider_awaymission)
|
||||
to_chat(user, "<span class='warning'>The presence of another Queen in the area is preventing you from maturing.")
|
||||
return
|
||||
user.evolve_to_queen()
|
||||
|
||||
// ---------- QUEEN ACTIONS
|
||||
|
||||
/datum/action/innate/terrorspider/queen/queennest
|
||||
@@ -103,7 +115,9 @@
|
||||
|
||||
// ---------- WEB
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/proc/Web(var/thick = 0)
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/proc/Web()
|
||||
if(!web_type)
|
||||
return
|
||||
var/turf/mylocation = loc
|
||||
visible_message("<span class='notice'>[src] begins to secrete a sticky substance.</span>")
|
||||
if(do_after(src, delay_web, target = loc))
|
||||
@@ -116,15 +130,8 @@
|
||||
if(T)
|
||||
to_chat(src, "<span class='danger'>There is already a web here.</span>")
|
||||
else
|
||||
var/obj/structure/spider/terrorweb/W = new /obj/structure/spider/terrorweb(loc)
|
||||
var/obj/structure/spider/terrorweb/W = new web_type(loc)
|
||||
W.creator_ckey = ckey
|
||||
if(thick)
|
||||
W.opacity = 1
|
||||
W.name = "thick terror web"
|
||||
W.health = W.health * 2
|
||||
if(web_infects)
|
||||
W.infectious = 1
|
||||
W.name = "sharp terror web"
|
||||
|
||||
/obj/structure/spider/terrorweb
|
||||
name = "terror web"
|
||||
@@ -135,7 +142,6 @@
|
||||
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/structure/spider/terrorweb/New()
|
||||
..()
|
||||
@@ -164,11 +170,7 @@
|
||||
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)
|
||||
web_special_ability(C)
|
||||
spawn(70)
|
||||
if(C.loc == loc)
|
||||
qdel(src)
|
||||
@@ -186,6 +188,9 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/structure/spider/terrorweb/proc/web_special_ability(mob/living/carbon/C)
|
||||
return
|
||||
|
||||
// ---------- WRAP
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/proc/FindWrapTarget()
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
health = 120
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 10
|
||||
web_type = /obj/structure/spider/terrorweb/black
|
||||
stat_attack = 1 // ensures they will target people in crit, too!
|
||||
spider_tier = TS_TIER_2
|
||||
|
||||
@@ -42,4 +43,17 @@
|
||||
step_away(src, L)
|
||||
LoseTarget()
|
||||
step_away(src, L)
|
||||
visible_message("<span class='notice'>[src] jumps away from [L]!</span>")
|
||||
visible_message("<span class='notice'>[src] jumps away from [L]!</span>")
|
||||
|
||||
|
||||
/obj/structure/spider/terrorweb/black
|
||||
name = "sinister web"
|
||||
desc = "This web has beads of a dark fluid on its strands."
|
||||
|
||||
/obj/structure/spider/terrorweb/black/web_special_ability(mob/living/carbon/C)
|
||||
if(istype(C))
|
||||
if(!C.reagents.has_reagent("terror_black_toxin", 60))
|
||||
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>")
|
||||
C.reagents.add_reagent("terror_black_toxin", 30)
|
||||
@@ -26,6 +26,7 @@
|
||||
ai_ventbreaker = 1
|
||||
freq_ventcrawl_combat = 600 // Ventcrawls very frequently, breaking open vents as it goes.
|
||||
freq_ventcrawl_idle = 1800
|
||||
web_type = null
|
||||
var/datum/action/innate/terrorspider/ventsmash/ventsmash_action
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/brown/New()
|
||||
|
||||
@@ -42,30 +42,32 @@
|
||||
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_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)
|
||||
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>")
|
||||
return
|
||||
switch(eggtype)
|
||||
if(TS_DESC_RED)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/red,numlings,1)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/red, numlings)
|
||||
if(TS_DESC_GRAY)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/gray,numlings,1)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/gray, numlings)
|
||||
if(TS_DESC_GREEN)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/green,numlings,1)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/green, numlings)
|
||||
if(TS_DESC_BLACK)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/black,numlings,1)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/black, numlings)
|
||||
if(TS_DESC_PURPLE)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/purple,numlings,0)
|
||||
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,0)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/white, numlings)
|
||||
if(TS_DESC_PRINCE)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/prince,numlings,1)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/prince, numlings)
|
||||
if(TS_DESC_PRINCESS)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/princess, numlings)
|
||||
if(TS_DESC_MOTHER)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/mother,numlings,1)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/mother, numlings)
|
||||
if(TS_DESC_QUEEN)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/queen,numlings,1)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/queen, numlings)
|
||||
else
|
||||
to_chat(src, "<span class='danger'>Unrecognized egg type.</span>")
|
||||
|
||||
@@ -80,6 +82,7 @@
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/white, \
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/black)
|
||||
S.spider_myqueen = spider_myqueen
|
||||
S.spider_mymother = src
|
||||
if(prob(sbpc))
|
||||
S.stillborn = TRUE
|
||||
if(spider_growinstantly)
|
||||
@@ -93,7 +96,7 @@
|
||||
for(var/obj/structure/spider/eggcluster/terror_eggcluster/T in ts_egg_list)
|
||||
qdel(T)
|
||||
for(var/obj/structure/spider/spiderling/terror_spiderling/T in ts_spiderling_list)
|
||||
T.stillborn = TRUE
|
||||
qdel(T)
|
||||
to_chat(src, "<span class='userdanger'>All Terror Spiders, except yourself, will die off shortly.</span>")
|
||||
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
wander = 0 // wandering defeats the purpose of stealth
|
||||
idle_vision_range = 3 // very low idle vision range
|
||||
delay_web = 20 // double speed
|
||||
web_type = /obj/structure/spider/terrorweb/gray
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/gray/spider_specialattack(mob/living/carbon/human/L, poisonable)
|
||||
@@ -136,3 +137,8 @@
|
||||
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
|
||||
|
||||
/obj/structure/spider/terrorweb/gray
|
||||
alpha = 100
|
||||
name = "transparent web"
|
||||
desc = "This web is partly transparent, making it harder to see, and easier to get caught by."
|
||||
@@ -16,10 +16,11 @@
|
||||
icon_state = "terror_green"
|
||||
icon_living = "terror_green"
|
||||
icon_dead = "terror_green_dead"
|
||||
maxHealth = 120
|
||||
health = 120
|
||||
maxHealth = 150
|
||||
health = 150
|
||||
melee_damage_lower = 10
|
||||
melee_damage_upper = 20
|
||||
web_type = /obj/structure/spider/terrorweb/green
|
||||
var/feedings_to_lay = 2
|
||||
var/datum/action/innate/terrorspider/greeneggs/greeneggs_action
|
||||
|
||||
@@ -33,54 +34,46 @@
|
||||
var/obj/structure/spider/eggcluster/E = locate() in get_turf(src)
|
||||
if(E)
|
||||
to_chat(src, "<span class='notice'>There is already a cluster of eggs here!</span>")
|
||||
else if(fed < feedings_to_lay)
|
||||
return
|
||||
if(fed < feedings_to_lay)
|
||||
to_chat(src, "<span class='warning'>You must wrap more humanoid prey before you can do this!</span>")
|
||||
return
|
||||
var/list/eggtypes = list(TS_DESC_RED, TS_DESC_GRAY, TS_DESC_GREEN)
|
||||
var/num_brown = CountSpidersType(/mob/living/simple_animal/hostile/poison/terror_spider/brown)
|
||||
if(num_brown < 2)
|
||||
eggtypes += TS_DESC_BROWN
|
||||
var/num_black = CountSpidersType(/mob/living/simple_animal/hostile/poison/terror_spider/black)
|
||||
if(num_black < 2)
|
||||
eggtypes += TS_DESC_BLACK
|
||||
var/eggtype = pick(eggtypes)
|
||||
if(client)
|
||||
eggtype = input("What kind of eggs?") as null|anything in eggtypes
|
||||
if(!(eggtype in eggtypes))
|
||||
to_chat(src, "<span class='danger'>Unrecognized egg type.</span>")
|
||||
return 0
|
||||
visible_message("<span class='notice'>[src] lays a cluster of eggs.</span>")
|
||||
if(eggtype == TS_DESC_RED)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/red, 1)
|
||||
else if(eggtype == TS_DESC_GRAY)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/gray, 1)
|
||||
else if(eggtype == TS_DESC_GREEN)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/green, 1)
|
||||
else if(eggtype == TS_DESC_BLACK)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/black, 1)
|
||||
else if(eggtype == TS_DESC_BROWN)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/brown, 1)
|
||||
else
|
||||
visible_message("<span class='notice'>[src] begins to lay a cluster of eggs.</span>")
|
||||
if(prob(33))
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/red, 1, 1)
|
||||
else if(prob(50))
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/gray, 1, 1)
|
||||
else
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/green, 1, 1)
|
||||
fed -= feedings_to_lay
|
||||
to_chat(src, "<span class='warning'>Unrecognized egg type!</span>")
|
||||
fed += feedings_to_lay
|
||||
fed -= feedings_to_lay
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/green/spider_special_action()
|
||||
if(cocoon_target)
|
||||
if(get_dist(src, cocoon_target) <= 1)
|
||||
spider_steps_taken = 0
|
||||
DoWrap()
|
||||
else
|
||||
if(spider_steps_taken > spider_max_steps)
|
||||
spider_steps_taken = 0
|
||||
cocoon_target = null
|
||||
busy = 0
|
||||
stop_automated_movement = 0
|
||||
else
|
||||
spider_steps_taken++
|
||||
CreatePath(cocoon_target)
|
||||
step_to(src,cocoon_target)
|
||||
if(spider_debug)
|
||||
visible_message("<span class='notice'>[src] moves towards [cocoon_target] to cocoon it.</span>")
|
||||
handle_cocoon_target()
|
||||
else if(fed >= feedings_to_lay)
|
||||
DoLayGreenEggs()
|
||||
else if(world.time > (last_cocoon_object + freq_cocoon_object))
|
||||
last_cocoon_object = world.time
|
||||
var/list/can_see = view(src, 10)
|
||||
for(var/mob/living/C in can_see)
|
||||
if(C.stat == DEAD && !isterrorspider(C) && !C.anchored)
|
||||
spider_steps_taken = 0
|
||||
cocoon_target = C
|
||||
return
|
||||
for(var/obj/O in can_see)
|
||||
if(O.anchored)
|
||||
continue
|
||||
if(istype(O, /obj/item) || istype(O, /obj/structure) || istype(O, /obj/machinery))
|
||||
if(!istype(O, /obj/item/paper))
|
||||
cocoon_target = O
|
||||
stop_automated_movement = 1
|
||||
spider_steps_taken = 0
|
||||
return
|
||||
seek_cocoon_target()
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/green/spider_specialattack(mob/living/carbon/human/L, poisonable)
|
||||
if(!poisonable)
|
||||
@@ -94,4 +87,14 @@
|
||||
visible_message("<span class='danger'>[src] buries its fangs deep into the [inject_target] of [target]!</span>")
|
||||
else
|
||||
visible_message("<span class='danger'>[src] bites [target], but cannot inject venom into [target.p_their()] [inject_target]!</span>")
|
||||
L.attack_animal(src)
|
||||
L.attack_animal(src)
|
||||
|
||||
/obj/structure/spider/terrorweb/green
|
||||
name = "slimy web"
|
||||
desc = "This web is partly composed of strands of green slime."
|
||||
|
||||
/obj/structure/spider/terrorweb/green/web_special_ability(mob/living/carbon/C)
|
||||
if(istype(C))
|
||||
if(C.eye_blurry < 60)
|
||||
C.AdjustEyeBlurry(30)
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
desc = "An enormous spider. Hundreds of tiny spiderlings are crawling all over it. Their beady little eyes all stare at you. The horror!"
|
||||
spider_role_summary = "Schmuck bait. Extremely weak in combat, but spawns many spiderlings when it dies."
|
||||
ai_target_method = TS_DAMAGE_SIMPLE
|
||||
icon_state = "terror_gray2"
|
||||
icon_living = "terror_gray2"
|
||||
icon_dead = "terror_gray2_dead"
|
||||
icon_state = "terror_mother"
|
||||
icon_living = "terror_mother"
|
||||
icon_dead = "terror_mother_dead"
|
||||
maxHealth = 50
|
||||
health = 50
|
||||
melee_damage_lower = 10
|
||||
@@ -23,7 +23,10 @@
|
||||
idle_ventcrawl_chance = 5
|
||||
spider_tier = TS_TIER_3
|
||||
spider_opens_doors = 2
|
||||
var/canspawn = 1
|
||||
web_type = null
|
||||
var/canspawn = TRUE
|
||||
var/spawn_count = 30
|
||||
var/spawn_pc_stillborn = 50
|
||||
var/datum/action/innate/terrorspider/ventsmash/ventsmash_action
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/mother/New()
|
||||
@@ -33,24 +36,20 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/mother/death(gibbed)
|
||||
if(can_die())
|
||||
var/always_stillborn = FALSE
|
||||
if(spider_awaymission && !is_away_level(z))
|
||||
always_stillborn = TRUE
|
||||
canspawn = FALSE
|
||||
if(canspawn)
|
||||
canspawn = 0
|
||||
for(var/i in 0 to 30)
|
||||
canspawn = FALSE
|
||||
for(var/i in 0 to spawn_count)
|
||||
var/obj/structure/spider/spiderling/terror_spiderling/S = new /obj/structure/spider/spiderling/terror_spiderling(get_turf(src))
|
||||
S.grow_as = pick(/mob/living/simple_animal/hostile/poison/terror_spider/red, /mob/living/simple_animal/hostile/poison/terror_spider/gray)
|
||||
if(always_stillborn || prob(66))
|
||||
if(prob(spawn_pc_stillborn))
|
||||
S.stillborn = 1
|
||||
else if(prob(10))
|
||||
S.grow_as = pick(/mob/living/simple_animal/hostile/poison/terror_spider/black, /mob/living/simple_animal/hostile/poison/terror_spider/green)
|
||||
S.grow_as = pick(/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)
|
||||
S.amount_grown = 50 // double speed growth
|
||||
S.immediate_ventcrawl = 1
|
||||
visible_message("<span class='userdanger'>[src] breaks apart, the many spiders on its back scurrying everywhere!</span>")
|
||||
degenerate = 1
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/mother/Destroy()
|
||||
canspawn = 0
|
||||
canspawn = FALSE
|
||||
return ..()
|
||||
|
||||
@@ -27,12 +27,8 @@
|
||||
idle_ventcrawl_chance = 0
|
||||
spider_tier = TS_TIER_3
|
||||
spider_opens_doors = 2
|
||||
var/datum/action/innate/terrorspider/thickweb/thickweb_action
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/prince/New()
|
||||
..()
|
||||
thickweb_action = new()
|
||||
thickweb_action.Grant(src)
|
||||
web_type = /obj/structure/spider/terrorweb/purple
|
||||
ai_spins_webs = FALSE
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/prince/death(gibbed)
|
||||
if(can_die() && !hasdied && spider_uo71)
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
// ----------------- TERROR SPIDERS: T3 PRINCESS OF TERROR --------------------------
|
||||
// --------------------------------------------------------------------------------
|
||||
// -------------: ROLE: cutesy
|
||||
// -------------: AI: as green, but will evolve to queen when it can
|
||||
// -------------: SPECIAL: can evolve into a queen, if fed enough
|
||||
// -------------: TO FIGHT IT: kill it before it evolves
|
||||
// -------------: SPRITES FROM: FoS, http://nanotrasen.se/phpBB3/memberlist.php?mode=viewprofile&u=386
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/princess
|
||||
name = "Princess of Terror spider"
|
||||
desc = "An enormous spider. It looks strangely cute and fluffy."
|
||||
spider_role_summary = "Future Queen"
|
||||
ai_target_method = TS_DAMAGE_SIMPLE
|
||||
icon_state = "terror_princess1"
|
||||
icon_living = "terror_princess1"
|
||||
icon_dead = "terror_princess_dead1"
|
||||
maxHealth = 150
|
||||
health = 150
|
||||
regen_points_per_hp = 1 // always regens very fast
|
||||
force_threshold = 18 // outright immune to anything of force under 18, same as queen
|
||||
melee_damage_lower = 10
|
||||
melee_damage_upper = 20
|
||||
idle_ventcrawl_chance = 5
|
||||
spider_tier = TS_TIER_3
|
||||
spider_opens_doors = 2
|
||||
web_type = /obj/structure/spider/terrorweb/queen
|
||||
var/feedings_to_evolve = 3
|
||||
var/datum/action/innate/terrorspider/ventsmash/ventsmash_action
|
||||
var/datum/action/innate/terrorspider/evolvequeen/evolvequeen_action
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/princess/New()
|
||||
..()
|
||||
ventsmash_action = new()
|
||||
ventsmash_action.Grant(src)
|
||||
evolvequeen_action = new()
|
||||
evolvequeen_action.Grant(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/princess/proc/evolve_to_queen()
|
||||
change_mob_type(/mob/living/simple_animal/hostile/poison/terror_spider/queen, null, null, 1, 1)
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/princess/DoWrap()
|
||||
. = ..()
|
||||
if(fed == 0)
|
||||
icon_state = "terror_princess1"
|
||||
icon_living = "terror_princess1"
|
||||
icon_dead = "terror_princess_dead1"
|
||||
desc = "An enormous spider. It looks strangely cute and fluffy, with soft pink fur covering most of its body."
|
||||
else if(fed == 1)
|
||||
icon_state = "terror_princess2"
|
||||
icon_living = "terror_princess2"
|
||||
icon_dead = "terror_princess2_dead"
|
||||
desc = "An enormous spider. It used to look strangely cute and fluffy, but now the effect is spoiled by parts of its fur, which have turned an ominous blood red in color."
|
||||
else
|
||||
icon_state = "terror_princess3"
|
||||
icon_living = "terror_princess3"
|
||||
icon_dead = "terror_princess3_dead"
|
||||
desc = "An enormous spider. Its entire body has turned an ominous blood red color, with actual blood dripping from its jaws. It stares around, hungrily."
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/princess/spider_special_action()
|
||||
if(cocoon_target)
|
||||
handle_cocoon_target()
|
||||
else if(fed >= feedings_to_evolve)
|
||||
evolve_to_queen()
|
||||
else if(world.time > (last_cocoon_object + freq_cocoon_object))
|
||||
seek_cocoon_target()
|
||||
|
||||
@@ -28,15 +28,11 @@
|
||||
ai_ventcrawls = 0
|
||||
environment_smash = ENVIRONMENT_SMASH_RWALLS
|
||||
idle_ventcrawl_chance = 0 // stick to the queen!
|
||||
web_type = /obj/structure/spider/terrorweb/purple
|
||||
ai_spins_webs = FALSE
|
||||
var/dcheck_counter = 0
|
||||
var/queen_visible = 1
|
||||
var/cycles_noqueen = 0
|
||||
var/datum/action/innate/terrorspider/thickweb/thickweb_action
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/purple/New()
|
||||
..()
|
||||
thickweb_action = new()
|
||||
thickweb_action.Grant(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/purple/death(gibbed)
|
||||
if(can_die() && spider_myqueen)
|
||||
@@ -45,7 +41,7 @@
|
||||
if(get_dist(src,Q) > 20)
|
||||
if(!degenerate && !Q.degenerate)
|
||||
degenerate = 1
|
||||
Q.DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/purple,1,0)
|
||||
Q.DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/purple, 1)
|
||||
visible_message("<span class='notice'>[src] chitters in the direction of [Q]!</span>")
|
||||
return ..()
|
||||
|
||||
@@ -93,3 +89,9 @@
|
||||
to_chat(src,"<span class='userdanger'>Your link to your Queen has been broken! Your life force starts to drain away!</span>")
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 10
|
||||
|
||||
/obj/structure/spider/terrorweb/purple
|
||||
name = "thick web"
|
||||
desc = "This web is so thick, most cannot see beyond it."
|
||||
opacity = 1
|
||||
health = 40
|
||||
@@ -31,6 +31,7 @@
|
||||
projectiletype = /obj/item/projectile/terrorqueenspit
|
||||
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_lastspawn = 0
|
||||
@@ -155,7 +156,7 @@
|
||||
if(world.time > (lastnestsetup + nestfrequency))
|
||||
lastnestsetup = world.time
|
||||
spider_lastspawn = world.time
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/purple, 2, 0)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/purple, 2)
|
||||
neststep = 3
|
||||
if(3)
|
||||
// Create spiders (random T1 types) until nest is full.
|
||||
@@ -169,7 +170,7 @@
|
||||
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, 0)
|
||||
DoLayTerrorEggs(pick(spider_types_standard), 2)
|
||||
if(4)
|
||||
// Nest should be full. If so, pulse attack command. Otherwise, start replenishing nest (stage 5).
|
||||
if(world.time > (spider_lastspawn + spider_spawnfrequency))
|
||||
@@ -192,13 +193,13 @@
|
||||
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, 0)
|
||||
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, 0)
|
||||
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, 0)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/brown, 2)
|
||||
else
|
||||
DoLayTerrorEggs(pick(spider_types_standard), 2, 0)
|
||||
DoLayTerrorEggs(pick(spider_types_standard), 2)
|
||||
|
||||
/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")
|
||||
@@ -269,17 +270,17 @@
|
||||
else
|
||||
if(eggtype == TS_DESC_MOTHER)
|
||||
canlay -= 12
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/mother, 1, 0)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/mother, 1)
|
||||
else if(eggtype == TS_DESC_PRINCE)
|
||||
canlay -= 12
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/prince, 1, 0)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/prince, 1)
|
||||
return
|
||||
else if(eggtype == TS_DESC_BROWN)
|
||||
if(canlay < 4)
|
||||
to_chat(src, "<span class='danger'>Insufficient strength. It takes as much effort to lay one of those as it does to lay 4 normal eggs.</span>")
|
||||
else
|
||||
canlay -= 4
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/brown, 1, 0)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/brown, 1)
|
||||
return
|
||||
var/numlings = 1
|
||||
if(eggtype != TS_DESC_PURPLE)
|
||||
@@ -295,15 +296,15 @@
|
||||
canlay -= numlings
|
||||
eggslaid += numlings
|
||||
if(eggtype == TS_DESC_RED)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/red, numlings, 1)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/red, numlings)
|
||||
else if(eggtype == TS_DESC_GRAY)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/gray, numlings, 1)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/gray, numlings)
|
||||
else if(eggtype == TS_DESC_GREEN)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/green, numlings, 1)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/green, numlings)
|
||||
else if(eggtype == TS_DESC_BLACK)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/black, numlings, 1)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/black, numlings)
|
||||
else if(eggtype == TS_DESC_PURPLE)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/purple, numlings, 0)
|
||||
DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/purple, numlings)
|
||||
else
|
||||
to_chat(src, "<span class='danger'>Unrecognized egg type.</span>")
|
||||
|
||||
@@ -322,11 +323,12 @@
|
||||
return
|
||||
if(spider_can_fakelings)
|
||||
spider_can_fakelings--
|
||||
var/numlings = 15
|
||||
var/numlings = 25
|
||||
for(var/i in 1 to numlings)
|
||||
var/obj/structure/spider/spiderling/terror_spiderling/S = new /obj/structure/spider/spiderling/terror_spiderling(get_turf(src))
|
||||
S.grow_as = /mob/living/simple_animal/hostile/poison/terror_spider/red
|
||||
S.stillborn = 1
|
||||
S.spider_mymother = src
|
||||
if(!spider_can_fakelings)
|
||||
queenfakelings_action.Remove(src)
|
||||
else
|
||||
@@ -347,3 +349,14 @@
|
||||
L.Hallucinate(400)
|
||||
if(!isterrorspider(L))
|
||||
L.adjustToxLoss(bonus_tox)
|
||||
|
||||
/obj/structure/spider/terrorweb/queen
|
||||
name = "shimmering web"
|
||||
desc = "This web seems to shimmer all different colors in the light."
|
||||
|
||||
/obj/structure/spider/terrorweb/queen/web_special_ability(mob/living/carbon/C)
|
||||
if(istype(C))
|
||||
var/inject_target = pick("chest","head")
|
||||
if(C.can_inject(null, 0, inject_target, 0))
|
||||
C.Hallucinate(400)
|
||||
C.adjustToxLoss(30)
|
||||
@@ -24,6 +24,7 @@
|
||||
move_to_delay = 10 // at 20ticks/sec, this is 2 tile/sec movespeed
|
||||
speed = 2 // movement_delay() gives 4.5, or 0.45s between steps, which = about 2.2 tiles/second. Player is slightly faster than AI, but cannot move on diagonals.
|
||||
spider_opens_doors = 2
|
||||
web_type = /obj/structure/spider/terrorweb/red
|
||||
var/enrage = 0
|
||||
var/melee_damage_lower_rage0 = 15
|
||||
var/melee_damage_upper_rage0 = 20
|
||||
@@ -57,4 +58,10 @@
|
||||
visible_message("<span class='notice'>[src] retracts its fangs a little.</span>")
|
||||
melee_damage_lower = melee_damage_lower_rage1
|
||||
melee_damage_upper = melee_damage_upper_rage1
|
||||
..()
|
||||
..()
|
||||
|
||||
|
||||
/obj/structure/spider/terrorweb/red
|
||||
health = 30
|
||||
name = "reinforced web"
|
||||
desc = "This web is reinforced with extra strands, for added strength."
|
||||
|
||||
@@ -13,10 +13,14 @@
|
||||
var/stillborn = FALSE
|
||||
faction = list("terrorspiders")
|
||||
var/spider_myqueen = null
|
||||
var/use_vents = 1
|
||||
var/spider_mymother = null
|
||||
var/goto_mother = FALSE
|
||||
var/ventcrawl_chance = 30 // 30% every process(), assuming 33% wander does not trigger
|
||||
var/immediate_ventcrawl = TRUE
|
||||
var/list/enemies = list()
|
||||
var/immediate_ventcrawl = 0
|
||||
var/spider_awaymission = FALSE
|
||||
var/frustration = 0
|
||||
var/debug_ai_choices = FALSE
|
||||
|
||||
/obj/structure/spider/spiderling/terror_spiderling/New()
|
||||
..()
|
||||
@@ -35,6 +39,48 @@
|
||||
qdel(src)
|
||||
. = ..()
|
||||
|
||||
|
||||
/obj/structure/spider/spiderling/terror_spiderling/die()
|
||||
for(var/obj/structure/spider/spiderling/terror_spiderling/S in view(7, src))
|
||||
S.immediate_ventcrawl = TRUE
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/spiderling/terror_spiderling/proc/score_surroundings(atom/A = src)
|
||||
var/safety_score = 0
|
||||
var/turf/T = get_turf(A)
|
||||
for(var/mob/living/L in viewers(T))
|
||||
if(isterrorspider(L))
|
||||
if(L.stat == DEAD)
|
||||
safety_score--
|
||||
else
|
||||
safety_score++
|
||||
if(spider_mymother && L == spider_mymother)
|
||||
safety_score++
|
||||
else if(L.stat != DEAD)
|
||||
safety_score--
|
||||
if(debug_ai_choices)
|
||||
debug_visual(T, safety_score, A)
|
||||
return safety_score
|
||||
|
||||
/obj/structure/spider/spiderling/terror_spiderling/proc/debug_visual(turf/T, score, atom/A)
|
||||
// This proc exists to help debug why spiderlings are making the ventcrawl AI choices they do.
|
||||
// It won't be called unless you set the spiderling's debug_ai_choices to true.
|
||||
if(debug_ai_choices && istype(T))
|
||||
if(A == src)
|
||||
if(score > 0)
|
||||
new /obj/effect/temp_visual/heart(T) // heart symbol, I am safe here, protected by a friendly spider
|
||||
else if (score == 0)
|
||||
new /obj/effect/temp_visual/heal(T) // white "+" symbol, I am neutral here
|
||||
else
|
||||
new /obj/effect/temp_visual/at_shield(T) // octagon symbol, I am unsafe here, I need to flee
|
||||
else
|
||||
if(score > 0)
|
||||
new /obj/effect/temp_visual/telekinesis(T) // blue sparks, this is a safe area, I want to go here
|
||||
else if (score == 0)
|
||||
new /obj/effect/temp_visual/revenant(T) // purple sparks, this is a neutral area, an acceptable choice
|
||||
else
|
||||
new /obj/effect/temp_visual/cult/sparks(T) // red sparks, this is an unsafe area, I won't go here unless fleeing something worse
|
||||
|
||||
/obj/structure/spider/spiderling/terror_spiderling/process()
|
||||
if(travelling_in_vent)
|
||||
if(isturf(loc))
|
||||
@@ -42,6 +88,7 @@
|
||||
entry_vent = null
|
||||
else if(entry_vent)
|
||||
if(get_dist(src, entry_vent) <= 1)
|
||||
frustration = 0
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in entry_vent.parent.other_atmosmch)
|
||||
vents.Add(temp_vent)
|
||||
@@ -49,8 +96,22 @@
|
||||
entry_vent = null
|
||||
return
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/exit_vent = pick(vents)
|
||||
if(prob(50))
|
||||
visible_message("<B>[src] scrambles into the ventillation ducts!</B>", "<span class='notice'>You hear something squeezing through the ventilation ducts.</span>")
|
||||
if(spider_mymother && (goto_mother || prob(10)))
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in view(5, spider_mymother))
|
||||
if(!v.welded)
|
||||
exit_vent = v
|
||||
goto_mother = FALSE
|
||||
if(!stillborn)
|
||||
var/current_safety_score = score_surroundings(src)
|
||||
var/new_safety_score = score_surroundings(exit_vent)
|
||||
if(new_safety_score < current_safety_score)
|
||||
// Try to find an alternative.
|
||||
exit_vent = pick(vents)
|
||||
new_safety_score = score_surroundings(exit_vent)
|
||||
if(new_safety_score < current_safety_score)
|
||||
// No alternative safe vent could be found. Abort.
|
||||
entry_vent = null
|
||||
return
|
||||
var/original_location = loc
|
||||
spawn(rand(20,60))
|
||||
forceMove(exit_vent)
|
||||
@@ -72,14 +133,24 @@
|
||||
var/area/new_area = get_area(loc)
|
||||
if(new_area)
|
||||
new_area.Entered(src)
|
||||
else
|
||||
frustration++
|
||||
walk_to(src, entry_vent, 1)
|
||||
if(frustration > 2)
|
||||
entry_vent = null
|
||||
else if(prob(33))
|
||||
var/list/nearby = oview(10, src)
|
||||
if(nearby.len)
|
||||
var/target_atom = pick(nearby)
|
||||
if(!istype(get_turf(target_atom),/turf/space))
|
||||
walk_to(src, target_atom)
|
||||
else if(immediate_ventcrawl || (prob(10) && use_vents))
|
||||
immediate_ventcrawl = 0
|
||||
else if(immediate_ventcrawl || prob(ventcrawl_chance))
|
||||
immediate_ventcrawl = FALSE
|
||||
if(!stillborn && !goto_mother)
|
||||
var/safety_score = score_surroundings(src)
|
||||
if(safety_score > 0)
|
||||
// This area seems safe (friendly spiders present). Do not leave this area.
|
||||
return
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in view(7,src))
|
||||
if(!v.welded)
|
||||
entry_vent = v
|
||||
@@ -91,29 +162,33 @@
|
||||
if(spider_awaymission && !is_away_level(z))
|
||||
stillborn = TRUE
|
||||
if(stillborn)
|
||||
die()
|
||||
if(amount_grown >= 300)
|
||||
// Fake spiderlings stick around for awhile, just to be spooky.
|
||||
die()
|
||||
else
|
||||
if(!grow_as)
|
||||
grow_as = pick(/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/mob/living/simple_animal/hostile/poison/terror_spider/S = new grow_as(loc)
|
||||
S.faction = faction
|
||||
S.spider_myqueen = spider_myqueen
|
||||
S.spider_mymother = spider_mymother
|
||||
S.master_commander = master_commander
|
||||
S.enemies = enemies
|
||||
qdel(src)
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
// ----------------- TERROR SPIDERS: EGGS (USED BY NURSE AND QUEEN TYPES) ---------
|
||||
// --------------------------------------------------------------------------------
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/proc/DoLayTerrorEggs(lay_type, lay_number, lay_crawl)
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/proc/DoLayTerrorEggs(lay_type, lay_number)
|
||||
stop_automated_movement = 1
|
||||
var/obj/structure/spider/eggcluster/terror_eggcluster/C = new /obj/structure/spider/eggcluster/terror_eggcluster(get_turf(src))
|
||||
C.spiderling_type = lay_type
|
||||
C.spiderling_number = lay_number
|
||||
C.spiderling_ventcrawl = lay_crawl
|
||||
C.faction = faction
|
||||
C.spider_myqueen = spider_myqueen
|
||||
C.spider_mymother = src
|
||||
C.master_commander = master_commander
|
||||
C.enemies = enemies
|
||||
if(spider_growinstantly)
|
||||
@@ -129,9 +204,9 @@
|
||||
var/spider_growinstantly = 0
|
||||
faction = list("terrorspiders")
|
||||
var/spider_myqueen = null
|
||||
var/spider_mymother = null
|
||||
var/spiderling_type = null
|
||||
var/spiderling_number = 1
|
||||
var/spiderling_ventcrawl = 1
|
||||
var/list/enemies = list()
|
||||
|
||||
/obj/structure/spider/eggcluster/terror_eggcluster/New()
|
||||
@@ -169,16 +244,11 @@
|
||||
var/obj/structure/spider/spiderling/terror_spiderling/S = new /obj/structure/spider/spiderling/terror_spiderling(get_turf(src))
|
||||
if(spiderling_type)
|
||||
S.grow_as = spiderling_type
|
||||
S.use_vents = spiderling_ventcrawl
|
||||
S.faction = faction
|
||||
S.spider_myqueen = spider_myqueen
|
||||
S.spider_mymother = spider_mymother
|
||||
S.master_commander = master_commander
|
||||
S.enemies = enemies
|
||||
if(spider_growinstantly)
|
||||
S.amount_grown = 250
|
||||
var/rnum = 5 - spiderling_number
|
||||
for(var/i=0, i<rnum, i++)
|
||||
var/obj/structure/spider/spiderling/terror_spiderling/S = new /obj/structure/spider/spiderling/terror_spiderling(get_turf(src))
|
||||
S.stillborn = TRUE
|
||||
// every set of eggs always spawn 5 spiderlings, but most are decoys
|
||||
qdel(src)
|
||||
@@ -134,14 +134,11 @@
|
||||
L.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[src] smashes the [L.name].</span>")
|
||||
break
|
||||
else if(ai_spins_webs && world.time > (last_spins_webs + freq_spins_webs))
|
||||
else if(web_type && ai_spins_webs && 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)
|
||||
var/obj/structure/spider/terrorweb/W = new /obj/structure/spider/terrorweb(loc)
|
||||
if(web_infects)
|
||||
W.infectious = 1
|
||||
W.name = "sharp terror web"
|
||||
new web_type(loc)
|
||||
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))
|
||||
@@ -202,6 +199,42 @@
|
||||
H.enemies |= enemies
|
||||
return 0
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/proc/handle_cocoon_target()
|
||||
if(cocoon_target)
|
||||
if(get_dist(src, cocoon_target) <= 1)
|
||||
spider_steps_taken = 0
|
||||
DoWrap()
|
||||
else
|
||||
if(spider_steps_taken > spider_max_steps)
|
||||
spider_steps_taken = 0
|
||||
cocoon_target = null
|
||||
busy = 0
|
||||
stop_automated_movement = 0
|
||||
else
|
||||
spider_steps_taken++
|
||||
CreatePath(cocoon_target)
|
||||
step_to(src,cocoon_target)
|
||||
if(spider_debug)
|
||||
visible_message("<span class='notice'>[src] moves towards [cocoon_target] to cocoon it.</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/proc/seek_cocoon_target()
|
||||
last_cocoon_object = world.time
|
||||
var/list/can_see = view(src, 10)
|
||||
for(var/mob/living/C in can_see)
|
||||
if(C.stat == DEAD && !isterrorspider(C) && !C.anchored)
|
||||
spider_steps_taken = 0
|
||||
cocoon_target = C
|
||||
return
|
||||
for(var/obj/O in can_see)
|
||||
if(O.anchored)
|
||||
continue
|
||||
if(istype(O, /obj/item) || istype(O, /obj/structure) || istype(O, /obj/machinery))
|
||||
if(!istype(O, /obj/item/paper))
|
||||
cocoon_target = O
|
||||
stop_automated_movement = 1
|
||||
spider_steps_taken = 0
|
||||
return
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
// --------------------- TERROR SPIDERS: PATHING CODE -----------------------------
|
||||
// --------------------------------------------------------------------------------
|
||||
|
||||
@@ -34,6 +34,7 @@ var/global/list/ts_spiderling_list = list()
|
||||
attacktext = "bites"
|
||||
attack_sound = 'sound/weapons/bite.ogg'
|
||||
poison_type = "" // we do not use that silly system.
|
||||
a_intent = INTENT_HARM
|
||||
|
||||
// Movement
|
||||
pass_flags = PASSTABLE
|
||||
@@ -142,11 +143,13 @@ var/global/list/ts_spiderling_list = list()
|
||||
var/attackstep = 0
|
||||
var/attackcycles = 0
|
||||
var/spider_myqueen = null
|
||||
var/spider_mymother = null
|
||||
var/mylocation = null
|
||||
var/chasecycles = 0
|
||||
var/web_infects = 0
|
||||
|
||||
var/datum/action/innate/terrorspider/web/web_action
|
||||
var/web_type = /obj/structure/spider/terrorweb
|
||||
var/datum/action/innate/terrorspider/wrap/wrap_action
|
||||
|
||||
// Breathing - require some oxygen, and no toxins, but take little damage from this requirement not being met (they can hold their breath)
|
||||
@@ -254,8 +257,9 @@ var/global/list/ts_spiderling_list = list()
|
||||
add_language("Galactic Common")
|
||||
default_language = GLOB.all_languages["Spider Hivemind"]
|
||||
|
||||
web_action = new()
|
||||
web_action.Grant(src)
|
||||
if(web_type)
|
||||
web_action = new()
|
||||
web_action.Grant(src)
|
||||
wrap_action = new()
|
||||
wrap_action.Grant(src)
|
||||
|
||||
@@ -275,9 +279,9 @@ var/global/list/ts_spiderling_list = list()
|
||||
spider_placed = 1
|
||||
else
|
||||
ts_count_alive_station++
|
||||
// after 30 seconds, assuming nobody took control of it yet, offer it to ghosts.
|
||||
addtimer(CALLBACK(src, .proc/CheckFaction), 150)
|
||||
addtimer(CALLBACK(src, .proc/announcetoghosts), 300)
|
||||
// after 3 seconds, assuming nobody took control of it yet, offer it to ghosts.
|
||||
addtimer(CALLBACK(src, .proc/CheckFaction), 20)
|
||||
addtimer(CALLBACK(src, .proc/announcetoghosts), 30)
|
||||
var/datum/atom_hud/U = huds[DATA_HUD_MEDICAL_ADVANCED]
|
||||
U.add_hud_to(src)
|
||||
|
||||
@@ -360,9 +364,9 @@ var/global/list/ts_spiderling_list = list()
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/proc/CheckFaction()
|
||||
if(faction.len != 1 || (!("terrorspiders" in faction)) || master_commander != null)
|
||||
visible_message("<span class='danger'>[src] writhes in pain!</span>")
|
||||
log_runtime(EXCEPTION("Terror spider created with incorrect faction list at: [atom_loc_line(src)]"))
|
||||
death()
|
||||
to_chat(src, "<span class='userdanger'>Your connection to the hive mind has been severed!</span>")
|
||||
log_runtime(EXCEPTION("Terror spider with incorrect faction list at: [atom_loc_line(src)]"))
|
||||
gib()
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/proc/try_open_airlock(obj/machinery/door/airlock/D)
|
||||
if(D.operating)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 15
|
||||
spider_tier = TS_TIER_2
|
||||
web_infects = 1
|
||||
web_type = /obj/structure/spider/terrorweb/white
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/white/LoseTarget()
|
||||
@@ -56,3 +56,16 @@
|
||||
if(C.get_int_organ(/obj/item/organ/internal/body_egg))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/structure/spider/terrorweb/white
|
||||
name = "infested web"
|
||||
desc = "This web is covered in hundreds of tiny, biting spiders - and their eggs."
|
||||
|
||||
/obj/structure/spider/terrorweb/white/web_special_ability(mob/living/carbon/C)
|
||||
if(istype(C))
|
||||
if(!IsTSInfected(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>")
|
||||
new /obj/item/organ/internal/body_egg/terror_eggs(C)
|
||||
@@ -125,6 +125,8 @@
|
||||
CreateDoor(T)
|
||||
else if(istype(target, /obj/machinery/door))
|
||||
OpenDoor(target)
|
||||
else if(istype(target, /obj/structure/closet))
|
||||
OpenCloset(target)
|
||||
|
||||
/obj/item/projectile/magic/door/proc/CreateDoor(turf/T)
|
||||
var/door_type = pick(door_types)
|
||||
@@ -135,9 +137,15 @@
|
||||
/obj/item/projectile/magic/door/proc/OpenDoor(var/obj/machinery/door/D)
|
||||
if(istype(D,/obj/machinery/door/airlock))
|
||||
var/obj/machinery/door/airlock/A = D
|
||||
A.locked = 0
|
||||
A.locked = FALSE
|
||||
D.open()
|
||||
|
||||
/obj/item/projectile/magic/door/proc/OpenCloset(var/obj/structure/closet/C)
|
||||
if(istype(C, /obj/structure/closet/secure_closet))
|
||||
var/obj/structure/closet/secure_closet/SC = C
|
||||
SC.locked = FALSE
|
||||
C.open()
|
||||
|
||||
/obj/item/projectile/magic/change
|
||||
name = "bolt of change"
|
||||
icon_state = "ice_1"
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
to_chat(owner,"<span class='notice'>The pain has faded, and stopped bleeding, though the skin around it has turned black.</span>")
|
||||
owner.adjustBruteLoss(-10)
|
||||
if(30) // 1m... the point where the venom uses and accellerates the healing process, to feed the eggs
|
||||
to_chat(owner,"<span class='notice'>Your bite wound has completely sealed up, though the skin is still black. You feel significantly better.</span>")
|
||||
to_chat(owner,"<span class='notice'>Your wound has completely sealed up, though the skin is still black. You feel significantly better.</span>")
|
||||
owner.adjustBruteLoss(-20)
|
||||
if(90) // 3m... where the eggs are developing, and the wound is turning into a hatching site, but invisibly
|
||||
to_chat(owner,"<span class='notice'>The black flesh around your old spider bite wound has started to peel off.</span>")
|
||||
@@ -87,28 +87,22 @@
|
||||
owner.Stun(20)
|
||||
owner.Weaken(20)
|
||||
// yes, this is a long stun - that's intentional. Gotta give the spiderlings time to escape.
|
||||
var/obj/structure/spider/spiderling/terror_spiderling/S1 = new(get_turf(owner))
|
||||
S1.grow_as = /mob/living/simple_animal/hostile/poison/terror_spider/red
|
||||
S1.name = "red spiderling"
|
||||
if(prob(50))
|
||||
S1.stillborn = 1
|
||||
var/obj/structure/spider/spiderling/terror_spiderling/S2 = new(get_turf(owner))
|
||||
S2.grow_as = /mob/living/simple_animal/hostile/poison/terror_spider/gray
|
||||
S2.name = "gray spiderling"
|
||||
if(prob(50))
|
||||
S2.stillborn = 1
|
||||
var/obj/structure/spider/spiderling/terror_spiderling/S3 = new(get_turf(owner))
|
||||
S3.grow_as = /mob/living/simple_animal/hostile/poison/terror_spider/green
|
||||
S3.name = "green spiderling"
|
||||
if(prob(50))
|
||||
S3.stillborn = 1
|
||||
if(alternate_ending)
|
||||
S1.stillborn = 1
|
||||
S2.stillborn = 1
|
||||
S3.stillborn = 1
|
||||
owner.gib()
|
||||
else
|
||||
owner.adjustToxLoss(rand(100,180)) // normal case, range: 100-180, average 140, almost crit (150).
|
||||
if(prob(50))
|
||||
var/obj/structure/spider/spiderling/terror_spiderling/S1 = new(get_turf(owner))
|
||||
S1.grow_as = /mob/living/simple_animal/hostile/poison/terror_spider/red
|
||||
S1.name = "red spiderling"
|
||||
if(prob(50))
|
||||
var/obj/structure/spider/spiderling/terror_spiderling/S2 = new(get_turf(owner))
|
||||
S2.grow_as = /mob/living/simple_animal/hostile/poison/terror_spider/gray
|
||||
S2.name = "gray spiderling"
|
||||
if(prob(50))
|
||||
var/obj/structure/spider/spiderling/terror_spiderling/S3 = new(get_turf(owner))
|
||||
S3.grow_as = /mob/living/simple_animal/hostile/poison/terror_spider/green
|
||||
S3.name = "green spiderling"
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user