;---------------------------------------------------------------------------------
[Statedef -3];忢帪娔帇僗僥乕僩(p2stateno側偳偱憡庤偵峴摦傪惂屼偝傟偨帪偼幚峴偟側偄)
;---------------------------------------------------------------------------------
;-----------------------------------------------------------------------------
;AI愝掕
;-----------------------------------------------------------------------------
;AI儗儀儖愝掕
;丂var(57)偺悢抣傪1乣11偺娫偱曄峏偟偰壓偝偄丅
;丂 儗儀儖0乣4ゥゥ愙懸僾儗僀儌乕僪
;丂 儗儀儖5乣8ゥゥ捠忢儌乕僪
;丂 儗儀儖9乣10ゥ蜛I摿壔儌乕僪
;丂 儗儀儖11ゥゥゥ挻斀墳儌乕僪(僱僞)
[state -3, AILV]
Type = VarSet
trigger1 = !var(57)
var(57) = 8

;斀墳懍搙愝掕
;丂var(56)偺悢抣傪1乣10偺娫偱曄峏偟偰壓偝偄丅
;丂斀墳懍搙50F(儗儀儖0)偐傜儗儀儖傪1忋偘傞偛偲偵5F偢偮懍偔側傝傑偡丅10偱斀墳惂尷側偟丅
[state -3, AILV]
Type = VarSet
trigger1 = !var(56)
var(56) = 8

;AI抧忋庴恎愝掕
;丂var(55)偺悢抣傪0乣1偺娫偱曄峏偟偰壓偝偄(1埲忋偼1偲摨摍)丅
;丂0偵偡傞偲抧忋庴恎傪杮懱愝掕摨條canrecover柍帇丄1埲忋偱canrecover帪偱偟偐峴傢側偔側傝傑偡丅
[state -3, AIRecover]
Type = VarSet
trigger1 = !var(55)
var(55) = 0

;挧敪愝掕
;丂var(54)偺悢抣傪1(埲忋)偵偡傞偲丄儗儀儖偐斀墳懍搙偑9埲壓偺応崌偵儗儀儖傪忋偘傞偨傔偵挧敪傪巊梡偟偰偒傑偡丅
[state -3, AItaunt]
Type = VarSet
trigger1 = !var(54)
var(54) = 0

;-----------------------------------------------------------------------------
;愝掕崁栚偼偙偙傑偱丅埲壓偼偄偠傜側偄偱偔偩偝偄
;-----------------------------------------------------------------------------
;仸仸仸仸仸仸仸仸仸仸仸仸仸仸仸仸仸仸仸仸僴僀僕儍儞僾丒搶曽渎柌憐晽枴
;棟榑偼娙扨
;僴僀僕儍儞僾僐儅儞僪傪擖傟偨乽弖娫乿丄var僗僀僢僠傪侾偵偡傞丅
;偱僴僀僕儍儞僾偺僐儅儞僪偼嵟屻偑U丄偮傑傝僕儍儞僾偡傞丅
;偦偟偰僕儍儞僾僗僥乕僩俆侽偺帪偵var僗僀僢僠偑侾埲忋側傜veladd偱壛懍偟傑偡丅
;var僗僀僢僠傪侽偵偡傞僩儕僈乕偼乽僗僥乕僩俆侽偺俀僼儗乕儉栚乿偱偡丅

[State -3, 僐儅儞僪傪擖傟偨傜Var傪ON] 
type = VarSet
triggerall = !var(59)
trigger1 = command = "jump"
trigger1 = ctrl
trigger1 = statetype = S
trigger2 = prevstateno = 100
trigger2 = command = "holdfwd"
v = 3
value = 1

[State -3, 僐儅儞僪傪擖傟偨傜Var傪ON] 
type = VarSet
triggerall = var(59)
trigger1 = stateno = 40 && p2bodydist x >= 60
v = 3
value = 1

[State -3, AI]
type = VarSet
trigger1 = var(59)
trigger1 = stateno = [34,37]
trigger1 = AnimTime = 0
var(3) = ifelse(sysvar(1)=0, 2, ifelse(sysvar(1)=1, 3, 4))

[State -3, sysvar傪堷宲偖]
type = VarSet
trigger1 = Var(3) = 1
trigger1 = stateno = 40 ;僕儍儞僾偡傞慜偺僗僥乕僩
trigger1 = AnimTime = 0 ;僕儍儞僾曽岦傪寛傔傞sysvar偑儕僙僢僩偝傟傞悺慜
var(3) = ifelse(sysvar(1)=0, 2, ifelse(sysvar(1)=1, 3, 4))

[State -3, var傪OFF偵偡傞僗僥乕僩]
type = VarSet
triggerall = Time = 2
trigger1 = stateno = 50
trigger2 = stateno != [40,59]
v = 3
value = 0

[State -3, 慜偵儃僞儞傪墴偟偰偨傜慜偵傕壛懍]
type = VelAdd
trigger1 = var(3) = 3
trigger1 = stateno = 50
x = 1.8

[State -3, 屻傠側傜屻傠偵壛懍]
type = VelAdd
trigger1 = var(3) = 4
trigger1 = stateno = 50
x = -1.8

[State -3, 悅捈僕儍儞僾偵veladd傪巊偭偰忋偵壛懍]
type = VelAdd
trigger1 = var(3) = 2
trigger1 = stateno = 50
y = -1.8

[State -3, 惉岟偟偨偲偒偺巆憸]
type = AfterImage
trigger1 = var(3) >= 1
trigger1 = stateno = 50
time = 25
trans = add1
length = 4
timeGap = 3
frameGap = 1
palBright = 0, 0, 0
palContrast = 128, 128, 128
palAdd = 0, 0, 0
palMul = 1, 1, 1

;仸忢帪娔帇僗僥乕僩偼忢偵桳岠偵偟偨偄僗僥乕僩僐儞僩儘乕儔傪偳傫偳傫捛壛偟偰偄偒傑偡丅

;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
; AI
;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
[state -3, AI婲摦梡僿儖僷乕]
type=helper
trigger1=!NumHelper(30000+id)
;trigger1=RoundState=2
trigger1=RoundState<2||(RoundState=2&&Ctrl&&Stateno=0)
trigger1=alive
trigger1=var(59)=0
trigger1=(PrevStateNo=[190,194])||PrevStateNo=5900||PrevStateNo=0
;trigger1=Ctrl&&Stateno=0
trigger1=!IsHelper
helpertype=normal
name="AI"
stateno=30000
ID=30000+id
pos=9999,9999
keyctrl=1
pausemovetime=2147483647
supermovetime=2147483647
persistent = 0

;擮偺偨傔伀傕晅偗偰偍偔
[state -3, 娭學柍偄僗僥乕僩偵峴偐側偄傛偆偵]
type=changestate
trigger1= ishelper(30000)
trigger1= ishelper(30000+root,id)
trigger1= stateno!=30000
value=30000

[State -3,僈乕僪僠僃僢僋僿儖僷乕]
Type = Helper
triggerall = RoundState = 2
Trigger1 = !NumHelper(31000+id)
Trigger1 = !IsHelper
HelperType = Normal
Name = "Guard"
PosType = left
StateNo = 31000
ID = 31000+id
PauseMoveTime = 0
pos=0,9999
pausemovetime=2147483647
supermovetime=2147483647
persistent = 0
IgnoreHitPause = 1
KeyCtrl = 0
Ownpal = 1

[State -3, 仾偑梋寁側偙偲偟側偄傛偆偵]
type=changestate
trigger1= ishelper
trigger1= ishelper(31000+root,id)
trigger1= stateno !=31000
value=31000

;-----------------------------------------------------------------------
; AI swich -> ON
[state -3,AI]
type = VarSet
triggerall = !ishelper || isHelper(30000+id)
triggerall = var(59) != 1
triggerall = RoundState != 3
trigger1 = Command = "AI0"
trigger2 = Command = "AI1"
trigger3 = Command = "AI2"
trigger4 = Command = "AI3"
trigger5 = Command = "AI4"
trigger6 = Command = "AI5"
trigger7 = Command = "AI6"
trigger8 = Command = "AI7"
trigger9 = Command = "AI8"
trigger10 = Command = "AI9"
trigger11 = Command = "AI10"
trigger12 = Command = "AI11"
trigger13 = Command = "AI12"
trigger14 = Command = "AI13"
trigger15 = Command = "AI14"
trigger16 = Command = "AI15"
trigger17 = Command = "AI16"
trigger18 = Command = "AI17"
trigger19 = Command = "AI18"
trigger20 = Command = "AI19"
trigger21 = Command = "AI20"
trigger22 = Command = "AI21"
trigger23 = Command = "AI22"
trigger24 = Command = "AI23"
trigger25 = Command = "AI24"
trigger26 = Command = "AI25"
trigger27 = Command = "AI26"
trigger28 = Command = "AI27"
trigger29 = Command = "AI28"
trigger30 = Command = "AI29"
trigger31 = Command = "AI30"
trigger32 = Command = "AI31"
trigger33 = Command = "AI32"
trigger34 = Command = "AI33"
trigger35 = Command = "AI34"
trigger36 = Command = "AI35"
trigger37 = Command = "AI36"
trigger38 = Command = "AI37"
trigger39 = Command = "AI38"
trigger40 = Command = "AI39"
trigger41 = Command = "AI40"
trigger42 = Command = "AI41"
trigger43 = Command = "AI42"
trigger44 = Command = "AI43"
trigger45 = Command = "AI44"
trigger46 = Command = "AI45"
trigger47 = Command = "AI46"
trigger48 = Command = "AI47"
trigger49 = Command = "AI48"
trigger50 = Command = "AI49"
trigger51 = Command = "AI50"
trigger52 = NumHelper(30000+id)
trigger52 = Helper(30000+id),var(59)
trigger52 = RoundState<2||(RoundState=2&&ctrl)
;trigger53 = 1  ;娤愴梡
var(59) = 1

