mob
NPC
icon = 'Users.dmi'
icon_state = "NPC"
var/obj/A = new /obj/Cards/Neutral/Peasant()
var/obj/B = new /obj/Cards/Neutral/Knight1()
var/obj/C = new /obj/Cards/Neutral/Defence1()
var/obj/D = new /obj/Cards/Neutral/Peasant()
var/obj/E = new /obj/Cards/Neutral/Knight1()
New()
Cards.Add(A,B,C,D,E)
This is obviously not the best way, but I don't know how else to do it! That uses lots of code, and that's for only 5 cards!
Note: If you want more than 2 of an object in the deck you can just use a letter twice (e.g. Cards.Add(A,A,A,B,C,D,E)) because then when the NPC plays more than one A's, only one appears on the board because they are all the same object!
How should I do this?
~Ease~
To my understanding, you'll need to define the cards at one point or another. If the cards the NPC has have to be specific, I'm not sure there is a much better way of doing it. What you may want to do it have the list hold the name of the card, not the actual card. When the card is played, then create the object.(I hope I'm not losing you here...) That way you can have the same name 2 or more times in the list, but have a different obj for each.