function init(hero) {
    hero.setName("Green Goblin");
    hero.setVersion("\u00A7c\u00A7lRaimi\u00A7r");
    hero.setTier(7);
    
    hero.setHelmet("Helmet");
    hero.setChestplate("Chestplate");
    hero.setLeggings("Pants");
    hero.setBoots("Boots");
    
    hero.addPowers("ahhp:goblin_formula", "ahhp:goblin_blades");
    hero.addAttribute("FALL_RESISTANCE", 10.0, 0);
    hero.addAttribute("JUMP_HEIGHT", 2.0, 0);
    hero.addAttribute("PUNCH_DAMAGE", 8.0, 0);
    hero.addAttribute("SPRINT_SPEED", 0.30, 1);
    hero.addAttribute("STEP_HEIGHT", 0.5, 0);
    hero.addAttribute("IMPACT_DAMAGE", 0.35, 1);
    hero.addAttribute("BASE_SPEED_LEVELS", 2.0, 0);
    
    hero.addKeyBind("SUPER_SPEED", "Boost", 1);
    hero.addKeyBind("SLOW_MOTION", "Enhanced Senses", 2);
    hero.addKeyBind("GOBLIN_BLADE", "Blades", 3);
    hero.addKeyBind("HOVER", "Hover", 3);
    hero.addKeyBind("PUMPKIN_BOMB", "Pumpkin Bomb", 4);
    hero.addKeyBind("CHARGED_BEAM", "Glider Miniguns", 4);
    hero.addKeyBind("GLIDER", "Summon Glider", 5);

    hero.setModifierEnabled(isModifierEnabled);
    hero.addAttributeProfile("GLIDER", gliderProfile);
    hero.addAttributeProfile("PUMPKINBOMB", pumpkinbombProfile);
    hero.addAttributeProfile("GOBLINBLADE", goblinbladeProfile);
    hero.setAttributeProfile(getAttributeProfile);
    hero.setKeyBindEnabled(isKeyBindEnabled);
    hero.setHasProperty(hasProperty);

    hero.addSoundEvent("MASK_OPEN", "ahhp:green_goblin_laugh");
}

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

function gliderProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("FALL_RESISTANCE", 100.0, 1);
    profile.addAttribute("IMPACT_DAMAGE", 0.5, 1);
}

function pumpkinbombProfile(profile) {
    profile.inheritDefaults();
}

function goblinbladeProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("PUNCH_DAMAGE", 9.0, 0);
}

function getAttributeProfile(entity) {
    return entity.getData("ahhp:dyn/glider") ? "GLIDER" : null;
    return entity.getData("ahhp:dyn/pumpkinbomb") ? "PUMPKINBOMB" : null;
    return entity.getData("ahhp:dyn/goblinblade") ? "GOBLINBLADE" : null;
}

function isModifierEnabled(entity, modifier) {
    switch (modifier.name()) {
    case "fiskheroes:flight":
        return entity.getData("ahhp:dyn/glider");
    case "fiskheroes:hover":
        return entity.getData("ahhp:dyn/glider");
    case "ahhp:dyn/glider":
        return !entity.isOnGround();
    case "fiskheroes:charged_beam":
        return entity.getData("ahhp:dyn/glider");
    case "fiskheroes:lightning_cast":
        return entity.getData("ahhp:dyn/pumpkinbomb") && !entity.getData("ahhp:dyn/glider");
    case "ahhp:dyn/pumpkinbomb":
        return !entity.getData("ahhp:dyn/glider") && !entity.getData("ahhp:dyn/goblinblade");
    case "ahhp:dyn/goblinblade":
        return !entity.getData("ahhp:dyn/glider") && !entity.getData("ahhp:dyn/pumpkinbomb");
    case "fiskheroes:super_speed":
        return entity.getData("ahhp:dyn/glider") && !entity.isOnGround();
    default:
        return true;
    }
}

function isKeyBindEnabled(entity, keyBind) {
    switch (keyBind) {
        case "GLIDER":
            return !entity.isOnGround();
        case "PUMPKIN_BOMB":
            return !entity.getData("ahhp:dyn/glider") && !entity.getData("ahhp:dyn/goblinblade");
        case "GOBLIN_BLADE":
            return !entity.getData("ahhp:dyn/glider") && !entity.getData("ahhp:dyn/pumpkinbomb");
        case "HOVER":
            return entity.getData("ahhp:dyn/glider");
        case "SUPER_SPEED":
            return entity.getData("ahhp:dyn/glider") && !entity.isOnGround();
        case "CHARGED_BEAM":
            return entity.getData("ahhp:dyn/glider") && !entity.isOnGround();
        default:
            return true;
    }
}