/obj/item/projectile/gravitywell name = "gravity impulse" icon = 'icons/obj/projectiles_experimental.dmi' icon_state = "gravitywell" damage = 0 nodamage = 1 phase_type = PROJREACT_WALLS|PROJREACT_WINDOWS|PROJREACT_OBJS|PROJREACT_MOBS|PROJREACT_MOBS|PROJREACT_BLOB penetration = -1 fire_sound = 'sound/weapons/wave.ogg' /obj/item/projectile/gravitywell/bresenham_step(var/distA, var/distB, var/dA, var/dB) if(..()) return 2 else return 0 /obj/item/projectile/gravitywell/to_bump(atom/A as mob|obj|turf|area) if(loc == target) spawnGravityWell() if(isliving(A)) var/mob/living/M = A M.Knockdown(5) M.Stun(5) forceMove(get_step(loc,dir)) if(loc == target) spawnGravityWell() /obj/item/projectile/gravitywell/proc/spawnGravityWell() kill_count = 0 log_admin("\[[time_stamp()]\] [key_name(firer)] has created a gravity well at ([loc.x],[loc.y],[loc.z])") message_admins("\[[time_stamp()]\] [key_name(firer)] has created a gravity well at (([loc.x],[loc.y],[loc.z]))", 1) new/obj/effect/overlay/gravitywell(loc) bullet_die() /obj/item/projectile/gravitywell/bump_original_check()//so players can aim at floors if(!bumped) if(loc == get_turf(original)) if(!(original in permutated)) to_bump(original) /obj/item/projectile/gravitywell/cultify() return /obj/item/projectile/gravitywell/singularity_act(var/current_size,var/obj/machinery/singularity/S) src.forceMove(S.loc) spawnGravityWell() return /obj/effect/overlay/gravitywell name = "gravity well" icon = 'icons/effects/160x160.dmi' icon_state = "gravitywell_shadow" pixel_x = -64 * PIXEL_MULTIPLIER pixel_y = -64 * PIXEL_MULTIPLIER density = 0 layer = DECAL_LAYER anchored = 1 alpha = 255 mouse_opacity = 0 var/size = 2 var/xp = 6 var/xlevel = 4 var/obj/effect/overlay/gravitygrid/GG = null /obj/effect/overlay/gravitywell/New() ..() GG = new(loc) playsound(loc, 'sound/weapons/emp.ogg', 75, 1) animate(GG, alpha = 255, time = 10, easing = SINE_EASING) spawn() Pulse() overlays += image(icon,"gravitywell_shadow",2.1) /obj/effect/overlay/gravitywell/Destroy() if(GG) qdel(GG) ..() /obj/effect/overlay/gravitywell/proc/Pulse() xp-- if(xp <= 0) xp = 6 xlevel-- if(xlevel <= -4) empulse(loc,size,size+2) if(locate(/obj/machinery/the_singularitygen/) in loc) new/obj/machinery/singularity(loc)//How evil can one man be? qdel(src) return else if(xlevel > 0) size++ if(GG) GG.LevelUp() src.transform *= (size*2+1)/((size-1)*2+1) var/outter_size = round(size+1) for(var/atom/A in range(src,outter_size)) var/dist = get_dist_euclidian(src,A) var/pull_force = size/max(1,round(dist)) if(istype(A,/atom/movable) && (size >= 4) && (get_dist(src,A) == 1)) A.singularity_pull(src, (pull_force * 3), 0, 1) var/atom/movable/AM = A if (z != map.zCentcomm || emergency_shuttle.location == 2)//preventing exploits, unless the round is over AM.forceMove(loc)//KATAMARI DAMACYYyyYYyyYY else if(get_dist(src,A) >= 1) if(dist <= size) A.singularity_pull(src, (pull_force * 3), 0, 1) if(istype(A,/mob/living)) var/mob/living/M = A M.take_overall_damage(5,0) to_chat(M, "\The [src]'s tidal force rips your skin!") for(var/mob/living/L in loc)//standing right in the center of the gravity well means double damage if((L.stat == DEAD) && prob(5)) L.gib() L.take_overall_damage(3,0)//less brute damage in the center, but the radiations caused by singularity_pull make up for it. to_chat(L, "\The [src]'s tidal force is crushing you!") sleep(10) Pulse() /obj/effect/overlay/gravitygrid name = "gravity well" icon = 'icons/effects/160x160.dmi' icon_state = "gravitywell_white" pixel_x = -64 * PIXEL_MULTIPLIER pixel_y = -64 * PIXEL_MULTIPLIER density = 0 plane = EFFECTS_PLANE layer = GRAVITYGRID_LAYER anchored = 1 color = "green" alpha = 0 mouse_opacity = 0 var/obj/effect/overlay/gravitygrid/GG = null var/size = 5 /obj/effect/overlay/gravitygrid/Destroy() if(GG) qdel(GG)//NO RE ..() /obj/effect/overlay/gravitygrid/proc/LevelUp() if(!GG) GG = new(loc) GG.layer = layer-0.0001 GG.size = size+2 GG.alpha = 255 GG.transform *= size/5 var/matrix/M = matrix() M.Scale((size/5)*(GG.size/size),(size/5)*(GG.size/size)) animate(GG, transform = M, time = 10) else GG.LevelUp() var/newcolor = null switch(color) if("#00c000") newcolor = "#ffa500" if("#ffa500") newcolor = "#ff0000" else newcolor = "#800080" animate(src, color = newcolor, time = 10)