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>
This commit is contained in:
GDN
2024-04-01 02:42:21 -05:00
committed by GitHub
parent d52535a041
commit eee8878024
149 changed files with 1358 additions and 1536 deletions
+6 -6
View File
@@ -637,7 +637,7 @@
/datum/action/spell_action/New(Target)
..()
var/obj/effect/proc_holder/spell/S = target
var/datum/spell/S = target
S.action = src
name = S.name
desc = S.desc
@@ -648,7 +648,7 @@
/datum/action/spell_action/Destroy()
var/obj/effect/proc_holder/spell/S = target
var/datum/spell/S = target
S.action = null
return ..()
@@ -656,27 +656,27 @@
if(!..())
return FALSE
if(target)
var/obj/effect/proc_holder/spell = target
var/datum/spell/spell = target
spell.Click()
return TRUE
/datum/action/spell_action/AltTrigger()
if(target)
var/obj/effect/proc_holder/spell/spell = target
var/datum/spell/spell = target
spell.AltClick(usr)
return TRUE
/datum/action/spell_action/IsAvailable()
if(!target)
return FALSE
var/obj/effect/proc_holder/spell/spell = target
var/datum/spell/spell = target
if(owner)
return spell.can_cast(owner)
return FALSE
/datum/action/spell_action/apply_unavailable_effect(atom/movable/screen/movable/action_button/button)
var/obj/effect/proc_holder/spell/S = target
var/datum/spell/S = target
if(!istype(S))
return ..()
+5 -5
View File
@@ -1052,7 +1052,7 @@
log_admin("[key_name(usr)] has removed [key_name(current)]'s vampire subclass.")
message_admins("[key_name_admin(usr)] has removed [key_name_admin(current)]'s vampire subclass.")
else
vamp.upgrade_tiers -= /obj/effect/proc_holder/spell/vampire/self/specialize
vamp.upgrade_tiers -= /datum/spell/vampire/self/specialize
vamp.change_subclass(subclass_type)
log_admin("[key_name(usr)] has removed [key_name(current)]'s vampire subclass.")
message_admins("[key_name_admin(usr)] has removed [key_name_admin(current)]'s vampire subclass.")
@@ -1676,14 +1676,14 @@
SEND_SOUND(H, sound('sound/ambience/antag/abductors.ogg'))
H.create_log(MISC_LOG, "[H] was made into an abductor")
/datum/mind/proc/AddSpell(obj/effect/proc_holder/spell/S)
/datum/mind/proc/AddSpell(datum/spell/S)
spell_list += S
S.action.Grant(current)
/datum/mind/proc/RemoveSpell(obj/effect/proc_holder/spell/spell) //To remove a specific spell from a mind
/datum/mind/proc/RemoveSpell(datum/spell/spell) //To remove a specific spell from a mind
if(!spell)
return
for(var/obj/effect/proc_holder/spell/S in spell_list)
for(var/datum/spell/S in spell_list)
if(istype(S, spell))
qdel(S)
spell_list -= S
@@ -1696,7 +1696,7 @@
/datum/mind/proc/transfer_mindbound_actions(mob/living/new_character)
for(var/X in spell_list)
var/obj/effect/proc_holder/spell/S = X
var/datum/spell/S = X
if(!S.on_mind_transfer(new_character))
current.RemoveSpell(S)
continue
+2 -2
View File
@@ -1410,8 +1410,8 @@
box = /obj/item/storage/box/wizard
//The spells that the enforcer has.
var/list/spell_paths = list(/obj/effect/proc_holder/spell/aoe/conjure/summon_supermatter,
/obj/effect/proc_holder/spell/charge_up/bounce/lightning, /obj/effect/proc_holder/spell/summonitem)
var/list/spell_paths = list(/datum/spell/aoe/conjure/summon_supermatter,
/datum/spell/charge_up/bounce/lightning, /datum/spell/summonitem)
/datum/outfit/admin/enforcer/post_equip(mob/living/carbon/human/H)
. = ..()
+63 -71
View File
@@ -1,29 +1,9 @@
/obj/effect/proc_holder
var/panel = "Debug"//What panel the proc holder needs to go on.
var/active = FALSE //Used by toggle based abilities.
var/ranged_mousepointer
var/mob/ranged_ability_user
/obj/effect/proc_holder/singularity_act()
return
/obj/effect/proc_holder/singularity_pull()
return
GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
/obj/effect/proc_holder/proc/InterceptClickOn(mob/user, params, atom/A)
if(user.ranged_ability != src)
to_chat(user, "<span class='warning'><b>[user.ranged_ability.name]</b> has been disabled.")
user.ranged_ability.remove_ranged_ability(user)
return TRUE //TRUE for failed, FALSE for passed.
user.face_atom(A)
return FALSE
GLOBAL_LIST_INIT(spells, typesof(/datum/spell))
/datum/click_intercept/proc_holder
var/obj/effect/proc_holder/spell
var/datum/spell/spell
/datum/click_intercept/proc_holder/New(client/C, obj/effect/proc_holder/spell_to_cast)
/datum/click_intercept/proc_holder/New(client/C, datum/spell/spell_to_cast)
. = ..()
spell = spell_to_cast
@@ -34,7 +14,15 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
spell.remove_ranged_ability(spell.ranged_ability_user)
return ..()
/obj/effect/proc_holder/proc/add_ranged_ability(mob/user, msg)
/datum/spell/proc/InterceptClickOn(mob/user, params, atom/A)
if(user.ranged_ability != src)
to_chat(user, "<span class='warning'><b>[user.ranged_ability.name]</b> has been disabled.</span>")
user.ranged_ability.remove_ranged_ability(user)
return TRUE //TRUE for failed, FALSE for passed.
user.face_atom(A)
return FALSE
/datum/spell/proc/add_ranged_ability(mob/user, msg)
if(!user || !user.client)
return
if(user.ranged_ability && user.ranged_ability != src)
@@ -47,17 +35,20 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
active = TRUE
if(msg)
to_chat(user, msg)
update_icon()
update_spell_icon()
/obj/effect/proc_holder/proc/add_mousepointer(client/C)
/datum/spell/proc/update_spell_icon()
return
/datum/spell/proc/add_mousepointer(client/C)
if(C && ranged_mousepointer && C.mouse_pointer_icon == initial(C.mouse_pointer_icon))
C.mouse_pointer_icon = ranged_mousepointer
/obj/effect/proc_holder/proc/remove_mousepointer(client/C)
/datum/spell/proc/remove_mousepointer(client/C)
if(C && ranged_mousepointer && C.mouse_pointer_icon == ranged_mousepointer)
C.mouse_pointer_icon = initial(C.mouse_pointer_icon)
/obj/effect/proc_holder/proc/remove_ranged_ability(mob/user, msg)
/datum/spell/proc/remove_ranged_ability(mob/user, msg)
if(!user || (user.ranged_ability && user.ranged_ability != src)) //To avoid removing the wrong ability
return
user.ranged_ability = null
@@ -69,14 +60,12 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
remove_mousepointer(user.client)
if(msg)
to_chat(user, msg)
update_icon()
update_spell_icon()
/obj/effect/proc_holder/spell
name = "Spell" // Only rename this if the spell you're making is not abstract
desc = "A wizard spell"
panel = "Spells"//What panel the proc holder needs to go on.
density = FALSE
opacity = FALSE
/datum/spell
var/name = "Spell" // Only rename this if the spell you're making is not abstract
var/desc = "A wizard spell"
var/panel = "Spells"//What panel the proc holder needs to go on.
var/school = "evocation" //not relevant at now, but may be important later if there are changes to how spells work. the ones I used for now will probably be changed... maybe spell presets? lacking flexibility but with some other benefit?
///recharge time in deciseconds
@@ -87,6 +76,9 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
var/holder_var_type = "bruteloss" //only used if charge_type equals to "holder_var"
var/holder_var_amount = 20 //same. The amount adjusted with the mob's var when the spell is used
var/active = FALSE //Used by toggle based abilities.
var/ranged_mousepointer
var/mob/ranged_ability_user
var/ghost = FALSE // Skip life check.
var/clothes_req = TRUE //see if it requires clothes
@@ -153,7 +145,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
* @param start_recharge If the proc should set the cooldown
* @param user The caster of the spell
*/
/obj/effect/proc_holder/spell/proc/cast_check(charge_check = TRUE, start_recharge = TRUE, mob/user = usr) //checks if the spell can be cast based on its settings; skipcharge is used when an additional cast_check is called inside the spell
/datum/spell/proc/cast_check(charge_check = TRUE, start_recharge = TRUE, mob/user = usr) //checks if the spell can be cast based on its settings; skipcharge is used when an additional cast_check is called inside the spell
// SHOULD_NOT_OVERRIDE(TRUE) Todo for another refactor
if(!can_cast(user, charge_check, TRUE))
return FALSE
@@ -178,7 +170,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
* * target - Who is being considered
* * user - Who is the user of this spell
*/
/obj/effect/proc_holder/spell/proc/valid_target(target, user)
/datum/spell/proc/valid_target(target, user)
return TRUE
/**
@@ -187,7 +179,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
* Arguments:
* * user - Who used this spell?
*/
/obj/effect/proc_holder/spell/proc/spend_spell_cost(mob/user)
/datum/spell/proc/spend_spell_cost(mob/user)
SHOULD_CALL_PARENT(TRUE)
custom_handler?.spend_spell_cost(user, src)
@@ -195,7 +187,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
if(action)
action.UpdateButtons()
/obj/effect/proc_holder/spell/proc/invocation(mob/user) //spelling the spell out and setting it on recharge/reducing charges amount
/datum/spell/proc/invocation(mob/user) //spelling the spell out and setting it on recharge/reducing charges amount
switch(invocation_type)
if("shout")
if(!user.IsVocal() || user.cannot_speak_loudly())
@@ -213,10 +205,10 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
if("emote")
user.visible_message(invocation, invocation_emote_self) //same style as in mob/living/emote.dm
/obj/effect/proc_holder/spell/proc/playMagSound()
/datum/spell/proc/playMagSound()
playsound(get_turf(usr), sound,50,1)
/obj/effect/proc_holder/spell/New()
/datum/spell/New()
..()
action = new(src)
still_recharging_msg = "<span class='notice'>[name] is still recharging.</span>"
@@ -236,7 +228,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
cooldown_handler = create_new_cooldown()
cooldown_handler.cooldown_init(src)
/obj/effect/proc_holder/spell/Destroy()
/datum/spell/Destroy()
QDEL_NULL(action)
QDEL_NULL(cooldown_handler)
return ..()
@@ -245,7 +237,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
* Creates and returns the targeting datum for this spell type. Override this!
* Should return a value of type [/datum/spell_targeting]
*/
/obj/effect/proc_holder/spell/proc/create_new_targeting()
/datum/spell/proc/create_new_targeting()
RETURN_TYPE(/datum/spell_targeting)
return
@@ -254,7 +246,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
* Override this if you want a custom spell handler.
* Should return a value of type [/datum/spell_handler] or NONE
*/
/obj/effect/proc_holder/spell/proc/create_new_handler()
/datum/spell/proc/create_new_handler()
RETURN_TYPE(/datum/spell_handler)
return NONE
@@ -263,29 +255,30 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
* Override this if you wish to use a different method of cooldown
*/
/obj/effect/proc_holder/spell/proc/create_new_cooldown()
/datum/spell/proc/create_new_cooldown()
RETURN_TYPE(/datum/spell_cooldown)
var/datum/spell_cooldown/S = new
S.recharge_duration = base_cooldown
S.starts_off_cooldown = starts_charged
return S
/obj/effect/proc_holder/spell/Click()
/datum/spell/proc/Click()
if(cast_check(TRUE, FALSE, usr))
choose_targets(usr)
return 1
/obj/effect/proc_holder/spell/AltClick(mob/user)
/datum/spell/proc/AltClick(mob/user)
return Click()
/obj/effect/proc_holder/spell/InterceptClickOn(mob/user, params, atom/A)
/datum/spell/InterceptClickOn(mob/user, params, atom/A)
. = ..()
if(.)
return
targeting.InterceptClickOn(user, params, A, src)
if(targeting)
targeting.InterceptClickOn(user, params, A, src)
///Lets the spell have a special effect applied to it when upgraded. By default, does nothing.
/obj/effect/proc_holder/spell/proc/on_purchase_upgrade()
/datum/spell/proc/on_purchase_upgrade()
return
/**
@@ -295,7 +288,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
* Arguments:
* * user - The caster of the spell
*/
/obj/effect/proc_holder/spell/proc/choose_targets(mob/user)
/datum/spell/proc/choose_targets(mob/user)
SHOULD_NOT_OVERRIDE(TRUE)
if(targeting.use_intercept_click)
if(active)
@@ -317,7 +310,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
* * targets - The targets the spell is being performed on
* * user - The caster of the spell
*/
/obj/effect/proc_holder/spell/proc/try_perform(list/targets, mob/user)
/datum/spell/proc/try_perform(list/targets, mob/user)
SHOULD_NOT_OVERRIDE(TRUE)
if(!length(targets))
to_chat(user, "<span class='warning'>No suitable target found.</span>")
@@ -333,7 +326,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
* Called in `try_perform` before removing the click interceptor. useful to override if you have a spell that requires more than 1 click
*/
/obj/effect/proc_holder/spell/proc/should_remove_click_intercept()
/datum/spell/proc/should_remove_click_intercept()
return TRUE
/**
@@ -344,7 +337,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
* * recharge - Whether or not the spell should go recharge
* * user - The caster of the spell
*/
/obj/effect/proc_holder/spell/proc/perform(list/targets, recharge = TRUE, mob/user = usr) //if recharge is started is important for the trigger spells
/datum/spell/proc/perform(list/targets, recharge = TRUE, mob/user = usr) //if recharge is started is important for the trigger spells
SHOULD_NOT_OVERRIDE(TRUE)
before_cast(targets, user)
invocation(user)
@@ -371,11 +364,10 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
* * targets - The targets being targeted by the spell
* * user - The user of the spell
*/
/obj/effect/proc_holder/spell/proc/write_custom_logs(list/targets, mob/user)
/datum/spell/proc/write_custom_logs(list/targets, mob/user)
return
/obj/effect/proc_holder/spell/proc/before_cast(list/targets, mob/user)
/datum/spell/proc/before_cast(list/targets, mob/user)
SHOULD_CALL_PARENT(TRUE)
if(overlay)
for(var/atom/target in targets)
@@ -394,7 +386,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
custom_handler?.before_cast(targets, user, src)
/obj/effect/proc_holder/spell/proc/after_cast(list/targets, mob/user)
/datum/spell/proc/after_cast(list/targets, mob/user)
SHOULD_CALL_PARENT(TRUE)
for(var/atom/target in targets)
var/location
@@ -427,21 +419,21 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
* * targets - The targets being targeted by the spell
* * user - The caster of the spell
*/
/obj/effect/proc_holder/spell/proc/cast(list/targets, mob/user = usr)
/datum/spell/proc/cast(list/targets, mob/user = usr)
return
/obj/effect/proc_holder/spell/proc/revert_cast(mob/user = usr) //resets recharge or readds a charge
/datum/spell/proc/revert_cast(mob/user = usr) //resets recharge or readds a charge
cooldown_handler.revert_cast()
custom_handler?.revert_cast(user, src)
if(action)
action.UpdateButtons()
/obj/effect/proc_holder/spell/proc/UpdateButtons()
/datum/spell/proc/UpdateButtons()
if(action)
action.UpdateButtons()
/obj/effect/proc_holder/spell/proc/adjust_var(mob/living/target = usr, type, amount) //handles the adjustment of the var when the spell is used. has some hardcoded types
/datum/spell/proc/adjust_var(mob/living/target = usr, type, amount) //handles the adjustment of the var when the spell is used. has some hardcoded types
switch(type)
if("bruteloss")
target.adjustBruteLoss(amount)
@@ -462,10 +454,10 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
return
///This proc is ran when a mind is transfered to a new mob. Tells it if the action should be transfered on return true, and tells it not to remove it on false
/obj/effect/proc_holder/spell/proc/on_mind_transfer(mob/living/L)
/datum/spell/proc/on_mind_transfer(mob/living/L)
return TRUE
/obj/effect/proc_holder/spell/aoe
/datum/spell/aoe
name = "Spell"
create_attack_logs = FALSE
create_custom_logs = TRUE
@@ -474,10 +466,10 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
// Normally, AoE spells will generate an attack log for every turf they loop over, while searching for targets.
// With this override, all /aoe type spells will only generate 1 log, saying that the user has cast the spell.
/obj/effect/proc_holder/spell/aoe/write_custom_logs(list/targets, mob/user)
/datum/spell/aoe/write_custom_logs(list/targets, mob/user)
add_attack_logs(user, null, "Cast the AoE spell [name]", ATKLOG_ALL)
/obj/effect/proc_holder/spell/proc/can_cast(mob/user = usr, charge_check = TRUE, show_message = FALSE)
/datum/spell/proc/can_cast(mob/user = usr, charge_check = TRUE, show_message = FALSE)
if(((!user.mind) || !(src in user.mind.spell_list)) && !(src in user.mob_spell_list))
if(show_message)
to_chat(user, "<span class='warning'>You shouldn't have this spell! Something's wrong.</span>")
@@ -509,8 +501,8 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
if(ishuman(user))
var/mob/living/carbon/human/H = user
var/clothcheck = locate(/obj/effect/proc_holder/spell/noclothes) in user.mob_spell_list
var/clothcheck2 = user.mind && (locate(/obj/effect/proc_holder/spell/noclothes) in user.mind.spell_list)
var/clothcheck = locate(/datum/spell/noclothes) in user.mob_spell_list
var/clothcheck2 = user.mind && (locate(/datum/spell/noclothes) in user.mind.spell_list)
if(clothes_req && !clothcheck && !clothcheck2) //clothes check
var/obj/item/clothing/robe = H.wear_suit
var/obj/item/clothing/hat = H.head
@@ -538,7 +530,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
return TRUE
/obj/effect/proc_holder/spell/summonmob
/datum/spell/summonmob
name = "Summon Servant"
desc = "This spell can be used to call your servant, whenever you need it."
base_cooldown = 10 SECONDS
@@ -552,10 +544,10 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
action_icon_state = "summons"
/obj/effect/proc_holder/spell/summonmob/create_new_targeting()
/datum/spell/summonmob/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/summonmob/cast(list/targets, mob/user = usr)
/datum/spell/summonmob/cast(list/targets, mob/user = usr)
if(!target_mob)
return
var/turf/Start = get_turf(user)
+1 -1
View File
@@ -8,7 +8,7 @@
/// the time at which a spell charge can be used
var/charge_time
/datum/spell_cooldown/charges/cooldown_init(obj/effect/proc_holder/spell/new_spell)
/datum/spell_cooldown/charges/cooldown_init(datum/spell/new_spell)
. = ..()
if(starts_off_cooldown)
current_charges = max_charges
+2 -2
View File
@@ -6,13 +6,13 @@
/// does it start off cooldown?
var/starts_off_cooldown = TRUE
/// holds a ref to the spell
var/obj/effect/proc_holder/spell/spell_parent
var/datum/spell/spell_parent
/datum/spell_cooldown/Destroy()
spell_parent = null
return ..()
/datum/spell_cooldown/proc/cooldown_init(obj/effect/proc_holder/spell/new_spell)
/datum/spell_cooldown/proc/cooldown_init(datum/spell/new_spell)
spell_parent = new_spell
if(!starts_off_cooldown)
start_recharge()
@@ -8,24 +8,24 @@ This was also the case with the verb implementation, it's just much more obvious
/// Amount of plasma required to use this ability
var/plasma_cost = 0
/datum/spell_handler/alien/can_cast(mob/living/carbon/user, charge_check, show_message, obj/effect/proc_holder/spell/spell)
/datum/spell_handler/alien/can_cast(mob/living/carbon/user, charge_check, show_message, datum/spell/spell)
var/obj/item/organ/internal/alien/plasmavessel/vessel = user.get_int_organ(/obj/item/organ/internal/alien/plasmavessel)
if(!vessel)
return 0
return FALSE
if(vessel.stored_plasma < plasma_cost)
if(show_message)
to_chat(user, "<span class='warning'>You require at least [plasma_cost] plasma to use this ability!</span>")
return FALSE
return TRUE
/datum/spell_handler/alien/spend_spell_cost(mob/living/carbon/user, obj/effect/proc_holder/spell/spell)
/datum/spell_handler/alien/spend_spell_cost(mob/living/carbon/user, datum/spell/spell)
user.use_plasma_spell(plasma_cost, user)
/datum/spell_handler/alien/before_cast(list/targets, mob/living/carbon/user, obj/effect/proc_holder/spell/spell)
/datum/spell_handler/alien/before_cast(list/targets, mob/living/carbon/user, datum/spell/spell)
to_chat(user, "<span class='boldnotice'>You have [user.get_plasma()] plasma left to use.</span>")
user.update_plasma_display(user)
/datum/spell_handler/alien/revert_cast(mob/living/carbon/user, obj/effect/proc_holder/spell/spell)
/datum/spell_handler/alien/revert_cast(mob/living/carbon/user, datum/spell/spell)
user.add_plasma(plasma_cost, user)
to_chat(user, "<span class='boldnotice'>You have [user.get_plasma()] plasma left to use.</span>")
user.update_plasma_display(user)
@@ -2,7 +2,7 @@
/// How much food it costs the morph to use this
var/hunger_cost = 0
/datum/spell_handler/morph/can_cast(mob/living/simple_animal/hostile/morph/user, charge_check, show_message, obj/effect/proc_holder/spell/spell)
/datum/spell_handler/morph/can_cast(mob/living/simple_animal/hostile/morph/user, charge_check, show_message, datum/spell/spell)
if(!istype(user))
if(show_message)
to_chat(user, "<span class='warning'>You should not be able to use this abilty! Report this as a bug on github please.</span>")
@@ -15,13 +15,13 @@
return TRUE
/datum/spell_handler/morph/spend_spell_cost(mob/living/simple_animal/hostile/morph/user, obj/effect/proc_holder/spell/spell)
/datum/spell_handler/morph/spend_spell_cost(mob/living/simple_animal/hostile/morph/user, datum/spell/spell)
user.use_food(hunger_cost)
/datum/spell_handler/morph/before_cast(list/targets, mob/living/simple_animal/hostile/morph/user, obj/effect/proc_holder/spell/spell)
/datum/spell_handler/morph/before_cast(list/targets, mob/living/simple_animal/hostile/morph/user, datum/spell/spell)
if(hunger_cost)
to_chat(user, "<span class='boldnotice'>You have [user.gathered_food] left to use.</span>")
/datum/spell_handler/morph/revert_cast(mob/living/simple_animal/hostile/morph/user, obj/effect/proc_holder/spell/spell)
/datum/spell_handler/morph/revert_cast(mob/living/simple_animal/hostile/morph/user, datum/spell/spell)
user.add_food(hunger_cost)
to_chat(user, "<span class='boldnotice'>You have [user.gathered_food] left to use.</span>")
+5 -5
View File
@@ -6,17 +6,17 @@
/datum/spell_handler
/datum/spell_handler/proc/can_cast(mob/user, charge_check, show_message, obj/effect/proc_holder/spell/spell)
/datum/spell_handler/proc/can_cast(mob/user, charge_check, show_message, datum/spell/spell)
return TRUE
/datum/spell_handler/proc/spend_spell_cost(mob/user, obj/effect/proc_holder/spell/spell)
/datum/spell_handler/proc/spend_spell_cost(mob/user, datum/spell/spell)
return
/datum/spell_handler/proc/revert_cast(mob/user, obj/effect/proc_holder/spell/spell)
/datum/spell_handler/proc/revert_cast(mob/user, datum/spell/spell)
return
/datum/spell_handler/proc/before_cast(list/targets, mob/user, obj/effect/proc_holder/spell/spell)
/datum/spell_handler/proc/before_cast(list/targets, mob/user, datum/spell/spell)
return
/datum/spell_handler/proc/after_cast(list/targets, mob/user, obj/effect/proc_holder/spell/spell)
/datum/spell_handler/proc/after_cast(list/targets, mob/user, datum/spell/spell)
return
+3 -3
View File
@@ -3,7 +3,7 @@
/// If the blood cost should be handled by this handler. Or if the spell will handle it itself
var/deduct_blood_on_cast = TRUE
/datum/spell_handler/vampire/can_cast(mob/user, charge_check, show_message, obj/effect/proc_holder/spell/spell)
/datum/spell_handler/vampire/can_cast(mob/user, charge_check, show_message, datum/spell/spell)
var/datum/antagonist/vampire/vampire = user.mind.has_antag_datum(/datum/antagonist/vampire)
if(!vampire)
@@ -31,7 +31,7 @@
return FALSE
return TRUE
/datum/spell_handler/vampire/spend_spell_cost(mob/user, obj/effect/proc_holder/spell/spell)
/datum/spell_handler/vampire/spend_spell_cost(mob/user, datum/spell/spell)
if(!required_blood || !deduct_blood_on_cast) //don't take the blood yet if this is false!
return
@@ -44,7 +44,7 @@
var/blood_cost = round(required_blood * blood_cost_modifier)
return blood_cost
/datum/spell_handler/vampire/after_cast(list/targets, mob/user, obj/effect/proc_holder/spell/spell)
/datum/spell_handler/vampire/after_cast(list/targets, mob/user, datum/spell/spell)
if(!spell.should_recharge_after_cast)
return
if(!required_blood)
+1 -1
View File
@@ -4,7 +4,7 @@
/datum/spell_targeting/alive_mob_list
allowed_type = /mob/living
/datum/spell_targeting/alive_mob_list/choose_targets(mob/user, obj/effect/proc_holder/spell/spell, params, atom/clicked_atom)
/datum/spell_targeting/alive_mob_list/choose_targets(mob/user, datum/spell/spell, params, atom/clicked_atom)
var/list/possible_targets = list()
for(var/mob/living/possible_target as anything in GLOB.alive_mob_list)
if(valid_target(possible_target, user, spell, FALSE))
+1 -1
View File
@@ -6,7 +6,7 @@
/// The radius of turfs not being affected. -1 is inactive
var/inner_radius = -1
/datum/spell_targeting/aoe/choose_targets(mob/user, obj/effect/proc_holder/spell/spell, params, atom/clicked_atom)
/datum/spell_targeting/aoe/choose_targets(mob/user, datum/spell/spell, params, atom/clicked_atom)
var/list/targets = list()
var/spell_center = use_turf_of_user ? get_turf(user) : user
@@ -9,7 +9,7 @@
var/random_target_priority = SPELL_TARGET_CLOSEST
/datum/spell_targeting/click/choose_targets(mob/user, obj/effect/proc_holder/spell/spell, params, atom/clicked_atom)
/datum/spell_targeting/click/choose_targets(mob/user, datum/spell/spell, params, atom/clicked_atom)
var/list/targets = list()
if(valid_target(clicked_atom, user, spell))
targets.Add(clicked_atom)
+2 -2
View File
@@ -4,11 +4,11 @@
/datum/spell_targeting/clicked_atom
use_intercept_click = TRUE
/datum/spell_targeting/clicked_atom/choose_targets(mob/user, obj/effect/proc_holder/spell/spell, params, atom/clicked_atom)
/datum/spell_targeting/clicked_atom/choose_targets(mob/user, datum/spell/spell, params, atom/clicked_atom)
if(clicked_atom)
return list(clicked_atom)
/datum/spell_targeting/clicked_atom/external/choose_targets(mob/user, obj/effect/proc_holder/spell/spell, params, atom/clicked_atom)
/datum/spell_targeting/clicked_atom/external/choose_targets(mob/user, datum/spell/spell, params, atom/clicked_atom)
. = ..()
if(!.)
return list()
@@ -25,7 +25,7 @@
/obj/item/bio_chip
)
/datum/spell_targeting/matter_eater/choose_targets(mob/user, obj/effect/proc_holder/spell/spell, params, atom/clicked_atom)
/datum/spell_targeting/matter_eater/choose_targets(mob/user, datum/spell/spell, params, atom/clicked_atom)
var/list/possible_targets = list()
for(var/atom/movable/O in view_or_range(range, user, selection_type))
@@ -3,7 +3,7 @@
*/
/datum/spell_targeting/reachable_turfs
/datum/spell_targeting/reachable_turfs/choose_targets(mob/user, obj/effect/proc_holder/spell/spell, params, atom/clicked_atom)
/datum/spell_targeting/reachable_turfs/choose_targets(mob/user, datum/spell/spell, params, atom/clicked_atom)
var/list/turf/locs = list()
for(var/direction in GLOB.alldirs)
if(length(locs) == max_targets) //we found 2 locations and thats all we need
@@ -3,7 +3,7 @@
*/
/datum/spell_targeting/remoteview
/datum/spell_targeting/remoteview/choose_targets(mob/user, obj/effect/proc_holder/spell/spell, params, atom/clicked_atom)
/datum/spell_targeting/remoteview/choose_targets(mob/user, datum/spell/spell, params, atom/clicked_atom)
var/list/remoteviewers = list()
for(var/mob/M in GLOB.alive_mob_list)
if(M == user)
@@ -3,5 +3,5 @@
*/
/datum/spell_targeting/self
/datum/spell_targeting/self/choose_targets(mob/user, obj/effect/proc_holder/spell/spell, params, atom/clicked_atom)
/datum/spell_targeting/self/choose_targets(mob/user, datum/spell/spell, params, atom/clicked_atom)
return list(user) // That's how simple it is
@@ -34,14 +34,14 @@
* * params - Params given by the intercept click. Only available if use_intercept_click is TRUE
* * clicked_atom - The atom clicked on. Only available if use_intercept_click is TRUE
*/
/datum/spell_targeting/proc/choose_targets(mob/user, obj/effect/proc_holder/spell/spell, params, atom/clicked_atom)
/datum/spell_targeting/proc/choose_targets(mob/user, datum/spell/spell, params, atom/clicked_atom)
RETURN_TYPE(/list)
return
/**
* Will attempt to auto target the spell. Only works with 1 target currently
*/
/datum/spell_targeting/proc/attempt_auto_target(mob/user, obj/effect/proc_holder/spell/spell)
/datum/spell_targeting/proc/attempt_auto_target(mob/user, datum/spell/spell)
var/atom/target
for(var/atom/A in view_or_range(range, use_turf_of_user ? get_turf(user) : user, selection_type))
if(valid_target(A, user, spell, FALSE))
@@ -64,7 +64,7 @@
* * A - Atom the user clicked on
* * spell - The spell being cast
*/
/datum/spell_targeting/proc/InterceptClickOn(mob/user, params, atom/A, obj/effect/proc_holder/spell/spell)
/datum/spell_targeting/proc/InterceptClickOn(mob/user, params, atom/A, datum/spell/spell)
var/list/targets = choose_targets(user, spell, params, A)
spell.try_perform(targets, user)
@@ -77,7 +77,7 @@
* * spell - The spell being cast
* * check_if_in_range - If a view/range check has to be done to see if the target is valid
*/
/datum/spell_targeting/proc/valid_target(target, user, obj/effect/proc_holder/spell/spell, check_if_in_range = TRUE)
/datum/spell_targeting/proc/valid_target(target, user, datum/spell/spell, check_if_in_range = TRUE)
SHOULD_CALL_PARENT(TRUE)
return istype(target, allowed_type) && (include_user || target != user) && \
spell.valid_target(target, user) && (!check_if_in_range || (target in view_or_range(range, use_turf_of_user ? get_turf(user) : user, selection_type))) \
+1 -1
View File
@@ -9,7 +9,7 @@
/// Who to target when too many targets are found. Only matters when max_targets = 1
var/target_priority = SPELL_TARGET_CLOSEST
/datum/spell_targeting/targeted/choose_targets(mob/user, obj/effect/proc_holder/spell/spell, params, atom/clicked_atom)
/datum/spell_targeting/targeted/choose_targets(mob/user, datum/spell/spell, params, atom/clicked_atom)
var/list/targets = list()
var/list/possible_targets = list()
var/atom/spell_location = use_turf_of_user ? get_turf(user) : user
+1 -1
View File
@@ -3,7 +3,7 @@
*/
/datum/spell_targeting/telepathic
/datum/spell_targeting/telepathic/choose_targets(mob/user, obj/effect/proc_holder/spell/spell, params, atom/clicked_atom)
/datum/spell_targeting/telepathic/choose_targets(mob/user, datum/spell/spell, params, atom/clicked_atom)
var/list/valid_targets = list()
var/turf/T = get_turf(user)
var/list/mobs_in_view = user.get_visible_mobs()
@@ -17,7 +17,7 @@ Updates the spell's actions on use as well, so they know when they can or can't
for(var/datum/action/spell_action/action in actions)
action.UpdateButtons()
/obj/effect/proc_holder/spell/alien_spell
/datum/spell/alien_spell
action_background_icon_state = "bg_alien"
clothes_req = FALSE
base_cooldown = 0
@@ -28,15 +28,15 @@ Updates the spell's actions on use as well, so they know when they can or can't
var/plasma_cost = 0
/// Every single alien spell uses a "spell name + plasmacost" format
/obj/effect/proc_holder/spell/alien_spell/Initialize(mapload)
. = ..()
/datum/spell/alien_spell/New()
..()
if(plasma_cost)
name = "[name] ([plasma_cost])"
/obj/effect/proc_holder/spell/alien_spell/write_custom_logs(list/targets, mob/user)
/datum/spell/alien_spell/write_custom_logs(list/targets, mob/user)
user.create_log(ATTACK_LOG, "Cast the spell [name]")
/obj/effect/proc_holder/spell/alien_spell/create_new_handler()
/datum/spell/alien_spell/create_new_handler()
var/datum/spell_handler/alien/handler = new
handler.plasma_cost = plasma_cost
return handler
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/touch/alien_spell
/datum/spell/touch/alien_spell
name = "Basetype Alien spell"
desc = "You should not see this in game, if you do file a github report!"
hand_path = "/obj/item/melee/touch_attack/alien"
@@ -15,20 +15,20 @@
var/plasma_cost = 0
action_icon_state = "gib"
/obj/effect/proc_holder/spell/touch/alien_spell/Initialize(mapload)
. = ..()
/datum/spell/touch/alien_spell/New()
..()
if(plasma_cost)
name = "[name] ([plasma_cost])"
/obj/effect/proc_holder/spell/touch/alien_spell/Click(mob/user = usr)
/datum/spell/touch/alien_spell/Click(mob/user = usr)
if(attached_hand)
to_chat(user, "<span class='noticealien'>You withdraw your [src].</span>")
..()
/obj/effect/proc_holder/spell/touch/alien_spell/write_custom_logs(list/targets, mob/user)
/datum/spell/touch/alien_spell/write_custom_logs(list/targets, mob/user)
user.create_log(ATTACK_LOG, "Cast the spell [name]")
/obj/effect/proc_holder/spell/touch/alien_spell/create_new_handler()
/datum/spell/touch/alien_spell/create_new_handler()
var/datum/spell_handler/alien/H = new
H.plasma_cost = plasma_cost
return H
@@ -1,16 +1,16 @@
/obj/effect/proc_holder/spell/alien_spell/build_resin
/datum/spell/alien_spell/build_resin
name = "Build Resin Structure"
desc = "Allows you to create resin structures. Does not work while in space."
plasma_cost = 55
action_icon_state = "alien_resin"
/obj/effect/proc_holder/spell/alien_spell/build_resin/create_new_targeting()
/datum/spell/alien_spell/build_resin/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/alien_spell/build_resin/cast(list/targets, mob/living/carbon/user)
var/static/list/resin_buildings = list("Resin Wall" = image(icon = 'icons/obj/smooth_structures/alien/resin_wall.dmi', icon_state = "resin_wall-0"),
"Resin Nest" = image(icon = 'icons/mob/alien.dmi', icon_state = "nest"),
"Resin Door" = image(icon = 'icons/obj/smooth_structures/alien/resin_door.dmi', icon_state = "resin"),
/datum/spell/alien_spell/build_resin/cast(list/targets, mob/living/carbon/user)
var/static/list/resin_buildings = list("Resin Wall (55)" = image(icon = 'icons/obj/smooth_structures/alien/resin_wall.dmi', icon_state = "resin_wall-0"),
"Resin Nest (55)" = image(icon = 'icons/mob/alien.dmi', icon_state = "nest"),
"Resin door (80)" = image(icon = 'icons/obj/smooth_structures/alien/resin_door.dmi', icon_state = "resin"),
"Revival Nest" = image(icon = 'icons/mob/alien.dmi', icon_state = "placeholder_rejuv_nest"))
var/choice = show_radial_menu(user, user, resin_buildings, src, radius = 40)
var/turf/turf_to_spawn_at = user.loc
@@ -29,7 +29,7 @@
to_chat(user, "<span class='danger'>There is already a resin construction here.</span>")
revert_cast(user)
return
visible_message("<span class='alertalien'>[user] vomits up a thick purple substance and shapes it!</span>")
user.visible_message("<span class='alertalien'>[user] vomits up a thick purple substance and shapes it!</span>")
switch(choice)
if("Resin Wall")
new /obj/structure/alien/resin/wall(turf_to_spawn_at)
@@ -40,7 +40,7 @@
if("Revival Nest")
new /obj/structure/bed/revival_nest(turf_to_spawn_at)
/obj/effect/proc_holder/spell/touch/alien_spell/consume_resin
/datum/spell/touch/alien_spell/consume_resin
name = "Consume resin structures"
desc = "Allows you to rip and tear straight through resin structures."
action_icon_state = "alien_resin"
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/touch/alien_spell/corrosive_acid
/datum/spell/touch/alien_spell/corrosive_acid
name = "Corrosive acid"
desc = "Spit acid on someone in range, this acid melts through nearly anything and heavily damages anyone lacking proper safety equipment."
hand_path = "/obj/item/melee/touch_attack/alien/corrosive_acid"
@@ -32,7 +32,7 @@
to_chat(user, "<span class='noticealien'>You cannot dissolve this object.</span>")
..()
/obj/effect/proc_holder/spell/touch/alien_spell/burning_touch
/datum/spell/touch/alien_spell/burning_touch
name = "Blazing touch"
desc = "Boil acid within your hand to burn through anything you touch with it, deals a lot of damage to aliens and destroys resin structures instantly."
hand_path = "/obj/item/melee/touch_attack/alien/burning_touch"
@@ -1,13 +1,13 @@
// Make this reflect amount grown, can't do that currently
/obj/effect/proc_holder/spell/alien_spell/evolve_larva
/datum/spell/alien_spell/evolve_larva
name = "Evolve."
desc = "Evolve into a fully grown Alien."
action_icon_state = "alien_evolve_larva"
/obj/effect/proc_holder/spell/alien_spell/evolve_larva/create_new_targeting()
/datum/spell/alien_spell/evolve_larva/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/alien_spell/evolve_larva/cast(list/targets, mob/living/carbon/alien/larva/user)
/datum/spell/alien_spell/evolve_larva/cast(list/targets, mob/living/carbon/alien/larva/user)
if(user.stat != CONSCIOUS)
return
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/alien_spell/plant_weeds/eggs
/datum/spell/alien_spell/plant_weeds/eggs
name = "Plant alien eggs"
desc = "Allows you to plant alien eggs on your current turf, does not work while in space."
plasma_cost = 75
@@ -7,17 +7,17 @@
action_icon_state = "alien_egg"
requires_do_after = FALSE
/obj/effect/proc_holder/spell/alien_spell/combust_facehuggers
/datum/spell/alien_spell/combust_facehuggers
name = "Combust facehuggers and eggs"
desc = "Take over the programming of facehuggers and eggs, sending out a shockwave which causes them to combust."
plasma_cost = 25
action_icon_state = "alien_egg"
base_cooldown = 3 SECONDS
/obj/effect/proc_holder/spell/alien_spell/combust_facehuggers/create_new_targeting()
/datum/spell/alien_spell/combust_facehuggers/create_new_targeting()
return new /datum/spell_targeting/clicked_atom
/obj/effect/proc_holder/spell/alien_spell/combust_facehuggers/cast(list/targets, mob/living/carbon/user)
/datum/spell/alien_spell/combust_facehuggers/cast(list/targets, mob/living/carbon/user)
var/obj/target = targets[1]
var/turf/T = user.loc
if(!istype(T) || !istype(target))
@@ -33,7 +33,7 @@
to_chat(user, "<span class='noticealien'>[target] will explode in 3 seconds!</span>")
return TRUE
/obj/effect/proc_holder/spell/alien_spell/combust_facehuggers/proc/blow_it_up(obj/target, mob/user)
/datum/spell/alien_spell/combust_facehuggers/proc/blow_it_up(obj/target, mob/user)
add_attack_logs(user, target, "Caused it to explode")
explosion(get_turf(target), 0, 2, 3, 3, cause = user)
to_chat(user, "<span class='noticealien'>[target] has detonated!</span>")
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/alien_spell/neurotoxin
/datum/spell/alien_spell/neurotoxin
name = "Neurotoxin spit"
desc = "This ability allows you to fire some neurotoxin. Knocks down anyone you hit, applies a small amount of stamina damage as well."
base_cooldown = 3 SECONDS
@@ -9,16 +9,16 @@
action_icon_state = "alien_neurotoxin_0"
active = FALSE
/obj/effect/proc_holder/spell/alien_spell/neurotoxin/create_new_targeting()
/datum/spell/alien_spell/neurotoxin/create_new_targeting()
return new /datum/spell_targeting/clicked_atom
/obj/effect/proc_holder/spell/alien_spell/neurotoxin/update_icon_state()
/datum/spell/alien_spell/neurotoxin/update_spell_icon()
if(!action)
return
action.button_icon_state = "alien_neurotoxin_[active]"
action.UpdateButtons()
/obj/effect/proc_holder/spell/alien_spell/neurotoxin/cast(list/targets, mob/living/carbon/user)
/datum/spell/alien_spell/neurotoxin/cast(list/targets, mob/living/carbon/user)
var/target = targets[1]
var/turf/T = user.loc
var/turf/U = get_step(user, user.dir) // A little aimbot is fine
@@ -35,7 +35,7 @@
return TRUE
/obj/effect/proc_holder/spell/alien_spell/neurotoxin/death_to_xenos
/datum/spell/alien_spell/neurotoxin/death_to_xenos
name = "Neurotoxin spit"
desc = "This ability allows you to fire some neurotoxin. Knocks aliens down."
neurotoxin_type = /obj/item/projectile/bullet/anti_alien_toxin
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/alien_spell/plant_weeds
/datum/spell/alien_spell/plant_weeds
name = "Plant weeds"
desc = "Allows you to plant some alien weeds on the floor below you. Does not work while in space."
plasma_cost = 50
@@ -7,10 +7,10 @@
action_icon_state = "alien_plant"
var/requires_do_after = TRUE
/obj/effect/proc_holder/spell/alien_spell/plant_weeds/create_new_targeting()
/datum/spell/alien_spell/plant_weeds/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/alien_spell/plant_weeds/cast(list/targets, mob/living/carbon/user)
/datum/spell/alien_spell/plant_weeds/cast(list/targets, mob/living/carbon/user)
var/turf/T = user.loc
if(locate(weed_type) in T)
to_chat(user, "<span class='noticealien'>There's already \a [weed_name] here.</span>")
@@ -1,13 +1,13 @@
/obj/effect/proc_holder/spell/alien_spell/evolve_queen
/datum/spell/alien_spell/evolve_queen
name = "Evolve into an alien queen"
desc = "Evolve into an alien queen."
plasma_cost = 300
action_icon_state = "alien_evolve_drone"
/obj/effect/proc_holder/spell/alien_spell/evolve_queen/create_new_targeting()
/datum/spell/alien_spell/evolve_queen/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/alien_spell/evolve_queen/cast(list/targets, mob/living/carbon/user)
/datum/spell/alien_spell/evolve_queen/cast(list/targets, mob/living/carbon/user)
/// First we check if there is a living queen
for(var/mob/living/carbon/alien/humanoid/queen/living_queen in GLOB.alive_mob_list)
if(living_queen.key || !living_queen.get_int_organ(/obj/item/organ/internal/brain)) // We do a once over to check the queen didn't end up going away into the magic land of semi-dead
@@ -1,18 +1,18 @@
/obj/effect/proc_holder/spell/alien_spell/regurgitate
/datum/spell/alien_spell/regurgitate
name = "Regurgitate"
desc = "Empties the contents of your stomach onto the ground."
action_icon_state = "alien_barf"
/obj/effect/proc_holder/spell/alien_spell/regurgitate/create_new_targeting()
/datum/spell/alien_spell/regurgitate/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/alien_spell/regurgitate/cast(list/targets, mob/living/carbon/user)
/datum/spell/alien_spell/regurgitate/cast(list/targets, mob/living/carbon/user)
for(var/mob/M in user.stomach_contents)
var/turf/output_loc = user.loc
if(!istype(output_loc))
return
user.stomach_contents -= M
M.forceMove(output_loc)
visible_message("<span class='alertalien'><B>[user] hurls out the contents of [p_their()] stomach!</span>")
user.visible_message("<span class='alertalien'><b>[user] hurls out the contents of [p_their()] stomach!</b></span>")
return
visible_message("<span class='alertalien'><B>[user] dry heaves!</span>")
user.visible_message("<span class='alertalien'><b>[user] dry heaves!</b></span>")
+3 -3
View File
@@ -1,13 +1,13 @@
/obj/effect/proc_holder/spell/alien_spell/tail_lash
/datum/spell/alien_spell/tail_lash
name = "Tail lash"
desc = "Knocks down anyone around you."
action_icon_state = "tailsweep"
base_cooldown = 10 SECONDS
/obj/effect/proc_holder/spell/alien_spell/tail_lash/create_new_targeting()
/datum/spell/alien_spell/tail_lash/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/alien_spell/tail_lash/cast(list/targets, mob/user)
/datum/spell/alien_spell/tail_lash/cast(list/targets, mob/user)
var/turf/T = user.loc
var/cast_resolved = FALSE
if(!istype(T))
@@ -1,13 +1,13 @@
/obj/effect/proc_holder/spell/alien_spell/transfer_plasma
/datum/spell/alien_spell/transfer_plasma
name = "Transfer Plasma"
desc = "Transfers 50 plasma to a nearby alien"
action_icon_state = "alien_transfer"
plasma_cost = 50
/obj/effect/proc_holder/spell/alien_spell/transfer_plasma/create_new_targeting()
/datum/spell/alien_spell/transfer_plasma/create_new_targeting()
return new /datum/spell_targeting/clicked_atom
/obj/effect/proc_holder/spell/alien_spell/transfer_plasma/cast(list/targets, mob/living/carbon/user)
/datum/spell/alien_spell/transfer_plasma/cast(list/targets, mob/living/carbon/user)
var/mob/living/carbon/alien/target = targets[1]
var/turf/T = user.loc
if(!istype(T) || !istype(target))
@@ -20,17 +20,17 @@
to_chat(target, "<span class='noticealien'>[user] has transfered 50 plasma to you!</span>")
return TRUE
/obj/effect/proc_holder/spell/alien_spell/syphon_plasma
/datum/spell/alien_spell/syphon_plasma
name = "Syphon plasma"
desc = "Syphons 150 plasma from a nearby alien."
action_icon_state = "alien_transfer"
plasma_cost = 0
base_cooldown = 10 SECONDS
/obj/effect/proc_holder/spell/alien_spell/syphon_plasma/create_new_targeting()
/datum/spell/alien_spell/syphon_plasma/create_new_targeting()
return new /datum/spell_targeting/clicked_atom
/obj/effect/proc_holder/spell/alien_spell/syphon_plasma/cast(list/targets, mob/living/carbon/user)
/datum/spell/alien_spell/syphon_plasma/cast(list/targets, mob/living/carbon/user)
var/mob/living/carbon/alien/target = targets[1]
var/turf/T = user.loc
if(!istype(T) || !istype(target))
+3 -3
View File
@@ -1,11 +1,11 @@
/obj/effect/proc_holder/spell/alien_spell/whisper
/datum/spell/alien_spell/whisper
name = "Whisper"
desc = "Whisper into a target's mind."
plasma_cost = 10
action_icon_state = "alien_whisper"
var/target
/obj/effect/proc_holder/spell/alien_spell/whisper/create_new_targeting() // Yeah this is copy and pasted code from cryoken and it's good enough
/datum/spell/alien_spell/whisper/create_new_targeting() // Yeah this is copy and pasted code from cryoken and it's good enough
var/datum/spell_targeting/click/T = new()
T.allowed_type = /mob/living
T.click_radius = 0
@@ -14,7 +14,7 @@
T.include_user = TRUE
return T
/obj/effect/proc_holder/spell/alien_spell/whisper/cast(list/targets, mob/living/carbon/user)
/datum/spell/alien_spell/whisper/cast(list/targets, mob/living/carbon/user)
var/mob/living/target = targets[1]
var/msg = tgui_input_text(user, "Message:", "Alien Whisper")
+4 -4
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/area_teleport
/datum/spell/area_teleport
nonabstract_req = TRUE
var/randomise_selection = 0 //if it lets the usr choose the teleport loc or picks it from the list
@@ -8,7 +8,7 @@
var/sound2 = 'sound/weapons/zapbang.ogg'
var/area/selected_area
/obj/effect/proc_holder/spell/area_teleport/before_cast(list/targets, mob/user)
/datum/spell/area_teleport/before_cast(list/targets, mob/user)
..()
selected_area = null // Reset it
var/area_name
@@ -30,7 +30,7 @@
selected_area = thearea
/obj/effect/proc_holder/spell/area_teleport/cast(list/targets, mob/living/user)
/datum/spell/area_teleport/cast(list/targets, mob/living/user)
if(!selected_area)
revert_cast(user)
return
@@ -78,7 +78,7 @@
return
/obj/effect/proc_holder/spell/area_teleport/invocation(mob/user)
/datum/spell/area_teleport/invocation(mob/user)
if(!invocation_area || !selected_area)
return
switch(invocation_type)
+2 -2
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/touch/banana
/datum/spell/touch/banana
name = "Banana Touch"
desc = "A spell popular at wizard birthday parties, this spell will put on a clown costume on the target, \
stun them with a loud HONK, and mutate them to make them more entertaining! \
@@ -19,7 +19,7 @@
icon_state = "banana_touch"
item_state = "banana_touch"
/obj/effect/proc_holder/spell/touch/banana/apprentice
/datum/spell/touch/banana/apprentice
hand_path = /obj/item/melee/touch_attack/banana/apprentice
/obj/item/melee/touch_attack/banana/apprentice
+28 -28
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/bloodcrawl
/datum/spell/bloodcrawl
name = "Blood Crawl"
desc = "Use pools of blood to phase out of existence."
base_cooldown = 1 SECONDS
@@ -12,7 +12,7 @@
var/allowed_type = /obj/effect/decal/cleanable
var/phased = FALSE
/obj/effect/proc_holder/spell/bloodcrawl/create_new_targeting()
/datum/spell/bloodcrawl/create_new_targeting()
var/datum/spell_targeting/targeted/T = new()
T.selection_type = SPELL_SELECTION_RANGE
T.allowed_type = allowed_type
@@ -21,17 +21,17 @@
T.use_turf_of_user = TRUE
return T
/obj/effect/proc_holder/spell/bloodcrawl/valid_target(obj/effect/decal/cleanable/target, user)
/datum/spell/bloodcrawl/valid_target(obj/effect/decal/cleanable/target, user)
return target.can_bloodcrawl_in()
/obj/effect/proc_holder/spell/bloodcrawl/can_cast(mob/living/user, charge_check, show_message)
/datum/spell/bloodcrawl/can_cast(mob/living/user, charge_check, show_message)
. = ..()
if(!.)
return
if(!isliving(user))
return FALSE
/obj/effect/proc_holder/spell/bloodcrawl/cast(list/targets, mob/living/user)
/datum/spell/bloodcrawl/cast(list/targets, mob/living/user)
var/atom/target = targets[1]
if(!phased)
if(phaseout(target, user))
@@ -78,7 +78,7 @@
return
/obj/effect/proc_holder/spell/bloodcrawl/proc/block_hands(mob/living/carbon/C)
/datum/spell/bloodcrawl/proc/block_hands(mob/living/carbon/C)
if(C.l_hand || C.r_hand)
to_chat(C, "<span class='warning'>You may not hold items while blood crawling!</span>")
return FALSE
@@ -101,13 +101,13 @@
. = ..()
flick(animation_state, src) // Setting the icon_state to the animation has timing issues and can cause frame skips
/obj/effect/proc_holder/spell/bloodcrawl/proc/sink_animation(atom/A, mob/living/L)
/datum/spell/bloodcrawl/proc/sink_animation(atom/A, mob/living/L)
var/turf/mob_loc = get_turf(L)
visible_message("<span class='danger'>[L] sinks into [A].</span>")
playsound(mob_loc, 'sound/misc/enter_blood.ogg', 100, 1, -1)
mob_loc.visible_message("<span class='danger'>[L] sinks into [A].</span>")
playsound(mob_loc, 'sound/misc/enter_blood.ogg', 100, TRUE, -1)
new /obj/effect/temp_visual/dir_setting/bloodcrawl(mob_loc, L.dir, "jaunt")
/obj/effect/proc_holder/spell/bloodcrawl/proc/handle_consumption(mob/living/L, mob/living/victim, atom/A, obj/effect/dummy/slaughter/holder)
/datum/spell/bloodcrawl/proc/handle_consumption(mob/living/L, mob/living/victim, atom/A, obj/effect/dummy/slaughter/holder)
if(!HAS_TRAIT(L, TRAIT_BLOODCRAWL_EAT))
return
@@ -176,10 +176,10 @@
victim.ghostize()
qdel(victim)
/obj/effect/proc_holder/spell/bloodcrawl/proc/post_phase_in(mob/living/L, obj/effect/dummy/slaughter/holder)
/datum/spell/bloodcrawl/proc/post_phase_in(mob/living/L, obj/effect/dummy/slaughter/holder)
L.notransform = FALSE
/obj/effect/proc_holder/spell/bloodcrawl/proc/phaseout(obj/effect/decal/cleanable/B, mob/living/L)
/datum/spell/bloodcrawl/proc/phaseout(obj/effect/decal/cleanable/B, mob/living/L)
if(iscarbon(L) && !block_hands(L))
return FALSE
@@ -187,7 +187,7 @@
INVOKE_ASYNC(src, PROC_REF(async_phase), B, L)
return TRUE
/obj/effect/proc_holder/spell/bloodcrawl/proc/async_phase(obj/effect/decal/cleanable/B, mob/living/L)
/datum/spell/bloodcrawl/proc/async_phase(obj/effect/decal/cleanable/B, mob/living/L)
var/turf/mobloc = get_turf(L)
sink_animation(B, L)
var/obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter(mobloc)
@@ -196,24 +196,24 @@
handle_consumption(L, L.pulling, B, holder)
post_phase_in(L, holder)
/obj/effect/proc_holder/spell/bloodcrawl/proc/rise_animation(turf/tele_loc, mob/living/L, atom/A)
/datum/spell/bloodcrawl/proc/rise_animation(turf/tele_loc, mob/living/L, atom/A)
new /obj/effect/temp_visual/dir_setting/bloodcrawl(tele_loc, L.dir, "jauntup")
if(prob(25) && isdemon(L))
var/list/voice = list('sound/hallucinations/behind_you1.ogg', 'sound/hallucinations/im_here1.ogg', 'sound/hallucinations/turn_around1.ogg', 'sound/hallucinations/i_see_you1.ogg')
playsound(tele_loc, pick(voice),50, 1, -1)
A.visible_message("<span class='warning'><b>[L] rises out of [A]!</b>")
playsound(get_turf(tele_loc), 'sound/misc/exit_blood.ogg', 100, 1, -1)
playsound(tele_loc, pick(voice),50, TRUE, -1)
A.visible_message("<span class='warning'><b>[L] rises out of [A]!</b></span>")
playsound(get_turf(tele_loc), 'sound/misc/exit_blood.ogg', 100, TRUE, -1)
/obj/effect/proc_holder/spell/bloodcrawl/proc/unblock_hands(mob/living/carbon/C)
/datum/spell/bloodcrawl/proc/unblock_hands(mob/living/carbon/C)
if(!istype(C))
return
for(var/obj/item/bloodcrawl/BC in C)
qdel(BC)
/obj/effect/proc_holder/spell/bloodcrawl/proc/rise_message(atom/A)
/datum/spell/bloodcrawl/proc/rise_message(atom/A)
A.visible_message("<span class='warning'>[A] starts to bubble...</span>")
/obj/effect/proc_holder/spell/bloodcrawl/proc/post_phase_out(atom/A, mob/living/L)
/datum/spell/bloodcrawl/proc/post_phase_out(atom/A, mob/living/L)
if(isslaughterdemon(L))
var/mob/living/simple_animal/demon/slaughter/S = L
S.speed = 0
@@ -222,7 +222,7 @@
addtimer(VARSET_CALLBACK(L, color, null), 6 SECONDS)
/obj/effect/proc_holder/spell/bloodcrawl/proc/phasein(atom/A, mob/living/L)
/datum/spell/bloodcrawl/proc/phasein(atom/A, mob/living/L)
if(L.notransform)
to_chat(L, "<span class='warning'>Finish eating first!</span>")
@@ -246,30 +246,30 @@
post_phase_out(A, L)
return TRUE
/obj/effect/proc_holder/spell/bloodcrawl/shadow_crawl
/datum/spell/bloodcrawl/shadow_crawl
name = "Shadow Crawl"
desc = "Fade into the shadows, increasing your speed and making you incomprehensible. Will not work in brightened terrane."
allowed_type = /turf
action_background_icon_state = "shadow_demon_bg"
action_icon_state = "shadow_crawl"
/obj/effect/proc_holder/spell/bloodcrawl/shadow_crawl/valid_target(turf/target, user)
/datum/spell/bloodcrawl/shadow_crawl/valid_target(turf/target, user)
return target.get_lumcount() < 0.2
/obj/effect/proc_holder/spell/bloodcrawl/shadow_crawl/rise_message(atom/A)
/datum/spell/bloodcrawl/shadow_crawl/rise_message(atom/A)
return
/obj/effect/proc_holder/spell/bloodcrawl/shadow_crawl/rise_animation(turf/tele_loc, mob/living/L, atom/A)
/datum/spell/bloodcrawl/shadow_crawl/rise_animation(turf/tele_loc, mob/living/L, atom/A)
new /obj/effect/temp_visual/dir_setting/bloodcrawl(get_turf(L), L.dir, "shadowwalk_appear")
/obj/effect/proc_holder/spell/bloodcrawl/shadow_crawl/handle_consumption(mob/living/L, mob/living/victim, atom/A, obj/effect/dummy/slaughter/holder)
/datum/spell/bloodcrawl/shadow_crawl/handle_consumption(mob/living/L, mob/living/victim, atom/A, obj/effect/dummy/slaughter/holder)
return
/obj/effect/proc_holder/spell/bloodcrawl/shadow_crawl/sink_animation(atom/A, mob/living/L)
/datum/spell/bloodcrawl/shadow_crawl/sink_animation(atom/A, mob/living/L)
A.visible_message("<span class='danger'>[L] sinks into the shadows...</span>")
new /obj/effect/temp_visual/dir_setting/bloodcrawl(get_turf(L), L.dir, "shadowwalk_disappear")
/obj/effect/proc_holder/spell/bloodcrawl/shadow_crawl/post_phase_in(mob/living/L, obj/effect/dummy/slaughter/holder)
/datum/spell/bloodcrawl/shadow_crawl/post_phase_in(mob/living/L, obj/effect/dummy/slaughter/holder)
..()
if(!istype(L, /mob/living/simple_animal/demon/shadow))
return
+4 -4
View File
@@ -1,5 +1,5 @@
/obj/effect/proc_holder/spell/chaplain_bless
/datum/spell/chaplain_bless
name = "Bless"
desc = "Blesses a single person."
@@ -14,16 +14,16 @@
cooldown_min = 20
action_icon_state = "shield"
/obj/effect/proc_holder/spell/chaplain_bless/create_new_targeting()
/datum/spell/chaplain_bless/create_new_targeting()
var/datum/spell_targeting/click/T = new()
T.range = 1
T.click_radius = -1
return T
/obj/effect/proc_holder/spell/chaplain_bless/valid_target(mob/living/carbon/human/target, mob/user)
/datum/spell/chaplain_bless/valid_target(mob/living/carbon/human/target, mob/user)
return target.mind && target.ckey && !target.stat
/obj/effect/proc_holder/spell/chaplain_bless/cast(list/targets, mob/living/user = usr)
/datum/spell/chaplain_bless/cast(list/targets, mob/living/user = usr)
if(!istype(user))
to_chat(user, "Somehow, you are not a living mob. This should never happen. Report this bug.")
revert_cast()
+5 -5
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/charge
/datum/spell/charge
name = "Charge"
desc = "This spell can be used to recharge a variety of things in your hands, from magical artifacts to electrical components. A creative wizard can even use it to grant magical power to a fellow magic user."
school = "transmutation"
@@ -9,10 +9,10 @@
cooldown_min = 400 //50 deciseconds reduction per rank
action_icon_state = "charge"
/obj/effect/proc_holder/spell/charge/create_new_targeting()
/datum/spell/charge/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/charge/cast(list/targets, mob/user = usr)
/datum/spell/charge/cast(list/targets, mob/user = usr)
for(var/mob/living/L in targets)
var/list/hand_items = list(L.get_active_hand(),L.get_inactive_hand())
var/charged_item = null
@@ -21,10 +21,10 @@
if(L.pulling && (isliving(L.pulling)))
var/mob/living/M = L.pulling
if(M.mob_spell_list.len != 0 || (M.mind && M.mind.spell_list.len != 0))
for(var/obj/effect/proc_holder/spell/S in M.mob_spell_list)
for(var/datum/spell/S in M.mob_spell_list)
S.cooldown_handler.revert_cast()
if(M.mind)
for(var/obj/effect/proc_holder/spell/S in M.mind.spell_list)
for(var/datum/spell/S in M.mind.spell_list)
S.cooldown_handler.revert_cast()
to_chat(M, "<span class='notice'>You feel raw magical energy flowing through you, it feels good!</span>")
else
+11 -11
View File
@@ -2,7 +2,7 @@
* A click-based spell template which starts charging up once you click the action button/verb. Click again on something to activate the actual spell
*/
/obj/effect/proc_holder/spell/charge_up
/datum/spell/charge_up
var/start_time = 0
/// The overlay used to show that you are charging. Create this in the New of the spell
var/image/charge_up_overlay
@@ -17,13 +17,13 @@
/// The text shown when you are over the charge limit and thus can't stop.
var/stop_charging_fail_text
/obj/effect/proc_holder/spell/charge_up/create_new_targeting()
/datum/spell/charge_up/create_new_targeting()
var/datum/spell_targeting/click/T = new()
T.allowed_type = /mob/living
T.try_auto_target = FALSE
return T
/obj/effect/proc_holder/spell/charge_up/Click()
/datum/spell/charge_up/Click()
if(cast_check(TRUE, FALSE, usr))
if(!start_time)
INVOKE_ASYNC(src, PROC_REF(StartChargeup), usr)
@@ -33,7 +33,7 @@
return ..()
/obj/effect/proc_holder/spell/charge_up/proc/try_stop_buildup(mob/user)
/datum/spell/charge_up/proc/try_stop_buildup(mob/user)
var/energy_perc = get_energy_charge() / max_charge_time
if(energy_perc < 0.5)
cooldown_handler.start_recharge((1 - energy_perc) * cooldown_handler.recharge_duration) // Shorten the cooldown based on how long it was charged for.
@@ -44,10 +44,10 @@
to_chat(user, "<span class='danger'>[stop_charging_fail_text]</span>")
return FALSE
/obj/effect/proc_holder/spell/charge_up/proc/get_energy_charge()
/datum/spell/charge_up/proc/get_energy_charge()
return min(world.time - start_time, max_charge_time)
/obj/effect/proc_holder/spell/charge_up/proc/StartChargeup(mob/user)
/datum/spell/charge_up/proc/StartChargeup(mob/user)
to_chat(user, "<span class='notice'>[start_charging_text]</span>")
user.add_overlay(charge_up_overlay)
playsound(user, charge_sound, 50, FALSE, channel = charge_sound.channel)
@@ -56,25 +56,25 @@
if(start_time)
Discharge(user)
/obj/effect/proc_holder/spell/charge_up/proc/stopped_casting()
/datum/spell/charge_up/proc/stopped_casting()
return start_time == 0
/obj/effect/proc_holder/spell/charge_up/proc/Reset(mob/user)
/datum/spell/charge_up/proc/Reset(mob/user)
start_time = 0
user.cut_overlay(charge_up_overlay)
remove_ranged_ability(user)
playsound(user, null, 50, FALSE, channel = charge_sound.channel)
/obj/effect/proc_holder/spell/charge_up/revert_cast(mob/user)
/datum/spell/charge_up/revert_cast(mob/user)
Reset(user)
..()
/obj/effect/proc_holder/spell/charge_up/proc/Discharge(mob/user)
/datum/spell/charge_up/proc/Discharge(mob/user)
to_chat(user, "<span class='danger'>You lose control over the spell!</span>")
Reset(user)
spend_spell_cost(user)
cooldown_handler.start_recharge()
/obj/effect/proc_holder/spell/charge_up/after_cast(list/targets, mob/user)
/datum/spell/charge_up/after_cast(list/targets, mob/user)
..()
Reset(user)
+8 -8
View File
@@ -2,17 +2,17 @@
* A spell template that adds bounces to the charge_up spell template. The spell will bounce between targets once released.
* Don't override cast and instead override apply_bounce_effect and the other procs
*/
/obj/effect/proc_holder/spell/charge_up/bounce
/datum/spell/charge_up/bounce
var/bounce_hit_sound
/obj/effect/proc_holder/spell/charge_up/bounce/create_new_targeting()
/datum/spell/charge_up/bounce/create_new_targeting()
var/datum/spell_targeting/click/T = new
T.allowed_type = /mob/living
T.try_auto_target = FALSE
T.use_obstacle_check = TRUE
return T
/obj/effect/proc_holder/spell/charge_up/bounce/cast(list/targets, mob/user = usr)
/datum/spell/charge_up/bounce/cast(list/targets, mob/user = usr)
var/mob/living/target = targets[1]
bounce(user, target, get_bounce_energy(), get_bounce_amount(), user)
@@ -20,13 +20,13 @@
/**
* How much energy should each bounce have?
*/
/obj/effect/proc_holder/spell/charge_up/bounce/proc/get_bounce_energy()
/datum/spell/charge_up/bounce/proc/get_bounce_energy()
return
/**
* How much bounces should there be in total?
*/
/obj/effect/proc_holder/spell/charge_up/bounce/proc/get_bounce_amount()
/datum/spell/charge_up/bounce/proc/get_bounce_amount()
return
/**
@@ -36,7 +36,7 @@
* * origin - Where the bounce came from
* * target - The mob that got hit
*/
/obj/effect/proc_holder/spell/charge_up/bounce/proc/create_beam(mob/origin, mob/target)
/datum/spell/charge_up/bounce/proc/create_beam(mob/origin, mob/target)
return
/**
@@ -49,10 +49,10 @@
* * energy - How much energy the bounce has
* * user - The caster of the spell
*/
/obj/effect/proc_holder/spell/charge_up/bounce/proc/apply_bounce_effect(mob/origin, mob/target, energy, mob/user)
/datum/spell/charge_up/bounce/proc/apply_bounce_effect(mob/origin, mob/target, energy, mob/user)
return
/obj/effect/proc_holder/spell/charge_up/bounce/proc/bounce(mob/origin, mob/target, energy, bounces, mob/user)
/datum/spell/charge_up/bounce/proc/bounce(mob/origin, mob/target, energy, bounces, mob/user)
SHOULD_CALL_PARENT(TRUE)
create_beam(origin, target)
apply_bounce_effect(origin, target, energy, user)
+1 -1
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/touch/cluwne
/datum/spell/touch/cluwne
name = "Curse of the Cluwne"
desc = "Turns the target into a fat and cursed monstrosity of a clown."
hand_path = /obj/item/melee/touch_attack/cluwne
+5 -6
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/aoe/conjure
/datum/spell/aoe/conjure
desc = "This spell conjures objs of the specified types in range."
var/list/summon_type = list() //determines what exactly will be summoned
@@ -15,14 +15,14 @@
var/cast_sound = 'sound/items/welder.ogg'
/obj/effect/proc_holder/spell/aoe/conjure/create_new_targeting()
/datum/spell/aoe/conjure/create_new_targeting()
var/datum/spell_targeting/aoe/turf/targeting = new()
targeting.range = aoe_range
return targeting
/obj/effect/proc_holder/spell/aoe/conjure/cast(list/targets,mob/living/user = usr)
/datum/spell/aoe/conjure/cast(list/targets,mob/living/user = usr)
var/list/what_conjure_summoned = list()
playsound(get_turf(user), cast_sound, 50,1)
playsound(get_turf(user), cast_sound, 50, TRUE)
for(var/turf/T in targets)
if(T.density && !summon_ignore_density)
targets -= T
@@ -57,8 +57,7 @@
return what_conjure_summoned
/// test purposes
/obj/effect/proc_holder/spell/aoe/conjure/summonEdSwarm
/datum/spell/aoe/conjure/summonEdSwarm
name = "Dispense Wizard Justice"
desc = "This spell dispenses wizard justice."
summon_type = list(/mob/living/simple_animal/bot/ed209)
+4 -4
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/conjure_item
/datum/spell/conjure_item
name = "Summon weapon"
desc = "A generic spell that should not exist. This summons an instance of a specific type of item, or if one already exists, un-summons it."
invocation_type = "none"
@@ -9,10 +9,10 @@
base_cooldown = 15 SECONDS
cooldown_min = 10
/obj/effect/proc_holder/spell/conjure_item/create_new_targeting()
/datum/spell/conjure_item/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/conjure_item/cast(list/targets, mob/user = usr)
/datum/spell/conjure_item/cast(list/targets, mob/user = usr)
if(item)
QDEL_NULL(item)
else
@@ -21,6 +21,6 @@
item = new item_type
C.put_in_hands(item)
/obj/effect/proc_holder/spell/conjure_item/Destroy()
/datum/spell/conjure_item/Destroy()
QDEL_NULL(item)
return ..()
+20 -19
View File
@@ -1,14 +1,14 @@
//////////////////////////////Construct Spells/////////////////////////
/obj/effect/proc_holder/spell/aoe/conjure/construct/lesser
/datum/spell/aoe/conjure/construct/lesser
base_cooldown = 1800
action_icon_state = "artificer"
action_background_icon_state = "bg_cult"
/obj/effect/proc_holder/spell/aoe/conjure/build
/datum/spell/aoe/conjure/build
aoe_range = 0
/obj/effect/proc_holder/spell/aoe/conjure/build/floor
/datum/spell/aoe/conjure/build/floor
name = "Summon Cult Floor"
desc = "This spell constructs a cult floor"
action_icon_state = "floorconstruct"
@@ -22,7 +22,7 @@
centcom_cancast = FALSE //Stop crashing the server by spawning turfs on transit tiles
holy_area_cancast = FALSE //Stops cult magic from working on holy ground eg: chapel
/obj/effect/proc_holder/spell/aoe/conjure/build/wall
/datum/spell/aoe/conjure/build/wall
name = "Summon Cult Wall"
desc = "This spell constructs a cult wall"
action_icon_state = "cultforcewall"
@@ -36,7 +36,7 @@
centcom_cancast = FALSE //Stop crashing the server by spawning turfs on transit tiles
holy_area_cancast = FALSE //Stops cult magic from working on holy ground eg: chapel
/obj/effect/proc_holder/spell/aoe/conjure/build/wall/reinforced
/datum/spell/aoe/conjure/build/wall/reinforced
name = "Greater Construction"
desc = "This spell constructs a reinforced metal wall"
school = "conjuration"
@@ -50,7 +50,7 @@
summon_type = list(/turf/simulated/wall/r_wall)
/obj/effect/proc_holder/spell/aoe/conjure/build/soulstone
/datum/spell/aoe/conjure/build/soulstone
name = "Summon Soulstone"
desc = "This spell uses vile sorcery to create a spirit-trapping soulstone."
action_icon_state = "summonsoulstone"
@@ -64,12 +64,12 @@
summon_type = list(/obj/item/soulstone)
/obj/effect/proc_holder/spell/aoe/conjure/build/soulstone/holy
/datum/spell/aoe/conjure/build/soulstone/holy
action_icon_state = "summonsoulstone_holy"
summon_type = list(/obj/item/soulstone/anybody/purified)
/obj/effect/proc_holder/spell/aoe/conjure/build/pylon
/datum/spell/aoe/conjure/build/pylon
name = "Cult Pylon"
desc = "This spell uses dark magic to craft an unholy beacon. Heals cultists, and makes a handy light source."
action_icon_state = "pylon"
@@ -84,7 +84,7 @@
summon_type = list(/obj/structure/cult/functional/pylon)
/obj/effect/proc_holder/spell/aoe/conjure/build/lesserforcewall
/datum/spell/aoe/conjure/build/lesserforcewall
name = "Shield"
desc = "This spell creates a temporary forcefield to shield yourself and allies from incoming fire"
action_icon_state = "cultforcewall"
@@ -105,7 +105,7 @@
icon_state = "m_shield_cult"
light_color = LIGHT_COLOR_PURE_RED
/obj/effect/proc_holder/spell/ethereal_jaunt/shift
/datum/spell/ethereal_jaunt/shift
name = "Phase Shift"
desc = "This spell allows you to pass through walls"
action_icon_state = "phaseshift"
@@ -119,7 +119,7 @@
jaunt_in_type = /obj/effect/temp_visual/dir_setting/wraith
jaunt_out_type = /obj/effect/temp_visual/dir_setting/wraith/out
/obj/effect/proc_holder/spell/ethereal_jaunt/shift/do_jaunt(mob/living/target)
/datum/spell/ethereal_jaunt/shift/do_jaunt(mob/living/target)
target.set_light(0)
..()
if(isconstruct(target))
@@ -129,10 +129,10 @@
else
C.set_light(2, 3, l_color = GET_CULT_DATA(construct_glow, LIGHT_COLOR_BLOOD_MAGIC))
/obj/effect/proc_holder/spell/ethereal_jaunt/shift/jaunt_steam(mobloc)
/datum/spell/ethereal_jaunt/shift/jaunt_steam(mobloc)
return
/obj/effect/proc_holder/spell/projectile/magic_missile/lesser
/datum/spell/projectile/magic_missile/lesser
name = "Lesser Magic Missile"
desc = "This spell fires several, slow moving, magic projectiles at nearby targets."
action_background_icon_state = "bg_cult"
@@ -144,20 +144,21 @@
holy_area_cancast = FALSE //Stops cult magic from working on holy ground eg: chapel
proj_lifespan = 10
proj_step_delay = 5
proj_type = "/obj/effect/proc_holder/spell/inflict_handler/magic_missile/lesser"
proj_type = /obj/item/projectile/magic/magic_missile/lesser
/obj/effect/proc_holder/spell/projectile/magic_missile/lesser/create_new_targeting()
/datum/spell/projectile/magic_missile/lesser/create_new_targeting()
var/datum/spell_targeting/targeted/T = new()
T.allowed_type = /mob/living
T.random_target = TRUE
T.max_targets = 6
return T
/obj/effect/proc_holder/spell/inflict_handler/magic_missile/lesser
amt_knockdown = 6 SECONDS
amt_weakened = 0
/obj/item/projectile/magic/magic_missile/lesser
name = "lesser magic missile"
knockdown = 6 SECONDS
weaken = 0
/obj/effect/proc_holder/spell/smoke/disable
/datum/spell/smoke/disable
name = "Paralysing Smoke"
desc = "This spell spawns a cloud of paralysing smoke."
action_icon_state = "parasmoke"
+3 -3
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/disguise_self
/datum/spell/disguise_self
name = "Disguise Self"
desc = "Disguise yourself as a crewmember, based on your current location. Also changes your voice. \
The disguise will not hold up to being examined directly, and will break if you're damaged."
@@ -12,10 +12,10 @@
action_icon_state = "disguise_self"
sound = null
/obj/effect/proc_holder/spell/disguise_self/create_new_targeting()
/datum/spell/disguise_self/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/disguise_self/cast(list/targets, mob/user = usr)
/datum/spell/disguise_self/cast(list/targets, mob/user = usr)
if(!ishuman(user))
return FALSE
var/mob/living/carbon/human/H = user
+4 -4
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/emplosion
/datum/spell/emplosion
name = "Emplosion"
desc = "This spell emplodes an area."
@@ -7,12 +7,12 @@
action_icon_state = "emp"
/obj/effect/proc_holder/spell/emplosion/create_new_targeting()
/datum/spell/emplosion/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/emplosion/cast(list/targets, mob/user = usr)
/datum/spell/emplosion/cast(list/targets, mob/user = usr)
for(var/mob/living/target in targets)
empulse(target.loc, emp_heavy, emp_light, 1)
empulse(target.loc, emp_heavy, emp_light, TRUE)
return
+6 -6
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/ethereal_jaunt
/datum/spell/ethereal_jaunt
name = "Ethereal Jaunt"
desc = "This spell creates your ethereal form, temporarily making you invisible and able to pass through walls."
@@ -20,18 +20,18 @@
action_icon_state = "jaunt"
/obj/effect/proc_holder/spell/ethereal_jaunt/create_new_targeting()
/datum/spell/ethereal_jaunt/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/ethereal_jaunt/cast(list/targets, mob/user = usr) //magnets, so mostly hardcoded
playsound(get_turf(user), sound1, 50, 1, -1)
/datum/spell/ethereal_jaunt/cast(list/targets, mob/user = usr) //magnets, so mostly hardcoded
playsound(get_turf(user), sound1, 50, TRUE, -1)
for(var/mob/living/target in targets)
if(!target.can_safely_leave_loc()) // No more brainmobs hopping out of their brains
to_chat(target, "<span class='warning'>You are somehow too bound to your current location to abandon it.</span>")
continue
INVOKE_ASYNC(src, PROC_REF(do_jaunt), target)
/obj/effect/proc_holder/spell/ethereal_jaunt/proc/do_jaunt(mob/living/target)
/datum/spell/ethereal_jaunt/proc/do_jaunt(mob/living/target)
target.notransform = TRUE
var/turf/mobloc = get_turf(target)
var/obj/effect/dummy/spell_jaunt/holder = new jaunt_type_path(mobloc)
@@ -74,7 +74,7 @@
REMOVE_TRAIT(target, TRAIT_IMMOBILIZED, "jaunt")
target.remove_CC()
/obj/effect/proc_holder/spell/ethereal_jaunt/proc/jaunt_steam(mobloc)
/datum/spell/ethereal_jaunt/proc/jaunt_steam(mobloc)
var/datum/effect_system/steam_spread/steam = new /datum/effect_system/steam_spread()
steam.set_up(10, 0, mobloc)
steam.start()
+1 -1
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/touch/fake_disintegrate
/datum/spell/touch/fake_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/fake_disintegrate"
+9 -5
View File
@@ -1,12 +1,12 @@
/obj/effect/proc_holder/spell/genetic
/datum/spell/genetic
desc = "This spell inflicts a set of mutations and disabilities upon the target."
var/list/active_on = list()
var/list/traits = list() // traits
var/list/mutations = list() // mutation defines. Set these in Initialize. Refactor this nonsense one day
var/duration = 100 // deciseconds
var/duration = 10 SECONDS
/obj/effect/proc_holder/spell/genetic/cast(list/targets, mob/user = usr)
/datum/spell/genetic/cast(list/targets, mob/user = usr)
for(var/mob/living/target in targets)
if(!target.dna)
continue
@@ -17,15 +17,19 @@
ADD_TRAIT(target, A, MAGIC_TRAIT)
active_on += target
target.regenerate_icons()
do_additional_effects(target)
if(duration < base_cooldown)
addtimer(CALLBACK(src, PROC_REF(remove), target), duration, TIMER_OVERRIDE|TIMER_UNIQUE)
/obj/effect/proc_holder/spell/genetic/Destroy()
/datum/spell/genetic/proc/do_additional_effects(mob/target)
return
/datum/spell/genetic/Destroy()
for(var/V in active_on)
remove(V)
return ..()
/obj/effect/proc_holder/spell/genetic/proc/remove(mob/living/carbon/target)
/datum/spell/genetic/proc/remove(mob/living/carbon/target)
active_on -= target
if(!QDELETED(target))
for(var/A in mutations)
+3 -3
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/horsemask
/datum/spell/horsemask
name = "Curse of the Horseman"
desc = "This spell triggers a curse on a target, causing them to wield an unremovable horse head mask. They will speak like a horse! Any masks they are wearing will be disintegrated. This spell does not require robes."
school = "transmutation"
@@ -15,13 +15,13 @@
action_icon_state = "barn"
sound = 'sound/magic/HorseHead_curse.ogg'
/obj/effect/proc_holder/spell/horsemask/create_new_targeting()
/datum/spell/horsemask/create_new_targeting()
var/datum/spell_targeting/click/T = new()
T.selection_type = SPELL_SELECTION_RANGE
return T
/obj/effect/proc_holder/spell/horsemask/cast(list/targets, mob/user = usr)
/datum/spell/horsemask/cast(list/targets, mob/user = usr)
if(!targets.len)
to_chat(user, "<span class='notice'>No target found in range.</span>")
return
+4 -4
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/infinite_guns
/datum/spell/infinite_guns
name = "Lesser Summon Guns"
desc = "Why reload when you have infinite guns? Summons an unending stream of bolt action rifles. Requires both hands free to use."
invocation_type = "none"
@@ -10,10 +10,10 @@
action_icon_state = "bolt_action"
var/gun_type = /obj/item/gun/projectile/shotgun/boltaction/enchanted
/obj/effect/proc_holder/spell/infinite_guns/create_new_targeting()
/datum/spell/infinite_guns/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/infinite_guns/cast(list/targets, mob/user = usr)
/datum/spell/infinite_guns/cast(list/targets, mob/user = usr)
for(var/mob/living/carbon/C in targets)
C.drop_item()
C.swap_hand()
@@ -21,7 +21,7 @@
var/obj/item/gun/projectile/shotgun/boltaction/enchanted/GUN = new gun_type()
C.put_in_hands(GUN)
/obj/effect/proc_holder/spell/infinite_guns/fireball
/datum/spell/infinite_guns/fireball
name = "Rapid-fire Fireball"
desc = "Multiple Fireballs. Need I explain more? Requires both hands free to use."
-62
View File
@@ -1,62 +0,0 @@
/obj/effect/proc_holder/spell/inflict_handler
name = "Inflict Handler"
desc = "This spell blinds and/or destroys/damages/heals and/or weakens/stuns the target."
var/amt_weakened = 0
var/amt_paralysis = 0
var/amt_stunned = 0
var/amt_knockdown = 0
//set to negatives for healing
var/amt_dam_fire = 0
var/amt_dam_brute = 0
var/amt_dam_oxy = 0
var/amt_dam_tox = 0
var/amt_eye_blind = 0
var/amt_eye_blurry = 0
var/destroys = "none" //can be "none", "gib" or "disintegrate"
var/summon_type = null //this will put an obj at the target's location
/obj/effect/proc_holder/spell/inflict_handler/create_new_targeting()
return new /datum/spell_targeting/self // Dummy value since it is never used for this spell... why is this even a spell
/obj/effect/proc_holder/spell/inflict_handler/cast(list/targets, mob/user = usr)
for(var/mob/living/target in targets)
switch(destroys)
if("gib")
target.gib()
if("disintegrate")
target.dust()
if(!target)
continue
//damage
if(amt_dam_brute > 0)
if(amt_dam_fire >= 0)
target.take_overall_damage(amt_dam_brute,amt_dam_fire)
else if(amt_dam_fire < 0)
target.take_overall_damage(amt_dam_brute,0)
target.heal_overall_damage(0,amt_dam_fire)
else if(amt_dam_brute < 0)
if(amt_dam_fire > 0)
target.take_overall_damage(0,amt_dam_fire)
target.heal_overall_damage(amt_dam_brute,0)
else if(amt_dam_fire <= 0)
target.heal_overall_damage(amt_dam_brute,amt_dam_fire)
target.adjustToxLoss(amt_dam_tox)
target.adjustOxyLoss(amt_dam_oxy)
//disabling
target.Weaken(amt_weakened)
target.Paralyse(amt_paralysis)
target.Stun(amt_stunned)
target.KnockDown(amt_knockdown)
target.AdjustEyeBlind(amt_eye_blind)
target.AdjustEyeBlurry(amt_eye_blurry)
//summoning
if(summon_type)
new summon_type(target.loc, target)
+7 -7
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/aoe/knock
/datum/spell/aoe/knock
name = "Knock"
desc = "This spell opens nearby doors and does not require wizard garb."
@@ -13,31 +13,31 @@
sound = 'sound/magic/knock.ogg'
aoe_range = 3
/obj/effect/proc_holder/spell/aoe/knock/create_new_targeting()
/datum/spell/aoe/knock/create_new_targeting()
var/datum/spell_targeting/aoe/turf/targeting = new()
targeting.range = aoe_range
return targeting
/obj/effect/proc_holder/spell/aoe/knock/cast(list/targets, mob/user = usr)
/datum/spell/aoe/knock/cast(list/targets, mob/user = usr)
for(var/turf/T in targets)
for(var/obj/machinery/door/door in T.contents)
INVOKE_ASYNC(src, PROC_REF(try_open_airlock), door)
for(var/obj/structure/closet/C in T.contents)
INVOKE_ASYNC(src, PROC_REF(try_open_closet), C)
/obj/effect/proc_holder/spell/aoe/knock/proc/try_open_airlock(obj/machinery/door/door)
/datum/spell/aoe/knock/proc/try_open_airlock(obj/machinery/door/door)
if(istype(door, /obj/machinery/door/airlock))
var/obj/machinery/door/airlock/A = door
A.unlock(TRUE) //forced because it's magic!
door.open()
/obj/effect/proc_holder/spell/aoe/knock/proc/try_open_closet(obj/structure/closet/C)
/datum/spell/aoe/knock/proc/try_open_closet(obj/structure/closet/C)
if(istype(C, /obj/structure/closet/secure_closet))
var/obj/structure/closet/secure_closet/SC = C
SC.locked = FALSE
C.open()
/obj/effect/proc_holder/spell/aoe/knock/greater
/datum/spell/aoe/knock/greater
name = "Greater Knock"
desc = "On first cast, will remove access restrictions on all airlocks on the station, and announce this spell's use to the station. On any further cast, will open all doors in sight. Cannot be refunded once bought!"
@@ -50,7 +50,7 @@
action_icon_state = "greater_knock"
/obj/effect/proc_holder/spell/aoe/knock/greater/cast(list/targets, mob/user = usr)
/datum/spell/aoe/knock/greater/cast(list/targets, mob/user = usr)
if(!used)
used = TRUE
for(var/obj/machinery/door/airlock/A in GLOB.airlocks)
+12 -12
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/lichdom
/datum/spell/lichdom
name = "Bind Soul"
desc = "A dark necromantic pact that can forever bind your soul to an item of your choosing. So long as both your body and the item remain intact and on the same plane you can revive from death, though the time between reincarnations grows steadily with use."
school = "necromancy"
@@ -17,26 +17,26 @@
action_icon_state = "skeleton"
/obj/effect/proc_holder/spell/lichdom/create_new_targeting()
/datum/spell/lichdom/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/lichdom/Destroy()
/datum/spell/lichdom/Destroy()
for(var/datum/mind/M in SSticker.mode.wizards) //Make sure no other bones are about
for(var/obj/effect/proc_holder/spell/S in M.spell_list)
if(istype(S,/obj/effect/proc_holder/spell/lichdom) && S != src)
for(var/datum/spell/S in M.spell_list)
if(istype(S,/datum/spell/lichdom) && S != src)
return ..()
if(existence_stops_round_end)
GLOB.configuration.gamemode.disable_certain_round_early_end = FALSE
return ..()
/obj/effect/proc_holder/spell/lichdom/cast(list/targets, mob/user = usr)
/datum/spell/lichdom/cast(list/targets, mob/user = usr)
for(var/mob/M in targets)
if(stat_allowed)
attempt_revive(M)
else if(!marked_item_uid)
attempt_mark_item(M)
/obj/effect/proc_holder/spell/lichdom/proc/attempt_revive(mob/user)
/datum/spell/lichdom/proc/attempt_revive(mob/user)
// Can only cast when unconscious/dead
if(user.stat == CONSCIOUS)
to_chat(user, "<span class='notice'>You aren't dead enough to revive!</span>")
@@ -95,7 +95,7 @@
cooldown_handler.recharge_duration += 1 MINUTES
to_chat(lich, "<span class='warning'>Your bones clatter and shudder as they're pulled back into this world!</span>")
/obj/effect/proc_holder/spell/lichdom/proc/attempt_mark_item(mob/user)
/datum/spell/lichdom/proc/attempt_mark_item(mob/user)
var/obj/item/target = user.get_active_hand()
if(!target)
to_chat(user, "<span class='warning'>You must hold an item you wish to make your phylactery!</span>")
@@ -141,7 +141,7 @@
existence_stops_round_end = TRUE
GLOB.configuration.gamemode.disable_certain_round_early_end = TRUE
/obj/effect/proc_holder/spell/lichdom/proc/is_revive_possible()
/datum/spell/lichdom/proc/is_revive_possible()
var/obj/item/marked_item = locateUID(marked_item_uid)
if(QDELETED(marked_item))
return FALSE
@@ -153,12 +153,12 @@
return FALSE
return TRUE
/obj/effect/proc_holder/spell/lichdom/proc/check_revivability_handler()
/datum/spell/lichdom/proc/check_revivability_handler()
SIGNAL_HANDLER
// There are other liches about, so round may still continue
for(var/datum/mind/M in SSticker.mode.wizards)
for(var/obj/effect/proc_holder/spell/lichdom/S in M.spell_list)
for(var/datum/spell/lichdom/S in M.spell_list)
if(S == src)
continue
// Other lich can still revive
@@ -170,7 +170,7 @@
GLOB.configuration.gamemode.disable_certain_round_early_end = is_revive_possible()
/obj/effect/proc_holder/spell/lichdom/proc/equip_lich(mob/living/carbon/human/H)
/datum/spell/lichdom/proc/equip_lich(mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/black(H), SLOT_HUD_OUTER_SUIT)
H.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/black(H), SLOT_HUD_HEAD)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(H), SLOT_HUD_SHOES)
+7 -7
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/charge_up/bounce/lightning
/datum/spell/charge_up/bounce/lightning
name = "Lightning Bolt"
desc = "Throws a lightning bolt at your enemies. Classic. When clicked will start to charge in power. Then click on a mob to send the bolt before it overloads with power."
base_cooldown = 30 SECONDS
@@ -15,29 +15,29 @@
bounce_hit_sound = 'sound/magic/lightningshock.ogg'
var/damaging = TRUE
/obj/effect/proc_holder/spell/charge_up/bounce/lightning/New()
/datum/spell/charge_up/bounce/lightning/New()
..()
charge_up_overlay = image(icon = 'icons/effects/effects.dmi', icon_state = "electricity", layer = EFFECTS_LAYER)
/obj/effect/proc_holder/spell/charge_up/bounce/lightning/lightnian
/datum/spell/charge_up/bounce/lightning/lightnian
clothes_req = FALSE
invocation_type = "none"
damaging = FALSE
/obj/effect/proc_holder/spell/charge_up/bounce/lightning/get_bounce_energy()
/datum/spell/charge_up/bounce/lightning/get_bounce_energy()
if(damaging)
return max(15, get_energy_charge() / 2)
return 0
/obj/effect/proc_holder/spell/charge_up/bounce/lightning/get_bounce_amount()
/datum/spell/charge_up/bounce/lightning/get_bounce_amount()
if(damaging)
return 5
return round(get_energy_charge() / 20)
/obj/effect/proc_holder/spell/charge_up/bounce/lightning/create_beam(mob/origin, mob/target)
/datum/spell/charge_up/bounce/lightning/create_beam(mob/origin, mob/target)
origin.Beam(target, icon_state = "lightning[rand(1, 12)]", icon = 'icons/effects/effects.dmi', time = 5)
/obj/effect/proc_holder/spell/charge_up/bounce/lightning/apply_bounce_effect(mob/origin, mob/living/target, energy, mob/user)
/datum/spell/charge_up/bounce/lightning/apply_bounce_effect(mob/origin, mob/living/target, energy, mob/user)
if(damaging)
target.electrocute_act(energy, "Lightning Bolt", flags = SHOCK_NOGLOVES)
else
+7 -7
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/charge_up/bounce/magnet
/datum/spell/charge_up/bounce/magnet
name = "Magnetic Pull"
desc = "Pulls metalic objects from enemies hands with the power of MAGNETS."
action_icon_state = "magnet"
@@ -14,22 +14,22 @@
start_charging_text = "You start gathering magnetism around you."
bounce_hit_sound = 'sound/machines/defib_zap.ogg'
/obj/effect/proc_holder/spell/charge_up/bounce/magnet/New()
/datum/spell/charge_up/bounce/magnet/New()
..()
charge_up_overlay = image(icon = 'icons/effects/effects.dmi', icon_state = "electricity", layer = EFFECTS_LAYER)
/obj/effect/proc_holder/spell/charge_up/bounce/magnet/get_bounce_energy()
/datum/spell/charge_up/bounce/magnet/get_bounce_energy()
return get_energy_charge()
/obj/effect/proc_holder/spell/charge_up/bounce/magnet/get_bounce_amount()
/datum/spell/charge_up/bounce/magnet/get_bounce_amount()
if(get_energy_charge() >= 75)
return 5
return 0
/obj/effect/proc_holder/spell/charge_up/bounce/magnet/create_beam(mob/origin, mob/target)
/datum/spell/charge_up/bounce/magnet/create_beam(mob/origin, mob/target)
origin.Beam(target, icon_state = "lightning[rand(1, 12)]", icon = 'icons/effects/effects.dmi', time = 5)
/obj/effect/proc_holder/spell/charge_up/bounce/magnet/apply_bounce_effect(mob/origin, mob/target, energy, mob/user)
/datum/spell/charge_up/bounce/magnet/apply_bounce_effect(mob/origin, mob/target, energy, mob/user)
var/list/items_to_throw = list()
switch(energy)
if(0 to 25)
@@ -47,7 +47,7 @@
for(var/I in items_to_throw)
try_throw_object(user, target, I)
/obj/effect/proc_holder/spell/charge_up/bounce/magnet/proc/try_throw_object(mob/user, mob/thrower, obj/item/to_throw)
/datum/spell/charge_up/bounce/magnet/proc/try_throw_object(mob/user, mob/thrower, obj/item/to_throw)
if(!(to_throw.flags & CONDUCT) || !thrower.unEquip(to_throw, silent = TRUE))
return FALSE
thrower.visible_message("<span class='warning'>[to_throw] gets thrown out of [thrower] [thrower.p_their()] hands!</span>",
+21 -21
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/aoe/conjure/build/mime_wall
/datum/spell/aoe/conjure/build/mime_wall
name = "Invisible Wall"
desc = "The mime's performance transmutates into physical reality."
school = "mime"
@@ -15,7 +15,7 @@
action_icon_state = "mime"
action_background_icon_state = "bg_mime"
/obj/effect/proc_holder/spell/aoe/conjure/build/mime_wall/Click()
/datum/spell/aoe/conjure/build/mime_wall/Click()
if(usr && usr.mind)
if(!usr.mind.miming)
to_chat(usr, "<span class='notice'>You must dedicate yourself to silence first.</span>")
@@ -25,10 +25,10 @@
invocation_type ="none"
..()
/obj/effect/proc_holder/spell/mime/create_new_targeting()
/datum/spell/mime/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/mime/speak
/datum/spell/mime/speak
name = "Speech"
desc = "Make or break a vow of silence."
school = "mime"
@@ -40,7 +40,7 @@
action_icon_state = "mime_silence"
action_background_icon_state = "bg_mime"
/obj/effect/proc_holder/spell/mime/speak/Click()
/datum/spell/mime/speak/Click()
if(!usr)
return
if(!ishuman(usr))
@@ -52,7 +52,7 @@
still_recharging_msg = "<span class='warning'>You'll have to wait before you can give your vow of silence again!</span>"
..()
/obj/effect/proc_holder/spell/mime/speak/cast(list/targets,mob/user = usr)
/datum/spell/mime/speak/cast(list/targets,mob/user = usr)
for(var/mob/living/carbon/human/H in targets)
H.mind.miming=!H.mind.miming
if(H.mind.miming)
@@ -62,7 +62,7 @@
//Advanced Mimery traitor item spells
/obj/effect/proc_holder/spell/forcewall/mime
/datum/spell/forcewall/mime
name = "Invisible Greater Wall"
desc = "Form an invisible three tile wide blockade."
school = "mime"
@@ -77,7 +77,7 @@
action_icon_state = "mime_bigwall"
action_background_icon_state = "bg_mime"
/obj/effect/proc_holder/spell/forcewall/mime/Click()
/datum/spell/forcewall/mime/Click()
if(usr && usr.mind)
if(!usr.mind.miming)
to_chat(usr, "<span class='notice'>You must dedicate yourself to silence first.</span>")
@@ -87,7 +87,7 @@
invocation_type ="none"
..()
/obj/effect/proc_holder/spell/mime/fingergun
/datum/spell/mime/fingergun
name = "Finger Gun"
desc = "Shoot lethal, silencing bullets out of your fingers! 3 bullets available per cast. Use your fingers to holster them manually."
school = "mime"
@@ -101,7 +101,7 @@
var/gun = /obj/item/gun/projectile/revolver/fingergun
var/obj/item/gun/projectile/revolver/fingergun/current_gun
/obj/effect/proc_holder/spell/mime/fingergun/cast(list/targets, mob/user = usr)
/datum/spell/mime/fingergun/cast(list/targets, mob/user = usr)
for(var/mob/living/carbon/human/C in targets)
if(!current_gun)
to_chat(user, "<span class='notice'>You draw your fingers!</span>")
@@ -114,33 +114,33 @@
revert_cast(user)
/obj/effect/proc_holder/spell/mime/fingergun/Destroy()
/datum/spell/mime/fingergun/Destroy()
current_gun = null
return ..()
/obj/effect/proc_holder/spell/mime/fingergun/proc/holster_hand(atom/target, any=FALSE)
/datum/spell/mime/fingergun/proc/holster_hand(atom/target, any=FALSE)
SIGNAL_HANDLER
if(!current_gun || !any && action.owner.get_active_hand() != current_gun)
return
to_chat(action.owner, "<span class='notice'>You holster your fingers. Another time perhaps...</span>")
QDEL_NULL(current_gun)
/obj/effect/proc_holder/spell/mime/fingergun/fake
/datum/spell/mime/fingergun/fake
desc = "Pretend you're shooting bullets out of your fingers! 3 bullets available per cast. Use your fingers to holster them manually."
gun = /obj/item/gun/projectile/revolver/fingergun/fake
// Mime Spellbooks
/obj/item/spellbook/oneuse/mime
spell = /obj/effect/proc_holder/spell/aoe/conjure/build/mime_wall
spell = /datum/spell/aoe/conjure/build/mime_wall
spellname = "Invisible Wall"
name = "Miming Manual : "
desc = "It contains various pictures of mimes mid-performance, aswell as some illustrated tutorials."
icon_state = "bookmime"
/obj/item/spellbook/oneuse/mime/attack_self(mob/user)
var/obj/effect/proc_holder/spell/S = new spell
for(var/obj/effect/proc_holder/spell/knownspell in user.mind.spell_list)
var/datum/spell/S = new spell
for(var/datum/spell/knownspell in user.mind.spell_list)
if(knownspell.type == S.type)
if(user.mind)
to_chat(user, "<span class='notice'>You've already read this one.</span>")
@@ -159,19 +159,19 @@
/obj/item/spellbook/oneuse/mime/onlearned(mob/user)
used = TRUE
if(!locate(/obj/effect/proc_holder/spell/mime/speak) in user.mind.spell_list) //add vow of silence if not known by user
user.mind.AddSpell(new /obj/effect/proc_holder/spell/mime/speak)
if(!locate(/datum/spell/mime/speak) in user.mind.spell_list) //add vow of silence if not known by user
user.mind.AddSpell(new /datum/spell/mime/speak)
to_chat(user, "<span class='notice'>You have learned how to use silence to improve your performance.</span>")
/obj/item/spellbook/oneuse/mime/fingergun
spell = /obj/effect/proc_holder/spell/mime/fingergun
spell = /datum/spell/mime/fingergun
spellname = "Finger Gun"
desc = "It contains illustrations of guns and how to mime them."
/obj/item/spellbook/oneuse/mime/fingergun/fake
spell = /obj/effect/proc_holder/spell/mime/fingergun/fake
spell = /datum/spell/mime/fingergun/fake
/obj/item/spellbook/oneuse/mime/greaterwall
spell = /obj/effect/proc_holder/spell/forcewall/mime
spell = /datum/spell/forcewall/mime
spellname = "Invisible Greater Wall"
desc = "It contains illustrations of the great walls of human history."
+1 -1
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/touch/mime_malaise
/datum/spell/touch/mime_malaise
name = "Mime Malaise"
desc = "A spell popular with theater nerd wizards and contrarian pranksters, this spell will put on a mime costume on the target, \
stun them so that they may contemplate Art, and silence them. \
+21 -21
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/mimic
/datum/spell/mimic
name = "Mimic"
desc = "Learn a new form to mimic or become one of your known forms"
clothes_req = FALSE
@@ -32,7 +32,7 @@
)
/obj/effect/proc_holder/spell/mimic/create_new_targeting()
/datum/spell/mimic/create_new_targeting()
var/datum/spell_targeting/click/T = new
T.include_user = TRUE // To change forms
T.allowed_type = /atom/movable
@@ -40,7 +40,7 @@
T.click_radius = -1
return T
/obj/effect/proc_holder/spell/mimic/valid_target(atom/target, user)
/datum/spell/mimic/valid_target(atom/target, user)
if(is_type_in_list(target, black_listed_form_types))
return FALSE
if(istype(target, /atom/movable))
@@ -51,7 +51,7 @@
return FALSE
return ..()
/obj/effect/proc_holder/spell/mimic/cast(list/targets, mob/user)
/datum/spell/mimic/cast(list/targets, mob/user)
var/atom/movable/A = targets[1]
if(A == user)
INVOKE_ASYNC(src, PROC_REF(pick_form), user)
@@ -59,7 +59,7 @@
INVOKE_ASYNC(src, PROC_REF(remember_form), A, user)
/obj/effect/proc_holder/spell/mimic/proc/remember_form(atom/movable/A, mob/user)
/datum/spell/mimic/proc/remember_form(atom/movable/A, mob/user)
if(A.name in available_forms)
to_chat(user, "<span class='warning'>[A] is already an available form.</span>")
revert_cast(user)
@@ -83,7 +83,7 @@
available_forms[A.name] = new /datum/mimic_form(A, user)
to_chat(user, "<span class='sinister'>You learn the form of [A].</span>")
/obj/effect/proc_holder/spell/mimic/proc/pick_form(mob/user)
/datum/spell/mimic/proc/pick_form(mob/user)
if(!length(available_forms) && !selected_form)
to_chat(user, "<span class='warning'>No available forms. Learn more forms by using this spell on other objects first.</span>")
revert_cast(user)
@@ -109,7 +109,7 @@
return
take_form(available_forms[what], user)
/obj/effect/proc_holder/spell/mimic/proc/take_form(datum/mimic_form/form, mob/user)
/datum/spell/mimic/proc/take_form(datum/mimic_form/form, mob/user)
var/old_name = "[user]"
if(ishuman(user))
// Not fully finished yet
@@ -132,10 +132,10 @@
selected_form = form
/obj/effect/proc_holder/spell/mimic/proc/show_change_form_message(mob/user, old_name, new_name)
/datum/spell/mimic/proc/show_change_form_message(mob/user, old_name, new_name)
user.visible_message("<span class='warning'>[old_name] contorts and slowly becomes [new_name]!</span>", "<span class='sinister'>You take form of [new_name].</span>", "You hear loud cracking noises!")
/obj/effect/proc_holder/spell/mimic/proc/restore_form(mob/user, show_message = TRUE)
/datum/spell/mimic/proc/restore_form(mob/user, show_message = TRUE)
selected_form = null
var/old_name = "[user]"
@@ -157,21 +157,21 @@
UnregisterSignal(user, list(COMSIG_PARENT_EXAMINE, COMSIG_MOB_DEATH))
/obj/effect/proc_holder/spell/mimic/proc/show_restore_form_message(mob/user, old_name, new_name)
/datum/spell/mimic/proc/show_restore_form_message(mob/user, old_name, new_name)
user.visible_message("<span class='warning'>[old_name] shakes and contorts and quickly becomes [new_name]!</span>", "<span class='sinister'>You take return to your normal self.</span>", "You hear loud cracking noises!")
/obj/effect/proc_holder/spell/mimic/proc/examine_override(datum/source, mob/user, list/examine_list)
/datum/spell/mimic/proc/examine_override(datum/source, mob/user, list/examine_list)
examine_list.Cut()
examine_list += selected_form.examine_text
if(!perfect_disguise && get_dist(user, source) <= 3)
examine_list += "<span class='warning'>It doesn't look quite right...</span>"
/obj/effect/proc_holder/spell/mimic/proc/on_death(mob/user, gibbed)
/datum/spell/mimic/proc/on_death(mob/user, gibbed)
if(!gibbed)
restore_form(user, FALSE)
show_death_message(user)
/obj/effect/proc_holder/spell/mimic/proc/show_death_message(mob/user)
/datum/spell/mimic/proc/show_death_message(mob/user)
user.visible_message("<span class='warning'>[user] shakes and contorts as [user.p_they()] die[user.p_s()], returning to [user.p_their()] true form!</span>", "<span class='deadsay'>Your disguise fails as your life forces drain away.</span>", "You hear loud cracking noises followed by a thud!")
@@ -188,34 +188,34 @@
examine_text = form.examine(user)
name = form.name
/obj/effect/proc_holder/spell/mimic/morph
/datum/spell/mimic/morph
action_background_icon_state = "bg_morph"
/obj/effect/proc_holder/spell/mimic/morph/create_new_handler()
/datum/spell/mimic/morph/create_new_handler()
var/datum/spell_handler/morph/H = new
return H
/obj/effect/proc_holder/spell/mimic/morph/valid_target(atom/target, user)
/datum/spell/mimic/morph/valid_target(atom/target, user)
if(target != user && ismorph(target))
return FALSE
return ..()
/obj/effect/proc_holder/spell/mimic/morph/take_form(datum/mimic_form/form, mob/living/simple_animal/hostile/morph/user)
/datum/spell/mimic/morph/take_form(datum/mimic_form/form, mob/living/simple_animal/hostile/morph/user)
..()
user.assume()
/obj/effect/proc_holder/spell/mimic/morph/restore_form(mob/living/simple_animal/hostile/morph/user, show_message = TRUE)
/datum/spell/mimic/morph/restore_form(mob/living/simple_animal/hostile/morph/user, show_message = TRUE)
..()
user.restore()
/obj/effect/proc_holder/spell/mimic/morph/show_change_form_message(mob/user, old_name, new_name)
/datum/spell/mimic/morph/show_change_form_message(mob/user, old_name, new_name)
user.visible_message("<span class='warning'>[old_name] suddenly twists and changes shape, becoming a copy of [new_name]!</span>", \
"<span class='notice'>You twist your body and assume the form of [new_name].</span>")
/obj/effect/proc_holder/spell/mimic/morph/show_restore_form_message(mob/user, old_name, new_name)
/datum/spell/mimic/morph/show_restore_form_message(mob/user, old_name, new_name)
user.visible_message("<span class='warning'>[old_name] suddenly collapses in on itself, dissolving into a pile of green flesh!</span>", \
"<span class='notice'>You reform to your normal body.</span>")
/obj/effect/proc_holder/spell/mimic/morph/show_death_message(mob/user)
/datum/spell/mimic/morph/show_death_message(mob/user)
user.visible_message("<span class='warning'>[user] twists and dissolves into a pile of green flesh!</span>", \
"<span class='userdanger'>Your skin ruptures! Your flesh breaks apart! No disguise can ward off de--</span>")
+4 -4
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/mind_transfer
/datum/spell/mind_transfer
name = "Mind Transfer"
desc = "This spell allows the user to switch bodies with a target."
@@ -15,14 +15,14 @@
var/paralysis_amount_victim = 40 SECONDS //how much the victim is paralysed for after the spell
action_icon_state = "mindswap"
/obj/effect/proc_holder/spell/mind_transfer/create_new_targeting()
/datum/spell/mind_transfer/create_new_targeting()
var/datum/spell_targeting/click/T = new()
T.allowed_type = /mob/living
T.range = 1
T.click_radius = 0
return T
/obj/effect/proc_holder/spell/mind_transfer/valid_target(mob/living/target, mob/user)
/datum/spell/mind_transfer/valid_target(mob/living/target, mob/user)
return target.stat != DEAD && target.key && target.mind
/*
@@ -30,7 +30,7 @@ Urist: I don't feel like figuring out how you store object spells so I'm leaving
Make sure spells that are removed from spell_list are actually removed and deleted when mind transfering.
Also, you never added distance checking after target is selected. I've went ahead and did that.
*/
/obj/effect/proc_holder/spell/mind_transfer/cast(list/targets, mob/user = usr)
/datum/spell/mind_transfer/cast(list/targets, mob/user = usr)
var/mob/living/target = targets[1]
+3 -3
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/night_vision
/datum/spell/night_vision
name = "Toggle Nightvision"
desc = "Toggle your nightvision mode."
@@ -7,10 +7,10 @@
message = "<span class='notice'>You toggle your night vision!</span>"
/obj/effect/proc_holder/spell/night_vision/create_new_targeting()
/datum/spell/night_vision/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/night_vision/cast(list/targets, mob/user = usr)
/datum/spell/night_vision/cast(list/targets, mob/user = usr)
for(var/mob/living/target in targets)
switch(target.lighting_alpha)
if(LIGHTING_PLANE_ALPHA_VISIBLE)
+14 -26
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/projectile
/datum/spell/projectile
desc = "This spell summons projectiles which try to hit the targets."
var/proj_icon = 'icons/obj/projectiles.dmi'
@@ -10,7 +10,8 @@
var/proj_trail_icon = 'icons/obj/wizard.dmi'
var/proj_trail_icon_state = "trail"
var/proj_type = "/obj/effect/proc_holder/spell" //IMPORTANT use only subtypes of this
/// The projectile we spawn. Make sure to override this
var/proj_type
var/proj_lingering = 0 //if it lingers or disappears upon hitting an obstacle
var/proj_homing = 1 //if it follows the target
@@ -20,64 +21,51 @@
var/proj_lifespan = 15 //in deciseconds * proj_step_delay
var/proj_step_delay = 1 //lower = faster
/obj/effect/proc_holder/spell/projectile/cast(list/targets, mob/user = usr)
/datum/spell/projectile/cast(list/targets, mob/user = usr)
for(var/mob/living/target in targets)
spawn(0)
var/obj/effect/proc_holder/spell/projectile
if(istext(proj_type))
var/projectile_type = text2path(proj_type)
projectile = new projectile_type(user)
if(istype(proj_type,/obj/effect/proc_holder/spell))
projectile = new /obj/effect/proc_holder/spell/trigger(user)
projectile:linked_spells += proj_type
var/obj/item/projectile/projectile = new proj_type(get_turf(user))
projectile.icon = proj_icon
projectile.icon_state = proj_icon_state
projectile.dir = get_dir(target,projectile)
projectile.dir = get_dir(target, projectile)
projectile.name = proj_name
var/current_loc = get_turf(projectile)
var/current_loc = user.loc
projectile.loc = current_loc
for(var/i = 0,i < proj_lifespan,i++)
for(var/i in 1 to proj_lifespan)
if(!projectile)
break
if(proj_homing)
if(proj_insubstantial)
projectile.dir = get_dir(projectile,target)
projectile.loc = get_step_to(projectile,target)
projectile.forceMove(get_step_to(projectile, target))
else
step_to(projectile,target)
else
if(proj_insubstantial)
projectile.loc = get_step(projectile,dir)
projectile.forceMove(get_step(projectile, projectile.dir))
else
step(projectile,dir)
step(projectile, projectile.dir)
if(!projectile) // step and step_to sleeps so we'll have to check again.
break
if(!proj_lingering && projectile.loc == current_loc) //if it didn't move since last time
if(!proj_lingering && (get_turf(projectile) == current_loc)) //if it didn't move since last time
qdel(projectile)
break
if(proj_trail && projectile)
spawn(0)
if(projectile)
var/obj/effect/overlay/trail = new /obj/effect/overlay(projectile.loc)
var/obj/effect/overlay/trail = new /obj/effect/overlay(get_turf(projectile))
trail.icon = proj_trail_icon
trail.icon_state = proj_trail_icon_state
trail.density = FALSE
spawn(proj_trail_lifespan)
qdel(trail)
if(projectile.loc in range(target.loc,proj_trigger_range))
projectile.perform(list(target), user = user)
break
current_loc = projectile.loc
current_loc = get_turf(projectile)
sleep(proj_step_delay)
+3 -3
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/rathens
/datum/spell/rathens
name = "Rathen's Secret"
desc = "Summons a powerful shockwave around you that tears the appendix out of enemies, and occasionally removes their limbs."
base_cooldown = 50 SECONDS
@@ -8,12 +8,12 @@
cooldown_min = 20 SECONDS
action_icon_state = "lungpunch"
/obj/effect/proc_holder/spell/rathens/create_new_targeting()
/datum/spell/rathens/create_new_targeting()
var/datum/spell_targeting/targeted/T = new()
T.max_targets = INFINITY
return T
/obj/effect/proc_holder/spell/rathens/cast(list/targets, mob/user = usr)
/datum/spell/rathens/cast(list/targets, mob/user = usr)
for(var/mob/living/carbon/human/H in targets)
var/datum/effect_system/smoke_spread/s = new
s.set_up(5, FALSE, H)
+3 -3
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/rod_form
/datum/spell/rod_form
name = "Rod Form"
desc = "Take on the form of an immovable rod, destroying all in your path."
clothes_req = TRUE
@@ -13,10 +13,10 @@
sound = 'sound/effects/whoosh.ogg'
var/rod_delay = 2
/obj/effect/proc_holder/spell/rod_form/create_new_targeting()
/datum/spell/rod_form/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/rod_form/cast(list/targets,mob/user = usr)
/datum/spell/rod_form/cast(list/targets,mob/user = usr)
if(get_turf(user) != user.loc)
to_chat(user, "<span class='warning'>You cannot summon a rod in the ether, the spell fizzles out!</span>")
revert_cast()
+3 -3
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/sentient_sword_lunge
/datum/spell/sentient_sword_lunge
name = "Lunge"
desc = "Lunge at something in your view range."
clothes_req = FALSE
@@ -8,10 +8,10 @@
sound = 'sound/magic/repulse.ogg'
action_icon_state = "lunge"
/obj/effect/proc_holder/spell/sentient_sword_lunge/create_new_targeting()
/datum/spell/sentient_sword_lunge/create_new_targeting()
return new /datum/spell_targeting/clicked_atom
/obj/effect/proc_holder/spell/sentient_sword_lunge/cast(list/targets, mob/user = usr)
/datum/spell/sentient_sword_lunge/cast(list/targets, mob/user = usr)
if(!istype(user.loc, /obj/item))
to_chat(user, "<span class='warning'>You cannot use this ability if you're outside a blade!</span>")
return
+10 -10
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/shapeshift
/datum/spell/shapeshift
name = "Shapechange"
desc = "Take on the shape of another for a time to use their natural abilities. Once you've made your choice it cannot be changed."
clothes_req = FALSE
@@ -17,10 +17,10 @@
/mob/living/simple_animal/bot/ed209,
/mob/living/simple_animal/hostile/construct/armoured)
/obj/effect/proc_holder/spell/shapeshift/create_new_targeting()
/datum/spell/shapeshift/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/shapeshift/cast(list/targets, mob/user = usr)
/datum/spell/shapeshift/cast(list/targets, mob/user = usr)
for(var/mob/living/M in targets)
if(!shapeshift_type)
var/list/animal_list = list()
@@ -36,7 +36,7 @@
else
Shapeshift(M)
/obj/effect/proc_holder/spell/shapeshift/proc/Shapeshift(mob/living/caster)
/datum/spell/shapeshift/proc/Shapeshift(mob/living/caster)
for(var/mob/living/M in caster)
if(M.status_flags & GODMODE)
to_chat(caster, "<span class='warning'>You're already shapeshifted!</span>")
@@ -53,7 +53,7 @@
caster.mind.transfer_to(shape)
/obj/effect/proc_holder/spell/shapeshift/proc/Restore(mob/living/shape)
/datum/spell/shapeshift/proc/Restore(mob/living/shape)
var/mob/living/caster
for(var/mob/living/M in shape)
if(M in current_casters)
@@ -72,7 +72,7 @@
shape.mind.transfer_to(caster)
qdel(shape) //Gib it maybe ?
/obj/effect/proc_holder/spell/shapeshift/dragon
/datum/spell/shapeshift/dragon
name = "Dragon Form"
desc = "Take on the shape a lesser ash drake after a short delay."
invocation = "*scream"
@@ -82,7 +82,7 @@
current_casters = list()
possible_shapes = list(/mob/living/simple_animal/hostile/megafauna/dragon/lesser)
/obj/effect/proc_holder/spell/shapeshift/dragon/Shapeshift(mob/living/caster)
/datum/spell/shapeshift/dragon/Shapeshift(mob/living/caster)
caster.visible_message("<span class='danger'>[caster] screams in agony as bones and claws erupt out of their flesh!</span>",
"<span class='danger'>You begin channeling the transformation.</span>")
if(!do_after(caster, 5 SECONDS, FALSE, caster))
@@ -90,7 +90,7 @@
return
return ..()
/obj/effect/proc_holder/spell/shapeshift/bats
/datum/spell/shapeshift/bats
name = "Bat Form"
desc = "Take on the shape of a swarm of bats."
invocation = "none"
@@ -103,7 +103,7 @@
current_casters = list()
possible_shapes = list(/mob/living/simple_animal/hostile/scarybat/adminvampire)
/obj/effect/proc_holder/spell/shapeshift/hellhound
/datum/spell/shapeshift/hellhound
name = "Lesser Hellhound Form"
desc = "Take on the shape of a Hellhound."
invocation = "none"
@@ -117,7 +117,7 @@
current_casters = list()
possible_shapes = list(/mob/living/simple_animal/hostile/hellhound)
/obj/effect/proc_holder/spell/shapeshift/hellhound/greater
/datum/spell/shapeshift/hellhound/greater
name = "Greater Hellhound Form"
shapeshift_type = /mob/living/simple_animal/hostile/hellhound/greater
current_shapes = list(/mob/living/simple_animal/hostile/hellhound/greater)
+8 -8
View File
@@ -1,5 +1,5 @@
// This could probably be an aoe spell but it's a little cursed, so I'm not touching it
/obj/effect/proc_holder/spell/spacetime_dist
/datum/spell/spacetime_dist
name = "Spacetime Distortion"
desc = "Entangle the strings of space-time in an area around you, \
randomizing the layout and making proper movement impossible. The strings vibrate... \
@@ -25,23 +25,23 @@
/// A lazylist of all scramble effects this spell has created.
var/list/effects
/obj/effect/proc_holder/spell/spacetime_dist/Destroy()
/datum/spell/spacetime_dist/Destroy()
QDEL_LIST_CONTENTS(effects)
return ..()
/obj/effect/proc_holder/spell/spacetime_dist/create_new_targeting()
/datum/spell/spacetime_dist/create_new_targeting()
var/datum/spell_targeting/spiral/targeting = new()
targeting.range = scramble_radius + 3 * spell_level
return targeting
/obj/effect/proc_holder/spell/spacetime_dist/on_purchase_upgrade()
/datum/spell/spacetime_dist/on_purchase_upgrade()
. = ..()
targeting = create_new_targeting()
/obj/effect/proc_holder/spell/spacetime_dist/cast_check(charge_check = TRUE, start_recharge = TRUE, mob/user = usr)
/datum/spell/spacetime_dist/cast_check(charge_check = TRUE, start_recharge = TRUE, mob/user = usr)
return ..() && ready
/obj/effect/proc_holder/spell/spacetime_dist/cast(list/targets, mob/user = usr)
/datum/spell/spacetime_dist/cast(list/targets, mob/user = usr)
. = ..()
var/list/turf/to_switcharoo = targets
if(!length(to_switcharoo))
@@ -64,12 +64,12 @@
effects += effect_b
/obj/effect/proc_holder/spell/spacetime_dist/after_cast(list/targets, mob/user)
/datum/spell/spacetime_dist/after_cast(list/targets, mob/user)
. = ..()
addtimer(CALLBACK(src, PROC_REF(clean_turfs)), duration)
/// Callback which cleans up our effects list after the duration expires.
/obj/effect/proc_holder/spell/spacetime_dist/proc/clean_turfs()
/datum/spell/spacetime_dist/proc/clean_turfs()
QDEL_LIST_CONTENTS(effects)
ready = TRUE
+2 -2
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/aoe/conjure/summon_supermatter
/datum/spell/aoe/conjure/summon_supermatter
name = "Summon Supermatter Crystal"
desc = "Summons an active supermatter crystal. Imbues you with some supermatter, giving you resistance to it's hallucinations and radiation immunity."
base_cooldown = 5 MINUTES
@@ -8,7 +8,7 @@
summon_amt = 1
aoe_range = 0
/obj/effect/proc_holder/spell/aoe/conjure/summon_supermatter/cast(list/targets, mob/living/user = usr)
/datum/spell/aoe/conjure/summon_supermatter/cast(list/targets, mob/living/user = usr)
var/list/summoned_objects = ..()
for(var/obj/machinery/atmospherics/supermatter_crystal/our_crystal in summoned_objects)
addtimer(CALLBACK(our_crystal, TYPE_PROC_REF(/obj/machinery/atmospherics/supermatter_crystal, manual_start), 3000), 3 SECONDS)
+3 -3
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/summonitem
/datum/spell/summonitem
name = "Instant Summons"
desc = "This spell can be used to recall a previously marked item to your hand from anywhere in the universe."
school = "transmutation"
@@ -14,10 +14,10 @@
var/static/list/blacklisted_summons = list(/obj/machinery/computer/cryopod = TRUE, /obj/machinery/atmospherics = TRUE, /obj/structure/disposalholder = TRUE, /obj/machinery/disposal = TRUE)
action_icon_state = "summons"
/obj/effect/proc_holder/spell/summonitem/create_new_targeting()
/datum/spell/summonitem/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/summonitem/cast(list/targets, mob/user = usr)
/datum/spell/summonitem/cast(list/targets, mob/user = usr)
for(var/mob/living/target in targets)
var/list/hand_items = list(target.get_active_hand(),target.get_inactive_hand())
var/butterfingers = FALSE
+7 -7
View File
@@ -1,19 +1,19 @@
/obj/effect/proc_holder/spell/touch
/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
/obj/effect/proc_holder/spell/touch/create_new_targeting()
/datum/spell/touch/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/touch/Click(mob/user = usr)
/datum/spell/touch/Click(mob/user = usr)
if(attached_hand)
discharge_hand(user, TRUE)
return FALSE
charge_hand(user)
/obj/effect/proc_holder/spell/touch/proc/charge_hand(mob/living/carbon/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))
@@ -36,7 +36,7 @@
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/proc/discharge_hand(atom/target, any = FALSE)
/datum/spell/touch/proc/discharge_hand(atom/target, any = FALSE)
SIGNAL_HANDLER
var/mob/living/carbon/user = action.owner
if(!istype(attached_hand))
@@ -48,7 +48,7 @@
to_chat(user, "<span class='notice'>You draw the power out of your hand.</span>")
/obj/effect/proc_holder/spell/touch/disintegrate
/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
@@ -60,7 +60,7 @@
action_icon_state = "gib"
/obj/effect/proc_holder/spell/touch/flesh_to_stone
/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
-28
View File
@@ -1,28 +0,0 @@
/obj/effect/proc_holder/spell/trigger
desc = "This spell triggers another spell or a few."
var/list/linked_spells = list() //those are just referenced by the trigger spell and are unaffected by it directly
var/list/starting_spells = list() //those are added on New() to contents from default spells and are deleted when the trigger spell is deleted to prevent memory leaks
/obj/effect/proc_holder/spell/trigger/New()
..()
for(var/spell in starting_spells)
var/spell_to_add = text2path(spell)
new spell_to_add(src) //should result in adding to contents, needs testing
/obj/effect/proc_holder/spell/trigger/Destroy()
for(var/spell in contents)
qdel(spell)
linked_spells = null
starting_spells = null
return ..()
/obj/effect/proc_holder/spell/trigger/cast(list/targets, mob/user = usr)
for(var/mob/living/target in targets)
for(var/obj/effect/proc_holder/spell/spell in contents)
spell.perform(list(target), 0, user = user)
for(var/obj/effect/proc_holder/spell/spell in linked_spells)
spell.perform(list(target), 0, user = user)
return
+4 -4
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/turf_teleport
/datum/spell/turf_teleport
name = "Turf Teleport"
desc = "This spell teleports the target to the turf in range."
nonabstract_req = TRUE
@@ -14,12 +14,12 @@
var/sound1 = 'sound/weapons/zapbang.ogg'
var/sound2 = 'sound/weapons/zapbang.ogg'
/obj/effect/proc_holder/spell/turf_teleport/create_new_targeting()
/datum/spell/turf_teleport/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/turf_teleport/cast(list/targets,mob/living/user = usr)
/datum/spell/turf_teleport/cast(list/targets,mob/living/user = usr)
if(sound1)
playsound(get_turf(user), sound1, 50,1)
playsound(get_turf(user), sound1, 50, TRUE)
for(var/mob/living/target in targets)
var/list/turfs = new/list()
+64 -73
View File
@@ -1,4 +1,4 @@
/obj/effect/proc_holder/spell/projectile/magic_missile
/datum/spell/projectile/magic_missile
name = "Magic Missile"
desc = "This spell fires several, slow moving, magic projectiles at nearby targets."
@@ -12,7 +12,7 @@
proj_icon_state = "magicm"
proj_name = "a magic missile"
proj_lingering = 1
proj_type = "/obj/effect/proc_holder/spell/inflict_handler/magic_missile"
proj_type = /obj/item/projectile/magic/magic_missile
proj_lifespan = 20
proj_step_delay = 2
@@ -25,33 +25,33 @@
sound = 'sound/magic/magic_missile.ogg'
/obj/effect/proc_holder/spell/projectile/magic_missile/create_new_targeting()
/datum/spell/projectile/magic_missile/create_new_targeting()
var/datum/spell_targeting/targeted/T = new()
T.allowed_type = /mob/living
T.max_targets = INFINITY
return T
/obj/effect/proc_holder/spell/inflict_handler/magic_missile
amt_weakened = 6 SECONDS
sound = 'sound/magic/mm_hit.ogg'
/obj/item/projectile/magic/magic_missile
name = "Magic Missile"
hitsound = 'sound/magic/mm_hit.ogg'
weaken = 6 SECONDS
/obj/effect/proc_holder/spell/projectile/honk_missile
/datum/spell/projectile/honk_missile
name = "Honk Missile"
desc = "This spell fires several, slow moving, magic bikehorns at nearby targets."
school = "evocation"
base_cooldown = 60
base_cooldown = 6 SECONDS
clothes_req = FALSE
invocation = "HONK GY AMA"
invocation_type = "shout"
cooldown_min = 60 //35 deciseconds reduction per rank
cooldown_min = 6 SECONDS
proj_icon = 'icons/obj/items.dmi'
proj_icon_state = "bike_horn"
proj_name = "A bike horn"
proj_lingering = 1
proj_type = "/obj/effect/proc_holder/spell/inflict_handler/honk_missile"
proj_type = /obj/item/projectile/magic/magic_missile/honk_missile
proj_lifespan = 20
proj_step_delay = 5
@@ -65,25 +65,25 @@
sound = 'sound/items/bikehorn.ogg'
/obj/effect/proc_holder/spell/projectile/honk_missile/create_new_targeting()
/datum/spell/projectile/honk_missile/create_new_targeting()
var/datum/spell_targeting/targeted/T = new()
T.allowed_type = /mob/living
T.max_targets = INFINITY
return T
/obj/effect/proc_holder/spell/inflict_handler/honk_missile
amt_weakened = 6 SECONDS
sound = 'sound/items/bikehorn.ogg'
/obj/item/projectile/magic/magic_missile/honk_missile
name = "Funny Missile"
hitsound = 'sound/items/bikehorn.ogg'
/obj/effect/proc_holder/spell/noclothes
/datum/spell/noclothes
name = "No Clothes"
desc = "This always-on spell allows you to cast magic without your garments."
action_icon_state = "no_clothes"
/obj/effect/proc_holder/spell/noclothes/create_new_targeting()
/datum/spell/noclothes/create_new_targeting()
return new /datum/spell_targeting/self // Dummy value
/obj/effect/proc_holder/spell/genetic/mutate
/datum/spell/genetic/mutate
name = "Mutate"
desc = "This spell causes you to turn into a hulk and gain laser vision for a short while."
@@ -102,14 +102,14 @@
action_icon_state = "mutate"
sound = 'sound/magic/mutate.ogg'
/obj/effect/proc_holder/spell/genetic/mutate/Initialize(mapload)
. = ..()
/datum/spell/genetic/mutate/New()
..()
mutations = list(GLOB.hulkblock)
/obj/effect/proc_holder/spell/genetic/mutate/create_new_targeting()
/datum/spell/genetic/mutate/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/smoke
/datum/spell/smoke
name = "Smoke"
desc = "This spell spawns a cloud of choking smoke at your location and does not require wizard garb."
@@ -125,13 +125,13 @@
action_icon_state = "smoke"
/obj/effect/proc_holder/spell/smoke/create_new_targeting()
/datum/spell/smoke/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/emplosion/disable_tech
/datum/spell/emplosion/disable_tech
name = "Disable Tech"
desc = "This spell disables all weapons, cameras and most other technology in range."
base_cooldown = 400
base_cooldown = 40 SECONDS
clothes_req = TRUE
invocation = "NEC CANTIO"
invocation_type = "shout"
@@ -142,7 +142,7 @@
sound = 'sound/magic/disable_tech.ogg'
/obj/effect/proc_holder/spell/turf_teleport/blink
/datum/spell/turf_teleport/blink
name = "Blink"
desc = "This spell randomly teleports you a short distance."
@@ -167,10 +167,10 @@
sound1 = 'sound/magic/blink.ogg'
sound2 = 'sound/magic/blink.ogg'
/obj/effect/proc_holder/spell/turf_teleport/blink/create_new_targeting()
/datum/spell/turf_teleport/blink/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/area_teleport/teleport
/datum/spell/area_teleport/teleport
name = "Teleport"
desc = "This spell teleports you to a type of area of your selection."
@@ -187,10 +187,10 @@
sound1 = 'sound/magic/teleport_diss.ogg'
sound2 = 'sound/magic/teleport_app.ogg'
/obj/effect/proc_holder/spell/area_teleport/teleport/create_new_targeting()
/datum/spell/area_teleport/teleport/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/return_to_teacher
/datum/spell/return_to_teacher
name = "Return to Teacher"
desc = "This spell teleports you back to your teacher."
@@ -204,16 +204,16 @@
action_icon_state = "spell_teleport"
var/datum/mind/teacher
/obj/effect/proc_holder/spell/return_to_teacher/create_new_targeting()
/datum/spell/return_to_teacher/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/return_to_teacher/cast(list/targets, mob/living/user = usr)
/datum/spell/return_to_teacher/cast(list/targets, mob/living/user = usr)
if(!(teacher && teacher.current))
to_chat(user, "<span class='danger'>The link to your teacher is broken!</span>")
return
do_teleport(user, teacher.current, 1, sound_in = 'sound/magic/blink.ogg', sound_out = 'sound/magic/blink.ogg', safe_turf_pick = TRUE)
/obj/effect/proc_holder/spell/forcewall
/datum/spell/forcewall
name = "Force Wall"
desc = "This spell creates a 3 tile wide unbreakable wall that only you can pass through, and does not need wizard garb. Lasts 30 seconds."
@@ -227,10 +227,10 @@
cooldown_min = 5 SECONDS //25 deciseconds reduction per rank
var/wall_type = /obj/effect/forcefield/wizard
/obj/effect/proc_holder/spell/forcewall/create_new_targeting()
/datum/spell/forcewall/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/forcewall/cast(list/targets, mob/user = usr)
/datum/spell/forcewall/cast(list/targets, mob/user = usr)
new wall_type(get_turf(user), user)
if(user.dir == SOUTH || user.dir == NORTH)
new wall_type(get_step(user, EAST), user)
@@ -239,10 +239,10 @@
new wall_type(get_step(user, NORTH), user)
new wall_type(get_step(user, SOUTH), user)
/obj/effect/proc_holder/spell/aoe/conjure/timestop
/datum/spell/aoe/conjure/timestop
name = "Stop Time"
desc = "This spell stops time for everyone except for you, allowing you to move freely while your enemies and even projectiles are frozen."
base_cooldown = 500
base_cooldown = 50 SECONDS
clothes_req = TRUE
invocation = "TOKI WO TOMARE"
invocation_type = "shout"
@@ -255,7 +255,7 @@
aoe_range = 0
/obj/effect/proc_holder/spell/aoe/conjure/carp
/datum/spell/aoe/conjure/carp
name = "Summon Carp"
desc = "This spell conjures a simple carp."
@@ -270,7 +270,7 @@
cast_sound = 'sound/magic/summon_karp.ogg'
aoe_range = 1
/obj/effect/proc_holder/spell/aoe/conjure/construct
/datum/spell/aoe/conjure/construct
name = "Artificer"
desc = "This spell conjures a construct which may be controlled by Shades"
@@ -286,7 +286,7 @@
cast_sound = 'sound/magic/summonitems_generic.ogg'
aoe_range = 0
/obj/effect/proc_holder/spell/aoe/conjure/creature
/datum/spell/aoe/conjure/creature
name = "Summon Creature Swarm"
desc = "This spell tears the fabric of reality, allowing horrific daemons to spill forth"
@@ -301,10 +301,9 @@
cast_sound = 'sound/magic/summonitems_generic.ogg'
aoe_range = 3
/obj/effect/proc_holder/spell/trigger/blind
/datum/spell/genetic/blind
name = "Blind"
desc = "This spell temporarily blinds a single person and does not require wizard garb."
school = "transmutation"
base_cooldown = 10 SECONDS
clothes_req = FALSE
@@ -312,30 +311,22 @@
invocation_type = "whisper"
message = "<span class='notice'>Your eyes cry out in pain!</span>"
cooldown_min = 2 SECONDS
traits = list(TRAIT_BLIND)
starting_spells = list("/obj/effect/proc_holder/spell/inflict_handler/blind","/obj/effect/proc_holder/spell/genetic/blind")
duration = 30 SECONDS
sound = 'sound/magic/blind.ogg'
action_icon_state = "blind"
/obj/effect/proc_holder/spell/trigger/blind/create_new_targeting()
/datum/spell/genetic/blind/create_new_targeting()
var/datum/spell_targeting/click/C = new()
C.allowed_type = /mob/living
return C
/obj/effect/proc_holder/spell/inflict_handler/blind
amt_eye_blind = 10
amt_eye_blurry = 20
sound = 'sound/magic/blind.ogg'
/datum/spell/genetic/blind/do_additional_effects(mob/living/target)
target.EyeBlurry(20 SECONDS)
target.EyeBlind(10 SECONDS)
SEND_SOUND(target, sound('sound/magic/blind.ogg'))
/obj/effect/proc_holder/spell/genetic/blind
traits = list(TRAIT_BLIND)
duration = 300
sound = 'sound/magic/blind.ogg'
/obj/effect/proc_holder/spell/genetic/blind/create_new_targeting()
return new /datum/spell_targeting/self // Dummy value since it is never used by an user directly
/obj/effect/proc_holder/spell/fireball
/datum/spell/fireball
name = "Fireball"
desc = "This spell fires a fireball at a target and does not require wizard garb."
@@ -355,21 +346,21 @@
active = FALSE
/obj/effect/proc_holder/spell/fireball/apprentice
/datum/spell/fireball/apprentice
centcom_cancast = FALSE
/obj/effect/proc_holder/spell/fireball/create_new_targeting()
/datum/spell/fireball/create_new_targeting()
var/datum/spell_targeting/clicked_atom/external/C = new()
C.range = 20
return C
/obj/effect/proc_holder/spell/fireball/update_icon_state()
/datum/spell/fireball/update_spell_icon()
if(!action)
return
action.button_icon_state = "fireball[active]"
action.UpdateButtons()
/obj/effect/proc_holder/spell/fireball/cast(list/targets, mob/living/user = usr)
/datum/spell/fireball/cast(list/targets, mob/living/user = usr)
var/target = targets[1] //There is only ever one target for fireball
var/turf/T = user.loc
var/turf/U = get_step(user, user.dir) // Get the tile infront of the move, based on their direction
@@ -386,7 +377,7 @@
return TRUE
/obj/effect/proc_holder/spell/fireball/toolbox
/datum/spell/fireball/toolbox
name = "Homing Toolbox"
desc = "This spell summons and throws a magical homing toolbox at your opponent."
sound = 'sound/weapons/smash.ogg'
@@ -396,7 +387,7 @@
selection_activated_message = "<span class='notice'>You prepare to cast your homing toolbox! <B>Left-click to cast at a target!</B></span>"
selection_deactivated_message = "<span class='notice'>You unrobust your toolbox...for now.</span>"
/obj/effect/proc_holder/spell/fireball/homing
/datum/spell/fireball/homing
name = "Greater Homing Fireball"
desc = "This spell fires a strong homing fireball at a target."
invocation = "ZI-ONI SOMA"
@@ -405,10 +396,10 @@
selection_activated_message = "<span class='notice'>You prepare to cast your greater homing fireball spell! <B>Left-click to cast at a target!</B></span>"
base_cooldown = 6 SECONDS
/obj/effect/proc_holder/spell/aoe/repulse
/datum/spell/aoe/repulse
name = "Repulse"
desc = "This spell throws everything around the user away."
base_cooldown = 400
base_cooldown = 40 SECONDS
clothes_req = TRUE
invocation = "GITTAH WEIGH"
invocation_type = "shout"
@@ -419,12 +410,12 @@
action_icon_state = "repulse"
aoe_range = 5
/obj/effect/proc_holder/spell/aoe/repulse/create_new_targeting()
/datum/spell/aoe/repulse/create_new_targeting()
var/datum/spell_targeting/aoe/turf/targeting = new()
targeting.range = aoe_range
return targeting
/obj/effect/proc_holder/spell/aoe/repulse/cast(list/targets, mob/user = usr, stun_amt = 4 SECONDS)
/datum/spell/aoe/repulse/cast(list/targets, mob/user = usr, stun_amt = 4 SECONDS)
var/list/thrownatoms = list()
var/atom/throwtarget
var/distfromcaster
@@ -455,24 +446,24 @@
spawn(0)
AM.throw_at(throwtarget, ((clamp((maxthrow - (clamp(distfromcaster - 2, 0, distfromcaster))), 3, maxthrow))), 1)//So stuff gets tossed around at the same time.
/obj/effect/proc_holder/spell/sacred_flame
/datum/spell/sacred_flame
name = "Sacred Flame"
desc = "Makes everyone around you more flammable, and lights yourself on fire."
base_cooldown = 60
base_cooldown = 6 SECONDS
clothes_req = FALSE
invocation = "FI'RAN DADISKO"
invocation_type = "shout"
action_icon_state = "sacredflame"
sound = 'sound/magic/fireball.ogg'
/obj/effect/proc_holder/spell/sacred_flame/create_new_targeting()
/datum/spell/sacred_flame/create_new_targeting()
var/datum/spell_targeting/aoe/A = new()
A.include_user = TRUE
A.range = 6
A.allowed_type = /mob/living
return A
/obj/effect/proc_holder/spell/sacred_flame/cast(list/targets, mob/user = usr)
/datum/spell/sacred_flame/cast(list/targets, mob/user = usr)
for(var/mob/living/L in targets)
L.adjust_fire_stacks(20)
if(isliving(user))