ID:144338
 
Code:
mob/proc/Show_Cards()
for(var/obj/Card/C in src.client.screen)
src.client.screen-=C
var/x_loc=4
var/tx_loc=32
var/ty_loc=16
var/y_loc=1
for(var/obj/Card/C in src.Hand)
x_loc++
tx_loc-=6
C.screen_loc="[x_loc]:[tx_loc],[y_loc]:[ty_loc]"
src.client.screen+=C
return


Problem description:when duelign and u draw 2 of the same cards it leaves a space and makes one dissapear were u cant see it is there a way for u to have as many of the same cards in your hand showing at once if so someone please help
I will really appreciate it
~Grand~
Things in lists that are exactly the same stack.

for instance if you have

var/numbers = list("1","2","2","2")
var/showmethenumbarz = input("What number is your favorite?","Numbers") in numbers


when the input() pops up it will only say "1" and "2"
but that doesn't mean that all the other 2's aren't there. But messes up things like:

if(src.favnum == numbers[3])

since numbers[3] is stacked with numbers[2] you'll get a nice (runtime) error about wrong input type or something around there.

Anyway, as for fixing your problem. All I can suggest is change the name of the card based on the location in the deck for instance:

mob/var/list/hand = list()

obj/card/
var/originalname
VcentG
originalname = "VcentG"

mob/proc/Whenever_You_Draw_A_Card(var/obj/card/O)
O.name = "Card [src.hand.len+1] - [O.originalname]"
src.hand += O

mob/proc/Whenever_You_Lose_A_Card_From_Hand(var/obj/card/O)
src.hand -= O //Be sure to do this when card is deleted
del(O) //if you delete it or maybe...
// src.graveyard += O //if it goes to graveyard or something like the field
src.CardCheck()

mob/proc/CardCheck()
for(var/i=1,i++)
var/obj/card/O = src.hand[i-1]
O.name = "Card [i-1] - [O.originalname]"
if(i >= src.hand.len+1) return

//Just for you so you can test this...

mob/verb/Add_VcentG()
src.Whenever_You_Draw_A_Card(new/obj/card/VcentG/)
mob/verb/Delete_Card(var/obj/O in src.hand)
src.Whenever_You_Lose_A_Card_From_Hand(O)


That works as far as I tested. Try it out and see if you can get it to work with your thing. As for quality of coding, who knows I made it pretty fast and oh well. =P upgrade it if you can and just make yourself a better code then if its not up to your par.
yo bro its me and i can help u coz i got codes for a Yu-Gi-Oh game and perfect ones so go on MSN one day and ill send em to ya