diff --git a/code/WorkInProgress/Chemistry-Reagents.dm b/code/WorkInProgress/Chemistry-Reagents.dm index ad16dda0ba0..db295cb0e38 100644 --- a/code/WorkInProgress/Chemistry-Reagents.dm +++ b/code/WorkInProgress/Chemistry-Reagents.dm @@ -1419,8 +1419,11 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom M:bodytemperature += 5 - if(prob(40)) + if(prob(40) && !istype(M, /mob/living/carbon/metroid)) M.take_organ_damage(0, 1) + + if(istype(M, /mob/living/carbon/metroid)) + M:bodytemperature += rand(5,10) ..() return @@ -1435,6 +1438,9 @@ datum M:bodytemperature -= 5 if(prob(40)) M.take_organ_damage(0, 1) + if(prob(80) && istype(M, /mob/living/carbon/metroid)) + M.fireloss += rand(15,30) + if(prob(5)) M << "\red You feel a terrible chill inside your body!" ..() return diff --git a/code/defines/mob/living/carbon/metroid.dm b/code/defines/mob/living/carbon/metroid.dm index 6f1f4610c5d..8f73b455af7 100644 --- a/code/defines/mob/living/carbon/metroid.dm +++ b/code/defines/mob/living/carbon/metroid.dm @@ -6,7 +6,7 @@ icon = 'mob.dmi' icon_state = "baby metroid" pass_flags = PASSTABLE - voice_message = "skrees!" + voice_message = "chatters" say_message = "says" health = 150 @@ -29,6 +29,12 @@ var/cores = 3 // the number of /obj/item/metroid_core's the metroid has left inside + var/tame = 0 // if set to 1, the Metroid will not eat humans ever, or attack them + + var/list/Friends = list() // Anything on this list the Metroid will never eat, or attack + + // Metroids pass on genetic data, so all their offspring have the same "Friends" + /mob/living/carbon/metroid/adult name = "adult metroid" icon = 'mob.dmi' diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index 904abef6f54..323e2021126 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -603,6 +603,41 @@ bruteloss += damage + if(M.powerlevel > 0) + var/stunprob = 10 + var/power = M.powerlevel + rand(0,3) + + switch(M.powerlevel) + if(1 to 2) stunprob = 20 + if(3 to 4) stunprob = 30 + if(5 to 6) stunprob = 40 + if(7 to 8) stunprob = 60 + if(9) stunprob = 70 + if(10) stunprob = 95 + + if(prob(stunprob)) + M.powerlevel -= 3 + if(M.powerlevel < 0) + M.powerlevel = 0 + + for(var/mob/O in viewers(src, null)) + if ((O.client && !( O.blinded ))) + O.show_message(text("\red The [M.name] has shocked []!", src), 1) + + if (weakened < power) + weakened = power + if (stuttering < power) + stuttering = power + if (stunned < power) + stunned = power + + var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread + s.set_up(5, 1, src) + s.start() + + if (prob(stunprob) && M.powerlevel >= 8) + fireloss += M.powerlevel * rand(6,10) + updatehealth() diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index eb29d6c043d..0bc73058754 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1733,7 +1733,7 @@ for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) - O.show_message(text("\red The [M.name] has [pick("bit","slashed")] []!", src), 1) + O.show_message(text("\red The [M.name] has shocked []!", src), 1) if (weakened < power) weakened = power @@ -1742,6 +1742,10 @@ if (stunned < power) stunned = power + var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread + s.set_up(5, 1, src) + s.start() + if (prob(stunprob) && M.powerlevel >= 8) fireloss += M.powerlevel * rand(6,10) diff --git a/code/modules/mob/living/carbon/metroid/life.dm b/code/modules/mob/living/carbon/metroid/life.dm index 8ff4d0cd2d1..c292bf4ba1f 100644 --- a/code/modules/mob/living/carbon/metroid/life.dm +++ b/code/modules/mob/living/carbon/metroid/life.dm @@ -95,7 +95,6 @@ for(var/mob/living/carbon/metroid/M in view(1,C)) if(M.Victim == C) notarget = 1 - break // They don't go for prey already being eaten if(!notarget) targets += C @@ -225,6 +224,9 @@ if(istype(loc, /turf/space)) environment_heat_capacity = loc:heat_capacity + if(environment.temperature < (T0C + 10)) + fireloss += rand(10,20) + if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10))) var/transfer_coefficient @@ -268,7 +270,7 @@ // if(src.health <= 20 && prob(1)) spawn(0) emote("gasp") //if(!src.rejuv) src.oxyloss++ - if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss+=8 + if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss+=10 if(src.stat != 2) src.stat = 1 @@ -286,16 +288,34 @@ src.blinded = 1 src.stat = 2 - if (src.stuttering) src.stuttering-- + else + if (src.paralysis || src.stunned || src.weakened || changeling_fakedeath) //Stunned etc. + if (src.stunned > 0) + src.stunned = 0 + src.stat = 0 + if (src.weakened > 0) + src.weakened = 0 + src.lying = 0 + src.stat = 0 + if (src.paralysis > 0) + src.paralysis = 0 + src.blinded = 0 + src.lying = 0 + src.stat = 0 + + else + src.lying = 0 + src.stat = 0 + + if (src.stuttering) src.stuttering = 0 if (src.eye_blind) - src.eye_blind-- + src.eye_blind = 0 src.blinded = 1 - if (src.ear_deaf > 0) src.ear_deaf-- + if (src.ear_deaf > 0) src.ear_deaf = 0 if (src.ear_damage < 25) - src.ear_damage -= 0.05 - src.ear_damage = max(src.ear_damage, 0) + src.ear_damage = 0 src.density = !( src.lying ) @@ -305,12 +325,10 @@ src.ear_deaf = 1 if (src.eye_blurry > 0) - src.eye_blurry-- - src.eye_blurry = max(0, src.eye_blurry) + src.eye_blurry = 0 if (src.druggy > 0) - src.druggy-- - src.druggy = max(0, src.druggy) + src.druggy = 0 return 1 diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm index c2b715523fd..a13929d300b 100644 --- a/code/modules/mob/living/carbon/metroid/metroid.dm +++ b/code/modules/mob/living/carbon/metroid/metroid.dm @@ -34,6 +34,9 @@ if(reagents.has_reagent("hyperzine")) // hyperzine slows Metroids down tally *= 2 // moves twice as slow + if(reagents.has_reagent("frostoil")) // frostoil also makes them move pretty slow + tally *= 3 + if(health <= 0) // if damaged, the metroid moves twice as slow tally *= 2 @@ -114,11 +117,10 @@ ..() statpanel("Status") - if (client && client.holder) - if(istype(src, /mob/living/carbon/metroid/adult)) - stat(null, "Health: [round(health)]/200") - else - stat(null, "Health: [round(health)]/150") + if(istype(src, /mob/living/carbon/metroid/adult)) + stat(null, "Health: [round((health / 200) * 100)]%") + else + stat(null, "Health: [round((health / 150) * 100)]%") if (client.statpanel == "Status") diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 4a0e4fb5f9b..58b201556c8 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -398,7 +398,7 @@ for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) - O.show_message(text("\red The [M.name] has [pick("bit","slashed")] []!", src), 1) + O.show_message(text("\red The [M.name] has shocked []!", src), 1) if (weakened < power) weakened = power @@ -407,6 +407,10 @@ if (stunned < power) stunned = power + var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread + s.set_up(5, 1, src) + s.start() + if (prob(stunprob) && M.powerlevel >= 8) fireloss += M.powerlevel * rand(6,10) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 9366664ca76..8fb847ed898 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -591,6 +591,66 @@ O.show_message(text("\red [] attempted to force back []!", M, src), 1) return + + +/mob/living/silicon/robot/attack_metroid(mob/living/carbon/metroid/M as mob) + if (!ticker) + M << "You cannot attack people before the game has started." + return + + if(M.Victim) return // can't attack while eating! + + if (health > -100) + + for(var/mob/O in viewers(src, null)) + if ((O.client && !( O.blinded ))) + O.show_message(text("\red The [M.name] has [pick("bit","slashed")] []!", src), 1) + + var/damage = rand(1, 3) + + if(istype(src, /mob/living/carbon/metroid/adult)) + damage = rand(20, 40) + else + damage = rand(5, 35) + + damage = round(damage / 2) // borgs recieve half damage + bruteloss += damage + + + if(M.powerlevel > 0) + var/stunprob = 10 + + switch(M.powerlevel) + if(1 to 2) stunprob = 20 + if(3 to 4) stunprob = 30 + if(5 to 6) stunprob = 40 + if(7 to 8) stunprob = 60 + if(9) stunprob = 70 + if(10) stunprob = 95 + + if(prob(stunprob)) + M.powerlevel -= 3 + if(M.powerlevel < 0) + M.powerlevel = 0 + + for(var/mob/O in viewers(src, null)) + if ((O.client && !( O.blinded ))) + O.show_message(text("\red The [M.name] has electrified []!", src), 1) + + flick("noise", flash) + + var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread + s.set_up(5, 1, src) + s.start() + + if (prob(stunprob) && M.powerlevel >= 8) + bruteloss += M.powerlevel * rand(6,10) + + + updatehealth() + + return + /mob/living/silicon/robot/attack_hand(mob/user) add_fingerprint(user) diff --git a/tgstation.dme b/tgstation.dme index 4416b69d021..1f10e071077 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -824,5 +824,5 @@ #include "code\WorkInProgress\recycling\scrap.dm" #include "code\WorkInProgress\recycling\sortingmachinery.dm" #include "interface\skin.dmf" -#include "maps\tgstation.2.0.7.dmm" +#include "maps\TestingMap.dmm" // END_INCLUDE