[Statedef -3]

[State -1,【AI开关】]
type = Varset
triggerall = !Ishelper
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"
trigger51 = command = "CPU51"
trigger52 = command = "CPU52"
trigger53 = command = "CPU53"
trigger54 = command = "CPU54"
trigger55 = command = "CPU55"
trigger56 = command = "CPU56"
trigger57 = command = "CPU57"
trigger58 = command = "CPU58"
trigger59 = command = "CPU59"
trigger60 = command = "CPU60"
trigger61 = 1;手操= 0  常时AI = 1
var(59) = 1


[State 0,投和闪避使用率]
type = VarSet
trigger1 = 1
var(16) = 1;1正常0较少

[State 0,连段中出招无敌]
type = VarSet
trigger1 = 1
var(9) = 0;开启后敌方受到攻击时,我方会有出招无敌

[State -1,CD-AI]
type = ChangeState
value = ifelse(Random <= 500,500,700)
triggerall = var(59) = 1
triggerall = statetype != A
triggerall = Power >= 3000
triggerall = stateno = [150,152]
trigger1 =  P2dist X = [-80,80]
trigger1 = p2statetype != A
trigger1 = p2movetype = A
trigger1 = random <= 200

[State -1, 忍之护身]
type = ChangeState
value = 3100
triggerall = roundstate = 2 && roundno >= 3
Triggerall = var(59) = 1 && numhelper(9998) = 0
triggerall = !var(17)
triggerall = statetype != A && P2Movetype != H
triggerall = power>=2000
trigger1 = life>=500
trigger1 = ctrl

[State -3,胜利挑衅]
type = ChangeState
value = 195
triggerall = var(59)
triggerall = statetype != A
triggerall = ctrl
triggerall = stateno != 195
triggerall = prevstateno != 195
triggerall = P2Life = 0
triggerall = roundstate = 3
trigger1 = life >= 300
trigger1 = random <= 90

[State -3]
type = ChangeState
value = 2150
triggerall = var(59) = 1 && roundstate  = 2
triggerall = Statetype != A && p2statetype !=L
triggerall = p2movetype = A  && p2movetype != H
trigger1 = ctrl|| stateno = 0||stateno = 10||stateno = 20||stateno = 102
triggerall = power>=1000
trigger1 = P2dist X != [-60,60]
Trigger1 = Random < 500

[state -3]
type = changestate
value = ifelse(Random <= 500,1500,1610)
triggerall = roundstate = 2 && var(59)=1 && statetype !=A
Trigger1 = P2dist X = [-60,60]
trigger1 = p2movetype != H
triggerall  = stateno = 900

[state -3]
type = changestate
value = 1300
triggerall = roundstate = 2 && var(59)=1 && statetype !=A
Trigger1 = P2dist X != [-60,60]
trigger1 = p2movetype = I
trigger1 = p2movetype != H
triggerall  = stateno = 900

[State -1,AI]
type = ChangeState
value = IfElse(random >= 499,IfElse(random <= 499,2200,2300),IfElse(random <= 499,2400,2500))
triggerall=var(59)=1 && P2movetype = H
triggerall = Power>=2000 && Life>=300
trigger1 = stateno = 2102 && Animtime = 0

;残血

[State -1, AI]
type = ChangeState
value = 1150
triggerall = var(59) = 1
triggerall = roundstate = 2 && life<=300
triggerall = Power<=3000 && Life<=300
trigger1 = stateno = 245 && time>=30
trigger2 = stateno = 215 && movehit

[State -1,AI]
type = ChangeState
value = ifelse(Random <= 500,1100,2150)
triggerall=var(59)=1 && P2movetype = H
triggerall = Power>=1000
triggerall = P2dist X != [-60,60]
trigger1 = stateno = 801 && Animtime = 0

