is_valid_unlock function and get_ability_cost function added