From 032557fa21bcfbd6e74e0910bf37af38385bbef4 Mon Sep 17 00:00:00 2001 From: Kyep Date: Tue, 28 Aug 2018 17:23:27 -0700 Subject: [PATCH] Fixes #7089 plus other bugs with spider obj attacks --- code/game/objects/effects/spiders.dm | 23 ++++++++++++++++--- .../hostile/terror_spiders/terror_spiders.dm | 4 ++-- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index 29abbef2d76..f6f42554b08 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -29,16 +29,33 @@ visible_message("[user] has [pick(W.attack_verb)] [src] with [W]!") else visible_message("[user] has attacked [src] with [W]!") - 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("\The [M] [M.attacktext] [src]!") + 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("[M] has slashed at [src]!", "[M] has slashed at [src]!") + M.changeNext_move(CLICK_CD_MELEE) + M.do_attack_animation(src) + var/damage = rand(10, 20) health -= damage healthcheck() diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm index 693ca724ac6..b5d0a100ae3 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm @@ -171,8 +171,8 @@ var/global/list/ts_spiderling_list = list() visible_message("[src] harmlessly nuzzles [target].") T.CheckFaction() CheckFaction() - else if(istype(target, /obj/structure/spider/cocoon)) - to_chat(src, "Destroying our own cocoons would not help us.") + else if(istype(target, /obj/structure/spider)) // Prevents destroying coccoons (exploit), eggs (horrible misclick), etc + to_chat(src, "Destroying things created by fellow spiders would not help us.") else if(istype(target, /obj/machinery/door/firedoor)) var/obj/machinery/door/firedoor/F = target if(F.density)