;-----------------------------------------------------------------------
[state -3, AI]
Type = VarSet
triggerall = Var(59) = 1
trigger1 = RoundState = 4
trigger2 = Win = 1
trigger3 = Lose = 1
trigger4 = DrawGame = 1
V = 59
Value = -1

[state -3, AI]
Type = VarSet
triggerall = Var(59) = -1
trigger1 = RoundState = 2
V = 59
Value = 1

;-----------------------------------------------------------------------
;僞僢僌梡惗巰敾暿
[State -3, 僞僢僌梡惗巰敾暿]
Type = VarSet
;triggerall = var(59)>0
Triggerall = RoundState = 2
Trigger1 = NumEnemy <= 1
Trigger2 = NumEnemy >= 2
Trigger2 = EnemyNear(0),Life > 0
Trigger2 = Ctrl || !NumTarget || NumTarget >= 2
Trigger3 = NumEnemy >= 2
Trigger3 = EnemyNear(0),Life > 0
Trigger3 = Target,StateType = L ||  Facing*(Pos X - Target,Pos X) > 0
Trigger4 = NumEnemy >= 2 && NumTarget = 1
Trigger4 = Enemy(0),Life > 0 && Enemy(1),Life > 0
Trigger4 = EnemyNear(0),ID = Target,ID
Trigger4 = Target,StateType != L
Trigger4 = Facing*(Pos X - Target,Pos X) <= 0
Trigger4 = !Ctrl
var(58) = 0
IgnoreHitPause = 1

[State -3, 僞僢僌梡惗巰敾暿]
Type = VarSet
;triggerall = var(59)>0
TriggerAll = RoundState = 2
TriggerAll = NumEnemy >= 2
TriggerAll = !var(58)
Trigger1 = EnemyNear(0),Life <= 0
Trigger2 = NumEnemy >= 2 && NumTarget = 1
Trigger2 = Enemy(0),Life > 0 && Enemy(1),Life > 0
Trigger2 = EnemyNear(0),ID != Target,ID
Trigger2 = Facing*(Pos X - Target,Pos X) <= 0
Trigger2 = Target,StateType != L
Trigger2 = !Ctrl
var(58) = 1
IgnoreHitPause = 1

;-----------------------------------------------------------------------
;憡庤偺婲偒忋偑傝偺搳偘柍揋傪挷傋傞
[State -3]
Type = VarSet
trigger1 = P2StateType = L
V = 53
Value = -1
IgnoreHitPause = 1

[State -3]
Type = VarAdd
triggerall = Var(53) > 0
trigger1 = P2StateType != L
V = 53
Value = -1
IgnoreHitPause = 1

[State -3]
Type = VarSet
triggerall = Var(53) = -1
trigger1 = P2StateType != L
V = 53
Value = 12
IgnoreHitPause = 1

;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;彑偪挧敪(寵偄側恖偼changestate偺慜偵乽null;乿傪晅偗傑偟傚偆)
;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;挧敪
[State -3,taunt]
type = ChangeState
value = 195
triggerall = var(59) != 0
triggerall = var(57) >= 7
triggerall = alive
triggerall = life > 0
triggerall = roundstate = 3
triggerall = statetype != A
triggerall = stateno != 195 && prevstateno != 195
trigger1 = Ctrl  || stateno = 20 || stateno = 100 || stateno = [120,149]
ignorehitpause = 0

;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;恀嬻搳偘捛寕
;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
[state -3, 恀嬻搳偘帪娫應掕梡]
type = varset
triggerall = var(59)
trigger1 = var(44) >= 1
var(44) = var(44) + 1

[state -3, 恀嬻搳偘帪娫應掕弶婜壔]
type = varset
triggerall = var(59)
trigger1 = stateno = 1510
var(44) = 1

[state -3, 恀嬻搳偘帪娫應掕弶婜壔]
type = varset
triggerall = var(59)
trigger1 = var(44) > 60
var(44) = 0

;恀嬻搳偘娭楢
;棊偪偰偔傞傑偱懸婡
[state -3, wait]
type = ChangeState
Value = 0
Ctrl = 0
triggerall = var(59)
triggerall = statetype != A && ctrl
triggerall = var(57) >= 1 && Roundstate = 2 
triggerall = var(44) > 0
trigger1 = (EnemyNear(var(58)),facing = facing)
trigger1 = var(44) = [1,50]

;捛寕傛偺偐偤丂憃
[state -3, YONOKAZE丂SOU]
type = null;ChangeState
value = 1250
triggerall = var(59)
triggerall = statetype != A
triggerall = ctrl || StateNo = 0
triggerall = var(57) >= 3 && RoundState = 2
triggerall = Random <= var(59)*100
triggerall = EnemyNear,alive
triggerall = P2BodyDist X = [0,60]
triggerall = p2bodydist Y > -135
triggerall = var(44) = [24,50]
triggerall = var(56) = 1
trigger1 = NumEnemy = 1
trigger2 = (frontedgebodydist > 70  && power < 2000) || power < 1000
trigger2 = TeamMode = Simul && NumEnemy = 2

;僗僩乕儉僂儖僼
[state -3, SW]
type = null;ChangeState
value = 3700
triggerall = var(59)
triggerall = statetype != A
triggerall = ctrl || stateno = 0
triggerall = power >= 2000
triggerall = life <= lifemax * 0.6
triggerall = life >= lifemax * 0.3
triggerall = var(57) >= 6 && RoundState = 2
triggerall = enemynear(var(58)),life > 180
triggerall = Random <= var(57)*100
trigger1 = p2bodydist Y = [-90,-60]
trigger1 = var(44) >= 30

;MAX僶僗僞乕僂儖僼
[state -3, BW]
type = null;ChangeState
value = 2600
triggerall = var(59)
triggerall = statetype != A
triggerall = ctrl || stateno = 0
triggerall = ((life <= lifemax * 0.6) && power >= 2000) || (power >= 2500)
triggerall = var(57) >= 6 && RoundState = 2
triggerall = enemynear(var(58)),life > 70
triggerall = Random <= var(57)*100
trigger1 = p2bodydist Y = [-90,-60]
trigger1 = var(44) >= 30

;儗僀僕儞僌僗僩乕儉 
[state -3, RS]
type = ChangeState
value = 3000
triggerall = var(59) >= 1
triggerall = var(57) >= 3
triggerall = power >= 1000
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = ctrl || stateno = 0
triggerall = Random <= var(57)*100
triggerall = p2bodydist Y = [-140,-70]
triggerall = var(44) >= 12
trigger1 = power < 2000 || (power >= 2000 && p2bodydist Y > -125)
trigger1 = frontedgebodydist < 70

;僔儍僀儞僫僢僋儖
[state -3, SN]
type = ChangeState
value = 3100
triggerall = var(59) >= 1
triggerall = var(57) >= 3
triggerall = power >= 1000
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = ctrl || stateno = 0
triggerall = Random <= var(57)*100
trigger1 = p2bodydist Y = [-90,-60]
trigger1 = var(44) >= 31

;帪娫宱夁偱尦偵栠傞
[state -3, ctrl]
type = ChangeState
Value = 0
Ctrl = 1
triggerall = var(59)
triggerall = statetype != A && (stateno = 0)
triggerall = var(57) >= 1 && Roundstate = 2 
trigger1 = var(44) >= 50

;嫮僴乕僪僄僢僕
[state -3, S HE]
type = ChangeState
value = 1150
triggerall = var(59) >= 1
triggerall = var(57) >= 1
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = ctrl || stateno = 0
triggerall = Random <= var(57)*100
triggerall = (power < 1000)||(enemynear(var(58)),life <= 60)
trigger1 = p2bodydist Y = [-110,-80]
trigger1 = var(44) > 27

;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;寗撍偒
;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;Y傂傚偆偑
[state -3, HYOUGA Y]
type = ChangeState
value = 1320
triggerall = var(59) >= 1
triggerall = var(57) >= 1
triggerall = fvar(38) = 0
triggerall = RoundState = 2
triggerall = enemynear(var(58)),time >= 50-var(56)*5 || (!time && var(56) > 7) || life <= (var(56) * 60) || var(56) >= 10 || var(57) = 11
triggerall = Random <= ((var(57) * 8) * var(56)) || var(57) = 11
triggerall = StateType != A
triggerall = enemynear(var(58)),ctrl = 0
triggerall = enemynear(var(58)),statetype != L && enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),movetype != H
triggerall = enemynear(var(58)),stateno >= 200
triggerall = enemynear(var(58)),animtime <= -30
triggerall = Ctrl  || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = P2BodyDist X >= 140

;嬤嫍棧棫偪嫮僷儞僠
[state -3, Stand Strong Punch]
type = ChangeState
value = 215
triggerall = var(59) >= 1
triggerall = var(57) >= 1
triggerall = fvar(38) = 0
triggerall = RoundState = 2
triggerall = enemynear(var(58)),time >= 50-var(56)*5 || (!time && var(56) > 7) || life <= (var(56) * 60) || var(56) >= 10 || var(57) = 11
triggerall = Random <= ((var(57) * 8) * var(56)) || var(57) = 11
triggerall = StateType != A
triggerall = enemynear(var(58)),ctrl = 0
triggerall = enemynear(var(58)),statetype != L && enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),movetype != H
triggerall = enemynear(var(58)),stateno >= 200
triggerall = enemynear(var(58)),animtime <= -6
triggerall =!InGuardDist || PrevStateNo = 700
triggerall = Ctrl  || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = P2BodyDist X = [-5,20]

