Works on New Blob

This commit is contained in:
Neerti
2017-11-29 22:35:01 -05:00
parent 50d3710cbf
commit acb208dd3f
54 changed files with 1947 additions and 38 deletions
+57
View File
@@ -0,0 +1,57 @@
////////////////
// BASE TYPE //
////////////////
//Do not spawn
/mob/living/simple_animal/hostile/blob
icon = 'icons/mob/blob.dmi'
pass_flags = PASSBLOB | PASSTABLE
faction = "blob"
// bubble_icon = "blob"
// speak_emote = null //so we use verb_yell/verb_say/etc
// 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)
// minbodytemp = 0
// maxbodytemp = 360
// unique_name = 1
// a_intent = INTENT_HARM
cooperative = TRUE
heat_damage_per_tick = 0
cold_damage_per_tick = 0
min_oxy = 0
max_tox = 0
max_co2 = 0
var/mob/observer/blob/overmind = null
var/obj/structure/blob/factory/factory = null
/mob/living/simple_animal/hostile/blob/speech_bubble_appearance()
return "slime"
/mob/living/simple_animal/hostile/blob/update_icons()
if(overmind)
color = overmind.blob_type.complementary_color
else
color = null
/mob/living/simple_animal/hostile/blob/Destroy()
if(overmind)
overmind.blob_mobs -= src
return ..()
/mob/living/simple_animal/hostile/blob/blob_act(obj/structure/blob/B)
if(!overmind && B.overmind)
overmind = B.overmind
update_icon()
if(stat != DEAD && health < maxHealth)
adjustBruteLoss(-maxHealth*0.0125)
adjustFireLoss(-maxHealth*0.0125)
/mob/living/simple_animal/hostile/blob/CanPass(atom/movable/mover, turf/target)
if(istype(mover, /obj/structure/blob)) // Don't block blobs from expanding onto a tile occupied by a blob mob.
return TRUE
return ..()
/mob/living/simple_animal/hostile/blob/Process_Spacemove()
for(var/obj/structure/blob/B in range(1, src))
return TRUE
return ..()
+110
View File
@@ -0,0 +1,110 @@
////////////////
// BLOB SPORE //
////////////////
/mob/living/simple_animal/hostile/blob/spore
name = "blob spore"
desc = "A floating, fragile spore."
icon_state = "blobpod"
icon_living = "blobpod"
health = 30
maxHealth = 30
melee_damage_lower = 2
melee_damage_upper = 4
layer = MOB_LAYER + 0.2 // Over the blob.
attacktext = "slams into"
attack_sound = 'sound/effects/slime_squish.ogg'
emote_see = list("sways", "inflates briefly")
var/mob/living/carbon/human/infested = null // The human this thing is totally not making into a zombie.
var/can_infest = FALSE
var/is_infesting = FALSE
/mob/living/simple_animal/hostile/blob/spore/infesting
name = "infesting blob spore"
can_infest = TRUE
/mob/living/simple_animal/hostile/blob/spore/weak
name = "fragile blob spore"
health = 15
maxHealth = 15
melee_damage_lower = 1
melee_damage_upper = 2
/mob/living/simple_animal/hostile/blob/spore/New(var/newloc, var/obj/structure/blob/factory/my_factory)
if(istype(my_factory))
factory = my_factory
factory.spores += src
..(newloc)
/mob/living/simple_animal/hostile/blob/spore/Destroy()
if(factory)
factory.spores -= src
factory = null
if(infested)
infested.forceMove(get_turf(src))
visible_message("<span class='warning'>\The [infested] falls to the ground as the blob spore bursts.<span>")
infested = null
return ..()
/mob/living/simple_animal/hostile/blob/spore/death(gibbed, deathmessage = "bursts!")
if(overmind)
overmind.blob_type.on_spore_death(src)
..(gibbed, deathmessage)
qdel(src)
/mob/living/simple_animal/hostile/blob/spore/update_icons()
if(overmind)
color = overmind.blob_type.complementary_color
set_light(3, 5, color)
else
color = null
set_light(0)
if(is_infesting)
overlays.Cut()
icon = infested.icon
overlays = infested.overlays
var/mutable_appearance/blob_head_overlay = mutable_appearance('icons/mob/blob.dmi', "blob_head")
if(overmind)
blob_head_overlay.color = overmind.blob_type.complementary_color
color = initial(color)//looks better.
overlays += blob_head_overlay
/mob/living/simple_animal/hostile/blob/spore/Life()
if(can_infest && !is_infesting && isturf(src.loc))
for(var/mob/living/carbon/human/H in view(src,1))
if(H.stat != DEAD) // We want zombies.
continue
if(H.isSynthetic()) // Not philosophical zombies.
continue
infest(H)
break
if(factory && z != factory.z) // This is to prevent spores getting lost in space and making the factory useless.
qdel(src)
..()
/mob/living/simple_animal/hostile/blob/spore/proc/infest(mob/living/carbon/human/H)
is_infesting = TRUE
if(H.wear_suit)
var/obj/item/clothing/suit/A = H.wear_suit
if(A.armor && A.armor["melee"])
maxHealth += A.armor["melee"] //That zombie's got armor, I want armor!
maxHealth += 40
health = maxHealth
name = "Infested [H.real_name]" // Not using the Z word.
desc = "A parasitic organism attached to a deceased body, controlling it directly as if it were a puppet."
melee_damage_lower += 8 // 10 total.
melee_damage_upper += 11 // 15 total.
emote_see = list("shambles around", "twitches", "stares")
attacktext = "claws"
H.forceMove(src)
infested = H
update_icons()
visible_message("<span class='warning'>The corpse of [H.name] suddenly rises!</span>")
/mob/living/simple_animal/hostile/blob/spore/GetIdCard()
if(infested) // If we've infested someone, use their ID.
return infested.GetIdCard()