function init(hero) {

    hero.setName("Star Sapphire");

    hero.setAliases("Pink Lantern");

    hero.setTier(8);

    

    hero.setChestplate("Love Ring");

    

    hero.addPowers("ahhp:love");

    hero.addAttribute("PUNCH_DAMAGE", 3.5, 0);

    hero.addAttribute("JUMP_HEIGHT", 1.0, 0);

    hero.addAttribute("FALL_RESISTANCE", 2.5, 0);

    hero.addAttribute("SPRINT_SPEED", 0.1, 1);

    hero.addAttribute("IMPACT_DAMAGE", 0.1, 1);

    

    hero.addKeyBind("AIM", "key.aim", 1);

    hero.addKeyBind("LANTERN_HAMMER", "Light Construct", 2);

    hero.addKeyBind("SHIELD", "Light Forcefield", 3);

    hero.addKeyBind("TELEKINESIS", "Light Grab", 4);

    hero.addKeyBind("LANTERN_TRANSFORM", "Suit Manifestation", 5);

    

    hero.setModifierEnabled(isModifierEnabled);

    hero.addAttributeProfile("STEEL", steelProfile);

    hero.addAttributeProfile("LANTERNHAMMER", lanternhammerProfile);

    hero.addAttributeProfile("SHIELD", shieldProfile);

    hero.setAttributeProfile(getAttributeProfile);

    hero.setTierOverride(getTierOverride);

    hero.setKeyBindEnabled(isKeyBindEnabled);

    hero.setHasProperty(hasProperty);

    hero.supplyFunction("canAim", canAim);



    hero.addSoundEvent("AIM_START", "ahhp:lantern_blast");

    

}



function hasProperty(entity, property) {

    switch (property) {

    case "BREATHE_SPACE":

        return entity.getData("ahhp:dyn/lantern");

    default:

        return false;

    }

}



function canAim(entity) {

    return entity.getHeldItem().isEmpty() && !entity.getData("ahhp:dyn/lanternhammer");

}



function getTierOverride(entity) {

    return entity.getData("ahhp:dyn/lantern") ? 8 : 0;

}



function steelProfile(profile) {

    profile.addAttribute("PUNCH_DAMAGE", 9.0, 0);

    profile.addAttribute("JUMP_HEIGHT", 1.0, 0);

    profile.addAttribute("FALL_RESISTANCE", 50.0, 1);

    profile.addAttribute("SPRINT_SPEED", 1.25, 1);

    profile.addAttribute("IMPACT_DAMAGE", 0.3, 1);

}



function lanternhammerProfile(profile) {

    profile.addAttribute("PUNCH_DAMAGE", 11.0, 0);

    profile.addAttribute("JUMP_HEIGHT", 1.0, 0);

    profile.addAttribute("FALL_RESISTANCE", 8.5, 0);

    profile.addAttribute("SPRINT_SPEED", 0.25, 1);

    profile.addAttribute("IMPACT_DAMAGE", 0.5, 1);

}



function shieldProfile(profile) {

    profile.inheritDefaults();

    profile.addAttribute("SPRINT_SPEED", -1.5, 1);

    profile.addAttribute("JUMP_HEIGHT", -10.0, 1);

}



function getAttributeProfile(entity) {

    return entity.getData("ahhp:dyn/lantern") ? "STEEL" : null;

    return entity.getData("ahhp:dyn/lanternhammer") ? "LANTERNHAMMER" : null;

    return entity.getData("fiskheroes:shield_blocking") ? "SHIELD" : null;

}



function isModifierEnabled(entity, modifier) {

    if (modifier.name() != "fiskheroes:transformation" && modifier.name() != "fiskheroes:cooldown" && (!entity.getData("ahhp:dyn/lantern") || modifier.name() == "fiskheroes:gliding" && entity.getData("ahhp:dyn/lantern_timer") < 1)) {

        return false;

    }

  

    switch (modifier.name()) {

    case "fiskheroes:energy_blast":

        return entity.getData("fiskheroes:aimed_timer") >= 1;

    case "ahhp:dyn/lanternhammer":

        return entity.getData("ahhp:dyn/lantern") && !entity.getData("fiskheroes:aiming") && !entity.getData("fiskheroes:shield") && entity.getData("fiskheroes:flight_boost_timer") == 0;

    case "fiskheroes:shield":

        return !entity.getData("fiskheroes:aiming") && !entity.getData("ahhp:dyn/lanternhammer") && entity.getData("fiskheroes:flight_boost_timer") == 0;

    case "fiskheroes:regeneration":

        return !entity.getData("ahhp:dyn/lanternhammer");

    case "fiskheroes:water_breathing":

        return entity.getData("ahhp:dyn/lantern");

    case "fiskheroes:telekinesis":

        return entity.getData("ahhp:dyn/lantern") && !entity.getData("fiskheroes:aiming") && !entity.getData("fiskheroes:shield") && entity.getData("fiskheroes:flight_boost_timer") == 0;

    case "fiskheroes:flight":

        return entity.getData("fiskheroes:flight_boost_timer") == 0;

    default:

        return true;

    }

}



function isKeyBindEnabled(entity, keyBind) {

    switch (keyBind) {

        case "LANTERN_HAMMER":

            return (entity.getData("ahhp:dyn/lantern")) && (entity.getData("fiskheroes:flight_boost_timer") == 0) && (!entity.getData("fiskheroes:telekinesis")) && (!entity.getData("fiskheroes:shield")) && !entity.getData("fiskheroes:aiming");

        case "SHIELD":

            return (entity.getData("ahhp:dyn/lantern")) && (!entity.getData("ahhp:dyn/lanternhammer")) && (entity.getData("fiskheroes:flight_boost_timer") == 0) && !entity.getData("fiskheroes:aiming") && (!entity.getData("fiskheroes:telekinesis"));

        case "TELEKINESIS":

            return (entity.getData("ahhp:dyn/lantern")) && (!entity.getData("fiskheroes:shield")) && (!entity.getData("ahhp:dyn/lanternhammer")) && (entity.getData("fiskheroes:flight_boost_timer") == 0) && !entity.getData("fiskheroes:aiming");

        case "AIM":

            return (entity.getData("ahhp:dyn/lantern")) && (!entity.getData("fiskheroes:shield")) && (!entity.getData("ahhp:dyn/lanternhammer")) && (entity.getData("fiskheroes:flight_boost_timer") == 0) && (!entity.getData("fiskheroes:telekinesis"));

        default:

            return true;

    }

}