
;--------------------------------------------------------------------------
;	AI僗僀僢僠僐儅儞僪

[Command]
Name = "AI01"
Command = ~D,U,D,U,D,U,D,U,D,U,a
Time = 1

[Command]
Name = "AI02"
Command = ~D,U,D,U,D,U,D,U,D,U,b
Time = 1

[Command]
Name = "AI03"
Command = ~D,U,D,U,D,U,D,U,D,U,c
Time = 1

[Command]
Name = "AI04"
Command = ~D,U,D,U,D,U,D,U,D,U,x
Time = 1

[Command]
Name = "AI05"
Command = ~D,U,D,U,D,U,D,U,D,U,y
Time = 1

[Command]
Name = "AI06"
Command = ~D,U,D,U,D,U,D,U,D,U,z
Time = 1

[Command]
Name = "AI07"
Command = ~U,D,U,D,U,D,U,D,U,D,a
Time = 1

[Command]
Name = "AI08"
Command = ~U,D,U,D,U,D,U,D,U,D,b
Time = 1

[Command]
Name = "AI09"
Command = ~U,D,U,D,U,D,U,D,U,D,c
Time = 1

[Command]
Name = "AI10"
Command = ~U,D,U,D,U,D,U,D,U,D,x
Time = 1

[Command]
Name = "AI11"
Command = ~U,D,U,D,U,D,U,D,U,D,y
Time = 1

[Command]
Name = "AI12"
Command = ~U,D,U,D,U,D,U,D,U,D,z
Time = 1

[Command]
Name = "AI13"
Command = ~B,F,B,F,B,F,B,F,B,F,a
Time = 1

[Command]
Name = "AI14"
Command = ~B,F,B,F,B,F,B,F,B,F,b
Time = 1

[Command]
Name = "AI15"
Command = ~B,F,B,F,B,F,B,F,B,F,c
Time = 1

[Command]
Name = "AI16"
Command = ~B,F,B,F,B,F,B,F,B,F,x
Time = 1

[Command]
Name = "AI17"
Command = ~B,F,B,F,B,F,B,F,B,F,y
Time = 1

[Command]
Name = "AI18"
Command = ~B,F,B,F,B,F,B,F,B,F,z
Time = 1

[Command]
Name = "AI19"
Command = ~F,B,F,B,F,B,F,B,F,B,a
Time = 1

[Command]
Name = "AI20"
Command = ~F,B,F,B,F,B,F,B,F,B,b
Time = 1

[Command]
Name = "AI21"
Command = ~F,B,F,B,F,B,F,B,F,B,c
Time = 1

[Command]
Name = "AI22"
Command = ~F,B,F,B,F,B,F,B,F,B,x
Time = 1

[Command]
Name = "AI23"
Command = ~F,B,F,B,F,B,F,B,F,B,y
Time = 1

[Command]
Name = "AI24"
Command = ~F,B,F,B,F,B,F,B,F,B,z
Time = 1


;------------------------------
;	AI梡僐儅儞僪

[Command]
Name = "236236236236C"
Command = ~D, DF, F, D, DF, F, D, DF, F, D, DF, F, c
Time = 1

[Command]
Name = "214214214214C"
Command = ~D, DB, B, D, DB, B, D, DB, B, D, DB, B, c
Time = 1

[Command]
Name = "4123641236C"
Command = ~B, DB, D, DF, F, B, DB, D, DF, F, c
Time = 1

[Command]
Name = "6321463214C"
Command = ~F, DF, D, DB, B, F, DF, D, DB, B, c
Time = 1

;------------------------------
;	挻昁嶦媄僐儅儞僪

[Command]
Name = "214Z"
Command = ~D, DB, B, z
Time = 20

[Command]
Name = "236Z"
Command = ~D, DF, F, z
Time = 20

[Command]
Name = "623Z"
Command = ~F, D, DF, z
Time = 20

