// Contains: // - Teleportation scroll // - Staves // - Magic mirror /////////////////////////////////////////////////// Teleportation scroll /////////////////////////////////// /obj/item/teleportation_scroll name = "Teleportation Scroll" icon = 'icons/obj/wizard.dmi' icon_state = "scroll_seal" var/uses = 4.0 flags = FPRINT | TABLEPASS w_class = 2.0 item_state = "paper" throw_speed = 4 throw_range = 20 desc = "This isn't that old, you just spilled mugwort tea on it the other day." /obj/item/teleportation_scroll/attack_self(mob/user as mob) user.machine = src var/dat = "" if (!iswizard(user)) user.machine = null boutput(user, "The text is illegible!") return if (!src.uses) boutput(user, "The depleted scroll vanishes in a puff of smoke!") user.machine = null user.Browse(null,"window=scroll") qdel(src) return dat += "Teleportation Scroll:

" dat += "Charges left: [src.uses]


" dat += "Teleport


" user.Browse(dat,"window=scroll") onclose(user, "scroll") return /obj/item/teleportation_scroll/Topic(href, href_list) ..() if (usr.getStatusDuration("paralysis") || !isalive(usr) || usr.restrained()) return var/mob/living/carbon/human/H = usr if (!( ishuman(H))) return 1 if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf)))) usr.machine = src if (href_list["spell_teleport"]) if (src.uses >= 1 && usr.teleportscroll(0, 1, src) == 1) src.uses -= 1 if (ismob(src.loc)) attack_self(src.loc) else for(var/mob/M in viewers(1, src)) if (M.client) src.attack_self(M) return ////////////////////////////////////////////////////// Staves ///////////////////////////////////////////////////// /obj/item/staff name = "wizard's staff" desc = "A magical staff used for channeling spells. It's got a little crystal ball on the end." icon = 'icons/obj/wizard.dmi' inhand_image_icon = 'icons/mob/inhand/hand_weapons.dmi' icon_state = "staff" item_state = "staff" force = 3.0 throwforce = 5.0 throw_speed = 1 throw_range = 5 w_class = 2.0 flags = FPRINT | TABLEPASS | NOSHIELD object_flags = NO_ARM_ATTACH var/wizard_key = "" // The owner of this staff. handle_other_remove(var/mob/source, var/mob/living/carbon/human/target) . = ..() if (prob(75)) source.show_message(text("\The [src] just barely slips out of your grip!"), 1) . = 0 // Part of the parent for convenience. proc/do_brainmelt(var/mob/affected_mob, var/severity = 2) if (!src || !istype(src) || !affected_mob || !ismob(affected_mob) || check_target_immunity(affected_mob)) return switch (severity) if (0) affected_mob.visible_message("[affected_mob] is knocked off-balance by the curse upon [src]!") affected_mob.do_disorient(30, weakened = 1 SECOND, stunned = 0, disorient = 1 SECOND, remove_stamina_below_zero = 0) affected_mob.stuttering += 2 affected_mob.take_brain_damage(2) if (1) affected_mob.visible_message("[affected_mob]'s consciousness is overwhelmed by the curse upon [src]!") affected_mob.show_text("Horrible visions of depravity and terror flood your mind!", "red") if (prob(50)) affected_mob.emote("scream") affected_mob.do_disorient(80, weakened = 5 SECONDS, stunned = 0, paralysis = 2 SECONDS, disorient = 2 SECONDS, remove_stamina_below_zero = 0) affected_mob.stuttering += 10 affected_mob.take_brain_damage(6) else var/datum/effects/system/spark_spread/s = unpool(/datum/effects/system/spark_spread) s.set_up(4, 1, affected_mob) s.start() affected_mob.visible_message("The curse upon [src] rebukes [affected_mob]!") boutput(affected_mob, "Horrible visions of depravity and terror flood your mind!") affected_mob.emote("scream") affected_mob.changeStatus("paralysis", 80) affected_mob.changeStatus("stunned", 10 SECONDS) affected_mob.stuttering += 20 affected_mob.take_brain_damage(25) return // Used by /datum/targetable/spell/summon_staff. Exposed for convenience (Convair880). proc/send_staff_to_target_mob(var/mob/living/M) if (!src || !istype(src) || !M || !istype(M)) return src.visible_message("The [src.name] is suddenly warped away!") var/datum/effects/system/spark_spread/s = unpool(/datum/effects/system/spark_spread) s.set_up(4, 1, get_turf(src)) s.start() if (ismob(src.loc)) var/mob/HH = src.loc HH.u_equip(src) if (istype(src.loc, /obj/item/storage)) var/obj/item/storage/S_temp = src.loc var/datum/hud/storage/H_temp = S_temp.hud H_temp.remove_object(src) src.set_loc(get_turf(M)) if (!M.put_in_hand(src)) M.show_text("Staff summoned successfully. You can find it on the floor at your current location.", "blue") else M.show_text("Staff summoned successfully. You can find it in your hand.", "blue") return /obj/item/staff/crystal // goes with Gannets' purple wizard robes - it looks different, and that's about it :I (always b fabulous) desc = "A magical staff used for channeling spells. It's got a big crystal on the end." icon_state = "staff_crystal" item_state = "staff_crystal" /obj/item/staff/cthulhu name = "staff of cthulhu" desc = "A dark staff infused with eldritch power. Trying to steal this is probably a bad idea." icon_state = "staffcthulhu" item_state = "staffcthulhu" force = 14 hitsound = 'sound/effects/ghost2.ogg' attack_hand(var/mob/user as mob) if (user.mind) if (iswizard(user) || check_target_immunity(user)) if (user.mind.key != src.wizard_key && !check_target_immunity(user)) boutput(user, "The [src.name] is magically attuned to another wizard! You can use it, but the staff will refuse your attempts to control or summon it.") ..() return else src.do_brainmelt(user, 2) return else ..() attack(mob/M as mob, mob/user as mob) if (iswizard(user) && !iswizard(M) && !isdead(M) && !check_target_immunity(M)) if (prob(20)) src.do_brainmelt(M, 1) else if (prob(35)) src.do_brainmelt(M, 0) ..() return pull() set src in oview(1) set category = "Local" var/mob/living/user = usr if(check_target_immunity(user)) return ..() if (!istype(user)) return if (iswizard(user)) return ..() else src.do_brainmelt(user, 2) return /////////////////////////////////////////////////////////// Magic mirror ///////////////////////////////////////////// /obj/magicmirror desc = "An old mirror. A bit eeky and ooky." name = "Magic Mirror" icon = 'icons/obj/decals.dmi' icon_state = "rip" anchored = 1.0 opacity = 0 density = 0 get_desc(dist) if (!iswizard(usr)) return "There's nothing special about it." var/T = null var/W_count = 0 T = "Dark ritual of all wizards:" // Teamwork, perhaps? The M.is_target check that used to be here doesn't cut it in the mixed game mode (Convair880). for (var/datum/mind/M in ticker.minds) if (M && M.special_role == "wizard" && M.current) W_count++ T += "
" T += "[M.current.real_name]'s objectives:" var/i = 1 for (var/datum/objective/O in M.objectives) if (istype(O, /datum/objective/crew) || istype(O, /datum/objective/miscreant)) continue T += "
#[i]: [O.explanation_text]" i++ if (W_count <= 0) return "There's nothing special about it." return T /*var/corrupt = 0 var/count = 0 for(var/turf/simulated/floor/T in world) LAGCHECK(LAG_LOW) if(T.z != 1) continue count++ if(T.loc:corrupted) corrupt++ var/percentage percentage = (corrupt / count) * 100 if (corrupt >= 2100) . += "
The Corruption is at [percentage]%!" else . += "
The Corruption is at [percentage]%!"*/