/* * Acid */ /obj/effect/acid name = "acid" desc = "Burbling corrosive stuff. Probably a bad idea to roll around in it." icon_state = "acid" icon = 'icons/mob/npc/alien.dmi' density = 0 opacity = 0 anchored = 1 var/atom/target var/ticks = 0 var/target_strength = 0 /obj/effect/acid/New(loc, supplied_target) ..(loc) target = supplied_target if(isturf(target)) // Turf take twice as long to take down. target_strength = 8 else target_strength = 4 tick() /obj/effect/acid/proc/tick() if(!target) qdel(src) ticks++ if(ticks >= target_strength) target.visible_message("\The [target] collapses under its own weight into a puddle of goop and undigested debris!") if(istype(target, /turf/simulated/wall)) // I hate turf code. var/turf/simulated/wall/W = target W.dismantle_wall(1) else if(istype(target, /turf/simulated/floor)) var/turf/simulated/floor/F = target F.ChangeTurf(F.baseturf) else qdel(target) qdel(src) return switch(target_strength - ticks) if(6) visible_message("\The [src.target] is holding up against the acid!") if(4) visible_message("\The [src.target]\s structure is being melted by the acid!") if(2) visible_message("\The [src.target] is struggling to withstand the acid!") if(0 to 1) visible_message("\The [src.target] begins to crumble under the acid!") addtimer(CALLBACK(src, .proc/tick), rand(150, 200))