function init(hero) {
    hero.setName("Loki Odinson");
    hero.setTier(5);
    
    hero.setChestplate("Chestplate");
    hero.setLeggings("Leggings");
	hero.setBoots("Boots");
    
    hero.addAbilities("fiskheroes:heat_resistance", "fiskheroes:retractable_blade", "fiskheroes:healing_factor", "fiskheroes:superhuman_durability", "fiskheroes:energy_blast", "fiskheroes:energy_projection");
    hero.addAttribute("ATTACK_DAMAGE", 0.8, 1);
    hero.addAttribute("PUNCH_DAMAGE", 6.5, 0);
    hero.addAttribute("SWORD_DAMAGE", 2.5, 0);
	hero.addAttribute("JUMP_HEIGHT", 2, 0);
	hero.addAttribute("SPRINT_SPEED", 0.3, 1);
	hero.addAttribute("FALL_RESISTANCE", 0.7, 1);
	
	hero.addKeyBind("BLADE", "Staff", 1);
	hero.addKeyBind("AIM", "key.aim", 2);
	hero.addKeyBind("ENERGY_PROJECTION", "Casket of Ancient Winters", 3);
	hero.addKeyBind("TRANSFORM", "key.naniteTransform", 5);
	
	hero.setHasProperty(hasProperty);
	hero.addAttributeProfile("STAFF", staff);
    hero.setAttributeProfile(getAttributeProfile);
	hero.setModifierEnabled(isModifierEnabled);
	hero.supplyFunction("getTransformTimerTicks", 3800);
    hero.supplyFunction("getTransformTimerRegen", 4.0);
	hero.setTierOverride(getTierOverride);
	hero.supplyFunction("canAim", canAim);
}

function getTierOverride(entity) {
    return entity.getData("fiskheroes:transformed") ? 5 : 4;
}

function canAim(entity) {
    return entity.getData("fiskheroes:blade");
}

function staff(profile) {
	profile.addAttribute("ATTACK_DAMAGE", 0.3, 1);
    profile.addAttribute("PUNCH_DAMAGE", 17.5, 0);
	profile.addAttribute("JUMP_HEIGHT", 2, 0);
	profile.addAttribute("SPRINT_SPEED", 0.3, 1);
	profile.addAttribute("FALL_RESISTANCE", 0.7, 1);
}

function getAttributeProfile(entity) {
    return entity.getData("fiskheroes:blade") ? "STAFF" : null;
}

function isModifierEnabled(entity, modifier) {
    if (modifier == "fiskheroes:energy_blast") {
        return entity.getData("fiskheroes:aiming");
    }
	else if (modifier == "fiskheroes:energy_projection") {
         return entity.getHeldItem().name() == "minecraft:packed_ice";
    }
    return true;
}