mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-17 02:54:44 +01:00
c68fea7cba
* Completely removes `proc_holders` from existence. Refactors all wizard, xeno, spider, and genetics powers to be actions. Also refactors and sorts ton of accompanying code. * our changes * yes * 0 * Update blackmesa.dmm Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
58 lines
2.1 KiB
Plaintext
58 lines
2.1 KiB
Plaintext
/obj/item/book/granter/action/spell/mindswap
|
|
granted_action = /datum/action/cooldown/spell/pointed/mind_transfer
|
|
action_name = "mindswap"
|
|
icon_state ="bookmindswap"
|
|
desc = "This book's cover is pristine, though its pages look ragged and torn."
|
|
remarks = list(
|
|
"If you mindswap from a mouse, they will be helpless when you recover...",
|
|
"Wait, where am I...?",
|
|
"This book is giving me a horrible headache...",
|
|
"This page is blank, but I feel words popping into my head...",
|
|
"GYNU... GYRO... Ugh...",
|
|
"The voices in my head need to stop, I'm trying to read here...",
|
|
"I don't think anyone will be happy when I cast this spell...",
|
|
)
|
|
/// Mob used in book recoils to store an identity for mindswaps
|
|
var/datum/weakref/stored_swap_ref
|
|
|
|
/obj/item/book/granter/action/spell/mindswap/on_reading_finished()
|
|
. = ..()
|
|
visible_message(span_notice("[src] begins to shake and shift."))
|
|
action_name = pick(
|
|
"fireball",
|
|
"smoke",
|
|
"blind",
|
|
"forcewall",
|
|
"knock",
|
|
"barnyard",
|
|
"charge",
|
|
)
|
|
icon_state = "book[action_name]"
|
|
name = "spellbook of [action_name]"
|
|
|
|
/obj/item/book/granter/action/spell/mindswap/recoil(mob/living/user)
|
|
. = ..()
|
|
var/mob/living/real_stored_swap = stored_swap_ref?.resolve()
|
|
if(QDELETED(real_stored_swap))
|
|
stored_swap_ref = WEAKREF(user)
|
|
to_chat(user, span_warning("For a moment you feel like you don't even know who you are anymore."))
|
|
return
|
|
if(real_stored_swap.stat == DEAD)
|
|
stored_swap_ref = null
|
|
return
|
|
if(real_stored_swap == user)
|
|
to_chat(user, span_notice("You stare at the book some more, but there doesn't seem to be anything else to learn..."))
|
|
return
|
|
|
|
var/datum/action/cooldown/spell/pointed/mind_transfer/swapper = new(src)
|
|
|
|
if(swapper.swap_minds(user, real_stored_swap))
|
|
to_chat(user, span_warning("You're suddenly somewhere else... and someone else?!"))
|
|
to_chat(real_stored_swap, span_warning("Suddenly you're staring at [src] again... where are you, who are you?!"))
|
|
|
|
else
|
|
// if the mind_transfer failed to transfer mobs (likely due to the target being catatonic).
|
|
user.visible_message(span_warning("[src] fizzles slightly as it stops glowing!"))
|
|
|
|
stored_swap_ref = null
|