[State -1,AI]
type = ChangeState
value = ifelse(Random <= 500,3000,3200)
triggerall = Var(59) = 1 && P2movetype = H
triggerall = Power>=3000 && Life<=300
trigger1 = stateno = 500 && movecontact
trigger2 = stateno = 245 && time>=30
trigger3 = stateno = 410 && movehit

[State -1,AI]
type = ChangeState
value = 2000
triggerall = var(59)=1 && P2movetype = H
triggerall = Power>=1000
trigger1 = stateno = 1751 && Animtime = 0

[State -1,AI]
type = ChangeState
value = ifelse(Random <= 500,2050,2100)
triggerall = var(59)=1 && P2movetype = H
triggerall = Power>=1000
trigger1 = stateno = 1352 && Animtime = 0

[State -1,AI]
type = ChangeState
value = 2200
triggerall = var(59)=1 && P2movetype = H
triggerall = Power>=2000
trigger1 = stateno = 2001 && Animtime = 0

[State -1,AI]
type = ChangeState
value = 1900
triggerall = var(59)=1 && P2movetype = H
trigger1 = stateno = 1402 && Animtime = 0

[State -1,AI]
type = ChangeState
value = 1550
triggerall = var(59)=1 && P2movetype = H
trigger1 = stateno = 1650 && time >= 15

[State -1,AI]
type = ChangeState
value = 1650
triggerall=var(59)= 1 && P2movetype = H
trigger1 = stateno = 1855 && time >= 10

[State -1,AI]
type = ChangeState
value = 1900
triggerall=var(59)=1 && P2movetype = H
trigger1 = stateno = 1552 && Animtime = 0

[State -1,AI]
type = ChangeState
value = ifelse(Random <= 500,1750,1250)
triggerall=var(59)=1 && P2movetype = H && Life>=300
trigger1 = stateno = 1151 && Animtime = 0

[State -1,AI]
type = ChangeState
value = ifelse(Random <= 500,800,1610)
triggerall = var(59)=1 && P2movetype != H && var(16) = 1
trigger1 = stateno = 230 && Animtime = 0
trigger2 = stateno = 430 && Animtime = 0
trigger3 = stateno = 1000 && Animtime = 0
trigger4 = stateno = 1300 && Animtime = 0
trigger5 = stateno = 1150 && Animtime = 0
trigger6 = stateno = 1601 && Animtime = 0

[State -1,AI]
type = ChangeState
value = 1100
triggerall=var(59)=1 && P2movetype = H
triggerall = Power<=999
trigger1 = stateno = 1900 && Animtime = 0

[State -3]
type = ChangeState
value = ifelse(Random <= 500,3000,3200)
triggerall = var(59) = 1
triggerall = power >=3000 && life <=300
trigger1 = stateno = 2001 && Animtime = 0
trigger2 = stateno = 2102 && Animtime = 0

[State -1,AI]
type = ChangeState
value = 1650
triggerall = Var(59) = 1 && P2movetype = H
triggerall = P2dist X != [-80,80]
trigger1 = stateno = 500 && Animtime = 0
trigger1 = P2stateno = 511

[State -1,AI]
type = ChangeState
value = ifelse(Random <= 500,500,500)
triggerall = Var(59) = 1 && P2movetype = H
triggerall = P2dist X = [-100,100]
trigger1 = stateno = 500 && Animtime = 0
trigger1 = P2stateno = 511

[State -3]
type = ChangeState
value = ifelse(Random <=666,Ifelse(random<=333,1400,1650),1750)
triggerall = Var(59) = 1 && statetype != A
triggerall = P2stateno = 1220 &&Enemy,pos y>=-150
trigger1 = stateno = 102
trigger2 = Ctrl

[State -3]
type = ChangeState
value = 2200
triggerall=var(59) = 1
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = Power>=2000
triggerall = P2stateno = 2063 &&Enemy,pos y>=-90
trigger1 = stateno = 102
trigger2 = Ctrl

