$temp_array = array();
for ($i = 1; $i <= $t->handSize(); $i++) {
$cur_card = $t->getCard($t->myData()->Hand[$i]);
if (!$cur_card->hasKeyword('Frenzy') && $cur_card->getRarity() == 'Common' && $i != $t->cardPos()) {
$temp_array[] = $i;
}
}
if (count($temp_array) > 0) {
shuffle($temp_array);
for ($i = 0; $i < count($temp_array) && $i < 3; $i++) {
$t->setCard('my', $temp_array[$i], 340, ['reveal' => true]);
}
}