[Command]
Name = "421Z"
Command = ~B, D, DB, z
Time = 20

;------------------------------
;	昁嶦媄僐儅儞僪

[Command]
Name = "214A"
Command = ~D, DB, B, a
Time = 15
[Command]
Name = "214B"
Command = ~D, DB, B, b
Time = 15
[Command]
Name = "214C"
Command = ~D, DB, B, c
Time = 15

[Command]
Name = "236A"
Command = ~D, DF, F, a
Time = 15
[Command]
Name = "236B"
Command = ~D, DF, F, b
Time = 15
[Command]
Name = "236C"
Command = ~D, DF, F, c
Time = 15

[Command]
Name = "623A"
Command = ~F, D, DF, a
Time = 15
[Command]
Name = "623B"
Command = ~F, D, DF, b
Time = 15
[Command]
Name = "623C"
Command = ~F, D, DF, c
Time = 15

[Command]
Name = "421A"
Command = ~B, D, DB, a
Time = 15
[Command]
Name = "421B"
Command = ~B, D, DB, b
Time = 15
[Command]
Name = "421C"
Command = ~B, D, DB, c
Time = 15

;------------------------------
;	僋儔僢僔儏僐儅儞僪

[Command]
Name = "22A"
Command = ~D, D, a
Time = 15
[Command]
Name = "22B"
Command = ~D, D, b
Time = 15
[Command]
Name = "22C"
Command = ~D, D, c
Time = 15

;------------------------------
;	僟僢僔儏僐儅儞僪

[Command]
Name = "66"     
Command = F, F
Time = 15
[Command]
Name = "44"     
Command = B, B
Time = 15

;------------------------------
;	庴恎僐儅儞僪

[Command]
Name = "recovery"
Command = x+y

[Command]
Name = "recoveryA"
Command = /F,a
[Command]
Name = "recoveryA"
Command = /F,b
[Command]
Name = "recoveryA"
Command = /F,c

[Command]
Name = "recoveryB"
Command = /B,a
[Command]
Name = "recoveryB"
Command = /B,b
[Command]
Name = "recoveryB"
Command = /B,c

;------------------------------
;	堏摦婲偒忋偑傝梡僐儅儞僪

[Command]
Name = "holda"
Command = /$a
Time = 1
[Command]
Name = "holdb"
Command = /$b
Time = 1
[Command]
Name = "holdc"
Command = /$c
Time = 1

[Command]
Name = "holdx"
Command = /$x
Time = 1
[Command]
Name = "holdy"
Command = /$y
Time = 1
[Command]
Name = "holdz"
Command = /$z
Time = 1

;------------------------------
;	扨敪僐儅儞僪

[Command]
Name = "2"
Command = D
Time = 1

;------------------------------

[Command]
Name = "a"
Command = a
Time = 1
[Command]
Name = "b"
Command = b
Time = 1
[Command]
Name = "c"
Command = c
Time = 1

[Command]
Name = "x"
Command = x
Time = 1
[Command]
Name = "y"
Command = y
Time = 1
[Command]
Name = "z"
Command = z
Time = 1

[Command]
Name = "start"
Command = s
Time = 1

;------------------------------

[Command]
Name = "holdfwd"
Command = /$F
Time = 1
[Command]
Name = "holdback"
Command = /$B
Time = 1

[Command]
Name = "holdup" 
Command = /$U
Time = 1
[Command]
Name = "holddown"
Command = /$D
Time = 1

[Command]
Name = "holda"
Command = /$a
Time = 1
[Command]
Name = "holdb"
Command = /$b
Time = 1
[Command]
Name = "holdc"
Command = /$c
Time = 1

;==============================
[StateDef -1]

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	僾儗僀儎乕憖嶌梡乮渎柌憐儌乕僪乯
;--------------------------------------------------

;------------------------------丂僨僶僢僋梡
[State -1, Test]
Type = Null;ChangeState
Value = 3590
TriggerAll = Command = "x"
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = StateType != A
Trigger1   = Ctrl

