From 5ec728f26a299b0e83132842e10dae3125453fd5 Mon Sep 17 00:00:00 2001 From: "Kortgstation@gmail.com" Date: Wed, 16 Jan 2013 07:11:51 +0000 Subject: [PATCH] Added an attack_slime for simple animals so slimes can hurt them. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5559 316c924e-a436-60f5-8080-3fe189b3f50e --- .../mob/living/simple_animal/simple_animal.dm | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index e3be6a83b3f..3091517fbce 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -339,6 +339,28 @@ L.amount_grown = min(L.amount_grown + damage, L.max_grown) +/mob/living/simple_animal/attack_slime(mob/living/carbon/slime/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! + + visible_message("\red The [M.name] glomps [src]!") + + var/damage = rand(1, 3) + + if(istype(src, /mob/living/carbon/slime/adult)) + damage = rand(20, 40) + else + damage = rand(5, 35) + + adjustBruteLoss(damage) + + + return + + /mob/living/simple_animal/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri if(istype(O, /obj/item/stack/medical))