Wizard Update Part 7

(That last commit was supposed to be Part 3, not 6, but might as well
roll with it)

- Ports over the summon item spell from /tg/, it allows the wizard to
mark an item and then later recall it to his hands. If it is within
another item, that item will be recalled with the marked item inside.
- Removes RNG max charge variation on staffs, most staffs will now have
6 max charges (Rather than a 25% chance of 8, 50% of 4, and 25% of 3),
the exception being the Staff of Door Creation and Staff of Chaos, which
each have 10 charges.
- Adds summonitem to Summon Magic.
- Summon Guns/Magic now cost 1 spell slot each once again.

All ported from /tg/ with the exception of the Summon Guns/Magic cost
changes, as well as the remove of staff charge variation.
This commit is contained in:
DZD
2015-01-15 17:05:49 -05:00
parent 62c76ba2ef
commit 5307d376da
6 changed files with 137 additions and 32 deletions
+3 -1
View File
@@ -2,7 +2,7 @@
/mob/proc/rightandwrong(var/summon_type) //0 = Summon Guns, 1 = Summon Magic
var/list/gunslist = list("taser","egun","laser","revolver","detective","c20r","nuclear","deagle","gyrojet","pulse","silenced","cannon","doublebarrel","shotgun","combatshotgun","bulldog","mateba","sabr","crossbow","saw","car")
var/list/magiclist = list("fireball","smoke","blind","mindswap","forcewall","knock","horsemask","charge","wandnothing", "wanddeath", "wandresurrection", "wandpolymorph", "wandteleport", "wanddoor", "wandfireball", "staffhealing", "armor", "scrying", "staffdoor", "special")
var/list/magiclist = list("fireball","smoke","blind","mindswap","forcewall","knock","horsemask","charge", "summonitem", "wandnothing", "wanddeath", "wandresurrection", "wandpolymorph", "wandteleport", "wanddoor", "wandfireball", "staffhealing", "armor", "scrying", "staffdoor", "special")
var/list/magicspeciallist = list("staffchange","staffanimation", "wandbelt", "contract", "staffchaos")
usr << "<B>You summoned [summon_type ? "magic" : "guns"]!</B>"
message_admins("[key_name_admin(usr, 1)] summoned [summon_type ? "magic" : "guns"]!")
@@ -100,6 +100,8 @@
new /obj/item/weapon/gun/magic/wand/teleport(get_turf(H))
if("wanddoor")
new /obj/item/weapon/gun/magic/wand/door(get_turf(H))
if("wandfireball")
new /obj/item/weapon/gun/magic/wand/fireball(get_turf(H))
if("staffhealing")
new /obj/item/weapon/gun/magic/staff/healing(get_turf(H))
if("staffdoor")
+28 -18
View File
@@ -97,6 +97,9 @@
dat += "<A href='byond://?src=\ref[src];spell_choice=fleshtostone'>Flesh to Stone</A> (60)<BR>"
dat += "<I>This spell will curse a person to immediately turn into an unmoving statue. The effect will eventually wear off if the statue is not destroyed.</I><BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=summonitem'>Instant Summons</A> (10)<BR>"
dat += "<I>This spell can be used to bind a valuable item to you, bringing it to your hand at will. Using this spell while holding the bound item will allow you to unbind it. It does not require wizard garb.</I><BR>"
dat += "<HR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=return'><B>Return</B></A><BR>"
@@ -197,7 +200,7 @@
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", fleshtostone = "Flesh to Stone", summonguns = "Summon Guns", summonmagic = "Summon Magic", staffchange = "Staff of Change", soulstone = "Six Soul Stone Shards and the spell Artificer", armor = "Mastercrafted Armor Set", staffanimate = "Staff of Animation", staffchaos = "Staff of Chaos", staffdoor = "Staff of Door Creation", wands = "Wand Assortment")
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", fleshtostone = "Flesh to Stone", summonitem = "Instant Summons", summonguns = "Summon Guns", summonmagic = "Summon Magic", staffchange = "Staff of Change", soulstone = "Six Soul Stone Shards and the spell Artificer", armor = "Mastercrafted Armor Set", staffanimate = "Staff of Animation", staffchaos = "Staff of Chaos", staffdoor = "Staff of Door Creation", wands = "Wand Assortment")
var/already_knows = 0
for(var/obj/effect/proc_holder/spell/wizard/aspell in H.spell_list)
if(available_spells[href_list["spell_choice"]] == initial(aspell.name))
@@ -296,24 +299,20 @@
feedback_add_details("wizard_spell_learned","FS") //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/wizard/targeted/inflict_handler/flesh_to_stone(H)
temp = "You have learned flesh to stone."
if("summonitem")
feedback_add_details("wizard_spell_learned","IS") //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/wizard/targeted/summonitem(null)
temp = "You have learned instant summons."
if("summonguns")
if(max_uses < 5)
temp = "You need 5 slots for this spell"
return
else
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(0)
max_uses-=5
temp = "You have cast summon guns."
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(0)
max_uses--
temp = "You have cast summon guns."
if("summonmagic")
if(max_uses < 5)
temp = "You need 5 slots for this spell"
return
else
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.rightandwrong(1)
max_uses-=5
temp = "You have cast summon magic."
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.rightandwrong(1)
max_uses--
temp = "You have cast summon magic."
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/magic/staff/change(get_turf(H))
@@ -567,4 +566,15 @@
/obj/item/weapon/spellbook/oneuse/charge/recoil(mob/user as mob)
..()
user <<"<span class='warning'>[src] suddenly feels very warm!</span>"
empulse(src, 1, 1)
empulse(src, 1, 1)
/obj/item/weapon/spellbook/oneuse/summonitem
spell = /obj/effect/proc_holder/spell/wizard/targeted/summonitem
spellname = "instant summons"
icon_state ="booksummons"
desc = "This book is bright and garish, very hard to miss."
/obj/item/weapon/spellbook/oneuse/summonitem/recoil(mob/user as mob)
..()
user <<"<span class='warning'>[src] suddenly vanishes!</span>"
qdel(src)
+105
View File
@@ -0,0 +1,105 @@
/obj/effect/proc_holder/spell/wizard/targeted/summonitem
name = "Instant Summons"
desc = "This spell can be used to recall a previously marked item to your hand from anywhere in the universe."
school = "transmutation"
charge_max = 100
clothes_req = 0
invocation = "GAR YOK"
invocation_type = "whisper"
range = -1
level_max = 1 //cannot be improved
cooldown_min = 100
include_user = 1
var/obj/marked_item
/obj/effect/proc_holder/spell/wizard/targeted/summonitem/cast(list/targets)
for(var/mob/living/user in targets)
var/list/hand_items = list(user.get_active_hand(),user.get_inactive_hand())
var/butterfingers = 0
var/message
if(!marked_item) //linking item to the spell
message = "<span class='notice'>"
for(var/obj/item in hand_items)
marked_item = item
message += "You mark [item] for recall.</span>"
name = "Recall [item]"
break
if(!marked_item)
if(hand_items)
message = "<span class='caution'>You aren't holding anything that can be marked for recall.</span>"
else
message = "<span class='notice'>You must hold the desired item in your hands to mark it for recall.</span>"
else if(marked_item && marked_item in hand_items) //unlinking item to the spell
message = "<span class='notice'>You remove the mark on [marked_item] to use elsewhere.</span>"
name = "Instant Summons"
marked_item = null
else if(marked_item && !marked_item.loc) //the item was destroyed at some point
message = "<span class='warning'>You sense your marked item has been destroyed!</span>"
name = "Instant Summons"
marked_item = null
else //Getting previously marked item
var/obj/item_to_retrive = marked_item
var/infinite_recursion = 0 //I don't want to know how someone could put something inside itself but these are wizards so let's be safe
while(!isturf(item_to_retrive.loc) && infinite_recursion < 10) //if it's in something you get the whole thing.
if(ismob(item_to_retrive.loc)) //If its on someone, properly drop it
var/mob/M = item_to_retrive.loc
if(issilicon(M)) //Items in silicons warp the whole silicon
M.loc.visible_message("<span class='warning'>[M] suddenly disappears!</span>")
M.loc = user.loc
M.loc.visible_message("<span class='caution'>[M] suddenly appears!</span>")
item_to_retrive = null
break
M.u_equip(item_to_retrive)
if(iscarbon(M)) //Edge case housekeeping
var/mob/living/carbon/C = M
if(C.internal_organs && item_to_retrive in C.internal_organs) //KALIMA!
C.internal_organs -= item_to_retrive
if(istype(marked_item,/obj/item/brain)) //If this code ever runs I will be happy
var/obj/item/brain/B
B.transfer_identity(C)
add_logs(user, C, "magically debrained", addition="INTENT: [uppertext(user.a_intent)]")
if(C.stomach_contents && item_to_retrive in C.stomach_contents)
C.stomach_contents -= item_to_retrive
else
if(istype(item_to_retrive.loc,/obj/machinery/portable_atmospherics/)) //Edge cases for moved machinery
var/obj/machinery/portable_atmospherics/P = item_to_retrive.loc
P.disconnect()
P.update_icon()
item_to_retrive = item_to_retrive.loc
infinite_recursion += 1
if(!item_to_retrive)
return
item_to_retrive.loc.visible_message("<span class='warning'>The [item_to_retrive.name] suddenly disappears!</span>")
if(user.hand) //left active hand
if(!user.equip_to_slot_if_possible(item_to_retrive, slot_l_hand, 0, 1, 1))
if(!user.equip_to_slot_if_possible(item_to_retrive, slot_r_hand, 0, 1, 1))
butterfingers = 1
else //right active hand
if(!user.equip_to_slot_if_possible(item_to_retrive, slot_r_hand, 0, 1, 1))
if(!user.equip_to_slot_if_possible(item_to_retrive, slot_l_hand, 0, 1, 1))
butterfingers = 1
if(butterfingers)
item_to_retrive.loc = user.loc
item_to_retrive.loc.visible_message("<span class='caution'>The [item_to_retrive.name] suddenly appears!</span>")
else
item_to_retrive.loc.visible_message("<span class='caution'>The [item_to_retrive.name] suddenly appears in [user]'s hand!</span>")
if(message)
user << message
@@ -1,15 +1,5 @@
obj/item/weapon/gun/magic/staff/
slot_flags = SLOT_BACK
max_charges = 100 //100, 50, 50, 34 (max charge distribution by 25%ths)
var/variable_charges = 1
/obj/item/weapon/gun/magic/staff/New()
if(prob(75) && variable_charges) //25% chance of listed max charges, 50% chance of 1/2 max charges, 25% chance of 1/3 max charges
if(prob(33))
max_charges = Ceiling(max_charges / 3)
else
max_charges = Ceiling(max_charges / 2)
..()
obj/item/weapon/gun/magic/staff/change
name = "staff of change"
@@ -17,7 +7,6 @@ obj/item/weapon/gun/magic/staff/change
projectile_type = "/obj/item/projectile/magic/change"
icon_state = "staffofchange"
item_state = "staffofchange"
max_charges = 8 //8, 4, 4, 3
obj/item/weapon/gun/magic/staff/animate
name = "staff of animation"
@@ -25,7 +14,6 @@ obj/item/weapon/gun/magic/staff/animate
projectile_type = "/obj/item/projectile/magic/animate"
icon_state = "staffofanimation"
item_state = "staffofanimation"
max_charges = 8 //8, 4, 4, 3
obj/item/weapon/gun/magic/staff/healing
name = "staff of healing"
@@ -33,7 +21,6 @@ obj/item/weapon/gun/magic/staff/healing
projectile_type = "/obj/item/projectile/magic/resurrection"
icon_state = "staffofhealing"
item_state = "staffofhealing"
max_charges = 8 //8, 4, 4, 3
obj/item/weapon/gun/magic/staff/chaos
name = "staff of chaos"