mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Refactors spell targeting to delegate it to a targeting datum (#16552)
Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* The base class for the handler systems spells use.
|
||||
* Subtypes of this class can be added to spells to modify their behaviour and change their can_cast.
|
||||
* Thus allowing for a more modular behaviour system. For example a vampire spell that jaunts can just add the vampire spell_handler to the jaunt spell
|
||||
*/
|
||||
|
||||
/datum/spell_handler
|
||||
|
||||
/datum/spell_handler/proc/can_cast(mob/user, charge_check, show_message, obj/effect/proc_holder/spell/spell)
|
||||
return TRUE
|
||||
|
||||
/datum/spell_handler/proc/spend_spell_cost(mob/user, obj/effect/proc_holder/spell/spell)
|
||||
return
|
||||
|
||||
/datum/spell_handler/proc/revert_cast(mob/user, obj/effect/proc_holder/spell/spell)
|
||||
return
|
||||
|
||||
/datum/spell_handler/proc/before_cast(list/targets, mob/user, obj/effect/proc_holder/spell/spell)
|
||||
return
|
||||
|
||||
/datum/spell_handler/proc/after_cast(list/targets, mob/user, obj/effect/proc_holder/spell/spell)
|
||||
return
|
||||
Reference in New Issue
Block a user