;AI
[Statedef -3]
;---------------------------------------------------------------------------
[State -3, AI Level]
type = VarSet
triggerall = !var(59)
triggerall = RoundState = [1,2]
Trigger1 = Command = "AI_00" || Command = "AI_01" || Command = "AI_02" || Command = "AI_03" || Command = "AI_04"
Trigger2 = Command = "AI_05" || Command = "AI_06" || Command = "AI_07" || Command = "AI_08" || Command = "AI_09"
Trigger3 = Command = "AI_10" || Command = "AI_11" || Command = "AI_12" || Command = "AI_13" || Command = "AI_14"
Trigger4 = Command = "AI_15" || Command = "AI_16" || Command = "AI_17" || Command = "AI_18" || Command = "AI_19"
Trigger5 = Command = "AI_20" || Command = "AI_21" || Command = "AI_22" || Command = "AI_23" || Command = "AI_24"
Trigger6 = Command = "AI_25" || Command = "AI_26" || Command = "AI_27" || Command = "AI_28" || Command = "AI_29"
Trigger7 = Command = "AI_30" || Command = "AI_31" || Command = "AI_32" || Command = "AI_33" || Command = "AI_34"
Trigger8 = Command = "AI_35" || Command = "AI_36" || Command = "AI_37" || Command = "AI_38" || Command = "AI_39"
Trigger9 = Command = "AI_40" || Command = "AI_41" || Command = "AI_42" || Command = "AI_43" || Command = "AI_44"
Trigger10 = Command = "AI_45" || Command = "AI_46" || Command = "AI_47" || Command = "AI_48" || Command = "AI_49"
Trigger11 = Command = "AI_50"
Trigger12 = Numhelper(10000)
Trigger12 = Helper(10000),var(59)
;Trigger13 = 1 ; Always available
var(59) = 3

;---------------------------------------------------------------------------
[State -3, AI1]
Type = VarSet
TriggerAll = Var(59) >= 1
Trigger1 = RoundState = 4
Trigger2 = Win = 1
Trigger3 = Lose = 1
Trigger4 = DrawGame = 1
V = 59
Value = -Var(59)

[State -3, AI2]
Type = VarSet
TriggerAll = Var(59) <= -1
Trigger1 = RoundState = 2
V = 59
Value = -Var(59)

[State -3]
Type = VarRandom
Triggerall = Var(59)
Triggerall = RoundState = 2
Trigger1 = var(59) ; = [1,2]
Trigger1 = GameTime % 50= 1
;Trigger2 = var(59) = [3,4]
;Trigger2 = GameTime % 42= 1
V = 58
Range = 0,99
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999

[State -3, AI2]
Type = VarSet
Triggerall = Var(59)
Trigger1 = movetype = H || (stateno = [120,155])
Trigger2 = var(53) = 1
Trigger2 = ((stateno = [300,330]) && animtime = 0) || (stateno = [1000,3999]) || var(45) = 90 && var(42) >= 10
Trigger3 = var(53) = 2
Trigger3 = enemynear,ctrl
var(53) = 0
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999

[State -3, AI2]
Type = VarSet
Triggerall = Var(59)
Triggerall = !Var(12)
Trigger1 = stateno = 90 && prevstateno = 330
Trigger1 = var(48) = 2
var(53) = 1
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999

[State -3, AI2]
Type = VarSet
Triggerall = Var(59)
Triggerall = !Var(12)
Trigger1 = var(46) >= 8 || var(47) >= 8
trigger1 = P2bodydist X = [-5,40]
trigger1 = P2StateType = A && P2MoveType = I
trigger1 = !enemynear,ctrl
trigger1 = enemynear,vel X >= 0 && enemynear,vel Y > 0
trigger1 = Power >= 3000
var(53) = 2
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;受身（地上）
[State -1]
type = ChangeState
value = 5201
triggerall = var(59) 
triggerall = roundstate = 2
triggerall = CanRecover
triggerall = Alive
triggerall = StateNo = 5050 || StateNo = 5071
triggerall = Vel Y > 0
triggerall = Pos Y >= -16
triggerall = random <= 450
trigger1 = abs(P2bodydist X) >= 115
trigger2 = P2bodydist Y <= -65
trigger3 = backedgebodydist <= 20
trigger3 = P2bodydist X <= 60
trigger3 = P2bodydist Y <= -45

;---------------------------------------------------------------------------
;ジャンプ（投げ回避）
[state -1, Guard]
type = ChangeState
value = 42
triggerall = var(59)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = ctrl || stateno = 21
triggerall = statetype != A
triggerall = enemynear,HitDefAttr = SC, AT
triggerall = InGuardDist
triggerall = random <= 400
triggerall = var(58)% 3 = 2
triggerall = backedgebodydist >= 118
trigger1 = p2bodydist X = [-15,35]
trigger2 = EnemyNear,vel x > 2

;---------------------------------------------------------------------------
;ジャンプ(fwd,up)
[State -1]
type = ChangeState
value = 41
triggerall = var(59)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = p2stateno != var(44)
triggerall = StateType != A
triggerall = StateNo != 52
triggerall = !var(51) || var(51) >= 65
triggerall = Ctrl || (stateno = [21,23])
trigger1 = !InGuardDist
trigger1 = P2bodydist X = [127,140]
trigger1 = P2bodydist Y = [-20,-5]
trigger1 = enemynear,vel X = [2,4]
trigger1 = enemynear,vel Y < 0
trigger1 = var(58)%5 = [1,2]
trigger1 = Random <= 200+(var(59)*50)

trigger2 = P2bodydist X = [125,145] ;138
trigger2 = var(43) != 4
trigger2 = (100*life/const(data.life)) >= 28
trigger2 = P2statetype != A
trigger2 = enemynear,vel X = [-2,2]
trigger2 = var(58)%3 = [0,1]
trigger2 = !InGuardDist || abs(var(55) - enemynear,time) <= 5
trigger2 = (P2stateno = 5120 || (P2stateno = [200,799]) && enemynear,time >= 6) && enemynear,animtime = [-24,ifelse(P2stateno = 5120,-13,-18)]
trigger2 = Random <= 400 ; && enemynear,backedgebodydist <= 15 || Random >= 650

trigger3 = P2bodydist X = [65,100]
trigger3 = !var(12)
trigger3 = (100*life/const(data.life)) >= 28
trigger3 = P2statetype != A
trigger3 = enemynear,vel X = [-2,2]
trigger3 = var(58)%5 = [0,1]
trigger3 = !InGuardDist || abs(var(55) - enemynear,time) <= 5
trigger3 = P2stateno = 5120 && (enemynear,animtime = [-24,-11])
trigger3 = Random >= 650

trigger4 = ((P2bodydist X = [130,155]) && !enemynear,ctrl && P2stateno = 5120)|| P2stateno = 5120 && (P2bodydist X = [ifelse(enemynear,backedgebodydist <= 25,0,35),65])
trigger4 = (100*life/const(data.life)) >= 30
trigger4 = P2statetype != A
trigger4 = P2stateno != 5110 && P2stateno != 5150
trigger4 = enemynear,vel X = [-2,2]
trigger4 = !InGuardDist || abs(var(55) - enemynear,time) <= 5
trigger4 = (P2stateno = 5120 && (enemynear,animtime = [-24,-14])) || enemynear,hitdefattr != SCA,HA,HP || p2stateno != [3000,3999]
trigger4 = Random >= ifelse(P2stateno = 5120,750,920)

;---------------------------------------------------------------------------
;斜めジャンプ強キック(起き攻め)
[State -1]
type = ChangeState
value = 410
triggerall = var(59)
triggerall = roundstate = 2
triggerall = statetype = A
triggerall = Vel X
triggerall = (P2stateno = 5120 && (enemynear,animtime = [-8,-1])) || var(49)
triggerall = Pos Y < -57
triggerall = Ctrl
trigger1 = P2statetype != A
trigger1 = (P2bodydist X = [46,81]) || P2dist X = [ifelse(frontedgebodydist <= 10,-2,5),45]
trigger1 = P2bodydist Y = [-10,ifelse(frontedgebodydist <= 10,72,85)]
trigger1 = !(P2MoveType = A && (var(51) ||(P2stateno = [3000,3999])) && enemynear,HitDefAttr != SC, NT,ST,HT)
trigger1 = Vel Y > 1
trigger1 = Random >= 650 ;&& (var(48)%3 = [0,1])
ignorehitpause = 0

;---------------------------------------------------------------------------
;前方転身
[State -1]
type = ChangeState
value = 90
triggerall = var(59)
triggerall = !var(13)
triggerall = !var(12)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = !InGuardDist
trigger1 = ctrl || (stateno = [21,23])   ;70,90
trigger1 = P2bodydist X >= 130
trigger1 = P2StateType != A
trigger1 = P2MoveType = H
trigger1 = (100*life/const(data.life)) >= 35
trigger1 = random <= 60

trigger2 = stateno = 330 && var(48) = 2
trigger2 = time > 2
trigger2 = !var(53)
trigger2 = P2bodydist X >= 40
trigger2 = var(58)%5 = [0,1]

;---------------------------------------------------------------------------
;歩き
;back
[State -1]
type = null;ChangeState
value = 22
triggerall = Var(59)
triggerall = roundstate = 2
triggerall = !var(53)
triggerall = StateType != A
triggerall = Ctrl || stateno = 21
triggerall = !InGuardDist
triggerall = stateno != [10,12]
triggerall = stateno != 22
triggerall = stateno != [120,139]
trigger1 = !(enemynear,alive = 1 && (P2StateType = L || P2stateno = 5120 || P2stateno = 5201))
trigger1 = P2bodydist X <= ceil(91*const(size.xscale))
trigger1 = BackEdgebodyDist > 5
trigger1 = Random%3 = [1,2]
trigger2 = stateno != 21
trigger2 = var(10) <= 60

;---------------------------------------------------------------------------
切り替えし,繋ぎ
;---------------------------------------------------------------------------
;瞬獄殺(ノーマル)
[State -1,syun]
type = ChangeState
value = 3200
triggerall = var(59)
triggerall = !var(12)
triggerall = !var(13)
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = power >= 3000
triggerall = !NumProj
triggerall = statetype != A
triggerall = P2stateno != [39,41]
triggerall = P2stateno != [150,155]
triggerall = enemynear,prevstateno != [150,155]
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
triggerall = enemynear,prevstateno != [5000,5999]
triggerall = P2life > 300 || (100*life/const(data.life))<=35 || RoundNo >= 2
triggerall = P2MoveType != H
triggerall = ctrl || (stateno = [21,23])
trigger1 = (var(58)%3 = [0,1]) || (100*life/const(data.life))<=45
trigger1 = P2bodydist X = [0,30]
trigger1 = P2StateType != A
trigger1 = enemynear,Vel X = [9,-1]
trigger1 = enemynear,time >= (7+random%12)
trigger1 = Random = [510-(var(59)*60),ifelse((100*life/const(data.life))<=35,850,600)]

trigger2 = var(58)%2 = 0 || (100*life/const(data.life))<=45 || var(53) = 2
trigger2 = p2bodydist X = [0,35]
trigger2 = P2bodydist Y = [-21,0]
trigger2 = enemynear,Vel X >= 0
trigger2 = enemynear,Vel Y > 2 || P2StateType != A && (enemynear,time >= (7+random%12))
trigger2 = var(53) || (Random = [420-(var(59)*25),ifelse((100*life/const(data.life))<=35,900,550)])

trigger3 = var(46) >= 22
trigger3 = P2bodydist X = [-5,45]
trigger3 = P2StateType != A
trigger3 = enemynear,ctrl = 0
trigger3 = enemynear,time >= 7
trigger3 = var(58)%3 = [1,2]
trigger3 = Random <= 550

trigger4 = var(42) >= 2
trigger4 = enemynear,time >= 8 || var(58)%2 = 1 || (100*life/const(data.life))<=40
trigger4 = P2bodydist X = [-2,30]
trigger4 = P2StateType != A
trigger4 = enemynear,animtime <= -4 || facing*enemynear,facing = 1
trigger4 = enemynear,ctrl = 0
trigger4 = Random >= 999-ifelse((100*life/const(data.life))<=35,450+(var(59)*50),300+(var(59)*50))
ignorehitpause = 0

;---------------------------------------------------------------------------
;瞬獄殺(真)
[State -1,sy]
type = ChangeState
value = 3200
triggerall = var(59)
triggerall = var(12)
triggerall = !var(13)
triggerall = p2stateno != var(44)
triggerall = StateType != A
triggerall = RoundState = 2
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
triggerall = (enemynear,prevstateno != [5000,5999]) || !var(49) || var(49) >= 5 
triggerall = P2stateno != [39,41]
triggerall = P2stateno != [150,155]
triggerall = P2MoveType != H
triggerall = P2life > 300 || (100*life/const(data.life))<=38 || RoundNo >= 2
triggerall = Power >= 3000
triggerall = ctrl || (stateno = [21,23])
trigger1 = (var(54) = [1,20]) || var(42) >= 3
trigger1 = enemynear,time >= 7 || var(58)%2 = 0 || (100*life/const(data.life))<=60
trigger1 = P2bodydist X = [0,30]
trigger1 = P2StateType != A
trigger1 = P2MoveType = A
trigger1 = random <= 650

trigger2 = (var(54) = [1,20]) || var(42) >= 3
trigger2 = enemynear,time >= 7 || var(58)%2 = 1 || (100*life/const(data.life))<=60
trigger2 = Random >= 250
trigger2 = P2bodydist X = [0,45]
trigger2 = P2bodydist Y = [-26,-1]
trigger2 = P2MoveType != H
trigger2 = enemynear,vel X >= -2 || enemynear,backedgebodydist <= 20
trigger2 = enemynear,vel Y > 3

trigger3 = (var(54) = [1,20]) || var(42) >= 3
trigger3 = enemynear,time >= 8 || var(58)%2 = 0 || (100*life/const(data.life))<=60 || P2life > 300
trigger3 = P2bodydist X = [0,90]
trigger3 = P2StateType != A
trigger3 = enemynear,ctrl = 0
trigger3 = enemynear,hitdefattr != SC,AA
trigger3 = enemynear,time >= 7 && enemynear,animtime <= -5
trigger3 = Random <= 700

trigger4 = var(46) >= 16
trigger4 = P2bodydist X = [0,ifelse(enemynear,animtime <= -7,90,60)]
trigger4 = P2StateType != A
trigger4 = enemynear,ctrl = 0
trigger4 = enemynear,time >= 5
trigger4 = var(58)%3 = [1,2]
trigger4 = Random <= 550

trigger5 = (var(54) = [1,20]) || var(42) >= 3
trigger5 = enemynear,time >= 12 || (var(58)%3 = [1,2]) || (100*life/const(data.life))<=60
trigger5 = P2bodydist X = [0,70]
trigger5 = P2StateType != A
trigger5 = enemynear,Vel X >= 0
trigger5 = !enemynear,ctrl
trigger5 = Enemynear,hitdefattr = SC,NA,SA || P2stateno = [200,799]
trigger5 = enemynear,animtime <= -5
trigger5 = Random >= 450

trigger6 = var(45) = 1605 && var(42) = [1,4]
trigger6 = enemynear,time >= 6 || var(58)%2 = 1 || P2life > 300 || (100*life/const(data.life))<=60
trigger6 = P2bodydist X = [-2,85]
trigger6 = P2StateType != A
trigger6 = enemynear,animtime <= -4 || facing*enemynear,facing = 1
trigger6 = enemynear,ctrl = 0
trigger6 = Random >= 999-ifelse((100*life/const(data.life))<=35,450+(var(59)*50),300+(var(59)*50))
ignorehitpause = 0

;---------------------------------------------------------------------------
;しゃがみ中キック
[State -1,k]
type = ChangeState
value = 325
triggerall = var(59)
triggerall = !var(53)
triggerall = !var(13)
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = P2StateType != L
triggerall = P2StateType != A
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
triggerall = ctrl || (stateno = [21,23])
trigger1 = var(58)%4 = [1,3]
trigger1 = enemynear,ctrl = 0
trigger1 = facing*enemynear,facing = 1
trigger1 = p2MoveType != H
trigger1 = P2bodydist X = [0,52]
trigger1 = enemynear,time >= 5 && enemynear,animtime <= -4
trigger1 = Random <= 450

trigger2 = enemynear,ctrl = 0
trigger2 = p2MoveType = I && !numtarget
trigger2 = P2bodydist X = [0,52]
trigger2 = enemynear,time >= 4 && enemynear,animtime <= -4
trigger2 = var(45) != 450
trigger2 = Random = [350,700]
ignorehitpause = 0

;---------------------------------------------------------------------------
;しゃがみ中パンチ
[State -1]
type = ChangeState
value = 305
triggerall = var(59)
triggerall = !var(53)
triggerall = !var(12)
triggerall = !var(13)
triggerall = !InGuardDist
triggerall = var(49) != [1,5]
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = P2StateType != L
triggerall = P2StateType != A
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
trigger1 = ctrl || stateno = [21,23]
trigger1 = P2bodydist X = [-5,35]
trigger1 = var(42) >= 1
trigger1 = var(48) = 2 || var(48) = 4
trigger1 = var(45) != [200,450]
trigger1 = Random = [600,850]
ignorehitpause = 0

;---------------------------------------------------------------------------
;滅殺豪昇龍
[State -1]
type = ChangeState
value = 3100
triggerall = var(59)
triggerall = var(12)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = p2stateno != var(44)
triggerall = power >= 1700 || power >= 1000 && (100*life/const(data.life))<=40
triggerall = statetype != A
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
triggerall = ctrl || stateno = [21,23]
trigger1 = (var(54) = [ifelse((enemynear,hitdefattr = SCA,AA),1,5),20]) || (var(42) = [4,16])
trigger1 = var(42) || var(54) && (enemynear,time >= 12 || var(58)%3 = 2 || (100*life/const(data.life))<=40)
trigger1 = P2bodydist X = [5,64]
trigger1 = P2StateType != A
trigger1 = enemynear,Vel X = [-1,3.9]
trigger1 = P2MoveType = A
trigger1 = !(enemynear,numproj && InGuardDist)
trigger1 = (var(58)%3 = [1,2]) || enemynear,hitdefattr = SCA,NA,SA
trigger1 = enemynear,animtime <= -5
trigger1 = Random <= 400

trigger2 = var(46) >= 22
trigger2 = (var(58)%3 = [1,2]) || (100*life/const(data.life))<=45
trigger2 = P2bodydist X = [0,62]
trigger2 = P2bodydist Y = [-50,0]
trigger2 = enemynear,Vel Y >= 0
trigger2 = enemynear,Vel X >= -1
trigger2 = P2MoveType = A
trigger2 = P2StateType = A || P2StateType != A && enemynear,animtime <= -5
trigger2 = Random >= 700
ignorehitpause = 0

