MArcomage

Free multiplayer on-line fantasy card game

Please log in


0 C
Heresy
Heresy

Replace up to 3 non-Frenzy common cards in hand with Fanatics

Id
342
Name
Heresy
Rarity
Common
Keywords
Cost (B / G / R)
0 / 0 / 0
Modes
0
Level
10
Created
12. Feb, 2008
Modified
26. Sep, 2015
Played
200 / 4955
Discarded
185 / 3528
Drawn
489 / 10806

BB code

Effect

Replace up to 3 non-Frenzy common cards in hand with Fanatics

Code

    $temp_array = array();
    for ($i = 1; $i <= $t->handSize(); $i++) {
      $cur_card = $t->getCard($t->myData()->Hand[$i]);
      if (!$cur_card->hasKeyword('Frenzy') && $cur_card->getRarity() == 'Common' && $i != $t->cardPos()) {
        $temp_array[] = $i;
      }
    }
    if (count($temp_array) > 0) {
      shuffle($temp_array);
      for ($i = 0; $i < count($temp_array) && $i < 3; $i++) {
        $t->setCard('my', $temp_array[$i], 340, ['reveal' => true]);
      }
    }