;=======================Lucario by Dshiznetz===============================================================;
;=========================AI By RajaaBoy==============================================================================,
;AI Activate

[Command]
name = "CPU1"
command = U, D, F
time = 1

[Command]
name = "CPU2"
command = U, B, F
time = 1

[Command]
name = "CPU3"
command = U, D, D
time = 1

[Command]
name = "CPU4"
command = F, B, U
time = 1

[Command]
name = "CPU5"
command = U, F, U, B
time = 1

[Command]
name = "CPU6"
command = U, D, B
time = 1

[Command]
name = "CPU7"
command = F, F, B
time = 1

[Command]
name = "CPU8"
command = U, D, U
time = 1

[Command]
name = "CPU9"
command = F, B, B
time = 1

[Command]
name = "CPU10"
command = F, F, B, B
time = 1

[Command]
name = "CPU11"
command = U, U, F
time = 1

[Command]
name = "CPU12"
command = U, B, B
time = 1

[Command]
name = "CPU13"
command = U, B, F, F
time = 1

[Command]
name = "CPU14"
command = U, F, B, U
time = 1

[Command]
name = "CPU15"
command = U, B, F, U
time = 1

[Command]
name = "CPU16"
command = U, B, B, B
time = 1

[Command]
name = "CPU17"
command = U, D, B, F
time = 1

[Command]
name = "CPU18"
command = U, D, B, D
time = 1

[Command]
name = "CPU19"
command = U, D, F, U
time = 1

[Command]
name = "CPU20"
command = U, D, U, B
time = 1

[Command]
name = "CPU21"
command = U, D, F, F
time = 1

[Command]
name = "CPU22"
command = F, F, F, F
time = 1

[Command]
name = "CPU23"
command = U, U, U, D
time = 1

[Command]
name = "CPU24"
command = B, B, B
time = 1

[Command]
name = "CPU25"
command = D, D, D, D
time = 1

[Command]
name = "CPU26"
command = D, D, D
time = 1

[Command]
name = "CPU27"
command = F, F, F
time = 1

[Command]
name = "CPU28"
command = U, U, U
time = 1

[Command]
name = "CPU29"
command = U, U, B, B
time = 1

[Command]
name = "CPU30"
command = D, D, F, F
time = 1

[Command]
name = "CPU31"
command = U, D, F, U, D
time = 1

[Command]
name = "CPU32"
command = U, B, F, U, D
time = 1

[Command]
name = "CPU33"
command = U, D, D, U, D
time = 1

[Command]
name = "CPU34"
command = F, B, U, U, D
time = 1

[Command]
name = "CPU35"
command = U, F, U, B, U, D
time = 1

[Command]
name = "CPU36"
command = U, D, B, U, D
time = 1

[Command]
name = "CPU37"
command = F, F, B, U, D
time = 1

[Command]
name = "CPU38"
command = U, D, U, U, D
time = 1

[Command]
name = "CPU39"
command = F, B, B, U, D
time = 1

[Command]
name = "CPU40"
command = F, F, B, B, U, D
time = 1

[Command]
name = "CPU41"
command = U, U, F, U, D
time = 1

[Command]
name = "CPU42"
command = U, B, B, U, D
time = 1

[Command]
name = "CPU43"
command = U, B, F, F, U, D
time = 1

[Command]
name = "CPU44"
command = U, F, B, U, U, D
time = 1

[Command]
name = "CPU45"
command = U, B, F, U, U, D
time = 1

[Command]
name = "CPU46"
command = U, B, B, B, U, D
time = 1

[Command]
name = "CPU47"
command = U, D, B, F, U, D
time = 1

[Command]
name = "CPU48"
command = U, D, B, D, U, D
time = 1

[Command]
name = "CPU49"
command = U, D, F, U, U, D
time = 1

[Command]
name = "CPU50"
command = U, D, U, B, U, D
time = 1
;-| Super Motions |--------------------------------------------------------
[command]
name = "Throw"
command = c
time = 30

;[command]
;name = "Dkick"
;command = F,a
;time =5


[Command]
name = "MetalClaw1"
command=~F,D,DF,x
time=20

[Command]
name = "MetalClaw2"
command=~F,D,DF,y
time=20

[command]
name = "Dkick"
command = F,b
time =5

[command]
name = "Dkick"
command = F,a
time =5

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

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

[command]
name = "Aura1"
command = D,DF,F,x
time = 30

[command]
name = "Aura2"
command = D,DF,F,y
time = 30

[command]
name = "AuraAir"
command = D,DF,F,x
time = 30

[command]
name = "AuraAir2"
command = D,DF,F,y
time = 30

[command]
name = "AuraDown"
command=~B,DB,D,DF,F,x
time = 30

[command]
name = "AuraDown3"
command=~B,DB,D,DF,F,y
time = 30

[command]
name = "AuraDown2"
command=~B,DB,D,DF,F,y
time = 30

[command]
name = "AuraDownAir"
command = D,DF,F,a
time = 30
[command]
name = "AuraDownAir"
command = D,DF,F,b
time = 30

[command]
name = "AuraDownAir"
command = D,DF,F,c
time = 30

[command]
name = "Wall_push"
command = D,DB,B,x
time = 30

[command]
name = "Wall_push"
command = D,DB,B,y
time = 30

[command]
name = "Hit_2"
command = F , x
time = 7


[command]
name = "Hit_1"
command = F , y
time = 7

[Command]
name = "DU"
command = D, U
time = 10

[Command]
name = "Helper1"
command = z+c
time = 10

[Command]
name = "Helper2"
command =z+c
time = 10

[Command]
name = "Helper3"
command =z+c
time = 10

[Command]
name = "IronTail"
command = ~D,B,a
time = 18

[Command]
name = "IronTailair"
command = ~D,B,a
time = 18

[Command]
name = "IronTail2air"
command = ~D,B,a+b+c+x+y+z
time = 18

[Command]
name = "IronTail2"
command = ~D,B,b
time = 18

[Command]
name = "Dodge"
command = a+x
time = 10

[Command]
name = "QuickAttack1"
command = ~F, B, D, F, a
time = 30

[Command]
name = "QuickAttack1"
command = ~F, B, D, F, ~a
time = 30

[Command]
name = "QuickAttack2"
command = ~F, B, D, F, b
time = 30

[Command]
name = "QuickAttack2"
command = ~F, B, D, F, ~b
time = 30

[Command]
name = "QuickAttack3"
command = ~F, B, D, F, c
time = 30

[Command]
name = "QuickAttack3"
command = ~F, B, D, F, ~c
time = 30

[command]
name = "counter"
command = c
time = 20
;-| Special Motions |------------------------------------------------------



[command]
name = "Dark_pulse"
command = ~D,DF,F,D,DF,c
time = 30

[command]
name = "hyper_1a"
command =~D,DF,F,D,DF,x
time = 30

[command]
name = "hyper_1b"
command =~D,DF,F,D,DF,z
time = 30

[command]
name = "hyper_1b"
command =~D,DF,F,D,DF,y
time = 30

[command]
name = "hyper_2b"
command =D,DF,F,x+y
time = 30

[command]
name = "hyper_2"
command =D,DF,F,y+z
time = 30

[command]
name = "AuraHyperAir"
command =~D,DF,F,x+y
time = 30

[command]
name = "AuraHyperAir2"
command =~D,DF,F,y+z
time = 30

[command]
name = "AuraDownHyper"
command =~D,DB,B,x+y
time = 30