;------------------------------丂Five of a Kind
[State -1, five of a kind]
Type = ChangeState
Value = 3090
TriggerAll = Command = "214Z"
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = Var(57) = 3
TriggerAll = Var(53) = 4
TriggerAll = StateType != A
Trigger1   = Ctrl
Trigger2   = (StateNo = [100,109]) && (StateNo%5 = 2) && (Time > 0)
Trigger3   = (StateNo = [200,249]) && MoveContact
Trigger4   = (StateNo = [400,449]) && MoveContact
Trigger5   = (StateNo = [300,309]) && (StateNo%5=1) && (Time>0)
Trigger6   = (StateNo = [300,309]) && (StateNo%5=2)
Trigger7   = (StateNo = [320,349]) && (AnimElem =6, >0)
Trigger8   = (StateNo = 500) && (AnimElem =5, >0)
Trigger9   = (StateNo = 540) && (AnimElem =4, >0)
Trigger10  = (StateNo = 1000) && (AnimElemTime(5) >0)
Trigger11  = (StateNo = 1001) && (AnimElemTime(5) >0)
Trigger12  = (StateNo = [1010,1019]) && MoveContact
Trigger13  = (StateNo = [1020,1039]) && MoveContact
Trigger14  = (StateNo = 1049) && MoveContact
Trigger15  = (StateNo = 1060) && (Time > 35)

;------------------------------丂Raise
[State -1, raise]
Type = ChangeState
Value = 3060
TriggerAll = Command = "214Z"
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = Var(46) = 0;	僗僩乕儕乕儌乕僪帪柍岠
TriggerAll = Var(57) < 3
TriggerAll = Power >= 1000;	僷儚乕桳傝
TriggerAll = StateType != A
Trigger1   = Ctrl
Trigger2   = (StateNo = [100,109]) && (StateNo%5 = 2) && (Time > 0)
Trigger3   = (StateNo = [200,249]) && MoveContact
Trigger4   = (StateNo = [400,449]) && MoveContact
Trigger5   = (StateNo = [300,309]) && (StateNo%5=1) && (Time>0)
Trigger6   = (StateNo = [300,309]) && (StateNo%5=2)
Trigger7   = (StateNo = [320,349]) && (AnimElem =6, >0)
Trigger8   = (StateNo = 500) && (AnimElem =5, >0)
Trigger9   = (StateNo = 540) && (AnimElem =4, >0)
Trigger10  = (StateNo = 1000) && (AnimElemTime(5) >0)
Trigger11  = (StateNo = 1001) && (AnimElemTime(5) >0)
Trigger12  = (StateNo = [1010,1019]) && MoveContact
Trigger13  = (StateNo = [1020,1039]) && MoveContact
Trigger14  = (StateNo = 1049) && MoveContact
Trigger15  = (StateNo = 1060) && (Time > 35)

;------------------------------丂Royal Flush
[State -1, royal flush]
Type = ChangeState
Value = 3030
TriggerAll = Command = "623Z"
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = Power >= 1000;	僷儚乕桳傝
TriggerAll = StateType != A
Trigger1   = Ctrl
Trigger2   = (StateNo = [100,109]) && (StateNo%5 = 2) && (Time > 0)
Trigger3   = (StateNo = [200,249]) && MoveContact
Trigger4   = (StateNo = [400,449]) && MoveContact
Trigger5   = (StateNo = [300,309]) && (StateNo%5=1) && (Time>0)
Trigger6   = (StateNo = [300,309]) && (StateNo%5=2)
Trigger7   = (StateNo = [320,349]) && (AnimElem =6, >0)
Trigger8   = (StateNo = 500) && (AnimElem =5, >0)
Trigger9   = (StateNo = 540) && (AnimElem =4, >0)
Trigger10  = (StateNo = 1000) && (AnimElemTime(5) >0)
Trigger11  = (StateNo = 1001) && (AnimElemTime(5) >0)
Trigger12  = (StateNo = [1010,1019]) && MoveContact
Trigger13  = (StateNo = [1020,1039]) && MoveContact
Trigger14  = (StateNo = 1049) && MoveContact
Trigger15  = (StateNo = 1060) && (Time > 35)

