diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm
index a7ffd1c543..9a9133c196 100644
--- a/code/__DEFINES/status_effects.dm
+++ b/code/__DEFINES/status_effects.dm
@@ -99,7 +99,7 @@
#define STATUS_EFFECT_PENIS_ENLARGEMENT /datum/status_effect/chem/penis_enlarger //More applied slowdown, just like the above.
#define STATUS_EFFECT_NO_COMBAT_MODE /datum/status_effect/no_combat_mode //Wont allow combat mode and will disable it
-#define STATUS_EFFECT_MESMERIZE /datum/status_effect/no_combat_mode/mesmerize //Just reskinned no_combat_mode
+#define STATUS_EFFECT_MESMERIZE /datum/status_effect/mesmerize //Just reskinned no_combat_mode
#define STATUS_EFFECT_ELECTROSTAFF /datum/status_effect/electrostaff //slows down victim
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index 5a69ebe427..69b74841df 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -113,20 +113,25 @@
duration = set_duration
. = ..()
-/datum/status_effect/no_combat_mode/mesmerize
+/datum/status_effect/mesmerize
id = "Mesmerize"
alert_type = /obj/screen/alert/status_effect/mesmerized
-/datum/status_effect/no_combat_mode/mesmerize/on_creation(mob/living/new_owner, set_duration)
+/datum/status_effect/mesmerize/on_creation(mob/living/new_owner, set_duration)
. = ..()
ADD_TRAIT(owner, TRAIT_MUTE, "mesmerize")
owner.add_movespeed_modifier("[STATUS_EFFECT_MESMERIZE]_[id]", TRUE, priority = 64, override = TRUE, multiplicative_slowdown = 5, blacklisted_movetypes = FALSE? NONE : CRAWLING)
-/datum/status_effect/no_combat_mode/mesmerize/on_remove()
+/datum/status_effect/mesmerize/on_remove()
. = ..()
REMOVE_TRAIT(owner, TRAIT_MUTE, "mesmerize")
owner.remove_movespeed_modifier("[STATUS_EFFECT_MESMERIZE]_[id]")
+/datum/status_effect/mesmerize/on_creation(mob/living/new_owner, set_duration)
+ if(isnum(set_duration))
+ duration = set_duration
+ . = ..()
+
/obj/screen/alert/status_effect/mesmerized
name = "Mesmerized"
desc = "You cant tear your sight from who is in front of you... their gaze is simply too enthralling.."
diff --git a/code/modules/antagonists/bloodsucker/powers/mesmerize.dm b/code/modules/antagonists/bloodsucker/powers/mesmerize.dm
index 3be5eb02e9..814ad2abd7 100644
--- a/code/modules/antagonists/bloodsucker/powers/mesmerize.dm
+++ b/code/modules/antagonists/bloodsucker/powers/mesmerize.dm
@@ -64,7 +64,7 @@
to_chat(owner, "Your victim's eyes are glazed over. They cannot perceive you.")
return FALSE
// Check: Target See Me? (behind wall)
- if(!(target in view(target_range, get_turf(owner))))
+ if(!(target in viewers(target_range, get_turf(owner))))
// Sub-Check: GET CLOSER
//if (!(owner in range(target_range, get_turf(target)))
// if (display_error)
@@ -90,48 +90,56 @@
/datum/action/bloodsucker/targeted/mesmerize/proc/ContinueTarget(atom/A)
var/mob/living/carbon/target = A
- var/mob/living/user = owner
+ var/mob/living/L = owner
- var/cancontinue=CheckCanTarget(target)
+ var/cancontinue = CheckCanTarget(target)
if(!cancontinue)
success = FALSE
target.remove_status_effect(STATUS_EFFECT_MESMERIZE)
- user.remove_status_effect(STATUS_EFFECT_MESMERIZE)
+ L.remove_status_effect(STATUS_EFFECT_MESMERIZE)
DeactivatePower()
DeactivateRangedAbility()
StartCooldown()
- to_chat(user, "[target] has escaped your gaze!")
+ to_chat(L, "[target] has escaped your gaze!")
UnregisterSignal(target, COMSIG_MOVABLE_MOVED)
/datum/action/bloodsucker/targeted/mesmerize/FireTargetedPower(atom/A)
// set waitfor = FALSE <---- DONT DO THIS!We WANT this power to hold up ClickWithPower(), so that we can unlock the power when it's done.
var/mob/living/carbon/target = A
- var/mob/living/user = owner
+ var/mob/living/L = owner
+ L.face_atom(A)
+ if(!istype(target))
+ return
+ success = TRUE
+ var/power_time = 138 + level_current * 12
+ target.apply_status_effect(STATUS_EFFECT_MESMERIZE, 30)
+ L.apply_status_effect(STATUS_EFFECT_MESMERIZE, 30)
+ RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/ContinueTarget)
+ // 5 second windup
+ addtimer(CALLBACK(src, .proc/apply_effects, L, target, power_time), 6 SECONDS)
+ ADD_TRAIT(target, TRAIT_COMBAT_MODE_LOCKED, src)
+ ADD_TRAIT(L, TRAIT_COMBAT_MODE_LOCKED, src)
- if(istype(target))
- success = TRUE
- var/power_time = 138 + level_current * 12
- target.apply_status_effect(STATUS_EFFECT_MESMERIZE, 30)
- user.apply_status_effect(STATUS_EFFECT_MESMERIZE, 30)
-
- RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/ContinueTarget)
+/datum/action/bloodsucker/targeted/mesmerize/proc/apply_effects(aggressor, victim, power_time)
+ var/mob/living/carbon/target = victim
+ var/mob/living/L = aggressor
+ if(!success)
+ return
+ PowerActivatedSuccessfully() // blood & cooldown only altered if power activated successfully - less "fuck you"-y
+ target.apply_status_effect(STATUS_EFFECT_MESMERIZE, power_time)
+ REMOVE_TRAIT(L, TRAIT_COMBAT_MODE_LOCKED, src)
+ target.face_atom(L)
+ target.Stun(power_time)
+ to_chat(L, "[target] is fixed in place by your hypnotic gaze.")
+ target.next_move = world.time + power_time // <--- Use direct change instead. We want an unmodified delay to their next move // target.changeNext_move(power_time) // check click.dm
+ target.notransform = TRUE // <--- Fuck it. We tried using next_move, but they could STILL resist. We're just doing a hard freeze.
+ spawn(power_time)
+ if(istype(target) && success)
+ target.notransform = FALSE
+ REMOVE_TRAIT(target, TRAIT_COMBAT_MODE_LOCKED, src)
+ if(istype(L) && target.stat == CONSCIOUS && (target in view(10, get_turf(L)))) // They Woke Up! (Notice if within view)
+ to_chat(L, "[target] has snapped out of their trance.")
- // 3 second windup
- sleep(30)
- if(success)
- PowerActivatedSuccessfully() // blood & cooldown only altered if power activated successfully - less "fuck you"-y
- target.face_atom(user)
- target.apply_status_effect(STATUS_EFFECT_MESMERIZE, power_time) // pretty much purely cosmetic
- target.Stun(power_time)
- to_chat(user, "[target] is fixed in place by your hypnotic gaze.")
- target.next_move = world.time + power_time // <--- Use direct change instead. We want an unmodified delay to their next move // target.changeNext_move(power_time) // check click.dm
- target.notransform = TRUE // <--- Fuck it. We tried using next_move, but they could STILL resist. We're just doing a hard freeze.
- spawn(power_time)
- if(istype(target) && success)
- target.notransform = FALSE
- // They Woke Up! (Notice if within view)
- if(istype(user) && target.stat == CONSCIOUS && (target in view(10, get_turf(user))) )
- to_chat(user, "[target] has snapped out of their trance.")
/datum/action/bloodsucker/targeted/mesmerize/ContinueActive(mob/living/user, mob/living/target)
return ..() && CheckCanUse() && CheckCanTarget(target)