#Requirements for inclusions in a dictionary
1 messages · Page 1 of 1 (latest)
just check if player already has attack 1?
Just like Life said, Check if your example Attack1 Is already chosen by the player via a table, or instance values.
Lets say
Card1 Got chosen, later on when choosing
First:
Just like i said in your previous post, you roll and check cards, within that you put it inside a new table or an instance value inside the player with the CardName on it.
Second:
Check if Card1 Exists already within the table or within the children of where its put at.
Third:
If failed, then re-roll again ^^
Actually
Change my mind, maybe this answer is a bit better 
Track selected cards in a table. When generating the deck, only include cards whose prerequisites already exist in that table (e.g. only include Attack2 if Attack1 is present). Then pick randomly from that filtered list instead of re-rolling.
see id love to, problem is I have no idea how given the way I've scripted everything
i've got the table holding the selected cards down, but I have the script including the pool of available cards made in the same script
ill check my project rq and check if I can
ok I've found one way, right now I'm thinking to do smth like "for i,v in chosen do: [find every variable that has this name as a prerequisite] table.insert(cardPool, foundCard)"
would that make sense?
ion know what's hard about this
just make a table that tracks the card that's there
like if u pick attack 1, just table.insert(urtable, "atk1") or something
so if u do if table.find(urtable, "atk1") then do atk2
btw always use table.find if u want to search super fast
don't manually find it with luau
so ur code isn't messy and it's faster jssayings
really shouldn't have been as annoying as it was, my problem was figuring out how to call the parts of the dictionaries not to include
didnt know dictionaries only worked on strings and tables with numbers, had to make a separate array table to work around what I needed to
idk man it wasnt working for me