[command]
name = "AuraDownHyper"
command =~D,DB,B,y+z
time = 30


[command]
name = "AuraDownHyperAir"
command =~D,DF,F,D,DF,c
time = 30



;[command]
;name = "ExtremeSpeed"
;command =x,x,F,a,c
;time = 30


command.buffer.time = 1
;-| 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

;[Command]
;name = "recovery"
;command = y+z
;time = 1

;[Command]
;name = "recovery"
;command = x+z
;time = 1

;[Command]
;name = "recovery"
;command = a+b
;time = 1

;[Command]
;name = "recovery"
;command = b+c
;time = 1

;[Command]
;name = "recovery"
;command = a+c
;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 = "s"
command = s
time = 1

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

;[Command]
;name = "downfwd"
;command = $DF
;time = 1

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

;[Command]
;name = "downback"
;command = $DB
;time = 1

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

;[Command]
;name = "upback"
;command = $UB
;time = 1

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

;[Command]
;name = "upfwd"
;command = $UF
;time = 1

;-| Hold Button |--------------------------------------------------------------
;[Command]
;name = "hold_x"
;command = /x
;time = 1

;[Command]
;name = "hold_y"
;command = /y
;time = 1

;[Command]
;name = "hold_z"
;command = /z
;time = 1

[Command]
name = "hold_a"
command = /a
time = 1

;[Command]
;name = "hold_b"
;command = /b
;time = 1

[Command]
name = "hold_c"
command = /c
time = 1

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

;[Command]
;name = "holddownfwd"
;command = /$DF
;time = 1

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

;[Command]
;name = "holddownback"
;command = /$DB
;time = 1

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

;[Command]
;name = "holdupback"
;command = /$UB
;time = 1

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

;[Command]
;name = "holdupfwd"
;command = /$UF
;time = 1

;---------------------------------------------------------------------------
; Don't remove the following line. It's required by the CMD standard.
[Statedef -1]

;AI
[State -1, AI]
type = VarSet
triggerall = var(59) != 1
triggerall = RoundState != 3
trigger1  = command = "CPU1"
trigger2  = command = "CPU2"
trigger3  = command = "CPU3"
trigger4  = command = "CPU4"
trigger5  = command = "CPU5"
trigger6  = command = "CPU6"
trigger7  = command = "CPU7"
trigger8  = command = "CPU8"
trigger9  = command = "CPU9"
trigger10  = command = "CPU10"
trigger11  = command = "CPU11"
trigger12  = command = "CPU12"
trigger13  = command = "CPU13"
trigger14  = command = "CPU14"
trigger15  = command = "CPU15"
trigger16  = command = "CPU16"
trigger17  = command = "CPU17"
trigger18  = command = "CPU18"
trigger19  = command = "CPU19"
trigger20  = command = "CPU20"
trigger21  = command = "CPU21"
trigger22  = command = "CPU22"
trigger23  = command = "CPU23"
trigger24  = command = "CPU24"
trigger25  = command = "CPU25"
trigger26  = command = "CPU26"
trigger27  = command = "CPU27"
trigger28  = command = "CPU28"
trigger29  = command = "CPU29"
trigger30  = command = "CPU30"
trigger31  = command = "CPU31"
trigger32  = command = "CPU32"
trigger33  = command = "CPU33"
trigger34  = command = "CPU34"
trigger35  = command = "CPU35"
trigger36  = command = "CPU36"
trigger37  = command = "CPU37"
trigger38  = command = "CPU38"
trigger39  = command = "CPU39"
trigger40  = command = "CPU40"
trigger41  = command = "CPU41"
trigger42  = command = "CPU42"
trigger43  = command = "CPU43"
trigger44  = command = "CPU44"
trigger45  = command = "CPU45"
trigger46  = command = "CPU46"
trigger47  = command = "CPU47"
trigger48  = command = "CPU48"
trigger49  = command = "CPU49"
trigger50  = command = "CPU50"
var(59)=1
;---------------------------------------------------------------------------
[State -1, Combo Chooser1]
type = VarRandom
triggerall = stateno=430
trigger1 = movecontact
v = 25
range = 0,3
ignorehitpause = 1

[State -1, Combo Chooser2]
type = VarRandom
triggerall = stateno=240
trigger1 = movecontact
v = 26
range = 0,2
ignorehitpause = 1

[State -1, Combo Chooser3]
type = VarRandom
triggerall = stateno=205
trigger1 = movecontact
v = 27
range = 0,2
ignorehitpause = 1

[State -1, Combo Chooser4]
type = VarRandom
triggerall = stateno=215
trigger1 = movecontact
v = 28
range = 0,2
ignorehitpause = 1