;---------------------------------------------------------------------------
;豪昇龍拳
[State -1]
type = ChangeState
value = 1000
triggerall = var(59)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = p2stateno != var(44)
triggerall = statetype != A
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
triggerall = ctrl || stateno = [21,23]
trigger1 = (var(54) = [1,20]) || var(42) = [4,16]
trigger1 = P2bodydist X = [0,35]
trigger1 = enemynear,animtime <= -3
trigger1 = P2StateType != A
trigger1 = P2MoveType = A
trigger1 = random <= 450

trigger2 = (var(54) = [1,20]) || var(42) = [4,16]
trigger2 = P2bodydist X = [0,35]
trigger2 = P2bodydist Y = [-60,-20]
trigger2 = P2MoveType != H
trigger2 = enemynear,vel X >= 0
trigger2 = enemynear,vel Y > 0
trigger2 = random <= 450

trigger3 = (var(54) = [1,20]) || var(42) = [4,16]
trigger3 = P2bodydist X = [0,44]
trigger3 = P2bodydist Y = [-60,-20]
trigger3 = enemynear,HitdefAttr = SCA,NA,SA
trigger3 = random <= 450

trigger4 = var(46) >= 18
trigger4 = P2bodydist X = [-5,45]
trigger4 = P2bodydist Y = [-64,-24]
trigger4 = enemynear,vel X >= -2
trigger4 = enemynear,HitdefAttr = SCA,AA,AT
trigger4 = var(58)%5 = [1,2]
trigger4 = random <= 350
ignorehitpause = 0

;---------------------------------------------------------------------------
;竜巻斬空脚
[State -1,kk]
type = ChangeState
value = 1110
triggerall = var(59)
triggerall = var(12)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = p2stateno != var(44)
triggerall = statetype != A
triggerall = ctrl || stateno = [21,23]
trigger1 = P2stateno != 5120 && P2stateno != 5201 && P2StateType != L
trigger1 = (var(54) = [1,20]) || var(42) = [4,17]
trigger1 = P2bodydist X = [0,29]
trigger1 = P2bodydist Y = [-32,-16]
trigger1 = P2MoveType != H
trigger1 = enemynear,vel X >= 0
trigger1 = enemynear,vel Y > 0
trigger1 = P2MoveType = A&&(Random=[550-(var(59)*25),750]) || P2MoveType=I&&(Random=[550-(var(59)*25),620])

trigger2 = P2stateno != 5120 && P2stateno != 5201 && P2StateType != L
trigger2 = (var(54) = [1,20]) || var(42)=[4,17]
trigger2 = P2StateType != A
trigger2 = enemynear,animtime <= -3
trigger2 = P2bodydist X = [0,29]
trigger2 = P2MoveType = A
trigger2 = enemynear,vel X >= 0
trigger2 = Random = [550-(var(59)*25),700]

trigger3 = P2stateno != 5120 && P2stateno != 5201 && P2StateType != L
trigger3 = var(46) >= 22
trigger3 = var(58)%5 = [2,3]
trigger3 = enemynear,animtime <= -3
trigger3 = P2StateType != A
trigger3 = P2MoveType = A
trigger3 = P2bodydist X = [0,29]
trigger3 = var(59)=4&&(Random%5 = [0,2]) || (var(59)=[1,3])&&(Random%5 = [1,2])

trigger4 = P2stateno != 5120 && P2stateno != 5201 && P2StateType != L
trigger4 = var(46) >= 18
trigger4 = P2bodydist X = [-5,29]
trigger4 = P2bodydist Y = [-32,-18]
trigger4 = enemynear,vel X >= -2
trigger4 = enemynear,HitdefAttr = SCA,AA,AT
trigger4 = var(58)%5 = [0,1]
trigger4 = random >= 650

trigger5 = P2stateno = 5120 && (enemynear,animtime = [-27,-10])
trigger5 = P2dist X = [5,72]
trigger5 = FrontEdgebodyDist >= 60
trigger5 = enemynear,vel X >= -2
trigger5 = random >= 700
ignorehitpause = 0

;---------------------------------------------------------------------------
;しゃがみ弱キック
[State -1,k]
type = ChangeState
value = 320
triggerall = var(59)
triggerall = !var(13)
triggerall = !var(53)
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = P2StateType != L
triggerall = P2StateType != A
triggerall = P2MoveType != H
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
triggerall = enemynear,hitdefattr != SC,HA
triggerall = ctrl || (stateno = [21,23])
trigger1 = var(46) >= 20
trigger1 = var(58)%5 = [0,1]
trigger1 = P2StateType != A
trigger1 = P2bodydist X = [30,44]
trigger1 = enemynear,time >= 7 && enemynear,animtime <= -3
trigger1 = Random = [600-(var(59)*75),730]

trigger2 = var(45) = [331,450]
trigger2 = !var(12)
trigger2 = P2bodydist X = [-5,25]
trigger2 = P2StateType != A
trigger2 = numtarget
trigger2 = enemynear,GetHitVar(hittime) >= 2
trigger2 = var(58)%2 = 0
trigger2 = random <= 450

;---------------------------------------------------------------------------
;しゃがみ中キック
[State -1,k]
type = ChangeState
value = 325
triggerall = var(59)
triggerall = !var(13)
triggerall = !var(53)
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = P2StateType != L
triggerall = P2StateType != A
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
triggerall = enemynear,hitdefattr != SC,HA
triggerall = ctrl || (stateno = [21,23])
trigger1 = var(46) >= 20
trigger1 = P2bodydist X = [0,52]
trigger1 = enemynear,time >= 7 && enemynear,animtime <= -4
trigger1 = Random <= 350

trigger2 = !var(12)
trigger2 = (Projcontacttime(1200) =[1,50]) || (Projcontacttime(1201) =[1,50])
trigger2 = P2bodydist X = [25,42]
trigger2 = numtarget
trigger2 = Random <= 350

;---------------------------------------------------------------------------
;立ち中パンチ
[State -1]
type = ChangeState
value = 210
triggerall = var(59)
triggerall = !var(13)
triggerall = p2stateno != var(44)
triggerall = !var(53)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = P2StateType != L
triggerall = P2StateType != A
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
triggerall = enemynear,hitdefattr != SC,HA
triggerall = ctrl || (stateno = [21,23])
trigger1 = var(46) >= 20
trigger1 = var(58)%2 = 0
trigger1 = P2bodydist X = [0,33]
trigger1 = enemynear,time >= 7 && enemynear,animtime <= -4
trigger1 = Random <= 750

;---------------------------------------------------------------------------
;しゃがみ強キック
[State -1,k]
type = ChangeState
value = 330
triggerall = var(59)
triggerall = !var(13)
triggerall = var(49) != [1,5]
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = P2StateType != L
triggerall = P2StateType != A
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
trigger1 = ctrl || (stateno = [21,22])
trigger1 = !var(53)
trigger1 = P2bodydist X = [50,64]
trigger1 = var(46) >= 20
trigger1 = (P2MoveType = I|| (P2stateno = [200,700])) && enemynear,ctrl = 0
trigger1 = enemynear,time >= 5
trigger1 = enemynear,animtime <= -6
trigger1 = Random <= 350

trigger2 = var(53) = 1
trigger2 = stateno = 90 && animtime = 0
trigger2 = P2bodydist X = [45,62]

trigger3 = var(42) = [2,10]
trigger3 = ctrl || (stateno = [21,23])
trigger3 = !var(12) && var(48) = 2
trigger3 = P2bodydist X = [39,62]
trigger3 = !InGuardDist
trigger3 = P2StateType != A
trigger3 = var(45) = 305 || var(45) = 325 || var(45) = 320
trigger3 = numtarget
trigger3 = random <= 350
ignorehitpause = 0

;---------------------------------------------------------------------------
;ZEROカウンター
[State -1]
type = ChangeState
value = 605
triggerall = var(59)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = power >= 2200 || power >= 1500 && (100*life/const(data.life))<=30
triggerall = statetype != A
triggerall = P2statetype != A
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
triggerall = P2bodydist X = [20,61]
triggerall = enemynear,time >= 5
triggerall = enemynear,animtime <= -2
triggerall = stateno = 150 || stateno = 152 || (stateno = 151||stateno = 153) && time < 2
triggerall = var(58)%5 = [3,4]
triggerall = random <= 350
trigger1 = P2stateno = [200,999]
trigger2 = P2stateno = [1000,1999]
trigger2 = (enemynear,animtime = [-10,-2]) || enemynear,animtime >= 0
trigger3 = (P2stateno = [2000,3999]) || enemynear,ctrl = 0
trigger3 = (enemynear,animtime = [-10,-2]) || enemynear,animtime >= 0
trigger3 = !((100*life/const(data.life)) <= 30 && random >= 170)
trigger4 = (enemynear,animtime = [-10,-2]) || enemynear,animtime >= 0
trigger4 = backedgebodydist <= 15 && enemynear,ctrl = 0
ignorehitpause = 1

;---------------------------------------------------------------------------
;ガード(起き攻め対策&primary)
[state -1]
type = ChangeState
value = 131
triggerall = var(59)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = ctrl || stateno = [21,23]
triggerall = statetype != A
triggerall = stateno != [120,139]
trigger1 = (var(42) = [1,5]) || (var(46) = [1,5]) || (var(47) = [1,16]) || (var(54) = [1,5])
trigger1 = P2bodydist X = [-140,270]
trigger1 = P2MoveType = A
trigger1 = random <= 750
trigger2 = InGuardDist
trigger2 = (var(42) = [1,16]) || (var(46) = [1,25]) || (var(47) = [1,30]) || (var(54) = [1,16])
trigger2 = random <= 750

[state -1]
type = ChangeState
value = 131
triggerall = var(59)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = InGuardDist
triggerall = ctrl || stateno = [21,23]
triggerall = stateno != [120,139]
triggerall = statetype != A
trigger1 = enemynear,numproj || enemynear,numhelper
trigger1 = p2statetype != A
trigger1 = (var(54) = [1,12+(var(59)*3)]) || var(42) || var(46)
trigger1 = random >= 450
trigger2 = enemynear,HitDefAttr = SC, AA
trigger2 = (var(54) = [1,12+(var(59)*3)]) || var(42) || var(46)
trigger2 = random >= 450

trigger3 = enemynear,HitDefAttr = SC,AA || var(42) || var(46)
trigger3 = random <= 150+(var(59)*75) && var(55) <= 13-var(59) || random <= 400+(var(59)*120) && (var(55) >= 21-(var(59)*3) || (var(42) = [1,10]))
trigger3 = p2bodydist Y = [-35,0]
trigger3 = enemynear,vel Y = [-1.2,1.2]
trigger3 = enemynear,vel X >= 6

trigger4 = var(55) <= 3
trigger4 = P2MoveType != A
trigger4 = random <= 450

[state -1]
type = ChangeState
value = 130
triggerall = var(59)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = InGuardDist
triggerall = ctrl || stateno = [21,23]
triggerall = stateno != [120,139]
triggerall = ctrl
triggerall = statetype != A
trigger1 = enemynear,numproj || enemynear,numhelper
trigger1 = P2statetype = A
trigger1 = (var(54) = [1,12+(var(59)*3)]) || var(42) || var(46)
trigger1 = random >= 450
trigger2 = enemynear,HitDefAttr = SA, AA
trigger2 = (var(54) = [1,12+(var(59)*3)]) || var(42) || var(46)
trigger2 = random >= 450

[state -1,gu]
type = ChangeState
value = 132
triggerall = var(59)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = InGuardDist
triggerall = ctrl
triggerall = stateno != [120,139]
triggerall = statetype = A
trigger1 = enemynear,HitDefAttr = SCA,AA
trigger1 = random <= 600+(var(59)*75)
trigger2 = var(42) || var(46)
trigger2 = random%3 = [1,2]
trigger3 = enemynear,numproj || enemynear,numhelper
trigger3 = var(55) >= 6 || var(42) || var(46)
trigger3 = random <= 400+(var(59)*120)
trigger4 = (var(42) = [1,5]) || (var(46) = [1,5]) || (var(47) = [1,16]) || (var(54) = [1,5])
trigger4 = P2bodydist X = [-140,270]
trigger4 = P2MoveType = A
trigger4 = random <= 750
trigger5 = InGuardDist
trigger5 = (var(42) = [1,16]) || (var(46) = [1,25]) || (var(47) = [1,30]) || (var(54) = [1,16])
trigger5 = random <= 750

;---------------------------------------------------------------------------
;連続技関連
;---------------------------------------------------------------------------
;瞬獄殺(真)
[State -1,syun]
type = ChangeState
value = 3200
triggerall = var(59)
triggerall = var(12)
triggerall = !var(13)
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = power >= 3000
triggerall = !NumProj
triggerall = statetype != A
triggerall = P2stateno != [39,41]
triggerall = P2stateno != [150,155]
triggerall = enemynear,prevstateno != [150,155]
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
triggerall = enemynear,prevstateno != [5000,5999]
triggerall = P2life > 300 || (100*life/const(data.life))<=45 || RoundNo >= 2
triggerall = P2MoveType != H
triggerall = ctrl || (stateno = [21,23])
trigger1 = (var(58)%3 = [0,1]) || (100*life/const(data.life))<=45
trigger1 = P2bodydist X = [0,ifelse(p2movetype=A,80,65)]
trigger1 = P2StateType != A
trigger1 = enemynear,Vel X = [9,-1]
trigger1 = enemynear,time >= (7+random%12)
trigger1 = Random = [400,ifelse((100*life/const(data.life))<=35,850,650)]

trigger2 = var(58)%2 = 0 || (100*life/const(data.life))<=45 || stateno = 23 || prevstateno = 23
trigger2 = p2bodydist X = [ifelse(P2StateType= A,0,30),ifelse((p2movetype=A&&P2StateType= A),70,55)]
trigger2 = P2bodydist Y = [-21,0]
trigger2 = enemynear,Vel X >= -2 || enemynear,backedgebodydist <= 20
trigger2 = enemynear,Vel Y > 2 || P2StateType != A && (enemynear,time >= (7+random%12))
trigger2 = Random = [400,ifelse((100*life/const(data.life))<=35,900,620)]

trigger3 = P2bodydist X = [0,70]
trigger3 = enemynear,time >= 16
trigger3 = enemynear,animtime <= -3
trigger3 = !var(51) || var(51) >= 26
trigger3 = enemynear,Vel X = [0,5)
trigger3 = P2StateType != A
trigger3 = enemynear,ctrl = 0
trigger3 = Random = [450-(var(59)*50),ifelse((100*life/const(data.life))<=35,900,550)]

trigger4 = P2bodydist X = [0,50]
trigger4 = stateno = 23 || prevstateno = 23
trigger4 = Enemynear,hitdefattr = SC,NA || P2stateno = [200,799]
trigger4 = Random <= 350
ignorehitpause = 0

;---------------------------------------------------------------------------
;滅殺豪昇龍(ノーマル)
[State -1,m_syou]
type = ChangeState
value = 3100
triggerall = var(59)
triggerall = !var(13)
triggerall = !var(12)
triggerall = roundstate = 2
triggerall = p2stateno != var(44)
triggerall = power >= 1000
triggerall = statetype != A
triggerall = stateno != [150,155]
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
trigger1 = var(3) = 1 && numtarget
trigger1 = P2bodydist X = [0,43] ;ceil(ifelse(target,backedgebodydist <= 10,29,38)*const(size.xscale))]
trigger1 = StateNo = 325 && animelemtime(4)<0 || StateNo = 305 && animelemtime(4)<0
trigger1 = time > 1
trigger1 = P2StateType != A
trigger1 = P2MoveType = H
trigger1 = Random <= ifelse((100*life/const(data.life))<=35,250,400)

trigger2 = P2bodydist X = [27,40]
trigger2 = StateNo = 300 && time >= 5
trigger2 = prevstateno = 300 || prevstateno = 320
trigger2 = P2StateType != A
trigger2 = P2MoveType = H
trigger2 = var(3) = 1 && numtarget
trigger2 = random <= ifelse((100*life/const(data.life))<=35,250,400)

trigger3 = ctrl || stateno = [21,23]
trigger3 = power >= 1500 || power >= 1000 && (100*life/const(data.life))<=30
trigger3 = P2bodydist X = [0,67]
trigger3 = enemynear,time >= 16
trigger3 = enemynear,animtime <= -5
trigger3 = !(enemynear,numproj && InGuardDist)
trigger3 = var(54) != [1,18]
trigger3 = !var(51) || var(51) >= 26
trigger3 = enemynear,Vel X >= -2
trigger3 = P2StateType != A
trigger3 = P2MoveType = A
trigger3 = Random = [200-(var(59)*50),ifelse((100*life/const(data.life))<=35,750,400)]
ignorehitpause = 0

;---------------------------------------------------------------------------
;滅殺豪昇龍(真)
[State -1,m_syou]
type = ChangeState
value = 3100
triggerall = var(59)
triggerall = var(12)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = p2stateno != var(44)
triggerall = power >= 1000
triggerall = statetype != A
triggerall = stateno != [150,154]
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
trigger1 = ctrl || (stateno = [21,22]) || (stateno = 23 && enemynear,time >= 4)
trigger1 = var(58)%2 = 1
trigger1 = power >= 1700 || power >= 1000 && (100*life/const(data.life))<=35
trigger1 = P2bodydist X = [5,64]
trigger1 = P2bodydist Y = [-55,-33]
trigger1 = !((P2bodydist X = [5,25])&&(P2bodydist Y = [-55,-40]))
trigger1 = !(facing*enemynear,facing = 1 && P2bodydist X >= ceil(51*const(size.xscale)))
trigger1 = enemynear,Vel Y > 0
trigger1 = enemynear,Vel X > 0
trigger1 = P2MoveType != H
trigger1 = Random = [50,250+(var(59)*25)]

trigger2 = var(3) = 1 && numtarget
trigger2 = P2bodydist X = [0,ifelse(target,backedgebodydist <= 5,33,41)] ;ceil(ifelse(target,backedgebodydist <= 10,29,38)*const(size.xscale))]
trigger2 = StateNo = 325 && animelemtime(4)<0 || StateNo = 305 && animelemtime(4)<0 || stateno=260 && animelemtime(3)<0
trigger2 = time > 1
trigger2 = P2StateType != A
trigger2 = P2MoveType = H
trigger2 = Random <= ifelse((100*life/const(data.life))<=35,350+(var(59)*90),200+(var(59)*65))

trigger3 = P2bodydist X = [0,ceil(ifelse(target,backedgebodydist <= 10,29,38)*const(size.xscale))]
trigger3 = StateNo = 320 && time = [6,7]
trigger3 = prevstateno = 320
trigger3 = P2StateType != A
trigger3 = P2MoveType = H
trigger3 = var(3) = 4 && !numtarget
trigger3 = random <= ifelse((100*life/const(data.life))<=35,350+(var(59)*120),250+(var(59)*50))

