;-| AI |--------------------------------------------------------
[Command]
name = "ai"
command = F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai1"
command = F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai2"
command = F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai3"
command = F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai4"
command = F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai5"
command = x,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai6"
command = x,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai7"
command = x,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai8"
command = y,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai9"
command = y,y,y,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai10"
command = y,y,F,F,F,y,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai11"
command = F,F,x,z,a,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai12"
command = a,F,F,F,x,F,F,F,b,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai13"
command = b,b,b,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai14"
command = F,F,b,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai15"
command = F,b,F,F,b,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai16"
command = F,F,c,c,c,F,F,F,F,F,F,F,c,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai17"
command = c,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,c,c,F,a+b
time = 1

[Command]
name = "ai18"
command = F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,c,F,F,F,F,F,F,F,c,c,a+b
time = 1

[Command]
name = "ai19"
command = c,F,F,z,F,F,a,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai20"
command = c,F,F,F,F,b,F,F,F,F,a,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai21"
command = a,F,F,F,F,F,F,z,F,F,F,F,F,b,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai22"
command = b,a,z,x,c,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai23"
command = x,c,x,x,x,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai24"
command = x,x,x,z,z,z,z,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai25"
command = z,z,z,z,z,z,z,z,a,a,a,a,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai26"
command = a,a,a,a,a,a,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai27"
command = a,a,a,F,F,F,F,F,a,a,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai28"
command = a+b,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

[Command]
name = "ai29"
command = z+b,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,a+b
time = 1

;-| Super Motions |--------------------------------------------------------
[Command]
name = "TheEnd"
command = B,D,F,B,D,F,x+y
time = 60

[Command]
name = "Master"
command = B,D,F,B,D,F,a+b
time = 60


[Command]
name = "DFDFa"
command = D,F,D,F,a
time = 30

[Command]
name = "DFDFb"
command = D,F,D,F,b
time = 30

[Command]
name = "DFDFx"
command = D,F,D,F,x
time = 30

[Command]
name = "DFDFy"
command = D,F,D,F,y
time = 30

;-| Special Motions |------------------------------------------------------
[Command]
name = "BDFx"
command = B,D,F,x
time = 30

[Command]
name = "DBa"
command = D,B,a
time = 12

[Command]
name = "DBb"
command = D,B,b
time = 12

[Command]
name = "DBx"
command = D,B,x
time = 12

[Command]
name = "DBy"
command = D,B,y
time = 12

[Command]
name = "DFa"
command = D,F,a
time = 12

[Command]
name = "DFb"
command = D,F,b
time = 12

[Command]
name = "DFx"
command = D,F,x
time = 12

[Command]
name = "DFy"
command = D,F,y
time = 12

;-| Double Tap |-----------------------------------------------------------
[Command]
name = "FF"     ;Required (do not remove)
command = F, F
time = 10

[Command]
name = "BB"     ;Required (do not remove)
command = B, B
time = 10

;-| 2/3 Button Combination |-----------------------------------------------
[Command]
name = "recovery";Required (do not remove)
command = x+y
time = 1

;-| Dir + Button |---------------------------------------------------------
[Command]
name = "fwd_a"
command = /F,a
time = 1

[Command]
name = "fwd_b"
command = /F,b
time = 1

[Command]
name = "back_a"
command = /B,a
time = 1

[Command]
name = "back_b"
command = /B,b
time = 1

[Command]
name = "down_a"
command = /$D,a
time = 1

[Command]
name = "down_b"
command = /$D,b
time = 1

