MArcomage

Free multiplayer on-line fantasy card game

Please log in


24 U
Firestorm
Firestorm

Burning Destruction

Player(s) with fewest Burning cards gains
Stock: -7
Respective player suffers 1 damage for each resource lost

Id
514
Name
Firestorm
Rarity
Uncommon
Keywords
Cost (B / G / R)
0 / 24 / 0
Modes
0
Level
10
Created
14. Mar, 2010
Modified
8. Sep, 2012
Played
577 / 6269
Discarded
167 / 2061
Drawn
973 / 11104

BB code

Effect

Player(s) with fewest Burning cards gains
Stock: -7
Respective player suffers 1 damage for each resource lost

Code

    $my_count = $t->keywordCount($t->myData()->Hand, 'Burning');
    $his_count = $t->keywordCount($t->hisData()->Hand, 'Burning');
    $res = ['Bricks', 'Gems', 'Recruits'];
    $my_dmg = $his_dmg = 0;
    if ($my_count <= $his_count) {
      foreach ($res as $resource) {
        $lowered = $t->myData()->$resource - max($t->myData()->$resource - 7, 0);
        $t->myData()->$resource-= $lowered;
        $my_dmg+= $lowered;
      }
    }
    if ($my_count >= $his_count) {
      foreach ($res as $resource) {
        $lowered = $t->hisData()->$resource - max($t->hisData()->$resource - 7, 0);
        $t->hisData()->$resource-= $lowered;
        $his_dmg+= $lowered;
      }
    }
    if ($my_dmg > 0) {
      $t->myData()->attack($my_dmg);
    }
    if ($his_dmg > 0) {
      $t->hisData()->attack($his_dmg);
    }