$dis_card = $t->getCard($t->hisData()->Hand[$t->mode()]);
$t->setCard('his', $t->mode(), $t->drawCard($t->hisDeck(), $t->hisData()->Hand, $t->mode(), 'drawCardDifferent'));
$resources = ['Quarry' => 'Bricks', 'Magic' => 'Gems', 'Dungeons' => 'Recruits'];
foreach ($resources as $facility => $resource) {
$t->myData()->$resource-= round($dis_card->getResources($resource) / 2);
}
foreach ($resources as $facility => $resource) {
if ($t->myData()->$resource < 0) {
$t->myData()->addHighestFacility(-1);
break;
}
}