K, here's something RNG related.
Apparently the memory address the flower targets is based on 02060A86 (2 bytes).
It seems value 0 always hit a certain enemy, not following the rule below (or folowing differently than I noticed).
From my tests, it has a different rule for each kind of formation (# of enemies):
-2 enemies: 0 hits the one with highest id? (020CC970 and 020CCEBD shows a number for each enemy)
It follows a "4 each enemy": 1, 2, 3 hits one enemy; 4, 5, 6, 7 hits the other; 8, 9, 10, 11 hits the first again; etc.
-3 enemies: 0 on middle id?
2 for each: 1 hits 1st enemy; 2, 3 hits another; 4, 5 hits the 3rd; 6, 7 hits the 1st; etc.
-4 enemies: 0 on 2nd lowest id?
(No relevance between letters and id, I forgot which id is which letter =p)
It alternates between 2 enemies each time: 1 hits enemy A, 2 hits B, 3 hits A; 4 C, 5 D, 6 C, 7 D; 8 A, 9 B, 10 A, 11 B; etc.
-5 enemies: 0 on 2nd highest?
Highest to lowest id: 1, 6, 11, .. on highest; 2, 7, 12, .. on second highest; etc.
-6 enemies: 0 on 2nd lowest?
(A is lowest id, F is highest)
1 hits A,; 2, 3 C; 4, 5 B; 6, 7 D; 8, 9 C; 10, 11 E; 12, 13 D; 14, 15 F; 16, 17 E; 18, 19 A; 20, 21 F; 22, 23 B; 24, 25 A; etc.
Didn't test more than that yet. I'll try doing a script later to see if this is accurate. Or at least helpful.
Some of these worked only with lower numbers; the rule changes later (noticed on 6, which changed after 40, and with 3, which I don't know where it doesn't work). 2 enemies were accurate though.
Edit: ah, those are for adults. I have yet to test with the babies.
Edit2: OK, the babies might be the same as the adults. However, they can target a different enemy if you press their button instead of the adult on a certain frame. My guess is that the frame that gets the number is actually delayed by 1. So the adults get the number 1 frame after you press the button, while babies get 2 frames later.
It's a bit of random guess, I'll try doing the script to see how it goes.
Edit 3: from what it looks, Mario gets the number 1 frame after the button press, and Luigi, 2 frames. I have no idea about the babies though. If I fix the number, they shoot the same target as adults, so I guess it's a matter of which frame. Welp. 3 frames after button press for Baby Luigi, 4 for Baby Mario. Bleh.
Well, of course this wouldn't be as easy as I hoped.. I might try something later, but for now, whatever =p