[State -1, Speacial Combo Chooser]
type = VarRandom
triggerall = stateno=430
trigger1 = movecontact
v = 29
range = 0,1
ignorehitpause = 1
;---------------------------------------------------------------------------
;AI Commands
;---------------------------------------------------------------------------
[State -1,AI Walk]
type = ChangeState
value = 21
triggerall = Var(59) = 1
triggerall = roundstate=2
triggerall = StateType != A
triggerall = Ctrl
triggerall = !InGuardDist
triggerall = stateno != [10,12]
triggerall = prevstateno != [10,12]
triggerall = stateno != 20
triggerall = prevstateno != 20
triggerall = stateno != 21
triggerall = prevstateno != 21
triggerall = stateno != [120,159]
triggerall = prevstateno != [120,159]
trigger1 = numtarget
trigger1 = random%3=0
;---------------------------------------------------------------------------
[State -1, AI Jump]
type = ChangeState
value = 40
triggerall = var(59)=1
triggerall = roundstate=2
triggerall = StateType != A
triggerall = stateno!=40
trigger1 = Ctrl||(stateno=21&&time>20)||(stateno=100&&animelemtime(2)>1)||stateno=101
trigger1 = BackEdgebodyDist > 5
trigger1 = P2bodydist X = [0,80]
trigger1 = P2StateType = C
trigger1 = enemynear,movetype=A
trigger1 = numtarget
trigger1 = Random = [100,200]
trigger2 = Ctrl||(stateno=21&&time>20)||(stateno=100&&animelemtime(2)>1)||stateno=101
trigger2 = P2bodydist X >= 200
trigger2 = PrevStateNo=6005||prevstateno=6015
trigger2 = numtarget
trigger2 = Random = [200,350]
trigger3 = Ctrl||(stateno=21&&time>20)||(stateno=100&&animelemtime(2)>1)||stateno=101
trigger3 = P2bodydist X >= 150
trigger3 = Random <100
trigger3 = enemynear,numproj
trigger4 = stateno=252
trigger4 = movehit
trigger4 = random=[350,650]
;---------------------------------------------------------------------------
[state -1, Ai GrabDodge]
type = ChangeState
value = 40
triggerall = var(59) = 1
triggerall = roundstate=2
triggerall = stateno!=40
triggerall = roundstate = 2
triggerall = InGuardDist
triggerall = ctrl || stateno = 21
triggerall = statetype != A
trigger1 = enemynear,HitDefAttr = SC, NT,ST,HT
trigger1 = random<=200
;---------------------------------------------------------------------------
[state -1,AI Guard]
type = ChangeState
value = 130
triggerall = var(59) = 1
triggerall = roundstate=2
triggerall = InGuardDist
triggerall = ctrl
triggerall = statetype != A
trigger1 = enemynear,numproj
trigger2 = enemynear,numhelper
trigger3 = enemynear,HitDefAttr = SCA, NA,SA,HA
trigger3 = random <=ifelse(backedgedist<=10,900,700)
;---------------------------------------------------------------------------
[state -1,AI Air Guard]
type = ChangeState
value = 132
triggerall = var(59)=1
triggerall = roundstate=2
triggerall = InGuardDist
triggerall = ctrl||stateno=6070
triggerall = statetype = A
trigger1 = enemynear,numproj
trigger2 = enemynear,numhelper
trigger3 = enemynear,HitDefAttr = SCA, NA,SA,HA
trigger3 = random <=ifelse(backedgedist<=10,900,700)
;---------------------------------------------------------------------------
;[State -1,AI Run Fwd]
type = ChangeState
value = 100
triggerall = var(59)=1
triggerall = roundstate=2
triggerall = statetype!=A
triggerall = P2MoveType != A
triggerall = p2bodydist x >75
triggerall = stateno != [10,12]
triggerall = prevstateno != [10,12]
triggerall = stateno != 100
triggerall = prevstateno != 101
triggerall = stateno != 105
triggerall = prevstateno != 106
triggerall = stateno != [120,159]
triggerall = prevstateno != [120,159]
triggerall = Ctrl || (stateno = 21 && anim = 20)
trigger1 = P2bodydist X = [90,160]
trigger1 = P2MoveType = I
trigger1 = numtarget
trigger1 = Random = [500,560]
trigger2 = P2bodydist X > 160
trigger2 = numtarget
trigger2 = Random = [700,800]
trigger3 = P2bodydist X > 120
trigger3 = P2StateType = L
trigger3 = numtarget
trigger3 = Random = [150,250]
trigger4 = statetype=A
trigger4 = P2bodydist X > 160
trigger4 = p2statetype=S||p2statetype=C||p2statetype=A
trigger5 = projhit=1
trigger5 = p2bodydist y=[0,-35]
trigger5 = random=[300,499]
trigger6 = numproj
trigger6 = P2bodydist X > 100
;---------------------------------------------------------------------------
; Stand Light Punch
[State -1, AI Stand Light Punch]
type = ChangeState
value = 200
triggerall = Var(59)=1
triggerall = roundstate=2
triggerall = statetype != A
triggerall = enemynear,statetype!=L
triggerall = enemynear,stateno!=5120
triggerall = enemynear,stateno!=5201
triggerall = p2bodydist x=[0,35]
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 105||stateno=52||stateno=101
trigger1 = backedgedist <=0&&enemynear,movetype!=A
trigger1 = enemynear,statetype=S
trigger1 = enemynear,HitDefAttr!=SCA, HA,HP,HT
trigger1 = random<100
trigger2 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 105||stateno=52||stateno=101
trigger2 = enemynear,movetype!=A
trigger2 = p2bodydist y =[0,35]
trigger2 = random=[300,400]
trigger3 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 105||stateno=52||stateno=101
trigger3 = enemynear,vel x >=1
trigger3 = enemynear,movetype!=A
;---------------------------------------------------------------------------
;Hit_2
[State -1,AI Hit_2]
type = ChangeState
value = 205
triggerall = Var(59)=1
triggerall = roundstate=2
triggerall = statetype != A
triggerall = enemynear,statetype!=L
triggerall = enemynear,stateno!=5120
triggerall = enemynear,stateno!=5201
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 105||stateno=52||stateno=101
trigger1 = p2bodydist x=[0,100]
trigger1 = enemynear,movetype!=A
trigger1 = enemynear,statetype!=A
trigger1 = enemynear,vel x <=-.5
trigger1 = !enemy,numproj
trigger1 = random<=175
trigger2 = var(26)=0
trigger2 = stateno=240
trigger2 = movehit
trigger2 = time>4
trigger3 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 105||stateno=52||stateno=101
trigger3 = vel x >1.3
trigger3 = enemynear,movetype!=A
trigger3 = enemynear,statetype=S
trigger3 = random =[200,400]
;----------------------------------------------------------------------
;Hit_1
[State -1, AI Hit_1]
type = ChangeState
value = 215
triggerall = Var(59)=1
triggerall = roundstate=2
triggerall = p2bodydist x =[0,50]
triggerall = statetype!= A
triggerall = enemynear,statetype!=L
triggerall = enemynear,stateno!=5120
triggerall = enemynear,stateno!=5201
triggerall = !enemynear,numproj
trigger1 = var(15)=1
trigger1 = stateno=230
trigger1 = movehit&&time>4
trigger2 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101
trigger2 = numtarget
trigger2 = P2bodydist X = [40,80]
trigger2 = P2bodydist Y = [0,-20]
trigger2 = enemynear,MoveType = I
trigger2 = Random = [60,170]
trigger3 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101
trigger3 = numtarget
trigger3 = P2bodydist X > 120
trigger3 = P2bodydist Y = [0,-20]
trigger3 = P2MoveType != A
trigger3 = Random = [900,910]
trigger4 = prevstateno != 215
trigger4 = stateno = 21
trigger4 = movehit
trigger4 = time>4
trigger4 = prevstateno!=215
trigger4 = p2bodydist x=[0,30]
trigger4 = enemynear,statetype!=A
trigger4 = Random = [100,900]
ignorehitpause = 0
;---------------------------------------------------------------------------
; Stand Light Kick
[State -1, AI Stand Light Kick]
type = ChangeState
value = 230
triggerall = Var(59)=1
triggerall = roundstate=2
triggerall = p2bodydist x =[0,50]
triggerall = statetype!= A
triggerall = enemynear,statetype!=L
triggerall = enemynear,stateno!=5120
triggerall = enemynear,stateno!=5201
trigger1 = stateno=203
trigger1 = movehit
trigger1 = time>4
trigger2 = var(25)=0
trigger2 = numtarget
trigger2 = stateno=430
trigger2 = movehit
trigger2 = time>4
;---------------------------------------------------------------------------
; Standing Medium Kick
[State -1, AI Standing Medium Kick]
type = ChangeState
value =  240
triggerall = Var(59)=1
triggerall = roundstate=2
triggerall = p2bodydist x =[0,60]
triggerall = statetype!= A
triggerall = enemynear,statetype!=L
triggerall = enemynear,stateno!=5120
triggerall = enemynear,stateno!=5201
trigger1 = stateno = 230
trigger1 = movehit&&time > 4
trigger1 = random<=175
trigger2 = var(27)=0
trigger2 = stateno=205
trigger2 = movehit&&time>3
;---------------------------------------------------------------------------
;Dkick
[State -1, AI Dkick]
type = ChangeState
value = 350
triggerall = Var(59)=1
triggerall = roundstate=2
triggerall = p2bodydist x =[0,60]
triggerall = statetype!= A
triggerall = enemynear,statetype!=L
triggerall = enemynear,stateno!=5120
triggerall = enemynear,stateno!=5201
trigger1 = var(26)=1
trigger1 = stateno=240
trigger1 = movehit&time>4
trigger2 = var(28)=1
trigger2 = stateno = 215
trigger2 = movehit&time>2
;---------------------------------------------------------------------------
; Crouching Light Kick
[State -1, AI Crouching Light Kick]
type = ChangeState
value =  430
triggerall = Var(59)=1
triggerall = roundstate=2
triggerall = p2bodydist x =[0,40]
triggerall = p2bodydist y =[0,20]
triggerall = statetype!= A
triggerall = enemynear,statetype!=L
triggerall = enemynear,stateno!=5120
triggerall = enemynear,stateno!=5201
triggerall = enemynear,stateno!=[120,155]
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101
trigger1 = enemynear,statetype=S
trigger1 = enemynear,stateno=[200,225]
trigger1 = backedgedist<=30
trigger2 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101
trigger2 = enemynear,statetype=S
trigger2 = enemynear,movetype!=A
trigger2 = !enemynear,numproj
trigger2 = vel x >0
trigger3 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101
trigger3 = numtarget
trigger3 = P2bodydist X = [0,30]
trigger4 = prevstateno != 430
trigger4 = stateno = 430
trigger4 = movehit
trigger4 = time>4
trigger4 = prevstateno!=430
trigger4 = p2bodydist x=[0,30]
trigger4 = enemynear,statetype!=A
trigger4 = Random = [100,900]
trigger5 = stateno=200
trigger5 = moveguarded
trigger5 = time>4
;---------------------------------------------------------------------------
; Crouching medium Kick
[State -1, AI Crouching medium Kick]
type = ChangeState
value =  440
triggerall = Var(59)=1
triggerall = p2bodydist x=[0,45]
triggerall = roundstate=2
triggerall = statetype!=A
triggerall = enemynear,stateno!=5120
triggerall = enemynear,stateno!=5201
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 105||stateno=101
trigger1 = enemynear,statetype=S
trigger1 = enemynear,movetype=H
trigger1 = random=[75,150]
trigger2 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 105||stateno=101
trigger2 = enemynear,statetype=S
trigger2 = enemynear,movetype!=A
trigger2 = enemynear,stateno=[52,60]
trigger3 = stateno=[200,203]
trigger3 = moveguarded
trigger3 = time>4
trigger4 = var(27)=1
trigger4 = stateno=205
trigger4 = moveguarded
trigger4 = time>4
trigger4 = random<=75
trigger5 = var(25)=1
trigger5 = numtarget
trigger5 = stateno=430
trigger5 = movehit
trigger5 = time>4
;---------------------------------------------------------------------------
; Jump Light Punch
[State -1, AI Jump Light Punch]
type = ChangeState
value =  600
triggerall = Var(59)=1
triggerall = roundstate=2
triggerall = p2bodydist x=[0,30]
triggerall = P2bodydist Y = [-10,50]
triggerall = statetype=A
triggerall = enemynear,statetype!=L
triggerall = enemynear,stateno!=5120
triggerall = enemynear,stateno!=5201
trigger1 = ctrl||stateno=50||stateno=6082&&time>=7
trigger1 = Vel X
trigger1 = Vel Y > 0
trigger1 = Pos Y < -40
trigger1 = !(P2MoveType = A && (P2stateno = [3000,3999]) && enemynear,HitDefAttr != SC, NT,ST,HT)
;trigger1 = Random = [0,125]
trigger2 = stateno = [600,630]
trigger2 = movehit && time>4
ignorehitpause = 0
;---------------------------------------------------------------------------
; Jump Medium Punch
[State -1, AI Jump Medium Punch]
type = ChangeState
value =  610
triggerall = Var(59)=1
triggerall = roundstate=2
triggerall = p2bodydist x =[0,30]
triggerall = P2bodydist Y = [-10,50]
triggerall = statetype=A
triggerall = enemynear,statetype!=L
triggerall = enemynear,stateno!=5120
triggerall = enemynear,stateno!=5201
trigger1 = ctrl||stateno=50
trigger1 = Vel X
trigger1 = Vel Y > 0
trigger1 = Pos Y < -40
trigger1 = !(P2MoveType = A && (P2stateno = [3000,3999]) && enemynear,HitDefAttr != SC, NT,ST,HT)
trigger1 = numtarget
;trigger1 = Random = [0,125]
trigger2 = stateno = [600,630]
trigger2 = movehit && time>4
ignorehitpause = 0
;---------------------------------------------------------------------------
; Jump Light Kick
[State -1, AI Jump Light Kick]
type = ChangeState
value =  630
triggerall = Var(59)=1
triggerall = roundstate=2
triggerall = p2bodydist x=[0,30]
triggerall = statetype=A
triggerall = enemynear,statetype!=L
triggerall = enemynear,stateno!=5120
triggerall = enemynear,stateno!=5201
trigger1 = ctrl||stateno=50||stateno=6082&&time>=7
trigger1 = p2bodydist y=[10,-30]
trigger1 = vel x > 0 && vel y > 0
trigger1 = enemynear,movetype!=A
trigger2 = ctrl||stateno=50||stateno=6082&&time>=7
trigger2 = enemynear,movetype=H
trigger2 = p2bodydist y=[20,-30]
trigger3 = ctrl||stateno=50||stateno=6082&&time>=7
trigger3 = enemynear,statetype=A
trigger3 = enemynear,movetype=H
trigger3 = vel y >0
trigger4 = ctrl||stateno=50||stateno=6082&&time>=7
trigger4 = enemynear,statetype=A
trigger4 = enemynear,movetype=H
trigger4 = pos y =[-80,-75]
trigger5 = stateno = 6002
trigger5 = random<=150
trigger6 = stateno = [600,630]
trigger6 = movehit && time>4
ignorehitpause = 0
;---------------------------------------------------------------------------
; Jump Medium Kick
[State -1, AI Jump Medium Kick]
type = ChangeState
value =  640
triggerall = Var(59)=1
triggerall = roundstate=2
triggerall = p2bodydist x <=30
triggerall = statetype=A
triggerall = enemynear,statetype!=L
triggerall = enemynear,stateno!=5120
triggerall = enemynear,stateno!=5201
trigger1 = ctrl||stateno=50
trigger1 = p2bodydist y=[10,-30]
trigger1 = vel x > 0 && vel y > 0
trigger1 = enemynear,movetype!=A
trigger2 = ctrl||stateno=50
trigger2 = enemynear,movetype=H
trigger2 = p2bodydist y=[20,-30]
trigger3 = ctrl||stateno=50
trigger3 = enemynear,statetype=A
trigger3 = enemynear,movetype=H
trigger3 = vel y >0
trigger4 = ctrl||stateno=50
trigger4 = enemynear,statetype=A
trigger4 = enemynear,movetype=H
trigger4 = pos y =[-80,-75]
trigger5 = stateno = 6002
trigger5 = random<=150
trigger6 = stateno = [600,630]
trigger6 = movehit && time>4
;---------------------------------------------------------------------------
;Hi Jump Kick
[State -1, AI Hi Jump Kick]
type = ChangeState
value = 2500
triggerall = Var(59)=1
triggerall = roundstate=2
triggerall = p2bodydist x=[0,30]
triggerall = P2bodydist Y >=-20
triggerall = statetype=A
triggerall = enemynear,stateno!=5120
triggerall = enemynear,stateno!=5201
trigger1 = ctrl||stateno=50
trigger1 = enemynear,statetype=L
trigger1 = random<=200
trigger2 = ctrl||stateno=50
trigger2 = enemynear,movetype!=A
trigger2 = enemynear,statetype!=A
trigger2 = random=[200,450]
trigger3 = ctrl||stateno=50
trigger3 = vel x >2
trigger3 = enemynear,vel x >1
trigger3 = enemynear,movetype!=A
trigger4 = ctrl||stateno=50
trigger4 = random=[450,850]
trigger5 = stateno = 2500
trigger5 = movecontact
trigger5 = time>4
trigger5 = prevstateno!=2500
trigger6 = stateno=680
trigger6 = movehit&&time>2
trigger6 = random=[500,750]
ignorehitpause =0
;--------------------------------------------------------------------
[State -1, AI Fireball]
type = ChangeState
value = 311
triggerall = Var(59)=1
triggerall = roundstate=2
triggerall = numproj = 0
triggerall = enemynear,StateType!= L
triggerall = enemynear,stateno!=5120
triggerall = enemynear,stateno!=5201
triggerall = statetype=A
trigger1 = ctrl || (stateno = 100 && animelemtime(2) > 1) || stateno = 101 || stateno = 40 || stateno = 50 || (stateno = 52 && time >= 2) ||(stateno=[6080,6082])&&time>=7
trigger1 = p2bodydist x=[0,30]
trigger1 = p2bodydist y=[10,-30]
trigger1 = enemynear,statetype=A
trigger1 = enemynear,movetype=H
trigger2 = stateno=[600,630]
trigger2 = movehit
trigger3 = ctrl || (stateno = 100 && animelemtime(2) > 1) || stateno = 101 || stateno = 40 || stateno = 50 || (stateno = 52 && time >= 2) ||(stateno=[6080,6082])&&time>=7
trigger3 = p2bodydist x >=150
trigger3 = enemynear,movetype!=A
trigger3 = random=[0,75]
ignorehitpause=0
;------------------------------------------------------------------------
;IronTail
[State -1, AI IronTail]
type = ChangeState
value = 680
triggerall = Var(59)=1
triggerall = roundstate=2
triggerall = p2bodydist x =[0,60]
triggerall = statetype!= A
triggerall = enemynear,statetype!=L
triggerall = enemynear,stateno!=5120
triggerall = enemynear,stateno!=5201
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 105||stateno=101
trigger1 = stateno=[100,101]
trigger1 = enemynear,movetype=A
trigger1 = random<=150
trigger2 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 105||stateno=101
trigger2 = enemynear,movetype=A
trigger2 = enemynear,stateno=[430,455]
trigger2 = backedgedist<=10
trigger2 = random=[200,450]
trigger3 = var(27)=2
trigger3 = stateno = 205
trigger3 = movehit&&time > 4
trigger4 = var(15)=1
trigger4 = var(28)=2
trigger4 = stateno=215
trigger4 = movehit&time>2
;---------------------------------------------------------------------------
;Air Down Aura
[State -1, AI Air Down Aura]
type = ChangeState
value = 315
triggerall = Var(59)=1
triggerall = roundstate=2
triggerall = numproj=0
triggerall = p2bodydist x =[0,60]
triggerall = enemynear,statetype!=L
triggerall = enemynear,stateno!=5120
triggerall = enemynear,stateno!=5201
triggerall = statetype= A
trigger1 = stateno=2500
trigger1 = movehit=2&&time>2
trigger1 = random=[500,750]
;---------------------------------------------------------------------------
;Aura
[State -1,AI Aura]
type =ChangeState
value = 300
triggerall = Var(59)=1
triggerall = roundstate=2
triggerall = numproj=0
triggerall = enemynear,StateType!= L
triggerall = enemynear,stateno!=5120
triggerall = enemynear,stateno!=5201
triggerall = statetype!= A
trigger1 = ctrl || (stateno = 100 && animelemtime(2) > 1) || stateno = 101 || stateno = 40 || stateno = 50||stateno=101 || (stateno = 52 && time >= 2) ||(stateno=[700,701])&&time>=3&&p2bodydist x=[0,60]
trigger1 = enemynear,statetype=A
trigger1 = enemynear,movetype=H
trigger1 = pos y =[-80,-75]
trigger2 = ctrl || (stateno = 100 && animelemtime(2) > 1) || stateno = 101 || stateno = 40 || stateno = 50||stateno=101 || (stateno = 52 && time >= 2)
trigger2 = p2bodydist x >=150
trigger2 = enemynear,movetype!=A
trigger2 = random=[0,475]
;trigger3 = ctrl || (stateno = 100 && animelemtime(2) > 1) || stateno = 101 || stateno = 40 || stateno = 50||stateno=101 || (stateno = 52 && time >= 2)
;trigger3 = enemynear,numproj
;trigger3 = enemynear,statetype=S
;trigger3 = p2bodydist x >=150
;trigger3 = random<=75
trigger3 = stateno=681
trigger3 = movehit&&time>4
trigger3 = numtarget
trigger3 = target,movetype=H
trigger4 = (stateno=[700,701])&&time>=3
trigger5 = var(25)=2
trigger5 = numtarget
trigger5 = stateno=430
trigger5 = movehit
trigger5 = time>4
;-----------------------------------------------------------------------------
;AuraDown
[State -1, AI AuraDown]
type = ChangeState
value = 313
triggerall = Var(59)=1
triggerall = roundstate=2
triggerall = numproj=0
triggerall = enemynear,StateType!= L
triggerall = enemynear,stateno!=5120
triggerall = enemynear,stateno!=5201
triggerall = statetype!= A
trigger1 = var(26)=2
trigger1 = stateno=240
trigger1 = movehit
trigger1 = time>4
;--------------------------------------------------------------------------
[State -1, AI charge]
type = ChangeState
value = 4005
triggerall = Var(59)= 1
triggerall = roundstate=2
triggerall = power<3000
triggerall = p2bodydist x >=200
triggerall = enemynear,movetype!=A
triggerall = enemynear,stateno!=5120
triggerall = enemynear,stateno!=5201
triggerall = statetype!=A
triggerall = ctrl
trigger1 = random<=350
trigger1 = !enemynear,numproj
trigger2 = p2statetype=L
trigger3 = numtarget
trigger3 = target,stateno=3183
trigger3 = power<2500
;--------------------------------------------------------------------------
[State -1, AI Guard Counter]
type = ChangeState
value = 1100
triggerall = var(59)=1
triggerall = roundstate=2
triggerall = power>=1000
triggerall = statetype!=A
trigger1 = stateno=150||stateno=151||stateno=152||stateno=153
trigger1 = p2bodydist x=[0,65]
trigger1 = enemynear,vel x=[-2,2]
trigger1 = random<=950
;--------------------------------------------------------------------------
[State -1, AI Detect]
type = ChangeState
value = 1300
triggerall = var(59)=1
triggerall = roundstate=2
triggerall = statetype != A
triggerall = enemynear,stateno!=5120
triggerall = enemynear,stateno!=5201
triggerall = enemynear,statetype!=L
trigger1 = ctrl ||stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101||stateno=52
trigger1 = enemynear,vel x > 2
trigger1 = p2bodydist x=[0,60]
trigger1 = enemynear,movetype=A
trigger1 = random<=75
trigger2 = ctrl ||stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101||stateno=52
trigger2 = backedgebodydist <=3
trigger2 = enemynear,movetype=A
trigger2 = life<2000
trigger2 = random=[300,450]
;--------------------------------------------------------------------------
[State -1, AI Detect2]
type = ChangeState
value = 1310
triggerall = var(59)=1
triggerall = roundstate=2
triggerall = p2statetype!=L
triggerall = statetype != A
triggerall = !enemy,numproj
triggerall = backedgedist!=[-5,5]
trigger1 = ctrl ||stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101||stateno=52
trigger1 = enemynear,vel x > 2
trigger1 = p2bodydist x=[0,60]
trigger1 = enemynear,movetype!=A
trigger1 =random<=250
;--------------------------------------------------------------------------
[State -1, AI Dodge]
type = ChangeState
value = 460
triggerall = var(59)=1
triggerall = roundstate=2
triggerall = statetype != A
triggerall = enemynear,stateno!=5120
triggerall = enemynear,stateno!=5201
triggerall = ctrl ||stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101||stateno=52
trigger1 = enemynear,movetype=A
trigger1 = enemynear,stateno=[200,655]
trigger1 = p2bodydist x <=150
trigger1 = random<=250
trigger2 = enemynear,numhelper
trigger2 = enemynear,parentdist x >=150
ignorehitpause=0
;---------------------------------------------------------------------------
; Throw
[State -1, AI Throw]
type = ChangeState
value = 800
triggerall = Var(59)=1
triggerall = roundstate=2
triggerall = p2statetype!=L
triggerall = enemynear,stateno!=5120
triggerall = enemynear,stateno!=5201
triggerall = enemynear,movetype!=H
triggerall = enemynear,movetype!=A
triggerall = statetype!= A
;triggerall = enemy,Hitover
triggerall = p2bodydist x =[0,20]
triggerall = p2bodydist y =[0,20]
triggerall = ctrl || stateno=100 || stateno=101||stateno=52
trigger1 = enemynear,backedgebodydist <10
trigger1 = random<= 85
trigger2 = p2stateno=[120,155]
trigger2 = random=[200,600]
trigger3 = stateno=100
trigger4 = var(25)=3
trigger4 = stateno=430
trigger4 = movecontact&&time>5
trigger5 = var(28)=0
trigger5 = stateno=215
trigger5 = movecontact&&time>5
;---------------------------------------------------------------------------
;hyper_1a
[State -1, AI hyper_1a]
type = ChangeState
value = 660
triggerall = var(59)=1
triggerall = roundstate=2
triggerall = power>=1000
triggerall = statetype != A
triggerall = enemynear,StateType != L
triggerall = enemynear,stateno != 5120
triggerall = enemynear,stateno != 5201
trigger1 = numtarget
trigger1 = !target,hitshakeover
trigger1 = var(29)=0
trigger1 = stateno=430
trigger1 = movehit&&time>4