;偟傖偑傒庛僷儞僠
[state -3, Crouching Light Punch]
type = ChangeState
value = 400
triggerall = var(59) >= 1
triggerall = var(57) >= 1
triggerall = fvar(38) = 0
triggerall = RoundState = 2
triggerall = enemynear(var(58)),time >= 50-var(56)*5 || (!time && var(56) > 7) || life <= (var(56) * 60) || var(56) >= 10 || var(57) = 11
triggerall = Random <= ((var(57) * 8) * var(56)) || var(57) = 11
triggerall = StateType != A
triggerall = enemynear(var(58)),ctrl = 0
triggerall = enemynear(var(58)),statetype != L && enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),movetype != H
triggerall = enemynear(var(58)),stateno >= 200
triggerall = enemynear(var(58)),animtime <= -5
triggerall =!InGuardDist || PrevStateNo = 700
triggerall = Ctrl  || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = P2BodyDist X = [-5,55]

;僟僢僔儏(寗撍偒)
[state -3, Dash]
type = ChangeState
value = 100
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = RoundState = 2
triggerall = P2Dist X > 0
triggerall = statetype != A
triggerall = stateno != 100 && prevstateno != 100
triggerall = ctrl || stateno = 20
trigger1 = P2BodyDist X > 120 || enemynear(var(58)),facing = facing
trigger1 = enemynear(var(58)),MoveType = A && enemynear(var(58)),statetype = A
trigger1 =!enemynear(var(58)),HitDefAttr = SCA, NA, SA, HA, NP, SP, HP, NT, ST, HT;懳嬻媄側偳偺嬻怳傝偵愙嬤
trigger1 = enemynear(var(58)),Time >= 60
trigger2 = enemynear(var(58)),MoveType != H
trigger2 = enemynear(var(58)),StateType = A
trigger2 =!enemynear(var(58)),Ctrl
trigger2 = enemynear(var(58)),facing = facing

;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;旘傃摴嬶偱偺斀寕
;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;僟僽儖楏晽対丂夵(僞僢僌梡)
[state -3, DRK丂K]
type = ChangeState
value = 11000
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = power >= 500 && var(40) = 0 || var(40) > 0
triggerall = RoundState = 2
triggerall = TeamMode = simul
triggerall = numpartner
triggerall = partner,alive
triggerall = Random <= var(57) * 20
triggerall = statetype != A
triggerall = EnemyNear(var(58)),statetype != L && EnemyNear(var(58)),statetype != A
triggerall = partner,movetype = H
triggerall = partner,statetype != L 
triggerall = partner,stateno != 5120
triggerall = partner,stateno != 5201
triggerall = (partner,stateno = [150,155]) || partner,stateno = [5000,5099]
triggerall = ctrl || stateno = 20 || stateno = 100
trigger1 = enemynear(var(58)),movetype = A
trigger1 = p2bodydist x = [130,320]

;僟僽儖楏晽対丂夵
[state -3, DRK丂K]
type = ChangeState
value = 11000
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = power >= 500 && var(40) = 0 || var(40) > 0
triggerall = Random <= var(57) * 20
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),movetype != H
triggerall = enemynear(var(58)),stateno != [5100,5299]
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = p2bodydist X >= 160
trigger1 = enemynear(var(58)),movetype = A
trigger1 = enemynear(var(58)),AnimTime <= -30

;楏晽対(僞僢僌梡)
[state -3, RK]
type = ChangeState
value = 1000
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = RoundState = 2
triggerall = TeamMode = simul
triggerall = numpartner
triggerall = partner,alive
triggerall = Random <= var(57) * 40
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != L && enemynear(var(58)),statetype != A
triggerall = !Numproj && !enemynear(var(58)),numproj
triggerall = partner,movetype = H
triggerall = partner,statetype != L 
triggerall = partner,stateno != 5120
triggerall = partner,stateno != 5201
triggerall = (partner,stateno = [150,155]) || partner,stateno = [5000,5099]
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = enemynear(var(58)),movetype = A
trigger1 = p2bodydist x = [130,320]

;楏晽対
[state -3, RK]
type = ChangeState
value = 1000
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = Random <= var(57) * 20
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),movetype != H
triggerall = enemynear(var(58)),stateno != [5100,5299]
triggerall = numprojID(1000) = 0
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = p2bodydist X >= 160
trigger1 = enemynear(var(58)),movetype = A
trigger1 = enemynear(var(58)),AnimTime <= -40

;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;愗傝曉偟
;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;慜揮
[state -3, FRoll]
type = ChangeState
value = 700
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = RoundState = 2
triggerall = enemynear(var(58)),time >= 50-var(56)*5 || (!time && var(56) > 7) || life <= (var(56) * 60) || var(56) >= 10 || var(57) = 11
triggerall = Random <= ((var(57) * 4) * var(56)) || var(57) = 11
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),movetype != H
triggerall = enemynear(var(58)),StateNo >= 200
triggerall =!enemynear(var(58)),HitDefAttr = SCA, NT, ST, HT
triggerall = enemynear(var(58)),facing != facing
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = InGuardDist
trigger1 = p2bodydist X = [0,110]
trigger1 = enemynear(var(58)),animtime <= -30
trigger2 = InGuardDist
trigger2 = enemynear(var(58)),NumProj || enemynear(var(58)),NumHelper
trigger2 = enemynear(var(58)),animtime <= -30
trigger2 = p2bodydist X = [0,130]

[state -3, 慜彫僕儍儞僾]
Type = ChangeState
value = 32
triggerall = var(59)
triggerall = roundstate = 2
triggerall = Random <= ((var(57) * 6) * var(56)) || var(57) = 11
triggerall = StateType != A
triggerall = !enemynear(var(58)),numproj 
triggrtall = enemynear(var(58)),StateNo!=[5000,5120]
triggrtall = enemynear(var(58)),StateType != L
triggerall = ctrl || stateno = 20 || stateno = [120,149]
trigger1 = P2BodyDist X = [-5,60]
trigger1 = enemynear(var(58)),movetype = A
trigger1 = enemynear(var(58)),statetype = C
trigger1 = enemynear(var(58)),HitDefAttr = SCA, NA

[state -3,慜拞僕儍儞僾]
Type = ChangeState
value = 34
triggerall = var(59)
triggerall = roundstate = 2
triggerall = Random <= ((var(57) * 6) * var(56)) || var(57) = 11
triggerall = StateType != A
triggerall = !enemynear(var(58)),numproj 
triggrtall = enemynear(var(58)),StateNo!=[5000,5120]
triggrtall = enemynear(var(58)),StateType != L
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = P2BodyDist X = [40,100]
trigger1 = enemynear(var(58)),movetype = A
trigger1 = enemynear(var(58)),statetype = C
trigger1 = enemynear(var(58)),HitDefAttr = SCA, NA

;僗僩乕儉僂儖僼
[state -3, SW]
type = ChangeState
value = 4500
triggerall = var(59) = 1
triggerall = var(57) >= 3
triggerall = RoundState = 2
triggerall = power >= 3000 && var(40) = 0 || power >= 2000 && var(40) > 0
triggerall = enemynear(var(58)),time >= 50-var(56)*5 || (!time && var(56) > 7) || life <= (var(56) * 60) || var(56) >= 10 || var(57) = 11
triggerall = Random <= ((var(57) * 6) * var(56)) || var(57) >= 8 && p2life <= 500 || var(57) = 11
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),MoveType = A
triggerall = enemynear(var(58)),StateNo >= 200
triggerall = enemynear(var(58)),facing != facing
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = p2bodydist X = [-5,150]
trigger1 = enemynear(var(58)),statetype != A
trigger1 = enemynear(var(58)),animtime <= -10

;僱僆丒儗僀僕儞僌僗僩乕儉
[state -3, MAX RS]
type = ChangeState
value = 4050
triggerall = var(59) = 1
triggerall = var(57) >= 3
triggerall = RoundState = 2
triggerall = power >= 2000 && var(40) = 0 || power >= 1000 && var(40) > 0
triggerall = enemynear(var(58)),time >= 50-var(56)*5 || (!time && var(56) > 7) || life <= (var(56) * 60) || var(56) >= 10 || var(57) = 11
triggerall = Random <= ((var(57) * 6) * var(56)) || var(57) >= 8 && p2life <= 400 || var(57) = 11
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),MoveType = A
triggerall = enemynear(var(58)),StateNo >= 200
triggerall = enemynear(var(58)),facing != facing
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = p2bodydist X = [-5,150]
trigger1 = enemynear(var(58)),statetype != A
trigger1 = enemynear(var(58)),animtime <= -10

;梾惗栧
[State -1, RASHOUMON]
type = ChangeState
value = 3400
triggerall = var(59) = 1
triggerall = var(57) >= 3
triggerall = power >= 1000 && var(40) = 0 || var(40) > 0
triggerall = var(53) = 0
triggerall = RoundState = 2
triggerall = enemynear(var(58)),time >= 50-var(56)*5 || (!time && var(56) > 7) || life <= (var(56) * 60) || var(56) >= 10 || var(57) = 11
triggerall = Random <= ((var(57) * 6) * var(56)) || var(57) >= 8 && p2life <= 250 || var(57) = 11
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),MoveType = A
triggerall = enemynear(var(58)),StateNo >= 200
triggerall = enemynear(var(58)),facing != facing
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = p2bodydist X = [-5,35]
trigger1 = enemynear(var(58)),statetype != A

