MArcomage

Free multiplayer on-line fantasy card game

Please log in


0 C
Tribute
Tribute

Players discard up to 3 non-rare cards (can't draw rare cards)

Id
251
Name
Tribute
Rarity
Common
Keywords
Cost (B / G / R)
0 / 0 / 0
Modes
0
Level
8
Created
8. May, 2007
Modified
8. Sep, 2012
Played
1418 / 21290
Discarded
2185 / 19279
Drawn
4206 / 47814

BB code

Effect

Players discard up to 3 non-rare cards (can't draw rare cards)

Code

    $my_storage = $his_storage = array();
    for ($i = 1; $i <= $t->handSize(); $i++) {
      if ($i != $t->cardPos() && $t->getCard($t->myData()->Hand[$i])->getRarity() != 'Rare') {
        $my_storage[] = $i;
      }
      if ($t->getCard($t->hisData()->Hand[$i])->getRarity() != 'Rare') {
        $his_storage[] = $i;
      }
    }
    $my_count = min(count($my_storage), 3);
    if ($my_count > 0) {
      shuffle($my_storage);
      for ($k = 0; $k < $my_count; $k++) {
        $i = $my_storage[$k];
        $t->setCard('my', $i, $t->drawCard($t->myDeck(), $t->myData()->Hand, $i, 'drawCardNoRare'));
      }
    }
    $his_count = min(count($his_storage), 3);
    if ($his_count > 0) {
      shuffle($his_storage);
      for ($k = 0; $k < $his_count; $k++) {
        $i = $his_storage[$k];
        $t->setCard('his', $i, $t->drawCard($t->hisDeck(), $t->hisData()->Hand, $i, 'drawCardNoRare'));
      }
    }