Files
2016-03-06 20:52:14 +01:00

38 lines
773 B
Plaintext

/obj/alien/egg
desc = "It looks like a weird egg"
name = "egg"
icon_state = "egg"
layer = MOB_LAYER
density = 1
anchored = 1
var/health = 25
New()
spawn(900)
if(src.health > 0)
src.open()
proc/open()
spawn(10)
src.density = 0
src.icon_state = "egg_hatched"
new /obj/alien/facehugger(src.loc)
attackby(obj/item/W as obj, mob/user as mob)
if (src.health <= 0)
src.visible_message("<span style=\"color:red\"><B>[user] has destroyed the egg!</B></span>")
src.death()
return
switch(W.damtype)
if("fire")
src.health -= W.force * 0.75
if("brute")
src.health -= W.force * 0.1
else
..()
proc/death()
src.icon_state = "egg_destroyed" //need an icon for this
src.density = 0