;恀嬻搳偘
[state -3, SN]
type = ChangeState
value = 1500
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = var(53) = 0
triggerall = fvar(38) = 0
triggerall = RoundState = 2
triggerall = enemynear,time >= 50-var(56)*5 || (!time && var(56) > 7) || var(56) >= 5 && life <= (var(57) * 40) || var(56) >= 10 || var(57) = 11
triggerall = Random <= ((var(57) * 4) * var(56)) || var(57) = 11
triggerall = statetype != A
triggerall = EnemyNear(var(58)),statetype != L
triggerall = EnemyNear(var(58)),MoveType = A
triggerall = EnemyNear(var(58)),facing != facing
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = p2bodydist X = [-5,35]
trigger1 = EnemyNear(var(58)),statetype != A

;晽夊丂嫮
[state -3, S fuga]
type = ChangeState
value = 1250
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = RoundState = 2
triggerall = enemynear,time >= 50-var(56)*5 || (!time && var(56) > 7) || var(56) >= 5 && life <= (var(57) * 40) || var(56) >= 10 || var(57) = 11
triggerall = Random <= ((var(57) * 6) * var(56)) || var(57) = 11
triggerall = statetype != A
triggerall = EnemyNear(var(58)),statetype != L
triggerall = EnemyNear(var(58)),MoveType = A
triggerall = EnemyNear(var(58)),facing != facing
triggerall = InGuardDist
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = p2bodydist X = [-5,45]
trigger1 = p2bodydist Y >= -85
trigger1 = enemynear(var(58)),Vel X >= 0
trigger1 = enemynear(var(58)),Vel Y > 0 || p2bodydist X < 30
trigger1 = enemynear(var(58)),statetype = A
trigger2 = p2bodydist X = [-5,45]
trigger2 = EnemyNear(var(58)),statetype != A
trigger2 = enemynear(var(58)),animtime <= -6

;屻揮
[state -3, BRoll]
type = ChangeState
value = 710
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = RoundState = 2
triggerall = enemynear(var(58)),time >= 50-var(56)*5 || (!time && var(56) > 7) || life <= (var(56) * 60) || var(56) >= 10 || var(57) = 11
triggerall = Random <= ((var(57) * 4) * var(56))
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),movetype = A
triggerall =!enemynear(var(58)),HitDefAttr = SCA, NT, ST, HT
triggerall = enemynear(var(58)),facing != facing
triggerall = BackEdgeBodyDist >= 40
triggerall = InGuardDist
triggerall =!enemynear(var(58)),numproj
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = p2bodydist X = [25,100]
trigger1 = enemynear(var(58)),animtime <= -12

;僕儍儞僾乛僶僢僋僗僥僢僾(懳搳偘梡)
[state -3, Jump]
type = ChangeState
value = ifelse(random<=500,105,40)
triggerall = var(59) = 1
triggerall = var(57) >= 3
triggerall = StateType != A
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = p2bodydist X = [-20,80]
trigger1 = enemynear(var(58)),statetype != A
trigger1 = enemynear(var(58)),HitDefAttr = SC,NT,ST,HT
trigger1 = Random <= ((var(57) * 2) * var(56)) || var(57) = 11

;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;杊屼(僈乕僪摍)
;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;僈乕僪
[state -3, Guard]
type = ChangeState
value = 120
triggerall = var(59)
triggerall = (var(20) != 1) || (var(20) = 1) && StateType != A
triggerall = stateno != [120,159]
triggerall = ctrl || stateno = 0 || stateno = 20 || stateno = 100
trigger1 = inguarddist
trigger1 = random <= (var(57))*60 || (var(57)) > 7
trigger2 = inguarddist
trigger2 = p2bodydist x > 90 || enemynear(var(58)),time > 50
trigger2 = random <= (var(57))*120
trigger3 = var(57)>7
trigger3 = inguarddist
trigger3 = enemynear(var(58)),numhelper > 0 || enemynear(var(58)),numproj > 0
trigger4 = var(57)>7
trigger4 = enemynear(var(58)),movetype = A
trigger4 = !enemynear(var(58)),hitdefattr = SCA, NT, ST, HT
trigger4 = stateno != 100 || stateno = 100 && p2dist y > -45 || numenemy >= 2
trigger4 = p2bodydist x < 0
trigger4 = p2dist x > 0 || p2dist x < 0
trigger5 = var(57)>7
trigger5 = inguarddist
trigger5 = numenemy > 1
trigger5 = enemy(0),numhelper+enemy(1),numhelper > 0 || enemy(0),numproj+enemy(1),numproj > 0
trigger6 = var(57)>7
trigger6 = numhelper(31000+id)
trigger6 = helper(31000+id),inguarddist
trigger6 = !enemynear(var(58)),hitdefattr = SCA, NT, ST, HT
trigger6 = numenemy >= 2
ignorehitpause = 0

[State 5050, 5]; Recover in mid air
type = ChangeState
triggerall = var(59) >= 1
triggerall = var(57) >= 1
triggerall = Vel Y > -1
triggerall = alive
triggerall = CanRecover
trigger1 = StateNo = 5050
value = 5210 ;HITFall_AIRRECOVER

;庴恎
[state -3,UKEMI]
type = ChangeState
value = 52000
triggerall = var(59)
triggerall = var(57) >= 1
triggerall = roundstate = 2
triggerall = random <= (var(57))*60
triggerall = alive = 1
triggerall = var(55) = 0 || var(55) >= 1 && canrecover
trigger1 = stateno = 5050 || stateno = 5071
trigger1 = vel y > 0 && vel y < 9
trigger1 = pos y >= 10

;僈乕僪僉儍儞僙儖慜揮
[state -3, GCFRoll]
type = ChangeState
value = 700
TriggerAll = var(59) >= 1
triggerall = var(57) >= 1
triggerall = roundstate = 2
TriggerAll = Power >= 1000
TriggerAll = Random <= var(58) * 5
TriggerAll = StateType != A
triggerall = stateno = 150 || stateno = 151
Trigger1 = P2BodyDist X = [0,50]
Trigger1 = enemynear(var(58)),StateNo >= 200
Trigger1 = enemynear(var(58)),StateType != A
Trigger1 = enemynear(var(58)),MoveType = A
Trigger1 = enemynear(var(58)),AnimTime <= -35

;僈乕僪僉儍儞僙儖傆偭偲偽偟峌寕
[state -3,GCA]
type = ChangeState
value = 305
TriggerAll = var(59) >= 1
triggerall = var(57) >= 1
triggerall = roundstate = 2
TriggerAll = Power >= 1000
TriggerAll = Random <= var(58) * 5
TriggerAll = StateType != A
triggerall = stateno = 150 || stateno = 151
Trigger1 = P2BodyDist X = [0,50]
Trigger1 = EnemyNear(var(58)),StateNo >= 200
Trigger1 = EnemyNear(var(58)),StateType != A
Trigger1 = EnemyNear(var(58)),MoveType = A
Trigger1 = EnemyNear(var(58)),AnimTime <= -6

;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;僋僀僢僋MAX
;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;嬤嫍棧棫偪嫮僷儞僠
[state -3, Stand Strong Punch]
type = ChangeState
value = 215
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),movetype = H
triggerall = stateno = 99
trigger1 = P2BodyDist X = [-15,5]

;僋僀僢僋MAX
[state -3, Jump Strong Kick]
type = ChangeState
value = 901
triggerall = var(59) = 1
triggerall = var(57) >= 5
triggerall = RoundState = 2
triggerall = teammode = single || teammode = turns
triggerall = var(40) = 0
triggerall = p2life > 200
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),statetype != A
triggerall = (power = [2000,3999]) && random <= var(57)*30 || (power = [4000,4999]) && random <= var(57)*80 || power >= 5000 && random <= var(57)*100
trigger1 = StateNo = 315 && movehit
trigger2 = stateno = 320 && movehit
trigger3 = stateno = 330 && movehit

;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;楢懕媄
;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;------------------------------------------------------------------------------
;桪愭崁栚
;------------------------------------------------------------------------------
;Y傂傚偆偑
[state -3, HYOUGA Y]
type = ChangeState
value = ifelse(random<=500,1320,1310)
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = RoundState = 2
triggerall = random <= var(57) * 10
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = moveguarded
trigger1 = stateno = 315 && animelemtime(10) > 0 && animelemtime(12) < 0
trigger2 = stateno = 330 && animelemtime(4) > 0 && animelemtime(5) < 0
trigger3 = stateno = 440 && animelemtime(6) > 0 && animelemtime(8) < 0
trigger4 = stateno = 300 && animelemtime(5) > 0 && animelemtime(6) < 0

;B傂傚偆偑
[state -3, HYOUGA B]
type = ChangeState
value = 1330
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = RoundState = 2
triggerall = random <= var(57) * 10
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype = C
triggerall = moveguarded
trigger1 = stateno = 315 && animelemtime(10) > 0 && animelemtime(12) < 0
trigger2 = stateno = 330 && animelemtime(4) > 0 && animelemtime(5) < 0
trigger3 = stateno = 440 && animelemtime(6) > 0 && animelemtime(8) < 0
trigger4 = stateno = 300 && animelemtime(5) > 0 && animelemtime(6) < 0

;------------------------------------------------------------------------------
;宷偓
;------------------------------------------------------------------------------
;忋抜旔偗峌寕
[state -3, JSK]
type = ChangeState
value = 310
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = movecontact
trigger1 = stateno = 215 && animelemtime(4) > 0 && animelemtime(5) < 0
trigger2 = stateno = 410 && animelemtime(6) > 0 && animelemtime(7) < 0

;僐儞價僱乕僔儑儞
[state -3, C]
type = ChangeState
value = 330
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = EnemyNear(var(58)),statetype != A
triggerall = EnemyNear(var(58)),statetype != L
triggerall = movecontact
trigger1 = stateno = 245 && AnimElemtime(8) < 0

