Files
Paradise/code/datums/spells/disguise_self.dm
datlo 882deeff51 Make magic disguises easier to break, reworks its spell cast (#25929)
* Make magic disguise easier to break

* add hitby

* add signal check

* update comment

* Fix check and update spell description

* Apply suggestions from code review

Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>

* added signal to atom

* Revert "added signal to atom"

This reverts commit 79e2aa68d8.

* Update code/datums/spells/disguise_self.dm

Co-authored-by: Charlie Nolan <funnyman3595@gmail.com>
Signed-off-by: datlo <quentinkoyote@gmail.com>

* adress review, add spin casting

* linter fix

* actually fix linters

* i am so dumb

* fix typo

* Update code/modules/mob/living/carbon/human/species/_species.dm

Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

---------

Signed-off-by: datlo <quentinkoyote@gmail.com>
Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Co-authored-by: Charlie Nolan <funnyman3595@gmail.com>
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
2024-06-28 03:16:39 +00:00

38 lines
1.4 KiB
Plaintext

/datum/spell/disguise_self
name = "Disguise Self"
desc = "Disguise yourself as a crewmember, based on your current location. Also changes your voice. Takes two seconds to cast, must stand still. \
The illusion isn't strong enough for more thorough examinations, but will fool people at a glance. \
You will lose control over the illusion if you're attacked, shoved, or a object is thrown at you, no matter how soft."
school = "illusion"
base_cooldown = 3 SECONDS
clothes_req = FALSE
invocation_type = "none"
level_max = 0 //cannot be improved
action_icon_state = "disguise_self"
sound = null
/datum/spell/disguise_self/create_new_targeting()
return new /datum/spell_targeting/self
/datum/spell/disguise_self/cast(list/targets, mob/user = usr)
if(!ishuman(user))
return FALSE
var/mob/living/carbon/human/H = user
H.emote("spin")
to_chat(H, "<span class='notice'>You start spinning in place and casting [src]...</span>")
if(do_after(H, 2 SECONDS, FALSE, H))
finish_disguise(H)
return TRUE
else
H.slip("your own foot", 1 SECONDS, 0, 0, 1, "trip")
to_chat(H, "<span class='danger'>You must stand still to cast [src]!</span>")
return FALSE
/datum/spell/disguise_self/proc/finish_disguise(mob/living/carbon/human/H)
H.apply_status_effect(STATUS_EFFECT_MAGIC_DISGUISE)
var/datum/effect_system/smoke_spread/smoke = new /datum/effect_system/smoke_spread
smoke.set_up(4, FALSE, H.loc)
smoke.start()