MArcomage

Free multiplayer on-line fantasy card game

Please log in


1 U
Moon shrine
Moon shrine

Players gain 1 stock for each zero cost card and lose 1 stock for each non zero cost card in their hand

Id
487
Name
Moon shrine
Rarity
Uncommon
Keywords
Cost (B / G / R)
0 / 1 / 0
Modes
0
Level
10
Created
24. Oct, 2009
Modified
27. Feb, 2010
Played
1686 / 8639
Discarded
2779 / 4094
Drawn
955 / 9024

BB code

Effect

Players gain 1 stock for each zero cost card and lose 1 stock for each non zero cost card in their hand

Code

    $my_gain = $his_gain = 0;
    for ($i = 1; $i <= $t->handSize(); $i++) {
      if ($i != $t->cardPos()) {
        if ($t->getCard($t->myData()->Hand[$i])->getResources() == 0) {
          $my_gain++;
        }
        else {
          $my_gain--;
        }
      }
      if ($t->getCard($t->hisData()->Hand[$i])->getResources() == 0) {
        $his_gain++;
      }
      else {
        $his_gain--;
      }
    }
    $t->myData()->addStock($my_gain);
    $t->hisData()->addStock($his_gain);