MArcomage

Free multiplayer on-line fantasy card game

Please log in

Keywords > Restoration

Icon

Restoration

Effect

Countermeasures - if opponent lowered your stock last round, your lowest resource is raised based on played card rarity (C-3, U-6, R-9). If opponent lowered your facilities last round you gain 1 of your lowest facility if it's less than N, N is based on played card rarity (C-2, U-3, R-4).

Lore

Restoration magic is one of the most commonly used art of magic. Most factions support schools that teach this art, because its usage is very wide and safe. Restoration mages are the most accepted mages in the society. If their skills are exceptional they can even be promoted to nobility.

Code

    if ($t->myChange('Bricks') < 0 || $t->myChange('Gems') < 0 || $t->myChange('Recruits') < 0) {
      $rarities = ['Common' => 3, 'Uncommon' => 6, 'Rare' => 9];
      $t->myData()->addLowestResource($rarities[$t->card()->getRarity()]);
    }
    if ($t->myChange('Quarry') < 0 || $t->myChange('Magic') < 0 || $t->myChange('Dungeons') < 0) {
      $rarities = ['Common' => 2, 'Uncommon' => 3, 'Rare' => 4];
      $chosen = $t->myData()->detectLowestFacility();
      if ($t->myData()->$chosen < $rarities[$t->card()->getRarity()]) {
        if ($chosen == 'Quarry') {
          $t->myData()->addQuarry(1);
        }
        elseif ($chosen == 'Magic') {
          $t->myData()->addMagic(1);
        }
        elseif ($chosen == 'Dungeons') {
          $t->myData()->addDungeons(1);
        }
      }
    }