mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-19 23:01:35 +00:00
* Moves alien verbs to spells * lol * Standardization, polish, making alien plasma huds more consistant * The very cursed way of handling touch spells * logging + more polish * snakecase + documentation * finishing touches * oops, ty henri Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * sprites from TGstation * sprites, again * oops * farie's review part 1 * farie's review p2, signals * Erics PR compat * farie's review 3 * that too * the shawnshank redemption * boink * removes larva transfer plasma * you want a sprite cranberry? * TM fix 1 * FUCK I BROKE LOGGING * bam * final touches --------- Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
38 lines
1.9 KiB
Plaintext
38 lines
1.9 KiB
Plaintext
/* This is the handler for alien spells
|
|
This relies on a lot of different procs on the spell and carbon level, so if you are editing this, remember to check that the other procs aren't editied in a way that
|
|
could change behavior.
|
|
You're gonna see a lot of plasmavessel checks and alien checks, as a lot of things need to work a certain way when used by an alien, and a different way when used by a human.
|
|
This was also the case with the verb implementation, it's just much more obvious now.
|
|
*/
|
|
/datum/spell_handler/alien
|
|
/// 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)
|
|
var/obj/item/organ/internal/alien/plasmavessel/vessel = user.get_int_organ(/obj/item/organ/internal/alien/plasmavessel)
|
|
if(!vessel)
|
|
return 0
|
|
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)
|
|
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)
|
|
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)
|
|
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)
|
|
|
|
/mob/living/carbon/proc/get_plasma()
|
|
var/obj/item/organ/internal/alien/plasmavessel/vessel = get_int_organ(/obj/item/organ/internal/alien/plasmavessel)
|
|
if(!vessel)
|
|
return 0
|
|
return vessel.stored_plasma
|