function init(hero) {
    hero.setName("Quantum Suit");
    hero.setTier(1);

    hero.setChestplate("Time-Space GPS");

    hero.addPowers("pkg:quantum");
    hero.addAttribute("JUMP_HEIGHT", 1.0, 0);
    hero.addAttribute("PUNCH_DAMAGE", 4.5, 0);
    hero.addAttribute("WEAPON_DAMAGE", 1.0, 0);
    hero.addAttribute("FALL_RESISTANCE", 7.0, 0);

    hero.addKeyBind("SIZE_MANIPULATION", "Quantum Realm", 4);
    hero.addKeyBind("NANITE_TRANSFORM", "Transform", 5);

    hero.supplyFunction("isInstant", true);
    hero.setRuleValueModifier(ruleModifier);
    hero.setModifierEnabled(isModifierEnabled);
    hero.setHasProperty(hasProperty);
    hero.setTierOverride(getTierOverride);

    hero.addAttributeProfile("INACTIVE", inactiveProfile);
    hero.addAttributeProfile("BLADE", bladeProfile);
    hero.setAttributeProfile(getProfile);
    hero.setDamageProfile(getProfile);

    hero.addSoundEvent("MASK_OPEN", "fiskheroes:mk50_mask_open");
    hero.addSoundEvent("MASK_CLOSE", "fiskheroes:mk50_mask_close");

}
function getTierOverride(entity) {
    return entity.getData("fiskheroes:dyn/nanites") ? 8 : 0;
}

function inactiveProfile(profile) {
    profile.revokeAugments();
}

function ruleModifier(entity, rule) {
    if (rule.name() == "fiskheroes:ticks_qrtimer") {
        return rule.value() * 0.008;
    }
    return null;
}

function bladeProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("PUNCH_DAMAGE", 10.5, 0);
    profile.addAttribute("JUMP_HEIGHT", 1.5, 0);
    profile.addAttribute("FALL_RESISTANCE", 9.5, 0);
}

function getProfile(entity) {
    if (!entity.getData("fiskheroes:dyn/nanites")) {
        return "INACTIVE";
    }

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

function isModifierEnabled(entity, modifier) {
    if (modifier.name() != "fiskheroes:transformation" && modifier.name() != "fiskheroes:cooldown" && (!entity.getData("fiskheroes:dyn/nanites"))) {
        return false;
    }

    switch (modifier.name()) {
        case "fiskheroes:regeneration":
            return !entity.getData("fiskheroes:blade");
        case "fiskheroes:water_breathing":
            return !entity.getData("fiskheroes:mask_open") && entity.getData("fiskheroes:dyn/nanites");
        default:
            return true;
    }
}

function isKeyBindEnabled(entity, keyBind) {
    if (keyBind == "NANITE_TRANSFORM") {
        return entity.getData("fiskheroes:mask_open_timer") == 0;
    }
    else if (!entity.getData("fiskheroes:dyn/nanites")) {
        return false;
            return true;
    }
}

    function hasProperty(entity, property) {
        switch (property) {
            case "MASK_TOGGLE":
                return entity.getData("fiskheroes:dyn/nanite_timer") == 1;
            case "BREATHE_SPACE":
                return !entity.getData("fiskheroes:mask_open") && entity.getData("fiskheroes:dyn/nanites");
            default:
                return false;
        }
    }