Shifting mass
Summons highest cost card in game (can't summon self)
Cost (B / G / R)
3 / 3 / 3
BB code
Effect
Summons highest cost card in game (can't summon self)
Code
$high = $costs = array();
$max = 0;
for ($i = 1; $i <= $t->handSize(); $i++) {
if ($i != $t->cardPos() && $t->card()->id() != $t->myData()->Hand[$i]) {
$cur_cost = $costs[$i] = $t->getCard($t->myData()->Hand[$i])->getResources();
if ($cur_cost > $max) {
$max = $cur_cost;
}
}
if ($t->card()->id() != $t->hisData()->Hand[$i]) {
$cur_cost = $costs[$i + 8] = $t->getCard($t->hisData()->Hand[$i])->getResources();
if ($cur_cost > $max) {
$max = $cur_cost;
}
}
}
for ($i = 1; $i <= $t->handSize(); $i++) {
if ($i != $t->cardPos() && $t->card()->id() != $t->myData()->Hand[$i] && $costs[$i] == $max) {
$high[] = $t->myData()->Hand[$i];
}
if ($t->card()->id() != $t->hisData()->Hand[$i] && $costs[$i + 8] == $max) {
$high[] = $t->hisData()->Hand[$i];
}
}
if (count($high) > 0) {
$t->nextCard($high[$t->arrayRand($high)]);
}