function init(hero) {
    hero.setName("Bruce Banner/Hulk");
    hero.setTier(8);
    
    hero.setChestplate("Shirt");

    hero.addPowers("jmctheroes:gamma_physiology");
    hero.addAttribute("FALL_RESISTANCE", 0.75, 1);
    hero.addAttribute("JUMP_HEIGHT", 2.75, 0);
    hero.addAttribute("PUNCH_DAMAGE", 13.7, 0);
    hero.addAttribute("SPRINT_SPEED", 0.45, 1);
    hero.addAttribute("WEAPON_DAMAGE", -0.75, 1);
    hero.addAttribute("MAX_HEALTH", 14.5, 0);

    hero.addKeyBind("EARTHQUAKE", "key.earthquake", 1);
    hero.addKeyBind("GROUND_SMASH", "key.groundSmash", 2);
    hero.addKeyBind("GAMMA", "Gamma Transformation", 5);

    hero.setDefaultScale(defaultScale);
    hero.setAttributeProfile(getProfile);
    hero.setTierOverride(getTierOverride);
    hero.setKeyBindEnabled(isKeyBindEnabled);
    hero.setModifierEnabled(isModifierEnabled);
    hero.addAttributeProfile("RUN", runProfile);
    hero.addAttributeProfile("INACTIVE", inactiveProfile);
    hero.setHasProperty(hasProperty);
}

function runProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("FALL_RESISTANCE", 1.0, 1);
    profile.addAttribute("SPRINT_SPEED", 0.85, 1);
    profile.addAttribute("JUMP_HEIGHT", 10.0, 0);
}

function hasProperty(entity, property) {
    switch (property) {
    case "BREATHE_SPACE":
        return entity.getData("jmctheroes:dyn/gamma");
    default:
        return false;
    }
}

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

function getProfile(entity) {
    if (!entity.getData("jmctheroes:dyn/gamma")) {
        return "INACTIVE";
    }
    else if (entity.isSprinting()) {
        return "RUN";
    }
}

function defaultScale(entity) {
    if (entity.getData('jmctheroes:dyn/gamma')) {
        return 1.5;
    }
    return 1.0;
}

function isModifierEnabled(entity, modifier) {
    if (modifier.name() != "fiskheroes:transformation" && modifier.name() != "fiskheroes:cooldown" && (!entity.getData("jmctheroes:dyn/gamma"))) {
        return false;
    }
  
    switch (modifier.name()) {
    case "fiskheroes:ground_smash":
        return entity.getData("jmctheroes:dyn/gamma");
    case "fiskheroes:earthquake":
        return entity.getData("jmctheroes:dyn/gamma");
    case "fiskheroes:leaping":
        return entity.isSprinting();
    default:
        return true;
    }
}

function isKeyBindEnabled(entity, keyBind) {
    switch (keyBind) {
    case "EARTHQUAKE":
        return entity.getData("jmctheroes:dyn/gamma");
    case "GROUND_SMASH":
        return entity.getData("jmctheroes:dyn/gamma");
    case "GAMMA":
        return !entity.getData("jmctheroes:dyn/gamma");
    default:
        return true;
    }
}

function getTierOverride(entity) {
    return entity.getData("jmctheroes:dyn/gamma") ? 9 : 2;
}
