MArcomage

Free multiplayer on-line fantasy card game

Please log in


10 U
Dark templar
Dark templar

Discard all cards with cost below 10 (can't draw rare cards)
Stock: +N/2
N = #discarded cards

Id
470
Name
Dark templar
Rarity
Uncommon
Keywords
Cost (B / G / R)
0 / 10 / 0
Modes
0
Level
10
Created
24. Oct, 2009
Modified
8. Sep, 2012
Played
542 / 9011
Discarded
119 / 2438
Drawn
840 / 13930

BB code

Effect

Discard all cards with cost below 10 (can't draw rare cards)
Stock: +N/2
N = #discarded cards

Code

    $discarded = 0;
    for ($i = 1; $i <= $t->handSize(); $i++) {
      if ($i != $t->cardPos() && $t->getCard($t->myData()->Hand[$i])->getResources() < 10) {
        $t->setCard('my', $i, $t->drawCard($t->myDeck(), $t->myData()->Hand, $i, 'drawCardNoRare'));
        $discarded++;
      }
      if ($t->getCard($t->hisData()->Hand[$i])->getResources() < 10) {
        $t->setCard('his', $i, $t->drawCard($t->hisDeck(), $t->hisData()->Hand, $i, 'drawCardNoRare'));
        $discarded++;
      }
    }
    $t->myData()->addStock(round($discarded / 2));