[statedef -3]

[State -2, AIƒXƒCƒbƒ`]
type = DisplayToClipboard
trigger1 = 1
text="var39  %d,"
params = var(39)

[State -3, AI]
TYPE = varset
Triggerall = RoundState >= 2
Trigger1 = Command = "CPU1"||Command = "CPU2"||Command = "CPU3"
Trigger2 = Command = "CPU4"||Command = "CPU5"||Command = "CPU6"
Trigger3 = Command = "CPU7"||Command = "CPU8"||Command = "CPU9"
Trigger4 = Command = "CPU10"||Command = "CPU11"||Command = "CPU12"
Trigger5 = Command = "CPU13"||Command = "CPU14"||Command = "CPU15"
Trigger6 = Command = "CPU16"||Command = "CPU17"||Command = "CPU18"
Trigger7 = Command = "CPU19"||Command = "CPU20"||Command = "CPU21"
Trigger8 = Command = "CPU22"||Command = "CPU23"||Command = "CPU24"
Trigger9 = Command = "CPU25"||Command = "CPU26"||Command = "CPU27"
Trigger10 = Command = "CPU28"||Command = "CPU29"||Command = "CPU30"
Trigger11 = Command = "CPU31"||Command = "CPU32"||Command = "CPU33"
Trigger12 = Command = "CPU34"||Command = "CPU35"||Command = "CPU36"
Trigger13 = Command = "CPU37"||Command = "CPU38"||Command = "CPU39"
Trigger14 = Command = "CPU40"||Command = "CPU41"||Command = "CPU42"
Trigger15 = Command = "CPU43"||Command = "CPU44"||Command = "CPU45"
Trigger16 = Command = "CPU46"||Command = "CPU47"||Command = "CPU48"
Trigger17 = Command = "CPU49"||Command = "CPU50"
var(59) = 10				;AI Level, 0(No AI), 1(Low),2,3...10(Highest)
IgNoreHitPause = 1

;----------------------------------Jump&Dash control------------------------------------------
[state -3, jump control]
type = changestate
value = 0
ctrl = 1
triggerall = var(59) != 0
triggerall = stateno = 40
trigger1 = random <= 800
trigger2 = (var(39) = [5,30])
trigger3 = (var(39) = [5,30])

[state -3, jump control]
type = changestate
value = 100
ctrl = 1
triggerall = var(59) != 0
trigger1 = stateno = 40
trigger1 = var(39) = [60,69]

[state -3, dash control]
type = changestate
value = 0
ctrl = 1
triggerall = var(59) != 0
trigger1 = (var(39) = [5,30])&&(stateno = 100)
trigger2 = (var(39) = [5,30])&&(stateno = 101)


;------------------------------------Reversals-------------------------------------------
[state -3, reversal]					;power gradation X
type = ChangeState
value = 1300
triggerall = var(59) != 0 && RoundState = 2
triggerall = ctrl
trigger1 = statetype != A
trigger1 = P2movetype = A || Enemynear,MoveType = A
trigger1 = P2BodyDist X <= 30
trigger1 = random <= var(59)*20

[state -3, reversal]					;power gradation Z(anti air)
type = ChangeState
value = 1320
triggerall = var(59) != 0 && RoundState = 2
triggerall = ctrl
trigger1 = Statetype != A
trigger1 = Enemynear,statetype = A
trigger1 = Enemynear,MoveType = A
trigger1 = Enemynear,Vel Y > 0
trigger1 = P2BodyDist X = [31,80]
trigger1 = random <= var(59)*20

[state -3, reversal]					;crystal rose
type = ChangeState
value = 1700
triggerall = var(59) != 0 && RoundState = 2
triggerall = ctrl
triggerall = power >= 1000
trigger1 = statetype != A
trigger1 = P2movetype = A || Enemynear,MoveType = A
trigger1 = P2BodyDist X <= 30
trigger1 = random <= var(59)*25

[state -3, reversal]					;splash gradation
type = ChangeState
value = 1500
triggerall = var(59) != 0 && RoundState = 2
triggerall = ctrl
triggerall = power >= 1000
trigger1 = statetype != A
trigger1 = P2movetype = A || Enemynear,MoveType = A
trigger1 = P2BodyDist X <= 50
trigger1 = random <= var(59)*15

;--------------------------------------Guard---------------------------------------------
[State -3, guard start]
type = ChangeState
value = 120
triggerall = var(59) != 0 && RoundState = 2
triggerall = ctrl && stateno != [120,155]
triggerall = Random <= (var(59)*99)
trigger1 = InGuardDist || abs(P2dist X) = [-20, 60]
trigger1 = P2movetype = A || Enemynear,MoveType = A
trigger2 = InguardDist || abs(P2dist X) = [-20, 60]
trigger2 = enemynear,NumProj > 0
trigger3 = InguardDist || abs(P2dist X) = [-20, 60]
trigger3 = var(39) = 0 && enemynear,NumHelper > 0
trigger4 = !inguarddist
trigger4 = Enemynear,Vel X > 0
trigger4 = Enemynear,Movetype = A

;-------------------------------combination attack---------------------------------------
[state -3, AI combo]					;combo var reset
type = VarSet
triggerall = var(59) != 0 && RoundState = 2
triggerall = Var(39) > 0 
trigger1 = StateNo = [120,159]
trigger2 = StateNo = [5000,5999]
trigger3 = stateno = 250				;dash X
trigger3 = animelem = 2 && !movehit
trigger4 = stateno = 420 && time = 1			;crouch hard slash far
trigger5 = stateno = 450				;dash Z
trigger5 = time = 15 && !movehit
trigger6 = stateno = 460 && time = 1			;crouch hard slash near
trigger7 = stateno = 530 && !movecontact		;2 kick
trigger8 = var(39) = [60,69]
trigger8 = stateno = 540 && time = 1			;6 kick
trigger9 = stateno = 560 && time = 1			;dash kick
trigger10 = stateno = 1100				;tri-slash X
trigger10 = time = 31 && !movehit				
trigger11 = stateno = 1201				;violette lunge Y
trigger11 = time = 27 && !movehit
trigger12 = stateno = 1202 && time = 1			;violette lunge Z
trigger13 = stateno = 1310 && time = 1			;power gradation Y
trigger14 = stateno = 1402 && time = 1			;splash fount Z
trigger15 = stateno = 1450				;splash fount finish
trigger15 = time = 10 && !movehit
trigger16 = stateno = 1460				;splash fount missed
trigger17 = stateno = 1850 && time >= 24		;sp08b (missed)
trigger18 = (var(39) = [60,69]) && numhelper = 0
V = 39
Value = 0

[state -3, AI combo]					;damage reduction
type = attackmulset
value = 0.5
triggerall = (var(59) = [1,7]) && RoundState = 2
trigger1 = Var(39) > 0

[state -3, AI combo]					;combo var set
type = varset
triggerall = var(59) != 0 && RoundState = 2
trigger1 = stateno = 530 && movecontact
v = 39
value = 50

[state -3, AI combo]					;2kick -> 2 kick
type = changestate
value = 530
triggerall = var(59) != 0 && RoundState = 2
trigger1 = var(39) = 50
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = P2bodydist X <= 60
trigger1 = random <= 600

[state -3, AI combo]					;2kick -> crouch hard slash far
type = changestate
value = 420
triggerall = var(59) != 0 && RoundState = 2
trigger1 = var(39) = 50
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = P2bodydist X > 60
trigger1 = random <= var(59)*80

[state -3, AI combo]					;combo var set
type = varset
triggerall = var(59) != 0 && RoundState = 2
trigger1 = stateno = 1820
trigger1 = time = 1
v = 39
value = 5

[state -3, AI combo]					;sp08 -> splash fount Z
type = changestate
value = 1402
triggerall = var(59) != 0 && RoundState = 2
triggerall = var(39) = 5
triggerall = statetype != A
triggerall = enemynear,pos y >= -155
triggerall = ctrl
triggerall = frontedgedist > 100
trigger1 = var(59) = [1,9]
trigger1 = random <= (var(59)*99)
trigger2 = var(59) = 10

[state -3, AI combo]					;sp08 -> tri-slash X
type = changestate
value = 1100
triggerall = var(59) != 0 && RoundState = 2
triggerall = var(39) = 5
triggerall = statetype != A
triggerall = enemynear,pos y >= -160
triggerall = ctrl
triggerall = frontedgedist > 50
triggerall = frontedgedist <= 100
trigger1 = var(59) = [1,9]
trigger1 = random <= (var(59)*99)
trigger2 = var(59) = 10

[state -3, AI combo]					;sp08 -> 6 kick
type = changestate
value = 540
triggerall = var(59) != 0 && RoundState = 2
triggerall = var(39) = 5
triggerall = statetype != A
triggerall = enemynear,pos y >= -80
triggerall = ctrl
triggerall = frontedgedist <= 50
trigger1 = var(59) = [1,9]
trigger1 = random <= (var(59)*99)
trigger2 = var(59) = 10 

[state -3, AI combo]					;combo var set
type = varset
triggerall = var(59) != 0 && RoundState = 2
triggerall = var(39) = 5
trigger1 = stateno = 540
v = 39
value = 6

[state -3, AI combo]					;6 kick -> jump hard slash
type = changestate
value = 410
triggerall = var(59) != 0 && RoundState = 2
triggerall = var(39) = 6
triggerall = stateno = 540 && time = 8
trigger1 = var(59) = [1,9]
trigger1 = random <= (var(59)*99)
trigger2 = var(59) = 10 

[state -3, AI combo]					;sp08 -> crouch hard slash near
type = changestate
value = 460
triggerall = var(59) != 0 && RoundState = 2
triggerall = var(39) = 6
triggerall = statetype != A
triggerall = ctrl
triggerall = frontedgedist <= 50
trigger1 = var(59) = [1,9]
trigger1 = random <= (var(59)*99)
trigger2 = var(59) = 10 

[state -3, AI combo]					;combo ready
type = changestate
value = 11
triggerall = var(59) != 0 && RoundState = 2
triggerall = var(39) = 5
triggerall = ctrl
trigger1 = var(59) = [1,9]
trigger1 = random <= (var(59)*99)
trigger2 = var(59) = 10

[state -3, AI combo]					;combo var set
type = varset
triggerall = var(59) != 0 && RoundState = 2
triggerall = var(39) = 5
trigger1 = stateno = 1100 && movehit
v = 39
value = 10

[state -3, AI combo]					;tri-slash X -> splash fount Y
type = changestate
value = 1401
triggerall = var(59) != 0 && RoundState = 2
triggerall = var(39) = 10
triggerall = statetype != A
triggerall = ctrl
trigger1 = var(59) = [1,9]
trigger1 = random <= (var(59)*99)
trigger2 = var(59) = 10

[state -3, AI combo]					;combo var set
type = varset
triggerall = var(59) != 0 && RoundState = 2
triggerall = var(39) = 10
trigger1 = stateno = 1450 && movehit
v = 39
value = 15

[state -3, AI combo]					;splash fount Y -> vilette lunge Y
type = changestate
value = 1201
triggerall = var(59) != 0 && RoundState = 2
triggerall = var(39) = 15
triggerall = statetype != A
triggerall = ctrl
trigger1 = var(59) = [1,9]
trigger1 = random <= (var(59)*99)
trigger2 = var(59) = 10

[state -3, AI combo]					;combo var set
type = varset
triggerall = var(59) != 0 && RoundState = 2
triggerall = var(39) = 15
trigger1 = stateno = 1201 && movehit
v = 39
value = 20

[state -3, AI combo]					;sp08b
type = changestate
value = 1850
triggerall = var(59) != 0 && RoundState = 2
triggerall = statetype != A
triggerall = ctrl
trigger1 = var(39) = 20
trigger1 = random <= 100
trigger2 = var(39) = 30
trigger2 = P2bodydist X <= 50
trigger2 = var(59) = [1,9]
trigger2 = random <= (var(59)*99)
trigger3 = var(39) = 30
trigger3 = P2bodydist X <= 50
trigger3 = var(59) = 10

[state -3, AI combo]					;combo var set
type = varset
triggerall = var(59) != 0 && RoundState = 2
trigger1 = var(39) = 20
trigger1 = stateno = 1860
trigger1 = time = 1
v = 39
value = 25

[state -3, AI combo]					;combo var set
type = varset
triggerall = var(59) != 0 && RoundState = 2
trigger1 = var(39) = 30
trigger1 = stateno = 1860
trigger1 = time = 1
v = 39
value = 5

[state -3, AI combo]					;sp08b -> power gradation Y
type = changestate
value = 1310
triggerall = var(59) != 0 && RoundState = 2
trigger1 = var(39) = 25
trigger1 = statetype != A
;trigger1 = enemynear,time >= 16
trigger1 = ctrl

[state -3, AI combo]					;tri-slash -> dash Z
type = changestate
value = 450
triggerall = var(59) != 0 && RoundState = 2
triggerall = ctrl
triggerall = var(39) = 60
triggerall = enemynear, statetype != A
triggerall = P2bodydist X <= 50
tirgger1 = var(59) = [1,9]
trigger1 = random <= (var(59)*99)
trigger2 = var(59) = 10

[state -3, AI combo]					;combo var set
type = varset
triggerall = var(59) != 0 && RoundState = 2
trigger1 = stateno = 450
trigger1 = movehit
v = 39
value = 30

[state -3, AI combo]					;tri-slash -> dash X
type = changestate
value = 250
triggerall = var(59) != 0 && RoundState = 2
trigger1 = ctrl
trigger1 = var(39) = [60,69]
trigger1 = enemynear, statetype = A
trigger1 = P2bodydist X <= 30
trigger1 = random <= (var(59)*99)

[state -3, AI combo]					;combo var set
type = varset
triggerall = var(59) != 0 && RoundState = 2
trigger1 = stateno = 250
trigger1 = movehit
v = 39
value = 40

[state -3, AI combo]					;dash X -> violette lunge 
type = changestate
value = 1202
triggerall = var(59) != 0 && RoundState = 2
trigger1 = var(39) = 40
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = random <= (var(59)*99)

[state -3, AI combo]					;tri-slash -> dash kick
type = changestate
value = 560
triggerall = var(59) != 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl
trigger1 = var(39) = 65
trigger1 = enemynear, statetype = S
trigger1 = P2bodydist X < 70
trigger1 = random < (var(59)*30)
trigger2 = ctrl
trigger2 = var(39) = 65
trigger2 = enemynear, statetype = C
trigger2 = P2BodyDist X < 70
trigger2 = random < (var(59)*5)

[state -3, AI combo]					;tri-slash -> 6 kick
type = changestate
value = 540
triggerall = var(59) != 0 && RoundState = 2
triggerall = statetype != A
trigger1 = ctrl
trigger1 = var(39) = 65
trigger1 = enemynear, statetype = C
trigger1 = P2BodyDist X < 70
trigger1 = random < (var(59)*30)
trigger2 = ctrl
trigger2 = var(39) = 65
trigger2 = enemynear, statetype = S
trigger2 = P2bodydist X < 70
trigger2 = random < (var(59)*10)

;------------------------------------Walk&Dash-------------------------------------------
[State -3, AI Walk]
type = ChangeState
value = 20
triggerall = var(59) != 0 && RoundState = 2
trigger1 = statetype != A
trigger1 = ctrl && stateno != 20
trigger1 = random <= 80
ctrl = 1

[state -3, AI Dash]
type = changestate
value = 100
triggerall = var(59) != 0 && RoundState = 2
trigger1 = statetype != A
trigger1 = ctrl && stateno != 100
trigger1 = P2BodyDist X > 160
trigger1 = random <= 120
trigger2 = statetype != A
trigger2 = ctrl
trigger2 = var(39) = [60,69]
ctrl = 1

;--------------------------------------scuffle-------------------------------------------
[state -3, air attack]					;jump light slash
type = changestate
value = 210
triggerall = var(59) != 0 && RoundState = 2
trigger1 = statetype = A
trigger1 = ctrl
trigger1 = var(39) = 0
trigger1 = vel Y < 0
trigger1 = P2BodyDist X = [80,160]
trigger1 = random < 10

[state -3, air attack]					;jump hard slash
type = changestate
value = 410
triggerall = var(59) != 0 && RoundState = 2
trigger1 = statetype = A
trigger1 = ctrl
trigger1 = var(39) = 0
trigger1 = pos Y <= -15
trigger1 = random < 20
trigger2 = stateno = 105 || stateno = 540
trigger2 = time >= 2
trigger2 = random <= 40

[state -3, air attack]					;jump kick
type = changestate
value = 510
triggerall = var(59) != 0 && RoundState = 2
trigger1 = stateno = 105 || stateno = 540
trigger1 = time >= 2
trigger1 = random = [41,80]

;----------------------------------------------------------------------------------------
[state -3, Middle range attack]				;stand middle slash far
type = changestate
value = 330
triggerall = var(59) != 0 && RoundState = 2
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = var(39) = 0
trigger1 = (numhelper(1100) = 0)
trigger1 = (numhelper(1101) = 0)
trigger1 = (numhelper(1102) = 0)
trigger1 = enemynear,NumProj = 0
trigger1 = enemynear,NumHelper = 0
trigger1 = P2BodyDist X = [100,160]
trigger1 = random <= 20

[state -3, Middle range attack]				;3 kick
type = changestate
value = 520
triggerall = var(59) != 0 && RoundState = 2
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = var(39) = 0
trigger1 = (numhelper(1100) = 0)
trigger1 = (numhelper(1101) = 0)
trigger1 = (numhelper(1102) = 0)
trigger1 = P2BodyDist X = [100,120]
trigger1 = random = [21,50]

[state -3, Middle range attack]				;crouch hard slash far
type = changestate
value = 420
triggerall = var(59) != 0 && RoundState = 2
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = var(39) = 0
trigger1 = (numhelper(1100) = 0)
trigger1 = (numhelper(1101) = 0)
trigger1 = (numhelper(1102) = 0)
trigger1 = P2BodyDist X = [100,120]
trigger1 = random = [51,70]

[state -3, Middle range attack]				;tri-slash Y
type = changestate
value = 1101
triggerall = var(59) != 0 && RoundState = 2
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = var(39) = 0
trigger1 = (numhelper(1100) = 0)
trigger1 = (numhelper(1101) = 0)
trigger1 = (numhelper(1102) = 0)
trigger1 = P2BodyDist X = [40,140]
trigger1 = enemynear,statetype = L
trigger1 = random <= 120

;----------------------------------------------------------------------------------------
[state -3, short range attack]				;stand light slash far
type = changestate
value = 230
triggerall = var(59) != 0 && RoundState = 2
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = var(39) = 0
trigger1 = (numhelper(1100) = 0)
trigger1 = (numhelper(1101) = 0)
trigger1 = (numhelper(1102) = 0)
trigger1 = enemynear,NumProj = 0
trigger1 = enemynear,NumHelper = 0
trigger1 = P2BodyDist X = [40,100]
trigger1 = random <= 40

[state -3, short range attack]				;2 kick
type = changestate
value = 530
triggerall = var(59) != 0 && RoundState = 2
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = var(39) = 0
trigger1 = (numhelper(1100) = 0)
trigger1 = (numhelper(1101) = 0)
trigger1 = (numhelper(1102) = 0)
trigger1 = P2BodyDist X <= 70
trigger1 = random <= 40

[state -3, short range attack]				;stand hard slash far
type = changestate
value = 430
triggerall = var(59) != 0 && RoundState = 2
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = var(39) = 0
trigger1 = (numhelper(1100) = 0)
trigger1 = (numhelper(1101) = 0)
trigger1 = (numhelper(1102) = 0)
trigger1 = P2BodyDist X = [60,100]
trigger1 = random <= 40

[state -3, short range attack]				;crouch light slash far
type = changestate
value = 220
triggerall = var(59) != 0 && RoundState = 2
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = var(39) = 0
trigger1 = (numhelper(1100) = 0)
trigger1 = (numhelper(1101) = 0)
trigger1 = (numhelper(1102) = 0)
trigger1 = P2BodyDist X = [40,80]
trigger1 = random = [41,80]

[state -3, short range attack]				;sp08
type = changestate
value = 1800
triggerall = var(59) != 0 && RoundState = 2
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = var(39) = 0
trigger1 = (numhelper(1100) = 0)
trigger1 = (numhelper(1101) = 0)
trigger1 = (numhelper(1102) = 0)
trigger1 = enemynear,statetype != A
trigger1 = enemynear,statetype != L
trigger1 = enemynear,movetype  != A
trigger1 = P2BodyDist X = [45,80]
trigger1 = random < var(59)*10

;----------------------------------------------------------------------------------------
[state -3, far attack]					;violette lunge X
type = changestate
value = 1200
triggerall = var(59) != 0 && RoundState = 2
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = var(39) = 0
trigger1 = (numhelper(1100) = 0)
trigger1 = (numhelper(1101) = 0)
trigger1 = (numhelper(1102) = 0)
trigger1 = P2BodyDist X = [160,200]
trigger1 = random <= 20

[state -3, far attack]					;violette lunge Z
type = changestate
value = 1202
triggerall = var(59) != 0 && RoundState = 2
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = var(39) = 0
trigger1 = (numhelper(1100) = 0)
trigger1 = (numhelper(1101) = 0)
trigger1 = (numhelper(1102) = 0)
trigger1 = P2BodyDist X = [200,250]
trigger1 = random <= 15

[state -3, far attack]					;tri-slash Z
type = changestate
value = 1102
triggerall = var(59) != 0 && RoundState = 2
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = var(39) = 0
trigger1 = (numhelper(1100) = 0)
trigger1 = (numhelper(1101) = 0)
trigger1 = (numhelper(1102) = 0)
trigger1 = enemynear, movetype != A
trigger1 = P2BodyDist X = [200,250]
trigger1 = random <= 25

[state -3, far attack]					;dash Y
type = changestate
value = 350
triggerall = var(59) != 0 && RoundState = 2
trigger1 = stateno = 100
trigger1 = ctrl
trigger1 = var(39) = 0
trigger1 = (numhelper(1100) = 0)
trigger1 = (numhelper(1101) = 0)
trigger1 = (numhelper(1102) = 0)
trigger1 = P2BodyDist X = [160,200]
trigger1 = random <= 40

;----------------------------------------------------------------------------------------
[state -3, near attack]					;2 kick
type = changestate
value = 530
triggerall = var(59) != 0 && RoundState = 2
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = var(39) = 0
trigger1 = (numhelper(1100) = 0)
trigger1 = (numhelper(1101) = 0)
trigger1 = (numhelper(1102) = 0)
trigger1 = P2BodyDist X <= 30
trigger1 = random <= 60

[state -3, near attack]					;6 kick
type = changestate
value = 540
triggerall = var(59) != 0 && RoundState = 2
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = var(39) = 0
trigger1 = (numhelper(1100) = 0)
trigger1 = (numhelper(1101) = 0)
trigger1 = (numhelper(1102) = 0)
trigger1 = P2BodyDist X < 40
trigger1 = random = [61,120]

[state -3, near attack]					;crouch middle slash near
type = changestate
value = 360
triggerall = var(59) != 0 && RoundState = 2
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = var(39) = 0
trigger1 = (numhelper(1100) = 0)
trigger1 = (numhelper(1101) = 0)
trigger1 = (numhelper(1102) = 0)
trigger1 = P2BodyDist X < 40
trigger1 = random = [121,180]

[state -3, near attack]					;5 kick
type = changestate
value = 550
triggerall = var(59) != 0 && RoundState = 2
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = var(39) = 0
trigger1 = (numhelper(1100) = 0)
trigger1 = (numhelper(1101) = 0)
trigger1 = (numhelper(1102) = 0)
trigger1 = P2BodyDist X = [40,70]
trigger1 = random = [181,320]

[state -3, near attack]					;sp08
type = changestate
value = 1800
triggerall = var(59) != 0 && RoundState = 2
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = var(39) = 0
trigger1 = enemynear,statetype != A
trigger1 = enemynear,statetype != L
trigger1 = enemynear,movetype  != A
trigger1 = P2BodyDist X < 45
trigger1 = random < var(59)*5

[state -3, near attack]					;run back
type = changestate
value = 105
triggerall = var(59) != 0 && RoundState = 2
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = var(39) = 0
trigger1 = (numhelper(1100) = 0)
trigger1 = (numhelper(1101) = 0)
trigger1 = (numhelper(1102) = 0)
trigger1 = P2BodyDist X <= 45
trigger1 = BackEdgeBodyDist > 120
trigger1 = random < var(59)*8

;----------------------------------------------------------------------------------------
[state -3, other movements]				;rotate
type = changestate
value = 2900
triggerall = var(59) != 0 && RoundState = 2
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = var(39) = 0
trigger1 = (numhelper(1100) = 0)
trigger1 = (numhelper(1101) = 0)
trigger1 = (numhelper(1102) = 0)
trigger1 = enemynear,statetype != A
trigger1 = P2BodyDist X <= 30
trigger1 = random < var(59)
trigger2 = statetype != A
trigger2 = ctrl
trigger2 = (numhelper(1100) = 0)
trigger2 = (numhelper(1101) = 0)
trigger2 = (numhelper(1102) = 0)
trigger2 = P2BodyDist X <= 30
trigger2 = enemynear,stateno = 5120
trigger2 = random < var(59)*50
trigger3 = statetype != A
trigger3 = ctrl
trigger3 = (numhelper(1100) = 0)
trigger3 = (numhelper(1101) = 0)
trigger3 = (numhelper(1102) = 0)
trigger3 = enemynear,statetype != A
trigger3 = P2BodyDist X <= 30
trigger3 = BackEdgeBodyDist < 60
trigger3 = random < var(59)*20

[state -3, other movements]				;dodge
type = changestate
value = 2800
triggerall = var(59) != 0 && RoundState = 2
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = var(39) = 0
trigger1 = (numhelper(1100) = 0)
trigger1 = (numhelper(1101) = 0)
trigger1 = (numhelper(1102) = 0)
trigger1 = random <= var(59)

[state -3, other movements]				;dodge->attack
type = changestate
value = 2850
triggerall = var(59) != 0 && RoundState = 2
trigger1 = stateno = 2800
trigger1 = time >16
trigger1 = P2BodyDist X <= 30
trigger1 = random <= 120

[state -3, other movements]				;sp06(ready)
type = changestate
value = 1600
triggerall = var(59) != 0 && RoundState = 2
triggerall = power >=3000
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = var(39) = 0
trigger1 = (numhelper(1100) = 0)
trigger1 = (numhelper(1101) = 0)
trigger1 = (numhelper(1102) = 0)
trigger1 = enemynear,statetype != A
trigger1 = enemynear,statetype != L
trigger1 = enemynear,movetype  != A
trigger1 = P2BodyDist X = [100,200]
trigger1 = random <= 100
trigger1 = enemynear,life <= 500

[state -3, other movements]				;sp06(attack)
type = changestate
value = 1610
triggerall = var(59) != 0 && RoundState = 2
triggerall = stateno = 1600
trigger1 = (time = 6) && (random <= 250)
trigger2 = (time = 46) && (random <= 250)
trigger3 = (time = 86) && (random <= 250)
trigger4 = time = 106


;----------------------------------------------------------------------------------------
[state -3];breakfalls
type = ChangeState
TriggerAll =Var(59) != 0 && roundstate = 2 
trigger1 = alive
trigger1 = statetype = A && movetype = H 
trigger1 = gethitvar(hittime) = 0
trigger1 = canrecover
Trigger1 = Random < 500
value = 5210
