| 01-11-2010, 04:14 AM | #1 |
Hey guys I am trying to get a basic trigger down for drawing from a card. Atm each time a player uses the "Card Draw" ability, aslong as they have Draw Points (Lumber) they can draw a card. I have a Rnd Integer that randomly picks a number between 1-60 (60 cards in deck), I also have a boolean checking if each card has been drawn before. The problem is I do not know how to go about this, I have tried doing a Loop checking each Integer A 1-60 if the card has been drawn before, however I do not know how to make the loop run again if the card has been drawn before. Can anyone help, there must be a simple way to do this, I basically just want a trigger picking a random card, if the card has been drawn before, it reruns the trigger until a card that hasn't been drawn before is drawn. |
| 01-11-2010, 05:34 AM | #2 | |
Quote:
To facilitate "real" card drawing without shuffling, you would need a linked list to make things easier. However, considering you only need a "random" card every time, I think the below is the best way to do it:
|
| 01-12-2010, 01:48 AM | #3 |
Do you code in GUI or (v)Jass? |