;---------------------------------------------------------------------------
;hyper_1b
[State -1, AI hyper_1b]
type = ChangeState
value = 665
triggerall = var(59)=1
triggerall = roundstate=2
triggerall = power>=2000
triggerall = statetype != A
triggerall = enemynear,StateType != L
triggerall = enemynear,stateno != 5120
triggerall = enemynear,stateno != 5201
trigger1 = numtarget
trigger1 = !target,hitshakeover
trigger1 = var(29)=0
trigger1 = stateno=430
trigger1 = movehit&&time>4
;---------------------------------------------------------------------------
;QuickAttack
[State -1, AI QuickAttack]
type = ChangeState
value = 3100
triggerall = var(59)=1
triggerall = roundstate=2
triggerall = power>=1000||power>=2000||power>=3000
triggerall = statetype != A
triggerall = enemynear,StateType != L
triggerall = enemynear,stateno != 5120
triggerall = enemynear,stateno != 5201
trigger1 = numtarget
trigger1 = !target,hitshakeover
trigger1 = var(29)=1
trigger1 = stateno=430
trigger1 = movehit&&time>4
;---------------------------------------------------------------------------
;DarkPulse
[State -1, AI DarkPulse]
type = ChangeState
value = 6002
triggerall = life<300
triggerall = var(59)=1
triggerall = roundstate=2
triggerall = power>=3000
triggerall = statetype != A
triggerall = enemynear,StateType != L
triggerall = enemynear,stateno != 5120
triggerall = enemynear,stateno != 5201
trigger1 = ctrl || prevstateno = 5120 && time <= 20||stateno = 5120 && time >=24
trigger1 = enemynear,StateType!= A
trigger1 = p2bodydist y=[0,75]
trigger1 = random<=750
trigger2 = ctrl || prevstateno = 5120 && time <= 20||stateno = 5120 && time >=24
trigger2 = projhit=1
trigger2 = p2bodydist x >75
trigger2 = random>=750
trigger3 = ctrl
trigger3 = projhit=1
trigger3 = enemynear,movetype=H
ignorehitpause = 0
;------------------------------------------------------------------------


