mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
Monkeys now react to being attacked by doing emotes and trying to run away.
This commit is contained in:
@@ -1018,6 +1018,9 @@
|
||||
for(var/mob/O in viewers(4, user))
|
||||
O.show_message("\red [user] takes a blood sample from [target].", 1)
|
||||
|
||||
if(prob(2) && istype(T,/mob/living/carbon/monkey))
|
||||
T:react_to_attack(user)
|
||||
|
||||
else //if not mob
|
||||
if(!target.reagents.total_volume)
|
||||
user << "\red [target] is empty."
|
||||
@@ -1059,6 +1062,9 @@
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("\red [] injects [] with the syringe!", user, target), 1)
|
||||
src.reagents.reaction(target, INGEST)
|
||||
if(prob(2) && istype(target,/mob/living/carbon/monkey))
|
||||
var/mob/living/carbon/monkey/M = target
|
||||
M.react_to_attack(user)
|
||||
if(ismob(target) && target == user)
|
||||
src.reagents.reaction(target, INGEST)
|
||||
spawn(5)
|
||||
|
||||
@@ -88,11 +88,7 @@
|
||||
for(var/obj/item/weapon/grab/G in src)
|
||||
G.process()
|
||||
|
||||
if(!client && !stat)
|
||||
if(prob(33) && canmove && isturf(loc))
|
||||
step(src, pick(cardinal))
|
||||
if(prob(1))
|
||||
emote(pick("scratch","jump","roll","tail"))
|
||||
npc_act()
|
||||
|
||||
/mob/living/carbon/monkey
|
||||
proc
|
||||
|
||||
@@ -177,6 +177,7 @@
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(istype(D, /datum/disease/jungle_fever))
|
||||
contract_disease(D,1,0)
|
||||
react_to_attack(M)
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M.name] has attempted to bite [name]!</B>", 1)
|
||||
@@ -239,11 +240,13 @@
|
||||
return
|
||||
bruteloss += damage
|
||||
updatehealth()
|
||||
react_to_attack(M)
|
||||
else
|
||||
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has attempted to [attack_verb] [name]!</B>", M), 1)
|
||||
react_to_attack(M)
|
||||
else
|
||||
if (M.a_intent == "grab")
|
||||
if (M == src)
|
||||
@@ -265,6 +268,8 @@
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
|
||||
|
||||
if(prob(1)) react_to_attack(M)
|
||||
else
|
||||
if (!( paralysis ))
|
||||
if (prob(25))
|
||||
@@ -273,12 +278,14 @@
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has pushed down [name]!</B>", M), 1)
|
||||
react_to_attack(M)
|
||||
else
|
||||
drop_item()
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
|
||||
react_to_attack(M)
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
||||
@@ -313,6 +320,7 @@
|
||||
O.show_message(text("\red <B>[] has slashed [name]!</B>", M), 1)
|
||||
bruteloss += damage
|
||||
updatehealth()
|
||||
react_to_attack(M)
|
||||
else
|
||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
@@ -353,6 +361,7 @@
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
|
||||
bruteloss += damage
|
||||
react_to_attack(M)
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
@@ -415,6 +424,7 @@
|
||||
|
||||
|
||||
updatehealth()
|
||||
react_to_attack(M)
|
||||
|
||||
return
|
||||
|
||||
@@ -562,6 +572,15 @@
|
||||
M.UpdateFeed(src)
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
var/chealth = health
|
||||
var/rval = ..()
|
||||
if(chealth > health)
|
||||
// we were damaged!
|
||||
react_to_attack(user)
|
||||
|
||||
return rval
|
||||
|
||||
/mob/living/carbon/monkey/verb/removeinternal()
|
||||
set name = "Remove Internals"
|
||||
set category = "IC"
|
||||
|
||||
@@ -72,4 +72,8 @@
|
||||
if(slur) apply_effect(slur, SLUR, blocked)
|
||||
if(eyeblur) apply_effect(eyeblur, EYE_BLUR, blocked)
|
||||
if(drowsy) apply_effect(drowsy, DROWSY, blocked)
|
||||
return 1
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/proc/react_to_attack(mob/M)
|
||||
return
|
||||
Reference in New Issue
Block a user