;-| Single Button |---------------------------------------------------------
[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

;-| Hold Dir |--------------------------------------------------------------
[Command]
name = "holdfwd";Required (do not remove)
command = /$F
time = 1

[Command]
name = "holdback";Required (do not remove)
command = /$B
time = 1

[Command]
name = "holdup" ;Required (do not remove)
command = /$U
time = 1

[Command]
name = "holddown";Required (do not remove)
command = /$D
time = 1

;======================================================================
[Statedef -1]

;AI
[State -1]
type = VarSet
trigger1 = Command = "ai"
trigger2 = Command = "ai1"
trigger3 = Command = "ai2"
trigger4 = Command = "ai3"
trigger5 = Command = "ai4"
trigger6 = Command = "ai5"
trigger7 = Command = "ai6"
trigger8 = Command = "ai7"
trigger9 = Command = "ai8"
trigger10 = Command = "ai9"
trigger11 = Command = "ai10"
trigger12 = Command = "ai11"
trigger13 = Command = "ai12"
trigger14 = Command = "ai13"
trigger15 = Command = "ai14"
trigger16 = Command = "ai15"
trigger17 = Command = "ai16"
trigger18 = Command = "ai17"
trigger19 = Command = "ai18"
trigger20 = Command = "ai19"
trigger21 = Command = "ai20"
trigger22 = Command = "ai21"
trigger23 = Command = "ai22"
trigger24 = Command = "ai23"
trigger25 = Command = "ai24"
trigger26 = Command = "ai25"
trigger27 = Command = "ai26"
trigger28 = Command = "ai27"
trigger29 = Command = "ai28"
trigger30 = Command = "ai29"
ignorehitpause = 1
var(59) = 1

[State -1]
type = VarSet
trigger1 = 1
var(58) = 1000+Var(57)*100

;===========================================================================
;TheEnd
[State -1]
type = ChangeState
triggerall = RoundState = 2
triggerall = Power >= 3000
triggerall = NumHelper = 0
triggerall = StateNo = 0
triggerall = Life <= 60000
trigger1 = !Var(59)
trigger1 = Command = "TheEnd"
trigger2 = Var(59)&&(Random<=Var(58))
trigger2 = Random = [0,500]
value = 4100
ctrl = 0

;Master
[State -1]
type = ChangeState
triggerall = RoundState = 2
triggerall = Power >= 3000
triggerall = NumHelper = 0
triggerall = StateNo = 0
triggerall = Life <= 100000
trigger1 = !Var(59)
trigger1 = Command = "Master"
trigger2 = Var(59)&&(Random<=Var(58))
value = 4000
ctrl = 0

;---------------------------other------------------------------------------------
;---------------------------------------------------------------------------
;Level Up
[State -1]
type = ChangeState
triggerall = RoundState = 2
triggerall = StateNo = 0
triggerall = Power < 3000
trigger1 = !Var(59)
trigger1 = Command = "BDFx"
trigger2 = Var(59)&&(Random<=Var(58))
trigger2 = Random = [0,10]
value = 2000
ctrl = 0

;---------------------------Strong Attack Magic------------------------------------------------
;Fire
[State -1]
type = ChangeState
triggerall = RoundState = 2
triggerall = Power >= 1500
triggerall = NumHelper(3301) = 0
triggerall = NumHelper(1200) = 0
triggerall = StateNo = 0
trigger1 = !Var(59)
trigger1 = Command = "DFDFa"
trigger2 = Var(59)&&(Random<=Var(58))
trigger2 = (P2BodyDist X >= 200)||(P2Dist Y >100)
trigger2 = Random = [0,250]
trigger2 = Life > 80000
value = 3300
ctrl = 0

;Ice
[State -1]
type = ChangeState
triggerall = RoundState = 2
triggerall = Power >= 1500
triggerall = NumHelper(3401) = 0
triggerall = NumHelper(1200) = 0
triggerall = StateNo = 0
trigger1 = !Var(59)
trigger1 = Command = "DFDFb"
trigger2 = Var(59)&&(Random<=Var(58))
trigger2 = (P2BodyDist X >= 200)||(P2Dist Y >100)
trigger2 = Random = [0,333]
trigger2 = Life > 80000
value = 3400
ctrl = 0

;Space
[State -1]
type = ChangeState
triggerall = RoundState = 2
triggerall = Power >= 1500
triggerall = NumHelper(3201) = 0
triggerall = NumHelper(1200) = 0
triggerall = StateNo = 0
trigger1 = !Var(59)
trigger1 = Command = "DFDFx"
trigger2 = Var(59)&&(Random<=Var(58))
trigger2 = (P2BodyDist X >= 200)||(P2Dist Y >100)
trigger2 = Random = [0,500]
trigger2 = Life > 80000
value = 3200
ctrl = 0

;Thumder
[State -1]
type = ChangeState
triggerall = RoundState = 2
triggerall = Power >= 1500
triggerall = NumHelper(3101) = 0
triggerall = NumHelper(1200) = 0
triggerall = StateNo = 0
trigger1 = !Var(59)
trigger1 = Command = "DFDFy"
trigger2 = Var(59)&&(Random<=Var(58))
trigger2 = (P2BodyDist X >= 200)||(P2Dist Y >100)
trigger2 = Life > 80000
value = 3100
ctrl = 0

;---------------------------High Level Magic------------------------------------------------
;---------------------------------------------------------------------------
;Sudden Dead Level Up
[State -1]
type = Helper
triggerall = RoundState = 2
triggerall = !Var(59)
trigger1 = Power >= 3000
trigger1 = StateNo = 0
trigger1 = Command = "DBb"
trigger1 = NumHelper(1300) = 0
name = "Elf"
stateno = 1300
keyctrl = 0
ownpal = 1
id = 1300

;---------------------------------------------------------------------------
;Slow Motion
[State -1]
type = Helper
triggerall = RoundState = 2
triggerall = StateNo = 0
triggerall = NumHelper(1200) = 0
triggerall = Power >= 2000
trigger1 = !Var(59)
trigger1 = Command = "DBa"
trigger2 = Var(59)&&(Random<=Var(58))
trigger2 = Life > 150000
trigger2 = Random = [0,10]
name = "Clock"
stateno = 1200
facing = -Facing
keyctrl = 0
ownpal = 1
id = 1200

[State -1]
type = Pause
trigger1 = NumHelper(1200) > 0
trigger1 = RoundState = 2
trigger1 = TimeMod = 2,0
time = 2
movetime = 2

;---------------------------------------------------------------------------
;EnvQuake
[State -1]
type = ChangeState
triggerall = RoundState = 2
triggerall = StateNo = 0
triggerall = Power >= 1000
trigger1 = !Var(59)
trigger1 = Command = "DBy"
trigger2 = Var(59)&&(Random<=Var(58))
trigger2 = P2BodyDist X >= 200
trigger2 = Life > 100000
trigger2 = Random = [0,50]
value = 1100
ctrl = 0

;---------------------------------------------------------------------------
;Rock
[State -1]
type = ChangeState
triggerall = RoundState = 2
triggerall = StateNo = 0
triggerall = NumHelper(901) = 0
triggerall = Power >= 1000
trigger1 = !Var(59)
trigger1 = Command = "DBx"
trigger2 = Var(59)&&(Random<=Var(58))
trigger2 = P2Dist X = [-50,50]
trigger2 = Life > 150000
trigger2 = Random = [0,200]
value = 900
ctrl = 0

;---------------------------Status Attack------------------------------------------------
;---------------------------------------------------------------------------
;Care
[State -1]
type = ChangeState
triggerall = RoundState = 2
triggerall = StateNo = 0
triggerall = Power >= 1000
triggerall = Life < 300000
trigger1 = !Var(59)
trigger1 = Command = "DFx"
trigger2 = Var(59)&&(Random<=Var(58))
trigger2 = Random = 1
trigger2 = Life > 100000
value = 1000
ctrl = 0

;---------------------------------------------------------------------------
;Shield
[State -1]
type = ChangeState
triggerall = RoundState = 2
triggerall = StateNo = 0
triggerall = NumHelper(801) = 0
triggerall = Power >= 200
trigger1 = !Var(59)
trigger1 = Command = "DFy"
trigger2 = Var(59)&&(Random<=Var(58))
trigger2 = Life > 150000
trigger2 = Random = 1
value = 800
ctrl = 0

;---------------------------------------------------------------------------
;L5 Sudden Dead
[State -1]
type = ChangeState
triggerall = RoundState = 2
triggerall = StateNo = 0
triggerall = NumHelper(701) = 0
trigger1 = !Var(59)
trigger1 = Command = "DFb"
;trigger2 = Var(59)&&(Random<=Var(58))
;trigger2 = (Random = [0,100])||(NumHelper(1300)=1)
value = 700
ctrl = 0

;---------------------------------------------------------------------------
;Bio
[State -1]
type = ChangeState
triggerall = RoundState = 2
triggerall = StateNo = 0
triggerall = NumHelper(601) = 0
trigger1 = !Var(59)
trigger1 = Command = "DFa"
trigger2 = Var(59)&&(Random<=Var(58))
trigger2 = P2BodyDist X = [0,150]
trigger2 = P2Dist Y = [-150,50]
trigger2 = Random = [0,100]
value = 600
ctrl = 0

;---------------------------Normal Attack------------------------------------------------
;---------------------------------------------------------------------------
;Fire Attack
[State -1]
type = ChangeState
triggerall = RoundState = 2
triggerall = StateNo = 0
triggerall = Command = "a"
trigger1 = !Var(59)
trigger1 = Command != "DBa"
trigger2 = Var(59)&&(Random<=Var(58))
trigger2 = P2Dist X = [0,120]
trigger2 = P2Dist Y = [-50,80]
value = 300
ctrl = 0

;---------------------------------------------------------------------------
;Ice Attack
[State -1]
type = ChangeState
triggerall = RoundState = 2
triggerall = StateNo = 0
triggerall = NumHelper(401) = 0
trigger1 = !Var(59)
trigger1 = Command = "b"
trigger2 =Var(59)&&(Random<=Var(58))
trigger2 = P2Dist X = [80,100]
trigger2 = P2Dist Y = [-150,-50]
trigger2 = Random = [0,333]
value = 400
ctrl = 0 

;---------------------------------------------------------------------------
;Lightening Attack
[State -1]
type = ChangeState
triggerall = RoundState = 2
triggerall = StateNo = 0
triggerall = NumHelper(501) = 0
trigger1 = !Var(59)
trigger1 = Command = "y"
trigger2 =Var(59)&&(Random<=Var(58))
trigger2 = P2Dist X = [140,160]
trigger2 = Random = [0,333]
value = 500
ctrl = 0

;---------------------------------------------------------------------------
;WingAttack
[State -1]
type = ChangeState
triggerall = RoundState = 2
triggerall = StateNo = 0
trigger1 = !Var(59)
trigger1 = Command = "x"
trigger2 =Var(59)&&(Random<=Var(58))
trigger2 = P2Dist X = [60,160]
trigger2 = P2Dist Y = [-50,150]
value = 200
ctrl = 0

;---------------------------------------------------------------------------
;L5 Sudden Dead--AI
[State -1]
type = ChangeState
triggerall = RoundState = 2
triggerall = StateNo = 0
triggerall = NumHelper(701) = 0
;trigger1 = !Var(59)
;trigger1 = Command = "DFb"
trigger1 = Var(59)&&(Random<=Var(58))
trigger1 = (Random = [0,100])||(NumHelper(1300)=1)
value = 700
ctrl = 0

;---------------------------------------------------------------------------
;Fly Front
[State -1]
type = PosAdd
triggerall = RoundState = 2
;triggerall = !Var(59)
trigger1 = StateNo = 0
trigger1 = Command = "holdfwd"
x = 3

;Fly Back
[State -1]
type = PosAdd
triggerall = RoundState = 2
;triggerall = !Var(59)
triggerall = StateNo = 0
trigger1 = Command = "holdback"
trigger2 = Var(59)&&(Random<=Var(58))
trigger2 = Power >= 2000
x = -3

;Fly Up
[State -1]
type = PosAdd
triggerall = RoundState = 2
;triggerall = !Var(59)
triggerall = StateNo = 0
trigger1 = Command = "holdup"
trigger2 = Var(59)&&(Random<=Var(58))
trigger2 = Power >= 2000
y = -3

;Fly Down
[State -1]
type = PosAdd
triggerall = RoundState = 2
;triggerall = !Var(59)
triggerall = StateNo = 0
trigger1 = Command = "holddown"
trigger2 = Var(59)&&(Random<=Var(58))
trigger2 = P2Dist X = [50,80]
trigger2 = Power < 2000
y = 3
