function useAbility(uint256 _phoenixID) whenNotPaused gameInProgress public {
      
      require(_phoenixID > 2);
      require(_phoenixID < 19);
      
      Phoenix storage phoenix = PHOENIXES[_phoenixID];
      require(msg.sender == phoenix.currentOwner); 
      require(now >= phoenix.abilityAvailTime); 

      
      
      
      if (_phoenixID >=7 &&  _phoenixID <= 14) {
          require(POOLS[1] > 0); 
          uint256 payout = POOLS[1].mul(phoenix.currentPower).div(DENOMINATOR); 
          POOLS[1] = POOLS[1].sub(payout); 
      } else {
          require(POOLS[0] > 0); 
          payout = POOLS[0].mul(phoenix.currentPower).div(DENOMINATOR);
          POOLS[0] = POOLS[0].sub(payout);
      }
      
      
      if (_phoenixID < 11) { 
          bool isRed = true; 
          SCORES[0] = SCORES[0].add(payout); 
      } else {
          
          isRed = false;
          SCORES[1] = SCORES[1].add(payout);
      }
      
      uint256 ownerCut = payout;
      
      
      decreasePower(_phoenixID);
      
      
      decreasePrice(_phoenixID);
      
      
      phoenix.abilityAvailTime = now + phoenix.cooldown;

      
      phoenix.previousOwner = msg.sender;
      
      
      
      uint256 cut = payout.div(50); 
      ownerCut = ownerCut.sub(cut);
      userFunds[PHOENIXES[0].currentOwner] = userFunds[PHOENIXES[0].currentOwner].add(cut);
      
      
      cut = payout.div(100); 
      ownerCut = ownerCut.sub(cut);
      distributeDevCut(cut);
      
      
      cut = payout.mul(9).div(100); 
      ownerCut = ownerCut.sub(cut);
      distributeTeamCut(isRed,cut);
      
      
      sendFunds(msg.sender,ownerCut);
      
      emit PhoenixAbilityUsed(_phoenixID,ownerCut,phoenix.price,phoenix.currentPower,phoenix.abilityAvailTime,phoenix.previousOwner);
  }