contract DropableToken is MintableToken {
    event onSetDropable();
    event onSetDropAmount();

    bool public dropable = false;
    uint256 dropAmount_ = 100000 * (10 ** uint256(decimals)); // 0.00001% per drop

    /**
     * @dev Modifier to make a function callable only when the contract is dropable.
     */
    modifier whenDropable() {
        require(dropable);
        _;
    }
    /**
     * @dev called by the owner to set dropable
     */
    function setDropable(bool _value) onlyOwner public {
        dropable = _value;
        emit onSetDropable();
    }

    /**
    * @dev called by the owner to set default airdrop amount
    */
    function setDropAmount(uint256 _value) onlyOwner public {
        dropAmount_ = _value;
        emit onSetDropAmount();
    }

    /**
     * @dev called by anyone to get the drop amount
     */
    function getDropAmount() public view returns (uint256) {
        return dropAmount_;
    }

    /*batch airdrop functions*/
    function airdropWithAmount(address [] _recipients, uint256 _value) onlyOwner canMint whenDropable external {
        for (uint i = 0; i < _recipients.length; i++) {
            address recipient = _recipients[i];
            require(totalSupply_.add(_value) <= actualCap_);
            mint(recipient, _value);
        }
    }

    function airdrop(address [] _recipients) onlyOwner canMint whenDropable external {
        for (uint i = 0; i < _recipients.length; i++) {
            address recipient = _recipients[i];
            require(totalSupply_.add(dropAmount_) <= actualCap_);
            mint(recipient, dropAmount_);
        }
    }

    /*get airdrop function*/
    //one can get airdrop by themselves as long as they are willing to pay gas
    function getAirdrop() whenNotLocked canMint whenDropable external returns (bool) {
        require(totalSupply_.add(dropAmount_) <= actualCap_);
        mint(msg.sender, dropAmount_);
        return true;
    }
}
/**
 * @title Dropable
 * @dev Base contract which allows to implement air drop mechanism.
 */
function setDropable(bool _value) onlyOwner public {
        dropable = _value;
        emit onSetDropable();
    }
/**
 * @dev called by the owner to set dropable
 */