trigger4 = ctrl || stateno = [21,23]
trigger4 = var(58)%2 = 1
trigger4 = P2bodydist X = [0,64]
trigger4 = P2StateType != A
trigger4 = enemynear,Vel X >= 0
trigger4 = P2MoveType = A
trigger4 = Enemynear,hitdefattr = SC,NA || P2stateno = [200,799]
trigger4 = enemynear,time >= 5
trigger4 = enemynear,animtime <= -5
trigger4 = Random <= 400

trigger5 = ctrl || stateno = [21,23]
trigger5 = power >= 1500 || power >= 1000 && (100*life/const(data.life))<=30
trigger5 = P2bodydist X = [0,67]
trigger5 = enemynear,time >= 16
trigger5 = enemynear,animtime <= -5
trigger5 = !(enemynear,numproj && InGuardDist)
trigger5 = var(54) != [1,18]
trigger5 = !var(51) || var(51) >= 26
trigger5 = enemynear,Vel X >= -2
trigger5 = P2StateType != A
trigger5 = P2MoveType = A
trigger5 = Random = [200-(var(59)*50),ifelse((100*life/const(data.life))<=35,750,400)]

trigger6 = ctrl || (stateno = [21,23])
trigger6 = power >= 1500 || power >= 1000 && (100*life/const(data.life))<=35
trigger6 = P2bodydist X = [-15,55]
trigger6 = P2bodydist Y = [-55,0]
trigger6 = !((P2bodydist X = [5,25])&&(P2bodydist Y = [-55,-40]))
trigger6 = facing*enemynear,facing = 1 && var(45) = [405,410]
trigger6 = (var(48) = 1 && P2StateType != A) || (var(48) = 2 && P2StateType = A)
trigger6 = P2MoveType = H
trigger6 = Random <= 400
ignorehitpause = 0

;---------------------------------------------------------------------------
;滅殺豪波動
[State -1]
type = ChangeState
value = 3000
triggerall = var(59)
triggerall = !var(13)
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = !NumProj
triggerall = power >= 1000
triggerall = statetype != A
triggerall = stateno != [150,155]
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
trigger1 = ctrl || stateno = [21,23]
trigger1 = var(12) = 20 ;null
trigger1 = P2bodydist X = [78,92]
trigger1 = P2bodydist Y = [-49,-30]
trigger1 = enemynear,Vel X = [-2,6.5]
trigger1 = enemynear,Vel Y = [2,9]
trigger1 = P2MoveType = H
trigger1 = Random >= 750

trigger2 = P2bodydist X = [ceil(11*const(size.xscale)),ifelse(!var(12),54,75)]
trigger2 = var(3) = 1 && numtarget
trigger2 = P2StateType != A
trigger2 = target,const(size.head.pos.y) <= -50
trigger2 = !var(12) || (var(12) && enemynear,GetHitVar(hittime) >= 7 && (P2bodydist X = [ceil(11*const(size.xscale)),75])) || (var(12) && (P2bodydist X = [ceil(11*const(size.xscale)),66]))
trigger2 = time > 1
trigger2 = StateNo = 325 && animelemtime(4)<0 || StateNo = 305 && animelemtime(4)<0 || stateno=260 && animelemtime(3)<0
trigger2 = P2MoveType = H
trigger2 = Random >= ifelse((100*life/const(data.life))<=40,600,680)-(var(12)*12)-((var(56) = 2)*100)

trigger3 = P2bodydist X = [ceil(36*const(size.xscale)),70]
trigger3 = var(3) = 4 && !numtarget ;null
trigger3 = target,const(size.head.pos.y) <= -50
trigger3 = P2StateType != A
trigger3 = StateNo = 320 && time = [5,6]
trigger3 = prevstateno = 320
trigger3 = P2MoveType = H
trigger3 = Random = [440-(var(59)*60),ifelse((100*life/const(data.life))<=35,600+(var(59)*60),580)]

trigger4 = ctrl || stateno = [21,23]
trigger4 = P2StateType != A
trigger4 = power >= 1500 || power >= 1000 && (100*life/const(data.life))<=30
trigger4 = P2bodydist X = [75,150]
trigger4 = ((P2bodydist X)/(enemynear,animtime)) >= -7.2
trigger4 = ((P2stateno = [1000,1999]) && (enemynear,vel X = [-2,2])) || Enemynear,hitdefattr = SC,NA || P2stateno = [200,849]
trigger4 = enemynear,time >= 4
trigger4 = enemynear,animtime <= -7
trigger4 = P2MoveType = A && var(12)
trigger4 = var(58)%3 = [0,1]
trigger4 = Random <= 400

trigger5 = ctrl || (stateno = [21,23])
trigger5 = var(45) = 450
trigger5 = enemynear,GetHitVar(hittime) >= 4
trigger5 = P2bodydist X = [12,50]
trigger5 = P2StateType != A
trigger5 = P2MoveType = H
trigger5 = var(48) = 1
trigger5 = (var(58)%4 = [0,2]) || (100*life/const(data.life)) <= 35

trigger6 = ctrl || stateno = [21,23]
trigger6 = power >= 1500 || power >= 1000 && (100*life/const(data.life))<=30
trigger6 = P2bodydist X = [70,110]
trigger6 = !var(12)
trigger6 = P2stateno != [3000,3999]
trigger6 = Enemynear,hitdefattr != SCA,HA,HP,HT
trigger6 = (enemynear,time = [5,12]) || enemynear,time = [25,45]
trigger6 = enemynear,animtime <= -7
trigger6 = !enemynear,ctrl
trigger6 = var(58)%2 = 0
trigger6 = Random <= 400
ignorehitpause = 0

;---------------------------------------------------------------------------
;天魔豪斬空
[State -1, hadouken]
type = ChangeState
value = 3300
triggerall = var(59)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = p2stateno != var(44)
triggerall = !NumProj
triggerall = power >= 1000 ;500 && (100*life/const(data.life)) >= 40
triggerall = statetype = A
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
triggerall = P2StateType != A
triggerall = Ctrl
triggerall = Pos Y <= -40
;triggerall = var(58)%2 = 0
trigger1 = P2bodydist X = [35,120]
trigger1 = (P2bodydist Y/P2bodydist X) = [0.7,1.1]
trigger1 = P2stateno != [3000,3999]
trigger1 = enemynear,animtime <= -8
trigger1 = !enemynear,ctrl
trigger1 = enemynear,vel x = [-4,4]
trigger1 = enemynear,hitdefattr != ,HA
trigger1 = Random <= 350
ignorehitpause = 0

;===========================================================================
;---------------------------------------------------------------------------
;竜巻斬空脚(ノーマル)
[State -1,ta]
type = ChangeState
value = 1100
triggerall = var(59)
triggerall = !var(12)
triggerall = !var(13)
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
trigger1 = ctrl || (stateno = [21,22]) || (stateno = 23 && enemynear,time >= 3)
trigger1 = var(58)%3 = 1
trigger1 = P2bodydist X = [0,28]
trigger1 = enemynear,animtime <= -3
trigger1 = P2StateType != A
trigger1 = P2MoveType = A
trigger1 = Random = [ifelse((100*life/const(data.life))<=35,550,700),799+(var(59)*50)]

trigger2 = P2bodydist X = [0,25]
trigger2 = P2StateType = S || target,const(size.head.pos.y) <= -81
trigger2 = P2StateType != A
trigger2 = StateNo = 325 && animelemtime(4)<0 || StateNo = 305 && animelemtime(4)<0 || stateno=210 && animelemtime(4)<0 || stateno=260 && animelemtime(3)<0
trigger2 = time > 2
trigger2 = var(3) = 1 && numtarget
trigger2 = P2MoveType = H
trigger2 = var(58)%5 = [0,3]
trigger2 = Random <= 300+(var(59)*100)

trigger3 = ctrl || stateno = [21,23]
trigger3 = (100*life/const(data.life)) >= 30
trigger3 = P2bodydist X = [0,90]
trigger3 = P2StateType != A
trigger3 = enemynear,vel X >= -3 
trigger3 = Enemynear,hitdefattr = SC,NA || P2StateNo = [200,700]
trigger3 = P2MoveType = A
trigger3 = !(P2StateType = C && P2bodydist X >= 65)
trigger3 = var(58)%5 = [1,2]
trigger3 = Random <= 200+(var(59)*50)

trigger4 = ctrl || (stateno = [21,23])
trigger4 = !var(51) || var(51) >= 65
trigger4 = P2bodydist X = [45,70]
trigger4 = P2bodydist Y = [-42,0]
trigger4 = enemynear,vel X = [0,7]
trigger4 = enemynear,vel Y >= 0
trigger4 = P2MoveType != H
trigger4 = var(58) = [0,ifelse((P2StateType = A && P2MoveType = A), 63, 45)]
trigger4 = random >= 700

trigger5 = ctrl || stateno = [21,23]
trigger5 = P2bodydist X = [0,29]
trigger5 = enemynear,time = [32-(var(59)*4),50]
trigger5 = !var(51) || var(51) >= 27
trigger5 = P2StateType != A
trigger5 = P2MoveType = A
trigger5 = Random >= ifelse((100*life/const(data.life))<=40,700-(var(59)*50),880-(var(59)*50))

trigger6 = P2bodydist X = [0,80]
trigger6 = P2StateType = A
trigger6 = StateNo = 330 && animelemtime(3)<0
trigger6 = time > 2
trigger6 = var(3) = 1 && numtarget
trigger6 = P2MoveType = H
trigger6 = (100*life/const(data.life)) <= 35 || var(58)%5=[0,2]
trigger6 = Random <= 250+(var(59)*150)

trigger7 = ctrl || stateno = [21,23]
trigger7 = P2bodydist X = [0,60]
trigger7 = P2bodydist Y = [ceil(-40*const(size.xscale)),0]
trigger7 = var(45) = 3020
trigger7 = var(6) = [1,2]
trigger7 = numtarget && projhittime(1500) = [1,20]
trigger7 = P2MoveType = H
trigger7 = Random <= 950
ignorehitpause = 0

;---------------------------------------------------------------------------
;竜巻斬空脚(真)
[State -1,ta]
type = ChangeState
value = 1110
triggerall = var(59)
triggerall = var(12)
triggerall = !var(13)
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
trigger1 = ctrl || (stateno = [21,22]) || (stateno = 23 && enemynear,time >= 3)
trigger1 = var(58)%2 = 1 || enemynear,hitdefattr = SCA,NA,AT || (100*life/const(data.life))<=35
trigger1 = P2bodydist X = [0,30]
trigger1 = enemynear,animtime <= -3
trigger1 = P2StateType != A
trigger1 = P2MoveType = A
trigger1 = Random = [ifelse((100*life/const(data.life))<=35,520,650),850]

trigger2 = P2bodydist X = [0,25]
trigger2 = P2StateType = S || target,const(size.head.pos.y) <= -81
trigger2 = P2StateType != A
trigger2 = StateNo = 325 && animelemtime(4)<0 || StateNo = 305 && animelemtime(4)<0 || stateno=210 && animelemtime(4)<0 || stateno=260 && animelemtime(3)<0
trigger2 = time > 2
trigger2 = var(3) = 1 && numtarget
trigger2 = P2MoveType = H
trigger2 = var(58)%5 = [0,3]
trigger2 = Random <= 300+(var(59)*100)

trigger3 = ctrl || stateno = [21,23]
trigger3 = (100*life/const(data.life)) >= 30
trigger3 = P2bodydist X = [0,90]
trigger3 = P2StateType != A
trigger3 = enemynear,vel X >= -3 
trigger3 = Enemynear,hitdefattr = SC,NA || P2StateNo = [200,700]
trigger3 = P2MoveType = A
trigger3 = !(P2StateType = C && P2bodydist X >= 65)
trigger3 = var(58)%2 = 1
trigger3 = Random <= 200+(var(59)*50)

trigger4 = ctrl || (stateno = [21,23])
trigger4 = var(58)%2 = 1 || P2MoveType = I && enemynear,ctrl = 0 || enemynear,hitdefattr = SC,NT,ST
trigger4 = !var(51) || var(51) >= 65
trigger4 = P2bodydist X = [45,68]
trigger4 = P2bodydist Y = [-42,0]
trigger4 = enemynear,vel X = [0,7]
trigger4 = enemynear,vel Y > 0
trigger4 = P2MoveType=A&&(Random=[200-(var(59)*50),450]) || P2MoveType=I&&(Random=[160-(var(59)*40),270])

trigger5 = ctrl || stateno = [21,23]
trigger5 = P2bodydist X = [0,29]
trigger5 = enemynear,time = [16,50]
trigger5 = !var(51) || var(51) >= 27
trigger5 = P2StateType != A
trigger5 = P2MoveType = A
trigger5 = Random >= ifelse((100*life/const(data.life))<=40,650,830)

trigger6 = P2bodydist X = [0,80]
trigger6 = P2StateType = A
trigger6 = StateNo = 330 && animelemtime(3)<0
trigger6 = time > 2
trigger6 = var(3) = 1 && numtarget
trigger6 = P2MoveType = H
trigger6 = (100*life/const(data.life)) <= 38 || var(58)%5=[0,2]
trigger6 = Random <= 410

trigger7 = ctrl || stateno = [21,23]
trigger7 = P2bodydist X = [0,60]
trigger7 = P2bodydist Y = [ceil(-40*const(size.xscale)),0]
trigger7 = var(45) = 3020
trigger7 = var(6) = [1,2]
trigger7 = numtarget && projhittime(1500) = [1,20]
trigger7 = P2MoveType = H
trigger7 = Random <= 950
ignorehitpause = 0

;---------------------------------------------------------------------------
;豪昇龍拳
[State -1]
type = ChangeState
value = 1000
triggerall = var(59)
triggerall = !var(13)
triggerall = var(7) < 3
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
trigger1 = ctrl || (stateno = [21,22]) || (stateno = 23 && enemynear,time >= 3)
trigger1 = var(58)%2 =1 || enemynear,hitdefattr = SCA,SA,ST,HT || (100*life/const(data.life))<=35
trigger1 = P2bodydist X = [-5,37]
trigger1 = enemynear,animtime <= -3
trigger1 = P2StateType != A
trigger1 = P2MoveType = A
trigger1 = Random = [ifelse((100*life/const(data.life))<=35,550,700),799+(var(59)*50)]

trigger2 = ctrl || stateno = [21,23]
trigger2 = (var(58)%3 =[0,1]) || enemynear,hitdefattr = SCA,NA,SA,AT || enemynear,time >=8 || (100*life/const(data.life))<=35
trigger2 = P2bodydist X = [-5,37]
trigger2 = P2bodydist Y = [-67,-24]
trigger2 = P2StateType = A
trigger2 = enemynear,vel X >= 0
trigger2 = enemynear,vel Y > 0
trigger2 = P2MoveType=A && Random = [530-(var(59)*40),ifelse((100*life/const(data.life))<=35,860,700)]

trigger3 = P2bodydist X = [-5,28]
trigger3 = P2MoveType = H
trigger3 = P2StateType != A
trigger3 = time > 1
trigger3 = (StateNo = 210 && (var(58)%5 = [0,1]) && Random >= 350) || (StateNo = [300,320]) && Random%3 = 2
trigger3 = var(3) = 1 && numtarget

trigger4 = ctrl || (stateno = [21,23]) || stateno = 1115 && time >= 1
trigger4 = P2bodydist X = [-10,37]
trigger4 = P2bodydist Y = [-90,-18]
trigger4 = P2MoveType = H
trigger4 = numtarget
trigger4 = var(7) && var(8) = 1
trigger4 = target,stateno = [5000,5070]
trigger4 = target,stateno != 5040
trigger4 = Random <= 990

trigger5 = ctrl || stateno = [21,23]
trigger5 = var(58)%2 = 1
trigger5 = P2bodydist X = [5,44]
trigger5 = P2bodydist Y = [-170,-70]
trigger5 = !(facing*enemynear,facing = 1 && P2bodydist X >= 35)
trigger5 = P2StateType = A
trigger5 = enemynear,vel X = [-2,9]
trigger5 = enemynear,vel Y >= 0
trigger5 = P2MoveType = A
trigger5 = Random=[270,500+(var(59)*25)]

trigger6 = ctrl || stateno = [21,23]
trigger6 = var(58)%2 = 1 || enemynear,hitdefattr = SCA,NA,SA,AT
trigger6 = P2bodydist X <= 36
trigger6 = P2bodydist Y = [-80,-20]
trigger6 = P2StateType = A
trigger6 = P2Movetype = A || enemynear,ctrl = 0
trigger6 = enemynear,vel Y > 0
trigger6 = BackEdgebodyDist <= 20
trigger6 = Random = [530-(var(59)*40),ifelse((100*life/const(data.life))<=40,860,700)]

trigger7 = ctrl || stateno = [21,23]
trigger7 = P2bodydist X = [0,36]
trigger7 = enemynear,time = [16,50]
trigger7 = !var(51) || var(51) >= 27
trigger7 = P2StateType != A
trigger7 = P2MoveType = A
trigger7 = Random <= ifelse((100*life/const(data.life))<=40,450,300)

trigger8 = ctrl || stateno = [21,22]
trigger8 = var(58)%2 = 0 || enemynear,ctrl = 0
trigger8 = P2bodydist X = [-5,35]
trigger8 = P2bodydist Y = [-60,-35]
trigger8 = P2StateType = A
trigger8 = enemynear,vel X >= 0
trigger8 = enemynear,vel Y > 0
trigger8 = P2MoveType=I && Random=[470-(var(59)*30),ifelse((100*life/const(data.life))<=30,600,750)]

trigger9 = P2bodydist X = [-10,50]
trigger9 = P2bodydist Y = [-65,-16]
trigger9 = P2MoveType = H
trigger9 = P2StateType = A
trigger9 = time > 1
trigger9 = StateNo = 210 && Random <= 600
trigger9 = var(3) = 1 && numtarget
ignorehitpause = 0

;---------------------------------------------------------------------------
;灼熱波動拳
[State -1,syakunetsu]
type = ChangeState
value = 1300
triggerall = var(59)
triggerall = var(12)
triggerall = !var(13)
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = !NumProj
triggerall = statetype != A
triggerall = !enemynear,numproj
triggerall = (Projcontacttime(1200) !=[0,50]) && (Projcontacttime(1201) !=[0,50])
trigger1 = ctrl || (stateno = [21,22])
trigger1 = !var(42) || var(42) >= 6
trigger1 = Var(55) <= 3
trigger1 = ((var(46) != [1,30]) && (var(47) != [1,30]))
trigger1 = (var(54) != [1,16]) || !inguarddist
trigger1 = !var(51) || var(51) >= 65
trigger1 = (Projcontacttime(1000) !=[0,180]) && (Projcontacttime(1100) !=[0,180])
trigger1 = !(numtarget && (target,stateno = [5050,5101]))
trigger1 = P2bodydist X = [150,185]
trigger1 = P2bodydist y = [ifelse(enemynear,vel x <= 0,-45,-36),0]
trigger1 = enemynear,vel x <= 4
trigger1 = enemynear,vel y >= 0
trigger1 = P2StateType != L || (P2stateno = 5120 && enemynear,animtime > -5)
trigger1 = random <= 610+(var(59)*60)
trigger1 = (P2StateType = A && var(58)%4 = 1) || var(58) = [4-var(59),14]