;偟傖偑傒庛僷儞僠
[state -3, Crouching Light Punch]
type = ChangeState
value = 400
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = movecontact
trigger1 = stateno = 430 && time >= 6

;------------------------------------------------------------------------------
;3僎乕僕
;------------------------------------------------------------------------------
;僗僩乕儉僂儖僼(DC)
[state -3, SW]
type = ChangeState
value = 4500
triggerall = var(59) = 1
triggerall = var(57) >= 3
triggerall = RoundState = 2
triggerall = power >= 3000 && var(40) = 0 || power >= 2000 && var(40) > 0
triggerall = roundstate = 2
triggerall = random <= var(57) * 60
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),movetype = H
triggerall = movehit
trigger1 = stateno = 3100 && AnimElemtime(11) = 1

;僗僩乕儉僂儖僼
[state -3, SW]
type = ChangeState
value = 4500
triggerall = var(59) = 1
triggerall = var(57) >= 3
triggerall = power >= 3000 && var(40) = 0 || power >= 2000 && var(40) > 0
triggerall = roundstate = 2
triggerall = (power < 4000) && random <= var(57) * 40 || (power >= 4000) && random <= var(57) * 20
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),movetype = H
triggerall = movehit
trigger1 = stateno = 205 && animelemtime(2) > 0 && animelemtime(3) < 0
trigger2 = stateno = 400 && animelemtime(5) > 0 && animelemtime(6) < 0
trigger3 = stateno = 315 && animelemtime(10) > 0 && animelemtime(12) < 0
trigger4 = stateno = 330 && animelemtime(4) > 0 && animelemtime(5) < 0
trigger5 = stateno = 1150 && AnimElemtime(8) >= 0 && AnimElemtime(12) < 0

;------------------------------------------------------------------------------
;2僎乕僕
;------------------------------------------------------------------------------
;僱僆丒儗僀僕儞僌僗僩乕儉
[state -3, MAX RS]
type = ChangeState
value = 4050
triggerall = var(59) = 1
triggerall = var(57) >= 3
triggerall = power >= 2000 && var(40) = 0 || power >= 1000 && var(40) > 0
triggerall = RoundState = 2
triggerall = random <= var(57) * 60 || p2life <= 350
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = EnemyNear(var(58)),MoveType = H
triggerall = movehit
trigger1 = stateno = 3100 && AnimElemtime(11) = 1

;僱僆丒儗僀僕儞僌僗僩乕儉乛MAX嫊嬻楏晽巃
[state -3, MAX RS/KR]
type = ChangeState
value = ifelse(random<=500,4050,4400)
triggerall = var(59) = 1
triggerall = var(57) >= 3
triggerall = power >= 2000 && var(40) = 0 || power >= 1000 && var(40) > 0
triggerall = RoundState = 2
triggerall = (power < 3000) && random <= var(57) * 40 || (power >= 3000) && random <= var(57) * 20 || p2life <= 350
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = EnemyNear(var(58)),MoveType = H
triggerall = movehit
trigger1 = stateno = 205 && animelemtime(2) > 0 && animelemtime(3) < 0
trigger2 = stateno = 400 && animelemtime(5) > 0 && animelemtime(6) < 0
trigger3 = stateno = 315 && animelemtime(10) > 0 && animelemtime(12) < 0
trigger4 = stateno = 330 && animelemtime(4) > 0 && animelemtime(5) < 0
trigger5 = stateno = 1150 && AnimElemtime(8) >= 0 && AnimElemtime(12) < 0

;------------------------------------------------------------------------------
;1僎乕僕
;------------------------------------------------------------------------------
;僔儍僀儞僫僢僋儖
[state -3, SN]
type = ChangeState
value = 3100
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = power >= 1000 && var(40) = 0 || var(40) > 0
triggerall = RoundState = 2
triggerall = (power < 2000) && random <= var(57) * 20 || (power >= 2000) && random <= var(57) * 60 || (var(40) > 0) && random <= var(57) * 60 || p2life <= 150
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = EnemyNear(var(58)),MoveType = H
triggerall = movehit
trigger1 = stateno = 205 && animelemtime(2) > 0 && animelemtime(3) < 0
trigger2 = stateno = 400 && animelemtime(5) > 0 && animelemtime(6) < 0
trigger3 = stateno = 315 && animelemtime(10) > 0 && animelemtime(12) < 0
trigger4 = stateno = 330 && animelemtime(4) > 0 && animelemtime(5) < 0
trigger5 = stateno = 1150 && AnimElemtime(8) >= 0 && AnimElemtime(12) < 0

;------------------------------------------------------------------------------
;EX昁嶦媄
;------------------------------------------------------------------------------
;EX僴乕僪僄僢僕
[state -3, EX HE]
type = ChangeState
value = 11100
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = RoundState = 2
triggerall = power >= 500 && var(40) = 0 || var(40) > 0
triggerall = random <= var(57) * 40
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = EnemyNear(var(58)),MoveType = H
triggerall = movehit
trigger1 = stateno = 205 && animelemtime(2) > 0 && animelemtime(3) < 0
trigger2 = stateno = 400 && animelemtime(5) > 0 && animelemtime(6) < 0
trigger3 = stateno = 315 && animelemtime(10) > 0 && animelemtime(12) < 0
trigger4 = stateno = 330 && animelemtime(4) > 0 && animelemtime(5) < 0

;------------------------------------------------------------------------------
;昁嶦媄
;------------------------------------------------------------------------------
;嫮僴乕僪僄僢僕
[state -3, HE]
type = ChangeState
value = 1150
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = EnemyNear(var(58)),statetype != A
triggerall = EnemyNear(var(58)),statetype != L
triggerall = EnemyNear(var(58)),MoveType = H
triggerall = movehit
trigger1 = stateno = 315 && animelemtime(10) > 0 && animelemtime(12) < 0
trigger2 = stateno = 330 && animelemtime(4) > 0 && animelemtime(5) < 0

;庛僴乕僪僄僢僕
[state -3, HE]
type = ChangeState
value = 1100
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = EnemyNear(var(58)),statetype != A
triggerall = EnemyNear(var(58)),statetype != L
triggerall = EnemyNear(var(58)),MoveType = H
triggerall = movehit
trigger1 = stateno = 205 && animelemtime(2) > 0 && animelemtime(3) < 0
trigger2 = stateno = 400 && animelemtime(5) > 0 && animelemtime(6) < 0

;楏晽対
[state -3,RK]
type = ChangeState
value = 1000
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = EnemyNear(var(58)),statetype != A
triggerall = EnemyNear(var(58)),statetype != L
triggerall = moveguarded
trigger1 = stateno = 315 && animelemtime(10) > 0 && animelemtime(12) < 0
trigger2 = stateno = 330 && animelemtime(4) > 0 && animelemtime(5) < 0
trigger3 = stateno = 440 && animelemtime(6) > 0 && animelemtime(8) < 0
trigger4 = stateno = 300 && animelemtime(5) > 0 && animelemtime(6) < 0

;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;僟僂儞捛寕
;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
[state -3, 傛偺偐偤捛寕僼儔僌1]
type = varset
triggerall = var(59)
triggerall = var(45) = 0
triggerall = !var(44)
triggerall = movehit
trigger1 = stateno = 1100
trigger2 = stateno = 1160
trigger3 = stateno = 1200
trigger4 = stateno = 11110
trigger5 = stateno = 3100
var(45) = 1

[state -3, 捛寕僼儔僌儕僙僢僩]
type = varset
triggerall = var(59) > 0
triggerall = var(45) = [1,2]
trigger1 = EnemyNear(var(58)),ctrl
trigger2 = stateno = 195 || (stateno = [2000,2020]) || (stateno = [12000,12050]) || (EnemyNear(var(58)),ctrl)
var(45) = 0

;捛寕傛偺偐偤丂憃
[state -3, YONOKAZE丂SOU]
type = ChangeState
value = 12000
triggerall = var(59) = 1
triggerall = power >= 500 && var(40) = 0 || var(40) > 0
triggerall = statetype != A
triggerall = ctrl
triggerall = var(57) >= 3 && RoundState = 2
triggerall = Random <= var(57)*20
triggerall = EnemyNear,alive
triggerall = EnemyNear(var(58)),Movetype = H
triggerall = var(45) = 1
triggerall = !var(44)
trigger1 = p2bodydist x = [0,80]

;捛寕傛偺偐偤B
[state -3, YONOKAZE B]
type = ChangeState
value = 2020
triggerall = var(59) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(57) >= 3 && RoundState = 2
triggerall = Random <= var(57)*100
triggerall = !var(44)
trigger1 = P2BodyDist X = [160,210]
trigger1 = EnemyNear(var(58)),Movetype = H
trigger1 = var(45) = 1

;捛寕傛偺偐偤Y
[state -3, YONOKAZE Y]
type = ChangeState
value = 2015
triggerall = var(59) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(57) >= 3 && RoundState = 2
triggerall = !var(44)
triggerall = Random <= var(57)*100
triggerall = EnemyNear(var(58)),Movetype = H
trigger1 = P2BodyDist X = [100,160]
trigger1 = var(45) = 1
trigger2 = var(45) = 3

;捛寕傛偺偐偤A
[state -3, YONOKAZE A]
type = ChangeState
value = 2005
triggerall = var(59) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(57) >= 3 && RoundState = 2
triggerall = Random <= var(57)*100
triggerall = !var(44)
trigger1 = P2BodyDist X = [40,100]
trigger1 = EnemyNear(var(58)),Movetype = H
trigger1 = var(45) = 1

