mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 15:14:27 +01:00
Further Improves Attack Animations
This commit is contained in:
@@ -641,6 +641,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
|
||||
updateimage()
|
||||
else
|
||||
if(prob(15))
|
||||
do_attack_animation(my_target, ATTACK_EFFECT_PUNCH)
|
||||
if(weapon_name)
|
||||
my_target.playsound_local(my_target, weap.hitsound, 1)
|
||||
my_target.show_message("<span class='danger'>[src.name] has attacked [my_target] with [weapon_name]!</span>", 1)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/datum/martial_art/boxing/harm_act(var/mob/living/carbon/human/A, var/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")
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
/datum/martial_art/drunk_brawling/harm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
add_attack_logs(A, D, "Melee attacked with [src]")
|
||||
A.do_attack_animation(D)
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||
|
||||
var/atk_verb = pick("jab","uppercut","overhand punch","drunken right hook","drunken left hook")
|
||||
|
||||
|
||||
@@ -109,7 +109,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_attack_logs(A, D, "Melee attacked with [src]")
|
||||
A.do_attack_animation(D)
|
||||
var/picked_hit_type = pick("punches", "kicks")
|
||||
var/bonus_damage = 10
|
||||
if(D.weakened || D.resting || D.lying)
|
||||
@@ -117,8 +116,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>")
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
|
||||
/datum/martial_art/proc/basic_hit(var/mob/living/carbon/human/A,var/mob/living/carbon/human/D)
|
||||
|
||||
A.do_attack_animation(D)
|
||||
var/damage = rand(A.species.punchdamagelow, A.species.punchdamagehigh)
|
||||
var/datum/unarmed_attack/attack = A.species.unarmed
|
||||
|
||||
@@ -41,6 +40,12 @@
|
||||
if(D.lying)
|
||||
atk_verb = "kick"
|
||||
|
||||
switch(atk_verb)
|
||||
if("kick")
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
|
||||
else
|
||||
A.do_attack_animation(D, attack.animation_type)
|
||||
|
||||
if(!damage)
|
||||
playsound(D.loc, attack.miss_sound, 25, 1, -1)
|
||||
D.visible_message("<span class='warning'>[A] has attempted to [atk_verb] [D]!</span>")
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
return
|
||||
|
||||
/datum/martial_art/plasma_fist/proc/Plasma(var/mob/living/carbon/human/A, var/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>", \
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/wristWrench(var/mob/living/carbon/human/A, var/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)
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/backKick(var/mob/living/carbon/human/A, var/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_KICK)
|
||||
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)
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/kneeStomach(var/mob/living/carbon/human/A, var/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!")
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/headKick(var/mob/living/carbon/human/A, var/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")
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/elbowDrop(var/mob/living/carbon/human/A, var/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)
|
||||
@@ -117,7 +117,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>")
|
||||
|
||||
@@ -29,7 +29,7 @@ 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>", \
|
||||
@@ -52,8 +52,10 @@ In all, this is a lot like the monkey code. /N
|
||||
help_shake_act(M)
|
||||
if(INTENT_GRAB)
|
||||
grabbedby(M)
|
||||
if(INTENT_HARM, INTENT_DISARM)
|
||||
M.do_attack_animation(src)
|
||||
if(INTENT_HARM)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
if(INTENT_DISARM)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -43,3 +43,8 @@
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has attempted to disarm [src]!</span>")
|
||||
|
||||
/mob/living/carbon/alien/humanoid/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
|
||||
..()
|
||||
@@ -22,3 +22,8 @@
|
||||
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>")
|
||||
|
||||
/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
|
||||
..()
|
||||
@@ -372,7 +372,6 @@ This function restores all organs.
|
||||
dmgIcon.pixel_y = (!lying) ? rand(-11,9) : rand(-10,1)
|
||||
flick_overlay(dmgIcon, attack_bubble_recipients, 9)
|
||||
|
||||
receiving_damage()
|
||||
|
||||
if(BURN)
|
||||
damageoverlaytemp = 20
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
path = /mob/living/carbon/human/abductor
|
||||
language = "Abductor Mindlink"
|
||||
default_language = "Abductor Mindlink"
|
||||
unarmed_type = /datum/unarmed_attack/punch
|
||||
eyes = "blank_eyes"
|
||||
has_organ = list(
|
||||
"heart" = /obj/item/organ/internal/heart,
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
deform = 'icons/mob/human_races/r_wryn.dmi'
|
||||
language = "Wryn Hivemind"
|
||||
tail = "wryntail"
|
||||
unarmed_type = /datum/unarmed_attack/punch/weak
|
||||
punchdamagelow = 0
|
||||
punchdamagehigh = 1
|
||||
//primitive = /mob/living/carbon/monkey/wryn
|
||||
@@ -82,7 +81,6 @@
|
||||
name = "Nucleation"
|
||||
name_plural = "Nucleations"
|
||||
icobase = 'icons/mob/human_races/r_nucleation.dmi'
|
||||
unarmed_type = /datum/unarmed_attack/punch
|
||||
blurb = "A sub-race of unfortunates who have been exposed to too much supermatter radiation. As a result, \
|
||||
supermatter crystal clusters have begun to grow across their bodies. Research to find a cure for this ailment \
|
||||
has been slow, and so this is a common fate for veteran engineers. The supermatter crystals produce oxygen, \
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
dietflags = DIET_OMNI //golems can eat anything because they are magic or something
|
||||
reagent_tag = PROCESS_ORG
|
||||
|
||||
unarmed_type = /datum/unarmed_attack/punch
|
||||
punchdamagelow = 5
|
||||
punchdamagehigh = 14
|
||||
punchstunthreshold = 11 //about 40% chance to stun
|
||||
|
||||
@@ -28,8 +28,7 @@
|
||||
reagent_tag = PROCESS_ORG
|
||||
//Has standard darksight of 2.
|
||||
|
||||
//unarmed_types = list(/datum/unarmed_attack/bite, /datum/unarmed_attack/claws)
|
||||
//inherent_verbs = list(/mob/living/proc/ventcrawl)
|
||||
unarmed_type = /datum/unarmed_attack/bite
|
||||
|
||||
total_health = 75
|
||||
brute_mod = 1.5
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
icobase = 'icons/mob/human_races/r_plasmaman_sb.dmi'
|
||||
deform = 'icons/mob/human_races/r_plasmaman_pb.dmi' // TODO: Need deform.
|
||||
//language = "Clatter"
|
||||
unarmed_type = /datum/unarmed_attack/punch
|
||||
|
||||
species_traits = list(IS_WHITELISTED, NO_BLOOD, NOTRANSSTING)
|
||||
dietflags = DIET_OMNI
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
deform = 'icons/mob/human_races/r_skeleton.dmi'
|
||||
path = /mob/living/carbon/human/skeleton
|
||||
default_language = "Galactic Common"
|
||||
unarmed_type = /datum/unarmed_attack/punch
|
||||
|
||||
blood_color = "#FFFFFF"
|
||||
flesh_color = "#E6E6C6"
|
||||
|
||||
@@ -356,7 +356,7 @@
|
||||
else
|
||||
var/datum/unarmed_attack/attack = user.species.unarmed
|
||||
|
||||
user.do_attack_animation(target)
|
||||
user.do_attack_animation(target, attack.animation_type)
|
||||
add_attack_logs(user, target, "Melee attacked with fists", admin_notify = target.ckey ? TRUE : FALSE)
|
||||
|
||||
if(!iscarbon(user))
|
||||
@@ -396,7 +396,7 @@
|
||||
return 1
|
||||
else
|
||||
add_attack_logs(user, target, "Disarmed", admin_notify = FALSE)
|
||||
user.do_attack_animation(target)
|
||||
user.do_attack_animation(target, ATTACK_EFFECT_DISARM)
|
||||
if(target.w_uniform)
|
||||
target.w_uniform.add_fingerprint(user)
|
||||
var/obj/item/organ/external/affecting = target.get_organ(ran_zone(user.zone_sel.selecting))
|
||||
@@ -500,17 +500,12 @@
|
||||
//Species unarmed attacks
|
||||
|
||||
/datum/unarmed_attack
|
||||
var/attack_verb = list("attack") // Empty hand hurt intent verb.
|
||||
var/attack_verb = list("punch") // Empty hand hurt intent verb.
|
||||
var/damage = 0 // How much flat bonus damage an attack will do. This is a *bonus* guaranteed damage amount on top of the random damage attacks do.
|
||||
var/attack_sound = "punch"
|
||||
var/miss_sound = 'sound/weapons/punchmiss.ogg'
|
||||
var/sharp = 0
|
||||
|
||||
/datum/unarmed_attack/punch
|
||||
attack_verb = list("punch")
|
||||
|
||||
/datum/unarmed_attack/punch/weak
|
||||
attack_verb = list("flail")
|
||||
var/sharp = FALSE
|
||||
var/animation_type = ATTACK_EFFECT_PUNCH
|
||||
|
||||
/datum/unarmed_attack/diona
|
||||
attack_verb = list("lash", "bludgeon")
|
||||
@@ -519,7 +514,14 @@
|
||||
attack_verb = list("scratch", "claw")
|
||||
attack_sound = 'sound/weapons/slice.ogg'
|
||||
miss_sound = 'sound/weapons/slashmiss.ogg'
|
||||
sharp = 1
|
||||
sharp = TRUE
|
||||
animation_type = ATTACK_EFFECT_CLAW
|
||||
|
||||
/datum/unarmed_attack/bite
|
||||
attack_verb = list("chomp")
|
||||
attack_sound = 'sound/weapons/bite.ogg'
|
||||
sharp = TRUE
|
||||
animation_type = ATTACK_EFFECT_BITE
|
||||
|
||||
/datum/unarmed_attack/claws/armalis
|
||||
attack_verb = list("slash", "claw")
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
|
||||
bodyflags = HAS_SKIN_TONE | HAS_BODY_MARKINGS
|
||||
dietflags = DIET_OMNI
|
||||
unarmed_type = /datum/unarmed_attack/punch
|
||||
blurb = "Humanity originated in the Sol system, and over the last five centuries has spread \
|
||||
colonies across a wide swathe of space. They hold a wide range of forms and creeds.<br/><br/> \
|
||||
While the central Sol government maintains control of its far-flung people, powerful corporate \
|
||||
@@ -237,7 +236,6 @@
|
||||
default_language = "Galactic Common"
|
||||
language = "Skrellian"
|
||||
primitive_form = "Neara"
|
||||
unarmed_type = /datum/unarmed_attack/punch
|
||||
|
||||
blurb = "An amphibious species, Skrell come from the star system known as Qerr'Vallis, which translates to 'Star of \
|
||||
the royals' or 'Light of the Crown'.<br/><br/>Skrell are a highly advanced and logical race who live under the rule \
|
||||
@@ -546,7 +544,6 @@
|
||||
icobase = 'icons/mob/human_races/r_slime.dmi'
|
||||
deform = 'icons/mob/human_races/r_slime.dmi'
|
||||
path = /mob/living/carbon/human/slime
|
||||
unarmed_type = /datum/unarmed_attack/punch
|
||||
remains_type = /obj/effect/decal/remains/slime
|
||||
|
||||
// More sensitive to the cold
|
||||
@@ -749,7 +746,6 @@
|
||||
deform = 'icons/mob/human_races/r_def_grey.dmi'
|
||||
default_language = "Galactic Common"
|
||||
language = "Psionic Communication"
|
||||
unarmed_type = /datum/unarmed_attack/punch
|
||||
eyes = "grey_eyes_s"
|
||||
butt_sprite = "grey"
|
||||
|
||||
@@ -931,7 +927,6 @@
|
||||
path = /mob/living/carbon/human/machine
|
||||
default_language = "Galactic Common"
|
||||
language = "Trinary"
|
||||
unarmed_type = /datum/unarmed_attack/punch
|
||||
remains_type = /obj/effect/decal/remains/robot
|
||||
|
||||
eyes = "blank_eyes"
|
||||
@@ -1015,7 +1010,6 @@
|
||||
path = /mob/living/carbon/human/drask
|
||||
default_language = "Galactic Common"
|
||||
language = "Orluum"
|
||||
unarmed_type = /datum/unarmed_attack/punch
|
||||
eyes = "drask_eyes_s"
|
||||
|
||||
speech_sounds = list('sound/voice/DraskTalk.ogg')
|
||||
|
||||
@@ -236,6 +236,7 @@
|
||||
|
||||
/mob/living/carbon/slime/attack_hand(mob/living/carbon/human/M)
|
||||
if(Victim)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
if(Victim == M)
|
||||
if(prob(60))
|
||||
visible_message("<span class='warning'>[M] attempts to wrestle \the [name] off!</span>")
|
||||
@@ -259,7 +260,6 @@
|
||||
return
|
||||
|
||||
else
|
||||
M.do_attack_animation(src)
|
||||
if(prob(30))
|
||||
visible_message("<span class='warning'>[M] attempts to wrestle \the [name] off of [Victim]!</span>")
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
@@ -297,7 +297,7 @@
|
||||
grabbedby(M)
|
||||
|
||||
else
|
||||
M.do_attack_animation(src)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
var/damage = rand(1, 9)
|
||||
attacked += 10
|
||||
if(prob(90))
|
||||
|
||||
@@ -852,81 +852,11 @@
|
||||
makeNewConstruct(/mob/living/simple_animal/hostile/construct/harvester, src, null, 1)
|
||||
spawn_dust()
|
||||
gib()
|
||||
return
|
||||
|
||||
/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
|
||||
if(hand && l_hand) // Attacked with item in left hand.
|
||||
I = image(l_hand.icon, A, l_hand.icon_state, A.layer + 1)
|
||||
else if(!hand && r_hand) // Attacked with item in right hand.
|
||||
I = image(r_hand.icon, A, r_hand.icon_state, A.layer + 1)
|
||||
else // Attacked with a fist?
|
||||
return
|
||||
|
||||
// Who can see the attack?
|
||||
var/list/viewing = list()
|
||||
for(var/mob/M in viewers(A))
|
||||
if(M.client && M.client.prefs.show_ghostitem_attack)
|
||||
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)
|
||||
|
||||
/atom/movable/proc/receiving_damage(atom/A)
|
||||
var/pixel_x_diff = rand(-3,3)
|
||||
var/pixel_y_diff = rand(-3,3)
|
||||
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 = initial(pixel_y), time = 2)
|
||||
|
||||
/mob/living/receiving_damage(atom/A)
|
||||
/mob/living/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y)
|
||||
end_pixel_y = get_standard_pixel_y_offset(lying)
|
||||
if(!used_item)
|
||||
used_item = get_active_hand()
|
||||
..()
|
||||
floating = 0 // If we were without gravity, the bouncing animation got stopped, so we make sure we restart the bouncing after the next movement.
|
||||
|
||||
|
||||
@@ -333,6 +333,9 @@
|
||||
if(INTENT_GRAB)
|
||||
grabbedby(M)
|
||||
return FALSE
|
||||
else
|
||||
if(INTENT_HARM)
|
||||
M.do_attack_animation(src)
|
||||
return TRUE
|
||||
if(INTENT_DISARM)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
return TRUE
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/mob/living/silicon/robot/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
if(M.a_intent == INTENT_DISARM)
|
||||
if(!lying)
|
||||
M.do_attack_animation(src)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
if(prob(85))
|
||||
Stun(7)
|
||||
step(src, get_dir(M,src))
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
if("grab")
|
||||
grabbedby(M)
|
||||
else
|
||||
M.do_attack_animation(src)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
playsound(loc, 'sound/effects/bang.ogg', 10, 1)
|
||||
if(HULK in M.mutations)
|
||||
var/damage = rand(10,15)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
grabbedby(M)
|
||||
|
||||
if(INTENT_HARM, INTENT_DISARM)
|
||||
M.do_attack_animation(src)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
visible_message("<span class='danger'>[M] [response_harm] [src]!</span>")
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
attack_threshold_check(harm_intent_damage)
|
||||
@@ -58,3 +58,11 @@
|
||||
visible_message("<span class='warning'>[src] looks unharmed.</span>")
|
||||
else
|
||||
apply_damage(damage, damagetype)
|
||||
|
||||
/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
|
||||
..()
|
||||
@@ -117,7 +117,7 @@ Difficulty: Hard
|
||||
bloodspell.phased = 1
|
||||
internal_gps = new/obj/item/gps/internal/bubblegum(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/do_attack_animation(atom/A, visual_effect_icon)
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/do_attack_animation(atom/A, visual_effect_icon, used_item, no_effect, end_pixel_y)
|
||||
if(!charging)
|
||||
..()
|
||||
|
||||
|
||||
@@ -328,7 +328,7 @@
|
||||
|
||||
|
||||
//Jiggle the whole worm forwards towards the next segment
|
||||
/mob/living/simple_animal/hostile/spaceWorm/do_attack_animation(atom/A)
|
||||
/mob/living/simple_animal/hostile/spaceWorm/do_attack_animation(atom/A, visual_effect_icon, used_item, no_effect, end_pixel_y)
|
||||
..()
|
||||
if(previousWorm)
|
||||
previousWorm.do_attack_animation(src)
|
||||
@@ -26,7 +26,7 @@
|
||||
to_chat(usr, "<span class='warning'>[src] appears to be having trouble staying afloat!</span>")
|
||||
|
||||
|
||||
/mob/living/simple_animal/possessed_object/do_attack_animation(atom/A)
|
||||
/mob/living/simple_animal/possessed_object/do_attack_animation(atom/A, visual_effect_icon, used_item, no_effect, end_pixel_y)
|
||||
..()
|
||||
animate_ghostly_presence(src, -1, 20, 1) // Restart the floating animation after the attack animation, as it will be cancelled.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user