mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 12:37:26 +01:00
Merge pull request #3858 from Fox-McCloud/changeling-headcrabs
Implements Changeling Headcrabs
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
/obj/effect/proc_holder/changeling/headcrab
|
||||
name = "Last Resort"
|
||||
desc = "We sacrifice our current body in a moment of need, placing us in control of a vessel."
|
||||
helptext = "We will be placed in control of a small, fragile creature. We may attack a corpse like this to plant an egg which will slowly mature into a new form for us."
|
||||
chemical_cost = 20
|
||||
dna_cost = 1
|
||||
req_human = 1
|
||||
|
||||
/obj/effect/proc_holder/changeling/headcrab/sting_action(mob/user)
|
||||
var/datum/mind/M = user.mind
|
||||
var/list/organs = user.get_organs_zone("head", 1)
|
||||
|
||||
for(var/obj/item/organ/internal/I in organs)
|
||||
I.remove(user, 1)
|
||||
|
||||
explosion(get_turf(user),0,0,2,0,silent=1)
|
||||
for(var/mob/living/carbon/human/H in range(2,user))
|
||||
H << "<span class='userdanger'>You are blinded by a shower of blood!</span>"
|
||||
H.Stun(1)
|
||||
H.eye_blurry = max(20, H.eye_blurry)
|
||||
var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes)
|
||||
if(istype(E))
|
||||
E.damage = max(E.damage+5, 0)
|
||||
H.confused += 3
|
||||
for(var/mob/living/silicon/S in range(2,user))
|
||||
S << "<span class='userdanger'>Your sensors are disabled by a shower of blood!</span>"
|
||||
S.Weaken(3)
|
||||
var/turf = get_turf(user)
|
||||
spawn(5) // So it's not killed in explosion
|
||||
var/mob/living/simple_animal/hostile/headcrab/crab = new(turf)
|
||||
for(var/obj/item/organ/internal/I in organs)
|
||||
I.loc = crab
|
||||
crab.origin = M
|
||||
if(crab.origin)
|
||||
crab.origin.active = 1
|
||||
crab.origin.transfer_to(crab)
|
||||
crab << "<span class='warning'>You burst out of the remains of your former body in a shower of gore!</span>"
|
||||
user.gib()
|
||||
feedback_add_details("changeling_powers","LR")
|
||||
return 1
|
||||
@@ -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