/obj/item/projectile/magic name = "bolt of nothing" icon_state = "energy" damage = 0 damage_type = OXY nodamage = 1 armour_penetration_percentage = 100 flag = MAGIC /obj/item/projectile/magic/death name = "bolt of death" icon_state = null hitscan = TRUE muzzle_type = /obj/effect/projectile/muzzle/death tracer_type = /obj/effect/projectile/tracer/death impact_type = /obj/effect/projectile/impact/death hitscan_light_intensity = 3 hitscan_light_range = 0.75 hitscan_light_color_override = LIGHT_COLOR_PURPLE muzzle_flash_intensity = 6 muzzle_flash_range = 2 muzzle_flash_color_override = LIGHT_COLOR_PURPLE impact_light_intensity = 7 impact_light_range = 2.5 impact_light_color_override = LIGHT_COLOR_PURPLE /obj/item/projectile/magic/fireball name = "bolt of fireball" icon_state = "fireball" damage = 10 damage_type = BRUTE nodamage = 0 //explosion values var/exp_devastate = -1 var/exp_heavy = 0 var/exp_light = 2 var/exp_flash = 3 var/exp_fire = 2 /obj/item/projectile/magic/death/on_hit(mob/living/carbon/target) . = ..() if(isliving(target)) if(target.mob_biotypes & MOB_UNDEAD) //negative energy heals the undead if(target.revive()) target.grab_ghost(force = TRUE) // even suicides to_chat(target, "You rise with a start, you're undead!!!") else if(target.stat != DEAD) to_chat(target, "You feel great!") return if(ismachineperson(target) || issilicon(target)) //speshul snowfleks deserv speshul treetment target.adjustFireLoss(6969) //remember - slimes love fire target.death(FALSE) target.visible_message("[target] topples backwards as the death bolt impacts [target.p_them()]!") /obj/item/projectile/magic/fireball/Range() var/turf/T1 = get_step(src,turn(dir, -45)) var/turf/T2 = get_step(src,turn(dir, 45)) var/turf/T3 = get_step(src,dir) var/mob/living/L = locate(/mob/living) in T1 //if there's a mob alive in our front right diagonal, we hit it. if(L && L.stat != DEAD) Bump(L) //Magic Bullet #teachthecontroversy return L = locate(/mob/living) in T2 if(L && L.stat != DEAD) Bump(L) return L = locate(/mob/living) in T3 if(L && L.stat != DEAD) Bump(L) return ..() /obj/item/projectile/magic/fireball/on_hit(target) . = ..() var/turf/T = get_turf(target) explosion(T, exp_devastate, exp_heavy, exp_light, exp_flash, 0, flame_range = exp_fire) if(ismob(target)) //multiple flavors of pain var/mob/living/M = target M.take_overall_damage(0,10) //between this 10 burn, the 10 brute, the explosion brute, and the onfire burn, your at about 65 damage if you stop drop and roll immediately /obj/item/projectile/magic/fireball/infernal name = "infernal fireball" exp_heavy = -1 exp_light = -1 exp_flash = 4 exp_fire= 5 /obj/item/projectile/magic/resurrection name = "bolt of resurrection" icon_state = "ion" /obj/item/projectile/magic/resurrection/on_hit(mob/living/carbon/target) . = ..() if(ismob(target)) if(target.mob_biotypes & MOB_UNDEAD) //positive energy harms the undead target.death(FALSE) target.visible_message("[target] topples backwards as the death bolt impacts [target.p_them()]!") else var/old_stat = target.stat target.suiciding = FALSE target.revive() if(!target.ckey) for(var/mob/dead/observer/ghost in GLOB.player_list) if(target.real_name == ghost.real_name) ghost.reenter_corpse() break if(old_stat != DEAD) to_chat(target, "You feel great!") else to_chat(target, "You rise with a start, you're alive!!!") /obj/item/projectile/magic/teleport name = "bolt of teleportation" icon_state = "bluespace" var/inner_tele_radius = 0 var/outer_tele_radius = 6 /obj/item/projectile/magic/teleport/on_hit(mob/target) . = ..() var/teleammount = 0 var/teleloc = target if(!isturf(target)) teleloc = target.loc for(var/atom/movable/stuff in teleloc) if(!stuff.anchored && stuff.loc) teleammount++ do_teleport(stuff, stuff, 10) var/datum/effect_system/smoke_spread/smoke = new smoke.set_up(max(round(10 - teleammount), 1), FALSE, stuff) //Smoke drops off if a lot of stuff is moved for the sake of sanity smoke.start() /obj/item/projectile/magic/door name = "bolt of door creation" icon_state = "energy" var/list/door_types = list(/obj/structure/mineral_door/wood,/obj/structure/mineral_door/iron,/obj/structure/mineral_door/silver,\ /obj/structure/mineral_door/gold,/obj/structure/mineral_door/uranium,/obj/structure/mineral_door/sandstone,/obj/structure/mineral_door/transparent/plasma,\ /obj/structure/mineral_door/transparent/diamond) /obj/item/projectile/magic/door/on_hit(atom/target) . = ..() var/atom/T = target.loc if(isturf(target) && target.density) if(!(istype(target, /turf/simulated/wall/indestructible))) CreateDoor(target) else if(isturf(T) && T.density) if(!(istype(T, /turf/simulated/wall/indestructible))) CreateDoor(T) else if(istype(target, /obj/machinery/door)) OpenDoor(target) else if(istype(target, /obj/structure/closet)) OpenCloset(target) /obj/item/projectile/magic/door/proc/CreateDoor(turf/T) var/door_type = pick(door_types) var/obj/structure/mineral_door/D = new door_type(T) T.ChangeTurf(/turf/simulated/floor/plasteel) D.operate() /obj/item/projectile/magic/door/proc/OpenDoor(obj/machinery/door/D) if(istype(D,/obj/machinery/door/airlock)) var/obj/machinery/door/airlock/A = D A.locked = FALSE D.open() /obj/item/projectile/magic/door/proc/OpenCloset(obj/structure/closet/C) if(istype(C, /obj/structure/closet/secure_closet)) var/obj/structure/closet/secure_closet/SC = C SC.locked = FALSE C.open() /obj/item/projectile/magic/change name = "bolt of change" icon_state = "ice_1" damage_type = BURN /obj/item/projectile/magic/change/on_hit(atom/change) . = ..() wabbajack(change) /proc/wabbajack(mob/living/M, force_borg = FALSE, force_animal = FALSE) if(istype(M) && M.stat != DEAD && !M.notransform) M.notransform = TRUE M.icon = null M.overlays.Cut() M.invisibility = 101 if(isrobot(M)) var/mob/living/silicon/robot/Robot = M QDEL_NULL(Robot.mmi) Robot.notify_ai(1) else if(ishuman(M)) var/mob/living/carbon/human/H = M // Make sure there are no organs or limbs to drop for(var/t in H.bodyparts) qdel(t) for(var/i in H.internal_organs) qdel(i) for(var/obj/item/W in M) M.unEquip(W, 1) qdel(W) var/mob/living/new_mob var/randomize = pick("robot", "slime", "xeno", "human", "animal") if(force_borg) randomize = "robot" if(force_animal) randomize = "animal" switch(randomize) if("robot") var/path if(prob(30)) path = pick(typesof(/mob/living/silicon/robot/syndicate)) new_mob = new path(M.loc) else new_mob = new /mob/living/silicon/robot(M.loc) new_mob.gender = M.gender new_mob.invisibility = 0 new_mob.job = "Cyborg" var/mob/living/silicon/robot/Robot = new_mob Robot.mmi = new /obj/item/mmi(new_mob) Robot.lawupdate = FALSE Robot.disconnect_from_ai() Robot.clear_inherent_laws() Robot.clear_zeroth_law() if(ishuman(M)) Robot.mmi.transfer_identity(M) //Does not transfer key/client. if("slime") new_mob = new /mob/living/simple_animal/slime/random(M.loc) new_mob.universal_speak = TRUE if("xeno") if(prob(50)) new_mob = new /mob/living/carbon/alien/humanoid/hunter(M.loc) else new_mob = new /mob/living/carbon/alien/humanoid/sentinel(M.loc) new_mob.universal_speak = TRUE to_chat(M, "Your consciousness is subsumed by a distant hivemind... you feel murderous hostility towards non-xenomorph life!") if("animal") if(prob(50)) var/beast = pick("carp","bear","mushroom","statue", "bat", "goat", "tomato", "gorilla") switch(beast) if("carp") new_mob = new /mob/living/simple_animal/hostile/carp(M.loc) if("bear") new_mob = new /mob/living/simple_animal/hostile/bear(M.loc) if("mushroom") new_mob = new /mob/living/simple_animal/hostile/mushroom(M.loc) if("statue") new_mob = new /mob/living/simple_animal/hostile/statue(M.loc) if("bat") new_mob = new /mob/living/simple_animal/hostile/scarybat(M.loc) if("goat") new_mob = new /mob/living/simple_animal/hostile/retaliate/goat(M.loc) if("tomato") new_mob = new /mob/living/simple_animal/hostile/killertomato(M.loc) if("gorilla") new_mob = new /mob/living/simple_animal/hostile/gorilla(M.loc) else var/animal = pick("parrot", "corgi", "crab", "pug", "cat", "mouse", "chicken", "cow", "lizard", "chick", "fox") switch(animal) if("parrot") new_mob = new /mob/living/simple_animal/parrot(M.loc) if("corgi") new_mob = new /mob/living/simple_animal/pet/dog/corgi(M.loc) if("crab") new_mob = new /mob/living/simple_animal/crab(M.loc) if("cat") new_mob = new /mob/living/simple_animal/pet/cat(M.loc) if("mouse") new_mob = new /mob/living/simple_animal/mouse(M.loc) if("chicken") new_mob = new /mob/living/simple_animal/chicken(M.loc) if("cow") new_mob = new /mob/living/simple_animal/cow(M.loc) if("lizard") new_mob = new /mob/living/simple_animal/lizard(M.loc) if("fox") new_mob = new /mob/living/simple_animal/pet/dog/fox(M.loc) else new_mob = new /mob/living/simple_animal/chick(M.loc) new_mob.universal_speak = TRUE if("human") new_mob = new /mob/living/carbon/human(M.loc) var/mob/living/carbon/human/H = new_mob var/datum/character_save/S = new //Randomize appearance for the human S.species = get_random_species(TRUE) S.randomise() S.copy_to(new_mob) randomize = H.dna.species.name else return M.create_attack_log("[key_name(M)] became [new_mob.real_name].") add_attack_logs(M, M, "became [new_mob.real_name]", ATKLOG_ALL) new_mob.a_intent = INTENT_HARM if(M.mind) M.mind.transfer_to(new_mob) else new_mob.attack_log_old = M.attack_log_old.Copy() new_mob.key = M.key to_chat(new_mob, "Your form morphs into that of a [randomize].") qdel(M) return new_mob /obj/item/projectile/magic/animate name = "bolt of animation" icon_state = "red_1" damage_type = BURN /obj/item/projectile/magic/animate/Bump(atom/change) if(isitem(change) || isstructure(change) && !is_type_in_list(change, GLOB.protected_objects)) if(istype(change, /obj/structure/closet/statue)) for(var/mob/living/carbon/human/H in change.contents) var/mob/living/simple_animal/hostile/statue/S = new /mob/living/simple_animal/hostile/statue(change.loc, firer) S.name = "statue of [H.name]" S.faction = list("\ref[firer]") S.icon = change.icon if(H.mind) H.mind.transfer_to(S) to_chat(S, "You are an animated statue. You cannot move when monitored, but are nearly invincible and deadly when unobserved!") to_chat(S, "Do not harm [firer.name], your creator.") H = change H.loc = S qdel(src) else var/obj/O = change if(istype(O, /obj/item/gun)) new /mob/living/simple_animal/hostile/mimic/copy/ranged(O.loc, O, firer) else new /mob/living/simple_animal/hostile/mimic/copy(O.loc, O, firer) else if(istype(change, /mob/living/simple_animal/hostile/mimic/copy)) // Change our allegiance! var/mob/living/simple_animal/hostile/mimic/copy/C = change C.ChangeOwner(firer) return ..() /obj/item/projectile/magic/slipping name = "magical banana" icon = 'icons/obj/hydroponics/harvest.dmi' icon_state = "banana" var/slip_stun = 10 SECONDS var/slip_weaken = 10 SECONDS hitsound = 'sound/items/bikehorn.ogg' /obj/item/projectile/magic/slipping/New() ..() SpinAnimation() /obj/item/projectile/magic/slipping/on_hit(atom/target, blocked = 0) if(ishuman(target)) var/mob/living/carbon/human/H = target H.slip(src, slip_weaken, 0, FALSE, TRUE) //Slips even with noslips/magboots on. NO ESCAPE! else if(isrobot(target)) //You think you're safe, cyborg? FOOL! var/mob/living/silicon/robot/R = target if(!R.incapacitated()) to_chat(target, "You get splatted by [src], HONKING your sensors!") R.Stun(slip_stun) else if(isliving(target)) var/mob/living/L = target if(!L.IsStunned()) to_chat(target, "You get splatted by [src].") L.Weaken(slip_weaken) L.Stun(slip_stun) . = ..() /obj/item/projectile/magic/arcane_barrage name = "arcane bolt" icon_state = "arcane_barrage" damage = 20 damage_type = BURN nodamage = FALSE armour_penetration_flat = 0 flag = MAGIC hitsound = 'sound/weapons/barragespellhit.ogg'