;------------------------------丂Four of a Kind
[State -1, 4 of a kind]
Type = ChangeState
Value = 3000
TriggerAll = Command = "236Z"
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = Power >= 2000;	僷儚乕桳傝
TriggerAll = StateType != A
TriggerAll = Var(4) = -60
Trigger1   = Ctrl

;------------------------------丂Flush 侾
[State -1, 1020]
Type = ChangeState
Value = 1020
TriggerAll = Command = "623A"
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = StateType != A
Trigger1   = Ctrl
Trigger2   = (StateNo = 200) && MoveContact
Trigger3   = (StateNo = 210) && MoveContact
Trigger4   = (StateNo = 220) && MoveContact
Trigger5   = (StateNo = 230) && MoveContact
Trigger6   = (StateNo = 400) && MoveContact
Trigger7   = (StateNo = 420) && MoveContact

;------------------------------丂Flush 俀
[State -1, 1030]
Type = ChangeState
Value = 1030
TriggerAll = Command = "623B"
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = StateType != A
Trigger1   = Ctrl
Trigger2   = (StateNo = 200) && MoveContact
Trigger3   = (StateNo = 210) && MoveContact
Trigger4   = (StateNo = 220) && MoveContact
Trigger5   = (StateNo = 230) && MoveContact
Trigger6   = (StateNo = 400) && MoveContact
Trigger7   = (StateNo = 420) && MoveContact
Trigger8   = StateNo = 1020
Trigger8   = AnimElemTime(3) > 0

;------------------------------丂Straight庛
[State -1, 1010]
Type = ChangeState
Value = 1010
TriggerAll = Command = "236A"
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = StateType != A
Trigger1   = Ctrl
Trigger2   = (StateNo = 200) && MoveContact
Trigger3   = (StateNo = 210) && MoveContact
Trigger4   = (StateNo = 220) && MoveContact
Trigger5   = (StateNo = 230) && MoveContact
Trigger6   = (StateNo = 400) && MoveContact
Trigger7   = (StateNo = 420) && MoveContact
Trigger8   = StateNo = 1020
Trigger8   = AnimElemTime(3) > 0
Trigger9   = StateNo = 1030
Trigger9   = AnimElemTime(3) > 0

;------------------------------丂Straight
[State -1, 1015]
Type = ChangeState
Value = 1015
TriggerAll = Command = "236B"
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = StateType != A
Trigger1   = Ctrl

;------------------------------One Pair 1
[State -1, 1000]
Type = ChangeState
Value = 1000
TriggerAll = Command = "214A"
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = StateType != A
TriggerAll = NumHelper(1005) < 1
Trigger1   = Ctrl
Trigger2   = (StateNo = 200) && MoveContact
Trigger3   = (StateNo = 210) && MoveContact
Trigger4   = (StateNo = 220) && MoveContact
Trigger5   = (StateNo = 400) && MoveContact
Trigger6   = (StateNo = 420) && MoveContact

;------------------------------One Pair 2
[State -1, 1001]
Type = ChangeState
Value = 1001
TriggerAll = Command = "214B"
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = StateType != A
TriggerAll = NumHelper(1006) < 1
Trigger1   = Ctrl
Trigger2   = (StateNo = 200) && MoveContact
Trigger3   = (StateNo = 210) && MoveContact
Trigger4   = (StateNo = 220) && MoveContact
Trigger5   = (StateNo = 400) && MoveContact
Trigger6   = (StateNo = 420) && MoveContact