trigger2 = ctrl || (stateno = [21,22])
trigger2 = !var(42) || var(42) >= 6
trigger2 = !inguarddist
trigger2 = !var(51) || var(51) >= 65
trigger2 = ((var(46) != [1,30]) && (var(47) != [1,30]))
trigger2 = (var(54) != [1,16]) || !inguarddist
trigger2 = !(numtarget && (target,stateno = [5050,5101]))
trigger2 = P2bodydist X = [130,150]
trigger2 = P2bodydist y = [ifelse(enemynear,vel x <= 0,-40,-33),-1]
trigger2 = enemynear,vel x <= 4
trigger2 = enemynear,vel y >= 0
trigger2 = P2StateType != L
trigger2 = random <= ifelse((100*life/const(data.life))<=35,120+(var(59)*70),520+(var(59)*70))
trigger2 = var(58) = [4,12]

trigger3 = P2StateType != A
trigger3 = !inguarddist
trigger3 = P2bodydist X= [0,floor(43*const(size.xscale))]
trigger3 = StateNo = 325 && animelemtime(4)<0 || StateNo = 305 && animelemtime(4)<0 || stateno=260 && animelemtime(3)<0
trigger3 = time > 2
trigger3 = P2MoveType = H
trigger3 = numtarget && var(3) = 7 ;null
trigger3 = (P2bodydist X <= floor(40*const(size.xscale))&&(var(58)%5=[0,2]))|| (P2bodydist X >= ceil(40*const(size.xscale))&&random <= 850)

trigger4 = ctrl || (stateno = [21,22])
trigger4 = !var(42) || var(42) >= 6
trigger4 = Var(55) <= 4
trigger4 = ((var(46) != [1,30]) && (var(47) != [1,30]))
trigger4 = (var(54) != [1,16]) || !inguarddist
trigger4 = !(numtarget && (target,stateno = [5050,5101]))
trigger4 = (Projcontacttime(1000) !=[0,180]) && (Projcontacttime(1100) !=[0,180])
trigger4 = P2bodydist X >= 185
trigger4 = P2bodydist y = [-60,0]
trigger4 = enemynear,vel x <= 4
trigger4 = enemynear,vel y >= -1
trigger4 = P2StateType != L || (P2stateno = 5120 && enemynear,animtime > -8)
trigger4 = (P2StateType = A && var(58)%4 = 0) || var(58) = [4-var(59),14]
trigger4 = random <= 640+(var(59)*60)

trigger5 = ctrl || (stateno = [21,22])
trigger5 = !var(42) || var(42) >= 4
trigger5 = Var(55) <= 4
trigger5 = ((var(46) != [1,30]) && (var(47) != [1,30]))
trigger5 = (var(54) != [1,16]) || !inguarddist
trigger5 = ProjGuardedTime(1000) = [1,10]
trigger5 = P2bodydist X = [130,185]
trigger5 = P2bodydist y = [-33,0]
trigger5 = numtarget && target,backedgebodydist >= 2
trigger5 = var(58)%5 = [0,1]
trigger5 = random <= 640+(var(59)*60)

trigger6 = P2StateType != A
trigger6 = !inguarddist
trigger6 = P2bodydist X= [0,21]
trigger6 = StateNo = 325 && animelemtime(4)<0 || StateNo = 305 && animelemtime(4)<0 || stateno=260 && animelemtime(3)<0
trigger6 = time > 2
trigger6 = P2MoveType = H
trigger6 = numtarget && var(3) = 1
trigger6 = (100*life/const(data.life))<=35
trigger6 = random <= 850
ignorehitpause = 0

;---------------------------------------------------------------------------
;阿修羅閃空(fwd)(ノーマル)
[State -1,asura]
type = ChangeState
value = 1601
triggerall = var(59)
triggerall = !var(12)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = !((var(45)=[200,330])&&var(42))
trigger1 = ctrl || (stateno = [21,22])
trigger1 = !var(42) || var(42) >= 9
trigger1 = P2bodydist X = [28,90]
trigger1 = enemynear,vel X >= 0
trigger1 = !var(55) || var(55) >= 17
trigger1 = P2StateType != L
;trigger1 = var(58) = [40,ifelse((100*life/const(data.life))<=35,44,47)]
trigger1 = random <= ifelse((100*life/const(data.life))<=35,30,90)

trigger2 = ctrl || (stateno = [21,23])
trigger2 = !var(42) || var(42) >= 4
trigger2 = var(46) != [1,25]
trigger2 = P2stateno != 5150
trigger2 = enemynear,hitdefattr = SCA,ST,HT,HA || var(55) = [12,35]
trigger2 = p2bodydist x = [10,120]
trigger2 = enemynear,vel X >= 3
trigger2 = (var(58)%5 = [1,2]) || (100*life/const(data.life))<=35
trigger2 = random >= 800

trigger3 = ctrl || (stateno = [21,22])
trigger3 = BackEdgebodyDist < 20
trigger3 = !var(42) || var(42) >= 10
trigger3 = P2bodydist X <= 100 
trigger3 = enemynear,vel X = [0,7]
trigger3 = (var(58)%5 = [3,4]) || var(58)%2 = 1 && (var(54) = [5,25])
trigger3 = Random <= 170

trigger4 = ctrl || (stateno = [21,23])
trigger4 = P2bodydist X >= 170
trigger4 = enemynear,vel X = [-3,4.5] 
trigger4 = P2StateType != L
trigger4 = P2MoveType != H
trigger4 = enemynear,ctrl = 0
trigger4 = enemynear,animtime <= -40
trigger4 = var(58)%5 = [3,4]
trigger4 = random = [1+(var(59)*80),ifelse((100*life/const(data.life))<=30,450,600)]

trigger5 = ctrl || (stateno = [21,22])
trigger5 = var(58)%3 = 2 || power >= 3000 && var(58)%4 = 0
trigger5 = !var(42) || var(42) >= 4
trigger5 = P2bodydist X = [60,170]
trigger5 = enemynear,numproj || power >= 3000 && !enemynear,ctrl
trigger5 = random >= 900

trigger6 = ctrl || (stateno = [21,22])
trigger6 = (enemynear,BackEdgebodyDist > 80 && (P2bodydist X = [136,200])) || BackEdgebodyDist < 20 
trigger6 = !var(42) || var(42) >= 10
trigger6 = enemynear,ctrl = 0
trigger6 = enemynear,vel X = [0,5]
trigger6 = (var(58)%3 = 0) || var(58)%2 = 1 && (var(54) = [5,25])
trigger6 = Random <= 140

;---------------------------------------------------------------------------
;阿修羅閃空(fwd)(真)
[State -1,asura]
type = ChangeState
value = 1601
triggerall = var(59)
triggerall = var(12)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = !((var(45)=[200,330])&&var(42))
trigger1 = ctrl || (stateno = [21,22])
trigger1 = !var(42) || var(42) >= 9
trigger1 = P2bodydist X = [28,90]
trigger1 = enemynear,vel X >= 0
trigger1 = !var(55) || var(55) >= 17
trigger1 = !(enemynear,alive = 1 && (P2StateType = L || P2stateno = 5120 || P2stateno = 5201))
trigger1 = var(58) = [40,ifelse((100*life/const(data.life))<=35,44,47)]
trigger1 = random <= 140+(var(59)*100)

trigger2 = ctrl || (stateno = [21,22])
trigger2 = !var(42) || var(42) >= 5
trigger2 = var(55) <= 8 || var(55) >= 25
trigger2 = var(58)%2 = 1 && !NumProj || NumProj && (var(58) = [0,40])
trigger2 = P2bodydist X >= 195
trigger2 = enemynear,stateno != [3000,3999]
trigger2 = Random <= 250+(var(59)*25)

trigger3 = ctrl || (stateno = [21,22])
trigger3 = BackEdgebodyDist < 20
trigger3 = !var(42) || var(42) >= 10
trigger3 = P2bodydist X <= 110 
trigger3 = enemynear,vel X = [0,7]
trigger3 = var(58)%3 = 1 || var(58)%2 = 1 && (var(54) = [5,25])
trigger3 = Random <= 170+(var(59)*10)

trigger4 = ctrl || (stateno = [21,23])
trigger4 = P2bodydist X >= 180
trigger4 = enemynear,vel X = [-3,4.5] 
trigger4 = P2StateType != L
trigger4 = P2MoveType != H
trigger4 = enemynear,ctrl = 0
trigger4 = enemynear,animtime <= -40
trigger4 = var(58)%5 = [3,4]
trigger4 = random = [1+(var(59)*80),ifelse((100*life/const(data.life))<=30,450,600)]

trigger5 = ctrl || (stateno = [21,23])
trigger5 = var(58)%3 = 2
trigger5 = !var(42) || var(42) >= 4
trigger5 = P2bodydist X = [60,170]
trigger5 = enemynear,numproj
trigger5 = random >= 950-(var(59)*50)

trigger6 = ctrl || (stateno = [21,22])
trigger6 = BackEdgebodyDist < 20
trigger6 = P2bodydist X <= 110 
trigger6 = enemynear,vel X = [-2,8]
trigger6 = ((var(46) != [1,25]) && (var(47) != [1,30])) || !inguarddist
trigger6 = (var(54) != [5,20]) || !inguarddist
trigger6 = P2movetype = A && enemynear,numhelper || enemynear,numproj
trigger6 = Random >= 900

trigger7 = ctrl || (stateno = [21,22])
trigger7 = !var(42) || var(42) >= 4
trigger7 = P2StateType = A
trigger7 = P2MoveType != H
trigger7 = p2bodydist x = [90,160]
trigger7 = p2bodydist y = [-80,-50]
trigger7 = enemynear,vel X >= 3
trigger7 = var(58)%3 = 2
trigger7 = random >= 950-(var(59)*50)

trigger8 = ctrl || (stateno = [21,23])
trigger8 = !var(42) || var(42) >= 9
trigger8 = P2StateType != L && P2stateno != 5120
trigger8 = power >= 1000
trigger8 = !((var(55)=[40,65]) && var(45) = 1605)
trigger8 = p2bodydist x = [50,190]
trigger8 = p2bodydist y = [-40,0]
trigger8 = enemynear,vel X = [-2,8]
trigger8 = var(58)%3 = 0
trigger8 = random >= 900

trigger9 = ctrl || (stateno = [21,23])
trigger9 = !var(42) || var(42) >= 4
trigger9 = var(46) != [1,25]
trigger9 = P2stateno != 5150
trigger9 = enemynear,hitdefattr = SCA,ST,HT,HA || (P2stateno = [5080,5999])&&P2statetype != A || var(55) = [8,30]
trigger9 = p2bodydist x = [10,120]
trigger9 = enemynear,vel X >= 3
trigger9 = var(58)%2 = 0 || (100*life/const(data.life))<=35
trigger9 = random >= 800-(var(59)*75)

trigger10 = ctrl || (stateno = [21,23])
trigger10 = !var(42) || var(42) >= 4
trigger10 = P2bodydist X = [0,75]
trigger10 = enemynear,alive = 1
trigger10 = P2StateType = L || (P2stateno = 5120 || P2stateno = 5201)
trigger10 = backedgebodydist <= 35
trigger10 = random <= 100+(var(59)*75)

trigger11 = ctrl || (stateno = [21,22])
trigger11 = (var(45) = [1200,1400]) && var(6)
trigger11 = (var(58) = [0,43])
trigger11 = var(42) = [3,8]
trigger11 = P2bodydist X >= 175
trigger11 = power >= 1300
trigger11 = enemynear,stateno != [3000,3999]
trigger11 = Random <= 350

;---------------------------------------------------------------------------
;阿修羅閃空(back)
[State -1,asura]
type = ChangeState
value = 1600
triggerall = var(59)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = !((var(45)=[200,330])&&var(42))
triggerall = !((var(55)=[40,65]) && var(42) && var(45) = 1605)
trigger1 = ctrl || (stateno = [21,22])
trigger1 = !var(42) || var(42) >= 8
trigger1 = var(55) <= 6 && p2bodydist x >= 100 || var(55) >= 16
trigger1 = !numproj
trigger1 = p2bodydist x >= 60
trigger1 = BackEdgebodyDist >= 55
trigger1 = var(58) = [43,ifelse((100*life/const(data.life))<=35,47,50)]
trigger1 = random <= 160+(var(59)*100)

trigger2 = ctrl || (stateno = [21,22])
trigger2 = !var(42) || var(42) >= 6
trigger2 = var(55) <= 50
trigger2 = var(55) <= 8 && p2bodydist x >= 100 || var(55) >= 9
trigger2 = var(58)%3 = 1 || var(12) && (var(55) = [12,50]) && var(58)%2 = 0
trigger2 = BackEdgebodyDist >= 55
trigger2 = !enemynear,numproj
trigger2 = enemynear,numhelper && P2movetype = A
trigger2 = enemynear,stateno != [3000,3999]
trigger2 = Random <= 250+(var(59)*25)
ignorehitpause = 0

;---------------------------------------------------------------------------
;百鬼襲
[State -1]
type = ChangeState
value = 1700
triggerall = var(59)
triggerall = !var(12)
triggerall = !var(13)
triggerall = p2stateno != var(44)
triggerall = statetype != A
triggerall = roundstate = 2
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
triggerall = P2StateType != L
triggerall = P2MoveType != H
trigger1 = ctrl || (stateno = [21,22])
trigger1 = var(54) <= 50
trigger1 = P2bodydist X = [125,160]
trigger1 = enemynear,hitdefattr != SCA,HA,AP,HT
trigger1 = !enemynear,numproj
trigger1 = enemynear,time >= 8 && enemynear,animtime <= -20
trigger1 = !enemynear,ctrl && !enemynear,vel x && !enemynear,vel y
trigger1 = P2StateType != A && (100*life/const(data.life)) >= 35
trigger1 = random >= 920

;---------------------------------------------------------------------------
;豪波動拳(ノーマル)
[State -1,hadou]
type = ChangeState
value = 1200
triggerall = var(59)
triggerall = !var(12)
triggerall = !var(13)
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = !NumProj
triggerall = statetype != A
triggerall = (Projcontacttime(1200) !=[0,50]) && (Projcontacttime(1201) !=[0,50])
;triggerall = !inguarddist
triggerall = !enemynear,numproj
trigger1 = ctrl || (stateno = [21,22]) && time >= 2
trigger1 = !var(42) || var(42) >= 6
trigger1 = Var(55) <= 4
trigger1 = ((var(46) != [1,30]) && (var(47) != [1,30]))
trigger1 = (var(54) != [1,16]) || !inguarddist
trigger1 = !var(51) || var(51) >= 65
trigger1 = !(numtarget && (target,stateno = [5050,5101]))
trigger1 = (Projcontacttime(1000) !=[0,180]) && (Projcontacttime(1100) !=[0,180])
trigger1 = P2bodydist X = [145,180]
trigger1 = P2bodydist y = [ifelse(enemynear,vel x <= 0,-48,-36),0]
trigger1 = enemynear,vel x <= 0
trigger1 = enemynear,vel y >= 0
trigger1 = P2StateType != L || (P2stateno = 5120 && enemynear,animtime > -6)
trigger1 = random <= 80
;trigger1 = (P2StateType = A && (var(58) = [65,99])) || var(58) = [15,24+var(59)]

trigger2 = ctrl || stateno = [21,23]
trigger2 = Var(55) <= 30 || enemynear,animtime >= -4
trigger2 = Enemynear,hitdefattr = SC,NA || P2stateno = [200,799]
trigger2 = ((var(46) != [1,20]) && (var(47) != [1,25]))
trigger2 = (var(54) != [1,16]) || !inguarddist
trigger2 = P2bodydist X = [110,155]
trigger2 = P2bodydist y = [-30,0]
trigger2 = enemynear,vel X <= 3
trigger2 = enemynear,vel Y >= 0
trigger2 = Enemynear,time >= 16 || var(58)%5 = [1,3]
trigger2 = random <= 300

trigger3 = !inguarddist
trigger3 = P2bodydist X >= ifelse(frontedgedist >= 80, 15, 38)
trigger3 = StateNo = 325 && animelemtime(4)<0 || StateNo = 330 && animelemtime(3)<0 || StateNo = 305 && animelemtime(4)<0
trigger3 = P2MoveType = H
trigger3 = time > 2
trigger3 = numtarget
trigger3 = !(P2bodydist X <= 45 && target,backedgedist <= 20 && var(3) = 2)
trigger3 = (var(3) = 1 &&((100*life/const(data.life))<= 35||random <= 750)) || (var(3) = 2 && random <= 500)

trigger4 = P2StateType != A
trigger4 = !inguarddist
trigger4 = stateno=210 && animelemtime(4)<0 || stateno=260 && animelemtime(3)<0
trigger4 = P2MoveType = H
trigger4 = time > 2
trigger4 = numtarget
trigger4 = var(3)=1||var(3)=2 && P2bodydist X >= ifelse(frontedgedist >= 80, 15, 38)
trigger4 = !(P2bodydist X <= 45 && target,backedgedist <= 20 && var(3) = 2)
trigger4 = var(3) = 1 && random <= 900 || var(3) = 2 && (stateno = 210 || (stateno = 260 && var(58)%2 = 1))

trigger5 = P2StateType != A
trigger5 = !inguarddist
trigger5 = P2MoveType = H
trigger5 = StateNo = 300 && time > 2
;trigger5 = PrevStateNo = 300 || PrevStateNo = 320
trigger5 = P2bodydist X >= 35
trigger5 = numtarget
trigger5 = var(3)=1||var(3)=2 && P2bodydist X >= ifelse(frontedgedist >= 80, 15, 38)
trigger5 = (random >= 400 && (100*life/const(data.life))>= 40) || (random <= 850 && (100*life/const(data.life))<= 40)

trigger6 = ctrl || stateno = [21,22]
trigger6 = (100*life/const(data.life)) >= 25
trigger6 = P2StateType != A
trigger6 = var(46) >= 20
trigger6 = P2bodydist X = [75,145]
trigger6 = !enemynear,ctrl
trigger6 = enemynear,hitdefattr != SCA,HA && (p2stateno != [3000,3999])
trigger6 = P2movetype = I || (P2movetype = A && (enemynear,time <= 4 || enemynear,time >= 16 && enemynear,animtime >= -10))
trigger6 = enemynear,animtime <= -3
trigger6 = var(58)%2 = 1
trigger6 = random <= 300+(var(59)*50)

