fixing more stuff

This commit is contained in:
phil235
2015-03-23 19:47:39 +01:00
parent 17fb919020
commit b78ce020e7
3 changed files with 10 additions and 12 deletions
@@ -82,6 +82,7 @@
handle_automated_movement()
handle_automated_speech()
return 1
/mob/living/simple_animal/handle_regular_status_updates()
if(..())
@@ -374,12 +375,13 @@
if(statpanel("Status"))
stat(null, "Health: [round((health / maxHealth) * 100)]%")
return 1
/mob/living/simple_animal/death(gibbed)
health = 0 // so /mob/living/simple_animal/handle_regular_status_updates() doesn't magically revive them
health = 0
icon_state = icon_dead
stat = DEAD
density = 0
lying = 1
if(!gibbed)
visible_message("<span class='danger'>\the [src] stops moving...</span>")
..()
@@ -398,11 +400,6 @@
adjustBruteLoss(30)
updatehealth()
/mob/living/simple_animal/adjustBruteLoss(damage)
health = Clamp(health - damage, 0, maxHealth)
if(health < 1 && stat != DEAD)
death()
/mob/living/simple_animal/proc/CanAttack(var/atom/the_target)
if(see_invisible < the_target.invisibility)
return 0
@@ -146,10 +146,7 @@
return 2
/mob/living/simple_animal/slime/Stat()
..()
if(statpanel("Status"))
stat(null, "Health: [round((health / maxHealth) * 100)]%")
if(..())
if(!docile)
stat(null, "Nutrition: [nutrition]/[get_max_nutrition()]")
@@ -287,6 +284,7 @@
attacked += 10
if(prob(25))
user.do_attack_animation(src)
user.changeNext_move(CLICK_CD_MELEE)
user << "<span class='danger'>[W] passes right through [src]!</span>"
return
if(Discipline && prob(50)) // wow, buddy, why am I getting attacked??
@@ -347,6 +345,9 @@
/mob/living/simple_animal/slime/proc/discipline_slime(mob/user)
if(stat == DEAD)
return
if(prob(80) && !client)
Discipline++
@@ -159,7 +159,7 @@
/obj/item/slimepotion2/afterattack(mob/living/M as mob, mob/user as mob)
if(being_used || !ismob(M))
return
if(!(isslime(M) || isanimal(M) || ismonkey(M) || !M.ckey)) //I'm sorry for this line
if( !(isanimal(M) || ismonkey(M)) || M.ckey) //only works on monkeys and animals that aren't player controlled
user << "<span class='warning'>[M] is already too intelligent for this to work!</span>"
return ..()
if(M.stat)