function init(hero) {
    hero.setName("Ghost Rider/Johnny Blaze");
    hero.setTier(8);
    
    hero.setChestplate("Jacket");
    
	hero.addPowers("tgheroes:spirit");
    hero.addAttribute("PUNCH_DAMAGE", 8.0, 0);
    hero.addAttribute("JUMP_HEIGHT", 3.0, 0);
    hero.addAttribute("FALL_RESISTANCE", 1.0, 1);
    hero.addAttribute("WEAPON_DAMAGE", 3.0, 0);
	hero.addAttribute("SPRINT_SPEED", 0.25, 1);
    hero.addAttribute("STEP_HEIGHT", 0.5, 0);
	
    hero.addKeyBind("AIM", "Fire", 2);
    hero.addKeyBind("CHARGED_BEAM", "Penance Stare", 3);   
	hero.addKeyBind("SPIRIT", "Transform", 1);
	
	hero.addAttributeProfile("STARE", stareProfile);
    hero.setAttributeProfile(getProfile);
	hero.supplyFunction("canAim", canAim);
	hero.setKeyBindEnabled(isKeyBindEnabled);
	hero.setModifierEnabled(isModifierEnabled);
}

function canAim(entity) {
    return entity.getHeldItem().isEmpty() ;
}

function getProfile(entity) {
	if (entity.getData("fiskheroes:beam_shooting") ) {
        return "STARE";
    }
	return false;
}

function stareProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("BASE_SPEED", -5.0, 0);
	profile.addAttribute("JUMP_HEIGHT", -20.0, 0);
}


function isKeyBindEnabled(entity, keyBind) {  
	switch (keyBind) {
	case "AIM":
        return entity.getData("tgheroes:dyn/doorman_suit");	
	case "CHARGED_BEAM":
        return entity.getData("tgheroes:dyn/doorman_suit");	
    default:
        return true;
    }
}

function isModifierEnabled(entity, modifier) {
    if (modifier.name() == "fiskheroes:fireball") {
        return entity.getData("tgheroes:dyn/doorman_suit");	
	}
	else if (modifier.name() == "fiskheroes:regeneration") {
        return entity.getData("tgheroes:dyn/doorman_suit");	
	}
	else if (modifier.name() == "fiskheroes:projectile_immunity") {
        return entity.getData("tgheroes:dyn/doorman_suit");	
	}
	else if (modifier.name() == "fiskheroes:damage_immunity") {
        return entity.getData("tgheroes:dyn/doorman_suit");	
	}
	else if (modifier.name() == "fiskheroes:fire_immunity") {
        return entity.getData("tgheroes:dyn/doorman_suit");	
	}
	else if (modifier.name() == "fiskheroes:arrow_catching") {
        return entity.getData("tgheroes:dyn/doorman_suit");	
	}
	else if (modifier.name() == "fiskheroes:potion_immunity") {
        return entity.getData("tgheroes:dyn/doorman_suit");	
	}
    return true;
}