trigger7 = ctrl || stateno = [21,22]
trigger7 = Var(55) <= 6
trigger7 = !var(42) || var(42) >= 6
trigger7 = ((var(46) != [1,30]) && (var(47) != [1,30]))
trigger7 = (var(54) != [1,16]) || !inguarddist
trigger7 = !(numtarget && (target,stateno = [5050,5101]))
trigger7 = (Projcontacttime(1000) !=[0,180]) && (Projcontacttime(1100) !=[0,180])
trigger7 = P2StateType != L || (P2stateno = 5120 && enemynear,animtime > -6)
trigger7 = P2bodydist X >= 180
trigger7 = P2bodydist Y >= -65
trigger7 = enemynear,vel X <= 4
trigger7 = enemynear,vel Y >= -4
;trigger7 = (P2StateType = A && (var(58) = [65,99])) || var(58) = [15,23+var(59)]
trigger7 = random <= 150

trigger8 = ctrl || stateno = [21,23]
trigger8 = facing*enemynear,facing = 1
trigger8 = P2StateType != L
trigger8 = P2stateno != 5120 && P2stateno != 5201
trigger8 = P2bodydist X = [ceil(85*const(size.xscale)),180]
trigger8 = P2bodydist y = [-30,0]
trigger8 = abs(enemynear,vel X) <= 5
trigger8 = enemynear,vel Y >= 0
trigger8 = numenemy = 2 && var(58)%3 = 1 || numenemy = 1
trigger8 = random <= 450+(var(59)*50)

trigger9 = ctrl || stateno = [21,23]
trigger9 = var(45) = 450 && var(42)
trigger9 = var(48)
trigger9 = P2bodydist X >= 40
trigger9 = P2bodydist y = [-45,-16]
trigger9 = enemynear,vel X <= 2
trigger9 = enemynear,vel Y > 0
trigger9 = P2StateType = A
trigger9 = Var(55) <= 4
trigger9 = var(58) = [10,70]
trigger9 = random <= 400
ignorehitpause = 0

;---------------------------------------------------------------------------
;豪波動拳(真)
[State -1,hadou]
type = ChangeState
value = 1200
triggerall = var(59)
triggerall = var(12)
triggerall = !var(13)
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = !NumProj
triggerall = statetype != A
triggerall = (Projcontacttime(1200) !=[0,50]) && (Projcontacttime(1201) !=[0,50])
;triggerall = !inguarddist
triggerall = !enemynear,numproj
trigger1 = ctrl || (stateno = [21,22]) && time >= 2
trigger1 = !var(42) || var(42) >= 6
trigger1 = Var(55) <= 4
trigger1 = ((var(46) != [1,30]) && (var(47) != [1,30]))
trigger1 = (var(54) != [1,16]) || !inguarddist
trigger1 = !var(51) || var(51) >= 65
trigger1 = !(numtarget && (target,stateno = [5050,5101]))
trigger1 = (Projcontacttime(1000) !=[0,180]) && (Projcontacttime(1100) !=[0,180])
trigger1 = P2bodydist X = [145,180]
trigger1 = P2bodydist y = [ifelse(enemynear,vel x <= 0,-48,-36),0]
trigger1 = enemynear,vel x <= 4
trigger1 = enemynear,vel y >= -2
trigger1 = P2StateType != L || (P2stateno = 5120 && enemynear,animtime > -6)
trigger1 = random <= 690+(var(59)*40)
trigger1 = (P2StateType = A && (var(58) = [65,99])) || var(58) = [15,24+var(59)]

trigger2 = ctrl || (stateno = [21,22]) && time >= 2
trigger2 = Var(55) <= 2
trigger2 = ((var(46) != [1,30]) && (var(47) != [1,30]))
trigger2 = (var(54) != [1,16]) || !inguarddist
trigger2 = !var(51) || var(51) >= 65
trigger2 = !(numtarget && (target,stateno = [5050,5101]))
trigger2 = (Projcontacttime(1000) !=[0,180]) && (Projcontacttime(1100) !=[0,180])
trigger2 = P2bodydist X = [110,144]
trigger2 = P2bodydist y = [-30,0]
trigger2 = enemynear,vel x <= 4
trigger2 = enemynear,vel y >= 0
trigger2 = P2StateType != L
trigger2 = P2stateno != 5120 && P2stateno != 5201
trigger2 = random <= ifelse((100*life/const(data.life))<=35,650-(var(59)*50),910-(var(59)*10))
trigger2 = (P2StateType = A && (var(58) = [65,99])) || var(58) = [13,19]

trigger3 = !inguarddist
trigger3 = P2bodydist X >= ifelse(frontedgedist >= 80, 15, 38)
trigger3 = !(P2bodydist X <= 45 && target,backedgedist <= 20 && var(3) = 2)
trigger3 = StateNo = 325 && animelemtime(4)<0 || StateNo = 330 && animelemtime(3)<0 || StateNo = 305 && animelemtime(4)<0
trigger3 = P2MoveType = H
trigger3 = time > 2
trigger3 = numtarget
trigger3 = (var(3) = 1 &&((100*life/const(data.life))<= 38||random <= 820)) || (var(3) = 2 && ((stateno = 330&& random<=250)||var(58)%3=1))

trigger4 = P2StateType != A
trigger4 = !inguarddist
trigger4 = stateno=210 && animelemtime(4)<0 || stateno=260 && animelemtime(3)<0
trigger4 = P2MoveType = H
trigger4 = time > 2
trigger4 = numtarget
trigger4 = !(P2bodydist X <= 45 && target,backedgedist <= 20 && var(3) = 2)
trigger4 = var(3)=1||var(3)=2 && P2bodydist X >= ifelse(frontedgedist >= 80, 15, 38)
trigger4 = var(3) = 1 && random <= 900 || var(3) = 2 && (stateno = 210 || (stateno = 260 && var(58)%2 = 1))

trigger5 = P2StateType != A
trigger5 = !inguarddist
trigger5 = P2MoveType = H
trigger5 = StateNo = 320 && time = 6
trigger5 = PrevStateNo = 320
trigger5 = P2bodydist X >= ceil(43*const(size.xscale))
trigger5 = var(3) = 1 && numtarget
trigger5 = (random >= 400 && (100*life/const(data.life))>= 40) || (random <= 850 && (100*life/const(data.life))<= 40)

trigger6 = ctrl || stateno = [21,22]
trigger6 = (100*life/const(data.life)) >= 25
trigger6 = P2StateType != A
trigger6 = var(46) >= 20
trigger6 = P2bodydist X = [48,135]
trigger6 = !enemynear,ctrl
trigger6 = enemynear,hitdefattr != SCA,HA && (p2stateno != [3000,3999])
trigger6 = P2movetype = I || (P2movetype = A && (enemynear,time <= 4 || enemynear,time >= 16 && enemynear,animtime >= -10))
trigger6 = enemynear,animtime <= -3
trigger6 = var(58)%2 = 1
trigger6 = random <= 300+(var(59)*50)

trigger7 = ctrl || stateno = [21,22]
trigger7 = Var(55) <= 6
trigger7 = !var(42) || var(42) >= 6
trigger7 = ((var(46) != [1,30]) && (var(47) != [1,30]))
trigger7 = (var(54) != [1,16]) || !inguarddist
trigger7 = !(numtarget && (target,stateno = [5050,5101]))
trigger7 = (Projcontacttime(1000) !=[0,180]) && (Projcontacttime(1100) !=[0,180])
trigger7 = P2StateType != L || (P2stateno = 5120 && enemynear,animtime > -6)
trigger7 = P2bodydist X >= 180
trigger7 = P2bodydist Y >= -65
trigger7 = enemynear,vel X <= 5
trigger7 = enemynear,vel Y >= -4
trigger7 = (P2StateType = A && (var(58) = [65,99])) || var(58) = [15,23+var(59)]
trigger7 = random <= 720+(var(59)*40)

trigger8 = ctrl || stateno = [21,23]
trigger8 = facing*enemynear,facing = 1
trigger8 = P2StateType != L
trigger8 = P2stateno != 5120 && P2stateno != 5201
trigger8 = P2bodydist X = [ceil(85*const(size.xscale)),180]
trigger8 = P2bodydist y = [-30,0]
trigger8 = abs(enemynear,vel X) <= 5
trigger8 = enemynear,vel Y >= 0
trigger8 = numenemy = 2 && var(58)%3 = 1 || numenemy = 1
trigger8 = random <= 450+(var(59)*50)

trigger9 = ctrl || (stateno = [21,22])
trigger9 = !var(42) || var(42) >= 6
trigger9 = Var(55) <= 4
trigger9 = ((var(46) != [1,30]) && (var(47) != [1,30]))
trigger9 = (var(54) != [1,16]) || !inguarddist
trigger9 = !var(51) || var(51) >= 65
trigger9 = ProjGuardedTime(1000) = [1,20]
trigger9 = P2bodydist X = [125,170]
trigger9 = P2bodydist y = [-35,0]
trigger9 = numtarget && target,backedgebodydist >= 5
trigger9 = random <= 690+(var(59)*40)
trigger9 = var(58)%5 = [1,3]

trigger10 = ctrl || stateno = [21,23]
trigger10 = Var(55) <= 30 || enemynear,animtime >= -4
trigger10 = Enemynear,hitdefattr = SC,NA || P2stateno = [200,799]
trigger10 = ((var(46) != [1,20]) && (var(47) != [1,25]))
trigger10 = (var(54) != [1,16]) || !inguarddist
trigger10 = P2bodydist X = [95,145]
trigger10 = P2bodydist y = [-30,0]
trigger10 = enemynear,vel X <= 3
trigger10 = enemynear,vel Y >= 0
trigger10 = Enemynear,time >= 16 || var(58)%5 = [1,3]
trigger10 = random <= 320

trigger11 = ctrl || stateno = [21,23]
trigger11 = P2bodydist X = [95,155]
trigger11 = P2StateType != L
trigger11 = P2StateType != A
trigger11 = P2MoveType != H
trigger11 = P2stateno != 5120 && P2stateno != 5201
trigger11 = enemynear,ctrl = 0
trigger11 = enemynear,time >= 6
trigger11 = enemynear,animtime <= -6 || !inguarddist
trigger11 = random <= 350
trigger11 = var(58)%2 = 0

trigger12 = ctrl || stateno = [21,23]
trigger12 = var(45) = 450 && var(42)
trigger12 = var(48)
trigger12 = P2bodydist X >= 40
trigger12 = P2bodydist y = [-45,0]
trigger12 = enemynear,vel X <= 2
trigger12 = enemynear,vel Y >= 0
trigger12 = P2StateType = A
trigger12 = Var(55) <= 4
trigger12 = var(58)%2 = 0
trigger12 = random <= 350
ignorehitpause = 0

;---------------------------------------------------------------------------
;空中竜巻斬空脚
[State -1]
type = ChangeState
value = 1500
triggerall = var(59)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = statetype = A
triggerall = P2stateno != 5201
triggerall = Ctrl
triggerall = Pos Y <= -30
trigger1 = P2statetype = A
trigger1 = P2bodydist X = [-5,50]
trigger1 = P2bodydist Y = [-60,40]
trigger1 = enemynear,vel X >= -2
trigger1 = P2stateno != 5120 && P2StateType != L
trigger1 = random >= 650

trigger2 = P2statetype != A
trigger2 = P2bodydist X = [-40,40]
trigger2 = P2bodydist Y = [5,40]
trigger2 = Vel Y >= 0
trigger2 = enemynear,vel X >= -2
trigger2 = P2stateno != 5120 && P2StateType != L
trigger2 = var(58)%2 = 1 || var(46) || var(49) >= 2
trigger2 = random <= 450

trigger3 = P2bodydist X = [-40,5]
trigger3 = P2bodydist Y = [-60,ifelse(enemynear,const(size.head.pos.y) <= -70,60,40)]
trigger3 = Vel Y > -5
trigger3 = P2stateno != 5120 && P2StateType != L
trigger3 = random <= 550

trigger4 = (P2stateno = 5120 && (enemynear,animtime = [-7,-1])) || var(49) || (var(58)%2 = 0 && P2StateType != L)
trigger4 = frontedgebodydist >= 30 ||  frontedgebodydist <= 4
trigger4 = P2dist X = [-40,40]
trigger4 = P2bodydist Y = [ifelse(Pos y > -45,30,5),ifelse(P2dist X < 6,70,40)]
trigger4 = random <= 550
ignorehitpause = 0

;---------------------------------------------------------------------------
;斬空波動拳(ノーマル)
[State -1]
type = ChangeState
value = 1400
triggerall = var(59)
triggerall = !var(12)
triggerall = !var(13)
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = !NumProj
triggerall = statetype = A && time >= 5
triggerall = !var(51) || var(51) >= 65
triggerall = Ctrl
trigger1 = P2bodydist X = [105,135]
trigger1 = P2bodydist Y >= 40
trigger1 = enemynear,vel X <= 4.5
trigger1 = P2StateType != L
trigger1 = P2stateno != 5120
trigger1 = P2stateno != 5201
trigger1 = vel Y = [-2.5,1.5]
trigger1 = (P2stateno != [3000,3999])
trigger1 = enemynear,HitDefAttr != SCA, SA,HA,HP
trigger1 = (100*life/const(data.life))>=25
trigger1 = random <= 350

trigger2 = P2bodydist X = [80,110]
trigger2 = P2bodydist Y >= 30
trigger2 = enemynear,vel X <= 2
trigger2 = P2StateType != L
trigger2 = P2stateno != 5120
trigger2 = P2stateno != 5201
trigger2 = Vel X = 0
trigger2 = vel Y = [-2.5,1.5]
trigger2 = (P2stateno != [3000,3999])
trigger2 = enemynear,HitDefAttr != SCA, AA,HP
trigger2 = (100*life/const(data.life))>=25
trigger2 = Var(55) <= 6
trigger2 = random <= 350

trigger3 = Var(55) <= 6
trigger3 = P2bodydist X >= 150
trigger3 = P2bodydist Y >= -30
trigger3 = enemynear,vel X <= 4
trigger3 = P2MoveType != H
trigger3 = vel Y = [-2.5,1]
trigger3 = random >= 830

trigger4 = Var(55) <= 3
trigger4 = P2bodydist X = [ifelse(!vel x, 70, 90),ifelse(!vel x, 115, 125)]
trigger4 = enemynear,vel X <= 2
trigger4 = P2stateno = 5120 && enemynear,animtime > -18
trigger4 = vel Y = [-2.5,2]
trigger4 = var(58) = [0,87]
trigger4 = random <= 700

;---------------------------------------------------------------------------
;斬空波動拳(真)
[State -1]
type = ChangeState
value = 1400
triggerall = var(59)
triggerall = var(12)
triggerall = !var(13)
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = !NumProj
triggerall = statetype = A && time >= 5
triggerall = Var(55) <= 3
triggerall = !var(51) || var(51) >= 65
triggerall = Ctrl
trigger1 = P2bodydist X = [145,165]
trigger1 = enemynear,vel X <= 4.5
trigger1 = (Projcontacttime(1200) !=[0,120]) && (Projcontacttime(1201) !=[0,120])
trigger1 = P2StateType != L
trigger1 = P2stateno != 5120
trigger1 = P2stateno != 5201
trigger1 = Vel X >= 0
trigger1 = vel Y = [-5,-2]
trigger1 = var(58)%3 = [0,1]
trigger1 = gametime%3 = 1

trigger2 = P2bodydist X = [145,165]
trigger2 = enemynear,vel X <= 4.5
trigger2 = (Projcontacttime(1200) !=[0,120]) && (Projcontacttime(1201) !=[0,120])
trigger2 = P2StateType != L
trigger2 = P2stateno != 5120
trigger2 = P2stateno != 5201
trigger2 = Vel X < 0
trigger2 = vel Y = [-7.5,-4.5]
trigger2 = backedgebodydist <= 50
trigger2 = var(58)%3 = [0,1]
trigger2 = gametime%3 = 1

trigger3 = P2bodydist X >= 145
trigger3 = P2stateno = 5120 && enemynear,animtime > -23
trigger3 = vel Y = [ifelse(vel x<0,-7.5,-6),ifelse(vel x<0,-4,-3)]
trigger3 = Vel X >= 0 || Vel X < 0 && backedgebodydist <= 55
trigger3 = gametime%3 = 1

trigger4 = P2bodydist X >= 135
trigger4 = P2bodydist Y = [-40,50]
trigger4 = enemynear,vel X <= 6
trigger4 = P2StateType = A
trigger4 = P2MoveType != H
trigger4 = Var(55) <= 3
trigger4 = vel Y = [-6,ifelse(vel x >= 0,1.5,-1)]
trigger4 = random >= 750

trigger5 = P2bodydist X >= 165
trigger5 = (Projcontacttime(1200) !=[0,60]) && (Projcontacttime(1201) !=[0,60])
trigger5 = enemynear,vel X <= 5
trigger5 = P2StateType != L
trigger5 = P2stateno != 5120
trigger5 = P2stateno != 5201
trigger5 = vel Y = [ifelse(vel x<0,-7.5,-6),ifelse(vel x<0,-4,-3)]
trigger5 = var(58)%4 = [0,2]
trigger5 = gametime%4 = 1

trigger6 = P2bodydist X >= 185
trigger6 = (Projcontacttime(1200) !=[0,60]) && (Projcontacttime(1201) !=[0,60])
trigger6 = P2StateType != L
trigger6 = P2stateno != 5120
trigger6 = P2stateno != 5201
trigger6 = vel Y = [ifelse(vel x<0,-7,-6),-3]
trigger6 = var(58)%3 = [1,2]
trigger6 = gametime%4 = 1

trigger7 = P2bodydist X = [160,195]
trigger7 = (Projcontacttime(1200) !=[0,60]) && (Projcontacttime(1201) !=[0,60])
trigger7 = P2StateType != L
trigger7 = P2stateno != 5120
trigger7 = P2stateno != 5201
trigger7 = enemynear,vel X <= 4.5
trigger7 = Vel X > 0
trigger7 = vel Y = [-2.5,1.5]
trigger7 = var(58)%2 = 1
trigger7 = gametime%3 = 1

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;投げ
[State -1,throw]
type = ChangeState
value = 900
triggerall = var(59)
triggerall = statetype = S
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
triggerall = ctrl || (stateno = [21,23])
triggerall = p2bodydist X = [-13,28]
triggerall = P2stateno != [150,153]
triggerall = P2stateno != [39,41]
triggerall = P2StateType != A
triggerall = !((enemynear,prevstateno = [5000,5999]) && enemynear,time <= 4)
trigger1 = P2MoveType = I || (P2MoveType = A && P2stateno != [3000,3999]) && enemynear,time > 10
trigger1 = abs(enemynear,vel x) < 2.5
trigger1 = Random >= 900

