
;-| ai motions |--------------------------------------------------------

[Command]
name = "ai_01"
command = ~D, D, D, D, D, D
time = 1

[Command]
name = "ai_02"
command = ~F, F, F, F, F, F
time = 1

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

[Command]
name = "ai_04"
command = ~U, U, U, U, U, U
time = 1

[Command]
name = "ai_05"
command = ~B, B, B, B, B, B
time = 1

;-| Super Motions |--------------------------------------------------------

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

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

[command]
name = "palju"
command = ~D, DF, F,D, DF, F, a
time = 30

[command]
name = "destroy"
command = ~D, DF, F,D, DF, F, b
time = 30

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

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

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

;-| Special Motions |------------------------------------------------------

[command]
name = "balgi"
command = ~D, DF, F, x
time = 12

[command]
name = "kaiser"
command = ~D, DF, F, y
time = 12

[command]
name = "yuelfung"
command = ~D, DF, F, z
time = 12

[command]
name = "jhunsin"
command = ~F, D, DF, x
time = 19

[command]
name = "jhunsinex"
command = ~F, D, DF, y
time = 19

[command]
name = "jenoside"
command = ~F, D, DF, z
time = 19

[command]
name = "homi"
command = ~D, DB, B, a
time = 19

[command]
name = "ryua"
command = ~D, DB, B, b
time = 19

[command]
name = "fake"
command = ~D, DB, B, c
time = 19

[command]
name = "ssangjang"
command = ~D, DB, B, x
time = 19

[command]
name = "teleport"
command = ~D, DB, B, y
time = 19

[command]
name = "hopa"
command = ~D, DB, B, z
time = 19

[command]
name = "sasang"
command = ~B, D, F, a
time = 19

[command]
name = "sasang"
command = ~B, D, F, b
time = 19

[command]
name = "godpush"
command = ~B, D, F, c
time = 19

;-| 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+a
time = 1

[Command]
name = "cd";Required (do not remove)
command = y+b
time = 1

