Merge branch 'master' into pawnch_2_the_pawnchening
This commit is contained in:
@@ -659,7 +659,7 @@
|
||||
return FALSE
|
||||
var/obj/effect/proc_holder/spell/S = target
|
||||
if(owner)
|
||||
return S.can_cast(owner)
|
||||
return S.can_cast(owner, FALSE, TRUE)
|
||||
return FALSE
|
||||
|
||||
/datum/action/spell_action/alien
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
/datum/element/spellcasting //allows to cast certain spells or skip requirements.
|
||||
element_flags = ELEMENT_BESPOKE|ELEMENT_DETACH
|
||||
id_arg_index = 2
|
||||
var/cast_flags
|
||||
var/cast_slots
|
||||
var/list/users_by_item = list()
|
||||
|
||||
/datum/element/spellcasting/Attach(datum/target, _flags, _slots)
|
||||
. = ..()
|
||||
if(isitem(target))
|
||||
RegisterSignal(target, COMSIG_ITEM_EQUIPPED, .proc/on_equip)
|
||||
RegisterSignal(target, COMSIG_ITEM_DROPPED, .proc/on_drop)
|
||||
else if(ismob(target))
|
||||
RegisterSignal(target, COMSIG_MOB_SPELL_CAST_CHECK, .proc/on_cast)
|
||||
else
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
cast_flags = _flags
|
||||
cast_slots = _slots
|
||||
|
||||
/datum/element/spellcasting/Detach(datum/target)
|
||||
. = ..()
|
||||
UnregisterSignal(target, list(COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED, COMSIG_MOB_SPELL_CAST_CHECK))
|
||||
if(users_by_item[target])
|
||||
var/mob/user = users_by_item[target]
|
||||
UnregisterSignal(user, COMSIG_MOB_SPELL_CAST_CHECK)
|
||||
|
||||
/datum/element/spellcasting/proc/on_equip(datum/source, mob/equipper, slot)
|
||||
if(slot in cast_slots)
|
||||
RegisterSignal(equipper, COMSIG_MOB_SPELL_CAST_CHECK, .proc/on_cast)
|
||||
users_by_item[source] = equipper
|
||||
|
||||
/datum/element/spellcasting/proc/on_drop(datum/source, mob/user)
|
||||
UnregisterSignal(user, COMSIG_MOB_SPELL_CAST_CHECK)
|
||||
users_by_item -= source
|
||||
|
||||
/datum/element/spellcasting/proc/on_cast(mob/caster, obj/effect/proc_holder/spell)
|
||||
return cast_flags
|
||||
@@ -41,7 +41,7 @@
|
||||
desc = "You can breathe fire at a target."
|
||||
school = "evocation"
|
||||
charge_max = 600
|
||||
clothes_req = FALSE
|
||||
clothes_req = NONE
|
||||
range = 20
|
||||
base_icon_state = "fireball"
|
||||
action_icon_state = "fireball0"
|
||||
@@ -121,7 +121,7 @@
|
||||
name = "Convoke Void" //magic the gathering joke here
|
||||
desc = "A rare genome that attracts odd forces not usually observed. May sometimes pull you in randomly."
|
||||
school = "evocation"
|
||||
clothes_req = FALSE
|
||||
clothes_req = NONE
|
||||
charge_max = 600
|
||||
invocation = "DOOOOOOOOOOOOOOOOOOOOM!!!"
|
||||
invocation_type = "shout"
|
||||
@@ -155,7 +155,7 @@
|
||||
dropmessage = "You let the electricity from your hand dissipate."
|
||||
hand_path = /obj/item/melee/touch_attack/shock
|
||||
charge_max = 400
|
||||
clothes_req = FALSE
|
||||
clothes_req = NONE
|
||||
action_icon_state = "zap"
|
||||
|
||||
/obj/item/melee/touch_attack/shock
|
||||
@@ -211,7 +211,7 @@
|
||||
name = "Remember the Scent"
|
||||
desc = "Get a scent off of the item you're currently holding to track it. With an empty hand, you'll track the scent you've remembered."
|
||||
charge_max = 100
|
||||
clothes_req = FALSE
|
||||
clothes_req = NONE
|
||||
range = -1
|
||||
include_user = TRUE
|
||||
action_icon_state = "nose"
|
||||
@@ -289,8 +289,7 @@
|
||||
/obj/effect/proc_holder/spell/self/self_amputation
|
||||
name = "Drop a limb"
|
||||
desc = "Concentrate to make a random limb pop right off your body."
|
||||
clothes_req = FALSE
|
||||
human_req = FALSE
|
||||
clothes_req = NONE
|
||||
charge_max = 100
|
||||
action_icon_state = "autotomy"
|
||||
|
||||
@@ -327,8 +326,7 @@
|
||||
/obj/effect/proc_holder/spell/self/lay_genetic_web
|
||||
name = "Lay Web"
|
||||
desc = "Drops a web. Only you will be able to traverse your web easily, making it pretty good for keeping you safe."
|
||||
clothes_req = FALSE
|
||||
human_req = FALSE
|
||||
clothes_req = NONE
|
||||
charge_max = 4 SECONDS //the same time to lay a web
|
||||
action_icon = 'icons/mob/actions/actions_genetic.dmi'
|
||||
action_icon_state = "lay_web"
|
||||
@@ -369,8 +367,7 @@
|
||||
/obj/effect/proc_holder/spell/self/tongue_spike
|
||||
name = "Launch spike"
|
||||
desc = "Shoot your tongue out in the direction you're facing, embedding it and dealing damage until they remove it."
|
||||
clothes_req = FALSE
|
||||
human_req = TRUE
|
||||
clothes_req = NONE
|
||||
charge_max = 100
|
||||
action_icon = 'icons/mob/actions/actions_genetic.dmi'
|
||||
action_icon_state = "spike"
|
||||
|
||||
Reference in New Issue
Block a user