From 3dcb7db4427057c3c79cf2d9391d9f95f53d0023 Mon Sep 17 00:00:00 2001 From: "vageyenaman@gmail.com" Date: Sun, 4 Sep 2011 20:24:51 +0000 Subject: [PATCH] Made Metroids get hungrier a lot slower, but they still will tend to eat more. Also, when they eat, they gain a lot more nutrition from it. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2113 316c924e-a436-60f5-8080-3fe189b3f50e --- .../modules/mob/living/carbon/metroid/life.dm | 18 +-- .../mob/living/carbon/metroid/powers.dm | 113 ++++++++++-------- 2 files changed, 69 insertions(+), 62 deletions(-) diff --git a/code/modules/mob/living/carbon/metroid/life.dm b/code/modules/mob/living/carbon/metroid/life.dm index afb0461e7a2..ee2e6196a58 100644 --- a/code/modules/mob/living/carbon/metroid/life.dm +++ b/code/modules/mob/living/carbon/metroid/life.dm @@ -87,13 +87,13 @@ var/starving = 0 // determines if the metroid is starving-hungry if(istype(src, /mob/living/carbon/metroid/adult)) switch(nutrition) - if(400 to 900) hungry = 1 + if(400 to 1100) hungry = 1 if(0 to 399) starving = 1 else switch(nutrition) - if(150 to 500) hungry = 1 + if(150 to 800) hungry = 1 if(0 to 149) starving = 1 @@ -282,11 +282,11 @@ step_to(src, Target) else - if(!Atkcool) + if(!Atkcool && get_obstacle_ok(Target)) Feedon(Target) else - if(!Atkcool) + if(!Atkcool && get_obstacle_ok(Target)) Feedon(Target) else @@ -477,9 +477,9 @@ handle_nutrition() - if(prob(40)) - if(istype(src, /mob/living/carbon/metroid/adult)) nutrition-=rand(6,10) - else nutrition-=rand(4,9) + if(prob(20)) + if(istype(src, /mob/living/carbon/metroid/adult)) nutrition-=rand(4,6) + else nutrition-=rand(2,3) if(nutrition <= 0) nutrition = 0 @@ -489,11 +489,11 @@ else if(istype(src, /mob/living/carbon/metroid/adult)) - if(nutrition >= 1100) + if(nutrition >= 1000) if(prob(40)) amount_grown++ else - if(nutrition >= 900) + if(nutrition >= 800) if(prob(40)) amount_grown++ if(amount_grown >= 10 && !Victim && !Target) diff --git a/code/modules/mob/living/carbon/metroid/powers.dm b/code/modules/mob/living/carbon/metroid/powers.dm index 1712cd1e3b8..be452ec2cb7 100644 --- a/code/modules/mob/living/carbon/metroid/powers.dm +++ b/code/modules/mob/living/carbon/metroid/powers.dm @@ -57,73 +57,80 @@ while(Victim && M.health > -70 && stat != 2) // M.canmove = 0 canmove = 0 - if(prob(15) && M.client && istype(M, /mob/living/carbon)) - M << "\red [pick("You can feel your body becoming weak!", \ - "You feel like you're about to die!", \ - "You feel every part of your body screaming in agony!", \ - "A low, rolling pain passes through your body!", \ - "Your body feels as if it's falling apart!", \ - "You feel extremely weak!", \ - "A sharp, deep pain bathes every inch of your body!")]" - if(istype(M, /mob/living/carbon)) - Victim.cloneloss += rand(1,10) - Victim.toxloss += rand(1,2) - if(Victim.health <= 0) - Victim.toxloss += rand(2,4) + if(M in view(1, src)) + loc = M.loc - if(toxloss > 0) - toxloss = max(0, toxloss-10) + if(prob(15) && M.client && istype(M, /mob/living/carbon)) + M << "\red [pick("You can feel your body becoming weak!", \ + "You feel like you're about to die!", \ + "You feel every part of your body screaming in agony!", \ + "A low, rolling pain passes through your body!", \ + "Your body feels as if it's falling apart!", \ + "You feel extremely weak!", \ + "A sharp, deep pain bathes every inch of your body!")]" - if(oxyloss > 0) - oxyloss = max(0, oxyloss-10) + if(istype(M, /mob/living/carbon)) + Victim.cloneloss += rand(1,10) + Victim.toxloss += rand(1,2) + if(Victim.health <= 0) + Victim.toxloss += rand(2,4) - if(bruteloss > 0) - bruteloss = max(0, bruteloss-10) + if(toxloss > 0) + toxloss = max(0, toxloss-10) - if(fireloss > 0) - fireloss = max(0, fireloss-10) + if(oxyloss > 0) + oxyloss = max(0, oxyloss-10) - if(cloneloss > 0) - cloneloss = max(0, cloneloss-10) + if(bruteloss > 0) + bruteloss = max(0, bruteloss-10) - if(Victim) - for(var/mob/living/carbon/metroid/Metroid in view(1,M)) - if(Metroid.Victim == M && Metroid != src) - Metroid.Feedstop() + if(fireloss > 0) + fireloss = max(0, fireloss-10) - if(toxloss<0) toxloss = 0 - if(oxyloss<0) oxyloss = 0 - if(bruteloss<0) bruteloss = 0 - if(fireloss<0) fireloss = 0 - if(cloneloss<0) cloneloss = 0 + if(cloneloss > 0) + cloneloss = max(0, cloneloss-10) - nutrition += rand(5,20) - if(nutrition >= lastnut + 100) - if(prob(20)) - lastnut = nutrition - powerlevel++ - if(powerlevel > 10) - powerlevel = 10 + if(Victim) + for(var/mob/living/carbon/metroid/Metroid in view(1,M)) + if(Metroid.Victim == M && Metroid != src) + Metroid.Feedstop() + + if(toxloss<0) toxloss = 0 + if(oxyloss<0) oxyloss = 0 + if(bruteloss<0) bruteloss = 0 + if(fireloss<0) fireloss = 0 + if(cloneloss<0) cloneloss = 0 + + nutrition += rand(10,25) + if(nutrition >= lastnut + 100) + if(prob(60)) + lastnut = nutrition + powerlevel++ + if(powerlevel > 10) + powerlevel = 10 + + if(istype(src, /mob/living/carbon/metroid/adult)) + if(nutrition > 1200) + nutrition = 1200 + else + if(nutrition > 1000) + nutrition = 1000 + + Victim.updatehealth() + updatehealth() - if(istype(src, /mob/living/carbon/metroid/adult)) - if(nutrition > 1200) - nutrition = 1200 else - if(nutrition > 1000) - nutrition = 1000 + if(prob(25)) + src << "\red [pick("This subject is incompatable", \ + "This subject does not have a life energy", "This subject is empty", \ + "I am not satisified", "I can not feed from this subject", \ + "I do not feel nurished", "This subject is not food")]..." - Victim.updatehealth() - updatehealth() + sleep(rand(15,45)) else - if(prob(25)) - src << "\red [pick("This subject is incompatable", \ - "This subject does not have a life energy", "This subject is empty", \ - "I am not satisified", "I can not feed from this subject", \ - "I do not feel nurished", "This subject is not food")]..." - - sleep(rand(15,45)) + break if(stat == 2) if(!istype(src, /mob/living/carbon/metroid/adult))