function init(hero) {
    hero.setName("Aquaman");
    hero.setTier(4);
    
    hero.setChestplate("item.superhero_armor.piece.chestplate");
    hero.setLeggings("item.superhero_armor.piece.leggings");
    hero.setBoots("item.superhero_armor.piece.boots");
    
    hero.addAbilities("fiskheroes:leaping", "fiskheroes:healing_factor", "fiskheroes:superhuman_durability", "fiskheroes:cold_resistance", "fiskheroes:flight", "fiskheroes:super_speed");
    hero.addAttribute("BASE_SPEED_LEVELS", 4.0, 0);
	hero.addWeaknesses("fiskheroes:fire");
    hero.addAttribute("ATTACK_DAMAGE", 0.3, 1);
    hero.addAttribute("PUNCH_DAMAGE", 3.5, 0);
    hero.addAttribute("SWORD_DAMAGE", 0.25, 1);
    hero.addAttribute("SPRINT_SPEED", 0.2, 1);
    hero.addAttribute("JUMP_HEIGHT", 0.5, 0);
	
	hero.addKeyBind("SUPER_SPEED", "key.superSpeed", 1);
	hero.addKeyBind("DECELERATE", "key.decelerate", 2);
    hero.addKeyBind("ACCELERATE", "key.accelerate", 3);
    
    hero.setHasProperty(hasProperty);
    hero.addAttributeProfile("STEEL", steelProfile);
    hero.setAttributeProfile(getAttributeProfile);
    hero.setModifierEnabled(isModifierEnabled);
}

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

function steelProfile(profile) {
    profile.addAttribute("ATTACK_DAMAGE", 1.9, 1);
    profile.addAttribute("FALL_RESISTANCE", 1.0, 1);
    profile.addAttribute("JUMP_HEIGHT", 1.5, 0);
    profile.addAttribute("SPRINT_SPEED", 0.4, 1);
    profile.addAttribute("PUNCH_DAMAGE", 7.5, 0);
	profile.addAttribute("BASE_SPEED_LEVELS", 4.0, 0);
}

function getAttributeProfile(entity) {
    return entity.isInWater() || entity.world().isRaining() ? "STEEL" : null;
}

function isModifierEnabled(entity, modifier) {
    return entity.isInWater() || modifier != "fiskheroes:flight" && modifier != "fiskheroes:healing_factor" && modifier != "fiskheroes:super_speed";
}