[State -3]
type = ChangeState
value = 2100
triggerall=var(59) = 1
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = Power>=1000
triggerall = P2stateno = 1911 &&Enemy,pos y>=-80
trigger1 = stateno = 102
trigger2 = Ctrl

[State -3,]
type = ChangeState
value = 1100
triggerall = var(59)=1
triggerall = statetype != A
triggerall = roundstate = 2
Trigger1 = P2stateno = 1520 && enemy,time = 20
Trigger1 = ctrl|| stateno = 0 || stateno = 10|| stateno = 11 || stateno = 20|| stateno = 21 || stateno = 102

[State -3,]
type = ChangeState
value = ifelse(Random <= 500,3000,3200)
triggerall = var(59)=1
triggerall = statetype != A
triggerall = roundstate = 2
triggerall = Power>=3000
Trigger1 = P2stateno = 2313 && enemy,time = 35
Trigger1 = ctrl|| stateno = 0 || stateno = 10|| stateno = 11 || stateno = 20|| stateno = 21 || stateno = 102

[State -3,]
type = ChangeState
value = 2200
triggerall = var(59)=1
triggerall = statetype != A
triggerall = roundstate = 2
triggerall = Power>=2000
Trigger1 = P2stateno = 2012 && enemy,time = 24
Trigger1 = ctrl|| stateno = 0 || stateno = 10|| stateno = 11 || stateno = 20|| stateno = 21 || stateno = 102

;站立一套
[State -1, AI]
type = ChangeState
value = 200
triggerall= var(59) = 1
triggerall = roundstate = 2
trigger1 = stateno = 230 && movecontact

[State -1, AI]
type = ChangeState
value = 215
triggerall = var(59) = 1
triggerall = roundstate = 2
trigger1 = stateno = 200 && movecontact

[State -1, AI]
type = ChangeState
value = 210
triggerall = var(59) = 1
triggerall = roundstate = 2
trigger1 = stateno = 215 && movecontact

[State -1, AI]
type = ChangeState
value = 245
triggerall = var(59) = 1
triggerall = roundstate = 2
trigger1 = stateno = 210 && movecontact

;下蹲一套
[State -1, AI]
type = ChangeState
value = 400
triggerall = var(59)=1
triggerall = roundstate = 2
trigger1 = stateno = 430 && movecontact

[State -1, AI]
type = ChangeState
value = 410
triggerall = var(59)=1
triggerall = roundstate = 2
trigger1 = stateno = 400 && movecontact

[State -1, AI]
type = ChangeState
value = 245
triggerall = var(59)=1
triggerall = roundstate = 2
trigger1 = stateno = 410 && movecontact

;空中一套

[State -1,AI]
type = ChangeState
value = 41
triggerall = var(59) = 1 && P2movetype = H
trigger1 = stateno = 1950 && Animtime = 0

[State -1, AI]
type = ChangeState
value = 600
triggerall = var(59)=1
triggerall = roundstate = 2
triggerall = p2stateno = 1953
trigger1 = stateno = 42 && time >= 5

[State -1, AI]
type = ChangeState
value = 610
triggerall = var(59)=1
triggerall = roundstate = 2
trigger1 = stateno = 600 && movecontact

[State -1, AI]
type = ChangeState
value = 640
triggerall = var(59)=1
triggerall = roundstate = 2
trigger1 = stateno = 610 && movecontact

[State -1, AI]
type = ChangeState
value = 1350
triggerall = var(59)=1
triggerall = roundstate = 2
trigger1 = stateno = 640 && movecontact

[State -1,AI]
type = ChangeState
value = ifelse(Random <= 500,900,900)
triggerall = var(59)=1 && P2movetype = H
triggerall = Power<=1999
trigger1 = stateno = 2102 && Animtime = 0
trigger2 = stateno = 2001 && Animtime = 0
trigger3 = stateno = 2051 && Animtime = 0

