Merge pull request #20962 from phil235/hit_message
No more message spam when you witness someone being attacked or shot
@@ -534,4 +534,15 @@ var/global/list/ghost_others_options = list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
|
||||
//Luma coefficients suggested for HDTVs. If you change these, make sure they add up to 1.
|
||||
#define LUMA_R 0.213
|
||||
#define LUMA_G 0.715
|
||||
#define LUMA_B 0.072
|
||||
#define LUMA_B 0.072
|
||||
|
||||
|
||||
//attack visual effects
|
||||
#define ATTACK_EFFECT_PUNCH "punch"
|
||||
#define ATTACK_EFFECT_KICK "kick"
|
||||
#define ATTACK_EFFECT_SMASH "smash"
|
||||
#define ATTACK_EFFECT_CLAW "claw"
|
||||
#define ATTACK_EFFECT_DISARM "disarm"
|
||||
#define ATTACK_EFFECT_BITE "bite"
|
||||
#define ATTACK_EFFECT_MECHFIRE "mech_fire"
|
||||
#define ATTACK_EFFECT_MECHTOXIN "mech_toxin"
|
||||
|
||||
@@ -34,8 +34,7 @@
|
||||
user.lastattacked = M
|
||||
M.lastattacker = user
|
||||
|
||||
if(user != M)
|
||||
user.do_attack_animation(M)
|
||||
user.do_attack_animation(M)
|
||||
M.attacked_by(src, user)
|
||||
|
||||
add_logs(user, M, "attacked", src.name, "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
|
||||
@@ -57,7 +56,8 @@
|
||||
|
||||
/obj/attacked_by(obj/item/I, mob/living/user)
|
||||
if(I.force)
|
||||
user.visible_message("<span class='danger'>[user] has hit [src] with [I]!</span>", "<span class='danger'>You hit [src] with [I]!</span>")
|
||||
visible_message("<span class='danger'>[user] has hit [src] with [I]!</span>", null, null, 2, user)
|
||||
//only witnesses close by and the victim see a hit message.
|
||||
take_damage(I.force, I.damtype, "melee", 1)
|
||||
|
||||
/mob/living/attacked_by(obj/item/I, mob/living/user)
|
||||
@@ -74,12 +74,8 @@
|
||||
return TRUE //successful attack
|
||||
|
||||
/mob/living/simple_animal/attacked_by(obj/item/I, mob/living/user)
|
||||
if(!I.force)
|
||||
user.visible_message("<span class='warning'>[user] gently taps [src] with [I].</span>",\
|
||||
"<span class='warning'>This weapon is ineffective, it does no damage!</span>")
|
||||
else if(I.force < force_threshold || I.damtype == STAMINA)
|
||||
visible_message("<span class='warning'>[I] bounces harmlessly off of [src].</span>",\
|
||||
"<span class='warning'>[I] bounces harmlessly off of [src]!</span>")
|
||||
if(I.force < force_threshold || I.damtype == STAMINA)
|
||||
playsound(loc, 'sound/weapons/tap.ogg', I.get_clamped_volume(), 1, -1)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -105,11 +101,10 @@
|
||||
var/message_hit_area = ""
|
||||
if(hit_area)
|
||||
message_hit_area = " in the [hit_area]"
|
||||
|
||||
var/attack_message = "[src] has been [message_verb][message_hit_area] with [I]."
|
||||
if(user in viewers(src, null))
|
||||
attack_message = "[user] has [message_verb] [src][message_hit_area] with [I]!"
|
||||
visible_message("<span class='danger'>[attack_message]</span>",
|
||||
"<span class='userdanger'>[attack_message]</span>")
|
||||
visible_message("<span class='danger'>[attack_message]</span>", \
|
||||
"<span class='userdanger'>[attack_message]</span>", null, 2,user)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -28,16 +28,26 @@
|
||||
|
||||
/datum/martial_art/proc/basic_hit(mob/living/carbon/human/A,mob/living/carbon/human/D)
|
||||
|
||||
A.do_attack_animation(D)
|
||||
var/damage = rand(A.dna.species.punchdamagelow, A.dna.species.punchdamagehigh)
|
||||
|
||||
var/atk_verb = A.dna.species.attack_verb
|
||||
if(D.lying)
|
||||
atk_verb = "kick"
|
||||
|
||||
switch(atk_verb)
|
||||
if("kick")
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
|
||||
if("slash")
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_CLAW)
|
||||
if("smash")
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_SMASH)
|
||||
else
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||
|
||||
if(!damage)
|
||||
playsound(D.loc, A.dna.species.miss_sound, 25, 1, -1)
|
||||
D.visible_message("<span class='warning'>[A] has attempted to [atk_verb] [D]!</span>")
|
||||
D.visible_message("<span class='warning'>[A] has attempted to [atk_verb] [D]!</span>", \
|
||||
"<span class='userdanger'>[A] has attempted to [atk_verb] [D]!</span>", null, 2, A)
|
||||
add_logs(A, D, "attempted to [atk_verb]")
|
||||
return 0
|
||||
|
||||
@@ -46,7 +56,7 @@
|
||||
|
||||
playsound(D.loc, A.dna.species.attack_sound, 25, 1, -1)
|
||||
D.visible_message("<span class='danger'>[A] has [atk_verb]ed [D]!</span>", \
|
||||
"<span class='userdanger'>[A] has [atk_verb]ed [D]!</span>")
|
||||
"<span class='userdanger'>[A] has [atk_verb]ed [D]!</span>", null, 2, A)
|
||||
|
||||
D.apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
|
||||
@@ -90,14 +100,15 @@
|
||||
|
||||
/datum/martial_art/boxing/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
|
||||
A.do_attack_animation(D)
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||
|
||||
var/atk_verb = pick("left hook","right hook","straight punch")
|
||||
|
||||
var/damage = rand(5, 8) + A.dna.species.punchdamagelow
|
||||
if(!damage)
|
||||
playsound(D.loc, A.dna.species.miss_sound, 25, 1, -1)
|
||||
D.visible_message("<span class='warning'>[A] has attempted to hit [D] with a [atk_verb]!</span>")
|
||||
D.visible_message("<span class='warning'>[A] has attempted to [atk_verb] [D]!</span>", \
|
||||
"<span class='userdanger'>[A] has attempted to [atk_verb] [D]!</span>", null, 2, A)
|
||||
add_logs(A, D, "attempted to hit", atk_verb)
|
||||
return 0
|
||||
|
||||
@@ -107,8 +118,8 @@
|
||||
|
||||
playsound(D.loc, A.dna.species.attack_sound, 25, 1, -1)
|
||||
|
||||
D.visible_message("<span class='danger'>[A] has hit [D] with a [atk_verb]!</span>", \
|
||||
"<span class='userdanger'>[A] has hit [D] with a [atk_verb]!</span>")
|
||||
D.visible_message("<span class='danger'>[A] has [atk_verb]ed [D]!</span>", \
|
||||
"<span class='userdanger'>[A] has [atk_verb]ed [D]!</span>", null, 2, A)
|
||||
|
||||
D.apply_damage(damage, STAMINA, affecting, armor_block)
|
||||
add_logs(A, D, "punched (boxing) ")
|
||||
@@ -185,7 +196,7 @@
|
||||
return
|
||||
|
||||
/datum/martial_art/plasma_fist/proc/Plasma(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
A.do_attack_animation(D)
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||
playsound(D.loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
A.say("PLASMA FIST!")
|
||||
D.visible_message("<span class='danger'>[A] has hit [D] with THE PLASMA FIST TECHNIQUE!</span>", \
|
||||
@@ -261,7 +272,7 @@
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/wristWrench(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!D.stat && !D.stunned && !D.weakened)
|
||||
A.do_attack_animation(D)
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||
D.visible_message("<span class='warning'>[A] grabs [D]'s wrist and wrenches it sideways!</span>", \
|
||||
"<span class='userdanger'>[A] grabs your wrist and violently wrenches it to the side!</span>")
|
||||
playsound(get_turf(A), 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
@@ -275,7 +286,7 @@
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/backKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(A.dir == D.dir && !D.stat && !D.weakened)
|
||||
A.do_attack_animation(D)
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||
D.visible_message("<span class='warning'>[A] kicks [D] in the back!</span>", \
|
||||
"<span class='userdanger'>[A] kicks you in the back, making you stumble and fall!</span>")
|
||||
step_to(D,get_step(D,D.dir),1)
|
||||
@@ -287,7 +298,7 @@
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/kneeStomach(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!D.stat && !D.weakened)
|
||||
A.do_attack_animation(D)
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
|
||||
D.visible_message("<span class='warning'>[A] knees [D] in the stomach!</span>", \
|
||||
"<span class='userdanger'>[A] winds you with a knee in the stomach!</span>")
|
||||
D.audible_message("<b>[D]</b> gags!")
|
||||
@@ -300,7 +311,7 @@
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/headKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!D.stat && !D.weakened)
|
||||
A.do_attack_animation(D)
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
|
||||
D.visible_message("<span class='warning'>[A] kicks [D] in the head!</span>", \
|
||||
"<span class='userdanger'>[A] kicks you in the jaw!</span>")
|
||||
D.apply_damage(20, BRUTE, "head")
|
||||
@@ -313,7 +324,7 @@
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/elbowDrop(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(D.weakened || D.resting || D.stat)
|
||||
A.do_attack_animation(D)
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||
D.visible_message("<span class='warning'>[A] elbow drops [D]!</span>", \
|
||||
"<span class='userdanger'>[A] piledrives you with their elbow!</span>")
|
||||
if(D.stat)
|
||||
@@ -343,7 +354,7 @@
|
||||
add_to_streak("H",D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
A.do_attack_animation(D)
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||
var/atk_verb = pick("punches", "kicks", "chops", "hits", "slams")
|
||||
D.visible_message("<span class='danger'>[A] [atk_verb] [D]!</span>", \
|
||||
"<span class='userdanger'>[A] [atk_verb] you!</span>")
|
||||
|
||||
@@ -110,7 +110,6 @@ datum/martial_art/krav_maga/grab_act(var/mob/living/carbon/human/A, var/mob/livi
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
add_logs(A, D, "punched")
|
||||
A.do_attack_animation(D)
|
||||
var/picked_hit_type = pick("punches", "kicks")
|
||||
var/bonus_damage = 10
|
||||
if(D.weakened || D.resting || D.lying)
|
||||
@@ -118,8 +117,10 @@ datum/martial_art/krav_maga/grab_act(var/mob/living/carbon/human/A, var/mob/livi
|
||||
picked_hit_type = "stomps on"
|
||||
D.apply_damage(bonus_damage, BRUTE)
|
||||
if(picked_hit_type == "kicks" || picked_hit_type == "stomps")
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
|
||||
playsound(get_turf(D), 'sound/effects/hit_kick.ogg', 50, 1, -1)
|
||||
else
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||
playsound(get_turf(D), 'sound/effects/hit_punch.ogg', 50, 1, -1)
|
||||
D.visible_message("<span class='danger'>[A] [picked_hit_type] [D]!</span>", \
|
||||
"<span class='userdanger'>[A] [picked_hit_type] you!</span>")
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
if(does_attack_animation)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
add_logs(user, src, "punched", "hulk powers")
|
||||
user.do_attack_animation(src)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_SMASH)
|
||||
|
||||
/atom/proc/CheckParts(list/parts_list)
|
||||
for(var/A in parts_list)
|
||||
|
||||
@@ -348,3 +348,64 @@
|
||||
//called when a mob resists while inside a container that is itself inside something.
|
||||
/atom/movable/proc/relay_container_resist(mob/living/user, obj/O)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/atom/movable/proc/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y)
|
||||
if(!no_effect && (visual_effect_icon || used_item))
|
||||
do_item_attack_animation(A, visual_effect_icon, used_item)
|
||||
|
||||
var/pixel_x_diff = 0
|
||||
var/pixel_y_diff = 0
|
||||
var/final_pixel_y = initial(pixel_y)
|
||||
if(end_pixel_y)
|
||||
final_pixel_y = end_pixel_y
|
||||
|
||||
var/direction = get_dir(src, A)
|
||||
if(direction & NORTH)
|
||||
pixel_y_diff = 8
|
||||
else if(direction & SOUTH)
|
||||
pixel_y_diff = -8
|
||||
|
||||
if(direction & EAST)
|
||||
pixel_x_diff = 8
|
||||
else if(direction & WEST)
|
||||
pixel_x_diff = -8
|
||||
|
||||
animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff, time = 2)
|
||||
animate(pixel_x = initial(pixel_x), pixel_y = final_pixel_y, time = 2)
|
||||
|
||||
/atom/movable/proc/do_item_attack_animation(atom/A, visual_effect_icon, obj/item/used_item)
|
||||
var/image/I
|
||||
if(visual_effect_icon)
|
||||
I = image('icons/effects/effects.dmi', A, visual_effect_icon, A.layer + 0.1)
|
||||
else if(used_item)
|
||||
I = image(used_item.icon, A, used_item.icon_state, A.layer + 0.1)
|
||||
|
||||
// Scale the icon.
|
||||
I.transform *= 0.75
|
||||
// The icon should not rotate.
|
||||
I.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
|
||||
|
||||
// Set the direction of the icon animation.
|
||||
var/direction = get_dir(src, A)
|
||||
if(direction & NORTH)
|
||||
I.pixel_y = -16
|
||||
else if(direction & SOUTH)
|
||||
I.pixel_y = 16
|
||||
|
||||
if(direction & EAST)
|
||||
I.pixel_x = -16
|
||||
else if(direction & WEST)
|
||||
I.pixel_x = 16
|
||||
|
||||
if(!direction) // Attacked self?!
|
||||
I.pixel_z = 16
|
||||
|
||||
if(!I)
|
||||
return
|
||||
|
||||
flick_overlay(I, clients, 5) // 5 ticks/half a second
|
||||
|
||||
// And animate the attack!
|
||||
animate(I, alpha = 175, pixel_x = 0, pixel_y = 0, pixel_z = 0, time = 3)
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
attack_message = "[user] has [message_verb] [src] with [I]!"
|
||||
if(message_verb)
|
||||
visible_message("<span class='danger'>[attack_message]</span>",
|
||||
"<span class='userdanger'>[attack_message]</span>")
|
||||
"<span class='userdanger'>[attack_message]</span>", null, 2, user)
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/true_devil/Process_Spacemove(movement_dir = 0)
|
||||
|
||||
@@ -246,9 +246,8 @@ Class Procs:
|
||||
return attack_hand(user)
|
||||
else
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
user.visible_message("<span class='danger'>[user.name] smashes against \the [src.name] with its paws.</span>",\
|
||||
"<span class='danger'>You smash against the [src.name] with your paws.</span>")
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
user.visible_message("<span class='danger'>[user.name] smashes against \the [src.name] with its paws.</span>", null, null, 2, user)
|
||||
take_damage(4, BRUTE, "melee", 1)
|
||||
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
parent_turret.attack_animal(user)
|
||||
|
||||
/obj/machinery/porta_turret_cover/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
|
||||
parent_turret.attack_hulk(user)
|
||||
return parent_turret.attack_hulk(user)
|
||||
|
||||
/obj/machinery/porta_turret_cover/can_be_overridden()
|
||||
. = 0
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
var/variance = 0
|
||||
var/randomspread = 0 //use random spread for machineguns, instead of shotgun scatter
|
||||
var/projectile_delay = 0
|
||||
var/firing_effect_type = /obj/effect/overlay/temp/dir_setting/firing_effect //the visual effect appearing when the weapon is fired.
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/can_attach(obj/mecha/combat/M)
|
||||
if(..())
|
||||
@@ -35,6 +36,9 @@
|
||||
A.firer = chassis.occupant
|
||||
A.original = target
|
||||
A.current = curloc
|
||||
if(!A.suppressed && firing_effect_type)
|
||||
PoolOrNew(firing_effect_type, list(get_turf(src), chassis.dir))
|
||||
|
||||
|
||||
var/spread = 0
|
||||
if(variance)
|
||||
@@ -56,6 +60,7 @@
|
||||
//Base energy weapon type
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy
|
||||
name = "general energy weapon"
|
||||
firing_effect_type = /obj/effect/overlay/temp/dir_setting/firing_effect/energy
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/get_shot_amount()
|
||||
return min(round(chassis.cell.charge / energy_drain), projectiles_per_shot)
|
||||
|
||||
@@ -54,9 +54,10 @@
|
||||
|
||||
/obj/mecha/attack_hand(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE) // Ugh. Ideally we shouldn't be setting cooldowns outside of click code.
|
||||
user.do_attack_animation(src)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 40, 1, -1)
|
||||
user.visible_message("<span class='danger'>[user] hits [name]. Nothing happens</span>", null, null, 2, user)
|
||||
log_message("Attack by hand/paw. Attacker - [user].",1)
|
||||
user.visible_message("<span class='danger'>[user] hits [name]. Nothing happens</span>","<span class='danger'>You hit [name] with no visible effect.</span>")
|
||||
log_append_to_last("Armor saved.")
|
||||
|
||||
/obj/mecha/attack_paw(mob/user as mob)
|
||||
@@ -93,9 +94,10 @@
|
||||
log_message("Attack by hulk. Attacker - [user].",1)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
add_logs(user, src, "punched", "hulk powers")
|
||||
user.do_attack_animation(src)
|
||||
user.visible_message("<span class='danger'>[user] hits [name]. The metal creaks and bends.</span>")
|
||||
user.visible_message("<span class='danger'>[user] hits [name]. The metal creaks and bends.</span>", null, null, 2, user)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_SMASH)
|
||||
take_damage(15, BRUTE, "melee", 0, get_dir(src, user))
|
||||
return 1
|
||||
|
||||
/obj/mecha/blob_act(obj/structure/blob/B)
|
||||
take_damage(30, BRUTE, "melee", 0, get_dir(src, B))
|
||||
@@ -317,3 +319,16 @@
|
||||
go_out(TRUE)
|
||||
if(L)
|
||||
L.ratvar_act()
|
||||
|
||||
/obj/mecha/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y)
|
||||
if(!no_effect)
|
||||
if(selected)
|
||||
used_item = selected
|
||||
else if(!visual_effect_icon)
|
||||
visual_effect_icon = ATTACK_EFFECT_SMASH
|
||||
if(damtype == BURN)
|
||||
visual_effect_icon = ATTACK_EFFECT_MECHFIRE
|
||||
else if(damtype == TOX)
|
||||
visual_effect_icon = ATTACK_EFFECT_MECHTOXIN
|
||||
..()
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
|
||||
/obj/structure/foamedmetal/attack_hand(mob/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
user << "<span class='warning'>You hit the metal foam but bounce off it!</span>"
|
||||
playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1)
|
||||
|
||||
|
||||
@@ -452,10 +452,11 @@ obj/item/proc/item_action_slot_check(slot, mob/user)
|
||||
|
||||
playsound(loc, src.hitsound, 30, 1, -1)
|
||||
|
||||
user.do_attack_animation(M)
|
||||
|
||||
if(M != user)
|
||||
M.visible_message("<span class='danger'>[user] has stabbed [M] in the eye with [src]!</span>", \
|
||||
"<span class='userdanger'>[user] stabs you in the eye with [src]!</span>")
|
||||
user.do_attack_animation(M)
|
||||
else
|
||||
user.visible_message( \
|
||||
"<span class='danger'>[user] has stabbed themself in the eyes with [src]!</span>", \
|
||||
|
||||
@@ -62,15 +62,15 @@
|
||||
|
||||
/obj/bullet_act(obj/item/projectile/P)
|
||||
. = ..()
|
||||
visible_message("<span class='danger'>[src] is hit by \a [P]!</span>")
|
||||
playsound(src, P.hitsound, 50, 1)
|
||||
visible_message("<span class='danger'>[src] is hit by \a [P]!</span>", null, null, 2)
|
||||
take_damage(P.damage, P.damage_type, P.flag, 0, turn(P.dir, 180))
|
||||
|
||||
|
||||
/obj/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
|
||||
if(user.a_intent == "harm")
|
||||
..(user, 1)
|
||||
visible_message("<span class='danger'>[user] smashes [src]!</span>")
|
||||
visible_message("<span class='danger'>[user] smashes [src]!</span>", null, null, 2, user)
|
||||
if(density)
|
||||
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
@@ -90,7 +90,6 @@
|
||||
/obj/proc/attack_generic(mob/user, damage_amount = 0, damage_type = BRUTE, damage_flag = 0, sound_effect = 1) //used by attack_alien, attack_animal, and attack_slime
|
||||
user.do_attack_animation(src)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.visible_message("<span class='danger'>[user] smashes into [src]!</span>")
|
||||
take_damage(damage_amount, damage_type, damage_flag, sound_effect, get_dir(src, user))
|
||||
|
||||
/obj/attack_alien(mob/living/carbon/alien/humanoid/user)
|
||||
@@ -119,15 +118,24 @@
|
||||
|
||||
/obj/mech_melee_attack(obj/mecha/M)
|
||||
M.do_attack_animation(src)
|
||||
switch(damtype)
|
||||
if(BRUTE)
|
||||
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
|
||||
if(BURN)
|
||||
playsound(src, 'sound/items/Welder.ogg', 50, 1)
|
||||
else
|
||||
return 0
|
||||
visible_message("<span class='danger'>[M.name] has hit [src].</span>")
|
||||
return take_damage(M.force*3, M.damtype, "melee", 0, get_dir(src, M)) // multiplied by 3 so we can hit objs hard but not be overpowered against mobs.
|
||||
var/play_soundeffect = 0
|
||||
var/mech_damtype = M.damtype
|
||||
if(M.selected)
|
||||
mech_damtype = M.selected.damtype
|
||||
play_soundeffect = 1
|
||||
else
|
||||
switch(M.damtype)
|
||||
if(BRUTE)
|
||||
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
|
||||
if(BURN)
|
||||
playsound(src, 'sound/items/Welder.ogg', 50, 1)
|
||||
if(TOX)
|
||||
playsound(src, 'sound/effects/spray2.ogg', 50, 1)
|
||||
return 0
|
||||
else
|
||||
return 0
|
||||
visible_message("<span class='danger'>[M.name] has hit [src].</span>", null, null, 2, M.occupant)
|
||||
return take_damage(M.force*3, mech_damtype, "melee", play_soundeffect, get_dir(src, M)) // multiplied by 3 so we can hit objs hard but not be overpowered against mobs.
|
||||
|
||||
/obj/singularity_act()
|
||||
ex_act(1)
|
||||
|
||||
@@ -105,12 +105,6 @@
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
/obj/structure/alien/resin/attack_alien(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
user.visible_message("<span class='danger'>[user] claws at the resin!</span>")
|
||||
take_damage(50)
|
||||
|
||||
/obj/structure/alien/resin/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
return !density
|
||||
|
||||
|
||||
@@ -302,10 +302,6 @@
|
||||
togglelock(user)
|
||||
return
|
||||
|
||||
/obj/structure/closet/attack_alien(mob/living/user)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
// tk grab then use on self
|
||||
/obj/structure/closet/attack_self_tk(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
@@ -185,9 +185,8 @@
|
||||
//prevents remote "kicks" with TK
|
||||
if (!Adjacent(user))
|
||||
return
|
||||
user.do_attack_animation(src)
|
||||
user.visible_message("<span class='danger'>[user] kicks the display case.</span>", \
|
||||
"<span class='notice'>You kick the display case.</span>")
|
||||
user.visible_message("<span class='danger'>[user] kicks the display case.</span>", null, null, 2, user)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
|
||||
take_damage(2)
|
||||
|
||||
|
||||
|
||||
@@ -44,8 +44,7 @@
|
||||
if(do_after(user, 60/I.toolspeed, target = src))
|
||||
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user << "<span class='notice'>You unsecure [name].</span>"
|
||||
new /obj/item/wallframe/extinguisher_cabinet(loc)
|
||||
qdel(src)
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
|
||||
if(iscyborg(user) || isalien(user))
|
||||
@@ -58,6 +57,7 @@
|
||||
stored_extinguisher = I
|
||||
update_icon()
|
||||
user << "<span class='notice'>You place [I] in [src].</span>"
|
||||
update_icon()
|
||||
else
|
||||
toggle_cabinet(user)
|
||||
else if(user.a_intent != "harm")
|
||||
@@ -73,8 +73,9 @@
|
||||
user.put_in_hands(stored_extinguisher)
|
||||
user << "<span class='notice'>You take [stored_extinguisher] from [src].</span>"
|
||||
stored_extinguisher = null
|
||||
opened = 1
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
if(!opened)
|
||||
opened = 1
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
update_icon()
|
||||
else
|
||||
toggle_cabinet(user)
|
||||
@@ -123,16 +124,19 @@
|
||||
/obj/structure/extinguisher_cabinet/obj_break(damage_flag)
|
||||
if(!broken && !(flags & NODECONSTRUCT))
|
||||
broken = 1
|
||||
opened = 0
|
||||
update_icon()
|
||||
opened = 1
|
||||
if(stored_extinguisher)
|
||||
stored_extinguisher.forceMove(loc)
|
||||
stored_extinguisher = null
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/structure/extinguisher_cabinet/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
new /obj/item/stack/sheet/metal (loc, 2)
|
||||
if(disassembled)
|
||||
new /obj/item/wallframe/extinguisher_cabinet(loc)
|
||||
else
|
||||
new /obj/item/stack/sheet/metal (loc, 2)
|
||||
if(stored_extinguisher)
|
||||
stored_extinguisher.forceMove(loc)
|
||||
stored_extinguisher = null
|
||||
|
||||
@@ -42,19 +42,15 @@
|
||||
|
||||
/obj/structure/grille/attack_hand(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
user.visible_message("<span class='warning'>[user] hits [src].</span>", \
|
||||
"<span class='danger'>You hit [src].</span>", \
|
||||
"<span class='italics'>You hear twisting metal.</span>")
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
|
||||
user.visible_message("<span class='warning'>[user] hits [src].</span>", null, null, 2, user)
|
||||
if(!shock(user, 70))
|
||||
take_damage(rand(5,10), BRUTE, "melee", 1)
|
||||
|
||||
/obj/structure/grille/attack_alien(mob/living/user)
|
||||
user.do_attack_animation(src)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.visible_message("<span class='warning'>[user] mangles [src].</span>", \
|
||||
"<span class='danger'>You mangle [src].</span>", \
|
||||
"<span class='italics'>You hear twisting metal.</span>")
|
||||
user.visible_message("<span class='warning'>[user] mangles [src].</span>", null, null, 2, user)
|
||||
if(!shock(user, 70))
|
||||
take_damage(20, BRUTE, "melee", 1)
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/holosign/attack_hand(mob/living/user)
|
||||
user.do_attack_animation(src)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
take_damage(5 , BRUTE, "melee", 1)
|
||||
|
||||
|
||||
@@ -437,9 +437,8 @@
|
||||
|
||||
/obj/structure/rack/attack_hand(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
user.visible_message("<span class='warning'>[user] kicks [src].</span>", \
|
||||
"<span class='danger'>You kick [src].</span>")
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
|
||||
user.visible_message("<span class='danger'>[user] kicks [src].</span>", null, null, 2, user)
|
||||
take_damage(rand(4,8), BRUTE, "melee", 1)
|
||||
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
/obj/structure/window/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
|
||||
if(!can_be_reached(user))
|
||||
return 1
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/structure/window/attack_hand(mob/user)
|
||||
if(!can_be_reached(user))
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
if(M.environment_smash == 3)
|
||||
dismantle_wall(1)
|
||||
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
|
||||
M << "<span class='notice'>You smash through the wall.</span>"
|
||||
else
|
||||
playsound(src, 'sound/effects/bang.ogg', 50, 1)
|
||||
M << "<span class='warning'>This wall is far too strong for you to destroy.</span>"
|
||||
|
||||
/turf/closed/wall/r_wall/try_destroy(obj/item/weapon/W, mob/user, turf/T)
|
||||
|
||||
@@ -84,13 +84,18 @@
|
||||
|
||||
/turf/closed/wall/mech_melee_attack(obj/mecha/M)
|
||||
M.do_attack_animation(src)
|
||||
if(M.damtype == "brute")
|
||||
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
|
||||
visible_message("<span class='danger'>[M.name] has hit [src]!</span>")
|
||||
if(prob(hardness + M.force) && M.force > 20)
|
||||
dismantle_wall(1)
|
||||
visible_message("<span class='warning'>[M.name] smashes through the wall!</span>")
|
||||
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
|
||||
switch(M.damtype)
|
||||
if(BRUTE)
|
||||
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
|
||||
visible_message("<span class='danger'>[M.name] has hit [src]!</span>", null, null, 2, M.occupant)
|
||||
if(prob(hardness + M.force) && M.force > 20)
|
||||
dismantle_wall(1)
|
||||
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
|
||||
if(BURN)
|
||||
playsound(src, 'sound/items/Welder.ogg', 100, 1)
|
||||
if(TOX)
|
||||
playsound(src, 'sound/effects/spray2.ogg', 100, 1)
|
||||
return 0
|
||||
|
||||
/turf/closed/wall/attack_paw(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
@@ -102,7 +107,6 @@
|
||||
M.do_attack_animation(src)
|
||||
if(M.environment_smash >= 2)
|
||||
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
|
||||
M << "<span class='notice'>You smash through the wall.</span>"
|
||||
dismantle_wall(1)
|
||||
return
|
||||
|
||||
@@ -110,7 +114,6 @@
|
||||
..(user, 1)
|
||||
if(prob(hardness))
|
||||
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
|
||||
user << text("<span class='notice'>You smash through the wall.</span>")
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
dismantle_wall(1)
|
||||
else
|
||||
|
||||
@@ -120,7 +120,8 @@
|
||||
if(answer == "Yes")
|
||||
card.removePersonality()
|
||||
var/turf/T = get_turf(src.loc)
|
||||
T.visible_message("<span class='notice'>[src] flashes a message across its screen, \"Wiping core files. Please acquire a new personality to continue using pAI device functions.\"</span>", "<span class='notice'>[src] bleeps electronically.</span>")
|
||||
T.visible_message("<span class='notice'>[src] flashes a message across its screen, \"Wiping core files. Please acquire a new personality to continue using pAI device functions.\"</span>", null, \
|
||||
"<span class='notice'>[src] bleeps electronically.</span>")
|
||||
death(0)
|
||||
else
|
||||
src << "Aborting suicide attempt."
|
||||
|
||||
@@ -459,7 +459,6 @@
|
||||
|
||||
|
||||
/obj/structure/spacevine/attack_paw(mob/living/user)
|
||||
user.do_attack_animation(src)
|
||||
for(var/datum/spacevine_mutation/SM in mutations)
|
||||
SM.on_hit(src, user)
|
||||
user_unbuckle_mob(user,user)
|
||||
|
||||
@@ -419,7 +419,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
|
||||
updateimage()
|
||||
else
|
||||
if(prob(15))
|
||||
src.do_attack_animation(my_target)
|
||||
do_attack_animation(my_target, ATTACK_EFFECT_PUNCH)
|
||||
if(weapon_name)
|
||||
my_target << sound(pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg'))
|
||||
my_target.show_message("<span class='danger'>[src.name] has attacked [my_target] with [weapon_name]!</span>", 1)
|
||||
|
||||
@@ -14,10 +14,6 @@ As such, they can either help or harm other aliens. Help works like the human he
|
||||
In all, this is a lot like the monkey code. /N
|
||||
*/
|
||||
/mob/living/carbon/alien/attack_alien(mob/living/carbon/alien/M)
|
||||
if(!ticker || !ticker.mode)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if(isturf(loc) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return
|
||||
@@ -37,12 +33,11 @@ In all, this is a lot like the monkey code. /N
|
||||
|
||||
else
|
||||
if (health > 0)
|
||||
M.do_attack_animation(src)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_BITE)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
var/damage = 1
|
||||
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] bites [src]!</span>")
|
||||
adjustBruteLoss(damage)
|
||||
"<span class='userdanger'>[M.name] bites [src]!</span>", null, 2, M)
|
||||
adjustBruteLoss(1)
|
||||
add_logs(M, src, "attacked")
|
||||
updatehealth()
|
||||
else
|
||||
@@ -62,8 +57,11 @@ In all, this is a lot like the monkey code. /N
|
||||
help_shake_act(M)
|
||||
if("grab")
|
||||
grabbedby(M)
|
||||
if ("harm", "disarm")
|
||||
M.do_attack_animation(src)
|
||||
if ("harm")
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
return 1
|
||||
if("disarm")
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -75,8 +73,6 @@ In all, this is a lot like the monkey code. /N
|
||||
apply_damage(rand(1, 3), BRUTE, affecting)
|
||||
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/alien/attack_animal(mob/living/simple_animal/M)
|
||||
if(..())
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
hitverb = "slammed"
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
visible_message("<span class='danger'>[user] has [hitverb] [src]!</span>", \
|
||||
"<span class='userdanger'>[user] has [hitverb] [src]!</span>")
|
||||
"<span class='userdanger'>[user] has [hitverb] [src]!</span>", null, 2, user)
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M)
|
||||
@@ -28,7 +28,7 @@
|
||||
if (prob(90))
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has punched [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has punched [src]!</span>")
|
||||
"<span class='userdanger'>[M] has punched [src]!</span>", null, 2, M)
|
||||
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>", \
|
||||
@@ -38,7 +38,8 @@
|
||||
add_logs(M, src, "attacked")
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has attempted to punch [src]!</span>")
|
||||
visible_message("<span class='userdanger'>[M] has attempted to punch [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has attempted to punch [src]!</span>", null, 2, M)
|
||||
|
||||
if ("disarm")
|
||||
if (!lying)
|
||||
@@ -53,7 +54,15 @@
|
||||
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>")
|
||||
"<span class='userdanger'>[M] has disarmed [src]!</span>", null, 2, M)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has attempted to disarm [src]!</span>")
|
||||
visible_message("<span class='userdanger'>[M] has attempted to disarm [src]!</span>",\
|
||||
"<span class='userdanger'>[M] has attempted to disarm [src]!</span>", null, 2, M)
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y)
|
||||
if(!no_effect && !visual_effect_icon)
|
||||
visual_effect_icon = ATTACK_EFFECT_CLAW
|
||||
..()
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
add_logs(M, src, "attacked")
|
||||
visible_message("<span class='danger'>[M] has kicked [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has kicked [src]!</span>")
|
||||
"<span class='userdanger'>[M] has kicked [src]!</span>", null, 2, M)
|
||||
if ((stat != DEAD) && (damage > 4.9))
|
||||
Paralyse(rand(5,10))
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
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>")
|
||||
"<span class='userdanger'>[M] has attempted to kick [src]!</span>", null, 2, M)
|
||||
|
||||
/mob/living/carbon/alien/larva/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
|
||||
if(user.a_intent == "harm")
|
||||
@@ -26,4 +26,9 @@
|
||||
step_away(src,user,15)
|
||||
sleep(1)
|
||||
step_away(src,user,15)
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/alien/larva/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y)
|
||||
if(!no_effect && !visual_effect_icon)
|
||||
visual_effect_icon = ATTACK_EFFECT_BITE
|
||||
..()
|
||||
|
||||
@@ -332,7 +332,7 @@
|
||||
updatehealth()
|
||||
|
||||
visible_message("<span class='danger'>[M.name] has hit [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] has hit [src]!</span>")
|
||||
"<span class='userdanger'>[M.name] has hit [src]!</span>", null, 2, M.occupant)
|
||||
add_logs(M.occupant, src, "attacked", M, "(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
|
||||
|
||||
else
|
||||
|
||||
@@ -964,19 +964,29 @@
|
||||
if(attacker_style && attacker_style.harm_act(user,target))
|
||||
return 1
|
||||
else
|
||||
user.do_attack_animation(target)
|
||||
|
||||
var/atk_verb = user.dna.species.attack_verb
|
||||
if(target.lying)
|
||||
atk_verb = "kick"
|
||||
|
||||
switch(atk_verb)
|
||||
if("kick")
|
||||
user.do_attack_animation(target, ATTACK_EFFECT_KICK)
|
||||
if("slash")
|
||||
user.do_attack_animation(target, ATTACK_EFFECT_CLAW)
|
||||
if("smash")
|
||||
user.do_attack_animation(target, ATTACK_EFFECT_SMASH)
|
||||
else
|
||||
user.do_attack_animation(target, ATTACK_EFFECT_PUNCH)
|
||||
|
||||
var/damage = rand(user.dna.species.punchdamagelow, user.dna.species.punchdamagehigh)
|
||||
|
||||
var/obj/item/bodypart/affecting = target.get_bodypart(ran_zone(user.zone_selected))
|
||||
|
||||
if(!damage || !affecting)
|
||||
playsound(target.loc, user.dna.species.miss_sound, 25, 1, -1)
|
||||
target.visible_message("<span class='warning'>[user] has attempted to [atk_verb] [target]!</span>")
|
||||
target.visible_message("<span class='danger'>[user] has attempted to [atk_verb] [target]!</span>",\
|
||||
"<span class='userdanger'>[user] has attempted to [atk_verb] [target]!</span>", null, 2, user)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -985,7 +995,7 @@
|
||||
playsound(target.loc, user.dna.species.attack_sound, 25, 1, -1)
|
||||
|
||||
target.visible_message("<span class='danger'>[user] has [atk_verb]ed [target]!</span>", \
|
||||
"<span class='userdanger'>[user] has [atk_verb]ed [target]!</span>")
|
||||
"<span class='userdanger'>[user] has [atk_verb]ed [target]!</span>", null, 2, user)
|
||||
|
||||
if(user.limb_destroyer)
|
||||
target.dismembering_strike(user, affecting.body_zone)
|
||||
@@ -1003,7 +1013,7 @@
|
||||
if(attacker_style && attacker_style.disarm_act(user,target))
|
||||
return 1
|
||||
else
|
||||
user.do_attack_animation(target)
|
||||
user.do_attack_animation(target, ATTACK_EFFECT_DISARM)
|
||||
add_logs(user, target, "disarmed")
|
||||
|
||||
if(target.w_uniform)
|
||||
@@ -1013,7 +1023,7 @@
|
||||
if(randn <= 25)
|
||||
playsound(target, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
target.visible_message("<span class='danger'>[user] has pushed [target]!</span>",
|
||||
"<span class='userdanger'>[user] has pushed [target]!</span>")
|
||||
"<span class='userdanger'>[user] has pushed [target]!</span>", null, 2, user)
|
||||
target.apply_effect(2, WEAKEN, target.run_armor_check(affecting, "melee", "Your armor prevents your fall!", "Your armor softens your fall!"))
|
||||
target.forcesay(hit_appends)
|
||||
return
|
||||
@@ -1023,7 +1033,7 @@
|
||||
if(randn <= 60)
|
||||
//BubbleWrap: Disarming breaks a pull
|
||||
if(target.pulling)
|
||||
target.visible_message("<span class='warning'>[user] has broken [target]'s grip on [target.pulling]!</span>")
|
||||
target << "<span class='warning'>[user] has broken [target]'s grip on [target.pulling]!</span>"
|
||||
talked = 1
|
||||
target.stop_pulling()
|
||||
//End BubbleWrap
|
||||
@@ -1031,15 +1041,14 @@
|
||||
if(!talked) //BubbleWrap
|
||||
if(target.drop_item())
|
||||
target.visible_message("<span class='danger'>[user] has disarmed [target]!</span>", \
|
||||
"<span class='userdanger'>[user] has disarmed [target]!</span>")
|
||||
"<span class='userdanger'>[user] has disarmed [target]!</span>", null, 2, user)
|
||||
playsound(target, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
return
|
||||
|
||||
|
||||
playsound(target, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
target.visible_message("<span class='danger'>[user] attempted to disarm [target]!</span>", \
|
||||
"<span class='userdanger'>[user] attemped to disarm [target]!</span>")
|
||||
return
|
||||
"<span class='userdanger'>[user] attemped to disarm [target]!</span>", null, 2, user)
|
||||
|
||||
|
||||
/datum/species/proc/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style = M.martial_art)
|
||||
|
||||
@@ -49,10 +49,10 @@
|
||||
if("grab")
|
||||
grabbedby(M)
|
||||
if("harm")
|
||||
M.do_attack_animation(src)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
if (prob(75))
|
||||
visible_message("<span class='danger'>[M] has punched [name]!</span>", \
|
||||
"<span class='userdanger'>[M] has punched [name]!</span>")
|
||||
"<span class='userdanger'>[M] has punched [name]!</span>", null, 2, M)
|
||||
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
var/damage = rand(5, 10)
|
||||
@@ -61,7 +61,7 @@
|
||||
if ( (paralysis < 5) && (health > 0) )
|
||||
Paralyse(rand(10, 15))
|
||||
visible_message("<span class='danger'>[M] has knocked out [name]!</span>", \
|
||||
"<span class='userdanger'>[M] has knocked out [name]!</span>")
|
||||
"<span class='userdanger'>[M] has knocked out [name]!</span>", null, 5)
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(M.zone_selected))
|
||||
if(!affecting)
|
||||
affecting = get_bodypart("chest")
|
||||
@@ -72,21 +72,21 @@
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has attempted to punch [name]!</span>", \
|
||||
"<span class='userdanger'>[M] has attempted to punch [name]!</span>")
|
||||
"<span class='userdanger'>[M] has attempted to punch [name]!</span>", null, 2, M)
|
||||
if("disarm")
|
||||
if (!( paralysis ))
|
||||
M.do_attack_animation(src)
|
||||
if (!paralysis)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
if (prob(25))
|
||||
Paralyse(2)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
add_logs(M, src, "pushed")
|
||||
visible_message("<span class='danger'>[M] has pushed down [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has pushed down [src]!</span>")
|
||||
"<span class='userdanger'>[M] has pushed down [src]!</span>", null, 2, M)
|
||||
else
|
||||
if(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>")
|
||||
"<span class='userdanger'>[M] has disarmed [src]!</span>", null, 2, M)
|
||||
|
||||
/mob/living/carbon/monkey/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
if(..()) //if harm or disarm intent.
|
||||
@@ -99,10 +99,10 @@
|
||||
if (paralysis < 15)
|
||||
Paralyse(rand(10, 15))
|
||||
visible_message("<span class='danger'>[M] has wounded [name]!</span>", \
|
||||
"<span class='userdanger'>[M] has wounded [name]!</span>")
|
||||
"<span class='userdanger'>[M] has wounded [name]!</span>", null, 2, M)
|
||||
else
|
||||
visible_message("<span class='danger'>[M] has slashed [name]!</span>", \
|
||||
"<span class='userdanger'>[M] has slashed [name]!</span>")
|
||||
"<span class='userdanger'>[M] has slashed [name]!</span>", null, 2, M)
|
||||
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(M.zone_selected))
|
||||
add_logs(M, src, "attacked")
|
||||
@@ -116,18 +116,18 @@
|
||||
else
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has attempted to lunge at [name]!</span>", \
|
||||
"<span class='userdanger'>[M] has attempted to lunge at [name]!</span>")
|
||||
"<span class='userdanger'>[M] has attempted to lunge at [name]!</span>", null, 2, M)
|
||||
|
||||
if (M.a_intent == "disarm")
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
|
||||
if(prob(95))
|
||||
Weaken(10)
|
||||
visible_message("<span class='danger'>[M] has tackled down [name]!</span>", \
|
||||
"<span class='userdanger'>[M] has tackled down [name]!</span>")
|
||||
"<span class='userdanger'>[M] has tackled down [name]!</span>", null, 2, M)
|
||||
else
|
||||
if(drop_item())
|
||||
visible_message("<span class='danger'>[M] has disarmed [name]!</span>", \
|
||||
"<span class='userdanger'>[M] has disarmed [name]!</span>")
|
||||
"<span class='userdanger'>[M] has disarmed [name]!</span>", null, 2, M)
|
||||
add_logs(M, src, "disarmed")
|
||||
updatehealth()
|
||||
|
||||
|
||||
@@ -654,71 +654,6 @@
|
||||
else
|
||||
step_towards(src,S)
|
||||
|
||||
/atom/movable/proc/do_attack_animation(atom/A, end_pixel_y)
|
||||
var/pixel_x_diff = 0
|
||||
var/pixel_y_diff = 0
|
||||
var/final_pixel_y = initial(pixel_y)
|
||||
if(end_pixel_y)
|
||||
final_pixel_y = end_pixel_y
|
||||
|
||||
var/direction = get_dir(src, A)
|
||||
if(direction & NORTH)
|
||||
pixel_y_diff = 8
|
||||
else if(direction & SOUTH)
|
||||
pixel_y_diff = -8
|
||||
|
||||
if(direction & EAST)
|
||||
pixel_x_diff = 8
|
||||
else if(direction & WEST)
|
||||
pixel_x_diff = -8
|
||||
|
||||
animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff, time = 2)
|
||||
animate(pixel_x = initial(pixel_x), pixel_y = final_pixel_y, time = 2)
|
||||
|
||||
|
||||
/mob/living/do_attack_animation(atom/A)
|
||||
var/final_pixel_y = get_standard_pixel_y_offset(lying)
|
||||
..(A, final_pixel_y)
|
||||
floating = 0 // If we were without gravity, the bouncing animation got stopped, so we make sure we restart the bouncing after the next movement.
|
||||
|
||||
// What icon do we use for the attack?
|
||||
var/image/I
|
||||
var/obj/item/held_item = get_active_held_item()
|
||||
if(held_item)
|
||||
I = image(held_item.icon, A, held_item.icon_state, A.layer + 0.1)
|
||||
else
|
||||
return
|
||||
|
||||
// Who can see the attack?
|
||||
var/list/viewing = list()
|
||||
for(var/mob/M in viewers(A))
|
||||
if(M.client)
|
||||
viewing |= M.client
|
||||
flick_overlay(I, viewing, 5) // 5 ticks/half a second
|
||||
|
||||
// Scale the icon.
|
||||
I.transform *= 0.75
|
||||
// The icon should not rotate.
|
||||
I.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
|
||||
|
||||
// Set the direction of the icon animation.
|
||||
var/direction = get_dir(src, A)
|
||||
if(direction & NORTH)
|
||||
I.pixel_y = -16
|
||||
else if(direction & SOUTH)
|
||||
I.pixel_y = 16
|
||||
|
||||
if(direction & EAST)
|
||||
I.pixel_x = -16
|
||||
else if(direction & WEST)
|
||||
I.pixel_x = 16
|
||||
|
||||
if(!direction) // Attacked self?!
|
||||
I.pixel_z = 16
|
||||
|
||||
// And animate the attack!
|
||||
animate(I, alpha = 175, pixel_x = 0, pixel_y = 0, pixel_z = 0, time = 3)
|
||||
|
||||
/mob/living/proc/do_jitter_animation(jitteriness)
|
||||
var/amplitude = min(4, (jitteriness/100) + 1)
|
||||
var/pixel_x_diff = rand(-amplitude, amplitude)
|
||||
|
||||
@@ -97,25 +97,25 @@
|
||||
if(M.damtype == "brute")
|
||||
step_away(src,M,15)
|
||||
switch(M.damtype)
|
||||
if("brute")
|
||||
if(BRUTE)
|
||||
Paralyse(1)
|
||||
take_overall_damage(rand(M.force/2, M.force))
|
||||
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
|
||||
if("fire")
|
||||
if(BURN)
|
||||
take_overall_damage(0, rand(M.force/2, M.force))
|
||||
playsound(src, 'sound/items/Welder.ogg', 50, 1)
|
||||
if("tox")
|
||||
if(TOX)
|
||||
M.mech_toxin_damage(src)
|
||||
else
|
||||
return
|
||||
updatehealth()
|
||||
visible_message("<span class='danger'>[M.name] has hit [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] has hit [src]!</span>")
|
||||
"<span class='userdanger'>[M.name] has hit [src]!</span>", null, 2, M.occupant)
|
||||
add_logs(M.occupant, src, "attacked", M, "(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
|
||||
else
|
||||
step_away(src,M)
|
||||
add_logs(M.occupant, src, "pushed", M)
|
||||
visible_message("<span class='warning'>[M] pushes [src] out of the way.</span>")
|
||||
visible_message("<span class='warning'>[M] pushes [src] out of the way.</span>", null, null, 5)
|
||||
|
||||
/mob/living/fire_act()
|
||||
adjust_fire_stacks(3)
|
||||
@@ -185,7 +185,7 @@
|
||||
add_logs(M, src, "attacked")
|
||||
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>")
|
||||
"<span class='userdanger'>The [M.name] glomps [src]!</span>", null, 2, M)
|
||||
return 1
|
||||
|
||||
/mob/living/attack_animal(mob/living/simple_animal/M)
|
||||
@@ -198,16 +198,12 @@
|
||||
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>")
|
||||
"<span class='userdanger'>\The [M] [M.attacktext] [src]!</span>", null, 2, M)
|
||||
add_logs(M, src, "attacked")
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/attack_paw(mob/living/carbon/monkey/M)
|
||||
if(!ticker || !ticker.mode)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return 0
|
||||
|
||||
if(isturf(loc) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return 0
|
||||
@@ -216,16 +212,16 @@
|
||||
if(M.is_muzzled() || (M.wear_mask && M.wear_mask.flags_cover & MASKCOVERSMOUTH))
|
||||
M << "<span class='warning'>You can't bite with your mouth covered!</span>"
|
||||
return 0
|
||||
M.do_attack_animation(src)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_BITE)
|
||||
if (prob(75))
|
||||
add_logs(M, src, "attacked")
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] bites [src]!</span>")
|
||||
"<span class='userdanger'>[M.name] bites [src]!</span>", null, 2, M)
|
||||
return 1
|
||||
else
|
||||
visible_message("<span class='danger'>[M.name] has attempted to bite [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] has attempted to bite [src]!</span>")
|
||||
"<span class='userdanger'>[M.name] has attempted to bite [src]!</span>", null, 2, M)
|
||||
return 0
|
||||
|
||||
/mob/living/attack_larva(mob/living/carbon/alien/larva/L)
|
||||
@@ -239,19 +235,15 @@
|
||||
if(prob(90))
|
||||
add_logs(L, src, "attacked")
|
||||
visible_message("<span class='danger'>[L.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[L.name] bites [src]!</span>")
|
||||
"<span class='userdanger'>[L.name] bites [src]!</span>", null, 2, L)
|
||||
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>")
|
||||
"<span class='userdanger'>[L.name] has attempted to bite [src]!</span>", null, 2, L)
|
||||
return 0
|
||||
|
||||
/mob/living/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
if(!ticker || !ticker.mode)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return 0
|
||||
|
||||
if(isturf(loc) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return 0
|
||||
@@ -264,9 +256,12 @@
|
||||
if ("grab")
|
||||
grabbedby(M)
|
||||
return 0
|
||||
else
|
||||
if("harm")
|
||||
M.do_attack_animation(src)
|
||||
return 1
|
||||
if("disarm")
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
return 1
|
||||
|
||||
/mob/living/ex_act(severity, target, origin)
|
||||
if(origin && istype(origin, /datum/spacevine_mutation) && isvineimmune(src))
|
||||
@@ -352,3 +347,11 @@
|
||||
//to damage the clothes worn by a mob
|
||||
/mob/living/proc/damage_clothes(damage_amount, damage_type = BRUTE, damage_flag = 0, def_zone)
|
||||
return
|
||||
|
||||
|
||||
/mob/living/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y)
|
||||
if(A != src)
|
||||
end_pixel_y = get_standard_pixel_y_offset(lying)
|
||||
used_item = get_active_held_item()
|
||||
..()
|
||||
floating = 0 // If we were without gravity, the bouncing animation got stopped, so we make sure we restart the bouncing after the next movement.
|
||||
|
||||
@@ -8,18 +8,18 @@
|
||||
/mob/living/silicon/robot/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
if (M.a_intent =="disarm")
|
||||
if(!(lying))
|
||||
M.do_attack_animation(src)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
if(get_active_held_item())
|
||||
uneq_active()
|
||||
visible_message("<span class='danger'>[M] disarmed [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has disabled [src]'s active module!</span>")
|
||||
"<span class='userdanger'>[M] has disabled [src]'s active module!</span>", null, 2, M)
|
||||
add_logs(M, src, "disarmed")
|
||||
else
|
||||
Stun(2)
|
||||
step(src,get_dir(M,src))
|
||||
add_logs(M, src, "pushed")
|
||||
visible_message("<span class='danger'>[M] has forced back [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has forced back [src]!</span>")
|
||||
"<span class='userdanger'>[M] has forced back [src]!</span>", null, 2, M)
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 50, 1, -1)
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -66,10 +66,10 @@
|
||||
if("grab")
|
||||
grabbedby(M)
|
||||
else
|
||||
M.do_attack_animation(src)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
playsound(src.loc, 'sound/effects/bang.ogg', 10, 1)
|
||||
visible_message("<span class='warning'>[M] punches [src], but doesn't leave a dent.</span>", \
|
||||
"<span class='warning'>[M] punches [src], but doesn't leave a dent.</span>")
|
||||
visible_message("<span class='danger'>[M] punches [src], but doesn't leave a dent.</span>", \
|
||||
"<span class='warning'>[M] punches [src], but doesn't leave a dent.</span>", null, 2, M)
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0)
|
||||
|
||||
@@ -13,8 +13,9 @@
|
||||
grabbedby(M)
|
||||
|
||||
if("harm", "disarm")
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[M] [response_harm] [src]!</span>")
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
visible_message("<span class='danger'>[M] [response_harm] [src]!</span>",\
|
||||
"<span class='userdanger'>[M] [response_harm] [src]!</span>", null, 2, M)
|
||||
playsound(loc, attacked_sound, 25, 1, -1)
|
||||
attack_threshold_check(harm_intent_damage)
|
||||
add_logs(M, src, "attacked")
|
||||
@@ -26,7 +27,7 @@
|
||||
..(user, 1)
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
visible_message("<span class='danger'>[user] has punched [src]!</span>", \
|
||||
"<span class='userdanger'>[user] has punched [src]!</span>")
|
||||
"<span class='userdanger'>[user] has punched [src]!</span>", null, 2, user)
|
||||
adjustBruteLoss(15)
|
||||
return 1
|
||||
|
||||
@@ -47,12 +48,12 @@
|
||||
if(M.a_intent == "disarm")
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] [response_disarm] [name]!</span>", \
|
||||
"<span class='userdanger'>[M] [response_disarm] [name]!</span>")
|
||||
"<span class='userdanger'>[M] [response_disarm] [name]!</span>", null, 2, M)
|
||||
add_logs(M, src, "disarmed")
|
||||
else
|
||||
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>")
|
||||
"<span class='userdanger'>[M] has slashed at [src]!</span>", null, 2, M)
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
||||
attack_threshold_check(damage)
|
||||
add_logs(M, src, "attacked")
|
||||
@@ -125,4 +126,12 @@
|
||||
|
||||
/mob/living/simple_animal/blob_act(obj/structure/blob/B)
|
||||
adjustBruteLoss(20)
|
||||
return
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/do_attack_animation(atom/A, visual_effect_icon, used_item, no_effect, end_pixel_y)
|
||||
if(!no_effect && !visual_effect_icon && melee_damage_upper)
|
||||
if(melee_damage_upper < 10)
|
||||
visual_effect_icon = ATTACK_EFFECT_PUNCH
|
||||
else
|
||||
visual_effect_icon = ATTACK_EFFECT_SMASH
|
||||
..()
|
||||
@@ -139,7 +139,7 @@
|
||||
A.visible_message("<span class='danger'>[A] starts to glow faintly!\
|
||||
</span>", "<span class='userdanger'>You start to faintly glow, and \
|
||||
you feel strangely weightless!</span>")
|
||||
do_attack_animation(A)
|
||||
do_attack_animation(A, null, 1)
|
||||
|
||||
if(!do_mob(src, A, 60)) //now start the channel
|
||||
src << "<span class='danger'><B>You need to hold still!</span></B>"
|
||||
|
||||
@@ -329,10 +329,9 @@
|
||||
return
|
||||
var/turf/startloc = get_turf(targets_from)
|
||||
if(casingtype)
|
||||
var/obj/item/ammo_casing/casing = new casingtype
|
||||
var/obj/item/ammo_casing/casing = new casingtype(startloc)
|
||||
playsound(src, projectilesound, 100, 1)
|
||||
casing.fire(targeted_atom, src, zone_override = ran_zone())
|
||||
casing.loc = startloc
|
||||
else if(projectiletype)
|
||||
var/obj/item/projectile/P = new projectiletype(startloc)
|
||||
playsound(src, projectilesound, 100, 1)
|
||||
|
||||
@@ -115,7 +115,7 @@ Difficulty: Hard
|
||||
bloodspell.phased = 1
|
||||
internal = new/obj/item/device/gps/internal/bubblegum(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/do_attack_animation(atom/A)
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/do_attack_animation(atom/A, visual_effect_icon)
|
||||
if(!charging)
|
||||
..()
|
||||
|
||||
|
||||
@@ -268,6 +268,7 @@ var/list/slime_colours = list("rainbow", "grey", "purple", "metal", "orange",
|
||||
|
||||
/mob/living/simple_animal/slime/attack_hand(mob/living/carbon/human/M)
|
||||
if(buckled)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
if(buckled == M)
|
||||
if(prob(60))
|
||||
visible_message("<span class='warning'>[M] attempts to wrestle \the [name] off!</span>")
|
||||
@@ -280,7 +281,6 @@ var/list/slime_colours = list("rainbow", "grey", "purple", "metal", "orange",
|
||||
discipline_slime(M)
|
||||
|
||||
else
|
||||
M.do_attack_animation(src)
|
||||
if(prob(30))
|
||||
visible_message("<span class='warning'>[M] attempts to wrestle \the [name] off of [buckled]!</span>")
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
|
||||
@@ -84,63 +84,45 @@ var/next_mob_id = 0
|
||||
else
|
||||
src << msg
|
||||
|
||||
// Show a message the src mob and to all player mobs who sees the src mob
|
||||
// This would be for visible actions by the src mob
|
||||
// message is the message output to anyone who can see e.g. "[src] does something!"
|
||||
// Show a message to all player mobs who sees this atom
|
||||
// Show a message to the src mob (if the src is a mob)
|
||||
// Use for atoms performing visible actions
|
||||
// message is output to anyone who can see, e.g. "The [src] does something!"
|
||||
// self_message (optional) is what the src mob sees e.g. "You do something!"
|
||||
// blind_message (optional) is what blind people will hear e.g. "You hear something!"
|
||||
// vision_distance (optional) define how many tiles away the message can be seen.
|
||||
// ignored_mob (optional) doesn't show any message to a given mob if TRUE.
|
||||
|
||||
/mob/visible_message(message, self_message, blind_message)
|
||||
/atom/proc/visible_message(message, self_message, blind_message, vision_distance, ignored_mob)
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T)
|
||||
return
|
||||
for(var/mob/M in get_hearers_in_view(7, src))
|
||||
var/range = 7
|
||||
if(vision_distance)
|
||||
range = vision_distance
|
||||
for(var/mob/M in get_hearers_in_view(range, src))
|
||||
if(!M.client)
|
||||
continue
|
||||
if(M == ignored_mob)
|
||||
continue
|
||||
var/msg = message
|
||||
if(M == src) //the src always see the main message or self message
|
||||
if(self_message)
|
||||
msg = self_message
|
||||
else
|
||||
if(M.see_invisible<invisibility || T != loc) //if src is inside something or invisible to us,
|
||||
if(M.see_invisible<invisibility || (T != loc && T != src))//if src is invisible to us or is inside something (and isn't a turf),
|
||||
if(blind_message) // then people see blind message if there is one, otherwise nothing.
|
||||
msg = blind_message
|
||||
else
|
||||
continue
|
||||
else if(T.lighting_object)
|
||||
if(T.lighting_object.invisibility <= M.see_invisible && !T.lighting_object.luminosity)
|
||||
if(blind_message) //if the light object is dark and not invisible to us, we see blind_message/nothing
|
||||
if(T.lighting_object.invisibility <= M.see_invisible && !T.lighting_object.luminosity) //the light object is dark and not invisible to us
|
||||
if(blind_message)
|
||||
msg = blind_message
|
||||
else
|
||||
continue
|
||||
M.show_message(msg,1,blind_message,2)
|
||||
|
||||
// Show a message to all player mobs who sees this atom
|
||||
// Use for objects performing visible actions
|
||||
// message is output to anyone who can see, e.g. "The [src] does something!"
|
||||
// blind_message (optional) is what blind people will hear e.g. "You hear something!"
|
||||
|
||||
/atom/proc/visible_message(message, blind_message)
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T)
|
||||
return
|
||||
for(var/mob/M in get_hearers_in_view(7, src))
|
||||
if(!M.client)
|
||||
continue
|
||||
var/msg = message
|
||||
if(M.see_invisible<invisibility || (T != loc && T != src))//if src is invisible to us or is inside something (and isn't a turf),
|
||||
if(blind_message) // then people see blind message if there is one, otherwise nothing.
|
||||
msg = blind_message
|
||||
else
|
||||
continue
|
||||
else if(T.lighting_object)
|
||||
if(T.lighting_object.invisibility <= M.see_invisible && !T.lighting_object.luminosity) //the light object is dark and not invisible to us
|
||||
if(blind_message)
|
||||
msg = blind_message
|
||||
else
|
||||
continue
|
||||
M.show_message(msg,1,blind_message,2)
|
||||
|
||||
// Show a message to all mobs in earshot of this one
|
||||
// This would be for audible actions by the src mob
|
||||
// message is the message output to anyone who can hear.
|
||||
|
||||
@@ -300,13 +300,13 @@
|
||||
radiation_pulse(get_turf(src), 1, 1, 150, 1)
|
||||
|
||||
|
||||
/obj/machinery/power/supermatter_shard/Bumped(atom/AM as mob|obj)
|
||||
/obj/machinery/power/supermatter_shard/Bumped(atom/AM)
|
||||
if(isliving(AM))
|
||||
AM.visible_message("<span class='danger'>\The [AM] slams into \the [src] inducing a resonance... \his body starts to glow and catch flame before flashing into ash.</span>",\
|
||||
"<span class='userdanger'>You slam into \the [src] as your ears are filled with unearthly ringing. Your last thought is \"Oh, fuck.\"</span>",\
|
||||
"<span class='italics'>You hear an unearthly noise as a wave of heat washes over you.</span>")
|
||||
else if(isobj(AM) && !istype(AM, /obj/effect))
|
||||
AM.visible_message("<span class='danger'>\The [AM] smacks into \the [src] and rapidly flashes to ash.</span>",\
|
||||
AM.visible_message("<span class='danger'>\The [AM] smacks into \the [src] and rapidly flashes to ash.</span>", null,\
|
||||
"<span class='italics'>You hear a loud crack as you are washed with a wave of heat.</span>")
|
||||
else
|
||||
return
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
else
|
||||
user << "<span class='warning'>You fail to collect anything!</span>"
|
||||
else
|
||||
..()
|
||||
return ..()
|
||||
|
||||
//Boxes of ammo
|
||||
/obj/item/ammo_box
|
||||
|
||||
@@ -371,18 +371,18 @@
|
||||
if(BB)
|
||||
BB.icon_state = "foamdart_empty"
|
||||
else
|
||||
icon_state = "foamdart"
|
||||
icon_state = initial(icon_state)
|
||||
desc = "Its nerf or nothing! Ages 8 and up."
|
||||
if(BB)
|
||||
BB.icon_state = "foamdart_empty"
|
||||
BB.icon_state = initial(BB.icon_state)
|
||||
|
||||
|
||||
/obj/item/ammo_casing/caseless/foam_dart/attackby(obj/item/A, mob/user, params)
|
||||
..()
|
||||
var/obj/item/projectile/bullet/reusable/foam_dart/FD = BB
|
||||
if (istype(A, /obj/item/weapon/screwdriver) && !modified)
|
||||
modified = 1
|
||||
FD.damage_type = BRUTE
|
||||
user << "<span class='notice'>You pop the safety cap off of [src].</span>"
|
||||
update_icon()
|
||||
else if ((istype(A, /obj/item/weapon/pen)) && modified && !FD.pen)
|
||||
if(!user.unEquip(A))
|
||||
@@ -392,7 +392,8 @@
|
||||
FD.damage = 5
|
||||
FD.nodamage = 0
|
||||
user << "<span class='notice'>You insert [A] into [src].</span>"
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/ammo_casing/caseless/foam_dart/attack_self(mob/living/user)
|
||||
var/obj/item/projectile/bullet/reusable/foam_dart/FD = BB
|
||||
|
||||
@@ -439,12 +439,15 @@ obj/item/ammo_box/magazine/tommygunm45
|
||||
|
||||
/obj/item/ammo_box/magazine/toy/smg
|
||||
name = "foam force SMG magazine"
|
||||
icon_state = "smg9mm-20"
|
||||
icon_state = "smg9mm-42"
|
||||
max_ammo = 20
|
||||
|
||||
/obj/item/ammo_box/magazine/toy/smg/update_icon()
|
||||
..()
|
||||
icon_state = "smg9mm-[round(ammo_count(),5)]"
|
||||
if(ammo_count())
|
||||
icon_state = "smg9mm-42"
|
||||
else
|
||||
icon_state = "smg9mm-0"
|
||||
|
||||
/obj/item/ammo_box/magazine/toy/smg/riot
|
||||
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
G.loc = loc
|
||||
qdel(G.pin)
|
||||
G.pin = null
|
||||
visible_message("[G] can now fit a new pin, but old one was destroyed in the process.")
|
||||
visible_message("[G] can now fit a new pin, but old one was destroyed in the process.", null, null, 3)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/gun/examine(mob/user)
|
||||
@@ -113,12 +113,11 @@
|
||||
playsound(user, fire_sound, 10, 1)
|
||||
else
|
||||
playsound(user, fire_sound, 50, 1)
|
||||
if(!message)
|
||||
return
|
||||
if(pointblank)
|
||||
user.visible_message("<span class='danger'>[user] fires [src] point blank at [pbtarget]!</span>", "<span class='danger'>You fire [src] point blank at [pbtarget]!</span>", "<span class='italics'>You hear a [istype(src, /obj/item/weapon/gun/energy) ? "laser blast" : "gunshot"]!</span>")
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user] fires [src]!</span>", "<span class='danger'>You fire [src]!</span>", "You hear a [istype(src, /obj/item/weapon/gun/energy) ? "laser blast" : "gunshot"]!")
|
||||
if(message)
|
||||
if(pointblank)
|
||||
user.visible_message("<span class='danger'>[user] fires [src] point blank at [pbtarget]!</span>", null, null, 2, user)
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user] fires [src]!</span>", null, null, 2, user)
|
||||
|
||||
if(weapon_weight >= WEAPON_MEDIUM)
|
||||
if(user.get_inactive_held_item())
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
var/volume = vol_by_damage()
|
||||
playsound(loc, hitsound, volume, 1, -1)
|
||||
L.visible_message("<span class='danger'>[L] is hit by \a [src][organ_hit_text]!</span>", \
|
||||
"<span class='userdanger'>[L] is hit by \a [src][organ_hit_text]!</span>") //X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter
|
||||
"<span class='userdanger'>[L] is hit by \a [src][organ_hit_text]!</span>", null, 2)
|
||||
L.on_hit(type)
|
||||
|
||||
var/reagent_note
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
|
||||
/obj/item/projectile/bullet/reusable/proc/handle_drop()
|
||||
if(!dropped)
|
||||
new ammo_type(src.loc)
|
||||
var/turf/T = get_turf(src)
|
||||
new ammo_type(T)
|
||||
dropped = 1
|
||||
|
||||
/obj/item/projectile/bullet/reusable/magspear
|
||||
@@ -32,7 +33,7 @@
|
||||
damage_type = OXY
|
||||
nodamage = 1
|
||||
icon = 'icons/obj/guns/toy.dmi'
|
||||
icon_state = "foamdart"
|
||||
icon_state = "foamdart_proj"
|
||||
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
|
||||
range = 10
|
||||
var/obj/item/weapon/pen/pen = null
|
||||
@@ -40,8 +41,9 @@
|
||||
/obj/item/projectile/bullet/reusable/foam_dart/handle_drop()
|
||||
if(dropped)
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
dropped = 1
|
||||
var/obj/item/ammo_casing/caseless/foam_dart/newdart = new ammo_type(src.loc)
|
||||
var/obj/item/ammo_casing/caseless/foam_dart/newdart = new ammo_type(T)
|
||||
var/obj/item/ammo_casing/caseless/foam_dart/old_dart = ammo_casing
|
||||
newdart.modified = old_dart.modified
|
||||
if(pen)
|
||||
@@ -54,12 +56,13 @@
|
||||
newdart.BB.damage_type = damage_type
|
||||
newdart.update_icon()
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/reusable/foam_dart/Destroy()
|
||||
pen = null
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/bullet/reusable/foam_dart/riot
|
||||
name = "riot foam dart"
|
||||
icon_state = "foamdart_riot"
|
||||
icon_state = "foamdart_riot_proj"
|
||||
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
|
||||
stamina = 25
|
||||
|
||||
|
Before Width: | Height: | Size: 514 KiB After Width: | Height: | Size: 535 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |