Quasit
Gain 1 random resource for each unplayable card in game
Cost (B / G / R)
0 / 0 / 0
BB code
Effect
Gain 1 random resource for each unplayable card in game
Code
$count = 0;
for ($i = 1; $i <= $t->handSize(); $i++) {
$cur_card = $t->getCard($t->myData()->Hand[$i]);
if ($i != $t->cardPos() && ($cur_card->getResources('Bricks') > $t->myData()->Bricks
|| $cur_card->getResources('Gems') > $t->myData()->Gems || $cur_card->getResources('Recruits') > $t->myData()->Recruits)) {
$count++;
}
}
for ($i = 1; $i <= $t->handSize(); $i++) {
$cur_card = $t->getCard($t->hisData()->Hand[$i]);
if ($cur_card->getResources('Bricks') > $t->hisData()->Bricks || $cur_card->getResources('Gems') > $t->hisData()->Gems
|| $cur_card->getResources('Recruits') > $t->hisData()->Recruits) {
$count++;
}
}
$t->myData()->addRandomResources($count);