Conditional allow_failures for Travis Build Stages

I’ve looked through a lot of docs and GH issues for allow_failures and it does not seem very dynamic. It would be nice to be able to apply allow_failures based upon a condition rather than just matching keys, ie

" When matching jobs against the definitions given in allow_failures , all conditions in allow_failures must be met exactly, and all the keys in allow_failures element must exist in the top level of the build matrix"

Therefore, a syntax similar to the stage condition syntax would be useful

    - name: Allow Failures
    - name: Only Feature Branch Allow Failures
      if: branch != master
    - stage: Test (Allow Failures)
      name: Allow Failures
      script: exit 1
    - name: Only Feature Branch Allow Failures
    - stage: Deploy
      name: Deploy
      script: echo "DEPLOY FOR $TRAVIS_BRANCH"