Recoded the spellbook. Should fix the bug which stopped the staff of animation spawning, and prevent similar bugs in the future.

Moved the spellbook define into spellbook.dm, in the wizard gamemode folder.

Moved the old spells.dm to unused.

Added some new guns to summon guns.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5549 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
petethegoat@gmail.com
2013-01-14 20:17:04 +00:00
parent f6078aba78
commit 4e022a9b45
5 changed files with 165 additions and 152 deletions

View File

@@ -17,7 +17,7 @@
for(var/datum/objective/OBJ in H.mind.objectives)
H << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]"
obj_count++
var/randomize = pick("taser","egun","laser","revolver","smg","nuclear","deagle","gyrojet","pulse","silenced","cannon","shotgun","mateba","uzi","crossbow","saw")
var/randomize = pick("taser","egun","laser","revolver","detective","smg","nuclear","deagle","gyrojet","pulse","silenced","cannon","doublebarrel","shotgun","combatshotgun","mateba","smg","uzi","crossbow","saw")
switch (randomize)
if("taser")
new /obj/item/weapon/gun/energy/taser(get_turf(H))
@@ -27,6 +27,8 @@
new /obj/item/weapon/gun/energy/laser(get_turf(H))
if("revolver")
new /obj/item/weapon/gun/projectile(get_turf(H))
if("detective")
new /obj/item/weapon/gun/projectile/detective(get_turf(H))
if("smg")
new /obj/item/weapon/gun/projectile/automatic/c20r(get_turf(H))
if("nuclear")
@@ -38,13 +40,20 @@
if("pulse")
new /obj/item/weapon/gun/energy/pulse_rifle(get_turf(H))
if("silenced")
new /obj/item/weapon/gun/projectile/silenced(get_turf(H))
new /obj/item/weapon/gun/projectile/pistol(get_turf(H))
new /obj/item/weapon/silencer(get_turf(H))
if("cannon")
new /obj/item/weapon/gun/energy/lasercannon(get_turf(H))
if("doublebarrel")
new /obj/item/weapon/gun/projectile/shotgun/pump/(get_turf(H))
if("shotgun")
new /obj/item/weapon/gun/projectile/shotgun/pump/(get_turf(H))
if("combatshotgun")
new /obj/item/weapon/gun/projectile/shotgun/pump/combat(get_turf(H))
if("mateba")
new /obj/item/weapon/gun/projectile/mateba(get_turf(H))
if("smg")
new /obj/item/weapon/gun/projectile/automatic(get_turf(H))
if("uzi")
new /obj/item/weapon/gun/projectile/automatic/mini_uzi(get_turf(H))
if("crossbow")

View File

