function init(hero) {
    hero.setName("Ghost Rider");
    hero.setVersion("\u00A74Johnny Blaze\u00A7f");
    hero.setTier(5);
    
	hero.setHelmet("Skull");	
	hero.setChestplate("Jacket");
    hero.setLeggings("Pants");
    hero.setBoots("Boots");
	
	hero.addPowers("ghr:spirit_of_ven");
	
    hero.addAttribute("PUNCH_DAMAGE", 13.0, 0);
    hero.addAttribute("FALL_RESISTANCE", 8.0, 0);
	hero.addAttribute("WEAPON_DAMAGE", 3.5, 0);
    hero.addAttribute("SPRINT_SPEED", 0.45, 1);
	hero.addAttribute("JUMP_HEIGHT", 3.0, 0);
	hero.addAttribute("MAX_HEALTH", 5.0, 0);
    
	hero.addKeyBind("SPELL_MENU", "Chains", 1);
	hero.addKeyBind("AIM", "Beam of Hellfire", 2);
	
    hero.setModifierEnabled(isModifierEnabled);
	hero.setHasProperty(hasProperty);
	hero.supplyFunction("canAim", canAim);
}

function canAim(entity) {
    return entity.getHeldItem().isEmpty() && !entity.getData("fiskheroes:aim");
}

function hasProperty(entity, property) {
    return property == "MASK_TOGGLE" || property == "BREATHE_SPACE" && !entity.getData("fiskheroes:mask_open");
}

function isModifierEnabled(entity, modifier) {
    if (modifier.name() == "fiskheroes:regeneration") {
        return (!entity.getData("fiskheroes:mask_open"));
    }
    else if (modifier.name() == "fiskheroes:potion_immunity") {
        return (!entity.getData("fiskheroes:mask_open"));
    }
    else if (modifier.name() == "fiskheroes:damage_resistance") {
        return (!entity.getData("fiskheroes:mask_open"));
    }
    else if (modifier.name() == "fiskheroes:damage_weakness") {
        return (!entity.getData("fiskheroes:mask_open"));
    }
    else if (modifier.name() == "fiskheroes:teleportation") {
        return (!entity.getData("fiskheroes:mask_open")) && (!entity.getData("fiskheroes:shield"));
    }
    else if (modifier.name() == "fiskheroes:projectile_immunity") {
        return (!entity.getData("fiskheroes:mask_open"));
    }
    else if (modifier.name() == "fiskheroes:arrow_catching") {
        return (!entity.getData("fiskheroes:mask_open"));
    }
    else if (modifier.name() == "fiskheroes:flame_blast") {
        return (!entity.getData("fiskheroes:mask_open"));
    }
    else if (modifier.name() == "fiskheroes:flame_punch") {
        return (!entity.getData("fiskheroes:mask_open"));
    }
    else if (modifier.name() == "fiskheroes:spellcasting") {
        return (!entity.getData("fiskheroes:mask_open")) && (!entity.getData("fiskheroes:shield"));
    }
    else if (modifier.name() == "fiskheroes:damage_immunity") {
        return (!entity.getData("fiskheroes:mask_open"));
    }
    else if (modifier.name() == "fiskheroes:fire_immunity") {
        return (!entity.getData("fiskheroes:mask_open"));
    }
    else if (modifier.name() == "fiskheroes:water_breathing") {
        return (!entity.getData("fiskheroes:mask_open"));
    }
    return true;
}