;------------------------------丂Three of a Kind
[State -1, 1060]
Type = ChangeState
Value = 1060
TriggerAll = Command  = "214C"
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = StateType != A
TriggerAll = NumHelper(6260) = 0
Trigger1   = Ctrl
Trigger2   = (StateNo = [100,109]) && (StateNo%5 = 2) && (Time > 0)
Trigger3   = (StateNo = [200,239]) && MoveContact
Trigger4   = (StateNo = 400) && MoveContact
Trigger5   = (StateNo = [300,309]) && (StateNo%5=1) && (Time>0)
Trigger6   = (StateNo = [300,309]) && (StateNo%5=2)
Trigger7   = (StateNo = [320,349]) && (AnimElem =6, >0)
Trigger8   = (StateNo = 500) && (AnimElem =5, >0)
Trigger9   = (StateNo = 540) && (AnimElem =4, >0)

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	僾儗僀儎乕憖嶌梡乮慡儌乕僪嫟捠乯
;--------------------------------------------------

;------------------------------丂孅幩寕
[State -1, 500]
Type = ChangeState
Value = 500
TriggerAll = Command = "c"
TriggerAll = Command = "holddown"
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = StateType != A
TriggerAll = NumHelper(6260) = 0
Trigger1   = Ctrl
Trigger2   = (StateNo = [200,239]) && MoveContact
Trigger3   = (StateNo = [400,409]) && MoveContact

;------------------------------丂棫偪幩寕
[State -1, 300_305]
Type = ChangeState
Value = IfElse((Command="holdfwd"),305,300)
TriggerAll = Command = "c"
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = StateType != A
TriggerAll = NumHelper(6260) = 0
Trigger1   = Ctrl
Trigger2   = (StateNo = [200,239]) && MoveContact
Trigger3   = (StateNo = [400,409]) && MoveContact

;------------------------------丂嬻拞幩寕
[State -1, 700_705]
Type = ChangeState
Value = IfElse((Command="holddown"),705,700)
TriggerAll = Command = "c"
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = StateType = A
TriggerAll = NumHelper(6260) = 0
Trigger1   = Ctrl
Trigger2   = (StateNo = 101) && (Time > 3)
Trigger3   = (StateNo = [110,119]) && (StateNo%5 = 1) && (Time > 9)
Trigger4   = (StateNo = [600,629]) && MoveContact

;------------------------------丂孅庛
[State -1, 400]
Type = ChangeState
Value = 400
TriggerAll = Command = "a"
TriggerAll = Command = "holddown"
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = StateType != A
Trigger1   = Ctrl
Trigger2   = (StateNo = 400) && MoveContact

;------------------------------丂孅嫮
[State -1, 420]
Type = ChangeState
Value = 420
TriggerAll = Command = "b"
TriggerAll = Command = "holddown"
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = StateType != A
Trigger1   = Ctrl
Trigger2   = (StateNo = 400) && MoveContact

;------------------------------丂儗僶乕庛
[State -1, 210]
Type = ChangeState
Value = 210
TriggerAll = Command = "a"
TriggerAll = Command = "holdfwd"
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = StateType != A
Trigger1   = Ctrl
Trigger2   = (StateNo = 200) && MoveContact
Trigger3   = (StateNo = 400) && MoveContact
Trigger4   = StateNo = 101

;------------------------------丂儗僶乕嫮
[State -1, 230]
Type = ChangeState
Value = 230
TriggerAll = Command = "b"
TriggerAll = Command = "holdfwd"
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = StateType != A
Trigger1   = Ctrl
Trigger2   = (StateNo = 200) && MoveContact
Trigger3   = (StateNo = 210) && MoveContact
Trigger4   = (StateNo = 220) && MoveContact
Trigger5   = (StateNo = 400) && MoveContact
Trigger6   = (StateNo = 420) && MoveContact
Trigger7   = StateNo = 101

