GUHRILLAZ

This commit is contained in:
LetterJay
2017-08-28 10:23:11 -05:00
parent defab9c7fc
commit 7ea6eeb64e
2 changed files with 19 additions and 17 deletions
@@ -1,9 +1,14 @@
#define GORILLA_HANDS_LAYER 1
#define GORILLA_TOTAL_LAYERS 1
/mob/living/simple_animal/hostile/gorilla
name = "Gorilla"
desc = "A ground-dwelling, predominantly herbivorous ape that inhabits the forests of central Africa."
icon_state = "gorilla"
icon_living = "gorilla"
icon_dead = "gorilla_dead"
icon = 'icons/mob/gorilla.dmi'
icon_state = "crawling"
icon_state = "crawling"
icon_living = "crawling"
icon_dead = "dead"
speak_chance = 80
maxHealth = 220
health = 220
@@ -20,11 +25,14 @@
environment_smash = 2
attacktext = "pummels"
attack_sound = 'sound/weapons/punch1.ogg'
dextrous = TRUE
possible_a_intents = list(INTENT_HELP, INTENT_GRAB, INTENT_DISARM, INTENT_HARM)
faction = list("jungle")
robust_searching = TRUE
stat_attack = UNCONSCIOUS
minbodytemp = 270
maxbodytemp = 350
var/list/gorilla_overlays[GORILLA_TOTAL_LAYERS]
// Gorillas like to dismember limbs from unconcious mobs.
// Returns null when the target is not an unconcious carbon mob; a list of limbs (possibly empty) otherwise.
@@ -42,8 +50,8 @@
/mob/living/simple_animal/hostile/gorilla/AttackingTarget()
var/list/parts = target_bodyparts(target)
if(parts != null)
if(LAZYLEN(parts) == 0)
if(parts)
if(!parts.len)
return FALSE
var/obj/item/bodypart/BP = pick(parts)
BP.dismember()
@@ -53,23 +61,17 @@
var/mob/living/L = target
if(prob(80))
var/atom/throw_target = get_edge_target_turf(L, dir)
L.throw_at(throw_target, rand(1,2), 7, src)
L.throw_at(throw_target, rand(1,2), 7, src)
else
L.Knockdown(20)
visible_message("<span class='danger'>[src] knocks [L] down!</span>")
/mob/living/simple_animal/hostile/gorilla/CanAttack(atom/the_target)
. = ..()
if(. && istype(the_target, /mob/living/carbon/monkey))
return FALSE
var/list/parts = target_bodyparts(the_target)
if(parts != null && LAZYLEN(parts) <= 3) // Don't remove all of their limbs.
return FALSE
var/list/parts = target_bodyparts(target)
return ..() && !istype(the_target, /mob/living/carbon/monkey) && (!parts || parts.len > 3)
/mob/living/simple_animal/hostile/gorilla/handle_automated_speech(var/override)
set waitfor = FALSE
if(speak_chance)
if(override || (target && prob(speak_chance)))
playsound(loc, "sound/creatures/gorilla.ogg", 200)
/mob/living/simple_animal/hostile/gorilla/handle_automated_speech(override)
if(speak_chance && (override || prob(speak_chance)))
playsound(src, "sound/creatures/gorilla.ogg", 200)
..()