Hi. I'm hung up on an easy system that I can't do.
I have a json type array, with a display of card names, drop chance, and information.
Each row, is the information for a card.
I need to make it so that on push, the game compares all the data in the array, and adds by pushing, one card from this json, if there is a drop chance, from the second column.
The game should do a push of the full row. For example, if the random chance is 15%, the game takes into account the cell with the number 15, the one with card 4, and makes a push.
The result is: Card 4, 15 , id5.
If you have more other and convenient ways I would be glad to listen. I need to create a system of dropping items-cards from the box. With random.
My stupid system that didn't work.