Gorillas
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
diff a/code/modules/food_and_drinks/food/snacks/meat.dm b/code/modules/food_and_drinks/food/snacks/meat.dm (rejected hunks)
|
||||
@@ -225,6 +225,11 @@
|
||||
tastes = list("meat" = 1, "wheat" = 1)
|
||||
foodtype = GRAIN
|
||||
|
||||
+/obj/item/weapon/reagent_containers/food/snacks/meat/slab/gorilla
|
||||
+ name = "gorilla meat"
|
||||
+ desc = "Much meatier than monkey meat."
|
||||
+ list_reagents = list("nutriment" = 5, "vitamin" = 1)
|
||||
+
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat/rawbacon
|
||||
name = "raw piece of bacon"
|
||||
desc = "A raw piece of bacon."
|
||||
@@ -23,23 +23,22 @@
|
||||
walk_to(src,0)
|
||||
|
||||
/mob/living/carbon/monkey/handle_mutations_and_radiation()
|
||||
|
||||
if (radiation)
|
||||
if (radiation > 100)
|
||||
if(!IsKnockdown())
|
||||
emote("collapse")
|
||||
Knockdown(200)
|
||||
to_chat(src, "<span class='danger'>You feel weak.</span>")
|
||||
|
||||
if(radiation)
|
||||
if(radiation > 100)
|
||||
if(!IsKnockdown())
|
||||
emote("collapse")
|
||||
Knockdown(200)
|
||||
to_chat(src, "<span class='danger'>You feel weak.</span>")
|
||||
if(radiation > 30 && prob((radiation - 30) * (radiation - 30) * 0.002))
|
||||
gorillize()
|
||||
return
|
||||
switch(radiation)
|
||||
|
||||
if(50 to 75)
|
||||
if(prob(5))
|
||||
if(!IsKnockdown())
|
||||
emote("collapse")
|
||||
Knockdown(60)
|
||||
to_chat(src, "<span class='danger'>You feel weak.</span>")
|
||||
|
||||
if(75 to 100)
|
||||
if(prob(1))
|
||||
to_chat(src, "<span class='danger'>You mutate!</span>")
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
diff a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm (rejected hunks)
|
||||
@@ -793,7 +793,7 @@
|
||||
else
|
||||
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
-/mob/living/proc/can_use_guns(var/obj/item/weapon/gun/G)
|
||||
+/mob/living/proc/can_use_guns(var/obj/item/weapon/G)
|
||||
if (G.trigger_guard != TRIGGER_GUARD_ALLOW_ALL && !IsAdvancedToolUser())
|
||||
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return 0
|
||||
@@ -0,0 +1,75 @@
|
||||
/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"
|
||||
speak_chance = 80
|
||||
maxHealth = 220
|
||||
health = 220
|
||||
loot = list(/obj/effect/gibspawner/generic)
|
||||
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/gorilla = 4)
|
||||
response_help = "prods"
|
||||
response_disarm = "challenges"
|
||||
response_harm = "thumps"
|
||||
speed = 1
|
||||
melee_damage_lower = 15
|
||||
melee_damage_upper = 18
|
||||
damage_coeff = list(BRUTE = 1, BURN = 1.5, TOX = 1.5, CLONE = 0, STAMINA = 0, OXY = 1.5)
|
||||
obj_damage = 20
|
||||
environment_smash = 2
|
||||
attacktext = "pummels"
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
faction = list("jungle")
|
||||
robust_searching = TRUE
|
||||
stat_attack = UNCONSCIOUS
|
||||
minbodytemp = 270
|
||||
maxbodytemp = 350
|
||||
|
||||
// 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.
|
||||
/mob/living/simple_animal/hostile/gorilla/proc/target_bodyparts(atom/the_target)
|
||||
var/list/parts = list()
|
||||
if(iscarbon(the_target))
|
||||
var/mob/living/carbon/C = the_target
|
||||
if(C.stat >= UNCONSCIOUS)
|
||||
for(var/X in C.bodyparts)
|
||||
var/obj/item/bodypart/BP = X
|
||||
if(BP.body_part != HEAD && BP.body_part != CHEST)
|
||||
if(BP.dismemberable)
|
||||
parts += BP
|
||||
return parts
|
||||
|
||||
/mob/living/simple_animal/hostile/gorilla/AttackingTarget()
|
||||
var/list/parts = target_bodyparts(target)
|
||||
if(parts != null)
|
||||
if(LAZYLEN(parts) == 0)
|
||||
return FALSE
|
||||
var/obj/item/bodypart/BP = pick(parts)
|
||||
BP.dismember()
|
||||
return ..()
|
||||
. = ..()
|
||||
if(. && isliving(target))
|
||||
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)
|
||||
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
|
||||
|
||||
/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)
|
||||
..()
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
/mob/living/simple_animal/hostile/gorilla/proc/apply_overlay(cache_index)
|
||||
. = gorilla_overlays[cache_index]
|
||||
if(.)
|
||||
add_overlay(.)
|
||||
|
||||
/mob/living/simple_animal/hostile/gorilla/proc/remove_overlay(cache_index)
|
||||
var/I = gorilla_overlays[cache_index]
|
||||
if(I)
|
||||
cut_overlay(I)
|
||||
gorilla_overlays[cache_index] = null
|
||||
|
||||
/mob/living/simple_animal/hostile/gorilla/update_inv_hands()
|
||||
cut_overlays("standing_overlay")
|
||||
remove_overlay(GORILLA_HANDS_LAYER)
|
||||
|
||||
var/standing = FALSE
|
||||
for(var/I in held_items)
|
||||
if(I)
|
||||
standing = TRUE
|
||||
break
|
||||
if(!standing)
|
||||
if(stat != DEAD)
|
||||
icon_state = "crawling"
|
||||
speed = 1
|
||||
return ..()
|
||||
if(stat != DEAD)
|
||||
icon_state = "standing"
|
||||
speed = 3 // Gorillas are slow when standing up.
|
||||
|
||||
var/list/hands_overlays = list()
|
||||
|
||||
var/obj/item/l_hand = get_item_for_held_index(1)
|
||||
var/obj/item/r_hand = get_item_for_held_index(2)
|
||||
|
||||
if(r_hand)
|
||||
var/r_state = r_hand.item_state ? r_hand.item_state : r_hand.icon_state
|
||||
var/mutable_appearance/r_hand_overlay = r_hand.build_worn_icon(state = r_state, default_layer = GORILLA_HANDS_LAYER, default_icon_file = r_hand.righthand_file, isinhands = TRUE)
|
||||
r_hand_overlay.pixel_y -= 1
|
||||
hands_overlays += r_hand_overlay
|
||||
|
||||
if(l_hand)
|
||||
var/l_state = l_hand.item_state ? l_hand.item_state : l_hand.icon_state
|
||||
var/mutable_appearance/l_hand_overlay = l_hand.build_worn_icon(state = l_state, default_layer = GORILLA_HANDS_LAYER, default_icon_file = l_hand.lefthand_file, isinhands = TRUE)
|
||||
l_hand_overlay.pixel_y -= 1
|
||||
hands_overlays += l_hand_overlay
|
||||
|
||||
if(hands_overlays.len)
|
||||
gorilla_overlays[GORILLA_HANDS_LAYER] = hands_overlays
|
||||
apply_overlay(GORILLA_HANDS_LAYER)
|
||||
add_overlay("standing_overlay")
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/gorilla/regenerate_icons()
|
||||
update_inv_hands()
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/datum/emote/sound/gorilla
|
||||
mob_type_allowed_typecache = /mob/living/simple_animal/hostile/gorilla
|
||||
mob_type_blacklist_typecache = list()
|
||||
|
||||
/datum/emote/sound/gorilla/ooga
|
||||
key = "ooga"
|
||||
key_third_person = "oogas"
|
||||
message = "oogas."
|
||||
message_param = "oogas at %t."
|
||||
sound = "sound/creatures/gorilla.ogg"
|
||||
|
||||
@@ -386,14 +386,14 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/update_canmove()
|
||||
/mob/living/simple_animal/update_canmove(value_otherwise = TRUE)
|
||||
if(IsUnconscious() || IsStun() || IsKnockdown() || stat || resting)
|
||||
drop_all_held_items()
|
||||
canmove = 0
|
||||
canmove = FALSE
|
||||
else if(buckled)
|
||||
canmove = 0
|
||||
canmove = FALSE
|
||||
else
|
||||
canmove = 1
|
||||
canmove = value_otherwise
|
||||
update_transform()
|
||||
update_action_buttons_icon()
|
||||
return canmove
|
||||
|
||||
@@ -495,6 +495,30 @@
|
||||
. = new_corgi
|
||||
qdel(src)
|
||||
|
||||
/mob/living/carbon/proc/gorillize()
|
||||
if(notransform)
|
||||
return
|
||||
|
||||
var/Itemlist = get_equipped_items()
|
||||
Itemlist += held_items
|
||||
for(var/obj/item/W in Itemlist)
|
||||
dropItemToGround(W, TRUE)
|
||||
|
||||
regenerate_icons()
|
||||
notransform = TRUE
|
||||
canmove = FALSE
|
||||
icon = null
|
||||
invisibility = INVISIBILITY_MAXIMUM
|
||||
var/mob/living/simple_animal/hostile/gorilla/new_gorilla = new (get_turf(src))
|
||||
new_gorilla.a_intent = INTENT_HARM
|
||||
if(mind)
|
||||
mind.transfer_to(new_gorilla)
|
||||
else
|
||||
new_gorilla.key = key
|
||||
to_chat(new_gorilla, "<B>You are now a gorilla. Ooga ooga!</B>")
|
||||
. = new_gorilla
|
||||
qdel(src)
|
||||
|
||||
/mob/living/carbon/human/Animalize()
|
||||
|
||||
var/list/mobtypes = typesof(/mob/living/simple_animal)
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
if("animal")
|
||||
var/path
|
||||
if(prob(50))
|
||||
var/beast = pick("carp","bear","mushroom","statue", "bat", "goat","killertomato", "spiderbase", "spiderhunter", "blobbernaut", "magicarp", "chaosmagicarp", "watcher", "goliath", "headcrab", "morph", "stickman", "stickdog", "lesserdragon")
|
||||
var/beast = pick("carp","bear","mushroom","statue", "bat", "goat","killertomato", "spiderbase", "spiderhunter", "blobbernaut", "magicarp", "chaosmagicarp", "watcher", "goliath", "headcrab", "morph", "stickman", "stickdog", "lesserdragon", "gorilla")
|
||||
switch(beast)
|
||||
if("carp")
|
||||
path = /mob/living/simple_animal/hostile/carp
|
||||
@@ -205,6 +205,8 @@
|
||||
path = /mob/living/simple_animal/hostile/stickman/dog
|
||||
if("lesserdragon")
|
||||
path = /mob/living/simple_animal/hostile/megafauna/dragon/lesser
|
||||
if("gorilla")
|
||||
path = /mob/living/simple_animal/hostile/gorilla
|
||||
else
|
||||
var/animal = pick("parrot","corgi","crab","pug","cat","mouse","chicken","cow","lizard","chick","fox","butterfly","cak")
|
||||
switch(animal)
|
||||
|
||||
Reference in New Issue
Block a user