function init(hero) {
    hero.setName("Carnage");
    hero.setTier(4);
    
    hero.setChestplate("Symbiote Chamber");
    
    hero.addAbilities("fiskheroes:cellular_regeneration", "fiskheroes:leaping", "fiskheroes:retractable_blade", "fiskheroes:superhuman_durability", "fiskheroes:enhanced_reflexes");
    hero.addWeaknesses("fiskheroes:fire_weakness");
    hero.addAttribute("ATTACK_DAMAGE", 1.15, 1);
    hero.addAttribute("SWORD_DAMAGE", -.80, 1);
    hero.addAttribute("PUNCH_DAMAGE", 13.5, 0);
    hero.addAttribute("SPRINT_SPEED", 0.85, 1);
    hero.addAttribute("JUMP_HEIGHT", 0.85, 0);
    
    hero.addKeyBind("BLADE", "key.blade", 1);
    hero.addKeyBind("TRANSFORM", "Release Symbiote", 5);
    
    hero.addAttributeProfile("INACTIVE", inactiveProfile);
    hero.addAttributeProfile("BLADE", bladeProfile);
    hero.setAttributeProfile(getAttributeProfile);
    hero.setModifierEnabled(isModifierEnabled);
    hero.setKeyBindEnabled(isKeyBindEnabled);
    hero.setHasProperty(hasProperty);
    hero.setTierOverride(getTierOverride);
}

function getTierOverride(entity) {
    return entity.getData("fiskheroes:transformed") ? 4 : 0;
}

function inactiveProfile(profile) {
}

function bladeProfile(profile) {
    profile.addAttribute("ATTACK_DAMAGE", 1.5, 1);
    profile.addAttribute("JUMP_HEIGHT", 1.5, 0);
    profile.addAttribute("PUNCH_DAMAGE", 19.0, 0);
    profile.addAttribute("SPRINT_SPEED", 0.85, 1);
    profile.addAttribute("SWORD_DAMAGE", -0.65, 1);
}

function getAttributeProfile(entity) {
    if (!entity.getData("fiskheroes:transformed")) {
        return "INACTIVE";
    }
    
    return entity.getData("fiskheroes:blade") ? "BLADE" : null;
}

function isModifierEnabled(entity, modifier) {  
    switch (modifier) {
    case "fiskheroes:retractable_blade":
        return entity.getData("fiskheroes:transformed");
    case "fiskheroes:leaping":
        return entity.getData("fiskheroes:transformed");
    case "fiskheroes:enhanced_reflexes":
        return entity.getData("fiskheroes:transformed");
    case "fiskheroes:cellular_regeneration":
        return entity.getData("fiskheroes:transformed");
    case "fiskheroes:superhuman_durability":
        return entity.getData("fiskheroes:transformed");
    default:
        return true;
    }
}

function isKeyBindEnabled(entity, keyBind) {
    switch (keyBind) {
    case "TRANSFORM":
        return entity.getData("fiskheroes:mask_open_timer") == 0;
    case "BLADE":
        return true;
    default:
        return entity.getData("fiskheroes:transformed");
    }
}