trigger2 = P2MoveType = I || (P2MoveType = A && P2stateno != [3000,3999]) && enemynear,time > 10
trigger2 = stateno = 23 && random >= 750

trigger3 = P2MoveType = I || (P2MoveType = A && P2stateno != [3000,3999]) && enemynear,time > 10
trigger3 = !enemynear,ctrl
trigger3 = var(58)%3 = [0,1]
trigger3 = random >= 850

trigger4 = var(46) >= 20
trigger4 = enemynear,time > 20
trigger4 = !enemynear,ctrl
trigger4 = enemynear,animtime = [-3,-1]
trigger4 = random <= 350

trigger5 = (stateno = [120,140]) || (prevstateno = [120,140])
trigger5 = P2MoveType = I || (P2MoveType = A && P2stateno != [3000,3999])
trigger5 = random <= 450

trigger6 = P2MoveType = I
trigger6 = abs(enemynear,vel x) > 4 && enemynear,time > 10
trigger6 = Random >= 650

;---------------------------------------------------------------------------
;しゃがみ強キック
[State -1,kik]
type = ChangeState
value = 330
triggerall = var(59)
triggerall = !var(13)
triggerall = var(49) != [1,5]
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = !var(53)
triggerall = statetype != A
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
triggerall = ctrl || (stateno = [21,22])
trigger1 = P2bodydist X = [52,62]
trigger1 = P2StateType != A
trigger1 = (100*life/const(data.life)) >= 32
trigger1 = P2MoveType = I
trigger1 = var(58)%2 = 0
trigger1 = ((var(46) != [1,30]) && (var(47) != [1,30])) || enemynear,ctrl = 0
trigger1 = (var(54) != [1,16]) || enemynear,ctrl = 0
trigger1 = !numtarget
trigger1 = !((100*life/const(data.life)) <= 35&&(var(45)=[200,330])&&var(42))
trigger1 = Random <= 300

trigger2 = var(42) = [3,8]
trigger2 = (var(12) && (var(58)%3 = [0,1])) || (!var(12) && (var(58) = [0,ifelse(var(45) = 320,80,72)]))
trigger2 = P2bodydist X = [39,62]
trigger2 = !InGuardDist
trigger2 = P2StateType != A
trigger2 = var(45) = 305 || var(45) = 320 || var(45) = 325
trigger2 = numtarget
trigger2 = (var(48) = 1 && (100*life/const(data.life)) >= 40) || var(48) = 2

trigger3 = var(45) = 200
trigger3 = var(42) = [1,3]
trigger3 = P2bodydist X = [45,62]
trigger3 = !InGuardDist
trigger3 = P2StateType != A
trigger3 = (var(48) = [1,2]) && numtarget

trigger4 = P2bodydist X = [67,82]
trigger4 = P2StateType != A
trigger4 = (100*life/const(data.life)) >= 30
trigger4 = enemynear,vel X >= 3
trigger4 = P2MoveType = I || (P2MoveType = A && (!var(51) || (P2stateno != [3000,3999])))
trigger4 = (var(55) <= 6 && var(58)%2 = 0) || (var(55) >= 6 && var(58)%3 = 0)
trigger4 = !numtarget
trigger4 = Random <= 300

trigger5 = var(45) = 450
trigger5 = enemynear,GetHitVar(hittime) >= 3
trigger5 = P2bodydist X = [ifelse(var(12), 16, 27),62]
trigger5 = P2StateType != A
trigger5 = P2MoveType = H
trigger5 = var(48) = 2 || var(48) = 1 && var(58)%3 = [1,2]
ignorehtpause = 0

;---------------------------------------------------------------------------
;頭蓋破殺
[State -1]
type = ChangeState
value = 460
triggerall = var(59)
triggerall = !var(12)
triggerall = !var(13)
triggerall = var(49) != [1,5]
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = !var(53)
triggerall = statetype != A
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
trigger1 = ctrl || (stateno = [21,22])
trigger1 = P2bodydist X = [38,55]
trigger1 = P2StateType != A
trigger1 = (100*life/const(data.life)) >= 30
trigger1 = ProjGuarded1200 = 1 || ProjGuarded1201 = 1
trigger1 = enemynear,GetHitVar(hittime) >= 13
trigger1 = var(58)%2 = 1
trigger1 = numtarget
trigger1 = Random <= 300

;---------------------------------------------------------------------------
;立ち中キック
[State -1,]
type = ChangeState
value = 260
triggerall = var(59)
triggerall = !var(13)
triggerall = var(49) != [1,5]
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
triggerall = ctrl || (stateno = [21,22])
trigger1 = !numtarget
trigger1 = !var(53)
trigger1 = ((var(46) != [1,30]) && (var(47) != [1,30])) || enemynear,ctrl = 0
trigger1 = (var(54) != [1,16]) || enemynear,ctrl = 0
trigger1 = P2bodydist X = [15,42]
trigger1 = P2MoveType = I
trigger1 = P2StateType != A
trigger1 = var(58)%2 = 1
trigger1 = Random <= 200

trigger2 = var(45) = 320
trigger2 = var(42) = [3,4]
trigger2 = P2StateType != A
trigger2 = P2bodydist X = [0,40]
trigger2 = !InGuardDist
trigger2 = P2StateType != A
trigger2 = P2MoveType = H
trigger2 = (var(12) && (var(58) = [55,99])) || (!var(12) && (var(58) = [89,99]))

trigger3 = var(58)%5 = [3,4]
trigger3 = ((var(46) != [1,30]) && (var(47) != [1,30])) || enemynear,ctrl = 0
trigger3 = (var(54) != [1,16]) || enemynear,ctrl = 0
trigger3 = FrontEdgebodyDist > 90
trigger3 = P2bodydist X = [ifelse(backedgebodydist <= 25, -5, 10),46]
trigger3 = P2bodydist Y = [-88,-62]
trigger3 = !enemynear,numproj
trigger3 = !(enemynear,hitdefattr = A,AA && enemynear,time <= 8)
trigger3 = enemynear,Vel X = [-2,4.5]
trigger3 = enemynear,Vel Y >= 0
trigger3 = P2StateType = A
trigger3 = P2MoveType != H
trigger3 = Random <= 300
ignorehitpause = 0

;---------------------------------------------------------------------------
;しゃがみ中キック
[State -1,k]
type = ChangeState
value = 325
triggerall = var(59)
triggerall = !var(13)
triggerall = !var(53)
triggerall = var(49) != [1,5]
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = P2StateType != L
triggerall = P2StateType != A
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
trigger1 = ctrl || stateno = [21,22]
trigger1 = P2bodydist X = [37,53]
trigger1 = !numtarget
trigger1 = ((var(46) != [1,30]) && (var(47) != [1,30])) || enemynear,ctrl = 0
trigger1 = (var(54) != [1,16]) || enemynear,ctrl = 0
trigger1 = P2MoveType = I
trigger1 = var(58)%2 = 1
trigger1 = Random = [300,550]

trigger2 = ctrl || stateno = [21,22]
trigger2 = !numtarget
trigger2 = P2bodydist X = [1,17]
trigger2 = var(12)
trigger2 = ((var(46) != [1,30]) && (var(47) != [1,30])) || enemynear,ctrl = 0
trigger2 = (var(54) != [1,16]) || enemynear,ctrl = 0
trigger2 = P2MoveType = I
trigger2 = var(58)%2 = 1
trigger2 = Random <= 300

trigger3 = ctrl || stateno = [21,22]
trigger3 = !numtarget
trigger3 = ((var(46) != [1,30]) && (var(47) != [1,30])) || enemynear,ctrl = 0
trigger3 = (var(54) != [1,16]) || enemynear,ctrl = 0
trigger3 = P2bodydist X = [18,36]
trigger3 = P2MoveType = I
trigger3 = var(58)%2 = 1
trigger3 = Random = [250,500]

trigger4 = ctrl || stateno = [21,23]
trigger4 = facing*enemynear,facing = 1
trigger4 = P2bodydist X = [-5,50]
trigger4 = !numtarget
trigger4 = P2MoveType = I || (P2MoveType = A && (!var(51) || (P2stateno != [3000,3999])))
trigger4 = Random <= 750

trigger5 = ctrl || stateno = [21,23]
trigger5 = P2stateno = 52 || !enemynear,ctrl
trigger5 = P2bodydist X = [-5,53]
trigger5 = !numtarget
trigger5 = P2MoveType = I
trigger5 = Random = [250,650]

trigger6 = ctrl || (stateno = [21,22])
trigger6 = var(12)
trigger6 = P2bodydist X = [58,80]
trigger6 = !numtarget
trigger6 = enemynear,vel X >= 3
trigger6 = P2MoveType = I || (P2MoveType = A && (!var(51) || (P2stateno != [3000,3999])))
trigger6 = (var(55) <= 7 && var(58)%2 = 1) || (var(55) >= 7 && var(58)%3 = 1)
trigger6 = Random = [350,600]

trigger7 = ctrl || (stateno = [21,23])
trigger7 = P2StateType = A
trigger7 = P2MoveType = I
trigger7 = P2bodydist X = [0,50]
trigger7 = P2bodydist Y = [-40,0]
trigger7 = enemynear,Vel X >= 0
trigger7 = enemynear,Vel Y > 2
trigger7 = Random <= 350

trigger8 = ctrl || stateno = [21,23]
trigger8 = P2bodydist X = [-5,50]
trigger8 = P2MoveType = H
trigger8 = !((var(45) = [200,330]) && var(42)) && var(12) || (var(45) = 325 && var(42) > 5)  ;(var(45) != [200,330])
trigger8 = Random <= ifelse(var(48) = 1,450,350) || (var(45) = [350,440]) && Random >= ifelse(var(48) = 1,650,750)
ignorehitpause = 0

;---------------------------------------------------------------------------
;しゃがみ中パンチ
[State -1]
type = ChangeState
value = 305
triggerall = var(59)
triggerall = !var(13)
triggerall = !var(53)
triggerall = var(49) != [1,5]
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = P2StateType != L
triggerall = P2StateType != A
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
trigger1 = ctrl || stateno = [21,22]
trigger1 = !numtarget
trigger1 = ((var(46) != [1,26]) && (var(47) != [1,26])) || enemynear,ctrl = 0
trigger1 = (var(54) != [1,16]) || enemynear,ctrl = 0
trigger1 = P2bodydist X = [-5,20]
trigger1 = P2MoveType = I
trigger1 = var(58)%2 = 0
trigger1 = Random <= 350

trigger2 = ctrl || stateno = [21,22]
trigger2 = !numtarget
trigger2 = P2bodydist X = [21,40]
trigger2 = ((var(46) != [1,26]) && (var(47) != [1,26])) || enemynear,ctrl = 0
trigger2 = (var(54) != [1,16]) || enemynear,ctrl = 0
trigger2 = P2MoveType = I
trigger2 = var(58)%2 = 0
trigger2 = (var(12) && (Random = [151,350])) || (!var(12) && Random >= 700)

trigger3 = ctrl || stateno = [21,22]
trigger3 = !numtarget
trigger3 = var(12)
trigger3 = (var(54) != [1,16]) || enemynear,ctrl = 0
trigger3 = P2bodydist X = [45,60]
trigger3 = enemynear,vel X >= 3
trigger3 = P2MoveType = I || (P2MoveType = A && (!var(51) || (P2stateno != [3000,3999])))
trigger3 = var(58)%2 = 0
trigger3 = Random <= 350

trigger4 = ctrl || stateno = [21,23]
trigger4 = P2bodydist X = [1,35]
trigger4 = P2MoveType = H
trigger4 = !((var(45) = [200,330]) && var(42))
trigger4 = Random >= 750

trigger5 = ctrl || stateno = [21,23]
trigger5 = P2bodydist X = [5,35]
trigger5 = var(42) >= 1
trigger5 = !((var(45) = [200,450]) && var(42))
trigger5 = Random >= 300
ignorehitpause = 0

;---------------------------------------------------------------------------
;立ち弱パンチ
[State -1]
type = ChangeState
value = 200
triggerall = var(59)
triggerall = !var(13)
triggerall = !var(53)
triggerall = var(49) != [1,5]
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = P2StateType != L
triggerall = P2StateType != C
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
trigger1 = ctrl || stateno = [21,22]
trigger1 = !numtarget
trigger1 = P2bodydist X = [15,39]
trigger1 = P2MoveType = I
trigger1 = P2StateType = S
trigger1 = ((var(46) != [1,30]) && (var(47) != [1,30])) || enemynear,ctrl = 0
trigger1 = (var(54) != [1,16]) || enemynear,ctrl = 0
trigger1 = prevstateno != 200
trigger1 = Random = [500,600]

trigger2 = ctrl || stateno = [21,22]
trigger2 = P2bodydist X >= 125
trigger2 = P2MoveType != A
trigger2 = !inguarddist
trigger2 = Random >= 990
ignorehitpause = 0

;---------------------------------------------------------------------------
;立ち中パンチ
[State -1]
type = ChangeState
value = 210
triggerall = var(59)
triggerall = !var(13)
triggerall = var(49) != [1,5]
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
trigger1 = ctrl || stateno = [21,22]
trigger1 = var(58)%5 = [2,3]
trigger1 = P2bodydist X = [ifelse(backedgebodydist<=25, -5, 10),42]
trigger1 = P2bodydist Y = [-90,-24]
trigger1 = ((var(46) != [1,30]) && (var(47) != [1,30])) || enemynear,ctrl = 0
trigger1 = (var(54) != [1,16]) || enemynear,ctrl = 0
trigger1 = !enemynear,numproj
trigger1 = !(enemynear,hitdefattr = A,AA && enemynear,time <= 8)
trigger1 = FrontEdgebodyDist > 90
trigger1 = enemynear,Vel Y >= -2
trigger1 = P2StateType = A
trigger1 = P2MoveType != H
trigger1 = Random >= 750

trigger2 = ctrl || (stateno = [21,22])
trigger2 = !numtarget
trigger2 = P2StateType = S
trigger2 = var(12)
trigger2 = ((var(46) != [1,30]) && (var(47) != [1,30])) || enemynear,ctrl = 0
trigger2 = (var(54) != [1,16]) || enemynear,ctrl = 0
trigger2 = P2bodydist X = [1,38]
trigger2 = P2MoveType = I
trigger2 = var(58)%2 = 0
trigger2 = Random <= 200

trigger3 = var(45) = 320
trigger3 = ctrl || (stateno = [21,23])
trigger3 = var(42) = [4,5]
trigger3 = P2StateType != A
trigger3 = P2bodydist X = [0,36]
trigger3 = !InGuardDist
trigger3 = P2StateType != A
trigger3 = P2MoveType = H
trigger3 = var(58) = [0,15]
ignorehitpause = 0

;---------------------------------------------------------------------------
;しゃがみ弱パンチ
[State -1,p]
type = ChangeState
value = 300
triggerall = var(59)
triggerall = !var(13)
triggerall = !var(12)
triggerall = !var(53)
triggerall = var(49) != [1,5]
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = P2StateType != L
triggerall = P2StateType != A
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
trigger1 = P2bodydist X = [5,35]
trigger1 = !InGuardDist
trigger1 = P2StateType != A
trigger1 = (stateno = 300 || stateno = 320)  && animtime = 0
trigger1 = P2MoveType = H
trigger1 = var(58) = [41,70]

;---------------------------------------------------------------------------
;しゃがみ弱キック
[State -1,k]
type = ChangeState
value = 320
triggerall = var(59)
triggerall = !var(13)
;triggerall = var(12)
triggerall = !var(53)
triggerall = var(49) != [1,5]
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = P2StateType != L
triggerall = P2StateType != A
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
trigger1 = ctrl || (stateno = [21,22])
trigger1 = !numtarget
trigger1 = ((var(46) != [1,26]) && (var(47) != [1,26])) || enemynear,ctrl = 0
trigger1 = (var(54) != [1,16]) || enemynear,ctrl = 0
trigger1 = P2bodydist X = [-5,25]
trigger1 = P2MoveType = I
trigger1 = var(58)%2 = 1
trigger1 = Random = [320,570]

trigger2 = ctrl || (stateno = [21,22])
trigger2 = !numtarget
trigger2 = var(12)
trigger2 = ((var(46) != [1,26]) && (var(47) != [1,26])) || enemynear,ctrl = 0
trigger2 = (var(54) != [1,16]) || enemynear,ctrl = 0
trigger2 = P2bodydist X = [26,40]
trigger2 = P2MoveType = I
trigger2 = Random = [200,600]

trigger3 = ctrl || (stateno = [21,22])
trigger3 = !inguarddist
trigger3 = numtarget && (var(3) = [1,2])
trigger3 = var(42) = [1,3]
trigger3 = var(45) = 305 || var(45) = 325
trigger3 = P2bodydist X = [0,42]

trigger4 = ctrl || stateno = [21,22]
trigger4 = P2stateno = 52 || !enemynear,ctrl
trigger4 = P2bodydist X = [0,44]
trigger4 = P2MoveType = I
trigger4 = Random <= 450

trigger5 = ctrl || stateno = [21,22]
trigger5 = P2bodydist X >= 125
trigger5 = P2MoveType != A
trigger5 = !inguarddist
trigger5 = Random = [880,890]

trigger6 = ctrl || (stateno = [21,23])
trigger6 = !numtarget
trigger6 = P2bodydist X = [49,70]
trigger6 = P2MoveType = I || var(12) && (P2MoveType = A && (!var(51) || (P2stateno != [3000,3999])))
trigger6 = enemynear,vel X >= 3
trigger6 = Random >= 750

trigger7 = ((var(58) = [16,30]) && var(12)) || ((var(58) = [0,70]) && !var(12))
trigger7 = P2bodydist X = [0,35]
trigger7 = !InGuardDist
trigger7 = P2StateType != A
trigger7 = stateno = 320 && animtime = 0
trigger7 = P2MoveType = H

trigger8 = ctrl || stateno = [21,23]
trigger8 = P2bodydist X = [0,30]
trigger8 = P2stateno != [120,155]
trigger8 = P2MoveType = H
trigger8 = !((var(45) = [200,330]) && var(42))
trigger8 = enemynear,GetHitVar(hittime) = [1,3]
trigger8 = Random <= 750
ignorehitpause = 0

;---------------------------------------------------------------------------
;立ち強キック
[State -1]
type = null;ChangeState
value = 270
triggerall = var(59)
triggerall = !var(13)
triggerall = var(12)
triggerall = var(49) != [1,5]
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = P2StateType != L
triggerall = P2StateType != C
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
trigger1 = ctrl || stateno = [21,23]
trigger1 = var(58)%3 = [1,2]
trigger1 = FrontEdgebodyDist > ceil(85*const(size.xscale))
trigger1 = P2bodydist X = [ceil(30*const(size.xscale)),ceil(65*const(size.xscale))]
trigger1 = P2bodydist Y = [ceil(-79*const(size.yscale)),ceil(-30*const(size.yscale))]
trigger1 = P2StateType = A
trigger1 = P2MoveType = I || P2MoveType = A && (!var(51) || var(51) >= 65)
trigger1 = enemynear,Vel X = [7,0]
trigger1 = enemynear,Vel Y > 0
trigger1 = Random >= 750
ignorehitpause = 0

