diff --git a/code/datums/status_effects/neutral.dm b/code/datums/status_effects/neutral.dm index 927d4ed5500..063d1787840 100644 --- a/code/datums/status_effects/neutral.dm +++ b/code/datums/status_effects/neutral.dm @@ -12,6 +12,44 @@ desc = "I am knocked off balance!" icon_state = "off_balanced" +/datum/status_effect/aasimar_stasis + id = "aasimar_stasis" + examine_text = span_notice("SUBJECTPRONOUN is as still as a statue.") + +/datum/status_effect/aasimar_stasis/on_apply() + . = ..() + ADD_TRAIT(owner, TRAIT_IMMOBILIZED, "stasis") + to_chat(owner, span_notice("My stone settles into stillness.")) + +/datum/status_effect/aasimar_stasis/on_remove() + . = ..() + REMOVE_TRAIT(owner, TRAIT_IMMOBILIZED, "stasis") + to_chat(owner, span_notice("It's time to serve once more.")) + +/datum/status_effect/aasimar_stasis/deep + id = "aasimar_stasis_deep" + duration = 20 SECONDS + remove_on_fullheal = TRUE + +/datum/status_effect/aasimar_stasis/deep/on_apply() + . = ..() + to_chat(owner, span_notice("I let my 'self' sink deep.")) + ADD_TRAIT(owner, TRAIT_DEAF, "stasis") + owner.apply_status_effect(/datum/status_effect/grouped/blindness) + +/datum/status_effect/aasimar_stasis/deep/on_remove() + . = ..() + to_chat(owner, span_notice("I return to the surface.")) + REMOVE_TRAIT(owner, TRAIT_DEAF, "stasis") + owner.remove_status_effect(/datum/status_effect/grouped/blindness) + +/datum/status_effect/aasimar_stasis/deep/tick() + . = ..() + owner.adjust_energy((owner.max_energy * 0.02)) + if(!(owner.blood_volume == BLOOD_VOLUME_MAXIMUM)) + owner.blood_volume = min(owner.blood_volume + 2, BLOOD_VOLUME_NORMAL) + owner.heal_overall_damage(1, 1, BODYPART_ORGANIC, TRUE) + //ENDROGUE /datum/status_effect/sigil_mark //allows the affected target to always trigger sigils while mindless diff --git a/code/modules/mob/living/carbon/human/species_types/other/aasimar.dm b/code/modules/mob/living/carbon/human/species_types/other/aasimar.dm index a1321f89f36..61bafff7fa9 100644 --- a/code/modules/mob/living/carbon/human/species_types/other/aasimar.dm +++ b/code/modules/mob/living/carbon/human/species_types/other/aasimar.dm @@ -126,11 +126,13 @@ . = ..() C.grant_language(/datum/language/celestial) to_chat(C, "I can speak Celestial with ,c before my speech.") + C.add_spell(/datum/action/cooldown/spell/undirected/eternal_vigilance) /datum/species/aasimar/on_species_loss(mob/living/carbon/C) . = ..() UnregisterSignal(C, COMSIG_MOB_SAY) C.remove_language(/datum/language/celestial) + C.remove_spell(/datum/action/cooldown/spell/undirected/eternal_vigilance) /datum/species/aasimar/qualifies_for_rank(rank, list/features) return TRUE diff --git a/code/modules/spells/spell_types/undirected/eternal_vigilance.dm b/code/modules/spells/spell_types/undirected/eternal_vigilance.dm new file mode 100644 index 00000000000..ed659ea123f --- /dev/null +++ b/code/modules/spells/spell_types/undirected/eternal_vigilance.dm @@ -0,0 +1,43 @@ +/datum/action/cooldown/spell/undirected/eternal_vigilance + name = "Eternal Vigilance" + desc = "Enter a dreamless stasis. Close your eyes for a deeper trance." + has_visual_effects = FALSE + + //so we don't accidentally give them arcane exp... + associated_skill = /datum/attribute/skill/magic/holy + + //quick to get in and out. + charge_required = FALSE + cooldown_time = 3 SECONDS + spell_cost = 0 + check_flags = NONE + + //tracking if we're already in basic stasis + var/stasis = FALSE + var/can_sleep = TRUE + + +/datum/action/cooldown/spell/undirected/eternal_vigilance/cast(mob/living/carbon/human/cast_on) + . = ..() + can_sleep = TRUE + if(stasis) + //we're ALREADY in basic stasis, time to wake up + stasis = FALSE + cast_on.remove_status_effect(/datum/status_effect/aasimar_stasis) + else + //try to enter stasis + if(cast_on.eyesclosed) + var/list/equipped_items = cast_on.get_equipped_items() + for(var/obj/item/clothing/thing in equipped_items) + if(thing.clothing_flags & CANT_SLEEP_IN) + //we're too uncomfortable for deep stasis + to_chat(cast_on, span_boldwarning("I can't enter stasis...[thing] bothers me...")) + can_sleep = FALSE + break + //we made it through the items check, go into deep stasis for a set duration. + if(can_sleep) + cast_on.apply_status_effect(/datum/status_effect/aasimar_stasis/deep) + else + //time for regular stasis + cast_on.apply_status_effect(/datum/status_effect/aasimar_stasis) + stasis = TRUE diff --git a/vanderlin.dme b/vanderlin.dme index b2ac9f4ed07..9b84913e7f7 100644 --- a/vanderlin.dme +++ b/vanderlin.dme @@ -3918,6 +3918,7 @@ #include "code\modules\spells\spell_types\undirected\create_cloud.dm" #include "code\modules\spells\spell_types\undirected\divine_strike.dm" #include "code\modules\spells\spell_types\undirected\embrace_death.dm" +#include "code\modules\spells\spell_types\undirected\eternal_vigilance.dm" #include "code\modules\spells\spell_types\undirected\fart.dm" #include "code\modules\spells\spell_types\undirected\feather_fall.dm" #include "code\modules\spells\spell_types\undirected\forcewall.dm"