MArcomage

Free multiplayer on-line fantasy card game

Please log in


1 U
Sheath your swords
Sheath your swords

Replace all non-rare recruits or mixed cost attack cards with Saints day, Merchant, Caravan or Ambassador

Id
386
Name
Sheath your swords
Rarity
Uncommon
Keywords
Cost (B / G / R)
0 / 0 / 1
Modes
0
Level
10
Created
24. Dec, 2008
Modified
1. Aug, 2015
Played
4644 / 18492
Discarded
811 / 5023
Drawn
6281 / 28136

BB code

Effect

Replace all non-rare recruits or mixed cost attack cards with Saints day, Merchant, Caravan or Ambassador

Code

    $green_c = $t->getList(['rarity'=>'Common', 'cost'=>'Green', 'advanced'=>'Attack:']);
    $green_u = $t->getList(['rarity'=>'Uncommon', 'cost'=>'Green', 'advanced'=>'Attack:']);
    $mixed_c = $t->getList(['rarity'=>'Common', 'cost'=>"Mixed", 'advanced'=>'Attack:']);
    $mixed_u = $t->getList(['rarity'=>'Uncommon', 'cost'=>"Mixed", 'advanced'=>'Attack:']);
    $attack_cards = array_unique(array_merge($green_c, $green_u, $mixed_c, $mixed_u));
    for ($i = 1; $i <= $t->handSize(); $i++) {
      if (in_array($t->myData()->Hand[$i], $attack_cards) && $i != $t->cardPos()) {
        $t->setCard('my', $i, $t->drawCard([263, 273, 23, 660], $t->myData()->Hand, $i, 'drawCardList'));
      }
    }
    for ($i = 1; $i <= $t->handSize(); $i++) {
      if (in_array($t->hisData()->Hand[$i], $attack_cards)) {
        $t->setCard('his', $i, $t->drawCard([263, 273, 23, 660], $t->hisData()->Hand, $i, 'drawCardList'));
      }
    }