ID:1521461
 
(See the best response by Kaiochao.)
Code:
obj
Cards
DblClick()
if(locate(src) in usr.Monsters_on_Field) //Checks ALL src of the same when I want it to only check one
return


Problem description:

Basically, when I have multiple src in my hand, they respond to the same piece of code. How can I differ the src but keep the code the same and not repeating?

Example: I have 3 of the same cards in my hand. As I change the direction of one card, the other two also change to the same direction. How do I make it so only the card I picked changed direction and not the other two?
You're not understanding what src means and using it wrong as a term. Do you have the code to show that select and sets the card to the field?
obj
var/CardPosition = ""
var/Summoned = 0
var/mob/Owner
var/list/Options = list("Summon", "Set")
var/obj/old_icon
var/obj/old_icon_state
var/obj/old_name
Cards
New(turf/t)
src.loc = t
return src
DblClick()
if(locate(src) in usr.Monsters_on_Field)
return
if(!src.Owner)
src.Owner=usr
if(usr.Dueling == 0)
return
else if(src.Owner==usr&&usr.Dueling == 1)
var/cardoptions = input(usr, "Select Option", "Select")as null | anything in src.Options
if(cardoptions == "Summon")
if(usr.Monsters_Played == 5) return
if(src.Card != "Monster")
return
if(src.Level <= 4)
src.Owner = usr
src.CardPosition = "Attack"
src.dir = usr.dir
usr.Hand.Remove(src)
usr.ShowCardsinHand()
var/list/l
if(src.Card=="Monster")
l = usr.field.monsterspaces
for(var/turf/t in l)
if(!(locate(/obj/Cards) in t))
src.loc = t
usr.Monsters_on_Field.Add(src)
usr.Monsters_Played ++
animate(src, alpha = 255, time = 10)


There you go
Best response
locate() deals with type paths, tags, and coordinates, not objects. It returns an object that ends up being used with the "in list" operation. If you want to check if a specific object is in a list, all you need is "object in list", or in this case, "src in usr.Monsters_on_Field".
Ok, thank you, but that still doesn't solve my original problem :/
I personally would use one for()

for(src in usr.Monsters_on_Field)
if(src.Owner==usr)
src.dir=SOUTH//example