MArcomage

Free multiplayer on-line fantasy card game

Please log in


1 1 1 U
Relic hunter
Relic hunter

If #Titan in hand > 0
Discard all cards from hand except Titan and Titan support cards

Id
462
Name
Relic hunter
Rarity
Uncommon
Keywords
Cost (B / G / R)
1 / 1 / 1
Modes
0
Level
10
Created
22. Jul, 2009
Modified
24. Dec, 2012
Played
872 / 6407
Discarded
431 / 2469
Drawn
1699 / 10637

BB code

Effect

If #Titan in hand > 0
Discard all cards from hand except Titan and Titan support cards

Code

    if ($t->keywordCount($t->myData()->Hand, 'Titan') > 0) {
      $support = $t->getList(['support'=>'Titan']);

      for ($i = 1; $i <= $t->handSize(); $i++) {
        if ($i != $t->cardPos() && !$t->getCard($t->myData()->Hand[$i])->hasKeyword('Titan')
          && !in_array($t->myData()->Hand[$i], $support)) {
          $t->setCard('my', $i, $t->drawCard($t->myDeck(), $t->myData()->Hand, $i, 'drawCardRandom'));
        }
      }
    }