function init(hero) {
    hero.setName("Redvolt-3");
    hero.setTier(10);
    hero.setChestplate("Power Harnesser");
    hero.addPowers("diminpack:dim_phys");
    hero.addAttribute("PUNCH_DAMAGE", 10.0, 0);
    hero.addAttribute("WEAPON_DAMAGE", 10.0, 0);
    hero.addAttribute("JUMP_HEIGHT", 1.0, 0);
    hero.addAttribute("FALL_RESISTANCE", 9.995, 1);
    hero.addAttribute("SPRINT_SPEED", 0.1, 1);
    
    hero.addKeyBind("AIM", "key.aim", -1);
    hero.addKeyBind("ENERGY_PROJECTION", "Photoblast", 1);
    hero.addKeyBind("SHADOWDOME", "Luminous Absorbance", 3);
    hero.addKeyBind("BLADE", "key.blade", 2);
    hero.addKeyBind("SHIELD", "key.shield", 2);
    hero.addKeyBind("CHARGED_BEAM", "Unibeam", 5);
    hero.addKeyBind("TELEKINESIS", "Photoblast hold", 4);
    hero.addKeyBind("GUN_RELOAD", "Reload", 4);
    
    hero.setModifierEnabled(isModifierEnabled);
    hero.setKeyBindEnabled(isKeyBindEnabled);
    hero.supplyFunction("canAim", canAim);
    hero.setHasPermission(hasPermission);
    hero.addAttributeProfile("BLADE", bladeProfile);
    hero.setAttributeProfile(getProfile);
    hero.setDamageProfile(getProfile);
    hero.addDamageProfile("BLADE", {
        "types": {
            "SHARP": 1.0,
            "FIRE": 0.2
        }
    });
    
}
function bladeProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("PUNCH_DAMAGE", 10.0, 0);
}

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

function isModifierEnabled(entity, modifier) {
    return modifier.name() != "fiskheroes:shield" || !entity.getData("fiskheroes:blade");
}

function isKeyBindEnabled(entity, keyBind) {
    switch (keyBind) {
        case "CHARGED_BEAM":
            return !entity.getData("fiskheroes:blade") && !entity.getData("fiskheroes:shield") && !entity.getData("energy_projection");
        case "ENERGY_PROJECTION":
            return !entity.getData("fiskheroes:blade") && !entity.getData("fiskheroes:shield") && entity.getData("fiskheroes:beam_charge") == 0;
        case "SHIELD":
            return !entity.getData("fiskheroes:shield") || !(entity.getData("fiskheroes:shield") && entity.getData("fiskheroes:aiming"));
        case "BLADE":
            return entity.getData("fiskheroes:shield") && entity.getData("fiskheroes:aiming") || entity.getData("fiskheroes:blade") || entity.isBookPlayer();
        case "TELEKINESIS":
            return !entity.getHeldItem().isGun();
        case "GUN_RELOAD":
            return entity.getHeldItem().isGun();
    default:
        return true;
    }
}

function canAim(entity) {
    return (entity.getData("fiskheroes:shield") && entity.getData("fiskheroes:shield_blocking_timer") == 0) || entity.getHeldItem().name() == "fiskheroes:cold_gun" || entity.getHeldItem().name() == "fiskheroes:chronos_rifle" || entity.getHeldItem().isGun() || entity.getHeldItem().name() == "fiskheroes:rip_hunters_gun" || entity.getHeldItem().name() == "fiskheroes:heat_gun";
}
function hasPermission(entity, permission) {
    return true;
}




