MArcomage

Free multiplayer on-line fantasy card game

Please log in

Keywords > Horde

Icon

Horde

Effect

Fear - if played card is adjacent to a Horde card and recruits cost of the played card is greater than recruits cost of the matching card replace equal or lower rarity matching card with Palisade.

Lore

Fear is an effective tool in any war. Enemies of the Horde had many opportunities to witness the effectiveness of such tactic. Broken formations, chaotic retreat and disobedience of orders often lead to loss of the entire army.

Code

    if (($t->cardPos() > 1 && $this->getCard($t->myData()->Hand[$t->cardPos() - 1])->hasKeyword('Horde'))
      || ($t->cardPos() < $t->handSize() && $this->getCard($t->myData()->Hand[$t->cardPos() + 1])->hasKeyword('Horde'))) {
      $rarities = ['Common' => 0, 'Uncommon' => 1, 'Rare' => 2];
      $recruits = $t->card()->getResources('Recruits');

      $matching_card = $this->getCard($t->hisData()->Hand[$t->cardPos()]);
      if ($rarities[$t->card()->getRarity()] >= $rarities[$matching_card->getRarity()] && $recruits > $matching_card->getResources('Recruits')) {
        $this->setCard('his', $t->cardPos(), 297, ['reveal' => true]);
      }
    }