[State -1, MetalClaw1]
type = ChangeState
value = 930
triggerall = command = "MetalClaw1"
triggerall = !command = "hyper_1a"
triggerall = !command = "hyper_1b"
triggerall = !command = "hyper_2"
triggerall = !command = "hyper_2b"
trigger1 = (statetype = s) && ctrl

[State -1, MetalClaw2]
type = ChangeState
value = 940
triggerall = command = "MetalClaw2"
trigger1 = (statetype = s) && ctrl



;AuraDownHyperAir
[State -1,Ai AuraDownHyperAir]
type= ChangeState
value = 770
triggerall = var(59)=1
triggerall = roundstate=2
triggerall = power>=2000
triggerall = statetype = A
triggerall = p2bodydist y>0
triggerall = pos y <=-50
triggerall = enemynear,stateno != 5120
triggerall = enemynear,stateno != 5201
trigger1 = ctrl
trigger2 = enemynear,statetype=S
trigger2 = enemynear,stateno!=[120,155]
trigger2 = p2bodydist x >90
trigger2 = power>=2100
trigger2 = random<=150
trigger3 = numhelper(315)=1
trigger3 = helper(315),movehit
ignorehitpause = 0
;---------------------------------------------------------------------------
;QuickAttack
[State -1,QuickAttack]
type = ChangeState
value = 3100
triggerall = Var(59)!=1
triggerall = statetype!=A
triggerall = power>=1000||power>=2000||power>=3000
triggerall = (command="QuickAttack1"||command="QuickAttack2"||command="QuickAttack3")&&(command!="holddown")
trigger1 = ctrl || prevstateno=5120&&time<=6|| stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 40|| stateno = 105 || (stateno = 52 && time >= 2)||Stateno=101
;--------------------------------------------------------------------------------------
;AuraDownHyperAir
[State -1, AuraDownHyperAir]
type = ChangeState
value = 770
triggerall = Var(59)!=1
triggerall = command ="AuraDownHyperAir"
trigger1 = (statetype = A) && ctrl
triggerall =  power >= 2000
;AuraDownAir
[State -1, AuraDownAir]
type = ChangeState
value = 315
triggerall = Var(59)!=1
triggerall = command ="AuraDownAir"
trigger1 = (statetype = A) && ctrl

