mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 21:19:00 +01:00
Wizard touch attacks and fixes
- Flesh to Stone and Disintegrate are now actual touch attacks. - Fixes issue with in-hands and back sprites missing for the staff of animation. - Fixes missing right-handed in-hand for the staff of healing.
This commit is contained in:
@@ -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 << "<span class='notice'>You draw the power out of your hand.</span>"
|
||||
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 << "<span class='warning'>Your hands are full!</span>"
|
||||
return 0
|
||||
user << "<span class='notice'>You channel the power of the spell to your hand.</span>"
|
||||
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"
|
||||
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user