# Generated by tools/gen_nav_scripts.py; edit the generator, not this file.
# --- boot screens, intro movie, title -------------------------------------------------------
# A dismisses the wrist-strap screen and skips the intro movie (scene 22); stops at the title.
mash 100 20 scene == 0
log STATE title screen
# The title accepts A once its intro animation has finished; it is then popped (scene != 0).
mash 100 30 scene != 0
wait scene == 1 || scene == 10
# Without a save file the game asks to create one (pop-up scene 10, default button = yes);
# the main menu keeps its buttons dead until the save is loaded or created.
wait scene == 10 || nbuttons >= 8
if scene == 10
log first run: no save file, accepting 'create save data'
wait nbuttons >= 2
idle 10
mash 100 30 scene == 1
wait nbuttons >= 8
endif
# The port's menu navigation puts the pointer on the first button: Domination Mode (ctx 0).
wait onctx == 0
log STATE main menu, pointer on Domination Mode
# --- Domination Mode: options -> captains -> sidekicks -> sides -> stadium ---------------------
idle 30
press 100
wait scene == 27
wait nbuttons >= 10
# Gameplay options (skill, series, 3-minute limit) are left at their defaults: go down to DONE.
mash 4 30 onoff == 0x1470
idle 20
press 100
wait scene == 2
wait nbuttons >= 10
# Captains: the pointer starts on the home team's panel. A opens the captain grid for it.
wait onoff == 0x920
idle 30
press 100
idle 60
# Grid button 2 (third in the top row) = captain 3, Donkey Kong.
mash 4 30 onoff == 0x218
idle 20
press 100
idle 40
# Right twice, up: the away team's panel. A, then grid button 3 = captain 6, Waluigi.
mash 2 30 onoff == 0x380
idle 20
mash 8 30 onoff == 0x9D4
idle 20
press 100
idle 60
mash 4 30 onoff == 0x2CC
idle 20
press 100
idle 60
mash 4 30 onoff == 0xBF0
idle 20
press 100
log captains confirmed
wait scene == 3
wait nbuttons >= 10
# Sidekicks: the default line-ups are kept; down to DONE.
idle 20
mash 4 30 onoff == 0x11C8
idle 20
press 100
wait scene == 4
wait nbuttons >= 3
# Sides: the pointer starts on HOME. A joins the home team (the away team is the CPU's).
wait onoff == 0x20
idle 30
press 100
idle 30
mash 4 30 onoff == 0x188
idle 20
press 100
wait scene == 5
# Stadium: the default one; the pointer starts on PLAY.
wait onoff == 0x110
idle 30
press 100
log stadium confirmed, loading the match
wait ingame == 1
# A skips the walk-out cutscene (match state 0); state 1 is the kick-off, 5 open play.
mash 100 30 gs == 1
log STATE kick-off
wait gs == 5
log STATE open play
# --- Vita3K, real time: a few scripted moves, then neutral until full time (the emulator presents ~8 frames per second, so the 10,800 frames of holds of the
# oracle script would last 20 minutes; the game clock itself runs in real time and needs about 6 minutes of wall time for a whole match) ---
hold 18 0 71 12
hold 16 0 66 -29
hold 5 200 64 -34
hold 23 0 64 -34
hold 17 0 63 -36
hold 26 0 56 -45
hold 5 100 70 -15
hold 9 0 70 -15
hold 21 0 -72 0
hold 14 0 -30 66
hold 14 0 -72 7
hold 20 200 -37 -62
hold 21 0 7 -72
hold 31 0 -37 -62
hold 5 800 6 -72
hold 16 0 6 -72
hold 14 0 -9 -71
hold 34 0 -64 -34
hold 23 0 -66 29
hold 5 100 -66 29
hold 31 0 -66 29
hold 35 0 -29 66
log scripted moves done (403 frames), waiting for full time
wait gs == 3 || gs == 6 36000
log STATE full time (match state 3, or 6 = sudden death)
# --- results: the tail of nav_fulltime.txt with the idle times scaled down for ~8 frames per second
mash 100 40 ovl == 91 3000
wait nbuttons >= 2
idle 40
log STATE post-game screen: scrolling the article down
press 4
idle 10
mash 100 8 nbuttons >= 3 2400
log STATE post-game: DONE button visible
idle 20
press 1
idle 10
press 100
wait gs == 0 || gs == 1 || gs == 5
log STATE results done, rematch started
idle 60
log script end
exit
