mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-30 20:22:32 +00:00
* Moves alien verbs to spells * lol * Standardization, polish, making alien plasma huds more consistant * The very cursed way of handling touch spells * logging + more polish * snakecase + documentation * finishing touches * oops, ty henri Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * sprites from TGstation * sprites, again * oops * farie's review part 1 * farie's review p2, signals * Erics PR compat * farie's review 3 * that too * the shawnshank redemption * boink * removes larva transfer plasma * you want a sprite cranberry? * TM fix 1 * FUCK I BROKE LOGGING * bam * final touches --------- Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
76 lines
2.6 KiB
Plaintext
76 lines
2.6 KiB
Plaintext
/obj/effect/proc_holder/spell/touch
|
|
var/hand_path = /obj/item/melee/touch_attack
|
|
var/obj/item/melee/touch_attack/attached_hand = null
|
|
var/on_remove_message = TRUE
|
|
invocation_type = "none" //you scream on connecting, not summoning
|
|
|
|
/obj/effect/proc_holder/spell/touch/create_new_targeting()
|
|
return new /datum/spell_targeting/self
|
|
|
|
/obj/effect/proc_holder/spell/touch/Click(mob/user = usr)
|
|
if(attached_hand)
|
|
qdel(attached_hand)
|
|
cooldown_handler.revert_cast()
|
|
attached_hand = null
|
|
if(on_remove_message)
|
|
to_chat(user, "<span class='notice'>You draw the power out of your hand.</span>")
|
|
return FALSE
|
|
..()
|
|
|
|
/obj/effect/proc_holder/spell/touch/cast(list/targets, mob/user = usr)
|
|
for(var/mob/living/carbon/target in targets)
|
|
if(!attached_hand)
|
|
if(!ChargeHand(target))
|
|
return FALSE
|
|
while(attached_hand) //hibernate untill the spell is actually used
|
|
cooldown_handler.recharge_time++ // adds a tick onto the cooldown each tick
|
|
sleep(1)
|
|
|
|
/obj/effect/proc_holder/spell/touch/proc/ChargeHand(mob/living/carbon/user)
|
|
var/hand_handled = 1
|
|
attached_hand = new hand_path(src)
|
|
if(isalien(user))
|
|
user.put_in_hands(attached_hand)
|
|
return
|
|
if(user.hand) //left active hand
|
|
if(!user.equip_to_slot_if_possible(attached_hand, slot_l_hand, FALSE, TRUE))
|
|
if(!user.equip_to_slot_if_possible(attached_hand, slot_r_hand, FALSE, TRUE))
|
|
hand_handled = 0
|
|
else //right active hand
|
|
if(!user.equip_to_slot_if_possible(attached_hand, slot_r_hand, FALSE, TRUE))
|
|
if(!user.equip_to_slot_if_possible(attached_hand, slot_l_hand, FALSE, TRUE))
|
|
hand_handled = 0
|
|
if(!hand_handled)
|
|
qdel(attached_hand)
|
|
cooldown_handler.revert_cast()
|
|
attached_hand = null
|
|
to_chat(user, "<span class='warning'>Your hands are full!</span>")
|
|
return 0
|
|
to_chat(user, "<span class='notice'>You channel the power of the spell to your hand.</span>")
|
|
return 1
|
|
|
|
|
|
/obj/effect/proc_holder/spell/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/melee/touch_attack/disintegrate
|
|
|
|
school = "evocation"
|
|
base_cooldown = 600
|
|
clothes_req = TRUE
|
|
cooldown_min = 200 //100 deciseconds reduction per rank
|
|
|
|
action_icon_state = "gib"
|
|
|
|
/obj/effect/proc_holder/spell/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/melee/touch_attack/fleshtostone
|
|
|
|
school = "transmutation"
|
|
base_cooldown = 600
|
|
clothes_req = TRUE
|
|
cooldown_min = 200 //100 deciseconds reduction per rank
|
|
|
|
action_icon_state = "statue"
|