Melee attack for mechs

This commit is contained in:
Markolie
2014-11-22 06:05:13 +01:00
parent 9bd63e8c84
commit 107325bb43
13 changed files with 147 additions and 254 deletions
+6 -1
View File
@@ -110,7 +110,12 @@
health -= M.melee_damage_upper
healthcheck()
return
/obj/structure/grille/mech_melee_attack(obj/mecha/M)
if(..())
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
health -= M.force * 0.5
healthcheck()
/obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0)) return 1
+5
View File
@@ -313,6 +313,11 @@ var/global/wcColored
..()
return
/obj/structure/window/mech_melee_attack(obj/mecha/M)
if(..())
hit(M.force, 1)
/obj/structure/window/proc/hit(var/damage, var/sound_effect = 1)
if(reinf) damage *= 0.5
health = max(0, health - damage)