function init(hero) {
    hero.setName("\u00A72Legacy Heroes\u00A7r/\u00A76Power Suit\u00A7r");
    hero.setVersion("\u00A74Staff Only\u00A7r");
    hero.setCosmic();
    hero.hide();
    hero.setTier(6);
    
    hero.setChestplate("Suit Core");
    
    hero.addPowers("legacyheroes:staff_super");

    hero.addAttribute("PUNCH_DAMAGE", 10500.0, 0);
    hero.addAttribute("JUMP_HEIGHT", 1.0, 0);
    hero.addAttribute("FALL_RESISTANCE", 1.0, 1);
    hero.addAttribute("WEAPON_DAMAGE", 2000000000.0, 1);
    hero.addAttribute("MAX_HEALTH", 260.0, 0);
    hero.addAttribute("BOW_DRAWBACK", 0.7, 1);
    hero.addAttribute("ARROW_DAMAGE", 2000000.0, 0);
    hero.addEquipment("fiskheroes:prometheus_sword");
    hero.addEquipment("fiskheroes:compound_bow");
    hero.addEquipment("fiskheroes:quiver");
    hero.addEquipment("fiskheroes:grappling_gun");
    hero.addEquipment("fiskheroes:bo_staff");
    hero.addEquipment("fiskheroes:black_canarys_tonfas");
    hero.addEquipment("fiskheroes:captain_americas_shield");
    hero.addEquipment("fiskheroes:cold_gun");
    hero.addEquipment("fiskheroes:chronos_rifle");
    hero.addEquipment("fiskheroes:deadpools_swords");
    hero.addEquipment("fiskheroes:heat_gun");
    hero.addEquipment("fiskheroes:rip_hunters_gun");
    hero.addEquipment("fiskheroes:ruptures_scythe");

    hero.addKeyBind("AIM", "key.aim", -1);
    hero.addKeyBind("ENERGY_PROJECTION", "Staff's Wrath", 1);
    hero.addKeyBind("INTANGIBILITY", "Walk Through Blocks", 2);
    hero.addKeyBind("TELEPORT", "Kabam!", 3);
    hero.addKeyBind("SPELL_MENU", "Staff's Punishment Choice", 4);
    hero.addKeyBind("STAFF_ARISAL", "Summon the Power of a Legacy Staff!", 5);
    
    hero.setHasProperty(hasProperty);
    hero.setRuleValueModifier(ruleModifier);
    hero.addAttributeProfile("STAFF_ARISAL", staffProfile);
    hero.setAttributeProfile(getAttributeProfile);
    hero.setHasPermission(hasPermission);
    hero.supplyFunction("canAim", canAim);
}

function ruleModifier(entity, rule) {
    if (rule.name() == "fiskheroes:dmg_energyproj") {
        return 400.0;
    }
    else if (rule.name() == "fiskheroes:range_energyproj") {
        return 160.0;
    }
    return null;
}

function staffProfile(profile) {
    profile.addAttribute("PUNCH_DAMAGE", 600.0, 0);
    profile.addAttribute("JUMP_HEIGHT", 4.0, 0);
    profile.addAttribute("WEAPON_DAMAGE", 2000.0, 1);
}

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

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

function hasPermission(entity, permission) {
    return permission == "USE_GRAPPLING_GUN" || permission == "USE_SHIELD" || permission == "USE_CHRONOS_RIFLE" || permission == "USE_COLD_GUN" || permission == "USE_HEAT_GUN" || permission == "USE_RIPS_GUN";
}

function canAim(entity) {
    return entity.getHeldItem().name() == "fiskheroes:chronos_rifle" || entity.getHeldItem().name() == "fiskheroes:cold_gun" || entity.getHeldItem().name() == "fiskheroes:heat_gun" || entity.getHeldItem().name() == "fiskheroes:rip_hunters_gun";
}