Fixes #7089 plus other bugs with spider obj attacks

This commit is contained in:
Kyep
2018-08-28 17:25:12 -07:00
parent 350db19979
commit 032557fa21
2 changed files with 22 additions and 5 deletions
+20 -3
View File
@@ -29,16 +29,33 @@
visible_message("<span class='danger'>[user] has [pick(W.attack_verb)] [src] with [W]!</span>")
else
visible_message("<span class='danger'>[user] has attacked [src] with [W]!</span>")
var/damage = W.force / 4
if(iswelder(W))
var/obj/item/weldingtool/WT = W
if(WT.remove_fuel(0, user))
damage = 15
playsound(loc, WT.usesound, 100, 1)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
health -= damage
healthcheck()
/obj/structure/spider/attack_animal(mob/living/simple_animal/M)
if(M.melee_damage_upper == 0)
return
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
M.changeNext_move(CLICK_CD_MELEE)
M.do_attack_animation(src)
visible_message("<span class='danger'>\The [M] [M.attacktext] [src]!</span>")
health -= damage
healthcheck()
/obj/structure/spider/attack_alien(mob/living/carbon/alien/humanoid/M)
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has slashed at [src]!</span>", "<span class='userdanger'>[M] has slashed at [src]!</span>")
M.changeNext_move(CLICK_CD_MELEE)
M.do_attack_animation(src)
var/damage = rand(10, 20)
health -= damage
healthcheck()