mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-04 06:22:14 +00:00
* Ports a psionic system from Bay. * Rip out this shitcode. * shitcoden't * fixes * it should work fully now * Admin fixes * Remove todos * remove todos part 2 * Removes psi-armour. We don't need this for now. * Skrell are now operants. Tweaks coercion. * Adds thralls. * Temp removal of psiarmour. Fixes psigrabs. * Thrall assay. * fixes * More fixes * unused define cleanup * Log and powers * Skrell powers are done. * Update code/modules/psionics/events/mini_spasm.dm Co-Authored-By: Geeves <ggrobler447@gmail.com> * Update code/modules/psionics/events/mini_spasm.dm Co-Authored-By: Geeves <ggrobler447@gmail.com> * Update code/modules/psionics/equipment/cerebro_enhancers.dm * did this work??? * jargon * arrow's fixes Co-authored-by: Geeves <ggrobler447@gmail.com>
38 lines
1.5 KiB
Plaintext
38 lines
1.5 KiB
Plaintext
/datum/psionic_power
|
|
var/name // Name. If null, psipower won't be generated on roundstart.
|
|
var/faculty // Associated psi faculty.
|
|
var/min_rank // Minimum psi rank to use this power.
|
|
var/cost // Base psi stamina cost for using this power.
|
|
var/cooldown // Deciseconds cooldown after using this power.
|
|
var/admin_log = TRUE // Whether or not using this power prints an admin attack log.
|
|
var/use_ranged // This power functions from a distance.
|
|
var/use_melee // This power functions at melee range.
|
|
var/use_grab // This power has a variant invoked via grab.
|
|
var/use_manifest // This power manifests an item in the user's hands.
|
|
var/use_description // A short description of how to use this power, shown via assay.
|
|
// A sound effect to play when the power is used.
|
|
var/use_sound = 'sound/effects/psi/power_used.ogg'
|
|
|
|
/datum/psionic_power/proc/invoke(var/mob/living/user, var/atom/target)
|
|
|
|
if(!user.psi)
|
|
return FALSE
|
|
|
|
if(faculty && min_rank)
|
|
var/user_rank = user.psi.get_rank(faculty)
|
|
if(user_rank < min_rank)
|
|
return FALSE
|
|
|
|
if(cost && !user.psi.spend_power(cost))
|
|
return FALSE
|
|
|
|
return TRUE
|
|
|
|
/datum/psionic_power/proc/handle_post_power(var/mob/living/user, var/atom/target)
|
|
if(cooldown)
|
|
user.psi.set_cooldown(cooldown)
|
|
if(admin_log && ismob(user) && ismob(target))
|
|
admin_attack_log(user, target, "Used psipower ([name])", "Was subjected to a psipower ([name])", "used a psipower ([name]) on")
|
|
if(use_sound)
|
|
playsound(user.loc, use_sound, 75)
|