Card
parent_type = /obj
var
ATK
DEF
card_text
attribute
sub_type
level
set_name
rarity
code //<---Card Code
amount
quality
price
sell
st_icon
verb/AddCard()
var/list/cards = list()
for(var/C in typesof(/Card)-/Card)
var/Card/tmp_card = new C
cards += tmp_card
var/Card/X = type
X = new X
var/Card/Y=locate(X.type) in usr.deck.cards-X
if(Y)
if(Y.amount >= 3)
usr << "You cannot add any more copies of <i><b>[X.name]</b></i> to your deck (max is <font color=red>3</font>)."
return
else
amount -= X.amount
Y.amount+=X.amount
usr.deck.cards += X
usr.deck.code += X.code
else
amount -= X.amount
usr.deck.cards += X
usr.deck.code += X.code
.=1
usr << "[src.name] was added to your deck."
Card
machina_mayhem
effect_monsters
Machina_Fortress
layer = MOB_LAYER + 10
icon_state="Machina Fortress"
name = "Machina Fortress"
attribute = "EARTH"
sub_type = "Machine/Effect"
level = 7
ATK = 2500
DEF = 1600
code="05556499" //<----- Code
card_text = {"You can discard Machine-Type monster(s) whose total Levels equal 8 or more to Special Summon this card from your hand or Graveyard. When this card is destroyed by battle and sent to the Graveyard, select and destroy 1 card your opponent controls. When this face-up card you control is targeted by an opponent's Effect Monster's effect, look at your opponent's hand and discard 1 card from their hand."}
set_name = "SDMM-EN001"
rarity = "(UR)"
quality = "1st Edition"
amount=1
Alright so as you can see I have an obj (Card) that has a text stringed Card Code. When I add the card to a deck it also adds the card's code.
What I am asking here is, how would I create a deck using only the text strings? Is there a text2object or something? Please help x.x
(P.S. I fixed your closing <dm> tag)