[State -1,AI]
type = ChangeState
value = ifelse(Random <= 500,900,900)
triggerall = var(59)=1 && P2movetype = H
triggerall = facing =enemy,facing
triggerall = Power<=1999
trigger1 = stateno = 2206 && Animtime = 0

[State -1,无波接近]
type = ChangeState
value = IfElse(random >= 499,IfElse(random <= 499,102,1000),IfElse(random <= 499,1300,1800))
triggerall = var(59) = 1 && roundstate = 2
triggerall = Statetype != A&&!Numhelper(1001)&&!Numhelper(1004)&&P2stateno != 1020
triggerall = p2statetype != A && p2statetype != L
triggerall = stateno != 102
triggerall = p2movetype != H
triggerall = ctrl
trigger1 = P2dist X != [-90,90]

[State -1,有波接近]
type = ChangeState
value = ifelse(Random <= 500,102,1300)
triggerall = var(59) = 1 && roundstate = 2
triggerall = Statetype != A && Numhelper(1001)= 1
triggerall = p2statetype != A && p2statetype != L
triggerall = stateno != 102 && prevstateno = 102
triggerall = p2movetype != H
triggerall = ctrl
trigger1 = P2dist X != [-90,90]

[State -1,无波接近]
type = ChangeState
value = ifelse(Random <=666,Ifelse(random<=333,102,102),20)
triggerall = var(59) = 1 && roundstate = 2
triggerall = Statetype != A
triggerall = p2statetype != A && p2statetype != L
triggerall = stateno != 102
triggerall = p2movetype != H
triggerall = ctrl
trigger1 = P2dist X != [-50,50]

[State -1,版边逃避]
type = ChangeState
value = 1600
triggerall = var(59) = 1 && roundstate = 2
triggerall = Statetype != A
triggerall = p2statetype != A && p2statetype != L
triggerall = P2movetype != H
triggerall = P2movetype = A
triggerall = BackEdgeBodyDist <= 10
triggerall = P2dist X = [-80,80]
trigger1 = stateno = 0||stateno = 10||stateno = 20||stateno = 102

[State -1,起手受撃]
type = ChangeState
value = ifelse(Random <= 500,230,430)
triggerall = var(59) = 1 && roundstate = 2
triggerall = Statetype != A
triggerall = p2statetype != A && p2statetype != L
triggerall = P2movetype = H
triggerall = P2dist X = [-50,50]
trigger1 = stateno = 0||stateno = 10||stateno = 20||stateno = 102

[State -3,随即组（起手）]
type = ChangeState
value = ifelse(Random <=666,Ifelse(random<=333,230,430),1150)
triggerall = var(59) =1 && roundstate  = 2
triggerall = Statetype != A
triggerall = p2statetype != A
triggerall = p2statetype != L
triggerall = P2movetype != H
trigger1 = ctrl|| stateno = 0  || stateno = 20|| stateno = 21 || stateno = 100|| stateno = 102  || stateno = 18|| stateno = 19 || stateno = 10
trigger1 = P2dist X = [-50,50]

[State -3,攻击闪避]
type = ChangeState
value = ifelse(Random <=666,Ifelse(random<=333,740,1610),1600)
triggerall = var(59) =1 && roundstate  = 2
triggerall = Statetype != A
triggerall = p2statetype != A
triggerall = p2statetype != L
triggerall = p2movetype = A
trigger1 = ctrl|| stateno = 0  || stateno = 20|| stateno = 21 || stateno = 100|| stateno = 102  || stateno = 18|| stateno = 19 || stateno = 10
trigger1 = P2dist X = [-50,50]

[State -1, AI]
type = ChangeState
value = ifelse(Random <= 500,3000,3200)
triggerall = var(59) = 1
triggerall = roundstate = 2 && Power>=3000 && life<=300
triggerall = P2Movetype = H
triggerall = P2dist X = [-50,50]
triggerall = p2stateno = 8864
trigger1 = stateno = 0||stateno = 10||stateno = 20

