mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Visible_message() when being attacked by melee or projectile is replaced by a simple message only to the target instead of all viewers.
The message when firing a gun is removed. To keep things balanced melee attacks (punches, alien attacks, animal attacks, etc...) now show a visual effect (similar to what we current have with item attacks. Fixes muzzle flash effect not appearing for mech guns. Fixes muzzle flash effect not appearing for certain ranged animal. Fixes the item attack effect not being visible to camera viewers and mech occupants. Fixes toy guns foam dart not dropping on the ground when shooting a mob on the same tile as us. Fixes toy smg magazine sprite being invisible sometimes. Fixes foam dart not facing the correct direction when fired. Changes the bullet projectile sprite to have a slight tracer effect so as to be more visible.
This commit is contained in:
@@ -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)])")
|
||||
@@ -56,8 +55,6 @@
|
||||
return
|
||||
|
||||
/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>")
|
||||
take_damage(I.force, I.damtype, "melee", 1)
|
||||
|
||||
/mob/living/attacked_by(obj/item/I, mob/living/user)
|
||||
@@ -74,12 +71,9 @@
|
||||
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)
|
||||
//phil235 victim gets no message when damage bounced off?
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -105,11 +99,9 @@
|
||||
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>")
|
||||
src << "<span class='userdanger'>[attack_message]</span>"
|
||||
return 1
|
||||
|
||||
|
||||
@@ -28,16 +28,25 @@
|
||||
|
||||
/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 << "<span class='warning'>[A] has attempted to [atk_verb] [D]!</span>"
|
||||
add_logs(A, D, "attempted to [atk_verb]")
|
||||
return 0
|
||||
|
||||
@@ -45,8 +54,7 @@
|
||||
var/armor_block = D.run_armor_check(affecting, "melee")
|
||||
|
||||
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>")
|
||||
D << "<span class='userdanger'>[A] has [atk_verb]ed [D]!</span>"
|
||||
|
||||
D.apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
|
||||
@@ -90,14 +98,14 @@
|
||||
|
||||
/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 << "<span class='warning'>[A] has attempted to hit [D] with a [atk_verb]!</span>"
|
||||
add_logs(A, D, "attempted to hit", atk_verb)
|
||||
return 0
|
||||
|
||||
@@ -107,8 +115,7 @@
|
||||
|
||||
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 << "<span class='userdanger'>[A] has hit [D] with a [atk_verb]!</span>"
|
||||
|
||||
D.apply_damage(damage, STAMINA, affecting, armor_block)
|
||||
add_logs(A, D, "punched (boxing) ")
|
||||
@@ -185,7 +192,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 +268,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 +282,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 +294,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 +307,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 +320,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 +350,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)
|
||||
@@ -441,4 +441,4 @@ var/list/blood_splatter_icons = list()
|
||||
admin_spawned = TRUE
|
||||
|
||||
/atom/proc/mech_melee_attack(obj/mecha/M)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -129,8 +129,7 @@
|
||||
if(user in viewers(src, null))
|
||||
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>")
|
||||
src << "<span class='userdanger'>[attack_message]</span>"
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/true_devil/Process_Spacemove(movement_dir = 0)
|
||||
|
||||
@@ -246,9 +246,7 @@ 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)//phil235 no more needed?
|
||||
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,9 @@
|
||||
|
||||
/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)
|
||||
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 +93,9 @@
|
||||
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.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))
|
||||
@@ -266,4 +266,17 @@
|
||||
/obj/mecha/mech_melee_attack(obj/mecha/M)
|
||||
if(M.damtype == BRUTE || M.damtype == BURN)
|
||||
add_logs(M.occupant, src, "attacked", M, "(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
|
||||
. = ..()
|
||||
. = ..()
|
||||
|
||||
|
||||
/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)
|
||||
|
||||
|
||||
@@ -451,10 +451,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>", \
|
||||
@@ -596,4 +597,4 @@ obj/item/proc/item_action_slot_check(slot, mob/user)
|
||||
MO.pixel_x = rand(-16,16)
|
||||
MO.pixel_y = rand(-16,16)
|
||||
MO.desc = "Looks like this was \an [src] some time ago."
|
||||
..()
|
||||
..()
|
||||
|
||||
@@ -62,7 +62,6 @@
|
||||
|
||||
/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)
|
||||
take_damage(P.damage, P.damage_type, P.flag, 0, turn(P.dir, 180))
|
||||
|
||||
@@ -70,7 +69,6 @@
|
||||
/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>")
|
||||
if(density)
|
||||
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
@@ -90,7 +88,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 +116,23 @@
|
||||
|
||||
/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
|
||||
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
|
||||
|
||||
|
||||
@@ -301,10 +301,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)
|
||||
|
||||
@@ -161,9 +161,7 @@
|
||||
//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.do_attack_animation(src, ATTACK_EFFECT_KICK)
|
||||
take_damage(2)
|
||||
|
||||
|
||||
|
||||
@@ -35,8 +35,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))
|
||||
@@ -48,6 +47,7 @@
|
||||
contents += I
|
||||
stored_extinguisher = I
|
||||
user << "<span class='notice'>You place [I] in [src].</span>"
|
||||
update_icon()
|
||||
else
|
||||
toggle_cabinet(user)
|
||||
else if(user.a_intent != "harm")
|
||||
@@ -63,8 +63,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)
|
||||
@@ -113,16 +114,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,13 @@
|
||||
|
||||
/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)
|
||||
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>")
|
||||
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,7 @@
|
||||
|
||||
/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)
|
||||
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
|
||||
//phil235 bang sound here
|
||||
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)
|
||||
|
||||
@@ -86,13 +86,17 @@
|
||||
|
||||
/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)
|
||||
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)
|
||||
@@ -104,7 +108,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
|
||||
|
||||
@@ -112,7 +115,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
|
||||
|
||||
@@ -458,7 +458,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,10 @@ 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)
|
||||
src << "<span class='userdanger'>[M.name] bites [src]!</span>"
|
||||
adjustBruteLoss(1)
|
||||
add_logs(M, src, "attacked")
|
||||
updatehealth()
|
||||
else
|
||||
@@ -62,8 +56,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 +72,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)
|
||||
@@ -125,4 +120,4 @@ In all, this is a lot like the monkey code. /N
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/alien/acid_act(acidpwr, acid_volume)
|
||||
return 0//aliens are immune to acid.
|
||||
return 0//aliens are immune to acid.
|
||||
|
||||
@@ -27,8 +27,7 @@
|
||||
var/damage = rand(1, 9)
|
||||
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>")
|
||||
src << "<span class='userdanger'>[M] has punched [src]!</span>"
|
||||
if ((stat != DEAD) && (damage > 9 || prob(5)))//Regular humans have a very small chance of weakening an alien.
|
||||
Paralyse(2)
|
||||
visible_message("<span class='danger'>[M] has weakened [src]!</span>", \
|
||||
@@ -38,7 +37,7 @@
|
||||
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>")
|
||||
src << "<span class='userdanger'>[M] has attempted to punch [src]!</span>"
|
||||
|
||||
if ("disarm")
|
||||
if (!lying)
|
||||
@@ -52,8 +51,14 @@
|
||||
if (prob(50))
|
||||
drop_item()
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has disarmed [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has disarmed [src]!</span>")
|
||||
src << "<span class='userdanger'>[M] has disarmed [src]!</span>"
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has attempted to disarm [src]!</span>")
|
||||
src << "<span class='userdanger'>[M] has attempted to disarm [src]!</span>"
|
||||
|
||||
|
||||
|
||||
/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
|
||||
..()
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
if (prob(90))
|
||||
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>")
|
||||
src << "<span class='userdanger'>[M] has kicked [src]!</span>"
|
||||
if ((stat != DEAD) && (damage > 4.9))
|
||||
Paralyse(rand(5,10))
|
||||
|
||||
@@ -15,8 +14,7 @@
|
||||
apply_damage(damage, BRUTE, affecting)
|
||||
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>")
|
||||
src << "<span class='userdanger'>[M] has attempted to kick [src]!</span>"
|
||||
|
||||
/mob/living/carbon/alien/larva/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
|
||||
if(user.a_intent == "harm")
|
||||
@@ -26,4 +24,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
|
||||
..()
|
||||
|
||||
@@ -116,6 +116,7 @@ mob/living/carbon/bullet_act(obj/item/projectile/P, def_zone)
|
||||
if(M.powerlevel < 0)
|
||||
M.powerlevel = 0
|
||||
|
||||
//phil235 visual effect instead of message? we keep the msg for victim though.
|
||||
visible_message("<span class='danger'>The [M.name] has shocked [src]!</span>", \
|
||||
"<span class='userdanger'>The [M.name] has shocked [src]!</span>")
|
||||
|
||||
|
||||
@@ -331,8 +331,7 @@
|
||||
update_damage_overlays()
|
||||
updatehealth()
|
||||
|
||||
visible_message("<span class='danger'>[M.name] has hit [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] has hit [src]!</span>")
|
||||
src << "<span class='userdanger'>[M.name] has hit [src]!</span>"
|
||||
add_logs(M.occupant, src, "attacked", M, "(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
|
||||
|
||||
else
|
||||
|
||||
@@ -964,19 +964,28 @@
|
||||
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 << "<span class='userdanger'>[user] has attempted to [atk_verb] [target]!</span>"
|
||||
return 0
|
||||
|
||||
|
||||
@@ -984,8 +993,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>")
|
||||
target << "<span class='userdanger'>[user] has [atk_verb]ed [target]!</span>"
|
||||
|
||||
if(user.limb_destroyer)
|
||||
target.dismembering_strike(user, affecting.body_zone)
|
||||
@@ -1003,7 +1011,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)
|
||||
@@ -1012,8 +1020,7 @@
|
||||
var/randn = rand(1, 100)
|
||||
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>")
|
||||
target << "<span class='userdanger'>[user] has pushed [target]!</span>"
|
||||
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,23 +1030,20 @@
|
||||
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
|
||||
|
||||
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>")
|
||||
target << "<span class='userdanger'>[user] has disarmed [target]!</span>"
|
||||
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
|
||||
target << "<span class='userdanger'>[user] attemped to disarm [target]!</span>"
|
||||
|
||||
|
||||
/datum/species/proc/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style = M.martial_art)
|
||||
@@ -1116,6 +1120,7 @@
|
||||
if("head")
|
||||
if(H.stat == CONSCIOUS && armor_block < 50)
|
||||
if(prob(I.force))
|
||||
//phil235
|
||||
H.visible_message("<span class='danger'>[H] has been knocked senseless!</span>", \
|
||||
"<span class='userdanger'>[H] has been knocked senseless!</span>")
|
||||
H.confused = max(H.confused, 20)
|
||||
@@ -1138,6 +1143,7 @@
|
||||
if("chest")
|
||||
if(H.stat == CONSCIOUS && armor_block < 50)
|
||||
if(prob(I.force))
|
||||
//phil235
|
||||
H.visible_message("<span class='danger'>[H] has been knocked down!</span>", \
|
||||
"<span class='userdanger'>[H] has been knocked down!</span>")
|
||||
H.apply_effect(3, WEAKEN, armor_block)
|
||||
|
||||
@@ -49,10 +49,9 @@
|
||||
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>")
|
||||
src << "<span class='userdanger'>[M] has punched [name]!</span>"
|
||||
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
var/damage = rand(5, 10)
|
||||
@@ -71,22 +70,19 @@
|
||||
|
||||
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>")
|
||||
src << "<span class='userdanger'>[M] has attempted to punch [name]!</span>"
|
||||
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>")
|
||||
src << "<span class='userdanger'>[M] has pushed down [src]!</span>"
|
||||
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>")
|
||||
src << "<span class='userdanger'>[M] has disarmed [src]!</span>"
|
||||
|
||||
/mob/living/carbon/monkey/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
if(..()) //if harm or disarm intent.
|
||||
@@ -98,11 +94,9 @@
|
||||
damage = rand(20, 40)
|
||||
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>")
|
||||
src << "<span class='userdanger'>[M] has wounded [name]!</span>"
|
||||
else
|
||||
visible_message("<span class='danger'>[M] has slashed [name]!</span>", \
|
||||
"<span class='userdanger'>[M] has slashed [name]!</span>")
|
||||
src << "<span class='userdanger'>[M] has slashed [name]!</span>"
|
||||
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(M.zone_selected))
|
||||
add_logs(M, src, "attacked")
|
||||
@@ -115,19 +109,16 @@
|
||||
|
||||
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>")
|
||||
src << "<span class='userdanger'>[M] has attempted to lunge at [name]!</span>"
|
||||
|
||||
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>")
|
||||
src << "<span class='userdanger'>[M] has tackled down [name]!</span>"
|
||||
else
|
||||
if(drop_item())
|
||||
visible_message("<span class='danger'>[M] has disarmed [name]!</span>", \
|
||||
"<span class='userdanger'>[M] has disarmed [name]!</span>")
|
||||
src << "<span class='userdanger'>[M] has disarmed [name]!</span>"
|
||||
add_logs(M, src, "disarmed")
|
||||
updatehealth()
|
||||
|
||||
|
||||
@@ -655,71 +655,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,20 +97,19 @@
|
||||
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>")
|
||||
src << "<span class='userdanger'>[M.name] has hit [src]!</span>"
|
||||
add_logs(M.occupant, src, "attacked", M, "(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
|
||||
else
|
||||
step_away(src,M)
|
||||
@@ -184,8 +183,7 @@
|
||||
if (stat != DEAD)
|
||||
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>")
|
||||
src << "<span class='userdanger'>The [M.name] glomps [src]!</span>"
|
||||
return 1
|
||||
|
||||
/mob/living/attack_animal(mob/living/simple_animal/M)
|
||||
@@ -197,17 +195,12 @@
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>\The [M] [M.attacktext] [src]!</span>", \
|
||||
"<span class='userdanger'>\The [M] [M.attacktext] [src]!</span>")
|
||||
src << "<span class='userdanger'>\The [M] [M.attacktext] [src]!</span>"
|
||||
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 +209,14 @@
|
||||
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>")
|
||||
src << "<span class='userdanger'>[M.name] bites [src]!</span>"
|
||||
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>")
|
||||
src << "<span class='userdanger'>[M.name] has attempted to bite [src]!</span>"
|
||||
return 0
|
||||
|
||||
/mob/living/attack_larva(mob/living/carbon/alien/larva/L)
|
||||
@@ -238,20 +229,14 @@
|
||||
L.do_attack_animation(src)
|
||||
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>")
|
||||
src << "<span class='userdanger'>[L.name] bites [src]!</span>"
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
return 1
|
||||
else
|
||||
visible_message("<span class='danger'>[L.name] has attempted to bite [src]!</span>", \
|
||||
"<span class='userdanger'>[L.name] has attempted to bite [src]!</span>")
|
||||
src << "<span class='userdanger'>[L.name] has attempted to bite [src]!</span>"
|
||||
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 +249,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, origin)
|
||||
if(istype(origin, /datum/spacevine_mutation) && isvineimmune(src))
|
||||
@@ -349,3 +337,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,17 @@
|
||||
/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>")
|
||||
//phil235
|
||||
src << "<span class='userdanger'>[M] has disabled [src]'s active module!</span>"
|
||||
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>")
|
||||
src << "<span class='userdanger'>[M] has forced back [src]!</span>"
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 50, 1, -1)
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -66,10 +66,9 @@
|
||||
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>")
|
||||
src << "<span class='warning'>[M] punches [src], but doesn't leave a dent.</span>"
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0)
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
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)
|
||||
src << "<span class='userdanger'>[M] [response_harm] [src]!</span>"
|
||||
playsound(loc, attacked_sound, 25, 1, -1)
|
||||
attack_threshold_check(harm_intent_damage)
|
||||
add_logs(M, src, "attacked")
|
||||
@@ -25,8 +25,7 @@
|
||||
if(user.a_intent == "harm")
|
||||
..(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>")
|
||||
src << "<span class='userdanger'>[user] has punched [src]!</span>"
|
||||
adjustBruteLoss(15)
|
||||
return 1
|
||||
|
||||
@@ -46,13 +45,11 @@
|
||||
if(..()) //if harm or disarm intent.
|
||||
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>")
|
||||
src << "<span class='userdanger'>[M] [response_disarm] [name]!</span>"
|
||||
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>")
|
||||
src << "<span class='userdanger'>[M] has slashed at [src]!</span>"
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
||||
attack_threshold_check(damage)
|
||||
add_logs(M, src, "attacked")
|
||||
@@ -123,4 +120,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,12 +329,11 @@
|
||||
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)
|
||||
var/obj/item/projectile/P = new projectiletype(startloc)//phil235 need firing effect here
|
||||
playsound(src, projectilesound, 100, 1)
|
||||
P.current = startloc
|
||||
P.starting = startloc
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -115,10 +115,6 @@
|
||||
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(weapon_weight >= WEAPON_MEDIUM)
|
||||
if(user.get_inactive_held_item())
|
||||
|
||||
@@ -106,8 +106,7 @@
|
||||
if(hitsound)
|
||||
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
|
||||
L << "<span class='userdanger'>[L] is hit by \a [src][organ_hit_text]!</span>"
|
||||
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
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 514 KiB After Width: | Height: | Size: 530 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Reference in New Issue
Block a user