```python
def line_cost(price: int, quantity: int) -> int:
    """
    Returns the cost of a single line.
    """
    if not isinstance(price, int) or not isinstance(quantity, int):
        raise ValueError("Both price and quantity must be integers.")
    if price < 0 or quantity < 0:
        raise ValueError("Price and quantity cannot be negative.")
    return price * quantity

def basket_cost(lines: list, discount: int) -> int:
    """
    Adds up every line and then takes off a whole-percent discount.
    Returns the final price rounded down to whole pence.
    """
    if not isinstance(lines, list) or not all(isinstance(line, dict) for line in lines):
        raise ValueError("Lines must be a list of dictionaries.")
    if not isinstance(discount, int) or discount < 0:
        raise ValueError("Discount must be a non-negative integer.")
    
    total_cost = sum(line.get('price', 0) * line.get('quantity', 1) for line in lines)
    final_cost = total_cost * (100 - discount) / 100
    
    # Round down to whole pence
    return int(final_cost)
```