The mob I sealed has no con(control) yet I might still want to seal those mobs.
Your original proc had several if-then statements, which you left out of this post. They all did the same thing, though:
sealingproc()
for(var/mob/M in world)
if(M.sealed==1&&M.con>80)
sleep(200)
new/obj/immortality(M.loc)
sleep(10)
new/obj/immortalityfire(M.loc)
sleep(1)
M.alpha=0
sleep(1)
new/obj/immortality(locate(M.sealer))
sleep(10)
new/obj/immortalityfire(locate(M.sealer))
sleep(1)
M.alpha=initial(alpha)
M.sealed=0
M.loc=(locate(M.sealer))
else
if(M.sealed==1&&M.con<80)
sleep(200)
new/obj/immortality(M.loc)
sleep(10)
new/obj/immortalityfire(M.loc)
sleep(1)
M.alpha=0
sleep(1)
new/obj/immortality(locate(M.sealer))
sleep(10)
new/obj/immortalityfire(locate(M.sealer))
sleep(1)
M.alpha=initial(alpha)
M.sealed=0
M.loc=(locate(M.sealer))
else
if(M.sealed==1&&M.con<60)
sleep(200)
new/obj/immortality(M.loc)
sleep(10)
new/obj/immortalityfire(M.loc)
sleep(1)
M.alpha=0
sleep(1)
new/obj/immortality(locate(M.sealer))
sleep(10)
new/obj/immortalityfire(locate(M.sealer))
sleep(1)
M.alpha=initial(alpha)
M.sealed=0
M.loc=(locate(M.sealer))
Each one of those branches could be better organized:
if(con>80)
else if(con<80)
else if(con<60) <-- this one will never happen, because con<60 is also <80.
You would want to rearrange your branches:
if(con>80)
else if(con>=60)
else
Now, here's the trouble. All three of your branches do the exact same thing.
Just get rid of the con check, because there's no need for it in your code.
DEBUG: sealingproc(usr = Seijin (/mob/player), src = Orochimaru(Elite NPC) (/mob/EliteMissonMob/Orochimaru)
DEBUG: sealed = 1
DEBUG: con = 0
The mob I sealed has no con(control) yet I might still want to seal those mobs.