for (var i = 0; i < spawnedEntities.length; i++ )
{
    var ent = spawnedEntities[i];
   	ent.setHealth(100);
	ent.attackStrength = 1;
}

var k = [];

for (var i = 0; i < spawnedEntities.length; i++) {
    k[i] = 0;
}

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:
    case 2: //1 in 20 chance for five Sugar(placeholder for currency)
        ent.dropItem(Item(336, 5));
        break;
    case 3: //1 in 5 chance for one Sugar(placeholder for currency)
    case 4:
    case 5:
    case 6:
        ent.dropItem(Item(336));
        break;
    }
    return;
}

robot = 0;

var fireProjectiles = new Array();
FIRE_LIFE = 360;
FIRE_DAMAGE = 1/4;
o = 0;
FIRE_SPEED = 1/4;