function init(hero) {
    hero.setName("The Hulk");
    hero.setVersion("\u00A7l\u00A7o\u00A74Skarred \u00A7r\u00A7l\u00A76Heroes\u00A7r");
    hero.setTier(5);
    
    hero.setHelmet("Glasses");
    
    hero.addPowers("sfiskpack:gamma_physiology");
    hero.addAttribute("FALL_RESISTANCE", 1.0, 1);
    hero.addAttribute("JUMP_HEIGHT", 9.0, 0);
    hero.addAttribute("PUNCH_DAMAGE", 14.0, 0);
    hero.addAttribute("WEAPON_DAMAGE", 1.5, 0);
    hero.addAttribute("SPRINT_SPEED", 0.6, 1);

    hero.addKeyBind("GROUND_SMASH", "key.groundSmash", 1);
    hero.addKeyBind("GAMMA_TRANSFORM", "Gamma Transformation", 5);
	
    hero.setDefaultScale(defaultScale);
    
    hero.addAttributeProfile("INACTIVE", inactiveProfile);
    hero.addAttributeProfile("ANGER", angerProfile);
    hero.setAttributeProfile(getAttributeProfile);
    hero.setModifierEnabled(isModifierEnabled);
    hero.setKeyBindEnabled(isKeyBindEnabled);
    hero.setTierOverride(getTierOverride);
}

function getTierOverride(entity) {
    return entity.getData("sfiskpack:dyn/gamma") ? 5 : 0;
}

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

function angerProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("PUNCH_DAMAGE", 15.0, 0);
    profile.addAttribute("JUMP_HEIGHT", 11.0, 0);
}

function getAttributeProfile(entity) {
    if (!entity.getData("sfiskpack:dyn/gamma")) {
        return "INACTIVE";
    }
    
    return entity.getHealth() < 10 ? "ANGER" : null;
}

function isModifierEnabled(entity, modifier) {
    if (modifier.name() != "fiskheroes:transformation" && modifier.name() != "fiskheroes:cooldown" && (!entity.getData("sfiskpack:dyn/gamma") || modifier.name() == "fiskheroes:propelled_flight" && entity.getData("sfiskpack:dyn/gamma_timer") < 1)) {
        return false;
    }
  
    switch (modifier.name()) {
    case "fiskheroes:ground_smash":
        return entity.getData("sfiskpack:dyn/gamma");
    default:
        return true;
    }
}

function isKeyBindEnabled(entity, keyBind) {
    switch (keyBind) {
    case "GAMMA_TRANSFORM":
        return !entity.getData("sfiskpack:dyn/gamma");
    case "GROUND_SMASH":
        return entity.getData("sfiskpack:dyn/gamma") || entity.isBookPlayer();
    default:
        return true;
    }
}

function defaultScale(entity) {
  
  if (entity.getData('sfiskpack:dyn/gamma')) {
    return 1.55;
  }
  return 1;
}