Ah, hasTripImmunity() has two variants, one for taking flight into consideration and one were flight isn't considered. For the change, I had enabled the check to ignore flying (so the attack will apply to flying enemies, otherwise, trip will not affect flying enemies).