;捛寕傛偺偐偤X
[state -3, YONOKAZE X]
type = ChangeState
value = 2000
triggerall = var(59) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = var(57) >= 3 && RoundState = 2
triggerall = !var(44)
triggerall = Random <= var(57)*100
triggerall = EnemyNear(var(58)),Movetype = H
trigger1 = P2BodyDist X = [-5,50]
trigger1 = var(45) = 1

;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;棫偪夞傝丄媄怳傝(抧忋)
;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;---------------------------------------------------------------------------
;搳偘
;---------------------------------------------------------------------------
;梾惗栧
[State -1, RASHOUMON]
type = ChangeState
value = 3400
triggerall = var(59) = 1
triggerall = var(57) >= 3
triggerall = power >= 1000 && var(40) = 0 || var(40) > 0
triggerall = var(53) = 0
triggerall = fvar(38) = 0
triggerall = RoundState = 2
triggerall = Random <= var(57) * 60 || var(57) >= 8 && p2life <= 250 || var(57) = 11
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),stateno != [150,155]
triggerall = enemynear(var(58)),stateno != [5100,5299]
triggerall = p2bodydist X = [-5,35]
triggerall = enemynear(var(58)),movetype != H
trigger1 = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = p2bodydist X = [-5,30]
trigger2 = stateno = 320 && animelemtime(9) < 0 && !movecontact
trigger2 = p2bodydist X = [-5,30]
trigger3 = stateno = 1315 && AnimElemtime(3) >= 0
trigger4 = stateno = 1325 && AnimElemtime(3) >= 0

;恀嬻搳偘
[state -3, SN]
type = ChangeState
value = 1500
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = var(53) = 0
triggerall = fvar(38) = 0
triggerall = RoundState = 2
triggerall = random <= var(57) * 60 || var(57) = 11
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),stateno != [150,155]
triggerall = enemynear(var(58)),stateno != [5100,5299]
triggerall = enemynear(var(58)),movetype != H
trigger1 = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = p2bodydist X = [-5,30]
trigger2 = stateno = 320 && animelemtime(9) < 0 && !movecontact
trigger2 = p2bodydist X = [-5,30]
trigger3 = stateno = 1315 && AnimElemtime(3) >= 0
trigger4 = stateno = 1325 && AnimElemtime(3) >= 0

;K搳偘
[state -3, Throw]
type = ChangeState
value = 805
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = var(53) = 0
triggerall = fvar(38) = 0
triggerall = RoundState = 2
triggerall = Random <= var(57) * 60 || var(57) = 11
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),stateno != [150,155]
triggerall = enemynear(var(58)),stateno != [5100,5299]
triggerall = enemynear(var(58)),movetype != H
triggerall = backedgedist <= 120
triggerall = p2bodydist X = [-5,15]
triggerall = enemynear(var(58)),facing != facing || enemynear(var(58)),stateno = [700,999]
trigger1 = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]

;P搳偘
[state -3, Throw]
type = ChangeState
value = 800
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = var(53) = 0
triggerall = fvar(38) = 0
triggerall = RoundState = 2
triggerall = Random <= var(57) * 60 || var(57) = 11
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),stateno != [150,155]
triggerall = enemynear(var(58)),stateno != [5100,5299]
triggerall = enemynear(var(58)),movetype != H
triggerall = backedgedist > 120
triggerall = p2bodydist X = [-5,15]
triggerall = enemynear(var(58)),facing != facing || enemynear(var(58)),stateno = [700,999]
trigger1 = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]

;---------------------------------------------------------------------------
;婲偒峌傔
;---------------------------------------------------------------------------
;楏晽対
[state -3, RK]
type = ChangeState
value = 1000
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = var(44) = 0 && var(45) = 0
triggerall = RoundState = 2
triggerall = random <= var(57) * 60
triggerall = StateType != A
triggerall = numprojID(1000) = 0
triggerall = P2BodyDist X >= 160
triggerall = EnemyNear(var(58)),MoveType = H
triggerall = EnemyNear(var(58)),StateType = A || EnemyNear(var(58)),StateType = L
trigger1 = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]

;---------------------------------------------------------------------------
;懳嬻
;---------------------------------------------------------------------------
;嬤嫍棧棫偪庛僷儞僠乛嫮僷儞僠
[state -3, Stand Light Punch]
type = ChangeState
value = 205
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = fvar(38) = 0
triggerall = RoundState = 2
triggerall = Random <= ((var(57) * 6) * var(56)) || var(57) = 11
triggerall = StateType != A
triggerall = enemynear(var(58)),StateType != L
triggerall = enemynear(var(58)),movetype != H
triggerall =!InGuardDist && enemynear(var(58)),facing != facing
triggerall = enemynear(var(58)),stateno != [5020,5040]
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = enemynear(var(58)),StateType = A
trigger1 = P2BodyDist X = [-5,19]
trigger1 = P2BodyDist Y >= -90

;傛偺偐偤丂憃
[state -3, YONOKAZE丂SOU]
type = ChangeState
value = 12000
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = power >= 500 && var(40) = 0 || var(40) > 0
triggerall = fvar(38) = 0
triggerall = random <= ((var(57) * 2) * var(56))
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype = A
triggerall = enemynear(var(58)),movetype != H
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),stateno != [5020,5040]
triggerall = ctrl || stateno = 20 || stateno = 100
trigger1 = p2bodydist x = [60,160]
trigger1 = p2bodydist Y <= -100

;儗僀僕儞僌僗僩乕儉
[state -3, RS]
type = ChangeState
value = 3000
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = fvar(38) = 0
triggerall = Roundstate = 2
triggerall = Random <= ((var(57) * 4) * var(56))
triggerall = statetype != A
triggerall = power > 1000
triggerall = enemynear(var(58)),statetype = A
triggerall = enemynear(var(58)),movetype != H
triggerall = enemynear(var(58)),statetype != L
triggerall = !inguarddist
triggerall = enemynear(var(58)),stateno != [5020,5040]
triggerall = ctrl || stateno = 20 || StateNo = 100
trigger1 = p2bodydist X = [-5,55]
trigger1 = p2bodydist Y = [-150,-60]
trigger1 = enemynear(var(58)),vel X > 0

;墦嫍棧棫偪嫮僉僢僋
[state -3, Standing Strong Kick]
type = ChangeState
value = 240
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = fvar(38) = 0
triggerall = RoundState = 2
triggerall = Random <= ((var(57) * 6) * var(56)) || var(57) = 11
triggerall = statetype != A
triggerall = enemynear,movetype = I
triggerall = enemynear(var(58)),stateno != [5020,5040]
triggerall = ctrl || stateno = 20 || stateno = 100
trigger1 = P2BodyDist X = [50,100]
trigger1 = P2BodyDist Y = [-120,-60]
trigger1 = EnemyNear(var(58)),Vel X >= 0
trigger1 = EnemyNear(var(58)),StateType = A

;偟傖偑傒嫮僷儞僠
[state -3, Crouching Strong Punch]
type = ChangeState
value = 410
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = fvar(38) = 0
triggerall = RoundState = 2
triggerall = Random <= ((var(57) * 6) * var(56)) || var(57) = 11
triggerall = statetype != A
triggerall = enemynear,movetype = I
triggerall = enemynear(var(58)),stateno != [5020,5040]
triggerall = ctrl || stateno = 20 || stateno = 100
trigger1 = P2BodyDist X = [10,50]
trigger1 = P2BodyDist Y >= -130
trigger1 = EnemyNear(var(58)),Vel X >= 0
trigger1 = EnemyNear(var(58)),StateType = A

;墦嫍棧棫偪庛僷儞僠
[state -3, Stand Light Punch]
type = ChangeState
value = 200
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = fvar(38) = 0
triggerall = RoundState = 2
triggerall = Random <= ((var(57) * 6) * var(56)) || var(57) = 11
triggerall = statetype != A
triggerall = enemynear,statetype != L
triggerall = P2BodyDist X >= 20
triggerall =!InGuardDist && EnemyNear,facing != facing
triggerall = enemynear(var(58)),stateno != [5020,5040]
triggerall = ctrl || stateno = 20 || StateNo = 100
trigger1 = enemynear,statetype = A && (p2bodydist X = [18,75])
trigger1 = enemynear,movetype != H && (abs(enemynear,Pos Y - Pos Y) = [0,50])

;---------------------------------------------------------------------------
;壓抜
;---------------------------------------------------------------------------
;偟傖偑傒庛僉僢僋
[state -3, Crouching Light Kick]
type = ChangeState
value = 430
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = fvar(38) = 0
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),stateno != [5000,5270]
triggerall =!InGuardDist || enemynear(var(58)),facing = facing
triggerall = P2BodyDist X = [-5,30]
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = enemynear(var(58)),statetype = S
trigger1 = random <= var(57) * 40
trigger2 = random <= var(57) * 10

;---------------------------------------------------------------------------
;拞抜
;---------------------------------------------------------------------------
;慜彫僕儍儞僾(拞抜)
[state -3, ]
Type = ChangeState
value = 32
triggerall = var(59) = 1
triggerall = var(57) = [1,8]
triggerall = fvar(38) = 0
triggerall = RoundState = 2
triggerall = random <= var(57) * 40
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),movetype != H
triggerall = enemynear(var(58)),statetype = C || enemynear(var(58)),stateno=[120,159]
triggerall = P2BodyDist X = [-5,60]
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = enemynear(var(58)),movetype = I
trigger2 = TeamMode = simul
trigger2 = numpartner
trigger2 = partner,alive
trigger2 = partner,movetype = A