;AuraDownHyper
[State -1, AuraDownHyper]
type = ChangeState
value = 360
triggerall = Var(59)!=1
triggerall = command ="AuraDownHyper"
triggerall = statetype != A
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101
trigger1 =  power >= 1000

;AuraHyperAir2
[State -1, AuraHyperAir2]
type = ChangeState
value = 330
triggerall = Var(59)!=1
triggerall = command ="AuraHyperAir2"
trigger1 = (statetype = A) && ctrl
trigger1 =  power >= 1000

;AuraHyperAir
[State -1, AuraHyperAir]
type = ChangeState
value = 330
triggerall = Var(59)!=1
triggerall = command ="AuraHyperAir"
trigger1 = (statetype = A) && ctrl
trigger1 =  power >= 1000

;AuraDown2
[State -1, AuraDown2]
type = ChangeState
value = 314
triggerall = Var(59)!=1
triggerall = numproj = 0
triggerall = command = "AuraDown2"
triggerall = statetype != A
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101


;;IronTailair
;[State -1, IronTailair]
type = ChangeState
value = 682
triggerall = Var(59)!=1
triggerall = command = "IronTailair"
trigger1 = (statetype = A) && ctrl

;IronTail
[State -1, IronTail]
type = ChangeState
value = 680
triggerall = Var(59)!=1
triggerall = command = "IronTail"
triggerall = statetype != A
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101


