Alatreon AI Observations
Based on the em050_00 and em050_55 files provided alongside juzzi's recent video.
I've been putting some effort into making these files more human-readable by renaming nodes according to their likely purpose. So far, I've focused on the logic that determines when element changes and flying phases occur. I have added snippets of Leviathon code to provide context for claims I make, but the surrounding explanation should be self-contained, so feel free to skip them if you like.
General
Surprisingly, there don't seem to be any time-based mechanics in the fight; instead, progression is measured in terms of attack combos. I might explore the structure of these combos more later, for now just think of them as random sequences of maybe one to three attacks. Ahead of every attack combo, the AI first performs a check to see whether Alatreon should change to dragon or start an EJ, followed by a check to see whether Alatreon should land or take off.
Each check has a counter that keeps track of how many times the check has been performed. Once the checks reach certain thresholds, Alatreon will take off, land or change its active element. These counters reset after an element change, whether from fire/ice to dragon or from dragon back to fire/ice through EJ.
Element Changes
Ignoring health-based triggers for now, Alatreon will change elements after 14 element change checks during the first EJ cycle, after 12 checks on the second cycle, or after 10 checks on the third and later cycles. As the time between element changes decreases after the first and second EJ, in that sense getting topples/horn breaks becomes harder as the fight goes on.
Because the element change check is skipped while Alatreon is flying, aerial combos don't increment the check counter. In other words, the element check counter just counts the number of ground combos started. Time Alatreon spends flying is "extra", it doesn't eat into the time it spends on the ground between element changes. For the purpose of counting element checks, the take-off moves each count as a ground combo, because Alatreon's AI first increments the check counter and then picks a take-off move instead of a ground combo.
There are also health-based triggers for element changes, but only on the first EJ cycle. In this case, the threshold for starting EJ is reduced to 8 checks if Alatreon's hp is at or below 20%, and the threshold for switching from fire/ice to dragon is reduced to 3 checks if Alatreon's hp is at or below 55%.
This explains why Dawn's Triumph's Alatreon can change to dragon very quickly after just 3 ground combos in fire mode, while staying in dragon for at least 7 ground combos (remembering that one ground combo is "lost" to the dragonflight take-off move), plus the dragonflight phase which does not contribute to the counter. Again, these health-based triggers only apply on the first EJ cycle, so for inexperienced players attempting full health Alatreon or experienced players attempting no-armor runs, they are irrelevant.
Flying Phases
Alatreon will start flying after 11 ground combos in fire/ice mode, and after just 3 ground combos in dragon mode.
This explains why fire-/iceflight is skippable, but dragonflight is not: In fire/ice mode, if the 55% health threshold is reached within the first 11 ground combos, Alatreon will change to dragon before it starts flying. In dragon mode, the 9 check threshold for EJ will never take precedence over the 4 check threshold to start flying. Another interesting consequence is that fire-/iceflight never occurs after the second EJ, no matter how much remaining health Alatreon has.
As for how long Alatreon stays flying, it's a bit weird: usually, it will land after 5 aerial combos, yet during the second EJ cycle only (after first EJ but before second EJ), it will land after just 3 aerial combos.
However, there are again health-based landing triggers that only apply to the first EJ cycle: It will land after just 1 aerial combo at the same thresholds as above; 55% for fire/ice and 20% for dragon.
While the landing move usually depends on the active element (the downward "hot blast" fire breath for fire, the "rush fly to ground" dive for ice), if Alatreon has performed at least 2 aerial combos when the health threshold landing triggers, it will unconditionally choose the faster rush to ground.
As an interesting bonus fact, there seems to be logic for a mid-air fire/ice to dragon shift, but it never comes into play because the element change check is only performed while Alatreon is on the ground.
Summary
If the health-based triggers don't come into play, an Alatreon fight should progress like this (in terms of attack combos):
The 55% health threshold can cut the first fire/ice phase short, either after at least 3 ground combos, or forcing an early landing after at least 1 aerial combo into an instant dragon switch. The 20% health threshold can cut the first dragon phase short, however Alatreon will always fly and perform at least 1 aerial combo, and the landing will always be followed by at least 4 more ground combos before EJ. Phases after the first EJ are unaffected by health thresholds.
by noderoo