mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-21 19:19:12 +01:00
A Tale of Blobs and Man
This commit is contained in:
@@ -48,6 +48,8 @@
|
||||
var/pain_immunity // Makes the holder not care about pain while this is on. Only really useful to human mobs.
|
||||
var/pulse_modifier // Modifier for pulse, will be rounded on application, then added to the normal 'pulse' multiplier which ranges between 0 and 5 normally. Only applied if they're living.
|
||||
var/pulse_set_level // Positive number. If this is non-null, it will hard-set the pulse level to this. Pulse ranges from 0 to 5 normally.
|
||||
var/emp_modifier // Added to the EMP strength, which is an inverse scale from 1 to 4, with 1 being the strongest EMP. 5 is a nullification.
|
||||
var/explosion_modifier // Added to the bomb strength, which is an inverse scale from 1 to 3, with 1 being gibstrength. 4 is a nullification.
|
||||
|
||||
/datum/modifier/New(var/new_holder, var/new_origin)
|
||||
holder = new_holder
|
||||
|
||||
@@ -324,3 +324,67 @@ the artifact triggers the rage.
|
||||
/datum/modifier/homeothermic/tick()
|
||||
..()
|
||||
holder.bodytemperature = round((holder.bodytemperature + T20C) / 2)
|
||||
|
||||
/datum/modifier/exothermic
|
||||
name = "heat resistance"
|
||||
desc = "Your body lowers to room temperature."
|
||||
|
||||
on_created_text = "<span class='notice'>You feel comfortable.</span>"
|
||||
on_expired_text = "<span class='notice'>You feel.. still probably comfortable.</span>"
|
||||
stacks = MODIFIER_STACK_EXTEND
|
||||
|
||||
/datum/modifier/exothermic/tick()
|
||||
..()
|
||||
if(holder.bodytemperature > T20C)
|
||||
holder.bodytemperature = round((holder.bodytemperature + T20C) / 2)
|
||||
|
||||
/datum/modifier/endothermic
|
||||
name = "cold resistance"
|
||||
desc = "Your body rises to room temperature."
|
||||
|
||||
on_created_text = "<span class='notice'>You feel comfortable.</span>"
|
||||
on_expired_text = "<span class='notice'>You feel.. still probably comfortable.</span>"
|
||||
stacks = MODIFIER_STACK_EXTEND
|
||||
|
||||
/datum/modifier/endothermic/tick()
|
||||
..()
|
||||
if(holder.bodytemperature < T20C)
|
||||
holder.bodytemperature = round((holder.bodytemperature + T20C) / 2)
|
||||
|
||||
// Nullifies EMP.
|
||||
/datum/modifier/faraday
|
||||
name = "EMP shielding"
|
||||
desc = "You are covered in some form of faraday shielding. EMPs have no effect."
|
||||
mob_overlay_state = "electricity"
|
||||
|
||||
on_created_text = "<span class='notice'>You feel a surge of energy, that fades to a calm tide.</span>"
|
||||
on_expired_text = "<span class='warning'>You feel a longing for the flow of energy.</span>"
|
||||
stacks = MODIFIER_STACK_EXTEND
|
||||
|
||||
emp_modifier = 5
|
||||
|
||||
// Nullifies explosions.
|
||||
/datum/modifier/blastshield
|
||||
name = "Blast Shielding"
|
||||
desc = "You are protected from explosions somehow."
|
||||
mob_overlay_state = "electricity"
|
||||
|
||||
on_created_text = "<span class='notice'>You feel a surge of energy, that fades to a stalwart hum.</span>"
|
||||
on_expired_text = "<span class='warning'>You feel a longing for the flow of energy.</span>"
|
||||
stacks = MODIFIER_STACK_EXTEND
|
||||
|
||||
explosion_modifier = 3
|
||||
|
||||
// Kills on expiration.
|
||||
/datum/modifier/doomed
|
||||
name = "Doomed"
|
||||
desc = "You are doomed."
|
||||
|
||||
on_created_text = "<span class='notice'>You feel an overwhelming sense of dread.</span>"
|
||||
on_expired_text = "<span class='warning'>You feel the life drain from your body.</span>"
|
||||
stacks = MODIFIER_STACK_EXTEND
|
||||
|
||||
/datum/modifier/doomed/on_expire()
|
||||
if(holder.stat != DEAD)
|
||||
holder.visible_message("<span class='alien'>\The [holder] collapses, the life draining from their body.</span>")
|
||||
holder.death()
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
ai_holder_type = /datum/ai_holder/simple_mob/melee/evasive
|
||||
|
||||
a_intent = I_HURT
|
||||
|
||||
var/generate_species = SPECIES_HUMAN
|
||||
var/generate_dead = FALSE
|
||||
|
||||
|
||||
@@ -100,6 +100,15 @@
|
||||
if(!blinded)
|
||||
flash_eyes()
|
||||
|
||||
for(var/datum/modifier/M in modifiers)
|
||||
if(!isnull(M.explosion_modifier))
|
||||
severity = CLAMP(severity + M.explosion_modifier, 1, 4)
|
||||
|
||||
severity = round(severity)
|
||||
|
||||
if(severity > 3)
|
||||
return
|
||||
|
||||
var/shielded = 0
|
||||
var/b_loss = null
|
||||
var/f_loss = null
|
||||
|
||||
@@ -167,6 +167,15 @@
|
||||
|
||||
/mob/living/emp_act(severity)
|
||||
var/list/L = src.get_contents()
|
||||
|
||||
if(LAZYLEN(modifiers))
|
||||
for(var/datum/modifier/M in modifiers)
|
||||
if(!isnull(M.emp_modifier))
|
||||
severity = CLAMP(severity + M.emp_modifier, 1, 5)
|
||||
|
||||
if(severity == 5) // Effectively nullified.
|
||||
return
|
||||
|
||||
for(var/obj/O in L)
|
||||
O.emp_act(severity)
|
||||
..()
|
||||
@@ -206,6 +215,9 @@
|
||||
var/soaked = get_armor_soak(def_zone, armor_check, armor_pen)
|
||||
var/absorb = run_armor_check(def_zone, armor_check, armor_pen)
|
||||
|
||||
if(ai_holder)
|
||||
ai_holder.react_to_attack(B)
|
||||
|
||||
apply_damage(damage, damage_type, def_zone, absorb, soaked)
|
||||
|
||||
/mob/living/proc/resolve_item_attack(obj/item/I, mob/living/user, var/target_zone)
|
||||
|
||||
@@ -305,6 +305,15 @@
|
||||
if(!blinded)
|
||||
flash_eyes()
|
||||
|
||||
for(var/datum/modifier/M in modifiers)
|
||||
if(!isnull(M.explosion_modifier))
|
||||
severity = CLAMP(severity + M.explosion_modifier, 1, 4)
|
||||
|
||||
severity = round(severity)
|
||||
|
||||
if(severity > 3)
|
||||
return
|
||||
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
if (stat != 2)
|
||||
|
||||
@@ -96,6 +96,16 @@
|
||||
/mob/living/simple_mob/ex_act(severity)
|
||||
if(!blinded)
|
||||
flash_eyes()
|
||||
|
||||
for(var/datum/modifier/M in modifiers)
|
||||
if(!isnull(M.explosion_modifier))
|
||||
severity = CLAMP(severity + M.explosion_modifier, 1, 4)
|
||||
|
||||
severity = round(severity)
|
||||
|
||||
if(severity > 3)
|
||||
return
|
||||
|
||||
var/armor = run_armor_check(def_zone = null, attack_flag = "bomb")
|
||||
var/bombdam = 500
|
||||
switch (severity)
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
var/mob/observer/blob/overmind = null
|
||||
var/obj/structure/blob/factory/factory = null
|
||||
var/datum/blob_type/blob_type = null // Used for the blob core items, as they have no overmind mob.
|
||||
|
||||
mob_class = MOB_CLASS_SLIME
|
||||
ai_holder_type = /datum/ai_holder/simple_mob/melee
|
||||
@@ -33,6 +34,8 @@
|
||||
/mob/living/simple_mob/blob/update_icons()
|
||||
if(overmind)
|
||||
color = overmind.blob_type.complementary_color
|
||||
else if(blob_type)
|
||||
color = blob_type.complementary_color
|
||||
else
|
||||
color = null
|
||||
..()
|
||||
@@ -40,6 +43,8 @@
|
||||
/mob/living/simple_mob/blob/Destroy()
|
||||
if(overmind)
|
||||
overmind.blob_mobs -= src
|
||||
if(blob_type)
|
||||
blob_type = null
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_mob/blob/blob_act(obj/structure/blob/B)
|
||||
@@ -59,4 +64,17 @@
|
||||
/mob/living/simple_mob/blob/Process_Spacemove()
|
||||
for(var/obj/structure/blob/B in range(1, src))
|
||||
return TRUE
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_mob/blob/IIsAlly(mob/living/L)
|
||||
var/ally = ..(L)
|
||||
if(!ally)
|
||||
var/list/items = L.get_all_held_items()
|
||||
for(var/obj/item/I in items)
|
||||
if(istype(I, /obj/item/weapon/blobcore_chunk))
|
||||
var/obj/item/weapon/blobcore_chunk/BC = I
|
||||
if(!overmind || (BC.blob_type && overmind.blob_type.type == BC.blob_type.type))
|
||||
ally = TRUE
|
||||
break
|
||||
|
||||
return ally
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
// Spores are made from blob factories.
|
||||
// They are very weak and expendable, but can overwhelm when a lot of them are together.
|
||||
// When attacking, spores will hit harder if near other friendly spores.
|
||||
@@ -146,3 +147,160 @@
|
||||
if(helpers)
|
||||
to_chat(src, span("notice", "Your attack is assisted by [helpers] other spore\s."))
|
||||
return damage_to_do
|
||||
=======
|
||||
// Spores are made from blob factories.
|
||||
// They are very weak and expendable, but can overwhelm when a lot of them are together.
|
||||
// When attacking, spores will hit harder if near other friendly spores.
|
||||
// Some blobs can infest dead non-robotic mobs, making them into Not Zombies.
|
||||
|
||||
/mob/living/simple_mob/blob/spore
|
||||
name = "blob spore"
|
||||
desc = "A floating, fragile spore."
|
||||
|
||||
icon_state = "blobpod"
|
||||
icon_living = "blobpod"
|
||||
glow_range = 3
|
||||
glow_intensity = 5
|
||||
layer = ABOVE_MOB_LAYER // Over the blob.
|
||||
|
||||
health = 30
|
||||
maxHealth = 30
|
||||
melee_damage_lower = 2
|
||||
melee_damage_upper = 4
|
||||
movement_cooldown = 0
|
||||
hovering = TRUE
|
||||
|
||||
attacktext = list("slammed into")
|
||||
attack_sound = 'sound/effects/slime_squish.ogg'
|
||||
say_list_type = /datum/say_list/spore
|
||||
|
||||
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
|
||||
|
||||
/datum/say_list/spore
|
||||
emote_see = list("sways", "inflates briefly")
|
||||
|
||||
/datum/say_list/infested
|
||||
emote_see = list("shambles around", "twitches", "stares")
|
||||
|
||||
|
||||
/mob/living/simple_mob/blob/spore/infesting
|
||||
name = "infesting blob spore"
|
||||
can_infest = TRUE
|
||||
|
||||
/mob/living/simple_mob/blob/spore/weak
|
||||
name = "fragile blob spore"
|
||||
health = 15
|
||||
maxHealth = 15
|
||||
melee_damage_lower = 1
|
||||
melee_damage_upper = 2
|
||||
|
||||
/mob/living/simple_mob/blob/spore/Initialize(mapload, var/obj/structure/blob/factory/my_factory)
|
||||
if(istype(my_factory))
|
||||
factory = my_factory
|
||||
factory.spores += src
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_mob/blob/spore/Destroy()
|
||||
if(factory)
|
||||
factory.spores -= src
|
||||
factory = null
|
||||
if(infested)
|
||||
infested.forceMove(get_turf(src))
|
||||
visible_message(span("warning", "\The [infested] falls to the ground as the blob spore bursts."))
|
||||
infested = null
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_mob/blob/spore/death(gibbed, deathmessage = "bursts!")
|
||||
if(overmind)
|
||||
overmind.blob_type.on_spore_death(src)
|
||||
..(gibbed, deathmessage)
|
||||
qdel(src)
|
||||
|
||||
/mob/living/simple_mob/blob/spore/update_icons()
|
||||
..() // This will cut our overlays.
|
||||
|
||||
if(overmind)
|
||||
color = overmind.blob_type.complementary_color
|
||||
glow_color = color
|
||||
glow_toggle = TRUE
|
||||
else if(blob_type)
|
||||
color = blob_type.complementary_color
|
||||
glow_color = color
|
||||
glow_toggle = TRUE
|
||||
else
|
||||
color = null
|
||||
glow_color = null
|
||||
glow_toggle = FALSE
|
||||
|
||||
if(is_infesting)
|
||||
icon = infested.icon
|
||||
copy_overlays(infested)
|
||||
// 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
|
||||
add_overlay(blob_head_overlay, TRUE)
|
||||
|
||||
/mob/living/simple_mob/blob/spore/handle_special()
|
||||
..()
|
||||
if(can_infest && !is_infesting && isturf(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(overmind)
|
||||
overmind.blob_type.on_spore_lifetick(src)
|
||||
|
||||
if(factory && z != factory.z) // This is to prevent spores getting lost in space and making the factory useless.
|
||||
qdel(src)
|
||||
|
||||
/mob/living/simple_mob/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.
|
||||
attacktext = list("clawed")
|
||||
|
||||
H.forceMove(src)
|
||||
infested = H
|
||||
|
||||
say_list = new /datum/say_list/infested()
|
||||
|
||||
update_icons()
|
||||
visible_message(span("warning", "The corpse of [H.name] suddenly rises!"))
|
||||
|
||||
/mob/living/simple_mob/blob/spore/GetIdCard()
|
||||
if(infested) // If we've infested someone, use their ID.
|
||||
return infested.GetIdCard()
|
||||
|
||||
/mob/living/simple_mob/blob/spore/apply_bonus_melee_damage(A, damage_to_do)
|
||||
var/helpers = 0
|
||||
for(var/mob/living/simple_mob/blob/spore/S in view(1, src))
|
||||
if(S == src) // Don't count ourselves.
|
||||
continue
|
||||
if(!IIsAlly(S)) // Only friendly spores make us stronger.
|
||||
continue
|
||||
// Friendly spores contribute 1/4th of their averaged attack power to our attack.
|
||||
damage_to_do += ((S.melee_damage_lower + S.melee_damage_upper) / 2) / 4
|
||||
helpers++
|
||||
|
||||
if(helpers)
|
||||
to_chat(src, span("notice", "Your attack is assisted by [helpers] other spore\s."))
|
||||
return damage_to_do
|
||||
>>>>>>> 32a573f... Merge pull request #6878 from Mechoid/ATaleofBlobsandMen
|
||||
|
||||
Reference in New Issue
Block a user