var k = [];

function drop(ent) {
    var heartChance = (player.getMaxHealth() / player.getHealth()) / 10;
    if (player.getHealth() == player.getMaxHealth()) {
        heartChance = 0;
    }
    if (Math.random() <= heartChance || player.getHealth() < 6) {
        ent.dropItem(Item(459));
        return;
    }
    var rand = Math.floor(Math.random() * 20);
    switch (rand) {
    case 0: //1 in 10 chance for five Arrows
    case 1:
        ent.dropItem(Item(262, 5));
        break;
    case 2: //1 in 20 chance for five Sugar(placeholder for currency)
        ent.dropItem(Item(353, 5));
        break;
    case 3: //1 in 5 chance for one Sugar(placeholder for currency)
    case 4:
    case 5:
    case 6:
        ent.dropItem(Item(353));
        break;
    }
    return;
}