diff --git a/code/game/gamemodes/wizard/rightandwrong.dm b/code/game/gamemodes/wizard/rightandwrong.dm index 2aca47c87d7..b87d0de8b50 100644 --- a/code/game/gamemodes/wizard/rightandwrong.dm +++ b/code/game/gamemodes/wizard/rightandwrong.dm @@ -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 << "You summoned [summon_type ? "magic" : "guns"]!" 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") diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index 9c872420c93..88723b8214f 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -97,6 +97,9 @@ dat += "Flesh to Stone (60)
" dat += "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.
" + dat += "Instant Summons (10)
" + dat += "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.
" + dat += "
" dat += "Return
" @@ -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 <<"[src] suddenly feels very warm!" - empulse(src, 1, 1) \ No newline at end of file + 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 <<"[src] suddenly vanishes!" + qdel(src) diff --git a/code/game/gamemodes/wizard/summonitem.dm b/code/game/gamemodes/wizard/summonitem.dm new file mode 100644 index 00000000000..1bfbb4ff6a5 --- /dev/null +++ b/code/game/gamemodes/wizard/summonitem.dm @@ -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 = "" + for(var/obj/item in hand_items) + marked_item = item + message += "You mark [item] for recall." + name = "Recall [item]" + break + + if(!marked_item) + if(hand_items) + message = "You aren't holding anything that can be marked for recall." + else + message = "You must hold the desired item in your hands to mark it for recall." + + else if(marked_item && marked_item in hand_items) //unlinking item to the spell + message = "You remove the mark on [marked_item] to use elsewhere." + name = "Instant Summons" + marked_item = null + + else if(marked_item && !marked_item.loc) //the item was destroyed at some point + message = "You sense your marked item has been destroyed!" + 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("[M] suddenly disappears!") + M.loc = user.loc + M.loc.visible_message("[M] suddenly appears!") + 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("The [item_to_retrive.name] suddenly disappears!") + + + 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("The [item_to_retrive.name] suddenly appears!") + else + item_to_retrive.loc.visible_message("The [item_to_retrive.name] suddenly appears in [user]'s hand!") + + if(message) + user << message diff --git a/code/modules/projectiles/guns/magic/staff.dm b/code/modules/projectiles/guns/magic/staff.dm index a01b50a088e..3b217028900 100644 --- a/code/modules/projectiles/guns/magic/staff.dm +++ b/code/modules/projectiles/guns/magic/staff.dm @@ -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" diff --git a/icons/obj/library.dmi b/icons/obj/library.dmi index 1c405908b43..3cfdd226e92 100644 Binary files a/icons/obj/library.dmi and b/icons/obj/library.dmi differ diff --git a/paradise.dme b/paradise.dme index 69918097b9c..947a94145a4 100644 --- a/paradise.dme +++ b/paradise.dme @@ -353,6 +353,7 @@ #include "code\game\gamemodes\wizard\rightandwrong.dm" #include "code\game\gamemodes\wizard\soulstone.dm" #include "code\game\gamemodes\wizard\spellbook.dm" +#include "code\game\gamemodes\wizard\summonitem.dm" #include "code\game\gamemodes\wizard\wizard.dm" #include "code\game\gamemodes\xenos\xenos.dm" #include "code\game\jobs\access.dm"