adding diagonal attack animation.

This commit is contained in:
phil235
2014-11-07 15:42:07 +01:00
parent 74f8a08522
commit bc5754b378
38 changed files with 130 additions and 113 deletions
+2 -2
View File
@@ -7,7 +7,7 @@
/atom/proc/attackby(obj/item/W, mob/user)
return
/atom/movable/attackby(obj/item/W, mob/living/user)
user.do_attack_animation()
user.do_attack_animation(src)
if(W && !(W.flags&NOBLUDGEON))
visible_message("<span class='danger'>[src] has been hit by [user] with [W].</span>")
@@ -26,7 +26,7 @@
var/showname = "."
if(user)
showname = " by [user]!"
user.do_attack_animation()
user.do_attack_animation(src)
if(!(user in viewers(src, null)))
showname = "."
if(I.attack_verb && I.attack_verb.len)
+2 -2
View File
@@ -151,7 +151,7 @@
/obj/effect/blob/attackby(var/obj/item/weapon/W, var/mob/living/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation()
user.do_attack_animation(src)
playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1)
src.visible_message("<span class='danger'>The [src.name] has been attacked with \the [W][(user ? " by [user]" : "")]!</span>")
var/damage = 0
@@ -169,7 +169,7 @@
/obj/effect/blob/attack_animal(mob/living/simple_animal/M as mob)
M.changeNext_move(CLICK_CD_MELEE)
M.do_attack_animation()
M.do_attack_animation(src)
playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1)
src.visible_message("<span class='danger'>The [src.name] has been attacked by \the [M]!</span>")
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
+1 -1
View File
@@ -66,7 +66,7 @@
/obj/machinery/sleeper/attack_animal(var/mob/living/simple_animal/M)//Stop putting hostile mobs in things guise
if(M.environment_smash)
M.do_attack_animation()
M.do_attack_animation(src)
visible_message("<span class='danger'>[M.name] smashes [src] apart!</span>")
qdel(src)
return
+2 -2
View File
@@ -144,7 +144,7 @@
/obj/machinery/bot/attack_alien(var/mob/living/carbon/alien/user as mob)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation()
user.do_attack_animation(src)
health -= rand(15,30)*brute_dam_coeff
visible_message("<span class='userdanger'>[user] has slashed [src]!</span>")
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
@@ -154,7 +154,7 @@
/obj/machinery/bot/attack_animal(var/mob/living/simple_animal/M as mob)
M.do_attack_animation()
M.do_attack_animation(src)
if(M.melee_damage_upper == 0)
return
M.changeNext_move(CLICK_CD_MELEE)
+1 -1
View File
@@ -116,7 +116,7 @@
/obj/machinery/camera/attack_paw(mob/living/carbon/alien/humanoid/user as mob)
if(!istype(user))
return
user.do_attack_animation()
user.do_attack_animation(src)
status = 0
visible_message("<span class='warning'>\The [user] slashes at [src]!</span>")
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
+2 -2
View File
@@ -111,7 +111,7 @@
return
/obj/machinery/computer/attack_paw(mob/living/user)
user.do_attack_animation()
user.do_attack_animation(src)
if(circuit)
if(prob(10))
user.visible_message("<span class='danger'>[user.name] smashes the [src.name] with its paws.</span>",\
@@ -124,7 +124,7 @@
"<span class='danger'>You hear a clicking sound.</span>")
/obj/machinery/computer/attack_alien(mob/living/user)
user.do_attack_animation()
user.do_attack_animation(src)
if(circuit)
if(prob(80))
user.visible_message("<span class='danger'>[user.name] smashes the [src.name] with its claws.</span>",\
+4 -4
View File
@@ -200,7 +200,7 @@
take_damage(damage)
/obj/machinery/door/window/attack_alien(mob/living/user as mob)
user.do_attack_animation()
user.do_attack_animation(src)
if(islarva(user))
return
attack_generic(user, 25)
@@ -209,14 +209,14 @@
if(!isanimal(user))
return
var/mob/living/simple_animal/M = user
M.do_attack_animation()
M.do_attack_animation(src)
if(M.melee_damage_upper <= 0)
return
attack_generic(M, M.melee_damage_upper)
/obj/machinery/door/window/attack_slime(mob/living/carbon/slime/user as mob)
user.do_attack_animation()
user.do_attack_animation(src)
if(!user.is_adult)
return
attack_generic(user, 25)
@@ -326,7 +326,7 @@
//If it's a weapon, smash windoor. Unless it's an id card, agent card, ect.. then ignore it (Cards really shouldnt damage a door anyway)
if(src.density && istype(I, /obj/item/weapon) && !istype(I, /obj/item/weapon/card) )
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation()
user.do_attack_animation(src)
if( (I.flags&NOBLUDGEON) || !I.force )
return
var/aforce = I.force
+1 -1
View File
@@ -815,7 +815,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
O.show_message("<span class='danger'>[user.name] further abuses the shattered [src.name].</span>")
else
if(istype(I, /obj/item/weapon) )
user.do_attack_animation()
user.do_attack_animation(src)
var/obj/item/weapon/W = I
if(W.force <15)
for (var/mob/O in hearers(5, src.loc))
+3 -3
View File
@@ -311,7 +311,7 @@
/obj/machinery/turret/attack_animal(mob/living/simple_animal/M as mob)
M.changeNext_move(CLICK_CD_MELEE)
M.do_attack_animation()
M.do_attack_animation(src)
if(M.melee_damage_upper == 0) return
if(!(stat & BROKEN))
visible_message("<span class='userdanger'>[M] [M.attacktext] [src]!</span>")
@@ -329,7 +329,7 @@
/obj/machinery/turret/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
M.changeNext_move(CLICK_CD_MELEE)
M.do_attack_animation()
M.do_attack_animation(src)
if(!(stat & BROKEN))
playsound(src.loc, 'sound/weapons/slash.ogg', 25, 1, -1)
visible_message("<span class='userdanger'>[M] has slashed at [src]!</span>")
@@ -415,7 +415,7 @@
/obj/machinery/gun_turret/attack_alien(mob/living/user as mob)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation()
user.do_attack_animation(src)
user.visible_message("[user] slashes at [src]", "You slash at [src]")
take_damage(15)
return
+4 -4
View File
@@ -457,7 +457,7 @@ obj/mecha/proc/can_use(mob/user)
/obj/mecha/attack_hand(mob/living/user as mob)
user.changeNext_move(CLICK_CD_MELEE) // Ugh. Ideally we shouldn't be setting cooldowns outside of click code.
user.do_attack_animation()
user.do_attack_animation(src)
src.log_message("Attack by hand/paw. Attacker - [user].",1)
if ((HULK in user.mutations) && !prob(src.deflect_chance))
@@ -477,7 +477,7 @@ obj/mecha/proc/can_use(mob/user)
/obj/mecha/attack_alien(mob/living/user as mob)
src.log_message("Attack by alien. Attacker - [user].",1)
user.changeNext_move(CLICK_CD_MELEE) //Now stompy alien killer mechs are actually scary to aliens!
user.do_attack_animation()
user.do_attack_animation(src)
if(!prob(src.deflect_chance))
src.take_damage(15)
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
@@ -499,7 +499,7 @@ obj/mecha/proc/can_use(mob/user)
if(user.melee_damage_upper == 0)
user.emote("[user.friendly] [src]")
else
user.do_attack_animation()
user.do_attack_animation(src)
if(!prob(src.deflect_chance))
var/damage = rand(user.melee_damage_lower, user.melee_damage_upper)
src.take_damage(damage)
@@ -636,7 +636,7 @@ obj/mecha/proc/can_use(mob/user)
/obj/mecha/proc/dynattackby(obj/item/weapon/W as obj, mob/living/user as mob)
user.changeNext_move(CLICK_CD_MELEE) // Ugh. Ideally we shouldn't be setting cooldowns outside of click code.
user.do_attack_animation()
user.do_attack_animation(src)
src.log_message("Attacked by [W]. Attacker - [user]")
if(prob(src.deflect_chance))
user << "<span class='danger'>The [W] bounces off [src.name] armor.</span>"
+2 -2
View File
@@ -111,7 +111,7 @@
/obj/structure/alien/resin/attack_hand(mob/living/user)
if(HULK in user.mutations)
user.do_attack_animation()
user.do_attack_animation(src)
user.visible_message("<span class='danger'>[user] destroys [src]!</span>")
health = 0
healthcheck()
@@ -123,7 +123,7 @@
/obj/structure/alien/resin/attack_alien(mob/living/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation()
user.do_attack_animation(src)
if(islarva(user))
return
user.visible_message("<span class='danger'>[user] claws at the resin!</span>")
+1 -1
View File
@@ -957,7 +957,7 @@ steam.start() -- spawns the effect
/obj/structure/foamedmetal/attack_animal(var/mob/living/simple_animal/M)
if(M.environment_smash >= 1)
M.do_attack_animation()
M.do_attack_animation(src)
M << "<span class='notice'>You smash apart the foam wall.</span>"
qdel(src)
return
@@ -159,7 +159,7 @@
/obj/structure/closet/attack_animal(mob/living/simple_animal/user as mob)
if(user.environment_smash)
user.do_attack_animation()
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] destroys the [src].</span>")
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
@@ -40,7 +40,7 @@
spawn(10) update_icon()
return
else
user.do_attack_animation()
user.do_attack_animation(src)
playsound(user, 'sound/effects/Glasshit.ogg', 100, 1) //We don't want this playing every time
if(W.force < 15)
user << "<span class = 'warning'> The cabinet's protective glass glances off the hit.</span>"
+5 -5
View File
@@ -27,7 +27,7 @@
/obj/structure/grille/attack_hand(mob/living/user as mob)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation()
user.do_attack_animation(src)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("<span class='warning'>[user] hits [src].</span>", \
"<span class='warning'>You hit [src].</span>", \
@@ -42,7 +42,7 @@
healthcheck()
/obj/structure/grille/attack_alien(mob/living/user as mob)
user.do_attack_animation()
user.do_attack_animation(src)
if(istype(user, /mob/living/carbon/alien/larva)) return
user.changeNext_move(CLICK_CD_MELEE)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
@@ -57,7 +57,7 @@
/obj/structure/grille/attack_slime(mob/living/carbon/slime/user as mob)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation()
user.do_attack_animation(src)
if(!user.is_adult) return
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
@@ -72,7 +72,7 @@
/obj/structure/grille/attack_animal(var/mob/living/simple_animal/M as mob)
M.changeNext_move(CLICK_CD_MELEE)
if(M.melee_damage_upper == 0) return
M.do_attack_animation()
M.do_attack_animation(src)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
M.visible_message("<span class='warning'>[M] smashes against [src].</span>", \
"<span class='warning'>You smash against [src].</span>", \
@@ -242,4 +242,4 @@
tforce = I.throwforce - 5
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
health = max(0, health - tforce)
healthcheck()
healthcheck()
+4 -4
View File
@@ -57,7 +57,7 @@
/obj/structure/mirror/attackby(obj/item/I as obj, mob/living/user as mob)
user.do_attack_animation()
user.do_attack_animation(src)
if(shattered)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
@@ -71,7 +71,7 @@
/obj/structure/mirror/attack_alien(mob/living/user as mob)
user.do_attack_animation()
user.do_attack_animation(src)
if(islarva(user)) return
if(shattered)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
@@ -84,7 +84,7 @@
if(!isanimal(user)) return
var/mob/living/simple_animal/M = user
if(M.melee_damage_upper <= 0) return
M.do_attack_animation()
M.do_attack_animation(src)
if(shattered)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
@@ -93,7 +93,7 @@
/obj/structure/mirror/attack_slime(mob/living/user as mob)
user.do_attack_animation()
user.do_attack_animation(src)
if(shattered)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
+8 -8
View File
@@ -205,7 +205,7 @@
/obj/structure/table/attack_paw(mob/living/user)
if(HULK in user.mutations)
user.do_attack_animation()
user.do_attack_animation(src)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
visible_message("<span class='danger'>[user] smashes the table apart!</span>")
if(istype(src, /obj/structure/table/reinforced))
@@ -219,7 +219,7 @@
/obj/structure/table/attack_alien(mob/living/user)
user.do_attack_animation()
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] slices [src] apart!</span>")
if(istype(src, /obj/structure/table/reinforced))
new /obj/item/weapon/table_parts/reinforced(loc)
@@ -233,7 +233,7 @@
/obj/structure/table/attack_animal(mob/living/simple_animal/user)
if(user.environment_smash)
user.do_attack_animation()
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
if(istype(src, /obj/structure/table/reinforced))
new /obj/item/weapon/table_parts/reinforced(loc)
@@ -249,7 +249,7 @@
/obj/structure/table/attack_hand(mob/living/user)
if(HULK in user.mutations)
user.do_attack_animation()
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
if(istype(src, /obj/structure/table/reinforced))
@@ -511,7 +511,7 @@ Destroy type values:
/obj/structure/rack/attack_hand(mob/living/user)
if(HULK in user.mutations)
user.do_attack_animation()
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
new /obj/item/weapon/rack_parts(loc)
@@ -521,7 +521,7 @@ Destroy type values:
/obj/structure/rack/attack_paw(mob/living/user)
if(HULK in user.mutations)
user.do_attack_animation()
user.do_attack_animation(src)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
new /obj/item/weapon/rack_parts(loc)
@@ -530,7 +530,7 @@ Destroy type values:
/obj/structure/rack/attack_alien(mob/living/user)
user.do_attack_animation()
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] slices [src] apart!</span>")
new /obj/item/weapon/rack_parts(loc)
density = 0
@@ -539,7 +539,7 @@ Destroy type values:
/obj/structure/rack/attack_animal(mob/living/simple_animal/user)
if(user.environment_smash)
user.do_attack_animation()
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
new /obj/item/weapon/rack_parts(loc)
density = 0
+3 -3
View File
@@ -126,20 +126,20 @@
/obj/structure/window/attack_alien(mob/living/user as mob)
user.do_attack_animation()
user.do_attack_animation(src)
if(islarva(user)) return
attack_generic(user, 15)
/obj/structure/window/attack_animal(mob/living/user as mob)
if(!isanimal(user)) return
var/mob/living/simple_animal/M = user
M.do_attack_animation()
M.do_attack_animation(src)
if(M.melee_damage_upper <= 0) return
attack_generic(M, M.melee_damage_upper)
/obj/structure/window/attack_slime(mob/living/carbon/slime/user as mob)
user.do_attack_animation()
user.do_attack_animation(src)
if(!user.is_adult) return
attack_generic(user, rand(10, 15))
+2 -2
View File
@@ -95,7 +95,7 @@
/turf/simulated/wall/attack_paw(mob/living/user as mob)
user.changeNext_move(CLICK_CD_MELEE)
if ((HULK in user.mutations))
user.do_attack_animation()
user.do_attack_animation(src)
if (prob(hardness))
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
usr << text("<span class='notice'>You smash through the wall.</span>")
@@ -111,7 +111,7 @@
/turf/simulated/wall/attack_animal(var/mob/living/simple_animal/M)
M.changeNext_move(CLICK_CD_MELEE)
M.do_attack_animation()
M.do_attack_animation(src)
if(M.environment_smash >= 2)
if(istype(src, /turf/simulated/wall/r_wall))
if(M.environment_smash == 3)
+1 -1
View File
@@ -2722,7 +2722,7 @@ It is possible to destroy the net by the occupant or someone else.
return attack_hand()
/obj/effect/energy_net/attack_alien(mob/living/user as mob)
user.do_attack_animation()
user.do_attack_animation(src)
if (islarva(user))
return
playsound(src.loc, 'sound/weapons/slash.ogg', 80, 1)
+1 -1
View File
@@ -302,7 +302,7 @@
/obj/effect/spacevine/attack_paw(mob/living/user as mob)
user.do_attack_animation()
user.do_attack_animation(src)
for(var/datum/spacevine_mutation/SM in mutations)
SM.on_hit(src, user)
manual_unbuckle(user)
@@ -117,7 +117,7 @@
if ("help")
help_shake_act(M)
else
M.do_attack_animation()
M.do_attack_animation(src)
if (M.is_muzzled())
return
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
@@ -138,7 +138,7 @@
if (stat > -100)
M.do_attack_animation()
M.do_attack_animation(src)
visible_message("<span class='danger'>The [M.name] glomps [src]!</span>", \
"<span class='userdanger'>The [M.name] glomps [src]!</span>")
var/damage = rand(1, 3)
@@ -191,7 +191,7 @@
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
M.do_attack_animation()
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", \
@@ -232,7 +232,7 @@
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
if ("harm")
M.do_attack_animation()
M.do_attack_animation(src)
var/damage = rand(1, 9)
if (prob(90))
if (HULK in M.mutations)//HULK SMASH
@@ -302,7 +302,7 @@ In all, this is a lot like the monkey code. /N
else
if (health > 0)
M.do_attack_animation()
M.do_attack_animation(src)
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
var/damage = rand(1, 3)
visible_message("<span class='danger'>[M.name] bites [src]!!</span>", \
@@ -324,7 +324,7 @@ In all, this is a lot like the monkey code. /N
else
if (health > 0)
L.do_attack_animation()
L.do_attack_animation(src)
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
var/damage = rand(1, 3)
visible_message("<span class='danger'>[L.name] bites [src]!!</span>", \
@@ -118,7 +118,7 @@
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
M.do_attack_animation()
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", \
@@ -146,7 +146,7 @@
if ("help")
help_shake_act(M)
else
M.do_attack_animation()
M.do_attack_animation(src)
if (M.is_muzzled())
return
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
@@ -167,7 +167,7 @@
return // can't attack while eating!
if (stat != DEAD)
M.do_attack_animation()
M.do_attack_animation(src)
visible_message("<span class='danger'>The [M.name] glomps [src]!</span>", \
"<span class='userdanger'>The [M.name] glomps [src]!</span>")
var/damage = rand(1, 3)
@@ -214,7 +214,7 @@
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
else
M.do_attack_animation()
M.do_attack_animation(src)
var/damage = rand(1, 9)
if (prob(90))
if (HULK in M.mutations)
@@ -263,7 +263,7 @@
else
if (health > 0)
M.do_attack_animation()
M.do_attack_animation(src)
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
var/damage = 1
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
@@ -222,7 +222,7 @@
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
M.do_attack_animation()
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", \
@@ -244,7 +244,7 @@
else
L.do_attack_animation()
L.do_attack_animation(src)
var/damage = rand(1, 3)
visible_message("<span class='danger'>[L] bites [src]!</span>", \
"<span class='userdanger'>[L] bites [src]!</span>")
@@ -262,7 +262,7 @@
if (health > -100)
M.do_attack_animation()
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>")
@@ -22,7 +22,7 @@
visible_message("<span class='danger'>[M] has grabbed [src] passively!</span>")
if("harm")
M.do_attack_animation()
M.do_attack_animation(src)
if (w_uniform)
w_uniform.add_fingerprint(M)
var/damage = rand(15, 30)
@@ -46,7 +46,7 @@
updatehealth()
if("disarm")
M.do_attack_animation()
M.do_attack_animation(src)
var/randn = rand(1, 100)
if (randn <= 80)
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
@@ -3,7 +3,7 @@
if (M.a_intent == "help")
help_shake_act(M)
else
M.do_attack_animation()
M.do_attack_animation(src)
if (M.is_muzzled())
return
@@ -133,7 +133,7 @@ emp_act
else
if(user != src)
user.do_attack_animation()
user.do_attack_animation(src)
if(check_shields(I.force, "the [I.name]"))
return 0
@@ -722,7 +722,7 @@
if("harm")
add_logs(M, H, "punched")
M.do_attack_animation()
M.do_attack_animation(H)
var/atk_verb = "punch"
if(H.lying)
@@ -824,7 +824,7 @@
/datum/species/proc/spec_attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone, var/obj/item/organ/limb/affecting, var/hit_area, var/intent, var/obj/item/organ/limb/target_limb, target_area, var/mob/living/carbon/human/H)
// Allows you to put in item-specific reactions based on species
if(user != src)
user.do_attack_animation()
user.do_attack_animation(H)
if((user != H) && H.check_shields(I.force, "the [I.name]"))
return 0
@@ -918,7 +918,7 @@
if(user)
showname = " by [user]!"
if(user != src)
user.do_attack_animation()
user.do_attack_animation(H)
if(!(user in viewers(I, null)))
showname = "."
@@ -75,7 +75,7 @@
help_shake_act(M)
else
if (M.a_intent == "harm" && !M.is_muzzled())
M.do_attack_animation()
M.do_attack_animation(src)
if (prob(75))
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M.name] bites [name]!</span>", \
@@ -99,7 +99,7 @@
else
L.do_attack_animation()
L.do_attack_animation(src)
var/damage = rand(1, 3)
visible_message("<span class='danger'>[L] bites [src]!</span>", \
"<span class='userdanger'>[L] bites [src]!</span>")
@@ -126,7 +126,7 @@
else
if (M.a_intent == "harm")
M.do_attack_animation()
M.do_attack_animation(src)
if (prob(75))
visible_message("<span class='danger'>[M] has punched [name]!</span>", \
"<span class='userdanger'>[M] has punched [name]!</span>")
@@ -190,7 +190,7 @@
visible_message("<span class='notice'> [M] caresses [src] with its scythe like arm.</span>")
if ("harm")
M.do_attack_animation()
M.do_attack_animation(src)
if ((prob(95) && health > 0))
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
var/damage = rand(15, 30)
@@ -226,7 +226,7 @@
visible_message("<span class='warning'>[M] has grabbed [name] passively!</span>")
if ("disarm")
M.do_attack_animation()
M.do_attack_animation(src)
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
var/damage = 5
if(prob(95))
@@ -245,7 +245,7 @@
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
M.do_attack_animation()
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", \
@@ -265,7 +265,7 @@
if (health > -100)
M.do_attack_animation()
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>")
@@ -422,4 +422,4 @@
return
if(!unacidable)
take_organ_damage(min(6*toxpwr, acid_volume * toxpwr))
take_organ_damage(min(6*toxpwr, acid_volume * toxpwr))
@@ -249,7 +249,7 @@
if (Victim) return // can't attack while eating!
M.do_attack_animation()
M.do_attack_animation(src)
visible_message("<span class='danger'> The [M.name] has glomped [src]!</span>", \
"<span class='userdanger'> The [M.name] has glomped [src]!</span>")
var/damage = rand(1, 3)
@@ -267,7 +267,7 @@
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
M.do_attack_animation()
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", \
@@ -297,7 +297,7 @@
if ("help")
help_shake_act(M)
else
M.do_attack_animation()
M.do_attack_animation(src)
if (M.is_muzzled())
return
@@ -319,7 +319,7 @@
else
L.do_attack_animation()
L.do_attack_animation(src)
attacked += 10
visible_message("<span class='danger'>[L] bites [src]!</span>", \
"<span class='userdanger'>[L] bites [src]!</span>")
@@ -416,7 +416,7 @@
else
M.do_attack_animation()
M.do_attack_animation(src)
var/damage = rand(1, 9)
attacked += 10
@@ -464,7 +464,7 @@
visible_message("<span class='notice'>[M] caresses [src] with its scythe like arm.</span>")
if ("harm")
M.do_attack_animation()
M.do_attack_animation(src)
if (prob(95))
attacked += 10
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
@@ -500,7 +500,7 @@
visible_message("<span class='warning'> [M] has grabbed [name] passively!</span>")
if ("disarm")
M.do_attack_animation()
M.do_attack_animation(src)
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
var/damage = 5
attacked += 10
+23 -6
View File
@@ -661,14 +661,31 @@
/mob/living/singularity_pull(S)
step_towards(src,S)
/mob/living/proc/do_attack_animation()
/mob/living/proc/do_attack_animation(atom/A)
var/pixel_x_diff = 0
var/pixel_y_diff = 0
switch(src.dir)
if(1) pixel_y_diff = 8
if(2) pixel_y_diff = -8
if(4) pixel_x_diff = 8
if(8) pixel_x_diff = -8
var/direction = get_dir(src, A)
switch(direction)
if(NORTH)
pixel_y_diff = 8
if(SOUTH)
pixel_y_diff = -8
if(EAST)
pixel_x_diff = 8
if(WEST)
pixel_x_diff = -8
if(NORTHEAST)
pixel_x_diff = 8
pixel_y_diff = 8
if(NORTHWEST)
pixel_x_diff = -8
pixel_y_diff = 8
if(SOUTHEAST)
pixel_x_diff = 8
pixel_y_diff = -8
if(SOUTHWEST)
pixel_x_diff = -8
pixel_y_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 = initial(pixel_y), time = 2)
floating = 0 // If we were without gravity, the bouncing animation got stopped, so we make sure we restart the bouncing after the next movement.
+2 -2
View File
@@ -420,7 +420,7 @@ var/list/ai_list = list()
visible_message("<span class='notice'>[M] caresses [src]'s plating with its scythe like arm.</span>")
else //harm
M.do_attack_animation()
M.do_attack_animation(src)
var/damage = rand(10, 20)
if (prob(90))
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
@@ -441,7 +441,7 @@ var/list/ai_list = list()
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
M.do_attack_animation()
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
visible_message("<span class='danger'><B>[M]</B> [M.attacktext] [src]!")
@@ -644,7 +644,7 @@
visible_message("<span class='danger'>[M] has grabbed [src] passively!</span>")
if ("harm")
M.do_attack_animation()
M.do_attack_animation(src)
var/damage = rand(10, 20)
if (prob(90))
/*
@@ -669,7 +669,7 @@
if ("disarm")
if(!(lying))
M.do_attack_animation()
M.do_attack_animation(src)
if (rand(1,100) <= 85)
Stun(7)
step(src,get_dir(M,src))
@@ -693,7 +693,7 @@
if(M.Victim) return // can't attack while eating!
if (health > -100)
M.do_attack_animation()
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>")
@@ -746,7 +746,7 @@
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
M.do_attack_animation()
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
visible_message("<span class='danger'><B>[M]</B> [M.attacktext] [src]!</span>")
@@ -92,7 +92,7 @@
if(M.melee_damage_upper <= 0)
M.emote("me", 1, "[M.friendly] \the <EM>[src]</EM>.")
else
M.do_attack_animation()
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
visible_message("<span class='danger'>\The <EM>[M]</EM> [M.attacktext] \the <EM>[src]</EM>!</span>", \
@@ -257,7 +257,7 @@
if(M.melee_damage_upper == 0)
M.emote("me", 1, "[M.friendly] [src]")
else
M.do_attack_animation()
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
visible_message("<span class='danger'>\The [M] [M.attacktext] [src]!</span>", \
@@ -302,7 +302,7 @@
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
if("harm", "disarm")
M.do_attack_animation()
M.do_attack_animation(src)
visible_message("<span class='danger'>[M] [response_harm] [src]!</span>")
playsound(loc, "punch", 25, 1, -1)
adjustBruteLoss(harm_intent_damage)
@@ -322,7 +322,7 @@
visible_message("<span class='notice'> [M] [response_help] [src].</span>")
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
else
M.do_attack_animation()
M.do_attack_animation(src)
if (M.is_muzzled())
return
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
@@ -356,7 +356,7 @@
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
if("harm", "disarm")
M.do_attack_animation()
M.do_attack_animation(src)
var/damage = rand(15, 30)
visible_message("<span class='danger'>[M] has slashed at [src]!</span>", \
"<span class='userdanger'>[M] has slashed at [src]!</span>")
@@ -373,7 +373,7 @@
else
L.do_attack_animation()
L.do_attack_animation(src)
var/damage = rand(5, 10)
visible_message("<span class='danger'>[L] bites [src]!</span>", \
"<span class='userdanger'>[L] bites [src]!</span>")
@@ -392,7 +392,7 @@
if(M.Victim) return // can't attack while eating!
if (health > 0)
M.do_attack_animation()
M.do_attack_animation(src)
visible_message("<span class='danger'>[M.name] glomps [src]!</span>", \
"<span class='userdanger'>[M.name] glomps [src]!</span>")
@@ -437,7 +437,7 @@
harvest()
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation()
user.do_attack_animation(src)
var/damage = 0
if(O.force)
if(O.force >= force_threshold)
+2 -2
View File
@@ -599,7 +599,7 @@
(istype(W, /obj/item/device/multitool) || \
istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/device/assembly/signaler)))
return src.attack_hand(user)
user.do_attack_animation()
user.do_attack_animation(src)
user.visible_message("<span class='danger'>The [src.name] has been hit with the [W.name] by [user.name]!</span>", \
"<span class='danger'>You hit the [src.name] with your [W.name]!</span>", \
"You hear bang")
@@ -633,7 +633,7 @@
/obj/machinery/power/apc/attack_alien(mob/living/carbon/alien/humanoid/user)
if(!user)
return
user.do_attack_animation()
user.do_attack_animation(src)
user.visible_message("<span class='danger'>[user.name] slashes at the [src.name]!</span>", "<span class='notice'>You slash at the [src.name]!</span>")
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
+3 -3
View File
@@ -369,7 +369,7 @@
else if(status != LIGHT_BROKEN && status != LIGHT_EMPTY)
user.do_attack_animation()
user.do_attack_animation(src)
if(prob(1+W.force * 5))
user.visible_message("<span class='danger'>[user.name] smashed the light!</span>", \
@@ -449,7 +449,7 @@
user << "\green That object is useless to you."
return
else if (status == LIGHT_OK||status == LIGHT_BURNED)
user.do_attack_animation()
user.do_attack_animation(src)
visible_message("<span class='danger'>[user.name] smashed the light!</span>", "You hear a tinkle of breaking glass")
broken()
return
@@ -460,7 +460,7 @@
M << "<span class='danger'>That object is useless to you.</span>"
return
else if (status == LIGHT_OK||status == LIGHT_BURNED)
M.do_attack_animation()
M.do_attack_animation(src)
visible_message("<span class='danger'>[M.name] smashed the light!</span>", "You hear a tinkle of breaking glass")
broken()
return
+1 -1
View File
@@ -217,7 +217,7 @@
// hostile mob escape from disposals
/obj/machinery/disposal/attack_animal(var/mob/living/simple_animal/M)
if(M.environment_smash)
M.do_attack_animation()
M.do_attack_animation(src)
visible_message("<span class='danger'>[M.name] smashes \the [src] apart!</span>")
qdel(src)
return