;---------------------------------------------------------------------------
;しゃがみ強パンチ
[State -1]
type = null;ChangeState
value = 310
triggerall = var(59)
triggerall = !var(13)
triggerall = var(12)
triggerall = var(49) != [1,5]
triggerall = p2stateno != var(44)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
trigger1 = ctrl || stateno = [21,23]
trigger1 = var(58)%3 = 0
trigger1 = P2bodydist X = [5,ceil(27*const(size.xscale))]
trigger1 = P2bodydist Y = [ceil(-109*const(size.yscale)),ceil(-85*const(size.yscale))]
trigger1 = FrontEdgebodyDist > ceil(70*const(size.xscale))
trigger1 = P2MoveType = I
trigger1 = Random <= 550
ignorehitpause = 0

;---------------------------------------------------------------------------
;天魔空刃脚
[State -1, Taunt]
type = ChangeState
value = 450
triggerall = var(59)
triggerall = roundstate = 2
triggerall = statetype = A
triggerall = Vel Y = [-2.0,2.0]
triggerall = Vel X > 0
triggerall = Pos Y = [-100,-80]
triggerall = Ctrl
trigger1 = P2bodydist X = [25,ifelse(P2bodydist Y >= 40,90,65)]
trigger1 = P2bodydist Y >= -10
trigger1 = enemynear,HitDefAttr != SCA, HA,AP
trigger1 = P2StateType != L
trigger1 = P2stateno != 5120
trigger1 = P2stateno != 5201
trigger1 = !numtarget
trigger1 = P2statetype != A || P2statetype = A && enemynear,vel X = [-2,4]
trigger1 = Random = [500,850]

trigger2 = P2bodydist X = [20,ifelse(P2bodydist Y >= 40,100,65)]
trigger2 = P2bodydist Y >= -10
trigger2 = enemynear,HitDefAttr != SCA, HA,AP
trigger2 = P2StateType != L
trigger2 = P2stateno != 5120
trigger2 = P2stateno != 5201
trigger2 = !numtarget
trigger2 = P2statetype != A && enemynear,vel X >= ifelse(P2bodydist X <= 85,-2,3)
trigger2 = Random <= 350

trigger3 = P2bodydist X = [30,85]
trigger3 = P2bodydist Y >= -10
trigger3 = var(43) != 4
trigger3 = P2stateno != 5201
trigger3 = P2StateType != L || P2stateno = 5120 && (enemynear,animtime = [-13,-1])
trigger3 = Random <= 350

trigger4 = P2bodydist X >= 95 
trigger4 = P2StateType != L
trigger4 = !InGuardDist
trigger4 = !(P2stateno = 5120 && (enemynear,animtime = [-13,-1]))
trigger4 = gametime%2 = 1
trigger4 = Vel Y > -0.5
trigger4 = var(58)%2 = 0 && Random >= 650

trigger5 = P2bodydist X >= 160
trigger5 = !InGuardDist
trigger5 = NumProj || !enemynear,ctrl || (enemynear,stateno = [120,155]) || P2movetype = I
trigger5 = enemynear,Vel X <= 4
trigger5 = Vel Y > -0.5
trigger5 = Random%4 = 1
ignorehitpause = 0

;---------------------------------------------------------------------------
;斜めジャンプ弱キック
[State -1]
type = ChangeState
value = 400
triggerall = var(59)
triggerall = roundstate = 2
triggerall = statetype = A
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
triggerall = Vel Y > -7
triggerall = Pos Y < -45
triggerall = Ctrl
triggerall = Vel X
trigger1 = P2statetype != A
trigger1 = P2bodydist X = [-10,25]
trigger1 = P2bodydist Y = [-37,65]
trigger1 = !(P2MoveType = A && (var(51) ||(P2stateno = [3000,3999])) && enemynear,HitDefAttr != SC, NT,ST,HT)
trigger1 = Vel Y > 1
trigger1 = var(58)%2 = 0 || enemynear,ctrl = 0 || var(46)
trigger1 = random >= 750 

trigger2 = P2bodydist X = [-10,ifelse(enemynear,vel Y< -6,55,40)]
trigger2 = P2bodydist Y = [-35,ifelse(enemynear,vel Y< -4,80,65)]
trigger2 = P2statetype = A
trigger2 = !(P2MoveType = A && (var(51) ||(P2stateno = [3000,3999])) && enemynear,HitDefAttr != SC, NT,ST,HT)
trigger2 = random <= 550
ignorehitpause = 0

;---------------------------------------------------------------------------
;垂直ジャンプ強キック
[State -1]
type = ChangeState
value = 375
triggerall = var(59)
triggerall = roundstate = 2
triggerall = statetype = A
triggerall = !Vel X
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
triggerall = Pos Y < -51
triggerall = Ctrl
trigger1 = p2statetype != A
trigger1 = P2bodydist X = [-10,50]
trigger1 = P2bodydist Y = [-10,57]
trigger1 = !(P2MoveType = A && (var(51) ||(P2stateno = [3000,3999])) && enemynear,HitDefAttr != SC, NT,ST,HT)
trigger1 = Vel Y > 1
trigger1 = Pos Y < -55
trigger1 = Random <= 550

trigger2 = P2StateType = A
trigger2 = P2bodydist X = [70,85]
trigger2 = P2bodydist Y = [ifelse(Vel Y < -2.5,-50,-30),75]
trigger2 = !(P2MoveType = A && (var(51) ||(P2stateno = [3000,3999])) && enemynear,HitDefAttr != SC, NT,ST,HT)
trigger2 = enemynear,vel X = [3,4]
trigger2 = enemynear,vel Y = [-10,8]
trigger2 = random <= 550

trigger3 = P2StateType = A
trigger3 = P2bodydist X = [80,100]
trigger3 = P2bodydist Y = [ifelse(Vel Y < -2.5,-50,-30),75]
trigger3 = !(P2MoveType = A && (var(51) ||(P2stateno = [3000,3999])) && enemynear,HitDefAttr != SC, NT,ST,HT)
trigger3 = enemynear,vel X = (4,10]
trigger3 = enemynear,vel Y = [-10,8]
trigger3 = random >= 450
ignorehitpause = 0

;---------------------------------------------------------------------------
;斜めジャンプ強キック
[State -1]
type = ChangeState
value = 410
triggerall = var(59)
triggerall = roundstate = 2
triggerall = statetype = A
triggerall = Vel X
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
triggerall = Pos Y < -57
triggerall = Ctrl
trigger1 = P2statetype != A
trigger1 = P2bodydist X = [-20,75]
trigger1 = P2bodydist Y = [10,72]
trigger1 = !(P2MoveType = A && (var(51) ||(P2stateno = [3000,3999])) && enemynear,HitDefAttr != SC, NT,ST,HT)
trigger1 = Vel Y > 1.5
trigger1 = (var(58) = [0,70]) || enemynear,ctrl = 0 || var(46)
trigger1 = Random <= 550

trigger2 = P2StateType = A
trigger2 = P2bodydist X = [65,86]
trigger2 = P2bodydist Y = [ifelse(Vel Y < -2.5,-40,-30),ifelse((enemynear,vel Y<=1),80,65)]
trigger2 = !(P2MoveType = A && (var(51) ||(P2stateno = [3000,3999])) && enemynear,HitDefAttr != SC, NT,ST,HT)
trigger2 = Vel X < 0 || enemynear,vel X = [-2,4]
trigger2 = enemynear,vel Y = [-16,12]
trigger2 = (var(58)%3 = [1,2]) || enemynear,ctrl = 0
trigger2 = random <= 350

trigger3 = P2StateType = A
trigger3 = Vel X > 0
trigger3 = P2bodydist X = [80,115]
trigger3 = P2bodydist Y = [ifelse(Vel Y < -2.5,-40,-30),78]
trigger3 = !(P2MoveType = A && (var(51) ||(P2stateno = [3000,3999])) && enemynear,HitDefAttr != SC, NT,ST,HT)
trigger3 = enemynear,vel X = [3.5,8]
trigger3 = enemynear,vel Y = [-16,12]
trigger3 = (var(58)%3 = [0,1]) || enemynear,ctrl = 0
trigger3 = random <= 350

trigger4 = P2StateType = A
trigger4 = frontedgebodydist <= 50 || backedgebodydist <= 50 || P2movetype = I && enemynear,ctrl = 0 || var(46)
trigger4 = P2bodydist X = [45,65]
trigger4 = P2bodydist Y = [ifelse(Vel Y < -2.5,-40,-30),75]
trigger4 = !(P2MoveType = A && (var(51) ||(P2stateno = [3000,3999])) && enemynear,HitDefAttr != SC, NT,ST,HT)
trigger4 = random%3 = 1
ignorehitpause = 0

;---------------------------------------------------------------------------
;斜めジャンプ中キック
[State -1]
type = ChangeState
value = 405
triggerall = var(59)
triggerall = roundstate = 2
triggerall = statetype = A
triggerall = Vel X
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
triggerall = Pos Y < -57
triggerall = Ctrl
trigger1 = P2statetype != A
trigger1 = P2bodydist X = [-10,75]
trigger1 = P2bodydist Y = [10,72]
trigger1 = !(P2MoveType = A && (var(51) ||(P2stateno = [3000,3999])) && enemynear,HitDefAttr != SC, NT,ST,HT)
trigger1 = Vel Y > 1.5
trigger1 = var(58)%2 = 0 || enemynear,ctrl = 0
trigger1 = random >= 600

trigger2 = P2StateType = A
trigger2 = P2bodydist X = [65,86]
trigger2 = P2bodydist Y = [ifelse(Vel Y < -2.5,-40,-30),ifelse((enemynear,vel Y<=1),80,65)]
trigger2 = !(P2MoveType = A && (var(51) ||(P2stateno = [3000,3999])) && enemynear,HitDefAttr != SC, NT,ST,HT)
trigger2 = Vel X < 0 || enemynear,vel X = [2,4]
trigger2 = enemynear,vel Y = [-16,12]
trigger2 = var(58)%2 = 1 || enemynear,ctrl = 0
trigger2 = random = [351,600]

trigger3 = P2StateType = A
trigger3 = Vel X > 0
trigger3 = P2bodydist X = [80,110]
trigger3 = P2bodydist Y = [ifelse(Vel Y < -2.5,-40,-30),75]
trigger3 = !(P2MoveType = A && (var(51) ||(P2stateno = [3000,3999])) && enemynear,HitDefAttr != SC, NT,ST,HT)
trigger3 = enemynear,vel X = (3.5,12]
trigger3 = enemynear,vel Y = [-16,12]
trigger3 = (var(58)%3 = [0,1]) || enemynear,ctrl = 0
trigger3 = random = [351,600]
ignorehitpause = 0

;---------------------------------------------------------------------------
;ジャンプ中パンチ
[State -1]
type = ChangeState
value = 355
triggerall = var(59)
triggerall = roundstate = 2
triggerall = statetype = A
;triggerall = Vel X <= 0
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
triggerall = Pos Y < -45
triggerall = Ctrl
trigger1 = P2StateType != A
trigger1 = P2bodydist X = [-5,ceil(50*const(size.xscale))]
trigger1 = P2bodydist Y = [-20,ceil(45*const(size.yscale))]
trigger1 = !(P2MoveType = A && (var(51) ||(P2stateno = [3000,3999])) && enemynear,HitDefAttr != SC, NT,ST,HT)
trigger1 = Vel Y > 0
trigger1 = random <= 350

trigger2 = P2StateType = A
trigger2 = P2bodydist X = [-5,ceil(62*const(size.xscale))]
trigger2 = P2bodydist Y = [ifelse(Vel Y < -2.5,-50,-30),ceil(60*const(size.yscale))]
trigger2 = !(P2MoveType = A && (var(51) ||(P2stateno = [3000,3999])) && enemynear,HitDefAttr != SC, NT,ST,HT)
trigger2 = enemynear,vel X = [3,16]
trigger2 = enemynear,vel Y = [-16,8]
trigger2 = random%4 = 0
ignorehitpause = 0

;---------------------------------------------------------------------------
;ジャンプ弱パンチ
[State -1]
type = ChangeState
value = 350
triggerall = var(59)
triggerall = roundstate = 2
triggerall = statetype = A
triggerall = P2statetype = A
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
triggerall = Pos Y < -45
triggerall = Vel Y > -7
triggerall = Ctrl
trigger1 = P2StateType = A
trigger1 = P2bodydist X = [50,80]
trigger1 = P2bodydist Y = [-30,45]
trigger1 = !(P2MoveType = A && (var(51) ||(P2stateno = [3000,3999])) && enemynear,HitDefAttr != SC, NT,ST,HT)
trigger1 = Vel X > 0
trigger1 = enemynear,vel X = (4,7]
trigger1 = (var(58)%5 = [2,3]) || enemynear,ctrl = 0
trigger1 = random%3 = 0

trigger2 = P2StateType = A
trigger2 = P2bodydist X = [ifelse(!vel x,37,45),ifelse(!vel x,48,60)]
trigger2 = P2bodydist Y = [-35,58]
trigger2 = !(P2MoveType = A && (var(51) ||(P2stateno = [3000,3999])) && enemynear,HitDefAttr != SC, NT,ST,HT)
trigger2 = Vel X < 0 || (Vel X >= 0 && (enemynear,vel X = [0,6]))
trigger2 = (var(58)%5 = [1,2]) || enemynear,ctrl = 0
trigger2 = random%3 = 1
ignorehitpause = 0

;---------------------------------------------------------------------------
;ジャンプ強パンチ
[State -1]
type = ChangeState
value = 360
triggerall = var(59)
triggerall = roundstate = 2
triggerall = statetype = A
triggerall = Vel X <= 0
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
triggerall = Pos Y < -45
triggerall = Ctrl
trigger1 = P2StateType != A
trigger1 = P2bodydist X = [5,45]
trigger1 = P2bodydist Y = [-40,50]
trigger1 = !(P2MoveType = A && (var(51) ||(P2stateno = [3000,3999])) && enemynear,HitDefAttr != SC, NT,ST,HT)
trigger1 = Vel Y > 0
trigger1 = random >= 750

trigger2 = P2StateType = A
trigger2 = P2bodydist X = [5,50]
trigger2 = P2bodydist Y = [ifelse(Vel Y < -2.5,-50,-40),60]
trigger2 = !(P2MoveType = A && (var(51) ||(P2stateno = [3000,3999])) && enemynear,HitDefAttr != SC, NT,ST,HT)
trigger2 = enemynear,vel X = [0,16]
trigger2 = enemynear,vel Y = [-16,8]
trigger2 = random%4 = 1
ignorehitpause = 0

;---------------------------------------------------------------------------
;ガード
[state -1,gu]
type = ChangeState
value = 131
triggerall = var(59)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = InGuardDist
triggerall = ctrl || (stateno = [21,23])
triggerall = stateno != [120,139]
triggerall = statetype != A
trigger1 = enemynear,numproj || enemynear,numhelper
trigger1 = random <= 150+(var(59)*75) && var(55) <= 13-var(59)||random <= 400+(var(59)*120) && (var(55) >= 21-(var(59)*3) || (var(42) = [1,10]))
trigger2 = enemynear,HitDefAttr = SC, AA
trigger2 = random <= 150+(var(59)*75) && var(55) <= 13-var(59) ||random <= 400+(var(59)*120) && (var(55) >= 21-(var(59)*3) || (var(42) = [1,10]))

[state -1,gu]
type = ChangeState
value = 130
triggerall = var(59)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = InGuardDist
triggerall = ctrl || (stateno = [21,23])
triggerall = stateno != [120,139]
triggerall = statetype != A
trigger1 = enemynear,numproj || enemynear,numhelper
trigger1 = random <= 150+(var(59)*75) && var(55) <= 13-var(59) || random <= 400+(var(59)*120) && (var(55) >= 21-(var(59)*3) || (var(42) = [1,10]))
trigger2 = enemynear,HitDefAttr = A, AA
trigger2 = random <= 150+(var(59)*75) && var(55) <= 13-var(59) || random <= 400+(var(59)*120) && (var(55) >= 21-(var(59)*3) || (var(42) = [1,10]))

[state -1,gu]
type = ChangeState
value = 132
triggerall = var(59)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = InGuardDist
triggerall = ctrl
triggerall = stateno != [120,139]
triggerall = statetype = A
trigger1 = enemynear,numproj || enemynear,numhelper
trigger1 = random <= 150+(var(59)*75) && var(55) <= 13-var(59) || random <= 400+(var(59)*120) && (var(55) >= 21-(var(59)*3) || (var(42) = [1,10]))
trigger2 = enemynear,HitDefAttr = SCA, NA,SA,HA
trigger2 = random <= 150+(var(59)*75) && var(55) <= 4 || random <= 600+(var(59)*75) && (var(55) >= 5 || (var(42) = [1,10]))
trigger3 = numhelper(10010)
trigger3 = random <= 900 && helper,var(20)-var(50)+var(51) >= 12

;---------------------------------------------------------------------------
;歩き
;fwd non stop
[State -1]
type = ChangeState
value = 23
triggerall = Var(59)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = StateType != A
triggerall = P2StateType != L
triggerall = Ctrl || stateno = 22
triggerall = !InGuardDist
triggerall = P2stateno != [5071,5120]
triggerall = stateno != 23
triggerall = stateno != [120,139]
trigger1 = !var(42) || var(42) >= 8
trigger1 = !var(40)
trigger1 = var(58)%3 = [0,1]
trigger1 = stateno != 22
trigger1 = P2bodydist X >= 80
trigger1 = Random%3 = 0

trigger2 = stateno = 22 && time >= 18+(17-4*var(59))
trigger2 = var(58)%3 = 1
trigger2 = p2bodydist X >= 140
trigger2 = Random%3 = 1

trigger3 = Prevstateno = 1115 || Prevstateno = 1515
trigger3 = var(8) = 1 && var(7) = [1,2]

trigger4 = P2bodydist X = [25,70]
trigger4 = P2bodydist Y <= -24
trigger4 = var(8) = 1 && var(7) = [1,2]
trigger4 = var(58)%2 = 0

trigger5 = p2statetype = A
trigger5 = p2movetype != H
trigger5 = stateno = 22 && time >= 11
trigger5 = P2bodydist X = [75,140]
trigger5 = var(58) = [0,35]
trigger5 = Random%3 = 1

trigger6 = var(45) = [300,325]
trigger6 = p2movetype = H
trigger6 = numtarget
trigger6 = P2bodydist X <= 45
trigger6 = var(58)%3 = 1 || var(58)%2 = 1
trigger6 = Random%3 = 1

