Also instead of is touching using on touched would only call the function once..
And ofcourse you could do it without a function and just set the variable to : floor(random(0,4))
You could check the variable by adding a text-object and setting it to: enemyCard
After testing this text-object could always be removed..