contract CoreRecovery is CryptoWarriorIssuer {
    
    bool public allowRecovery = true;
    
    //data model
    //0 - identity
    //1 - cooldownEndBlock
    //2 - level
    //3 - rating
    //4 - index
    function recoverWarriors(uint256[] recoveryData, address[] owners) external onlyAdmin whenPaused {
        //check that recory action is allowed
        require(allowRecovery);
        
        uint256 length = owners.length;
        
        //check that number of owners corresponds to recover data length
        require(length == recoveryData.length / 5);
        
        for(uint256 i = 0; i < length; i++) {
            _createWarrior(recoveryData[i * 5], owners[i], recoveryData[i * 5 + 1], 
                recoveryData[i * 5 + 2], recoveryData[i * 5 + 3], recoveryData[i * 5 + 4]);
        }
    }
    
    //recovery is a one time action, once it is done no more recovery actions allowed
    function recoveryDone() external onlyAdmin {
        allowRecovery = false;
    }

}
function recoverWarriors(uint256[] recoveryData, address[] owners) external onlyAdmin whenPaused {
    //check that recory action is allowed
    require(allowRecovery);
        
    uint256 length = owners.length;
        
    //check that number of owners corresponds to recover data length
    require(length == recoveryData.length / 5);
        
    for(uint256 i = 0; i < length; i++) {
        _createWarrior(recoveryData[i * 5], owners[i], recoveryData[i * 5 + 1], 
            recoveryData[i * 5 + 2], recoveryData[i * 5 + 3], recoveryData[i * 5 + 4]);
    }
}

//data model
//0 - identity
//1 - cooldownEndBlock
//2 - level
//3 - rating
//4 - index