;-| Dir + Button |---------------------------------------------------------
[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

[command] 
name = "longjump"       
command = ~D, $U      
time = 5

;---------------------------------------------------------------------------
; 2. State entry
; --------------


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

;===========================================================================

;===========================================================================

[state -1]
type = changestate
value = 3600
triggerall = command = "custom"
triggerall = statetype = s 
triggerall = power >= 2000
trigger1 = ctrl = 1 
trigger2 = stateno = [200,499]
trigger2 = movecontact
trigger3 = stateno = 1300 && animelem = 8 <= 0
trigger4 = stateno = 1100 && animelem = 2 <= 0
trigger5 = stateno = 1110 && animelem = 2 <= 0
trigger6 = stateno = 1111 && animelem = 2 <= 0
trigger7 = stateno = 3000 && animelem = 14 <= 0

;===========================================================================

[state -1]
type = changestate
value = 3400
triggerall = command = "destroy"
triggerall = statetype = s 
triggerall = power >= 2000
trigger1 = ctrl = 1 
trigger2 = stateno = [200,499]
trigger2 = movecontact
trigger3 = stateno = 1300 && animelem = 8 <= 0
trigger4 = stateno = 1100 && animelem = 2 <= 0
trigger5 = stateno = 1110 && animelem = 2 <= 0
trigger6 = stateno = 1111 && animelem = 2 <= 0
trigger7 = stateno = 3000 && animelem = 14 <= 0

;===========================================================================

[state -1]
type = changestate
value = 3300
triggerall = command = "palju"
triggerall = statetype = s 
triggerall = power >= 1000
trigger1 = ctrl = 1 
trigger2 = stateno = [200,499]
trigger2 = movecontact
trigger3 = stateno = 1300 && animelem = 8 <= 0
trigger4 = stateno = 1100 && animelem = 2 <= 0
trigger5 = stateno = 1110 && animelem = 2 <= 0
trigger6 = stateno = 1111 && animelem = 2 <= 0

;===========================================================================

[state -1]
type = changestate
value = 3200
triggerall = command = "gigantac"
triggerall = statetype = s 
triggerall = power >= 2000
trigger1 = ctrl = 1 
trigger2 = stateno = [200,499]
trigger2 = movecontact
trigger3 = stateno = 1300 && animelem = 8 <= 0
trigger4 = stateno = 1100 && animelem = 2 <= 0
trigger5 = stateno = 1110 && animelem = 2 <= 0
trigger6 = stateno = 1111 && animelem = 2 <= 0
trigger7 = stateno = 3000 && movecontact

;===========================================================================

[state -1]
type = changestate
value = 3100
triggerall = command = "hime"  
triggerall = statetype = s 
triggerall = power >= 3000
trigger1 = ctrl = 1 
trigger2 = stateno = [200,499]
trigger2 = movecontact
trigger3 = stateno = 1300 && animelem = 8 <= 0
trigger4 = stateno = 1100 && animelem = 2 <= 0
trigger5 = stateno = 1110 && animelem = 2 <= 0
trigger6 = stateno = 1111 && animelem = 2 <= 0
trigger7 = stateno = 3000 && animelem = 14 <= 0
trigger8 = stateno = 3410 && animelem = 65 <= 0

;===========================================================================

[state -1]
type = changestate
value = 3500
triggerall = command = "freeze"  
triggerall = statetype = s 
triggerall = power >= 3000
trigger1 = ctrl = 1 
trigger2 = stateno = [200,499]
trigger2 = movecontact
trigger3 = stateno = 1300 && animelem = 8 <= 0
trigger4 = stateno = 1100 && animelem = 2 <= 0
trigger5 = stateno = 1110 && animelem = 2 <= 0
trigger6 = stateno = 1111 && animelem = 2 <= 0
trigger7 = stateno = 3000 && animelem = 14 <= 0
trigger8 = stateno = 3410 && animelem = 65 <= 0

;===========================================================================

[state -1]
type = changestate
value = 3000
triggerall = command = "tenren"  
triggerall = statetype = s 
triggerall = power >= 1000
trigger1 = ctrl = 1 
trigger2 = stateno = [200,499]
trigger2 = movecontact
trigger3 = stateno = 1300 && animelem = 8 <= 0
trigger4 = stateno = 1100 && animelem = 2 <= 0
trigger5 = stateno = 1110 && animelem = 2 <= 0
trigger6 = stateno = 1111 && animelem = 2 <= 0

;===========================================================================

[state -1]
type = changestate
value = 1500
triggerall = command = "homi"  
triggerall = statetype = a 
trigger1 = ctrl = 1 
trigger2 = stateno = [600,699]
trigger2 = movecontact
trigger3 = stateno = 1410 && AnimElem = 9 >= 0

;===========================================================================

[state -1]
type = changestate
value = 1400
triggerall = command = "sasang"  
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = stateno = [200,499]
trigger2 = movecontact

;===========================================================================

[state -1]
type = changestate
value = 1430
triggerall = command = "godpush"  
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = stateno = [200,499]
trigger2 = movecontact

;===========================================================================

[state -1]
type = changestate
value = 1300
triggerall = command = "ssangjang"  
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = stateno = [200,499]
trigger2 = movecontact

;===========================================================================

[state -1]
type = changestate
value = 1310
triggerall = command = "teleport"  
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = stateno = [200,499]
trigger2 = movecontact

;===========================================================================

[state -1]
type = changestate
value = 1320
triggerall = command = "hopa"  
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = stateno = [200,499]
trigger2 = movecontact

;===========================================================================

[state -1]
type = changestate
value = 1200
triggerall = command = "homi"  
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = stateno = [200,499]
trigger2 = movecontact

;===========================================================================

[state -1]
type = changestate
value = 1210
triggerall = command = "ryua"  
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = stateno = [200,499]
trigger2 = movecontact

;===========================================================================

[state -1]
type = changestate
value = 1220
triggerall = command = "fake"  
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = stateno = [200,499]
trigger2 = movecontact

;===========================================================================

[state -1]
type = changestate
value = 1100
triggerall = command = "jhunsin"  
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = stateno = [200,499]
trigger2 = movecontact

;===========================================================================

[state -1]
type = changestate
value = 1110
triggerall = command = "jhunsinex"  
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = stateno = [200,499]
trigger2 = movecontact

;===========================================================================

[state -1]
type = changestate
value = 1120
triggerall = command = "jenoside"  
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = stateno = [200,499]
trigger2 = movecontact

;===========================================================================

[state -1]
type = changestate
value = 1000
triggerall = command = "balgi"  
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = stateno = [200,499]
trigger2 = movecontact

;===========================================================================

[state -1]
type = changestate
value = 1010
triggerall = command = "kaiser"  
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = stateno = [200,499]
trigger2 = movecontact

;===========================================================================

[state -1]
type = changestate
value = 1020
triggerall = command = "yuelfung"  
triggerall = statetype = s 
trigger1 = ctrl = 1 
trigger2 = stateno = [200,499]
trigger2 = movecontact

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

[state -1] 
type = changestate 
value = 115 
triggerall = command = "recovery"    
trigger1 = command = "holdback" && statetype = s && ctrl                                                                     
trigger2 = (stateno = 150 || stateno = 152) && command != "holdfwd" && power >= 500 

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

[state -1] 
type = changestate 
value = 110 
triggerall = command = "recovery"         
trigger1 = statetype = s && ctrl                                                                     
trigger2 = (stateno = 150 || stateno = 152) && power >= 500 

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

[State -1, UKEMI]
type = ChangeState
value = 5201
triggerall = command = "recovery"
triggerall = alive = 1
trigger1 = stateno = 5050
trigger1 = pos y > -30

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

[state -1, standing strong kick]
type = changestate
value = 250
triggerall = command = "cd"
trigger1 = statetype = s
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 5
trigger3 = (stateno = 230) && time > 6

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

[state -1,cd counter] 
type = changestate 
value = 255
triggerall = command = "cd" 
triggerall = power >= 1000 && life > 0 && statetype != a 
trigger1 = stateno = 150 
trigger2 = stateno = 152 

;---------------------------------------------------------------------------
;Run Fwd
;?ッシュ
[State -1, Run Fwd]
type = ChangeState
value = 100
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;Run Back
;後退?ッシュ
[State -1, Run Back]
type = ChangeState
value = 105
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;Kung Fu Throw
;投げ
[State -1, Kung Fu Throw]
type = ChangeState
value = 800
triggerall = command = "y"
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
trigger1 = command = "holdfwd"
trigger1 = p2bodydist X < 3
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H
trigger2 = command = "holdback"
trigger2 = p2bodydist X < 5
trigger2 = (p2statetype = S) || (p2statetype = C)
trigger2 = p2movetype != H

;---------------------------------------------------------------------------
;Kung Fu Throw
;投げ
[State -1, Kung Fu Throw]
type = ChangeState
value = 850
triggerall = command = "b"
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
trigger1 = command = "holdfwd"
trigger1 = p2bodydist X < 3
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H
trigger2 = command = "holdback"
trigger2 = p2bodydist X < 5
trigger2 = (p2statetype = S) || (p2statetype = C)
trigger2 = p2movetype != H

;===========================================================================
;---------------------------------------------------------------------------
;Stand Light Punch
;立ち弱パン?
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200
trigger2 = time > 6

;---------------------------------------------------------------------------
;Stand Strong Punch
;立ち強パン?
[State -1, Stand Strong Punch]
type = ChangeState
value = 210
triggerall = command = "z"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 5
trigger3 = (stateno = 230) && time > 6

;---------------------------------------------------------------------------
;Stand Strong Punch
;立ち強パン?
[State -1, Stand Strong Punch]
type = ChangeState
value = 220
triggerall = command = "y"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 5
trigger3 = (stateno = 230) && time > 6

;---------------------------------------------------------------------------
;Stand Light Kick
;立ち弱キック
[State -1, Stand Light Kick]
type = ChangeState
value = 230
triggerall = command = "a"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 7
trigger3 = (stateno = 230) && time > 9

;---------------------------------------------------------------------------
;Stand Light Kick
;立ち弱キック
[State -1, Stand Light Kick]
type = ChangeState
value = 260
triggerall = command = "b"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 7
trigger3 = (stateno = 230) && time > 9

;---------------------------------------------------------------------------
;Standing Strong Kick
;立ち強キック
[State -1, Standing Strong Kick]
type = ChangeState
value = 240
triggerall = command = "c"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 5
trigger3 = (stateno = 230) && time > 6

;---------------------------------------------------------------------------
;Taunt
;挑発
[State -1, Taunt]
type = ChangeState
value = 195
triggerall = command = "start"
trigger1 = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
;Crouching Light Punch
;しゃがみ弱パン?
[State -1, Crouching Light Punch]
type = ChangeState
value = 400
triggerall = command = "x"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl

;---------------------------------------------------------------------------
;Crouching Strong Punch
;しゃがみ強パン?
[State -1, Crouching Strong Punch]
type = ChangeState
value = 410
triggerall = command = "z"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = (stateno = 400) || (stateno = 430)
trigger2 = (time > 9) || (movecontact && time > 5)

;---------------------------------------------------------------------------
;Crouching Strong Punch
;しゃがみ強パン?
[State -1, Crouching Strong Punch]
type = ChangeState
value = 420
triggerall = command = "y"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = (stateno = 400) || (stateno = 430)
trigger2 = (time > 9) || (movecontact && time > 5)

;---------------------------------------------------------------------------
;Crouching Light Kick
;しゃがみ弱キック
[State -1, Crouching Light Kick]
type = ChangeState
value = 430
triggerall = command = "a"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = (stateno = 400) || (stateno = 430)
trigger2 = (time > 9) || (movecontact && time > 5)

;---------------------------------------------------------------------------
;Crouching Light Kick
;しゃがみ弱キック
[State -1, Crouching Light Kick]
type = ChangeState
value = 450
triggerall = command = "b"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = (stateno = 400) || (stateno = 430)
trigger2 = (time > 9) || (movecontact && time > 5)

;---------------------------------------------------------------------------
;Crouching Strong Kick
;しゃがみ強キック
[State -1, Crouching Strong Kick]
type = ChangeState
value = 440
triggerall = command = "c"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = (stateno = 400) || (stateno = 430)
trigger2 = (time > 9) || (movecontact && time > 5)

;---------------------------------------------------------------------------
;Jump Strong Kick
;空中強キック
[State -1, Jump Strong Kick]
type = ChangeState
value = 650
triggerall = command = "cd"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 || stateno = 630 ;jump_x or jump_a
trigger2 = movecontact
trigger3 = stateno = 1350 ;Air blocking

;---------------------------------------------------------------------------
;Jump Light Punch
;空中弱パン?
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall = command = "x"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600
trigger2 = statetime >= 7
trigger3 = stateno = 1350 ;Air blocking

;---------------------------------------------------------------------------
;Jump Light Punch
;空中弱パン?
[State -1, Jump Light Punch]
type = ChangeState
value = 620
triggerall = command = "y"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600
trigger2 = statetime >= 7
trigger3 = stateno = 1350 ;Air blocking

;---------------------------------------------------------------------------
;Jump Strong Punch
[State -1, Jump Strong Punch]
type = ChangeState
value = 610
triggerall = command = "z"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 || stateno = 630 ;jump_x or jump_a
trigger2 = movecontact
trigger3 = stateno = 1350 ;Air blocking

;---------------------------------------------------------------------------
;Jump Light Kick
[State -1, Jump Light Kick]
type = ChangeState
value = 630
triggerall = command = "a"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 1350 ;Air blocking

;---------------------------------------------------------------------------
;Jump Light Kick
[State -1, Jump Light Kick]
type = ChangeState
value = 660
triggerall = command = "b"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 1350 ;Air blocking

;---------------------------------------------------------------------------
;Jump Strong Kick
;空中強キック
[State -1, Jump Strong Kick]
type = ChangeState
value = 640
triggerall = command = "c"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 || stateno = 630 ;jump_x or jump_a
trigger2 = movecontact
trigger3 = stateno = 1350 ;Air blocking

[state -2]
type = varset
trigger1 = command = "ai_01"
trigger2 = command = "ai_02"
trigger3 = command = "ai_03"
trigger4 = command = "ai_04"
trigger5 = command = "ai_05"
var(30) = 1

[State -3]
Type = VarSet
triggerall = Var(30) = 1
trigger1 = Win = 1
trigger2 = Lose = 1
trigger3 = DrawGame = 1
trigger4 = RoundState = 4
var(30) = -1
IgnoreHitPause = 1

[State -3]
Type = VarSet
trigger1 = Var(30) = -1
trigger1 = RoundState = 1
var(30) = 1
IgnoreHitPause = 1

[State -2, SGuard]
type = ChangeState
Value = 130
triggerall = var(30) = 1
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2movetype = A && MoveType = I && InGuardDist
Triggerall = ctrl
Trigger1 = StateNo = 151 || StateNo = 153
Trigger1 = StateType = S && p2statetype = S && p2bodydist X < 50 && BackEdgeBodyDist > 30 
trigger2 = StateType = S && p2statetype = A
trigger2 = p2bodydist X < 50 
trigger3 = StateType = S && p2statetype = S && p2bodydist X < 50 && BackEdgeBodyDist <= 30 
trigger4 = enemynear,statetype = S && enemynear,movetype = A && (Prevstateno = 5120 || Prevstateno = 5200)
trigger4 = p2bodydist X < 50 
trigger4 = EnemyNear,HitDefAttr != SC,AT

[State -2, CGuard]
type = ChangeState
Value = 131
triggerall = var(30) = 1
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2statetype != A
triggerall = p2movetype = A && MoveType = I && InGuardDist
Triggerall = ctrl
Trigger1 = StateNo = 151 || StateNo = 153
Trigger1 = StateType = C && p2statetype = C && abs(enemynear,Pos X - Pos X)<= 70;&& BackEdgeBodyDist > 30
;Trigger2 = StateType = C && p2statetype = C && P2bodydist X < 70 && BackEdgeBodyDist <= 30
trigger2 = enemynear,statetype = C && enemynear,movetype = A && (Prevstateno = 5120 || Prevstateno = 5200)
trigger2 = p2bodydist X < 50 
trigger2 = EnemyNear,HitDefAttr != SC,AT
trigger3 = p2stateno = [99,101]
trigger4 = p2stateno = [400,499]

[State -2, AGuard]
type = ChangeState
Value = 132
triggerall = var(30) = 1
triggerall = RoundState = 2
triggerall = statetype = A
triggerall = p2statetype != L
triggerall = p2movetype = A && MoveType = I && InGuardDist
Triggerall = ctrl
trigger1 = P2bodydist X < 80;(abs(enemynear,Pos X - Pos X)<= 80
trigger2 = ctrl && enemynear,NumProj ;&& (enemynear,NumProj,Pos X - Pos X) >= 0

[State -2, 飛び道具ガ?ド]
type = ChangeState
value = 130
TriggerAll = Var(30) = 1
triggerall = RoundState = 2
;triggerall = enemynear,NumProj && MoveType = I && InGuardDist
trigger1 = ctrl && enemynear,NumProj && statetype != A 
trigger2 = inguarddist = [0,120]
trigger2 = ctrl && enemynear,NumProj && statetype != A 

[State -1, Jump]
type = ChangeState
value = 40
TriggerAll = Var(30) = 1 && StateType != A && Ctrl && enemynear,MoveType = I 
Trigger1 = abs(enemynear,Pos X - Pos X) <= 100 && EnemyNear,MoveType != A
Trigger1 = ifelse((enemynear,StateType = C),Random <= 150,random = [151,200])
Trigger2 = abs(enemynear,Pos X - Pos X) >= 190 && Random <= 100
trigger3 = (Enemy,NumHelper > 0 || Enemy,NumProj > 0) && (abs(enemynear,Pos X - Pos X) > 100) && random < 200;対飛び道具ジャンプ
trigger4 = (abs(enemynear,Pos Y - Pos Y) >= 30) && p2movetype = H && p2statetype = A;追い討ち用enemynear,
ignorehitpause = 0

[state -2]
type = changestate
value = 1020
triggerall = var(30) = 1                  
triggerall = statetype != a              
triggerall = ctrl 
trigger1 = p2bodydist x >= 40
trigger1 = random <= 200

[state -2]
type = changestate
value = 1010
triggerall = var(30) = 1                  
triggerall = statetype != a              
triggerall = ctrl 
trigger1 = p2bodydist x >= 40
trigger1 = random <= 200

[state -2]
type = changestate
value = 1100
triggerall = var(30) = 1                  
trigger1 = statetype != a              
trigger1 = ctrl 
trigger1 = p2bodydist x <= 40
trigger1 = random <= 200

[state -2]
type = changestate
value = 1120
triggerall = var(30) = 1                  
trigger1 = statetype != a              
trigger1 = ctrl 
trigger1 = p2bodydist x <= 40

[state -2]
type = changestate
value = 1400
trigger1 = var(30) = 1               
trigger1 = statetype != a              
trigger1 = ctrl 
trigger1 = p2bodydist x <= 40

[state -2]
type = changestate
value = 1500
trigger1 = var(30) = 1               
trigger1 = statetype = a              
trigger1 = ctrl 
trigger1 = p2bodydist x >= 40
trigger1 = stateno = 1410 && AnimElem = 9 >= 0

[state -2]
type = changestate
value = 1430
triggerall = var(30) = 1                  
trigger1 = statetype != a              
trigger1 = ctrl 
trigger1 = random <= 200

[state -2]
type = changestate
value = 3200
trigger1 = var(30) = 1   
trigger1 = power >= 2000               
trigger1 = statetype != a              
trigger1 = ctrl 
trigger1 = random <= 50

[state -2]
type = changestate
value = 3300
trigger1 = var(30) = 1   
trigger1 = power >= 1000               
trigger1 = statetype != a              
trigger1 = ctrl 
trigger1 = random <= 50

[state -2]
type = changestate
value = 3100
triggerall = var(30) = 1
trigger1 = P2BodyDist X = [-10,30]
trigger1 = ctrl
trigger1 = P2statetype = A
trigger1 = P2MoveType = A
trigger1 = enemy,Pos Y = [-80,-60]
trigger1 = P2statetype != A
trigger1 = enemy,stateno != [120,159]
trigger1 = P2MoveType = H
trigger1 = ((stateno = 215) || (stateno=400)) && (movecontact)

[state -2]
type = changestate
value = 3500
trigger1 = var(30) = 1   
trigger1 = power >= 3000               
trigger1 = statetype != a              
trigger1 = ctrl 
trigger1 = p2bodydist x >= 40
trigger1 = random <= 200

[State -1]
type = ChangeState
value = 3400
triggerall = var(30) = 1
triggerall = p2life > 0
triggerall = statetype != A
triggerall = p2bodydist x < 41
triggerall = p2statetype != A && p2statetype != L
triggerall = power >= 1000
trigger1 = ctrl

[State -1]
type = ChangeState
value = 1310
trigger1 = var(30) = 1
trigger1 = p2statetype != L
trigger1 = p2life > 0
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = P2BodyDist X > 100 || P2BodyDist X < 300
trigger1 = p2movetype != A && p2statetype != A

[State -1]
type = ChangeState
value = 1220
trigger1 = var(30) = 1
trigger1 = p2statetype != L
trigger1 = p2life > 0
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = P2BodyDist X > 100 || P2BodyDist X < 300
trigger1 = p2movetype != A && p2statetype != A

[State -1, AI Psycho Reflector]
type = ChangeState
value = 1200
trigger1 = var(30) = 1 && (P2Life > 0)
trigger1 = (StateType != A)  && (ctrl)
trigger1 = (enemy, numproj > 0) && (P2BodyDist x >= 250)
trigger1 = (P2BodyDist x <= 40) && (P2BodyDist x >= 10) && (random <= 100) && (p2stateno = 20)

[State -1, AI Psycho Reflector]
type = ChangeState
value = 1210
trigger1 = var(30) = 1 && (P2Life > 0)
trigger1 = (StateType != A)  && (ctrl)
trigger1 = (enemy, numproj > 0) && (P2BodyDist x <= 100)
trigger1 = (P2BodyDist x <= 40) && (P2BodyDist x >= 10) && (p2stateno = 20)
trigger1 = EnemyNear,HitDefAttr = SCA,AT,NP,SP,HP,ST,NT,HT

[State -3]
Type = ChangeState
Value = 430
triggerall = Var(30) = 1
triggerall = StateType != A
triggerall = P2MoveType != H
triggerall = enemy,Pos Y = 0
trigger1 = enemy,stateno != [5100,5199]
trigger1 = P2BodyDist X = [-20,20]
trigger1 = ctrl
trigger1 = stateno = 100

[State -3]
Type = ChangeState
Value = 400
triggerall = Var(30) = 1
triggerall = P2StateNo != [811,899]
triggerall = P2StateNo != [5100,5119]
triggerall = StateType != A
triggerall = P2MoveType != A
triggerall = EnemyNear,MoveType != A
trigger1 = MoveHit
trigger1 = StateNo = 430
trigger1 = P2BodyDist X = [-40,40]

[State -1]
type = ChangeState
value = 100
triggerall = var(30) = 1
triggerall = p2statetype != A
triggerall = p2movetype != A
triggerall = p2statetype != L
triggerall = p2stateno != 5120
triggerall = P2bodydist X > 150
trigger1 = statetype = S
trigger1 = ctrl
trigger1 = Enemy, Numproj = 0 && Enemy, Numhelper = 0

[State -2]
type = ChangeState
value = 800
triggerall = Var(30) = 1
triggerall = statetype = S && (ctrl || (stateno = 100))
trigger1 = (p2BodyDist X = [-5,5]) && (p2movetype != H)
trigger2 = (p2statetype = S) || (p2statetype = C)