When this creature attacks, you may rebuild it. If you do, summon 1 Machine from your graveyard with energy on it equal to the number of different rarities among creatures in your graveyard.