Files
Paradise/code/datums/spells/touch_attacks.dm
GDN eee8878024 Datumizes spells (#24242)
* datumized spells

* finished

* last changes

* conflict

* Update code/datums/spells/alien_spells/transfer_plasma.dm

* conflicts

* shitty runtime fix until i get to this tomorrow

* Update code/datums/spell.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/datums/spell_handler/alien_spell_handler.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/datums/spells/alien_spells/regurgitate.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/datums/spells/alien_spells/regurgitate.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/datums/spells/bloodcrawl.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/datums/spells/bloodcrawl.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/modules/antagonists/vampire/vampire_powers/hemomancer_powers.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/modules/antagonists/vampire/vampire_powers/vampire_powers.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/modules/awaymissions/mission_code/ruins/wizardcrash.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/modules/research/xenobiology/xenobiology.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/modules/mob/living/carbon/superheroes.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/datums/spells/conjure.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/datums/spells/ethereal_jaunt.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/datums/spells/emplosion.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/datums/spells/turf_teleport.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/datums/spells/wizard_spells.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/datums/spells/wizard_spells.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/game/dna/mutations/mutation_powers.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/datums/spells/wizard_spells.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/datums/spells/wizard_spells.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/game/dna/mutations/mutation_powers.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/game/gamemodes/miniantags/revenant/revenant_abilities.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* guess who just rework the entire malf ai actionsf ai

* gc better

---------

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
2024-04-01 07:42:21 +00:00

74 lines
2.4 KiB
Plaintext

/datum/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
/datum/spell/touch/create_new_targeting()
return new /datum/spell_targeting/self
/datum/spell/touch/Click(mob/user = usr)
if(attached_hand)
discharge_hand(user, TRUE)
return FALSE
charge_hand(user)
/datum/spell/touch/proc/charge_hand(mob/living/carbon/user)
var/hand_handled = 1
attached_hand = new hand_path(src)
RegisterSignal(user, COMSIG_MOB_WILLINGLY_DROP, PROC_REF(discharge_hand))
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_HUD_LEFT_HAND, FALSE, TRUE))
if(!user.equip_to_slot_if_possible(attached_hand, SLOT_HUD_RIGHT_HAND, FALSE, TRUE))
hand_handled = 0
else //right active hand
if(!user.equip_to_slot_if_possible(attached_hand, SLOT_HUD_RIGHT_HAND, FALSE, TRUE))
if(!user.equip_to_slot_if_possible(attached_hand, SLOT_HUD_LEFT_HAND, FALSE, TRUE))
hand_handled = 0
if(!hand_handled)
qdel(attached_hand)
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
/datum/spell/touch/proc/discharge_hand(atom/target, any = FALSE)
SIGNAL_HANDLER
var/mob/living/carbon/user = action.owner
if(!istype(attached_hand))
return
if(!any && attached_hand != user.get_active_hand())
return
QDEL_NULL(attached_hand)
if(on_remove_message)
to_chat(user, "<span class='notice'>You draw the power out of your hand.</span>")
/datum/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"
/datum/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"