mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
Merge pull request #3858 from Fox-McCloud/changeling-headcrabs
Implements Changeling Headcrabs
This commit is contained in:
@@ -93,13 +93,18 @@
|
||||
#undef STOMACH_ATTACK_DELAY
|
||||
|
||||
/mob/living/carbon/gib()
|
||||
for(var/obj/item/organ/internal/I in internal_organs)
|
||||
if(isturf(loc))
|
||||
I.remove(src)
|
||||
I.forceMove(get_turf(src))
|
||||
spawn()
|
||||
I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),5)
|
||||
|
||||
for(var/mob/M in src)
|
||||
if(M in src.stomach_contents)
|
||||
src.stomach_contents.Remove(M)
|
||||
M.loc = src.loc
|
||||
for(var/mob/N in viewers(src, null))
|
||||
if(N.client)
|
||||
N.show_message(text("\red <B>[M] bursts out of [src]!</B>"), 2)
|
||||
M.forceMove(get_turf(src))
|
||||
visible_message("<span class='danger'>[M] bursts out of [src]!</span>")
|
||||
. = ..()
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
playsound(src.loc, 'sound/goonstation/effects/gib.ogg', 50, 1)
|
||||
|
||||
for(var/obj/item/organ/internal/I in internal_organs)
|
||||
if(istype(loc,/turf))
|
||||
if(isturf(loc))
|
||||
I.remove(src)
|
||||
I.forceMove(get_turf(src))
|
||||
spawn()
|
||||
@@ -28,6 +28,12 @@
|
||||
// Override the current limb status and don't cause an explosion
|
||||
E.droplimb(DROPLIMB_EDGE)
|
||||
|
||||
for(var/mob/M in src)
|
||||
if(M in stomach_contents)
|
||||
stomach_contents.Remove(M)
|
||||
M.forceMove(get_turf(src))
|
||||
visible_message("<span class='danger'>[M] bursts out of [src]!</span>")
|
||||
|
||||
if(!isSynthetic())
|
||||
flick("gibbed-h", animation)
|
||||
hgibs(loc, viruses, dna)
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
#define EGG_INCUBATION_TIME 120
|
||||
|
||||
/mob/living/simple_animal/hostile/headcrab
|
||||
name = "headslug"
|
||||
desc = "Absolutely not de-beaked or harmless. Keep away from corpses."
|
||||
icon_state = "headcrab"
|
||||
icon_living = "headcrab"
|
||||
icon_dead = "headcrab_dead"
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
health = 50
|
||||
maxHealth = 50
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 5
|
||||
attacktext = "chomps"
|
||||
attack_sound = 'sound/weapons/bite.ogg'
|
||||
faction = list("creature")
|
||||
robust_searching = 1
|
||||
stat_attack = 2
|
||||
environment_smash = 0
|
||||
speak_emote = list("squeaks")
|
||||
ventcrawler = 2
|
||||
var/datum/mind/origin
|
||||
var/egg_lain = 0
|
||||
|
||||
/mob/living/simple_animal/hostile/headcrab/proc/Infect(mob/living/carbon/victim)
|
||||
var/obj/item/organ/internal/body_egg/changeling_egg/egg = new(victim)
|
||||
egg.insert(victim)
|
||||
if(origin)
|
||||
egg.origin = origin
|
||||
else if(mind) // Let's make this a feature
|
||||
egg.origin = mind
|
||||
for(var/obj/item/organ/internal/I in src)
|
||||
I.loc = egg
|
||||
visible_message("<span class='warning'>[src] plants something in [victim]'s flesh!</span>", \
|
||||
"<span class='danger'>We inject our egg into [victim]'s body!</span>")
|
||||
egg_lain = 1
|
||||
|
||||
/mob/living/simple_animal/hostile/headcrab/AttackingTarget()
|
||||
if(egg_lain)
|
||||
target.attack_animal(src)
|
||||
return
|
||||
if(iscarbon(target) && !issmall(target))
|
||||
// Changeling egg can survive in aliens!
|
||||
var/mob/living/carbon/C = target
|
||||
if(C.stat == DEAD)
|
||||
if(C.status_flags & XENO_HOST)
|
||||
src << "<span class='userdanger'>A foreign presence repels us from this body. Perhaps we should try to infest another?</span>"
|
||||
return
|
||||
Infect(target)
|
||||
src << "<span class='userdanger'>With our egg laid, our death approaches rapidly...</span>"
|
||||
spawn(100)
|
||||
death()
|
||||
return
|
||||
target.attack_animal(src)
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/organ/internal/body_egg/changeling_egg
|
||||
name = "changeling egg"
|
||||
desc = "Twitching and disgusting."
|
||||
origin_tech = "biotech=7" // You need to be really lucky to obtain it.
|
||||
var/datum/mind/origin
|
||||
var/time
|
||||
|
||||
/obj/item/organ/internal/body_egg/changeling_egg/egg_process()
|
||||
// Changeling eggs grow in dead people
|
||||
time++
|
||||
if(time >= EGG_INCUBATION_TIME)
|
||||
Pop()
|
||||
remove(owner)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/organ/internal/body_egg/changeling_egg/proc/Pop()
|
||||
var/mob/living/carbon/human/monkey/M = new(owner)
|
||||
owner.stomach_contents += M
|
||||
|
||||
for(var/obj/item/organ/internal/I in src)
|
||||
I.insert(M, 1)
|
||||
|
||||
if(origin && origin.current && (origin.current.stat == DEAD))
|
||||
origin.transfer_to(M)
|
||||
if(origin.changeling)
|
||||
origin.changeling.purchasedpowers += new /obj/effect/proc_holder/changeling/humanform(null)
|
||||
M.key = origin.key
|
||||
owner.gib()
|
||||
|
||||
#undef EGG_INCUBATION_TIME
|
||||
Reference in New Issue
Block a user