;AuraDown
[State -1, AuraDown]
type = ChangeState
value = 313
triggerall = Var(59)!=1
triggerall = numproj = 0
triggerall = command = "AuraDown"
triggerall = statetype != A
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101

;AuraDown3
[State -1, AuraDown3]
type = ChangeState
value = 318
triggerall = Var(59)!=1
triggerall = numproj = 0
triggerall = command = "AuraDown2"
triggerall = statetype != A
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101

;AuraAir2
[State -1, AuraAir2]
type = ChangeState
value = 312
triggerall = Var(59)!=1
triggerall = numproj = 0
triggerall = command = "AuraAir2"
trigger1 = (statetype = A) && ctrl


;AuraAir
[State -1, AuraAir]
type = ChangeState
value = 311
triggerall = Var(59)!=1
triggerall = numproj = 0
triggerall = command = "AuraAir"
trigger1 = (statetype = A) && ctrl


;IronTail2
[State -1, IronTail2]
type = ChangeState
value = 690
triggerall = Var(59)!=1
triggerall = command = "IronTail2"
triggerall = statetype != A
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101

;IronTail2air
[State -1, IronTail2air]
type = ChangeState
value = 691
triggerall = Var(59)!=1
triggerall = command = "IronTail2air"
trigger1 = (statetype = A) && ctrl

;kick_1
[State -1, kick_1]
type = ChangeState
value = 245
triggerall = Var(59)!=1
triggerall = command = "kick_1"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101

;Dark_pulse
[State -1, Dark_pulse]
type = ChangeState
value = 6002
triggerall = Var(59)!=1
triggerall = command = "Dark_pulse"
triggerall = statetype != A
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101
trigger1 =  power >= 3000



;Dkick
[State -1, Dkick]
type = ChangeState
value = 350
triggerall = Var(59)!=1
triggerall = (command = "Dkick")
triggerall = statetype != A
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101

;Wall_push
[State -1, Wall_push]
type = ChangeState
value = 260
triggerall = var(59)!=1
triggerall = command = "Wall_push"
trigger1 = (statetype = s) && ctrl
Trigger2 = MoveContact
Trigger2 = Stateno = 200
Trigger3 = MoveContact
Trigger3 = Stateno = 203
Trigger4 = MoveContact
Trigger4 = Stateno = 210
Trigger5 = MoveContact
Trigger5 = Stateno = 220
Trigger6 = MoveContact
Trigger6 = Stateno = 230
Trigger7 = MoveContact
Trigger7 = Stateno = 240
Trigger8 = MoveContact
Trigger8 = Stateno = 250
Trigger11 = MoveContact
Trigger11 = Stateno = 205
Trigger12 = MoveContact
Trigger12 = Stateno = 215


;hyper_1a
[State -1, hyper_1a]
type = ChangeState
value = 660
triggerall = Var(59)!=1
triggerall = command ="hyper_1a"
trigger1 = (statetype = s) && ctrl
trigger1 =  power >= 1000

;hyper_1b
[State -1, hyper_1b]
type = ChangeState
value = 665
triggerall = Var(59)!=1
triggerall = command ="hyper_1b"
trigger1 = (statetype = s) && ctrl
trigger1 =  power >= 2000





;hyper_2
[State -1, hyper_2]
type = ChangeState
value = 670
triggerall = Var(59)!=1
triggerall = command ="hyper_2"
trigger1 = (statetype = s) && ctrl
trigger1 =  power >= 1000
Trigger2 = MoveContact
Trigger2 = Stateno = 200
Trigger3 = MoveContact
Trigger3 = Stateno = 203
Trigger4 = MoveContact
Trigger4 = Stateno = 210
Trigger5 = MoveContact
Trigger5 = Stateno = 220
Trigger6 = MoveContact
Trigger6 = Stateno = 230
Trigger7 = MoveContact
Trigger7 = Stateno = 240
Trigger8 = MoveContact
Trigger8 = Stateno = 250
Trigger9 = MoveContact
Trigger9 = Stateno = 260

;ExtremeSpeed
;[State -1, ExtremeSpeed]
;type = ChangeState
;value = 780
;triggerall = command ="ExtremeSpeed"
;trigger1 = (statetype = S) && ctrl
;trigger1 =  power >= 3000

;hyper_2b
[State -1, hyper_2b]
type = ChangeState
value = 670
triggerall = Var(59)!=1
triggerall = command ="hyper_2b"
trigger1 = (statetype = s) && ctrl
trigger1 =  power >= 1000
Trigger2 = MoveContact
Trigger2 = Stateno = 200
Trigger3 = MoveContact
Trigger3 = Stateno = 203
Trigger4 = MoveContact
Trigger4 = Stateno = 210
Trigger5 = MoveContact
Trigger5 = Stateno = 220
Trigger6 = MoveContact
Trigger6 = Stateno = 230
Trigger7 = MoveContact
Trigger7 = Stateno = 240
Trigger8 = MoveContact
Trigger8 = Stateno = 250
Trigger9 = MoveContact
Trigger9 = Stateno = 260

;Aura
[State -1, Aura]
type = ChangeState
value = 300
triggerall = Var(59)!=1
triggerall = (command = "Aura1")||(command = "Aura2")
triggerall = statetype != A
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101
triggerall = numproj = 0


;Hit_2
[State -1, Hit_2]
type = ChangeState
value = 205
triggerall = var(59)!=1
triggerall = command = "Hit_2"
triggerall = command!="a"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101



;Hit_1
[State -1, Hit_1]
type = ChangeState
value = 215
triggerall = var(59)!=1
triggerall = command = "Hit_1"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101


;===========================================================================
;---------------------------------------------------------------------------

;===========================================================================
;---------------------------------------------------------------------------
; Run Fwd
[State -1, Run Fwd]
type = ChangeState
value = 100
triggerall = var(59)!=1
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
; Run Back
[State -1, Run Back]
type = ChangeState
value = 105
triggerall = var(59)!=1
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl
;--------------------------------------------------------------------------
[State -1, Detect]
type = ChangeState
value = 1300
triggerall = var(59)!=1
triggerall = command != "holddown"
triggerall = statetype != A
triggerall = command="a"&&Command="x"&&command="holdfwd"
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101
;--------------------------------------------------------------------------
[State -1, Detect]
type = ChangeState
value = 1310
triggerall = var(59)!=1
triggerall = command != "holddown"
triggerall = statetype != A
triggerall = command="a"&&Command="x"&&command="holdback"
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101

;Dodge
[State -1, Dodge]
type = ChangeState
value = 460
triggerall = Var(59)!=1
triggerall = Var(59)!=1
triggerall = command="a"&&Command="x"
triggerall = command != "holddown"
triggerall = (Command!="holdfwd")||Command!="holdback"
triggerall = statetype != A
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101

