Merge pull request #8666 from phil235/AnimalsUpdatehealthFix

Fixes simple_animals being immune to fire damage melee attacks.
This commit is contained in:
Jordie
2015-04-02 20:16:18 +11:00
3 changed files with 19 additions and 5 deletions
@@ -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)
@@ -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>I can't latch onto another slime...</i>"
return 0
if(docile)
src << "<i>I'm not hungry anymore...</i>"
return 0
@@ -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