From 9261196b4f01f6a52da73de4018f69f25b4e3953 Mon Sep 17 00:00:00 2001 From: phil235 Date: Tue, 31 Mar 2015 21:29:34 +0200 Subject: [PATCH] Fixes simple_animals being immune to fire damage melee attacks. Fixes slime being able to latch onto other slimes with mouse_drop (but not the feed verb) --- .../mob/living/simple_animal/simple_animal.dm | 14 ++++++++++---- .../mob/living/simple_animal/slime/powers.dm | 6 +++++- .../mob/living/simple_animal/slime/slime.dm | 4 ++++ 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index f81bdac5d59..8a957080878 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -71,7 +71,8 @@ ..() /mob/living/simple_animal/updatehealth() - health = max(maxHealth - getBruteLoss(), 0) + ..() + health = Clamp(health, 0, maxHealth) /mob/living/simple_animal/Life() if(..()) @@ -248,11 +249,16 @@ /mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj) if(!Proj) return - if((Proj.damage_type != STAMINA)) - adjustBruteLoss(Proj.damage) - Proj.on_hit(src, 0) + apply_damage(Proj.damage, Proj.damage_type) + Proj.on_hit(src, 0) return 0 +/mob/living/simple_animal/adjustFireLoss(var/amount) + adjustBruteLoss(amount) + +/mob/living/simple_animal/adjustStaminaLoss(var/amount) + return + /mob/living/simple_animal/attack_hand(mob/living/carbon/human/M as mob) switch(M.a_intent) diff --git a/code/modules/mob/living/simple_animal/slime/powers.dm b/code/modules/mob/living/simple_animal/slime/powers.dm index e39b9400dfd..e8b647e5e8d 100644 --- a/code/modules/mob/living/simple_animal/slime/powers.dm +++ b/code/modules/mob/living/simple_animal/slime/powers.dm @@ -7,7 +7,7 @@ var/list/choices = list() for(var/mob/living/C in view(1,src)) - if(C!=src && !isslime(C) && Adjacent(C)) + if(C!=src && Adjacent(C)) choices += C var/mob/living/M = input(src,"Who do you wish to feed on?") in null|choices @@ -24,6 +24,10 @@ Feedstop() return 0 + if(isslime(M)) + src << "I can't latch onto another slime..." + return 0 + if(docile) src << "I'm not hungry anymore..." return 0 diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index 44cd079bca5..d9a0b893187 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -165,6 +165,10 @@ stat(null,"Power Level: [powerlevel]") +/mob/living/simple_animal/slime/adjustFireLoss(amount) + ..(-abs(amount)) // Heals them + return + /mob/living/simple_animal/slime/bullet_act(var/obj/item/projectile/Proj) if(!Proj) return