[State -1, AI]
type = ChangeState
value = 102
triggerall = var(59) = 1
triggerall = roundstate = 2
triggerall = P2Movetype = H
triggerall = P2dist X != [-50,50]
trigger1 = stateno = 0||stateno = 10||stateno = 20
trigger1 = p2stateno = [8884,8885]

[State -3]
type = ChangeState
value = IfElse(random >= 499,IfElse(random <= 499,500,1400),IfElse(random <= 499,1200,1750))
triggerall = var(59) = 1
triggerall = roundstate = 2
triggerall = P2Movetype = H
triggerall = P2dist X = [-50,50]
triggerall = p2stateno = 8864
trigger1 = stateno = 0||stateno = 10||stateno = 20

[State -1, AI]
type = ChangeState
value = 102
triggerall = var(59) = 1
triggerall = roundstate = 2
triggerall = P2Movetype = H
triggerall = P2dist X != [-50,50]
triggerall = stateno != 102
triggerall = p2stateno = 8864
trigger1 = stateno = 0||stateno = 10||stateno = 20

[State -1, 定身接近]
type = ChangeState
value = 102
triggerall = var(59)= 1
triggerall = roundstate = 2
triggerall = prevstateno != 102
triggerall = Ctrl
triggerall = statetype != A
trigger1 = P2dist X != [-50,50]
trigger1 = P2stateno = 1020 || P2stateno = 813|| P2stateno = 2155|| P2stateno = 9997
trigger2 = P2movetype = H && P2statetype != L

[State -1, AI]
type = ChangeState
value = ifelse(Random <= 500,1200,1750)
triggerall = var(59) = 1
triggerall = roundstate = 2
triggerall = P2Movetype = H
triggerall = P2dist X = [-50,50]
triggerall = p2stateno = 2161
trigger1 = stateno = 0||stateno = 10||stateno = 20

[State -1, AI]
type = ChangeState
value = IfElse(random >= 499,IfElse(random <= 499,1700,1100),IfElse(random <= 499,1850,1950))
triggerall=var(59)=1
triggerall = roundstate = 2
trigger1 = stateno = 245 &&time>=30&& movecontact

[State -1, AI]
type = ChangeState
value = ifelse(Random <= 500,1200,1250)
triggerall=var(59)=1
triggerall = roundstate = 2
trigger1 = stateno = 1705 &&time<=2

[State -1, AI]
type = ChangeState
value = 41
triggerall = var(59) = 1
triggerall = roundstate = 2
triggerall = P2dist X = [-50,50]
triggerall = stateno = 0 || stateno = 102
trigger1 = p2stateno = 1020 || p2stateno = 2155|| p2stateno = 9997

[State -1, AI]
type = ChangeState
value = 660
triggerall = var(59) = 1
triggerall = roundstate = 2
triggerall = P2dist X = [-50,50]
triggerall = stateno = 42 && time>=25
trigger1 = p2stateno = 1020 || p2stateno = 2155|| p2stateno = 9997

;防御面
[State -1, 回避飞道]
type = ChangeState
value = ifelse(Random <=666,Ifelse(random<=333,1600,740),1600)
triggerall = var(59) = 1
triggerall = statetype !=A
triggerall = roundstate = 2 && ctrl|| stateno = 0  || stateno = 20|| stateno = 21 || stateno = 100|| stateno = 102  || stateno = 18|| stateno = 19 || stateno = 10
triggerall = facing != enemy,facing
trigger1 = enemynear,numproj >=1 || (enemynear,numhelper >=1 && p2movetype = A)
trigger1 = inguarddist
triggerall  = stateno != 700

