obj/projectile
var/damage=0
var/owner
var/odir
var/delay=3
proc/Effect(mob/A)
A.hp -= damage
A.mhp += damage/2
viewers(A) << "[A] has been hit by [src.owner]'s spell!"
A.Deathcheck()
Stupefy
icon='attacks.dmi'
icon_state = "stupefy"
oicon='attacks.dmi'
oiconstate="stupefy"
density=1
damage=25
Bump(A)
if(ismob(A))
var/mob/M=A
M.stupe=1
M.sight |= BLIND
Effect(M)
..()
del src
return
else
viewers(A) << "[A] has been hit by a poorly aimed spell!"
del src
return
mob/Spell
verb
Stupefy()
set category = "Spells"
if(wandout == 1)
if(usr.pertr==0 && usr.incar==0 && usr.ricte==0 && usr.froze==0 && usr.stupe==0)
if(confound == 1)
usr.random=rand(1,2)
if(random == 1)
hearers(usr) << "<font color = teal><b><u>[usr]</b></u><font color = teal>:<i><font color = green> Stupefy!"
var/obj/projectile/Stupefy/P = new(null,usr)
P.loc = usr.loc
P.dir = usr.dir
P.owner = usr
P.odir = usr.dir
walk(P,P.odir)
if(random == 2)
usr << "You raise your wand, only to find the spell leave your grasp"
return
else
hearers(usr) << "<font color = teal><b><u>[usr]</b></u><font color = teal>:<i><font color = green> Stupefy!"
var/obj/projectile/Stupefy/P = new(null,usr)
P.loc = usr.loc
P.dir = usr.dir
P.owner = usr
P.odir = usr.dir
walk(P,P.odir)
else
usr<<"A curse, jinx, spell or enchantment is preventing you from casting spells!"
else
usr << "You must have your wand out!"
Problem description: For some reason, after being hit with the spell, the character's blind bit won't turn on.
Ditch the |= operator and use =. That should fix the problem.
Also, like in an other post I've told you, start using boolean shortcuts. They make your code easier to read.