;慜拞僕儍儞僾(拞抜)
[state -3,]
Type = ChangeState
value = 34
triggerall = var(59) = 1
triggerall = var(57) = [1,8]
triggerall = fvar(38) = 0
triggerall = RoundState = 2
triggerall = random <= var(57) * 40
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),movetype != H
triggerall = enemynear(var(58)),statetype = C || enemynear(var(58)),stateno=[120,159]
triggerall = P2BodyDist X = [40,100]
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = enemynear(var(58)),movetype = I
trigger2 = TeamMode = simul
trigger2 = numpartner
trigger2 = partner,alive
trigger2 = partner,movetype = A

;---------------------------------------------------------------------------
;忋抜
;---------------------------------------------------------------------------
;嬤嫍棧棫偪嫮僷儞僠
[state -3, Stand Strong Punch]
type = ChangeState
value = 215
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = fvar(38) = 0
triggerall = RoundState = 2
triggerall = random <= var(57) * 100 || enemynear(var(58)),movetype = H
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall =!InGuardDist || enemynear(var(58)),facing = facing
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = P2BodyDist X = [-5,21]

;偟傖偑傒庛僷儞僠
[state -3, Crouching Light Punch]
type = ChangeState
value = 400
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = fvar(38) = 0
triggerall = RoundState = 2
triggerall = Random <= var(57) * 20
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall =!InGuardDist || enemynear(var(58)),facing = facing
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = p2bodydist X = [-5,55]

;墦嫍棧棫偪庛僷儞僠
[state -3, Stand Light Punch]
type = ChangeState
value = 200
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = fvar(38) = 0
triggerall = RoundState = 2
triggerall = Random <= var(57) * 20
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),movetype != H
triggerall =!InGuardDist && enemynear(var(58)),facing != facing
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = p2bodydist X = [35,75]

;壓抜旔偗峌寕
[State -1, GSK]
type = ChangeState
value = 320
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = fvar(38) = 0
triggerall = RoundState = 2
triggerall = Random <= var(57) * 25
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),movetype != H
triggerall =!InGuardDist && enemynear(var(58)),facing != facing
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = p2bodydist X = [30,160]

;墦嫍棧棫偪嫮僉僢僋
[state -3, Standing Strong Kick]
type = ChangeState
value = 240
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = fvar(38) = 0
triggerall = RoundState = 2
triggerall = Random <= var(57) * 10
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),movetype != H
triggerall =!InGuardDist && enemynear(var(58)),facing != facing
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = p2bodydist X = [50,80]
trigger1 = enemynear(var(58)),statetype = S

;---------------------------------------------------------------------------
;旘傃摴嬶娭楢
;---------------------------------------------------------------------------
;僟僽儖楏晽対丂夵
[state -3, DRK丂K]
type = ChangeState
value = 11000
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = fvar(38) = 0
triggerall = power >= 500 && var(40) = 0 || var(40) > 0
triggerall = RoundState = 2
triggerall = statetype != A 
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),movetype != H
triggerall = enemynear(var(58)),stateno != [5100,5299]
triggerall = numprojID(1000) = 0
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = p2bodydist X >= 160
trigger1 = random <= var(57) * 2

;傛偺偐偤憃(墦)
[state -3, YONOKAZE丂SOU]
type = ChangeState
value = 12050
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = fvar(38) = 0
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = EnemyNear(var(58)),statetype != A
triggerall = EnemyNear(var(58)),statetype != L
triggerall = enemynear(var(58)),movetype != H
triggerall = !inguarddist
triggerall = ctrl || stateno = 20 || stateno = 100
trigger1   = p2bodydist x >= 120
trigger1   = random <= var(57) * 3

;傛偺偐偤B
[state -3, YONOKAZE丂B]
type = ChangeState
value = 2020
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = fvar(38) = 0
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = EnemyNear(var(58)),statetype != A
triggerall = EnemyNear(var(58)),statetype != L
triggerall = enemynear(var(58)),movetype != H
triggerall = !inguarddist
triggerall = ctrl || stateno = 20 || stateno = 100
trigger1   = P2BodyDist X > 180
trigger1   = random <= var(57) * 5

;傛偺偐偤Y
[state -3, YONOKAZE丂A]
type = ChangeState
value = 2015
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = fvar(38) = 0
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = EnemyNear(var(58)),statetype != A
triggerall = EnemyNear(var(58)),statetype != L
triggerall = enemynear(var(58)),movetype != H
triggerall = !inguarddist
triggerall = ctrl || stateno = 20 || stateno = 100
trigger1   = p2bodydist x = [120,180]
trigger1   = random <= var(57) * 5

;楏晽対
[state -3,RK]
type = ChangeState
value = 1000
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = fvar(38) = 0
triggerall = RoundState = 2
triggerall = statetype != A 
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),movetype != H
triggerall = enemynear(var(58)),stateno != [5100,5299]
triggerall = numprojID(1000) = 0
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = p2bodydist X >= 160
trigger1 = random <= var(57) * 10

;僟僽儖楏晽対
[state -3, DRK]
type = ChangeState
value = 1050
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = fvar(38) = 0
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = numprojID(1000) = 0
triggerall = ctrl || stateno = 20 || stateno = 100
trigger1 = enemynear(var(58)),movetype = I
trigger1 = (p2bodydist X = [20,67]) && (p2bodydist Y = [-50,20])
trigger1 = Random <= var(57)
trigger1 = ((100*life/const(data.life)) > 30)||(power < 2000)
trigger2 = enemynear(var(58)),movetype = I
trigger2 = (p2bodydist X >= 82) && (p2bodydist Y = [-30,20])
trigger2 = Random <= var(57)
trigger3 = (enemynear(var(58)),HitDefAttr = SCA,SA,HA)||(enemynear(var(58)),NumProj > 0)||(enemynear(var(58)),NumHelper > 0)
trigger3 = (enemynear(var(58)),AnimTime <= -15)
trigger3 = (enemynear(var(58)),vel x >= -1)
trigger3 = p2movetype != H && p2movetype = A
trigger3 = (p2bodydist X >= 90)&& (enemynear(var(58)),pos y = [-150,20])
Trigger3 = random <= var(57) * 10

;---------------------------------------------------------------------------
;昁嶦媄
;---------------------------------------------------------------------------
;Y傂傚偆偑
[state -3, HYOUGA Y]
type = ChangeState
value = ifelse(random<=500,1320,1310)
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = fvar(38) = 0
triggerall = RoundState = 2
triggerall = statetype != A 
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),movetype != H
triggerall = enemynear(var(58)),stateno != [5100,5299]
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = p2bodydist X >= 120
trigger1 = random <= var(57) * 4

;庛僴乕僪僄僢僕
[state -3, L HE]
type = ChangeState
value = 1100
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = fvar(38) = 0
triggerall = RoundState = 2
triggerall = Random <= var(57) * 10
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),movetype != H
triggerall =!InGuardDist && enemynear(var(58)),facing != facing
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = p2bodydist X = [80,110]

;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;棫偪夞傝丄媄怳傝(嬻拞)
;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;僕儍儞僾嫮僷儞僠
[state -3, Jump Strong Punch]
type = ChangeState
value = 610
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = RoundState = 2
triggerall = statetype = A
triggerall = random <= var(57) * 60 || enemynear(var(58)),movetype = H || var(57) = 11
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),stateno != [5020,5040]
triggerall = ctrl
trigger1 = Vel Y > 0
trigger1 = p2bodydist X = [-35,40]
trigger1 = enemynear(var(58)),statetype != A ;嬻懳抧
trigger2 = Vel X >= 0
trigger2 = P2BodyDist X = [-10,40]
trigger2 = EnemyNear(var(58)),Pos Y - Pos Y = [-40,40]
trigger2 = EnemyNear(var(58)),StateType = A;嬻懳嬻
trigger2 = EnemyNear(var(58)),MoveType != H

;嬻拞傆偭偲偽偟
[state -3, CD]
type = ChangeState
value = 650
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = RoundState = 2
triggerall = random <= var(57) * 60 || var(57) = 11
triggerall = statetype = A
triggerall = enemynear(var(58)),movetype != H
triggerall = enemynear,statetype != L
triggerall = stateno != [105,106]
triggerall = enemynear(var(58)),stateno != [5020,5040]
triggerall = ctrl
trigger1 = p2bodydist X = [-5,110]
trigger1 = EnemyNear(var(58)),Pos Y - Pos Y = [-60,20]
trigger1 = enemynear,statetype = A ;嬻懳嬻

[state -3, 僕儍儞僾庛僉僢僋]
type = ChangeState
value = 630
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = Roundstate = 2
triggerall = random <= var(57) * 60 || var(57) = 11
triggerall = statetype = A
triggerall = enemynear(var(58)),statetype = A
triggerall = enemynear(var(58)),movetype != H
triggerall = enemynear(var(58)),statetype != L
triggerall = stateno != [105,106]
triggerall = enemynear(var(58)),stateno != [5020,5040]
triggerall = ctrl
trigger1 = (abs(enemynear,Pos X - Pos X)= [0,80])
trigger1 = p2bodydist Y = [-20,20]
trigger1 = enemynear,movetype != A ;嬻懳嬻

;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;堏摦
;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;僟僢僔儏
[state -3, RUN]
type = ChangeState
value = 100
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = stateno != 100 && prevstateno != 100
triggerall = !inguarddist
triggerall = ctrl || stateno = 20
trigger1 = p2bodydist x >= 240
trigger1 = random <= (var(57)) * 40
trigger2 = p2bodydist x = [120,240]
trigger2 = random <= (var(57)) * 10
trigger3 = p2bodydist x = [60,120]
trigger3 = random <= (var(57)) * 5
trigger4 = enemynear(var(58)),statetype != L
trigger4 = enemynear(var(58)),movetype = H
trigger4 = enemynear(var(58)),stateno != [5050,5210]
trigger4 = !enemynear(var(58)),numproj
trigger4 = p2bodydist x >= 20
trigger4 = random <= (var(57)) * 40

