From 81e9de94afd8dff06dd0872eee5aa6faac12be24 Mon Sep 17 00:00:00 2001 From: veganzombeh Date: Thu, 10 Sep 2015 23:27:17 +0100 Subject: [PATCH] Machine/device mimic EMP --- .../mob/living/simple_animal/hostile/mimic.dm | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm index 78b669e2047..b7a3d10f08d 100644 --- a/code/modules/mob/living/simple_animal/hostile/mimic.dm +++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm @@ -36,6 +36,8 @@ faction = list("mimic") move_to_delay = 9 + var/is_electronic = 0 + /mob/living/simple_animal/hostile/mimic/FindTarget() . = ..() if(.) @@ -47,7 +49,14 @@ ghostize() qdel(src) - +/mob/living/simple_animal/hostile/mimic/emp_act(severity) + if(is_electronic) + switch(severity) + if(1) + Die() + if(2) + adjustBruteLoss(50) + ..() // // Crate Mimic @@ -181,7 +190,15 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca icon_living = icon_state overlays = O.overlays - if(istype(O, /obj/structure) || istype(O, /obj/machinery)) + if(istype(O, /obj/structure)) + health = (anchored * 50) + 50 + destroy_objects = 1 + if(O.density && O.anchored) + knockdown_people = 1 + melee_damage_lower *= 2 + melee_damage_upper *= 2 + else if(istype(O, /obj/machinery)) + is_electronic = 1 health = (anchored * 50) + 50 destroy_objects = 1 if(O.density && O.anchored) @@ -194,6 +211,8 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca melee_damage_lower = 2 + I.force melee_damage_upper = 2 + I.force move_to_delay = 2 * I.w_class + 1 + if(istype(O, /obj/item/device)) + is_electronic = 1 maxHealth = health if(creator)