@@ -1,172 +1,189 @@
/obj/item/weapon/spellbook
name = "spell book"
desc = "The legendary book of spells of the wizard."
icon = 'icons/obj/library.dmi'
icon_state ="book"
throw_speed = 1
throw_range = 5
w_class = 1.0
flags = FPRINT | TABLEPASS
var/uses = 5
var/temp = null
var/max_uses = 5
var/op = 1
//SPELL BOOK PROCS
/obj/item/weapon/spellbook/attack_self(mob/user as mob)
user.set_machine(src)
var/dat
if (src.temp)
dat = "[src.temp]<BR><BR><A href='byond://?src=\ref[src];temp=1'>Clear</A>"
if(temp)
dat = "[temp]<BR><BR><A href='byond://?src=\ref[src];temp=1'>Clear</A>"
else
dat = "<B>The Book of Spells:</B><BR>"
dat += "Spells left to memorize: [src.uses]<BR>"
dat += "Spells left to memorize: [uses]<BR>"
dat += "<HR>"
dat += "<B>Memorize which spell:</B><BR>"
dat += "<I>The number after the spell name is the cooldown time.</I><BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=1'>Magic Missile</A> (10)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=2'>Fireball</A> (10)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=3'>Disintegrate</A> (60)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=4'>Disable Technology</A> (60)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=5'>Smoke</A> (10)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=6'>Blind</A> (30)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=7'>Mind Transfer</A> (60)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=8'>Forcewall</A> (10)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=9'>Blink</A> (2)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=10'>Teleport</A> (60)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=11'>Mutate</A> (60)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=12'>Ethereal Jaunt</A> (60)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=13'>Knock</A> (10)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=14'>Curse of the Horseman</A> (15)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=magicmissile'>Magic Missile</A> (10)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=fireball'>Fireball</A> (10)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=disintegrate'>Disintegrate</A> (60)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=disabletech'>Disable Technology</A> (60)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=smoke'>Smoke</A> (10)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=blind'>Blind</A> (30)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=mindswap'>Mind Transfer</A> (60)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=forcewall'>Forcewall</A> (10)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=blink'>Blink</A> (2)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=teleport'>Teleport</A> (60)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=mutate'>Mutate</A> (60)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=etherealjaunt'>Ethereal Jaunt</A> (60)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=knock'>Knock</A> (10)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=horseman'>Curse of the Horseman</A> (15)<BR>"
if(op)
dat += "<A href='byond://?src=\ref[src];spell_choice=15'>Summon Guns</A> (One time use, global spell)<BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=summonguns'>Summon Guns</A> (One time use, global spell)<BR>"
dat += "<HR>"
dat += "<B>Artefacts:</B><BR>"
dat += "Powerful items imbued with eldritch magics. Summoning one will count towards your maximum number of spells.<BR>"
dat += "It is recommended that only experienced wizards attempt to wield such artefacts.<BR>"
dat += "<HR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=16'>Staff of Change</A><BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=staffchange'>Staff of Change</A><BR>"
dat += "<HR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=17'>Six Soul Stone Shards and the spell Artificer</A><BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=soulstone'>Six Soul Stone Shards and the spell Artificer</A><BR>"
dat += "<HR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=18'>Mastercrafted Armor Set</A><BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=armor'>Mastercrafted Armor Set</A><BR>"
dat += "<HR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=19'>Staff of Animation</A><BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=staffanimation'>Staff of Animation</A><BR>"
dat += "<HR>"
if(op)
dat += "<A href='byond://?src=\ref[src];spell_choice=20'>Re-memorize Spells</A><BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=rememorize'>Re-memorize Spells</A><BR>"
user << browse(dat, "window=radio")
onclose(user, "radio")
return
/obj/item/weapon/spellbook/Topic(href, href_list)
..()
if (usr.stat || usr.restrained())
return
var/mob/living/carbon/human/H = usr
if (!( istype(H, /mob/living/carbon/human)))
return 1
if ( src.loc == usr || (in_range(src,usr) && istype(src.loc, /turf)))
usr.set_machine(src)
if(href_list["spell_choice"])
if(src.uses >= 1 && src.max_uses >=1 && text2num(href_list["spell_choice"]) < 19)
src.uses--
var/list/available_spells = list("Magic Missile","Fireball","Disintegrate","Disable Tech","Smoke","Blind","Mind Transfer","Forcewall","Blink","Teleport","Mutate","Ethereal Jaunt","Knock","Curse of the Horseman","Summon Guns","Staff of Change","Six Soul Stone Shards and the spell Artificer","Mastercrafted Armor Set", "Staff of Animation")
var/already_knows = 0
for(var/obj/effect/proc_holder/spell/aspell in usr.spell_list)
if(available_spells[text2num(href_list["spell_choice"])] == aspell.name)
already_knows = 1
src.temp = "You already know that spell."
src.uses++
break
if(!already_knows)
switch(href_list["spell_choice"])
if ("1")
feedback_add_details("wizard_spell_learned","MM") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
usr.spell_list += new /obj/effect/proc_holder/spell/targeted/projectile/magic_missile(usr)
src.temp = "This spell fires several, slow moving, magic projectiles at nearby targets. If they hit a target, it is paralyzed and takes minor damage."
if ("2")
feedback_add_details("wizard_spell_learned","FB") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
usr.spell_list += new /obj/effect/proc_holder/spell/dumbfire/fireball(usr)
src.temp = "This spell fires a fireball in the direction you're facing and does not require wizard garb. Be careful not to fire it at people that are standing next to you."
if ("3")
feedback_add_details("wizard_spell_learned","DG") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
usr.spell_list += new /obj/effect/proc_holder/spell/targeted/inflict_handler/disintegrate(usr)
src.temp = "This spell instantly kills somebody adjacent to you with the vilest of magick. It has a long cooldown."
if ("4")
feedback_add_details("wizard_spell_learned","DT") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
usr.spell_list += new /obj/effect/proc_holder/spell/targeted/emplosion/disable_tech(usr)
src.temp = "This spell disables all weapons, cameras and most other technology in range."
if ("5")
feedback_add_details("wizard_spell_learned","SM") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
usr.spell_list += new /obj/effect/proc_holder/spell/targeted/smoke(usr)
src.temp = "This spell spawns a cloud of choking smoke at your location and does not require wizard garb."
if ("6")
feedback_add_details("wizard_spell_learned","BD") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
usr.spell_list += new /obj/effect/proc_holder/spell/targeted/trigger/blind(usr)
src.temp = "This spell temporarly blinds a single person and does not require wizard garb."
if ("7")
feedback_add_details("wizard_spell_learned","MT") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
usr.spell_list += new /obj/effect/proc_holder/spell/targeted/mind_transfer(usr)
src.temp = "This spell allows the user to switch bodies with a target. Careful to not lose your memory in the process."
if ("8")
feedback_add_details("wizard_spell_learned","FW") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
usr.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/forcewall(usr)
src.temp = "This spell creates an unbreakable wall that lasts for 30 seconds and does not need wizard garb."
if ("9")
feedback_add_details("wizard_spell_learned","BL") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
usr.spell_list += new /obj/effect/proc_holder/spell/targeted/turf_teleport/blink(usr)
src.temp = "This spell randomly teleports you a short distance. Useful for evasion or getting into areas if you have patience."
if ("10")
feedback_add_details("wizard_spell_learned","TP") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
usr.spell_list += new /obj/effect/proc_holder/spell/targeted/area_teleport/teleport(usr)
src.temp = "This spell teleports you to a type of area of your selection. Very useful if you are in danger, but has a decent cooldown, and is unpredictable."
if ("11")
feedback_add_details("wizard_spell_learned","MU") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
usr.spell_list += new /obj/effect/proc_holder/spell/targeted/genetic/mutate(usr)
src.temp = "This spell causes you to turn into a hulk and gain telekinesis for a short while."
if ("12")
feedback_add_details("wizard_spell_learned","EJ") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
usr.spell_list += new /obj/effect/proc_holder/spell/targeted/ethereal_jaunt(usr)
src.temp = "This spell creates your ethereal form, temporarily making you invisible and able to pass through walls."
if ("13")
feedback_add_details("wizard_spell_learned","KN") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
usr.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/knock(usr)
src.temp = "This spell opens nearby doors and does not require wizard garb."
if ("14")
feedback_add_details("wizard_spell_learned","HH") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
usr.spell_list += new /obj/effect/proc_holder/spell/targeted/horsemask(usr)
src.temp = "This spell will curse a person to wear an unremovable horse mask (it has glue on the inside) and speak like a horse. It does not require a wizard garb. Do note the curse will disintegrate the target's current mask if they are wearing one."
if ("15")
feedback_add_details("wizard_spell_learned","SG") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
usr.rightandwrong()
src.max_uses--
src.temp = "Nothing could possibly go wrong with arming a crew of lunatics just itching for an excuse to kill eachother. Just be careful not to get hit in the crossfire!"
if ("16")
feedback_add_details("wizard_spell_learned","ST") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
new /obj/item/weapon/gun/energy/staff(get_turf(usr))
src.temp = "An artefact that spits bolts of coruscating energy which cause the target's very form to reshape itself"
src.max_uses--
if ("17")
feedback_add_details("wizard_spell_learned","SS") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
new /obj/item/weapon/storage/belt/soulstone/full(get_turf(usr))
usr.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/construct(usr)
src.temp = "Soul Stone Shards are ancient tools capable of capturing and harnessing the spirits of the dead and dying. The spell Artificer allows you to create arcane machines for the captured souls to pilot."
src.max_uses--
if ("18")
feedback_add_details("wizard_spell_learned","HS") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
new /obj/item/clothing/shoes/sandal(get_turf(usr)) //In case they've lost them.
new /obj/item/clothing/gloves/purple(get_turf(usr))//To complete the outfit
new /obj/item/clothing/suit/space/rig/wizard(get_turf(usr))
new /obj/item/clothing/head/helmet/space/rig/wizard(get_turf(usr))
src.temp = "An artefact suit of armor that allows you to cast spells while providing more protection against attacks and the void of space."
src.max_uses--
if("19")
feedback_add_details("wizard_spell_learned","SA") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
new /obj/item/weapon/gun/energy/staff/animate(get_turf(usr))
src.temp = "An artefact that spits bolts of life-force which causes objects which are hit by it to animate and come to life! This magic doesn't affect machines."
src.max_uses--
if (href_list["spell_choice"] == "20")
if(H.stat || H.restrained())
return
if(!istype(H, /mob/living/carbon/human))
return 1
if(loc == H || (in_range(src, H) && istype(loc, /turf)))
H.set_machine(src)
if(href_list["spell_choice"])
if(href_list["spell_choice"] == "rememorize")
var/area/wizard_station/A = locate()
if(usr in A.contents)
src.uses = src.max_uses
usr.spellremove(usr)
src.temp = "All spells have been removed. You may now memorize a new set of spells."
uses = max_uses
H.spellremove(usr)
temp = "All spells have been removed. You may now memorize a new set of spells."
feedback_add_details("wizard_spell_learned","UM") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
else
src.temp = "You may only re-memorize spells whilst located inside the wizard sanctuary."
temp = "You may only re-memorize spells whilst located inside the wizard sanctuary."
else if(uses >= 1 && max_uses >=1)
uses--
/*
*/
var/list/available_spells = list(magicmissile = "Magic Missile", fireball = "Fireball", disintegrate = "Disintegrate", disabletech = "Disable Tech", smoke = "Smoke", blind = "Blind", mindswap = "Mind Transfer", forcewall = "Forcewall", blink = "Blink", teleport = "Teleport", mutate = "Mutate", etherealjaunt = "Ethereal Jaunt", knock = "Knock", horseman = "Curse of the Horseman", summonguns = "Summon Guns", staffchange = "Staff of Change", soulstone = "Six Soul Stone Shards and the spell Artificer", armor = "Mastercrafted Armor Set", staffanimate = "Staff of Animation")
var/already_knows = 0
for(var/obj/effect/proc_holder/spell/aspell in H.spell_list)
if(available_spells[href_list["spell_choice"]] == aspell.name)
already_knows = 1
temp = "You already know that spell."
uses++
break
/*
*/
if(!already_knows)
switch(href_list["spell_choice"])
if("magicmissile")
feedback_add_details("wizard_spell_learned","MM") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.spell_list += new /obj/effect/proc_holder/spell/targeted/projectile/magic_missile(H)
temp = "This spell fires several, slow moving, magic projectiles at nearby targets. If they hit a target, it is paralyzed and takes minor damage."
if("fireball")
feedback_add_details("wizard_spell_learned","FB") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.spell_list += new /obj/effect/proc_holder/spell/dumbfire/fireball(H)
temp = "This spell fires a fireball in the direction you're facing and does not require wizard garb. Be careful not to fire it at people that are standing next to you."
if("disintegrate")
feedback_add_details("wizard_spell_learned","DG") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.spell_list += new /obj/effect/proc_holder/spell/targeted/inflict_handler/disintegrate(H)
temp = "This spell instantly kills somebody adjacent to you with the vilest of magick. It has a long cooldown."
if("disabletech")
feedback_add_details("wizard_spell_learned","DT") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.spell_list += new /obj/effect/proc_holder/spell/targeted/emplosion/disable_tech(H)
temp = "This spell disables all weapons, cameras and most other technology in range."
if("smoke")
feedback_add_details("wizard_spell_learned","SM") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.spell_list += new /obj/effect/proc_holder/spell/targeted/smoke(H)
temp = "This spell spawns a cloud of choking smoke at your location and does not require wizard garb."
if("blind")
feedback_add_details("wizard_spell_learned","BD") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.spell_list += new /obj/effect/proc_holder/spell/targeted/trigger/blind(H)
temp = "This spell temporarly blinds a single person and does not require wizard garb."
if("mindswap")
feedback_add_details("wizard_spell_learned","MT") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.spell_list += new /obj/effect/proc_holder/spell/targeted/mind_transfer(H)
temp = "This spell allows the user to switch bodies with a target. Careful to not lose your memory in the process."
if("forcewall")
feedback_add_details("wizard_spell_learned","FW") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/forcewall(H)
temp = "This spell creates an unbreakable wall that lasts for 30 seconds and does not need wizard garb."
if("blink")
feedback_add_details("wizard_spell_learned","BL") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.spell_list += new /obj/effect/proc_holder/spell/targeted/turf_teleport/blink(H)
temp = "This spell randomly teleports you a short distance. Useful for evasion or getting into areas if you have patience."
if("teleport")
feedback_add_details("wizard_spell_learned","TP") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.spell_list += new /obj/effect/proc_holder/spell/targeted/area_teleport/teleport(H)
temp = "This spell teleports you to a type of area of your selection. Very useful if you are in danger, but has a decent cooldown, and is unpredictable."
if("mutate")
feedback_add_details("wizard_spell_learned","MU") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.spell_list += new /obj/effect/proc_holder/spell/targeted/genetic/mutate(H)
temp = "This spell causes you to turn into a hulk and gain telekinesis for a short while."
if("etherealjaunt")
feedback_add_details("wizard_spell_learned","EJ") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.spell_list += new /obj/effect/proc_holder/spell/targeted/ethereal_jaunt(H)
temp = "This spell creates your ethereal form, temporarily making you invisible and able to pass through walls."
if("knock")
feedback_add_details("wizard_spell_learned","KN") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/knock(H)
temp = "This spell opens nearby doors and does not require wizard garb."
if("horseman")
feedback_add_details("wizard_spell_learned","HH") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.spell_list += new /obj/effect/proc_holder/spell/targeted/horsemask(H)
temp = "This spell will curse a person to wear an unremovable horse mask (it has glue on the inside) and speak like a horse. It does not require a wizard garb. Do note the curse will disintegrate the target's current mask if they are wearing one."
if("summonguns")
feedback_add_details("wizard_spell_learned","SG") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.rightandwrong()
max_uses--
temp = "Nothing could possibly go wrong with arming a crew of lunatics just itching for an excuse to kill eachother. Just be careful not to get hit in the crossfire!"
if("staffchange")
feedback_add_details("wizard_spell_learned","ST") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
new /obj/item/weapon/gun/energy/staff(get_turf(H))
temp = "An artefact that spits bolts of coruscating energy which cause the target's very form to reshape itself"
max_uses--
if("soulstone")
feedback_add_details("wizard_spell_learned","SS") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
new /obj/item/weapon/storage/belt/soulstone/full(get_turf(H))
H.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/construct(H)
temp = "Soul Stone Shards are ancient tools capable of capturing and harnessing the spirits of the dead and dying. The spell Artificer allows you to create arcane machines for the captured souls to pilot."
max_uses--
if("armor")
feedback_add_details("wizard_spell_learned","HS") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
new /obj/item/clothing/shoes/sandal(get_turf(H)) //In case they've lost them.
new /obj/item/clothing/gloves/purple(get_turf(H))//To complete the outfit
new /obj/item/clothing/suit/space/rig/wizard(get_turf(H))
new /obj/item/clothing/head/helmet/space/rig/wizard(get_turf(H))
temp = "An artefact suit of armor that allows you to cast spells while providing more protection against attacks and the void of space."
max_uses--
if("staffanimation")
feedback_add_details("wizard_spell_learned","SA") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
new /obj/item/weapon/gun/energy/staff/animate(get_turf(H))
temp = "An artefact that spits bolts of life-force which causes objects which are hit by it to animate and come to life! This magic doesn't affect machines."
max_uses--
else
if (href_list["temp"])
src.temp = null
if(href_list["temp"])
temp = null
attack_self(H)
return

