function init(hero) {
    hero.setName("Thor");
    hero.setVersion("Jane Foster");	
    hero.setTier(10);
    
	hero.setHelmet("item.superhero_armor.piece.helmet");
    hero.setChestplate("item.superhero_armor.piece.chestpiece");
    hero.setLeggings("item.superhero_armor.piece.pants");
    hero.setBoots("item.superhero_armor.piece.boots");
	hero.addEquipment("minecraft:iron_axe");
    
    hero.addPowers("pack:mjolnir", "fiskheroes:bullet_immunity","fiskheroes:water_breathing", "fiskheroes:superhuman_durability", "fiskheroes:leaping", "fiskheroes:explosion_immunity", "fiskheroes:fire_immunity", "fiskheroes:cellular_regeneration", "fiskheroes:cold_resistance");
 
		hero.addAttribute("WEAPON_DAMAGE", 25, 0);
    hero.addAttribute("PUNCH_DAMAGE", 31, 0);
    hero.addAttribute("SPRINT_SPEED", 0.75, 1);
    //hero.addAttribute("SWORD_DAMAGE", 30, 0);
    hero.addAttribute("FALL_RESISTANCE", 50.0, 0);
    hero.addAttribute("JUMP_HEIGHT", 3, 0);

    hero.setHasProperty(hasProperty);
    hero.setDefaultScale(1);

hero.addKeyBind("BLADE", "Mjolnir", 1);
	hero.addKeyBind("CHARGED_BEAM", "Lightning Blast", 2);
	hero.addKeyBind("HOVER", "key.levitate", 4);
	
	hero.addAttributeProfile("BLADE", bladeProfile);
    hero.setAttributeProfile(getProfile);
    hero.setDamageProfile(getProfile);
    hero.addDamageProfile("BLADE", {"types": {"BLUNT": 1.0}});
	hero.setModifierEnabled(isModifierEnabled);
}

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

function bladeProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("PUNCH_DAMAGE", 37.5, 0);
}

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

function isModifierEnabled(entity, modifier) {
    if (modifier.name() == "fiskheroes:propelled_flight") {
        return entity.getData("fiskheroes:hovering") || entity.getData("fiskheroes:blade");
	}
    else if (modifier.name() == "fiskheroes:hover") {
		return entity.getData("fiskheroes:blade");
	}
	else if (modifier.name() == "fiskheroes:lightning_cast") {
		return entity.getData("fiskheroes:blade");
	}
	else if (modifier.name() == "fiskheroes:charged_beam") {
		return entity.getData("fiskheroes:blade");
	}
    return true;
}