function init(hero) {
    hero.setName("Danny Phantom");
    hero.setTier(5);
    
    hero.setChestplate("item.superhero_armor.piece.chestpiece");
    hero.setLeggings("item.superhero_armor.piece.pants");
    hero.setBoots("item.superhero_armor.piece.boots");
    
    hero.addPowers("tmfp:ghost_powers");

    hero.addKeyBind("ENERGY_PROJECTION", "Ghost Ray", 1);
    hero.addKeyBind("CHARGE_ICE", "key.chargeIce", 2);
    hero.addKeyBind("SONIC_WAVES", "Ghostly Wail", 3);
    hero.addKeyBind("INTANGIBILITY", "key.intangibility", 4);
    hero.addKeyBind("INVISIBILITY", "key.invisibility", 4);
    hero.addKeyBind("STEEL_TRANSFORM", "Ghost Form", 5);

    hero.addAttribute("FALL_RESISTANCE", 3.0, 0);
    hero.addAttribute("PUNCH_DAMAGE", 2.0, 0);
    hero.addAttribute("SPRINT_SPEED", 0.3, 1);

    hero.setModifierEnabled(isModifierEnabled);
    hero.setKeyBindEnabled(isKeyBindEnabled);
    hero.setTierOverride(getTierOverride);
    hero.addAttributeProfile("INACTIVE", inactiveProfile);
    hero.setAttributeProfile(getProfile);
    hero.setDefaultScale(0.87);
}
function getTierOverride(entity) {
    return entity.getData("fiskheroes:dyn/steeled") ? 5 : 0;
}
function inactiveProfile(profile) {
    profile.revokeAugments();
}
function getProfile(entity) {
    if (!entity.getData("fiskheroes:dyn/steeled")) {
        return "INACTIVE";
    }
}
function isModifierEnabled(entity, modifier) {
    if (modifier.name() != "fiskheroes:transformation" && modifier.name() != "fiskheroes:cooldown" && (!entity.getData("fiskheroes:dyn/steeled") && entity.getData("fiskheroes:dyn/steel_timer") < 1)) {
        return false;
    }
    switch (modifier.name()) {
    case "fiskheroes:icicles":
        return entity.getData("fiskheroes:cryo_charge") == 1;
    default:
        return true;
    }
}
function isKeyBindEnabled(entity, keyBind) {
    if (keyBind == "STEEL_TRANSFORM") {
        return entity.getData("fiskheroes:mask_open_timer") == 0;
    }
    else if (!entity.getData("fiskheroes:dyn/steeled")) {
        return false;
    }
    
    switch (keyBind) {
    case "INVISIBILITY":
        return entity.isSneaking();
    case "INTANGIBILITY":
        return !entity.isSneaking();
    default:
        return true;
    }
}
