mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Merge pull request #8817 from uraniummeltdown/mob
[READY] Mob Proc Cleanup
This commit is contained in:
@@ -9,15 +9,10 @@
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
gender = NEUTER
|
||||
dna = null
|
||||
|
||||
|
||||
alien_talk_understand = 1
|
||||
|
||||
nightvision = 1
|
||||
|
||||
var/obj/item/card/id/wear_id = null // Fix for station bounced radios -- Skie
|
||||
var/has_fine_manipulation = 0
|
||||
|
||||
var/move_delay_add = 0 // movement delay to add
|
||||
|
||||
status_flags = CANPARALYSE|CANPUSH
|
||||
@@ -27,7 +22,6 @@
|
||||
var/heat_protection = 0.5
|
||||
var/leaping = 0
|
||||
ventcrawler = 2
|
||||
|
||||
var/list/alien_organs = list()
|
||||
|
||||
/mob/living/carbon/alien/New()
|
||||
@@ -118,31 +112,6 @@
|
||||
else
|
||||
clear_alert("alien_fire")
|
||||
|
||||
/mob/living/carbon/alien/handle_mutations_and_radiation()
|
||||
// Aliens love radiation nom nom nom
|
||||
if(radiation)
|
||||
if(radiation > 100)
|
||||
radiation = 100
|
||||
|
||||
if(radiation < 0)
|
||||
radiation = 0
|
||||
|
||||
switch(radiation)
|
||||
if(1 to 49)
|
||||
radiation--
|
||||
if(prob(25))
|
||||
adjustToxLoss(1)
|
||||
|
||||
if(50 to 74)
|
||||
radiation -= 2
|
||||
adjustToxLoss(1)
|
||||
if(prob(5))
|
||||
radiation -= 5
|
||||
|
||||
if(75 to 100)
|
||||
radiation -= 3
|
||||
adjustToxLoss(3)
|
||||
|
||||
/mob/living/carbon/alien/handle_fire()//Aliens on fire code
|
||||
if(..())
|
||||
return
|
||||
|
||||
+5
-8
@@ -5,7 +5,7 @@
|
||||
As such, they can either help or harm other aliens. Help works like the human help command while harm is a simple nibble.
|
||||
In all, this is a lot like the monkey code. /N
|
||||
*/
|
||||
/mob/living/carbon/alien/attack_alien(mob/living/carbon/alien/M as mob)
|
||||
/mob/living/carbon/alien/attack_alien(mob/living/carbon/alien/M)
|
||||
if(!ticker)
|
||||
to_chat(M, "You cannot attack people before the game has started.")
|
||||
return
|
||||
@@ -40,14 +40,12 @@ In all, this is a lot like the monkey code. /N
|
||||
else
|
||||
to_chat(M, "<span class='warning'>[name] is too injured for that.</span>")
|
||||
|
||||
/mob/living/carbon/alien/attack_larva(mob/living/carbon/alien/larva/L as mob)
|
||||
/mob/living/carbon/alien/attack_larva(mob/living/carbon/alien/larva/L)
|
||||
return attack_alien(L)
|
||||
|
||||
/mob/living/carbon/alien/attack_hand(mob/living/carbon/human/M as mob)
|
||||
/mob/living/carbon/alien/attack_hand(mob/living/carbon/human/M)
|
||||
if(..()) //to allow surgery to return properly.
|
||||
return 0
|
||||
if(istype(src,/mob/living/carbon/alien/humanoid))
|
||||
return 0 //this is horrible but 100% necessary
|
||||
|
||||
switch(M.a_intent)
|
||||
if(INTENT_HELP)
|
||||
@@ -55,12 +53,11 @@ In all, this is a lot like the monkey code. /N
|
||||
if(INTENT_GRAB)
|
||||
grabbedby(M)
|
||||
if(INTENT_HARM, INTENT_DISARM)
|
||||
M.do_attack_animation(src)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/alien/attack_animal(mob/living/simple_animal/M as mob)
|
||||
/mob/living/carbon/alien/attack_animal(mob/living/simple_animal/M)
|
||||
if(..())
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
switch(M.melee_damage_type)
|
||||
@@ -78,138 +78,14 @@
|
||||
|
||||
updatehealth()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
if(!ticker)
|
||||
to_chat(M, "You cannot attack people before the game has started.")
|
||||
return
|
||||
|
||||
if(M.Victim) return // can't attack while eating!
|
||||
|
||||
if(stat > -100)
|
||||
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>The [M.name] glomps [src]!</span>", \
|
||||
"<span class='userdanger'>The [M.name] glomps [src]!</span>")
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
if(M.is_adult)
|
||||
damage = rand(10, 40)
|
||||
else
|
||||
damage = rand(5, 35)
|
||||
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
if(M.powerlevel > 0)
|
||||
var/stunprob = 10
|
||||
var/power = M.powerlevel + rand(0,3)
|
||||
|
||||
switch(M.powerlevel)
|
||||
if(1 to 2) stunprob = 20
|
||||
if(3 to 4) stunprob = 30
|
||||
if(5 to 6) stunprob = 40
|
||||
if(7 to 8) stunprob = 60
|
||||
if(9) stunprob = 70
|
||||
if(10) stunprob = 95
|
||||
|
||||
if(prob(stunprob))
|
||||
M.powerlevel -= 3
|
||||
if(M.powerlevel < 0)
|
||||
M.powerlevel = 0
|
||||
|
||||
visible_message("<span class='danger'>The [M.name] has shocked [src]!</span>", \
|
||||
"<span class='userdanger'>The [M.name] has shocked [src]!</span>")
|
||||
|
||||
Weaken(power)
|
||||
if(stuttering < power)
|
||||
stuttering = power
|
||||
Stun(power)
|
||||
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
|
||||
if(prob(stunprob) && M.powerlevel >= 8)
|
||||
adjustFireLoss(M.powerlevel * rand(6,10))
|
||||
|
||||
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.custom_emote(1, "[M.friendly] [src]")
|
||||
else
|
||||
M.do_attack_animation(src)
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", \
|
||||
"<span class='userdanger'>[M] [M.attacktext] [src]!</span>")
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if(!ticker)
|
||||
to_chat(M, "You cannot attack people before the game has started.")
|
||||
return
|
||||
|
||||
if(istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
to_chat(M, "No attacking people at spawn, you jackass.")
|
||||
return
|
||||
|
||||
if(..()) //to allow surgery to return properly.
|
||||
return
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if(INTENT_HELP)
|
||||
help_shake_act(M)
|
||||
|
||||
if(INTENT_GRAB)
|
||||
grabbedby(M)
|
||||
|
||||
if(INTENT_HARM)
|
||||
M.do_attack_animation(src)
|
||||
var/damage = rand(1, 9)
|
||||
if(prob(90))
|
||||
if(HULK in M.mutations)//HULK SMASH
|
||||
damage = 15
|
||||
spawn(0)
|
||||
Paralyse(1)
|
||||
step_away(src,M,15)
|
||||
sleep(3)
|
||||
step_away(src,M,15)
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has punched [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has punched [src]!</span>")
|
||||
if((stat != DEAD) && (damage > 9||prob(5)))//Regular humans have a very small chance of weakening an alien.
|
||||
Paralyse(2)
|
||||
visible_message("<span class='danger'>[M] has weakened [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has weakened [src]!</span>", \
|
||||
"<span class='danger'>You hear someone fall.</span>")
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has attempted to punch [src]!</span>")
|
||||
|
||||
if(INTENT_DISARM)
|
||||
if(!lying)
|
||||
if(prob(5))//Very small chance to push an alien down.
|
||||
Paralyse(2)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has pushed down [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has pushed down [src]!</span>")
|
||||
else
|
||||
if(prob(50))
|
||||
drop_item()
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has disarmed [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has disarmed [src]!</span>")
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has attempted to disarm [src]!</span>")
|
||||
/mob/living/carbon/alien/humanoid/attack_slime(mob/living/carbon/slime/M)
|
||||
..()
|
||||
var/damage = rand(5, 35)
|
||||
if(M.is_adult)
|
||||
damage = rand(10, 40)
|
||||
adjustBruteLoss(damage)
|
||||
add_attack_logs(src, M, "Slime'd for [damage] damage")
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/restrained()
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M)
|
||||
if(..())
|
||||
switch(M.a_intent)
|
||||
if(INTENT_HARM)
|
||||
var/damage = rand(1, 9)
|
||||
if(prob(90))
|
||||
if(HULK in M.mutations)//HULK SMASH
|
||||
damage = 15
|
||||
spawn(0)
|
||||
Paralyse(1)
|
||||
step_away(src, M, 15)
|
||||
sleep(3)
|
||||
step_away(src, M, 15)
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has punched [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has punched [src]!</span>")
|
||||
if((stat != DEAD) && (damage > 9||prob(5)))//Regular humans have a very small chance of weakening an alien.
|
||||
Paralyse(2)
|
||||
visible_message("<span class='danger'>[M] has weakened [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has weakened [src]!</span>", \
|
||||
"<span class='danger'>You hear someone fall.</span>")
|
||||
adjustBruteLoss(damage)
|
||||
add_attack_logs(M, src, "Melee attacked with fists")
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has attempted to punch [src]!</span>")
|
||||
|
||||
if(INTENT_DISARM)
|
||||
if(!lying)
|
||||
if(prob(5))//Very small chance to push an alien down.
|
||||
Paralyse(2)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
add_attack_logs(M, src, "Pushed over")
|
||||
visible_message("<span class='danger'>[M] has pushed down [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has pushed down [src]!</span>")
|
||||
else
|
||||
if(prob(50))
|
||||
drop_item()
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has disarmed [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has disarmed [src]!</span>")
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has attempted to disarm [src]!</span>")
|
||||
@@ -73,91 +73,15 @@
|
||||
/mob/living/carbon/alien/larva/attack_ui(slot_id)
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/larva/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.custom_emote(1, "[M.friendly] [src]")
|
||||
else
|
||||
M.do_attack_animation(src)
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", \
|
||||
"<span class='userdanger'>[M] [M.attacktext] [src]!</span>")
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
add_attack_logs(M, src, "Animal attacked", FALSE)
|
||||
updatehealth()
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
if(!ticker)
|
||||
to_chat(M, "You cannot attack people before the game has started.")
|
||||
return
|
||||
|
||||
if(M.Victim)
|
||||
return // can't attack while eating!
|
||||
|
||||
if(stat != DEAD)
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>The [M.name] glomps [src]!</span>", \
|
||||
"<span class='userdanger'>The [M.name] glomps [src]!</span>")
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
if(M.is_adult)
|
||||
damage = rand(20, 40)
|
||||
else
|
||||
damage = rand(5, 35)
|
||||
|
||||
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/larva/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if(!ticker)
|
||||
to_chat(M, "You cannot attack people before the game has started.")
|
||||
return
|
||||
|
||||
if(istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
to_chat(M, "No attacking people at spawn, you jackass.")
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/larva/attack_slime(mob/living/carbon/slime/M)
|
||||
..()
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if(INTENT_HELP)
|
||||
help_shake_act(M)
|
||||
|
||||
if(INTENT_GRAB)
|
||||
grabbedby(M)
|
||||
|
||||
else
|
||||
M.do_attack_animation(src)
|
||||
var/damage = rand(1, 9)
|
||||
if(prob(90))
|
||||
if(HULK in M.mutations)
|
||||
damage += 5
|
||||
spawn(0)
|
||||
Paralyse(1)
|
||||
step_away(src,M,15)
|
||||
sleep(3)
|
||||
step_away(src,M,15)
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has kicked [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has kicked [src]!</span>")
|
||||
if((stat != DEAD) && (damage > 4.9))
|
||||
Paralyse(rand(5,10))
|
||||
visible_message("<span class='danger'>[M] has weakened [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has weakened [src]!</span>", \
|
||||
"<span class='danger'>You hear someone fall.</span>")
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has attempted to kick [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has attempted to kick [src]!</span>")
|
||||
var/damage = rand(5, 35)
|
||||
if(M.is_adult)
|
||||
damage = rand(20, 40)
|
||||
adjustBruteLoss(damage)
|
||||
add_attack_logs(src, M, "Slime'd for [damage] damage")
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/larva/restrained()
|
||||
return 0
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/mob/living/carbon/alien/larva/attack_hand(mob/living/carbon/human/M)
|
||||
if(..())
|
||||
var/damage = rand(1, 9)
|
||||
if(prob(90))
|
||||
if(HULK in M.mutations)
|
||||
damage += 5
|
||||
spawn(0)
|
||||
Paralyse(1)
|
||||
step_away(src, M, 15)
|
||||
sleep(3)
|
||||
step_away(src, M, 15)
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
add_attack_logs(M, src, "Melee attacked with fists")
|
||||
visible_message("<span class='danger'>[M] has kicked [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has kicked [src]!</span>")
|
||||
if((stat != DEAD) && (damage > 4.9))
|
||||
Paralyse(rand(5,10))
|
||||
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has attempted to kick [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has attempted to kick [src]!</span>")
|
||||
@@ -1,36 +1,20 @@
|
||||
/mob/living/carbon/brain/handle_mutations_and_radiation()
|
||||
if(radiation)
|
||||
if(radiation > 100)
|
||||
radiation -= 3
|
||||
adjustToxLoss(3)
|
||||
updatehealth()
|
||||
if(!container)
|
||||
to_chat(src, "<span class='danger'>You feel weak.</span>")
|
||||
else
|
||||
to_chat(src, "<span class='danger'>STATUS: CRITICAL AMOUNTS OF RADIATION DETECTED.</span>")
|
||||
|
||||
switch(radiation)
|
||||
if(0 to 49)
|
||||
radiation--
|
||||
if(prob(25))
|
||||
adjustToxLoss(1)
|
||||
updatehealth()
|
||||
|
||||
if(50 to 74)
|
||||
radiation -= 2
|
||||
adjustToxLoss(1)
|
||||
if(50 to 75)
|
||||
if(prob(5))
|
||||
radiation -= 5
|
||||
if(!container)
|
||||
to_chat(src, "<span class='danger'>You feel weak.</span>")
|
||||
else
|
||||
to_chat(src, "<span class='danger'>STATUS: DANGEROUS AMOUNTS OF RADIATION DETECTED.</span>")
|
||||
updatehealth()
|
||||
|
||||
if(75 to 100)
|
||||
radiation -= 3
|
||||
adjustToxLoss(3)
|
||||
updatehealth()
|
||||
..()
|
||||
|
||||
/mob/living/carbon/brain/proc/handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
|
||||
if(status_flags & GODMODE)
|
||||
@@ -38,13 +22,10 @@
|
||||
|
||||
if(exposed_temperature > bodytemperature)
|
||||
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
|
||||
//adjustFireLoss(2.5*discomfort)
|
||||
//adjustFireLoss(5.0*discomfort)
|
||||
adjustFireLoss(20.0*discomfort)
|
||||
|
||||
else
|
||||
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
|
||||
//adjustFireLoss(2.5*discomfort)
|
||||
adjustFireLoss(5.0*discomfort)
|
||||
|
||||
/mob/living/carbon/brain/handle_regular_status_updates()
|
||||
|
||||
@@ -201,11 +201,12 @@
|
||||
swap_hand()
|
||||
|
||||
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
|
||||
if(src.health >= config.health_threshold_crit)
|
||||
if(src == M && istype(src, /mob/living/carbon/human))
|
||||
add_attack_logs(M, src, "Shaked", admin_notify = FALSE)
|
||||
if(health >= config.health_threshold_crit)
|
||||
if(src == M && ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
src.visible_message( \
|
||||
text("<span class='notice'>[src] examines [].</span>",src.gender==MALE?"himself":"herself"), \
|
||||
visible_message( \
|
||||
text("<span class='notice'>[src] examines [].</span>",gender==MALE?"himself":"herself"), \
|
||||
"<span class='notice'>You check yourself for injuries.</span>" \
|
||||
)
|
||||
|
||||
@@ -259,20 +260,21 @@
|
||||
"<span class='notice'>You shake [src], but they are unresponsive. Probably suffering from SSD.</span>")
|
||||
if(lying) // /vg/: For hugs. This is how update_icon figgers it out, anyway. - N3X15
|
||||
var/t_him = "it"
|
||||
if(src.gender == MALE)
|
||||
if(gender == MALE)
|
||||
t_him = "him"
|
||||
else if(src.gender == FEMALE)
|
||||
else if(gender == FEMALE)
|
||||
t_him = "her"
|
||||
if(istype(src,/mob/living/carbon/human) && src:w_uniform)
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
H.w_uniform.add_fingerprint(M)
|
||||
if(H.w_uniform)
|
||||
H.w_uniform.add_fingerprint(M)
|
||||
AdjustSleeping(-5)
|
||||
if(src.sleeping == 0)
|
||||
src.resting = 0
|
||||
if(sleeping == 0)
|
||||
resting = 0
|
||||
AdjustParalysis(-3)
|
||||
AdjustStunned(-3)
|
||||
AdjustWeakened(-3)
|
||||
playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
if(!player_logged)
|
||||
M.visible_message( \
|
||||
"<span class='notice'>[M] shakes [src] trying to wake [t_him] up!</span>",\
|
||||
@@ -292,7 +294,7 @@
|
||||
"<span class='notice'>[M] gives [src] a [pick("hug","warm embrace")].</span>",\
|
||||
"<span class='notice'>You hug [src].</span>",\
|
||||
)
|
||||
if(istype(src,/mob/living/carbon/human))
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(H.wear_suit)
|
||||
H.wear_suit.add_fingerprint(M)
|
||||
|
||||
+23
-6
@@ -18,12 +18,11 @@
|
||||
|
||||
|
||||
/mob/living/carbon/attackby(obj/item/I, mob/user, params)
|
||||
if(lying)
|
||||
if(surgeries.len)
|
||||
if(user != src && user.a_intent == INTENT_HELP)
|
||||
for(var/datum/surgery/S in surgeries)
|
||||
if(S.next_step(user, src))
|
||||
return 1
|
||||
if(lying && surgeries.len)
|
||||
if(user != src && user.a_intent == INTENT_HELP)
|
||||
for(var/datum/surgery/S in surgeries)
|
||||
if(S.next_step(user, src))
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/attack_hand(mob/living/carbon/human/user)
|
||||
@@ -39,8 +38,26 @@
|
||||
var/datum/disease/D = thing
|
||||
if(D.IsSpreadByTouch())
|
||||
ContractDisease(D)
|
||||
|
||||
if(lying && surgeries.len)
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
for(var/datum/surgery/S in surgeries)
|
||||
if(S.next_step(user, user.a_intent))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/attack_slime(mob/living/carbon/slime/M)
|
||||
if(..())
|
||||
var/power = M.powerlevel + rand(0,3)
|
||||
Weaken(power)
|
||||
Stuttering(power)
|
||||
Stun(power)
|
||||
var/stunprob = M.powerlevel * 7 + 10
|
||||
if(prob(stunprob) && M.powerlevel >= 8)
|
||||
adjustFireLoss(M.powerlevel * rand(6,10))
|
||||
updatehealth()
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/is_mouth_covered(head_only = FALSE, mask_only = FALSE)
|
||||
if((!mask_only && head && (head.flags_cover & HEADCOVERSMOUTH)) || (!head_only && wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH)))
|
||||
return TRUE
|
||||
@@ -306,112 +306,6 @@
|
||||
return 0
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.custom_emote(1, "[M.friendly] [src]")
|
||||
else
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", \
|
||||
"<span class='userdanger'>[M] [M.attacktext] [src]!</span>")
|
||||
add_attack_logs(M, src, "Animal attacked")
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
if(check_shields(damage, "the [M.name]", null, MELEE_ATTACK, M.armour_penetration))
|
||||
return 0
|
||||
var/dam_zone = pick("head", "chest", "groin", "l_arm", "l_hand", "r_arm", "r_hand", "l_leg", "l_foot", "r_leg", "r_foot")
|
||||
var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone))
|
||||
var/armor = run_armor_check(affecting, "melee", armour_penetration = M.armour_penetration)
|
||||
|
||||
var/obj/item/organ/external/affected = src.get_organ(dam_zone)
|
||||
if(affected)
|
||||
affected.add_autopsy_data(M.name, damage) // Add the mob's name to the autopsy data
|
||||
apply_damage(damage, M.melee_damage_type, affecting, armor)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/carbon/human/attack_larva(mob/living/carbon/alien/larva/L as mob)
|
||||
|
||||
switch(L.a_intent)
|
||||
if(INTENT_HELP)
|
||||
visible_message("<span class='notice'>[L] rubs its head against [src].</span>")
|
||||
|
||||
|
||||
else
|
||||
L.do_attack_animation(src)
|
||||
var/damage = rand(1, 3)
|
||||
visible_message("<span class='danger'>[L] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[L] bites [src]!</span>")
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
|
||||
if(stat != DEAD)
|
||||
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
|
||||
var/obj/item/organ/external/affecting = get_organ(ran_zone(L.zone_sel.selecting))
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
|
||||
/mob/living/carbon/human/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
if(M.Victim) return // can't attack while eating!
|
||||
|
||||
if(stat != DEAD)
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>The [M.name] glomps [src]!</span>", \
|
||||
"<span class='userdanger'>The [M.name] glomps [src]!</span>")
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
if(M.is_adult)
|
||||
damage = rand(10, 35)
|
||||
else
|
||||
damage = rand(5, 25)
|
||||
|
||||
if(check_shields(damage, "the [M.name]", null, MELEE_ATTACK))
|
||||
return 0
|
||||
|
||||
var/dam_zone = pick("head", "chest", "groin", "l_arm", "l_hand", "r_arm", "r_hand", "l_leg", "l_foot", "r_leg", "r_foot")
|
||||
|
||||
var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone))
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
|
||||
|
||||
if(M.powerlevel > 0)
|
||||
var/stunprob = 10
|
||||
var/power = M.powerlevel + rand(0,3)
|
||||
|
||||
switch(M.powerlevel)
|
||||
if(1 to 2) stunprob = 20
|
||||
if(3 to 4) stunprob = 30
|
||||
if(5 to 6) stunprob = 40
|
||||
if(7 to 8) stunprob = 60
|
||||
if(9) stunprob = 70
|
||||
if(10) stunprob = 95
|
||||
|
||||
if(prob(stunprob))
|
||||
M.powerlevel -= 3
|
||||
if(M.powerlevel < 0)
|
||||
M.powerlevel = 0
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if((O.client && !( O.blinded )))
|
||||
O.show_message(text("<span class='danger'>The [M.name] has shocked []!</span>", src), 1)
|
||||
|
||||
Weaken(power)
|
||||
Stuttering(power)
|
||||
Stun(power)
|
||||
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
|
||||
if(prob(stunprob) && M.powerlevel >= 8)
|
||||
adjustFireLoss(M.powerlevel * rand(6,10))
|
||||
|
||||
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/human/restrained()
|
||||
if(handcuffed)
|
||||
return 1
|
||||
@@ -1834,6 +1728,39 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/proc/do_cpr(mob/living/carbon/human/H)
|
||||
if(H.stat == DEAD || (H.status_flags & FAKEDEATH))
|
||||
to_chat(src, "<span class='warning'>[H.name] is dead!</span>")
|
||||
return
|
||||
if(!check_has_mouth())
|
||||
to_chat(src, "<span class='danger'>You don't have a mouth, you cannot perform CPR!</span>")
|
||||
return
|
||||
if(!H.check_has_mouth())
|
||||
to_chat(src, "<span class='danger'>They don't have a mouth, you cannot perform CPR!</span>")
|
||||
return
|
||||
if((head && (head.flags_cover & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH) && !wear_mask.mask_adjusted))
|
||||
to_chat(src, "<span class='warning'>Remove your mask first!</span>")
|
||||
return 0
|
||||
if((H.head && (H.head.flags_cover & HEADCOVERSMOUTH)) || (H.wear_mask && (H.wear_mask.flags_cover & MASKCOVERSMOUTH) && !H.wear_mask.mask_adjusted))
|
||||
to_chat(src, "<span class='warning'>Remove their mask first!</span>")
|
||||
return 0
|
||||
visible_message("<span class='danger'>[src] is trying to perform CPR on [H.name]!</span>", \
|
||||
"<span class='danger'>You try to perform CPR on [H.name]!</span>")
|
||||
if(do_mob(src, H, 40))
|
||||
if(H.health > config.health_threshold_dead && H.health <= config.health_threshold_crit)
|
||||
var/suff = min(H.getOxyLoss(), 7)
|
||||
H.adjustOxyLoss(-suff)
|
||||
H.updatehealth()
|
||||
visible_message("<span class='danger'>[src] performs CPR on [H.name]!</span>", \
|
||||
"<span class='notice'>You perform CPR on [H.name].</span>")
|
||||
|
||||
to_chat(H, "<span class='notice'>You feel a breath of fresh air enter your lungs. It feels good.</span>")
|
||||
to_chat(src, "<span class='alert'>Repeat at least every 7 seconds.")
|
||||
add_attack_logs(src, H, "CPRed", FALSE)
|
||||
return 1
|
||||
else
|
||||
to_chat(src, "<span class='danger'>You need to stay still while performing CPR!</span>")
|
||||
|
||||
/mob/living/carbon/human/canBeHandcuffed()
|
||||
if(get_num_arms() >= 2)
|
||||
return TRUE
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
/mob/living/carbon/human/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
||||
if(check_shields(0, M.name))
|
||||
visible_message("<span class='danger'>[M] attempted to touch [src]!</span>")
|
||||
return 0
|
||||
|
||||
switch(M.a_intent)
|
||||
if(INTENT_HELP)
|
||||
visible_message("<span class='notice'>[M] caresses [src] with its scythe like arm.</span>")
|
||||
|
||||
if(INTENT_GRAB)
|
||||
grabbedby(M)
|
||||
|
||||
if(INTENT_HARM)
|
||||
M.do_attack_animation(src)
|
||||
if(w_uniform)
|
||||
w_uniform.add_fingerprint(M)
|
||||
|
||||
var/damage = rand(15, 30)
|
||||
if(!damage)
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has lunged at [src]!</span>")
|
||||
return 0
|
||||
|
||||
var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has slashed at [src]!</span>")
|
||||
|
||||
apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
if(damage >= 25)
|
||||
visible_message("<span class='danger'>[M] has wounded [src]!</span>")
|
||||
apply_effect(4, WEAKEN, armor_block)
|
||||
updatehealth()
|
||||
|
||||
if(INTENT_DISARM)
|
||||
M.do_attack_animation(src)
|
||||
if(prob(80))
|
||||
var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
|
||||
apply_effect(5, WEAKEN, run_armor_check(affecting, "melee"))
|
||||
visible_message("<span class='danger'>[M] has tackled down [src]!</span>")
|
||||
else
|
||||
if(prob(99)) //this looks fucking stupid but it was previously 'var/randn = rand(1, 100); if(randn <= 99)'
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
|
||||
drop_item()
|
||||
visible_message("<span class='danger'>[M] disarmed [src]!</span>")
|
||||
else
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has tried to disarm [src]!</span>")
|
||||
@@ -1,201 +0,0 @@
|
||||
/mob/living/carbon/human/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if(istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
to_chat(M, "No attacking people at spawn, you jackass.")
|
||||
return
|
||||
|
||||
if(frozen)
|
||||
to_chat(M, "<span class='warning'>Do not touch Admin-Frozen people.</span>")
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H))
|
||||
var/obj/item/organ/external/temp = H.bodyparts_by_name["r_hand"]
|
||||
if(H.hand)
|
||||
temp = H.bodyparts_by_name["l_hand"]
|
||||
if(!temp || !temp.is_usable())
|
||||
to_chat(H, "<span class='warning'>You can't use your hand.</span>")
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
if((M != src) && M.a_intent != INTENT_HELP && check_shields(0, M.name, attack_type = UNARMED_ATTACK))
|
||||
add_attack_logs(M, src, "Melee attacked with fists (miss/block)")
|
||||
visible_message("<span class='warning'>[M] attempted to touch [src]!</span>")
|
||||
return 0
|
||||
|
||||
var/datum/martial_art/attacker_style = M.martial_art
|
||||
|
||||
species.handle_attack_hand(src, M)
|
||||
|
||||
switch(M.a_intent)
|
||||
if(INTENT_HELP)
|
||||
if(attacker_style && attacker_style.help_act(H, src))//adminfu only...
|
||||
return 1
|
||||
if(can_operate(src))
|
||||
if(health >= config.health_threshold_crit)
|
||||
if(src.surgeries.len)
|
||||
for(var/datum/surgery/S in src.surgeries)
|
||||
if(S.next_step(M, src))
|
||||
return 1
|
||||
help_shake_act(M)
|
||||
add_attack_logs(M, src, "Shaked")
|
||||
return 1
|
||||
if(health >= config.health_threshold_crit)
|
||||
help_shake_act(M)
|
||||
add_attack_logs(M, src, "Shaked")
|
||||
return 1
|
||||
if(!H.check_has_mouth())
|
||||
to_chat(H, "<span class='danger'>You don't have a mouth, you cannot perform CPR!</span>")
|
||||
return
|
||||
if(!check_has_mouth())
|
||||
to_chat(H, "<span class='danger'>They don't have a mouth, you cannot perform CPR!</span>")
|
||||
return
|
||||
if((M.head && (M.head.flags_cover & HEADCOVERSMOUTH)) || (M.wear_mask && (M.wear_mask.flags_cover & MASKCOVERSMOUTH) && !M.wear_mask.mask_adjusted))
|
||||
to_chat(M, "<span class='warning'>Remove your mask!</span>")
|
||||
return 0
|
||||
if((head && (head.flags_cover & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH) && !wear_mask.mask_adjusted))
|
||||
to_chat(M, "<span class='warning'>Remove his mask!</span>")
|
||||
return 0
|
||||
|
||||
M.visible_message("<span class='danger'>\The [M] is trying to perform CPR on \the [src]!</span>", \
|
||||
"<span class='danger'>You try to perform CPR on \the [src]!</span>")
|
||||
if(do_mob(M, src, 40))
|
||||
if(health > config.health_threshold_dead && health <= config.health_threshold_crit)
|
||||
var/suff = min(getOxyLoss(), 7)
|
||||
adjustOxyLoss(-suff)
|
||||
updatehealth()
|
||||
M.visible_message("<span class='danger'>\The [M] performs CPR on \the [src]!</span>", \
|
||||
"<span class='notice'>You perform CPR on \the [src].</span>")
|
||||
|
||||
to_chat(src, "<span class='notice'>You feel a breath of fresh air enter your lungs. It feels good.</span>")
|
||||
to_chat(M, "<span class='alert'>Repeat at least every 7 seconds.")
|
||||
add_attack_logs(M, src, "CPRed", FALSE)
|
||||
return 1
|
||||
else
|
||||
to_chat(M, "<span class='danger'>You need to stay still while performing CPR!</span>")
|
||||
|
||||
if(INTENT_GRAB)
|
||||
if(attacker_style && attacker_style.grab_act(H, src))
|
||||
return 1
|
||||
else
|
||||
src.grabbedby(M)
|
||||
return 1
|
||||
|
||||
if(INTENT_HARM)
|
||||
//Vampire code
|
||||
if(M.mind && M.mind.vampire && (M.mind in ticker.mode.vampires) && !M.mind.vampire.draining && M.zone_sel && M.zone_sel.selecting == "head" && src != M)
|
||||
if((NO_BLOOD in species.species_traits) || species.exotic_blood || !blood_volume)
|
||||
to_chat(M, "<span class='warning'>They have no blood!</span>")
|
||||
return
|
||||
if(mind && mind.vampire && (mind in ticker.mode.vampires))
|
||||
to_chat(M, "<span class='warning'>Your fangs fail to pierce [name]'s cold flesh</span>")
|
||||
return
|
||||
if(SKELETON in mutations)
|
||||
to_chat(M, "<span class='warning'>There is no blood in a skeleton!</span>")
|
||||
return
|
||||
if(issmall(src) && !ckey) //Monkeyized humans are okay, humanized monkeys are okay, NPC monkeys are not.
|
||||
to_chat(M, "<span class='warning'>Blood from a monkey is useless!</span>")
|
||||
return
|
||||
//we're good to suck the blood, blaah
|
||||
M.mind.vampire.handle_bloodsucking(src)
|
||||
add_attack_logs(M, src, "vampirebit")
|
||||
return
|
||||
//end vampire codes
|
||||
if(attacker_style && attacker_style.harm_act(H, src))
|
||||
return 1
|
||||
else
|
||||
var/datum/unarmed_attack/attack = M.species.unarmed
|
||||
|
||||
M.do_attack_animation(src)
|
||||
add_attack_logs(M, src, "Melee attacked with fists")
|
||||
|
||||
if(!iscarbon(M))
|
||||
LAssailant = null
|
||||
else
|
||||
LAssailant = M
|
||||
|
||||
var/damage = rand(M.species.punchdamagelow, M.species.punchdamagehigh)
|
||||
damage += attack.damage
|
||||
if(!damage)
|
||||
playsound(loc, attack.miss_sound, 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] tried to [pick(attack.attack_verb)] [src]!</span>")
|
||||
return 0
|
||||
|
||||
|
||||
var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
|
||||
if(HULK in M.mutations)
|
||||
adjustBruteLoss(15)
|
||||
|
||||
playsound(loc, attack.attack_sound, 25, 1, -1)
|
||||
|
||||
visible_message("<span class='danger'>[M] [pick(attack.attack_verb)]ed [src]!</span>")
|
||||
|
||||
apply_damage(damage, BRUTE, affecting, armor_block, sharp = attack.sharp) //moving this back here means Armalis are going to knock you down 70% of the time, but they're pure adminbus anyway.
|
||||
if((stat != DEAD) && damage >= M.species.punchstunthreshold)
|
||||
visible_message("<span class='danger'>[M] has weakened [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has weakened [src]!</span>")
|
||||
apply_effect(4, WEAKEN, armor_block)
|
||||
forcesay(hit_appends)
|
||||
else if(lying)
|
||||
forcesay(hit_appends)
|
||||
|
||||
|
||||
if(INTENT_DISARM)
|
||||
if(attacker_style && attacker_style.disarm_act(H, src))
|
||||
return 1
|
||||
else
|
||||
add_attack_logs(M, src, "Disarmed")
|
||||
|
||||
if(w_uniform)
|
||||
w_uniform.add_fingerprint(M)
|
||||
var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
|
||||
var/randn = rand(1, 100)
|
||||
if(randn <= 25)
|
||||
apply_effect(2, WEAKEN, run_armor_check(affecting, "melee"))
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has pushed [src]!</span>")
|
||||
add_attack_logs(M, src, "Pushed over")
|
||||
if(!iscarbon(M))
|
||||
LAssailant = null
|
||||
else
|
||||
LAssailant = M
|
||||
return
|
||||
|
||||
var/talked = 0 // BubbleWrap
|
||||
|
||||
if(randn <= 60)
|
||||
//BubbleWrap: Disarming breaks a pull
|
||||
if(pulling)
|
||||
visible_message("<span class='danger'>[M] has broken [src]'s grip on [pulling]!</span>")
|
||||
talked = 1
|
||||
stop_pulling()
|
||||
|
||||
//BubbleWrap: Disarming also breaks a grab - this will also stop someone being choked, won't it?
|
||||
if(istype(l_hand, /obj/item/grab))
|
||||
var/obj/item/grab/lgrab = l_hand
|
||||
if(lgrab.affecting)
|
||||
visible_message("<span class='danger'>[M] has broken [src]'s grip on [lgrab.affecting]!</span>")
|
||||
talked = 1
|
||||
spawn(1)
|
||||
qdel(lgrab)
|
||||
if(istype(r_hand, /obj/item/grab))
|
||||
var/obj/item/grab/rgrab = r_hand
|
||||
if(rgrab.affecting)
|
||||
visible_message("<span class='danger'>[M] has broken [src]'s grip on [rgrab.affecting]!</span>")
|
||||
talked = 1
|
||||
spawn(1)
|
||||
qdel(rgrab)
|
||||
//End BubbleWrap
|
||||
|
||||
if(!talked) //BubbleWrap
|
||||
if(drop_item())
|
||||
visible_message("<span class='danger'>[M] has disarmed [src]!</span>")
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
return
|
||||
|
||||
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] attempted to disarm [src]!</span>")
|
||||
return
|
||||
@@ -175,6 +175,11 @@ emp_act
|
||||
affecting.sabotaged = 1
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/grabbedby(mob/living/user)
|
||||
if(w_uniform)
|
||||
w_uniform.add_fingerprint(user)
|
||||
..()
|
||||
|
||||
//Returns 1 if the attack hit, 0 if it missed.
|
||||
/mob/living/carbon/human/attacked_by(obj/item/I, mob/living/user, def_zone)
|
||||
if(!I || !user)
|
||||
@@ -343,6 +348,99 @@ emp_act
|
||||
|
||||
if(penetrated_dam) SS.create_breaches(damtype, penetrated_dam)
|
||||
|
||||
/mob/living/carbon/human/attack_hand(mob/user)
|
||||
if(..()) //to allow surgery to return properly.
|
||||
return
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
species.spec_attack_hand(H, src)
|
||||
|
||||
/mob/living/carbon/human/attack_larva(mob/living/carbon/alien/larva/L)
|
||||
if(..()) //successful larva bite.
|
||||
var/damage = rand(1, 3)
|
||||
if(stat != DEAD)
|
||||
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
|
||||
var/obj/item/organ/external/affecting = get_organ(ran_zone(L.zone_sel.selecting))
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/carbon/human/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
if(check_shields(0, M.name))
|
||||
visible_message("<span class='danger'>[M] attempted to touch [src]!</span>")
|
||||
return 0
|
||||
|
||||
if(..())
|
||||
if(M.a_intent == INTENT_HARM)
|
||||
if(w_uniform)
|
||||
w_uniform.add_fingerprint(M)
|
||||
var/damage = rand(15, 30)
|
||||
if(!damage)
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has lunged at [src]!</span>")
|
||||
return 0
|
||||
var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has slashed at [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has slashed at [src]!</span>")
|
||||
|
||||
apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
if(damage >= 25)
|
||||
visible_message("<span class='danger'>[M] has wounded [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has wounded [src]!</span>")
|
||||
apply_effect(4, WEAKEN, armor_block)
|
||||
add_attack_logs(M, src, "Alien attacked")
|
||||
updatehealth()
|
||||
|
||||
if(M.a_intent == INTENT_DISARM)
|
||||
if(prob(80))
|
||||
var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
|
||||
apply_effect(5, WEAKEN, run_armor_check(affecting, "melee"))
|
||||
add_attack_logs(M, src, "Alien tackled")
|
||||
visible_message("<span class='danger'>[M] has tackled down [src]!</span>")
|
||||
else
|
||||
if(prob(99)) //this looks fucking stupid but it was previously 'var/randn = rand(1, 100); if(randn <= 99)'
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
|
||||
drop_item()
|
||||
visible_message("<span class='danger'>[M] disarmed [src]!</span>")
|
||||
else
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has tried to disarm [src]!</span>")
|
||||
|
||||
/mob/living/carbon/human/attack_animal(mob/living/simple_animal/M)
|
||||
if(..())
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
if(check_shields(damage, "the [M.name]", null, MELEE_ATTACK, M.armour_penetration))
|
||||
return 0
|
||||
var/dam_zone = pick("head", "chest", "groin", "l_arm", "l_hand", "r_arm", "r_hand", "l_leg", "l_foot", "r_leg", "r_foot")
|
||||
var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone))
|
||||
var/armor = run_armor_check(affecting, "melee", armour_penetration = M.armour_penetration)
|
||||
var/obj/item/organ/external/affected = src.get_organ(dam_zone)
|
||||
if(affected)
|
||||
affected.add_autopsy_data(M.name, damage) // Add the mob's name to the autopsy data
|
||||
apply_damage(damage, M.melee_damage_type, affecting, armor)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/carbon/human/attack_slime(mob/living/carbon/slime/M)
|
||||
..()
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
if(M.is_adult)
|
||||
damage = rand(10, 35)
|
||||
else
|
||||
damage = rand(5, 25)
|
||||
|
||||
var/dam_zone = pick("head", "chest", "groin", "l_arm", "l_hand", "r_arm", "r_hand", "l_leg", "l_foot", "r_leg", "r_foot")
|
||||
|
||||
var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone))
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/mech_melee_attack(obj/mecha/M)
|
||||
if(M.occupant.a_intent == INTENT_HARM)
|
||||
if(M.damtype == "brute")
|
||||
|
||||
@@ -56,30 +56,27 @@
|
||||
to_chat(C, "<span class='danger'><B>Your antennae tingle as you are overcome with pain...</B></span>")
|
||||
to_chat(C, "<span class='danger'>It feels like part of you has died.</span>")
|
||||
|
||||
/datum/species/wryn/handle_attack_hand(var/mob/living/carbon/human/H, var/mob/living/carbon/human/M)
|
||||
var/obj/item/organ/external/head/head_organ = H.get_organ("head")
|
||||
if(M.a_intent == INTENT_HARM)
|
||||
if(H.handcuffed)
|
||||
if(!H.get_int_organ(/obj/item/organ/internal/wryn/hivenode)) return
|
||||
var/turf/p_loc = M.loc
|
||||
var/turf/p_loc_m = H.loc
|
||||
/datum/species/wryn/harm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
|
||||
if(target.handcuffed && target.get_int_organ(/obj/item/organ/internal/wryn/hivenode))
|
||||
|
||||
M.visible_message("<span class='notice'>[M] begins to violently pull off [H]'s antennae.</span>")
|
||||
to_chat(H, "<span class='danger'><B>[M] grips your antennae and starts violently pulling!<B></span>")
|
||||
if(do_after(H, 250, target = src))
|
||||
if(p_loc == M.loc && p_loc_m == H.loc)
|
||||
var/obj/item/organ/internal/wryn/hivenode/node = new /obj/item/organ/internal/wryn/hivenode
|
||||
H.remove_language("Wryn Hivemind")
|
||||
node.remove(H)
|
||||
node.loc = M.loc
|
||||
to_chat(M, "<span class='notice'>You hear a loud crunch as you mercilessly pull off [H]'s antennae.</span>")
|
||||
to_chat(H, "<span class='danger'>You hear a loud crunch as your antennae is ripped off your head by [M].</span>")
|
||||
to_chat(H, "<span class='danger'><span class='danger'><B>It's so quiet...</B></span>")
|
||||
head_organ.h_style = "Bald"
|
||||
H.update_hair()
|
||||
user.visible_message("<span class='notice'>[user] begins to violently pull off [target]'s antennae.</span>")
|
||||
to_chat(target, "<span class='danger'><B>[user] grips your antennae and starts violently pulling!<B></span>")
|
||||
if(do_mob(user, target, 250))
|
||||
var/obj/item/organ/internal/wryn/hivenode/node = new /obj/item/organ/internal/wryn/hivenode
|
||||
target.remove_language("Wryn Hivemind")
|
||||
node.remove(target)
|
||||
node.forceMove(user.loc)
|
||||
to_chat(user, "<span class='notice'>You hear a loud crunch as you mercilessly pull off [target]'s antennae.</span>")
|
||||
to_chat(target, "<span class='danger'>You hear a loud crunch as your antennae is ripped off your head by [user].</span>")
|
||||
to_chat(target, "<span class='danger'><B>It's so quiet...</B></span>")
|
||||
var/obj/item/organ/external/head/head_organ = target.get_organ("head")
|
||||
head_organ.h_style = "Bald"
|
||||
target.update_hair()
|
||||
|
||||
add_attack_logs(M, H, "Antennae removed")
|
||||
return 0
|
||||
add_attack_logs(user, target, "Antennae removed")
|
||||
return 0
|
||||
else
|
||||
..()
|
||||
|
||||
/datum/species/nucleation
|
||||
name = "Nucleation"
|
||||
|
||||
@@ -315,8 +315,171 @@
|
||||
/datum/species/proc/handle_death(var/mob/living/carbon/human/H) //Handles any species-specific death events (such as dionaea nymph spawns).
|
||||
return
|
||||
|
||||
/datum/species/proc/handle_attack_hand(var/mob/living/carbon/human/H, var/mob/living/carbon/human/M) //Handles any species-specific attackhand events.
|
||||
return
|
||||
/datum/species/proc/help(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
|
||||
if(attacker_style && attacker_style.help_act(user, target))//adminfu only...
|
||||
return 1
|
||||
if(target.health >= config.health_threshold_crit)
|
||||
target.help_shake_act(user)
|
||||
return 1
|
||||
else
|
||||
user.do_cpr(target)
|
||||
|
||||
/datum/species/proc/grab(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
|
||||
if(attacker_style && attacker_style.grab_act(user, target))
|
||||
return 1
|
||||
else
|
||||
target.grabbedby(user)
|
||||
return 1
|
||||
|
||||
/datum/species/proc/harm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
|
||||
//Vampire code
|
||||
if(user.mind && user.mind.vampire && (user.mind in ticker.mode.vampires) && !user.mind.vampire.draining && user.zone_sel && user.zone_sel.selecting == "head" && target != user)
|
||||
if((NO_BLOOD in target.species.species_traits) || target.species.exotic_blood || !target.blood_volume)
|
||||
to_chat(user, "<span class='warning'>They have no blood!</span>")
|
||||
return
|
||||
if(target.mind && target.mind.vampire && (target.mind in ticker.mode.vampires))
|
||||
to_chat(user, "<span class='warning'>Your fangs fail to pierce [target.name]'s cold flesh</span>")
|
||||
return
|
||||
if(SKELETON in target.mutations)
|
||||
to_chat(user, "<span class='warning'>There is no blood in a skeleton!</span>")
|
||||
return
|
||||
if(issmall(target) && !target.ckey) //Monkeyized humans are okay, humanized monkeys are okay, NPC monkeys are not.
|
||||
to_chat(user, "<span class='warning'>Blood from a monkey is useless!</span>")
|
||||
return
|
||||
//we're good to suck the blood, blaah
|
||||
user.mind.vampire.handle_bloodsucking(target)
|
||||
add_attack_logs(user, target, "vampirebit")
|
||||
return
|
||||
//end vampire codes
|
||||
if(attacker_style && attacker_style.harm_act(user, target))
|
||||
return 1
|
||||
else
|
||||
var/datum/unarmed_attack/attack = user.species.unarmed
|
||||
|
||||
user.do_attack_animation(target)
|
||||
add_attack_logs(user, target, "Melee attacked with fists", admin_notify = target.ckey ? TRUE : FALSE)
|
||||
|
||||
if(!iscarbon(user))
|
||||
target.LAssailant = null
|
||||
else
|
||||
target.LAssailant = user
|
||||
|
||||
var/damage = rand(user.species.punchdamagelow, user.species.punchdamagehigh)
|
||||
damage += attack.damage
|
||||
if(!damage)
|
||||
playsound(target.loc, attack.miss_sound, 25, 1, -1)
|
||||
target.visible_message("<span class='danger'>[user] tried to [pick(attack.attack_verb)] [target]!</span>")
|
||||
return 0
|
||||
|
||||
|
||||
var/obj/item/organ/external/affecting = target.get_organ(ran_zone(user.zone_sel.selecting))
|
||||
var/armor_block = target.run_armor_check(affecting, "melee")
|
||||
|
||||
if(HULK in user.mutations)
|
||||
target.adjustBruteLoss(15)
|
||||
|
||||
playsound(target.loc, attack.attack_sound, 25, 1, -1)
|
||||
|
||||
target.visible_message("<span class='danger'>[user] [pick(attack.attack_verb)]ed [target]!</span>")
|
||||
|
||||
target.apply_damage(damage, BRUTE, affecting, armor_block, sharp = attack.sharp) //moving this back here means Armalis are going to knock you down 70% of the time, but they're pure adminbus anyway.
|
||||
if((target.stat != DEAD) && damage >= user.species.punchstunthreshold)
|
||||
target.visible_message("<span class='danger'>[user] has weakened [target]!</span>", \
|
||||
"<span class='userdanger'>[user] has weakened [target]!</span>")
|
||||
target.apply_effect(4, WEAKEN, armor_block)
|
||||
target.forcesay(hit_appends)
|
||||
else if(target.lying)
|
||||
target.forcesay(hit_appends)
|
||||
|
||||
/datum/species/proc/disarm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
|
||||
if(attacker_style && attacker_style.disarm_act(user, target))
|
||||
return 1
|
||||
else
|
||||
add_attack_logs(user, target, "Disarmed", admin_notify = FALSE)
|
||||
user.do_attack_animation(target)
|
||||
if(target.w_uniform)
|
||||
target.w_uniform.add_fingerprint(user)
|
||||
var/obj/item/organ/external/affecting = target.get_organ(ran_zone(user.zone_sel.selecting))
|
||||
var/randn = rand(1, 100)
|
||||
if(randn <= 25)
|
||||
target.apply_effect(2, WEAKEN, target.run_armor_check(affecting, "melee"))
|
||||
playsound(target.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
target.visible_message("<span class='danger'>[user] has pushed [target]!</span>")
|
||||
add_attack_logs(user, target, "Pushed over", admin_notify = FALSE)
|
||||
if(!iscarbon(user))
|
||||
target.LAssailant = null
|
||||
else
|
||||
target.LAssailant = user
|
||||
return
|
||||
|
||||
var/talked = 0 // BubbleWrap
|
||||
|
||||
if(randn <= 60)
|
||||
//BubbleWrap: Disarming breaks a pull
|
||||
if(target.pulling)
|
||||
target.visible_message("<span class='danger'>[user] has broken [target]'s grip on [target.pulling]!</span>")
|
||||
talked = 1
|
||||
target.stop_pulling()
|
||||
|
||||
//BubbleWrap: Disarming also breaks a grab - this will also stop someone being choked, won't it?
|
||||
if(istype(target.l_hand, /obj/item/grab))
|
||||
var/obj/item/grab/lgrab = target.l_hand
|
||||
if(lgrab.affecting)
|
||||
target.visible_message("<span class='danger'>[user] has broken [target]'s grip on [lgrab.affecting]!</span>")
|
||||
talked = 1
|
||||
spawn(1)
|
||||
qdel(lgrab)
|
||||
if(istype(target.r_hand, /obj/item/grab))
|
||||
var/obj/item/grab/rgrab = target.r_hand
|
||||
if(rgrab.affecting)
|
||||
target.visible_message("<span class='danger'>[user] has broken [target]'s grip on [rgrab.affecting]!</span>")
|
||||
talked = 1
|
||||
spawn(1)
|
||||
qdel(rgrab)
|
||||
//End BubbleWrap
|
||||
|
||||
if(!talked) //BubbleWrap
|
||||
if(target.drop_item())
|
||||
target.visible_message("<span class='danger'>[user] has disarmed [target]!</span>")
|
||||
playsound(target.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
return
|
||||
|
||||
|
||||
playsound(target.loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
target.visible_message("<span class='danger'>[user] attempted to disarm [target]!</span>")
|
||||
|
||||
/datum/species/proc/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style = M.martial_art) //Handles any species-specific attackhand events.
|
||||
if(!istype(M))
|
||||
return
|
||||
if(H.frozen)
|
||||
to_chat(M, "<span class='warning'>Do not touch Admin-Frozen people.</span>")
|
||||
return
|
||||
|
||||
if(istype(M))
|
||||
var/obj/item/organ/external/temp = M.bodyparts_by_name["r_hand"]
|
||||
if(M.hand)
|
||||
temp = M.bodyparts_by_name["l_hand"]
|
||||
if(!temp || !temp.is_usable())
|
||||
to_chat(M, "<span class='warning'>You can't use your hand.</span>")
|
||||
return
|
||||
|
||||
if((M != H) && M.a_intent != INTENT_HELP && H.check_shields(0, M.name, attack_type = UNARMED_ATTACK))
|
||||
add_attack_logs(M, H, "Melee attacked with fists (miss/block)")
|
||||
H.visible_message("<span class='warning'>[M] attempted to touch [H]!</span>")
|
||||
return 0
|
||||
|
||||
switch(M.a_intent)
|
||||
if(INTENT_HELP)
|
||||
help(M, H, attacker_style)
|
||||
|
||||
if(INTENT_GRAB)
|
||||
grab(M, H, attacker_style)
|
||||
|
||||
if(INTENT_HARM)
|
||||
harm(M, H, attacker_style)
|
||||
|
||||
if(INTENT_DISARM)
|
||||
disarm(M, H, attacker_style)
|
||||
|
||||
/datum/species/proc/say_filter(mob/M, message, datum/language/speaking)
|
||||
return message
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
/mob/living/carbon/slime/death(gibbed)
|
||||
if(stat == DEAD)
|
||||
return
|
||||
if(!gibbed)
|
||||
if(is_adult)
|
||||
var/mob/living/carbon/slime/M = new /mob/living/carbon/slime(loc)
|
||||
@@ -11,13 +13,11 @@
|
||||
number = rand(1, 1000)
|
||||
name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])"
|
||||
return
|
||||
|
||||
if(stat == DEAD) return
|
||||
else
|
||||
visible_message("<b>The [name]</b> seizes up and falls limp...")
|
||||
stat = DEAD
|
||||
icon_state = "[colour] baby slime dead"
|
||||
overlays.len = 0
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("<b>The [name]</b> seizes up and falls limp...", 1) //ded -- Urist
|
||||
|
||||
update_canmove()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/carbon/slime/emote(var/act, var/m_type=1, var/message = null)
|
||||
/mob/living/carbon/slime/emote(act, m_type = 1, message = null)
|
||||
if(findtext(act, "-", 1, null))
|
||||
var/t1 = findtext(act, "-", 1, null)
|
||||
//param = copytext(act, t1 + 1, length(act) + 1)
|
||||
@@ -8,6 +8,9 @@
|
||||
act = copytext(act,1,length(act))
|
||||
|
||||
act = lowertext(act)
|
||||
|
||||
var/regenerate_icons
|
||||
|
||||
switch(act) //Alphabetical please
|
||||
if("me")
|
||||
if(silent)
|
||||
@@ -58,18 +61,44 @@
|
||||
message = "<B>The [src.name]</B> vibrates!"
|
||||
m_type = 1
|
||||
|
||||
if("noface") //mfw I have no face
|
||||
mood = null
|
||||
regenerate_icons = 1
|
||||
|
||||
if("smile")
|
||||
mood = "mischevous"
|
||||
regenerate_icons = 1
|
||||
|
||||
if(":3")
|
||||
mood = ":33"
|
||||
regenerate_icons = 1
|
||||
|
||||
if("pout")
|
||||
mood = "pout"
|
||||
regenerate_icons = 1
|
||||
|
||||
if("frown")
|
||||
mood = "sad"
|
||||
regenerate_icons = 1
|
||||
|
||||
if("scowl")
|
||||
mood = "angry"
|
||||
regenerate_icons = 1
|
||||
|
||||
if("help") //This is an exception
|
||||
to_chat(src, "Help for slime emotes. You can use these emotes with say \"*emote\":\n\nbounce, custom, jiggle, light, moan, shiver, sway, twitch, vibrate")
|
||||
to_chat(src, "Help for slime emotes. You can use these emotes with say \"*emote\":\n\nbounce, custom, jiggle, light, moan, shiver, sway, twitch, vibrate. \n\nYou may also change your face with: \n\nsmile, :3, pout, frown, scowl, noface")
|
||||
|
||||
else
|
||||
to_chat(src, "<span class='notice'>Unusable emote '[act]'. Say *help for a list.</span>")
|
||||
if((message && src.stat == 0))
|
||||
if((message && stat == CONSCIOUS))
|
||||
if(client)
|
||||
log_emote("[name]/[key] : [message]")
|
||||
if(m_type & 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(message, m_type)
|
||||
//Foreach goto(703)
|
||||
visible_message(message)
|
||||
else
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(message, m_type)
|
||||
//Foreach goto(746)
|
||||
loc.audible_message(message)
|
||||
|
||||
if(regenerate_icons)
|
||||
regenerate_icons()
|
||||
|
||||
return
|
||||
@@ -156,7 +156,14 @@
|
||||
|
||||
if(reagents)
|
||||
reagents.metabolize(src)
|
||||
src.updatehealth()
|
||||
|
||||
if(reagents.get_reagent_amount("plasma")>=5)
|
||||
mutation_chance = min(mutation_chance + 5,50) //Prevents mutation chance going >50%
|
||||
reagents.remove_reagent("plasma", 5)
|
||||
if(reagents.get_reagent_amount("epinephrine")>=5)
|
||||
mutation_chance = max(mutation_chance - 5,0) //Prevents mutation chance going <0%
|
||||
reagents.remove_reagent("epinephrine", 5)
|
||||
updatehealth()
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
@@ -235,6 +242,10 @@
|
||||
|
||||
/mob/living/carbon/slime/proc/handle_nutrition()
|
||||
|
||||
if(docile) //God as my witness, I will never go hungry again
|
||||
nutrition = 700
|
||||
return
|
||||
|
||||
if(prob(15))
|
||||
nutrition -= 1 + is_adult
|
||||
|
||||
@@ -254,6 +265,15 @@
|
||||
else
|
||||
Evolve()
|
||||
|
||||
/mob/living/carbon/slime/proc/add_nutrition(nutrition_to_add = 0, lastnut = 0)
|
||||
nutrition = min((nutrition + nutrition_to_add), get_max_nutrition())
|
||||
if(nutrition >= (lastnut + 50))
|
||||
if(prob(80))
|
||||
lastnut = nutrition
|
||||
powerlevel++
|
||||
if(powerlevel > 10)
|
||||
powerlevel = 10
|
||||
adjustToxLoss(-10)
|
||||
|
||||
/mob/living/carbon/slime/proc/handle_targets()
|
||||
if(Tempstun)
|
||||
@@ -282,7 +302,7 @@
|
||||
|
||||
if(Target)
|
||||
--target_patience
|
||||
if(target_patience <= 0 || SStun || Discipline || attacked) // Tired of chasing or something draws out attention
|
||||
if(target_patience <= 0 || SStun || Discipline || attacked || docile) // Tired of chasing or something draws out attention
|
||||
target_patience = 0
|
||||
Target = null
|
||||
|
||||
@@ -365,6 +385,8 @@
|
||||
else
|
||||
if(holding_still)
|
||||
holding_still = max(holding_still - 1, 0)
|
||||
else if(docile && pulledby)
|
||||
holding_still = 10
|
||||
else if(canmove && isturf(loc) && prob(33))
|
||||
step(src, pick(cardinal))
|
||||
else if(!AIproc)
|
||||
@@ -374,8 +396,12 @@
|
||||
/mob/living/carbon/slime/proc/handle_speech_and_mood()
|
||||
//Mood starts here
|
||||
var/newmood = ""
|
||||
if(rabid || attacked) newmood = "angry"
|
||||
else if(Target) newmood = "mischevous"
|
||||
if(rabid || attacked)
|
||||
newmood = "angry"
|
||||
else if(docile)
|
||||
newmood = ":3"
|
||||
else if(Target)
|
||||
newmood = "mischevous"
|
||||
|
||||
if(!newmood)
|
||||
if(Discipline && prob(25))
|
||||
@@ -544,8 +570,13 @@
|
||||
if(is_adult) return 300
|
||||
else return 200
|
||||
|
||||
/mob/living/carbon/slime/proc/will_hunt(var/hunger = -1) // Check for being stopped from feeding and chasing
|
||||
if(hunger == 2 || rabid || attacked) return 1
|
||||
if(Leader) return 0
|
||||
if(holding_still) return 0
|
||||
/mob/living/carbon/slime/proc/will_hunt(hunger = -1) // Check for being stopped from feeding and chasing
|
||||
if(docile)
|
||||
return 0
|
||||
if(hunger == 2 || rabid || attacked)
|
||||
return 1
|
||||
if(Leader)
|
||||
return 0
|
||||
if(holding_still)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -3,11 +3,15 @@
|
||||
set desc = "This will let you feed on any valid creature in the surrounding area. This should also be used to halt the feeding process."
|
||||
if(Victim)
|
||||
Feedstop()
|
||||
return
|
||||
return 0
|
||||
|
||||
if(docile)
|
||||
to_chat(src, "<span class='notice'><i>I'm not hungry anymore...</i></span>")
|
||||
return 0
|
||||
|
||||
if(stat)
|
||||
to_chat(src, "<i>I must be conscious to do this...</i>")
|
||||
return
|
||||
return 0
|
||||
|
||||
var/list/choices = list()
|
||||
for(var/mob/living/C in view(1,src))
|
||||
@@ -15,32 +19,31 @@
|
||||
choices += C
|
||||
|
||||
var/mob/living/M = input(src,"Who do you wish to feed on?") in null|choices
|
||||
if(!M) return
|
||||
if(!M)
|
||||
return 0
|
||||
if(Adjacent(M))
|
||||
|
||||
if(!istype(src, /mob/living/carbon/brain))
|
||||
if(!istype(M, /mob/living/carbon/slime))
|
||||
if(stat != 2)
|
||||
if(health > -70)
|
||||
|
||||
for(var/mob/living/carbon/slime/met in view())
|
||||
if(met.Victim == M && met != src)
|
||||
to_chat(src, "<i>The [met.name] is already feeding on this subject...</i>")
|
||||
return
|
||||
to_chat(src, "<span class='notice'><i>I have latched onto the subject and begun feeding...</i></span>")
|
||||
to_chat(M, "<span class='danger'>The [src.name] has latched onto your head!</span>")
|
||||
Feedon(M)
|
||||
|
||||
else
|
||||
to_chat(src, "<i>This subject does not have a strong enough life energy...</i>")
|
||||
else
|
||||
to_chat(src, "<i>This subject does not have an edible life energy...</i>")
|
||||
else
|
||||
to_chat(src, "<i>I must not feed on my brothers...</i>")
|
||||
else
|
||||
if(isbrain(M))
|
||||
to_chat(src, "<i>This subject does not have an edible life energy...</i>")
|
||||
return 0
|
||||
|
||||
if(iscarbon(M) && (M.health < -70))
|
||||
to_chat(src, "<i>This subject does not have a strong enough life energy...</i>")
|
||||
return 0
|
||||
|
||||
if(isanimal(M) && (M.health < 1))//animals don't go into crit, stupid; fixes infinite energy exploit
|
||||
to_chat(src, "<i>This subject does not have a strong enough life energy...</i>")
|
||||
return 0
|
||||
|
||||
for(var/mob/living/carbon/slime/met in view())
|
||||
if(met.Victim == M && met != src)
|
||||
to_chat(src, "<i>The [met.name] is already feeding on this subject...</i>")
|
||||
return 0
|
||||
|
||||
to_chat(src, "<span class='notice'><i>I have latched onto the subject and begun feeding...</i></span>")
|
||||
to_chat(M, "<span class='danger'>The [name] has latched onto your head!</span>")
|
||||
|
||||
Feedon(M)
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/slime/proc/Feedon(var/mob/living/M)
|
||||
Victim = M
|
||||
@@ -49,55 +52,49 @@
|
||||
anchored = 1
|
||||
var/lastnut = nutrition
|
||||
var/fed_succesfully = 0
|
||||
var/health_minimum = -70
|
||||
if(is_adult)
|
||||
icon_state = "[colour] adult slime eat"
|
||||
else
|
||||
icon_state = "[colour] baby slime eat"
|
||||
|
||||
while(Victim && M.health > -70 && M.stat != DEAD && stat != DEAD)
|
||||
if(isanimal(Victim))
|
||||
health_minimum = 0
|
||||
while(Victim && Victim.health > health_minimum && stat != DEAD)
|
||||
canmove = 0
|
||||
|
||||
if(Adjacent(M))
|
||||
if(Adjacent(Victim))
|
||||
loc = M.loc
|
||||
|
||||
if(prob(15) && M.client && istype(M, /mob/living/carbon))
|
||||
to_chat(M, "<span class='danger'>[pick("You can feel your body becoming weak!", \
|
||||
"You feel like you're about to die!", \
|
||||
"You feel every part of your body screaming in agony!", \
|
||||
"A low, rolling pain passes through your body!", \
|
||||
"Your body feels as if it's falling apart!", \
|
||||
"You feel extremely weak!", \
|
||||
"A sharp, deep pain bathes every inch of your body!")]</span>")
|
||||
|
||||
if(istype(M, /mob/living/carbon))
|
||||
if(iscarbon(Victim))
|
||||
Victim.adjustCloneLoss(rand(5,6))
|
||||
Victim.adjustToxLoss(rand(1,2))
|
||||
if(Victim.health <= 0)
|
||||
Victim.adjustToxLoss(rand(2,4))
|
||||
|
||||
if(prob(15) && Victim.client)
|
||||
to_chat(Victim, "<span class='danger'>[pick("You can feel your body becoming weak!", \
|
||||
"You feel like you're about to die!", \
|
||||
"You feel every part of your body screaming in agony!", \
|
||||
"A low, rolling pain passes through your body!", \
|
||||
"Your body feels as if it's falling apart!", \
|
||||
"You feel extremely weak!", \
|
||||
"A sharp, deep pain bathes every inch of your body!")]</span>")
|
||||
|
||||
fed_succesfully = 1
|
||||
|
||||
else if(istype(M, /mob/living/simple_animal))
|
||||
else if(health_minimum == 0) //we already know it's a simple_animal from above
|
||||
Victim.adjustBruteLoss(is_adult ? rand(7, 15) : rand(4, 12))
|
||||
fed_succesfully = 1
|
||||
|
||||
else
|
||||
if(prob(25))
|
||||
to_chat(src, "<span class='warning'>[pick("This subject is incompatable", \
|
||||
"This subject does not have a life energy", "This subject is empty", \
|
||||
"I am not satisified", "I can not feed from this subject", \
|
||||
"I do not feel nourished", "This subject is not food")]...</span>")
|
||||
to_chat(src, "<span class='warning'>[pick("This subject is incompatable", \
|
||||
"This subject does not have a life energy", "This subject is empty", \
|
||||
"I am not satisified", "I can not feed from this subject", \
|
||||
"I do not feel nourished", "This subject is not food")]...</span>")
|
||||
|
||||
if(fed_succesfully)
|
||||
//I have no idea why this is not in handle_nutrition()
|
||||
nutrition += rand(15,30)
|
||||
if(nutrition >= lastnut + 50)
|
||||
if(prob(80))
|
||||
lastnut = nutrition
|
||||
powerlevel++
|
||||
if(powerlevel > 10)
|
||||
powerlevel = 10
|
||||
adjustToxLoss(-10)
|
||||
add_nutrition(rand(15,30), lastnut)
|
||||
|
||||
//Heal yourself.
|
||||
adjustOxyLoss(-10)
|
||||
@@ -128,7 +125,7 @@
|
||||
anchored = 0
|
||||
|
||||
if(M)
|
||||
if(M.health <= -70)
|
||||
if(M.health <= health_minimum)
|
||||
M.canmove = 0
|
||||
if(!client)
|
||||
if(Victim && !rabid && !attacked)
|
||||
|
||||
@@ -5,18 +5,14 @@
|
||||
pass_flags = PASSTABLE
|
||||
ventcrawler = 2
|
||||
speak_emote = list("telepathically chirps")
|
||||
|
||||
layer = 5
|
||||
|
||||
maxHealth = 150
|
||||
health = 150
|
||||
gender = NEUTER
|
||||
|
||||
nutrition = 700
|
||||
|
||||
see_in_dark = 8
|
||||
update_slimes = 0
|
||||
|
||||
faction = list("slime","neutral")
|
||||
// canstun and canweaken don't affect slimes because they ignore stun and weakened variables
|
||||
// for the sake of cleanliness, though, here they are.
|
||||
status_flags = CANPARALYSE|CANPUSH
|
||||
@@ -44,7 +40,7 @@
|
||||
|
||||
var/mood = "" // To show its face
|
||||
var/is_adult = 0
|
||||
|
||||
var/docile = 0
|
||||
var/core_removal_stage = 0 //For removing cores.
|
||||
var/mutator_used = FALSE //So you can't shove a dozen mutators into a single slime
|
||||
|
||||
@@ -140,7 +136,8 @@
|
||||
stat(null, "Health: [round((health / 150) * 100)]%")
|
||||
|
||||
if(client.statpanel == "Status")
|
||||
stat(null, "Nutrition: [nutrition]/[get_max_nutrition()]")
|
||||
if(!docile)
|
||||
stat(null, "Nutrition: [nutrition]/[get_max_nutrition()]")
|
||||
if(amount_grown >= 10)
|
||||
if(is_adult)
|
||||
stat(null, "You can reproduce!")
|
||||
@@ -194,9 +191,9 @@
|
||||
return
|
||||
|
||||
/mob/living/carbon/slime/MouseDrop(atom/movable/A)
|
||||
if(isliving(A) && A != usr)
|
||||
if(isliving(A) && A != src && usr == src)
|
||||
var/mob/living/Food = A
|
||||
if(Food.Adjacent(usr) && !stat && Food.stat != DEAD) //messy
|
||||
if(Food.Adjacent(src) && !stat && Food.stat != DEAD) //messy
|
||||
Feedon(Food)
|
||||
..()
|
||||
|
||||
@@ -207,73 +204,37 @@
|
||||
return
|
||||
|
||||
/mob/living/carbon/slime/attack_slime(mob/living/carbon/slime/M)
|
||||
if(!ticker)
|
||||
to_chat(M, "You cannot attack people before the game has started.")
|
||||
return
|
||||
|
||||
..()
|
||||
if(Victim)
|
||||
return // can't attack while eating!
|
||||
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[M.name] has glomped [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] has glomped [src]!</span>")
|
||||
var/damage = rand(1, 3)
|
||||
Victim = null
|
||||
visible_message("<span class='danger'>[M] pulls [src] off!</span>")
|
||||
return
|
||||
attacked += 5
|
||||
if(M.is_adult)
|
||||
damage = rand(1, 6)
|
||||
else
|
||||
damage = rand(1, 3)
|
||||
if(health > -100)
|
||||
adjustBruteLoss(damage)
|
||||
if(nutrition >= 100) //steal some nutrition. negval handled in life()
|
||||
nutrition -= (50 + (5 * M.amount_grown))
|
||||
M.add_nutrition(50 + (5 * M.amount_grown))
|
||||
if(health > 0)
|
||||
adjustBruteLoss(4 + (2 * M.amount_grown)) //amt_grown isn't very linear but it works
|
||||
updatehealth()
|
||||
return
|
||||
M.adjustBruteLoss(-4 + (-2 * M.amount_grown))
|
||||
M.updatehealth()
|
||||
|
||||
/mob/living/carbon/slime/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.custom_emote(1, "[M.friendly] [src]")
|
||||
else
|
||||
M.do_attack_animation(src)
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", \
|
||||
"<span class='userdanger'>[M] [M.attacktext] [src]!</span>")
|
||||
/mob/living/carbon/slime/attack_animal(mob/living/simple_animal/M)
|
||||
if(..())
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
add_attack_logs(src, M, "Slime'd for [damage] damage")
|
||||
attacked += 10
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/carbon/slime/attack_larva(mob/living/carbon/alien/larva/L as mob)
|
||||
|
||||
switch(L.a_intent)
|
||||
|
||||
if(INTENT_HELP)
|
||||
visible_message("<span class='notice'>[L] rubs its head against [src].</span>")
|
||||
|
||||
|
||||
else
|
||||
L.do_attack_animation(src)
|
||||
attacked += 10
|
||||
visible_message("<span class='danger'>[L] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[L] bites [src]!</span>")
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
|
||||
if(stat != DEAD)
|
||||
var/damage = rand(1, 3)
|
||||
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
/mob/living/carbon/slime/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if(!ticker)
|
||||
to_chat(M, "You cannot attack people before the game has started.")
|
||||
return
|
||||
|
||||
if(istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
to_chat(M, "No attacking people at spawn, you jackass.")
|
||||
return
|
||||
|
||||
..()
|
||||
/mob/living/carbon/slime/attack_larva(mob/living/carbon/alien/larva/L)
|
||||
if(..()) //successful larva bite.
|
||||
var/damage = rand(1, 3)
|
||||
if(stat != DEAD)
|
||||
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/carbon/slime/attack_hand(mob/living/carbon/human/M)
|
||||
if(Victim)
|
||||
if(Victim == M)
|
||||
if(prob(60))
|
||||
@@ -298,6 +259,7 @@
|
||||
return
|
||||
|
||||
else
|
||||
M.do_attack_animation(src)
|
||||
if(prob(30))
|
||||
visible_message("<span class='warning'>[M] attempts to wrestle \the [name] off of [Victim]!</span>")
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
@@ -322,12 +284,9 @@
|
||||
step_away(src,M)
|
||||
|
||||
return
|
||||
else
|
||||
if(stat == DEAD && surgeries.len)
|
||||
if(M.a_intent == INTENT_HELP)
|
||||
for(var/datum/surgery/S in surgeries)
|
||||
if(S.next_step(M, src))
|
||||
return 1
|
||||
|
||||
if(..()) //To allow surgery to return properly.
|
||||
return
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
@@ -340,7 +299,6 @@
|
||||
else
|
||||
M.do_attack_animation(src)
|
||||
var/damage = rand(1, 9)
|
||||
|
||||
attacked += 10
|
||||
if(prob(90))
|
||||
if(HULK in M.mutations)
|
||||
@@ -352,16 +310,16 @@
|
||||
if(prob(80) && !client)
|
||||
Discipline++
|
||||
spawn(0)
|
||||
|
||||
step_away(src,M,15)
|
||||
sleep(3)
|
||||
step_away(src,M,15)
|
||||
|
||||
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
add_attack_logs(M, src, "Melee attacked with fists")
|
||||
visible_message("<span class='danger'>[M] has punched [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has punched [src]!</span>")
|
||||
if(health > -100)
|
||||
if(stat != DEAD)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
@@ -369,23 +327,9 @@
|
||||
visible_message("<span class='danger'>[M] has attempted to punch [src]!</span>")
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/slime/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
||||
if(!ticker)
|
||||
to_chat(M, "You cannot attack people before the game has started.")
|
||||
return
|
||||
|
||||
if(istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
to_chat(M, "No attacking people at spawn, you jackass.")
|
||||
return
|
||||
|
||||
switch(M.a_intent)
|
||||
if(INTENT_HELP)
|
||||
visible_message("<span class='notice'>[M] caresses [src] with its scythe like arm.</span>")
|
||||
|
||||
if(INTENT_HARM)
|
||||
M.do_attack_animation(src)
|
||||
/mob/living/carbon/slime/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
if(..()) //if harm or disarm intent.
|
||||
if(M.a_intent == INTENT_HARM)
|
||||
if(prob(95))
|
||||
attacked += 10
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
||||
@@ -397,7 +341,8 @@
|
||||
else
|
||||
visible_message("<span class='danger'>[M] has wounded [name]!</span>", \
|
||||
"<span class='userdanger'>)[M] has wounded [name]!</span>")
|
||||
if(health > -100)
|
||||
add_attack_logs(M, src, "Alien attacked")
|
||||
if(stat != DEAD)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
@@ -405,11 +350,7 @@
|
||||
visible_message("<span class='danger'>[M] has attempted to lunge at [name]!</span>", \
|
||||
"<span class='userdanger'>[M] has attempted to lunge at [name]!</span>")
|
||||
|
||||
if(INTENT_GRAB)
|
||||
grabbedby(M)
|
||||
|
||||
if(INTENT_DISARM)
|
||||
M.do_attack_animation(src)
|
||||
if(M.a_intent == INTENT_DISARM)
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
|
||||
var/damage = 5
|
||||
attacked += 10
|
||||
@@ -424,7 +365,7 @@
|
||||
anchored = 0
|
||||
if(prob(80) && !client)
|
||||
Discipline++
|
||||
if(!istype(src, /mob/living/carbon/slime))
|
||||
if(!isslime(src))
|
||||
if(Discipline == 1)
|
||||
attacked = 0
|
||||
|
||||
@@ -442,16 +383,12 @@
|
||||
drop_item()
|
||||
visible_message("<span class='danger'>[M] has disarmed [name]!</span>",
|
||||
"<span class='userdanger'>[M] has disarmed [name]!</span>")
|
||||
add_attack_logs(M, src, "Alien disarmed")
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/slime/attackby(obj/item/W, mob/user, params)
|
||||
if(stat == DEAD && surgeries.len)
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
for(var/datum/surgery/S in surgeries)
|
||||
if(S.next_step(user, src))
|
||||
return 1
|
||||
/mob/living/carbon/slime/attackby(obj/item/W, mob/living/user, params)
|
||||
if(istype(W,/obj/item/stack/sheet/mineral/plasma)) //Lets you feed slimes plasma.
|
||||
if(user in Friends)
|
||||
++Friends[user]
|
||||
@@ -464,6 +401,7 @@
|
||||
else if(W.force > 0)
|
||||
attacked += 10
|
||||
if(prob(25))
|
||||
user.do_attack_animation(src)
|
||||
to_chat(user, "<span class='danger'>[W] passes right through [src]!</span>")
|
||||
return
|
||||
if(Discipline && prob(50)) // wow, buddy, why am I getting attacked??
|
||||
|
||||
@@ -229,18 +229,18 @@
|
||||
|
||||
// End BS12 momentum-transfer code.
|
||||
|
||||
/mob/living/proc/grabbedby(mob/living/carbon/user,var/supress_message = 0)
|
||||
/mob/living/proc/grabbedby(mob/living/carbon/user, supress_message = 0)
|
||||
if(user == src || anchored)
|
||||
return 0
|
||||
if(!(status_flags & CANPUSH))
|
||||
return 0
|
||||
|
||||
for(var/obj/item/grab/G in src.grabbed_by)
|
||||
for(var/obj/item/grab/G in grabbed_by)
|
||||
if(G.assailant == user)
|
||||
to_chat(user, "<span class='notice'>You already grabbed [src].</span>")
|
||||
return
|
||||
|
||||
add_attack_logs(user, src, "Grabbed passively")
|
||||
add_attack_logs(user, src, "Grabbed passively", admin_notify = FALSE)
|
||||
|
||||
var/obj/item/grab/G = new /obj/item/grab(user, src)
|
||||
if(buckled)
|
||||
@@ -261,4 +261,78 @@
|
||||
if(!supress_message)
|
||||
visible_message("<span class='warning'>[user] has grabbed [src] passively!</span>")
|
||||
|
||||
return G
|
||||
return G
|
||||
|
||||
/mob/living/attack_slime(mob/living/carbon/slime/M)
|
||||
if(!ticker)
|
||||
to_chat(M, "You cannot attack people before the game has started.")
|
||||
return
|
||||
|
||||
if(M.Victim)
|
||||
return // can't attack while eating!
|
||||
|
||||
if(stat != DEAD)
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>The [M.name] glomps [src]!</span>", \
|
||||
"<span class='userdanger'>The [M.name] glomps [src]!</span>")
|
||||
|
||||
if(M.powerlevel > 0)
|
||||
var/stunprob = M.powerlevel * 7 + 10 // 17 at level 1, 80 at level 10
|
||||
if(prob(stunprob))
|
||||
M.powerlevel -= 3
|
||||
if(M.powerlevel < 0)
|
||||
M.powerlevel = 0
|
||||
|
||||
visible_message("<span class='danger'>The [M.name] has shocked [src]!</span>", \
|
||||
"<span class='userdanger'>The [M.name] has shocked [src]!</span>")
|
||||
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
return 1
|
||||
add_attack_logs(src, M, "Slime'd")
|
||||
return
|
||||
|
||||
/mob/living/attack_animal(mob/living/simple_animal/M)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.custom_emote(1, "[M.friendly] [src]")
|
||||
return 0
|
||||
else
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>\The [M] [M.attacktext] [src]!</span>", \
|
||||
"<span class='userdanger'>\The [M] [M.attacktext] [src]!</span>")
|
||||
add_attack_logs(M, src, "Animal attacked")
|
||||
return 1
|
||||
|
||||
/mob/living/attack_larva(mob/living/carbon/alien/larva/L)
|
||||
switch(L.a_intent)
|
||||
if(INTENT_HELP)
|
||||
visible_message("<span class='notice'>[L.name] rubs its head against [src].</span>")
|
||||
return 0
|
||||
|
||||
else
|
||||
L.do_attack_animation(src)
|
||||
if(prob(90))
|
||||
add_attack_logs(L, src, "Larva attacked")
|
||||
visible_message("<span class='danger'>[L.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[L.name] bites [src]!</span>")
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
return 1
|
||||
else
|
||||
visible_message("<span class='danger'>[L.name] has attempted to bite [src]!</span>", \
|
||||
"<span class='userdanger'>[L.name] has attempted to bite [src]!</span>")
|
||||
return 0
|
||||
|
||||
/mob/living/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
switch(M.a_intent)
|
||||
if(INTENT_HELP)
|
||||
visible_message("<span class='notice'>[M] caresses [src] with its scythe like arm.</span>")
|
||||
return FALSE
|
||||
if(INTENT_GRAB)
|
||||
grabbedby(M)
|
||||
return FALSE
|
||||
else
|
||||
M.do_attack_animation(src)
|
||||
return TRUE
|
||||
|
||||
@@ -686,62 +686,6 @@ var/list/ai_verbs_default = list(
|
||||
updatehealth()
|
||||
return 2
|
||||
|
||||
|
||||
/mob/living/silicon/ai/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
if(!ticker)
|
||||
to_chat(M, "You cannot attack people before the game has started.")
|
||||
return
|
||||
|
||||
if(isturf(loc) && istype(loc.loc, /area/start))
|
||||
to_chat(M, "No attacking people at spawn, you jackass.")
|
||||
return
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if(INTENT_HELP)
|
||||
visible_message("<span class='notice'>[M] caresses [src]'s plating with its scythe like arm.</span>")
|
||||
|
||||
else //harm
|
||||
M.do_attack_animation(src)
|
||||
var/damage = rand(10, 20)
|
||||
if(prob(90))
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has slashed at [src]!</span>",\
|
||||
"<span class='userdanger'>[M] has slashed at [src]!</span>")
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] took a swipe at [src]!</span>", \
|
||||
"<span class='userdanger'>[M] took a swipe at [src]!</span>")
|
||||
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/attack_animal(mob/living/simple_animal/M)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.custom_emote(1, "[M.friendly] [src]")
|
||||
else
|
||||
M.do_attack_animation(src)
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
visible_message("<span class='danger'><B>[M]</B> [M.attacktext] [src]!")
|
||||
add_attack_logs(M, src, "Animal attacked", FALSE)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
switch(M.melee_damage_type)
|
||||
if(BRUTE)
|
||||
adjustBruteLoss(damage)
|
||||
if(BURN)
|
||||
adjustFireLoss(damage)
|
||||
if(TOX)
|
||||
adjustToxLoss(damage)
|
||||
if(OXY)
|
||||
adjustOxyLoss(damage)
|
||||
if(CLONE)
|
||||
adjustCloneLoss(damage)
|
||||
if(STAMINA)
|
||||
adjustStaminaLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/silicon/ai/reset_perspective(atom/A)
|
||||
if(camera_light_on)
|
||||
light_cameras()
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/mob/living/silicon/ai/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
if(!ticker)
|
||||
to_chat(M, "You cannot attack people before the game has started.")
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/silicon/ai/attack_slime(mob/living/carbon/slime/user)
|
||||
return //immune to slimes
|
||||
@@ -242,41 +242,6 @@
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/silicon/pai/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
||||
if(!ticker)
|
||||
to_chat(M, "You cannot attack people before the game has started.")
|
||||
return
|
||||
|
||||
if(istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
to_chat(M, "You cannot attack someone in the spawn area.")
|
||||
return
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if(INTENT_HELP)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if((O.client && !( O.blinded )))
|
||||
O.show_message(text("<span class='notice'>[M] caresses [src]'s casing with its scythe like arm.</span>"), 1)
|
||||
|
||||
else //harm
|
||||
M.do_attack_animation(src)
|
||||
var/damage = rand(10, 20)
|
||||
if(prob(90))
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if((O.client && !( O.blinded )))
|
||||
O.show_message(text("<span class='danger'>[] has slashed at []!</span>", M, src), 1)
|
||||
if(prob(8))
|
||||
flash_eyes(affect_silicon = 1)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if((O.client && !( O.blinded )))
|
||||
O.show_message(text("<span class='danger'>[] took a swipe at []!</span>", M, src), 1)
|
||||
return
|
||||
|
||||
/mob/living/silicon/pai/proc/switchCamera(var/obj/machinery/camera/C)
|
||||
usr:cameraFollow = null
|
||||
if(!C)
|
||||
|
||||
@@ -43,11 +43,11 @@
|
||||
control_headlamp()
|
||||
|
||||
//Actual picking-up event.
|
||||
/mob/living/silicon/robot/drone/attack_hand(mob/living/carbon/human/M as mob)
|
||||
/mob/living/silicon/robot/drone/attack_hand(mob/living/carbon/human/M)
|
||||
if(M.a_intent == INTENT_HELP)
|
||||
get_scooped(M)
|
||||
|
||||
..()
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/silicon/robot/drone/verb/customize()
|
||||
set name = "Customize Chassis"
|
||||
|
||||
@@ -832,126 +832,10 @@ var/list/robot_verbs_default = list(
|
||||
update_icons()
|
||||
to_chat(usr, "You unlock your cover.")
|
||||
|
||||
/mob/living/silicon/robot/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
||||
if(!ticker)
|
||||
to_chat(M, "You cannot attack people before the game has started.")
|
||||
return
|
||||
|
||||
if(istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
to_chat(M, "No attacking people at spawn, you jackass.")
|
||||
return
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if(INTENT_HELP)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if((O.client && !( O.blinded )))
|
||||
O.show_message(text("<span class='notice'>[M] caresses [src]'s plating with its scythe like arm.</span>"), 1)
|
||||
|
||||
if(INTENT_GRAB)
|
||||
grabbedby(M)
|
||||
|
||||
if(INTENT_HARM)
|
||||
M.do_attack_animation(src)
|
||||
var/damage = rand(10, 20)
|
||||
if(prob(90))
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has slashed at [src]!</span>",\
|
||||
"<span class='userdanger'>[M] has slashed at [src]!</span>")
|
||||
if(prob(8))
|
||||
flash_eyes(affect_silicon = 1)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] took a swipe at [src]!</span>", \
|
||||
"<span class='userdanger'>[M] took a swipe at [src]!</span>")
|
||||
|
||||
if(INTENT_DISARM)
|
||||
if(!(lying))
|
||||
M.do_attack_animation(src)
|
||||
if(prob(85))
|
||||
Stun(7)
|
||||
step(src,get_dir(M,src))
|
||||
spawn(5)
|
||||
step(src,get_dir(M,src))
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has forced back [src]!</span>",\
|
||||
"<span class='userdanger'>[M] has forced back [src]!</span>")
|
||||
else
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] attempted to force back [src]!</span>",\
|
||||
"<span class='userdanger'>[M] attempted to force back [src]!</span>")
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/living/silicon/robot/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
if(..()) //successful slime shock
|
||||
flash_eyes(affect_silicon = 1)
|
||||
var/stunprob = M.powerlevel * 7 + 10
|
||||
if(prob(stunprob) && M.powerlevel >= 8)
|
||||
adjustBruteLoss(M.powerlevel * rand(6,10))
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
if(M.is_adult)
|
||||
damage = rand(20, 40)
|
||||
else
|
||||
damage = rand(5, 35)
|
||||
damage = round(damage / 2) // borgs recieve half damage
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.custom_emote(1, "[M.friendly] [src]")
|
||||
else
|
||||
M.do_attack_animation(src)
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
visible_message("<span class='danger'><B>[M]</B> [M.attacktext] [src]!</span>")
|
||||
add_attack_logs(M, src, "Animal attacked", FALSE)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
switch(M.melee_damage_type)
|
||||
if(BRUTE)
|
||||
adjustBruteLoss(damage)
|
||||
if(BURN)
|
||||
adjustFireLoss(damage)
|
||||
if(TOX)
|
||||
adjustToxLoss(damage)
|
||||
if(OXY)
|
||||
adjustOxyLoss(damage)
|
||||
if(CLONE)
|
||||
adjustCloneLoss(damage)
|
||||
if(STAMINA)
|
||||
adjustStaminaLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/silicon/robot/attack_ghost(mob/user)
|
||||
if(wiresexposed)
|
||||
wires.Interact(user)
|
||||
|
||||
/mob/living/silicon/robot/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(opened && !wiresexposed && (!istype(user, /mob/living/silicon)))
|
||||
if(cell)
|
||||
cell.updateicon()
|
||||
cell.add_fingerprint(user)
|
||||
user.put_in_active_hand(cell)
|
||||
to_chat(user, "You remove \the [cell].")
|
||||
cell = null
|
||||
update_icons()
|
||||
diag_hud_set_borgcell()
|
||||
|
||||
if(!opened && (!istype(user, /mob/living/silicon)))
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
user.visible_message("<span class='notice'>[user] pets [src]!</span>", \
|
||||
"<span class='notice'>You pet [src]!</span>")
|
||||
|
||||
/mob/living/silicon/robot/proc/allowed(obj/item/I)
|
||||
var/obj/dummy = new /obj(null) // Create a dummy object to check access on as to avoid having to snowflake check_access on every mob
|
||||
dummy.req_access = req_access
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
/mob/living/silicon/robot/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
if(M.a_intent == INTENT_DISARM)
|
||||
if(!lying)
|
||||
M.do_attack_animation(src)
|
||||
if(prob(85))
|
||||
Stun(7)
|
||||
step(src, get_dir(M,src))
|
||||
spawn(5)
|
||||
step(src, get_dir(M,src))
|
||||
add_attack_logs(M, src, "Alien pushed over")
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has forced back [src]!</span>",\
|
||||
"<span class='userdanger'>[M] has forced back [src]!</span>")
|
||||
else
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] took a swipe at [src]!</span>",\
|
||||
"<span class='userdanger'>[M] took a swipe at [src]!</span>")
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/attack_slime(mob/living/carbon/slime/M)
|
||||
if(..()) //successful slime shock
|
||||
flash_eyes(affect_silicon = 1)
|
||||
var/stunprob = M.powerlevel * 7 + 10
|
||||
if(prob(stunprob) && M.powerlevel >= 8)
|
||||
adjustBruteLoss(M.powerlevel * rand(6,10))
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
if(M.is_adult)
|
||||
damage = rand(20, 40)
|
||||
else
|
||||
damage = rand(5, 35)
|
||||
damage = round(damage / 2) // borgs recieve half damage
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/attack_hand(mob/living/carbon/human/user)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(opened && !wiresexposed && !issilicon(user))
|
||||
if(cell)
|
||||
cell.updateicon()
|
||||
cell.add_fingerprint(user)
|
||||
user.put_in_active_hand(cell)
|
||||
to_chat(user, "<span class='notice'>You remove \the [cell].</span>")
|
||||
cell = null
|
||||
update_icons()
|
||||
diag_hud_set_borgcell()
|
||||
|
||||
if(!opened)
|
||||
if(..()) // hulk attack
|
||||
spark_system.start()
|
||||
spawn(0)
|
||||
step_away(src, user, 15)
|
||||
sleep(3)
|
||||
step_away(src, user, 15)
|
||||
@@ -0,0 +1,65 @@
|
||||
/mob/living/silicon/grabbedby(mob/living/user)
|
||||
return
|
||||
|
||||
/mob/living/silicon/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
if(..()) //if harm or disarm intent
|
||||
var/damage = rand(10, 20)
|
||||
if(prob(90))
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has slashed at [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has slashed at [src]!</span>")
|
||||
if(prob(8))
|
||||
flash_eyes(affect_silicon = 1)
|
||||
add_attack_logs(M, src, "Alien attacked")
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] took a swipe at [src]!</span>", \
|
||||
"<span class='userdanger'>[M] took a swipe at [src]!</span>")
|
||||
return
|
||||
|
||||
/mob/living/silicon/attack_animal(mob/living/simple_animal/M)
|
||||
if(..())
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
switch(M.melee_damage_type)
|
||||
if(BRUTE)
|
||||
adjustBruteLoss(damage)
|
||||
if(BURN)
|
||||
adjustFireLoss(damage)
|
||||
if(TOX)
|
||||
adjustToxLoss(damage)
|
||||
if(OXY)
|
||||
adjustOxyLoss(damage)
|
||||
if(CLONE)
|
||||
adjustCloneLoss(damage)
|
||||
if(STAMINA)
|
||||
adjustStaminaLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/silicon/attack_larva(mob/living/carbon/alien/larva/L)
|
||||
if(L.a_intent == INTENT_HELP)
|
||||
visible_message("<span class='notice'>[L.name] rubs its head against [src].</span>")
|
||||
|
||||
/mob/living/silicon/attack_hand(mob/living/carbon/human/M)
|
||||
switch(M.a_intent)
|
||||
if(INTENT_HELP)
|
||||
M.visible_message("<span class='notice'>[M] pets [src]!</span>", \
|
||||
"<span class='notice'>You pet [src]!</span>")
|
||||
if("grab")
|
||||
grabbedby(M)
|
||||
else
|
||||
M.do_attack_animation(src)
|
||||
playsound(loc, 'sound/effects/bang.ogg', 10, 1)
|
||||
if(HULK in M.mutations)
|
||||
var/damage = rand(10,15)
|
||||
adjustBruteLoss(damage)
|
||||
add_attack_logs(M, src, "Melee attacked with fists")
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has punched [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has punched [src]!</span>")
|
||||
return 1
|
||||
else
|
||||
visible_message("<span class='danger'>[M] punches [src], but doesn't leave a dent.</span>", \
|
||||
"<span class='userdanger'>[M] punches [src], but doesn't leave a dent.!</span>")
|
||||
return 0
|
||||
@@ -0,0 +1,60 @@
|
||||
/mob/living/simple_animal/attack_hand(mob/living/carbon/human/M)
|
||||
..()
|
||||
switch(M.a_intent)
|
||||
|
||||
if(INTENT_HELP)
|
||||
if(health > 0)
|
||||
visible_message("<span class='notice'>[M] [response_help] [src].</span>")
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
|
||||
if(INTENT_GRAB)
|
||||
grabbedby(M)
|
||||
|
||||
if(INTENT_HARM, INTENT_DISARM)
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[M] [response_harm] [src]!</span>")
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
attack_threshold_check(harm_intent_damage)
|
||||
add_attack_logs(M, src, "Melee attacked with fists")
|
||||
updatehealth()
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
if(..()) //if harm or disarm intent.
|
||||
var/damage = rand(15, 30)
|
||||
visible_message("<span class='danger'>[M] has slashed at [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has slashed at [src]!</span>")
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
||||
add_attack_logs(M, src, "Alien attacked")
|
||||
attack_threshold_check(damage)
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/attack_larva(mob/living/carbon/alien/larva/L)
|
||||
if(..()) //successful larva bite
|
||||
var/damage = rand(5, 10)
|
||||
if(stat != DEAD)
|
||||
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
|
||||
attack_threshold_check(damage)
|
||||
|
||||
/mob/living/simple_animal/attack_animal(mob/living/simple_animal/M)
|
||||
if(..())
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
attack_threshold_check(damage, M.melee_damage_type)
|
||||
|
||||
/mob/living/simple_animal/attack_slime(mob/living/carbon/slime/M)
|
||||
..()
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
if(M.is_adult)
|
||||
damage = rand(20, 40)
|
||||
else
|
||||
damage = rand(5, 35)
|
||||
|
||||
attack_threshold_check(damage)
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/proc/attack_threshold_check(damage, damagetype = BRUTE)
|
||||
if(damage <= force_threshold || !damage_coeff[damagetype])
|
||||
visible_message("<span class='warning'>[src] looks unharmed.</span>")
|
||||
else
|
||||
apply_damage(damage, damagetype)
|
||||
@@ -258,21 +258,21 @@
|
||||
return
|
||||
return 1 //Successful completion. Used to prevent child process() continuing if this one is ended early.
|
||||
|
||||
/mob/living/simple_animal/bot/attack_alien(var/mob/living/carbon/alien/user as mob)
|
||||
/mob/living/simple_animal/bot/attack_alien(mob/living/carbon/alien/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
apply_damage(rand(15,30), BRUTE)
|
||||
visible_message("<span class='userdanger'>[user] has slashed [src]!</span>")
|
||||
visible_message("<span class='danger'>[user] has slashed [src]!</span>")
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
||||
if(prob(10))
|
||||
new /obj/effect/decal/cleanable/blood/oil(loc)
|
||||
|
||||
/mob/living/simple_animal/bot/attack_animal(var/mob/living/simple_animal/M as mob)
|
||||
/mob/living/simple_animal/bot/attack_animal(mob/living/simple_animal/M)
|
||||
M.do_attack_animation(src)
|
||||
if(M.melee_damage_upper == 0)
|
||||
return
|
||||
apply_damage(M.melee_damage_upper, BRUTE)
|
||||
visible_message("<span class='userdanger'>[M] has [M.attacktext] [src]!</span>")
|
||||
visible_message("<span class='danger'>[M] has [M.attacktext] [src]!</span>")
|
||||
add_attack_logs(M, src, "Animal attacked", FALSE)
|
||||
if(prob(10))
|
||||
new /obj/effect/decal/cleanable/blood/oil(loc)
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
maxHealth = 200
|
||||
icon_state = "grey adult slime"
|
||||
icon_living = "grey adult slime"
|
||||
icon_dead = "grey baby slime dead"
|
||||
|
||||
/mob/living/simple_animal/slime/New()
|
||||
..()
|
||||
|
||||
@@ -264,19 +264,6 @@
|
||||
|
||||
..(act, m_type, message)
|
||||
|
||||
/mob/living/simple_animal/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.custom_emote(1, "[M.friendly] [src]")
|
||||
else
|
||||
M.do_attack_animation(src)
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
visible_message("<span class='danger'>\The [M] [M.attacktext] [src]!</span>", \
|
||||
"<span class='userdanger'>\The [M] [M.attacktext] [src]!</span>")
|
||||
add_attack_logs(M, src, "Animal attacked")
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
attack_threshold_check(damage,M.melee_damage_type)
|
||||
|
||||
/mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(!Proj)
|
||||
return
|
||||
@@ -285,104 +272,6 @@
|
||||
Proj.on_hit(src, 0)
|
||||
return 0
|
||||
|
||||
/mob/living/simple_animal/attack_hand(mob/living/carbon/human/M as mob)
|
||||
..()
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if(INTENT_HELP)
|
||||
if(health > 0)
|
||||
visible_message("<span class='notice'> [M] [response_help] [src].</span>")
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
|
||||
if(INTENT_GRAB)
|
||||
if(M == src || anchored)
|
||||
return
|
||||
if(!(status_flags & CANPUSH))
|
||||
return
|
||||
|
||||
var/obj/item/grab/G = new /obj/item/grab(M, src )
|
||||
|
||||
M.put_in_active_hand(G)
|
||||
|
||||
G.synch()
|
||||
|
||||
LAssailant = M
|
||||
|
||||
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
|
||||
if(INTENT_HARM, INTENT_DISARM)
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[M] [response_harm] [src]!</span>")
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
attack_threshold_check(harm_intent_damage)
|
||||
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if(INTENT_HELP)
|
||||
|
||||
visible_message("<span class='notice'>[M] caresses [src] with its scythe like arm.</span>")
|
||||
if(INTENT_GRAB)
|
||||
grabbedby(M)
|
||||
|
||||
if(INTENT_HARM, INTENT_DISARM)
|
||||
M.do_attack_animation(src)
|
||||
var/damage = rand(15, 30)
|
||||
visible_message("<span class='danger'>[M] has slashed at [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has slashed at [src]!</span>")
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
||||
attack_threshold_check(damage)
|
||||
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/attack_larva(mob/living/carbon/alien/larva/L as mob)
|
||||
|
||||
switch(L.a_intent)
|
||||
if(INTENT_HELP)
|
||||
visible_message("<span class='notice'>[L] rubs its head against [src].</span>")
|
||||
|
||||
|
||||
else
|
||||
L.do_attack_animation(src)
|
||||
var/damage = rand(5, 10)
|
||||
visible_message("<span class='danger'>[L] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[L] bites [src]!</span>")
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
|
||||
if(stat != DEAD)
|
||||
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
|
||||
attack_threshold_check(damage)
|
||||
|
||||
|
||||
/mob/living/simple_animal/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
if(!ticker)
|
||||
to_chat(M, "You cannot attack people before the game has started.")
|
||||
return
|
||||
|
||||
if(M.Victim) return // can't attack while eating!
|
||||
|
||||
if(health > 0)
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[M.name] glomps [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] glomps [src]!</span>")
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
if(M.is_adult)
|
||||
damage = rand(20, 40)
|
||||
else
|
||||
damage = rand(5, 35)
|
||||
|
||||
attack_threshold_check(damage)
|
||||
|
||||
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/attackby(obj/item/O, mob/living/user)
|
||||
if(can_collar && !collar && istype(O, /obj/item/clothing/accessory/petcollar))
|
||||
var/obj/item/clothing/accessory/petcollar/C = O
|
||||
@@ -510,12 +399,6 @@
|
||||
/mob/living/simple_animal/ExtinguishMob()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/proc/attack_threshold_check(damage, damagetype = BRUTE)
|
||||
if(damage <= force_threshold || !damage_coeff[damagetype])
|
||||
visible_message("<span class='warning'>[src] looks unharmed from the damage.</span>")
|
||||
else
|
||||
apply_damage(damage, damagetype)
|
||||
|
||||
/mob/living/simple_animal/update_transform()
|
||||
var/matrix/ntransform = matrix(transform) //aka transform.Copy()
|
||||
var/changed = 0
|
||||
|
||||
@@ -140,39 +140,27 @@
|
||||
|
||||
/obj/item/slimepotion/docility/attack(mob/living/carbon/slime/M, mob/user)
|
||||
if(!isslime(M))
|
||||
to_chat(user, "<span class='warning'> The potion only works on slimes!</span>")
|
||||
to_chat(user, "<span class='warning'>The potion only works on slimes!</span>")
|
||||
return
|
||||
if(M.stat)
|
||||
to_chat(user, "<span class='warning'> The slime is dead!</span>")
|
||||
return
|
||||
if(M.mind)
|
||||
to_chat(user, "<span class='warning'> The slime resists!</span>")
|
||||
to_chat(user, "<span class='warning'>The slime is dead!</span>")
|
||||
return
|
||||
if(being_used)
|
||||
to_chat(user, "<span class='warning'> You're already using this on another slime!</span>")
|
||||
to_chat(user, "<span class='warning'>You're already using this on another slime!</span>")
|
||||
return
|
||||
|
||||
var/mob/living/simple_animal/slime/pet
|
||||
if(M.is_adult)
|
||||
pet = new /mob/living/simple_animal/slime/adult(M.loc)
|
||||
pet.icon_state = "[M.colour] adult slime"
|
||||
pet.icon_living = "[M.colour] adult slime"
|
||||
else
|
||||
pet = new /mob/living/simple_animal/slime(M.loc)
|
||||
pet.icon_state = "[M.colour] baby slime"
|
||||
pet.icon_living = "[M.colour] baby slime"
|
||||
pet.icon_dead = "[M.colour] baby slime dead"
|
||||
pet.colour = "[M.colour]"
|
||||
qdel(M)
|
||||
M.docile = 1
|
||||
M.nutrition = 700
|
||||
to_chat(M, "<span class='warning'>You absorb the potion and feel your intense desire to feed melt away.</span>")
|
||||
to_chat(user, "<span class='notice'>You feed the slime the potion, removing its hunger and calming it.</span>")
|
||||
being_used = 1
|
||||
var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN))
|
||||
|
||||
if(!newname)
|
||||
newname = "pet slime"
|
||||
pet.name = newname
|
||||
pet.real_name = newname
|
||||
M.name = newname
|
||||
M.real_name = newname
|
||||
qdel(src)
|
||||
to_chat(user, "You feed the slime the potion, removing it's powers and calming it.")
|
||||
|
||||
/obj/item/slimepotion/sentience
|
||||
name = "sentience potion"
|
||||
|
||||
Reference in New Issue
Block a user