MArcomage

Free multiplayer on-line fantasy card game

Please log in


0 R
Altruism
Altruism

Player(s) with highest facility suffers
Highest facility: -1
Player(s) with lowest facility gains
Lowest facility: +1

Id
748
Name
Altruism
Rarity
Rare
Keywords
Cost (B / G / R)
0 / 0 / 0
Modes
0
Level
10
Created
1. Aug, 2015
Modified
1. Aug, 2015
Played
32 / 112
Discarded
31 / 90
Drawn
87 / 254

BB code

Effect

Player(s) with highest facility suffers
Highest facility: -1
Player(s) with lowest facility gains
Lowest facility: +1

Code

    $myHighest = $t->myData()->detectHighestFacility();
    $myLowest = $t->myData()->detectLowestFacility();
    $myHighestAmount = $t->myData()->$myHighest;
    $myLowestAmount = $t->myData()->$myLowest;

    $hisHighest = $t->hisData()->detectHighestFacility();
    $hisLowest = $t->hisData()->detectLowestFacility();
    $hisHighestAmount = $t->hisData()->$hisHighest;
    $hisLowestAmount = $t->hisData()->$hisLowest;

    if ($myHighestAmount != $myLowestAmount || $myLowestAmount != $hisHighestAmount || $hisHighestAmount != $hisLowestAmount) {
      if ($myHighestAmount >= $hisHighestAmount) {
        $t->myData()->$myHighest-= 1;
      }
      if ($myHighestAmount <= $hisHighestAmount) {
        $t->hisData()->$hisHighest-= 1;
      }
      if ($myLowestAmount <= $hisLowestAmount) {
        $t->myData()->$myLowest+= 1;
      }
      if ($myLowestAmount >= $hisLowestAmount) {
        $t->hisData()->$hisLowest+= 1;
      }
    }