Add attack animations

This commit is contained in:
Markolie
2015-02-22 21:15:54 +01:00
parent 0048394e3c
commit 377dfe894d
50 changed files with 939 additions and 577 deletions
+132 -185
View File
@@ -11,18 +11,19 @@ Gunshots/explosions/opening doors/less rare audio (done)
*/
mob/living/carbon/var
image/halimage
image/halbody
obj/halitem
hal_screwyhud = 0 //1 - critical, 2 - dead, 3 - oxygen indicator, 4 - toxin indicator
handling_hal = 0
hal_crit = 0
mob/living/carbon/
var/image/halimage
var/image/halbody
var/obj/halitem
var/hal_screwyhud = 0 //1 - critical, 2 - dead, 3 - oxygen indicator, 4 - toxin indicator
var/handling_hal = 0
var/hal_crit = 0
mob/living/carbon/proc/handle_hallucinations()
if(handling_hal) return
if(handling_hal)
return
handling_hal = 1
while(client && hallucination > 20)
while(hallucination > 20)
sleep(rand(200,500)/(hallucination/25))
var/halpick = rand(1,100)
switch(halpick)
@@ -77,9 +78,7 @@ mob/living/carbon/proc/handle_hallucinations()
halitem.name = "Flashbang"
if(client) client.screen += halitem
spawn(rand(100,250))
if(client)
client.screen -= halitem
halitem = null
qdel(halitem)
if(26 to 40)
//Flashes of danger
//src << "Danger Flash"
@@ -111,7 +110,7 @@ mob/living/carbon/proc/handle_hallucinations()
if(41 to 65)
//Strange audio
//src << "Strange Audio"
switch(rand(1,12))
switch(rand(1,14))
if(1) src << 'sound/machines/airlock.ogg'
if(2)
if(prob(50))src << 'sound/effects/Explosion1.ogg'
@@ -142,9 +141,14 @@ mob/living/carbon/proc/handle_hallucinations()
'sound/hallucinations/look_up1.ogg', 'sound/hallucinations/look_up2.ogg', 'sound/hallucinations/over_here1.ogg', 'sound/hallucinations/over_here2.ogg', 'sound/hallucinations/over_here3.ogg',\
'sound/hallucinations/turn_around1.ogg', 'sound/hallucinations/turn_around2.ogg', 'sound/hallucinations/veryfar_noise.ogg', 'sound/hallucinations/wail.ogg')
src << pick(creepyasssounds)
if(13)
src << "<span class='warning'>You feel a tiny prick!</span>"
if(14)
src << "<h1 class='alert'>Priority Announcement</h1>"
src << "<br><br><span class='alert'>The Emergency Shuttle has docked with the station. You have 3 minutes to board the Emergency Shuttle.</span><br><br>"
src << sound('sound/AI/shuttledock.ogg')
if(66 to 70)
//Flashes of danger
//src << "Danger Flash"
if(!halbody)
var/list/possible_points = list()
for(var/turf/simulated/floor/F in view(src,world.view))
@@ -158,8 +162,6 @@ mob/living/carbon/proc/handle_hallucinations()
halbody = image('icons/mob/human.dmi',target,"husk_s",TURF_LAYER)
if(4)
halbody = image('icons/mob/alien.dmi',target,"alienother",TURF_LAYER)
// if(5)
// halbody = image('xcomalien.dmi',target,"chryssalid",TURF_LAYER)
if(client) client.images += halbody
spawn(rand(50,80)) //Only seen for a brief moment.
@@ -167,55 +169,58 @@ mob/living/carbon/proc/handle_hallucinations()
halbody = null
if(71 to 72)
//Fake death
// src.sleeping_willingly = 1
src.sleeping = 20
hal_crit = 1
hal_screwyhud = 1
spawn(rand(50,100))
// src.sleeping_willingly = 0
src.sleeping = 0
hal_crit = 0
hal_screwyhud = 0
if(73 to 75)
fake_attack()
handling_hal = 0
/mob/living/carbon/proc/fake_attack()
// var/list/possible_clones = new/list()
var/mob/living/carbon/human/clone = null
var/clone_weapon = null
for(var/mob/living/carbon/human/H in living_mob_list)
if(H.stat || H.lying)
continue
// possible_clones += H
clone = H
break //changed the code a bit. Less randomised, but less work to do. Should be ok, world.contents aren't stored in any particular order.
/*obj/machinery/proc/mockpanel(list/buttons,start_txt,end_txt,list/mid_txts)
// if(!possible_clones.len) return
// clone = pick(possible_clones)
if(!clone)
return
if(!mocktxt)
//var/obj/effect/fake_attacker/F = new/obj/effect/fake_attacker(outside_range(target))
var/obj/effect/fake_attacker/F = new/obj/effect/fake_attacker(src.loc)
if(clone.l_hand)
if(!(locate(clone.l_hand) in non_fakeattack_weapons))
clone_weapon = clone.l_hand.name
F.weap = clone.l_hand
else if (clone.r_hand)
if(!(locate(clone.r_hand) in non_fakeattack_weapons))
clone_weapon = clone.r_hand.name
F.weap = clone.r_hand
mocktxt = ""
F.name = clone.name
F.my_target = src
F.weapon_name = clone_weapon
src.hallucinations += F
var/possible_txt = list("Launch Escape Pods","Self-Destruct Sequence","\[Swipe ID\]","De-Monkify",\
"Reticulate Splines","Plasma","Open Valve","Lockdown","Nerf Airflow","Kill Traitor","Nihilism",\
"OBJECTION!","Arrest Stephen Bowman","Engage Anti-Trenna Defenses","Increase Captain IQ","Retrieve Arms",\
"Play Charades","Oxygen","Inject BeAcOs","Ninja Lizards","Limit Break","Build Sentry")
F.left = image(clone,dir = WEST)
F.right = image(clone,dir = EAST)
F.up = image(clone,dir = NORTH)
F.down = image(clone,dir = SOUTH)
if(mid_txts)
while(mid_txts.len)
var/mid_txt = pick(mid_txts)
mocktxt += mid_txt
mid_txts -= mid_txt
F.updateimage()
while(buttons.len)
var/button = pick(buttons)
var/button_txt = pick(possible_txt)
mocktxt += "<a href='?src=\ref[src];[button]'>[button_txt]</a><br>"
buttons -= button
possible_txt -= button_txt
return start_txt + mocktxt + end_txt + "</TT></BODY></HTML>"
proc/check_panel(mob/M)
if (istype(M, /mob/living/carbon/human) || istype(M, /mob/living/silicon/ai))
if(M.hallucination < 15)
return 1
return 0*/
/obj/effect/fake_attacker
icon = null
@@ -231,7 +236,7 @@ proc/check_panel(mob/M)
var/image/stand_icon = null
var/image/currentimage = null
var/icon/base = null
var/s_tone
var/skin_tone
var/mob/living/clone = null
var/image/left
var/image/right
@@ -241,99 +246,103 @@ proc/check_panel(mob/M)
var/health = 100
attackby(var/obj/item/weapon/P as obj, mob/user as mob)
/obj/effect/fake_attacker/attackby(var/obj/item/weapon/P as obj, mob/living/user as mob)
step_away(src,my_target,2)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
my_target << sound(pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg'))
my_target.visible_message("<span class='danger'>[my_target] flails around wildly.</span>", \
"<span class='danger'>[my_target] has attacked [src]!</span>")
src.health -= P.force
return
/obj/effect/fake_attacker/Crossed(var/mob/M, somenumber)
if(M == my_target)
step_away(src,my_target,2)
for(var/mob/M in oviewers(world.view,my_target))
M << "\red <B>[my_target] flails around wildly.</B>"
my_target.show_message("\red <B>[src] has been attacked by [my_target] </B>", 1) //Lazy.
if(prob(30))
for(var/mob/O in oviewers(world.view , my_target))
O << "<span class='danger'>[my_target] stumbles around.</span>"
src.health -= P.force
/obj/effect/fake_attacker/New()
..()
spawn(300)
if(my_target)
my_target.hallucinations -= src
qdel(src)
step_away(src,my_target,2)
spawn attack_loop()
return
Crossed(var/mob/M, somenumber)
if(M == my_target)
step_away(src,my_target,2)
if(prob(30))
for(var/mob/O in oviewers(world.view , my_target))
O << "\red <B>[my_target] stumbles around.</B>"
New()
..()
spawn(300)
if(my_target)
my_target.hallucinations -= src
del(src)
step_away(src,my_target,2)
spawn attack_loop()
/obj/effect/fake_attacker/proc/updateimage()
// del src.currentimage
proc/updateimage()
// del src.currentimage
if(src.dir == NORTH)
del src.currentimage
src.currentimage = new /image(up,src)
else if(src.dir == SOUTH)
del src.currentimage
src.currentimage = new /image(down,src)
else if(src.dir == EAST)
del src.currentimage
src.currentimage = new /image(right,src)
else if(src.dir == WEST)
del src.currentimage
src.currentimage = new /image(left,src)
my_target << currentimage
if(src.dir == NORTH)
del src.currentimage
src.currentimage = new /image(up,src)
else if(src.dir == SOUTH)
del src.currentimage
src.currentimage = new /image(down,src)
else if(src.dir == EAST)
del src.currentimage
src.currentimage = new /image(right,src)
else if(src.dir == WEST)
del src.currentimage
src.currentimage = new /image(left,src)
my_target << currentimage
proc/attack_loop()
while(1)
sleep(rand(5,10))
if(src.health < 0)
collapse()
continue
if(get_dist(src,my_target) > 1)
src.dir = get_dir(src,my_target)
step_towards(src,my_target)
updateimage()
else
if(prob(15))
if(weapon_name)
my_target << sound(pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg'))
my_target.show_message("\red <B>[my_target] has been attacked with [weapon_name] by [src.name] </B>", 1)
my_target.staminaloss += 30
if(prob(20)) my_target.eye_blurry += 3
if(prob(33))
if(!locate(/obj/effect/overlay) in my_target.loc)
fake_blood(my_target)
else
my_target << sound(pick('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg'))
my_target.show_message("\red <B>[src.name] has punched [my_target]!</B>", 1)
my_target.staminaloss += 30
if(prob(33))
if(!locate(/obj/effect/overlay) in my_target.loc)
fake_blood(my_target)
/obj/effect/fake_attacker/proc/attack_loop()
while(1)
sleep(rand(5,10))
if(src.health < 0)
collapse()
continue
if(get_dist(src,my_target) > 1)
src.dir = get_dir(src,my_target)
step_towards(src,my_target)
updateimage()
else
if(prob(15))
step_away(src,my_target,2)
src.do_attack_animation(my_target)
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)
my_target.staminaloss += 30
if(prob(20))
my_target.eye_blurry += 3
if(prob(33))
if(!locate(/obj/effect/overlay) in my_target.loc)
fake_blood(my_target)
else
my_target << sound(pick('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg'))
my_target.show_message("<span class='userdanger'>[src.name] has punched [my_target]!</span>", 1)
my_target.staminaloss += 30
if(prob(33))
if(!locate(/obj/effect/overlay) in my_target.loc)
fake_blood(my_target)
proc/collapse()
collapse = 1
updateimage()
if(prob(15))
step_away(src,my_target,2)
/proc/fake_blood(var/mob/target)
/obj/effect/fake_attacker/proc/collapse()
collapse = 1
updateimage()
/obj/effect/fake_attacker/proc/fake_blood(var/mob/target)
var/obj/effect/overlay/O = new/obj/effect/overlay(target.loc)
O.name = "blood"
var/image/I = image('icons/effects/blood.dmi',O,"floor[rand(1,7)]",O.dir,1)
target << I
spawn(300)
del(O)
qdel(O)
return
var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/item/ammo_box/a357,\
/obj/item/weapon/gun/energy/kinetic_accelerator/crossbow, /obj/item/weapon/melee/energy/sword,\
/obj/item/weapon/gun/energy/crossbow, /obj/item/weapon/melee/energy/sword,\
/obj/item/weapon/storage/box/syndicate, /obj/item/weapon/storage/box/emps,\
/obj/item/weapon/cartridge/syndicate, /obj/item/clothing/under/chameleon,\
/obj/item/clothing/shoes/syndigaloshes, /obj/item/weapon/card/id/syndicate,\
@@ -347,65 +356,3 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite
/obj/item/clothing/under/rank/captain, /obj/item/device/aicard,\
/obj/item/clothing/shoes/magboots, /obj/item/blueprints, /obj/item/weapon/disk/nuclear,\
/obj/item/clothing/suit/space/nasavoid, /obj/item/weapon/tank)
/proc/fake_attack(var/mob/living/target)
// var/list/possible_clones = new/list()
var/mob/living/carbon/human/clone = null
var/clone_weapon = null
for(var/mob/living/carbon/human/H in living_mob_list)
if(H.stat || H.lying) continue
// possible_clones += H
clone = H
break //changed the code a bit. Less randomised, but less work to do. Should be ok, world.contents aren't stored in any particular order.
// if(!possible_clones.len) return
// clone = pick(possible_clones)
if(!clone) return
//var/obj/effect/fake_attacker/F = new/obj/effect/fake_attacker(outside_range(target))
var/obj/effect/fake_attacker/F = new/obj/effect/fake_attacker(target.loc)
if(clone.l_hand)
if(!(locate(clone.l_hand) in non_fakeattack_weapons))
clone_weapon = clone.l_hand.name
F.weap = clone.l_hand
else if (clone.r_hand)
if(!(locate(clone.r_hand) in non_fakeattack_weapons))
clone_weapon = clone.r_hand.name
F.weap = clone.r_hand
F.name = clone.name
F.my_target = target
F.weapon_name = clone_weapon
target.hallucinations += F
F.left = image(clone,dir = WEST)
F.right = image(clone,dir = EAST)
F.up = image(clone,dir = NORTH)
F.down = image(clone,dir = SOUTH)
// F.base = new /icon(clone.stand_icon)
// F.currentimage = new /image(clone)
/*
F.left = new /icon(clone.stand_icon,dir=WEST)
for(var/icon/i in clone.overlays)
F.left.Blend(i)
F.up = new /icon(clone.stand_icon,dir=NORTH)
for(var/icon/i in clone.overlays)
F.up.Blend(i)
F.down = new /icon(clone.stand_icon,dir=SOUTH)
for(var/icon/i in clone.overlays)
F.down.Blend(i)
F.right = new /icon(clone.stand_icon,dir=EAST)
for(var/icon/i in clone.overlays)
F.right.Blend(i)
target << F.up
*/
F.updateimage()
@@ -8,7 +8,7 @@
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
var/muzzled = is_muzzled()
switch(act)
if ("me")
@@ -70,15 +70,12 @@
///mob/living/carbon/alien/humanoid/bullet_act(var/obj/item/projectile/Proj) taken care of in living
/mob/living/carbon/alien/humanoid/emp_act(severity)
if(wear_suit) wear_suit.emp_act(severity)
if(head) head.emp_act(severity)
if(r_store) r_store.emp_act(severity)
if(l_store) l_store.emp_act(severity)
..()
/mob/living/carbon/alien/humanoid/ex_act(severity)
if(!blinded)
flick("flash", flash)
..()
var/shielded = 0
@@ -86,7 +83,6 @@
var/f_loss = null
switch (severity)
if (1.0)
b_loss += 500
gib()
return
@@ -122,11 +118,10 @@
if(shielded)
damage /= 4
show_message("\red The blob attacks!")
show_message("<span class='userdanger'>The blob attacks!</span>")
adjustFireLoss(damage)
return
/mob/living/carbon/alien/humanoid/meteorhit(O as obj)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
@@ -138,6 +133,35 @@
updatehealth()
return
/mob/living/carbon/alien/humanoid/attack_paw(mob/living/carbon/monkey/M as mob)
if(!ismonkey(M)) return//Fix for aliens receiving double messages when attacking other aliens.
if (!ticker)
M << "You cannot attack people before the game has started."
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
..()
switch(M.a_intent)
if ("help")
help_shake_act(M)
else
M.do_attack_animation(src)
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
return
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>")
if (health > -100)
adjustBruteLoss(rand(1, 3))
updatehealth()
return
/mob/living/carbon/alien/humanoid/attack_slime(mob/living/carbon/slime/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
@@ -145,12 +169,11 @@
if(M.Victim) return // can't attack while eating!
if (health > -100)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
if (stat > -100)
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)
if(M.is_adult)
@@ -177,9 +200,8 @@
if(M.powerlevel < 0)
M.powerlevel = 0
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has shocked []!</B>", src), 1)
visible_message("<span class='danger'>The [M.name] has shocked [src]!</span>", \
"<span class='userdanger'>The [M.name] has shocked [src]!</span>")
Weaken(power)
if (stuttering < power)
@@ -198,6 +220,19 @@
return
/mob/living/carbon/alien/humanoid/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
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>", \
"<span class='userdanger'>[M] [M.attacktext] [src]!</span>")
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
adjustBruteLoss(damage)
updatehealth()
/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
@@ -207,95 +242,135 @@
M << "No attacking people at spawn, you jackass."
return
if(..()) //to allow surgery to return properly.
return
switch(M.a_intent)
if ("help")
help_shake_act(M)
if ("grab")
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)
M.put_in_active_hand(G)
G.synch()
LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
if ("harm")
M.do_attack_animation(src)
var/damage = rand(1, 9)
if (prob(90))
if (HULK in M.mutations)//HULK SMASH
damage += 14
spawn(0)
Weaken(damage) // Why can a hulk knock an alien out but not knock out a human? Damage is robust enough.
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
playsound(loc, "punch", 25, 1, -1)
visible_message("<span class='danger'>[M] has punched [src]!</span>", \
"<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.
Weaken(1,5)
visible_message("<span class='danger'>[M] has weakened [src]!</span>", \
"<span class='userdanger'>[M] has weakened [src]!</span>", \
"<span class='danger'>You hear someone fall.</span>")
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has attempted to punch [src]!</span>")
if ("disarm")
if (!lying)
if (prob(5))//Very small chance to push an alien down.
Weaken(2)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M] has pushed down [src]!</span>", \
"<span class='userdanger'>[M] has pushed down [src]!</span>")
else
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>")
else
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has attempted to disarm [src]!</span>")
return
/*Code for aliens attacking aliens. Because aliens act on a hivemind, I don't see them as very aggressive with each other.
As such, they can either help or harm other aliens. Help works like the human help command while harm is a simple nibble.
In all, this is a lot like the monkey code. /N
*/
/mob/living/carbon/alien/humanoid/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
..()
switch(M.a_intent)
if ("help")
sleeping = max(0,sleeping-5)
resting = 0
AdjustParalysis(-3)
AdjustStunned(-3)
AdjustWeakened(-3)
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake it up!</span>")
else
if (health > 0)
help_shake_act(M)
else
if (M.health >= -75.0)
if (((M.head && M.head.flags & 4) || ((M.wear_mask && !( M.wear_mask.flags & 32 )) || ((head && head.flags & 4) || (wear_mask && !( wear_mask.flags & 32 ))))))
M << "\blue <B>Remove that mask!</B>"
return
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
O.source = M
O.target = src
O.s_loc = M.loc
O.t_loc = loc
O.place = "CPR"
requests += O
spawn( 0 )
O.process()
return
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>", \
"<span class='userdanger'>[M.name] bites [src]!!</span>")
if ("grab")
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)
M.put_in_active_hand(G)
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
if ("harm")
var/damage = rand(1, 9)
if (prob(90))
if (HULK in M.mutations)//HULK SMASH
damage += 14
spawn(0)
Paralyse(1)
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
playsound(loc, "punch", 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has punched []!</B>", M, src), 1)
if (damage > 9||prob(5))//Regular humans have a very small chance of weakening an alien.
Paralyse(2)
for(var/mob/O in viewers(M, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has weakened []!</B>", M, src), 1, "\red You hear someone fall.", 2)
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to punch []!</B>", M, src), 1)
if ("disarm")
if (!lying)
if (prob(5))//Very small chance to push an alien down.
Paralyse(2)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has pushed down []!</B>", M, src), 1)
else
if (prob(50))
drop_item()
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed []!</B>", M, src), 1)
else
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to disarm []!</B>", M, src), 1)
M << "<span class='warning'>[name] is too injured for that.</span>"
return
/mob/living/carbon/alien/humanoid/attack_larva(mob/living/carbon/alien/larva/L as mob)
switch(L.a_intent)
if("help")
visible_message("<span class='notice'>[L] rubs its head against [src].</span>")
else
if (health > 0)
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>", \
"<span class='userdanger'>[L.name] bites [src]!!</span>")
adjustBruteLoss(damage)
updatehealth()
else
L << "<span class='warning'>[name] is too injured for that.</span>"
return
/mob/living/carbon/alien/humanoid/restrained()
if (handcuffed)
return 1
@@ -8,7 +8,7 @@
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
var/muzzled = is_muzzled()
switch(act)
if ("me")
@@ -71,14 +71,12 @@
/mob/living/carbon/alien/larva/ex_act(severity)
if(!blinded)
flick("flash", flash)
..()
var/b_loss = null
var/f_loss = null
switch (severity)
if (1.0)
b_loss += 500
gib()
return
@@ -119,7 +117,7 @@
//paralysis += 1
show_message("\red The blob attacks you!")
show_message("<span class='userdanger'>The blob attacks you!</span>")
adjustFireLoss(damage)
@@ -130,7 +128,7 @@
//can't equip anything
/mob/living/carbon/alien/larva/attack_ui(slot_id)
return
/mob/living/carbon/alien/larva/meteorhit(O as obj)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
@@ -142,31 +140,164 @@
updatehealth()
return
/mob/living/carbon/alien/larva/attack_hand(mob/living/carbon/human/M as mob)
if(..())
var/damage = rand(1, 9)
if (prob(90))
if (HULK in M.mutations)
damage += 5
spawn(0)
Paralyse(1)
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
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>")
if ((stat != DEAD) && (damage > 4.9))
Paralyse(rand(5,10))
/mob/living/carbon/alien/larva/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
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>", \
"<span class='userdanger'>[M] [M.attacktext] [src]!</span>")
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
adjustBruteLoss(damage)
add_logs(M, src, "attacked", admin=0)
updatehealth()
adjustBruteLoss(damage)
updatehealth()
/mob/living/carbon/alien/larva/attack_paw(mob/living/carbon/monkey/M as mob)
if(!(istype(M, /mob/living/carbon/monkey))) return//Fix for aliens receiving double messages when attacking other aliens.
if (!ticker)
M << "You cannot attack people before the game has started."
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
..()
switch(M.a_intent)
if ("help")
help_shake_act(M)
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>")
M.do_attack_animation(src)
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
return
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>")
if (health > -100)
adjustBruteLoss(rand(1, 3))
updatehealth()
return
/mob/living/carbon/alien/larva/attack_slime(mob/living/carbon/slime/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
if(M.Victim)
return // can't attack while eating!
if (stat != DEAD)
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)
if(M.is_adult)
damage = rand(20, 40)
else
damage = rand(5, 35)
adjustBruteLoss(damage)
updatehealth()
return
/mob/living/carbon/alien/larva/attack_hand(mob/living/carbon/human/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
..()
switch(M.a_intent)
if ("help")
help_shake_act(M)
if ("grab")
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src )
M.put_in_active_hand(G)
G.synch()
LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
else
M.do_attack_animation(src)
var/damage = rand(1, 9)
if (prob(90))
if (HULK in M.mutations)
damage += 5
spawn(0)
Paralyse(1)
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
playsound(loc, "punch", 25, 1, -1)
visible_message("<span class='danger'>[M] has kicked [src]!</span>", \
"<span class='userdanger'>[M] has kicked [src]!</span>")
if ((stat != DEAD) && (damage > 4.9))
Weaken(rand(5,10))
visible_message("<span class='danger'>[M] has weakened [src]!</span>", \
"<span class='userdanger'>[M] has weakened [src]!</span>", \
"<span class='danger'>You hear someone fall.</span>")
adjustBruteLoss(damage)
updatehealth()
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>")
return
/mob/living/carbon/alien/larva/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
..()
switch(M.a_intent)
if ("help")
sleeping = max(0,sleeping-5)
resting = 0
AdjustParalysis(-3)
AdjustStunned(-3)
AdjustWeakened(-3)
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake it up!</span>")
else
if (health > 0)
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>", \
"<span class='userdanger'>[M.name] bites [src]!</span>")
adjustBruteLoss(damage)
updatehealth()
else
M << "<span class='warning'>[name] is too injured for that.</span>"
return
/mob/living/carbon/alien/larva/restrained()
+3
View File
@@ -588,3 +588,6 @@
/mob/living/carbon/proc/canBeHandcuffed()
return 0
/mob/living/carbon/is_muzzled()
return(istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
@@ -9,7 +9,7 @@
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
var/muzzled = is_muzzled()
//var/m_type = 1
for (var/obj/item/weapon/implant/I in src)
+23 -3
View File
@@ -368,6 +368,7 @@
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
for(var/mob/O in viewers(src, null))
@@ -384,6 +385,25 @@
apply_damage(damage, BRUTE, affecting, armor, M.name)
if(armor >= 2) return
/mob/living/carbon/human/attack_larva(mob/living/carbon/alien/larva/L as mob)
switch(L.a_intent)
if("help")
visible_message("<span class='notice'>[L] rubs its head against [src].</span>")
else
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>")
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
if(stat != DEAD)
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
var/datum/organ/external/affecting = get_organ(ran_zone(L.zone_sel.selecting))
var/armor_block = run_armor_check(affecting, "melee")
apply_damage(damage, BRUTE, affecting, armor_block)
/mob/living/carbon/human/proc/is_loyalty_implanted(mob/living/carbon/human/M)
for(var/L in M.contents)
@@ -398,9 +418,9 @@
if (health > -100)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
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)
@@ -23,6 +23,7 @@
visible_message(text("\red [] has grabbed [] passively!", M, src))
if("harm")
M.do_attack_animation(src)
if (w_uniform)
w_uniform.add_fingerprint(M)
var/damage = rand(15, 30)
@@ -43,6 +44,7 @@
updatehealth()
if("disarm")
M.do_attack_animation(src)
var/randn = rand(1, 100)
if (randn <= 80)
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
@@ -18,6 +18,7 @@
if((M != src) && check_shields(0, M.name))
add_logs(src, M, "attempted to touch")
M.do_attack_animation(src)
visible_message("\red <B>[M] attempted to touch [src]!</B>")
return 0
@@ -120,6 +121,7 @@
return
//end vampire codes
M.do_attack_animation(src)
add_logs(src, M, "[pick(attack.attack_verb)]ed")
if(!iscarbon(M))
@@ -1,17 +1,18 @@
/mob/living/carbon/human/attack_paw(mob/M as mob)
/mob/living/carbon/human/attack_paw(mob/living/M as mob)
..()
if (M.a_intent == "help")
help_shake_act(M)
else
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
M.do_attack_animation(src)
if (M.is_muzzled())
return
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
"<span class='userdanger'>[M.name] bites [src]!</span>")
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
var/damage = rand(1, 3)
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone))
apply_damage(damage, BRUTE, affecting, run_armor_check(affecting, "melee"))
return
@@ -242,8 +242,10 @@ emp_act
return 0
var/hit_area = affecting.display_name
if((user != src) && check_shields(I.force, "the [I.name]"))
return 0
if(user != src)
user.do_attack_animation(src)
if(check_shields(I.force, "the [I.name]"))
return 0
if(istype(I,/obj/item/weapon/card/emag))
emag_act(user, affecting)
+3 -7
View File
@@ -244,7 +244,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
var/x_offset = pixel_x + rand(-2,2) //Should probably be moved into the twitch emote at some point.
var/y_offset = pixel_y + rand(-1,1)
animate(src, pixel_x = pixel_x + x_offset, pixel_y = pixel_y + y_offset, time = 1)
animate(pixel_x = pixel_x - x_offset, pixel_y = pixel_y - y_offset, time = 1)
animate(pixel_x = initial(pixel_x) , pixel_y = initial(pixel_y), time = 1)
if (disabilities & NERVOUS)
speech_problem_flag = 1
if (prob(10))
@@ -1046,11 +1046,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
adjustOxyLoss(1)*/
if(hallucination && !(species.flags & IS_SYNTHETIC))
if(hallucination >= 20)
if(prob(3))
fake_attack(src)
if(!handling_hal)
spawn handle_hallucinations() //The not boring kind!
spawn handle_hallucinations()
if(hallucination<=2)
hallucination = 0
@@ -1174,7 +1170,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
var/pixel_y_diff = rand(-amplitude/3, amplitude/3)
animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff , time = 2, loop = 6)
animate(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)
jitteriness = max(jitteriness-1, 0)
//Other
@@ -255,7 +255,8 @@
if (Victim) return // can't attack while eating!
if (health > -100)
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)
@@ -275,6 +276,7 @@
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
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>", \
@@ -308,6 +310,7 @@
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
return
if (health > 0)
M.do_attack_animation(src)
attacked += 10
//playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M.name] has attacked [src]!</span>", \
@@ -316,7 +319,26 @@
updatehealth()
return
/mob/living/carbon/slime/attack_larva(mob/living/carbon/alien/larva/L as mob)
switch(L.a_intent)
if("help")
visible_message("<span class='notice'>[L] rubs its head against [src].</span>")
else
L.do_attack_animation(src)
attacked += 10
visible_message("<span class='danger'>[L] bites [src]!</span>", \
"<span class='userdanger'>[L] bites [src]!</span>")
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
if(stat != DEAD)
var/damage = rand(1, 3)
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
adjustBruteLoss(damage)
/mob/living/carbon/slime/attack_hand(mob/living/carbon/human/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
@@ -415,7 +437,7 @@
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
else
M.do_attack_animation(src)
var/damage = rand(1, 9)
attacked += 10
@@ -462,7 +484,7 @@
visible_message("<span class='notice'>[M] caresses [src] with its scythe like arm.</span>")
if ("harm")
M.do_attack_animation(src)
if (prob(95))
attacked += 10
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
@@ -496,6 +518,7 @@
visible_message("<span class='warning'> [M] has grabbed [name] passively!</span>")
if ("disarm")
M.do_attack_animation(src)
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
var/damage = 5
attacked += 10
@@ -9,7 +9,7 @@
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
var/muzzled = is_muzzled()
switch(act)
if ("me")
+79 -71
View File
@@ -188,30 +188,47 @@
if ((O.icon_state == "flaming" && !( shielded )))
adjustFireLoss(40)
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
return
//mob/living/carbon/monkey/bullet_act(var/obj/item/projectile/Proj)taken care of in living
/mob/living/carbon/monkey/attack_paw(mob/M as mob)
return
/mob/living/carbon/monkey/attack_paw(mob/living/M as mob)
..()
if (M.a_intent == "help")
help_shake_act(M)
else
if ((M.a_intent == "harm" && !( istype(wear_mask, /obj/item/clothing/mask/muzzle) )))
if ((prob(75) && health > 0))
if (M.a_intent == "harm" && !(istype(src.wear_mask, /obj/item/clothing/mask/muzzle)))
M.do_attack_animation(src)
if (prob(75))
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M.name] has bit [name]!</B>", 1)
visible_message("<span class='danger'>[M.name] bites [name]!</span>", \
"<span class='userdanger'>[M.name] bites [name]!</span>")
var/damage = rand(1, 5)
adjustBruteLoss(damage)
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
if (health > -100)
adjustBruteLoss(damage)
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
else
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M.name] has attempted to bite [name]!</B>", 1)
visible_message("<span class='danger'>[M.name] has attempted to bite [name]!</span>", \
"<span class='userdanger'>[M.name] has attempted to bite [name]!</span>")
return
/mob/living/carbon/monkey/attack_larva(mob/living/carbon/alien/larva/L as mob)
switch(L.a_intent)
if("help")
visible_message("<span class='notice'>[L] rubs its head against [src].</span>")
else
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>")
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
if(stat != DEAD)
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
adjustBruteLoss(damage)
/mob/living/carbon/monkey/attack_hand(mob/living/carbon/human/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
@@ -221,33 +238,35 @@
M << "No attacking people at spawn, you jackass."
return
if(..()) //To allow surgery to return properly.
return
if (M.a_intent == "help")
help_shake_act(M)
else
if (M.a_intent == "harm")
if ((prob(75) && health > 0))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has punched [name]!</B>", M), 1)
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>")
playsound(loc, "punch", 25, 1, -1)
var/damage = rand(5, 10)
if (prob(40))
damage = rand(10, 15)
if (paralysis < 5)
if ( (paralysis < 5) && (health > 0) )
Paralyse(rand(10, 15))
spawn( 0 )
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has knocked out [name]!</B>", M), 1)
visible_message("<span class='danger'>[M] has knocked out [name]!</span>", \
"<span class='userdanger'>[M] has knocked out [name]!</span>")
return
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to punch [name]!</B>", M), 1)
visible_message("<span class='danger'>[M] has attempted to punch [name]!</span>", \
"<span class='userdanger'>[M] has attempted to punch [name]!</span>")
else
if (M.a_intent == "grab")
if (M == src || anchored)
@@ -257,28 +276,24 @@
M.put_in_active_hand(G)
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
visible_message("<span class='warning'>[M] has grabbed [name] passively!</span>")
else
if (!( paralysis ))
if (prob(25))
Paralyse(2)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has pushed down [name]!</B>", M), 1)
visible_message("<span class='danger'>[M] has pushed down [src]!</span>", \
"<span class='userdanger'>[M] has pushed down [src]!</span>")
else
if(drop_item())
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
visible_message("<span class='danger'>[M] has disarmed [src]!</span>", \
"<span class='userdanger'>[M] has disarmed [src]!</span>")
return
/mob/living/carbon/monkey/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
@@ -292,11 +307,10 @@
switch(M.a_intent)
if ("help")
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1)
visible_message("<span class='notice'> [M] caresses [src] with its scythe like arm.</span>")
if ("harm")
M.do_attack_animation(src)
if ((prob(95) && health > 0))
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
var/damage = rand(15, 30)
@@ -304,50 +318,45 @@
damage = rand(20, 40)
if (paralysis < 15)
Paralyse(rand(10, 15))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has wounded [name]!</B>", M), 1)
visible_message("<span class='danger'>[M] has wounded [name]!</span>", \
"<span class='userdanger'>[M] has wounded [name]!</span>")
else
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has slashed [name]!</B>", M), 1)
adjustBruteLoss(damage)
updatehealth()
visible_message("<span class='danger'>[M] has slashed [name]!</span>", \
"<span class='userdanger'>[M] has slashed [name]!</span>")
if (stat != DEAD)
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to lunge at [name]!</B>", M), 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>")
if ("grab")
if (M == src)
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, M, src )
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src )
M.put_in_active_hand(G)
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
visible_message("<span class='warning'>[M] has grabbed [name] passively!</span>")
if ("disarm")
M.do_attack_animation(src)
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
var/damage = 5
if(prob(95))
Weaken(15)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has tackled down [name]!</B>", M), 1)
Weaken(10)
visible_message("<span class='danger'>[M] has tackled down [name]!</span>", \
"<span class='userdanger'>[M] has tackled down [name]!</span>")
else
if(drop_item())
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
visible_message("<span class='danger'>[M] has disarmed [name]!</span>", \
"<span class='userdanger'>[M] has disarmed [name]!</span>")
adjustBruteLoss(damage)
updatehealth()
return
@@ -356,12 +365,12 @@
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", \
"<span class='userdanger'>[M] [M.attacktext] [src]!</span>")
add_logs(M, src, "attacked", admin=0)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
adjustBruteLoss(damage)
updatehealth()
@@ -376,9 +385,9 @@
if (health > -100)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
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)
@@ -406,9 +415,8 @@
if(M.powerlevel < 0)
M.powerlevel = 0
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has shocked []!</B>", src), 1)
visible_message("<span class='danger'>[M] shocked [src]!</span>", \
"<span class='userdanger'>[M] shocked [src]!</span>")
Weaken(power)
if (stuttering < power)
@@ -426,7 +434,7 @@
updatehealth()
return
/mob/living/carbon/monkey/Stat()
..()
statpanel("Status")
+30
View File
@@ -761,3 +761,33 @@
/mob/living/proc/can_use_vents()
return "You can't fit into that vent."
/atom/movable/proc/do_attack_animation(atom/A)
var/pixel_x_diff = 0
var/pixel_y_diff = 0
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)
+12 -14
View File
@@ -536,7 +536,7 @@ var/list/ai_list = list()
if(A && target)
A.cameraFollow = target
A << text("Now tracking [] on camera.", target.name)
A << "Now tracking [target.name] on camera."
if (usr.machine == null)
usr.machine = usr
@@ -565,6 +565,7 @@ var/list/ai_list = list()
updatehealth()
return 2
/mob/living/silicon/ai/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
@@ -577,38 +578,35 @@ var/list/ai_list = list()
switch(M.a_intent)
if ("help")
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M] caresses [src]'s plating with its scythe like arm."), 1)
visible_message("<span class='notice'>[M] caresses [src]'s plating with its scythe like arm.</span>")
else //harm
M.do_attack_animation(src)
var/damage = rand(10, 20)
if (prob(90))
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1)
visible_message("<span class='danger'>[M] has slashed at [src]!</span>",\
"<span class='userdanger'>[M] has slashed at [src]!</span>")
if(prob(8))
flick("noise", flash)
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] took a swipe at []!</B>", M, src), 1)
visible_message("<span class='danger'>[M] took a swipe at [src]!</span>", \
"<span class='userdanger'>[M] took a swipe at [src]!</span>")
return
/mob/living/silicon/ai/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
visible_message("<span class='danger'><B>[M]</B> [M.attacktext] [src]!")
add_logs(M, src, "attacked", admin=0)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
adjustBruteLoss(damage)
updatehealth()
@@ -213,6 +213,7 @@
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
for(var/mob/O in viewers(src, null))
@@ -240,6 +241,7 @@
O.show_message(text("\blue [M] caresses [src]'s casing with its scythe like arm."), 1)
else //harm
M.do_attack_animation(src)
var/damage = rand(10, 20)
if (prob(90))
playsound(src.loc, 'sound/weapons/slash.ogg', 25, 1, -1)
+31 -35
View File
@@ -671,6 +671,7 @@
user << "Nothing to fix here!"
return
var/obj/item/weapon/weldingtool/WT = W
user.changeNext_move(CLICK_CD_MELEE)
if (WT.remove_fuel(0))
adjustBruteLoss(-30)
updatehealth()
@@ -921,23 +922,21 @@
if ("help")
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M] caresses [src]'s plating with its scythe like arm."), 1)
O.show_message(text("<span class='notice'>[M] caresses [src]'s plating with its scythe like arm.</span>"), 1)
if ("grab")
if (M == src)
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, M, src )
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src )
M.put_in_active_hand(G)
grabbed_by += G
G.synch()
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
visible_message("<span class='danger'>[M] has grabbed [src] passively!</span>")
if ("harm")
M.do_attack_animation(src)
var/damage = rand(10, 20)
if (prob(90))
/*
@@ -949,33 +948,31 @@
What is this?*/
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1)
visible_message("<span class='danger'>[M] has slashed at [src]!</span>",\
"<span class='userdanger'>[M] has slashed at [src]!</span>")
if(prob(8))
flick("noise", flash)
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] took a swipe at []!</B>", M, src), 1)
visible_message("<span class='danger'>[M] took a swipe at [src]!</span>", \
"<span class='userdanger'>[M] took a swipe at [src]!</span>")
if ("disarm")
if(!(lying))
M.do_attack_animation(src)
if (rand(1,100) <= 85)
Stun(7)
step(src,get_dir(M,src))
spawn(5) step(src,get_dir(M,src))
playsound(loc, 'sound/weapons/pierce.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has forced back []!</B>", M, src), 1)
visible_message("<span class='danger'>[M] has forced back [src]!</span>",\
"<span class='userdanger'>[M] has forced back [src]!</span>")
else
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] attempted to force back []!</B>", M, src), 1)
visible_message("<span class='danger'>[M] attempted to force back [src]!</span>",\
"<span class='userdanger'>[M] attempted to force back [src]!</span>")
return
@@ -988,10 +985,9 @@
if(M.Victim) return // can't attack while eating!
if (health > -100)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
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)
@@ -1022,7 +1018,7 @@
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has electrified []!</B>", src), 1)
O.show_message(text("<span class='userdanger'>The [M.name] has electrified []!</span>", src), 1)
flick("noise", flash)
@@ -1042,12 +1038,11 @@
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
visible_message("<span class='danger'><B>[M]</B> [M.attacktext] [src]!</span>")
add_logs(M, src, "attacked", admin=0)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
adjustBruteLoss(damage)
updatehealth()
@@ -1058,21 +1053,22 @@
add_fingerprint(user)
if(opened && !wiresexposed && (!istype(user, /mob/living/silicon)))
var/datum/robot_component/cell_component = components["power cell"]
if(cell)
cell.updateicon()
cell.add_fingerprint(user)
user.put_in_active_hand(cell)
user << "You remove \the [cell]."
cell = null
cell_component.wrapped = null
cell_component.installed = 0
updateicon()
else if(cell_component.installed == -1)
cell_component.installed = 0
var/obj/item/broken_device = cell_component.wrapped
user << "You remove \the [broken_device]."
user.put_in_active_hand(broken_device)
if(!opened && (!istype(user, /mob/living/silicon)))
if (user.a_intent == "help")
user.visible_message("<span class='notice'>[user] pets [src]!</span>", \
"<span class='notice'>You pet [src]!</span>")
/mob/living/silicon/robot/attack_paw(mob/user)
return attack_hand(user)
/mob/living/silicon/robot/proc/allowed(mob/M)
//check if it doesn't require any access at all
@@ -101,6 +101,7 @@
if(M.melee_damage_upper <= 0)
M.emote("[M.friendly] \the <EM>[src]</EM>")
else
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
for(var/mob/O in viewers(src, null))
@@ -236,18 +236,16 @@
m_type = 2
..()
/mob/living/simple_animal/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
M.emote("me", 1, "[M.friendly] [src]")
else
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>\The [M]</B> [M.attacktext] [src]!", 1)
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
visible_message("<span class='danger'>\The [M] [M.attacktext] [src]!</span>", \
"<span class='userdanger'>\The [M] [M.attacktext] [src]!</span>")
add_logs(M, src, "attacked", admin=0)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
adjustBruteLoss(damage)
@@ -266,10 +264,8 @@
if("help")
if (health > 0)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message("\blue [M] [response_help] [src].")
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='notice'> [M] [response_help] [src].</span>")
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
if("grab")
if (M == src || anchored)
@@ -281,34 +277,51 @@
M.put_in_active_hand(G)
grabbed_by += G
G.synch()
LAssailant = M
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
if("harm", "disarm")
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)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message("\red [M] [response_harm] [src]!")
playsound(loc, "punch", 25, 1, -1)
return
/mob/living/simple_animal/attack_paw(mob/living/carbon/monkey/M as mob)
if(!(istype(M, /mob/living/carbon/monkey)))
return // Fix for aliens receiving double messages when attacking simple animals.
..()
switch(M.a_intent)
if ("help")
if (health > 0)
visible_message("<span class='notice'> [M] [response_help] [src].</span>")
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
else
M.do_attack_animation(src)
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
return
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>")
if (health > -100)
adjustBruteLoss(rand(1, 3))
return
/mob/living/simple_animal/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
switch(M.a_intent)
if ("help")
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1)
visible_message("<span class='notice'>[M] caresses [src] with its scythe like arm.</span>")
if ("grab")
if(M == src || anchored)
return
@@ -319,18 +332,18 @@
M.put_in_active_hand(G)
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
else
if("harm", "disarm")
M.do_attack_animation(src)
var/damage = rand(15, 30)
visible_message("\red <B>[M] has slashed at [src]!</B>")
visible_message("<span class='danger'>[M] has slashed at [src]!</span>", \
"<span class='userdanger'>[M] has slashed at [src]!</span>")
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
adjustBruteLoss(damage)
return
@@ -339,17 +352,19 @@
switch(L.a_intent)
if("help")
visible_message("\blue [L] rubs it's head against [src]")
visible_message("<span class='notice'>[L] rubs its head against [src].</span>")
else
L.do_attack_animation(src)
var/damage = rand(5, 10)
visible_message("\red <B>[L] bites [src]!</B>")
visible_message("<span class='danger'>[L] bites [src]!</span>", \
"<span class='userdanger'>[L] bites [src]!</span>")
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
if(stat != DEAD)
adjustBruteLoss(damage)
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
adjustBruteLoss(damage)
/mob/living/simple_animal/attack_slime(mob/living/carbon/slime/M as mob)
@@ -359,22 +374,24 @@
if(M.Victim) return // can't attack while eating!
visible_message("\red <B>[M.name] glomps [src]!</B>")
if (health > 0)
M.do_attack_animation(src)
visible_message("<span class='danger'>[M.name] glomps [src]!</span>", \
"<span class='userdanger'>[M.name] glomps [src]!</span>")
var/damage = rand(1, 3)
var/damage = rand(1, 3)
if(M.is_adult)
damage = rand(20, 40)
else
damage = rand(5, 35)
if(M.is_adult)
damage = rand(20, 40)
else
damage = rand(5, 35)
adjustBruteLoss(damage)
adjustBruteLoss(damage)
return
/mob/living/simple_animal/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
/mob/living/simple_animal/attackby(var/obj/item/O as obj, var/mob/living/user as mob) //Marker -Agouri
if(istype(O, /obj/item/stack/medical))
if(stat != DEAD)
var/obj/item/stack/medical/MED = O
@@ -403,6 +420,7 @@
harvest()
else
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
var/damage = 0
if(O.force)
if(O.force >= force_threshold)
+3
View File
@@ -855,6 +855,9 @@ var/list/slot_equipment_priority = list( \
return 0
src << message
return 1
/mob/proc/is_muzzled()
return 0
/mob/proc/show_viewers(message)
for(var/mob/M in viewers())
+4 -1
View File
@@ -365,7 +365,7 @@
//attack with an item - open/close cover, insert cell, or (un)lock interface
/obj/machinery/power/apc/attackby(obj/item/W, mob/user)
/obj/machinery/power/apc/attackby(obj/item/W, mob/living/user)
if (istype(user, /mob/living/silicon) && get_dist(src,user)>1)
return src.attack_hand(user)
@@ -577,6 +577,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(src)
user.visible_message("\red The [src.name] has been hit with the [W.name] by [user.name]!", \
"\red You hit the [src.name] with your [W.name]!", \
"You hear bang")
@@ -671,6 +672,8 @@
return
if(indestructible)
return
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
user.visible_message("\red [user.name] slashes at the [src.name]!", "\blue You slash at the [src.name]!")
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
+9 -9
View File
@@ -21,7 +21,7 @@
var/obj/machinery/light/newlight = null
var/sheets_refunded = 2
/obj/item/light_fixture_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/light_fixture_frame/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/metal( get_turf(src.loc), sheets_refunded )
del(src)
@@ -99,7 +99,7 @@
usr << "The casing is closed."
return
/obj/machinery/light_construct/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/light_construct/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
src.add_fingerprint(user)
if (istype(W, /obj/item/weapon/wrench))
if (src.stage == 1)
@@ -344,7 +344,7 @@
// attack with item - insert light (if right type), otherwise try to break the light
/obj/machinery/light/attackby(obj/item/W, mob/user)
/obj/machinery/light/attackby(obj/item/W, mob/living/user)
//Light replacer code
if(istype(W, /obj/item/device/lightreplacer))
@@ -390,7 +390,7 @@
else if(status != LIGHT_BROKEN && status != LIGHT_EMPTY)
user.do_attack_animation(src)
if(prob(1+W.force * 5))
user << "You hit the light, and it smashes!"
@@ -405,7 +405,7 @@
broken()
else
user << "You hit the light!"
user.visible_message("<span class='danger'>[user.name] hits the light.</span>")
// attempt to stick weapon into light socket
else if(status == LIGHT_EMPTY)
@@ -471,8 +471,8 @@
user << "\green That object is useless to you."
return
else if (status == LIGHT_OK||status == LIGHT_BURNED)
for(var/mob/M in viewers(src))
M.show_message("\red [user.name] smashed the light!", 3, "You hear a tinkle of breaking glass", 2)
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
@@ -482,8 +482,8 @@
M << "\red That object is useless to you."
return
else if (status == LIGHT_OK||status == LIGHT_BURNED)
for(var/mob/O in viewers(src))
O.show_message("\red [M.name] smashed the light!", 3, "You hear a tinkle of breaking glass", 2)
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
// attack with hand - remove tube/bulb
+8
View File
@@ -238,6 +238,14 @@
return
*/
interact(user, 0)
// hostile mob escape from disposals
attack_animal(var/mob/living/simple_animal/M)
if(M.environment_smash)
M.do_attack_animation(src)
visible_message("<span class='danger'>[M.name] smashes \the [src] apart!</span>")
qdel(src)
return
// user interaction
interact(mob/user, var/ai=0)