MArcomage

Free multiplayer on-line fantasy card game

Please log in


20 R
Emerald unicorn
Emerald unicorn

Legend Nature

Attack: 28
Dungeon: +1
Discard a rare Nature from hand to gain
Recruits: +20

Id
692
Name
Emerald unicorn
Rarity
Rare
Keywords
Cost (B / G / R)
0 / 0 / 20
Modes
0
Level
10
Created
1. Jan, 2013
Modified
1. Jan, 2013
Played
1415 / 4135
Discarded
217 / 594
Drawn
2266 / 6369

BB code

Effect

Attack: 28
Dungeon: +1
Discard a rare Nature from hand to gain
Recruits: +20

Code

    $t->hisData()->attack(28); $t->myData()->addDungeons(1);
    $storage = array();
    for ($i = 1; $i <= $t->handSize(); $i++) {
      $cur_card = $t->getCard($t->myData()->Hand[$i]);
      if ($i != $t->cardPos() && $cur_card->hasKeyword('Nature') && $cur_card->getRarity() == 'Rare') {
        $storage[] = $i;
      }
    }
    if (count($storage) > 0) {
      $discarded_pos = $storage[$t->arrayRand($storage)];
      $t->setCard('my', $discarded_pos, $t->drawCard($t->myDeck(), $t->myData()->Hand, $discarded_pos, 'drawCardRandom'));
      $t->myData()->addRecruits(20);
    }