[State -1,投技抵抗A]
type= ChangeState
value = ifelse(Random <= 500,1600,740)
triggerall = roundstate = 2 && statetype != A && var(59)=1 && statetype !=A
triggerall = EnemyNear,StateType != L && facing !=enemy,facing
triggerall = EnemyNear,MoveType != H
triggerall = ctrl|| stateno = 0  || stateno = 20|| stateno = 21 || stateno = 100|| stateno = 102  || stateno = 18|| stateno = 19 || stateno = 10
triggerall = backedgebodydist>40
triggerall = inguarddist||Enemynear,movetype = A
trigger1 = Enemynear,Hitdefattr = SCA,AT

[State -1,投技抵抗B]
type=ChangeState
value = ifelse(Random <= 500,1600,740)
triggerall = roundstate = 2 && statetype != A && var(59)=1 && statetype !=A
triggerall = inguarddist||Enemynear,movetype = A  && facing !=enemy,facing
trigger1 = Enemynear,Hitdefattr = SCA,AT
triggerall  = ctrl

[State -1,投技抵抗D]
type= ChangeState
value = ifelse(Random <= 500,1610,740)
triggerall = roundstate = 2 && statetype != A && var(59)=1 && statetype !=A
triggerall = inguarddist||Enemynear,movetype = A
trigger1 = Enemynear,Hitdefattr = SCA,AT
triggerall  = stateno = 52

[State -1,起跳感应（近）]
type =  ChangeState
value = ifelse(Random <=666,Ifelse(random<=333,1400,1400),1405)
triggerall=var(59)=1
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = facing != enemy,facing
triggerall = ctrl|| stateno = 0  || stateno = 18|| stateno = 19 || stateno = 20|| stateno = 21 || stateno = 102
triggerall = P2bodydist X = [-10,30]
triggerall = P2bodydist y >= -72
triggerall = P2statetype != L
triggerall = P2movetype != H
trigger1 = P2Statetype = A

[state -1, 落地受身]
type = changestate
value = 730
triggerall = var(59)=1
triggerall = roundstate = 2
triggerall = movetype = H
triggerall = stateno = [5100,5110]
triggerall = pos y =0
Triggerall = Random <= 150
trigger1= life != 0

[State -1,对方起身闪]
type = ChangeState
value = ifelse(Random <= 500,105,1610)
triggerall = var(59)=1
triggerall = RoundState = 2
trigger1 = ctrl && statetype != A
trigger1 = p2stateno = [5120,5121]
trigger1 = P2dist X = [0,55]
trigger1 = ctrl|| stateno = 0  || stateno = 20|| stateno = 21 || stateno = 102

[State -1,起身反应（P2站立）]
type = ChangeState
value = ifelse(Random <= 500,1500,1610)
triggerall = var(59)=1
trigger1 = stateno = 5120 && Animtime = 0
triggerall = P2bodydist X =  [-60,60]

[State -3,立防A]
type = ChangeState
value = 130
triggerall = var(59) = 1 && statetype !=A
triggerall = p2statetype != C
triggerall = ctrl|| stateno = 0  || stateno = 20|| stateno = 21 || stateno = 100|| stateno = 101  || stateno = 18|| stateno = 19 || stateno = 10
trigger1 = inguarddist&& p2movetype !=H
trigger2 = p2bodydist x < 0 && p2movetype = A

[State -3,蹲防A]
type = ChangeState
value = 131
triggerall = var(59) = 1 && statetype !=A
triggerall = p2statetype = C
triggerall = ctrl|| stateno = 0  || stateno = 20|| stateno = 21 || stateno = 100|| stateno = 101  || stateno = 18|| stateno = 19 || stateno = 10 && p2statetype !=A
trigger1 = inguarddist && p2movetype !=H
trigger2 = p2bodydist x < 0 && p2movetype = A

[State -3, 发呆]
type = ChangeState
value = 0
triggerall = Var(59) = 1
triggerall = roundstate = 2
trigger1 = stateno = 10|| stateno = 20|| stateno = 40
Ctrl = 1
