diff --git a/code/datums/spells/touch_attacks.dm b/code/datums/spells/touch_attacks.dm new file mode 100644 index 00000000000..54cb984f943 --- /dev/null +++ b/code/datums/spells/touch_attacks.dm @@ -0,0 +1,69 @@ +/obj/effect/proc_holder/spell/targeted/touch/ + var/hand_path = "/obj/item/weapon/melee/touch_attack" + var/obj/item/weapon/melee/touch_attack/attached_hand = null + invocation_type = "none" //you scream on connecting, not summoning + include_user = 1 + range = -1 + +/obj/effect/proc_holder/spell/targeted/touch/Click(mob/user = usr) + if(attached_hand) + qdel(attached_hand) + charge_counter = charge_max + attached_hand = null + user << "You draw the power out of your hand." + return 0 + ..() + +/obj/effect/proc_holder/spell/targeted/touch/cast(list/targets) + for(var/mob/living/carbon/user in targets) + if(!attached_hand) + if(!ChargeHand(user)) + return 0 + while(attached_hand) //hibernate untill the spell is actually used + charge_counter = 0 + sleep(1) + +/obj/effect/proc_holder/spell/targeted/touch/proc/ChargeHand(mob/living/carbon/user) + var/hand_handled = 1 + attached_hand = new hand_path(src) + if(user.hand) //left active hand + if(!user.equip_to_slot_if_possible(attached_hand, slot_l_hand, 0, 1, 1)) + if(!user.equip_to_slot_if_possible(attached_hand, slot_r_hand, 0, 1, 1)) + hand_handled = 0 + else //right active hand + if(!user.equip_to_slot_if_possible(attached_hand, slot_r_hand, 0, 1, 1)) + if(!user.equip_to_slot_if_possible(attached_hand, slot_l_hand, 0, 1, 1)) + hand_handled = 0 + if(!hand_handled) + qdel(attached_hand) + charge_counter = charge_max + attached_hand = null + user << "Your hands are full!" + return 0 + user << "You channel the power of the spell to your hand." + return 1 + + +/obj/effect/proc_holder/spell/targeted/touch/disintegrate + name = "Disintegrate" + desc = "This spell charges your hand with vile energy that can be used to violently explode victims." + hand_path = "/obj/item/weapon/melee/touch_attack/disintegrate" + + school = "evocation" + charge_max = 600 + clothes_req = 1 + cooldown_min = 200 //100 deciseconds reduction per rank + + action_icon_state = "gib" + +/obj/effect/proc_holder/spell/targeted/touch/flesh_to_stone + name = "Flesh to Stone" + desc = "This spell charges your hand with the power to turn victims into inert statues for a long period of time." + hand_path = "/obj/item/weapon/melee/touch_attack/fleshtostone" + + school = "transmutation" + charge_max = 600 + clothes_req = 1 + cooldown_min = 200 //100 deciseconds reduction per rank + + action_icon_state = "statue" \ No newline at end of file diff --git a/code/datums/spells/wizard.dm b/code/datums/spells/wizard.dm index cd0615f3289..1adcfc279e0 100644 --- a/code/datums/spells/wizard.dm +++ b/code/datums/spells/wizard.dm @@ -54,25 +54,6 @@ action_icon_state = "mutate" -/obj/effect/proc_holder/spell/targeted/inflict_handler/disintegrate - name = "Disintegrate" - desc = "This spell instantly kills somebody adjacent to you with the vilest of magick." - - school = "evocation" - charge_max = 600 - clothes_req = 1 - invocation = "EI NATH" - invocation_type = "shout" - range = 1 - cooldown_min = 200 //100 deciseconds reduction per rank - - destroys = "gib_brain" - - sparks_spread = 1 - sparks_amt = 4 - - action_icon_state = "gib" - /obj/effect/proc_holder/spell/targeted/smoke name = "Smoke" desc = "This spell spawns a cloud of choking smoke at your location and does not require wizard garb." @@ -233,23 +214,6 @@ disabilities = 1 duration = 300 -/obj/effect/proc_holder/spell/targeted/inflict_handler/flesh_to_stone - name = "Flesh to Stone" - desc = "This spell turns a single person into an inert statue for a long period of time." - - school = "transmutation" - charge_max = 600 - clothes_req = 1 - range = 2 - invocation = "STAUN EI" - invocation_type = "shout" - amt_stunned = 2//just exists to make sure the statue "catches" them - cooldown_min = 200 //100 deciseconds reduction per rank - - summon_type = "/obj/structure/closet/statue" - - action_icon_state = "statue" - /obj/effect/proc_holder/spell/dumbfire/fireball name = "Fireball" desc = "This spell fires a fireball at a target and does not require wizard garb." diff --git a/code/game/gamemodes/wizard/godhand.dm b/code/game/gamemodes/wizard/godhand.dm new file mode 100644 index 00000000000..2e374240149 --- /dev/null +++ b/code/game/gamemodes/wizard/godhand.dm @@ -0,0 +1,78 @@ +/obj/item/weapon/melee/touch_attack + name = "\improper outstretched hand" + desc = "High Five?" + var/catchphrase = "High Five!" + var/on_use_sound = null + var/obj/effect/proc_holder/spell/targeted/touch/attached_spell + icon = 'icons/obj/weapons.dmi' + icon_state = "syndballoon" + item_state = null + flags = ABSTRACT | NODROP + w_class = 5.0 + force = 0 + throwforce = 0 + throw_range = 0 + throw_speed = 0 + +/obj/item/weapon/melee/touch_attack/New(var/spell) + attached_spell = spell + ..() + +/obj/item/weapon/melee/touch_attack/attack(mob/target, mob/living/carbon/user) + if(!iscarbon(user)) //Look ma, no hands + return + if(user.lying || user.handcuffed) + user << "You can't reach out!" + return + ..() + +/obj/item/weapon/melee/touch_attack/afterattack(atom/target, mob/user, proximity) + user.say(catchphrase) + playsound(get_turf(user), on_use_sound,50,1) + attached_spell.attached_hand = null + qdel(src) + +/obj/item/weapon/melee/touch_attack/disintegrate + name = "\improper disintegrating touch" + desc = "This hand of mine glows with an awesome power!" + catchphrase = "EI NATH!!" + on_use_sound = "sound/magic/Disintegrate.ogg" + icon_state = "disintegrate" + item_state = "disintegrate" + icon_override = 'icons/mob/in-hand/spells.dmi' + +/obj/item/weapon/melee/touch_attack/disintegrate/afterattack(atom/target, mob/living/carbon/user, proximity) + if(!proximity || target == user || !ismob(target) || !iscarbon(user) || user.lying || user.handcuffed) //exploding after touching yourself would be bad + return + var/mob/M = target + if(ishuman(M) || issmall(M)) + var/mob/living/carbon/C_target = M + var/obj/item/organ/brain/B + if(C_target.brain_op_stage != 4) // Their brain is already taken out + B = new(C_target.loc) + B.transfer_identity(C_target) + var/datum/effect/effect/system/spark_spread/sparks = new + sparks.set_up(4, 0, M.loc) //no idea what the 0 is + sparks.start() + M.gib() + ..() + +/obj/item/weapon/melee/touch_attack/fleshtostone + name = "\improper petrifying touch" + desc = "That's the bottom line, because flesh to stone said so!" + catchphrase = "STAUN EI!!" + on_use_sound = "sound/magic/FleshToStone.ogg" + icon_state = "fleshtostone" + item_state = "fleshtostone" + icon_override = 'icons/mob/in-hand/spells.dmi' + +/obj/item/weapon/melee/touch_attack/fleshtostone/afterattack(atom/target, mob/living/carbon/user, proximity) + if(!proximity || target == user || !ismob(target) || !iscarbon(user) || user.lying || user.handcuffed) //getting hard after touching yourself would also be bad + return + if(user.lying || user.handcuffed) + user << "You can't reach out!" + return + var/mob/M = target + M.Stun(2) + new /obj/structure/closet/statue(M.loc, M) + ..() \ No newline at end of file diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index df22fbf706a..0444eb9997f 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -111,7 +111,7 @@ /datum/spellbook_entry/disintegrate name = "Disintegrate" - spell_type = /obj/effect/proc_holder/spell/targeted/inflict_handler/disintegrate + spell_type = /obj/effect/proc_holder/spell/targeted/touch/disintegrate log_name = "DG" /datum/spellbook_entry/disabletech @@ -185,7 +185,7 @@ /datum/spellbook_entry/fleshtostone name = "Flesh to Stone" - spell_type = /obj/effect/proc_holder/spell/targeted/inflict_handler/flesh_to_stone + spell_type = /obj/effect/proc_holder/spell/targeted/touch/flesh_to_stone log_name = "FS" /datum/spellbook_entry/summonitem diff --git a/code/modules/projectiles/guns/magic/staff.dm b/code/modules/projectiles/guns/magic/staff.dm index c9d7ec064f0..5fdeb481d5a 100644 --- a/code/modules/projectiles/guns/magic/staff.dm +++ b/code/modules/projectiles/guns/magic/staff.dm @@ -14,6 +14,7 @@ obj/item/weapon/gun/magic/staff/animate projectile_type = "/obj/item/projectile/magic/animate" icon_state = "staffofanimation" item_state = "staffofanimation" + icon_override = 'icons/mob/in-hand/staff.dmi' obj/item/weapon/gun/magic/staff/healing name = "staff of healing" @@ -21,6 +22,7 @@ obj/item/weapon/gun/magic/staff/healing projectile_type = "/obj/item/projectile/magic/resurrection" icon_state = "staffofhealing" item_state = "staffofhealing" + icon_override = 'icons/mob/in-hand/staff.dmi' obj/item/weapon/gun/magic/staff/chaos name = "staff of chaos" diff --git a/icons/mob/back.dmi b/icons/mob/back.dmi index a4c6dd0e843..26e8c26f508 100644 Binary files a/icons/mob/back.dmi and b/icons/mob/back.dmi differ diff --git a/icons/mob/in-hand/spells.dmi b/icons/mob/in-hand/spells.dmi new file mode 100644 index 00000000000..dae92759cc6 Binary files /dev/null and b/icons/mob/in-hand/spells.dmi differ diff --git a/icons/mob/in-hand/staff.dmi b/icons/mob/in-hand/staff.dmi index 2309136a454..a3e70edfb04 100644 Binary files a/icons/mob/in-hand/staff.dmi and b/icons/mob/in-hand/staff.dmi differ diff --git a/icons/mob/items_lefthand.dmi b/icons/mob/items_lefthand.dmi index 576922ceb4e..20568f14f62 100644 Binary files a/icons/mob/items_lefthand.dmi and b/icons/mob/items_lefthand.dmi differ diff --git a/icons/obj/weapons.dmi b/icons/obj/weapons.dmi index fa286d3e12b..6e759e9ed90 100644 Binary files a/icons/obj/weapons.dmi and b/icons/obj/weapons.dmi differ diff --git a/paradise.dme b/paradise.dme index a6a115cd804..7b7a19caf94 100644 --- a/paradise.dme +++ b/paradise.dme @@ -215,6 +215,7 @@ #include "code\datums\spells\mind_transfer.dm" #include "code\datums\spells\projectile.dm" #include "code\datums\spells\summonitem.dm" +#include "code\datums\spells\touch_attacks.dm" #include "code\datums\spells\trigger.dm" #include "code\datums\spells\turf_teleport.dm" #include "code\datums\spells\wizard.dm" @@ -370,6 +371,7 @@ #include "code\game\gamemodes\vampire\vampire.dm" #include "code\game\gamemodes\vampire\vampire_powers.dm" #include "code\game\gamemodes\wizard\artefact.dm" +#include "code\game\gamemodes\wizard\godhand.dm" #include "code\game\gamemodes\wizard\raginmages.dm" #include "code\game\gamemodes\wizard\rightandwrong.dm" #include "code\game\gamemodes\wizard\soulstone.dm"