# W5 CTL generated (tools/ctl/gen_scripts.py): touch. Vita-button commands only; the layout maps them.
# Counters: platform/sdk/input/np_game_input.cpp ctl_observe ([ctl] summary at the end); the run stops when every one of
# cpass chit cmega is non-zero and a minigame was played with buttons / touch (or at MSC_MAX_FRAMES).
vmash cross 20 scene == 0
log STATE title screen
idle 30
launch mode=friendly stadium=0 home=0 away=7 hsk=0,1,2 ask=3,4,5 human=0 skill=2 time=300
wait ingame == 1 4000
log STATE match object
wait gs == 5 6000
log STATE open play
stopwhen csavea > 0 || cshake > 0 && cpass > 0 && chit > 0 && cmega > 0
repeat 400
if cmode == 1
log MINIGAME mega save
try touch 480 300 30 2
try touch 520 260 30 2
try touch 440 280 30 2
endif
if cmode == 2
log MINIGAME our mega strike meter
touch 480 272 10 12
touch 480 272 10 12
endif
if cmode == 3
log MINIGAME shakedown
try swmash 300 300 420 300 8 cmode != 3 600
endif
if chave == 1 && cplayer == 0 && cmega < 3
log ACTION mega strike try (captain holds circle)
vchase 15 none goal
try vmash circle 1 cmode == 2 || chave == 0 200
if cmode == 2
log MINIGAME our mega strike meter (touch)
touch 480 272 10 12
touch 480 272 10 12
endif
endif
if cmode == 1
log MINIGAME mega save
try touch 480 300 30 2
try touch 520 260 30 2
try touch 440 280 30 2
endif
if cmode == 2
log MINIGAME our mega strike meter
touch 480 272 10 12
touch 480 272 10 12
endif
if cmode == 3
log MINIGAME shakedown
try swmash 300 300 420 300 8 cmode != 3 600
endif
if chave == 1 && cplayer == 4
log ACTION keeper pass
vpress cross 3 20
endif
if chave == 1 && cplayer != 4
log ACTION pass
vchase 10 none goal
vpress cross 3 20
endif
if chave == 0
vchase 12 none ball
endif
if cball == 1
log ACTION big hit
vchase 10 none ball
vpress square 3 15
endif
if cmode == 1
log MINIGAME mega save
try touch 480 300 30 2
try touch 520 260 30 2
try touch 440 280 30 2
endif
if cmode == 2
log MINIGAME our mega strike meter
touch 480 272 10 12
touch 480 272 10 12
endif
if cmode == 3
log MINIGAME shakedown
try swmash 300 300 420 300 8 cmode != 3 600
endif
if chave == 1 && cplayer == 4
log ACTION keeper pass
vpress cross 3 20
endif
if chave == 1 && cplayer != 4
log ACTION deke (right stick)
vchase 8 none goal
vchase 4 none goal 72 0
idle 15
endif
if chave == 0
vchase 12 none ball
endif
if cball == 1
log ACTION switch player
vpress l 3 15
endif
if cmode == 1
log MINIGAME mega save
try touch 480 300 30 2
try touch 520 260 30 2
try touch 440 280 30 2
endif
if cmode == 2
log MINIGAME our mega strike meter
touch 480 272 10 12
touch 480 272 10 12
endif
if cmode == 3
log MINIGAME shakedown
try swmash 300 300 420 300 8 cmode != 3 600
endif
if chave == 1 && cplayer == 4
log ACTION keeper pass
vpress cross 3 20
endif
if chave == 1 && cplayer != 4
log ACTION lob pass
vchase 10 none goal
vpress square 3 25
endif
if chave == 0
vchase 12 none ball
endif
if cball == 1
log ACTION slide tackle
vchase 10 none ball
vpress circle 3 20
endif
if cmode == 1
log MINIGAME mega save
try touch 480 300 30 2
try touch 520 260 30 2
try touch 440 280 30 2
endif
if cmode == 2
log MINIGAME our mega strike meter
touch 480 272 10 12
touch 480 272 10 12
endif
if cmode == 3
log MINIGAME shakedown
try swmash 300 300 420 300 8 cmode != 3 600
endif
if chave == 1 && cplayer == 4
log ACTION keeper pass
vpress cross 3 20
endif
if chave == 1 && cplayer != 4
log ACTION turbo (chip ahead)
vchase 10 none goal
vchase 3 r goal
vchase 30 none ball
endif
if chave == 0
vchase 12 none ball
endif
if cball == 1
log ACTION cycle item
vpress select 3 15
endif
if cmode == 1
log MINIGAME mega save
try touch 480 300 30 2
try touch 520 260 30 2
try touch 440 280 30 2
endif
if cmode == 2
log MINIGAME our mega strike meter
touch 480 272 10 12
touch 480 272 10 12
endif
if cmode == 3
log MINIGAME shakedown
try swmash 300 300 420 300 8 cmode != 3 600
endif
if chave == 1 && cplayer == 4
log ACTION keeper pass
vpress cross 3 20
endif
if chave == 1 && cplayer != 4
log ACTION deke (D-pad)
vchase 8 none goal
vhold 3 right
idle 15
endif
if chave == 0
vchase 12 none ball
endif
if cball == 1
log ACTION switch player (rear right tap)
rtouch 720 272 3 15
endif
if cmode == 1
log MINIGAME mega save
try touch 480 300 30 2
try touch 520 260 30 2
try touch 440 280 30 2
endif
if cmode == 2
log MINIGAME our mega strike meter
touch 480 272 10 12
touch 480 272 10 12
endif
if cmode == 3
log MINIGAME shakedown
try swmash 300 300 420 300 8 cmode != 3 600
endif
if chave == 1 && cplayer == 4
log ACTION keeper pass
vpress cross 3 20
endif
if chave == 1 && cplayer != 4
log ACTION shot
vchase 20 none goal
vchase 4 circle goal
idle 30
endif
if chave == 0
vchase 12 none ball
endif
if cball == 1
log ACTION cycle item (rear left tap)
rtouch 220 272 3 15
endif
if cmode == 1
log MINIGAME mega save
try touch 480 300 30 2
try touch 520 260 30 2
try touch 440 280 30 2
endif
if cmode == 2
log MINIGAME our mega strike meter
touch 480 272 10 12
touch 480 272 10 12
endif
if cmode == 3
log MINIGAME shakedown
try swmash 300 300 420 300 8 cmode != 3 600
endif
if chave == 1 && cplayer == 4
log ACTION keeper pass
vpress cross 3 20
endif
if chave == 1 && cplayer != 4
log ACTION pass
vchase 10 none goal
vpress cross 3 20
endif
if chave == 0
vchase 12 none ball
endif
if cball == 1
log ACTION big hit
vchase 10 none ball
vpress square 3 15
endif
if cmode == 1
log MINIGAME mega save
try touch 480 300 30 2
try touch 520 260 30 2
try touch 440 280 30 2
endif
if cmode == 2
log MINIGAME our mega strike meter
touch 480 272 10 12
touch 480 272 10 12
endif
if cmode == 3
log MINIGAME shakedown
try swmash 300 300 420 300 8 cmode != 3 600
endif
if chave == 1 && cplayer == 4
log ACTION keeper pass
vpress cross 3 20
endif
if chave == 1 && cplayer != 4
log ACTION chip shot
vchase 15 none goal
vchase 6 r+circle goal
vchase 4 r goal
idle 30
endif
if chave == 0
vchase 12 none ball
endif
if cball == 1
log ACTION switch player
vpress l 3 15
endif
if cmode == 1
log MINIGAME mega save
try touch 480 300 30 2
try touch 520 260 30 2
try touch 440 280 30 2
endif
if cmode == 2
log MINIGAME our mega strike meter
touch 480 272 10 12
touch 480 272 10 12
endif
if cmode == 3
log MINIGAME shakedown
try swmash 300 300 420 300 8 cmode != 3 600
endif
if chave == 1 && cplayer == 4
log ACTION keeper pass
vpress cross 3 20
endif
if chave == 1 && cplayer != 4
log ACTION cycle item
vpress select 3 15
endif
if chave == 0
vchase 12 none ball
endif
if cball == 1
log ACTION slide tackle
vchase 10 none ball
vpress circle 3 20
endif
if chave == 1 && citems > 0
log ACTION use item
vpress triangle 3 20
endif
endrepeat
log STATE script end
exit
