function init(hero) {
    hero.setName("Lizard/Curt Conors");
    hero.setTier(6);
    
    hero.setChestplate("Coat");

    hero.addPowers("tgheroes:lizard");
  
	hero.addKeyBindFunc("func_GIANT_MODE", giantModeKey, "Transformation", 5);
    hero.addKeyBind("TENTACLE_JAB", "Tail Jab", 1);
    hero.addKeyBind("TENTACLE_GRAB", "Tail Grab", 2);
    hero.addKeyBind("TENTACLE_STRIKE", "Tail Strike", 3);
    hero.addKeyBind("TENTACLES", "Transformation", 5);
	
    hero.setModifierEnabled(isModifierEnabled);
    hero.setTierOverride(getTierOverride);
    hero.setKeyBindEnabled(isKeyBindEnabled);
    hero.addAttributeProfile("GIANT_MODE", giantProfile);
    hero.setAttributeProfile(getAttributeProfile);
}

function giantModeKey(player, manager) {
    var flag = player.getData("fiskheroes:dyn/giant_mode");
    manager.setData(player, "fiskheroes:dyn/giant_mode", !flag);
    manager.setData(player, "fiskheroes:size_state", flag ? -1 : 1);
    return true;
}

function isKeyBindEnabled(entity, keyBind) {
    switch (keyBind) {
    case "func_GIANT_MODE":
        var timer = entity.getData("fiskheroes:dyn/giant_mode_timer");
        return timer == 0 || timer == 1;
	case "TENTACLE_GRAB":
        return !entity.getData("fiskheroes:tentacles") == 0;
    case "TENTACLE_STRIKE":
        return !entity.getData("fiskheroes:tentacles") == 0;
	case "TENTACLE_JAB":
        return !entity.getData("fiskheroes:tentacles") == 0;
    default:
        return true;
    }
}

function getTierOverride(entity) {
    return entity.getData("fiskheroes:dyn/giant_mode") ? 6 : 0;
}

function giantProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("PUNCH_DAMAGE", 6.0, 0);
    profile.addAttribute("JUMP_HEIGHT", 3.0, 0);
    profile.addAttribute("FALL_RESISTANCE", 8.0, 0);
	profile.addAttribute("WEAPON_DAMAGE", 2.0, 0);
    profile.addAttribute("SPRINT_SPEED", 0.25, 1);
    profile.addAttribute("STEP_HEIGHT", 0.5, 0);
}

function getAttributeProfile(entity) {
    return entity.getData("fiskheroes:dyn/giant_mode_timer") > 0 ? "GIANT_MODE" : null;
}

function isModifierEnabled(entity, modifier) {
    switch (modifier.name()) {
    case "fiskheroes:leaping":
        return entity.getData("fiskheroes:dyn/giant_mode");
	case "fiskheroes:water_breathing":
        return entity.getData("fiskheroes:dyn/giant_mode");
	case "fiskheroes:potion_immunity":
        return entity.getData("fiskheroes:dyn/giant_mode");
	case "fiskheroes:arrow_catching":
        return entity.getData("fiskheroes:dyn/giant_mode");
	case "fiskheroes:regeneration":
        return entity.getData("fiskheroes:dyn/giant_mode");
    default:
        return true;
    }
}