;------------------------------丂棫偪庛
[State -1, 200]
Type = ChangeState
Value = 200
TriggerAll = Command = "a"
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = StateType != A
Trigger1   = Ctrl
Trigger2   = (StateNo = 200) && MoveContact

;------------------------------丂棫偪嫮
[State -1, 220]
Type = ChangeState
Value = 220
TriggerAll = Command = "b"
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = StateType != A
Trigger1   = Ctrl
Trigger2   = (StateNo = 200) && MoveContact

;------------------------------丂嬻拞庛
[State -1, 600]
Type = ChangeState
Value = 600
TriggerAll = Command = "a"
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = StateType = A
Trigger1   = Ctrl
Trigger2   = (StateNo = 600) && MoveContact

;------------------------------丂嬻拞嫮
[State -1, 620]
Type = ChangeState
Value = 620
TriggerAll = Command = "b"
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = StateType = A
Trigger1   = Ctrl
Trigger2   = (StateNo = 600) && MoveContact

;------------------------------丂僟僢僔儏
[State -1, 100]
Type = ChangeState
Value = 100
TriggerAll = (Command = "66") || ((Command = "holdfwd") && (Command = "z"))
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = StateType != A
Trigger1   = Ctrl

;------------------------------丂僶僢僋僟僢僔儏
[State -1, 105]
Type = ChangeState
Value = 105
TriggerAll = (Command = "44") || ((Command = "holdback") && (Command = "z"))
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = StateType != A
Trigger1   = Ctrl
Trigger2   = (StateNo = 200) && MoveContact
Trigger3   = (StateNo = 210) && MoveContact
Trigger4   = (StateNo = 220) && MoveContact
Trigger5   = (StateNo = 400) && MoveContact
Trigger6   = (StateNo = 420) && MoveContact
Trigger7   = StateNo = 101

;------------------------------丂嬻拞僟僢僔儏
[State -1, 110]
Type = ChangeState
Value = 110
TriggerAll = (Command = "66") || ((Command = "holdfwd") && (Command = "z"))
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = Var(10) > 0;	嬻拞僟僢僔儏壜擻
TriggerAll = StateType = A
Trigger1   = Ctrl
Trigger2   = (StateNo = [110,119]) && (StateNo%5 = 1) && (Time > 9)
Trigger3   = (StateNo = 521) && (AnimElem = 5, >0)
Trigger4   = (StateNo = [700,749]) && (StateNo%5 > 0)

;------------------------------丂嬻拞僶僢僋僟僢僔儏
[State -1, 115]
Type = ChangeState
Value = 115
TriggerAll = (Command = "44") || ((Command = "holdback") && (Command = "z"))
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = Var(10) > 0;	嬻拞僟僢僔儏壜擻
TriggerAll = StateType = A
Trigger1   = Ctrl
Trigger2   = (StateNo = [110,119]) && (StateNo%5 = 1)  && (Time > 9)
Trigger3   = (StateNo = 521) && (AnimElem = 5, >0)
Trigger4   = (StateNo = [700,749]) && (StateNo%5 > 0)

;------------------------------丂崅懍僕儍儞僾
[State -1, 103]
Type = ChangeState
Value = 103
TriggerAll = Command = "holdup"
TriggerAll = Command != "holddown"
TriggerAll = Var(49) = 0;	AI晄壜
TriggerAll = Var(11) > 0;	崅懍僕儍儞僾壜擻
TriggerAll = StateType != A
Trigger1   = Ctrl
Trigger2   = (StateNo = [300,319]) && (StateNo%5 > 0)
Trigger3   = (StateNo = [320,349]) && (StateNo%5 = 0) && (AnimElem = 6, >0)
Trigger4   = (StateNo = 500) && (AnimElem = 5, >0)
Trigger5   = (StateNo = 540) && (AnimElem = 4, >0)
Trigger6   = (StateNo = 1060) && (Time > 35)
Trigger7   = (StateNo = 1160) && (Time > 42)