;--------------------------------------------------------------------------
[State -1,Counter]
type = ChangeState
value = 1100
triggerall = var(59)!=1
triggerall = power>=1000
triggerall = command != "holddown"
triggerall = command="counter"&&command!="holddown"&&Command="holdfwd"
trigger1 = stateno=150||stateno=151||stateno=152||stateno=153
;--------------------------------------------------------------------------
;Charge
[State -1, Charge]
type = ChangeState
value = 4005
triggerall = command = "a"&&command="c"
triggerall = power<3000
trigger1 = (statetype = s) && ctrl
;===========================================================================
;---------------------------------------------------------------------------
; Taunt
[State -1, Taunt]
type = ChangeState
value = 195
triggerall = var(59)!=1
triggerall = command = "s"
trigger1 = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
; Stand Light Punch
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = var(59)!=1
triggerall = command = "x"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101
Trigger4 = MoveContact
Trigger4 = Stateno = 210
Trigger5 = MoveContact
Trigger5 = Stateno = 220
Trigger8 = MoveContact
Trigger8 = Stateno = 250
Trigger9 = MoveContact
Trigger9 = Stateno = 215
Trigger10 = MoveContact
Trigger10 = Stateno = 260
Trigger11 = MoveContact
Trigger11 = Stateno = 930
Trigger12 = MoveContact
Trigger12 = Stateno = 940



;---------------------------------------------------------------------------
; Stand Medium Punch
[State -1, Stand Medium Punch]
type = ChangeState
value = 210
triggerall = var(59)!=1
triggerall = command = "y"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101
Trigger2 = MoveContact
Trigger2 = Stateno = 200
Trigger3 = MoveContact
Trigger3 = Stateno = 205
Trigger4 = MoveContact
Trigger4 = Stateno = 203
Trigger5 = MoveContact
Trigger5 = Stateno = 220
Trigger8 = MoveContact
Trigger8 = Stateno = 250
Trigger9 = MoveContact
Trigger9 = Stateno = 215
Trigger9 = MoveContact
Trigger9 = Stateno = 260
Trigger10 = MoveContact
Trigger10 = Stateno = 930
Trigger11 = MoveContact
Trigger11 = Stateno = 940




;---------------------------------------------------------------------------
; Stand Light Kick
[State -1, Stand Light Kick]
type = ChangeState
value = 230
triggerall = var(59)!=1
triggerall = command = "a"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101
Trigger2 = MoveContact
Trigger2 = Stateno = 200
Trigger3 = MoveContact
Trigger3 = Stateno = 205
Trigger4 = MoveContact
Trigger4 = Stateno = 203
Trigger5 = MoveContact
Trigger5 = Stateno = 210
Trigger6 = MoveContact
Trigger6 = Stateno = 220
Trigger7 = MoveContact
Trigger7 = Stateno = 240
Trigger8 = MoveContact
Trigger8 = Stateno = 250
Trigger9 = MoveContact
Trigger9 = Stateno = 215
Trigger10 = MoveContact
Trigger10 = Stateno = 260
Trigger11 = MoveContact
Trigger11 = Stateno = 240



;---------------------------------------------------------------------------
; Standing Medium Kick
[State -1, Standing Medium Kick]
type = ChangeState
value = 240
triggerall = var(59)!=1
triggerall = command = "b"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1) || stateno = 101
Trigger2 = MoveContact
Trigger2 = Stateno = 200
Trigger4 = MoveContact
Trigger4 = Stateno = 203
Trigger5 = MoveContact
Trigger5 = Stateno = 220
Trigger7 = MoveContact
Trigger7 = Stateno = 250
Trigger8 = MoveContact
Trigger8 = Stateno = 215
Trigger9 = MoveContact
Trigger9 = Stateno = 260
Trigger10 = MoveContact
Trigger10 = Stateno = 680






;---------------------------------------------------------------------------
; Crouching Light Punch
[State -1, Crouching Light Punch]
type = ChangeState
value =  400
triggerall = Var(59) != 1
triggerall = command = "x"
triggerall = statetype != A
triggerall = command = "holddown"
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1)

;---------------------------------------------------------------------------
; Crouching Medium Punch
[State -1, Crouching Medium Punch]
type = ChangeState
value = 410
triggerall = var(59)!=1
triggerall = command = "y"
triggerall = statetype != A
triggerall = command = "holddown"
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1)

;---------------------------------------------------------------------------
; Crouching Light Kick
[State -1, Crouching Light Kick]
type = ChangeState
value = 430
triggerall = var(59)!=1
triggerall = command = "a"
triggerall = statetype != A
triggerall = command = "holddown"
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1)
;---------------------------------------------------------------------------
; Crouching Medium Kick
[State -1, Crouching Medium Kick]
type = ChangeState
value = 440
triggerall = var(59)!=1
triggerall = command = "b"
triggerall = statetype != A
triggerall = command = "holddown"
trigger1 = ctrl || stateno = 21 || (stateno = 100 && animelemtime(2) > 1)
;---------------------------------------------------------------------------
; Jump Light Punch
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall = var(59)!=1
triggerall = command = "x"
trigger1 = statetype = A
trigger1 = ctrl
;---------------------------------------------------------------------------
; Jump Medium Punch
[State -1, Jump Medium Punch]
type = ChangeState
value = 610
triggerall = var(59)!=1
triggerall = command = "y"
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
; Jump Light Kick
[State -1, Jump Light Kick]
type = ChangeState
value = 630
triggerall = var(59)!=1
triggerall = command = "a"
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
; Jump Medium Kick
[State -1, Jump Medium Kick]
type = ChangeState
value = 640
triggerall = var(59)!=1
triggerall = command = "b"
trigger1 = statetype = A
trigger1 = ctrl
;---------------------------------------------------------------------------
; Hi Jump Kick
[State -1, Hi Jump Kick]
type = ChangeState
value =  2500
triggerall = Var(59) != 1
triggerall =command="c"&&command="holddown"
triggerall = statetype = A
trigger1 = ctrl
ignorehitpause = 0

;---------------------------------------------------------------------------
[State -1, super jump ]
type = ChangeState
value = 41
triggerall = var(59)!=1
triggerall = stateno != 100
trigger1 = command = "DU"
trigger1 = statetype != A
trigger1 = ctrl

;------------------------------------------------------------------------------
[State -1, sparry]
type=hitoverride
triggerall = var(59)!=1&&roundstate=2&&statetype=S
triggerall=command="fwd"&&command!="back"&&command!="up"&&command!="down"
trigger1=ctrl||stateno=700||stateno=701
trigger1=var(21):=1
trigger2=var(21):=-1
attr=SA,AA,AP
stateno=700
slot=0

[State -1, cparry]
type=hitoverride
triggerall = var(59)!=1&&roundstate=2&&statetype!=A
triggerall=(statetype=S&&command="down")||(statetype=C&&command="fwd")&&command!="back"&&command!="up"
trigger1=ctrl||stateno=700||stateno=701
trigger1=var(21):=2
trigger2=var(21):=-2
attr=C,AA,AP
stateno=701
slot=0

[State -1, aparry]
type=hitoverride
triggerall = var(59)!=1&&roundstate=2&&statetype=A
triggerall=command="fwd"&&command!="back"&&command!="up"&&command!="down"
trigger1=ctrl||stateno=702
trigger1=var(21):=3
trigger2=var(21):=-3
attr=SA,AA,AP
stateno=702
forceair=1
slot=0
;---------------------------------------------------------------------------
;Kung Fu Throw
;“Š‚°
[State -1, Kung Fu Throw]
type = ChangeState
value = 800
triggerall = Var(59)!=1
triggerall = command!="Helper2"
triggerall = command!="Helper3"
trigger1 = command = "Throw"
trigger1 = statetype != A
trigger1 = ctrl