;stop
[State -1]
type = ChangeState
value = 0
ctrl = 1
triggerall = Var(59)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = StateType != A
triggerall = stateno = [21,22]
triggerall = !InGuardDist
trigger1 = P2bodydist X = [ceil(90*const(size.xscale)),130]
trigger1 = stateno = 21 && time >= 16
trigger1 = time%2 = 1
trigger1 = Random%2 = 1

trigger2 = P2bodydist X = [125,180]
trigger2 = stateno = 22 && time >= 16+(6*var(58)%4)
trigger2 = time%4 = 1
trigger2 = Random%4 = 1

trigger3 = !(enemynear,alive = 1 && (P2StateType = L || P2stateno = 5120 || P2stateno = 5201))
trigger3 = P2bodydist X >= 90 || BackEdgebodyDist < 5
trigger3 = stateno = 22 && time >= 12
trigger3 = Random%2 = 1

trigger4 = stateno = 22 && time >= 30
trigger4 = Random%4 = 1

trigger5 = enemynear,alive = 1 && (P2StateType = L || (P2stateno = 5120 && enemynear,animtime <= -7))
trigger5 = P2bodydist X = [129,134]
trigger5 = var(43) != 4
trigger5 = (100*life/const(data.life)) >= 28
trigger5 = var(58)%5 = [1,2]

;fwd
[State -1]
type = ChangeState
value = 21
triggerall = Var(59)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = StateType != A
triggerall = Ctrl || stateno = 22
triggerall = !InGuardDist
triggerall = stateno != [10,12]
triggerall = stateno != 21
triggerall = stateno != [120,139]
trigger1 = !var(42) || var(42) >= 8+2*random%4
trigger1 = !var(40)
trigger1 = stateno != 22
trigger1 = !(enemynear,alive=1&&(P2bodydist X=[0,135])&&(P2StateType = L||(P2stateno =[5071,5120])))
trigger1 = (P2bodydist X >= 40 && Random%5 = 1)||(P2bodydist X >= 130 && Random%3 = 0)

trigger2 = stateno = 22
trigger2 = time >= 18+(4*var(58)%4)
trigger2 = p2bodydist X >= 140
trigger2 = Random%4 = 1

trigger3 = !var(42) || var(42) >= 8+2*random%4
trigger3 = stateno != 22
trigger3 = P2StateType != L
trigger3 = P2stateno != 5120
trigger3 = P2stateno != 5201
trigger3 = P2bodydist X = [15,80]
trigger3 = var(58)%3= 1
trigger3 = Random%3 = 1

trigger4 = p2statetype = A
trigger4 = p2movetype != H
trigger4 = stateno = 22 && time >= 16
trigger4 = P2bodydist X = [75,140]
trigger4 = var(58)= [0,35]
trigger4 = Random%2 = 1

trigger5 = prevstateno = 1605
trigger5 = var(42) >= 3
trigger5 = P2bodydist X >= 80
trigger5 = Random%2 = 1

trigger6 = P2bodydist X = [160,145]
trigger6 = enemynear,alive = 1
trigger6 = P2StateType = L || P2stateno = 5120 && enemynear,animtime <= -15
trigger6 = P2stateno != 5201
trigger6 = var(58)%5 = [1,2]

trigger7 = !var(40)
trigger7 = BackEdgebodyDist < 15
trigger7 = P2bodydist X = [50,130]
trigger7 = P2StateType = L
trigger7 = stateno != [21,23]
trigger7 = Random%3 = 1


;back
[State -1]
type = ChangeState
value = 22
triggerall = Var(59)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = !var(53)
triggerall = StateType != A
triggerall = Ctrl || stateno = 21
triggerall = !InGuardDist
triggerall = !NumProj
triggerall = stateno != [10,12]
triggerall = stateno != 22
triggerall = stateno != [120,139]
trigger1 = !var(42) || var(42) >= 8+2*random%4
trigger1 = !var(7) || var(7) >= 3
trigger1 = !var(40)
trigger1 = stateno != 21
trigger1 = BackEdgebodyDist > 5
trigger1 = Random%3 = 2

trigger2 = BackEdgebodyDist > 15
trigger2 = !var(7) || var(7) >= 3
trigger2 = enemynear,vel X > 3.7
trigger2 = p2bodydist X = [90,135]
trigger2 = var(58)= [0,15]
trigger2 = Random%3 = 1

trigger3 = P2bodydist X = [95,122]
trigger3 = BackEdgebodyDist > 5
trigger3 = var(58)%5 = [1,2]
trigger3 = enemynear,alive = 1
trigger3 = P2StateType = L || P2stateno = 5120 && enemynear,animtime <= -15
trigger3 = P2stateno != 5201
trigger3 = P2stateno != 5201

;---------------------------------------------------------------------------
;ジャンプ(fwd,up)(ノーマル)
[State -1]
type = ChangeState
value = 41
triggerall = var(59)
triggerall = !var(12)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = p2stateno != var(44)
triggerall = StateType != A
triggerall = StateNo != 52
triggerall = !var(51)
triggerall = Ctrl || (stateno = [21,22])
trigger1 = !var(42) || var(42) >= 6
trigger1 = P2MoveType != A 
trigger1 = !InGuardDist
trigger1 = P2bodydist X = [135,150]
trigger1 = P2bodydist Y >= -30
trigger1 = (Projcontacttime(1200) !=[0,180]) && (Projcontacttime(1201) !=[0,180])
trigger1 = !NumProj
trigger1 = P2StateType != L
trigger1 = P2stateno != 5120
trigger1 = P2stateno != 5201
trigger1 = enemynear,vel X <= 0
trigger1 = enemynear,vel Y >= 0
;trigger1 = var(58) = [85-(var(59)*2),ifelse((100*life/const(data.life))<=35,89,99)]
trigger1 = Random <= ifelse((100*life/const(data.life))<=35,40,120)

trigger2 = !var(42) || var(42) >= 6
trigger2 = Var(55) <= 6
trigger2 = !NumProj
trigger2 = (Projcontacttime(1200) !=[0,180]) && (Projcontacttime(1201) !=[0,180])
trigger2 = P2bodydist X >= 185
trigger2 = P2bodydist Y >= -40
trigger2 = enemynear,vel X <= 3
trigger2 = enemynear,vel Y >= -2
trigger2 = var(58) = [58-(var(59)*2),ifelse((100*life/const(data.life))<=35,85,99)]
trigger2 = Random = [50,ifelse((100*life/const(data.life))<=35,450,750)]

trigger3 = !var(42) || var(42) >= 6
trigger3 = Var(55) <= 4
trigger3 = !NumProj
trigger3 = P2StateType != L || P2stateno = 5120 && enemynear,animtime = [-24,-13]
trigger3 = P2stateno != 5201
trigger3 = (Projcontacttime(1200) !=[0,180]) && (Projcontacttime(1201) !=[0,180])
trigger3 = P2bodydist X = [145,184]
trigger3 = P2bodydist Y >= -30
trigger3 = enemynear,vel X <= 0
trigger3 = enemynear,vel Y >= 0
trigger3 = var(58)%2 = 0
trigger3 = (100*life/const(data.life)) >= 25
trigger3 = Random <= 350

trigger4 = !var(42) || var(42) >= 6
trigger4 = Var(55) <= 4
trigger4 = !NumProj
trigger4 = P2stateno = 5120 && enemynear,animtime = [-23,-14]
;trigger4 = (Projcontacttime(1200) !=[0,180]) && (Projcontacttime(1201) !=[0,180])
trigger4 = P2bodydist X = [70,100]
trigger4 = P2bodydist Y >= -30
trigger4 = enemynear,vel X <= 0
trigger4 = enemynear,vel Y >= 0
trigger4 = var(58) = [40,ifelse((100*life/const(data.life))<=35,60,70)]
trigger4 = Random <= 350

trigger5 = P2bodydist X = [126,142]
trigger5 = !NumProj
trigger5 = enemynear,BackEdgebodyDist < 15
trigger5 = P2statetype != A
trigger5 = P2statetype != L 
trigger5 = P2stateno != 5120
trigger5 = P2stateno != 5201
trigger5 = Random >= 900


;---------------------------------------------------------------------------
;ジャンプ(fwd,up)(真)
[State -1]
type = ChangeState
value = 41
triggerall = var(59)
triggerall = var(12)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = p2stateno != var(44)
triggerall = StateType != A
triggerall = StateNo != 52
triggerall = !var(51)
triggerall = Ctrl || (stateno = [21,22])
trigger1 = !var(42) || var(42) >= 6
trigger1 = P2MoveType != A
trigger1 = !InGuardDist
trigger1 = P2bodydist X = [135,150]
trigger1 = P2bodydist Y >= -30
trigger1 = (Projcontacttime(1200) !=[0,180]) && (Projcontacttime(1201) !=[0,180])
trigger1 = !NumProj
trigger1 = P2StateType != L
trigger1 = P2stateno != 5120
trigger1 = P2stateno != 5201
trigger1 = enemynear,vel X <= 0
trigger1 = enemynear,vel Y >= 0
trigger1 = var(58) = [85-(var(59)*2),ifelse((100*life/const(data.life))<=35,89,99)]
trigger1 = Random = [100,ifelse((100*life/const(data.life))<=35,350,700)]

trigger2 = !var(42) || var(42) >= 6
trigger2 = Var(55) <= 6
trigger2 = !NumProj
trigger2 = (Projcontacttime(1200) !=[0,180]) && (Projcontacttime(1201) !=[0,180])
trigger2 = P2bodydist X >= 185
trigger2 = P2bodydist Y >= -40
trigger2 = enemynear,vel X <= 3
trigger2 = enemynear,vel Y >= -2
trigger2 = var(58) = [58-(var(59)*2),ifelse((100*life/const(data.life))<=35,85,99)]
trigger2 = Random = [50,ifelse((100*life/const(data.life))<=35,450,750)]

trigger3 = !var(42) || var(42) >= 6
trigger3 = Var(55) <= 4
trigger3 = !NumProj
trigger3 = P2StateType != L || P2stateno = 5120 && enemynear,animtime = [-24,-13]
trigger3 = P2stateno != 5201
trigger3 = (Projcontacttime(1200) !=[0,180]) && (Projcontacttime(1201) !=[0,180])
trigger3 = P2bodydist X = [145,180]
trigger3 = P2bodydist Y >= -30
trigger3 = enemynear,vel X <= 0
trigger3 = enemynear,vel Y >= 0
trigger3 = var(58)%2 = 0
trigger3 = (100*life/const(data.life)) >= 25
trigger3 = Random <= 350

trigger4 = !InGuardDist
trigger4 = NumProjID(1200)|| NumProjID(1201)|| projcontact1200=1|| projcontact1201=1
trigger4 = var(6) = [0,1]
trigger4 = P2MoveType != A && P2statetype != A
trigger4 = P2StateType != L
trigger4 = P2stateno != 5120
trigger4 = P2stateno != 5201
trigger4 = (enemynear,BackEdgebodyDist>10 &&(P2bodydist X=[90,110]))||(enemynear,BackEdgebodyDist<=10 &&(P2bodydist X=[120,135]))
trigger4 = enemynear,vel X <= 2
trigger4 = random >= 350+(var(59)*75)

trigger5 = P2bodydist X = [126,142]
trigger5 = !NumProj
trigger5 = enemynear,BackEdgebodyDist < 15
trigger5 = P2statetype != A
trigger5 = P2statetype != L 
trigger5 = P2stateno != 5120
trigger5 = P2stateno != 5201
trigger5 = Random >= 900

trigger6 = !InGuardDist
trigger6 = !NumProj
trigger6 = (Projcontacttime(1200) !=[0,180]) && (Projcontacttime(1201) !=[0,180])
trigger6 = P2bodydist X >= 190
trigger6 = P2bodydist Y <= -60
trigger6 = enemynear,vel X <= 2
trigger6 = Random <= 200+(var(59)*50)

trigger7 = !InGuardDist && var(45) != 450
trigger7 = !var(42) || var(42) >= 5
trigger7 = NumProj || (enemynear,stateno = [120,155]) || !enemynear,ctrl && P2movetype != A
trigger7 = (P2bodydist X >= 220 && !enemynear,ctrl) || P2bodydist X >= 191 && (NumProj || (enemynear,stateno = [120,155]))
trigger7 = enemynear,vel X <= 2
trigger7 = P2StateType != L
trigger7 = P2stateno != 5120
trigger7 = P2stateno != 5201
trigger7 = Random >= 600

[State 3000,00]
type = null;Palfx
trigger1 = !var(42) || var(42) >= 6
trigger1 = P2MoveType != A
trigger1 = !InGuardDist
trigger1 = P2bodydist X = [135,150]
trigger1 = P2bodydist Y >= -30
trigger1 = (Projcontacttime(1200) !=[0,180]) && (Projcontacttime(1201) !=[0,180])
trigger1 = !NumProj
trigger1 = P2StateType != L
trigger1 = P2stateno != 5120
trigger1 = P2stateno != 5201
trigger1 = enemynear,vel X <= 0
trigger1 = enemynear,vel Y >= 0
trigger1 = var(58) = [85-(var(59)*2),ifelse((100*life/const(data.life))<=35,89,99)]
trigger1 = stateno = 41
;add = 200,50,50
sinadd = 10, 10, 10
mul = 170,170,170
time = 16
invertall = 0
color = 256

;---------------------------------------------------------------------------
;ジャンプ(back)(ノーマル)
[State -1]
type = ChangeState
value = 42
triggerall = var(59)
triggerall = !var(12)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = p2stateno != var(44)
triggerall = StateType != A
triggerall = StateNo != 52
triggerall = !var(51)
triggerall = !NumProj || ((NumProjID(1200) || NumProjID(1201)) && var(58)%2 = 1)
triggerall = Ctrl || (stateno = [21,22])
trigger1 = !var(42) || var(42) >= 6
trigger1 = P2MoveType != A 
trigger1 = !NumProj
trigger1 = !InGuardDist
trigger1 = P2StateType != L
trigger1 = P2stateno != 5120
trigger1 = P2stateno != 5201
trigger1 = BackEdgebodyDist > ifelse(P2bodydist X <=118,96,65)
trigger1 = P2bodydist X = [120,165]
trigger1 = P2bodydist Y >= -24
trigger1 = enemynear,vel X <= 0
trigger1 = enemynear,vel Y >= 0
;trigger1 = var(58) = [56-(var(59)*2),ifelse((100*life/const(data.life))<=35,68,75)]
trigger1 = Random >= ifelse((100*life/const(data.life))<=35,990,920)

trigger2 = !var(42) || var(42) >= 6
trigger2 = Var(55) <= 6
trigger2 = !NumProj
trigger2 = (Projcontacttime(1200) !=[1,170]) && (Projcontacttime(1201) !=[1,170])
trigger2 = P2stateno = 5120 && enemynear,animtime = [-11,-4]
trigger2 = P2bodydist X = [1,45]
trigger2 = backedgebodydist <= 60
trigger2 = var(58) = [58,75]
trigger2 = random >= 350

;---------------------------------------------------------------------------
;ジャンプ(back)(真)
[State -1]
type = ChangeState
value = 42
triggerall = var(59)
triggerall = var(12)
triggerall = !var(13)
triggerall = roundstate = 2
triggerall = p2stateno != var(44)
triggerall = StateType != A
triggerall = StateNo != 52
triggerall = !var(51)
triggerall = !NumProj || ((NumProjID(1200) || NumProjID(1201)) && var(58)%2 = 1)
triggerall = Ctrl || (stateno = [21,22])
trigger1 = !var(42) || var(42) >= 6
trigger1 = P2MoveType != A 
trigger1 = !NumProj
trigger1 = !InGuardDist
trigger1 = (Projcontacttime(1200) !=[1,200]) && (Projcontacttime(1201) !=[1,200])
trigger1 = BackEdgebodyDist > ifelse(P2bodydist X <=118,96,65)
trigger1 = P2bodydist X = [120,165]
trigger1 = P2bodydist Y >= -24
trigger1 = enemynear,vel X <= 0
trigger1 = enemynear,vel Y >= 0
trigger1 = var(58) = [56-(var(59)*2),ifelse((100*life/const(data.life))<=35,68,75)]
trigger1 = Random = [100,ifelse((100*life/const(data.life))<=35,350,700)]

trigger2 = !var(42) || var(42) >= 6
trigger2 = (Projcontacttime(1200) !=[1,200]) && (Projcontacttime(1201) !=[1,200])
trigger2 = Var(55) <= 4
trigger2 = !NumProj
trigger2 = P2bodydist X >= 165
trigger2 = P2bodydist Y >= -24
trigger2 = enemynear,vel X <= 2
trigger2 = enemynear,vel Y >= 0
trigger2 = var(58)%2 = 1
trigger2 = Random >= 650

trigger3 = !var(42) || var(42) >= 6
trigger3 = Var(55) <= 6
trigger3 = !NumProj
trigger3 = (Projcontacttime(1200) !=[1,170]) && (Projcontacttime(1201) !=[1,170])
trigger3 = (enemynear,GetHitVar(RecoverTime) = [15,25]) || P2stateno = 5120 && enemynear,animtime = [-11,-4]
trigger3 = P2bodydist X >= 170
trigger3 = backedgebodydist <= 60
trigger3 = var(58) = [58-(var(59)*2),75]
trigger3 = random >= 350+(var(59)*75)

trigger4 = !var(42) || var(42) >= 2
trigger4 = !NumProj || ((NumProjID(1200) || NumProjID(1201)) && var(58)%3 = 1)
trigger4 = (Projcontacttime(1200) !=[1,200]) && (Projcontacttime(1201) !=[1,200])
trigger4 = Var(55) <= 6
trigger4 = P2bodydist X >= 180
trigger4 = P2bodydist Y >= -50
trigger4 = enemynear,vel X <= 4
trigger4 = var(58)%5 = [2,4]
trigger4 = random >= 350+(var(59)*75)

trigger5 = !var(42) || var(42) >= 2
trigger5 = !NumProj
trigger5 = (Projcontacttime(1200) =[25,40]) || (Projcontacttime(1201) =[25,40])
trigger5 = Var(55) <= 4
trigger5 = P2bodydist X >= 170
trigger5 = P2bodydist Y >= -50
trigger5 = enemynear,vel X <= 4
trigger5 = var(58)%2 = 1
trigger5 = random >= 650

trigger6 = !var(42) || var(42) >= 6
trigger6 = BackEdgebodyDist > 95
trigger6 = !InGuardDist
trigger6 = P2bodydist X = [90,120]
trigger6 = P2bodydist Y = [-65,-45]
trigger6 = enemynear,vel X = [3,5]
trigger6 = enemynear,vel Y = [-8,2]
trigger6 = var(58)%2 = 1
trigger6 = Random >= 750

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