function init(hero) {
    hero.setName("Spawn/Al Simmons");
    hero.setTier(9);
    
    hero.setHelmet("Suit");
    
    hero.addPowers("tgheroes:necro");
	hero.addAttribute("PUNCH_DAMAGE", 10.0, 0);
    hero.addAttribute("WEAPON_DAMAGE", 2.5, 0);
    hero.addAttribute("JUMP_HEIGHT", 3.0, 0);
    hero.addAttribute("FALL_RESISTANCE", 1.0, 1);
    hero.addAttribute("SPRINT_SPEED", 0.3, 1);

    hero.addKeyBind("AIM", "Energy Blast", 1);
    hero.addKeyBind("CHARGED_BEAM", "Magic Blast", 2);
    hero.addKeyBind("TELEPORT", "Teleport", 3);    
	hero.addKeyBind("SLOW_MOTION", "Time Freeze", 4);
	
	hero.setDefaultScale(1.1);
    hero.setHasProperty(hasProperty);
	hero.supplyFunction("canAim", canAim);
	
	hero.setTickHandler((entity, manager) => {
        if (!entity.isSneaking() && !entity.isOnGround() && entity.motionY() < -0.5) {
            manager.setData(entity, "fiskheroes:flying", true);
        }
    });
}

function hasProperty(entity, property) {
    return property == "BREATHE_SPACE";
}

function canAim(entity) {
    return entity.getHeldItem().isEmpty();
}