View File

@@ -1,583 +0,0 @@
//BLIND
/client/proc/blind()
set category = "Spells"
set name = "Blind"
set desc = "This spell temporarly blinds a single person and does not require wizard garb."
var/mob/M = input(usr, "Who do you wish to blind?") as mob in oview()
if(M)
if(usr.stat)
src << "Not when you are incapacitated."
return
// if(!usr.casting()) return
usr.verbs -= /client/proc/blind
spawn(300)
usr.verbs += /client/proc/blind
usr.whisper("STI KALY")
var/obj/effect/overlay/B = new /obj/effect/overlay( M.loc )
B.icon_state = "blspell"
B.icon = 'icons/obj/wizard.dmi'
B.name = "spell"
B.anchored = 1
B.density = 0
B.layer = 4
M.canmove = 0
spawn(5)
del(B)
M.canmove = 1
M << text("\blue Your eyes cry out in pain!")
M.disabilities |= NEARSIGHTED
spawn(300)
M.disabilities &= ~NEARSIGHTED
M.eye_blind = 10
M.eye_blurry = 20
return
//MAGIC MISSILE
/client/proc/magicmissile()
set category = "Spells"
set name = "Magic missile"
set desc = "This spell fires several, slow moving, magic projectiles at nearby targets."
if(usr.stat)
src << "Not when you are incapacitated."
return
if(!usr.casting()) return
usr.say("FORTI GY AMA")
for (var/mob/living/M as mob in oview())
spawn(0)
var/obj/effect/overlay/A = new /obj/effect/overlay( usr.loc )
A.icon_state = "magicm"
A.icon = 'icons/obj/wizard.dmi'
A.name = "a magic missile"
A.anchored = 0
A.density = 0
A.layer = 4
var/i
for(i=0, i<20, i++)
if (!istype(M)) //it happens sometimes --rastaf0
break
var/obj/effect/overlay/B = new /obj/effect/overlay( A.loc )
B.icon_state = "magicmd"
B.icon = 'icons/obj/wizard.dmi'
B.name = "trail"
B.anchored = 1
B.density = 0
B.layer = 3
spawn(5)
del(B)
step_to(A,M,0)
if (get_dist(A,M) == 0)
M.Weaken(5)
M.take_overall_damage(0,10)
del(A)
return
sleep(5)
del(A)
usr.verbs -= /client/proc/magicmissile
spawn(100)
usr.verbs += /client/proc/magicmissile
//SMOKE
/client/proc/smokecloud()
set category = "Spells"
set name = "Smoke"
set desc = "This spell spawns a cloud of choking smoke at your location and does not require wizard garb."
if(usr.stat)
src << "Not when you are incapacitated."
return
// if(!usr.casting()) return
usr.verbs -= /client/proc/smokecloud
spawn(120)
usr.verbs += /client/proc/smokecloud
var/datum/effect/effect/system/bad_smoke_spread/smoke = new /datum/effect/effect/system/bad_smoke_spread()
smoke.set_up(10, 0, usr.loc)
smoke.start()
//SLEEP SMOKE
///client/proc/smokecloud()
//
// set category = "Spells"
// set name = "Sleep Smoke"
// set desc = "This spell spawns a cloud of choking smoke at your location and does not require wizard garb. But, without the robes, you have no protection against the magic."
// if(usr.stat)
// src << "Not when you are incapacitated."
// return
// if(!usr.casting()) return
// usr.verbs -= /client/proc/smokecloud
// spawn(120)
// usr.verbs += /client/proc/smokecloud
// var/datum/effect/system/sleep_smoke_spread/smoke = new /datum/effect/system/sleep_smoke_spread()
// smoke.set_up(10, 0, usr.loc)
// smoke.start()
//FORCE WALL
/obj/effect/forcefield
desc = "A space wizard's magic wall."
name = "FORCEWALL"
icon = 'icons/effects/effects.dmi'
icon_state = "m_shield"
anchored = 1.0
opacity = 0
density = 1
unacidable = 1
bullet_act(var/obj/item/projectile/Proj, var/def_zone)
var/turf/T = get_turf(src.loc)
if(T)
for(var/mob/M in T)
Proj.on_hit(M,M.bullet_act(Proj, def_zone))
return
/client/proc/forcewall()
set category = "Spells"
set name = "Forcewall"
set desc = "This spell creates an unbreakable wall that lasts for 30 seconds and does not need wizard garb."
if(usr.stat)
src << "Not when you are incapacitated."
return
// if(!usr.casting()) return
usr.verbs -= /client/proc/forcewall
spawn(100)
usr.verbs += /client/proc/forcewall
var/forcefield
usr.whisper("TARCOL MINTI ZHERI")
forcefield = new /obj/effect/forcefield(locate(usr.x,usr.y,usr.z))
spawn (300)
del (forcefield)
return
//FIREBALLAN
/client/proc/fireball()
set category = "Spells"
set name = "Fireball"
set desc = "This spell fires a fireball at a target and does not require wizard garb."
if(usr.stat)
src << "Not when you are incapacitated."
return
// if(!usr.casting()) return
usr.verbs -= /client/proc/fireball
spawn(100)
usr.verbs += /client/proc/fireball
usr.say("ONI SOMA")
var/mob/living/user = src
if(!istype(user))
return
var/i
var/turf/T
var/range = 15
var/x = user.loc.x
var/y = user.loc.y
var/z = user.loc.z
switch(user.dir)
if(NORTH)
T = get_turf(locate(x, y + range, z))
if(EAST)
T = get_turf(locate(x + range, y, z))
if(SOUTH)
T = get_turf(locate(x, y - range, z))
if(WEST)
T = get_turf(locate(x - range, y, z))
else
return
var/obj/effect/overlay/A = new /obj/effect/overlay( usr.loc )
A.icon_state = "fireball"
A.icon = 'icons/obj/wizard.dmi'
A.name = "a fireball"
A.anchored = 0
A.density = 0
A.luminosity = 3
step_to(A, T, 0)
for(i=0, i<100, i++)
var/hit = 0
var/moving = step_to(A,T,0)
for(var/mob/living/target in range(1, A))
hit = 1
target.take_overall_damage(20,25)
if(hit)
explosion(A.loc, -1, -1, 2, 2)
del(A)
return
if(!moving)
explosion(A.loc, -1, -1, 2, 2)
del(A)
return
sleep(2)
if(A)
explosion(A.loc, -1, -1, 2, 2)
del(A)
return
//KNOCK
/client/proc/knock()
set category = "Spells"
set name = "Knock"
set desc = "This spell opens nearby doors and does not require wizard garb."
if(usr.stat)
src << "Not when you are incapacitated."
return
// if(!usr.casting()) return
usr.verbs -= /client/proc/knock
spawn(100)
usr.verbs += /client/proc/knock
usr.whisper("AULIE OXIN FIERA")
for(var/obj/machinery/door/G in oview(3))
spawn(1)
G.open()
return
//KILL
/mob/proc/kill(mob/living/M as mob in oview(1))
set category = "Spells"
set name = "Disintegrate"
set desc = "This spell instantly kills somebody adjacent to you with the vilest of magick."
if(usr.stat)
src << "Not when you are incapacitated."
return
if(!usr.casting()) return
usr.verbs -= /mob/proc/kill
spawn(600)
usr.verbs += /mob/proc/kill
usr.say("EI NATH")
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(4, 1, M)
s.start()
M.dust()
//DISABLE TECH
/mob/proc/tech()
set category = "Spells"
set name = "Disable Technology"
set desc = "This spell disables all weapons, cameras and most other technology in range."
if(usr.stat)
src << "Not when you are incapacitated."
return
if(!usr.casting()) return
usr.verbs -= /mob/proc/tech
spawn(400)
usr.verbs += /mob/proc/tech
usr.say("NEC CANTIO")
empulse(src, 6, 10)
return
//BLINK
/client/proc/blink()
set category = "Spells"
set name = "Blink"
set desc = "This spell randomly teleports you a short distance."
if(usr.stat)
src << "Not when you are incapacitated."
return
if(!usr.casting()) return
var/list/turfs = new/list()
for(var/turf/T in orange(6))
if(istype(T,/turf/space)) continue
if(T.density) continue
if(T.x>world.maxx-4 || T.x<4) continue //putting them at the edge is dumb
if(T.y>world.maxy-4 || T.y<4) continue
turfs += T
if(!turfs.len) turfs += pick(/turf in orange(6))
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
smoke.set_up(10, 0, usr.loc)
smoke.start()
var/turf/picked = pick(turfs)
if(!isturf(picked)) return
usr.loc = picked
usr.verbs -= /client/proc/blink
spawn(40)
usr.verbs += /client/proc/blink
//TELEPORT
/mob/proc/teleport()
set category = "Spells"
set name = "Teleport"
set desc = "This spell teleports you to a type of area of your selection."
if(usr.stat)
src << "Not when you are incapacitated."
return
if(!usr.casting()) return
var/A
usr.verbs -= /mob/proc/teleport
/*
var/list/theareas = new/list()
for(var/area/AR in world)
if(istype(AR, /area/shuttle) || istype(AR, /area/syndicate_station)) continue
if(theareas.Find(AR.name)) continue
var/turf/picked = pick(get_area_turfs(AR.type))
if (picked.z == src.z)
theareas += AR.name
theareas[AR.name] = AR
*/
A = input("Area to jump to", "BOOYEA", A) in teleportlocs
spawn(600)
usr.verbs += /mob/proc/teleport
var/area/thearea = teleportlocs[A]
usr.say("SCYAR NILA [uppertext(A)]")
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
smoke.set_up(5, 0, usr.loc)
smoke.attach(usr)
smoke.start()
var/list/L = list()
for(var/turf/T in get_area_turfs(thearea.type))
if(!T.density)
var/clear = 1
for(var/obj/O in T)
if(O.density)
clear = 0
break
if(clear)
L+=T
if(!L.len)
usr <<"The spell matrix was unable to locate a suitable teleport destination for an unknown reason. Sorry."
return
var/attempt = 0
var/success = 0
while(!success)
success = Move(pick(L))
if(attempt > 20) break //Failsafe
if(!success)
usr.loc = pick(L)
smoke.start()
//JAUNT
/client/proc/jaunt()
set category = "Spells"
set name = "Ethereal Jaunt"
set desc = "This spell creates your ethereal form, temporarily making you invisible and able to pass through walls."
if(usr.stat)
src << "Not when you are incapacitated."
return
if(!usr.casting()) return
usr.verbs -= /client/proc/jaunt
spawn(300)
usr.verbs += /client/proc/jaunt
spell_jaunt(usr)
/proc/spell_jaunt(var/mob/H, time = 50)
if(H.stat) return
spawn(0)
var/mobloc = get_turf(H.loc)
var/obj/effect/dummy/spell_jaunt/holder = new /obj/effect/dummy/spell_jaunt( mobloc )
var/atom/movable/overlay/animation = new /atom/movable/overlay( mobloc )
animation.name = "water"
animation.density = 0
animation.anchored = 1
animation.icon = 'icons/mob/mob.dmi'
animation.icon_state = "liquify"
animation.layer = 5
animation.master = holder
flick("liquify",animation)
H.loc = holder
H.client.eye = holder
var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread()
steam.set_up(10, 0, mobloc)
steam.start()
sleep(time)
mobloc = get_turf(H.loc)
animation.loc = mobloc
steam.location = mobloc
steam.start()
H.canmove = 0
sleep(20)
flick("reappear",animation)
sleep(5)
if(!H.Move(mobloc))
for(var/direction in list(1,2,4,8,5,6,9,10))
var/turf/T = get_step(mobloc, direction)
if(T)
if(H.Move(T))
break
H.canmove = 1
H.client.eye = H
del(animation)
del(holder)
/*
/obj/effect/dummy/spell_jaunt
name = "water"
icon = 'icons/effects/effects.dmi'
icon_state = "nothing"
var/canmove = 1
density = 0
anchored = 1
/obj/effect/dummy/spell_jaunt/relaymove(var/mob/user, direction)
if (!src.canmove) return
switch(direction)
if(NORTH)
src.y++
if(SOUTH)
src.y--
if(EAST)
src.x++
if(WEST)
src.x--
if(NORTHEAST)
src.y++
src.x++
if(NORTHWEST)
src.y++
src.x--
if(SOUTHEAST)
src.y--
src.x++
if(SOUTHWEST)
src.y--
src.x--
src.canmove = 0
spawn(2) src.canmove = 1
/obj/effect/dummy/spell_jaunt/ex_act(blah)
return
/obj/effect/dummy/spell_jaunt/bullet_act(blah,blah)
return
*/
//MUTATE
/client/proc/mutate()
set category = "Spells"
set name = "Mutate"
set desc = "This spell causes you to turn into a hulk and gain laser vision for a short while."
if(usr.stat)
src << "Not when you are incapacitated."
return
if(!usr.casting()) return
usr.verbs -= /client/proc/mutate
spawn(400)
usr.verbs += /client/proc/mutate
usr.say("BIRUZ BENNAR")
usr << text("\blue You feel strong! You feel pressure building behind your eyes!")
if (!(HULK in usr.mutations))
usr.mutations.Add(HULK)
if (!(LASER in usr.mutations))
usr.mutations.Add(LASER)
spawn (300)
if (LASER in usr.mutations) usr.mutations.Remove(LASER)
if (HULK in usr.mutations) usr.mutations.Remove(HULK)
return
//BODY SWAP /N
/mob/proc/swap(mob/living/M as mob in oview())
set category = "Spells"
set name = "Mind Transfer"
set desc = "This spell allows the user to switch bodies with a target."
if(usr.stat)
src << "Not when you are incapacitated."
return
if(M.client && M.mind)
if(M.mind.special_role != "Wizard" || "Fake Wizard" || "Changeling" || "Cultist" || "Space Ninja")//Wizards, changelings, ninjas, and cultists are protected.
if( (istype(M, /mob/living/carbon/human)) || (istype(M, /mob/living/carbon/monkey)) && M.stat != 2)
var/mob/living/carbon/human/H = M //so it does not freak out when looking at the variables.
var/mob/living/carbon/human/U = src
U.whisper("GIN'YU CAPAN")
U.verbs -= /mob/proc/swap
//Remove special verbs from both mobs
if(U.mind.special_verbs.len)
for(var/V in U.mind.special_verbs)
U.verbs -= V
if(H.mind.special_verbs.len)
for(var/V in H.mind.special_verbs)
H.verbs -= V
//empty out H
var/mob/dead/observer/G = H.ghostize(0) //Transfers H to a temporary mob
//Start the Transfer
U.mind.transfer_to(H)
G.mind.transfer_to(U)
U.key = G.key //has to be called explicitly since ghostize() set the datum/mind/var/active = 0
//Re-add those special verbs and stuff
if(H.mind.special_verbs.len)
var/spell_loss = 1//Can lose only one spell during transfer.
var/probability = 95 //To determine the chance of wizard losing their spell.
for(var/V in H.mind.special_verbs)
if(spell_loss == 0)
H.verbs += V
else
if(prob(probability))
H.verbs += V
probability -= 7//Chance of of keeping spells goes down each time a spell is added. Less spells means less chance of losing them.
else
spell_loss = 0
H.mind.special_verbs -= V
spawn(500)
H << "The mind transfer has robbed you of a spell."
if(U.mind.special_verbs.len)//Basic fix to swap verbs for any mob if needed.
for(var/V in U.mind.special_verbs)
U.verbs += V
spawn(500)
U << "Something about your body doesn't seem quite right..."
U.Paralyse(20)
H.Paralyse(20)
spawn(600)
H.verbs += /mob/proc/swap
else
src << "Their mind is not compatible."
return
else
src << "Their mind is resisting your spell."
return
else
src << "They appear to be brain-dead."
return