//This script is meant to run a Bow Skeleton
//Velkin BOSS, becomes an enemy later in the game

var k = [];

for (var i = 0; i < spawnedEntities.length; i++) {
    k[i] = 0;
	{
    var ent = spawnedEntities[i];
    ent.maxHealth = 55;
    ent.health = 55;
    ent.attackStrength = 5;
	ent.texture = "/mob/Undead Sniper.png";
	}
}

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;
    }
	return;
}