;曕偒
[state -3, Walk]
type = ChangeState
value = 20
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = !InGuardDist
triggerall = stateno != 20 && prevstateno != 20
triggerall = stateno != 100 && prevstateno != 100
triggerall = ctrl
trigger1 = random <= (var(57)) * 20

[state -3, 悅捈彫僕儍儞僾]
Type = ChangeState
value = 39
triggerall = var(59)
triggerall = roundstate = 2
triggerall = StateType != A
triggerall = ctrl || stateno = 20
triggerall = enemynear(var(58)),movetype != H
triggerall = !enemynear(var(58)),numproj 
triggrtall = enemynear(var(58)),StateNo!=[5000,5120]
triggrtall = enemynear(var(58)),StateType != L
triggerall = P2BodyDist X = [0,35]
trigger1 = enemynear(var(58)),StateType != A
trigger1 = random <= 200/var(57)

[state -3, 慜僕儍儞僾]
Type = ChangeState
value = 30
triggerall = var(59)
triggerall = roundstate = 2
triggerall = StateType != A
triggerall = ctrl || stateno = 20
triggerall = !inguarddist
triggerall = enemynear(var(58)),movetype != H
triggerall = enemynear(var(58)),StateType != A
triggrtall = enemynear(var(58)),StateNo!=[5000,5120]
triggrtall = enemynear(var(58)),StateType != L
trigger1 = P2BodyDist X = [130,160]
trigger1 = random <= 50/var(57)

[state -3, 慜彫僕儍儞僾]
Type = ChangeState
value = 32
triggerall = var(59)
triggerall = roundstate = 2
triggerall = StateType != A
triggerall = ctrl || stateno = 20
triggerall = enemynear(var(58)),movetype != H
triggerall = !enemynear(var(58)),numproj 
triggrtall = enemynear(var(58)),StateNo!=[5000,5120]
triggrtall = enemynear(var(58)),StateType != L
trigger1 = P2BodyDist X = [-5,60]
trigger1 = enemynear(var(58)),StateType != A
trigger1 = random <= 200/var(57)

[state -3,慜拞僕儍儞僾]
Type = ChangeState
value = 34
triggerall = var(59)
triggerall = roundstate = 2
triggerall = StateType != A
triggerall = ctrl || stateno = 20 || stateno = 100
triggerall = enemynear(var(58)),movetype != H
triggerall = !enemynear(var(58)),numproj 
triggerall = !inguarddist
triggrtall = enemynear(var(58)),StateNo!=[5000,5120]
triggrtall = enemynear(var(58)),StateType != L
trigger1 = P2BodyDist X = [40,120]
trigger1 = enemynear(var(58)),StateType != A
trigger1 = random <= 200/var(57)

[state -3, 慜戝僕儍儞僾]
Type = ChangeState
value = 36
triggerall = var(59)
triggerall = roundstate = 2
triggerall = StateType != A
triggerall = ctrl || stateno = 20 || stateno = 100
triggrtall = enemynear(var(58)),StateNo!=[5000,5120]
triggrtall = enemynear(var(58)),StateType != L
trigger1 = !inguarddist
trigger1 = enemynear(var(58)),movetype != H
trigger1 = P2BodyDist X = [120,225]
trigger1 = random <= 200/var(57)
trigger2 = enemynear(var(58)),movetype != H
trigger2 = P2BodyDist X >= 160
trigger2 = enemynear(var(58)),NumProj || enemynear(var(58)),HitDefAttr = SC,NP,SP,HP
trigger2 = enemynear(var(58)),StateType != A
trigger2 = enemynear(var(58)),time >= 50
trigger2 = random <= var(57)*25
trigger3 = enemynear(var(58)),movetype != H
trigger3 = P2BodyDist X >= 160
trigger3 = enemynear(var(58)),NumProj || enemynear(var(58)),HitDefAttr = SC,NP,SP,HP
trigger3 = enemynear(var(58)),StateType != A
trigger3 = random <= var(57)*25

[state -3, 屻僕儍儞僾]
Type = ChangeState
value = 31
triggerall = var(59)
triggerall = roundstate = 2
triggerall = StateType != A
triggerall = ctrl || stateno = 20
triggerall = !inguarddist
triggerall = enemynear(var(58)),movetype != H
triggerall = (enemynear(var(58)),MoveType != A && enemynear(var(58)),StateType != A)
triggerall = P2BodyDist X = [60,120]
trigger1 = random <= floor(Var(57)/2)

[state -3,屻戝僕儍儞僾]
Type = ChangeState
value = 37
triggerall = var(59)
triggerall = roundstate = 2
triggerall = StateType != A
triggerall = ctrl || stateno = 20 || stateno = 100
triggerall = !inguarddist
triggerall = enemynear(var(58)),movetype != H
trigger1 = P2BodyDist X = [60,90]
trigger1 = random <= floor(Var(57)/2)

;僶僢僋僗僥僢僾
[state -3, Back Step]
type = ChangeState
value = 105
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = RoundState = 2
triggerall = statetype = S
triggerall = BackEdgeBodyDist > 40 
triggerall = stateno != 100 && prevstateno != 100
triggerall = ctrl
trigger1   = P2BodyDist X = [70,100]
trigger1   = enemynear(var(58)),movetype = I
trigger1   = enemynear(var(58)),statetype != A 
trigger1   = Random = [251,321]
trigger2   = P2BodyDist X < 30
trigger2   = enemynear(var(58)),statetype = L
trigger2   = Random = [251,351]

;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;偦偺懠
;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;挧敪(儗儀儖傾僢僾梡)
[state -3, Taunt]
type = ChangeState
value = 195
triggerall = var(59) = 1
triggerall = var(57) < 10 || var(56) < 10
triggerall = var(54) >= 1
triggerall = fvar(38) = 0
triggerall = random <= 150
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = !inguarddist
triggerall = !enemynear(var(58)),numproj
triggerall = stateno != 195 && prevstateno != 195
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = P2bodydist X >= 80
trigger1 = enemynear(var(58)),StateType = L
trigger2 = P2bodydist X >= 120
trigger2 = enemynear(var(58)),StateType = A
trigger2 = enemynear(var(58)),movetype = H

;僷儚乕棴傔
[state -3]
type = ChangeState
value = 750
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = statetype != A
triggerall = roundstate = 2
triggerall = Power < PowerMax
triggerall = var(40) = 0
triggerall = !inguarddist
triggerall = !enemynear(var(58)),numproj
triggerall = prevstateno != [750,751]
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = P2bodydist X >= 140
trigger1 = Random = [600,650]
trigger2 = teammode = single || teammode = turns
trigger2 = P2bodydist X >= 80
trigger2 = enemynear(var(58)),StateType = L
trigger2 = Random = [200,480]

;MAX敪摦
[state -3, Jump Strong Kick]
type = ChangeState
value = 900
triggerall = var(59) = 1
triggerall = var(57) >= 1
triggerall = power >= 1000
triggerall = roundstate = 2
triggerall = teammode = single || teammode = turns
triggerall = statetype != A
triggerall = var(40) = 0
triggerall = p2life > 200
triggerall = ctrl || stateno = 20 || stateno = 100 || stateno = [120,149]
trigger1 = power = [1000,3999]
trigger1 = p2bodydist x >= 120 || enemynear(var(58)),statetype = L && enemynear(var(58)),stateno != 5120
trigger1 = random <= var(57) * 1.5
trigger2 = power = [4000,4999]
trigger2 = p2bodydist x >= 120 || enemynear(var(58)),statetype = L && enemynear(var(58)),stateno != 5120
trigger2 = random <= var(57) * 2
trigger3 = power >= 5000
trigger3 = p2bodydist x >= 120 || enemynear(var(58)),statetype = L && enemynear(var(58)),stateno != 5120
trigger3 = random <= var(57) * 4

;---------------------------------------------------------------------------
;儗儀儖傾僢僾僔僗僥儉
[State -3]
Type = VarAdd
trigger1 = var(59) = 1
triggerall = Var(57) = [1,9]
trigger1 = stateno = 195 && time = 1 ;挧敪
var(57) = 1
IgnoreHitPause = 1

[State -3]
Type = VarAdd
trigger1 = var(59) = 1
triggerall = Var(56) = [1,9]
trigger1 = stateno = 195 && time = 1 ;挧敪
var(56) = 1
IgnoreHitPause = 1

;---------------------------------------------------------------------------
;AI梡p2name(偁傑傝岲偒偱偼側偄偺偱昁梫嵟掅尷偺傕偺偺傒)

;抧忋庴恎拞側偺偱庤弌偟偟側偄偱偔偩偝偄
[State -3,]
Type = VarSet
trigger1 = enemynear(var(58)),stateno = [5200,5201]
trigger2 = enemynear(var(58)),stateno = 702
trigger2 = enemynear(var(58)),authorname = "ahuron"
trigger2 = enemynear(var(58)),name != "SHIN" || enemynear(var(58)),name != "REI" || enemynear(var(58)),name != "JAGI" || enemynear(var(58)),name != "THOUTHER"
trigger2 = enemynear(var(58)),name != "Shinnosuke Kagami" || enemynear(var(58)),name != "Mukuro"
trigger2 = enemynear(var(58)),name != "Misuzu"
trigger3 = enemynear(var(58)),stateno = 52000
fvar(38) = 1

;惂尷夝彍
[State -3,]
Type = VarSet
trigger1 = enemynear(var(58)),ctrl = 1
trigger2 = enemynear(var(58)),stateno = [0,199]
trigger3 = enemynear(var(58)),movetype = A
fvar(38) = 0
