mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
[MIRROR] Converts many proc overrides to properly use list/modifiers, lots of other smaller things (#3433)
* Converts many proc overrides to properly use list/modifiers, lots of other smaller things * Update human_defense.dm Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
This commit is contained in:
co-authored by
LemonInTheDark
Gandalf2k15
parent
6f01502b33
commit
43febe3145
@@ -13,13 +13,13 @@
|
||||
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, modifiers)
|
||||
/mob/living/carbon/alien/attack_alien(mob/living/carbon/alien/user, list/modifiers)
|
||||
if(isturf(loc) && istype(loc.loc, /area/start))
|
||||
to_chat(M, "No attacking people at spawn, you jackass.")
|
||||
to_chat(user, "No attacking people at spawn, you jackass.")
|
||||
return
|
||||
|
||||
if(M.combat_mode)
|
||||
if(M == src && check_self_for_injuries())
|
||||
if(user.combat_mode)
|
||||
if(user == src && check_self_for_injuries())
|
||||
return
|
||||
set_resting(FALSE)
|
||||
AdjustStun(-60)
|
||||
@@ -28,18 +28,18 @@ In all, this is a lot like the monkey code. /N
|
||||
AdjustParalyzed(-60)
|
||||
AdjustUnconscious(-60)
|
||||
AdjustSleeping(-100)
|
||||
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake [p_them()] up!</span>")
|
||||
visible_message("<span class='notice'>[user.name] nuzzles [src] trying to wake [p_them()] up!</span>")
|
||||
else if(health > 0)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_BITE)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_BITE)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] bites you!</span>", "<span class='hear'>You hear a chomp!</span>", COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='danger'>You bite [src]!</span>")
|
||||
visible_message("<span class='danger'>[user.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[user.name] bites you!</span>", "<span class='hear'>You hear a chomp!</span>", COMBAT_MESSAGE_RANGE, user)
|
||||
to_chat(user, "<span class='danger'>You bite [src]!</span>")
|
||||
adjustBruteLoss(1)
|
||||
log_combat(M, src, "attacked")
|
||||
log_combat(user, src, "attacked")
|
||||
updatehealth()
|
||||
else
|
||||
to_chat(M, "<span class='warning'>[name] is too injured for that.</span>")
|
||||
to_chat(user, "<span class='warning'>[name] is too injured for that.</span>")
|
||||
|
||||
|
||||
|
||||
@@ -47,33 +47,33 @@ In all, this is a lot like the monkey code. /N
|
||||
return attack_alien(L)
|
||||
|
||||
|
||||
/mob/living/carbon/alien/attack_hand(mob/living/carbon/human/M, modifiers)
|
||||
/mob/living/carbon/alien/attack_hand(mob/living/carbon/human/user, list/modifiers)
|
||||
. = ..()
|
||||
if(.) //to allow surgery to return properly.
|
||||
return FALSE
|
||||
|
||||
if(M.combat_mode)
|
||||
if(user.combat_mode)
|
||||
if(LAZYACCESS(modifiers, RIGHT_CLICK))
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
return TRUE
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
return TRUE
|
||||
else
|
||||
help_shake_act(M)
|
||||
help_shake_act(user)
|
||||
|
||||
|
||||
/mob/living/carbon/alien/attack_paw(mob/living/carbon/human/M)
|
||||
/mob/living/carbon/alien/attack_paw(mob/living/carbon/human/user, list/modifiers)
|
||||
if(..())
|
||||
if (stat != DEAD)
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(M.zone_selected))
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(user.zone_selected))
|
||||
apply_damage(rand(1, 3), BRUTE, affecting)
|
||||
|
||||
|
||||
/mob/living/carbon/alien/attack_animal(mob/living/simple_animal/M)
|
||||
/mob/living/carbon/alien/attack_animal(mob/living/simple_animal/user, list/modifiers)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
switch(M.melee_damage_type)
|
||||
var/damage = rand(user.melee_damage_lower, user.melee_damage_upper)
|
||||
switch(user.melee_damage_type)
|
||||
if(BRUTE)
|
||||
adjustBruteLoss(damage)
|
||||
if(BURN)
|
||||
|
||||
@@ -14,38 +14,38 @@
|
||||
"<span class='userdanger'>[user] [hitverb]s you!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", COMBAT_MESSAGE_RANGE, user)
|
||||
to_chat(user, "<span class='danger'>You [hitverb] [src]!</span>")
|
||||
|
||||
/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M, modifiers)
|
||||
if(..())
|
||||
if(M.combat_mode)
|
||||
if(LAZYACCESS(modifiers, RIGHT_CLICK))
|
||||
if (body_position == STANDING_UP)
|
||||
if (prob(5))
|
||||
Unconscious(40)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
|
||||
log_combat(M, src, "pushed")
|
||||
visible_message("<span class='danger'>[M] pushes [src] down!</span>", \
|
||||
"<span class='userdanger'>[M] pushes you down!</span>", "<span class='hear'>You hear aggressive shuffling followed by a loud thud!</span>", null, M)
|
||||
to_chat(M, "<span class='danger'>You push [src] down!</span>")
|
||||
return TRUE
|
||||
var/damage = rand(1, 9)
|
||||
if (prob(90))
|
||||
playsound(loc, "punch", 25, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M] punches [src]!</span>", \
|
||||
"<span class='userdanger'>[M] punches you!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='danger'>You punch [src]!</span>")
|
||||
if ((stat != DEAD) && (damage > 9 || prob(5)))//Regular humans have a very small chance of knocking an alien down.
|
||||
Unconscious(40)
|
||||
visible_message("<span class='danger'>[M] knocks [src] down!</span>", \
|
||||
"<span class='userdanger'>[M] knocks you down!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", null, M)
|
||||
to_chat(M, "<span class='danger'>You knock [src] down!</span>")
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(M.zone_selected))
|
||||
apply_damage(damage, BRUTE, affecting)
|
||||
log_combat(M, src, "attacked")
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M]'s punch misses [src]!</span>", \
|
||||
"<span class='danger'>You avoid [M]'s punch!</span>", "<span class='hear'>You hear a swoosh!</span>", COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='warning'>Your punch misses [src]!</span>")
|
||||
/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/user, list/modifiers)
|
||||
if(!..() || !user.combat_mode)
|
||||
return
|
||||
if(LAZYACCESS(modifiers, RIGHT_CLICK))
|
||||
if (body_position == STANDING_UP)
|
||||
if (prob(5))
|
||||
Unconscious(40)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
|
||||
log_combat(user, src, "pushed")
|
||||
visible_message("<span class='danger'>[user] pushes [src] down!</span>", \
|
||||
"<span class='userdanger'>[user] pushes you down!</span>", "<span class='hear'>You hear aggressive shuffling followed by a loud thud!</span>", null, user)
|
||||
to_chat(user, "<span class='danger'>You push [src] down!</span>")
|
||||
return TRUE
|
||||
var/damage = rand(1, 9)
|
||||
if (prob(90))
|
||||
playsound(loc, "punch", 25, TRUE, -1)
|
||||
visible_message("<span class='danger'>[user] punches [src]!</span>", \
|
||||
"<span class='userdanger'>[user] punches you!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", COMBAT_MESSAGE_RANGE, user)
|
||||
to_chat(user, "<span class='danger'>You punch [src]!</span>")
|
||||
if ((stat != DEAD) && (damage > 9 || prob(5)))//Regular humans have a very small chance of knocking an alien down.
|
||||
Unconscious(40)
|
||||
visible_message("<span class='danger'>[user] knocks [src] down!</span>", \
|
||||
"<span class='userdanger'>[user] knocks you down!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", null, user)
|
||||
to_chat(user, "<span class='danger'>You knock [src] down!</span>")
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(user.zone_selected))
|
||||
apply_damage(damage, BRUTE, affecting)
|
||||
log_combat(user, src, "attacked")
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, TRUE, -1)
|
||||
visible_message("<span class='danger'>[user]'s punch misses [src]!</span>", \
|
||||
"<span class='danger'>You avoid [user]'s punch!</span>", "<span class='hear'>You hear a swoosh!</span>", COMBAT_MESSAGE_RANGE, user)
|
||||
to_chat(user, "<span class='warning'>Your punch misses [src]!</span>")
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect)
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/attack_hand(mob/living/carbon/human/M)
|
||||
/mob/living/carbon/alien/larva/attack_hand(mob/living/carbon/human/user, list/modifiers)
|
||||
if(..())
|
||||
var/damage = rand(1, 9)
|
||||
if (prob(90))
|
||||
playsound(loc, "punch", 25, TRUE, -1)
|
||||
log_combat(M, src, "attacked")
|
||||
visible_message("<span class='danger'>[M] kicks [src]!</span>", \
|
||||
"<span class='userdanger'>[M] kicks you!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='danger'>You kick [src]!</span>")
|
||||
log_combat(user, src, "attacked")
|
||||
visible_message("<span class='danger'>[user] kicks [src]!</span>", \
|
||||
"<span class='userdanger'>[user] kicks you!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", COMBAT_MESSAGE_RANGE, user)
|
||||
to_chat(user, "<span class='danger'>You kick [src]!</span>")
|
||||
if ((stat != DEAD) && (damage > 4.9))
|
||||
Unconscious(rand(100,200))
|
||||
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(M.zone_selected))
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(user.zone_selected))
|
||||
apply_damage(damage, BRUTE, affecting)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M]'s kick misses [src]!</span>", \
|
||||
"<span class='danger'>You avoid [M]'s kick!</span>", "<span class='hear'>You hear a swoosh!</span>", COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='warning'>Your kick misses [src]!</span>")
|
||||
visible_message("<span class='danger'>[user]'s kick misses [src]!</span>", \
|
||||
"<span class='danger'>You avoid [user]'s kick!</span>", "<span class='hear'>You hear a swoosh!</span>", COMBAT_MESSAGE_RANGE, user)
|
||||
to_chat(user, "<span class='warning'>Your kick misses [src]!</span>")
|
||||
|
||||
/mob/living/carbon/alien/larva/attack_hulk(mob/living/carbon/human/user)
|
||||
. = ..()
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
return O.attack_obj(src, user)
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/clothing/mask/facehugger/attack_hand(mob/user)
|
||||
/obj/item/clothing/mask/facehugger/attack_hand(mob/user, list/modifiers)
|
||||
if((stat == CONSCIOUS && !sterile) && !isalien(user))
|
||||
if(Leap(user))
|
||||
return
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
return //so we don't call the carbon's attack_hand().
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/mob/living/carbon/attack_hand(mob/living/carbon/human/user, modifiers)
|
||||
/mob/living/carbon/attack_hand(mob/living/carbon/human/user, list/modifiers)
|
||||
|
||||
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_HAND, user) & COMPONENT_CANCEL_ATTACK_CHAIN)
|
||||
. = TRUE
|
||||
@@ -182,25 +182,25 @@
|
||||
return FALSE
|
||||
|
||||
|
||||
/mob/living/carbon/attack_paw(mob/living/carbon/human/M, modifiers)
|
||||
/mob/living/carbon/attack_paw(mob/living/carbon/human/user, list/modifiers)
|
||||
|
||||
if(try_inject(M, injection_flags = INJECT_TRY_SHOW_ERROR_MESSAGE))
|
||||
if(try_inject(user, injection_flags = INJECT_TRY_SHOW_ERROR_MESSAGE))
|
||||
for(var/thing in diseases)
|
||||
var/datum/disease/D = thing
|
||||
if((D.spread_flags & DISEASE_SPREAD_CONTACT_SKIN) && prob(85))
|
||||
M.ContactContractDisease(D)
|
||||
user.ContactContractDisease(D)
|
||||
|
||||
for(var/thing in M.diseases)
|
||||
for(var/thing in user.diseases)
|
||||
var/datum/disease/D = thing
|
||||
if(D.spread_flags & DISEASE_SPREAD_CONTACT_SKIN)
|
||||
ContactContractDisease(D)
|
||||
|
||||
if(!M.combat_mode)
|
||||
help_shake_act(M)
|
||||
if(!user.combat_mode)
|
||||
help_shake_act(user)
|
||||
return FALSE
|
||||
|
||||
if(..()) //successful monkey bite.
|
||||
for(var/thing in M.diseases)
|
||||
for(var/thing in user.diseases)
|
||||
var/datum/disease/D = thing
|
||||
ForceContractDisease(D)
|
||||
return TRUE
|
||||
|
||||
@@ -206,14 +206,14 @@
|
||||
to_chat(user, "<span class='danger'>You [hulk_verb] [src]!</span>")
|
||||
apply_damage(15, BRUTE, wound_bonus=10)
|
||||
|
||||
/mob/living/carbon/human/attack_hand(mob/user, modifiers)
|
||||
/mob/living/carbon/human/attack_hand(mob/user, list/modifiers)
|
||||
if(..()) //to allow surgery to return properly.
|
||||
return
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
dna.species.spec_attack_hand(H, src, null, modifiers)
|
||||
|
||||
/mob/living/carbon/human/attack_paw(mob/living/carbon/human/M, modifiers)
|
||||
/mob/living/carbon/human/attack_paw(mob/living/carbon/human/user, list/modifiers)
|
||||
var/dam_zone = pick(BODY_ZONE_CHEST, BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(dam_zone))
|
||||
if(!affecting)
|
||||
@@ -224,47 +224,47 @@
|
||||
var/obj/item/I = get_active_held_item()
|
||||
if(I && !(I.item_flags & ABSTRACT) && dropItemToGround(I))
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 25, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M] disarmed [src]!</span>", \
|
||||
"<span class='userdanger'>[M] disarmed you!</span>", "<span class='hear'>You hear aggressive shuffling!</span>", null, M)
|
||||
to_chat(M, "<span class='danger'>You disarm [src]!</span>")
|
||||
else if(!M.client || prob(5)) // only natural monkeys get to stun reliably, (they only do it occasionaly)
|
||||
visible_message("<span class='danger'>[user] disarmed [src]!</span>", \
|
||||
"<span class='userdanger'>[user] disarmed you!</span>", "<span class='hear'>You hear aggressive shuffling!</span>", null, user)
|
||||
to_chat(user, "<span class='danger'>You disarm [src]!</span>")
|
||||
else if(!user.client || prob(5)) // only natural monkeys get to stun reliably, (they only do it occasionaly)
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 25, TRUE, -1)
|
||||
if (src.IsKnockdown() && !src.IsParalyzed())
|
||||
Paralyze(40)
|
||||
log_combat(M, src, "pinned")
|
||||
visible_message("<span class='danger'>[M] pins [src] down!</span>", \
|
||||
"<span class='userdanger'>[M] pins you down!</span>", "<span class='hear'>You hear shuffling and a muffled groan!</span>", null, M)
|
||||
to_chat(M, "<span class='danger'>You pin [src] down!</span>")
|
||||
log_combat(user, src, "pinned")
|
||||
visible_message("<span class='danger'>[user] pins [src] down!</span>", \
|
||||
"<span class='userdanger'>[user] pins you down!</span>", "<span class='hear'>You hear shuffling and a muffled groan!</span>", null, user)
|
||||
to_chat(user, "<span class='danger'>You pin [src] down!</span>")
|
||||
else
|
||||
Knockdown(30)
|
||||
log_combat(M, src, "tackled")
|
||||
visible_message("<span class='danger'>[M] tackles [src] down!</span>", \
|
||||
"<span class='userdanger'>[M] tackles you down!</span>", "<span class='hear'>You hear aggressive shuffling followed by a loud thud!</span>", null, M)
|
||||
to_chat(M, "<span class='danger'>You tackle [src] down!</span>")
|
||||
log_combat(user, src, "tackled")
|
||||
visible_message("<span class='danger'>[user] tackles [src] down!</span>", \
|
||||
"<span class='userdanger'>[user] tackles you down!</span>", "<span class='hear'>You hear aggressive shuffling followed by a loud thud!</span>", null, user)
|
||||
to_chat(user, "<span class='danger'>You tackle [src] down!</span>")
|
||||
|
||||
if(!M.combat_mode)
|
||||
if(!user.combat_mode)
|
||||
..() //shaking
|
||||
return FALSE
|
||||
|
||||
if(M.limb_destroyer)
|
||||
dismembering_strike(M, affecting.body_zone)
|
||||
if(user.limb_destroyer)
|
||||
dismembering_strike(user, affecting.body_zone)
|
||||
|
||||
if(try_inject(M, affecting, injection_flags = INJECT_TRY_SHOW_ERROR_MESSAGE))//Thick suits can stop monkey bites.
|
||||
if(try_inject(user, affecting, injection_flags = INJECT_TRY_SHOW_ERROR_MESSAGE))//Thick suits can stop monkey bites.
|
||||
if(..()) //successful monkey bite, this handles disease contraction.
|
||||
var/damage = rand(M.dna.species.punchdamagelow, M.dna.species.punchdamagehigh)
|
||||
var/damage = rand(user.dna.species.punchdamagelow, user.dna.species.punchdamagehigh)
|
||||
if(!damage)
|
||||
return
|
||||
if(check_shields(M, damage, "the [M.name]"))
|
||||
if(check_shields(user, damage, "the [user.name]"))
|
||||
return FALSE
|
||||
if(stat != DEAD)
|
||||
apply_damage(damage, BRUTE, affecting, run_armor_check(affecting, MELEE))
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/attack_alien(mob/living/carbon/alien/humanoid/M, modifiers)
|
||||
if(check_shields(M, 0, "the M.name"))
|
||||
visible_message("<span class='danger'>[M] attempts to touch [src]!</span>", \
|
||||
"<span class='danger'>[M] attempts to touch you!</span>", "<span class='hear'>You hear a swoosh!</span>", null, M)
|
||||
to_chat(M, "<span class='warning'>You attempt to touch [src]!</span>")
|
||||
/mob/living/carbon/human/attack_alien(mob/living/carbon/alien/humanoid/user, list/modifiers)
|
||||
if(check_shields(user, 0, "the [user.name]"))
|
||||
visible_message("<span class='danger'>[user] attempts to touch [src]!</span>", \
|
||||
"<span class='danger'>[user] attempts to touch you!</span>", "<span class='hear'>You hear a swoosh!</span>", null, user)
|
||||
to_chat(user, "<span class='warning'>You attempt to touch [src]!</span>")
|
||||
return FALSE
|
||||
. = ..()
|
||||
if(!.)
|
||||
@@ -274,38 +274,38 @@
|
||||
var/obj/item/I = get_active_held_item()
|
||||
if(I && dropItemToGround(I))
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 25, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M] disarms [src]!</span>", \
|
||||
"<span class='userdanger'>[M] disarms you!</span>", "<span class='hear'>You hear aggressive shuffling!</span>", null, M)
|
||||
to_chat(M, "<span class='danger'>You disarm [src]!</span>")
|
||||
visible_message("<span class='danger'>[user] disarms [src]!</span>", \
|
||||
"<span class='userdanger'>[user] disarms you!</span>", "<span class='hear'>You hear aggressive shuffling!</span>", null, user)
|
||||
to_chat(user, "<span class='danger'>You disarm [src]!</span>")
|
||||
else
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 25, TRUE, -1)
|
||||
Paralyze(100)
|
||||
log_combat(M, src, "tackled")
|
||||
visible_message("<span class='danger'>[M] tackles [src] down!</span>", \
|
||||
"<span class='userdanger'>[M] tackles you down!</span>", "<span class='hear'>You hear aggressive shuffling followed by a loud thud!</span>", null, M)
|
||||
to_chat(M, "<span class='danger'>You tackle [src] down!</span>")
|
||||
log_combat(user, src, "tackled")
|
||||
visible_message("<span class='danger'>[user] tackles [src] down!</span>", \
|
||||
"<span class='userdanger'>[user] tackles you down!</span>", "<span class='hear'>You hear aggressive shuffling followed by a loud thud!</span>", null, user)
|
||||
to_chat(user, "<span class='danger'>You tackle [src] down!</span>")
|
||||
|
||||
if(M.combat_mode)
|
||||
if(user.combat_mode)
|
||||
if (w_uniform)
|
||||
w_uniform.add_fingerprint(M)
|
||||
var/damage = prob(90) ? rand(M.melee_damage_lower, M.melee_damage_upper) : 0
|
||||
w_uniform.add_fingerprint(user)
|
||||
var/damage = prob(90) ? rand(user.melee_damage_lower, user.melee_damage_upper) : 0
|
||||
if(!damage)
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 50, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M] lunges at [src]!</span>", \
|
||||
"<span class='userdanger'>[M] lunges at you!</span>", "<span class='hear'>You hear a swoosh!</span>", null, M)
|
||||
to_chat(M, "<span class='danger'>You lunge at [src]!</span>")
|
||||
visible_message("<span class='danger'>[user] lunges at [src]!</span>", \
|
||||
"<span class='userdanger'>[user] lunges at you!</span>", "<span class='hear'>You hear a swoosh!</span>", null, user)
|
||||
to_chat(user, "<span class='danger'>You lunge at [src]!</span>")
|
||||
return FALSE
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(M.zone_selected))
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(user.zone_selected))
|
||||
if(!affecting)
|
||||
affecting = get_bodypart(BODY_ZONE_CHEST)
|
||||
var/armor_block = run_armor_check(affecting, MELEE,"","",10)
|
||||
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 25, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M] slashes at [src]!</span>", \
|
||||
"<span class='userdanger'>[M] slashes at you!</span>", "<span class='hear'>You hear a sickening sound of a slice!</span>", null, M)
|
||||
to_chat(M, "<span class='danger'>You slash at [src]!</span>")
|
||||
log_combat(M, src, "attacked")
|
||||
if(!dismembering_strike(M, M.zone_selected)) //Dismemberment successful
|
||||
visible_message("<span class='danger'>[user] slashes at [src]!</span>", \
|
||||
"<span class='userdanger'>[user] slashes at you!</span>", "<span class='hear'>You hear a sickening sound of a slice!</span>", null, user)
|
||||
to_chat(user, "<span class='danger'>You slash at [src]!</span>")
|
||||
log_combat(user, src, "attacked")
|
||||
if(!dismembering_strike(user, user.zone_selected)) //Dismemberment successful
|
||||
return TRUE
|
||||
apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
|
||||
@@ -330,21 +330,21 @@
|
||||
apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
|
||||
|
||||
/mob/living/carbon/human/attack_animal(mob/living/simple_animal/M)
|
||||
/mob/living/carbon/human/attack_animal(mob/living/simple_animal/user, list/modifiers)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
if(check_shields(M, damage, "the [M.name]", MELEE_ATTACK, M.armour_penetration))
|
||||
var/damage = rand(user.melee_damage_lower, user.melee_damage_upper)
|
||||
if(check_shields(user, damage, "the [user.name]", MELEE_ATTACK, user.armour_penetration))
|
||||
return FALSE
|
||||
var/dam_zone = dismembering_strike(M, pick(BODY_ZONE_CHEST, BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG))
|
||||
var/dam_zone = dismembering_strike(user, pick(BODY_ZONE_CHEST, BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG))
|
||||
if(!dam_zone) //Dismemberment successful
|
||||
return TRUE
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(dam_zone))
|
||||
if(!affecting)
|
||||
affecting = get_bodypart(BODY_ZONE_CHEST)
|
||||
var/armor = run_armor_check(affecting, MELEE, armour_penetration = M.armour_penetration)
|
||||
apply_damage(damage, M.melee_damage_type, affecting, armor, wound_bonus = M.wound_bonus, bare_wound_bonus = M.bare_wound_bonus, sharpness = M.sharpness)
|
||||
var/armor = run_armor_check(affecting, MELEE, armour_penetration = user.armour_penetration)
|
||||
apply_damage(damage, user.melee_damage_type, affecting, armor, wound_bonus = user.wound_bonus, bare_wound_bonus = user.bare_wound_bonus, sharpness = user.sharpness)
|
||||
apply_damage(damage*SIMPLE_MOB_TISSUE_DAMAGE_STAMINA_MULTIPLIER, STAMINA, affecting, armor) //SKYRAT EDIT ADDITION
|
||||
|
||||
|
||||
|
||||
@@ -232,62 +232,63 @@
|
||||
to_chat(M, "<span class='danger'>You glomp [src]!</span>")
|
||||
return TRUE
|
||||
|
||||
/mob/living/attack_animal(mob/living/simple_animal/M)
|
||||
M.face_atom(src)
|
||||
if(M.melee_damage_upper == 0)
|
||||
visible_message("<span class='notice'>\The [M] [M.friendly_verb_continuous] [src]!</span>", \
|
||||
"<span class='notice'>\The [M] [M.friendly_verb_continuous] you!</span>", null, COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='notice'>You [M.friendly_verb_simple] [src]!</span>")
|
||||
/mob/living/attack_animal(mob/living/simple_animal/user, list/modifiers)
|
||||
user.face_atom(src)
|
||||
if(user.melee_damage_upper == 0)
|
||||
visible_message("<span class='notice'>\The [user] [user.friendly_verb_continuous] [src]!</span>", \
|
||||
"<span class='notice'>\The [user] [user.friendly_verb_continuous] you!</span>", null, COMBAT_MESSAGE_RANGE, user)
|
||||
to_chat(user, "<span class='notice'>You [user.friendly_verb_simple] [src]!</span>")
|
||||
return FALSE
|
||||
if(HAS_TRAIT(M, TRAIT_PACIFISM))
|
||||
to_chat(M, "<span class='warning'>You don't want to hurt anyone!</span>")
|
||||
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
to_chat(user, "<span class='warning'>You don't want to hurt anyone!</span>")
|
||||
return FALSE
|
||||
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, TRUE, TRUE)
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>\The [M] [M.attack_verb_continuous] [src]!</span>", \
|
||||
"<span class='userdanger'>\The [M] [M.attack_verb_continuous] you!</span>", null, COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='danger'>You [M.attack_verb_simple] [src]!</span>")
|
||||
log_combat(M, src, "attacked")
|
||||
if(user.attack_sound)
|
||||
playsound(loc, user.attack_sound, 50, TRUE, TRUE)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>\The [user] [user.attack_verb_continuous] [src]!</span>", \
|
||||
"<span class='userdanger'>\The [user] [user.attack_verb_continuous] you!</span>", null, COMBAT_MESSAGE_RANGE, user)
|
||||
to_chat(user, "<span class='danger'>You [user.attack_verb_simple] [src]!</span>")
|
||||
log_combat(user, src, "attacked")
|
||||
return TRUE
|
||||
|
||||
/mob/living/attack_hand(mob/living/carbon/human/user, modifiers)
|
||||
/mob/living/attack_hand(mob/living/carbon/human/user, list/modifiers)
|
||||
. = ..()
|
||||
if (user.apply_martial_art(src, modifiers))
|
||||
return TRUE
|
||||
|
||||
/mob/living/attack_paw(mob/living/carbon/human/M, modifiers)
|
||||
/mob/living/attack_paw(mob/living/carbon/human/user, list/modifiers)
|
||||
if(isturf(loc) && istype(loc.loc, /area/start))
|
||||
to_chat(M, "No attacking people at spawn, you jackass.")
|
||||
to_chat(user, "No attacking people at spawn, you jackass.")
|
||||
return FALSE
|
||||
|
||||
if (M.apply_martial_art(src, modifiers))
|
||||
if (user.apply_martial_art(src, modifiers))
|
||||
return TRUE
|
||||
if(LAZYACCESS(modifiers, RIGHT_CLICK))
|
||||
if (M != src)
|
||||
M.disarm(src)
|
||||
if (user != src)
|
||||
user.disarm(src)
|
||||
return TRUE
|
||||
if (M.combat_mode)
|
||||
if(HAS_TRAIT(M, TRAIT_PACIFISM))
|
||||
to_chat(M, "<span class='warning'>You don't want to hurt anyone!</span>")
|
||||
return FALSE
|
||||
if (!user.combat_mode)
|
||||
return FALSE
|
||||
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
to_chat(user, "<span class='warning'>You don't want to hurt anyone!</span>")
|
||||
return FALSE
|
||||
|
||||
if(M.is_muzzled() || M.is_mouth_covered(FALSE, TRUE))
|
||||
to_chat(M, "<span class='warning'>You can't bite with your mouth covered!</span>")
|
||||
return FALSE
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_BITE)
|
||||
if (prob(75))
|
||||
log_combat(M, src, "attacked")
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] bites you!</span>", "<span class='hear'>You hear a chomp!</span>", COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='danger'>You bite [src]!</span>")
|
||||
return TRUE
|
||||
else
|
||||
visible_message("<span class='danger'>[M.name]'s bite misses [src]!</span>", \
|
||||
"<span class='danger'>You avoid [M.name]'s bite!</span>", "<span class='hear'>You hear the sound of jaws snapping shut!</span>", COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='warning'>Your bite misses [src]!</span>")
|
||||
if(user.is_muzzled() || user.is_mouth_covered(FALSE, TRUE))
|
||||
to_chat(user, "<span class='warning'>You can't bite with your mouth covered!</span>")
|
||||
return FALSE
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_BITE)
|
||||
if (prob(75))
|
||||
log_combat(user, src, "attacked")
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, TRUE, -1)
|
||||
visible_message("<span class='danger'>[user.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[user.name] bites you!</span>", "<span class='hear'>You hear a chomp!</span>", COMBAT_MESSAGE_RANGE, user)
|
||||
to_chat(user, "<span class='danger'>You bite [src]!</span>")
|
||||
return TRUE
|
||||
else
|
||||
visible_message("<span class='danger'>[user.name]'s bite misses [src]!</span>", \
|
||||
"<span class='danger'>You avoid [user.name]'s bite!</span>", "<span class='hear'>You hear the sound of jaws snapping shut!</span>", COMBAT_MESSAGE_RANGE, user)
|
||||
to_chat(user, "<span class='warning'>Your bite misses [src]!</span>")
|
||||
|
||||
return FALSE
|
||||
|
||||
@@ -316,20 +317,20 @@
|
||||
return FALSE
|
||||
return FALSE
|
||||
|
||||
/mob/living/attack_alien(mob/living/carbon/alien/humanoid/M, modifiers)
|
||||
/mob/living/attack_alien(mob/living/carbon/alien/humanoid/user, list/modifiers)
|
||||
if(LAZYACCESS(modifiers, RIGHT_CLICK))
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
return TRUE
|
||||
if(M.combat_mode)
|
||||
if(HAS_TRAIT(M, TRAIT_PACIFISM))
|
||||
to_chat(M, "<span class='warning'>You don't want to hurt anyone!</span>")
|
||||
if(user.combat_mode)
|
||||
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
to_chat(user, "<span class='warning'>You don't want to hurt anyone!</span>")
|
||||
return FALSE
|
||||
M.do_attack_animation(src)
|
||||
user.do_attack_animation(src)
|
||||
return TRUE
|
||||
else
|
||||
visible_message("<span class='notice'>[M] caresses [src] with its scythe-like arm.</span>", \
|
||||
"<span class='notice'>[M] caresses you with its scythe-like arm.</span>", null, null, M)
|
||||
to_chat(M, "<span class='notice'>You caress [src] with your scythe-like arm.</span>")
|
||||
visible_message("<span class='notice'>[user] caresses [src] with its scythe-like arm.</span>", \
|
||||
"<span class='notice'>[user] caresses you with its scythe-like arm.</span>", null, null, user)
|
||||
to_chat(user, "<span class='notice'>You caress [src] with your scythe-like arm.</span>")
|
||||
return FALSE
|
||||
|
||||
/mob/living/attack_hulk(mob/living/carbon/human/user)
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
spark_system.start()
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/ai/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
/mob/living/silicon/ai/attack_alien(mob/living/carbon/alien/humanoid/user, list/modifiers)
|
||||
if(!SSticker.HasRoundStarted())
|
||||
to_chat(M, "You cannot attack people before the game has started.")
|
||||
to_chat(user, "You cannot attack people before the game has started.")
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
fold_in(force = 1)
|
||||
Paralyze(200)
|
||||
|
||||
/mob/living/silicon/pai/attack_hand(mob/living/carbon/human/user, modifiers)
|
||||
/mob/living/silicon/pai/attack_hand(mob/living/carbon/human/user, list/modifiers)
|
||||
if(user.combat_mode)
|
||||
user.do_attack_animation(src)
|
||||
if (user.name == master)
|
||||
|
||||
@@ -235,22 +235,22 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
|
||||
spark_system.start()
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/robot/attack_alien(mob/living/carbon/alien/humanoid/M, modifiers)
|
||||
/mob/living/silicon/robot/attack_alien(mob/living/carbon/alien/humanoid/user, list/modifiers)
|
||||
if (LAZYACCESS(modifiers, RIGHT_CLICK))
|
||||
if(body_position == STANDING_UP)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
var/obj/item/I = get_active_held_item()
|
||||
if(I)
|
||||
uneq_active()
|
||||
visible_message("<span class='danger'>[M] disarmed [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has disabled [src]'s active module!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
log_combat(M, src, "disarmed", "[I ? " removing \the [I]" : ""]")
|
||||
visible_message("<span class='danger'>[user] disarmed [src]!</span>", \
|
||||
"<span class='userdanger'>[user] has disabled [src]'s active module!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
log_combat(user, src, "disarmed", "[I ? " removing \the [I]" : ""]")
|
||||
else
|
||||
Stun(40)
|
||||
step(src,get_dir(M,src))
|
||||
log_combat(M, src, "pushed")
|
||||
visible_message("<span class='danger'>[M] forces back [src]!</span>", \
|
||||
"<span class='userdanger'>[M] forces back [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
step(src,get_dir(user,src))
|
||||
log_combat(user, src, "pushed")
|
||||
visible_message("<span class='danger'>[user] forces back [src]!</span>", \
|
||||
"<span class='userdanger'>[user] forces back [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 50, TRUE, -1)
|
||||
else
|
||||
..()
|
||||
@@ -275,7 +275,7 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
|
||||
return
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/mob/living/silicon/robot/attack_hand(mob/living/carbon/human/user)
|
||||
/mob/living/silicon/robot/attack_hand(mob/living/carbon/human/user, list/modifiers)
|
||||
add_fingerprint(user)
|
||||
if(opened && !wiresexposed && !issilicon(user))
|
||||
if(cell)
|
||||
|
||||
@@ -5,45 +5,45 @@
|
||||
/mob/living/silicon/get_ear_protection()//no ears
|
||||
return 2
|
||||
|
||||
/mob/living/silicon/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
/mob/living/silicon/attack_alien(mob/living/carbon/alien/humanoid/user, list/modifiers)
|
||||
if(..()) //if harm or disarm intent
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
var/damage = rand(user.melee_damage_lower, user.melee_damage_upper)
|
||||
if (prob(90))
|
||||
log_combat(M, src, "attacked")
|
||||
log_combat(user, src, "attacked")
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 25, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M] slashes at [src]!</span>", \
|
||||
"<span class='userdanger'>[M] slashes at you!</span>", null, null, M)
|
||||
to_chat(M, "<span class='danger'>You slash at [src]!</span>")
|
||||
visible_message("<span class='danger'>[user] slashes at [src]!</span>", \
|
||||
"<span class='userdanger'>[user] slashes at you!</span>", null, null, user)
|
||||
to_chat(user, "<span class='danger'>You slash at [src]!</span>")
|
||||
if(prob(8))
|
||||
flash_act(affect_silicon = 1)
|
||||
log_combat(M, src, "attacked")
|
||||
log_combat(user, src, "attacked")
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M]'s swipe misses [src]!</span>", \
|
||||
"<span class='danger'>You avoid [M]'s swipe!</span>", null, null, M)
|
||||
to_chat(M, "<span class='warning'>Your swipe misses [src]!</span>")
|
||||
visible_message("<span class='danger'>[user]'s swipe misses [src]!</span>", \
|
||||
"<span class='danger'>You avoid [user]'s swipe!</span>", null, null, user)
|
||||
to_chat(user, "<span class='warning'>Your swipe misses [src]!</span>")
|
||||
|
||||
/mob/living/silicon/attack_animal(mob/living/simple_animal/M)
|
||||
/mob/living/silicon/attack_animal(mob/living/simple_animal/user, list/modifiers)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
var/damage = rand(user.melee_damage_lower, user.melee_damage_upper)
|
||||
if(prob(damage))
|
||||
for(var/mob/living/N in buckled_mobs)
|
||||
N.Paralyze(20)
|
||||
unbuckle_mob(N)
|
||||
N.visible_message("<span class='danger'>[N] is knocked off of [src] by [M]!</span>", \
|
||||
"<span class='userdanger'>You're knocked off of [src] by [M]!</span>", null, null, M)
|
||||
to_chat(M, "<span class='danger'>You knock [N] off of [src]!</span>")
|
||||
switch(M.melee_damage_type)
|
||||
for(var/mob/living/buckled in buckled_mobs)
|
||||
buckled.Paralyze(20)
|
||||
unbuckle_mob(buckled)
|
||||
buckled.visible_message("<span class='danger'>[buckled] is knocked off of [src] by [user]!</span>", \
|
||||
"<span class='userdanger'>You're knocked off of [src] by [user]!</span>", null, null, user)
|
||||
to_chat(user, "<span class='danger'>You knock [buckled] off of [src]!</span>")
|
||||
switch(user.melee_damage_type)
|
||||
if(BRUTE)
|
||||
adjustBruteLoss(damage)
|
||||
if(BURN)
|
||||
adjustFireLoss(damage)
|
||||
|
||||
/mob/living/silicon/attack_paw(mob/living/user)
|
||||
return attack_hand(user)
|
||||
/mob/living/silicon/attack_paw(mob/living/user, list/modifiers)
|
||||
return attack_hand(user, modifiers)
|
||||
|
||||
/mob/living/silicon/attack_larva(mob/living/carbon/alien/larva/L)
|
||||
if(!L.combat_mode)
|
||||
@@ -60,21 +60,21 @@
|
||||
to_chat(user, "<span class='danger'>You punch [src]!</span>")
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/mob/living/silicon/attack_hand(mob/living/carbon/human/M, modifiers)
|
||||
/mob/living/silicon/attack_hand(mob/living/carbon/human/user, list/modifiers)
|
||||
. = FALSE
|
||||
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_HAND, M) & COMPONENT_CANCEL_ATTACK_CHAIN)
|
||||
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_HAND, user) & COMPONENT_CANCEL_ATTACK_CHAIN)
|
||||
. = TRUE
|
||||
if(M.combat_mode)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
if(user.combat_mode)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
playsound(src.loc, 'sound/effects/bang.ogg', 10, TRUE)
|
||||
visible_message("<span class='danger'>[M] punches [src], but doesn't leave a dent!</span>", \
|
||||
"<span class='warning'>[M] punches you, but doesn't leave a dent!</span>", null, COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='danger'>You punch [src], but don't leave a dent!</span>")
|
||||
visible_message("<span class='danger'>[user] punches [src], but doesn't leave a dent!</span>", \
|
||||
"<span class='warning'>[user] punches you, but doesn't leave a dent!</span>", null, COMBAT_MESSAGE_RANGE, user)
|
||||
to_chat(user, "<span class='danger'>You punch [src], but don't leave a dent!</span>")
|
||||
else
|
||||
visible_message("<span class='notice'>[M] pets [src].</span>", \
|
||||
"<span class='notice'>[M] pets you.</span>", null, null, M)
|
||||
to_chat(M, "<span class='notice'>You pet [src].</span>")
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT_RND, "pet_borg", /datum/mood_event/pet_borg)
|
||||
visible_message("<span class='notice'>[user] pets [src].</span>", \
|
||||
"<span class='notice'>[user] pets you.</span>", null, null, user)
|
||||
to_chat(user, "<span class='notice'>You pet [src].</span>")
|
||||
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT_RND, "pet_borg", /datum/mood_event/pet_borg)
|
||||
|
||||
|
||||
/mob/living/silicon/attack_drone(mob/living/simple_animal/drone/M)
|
||||
|
||||
@@ -1,46 +1,44 @@
|
||||
|
||||
|
||||
/mob/living/simple_animal/attack_hand(mob/living/carbon/human/M, modifiers)
|
||||
/mob/living/simple_animal/attack_hand(mob/living/carbon/human/user, list/modifiers)
|
||||
// so that martial arts don't double dip
|
||||
if (..())
|
||||
return TRUE
|
||||
|
||||
if(LAZYACCESS(modifiers, RIGHT_CLICK))
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
|
||||
var/shove_dir = get_dir(M, src)
|
||||
var/shove_dir = get_dir(user, src)
|
||||
if(!Move(get_step(src, shove_dir), shove_dir))
|
||||
log_combat(M, src, "shoved", "failing to move it")
|
||||
M.visible_message("<span class='danger'>[M.name] shoves [src]!</span>",
|
||||
log_combat(user, src, "shoved", "failing to move it")
|
||||
user.visible_message("<span class='danger'>[user.name] shoves [src]!</span>",
|
||||
"<span class='danger'>You shove [src]!</span>", "<span class='hear'>You hear aggressive shuffling!</span>", COMBAT_MESSAGE_RANGE, list(src))
|
||||
to_chat(src, "<span class='userdanger'>You're shoved by [M.name]!</span>")
|
||||
to_chat(src, "<span class='userdanger'>You're shoved by [user.name]!</span>")
|
||||
return TRUE
|
||||
log_combat(M, src, "shoved", "pushing it")
|
||||
M.visible_message("<span class='danger'>[M.name] shoves [src], pushing [p_them()]!</span>",
|
||||
log_combat(user, src, "shoved", "pushing it")
|
||||
user.visible_message("<span class='danger'>[user.name] shoves [src], pushing [p_them()]!</span>",
|
||||
"<span class='danger'>You shove [src], pushing [p_them()]!</span>", "<span class='hear'>You hear aggressive shuffling!</span>", COMBAT_MESSAGE_RANGE, list(src))
|
||||
to_chat(src, "<span class='userdanger'>You're pushed by [M.name]!</span>")
|
||||
to_chat(src, "<span class='userdanger'>You're pushed by [user.name]!</span>")
|
||||
return TRUE
|
||||
|
||||
if(!M.combat_mode)
|
||||
if(!user.combat_mode)
|
||||
if (stat == DEAD)
|
||||
return
|
||||
visible_message("<span class='notice'>[M] [response_help_continuous] [src].</span>", \
|
||||
"<span class='notice'>[M] [response_help_continuous] you.</span>", null, null, M)
|
||||
to_chat(M, "<span class='notice'>You [response_help_simple] [src].</span>")
|
||||
visible_message("<span class='notice'>[user] [response_help_continuous] [src].</span>", \
|
||||
"<span class='notice'>[user] [response_help_continuous] you.</span>", null, null, user)
|
||||
to_chat(user, "<span class='notice'>You [response_help_simple] [src].</span>")
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
|
||||
if(pet_bonus)
|
||||
funpet(M)
|
||||
funpet(user)
|
||||
else
|
||||
if(HAS_TRAIT(M, TRAIT_PACIFISM))
|
||||
to_chat(M, "<span class='warning'>You don't want to hurt [src]!</span>")
|
||||
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
to_chat(user, "<span class='warning'>You don't want to hurt [src]!</span>")
|
||||
return
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
visible_message("<span class='danger'>[M] [response_harm_continuous] [src]!</span>",\
|
||||
"<span class='userdanger'>[M] [response_harm_continuous] you!</span>", null, COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='danger'>You [response_harm_simple] [src]!</span>")
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
visible_message("<span class='danger'>[user] [response_harm_continuous] [src]!</span>",\
|
||||
"<span class='userdanger'>[user] [response_harm_continuous] you!</span>", null, COMBAT_MESSAGE_RANGE, user)
|
||||
to_chat(user, "<span class='danger'>You [response_harm_simple] [src]!</span>")
|
||||
playsound(loc, attacked_sound, 25, TRUE, -1)
|
||||
attack_threshold_check(harm_intent_damage)
|
||||
log_combat(M, src, "attacked")
|
||||
log_combat(user, src, "attacked")
|
||||
updatehealth()
|
||||
return TRUE
|
||||
|
||||
@@ -64,36 +62,36 @@
|
||||
to_chat(user, "<span class='danger'>You punch [src]!</span>")
|
||||
adjustBruteLoss(15)
|
||||
|
||||
/mob/living/simple_animal/attack_paw(mob/living/carbon/human/M)
|
||||
/mob/living/simple_animal/attack_paw(mob/living/carbon/human/user, list/modifiers)
|
||||
if(..()) //successful monkey bite.
|
||||
if(stat != DEAD)
|
||||
var/damage = rand(1, 3)
|
||||
attack_threshold_check(damage)
|
||||
return 1
|
||||
if (!M.combat_mode)
|
||||
if (!user.combat_mode)
|
||||
if (health > 0)
|
||||
visible_message("<span class='notice'>[M.name] [response_help_continuous] [src].</span>", \
|
||||
"<span class='notice'>[M.name] [response_help_continuous] you.</span>", null, COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='notice'>You [response_help_simple] [src].</span>")
|
||||
visible_message("<span class='notice'>[user.name] [response_help_continuous] [src].</span>", \
|
||||
"<span class='notice'>[user.name] [response_help_continuous] you.</span>", null, COMBAT_MESSAGE_RANGE, user)
|
||||
to_chat(user, "<span class='notice'>You [response_help_simple] [src].</span>")
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
|
||||
|
||||
|
||||
/mob/living/simple_animal/attack_alien(mob/living/carbon/alien/humanoid/M, modifiers)
|
||||
/mob/living/simple_animal/attack_alien(mob/living/carbon/alien/humanoid/user, list/modifiers)
|
||||
if(..()) //if harm or disarm intent.
|
||||
if(LAZYACCESS(modifiers, RIGHT_CLICK))
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 25, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M] [response_disarm_continuous] [name]!</span>", \
|
||||
"<span class='userdanger'>[M] [response_disarm_continuous] you!</span>", null, COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='danger'>You [response_disarm_simple] [name]!</span>")
|
||||
log_combat(M, src, "disarmed")
|
||||
visible_message("<span class='danger'>[user] [response_disarm_continuous] [name]!</span>", \
|
||||
"<span class='userdanger'>[user] [response_disarm_continuous] you!</span>", null, COMBAT_MESSAGE_RANGE, user)
|
||||
to_chat(user, "<span class='danger'>You [response_disarm_simple] [name]!</span>")
|
||||
log_combat(user, src, "disarmed")
|
||||
else
|
||||
var/damage = rand(15, 30)
|
||||
visible_message("<span class='danger'>[M] slashes at [src]!</span>", \
|
||||
"<span class='userdanger'>You're slashed at by [M]!</span>", null, COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='danger'>You slash at [src]!</span>")
|
||||
visible_message("<span class='danger'>[user] slashes at [src]!</span>", \
|
||||
"<span class='userdanger'>You're slashed at by [user]!</span>", null, COMBAT_MESSAGE_RANGE, user)
|
||||
to_chat(user, "<span class='danger'>You slash at [src]!</span>")
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 25, TRUE, -1)
|
||||
attack_threshold_check(damage)
|
||||
log_combat(M, src, "attacked")
|
||||
log_combat(user, src, "attacked")
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/attack_larva(mob/living/carbon/alien/larva/L)
|
||||
@@ -104,11 +102,11 @@
|
||||
if(.)
|
||||
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
|
||||
|
||||
/mob/living/simple_animal/attack_animal(mob/living/simple_animal/M)
|
||||
/mob/living/simple_animal/attack_animal(mob/living/simple_animal/user, list/modifiers)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
return attack_threshold_check(damage, M.melee_damage_type)
|
||||
var/damage = rand(user.melee_damage_lower, user.melee_damage_upper)
|
||||
return attack_threshold_check(damage, user.melee_damage_type)
|
||||
|
||||
/mob/living/simple_animal/attack_slime(mob/living/simple_animal/slime/M)
|
||||
if(..()) //successful slime attack
|
||||
|
||||
@@ -291,9 +291,9 @@
|
||||
return TRUE //Successful completion. Used to prevent child process() continuing if this one is ended early.
|
||||
|
||||
|
||||
/mob/living/simple_animal/bot/attack_hand(mob/living/carbon/human/H)
|
||||
if(!H.combat_mode)
|
||||
interact(H)
|
||||
/mob/living/simple_animal/bot/attack_hand(mob/living/carbon/human/user, list/modifiers)
|
||||
if(!user.combat_mode)
|
||||
interact(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -311,7 +311,7 @@
|
||||
|
||||
target_types = typecacheof(target_types)
|
||||
|
||||
/mob/living/simple_animal/bot/cleanbot/UnarmedAttack(atom/A)
|
||||
/mob/living/simple_animal/bot/cleanbot/UnarmedAttack(atom/A, proximity_flag, list/modifiers)
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
if(ismopable(A))
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
internal_ext.max_water = INFINITY
|
||||
internal_ext.refill()
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/UnarmedAttack(atom/A)
|
||||
/mob/living/simple_animal/bot/firebot/UnarmedAttack(atom/A, proximity_flag, list/modifiers)
|
||||
if(!on)
|
||||
return
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
@@ -72,7 +72,7 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/RangedAttack(atom/A)
|
||||
/mob/living/simple_animal/bot/firebot/RangedAttack(atom/A, proximity_flag, list/modifiers)
|
||||
if(!on)
|
||||
return
|
||||
if(internal_ext)
|
||||
|
||||
@@ -415,7 +415,7 @@
|
||||
/obj/machinery/bot_core/floorbot
|
||||
req_one_access = list(ACCESS_CONSTRUCTION, ACCESS_ROBOTICS)
|
||||
|
||||
/mob/living/simple_animal/bot/floorbot/UnarmedAttack(atom/A)
|
||||
/mob/living/simple_animal/bot/floorbot/UnarmedAttack(atom/A, proximity_flag, list/modifiers)
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
if(isturf(A))
|
||||
|
||||
@@ -112,9 +112,9 @@ Maintenance panel panel is [open ? "opened" : "closed"]"},
|
||||
target = H
|
||||
mode = BOT_HUNT
|
||||
|
||||
/mob/living/simple_animal/bot/honkbot/attack_hand(mob/living/carbon/human/H)
|
||||
if(H.combat_mode)
|
||||
retaliate(H)
|
||||
/mob/living/simple_animal/bot/honkbot/attack_hand(mob/living/carbon/human/user, list/modifiers)
|
||||
if(user.combat_mode)
|
||||
retaliate(user)
|
||||
addtimer(CALLBACK(src, .proc/react_buzz), 5)
|
||||
return ..()
|
||||
|
||||
@@ -140,7 +140,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"},
|
||||
retaliate(Proj.firer)
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/bot/honkbot/UnarmedAttack(atom/A)
|
||||
/mob/living/simple_animal/bot/honkbot/UnarmedAttack(atom/A, proximity_flag, list/modifiers)
|
||||
if(!on)
|
||||
return
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
@@ -342,7 +342,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"},
|
||||
new /obj/effect/decal/cleanable/oil(loc)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/bot/honkbot/attack_alien(mob/living/carbon/alien/user as mob)
|
||||
/mob/living/simple_animal/bot/honkbot/attack_alien(mob/living/carbon/alien/user, list/modifiers)
|
||||
..()
|
||||
if(!isalien(target))
|
||||
target = user
|
||||
|
||||
@@ -139,8 +139,8 @@
|
||||
text_dehack = "You reset [name]'s healing processor circuits."
|
||||
text_dehack_fail = "[name] seems damaged and does not respond to reprogramming!"
|
||||
|
||||
/mob/living/simple_animal/bot/medbot/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
/mob/living/simple_animal/bot/medbot/attack_paw(mob/user, list/modifiers)
|
||||
return attack_hand(user, modifiers)
|
||||
|
||||
/mob/living/simple_animal/bot/medbot/get_controls(mob/user)
|
||||
var/dat
|
||||
@@ -449,13 +449,13 @@
|
||||
if(damagetype_healer == "all" && treat_me_for.len)
|
||||
return TRUE
|
||||
|
||||
/mob/living/simple_animal/bot/medbot/attack_hand(mob/living/carbon/human/H, modifiers)
|
||||
if(DOING_INTERACTION_WITH_TARGET(H, src))
|
||||
to_chat(H, "<span class='warning'>You're already interacting with [src].</span>")
|
||||
/mob/living/simple_animal/bot/medbot/attack_hand(mob/living/carbon/human/user, list/modifiers)
|
||||
if(DOING_INTERACTION_WITH_TARGET(user, src))
|
||||
to_chat(user, "<span class='warning'>You're already interacting with [src].</span>")
|
||||
return
|
||||
|
||||
if(LAZYACCESS(modifiers, RIGHT_CLICK) && mode != BOT_TIPPED)
|
||||
H.visible_message("<span class='danger'>[H] begins tipping over [src].</span>", "<span class='warning'>You begin tipping over [src]...</span>")
|
||||
user.visible_message("<span class='danger'>[user] begins tipping over [src].</span>", "<span class='warning'>You begin tipping over [src]...</span>")
|
||||
|
||||
if(world.time > last_tipping_action_voice + 15 SECONDS)
|
||||
last_tipping_action_voice = world.time // message for tipping happens when we start interacting, message for righting comes after finishing
|
||||
@@ -464,17 +464,17 @@
|
||||
speak(message)
|
||||
playsound(src, messagevoice[message], 70, FALSE)
|
||||
|
||||
if(do_after(H, 3 SECONDS, target=src))
|
||||
tip_over(H)
|
||||
if(do_after(user, 3 SECONDS, target=src))
|
||||
tip_over(user)
|
||||
|
||||
else if(!H.combat_mode && mode == BOT_TIPPED)
|
||||
H.visible_message("<span class='notice'>[H] begins righting [src].</span>", "<span class='notice'>You begin righting [src]...</span>")
|
||||
if(do_after(H, 3 SECONDS, target=src))
|
||||
set_right(H)
|
||||
else if(!user.combat_mode && mode == BOT_TIPPED)
|
||||
user.visible_message("<span class='notice'>[user] begins righting [src].</span>", "<span class='notice'>You begin righting [src]...</span>")
|
||||
if(do_after(user, 3 SECONDS, target=src))
|
||||
set_right(user)
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/bot/medbot/UnarmedAttack(atom/A)
|
||||
/mob/living/simple_animal/bot/medbot/UnarmedAttack(atom/A, proximity_flag, list/modifiers)
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
if(iscarbon(A) && !tending)
|
||||
|
||||
@@ -806,7 +806,7 @@
|
||||
if(load)
|
||||
unload()
|
||||
|
||||
/mob/living/simple_animal/bot/mulebot/UnarmedAttack(atom/A)
|
||||
/mob/living/simple_animal/bot/mulebot/UnarmedAttack(atom/A, proximity_flag, list/modifiers)
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
if(isturf(A) && isturf(loc) && loc.Adjacent(A) && load)
|
||||
|
||||
@@ -196,17 +196,17 @@ Auto Patrol: []"},
|
||||
/mob/living/simple_animal/bot/secbot/proc/special_retaliate_after_attack(mob/user) //allows special actions to take place after being attacked.
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/attack_hand(mob/living/carbon/human/H)
|
||||
if(H.combat_mode)
|
||||
retaliate(H)
|
||||
if(special_retaliate_after_attack(H))
|
||||
/mob/living/simple_animal/bot/secbot/attack_hand(mob/living/carbon/human/user, list/modifiers)
|
||||
if(user.combat_mode)
|
||||
retaliate(user)
|
||||
if(special_retaliate_after_attack(user))
|
||||
return
|
||||
|
||||
// Turns an oversight into a feature. Beepsky will now announce when pacifists taunt him over sec comms.
|
||||
if(HAS_TRAIT(H, TRAIT_PACIFISM))
|
||||
H.visible_message("<span class='notice'>[H] taunts [src], daring [p_them()] to give chase!</span>", \
|
||||
"<span class='notice'>You taunt [src], daring [p_them()] to chase you!</span>", "<span class='hear'>You hear someone shout a daring taunt!</span>", DEFAULT_MESSAGE_RANGE, H)
|
||||
speak("Taunted by pacifist scumbag <b>[H]</b> in [get_area(src)].", radio_channel)
|
||||
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
user.visible_message("<span class='notice'>[user] taunts [src], daring [p_them()] to give chase!</span>", \
|
||||
"<span class='notice'>You taunt [src], daring [p_them()] to chase you!</span>", "<span class='hear'>You hear someone shout a daring taunt!</span>", DEFAULT_MESSAGE_RANGE, user)
|
||||
speak("Taunted by pacifist scumbag <b>[user]</b> in [get_area(src)].", radio_channel)
|
||||
|
||||
// Interrupt the attack chain. We've already handled this scenario for pacifists.
|
||||
return
|
||||
@@ -239,7 +239,7 @@ Auto Patrol: []"},
|
||||
retaliate(Proj.firer)
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/UnarmedAttack(atom/A)
|
||||
/mob/living/simple_animal/bot/secbot/UnarmedAttack(atom/A, proximity_flag, list/modifiers)
|
||||
if(!on)
|
||||
return
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
@@ -492,7 +492,7 @@ Auto Patrol: []"},
|
||||
new /obj/effect/decal/cleanable/oil(loc)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/attack_alien(mob/living/carbon/alien/user as mob)
|
||||
/mob/living/simple_animal/bot/secbot/attack_alien(mob/living/carbon/alien/user, list/modifiers)
|
||||
..()
|
||||
if(!isalien(target))
|
||||
target = user
|
||||
|
||||
@@ -84,28 +84,28 @@
|
||||
. += "<span class='warning'><b>[t_He] look[t_s] severely dented!</b></span>"
|
||||
. += "*---------*</span>"
|
||||
|
||||
/mob/living/simple_animal/hostile/construct/attack_animal(mob/living/simple_animal/M)
|
||||
if(isconstruct(M)) //is it a construct?
|
||||
var/mob/living/simple_animal/hostile/construct/C = M
|
||||
if(!C.can_repair_constructs || (C == src && !C.can_repair_self))
|
||||
/mob/living/simple_animal/hostile/construct/attack_animal(mob/living/simple_animal/user, list/modifiers)
|
||||
if(isconstruct(user)) //is it a construct?
|
||||
var/mob/living/simple_animal/hostile/construct/doll = user
|
||||
if(!doll.can_repair_constructs || (doll == src && !doll.can_repair_self))
|
||||
return ..()
|
||||
if(theme != C.theme)
|
||||
if(theme != doll.theme)
|
||||
return ..()
|
||||
if(health < maxHealth)
|
||||
adjustHealth(-5)
|
||||
if(src != M)
|
||||
Beam(M, icon_state="sendbeam", time = 4)
|
||||
M.visible_message("<span class='danger'>[M] repairs some of \the <b>[src]'s</b> dents.</span>", \
|
||||
if(src != user)
|
||||
Beam(user, icon_state="sendbeam", time = 4)
|
||||
user.visible_message("<span class='danger'>[user] repairs some of \the <b>[src]'s</b> dents.</span>", \
|
||||
"<span class='cult'>You repair some of <b>[src]'s</b> dents, leaving <b>[src]</b> at <b>[health]/[maxHealth]</b> health.</span>")
|
||||
else
|
||||
M.visible_message("<span class='danger'>[M] repairs some of [p_their()] own dents.</span>", \
|
||||
"<span class='cult'>You repair some of your own dents, leaving you at <b>[M.health]/[M.maxHealth]</b> health.</span>")
|
||||
user.visible_message("<span class='danger'>[user] repairs some of [p_their()] own dents.</span>", \
|
||||
"<span class='cult'>You repair some of your own dents, leaving you at <b>[user.health]/[user.maxHealth]</b> health.</span>")
|
||||
else
|
||||
if(src != M)
|
||||
to_chat(M, "<span class='cult'>You cannot repair <b>[src]'s</b> dents, as [p_they()] [p_have()] none!</span>")
|
||||
if(src != user)
|
||||
to_chat(user, "<span class='cult'>You cannot repair <b>[src]'s</b> dents, as [p_they()] [p_have()] none!</span>")
|
||||
else
|
||||
to_chat(M, "<span class='cult'>You cannot repair your own dents, as you have none!</span>")
|
||||
else if(src != M)
|
||||
to_chat(user, "<span class='cult'>You cannot repair your own dents, as you have none!</span>")
|
||||
else if(src != user)
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/construct/narsie_act()
|
||||
|
||||
@@ -315,8 +315,8 @@
|
||||
if(!D.is_decorated)
|
||||
D.decorate_donut()
|
||||
|
||||
/mob/living/simple_animal/pet/cat/cak/attack_hand(mob/living/L)
|
||||
/mob/living/simple_animal/pet/cat/cak/attack_hand(mob/living/user, list/modifiers)
|
||||
..()
|
||||
if(L.combat_mode && L.reagents && !stat)
|
||||
L.reagents.add_reagent(/datum/reagent/consumable/nutriment, 0.4)
|
||||
L.reagents.add_reagent(/datum/reagent/consumable/nutriment/vitamin, 0.4)
|
||||
if(user.combat_mode && user.reagents && !stat)
|
||||
user.reagents.add_reagent(/datum/reagent/consumable/nutriment, 0.4)
|
||||
user.reagents.add_reagent(/datum/reagent/consumable/nutriment/vitamin, 0.4)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
return
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/mob/living/simple_animal/drone/attack_hand(mob/user)
|
||||
/mob/living/simple_animal/drone/attack_hand(mob/user, list/modifiers)
|
||||
if(ishuman(user))
|
||||
if(stat == DEAD || status_flags & GODMODE || !can_be_held)
|
||||
..()
|
||||
|
||||
@@ -178,14 +178,14 @@
|
||||
if(stat == CONSCIOUS)
|
||||
udder.generateMilk()
|
||||
|
||||
/mob/living/simple_animal/cow/attack_hand(mob/living/carbon/M, modifiers)
|
||||
/mob/living/simple_animal/cow/attack_hand(mob/living/carbon/user, list/modifiers)
|
||||
if(!stat && LAZYACCESS(modifiers, RIGHT_CLICK) && icon_state != icon_dead)
|
||||
M.visible_message("<span class='warning'>[M] tips over [src].</span>",
|
||||
user.visible_message("<span class='warning'>[user] tips over [src].</span>",
|
||||
"<span class='notice'>You tip over [src].</span>")
|
||||
to_chat(src, "<span class='userdanger'>You are tipped over by [M]!</span>")
|
||||
to_chat(src, "<span class='userdanger'>You are tipped over by [user]!</span>")
|
||||
Paralyze(60, ignore_canstun = TRUE)
|
||||
icon_state = icon_dead
|
||||
addtimer(CALLBACK(src, .proc/cow_tipped, M), rand(20,50))
|
||||
addtimer(CALLBACK(src, .proc/cow_tipped, user), rand(20,50))
|
||||
|
||||
else
|
||||
..()
|
||||
@@ -221,10 +221,10 @@
|
||||
speak = GLOB.wisdoms //Done here so it's setup properly
|
||||
|
||||
///Give intense wisdom to the attacker if they're being friendly about it
|
||||
/mob/living/simple_animal/cow/wisdom/attack_hand(mob/living/carbon/M)
|
||||
if(!stat && !M.combat_mode)
|
||||
to_chat(M, "<span class='nicegreen'>[src] whispers you some intense wisdoms and then disappears!</span>")
|
||||
M.mind?.adjust_experience(pick(GLOB.skill_types), 500)
|
||||
/mob/living/simple_animal/cow/wisdom/attack_hand(mob/living/carbon/user, list/modifiers)
|
||||
if(!stat && !user.combat_mode)
|
||||
to_chat(user, "<span class='nicegreen'>[src] whispers you some intense wisdoms and then disappears!</span>")
|
||||
user.mind?.adjust_experience(pick(GLOB.skill_types), 500)
|
||||
do_smoke(1, get_turf(src))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
evolve()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/mouse/UnarmedAttack(atom/A, proximity)
|
||||
/mob/living/simple_animal/mouse/UnarmedAttack(atom/A, proximity_flag, list/modifiers)
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
. = ..()
|
||||
|
||||
@@ -153,11 +153,11 @@
|
||||
if(health < maxHealth)
|
||||
heal_overall_damage(10) //Fast life regen, makes it hard for you to get eaten to death.
|
||||
|
||||
/mob/living/simple_animal/hostile/bear/butter/attack_hand(mob/living/L) //Borrowed code from Cak, feeds people if they hit you. More nutriment but less vitamin to represent BUTTER.
|
||||
/mob/living/simple_animal/hostile/bear/butter/attack_hand(mob/living/user, list/modifiers) //Borrowed code from Cak, feeds people if they hit you. More nutriment but less vitamin to represent BUTTER.
|
||||
..()
|
||||
if(L.combat_mode && L.reagents && !stat)
|
||||
L.reagents.add_reagent(/datum/reagent/consumable/nutriment, 1)
|
||||
L.reagents.add_reagent(/datum/reagent/consumable/nutriment/vitamin, 0.1)
|
||||
if(user.combat_mode && user.reagents && !stat)
|
||||
user.reagents.add_reagent(/datum/reagent/consumable/nutriment, 1)
|
||||
user.reagents.add_reagent(/datum/reagent/consumable/nutriment/vitamin, 0.1)
|
||||
|
||||
/mob/living/simple_animal/hostile/bear/butter/CheckParts(list/parts) //Borrowed code from Cak, allows the brain used to actually control the bear.
|
||||
..()
|
||||
|
||||
@@ -429,7 +429,7 @@
|
||||
if(isliving(speaker))
|
||||
ActivationReaction(speaker, ACTIVATE_SPEECH)
|
||||
|
||||
/obj/machinery/anomalous_crystal/attack_hand(mob/user)
|
||||
/obj/machinery/anomalous_crystal/attack_hand(mob/user, list/modifiers)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
@@ -304,9 +304,9 @@ GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/ca
|
||||
return
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/xenobio/attack_hand(mob/living/carbon/human/M)
|
||||
/mob/living/simple_animal/hostile/mimic/xenobio/attack_hand(mob/living/carbon/human/user, list/modifiers)
|
||||
. = ..()
|
||||
if(M.combat_mode)
|
||||
if(user.combat_mode)
|
||||
return
|
||||
toggle_open()
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ While using this makes the system rely on OnFire, it still gives options for tim
|
||||
/mob/living/simple_animal/hostile/asteroid/elite/legionnaire,
|
||||
/mob/living/simple_animal/hostile/asteroid/elite/herald)
|
||||
|
||||
/obj/structure/elite_tumor/attack_hand(mob/user)
|
||||
/obj/structure/elite_tumor/attack_hand(mob/user, list/modifiers)
|
||||
. = ..()
|
||||
if(ishuman(user))
|
||||
switch(activity)
|
||||
|
||||
@@ -95,20 +95,20 @@
|
||||
/mob/living/simple_animal/hostile/mushroom/proc/stop_retreat()
|
||||
retreat_distance = null
|
||||
|
||||
/mob/living/simple_animal/hostile/mushroom/attack_animal(mob/living/L)
|
||||
if(istype(L, /mob/living/simple_animal/hostile/mushroom) && stat == DEAD)
|
||||
var/mob/living/simple_animal/hostile/mushroom/M = L
|
||||
/mob/living/simple_animal/hostile/mushroom/attack_animal(mob/living/user, list/modifiers)
|
||||
if(istype(user, /mob/living/simple_animal/hostile/mushroom) && stat == DEAD)
|
||||
var/mob/living/simple_animal/hostile/mushroom/shroom = user
|
||||
if(faint_ticker < 2)
|
||||
M.visible_message("<span class='notice'>[M] chews a bit on [src].</span>")
|
||||
shroom.visible_message("<span class='notice'>[shroom] chews a bit on [src].</span>")
|
||||
faint_ticker++
|
||||
return TRUE
|
||||
M.visible_message("<span class='warning'>[M] devours [src]!</span>")
|
||||
var/level_gain = (powerlevel - M.powerlevel)
|
||||
if(level_gain >= -1 && !bruised && !M.ckey)//Player shrooms can't level up to become robust gods.
|
||||
shroom.visible_message("<span class='warning'>[shroom] devours [src]!</span>")
|
||||
var/level_gain = (powerlevel - shroom.powerlevel)
|
||||
if(level_gain >= -1 && !bruised && !shroom.ckey)//Player shrooms can't level up to become robust gods.
|
||||
if(level_gain < 1)//So we still gain a level if two mushrooms were the same level
|
||||
level_gain = 1
|
||||
M.LevelUp(level_gain)
|
||||
M.adjustBruteLoss(-M.maxHealth)
|
||||
shroom.LevelUp(level_gain)
|
||||
shroom.adjustBruteLoss(-shroom.maxHealth)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
return ..()
|
||||
@@ -170,9 +170,9 @@
|
||||
Bruise()
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mushroom/attack_hand(mob/living/carbon/human/M)
|
||||
/mob/living/simple_animal/hostile/mushroom/attack_hand(mob/living/carbon/human/user, list/modifiers)
|
||||
..()
|
||||
if(M.combat_mode)
|
||||
if(user.combat_mode)
|
||||
Bruise()
|
||||
|
||||
/mob/living/simple_animal/hostile/mushroom/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
else
|
||||
. += "A direct link to another dimension full of creatures not very happy to see you. <span class='warning'>Entering the link would be a very bad idea.</span>"
|
||||
|
||||
/obj/structure/spawner/nether/attack_hand(mob/user)
|
||||
/obj/structure/spawner/nether/attack_hand(mob/user, list/modifiers)
|
||||
. = ..()
|
||||
if(isskeleton(user) || iszombie(user))
|
||||
to_chat(user, "<span class='notice'>You don't feel like going home yet...</span>")
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
return ..()
|
||||
eat_atom(attacked_target)
|
||||
|
||||
/mob/living/simple_animal/hostile/ooze/UnarmedAttack(atom/A)
|
||||
/mob/living/simple_animal/hostile/ooze/UnarmedAttack(atom/A, proximity_flag, list/modifiers)
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
if(!check_edible(A))
|
||||
|
||||
@@ -39,9 +39,9 @@
|
||||
var/banana_type = /obj/item/grown/bananapeel
|
||||
var/attack_reagent
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/clown/attack_hand(mob/living/carbon/human/M)
|
||||
/mob/living/simple_animal/hostile/retaliate/clown/attack_hand(mob/living/carbon/human/user, list/modifiers)
|
||||
..()
|
||||
playsound(src.loc, 'sound/items/bikehorn.ogg', 50, TRUE)
|
||||
playsound(loc, 'sound/items/bikehorn.ogg', 50, TRUE)
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/clown/Life()
|
||||
. = ..()
|
||||
@@ -334,7 +334,7 @@
|
||||
return ..()
|
||||
eat_atom(attacked_target)
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/clown/mutant/glutton/UnarmedAttack(atom/A)
|
||||
/mob/living/simple_animal/hostile/retaliate/clown/mutant/glutton/UnarmedAttack(atom/A, proximity_flag, list/modifiers)
|
||||
if(!check_edible(A))
|
||||
return ..()
|
||||
eat_atom(A)
|
||||
|
||||
@@ -91,9 +91,9 @@
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
is_tree = FALSE
|
||||
|
||||
/mob/living/simple_animal/hostile/tree/festivus/attack_hand(mob/living/carbon/human/M)
|
||||
/mob/living/simple_animal/hostile/tree/festivus/attack_hand(mob/living/carbon/human/user, list/modifiers)
|
||||
. = ..()
|
||||
if(!M.combat_mode)
|
||||
if(!user.combat_mode)
|
||||
visible_message("<span class='warning'>[src] crackles with static electricity!</span>")
|
||||
for(var/obj/item/stock_parts/cell/C in range(2, get_turf(src)))
|
||||
C.give(75)
|
||||
|
||||
@@ -282,18 +282,18 @@
|
||||
* Attack responces
|
||||
*/
|
||||
//Humans, monkeys, aliens
|
||||
/mob/living/simple_animal/parrot/attack_hand(mob/living/carbon/M)
|
||||
/mob/living/simple_animal/parrot/attack_hand(mob/living/carbon/user, list/modifiers)
|
||||
..()
|
||||
if(client)
|
||||
return
|
||||
if(!stat && M.combat_mode)
|
||||
if(!stat && user.combat_mode)
|
||||
|
||||
icon_state = icon_living //It is going to be flying regardless of whether it flees or attacks
|
||||
|
||||
if(parrot_state == PARROT_PERCH)
|
||||
parrot_sleep_dur = parrot_sleep_max //Reset it's sleep timer if it was perched
|
||||
|
||||
parrot_interest = M
|
||||
parrot_interest = user
|
||||
parrot_state = PARROT_SWOOP //The parrot just got hit, it WILL move, now to pick a direction..
|
||||
|
||||
if(health > 30) //Let's get in there and squawk it up!
|
||||
@@ -301,18 +301,18 @@
|
||||
else
|
||||
parrot_state |= PARROT_FLEE //Otherwise, fly like a bat out of hell!
|
||||
drop_held_item(0)
|
||||
if(stat != DEAD && !M.combat_mode)
|
||||
if(stat != DEAD && !user.combat_mode)
|
||||
handle_automated_speech(1) //assured speak/emote
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/parrot/attack_paw(mob/living/carbon/human/M)
|
||||
return attack_hand(M)
|
||||
/mob/living/simple_animal/parrot/attack_paw(mob/living/carbon/human/user, list/modifiers)
|
||||
return attack_hand(modifiers)
|
||||
|
||||
/mob/living/simple_animal/parrot/attack_alien(mob/living/carbon/alien/M)
|
||||
return attack_hand(M)
|
||||
/mob/living/simple_animal/parrot/attack_alien(mob/living/carbon/alien/user, list/modifiers)
|
||||
return attack_hand(user, modifiers)
|
||||
|
||||
//Simple animals
|
||||
/mob/living/simple_animal/parrot/attack_animal(mob/living/simple_animal/M)
|
||||
/mob/living/simple_animal/parrot/attack_animal(mob/living/simple_animal/user, list/modifiers)
|
||||
. = ..() //goodbye immortal parrots
|
||||
|
||||
if(client)
|
||||
@@ -321,8 +321,8 @@
|
||||
if(parrot_state == PARROT_PERCH)
|
||||
parrot_sleep_dur = parrot_sleep_max //Reset it's sleep timer if it was perched
|
||||
|
||||
if(M.melee_damage_upper > 0 && !stat)
|
||||
parrot_interest = M
|
||||
if(user.melee_damage_upper > 0 && !stat)
|
||||
parrot_interest = user
|
||||
parrot_state = PARROT_SWOOP | PARROT_ATTACK //Attack other animals regardless
|
||||
icon_state = icon_living
|
||||
|
||||
|
||||
@@ -50,19 +50,19 @@
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/shade/attack_animal(mob/living/simple_animal/M)
|
||||
if(isconstruct(M))
|
||||
var/mob/living/simple_animal/hostile/construct/C = M
|
||||
if(!C.can_repair_constructs)
|
||||
/mob/living/simple_animal/shade/attack_animal(mob/living/simple_animal/user, list/modifiers)
|
||||
if(isconstruct(user))
|
||||
var/mob/living/simple_animal/hostile/construct/doll = user
|
||||
if(!doll.can_repair_constructs)
|
||||
return
|
||||
if(health < maxHealth)
|
||||
adjustHealth(-25)
|
||||
Beam(M,icon_state="sendbeam", time = 4)
|
||||
M.visible_message("<span class='danger'>[M] heals \the <b>[src]</b>.</span>", \
|
||||
Beam(user,icon_state="sendbeam", time = 4)
|
||||
user.visible_message("<span class='danger'>[user] heals \the <b>[src]</b>.</span>", \
|
||||
"<span class='cult'>You heal <b>[src]</b>, leaving <b>[src]</b> at <b>[health]/[maxHealth]</b> health.</span>")
|
||||
else
|
||||
to_chat(M, "<span class='cult'>You cannot heal <b>[src]</b>, as [p_theyre()] unharmed!</span>")
|
||||
else if(src != M)
|
||||
to_chat(user, "<span class='cult'>You cannot heal <b>[src]</b>, as [p_theyre()] unharmed!</span>")
|
||||
else if(src != user)
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/shade/attackby(obj/item/O, mob/user, params) //Marker -Agouri
|
||||
|
||||
@@ -290,13 +290,13 @@
|
||||
M.adjustBruteLoss(-10 + (-10 * M.is_adult))
|
||||
M.updatehealth()
|
||||
|
||||
/mob/living/simple_animal/slime/attack_animal(mob/living/simple_animal/M)
|
||||
/mob/living/simple_animal/slime/attack_animal(mob/living/simple_animal/user, list/modifiers)
|
||||
. = ..()
|
||||
if(.)
|
||||
attacked += 10
|
||||
|
||||
|
||||
/mob/living/simple_animal/slime/attack_paw(mob/living/carbon/human/M)
|
||||
/mob/living/simple_animal/slime/attack_paw(mob/living/carbon/human/user, list/modifiers)
|
||||
if(..()) //successful monkey bite.
|
||||
attacked += 10
|
||||
|
||||
@@ -310,47 +310,47 @@
|
||||
return
|
||||
discipline_slime(user)
|
||||
|
||||
/mob/living/simple_animal/slime/attack_hand(mob/living/carbon/human/M, modifiers)
|
||||
/mob/living/simple_animal/slime/attack_hand(mob/living/carbon/human/user, list/modifiers)
|
||||
if(buckled)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
if(buckled == M)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
if(buckled == user)
|
||||
if(prob(60))
|
||||
M.visible_message("<span class='warning'>[M] attempts to wrestle \the [name] off!</span>", \
|
||||
user.visible_message("<span class='warning'>[user] attempts to wrestle \the [name] off!</span>", \
|
||||
"<span class='danger'>You attempt to wrestle \the [name] off!</span>")
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, TRUE, -1)
|
||||
|
||||
else
|
||||
M.visible_message("<span class='warning'>[M] manages to wrestle \the [name] off!</span>", \
|
||||
user.visible_message("<span class='warning'>[user] manages to wrestle \the [name] off!</span>", \
|
||||
"<span class='notice'>You manage to wrestle \the [name] off!</span>")
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
|
||||
|
||||
discipline_slime(M)
|
||||
discipline_slime(user)
|
||||
|
||||
else
|
||||
if(prob(30))
|
||||
buckled.visible_message("<span class='warning'>[M] attempts to wrestle \the [name] off of [buckled]!</span>", \
|
||||
"<span class='warning'>[M] attempts to wrestle \the [name] off of you!</span>")
|
||||
buckled.visible_message("<span class='warning'>[user] attempts to wrestle \the [name] off of [buckled]!</span>", \
|
||||
"<span class='warning'>[user] attempts to wrestle \the [name] off of you!</span>")
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, TRUE, -1)
|
||||
|
||||
else
|
||||
buckled.visible_message("<span class='warning'>[M] manages to wrestle \the [name] off of [buckled]!</span>", \
|
||||
"<span class='notice'>[M] manage to wrestle \the [name] off of you!</span>")
|
||||
buckled.visible_message("<span class='warning'>[user] manages to wrestle \the [name] off of [buckled]!</span>", \
|
||||
"<span class='notice'>[user] manage to wrestle \the [name] off of you!</span>")
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
|
||||
|
||||
discipline_slime(M)
|
||||
discipline_slime(user)
|
||||
else
|
||||
if(stat == DEAD && surgeries.len)
|
||||
if(!M.combat_mode || LAZYACCESS(modifiers, RIGHT_CLICK))
|
||||
if(!user.combat_mode || LAZYACCESS(modifiers, RIGHT_CLICK))
|
||||
for(var/datum/surgery/S in surgeries)
|
||||
if(S.next_step(M, modifiers))
|
||||
if(S.next_step(user, modifiers))
|
||||
return 1
|
||||
if(..()) //successful attack
|
||||
attacked += 10
|
||||
|
||||
/mob/living/simple_animal/slime/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
/mob/living/simple_animal/slime/attack_alien(mob/living/carbon/alien/humanoid/user, list/modifiers)
|
||||
if(..()) //if harm or disarm intent.
|
||||
attacked += 10
|
||||
discipline_slime(M)
|
||||
discipline_slime(user)
|
||||
|
||||
|
||||
/mob/living/simple_animal/slime/attackby(obj/item/W, mob/living/user, params)
|
||||
|
||||
Reference in New Issue
Block a user