MArcomage

Free multiplayer on-line fantasy card game

Please log in


5 5 5 U
Death before dishonor
Death before dishonor

Discard all non-rare Barbarian or Soldier from hand
Wall: +8N
N = #discarded cards (max 5)

Id
343
Name
Death before dishonor
Rarity
Uncommon
Keywords
Cost (B / G / R)
5 / 5 / 5
Modes
0
Level
9
Created
12. Feb, 2008
Modified
7. Apr, 2012
Played
702 / 4108
Discarded
426 / 2474
Drawn
1525 / 9236

BB code

Effect

Discard all non-rare Barbarian or Soldier from hand
Wall: +8N
N = #discarded cards (max 5)

Code

    $discarded = 0;
    for ($i = 1; $i <= $t->handSize(); $i++) {
      $my_card = $t->getCard($t->myData()->Hand[$i]);
      if ($i != $t->cardPos() && $my_card->getRarity() != 'Rare' && ($my_card->hasKeyword('Barbarian') || $my_card->hasKeyword('Soldier'))) {
        $t->setCard('my', $i, $t->drawCard($t->myDeck(), $t->myData()->Hand, $i, 'drawCardRandom'));
        $discarded++;
      }
    }
    $t->myData()->addWall(min($discarded, 5) * 8);