In some cases, when you get into a fight with a weak enemy, you automatically win without going into battle. This is based on your speed, offense, and status. Only the chosen four matter for this; NPCs such as Flying Man are not counted.
You can't instantly win in a red swirl or in a fight triggered by dialogue (such as a boss fight). If the number of enemies is greater than the number of characters who aren't unconscious, diamondized, paralyzed, nauseous, poisoned, and don't have a sunstroke or a cold, you can't instantly win.
In a black swirl, the highest speed among enemies is compared to the lowest speed among your current party members (even if unconscious). Each enemy's HP and defense is then compared to the lowest offense among your current party members (even if unconscious). If your party's stats are greater (not equal) in both cases, you instantly win the fight.
In a green swirl, your characters who do not suffer from the aforementioned statuses are sorted by offense in descending order, and the enemies are sorted by HP in descending order. In turn, each character "attacks" the first enemy which is still "alive", dealing exactly 2 offense-defense "damage". If every enemy is "killed" this way, you instantly win the fight.