;===========================================================================
;================================仭======仭仭仭=============================
;===============================仭仭=======仭===============================
;==============================仭==仭======仭===============================
;=============================仭仭仭仭=====仭===============================
;=============================仭====仭=====仭===============================
;=============================仭====仭===仭仭仭=============================
;===========================================================================
;
;	AI by FAY418
;
;仭儗儀儖愝掕
;	丒壓偺Value偺抣傪1乣11傑偱愝掕偱偒傑偡丅
;	丒偝傜偵儗儀儖11偱挻斀墳偟傑偡
;	丒儗儀儖偲偄偭偰傕儔儞僟儉偺抣傪曄偊偰傞偩偗側偺偱峴摦偼傎偲傫偳曄傢傝傑偣傫
;
;===========================================================================
[Statedef -3]

[State -3, AI]
Type = VarSet
TriggerAll = !Var(59)
TriggerAll = RoundState != 3
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" || Command = "AI_51" || Command = "AI_52" || Command = "AI_53" || Command = "AI_54"
Trigger12 = Command = "AI_55" || Command = "AI_56" || Command = "AI_57" || Command = "AI_58" || Command = "AI_59"
Trigger13 = Command = "AI_60" || Command = "AI_61" || Command = "AI_62" || Command = "AI_63" || Command = "AI_64"
Trigger14 = Command = "AI_65" || Command = "AI_66" || Command = "AI_67" || Command = "AI_68" || Command = "AI_69"
Trigger15 = PalNo >= 7 && RoundState = 2
Trigger16 = NumHelper(99998) > 0
Trigger16 = Helper(99998),Var(59) = 1
IgNoreHitPause = 1
V = 59
;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
Value = 11   ;偙偙傪1乣11偵愝掕偱偒傑偡
;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭

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

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

;===========================================================================
;---------------------------------------------------------------------------
;X儃僞儞乮0:棧偟偰偄傞 1:墴偟偰偄傞忬懺乯
[State -3, PushButton X]
Type = VarSet
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(39) = 0
TriggerAll = Life >= 300
TriggerAll = (Var(5) != -1 && Power < 3000) || (Var(5) = -1 && Power < 2000)	;僼傽僀僫儖儅僗僷寕偪偨偄
;TriggerAll = Var(5) != 3 && Var(5) != 5 && Var(5) != 7 && Var(5) != 13	;僒僀僐儈僒僀儖寕偪偨偄
Trigger1 = StateNo = 220 || StateNo = 420 || StateNo = [620,626]
Trigger1 = Time = 2
Trigger1 = Random < 40 * Var(59)
Trigger2 = StateNo = 3005
Trigger3 = MoveType = H
Trigger3 = Random < 30 * Var(59)
var(39) = 1

[State -3, Charge End AI]
Type = VarSet
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(39) = 1
Trigger1 = StateNo = 220 || StateNo = 420 || StateNo = [620,626]
Trigger1 = Time = 1
Trigger2 = Var(5) = -1 && Power >= 1000
Trigger2 = StateNo = 215
Trigger2 = Random < 30 * Var(59)
var(39) = 0

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;僈乕僪晄擻媄懳嶔
;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;偦偺媄僢両両乽妎偊偰乿偄傞偧僢両両
;----------------------------------------------------------------------------
[State -3, 挧敪2];側偤偐摉偨傝敾掕側偟
Type = ChangeState
Value = 196
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Random < 100 * Var(59)
TriggerAll = NumHelper(99998)
TriggerAll = IfElse((Var(59) > 10), 1, EnemyNear,Time > (20 + (Random % 30)))
TriggerAll = Helper(99998),Var(48) = 0
TriggerAll = power >= 1000
TriggerAll = StateType != A
TriggerAll = Ctrl
Trigger1 = P2StateNo = Helper(99998),Var(56)
Trigger2 = P2StateNo = Helper(99998),Var(57)
Trigger3 = P2StateNo = Helper(99998),Var(58)
Trigger4 = P2StateNo = Helper(99998),Var(59)
Trigger5 = P2StateNo = Helper(99998),Var(53) ;搳偘

;===========================================================================
;---------------------------------------------------------------------------
;嬻拞暅婣
[State -3]
Type = ChangeState
Value = 5210
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Alive	;惗偒偰偄傞偲偒
TriggerAll = StateNo = 5050
Trigger1 = CanRecover	;暅婣偡傞偙偲偑弌棃傞偲偒
Trigger1 = Random < 10 * Var(59)*Var(59)

;===========================================================================
;---------------------------------------------------------------------------
;僈乕僪
[State -3, 僈乕僪]
Type = ChangeState
Value = 120
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Ctrl
TriggerAll = IfElse((Var(59) > 10), 1, (EnemyNear,Time > 20 + (Random % 30)))
TriggerAll = 100 * Var(59)
Trigger1 = InGuardDist || Abs(P2BodyDist X) < 60
Trigger1 = EnemyNear,HitDefAttr = SCA,AA,AP
;Projectile宍幃旘傃摴嬶懳嶔(暿偵Projectile偦偺傕偺偑杊偘傞傛偆偵側傞傢偗偱偼側偄丅)
Trigger2 = InGuardDist
Trigger2 = Enemy,NumProj > 0
;撍恑宯懳嶔
Trigger3 = !InGuardDist
Trigger3 = EnemyNear,Vel X > 0
Trigger3 = EnemyNear,HitDefAttr = SC,AA
;僿儖僷乕懳嶔
Trigger4 = InGuardDist
Trigger4 = NumHelper(99998)
Trigger4 = Enemy,NumHelper > Helper(99998),Var(0)

;===========================================================================
;僇乕僪傪曟抧偵幪偰偰傗傞偤両
[State -3, CARDSHOOT]
type = ChangeState
value = 3600
triggerall = Var(59) && RoundState = 2
triggerAll = var(5) > 0;尰嵼丄俵俙倃偱側偄仌壗偐憰旛偟偰偄傞 0埲忋
triggerAll = statetype = S && ctrl
Trigger1 = Life < 300	;傄傫偪
Trigger1 = Power >= 3000
Trigger1 = P2Life > 300	;晧偗偰傞丟丟
Trigger1 = P2BodyDist X > 200
Trigger1 = Random < 80 * Var(59)
Trigger2 = Var(6) = 0
Trigger2 = P2StateType != A && P2StateType != L && P2StateNo != 5120
Trigger2 = (P2BodyDist X - (EnemyNear,Vel X * 6)) = [-7 , 107]
Trigger2 = Random < 91 * Var(59)

;===========================================================================
;---------------------------------------------------------------------------
;僥乕儗僢僥乕
[State -3, Tehletteh]
Type = ChangeState
Value = 70000
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(41) >= 7;幍惎僎乕僕俵俙倃 
TriggerAll = Var(5) >= -1;MAX忬懺乣摿庩晲婍
Trigger1 = (Stateno = 240);儅僗傿僽僽儖乕儉
Trigger1 = moveHit
Trigger1 = (P2BodyDist X - (EnemyNear,Vel X * 4)) = [-29 , 143]
;Trigger1 = (P2BodyDist Y + (EnemyNear,Vel Y * 5 + EnemyNear,Const(movement.yaccel) * 15)) = [-48, 0]
Trigger1 = Random < 100 * Var(59)
Trigger2 = (Stateno = 245);僷儚乕僗傿乕僾
Trigger2 = moveHit > 17
Trigger2 = (P2BodyDist X - (EnemyNear,Vel X * 4)) = [-29 , 143]
;Trigger2 = (P2BodyDist Y + (EnemyNear,Vel Y * 5 + EnemyNear,Const(movement.yaccel) * 15)) = [-48, 0]
Trigger2 = Random < 100 * Var(59)
Trigger3 = StateType = S && Ctrl
Trigger3 = (P2BodyDist X - (EnemyNear,Vel X * 12)) = [-29 , 143]
Trigger3 = (P2BodyDist Y + (EnemyNear,Vel Y * 12 + EnemyNear,Const(movement.yaccel) * 78)*(P2StateType=A && EnemyNear,Vel Y!=0)) = [-48, 0]
Trigger3 = P2StateType != L && P2StateNo != 5120
Trigger3 = P2MoveType = H && P2StateNo != [120,155]
Trigger3 = Random < 100 * Var(59)

;---------------------------------------------------------------------------
;傑偡偨乕偡傁乕偔Lv3
[State -3, MasterSparkLv3]
Type = ChangeState
Value = 3010
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Power >= 2000
TriggerAll = Var(5) = -1;MAX忬懺
TriggerAll = life < 300
TriggerAll = !Var(39)
TriggerAll = StateType = S && Ctrl
Trigger1 = (P2MoveType = H) || (P2StateType = L)
Trigger1 = P2BodyDist X > 150
Trigger1 = Random < 80 * Var(59)
Trigger2 = !EnemyNear,Ctrl
Trigger2 = Enemy,NumProj = 0 
Trigger2 = NumHelper(99998) > 0
Trigger2 = Enemy,NumHelper = Helper(99998),Var(0)
Trigger2 = P2BodyDist X > 220
Trigger2 = Random < 80 * Var(59)

;---------------------------------------------------------------------------
;屻戅僟僢僔儏
[State -3, Run Back]
Type = ChangeState
Value = 105
TriggerAll = Var(59) && RoundState = 2
TriggerAll = StateType = S && Ctrl
TriggerAll = BackEdgeBodyDist > 30
Trigger1 = life < 300;僺儞僠
Trigger1 = Var(5) = -1
Trigger1 = Power >= 2000
Trigger1 = P2BodyDist X > 0
Trigger1 = Random < 80 * Var(59)
Trigger2 = life < 300;僺儞僠
Trigger2 = Var(5) != -1
Trigger2 = Power >= 3000
Trigger2 = P2BodyDist X > 0
Trigger2 = Random < 80 * Var(59)

;===========================================================================
;---------------------------------------------------------------------------
;僎僢僩晲婍敪摦両-----------------------------------------------------------
;晲婍斣崋
;1:攅墹隳欋対丂2:恀丒徃棾対丂3:償僃僲儉杺棟嵐丂4:僟乕僋僄儞僕僃儖丂5:僗儔僢僔儏僋儘乕
;6:儊儕乕僋儕僗儅僗丂7:儗僀僕儞僌僗僩乕儉丂8:梾惗栧丂9:柵傃偺僶乕僗僩僗僩儕乕儉丂10:僴僀僷乕儃僢(徫)
;11:僴僀僷乕儃儉(娾抝)丂12:Rocks丂13:戝幹撱丂14:傗傒偳偆偙偔丂15:僊僈儞僥僢僋僾儗僢僔儍乕

[State -3, 攅墹隳欋対]
Type = ChangeState
Value = IfElse((PalNo % 6) != 0, 35000, 35010)
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(5) = 1	 || (PalNo % 6) = 0;攅墹隳欋対
TriggerAll = Var(6)	 || (PalNo % 6) = 0	;偘乕偠戝忎晇丠
TriggerAll = StateType != A
Trigger1 = (StateNo = [230,235]) || (StateNo = [250,255])	;抧忋僐儞儃嶰抜栚偐傜僉儍儞僙儖偑壜擻
Trigger1 = MoveHit
Trigger1 = Random < 100 * Var(59)
Trigger2 = Ctrl
Trigger2 = P2StateType != A && (P2MoveType = A || Enemy,NumProj > 0)
Trigger2 = P2BodyDist X > 120
Trigger2 = Random < 60 * Var(59)
Trigger3 = Ctrl
Trigger3 = P2MoveType = H && P2StateNo != [120, 159]
Trigger3 = P2StateType != A && P2StateType != L
Trigger3 = Random < 60 * Var(59)

[State -3, 恀丒徃棾対]
Type = ChangeState
Value = IfElse((PalNo % 6) != 0, 35000, 35020)
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(5) = 2	 || (PalNo % 6) = 0;恀丒徃棾対
TriggerAll = Var(6)	 || (PalNo % 6) = 0	;偘乕偠戝忎晇丠
TriggerAll = StateType != A
Trigger1 = (StateNo = [230,235]) || (StateNo = [250,255])	;抧忋僐儞儃嶰抜栚偐傜僉儍儞僙儖偑壜擻
Trigger1 = MoveHit
Trigger1 = Random < 100 * Var(59)
Trigger2 = Ctrl
Trigger2 = IfElse((Var(59) > 10), 1, (EnemyNear,Time > 20 + (Random % 30)))
Trigger2 = P2StateType != A && P2MoveType = A
Trigger2 = (P2BodyDist X - (EnemyNear,Vel X * 2)) = [26, 50]
Trigger2 = Random < 40 * Var(59)

[State -3, 償僃僲儉杺棟嵐]
Type = ChangeState
Value = IfElse((PalNo % 6) != 0, 35000, 35030)
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(5) = 3	 || (PalNo % 6) = 0;償僃僲儉
TriggerAll = Var(6)	 || (PalNo % 6) = 0	;偘乕偠戝忎晇丠
TriggerAll = StateType != A
Trigger1 = (StateNo = [230,235]) || (StateNo = [250,255])
Trigger1 = MoveHit
Trigger1 = Random < 100 * Var(59)
Trigger2 = Ctrl && Time > 0
Trigger2 = IfElse((Var(59) > 10), 1, (EnemyNear,Time > 20 + (Random % 30)))
Trigger2 = P2StateType != A && P2MoveType = A
Trigger2 = (P2BodyDist X - (EnemyNear,Vel X * 16)) = [-38, 146]
Trigger2 = Random < 40 * Var(59)

[State -3, 僟乕僋僄儞僕僃儖]
Type = ChangeState
Value = IfElse((PalNo % 6) != 0, 35000, 35040)
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(5) = 4	 || (PalNo % 6) = 0;僟乕僋僄儞僕僃儖
TriggerAll = Var(6)	 || (PalNo % 6) = 0	;偘乕偠戝忎晇丠
TriggerAll = StateType != A
TriggerAll = Enemy,NumProj = 0 
TriggerAll = NumHelper(99998) > 0
TriggerAll = Enemy,NumHelper = Helper(99998),Var(0)
TriggerAll = P2MoveType != A
Trigger1 = Ctrl
Trigger1 = P2BodyDist X > 160
Trigger1 = P2BodyDist Y = [-30,0]
Trigger1 = P2MoveType != H
Trigger1 = Random < 50 * Var(59)

[State -3, 僗儔僢僔儏僋儘乕]
Type = ChangeState
Value = IfElse((PalNo % 6) != 0, 35000, 35050)
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(5) = 5	 || (PalNo % 6) = 0;僗儔僢僔儏
TriggerAll = Var(6)	 || (PalNo % 6) = 0	;偘乕偠戝忎晇丠
TriggerAll = StateType != A
Trigger1 = (StateNo = [230,235]) || (StateNo = [250,255])
Trigger1 = MoveHit
Trigger1 = Random < 100 * Var(59)
Trigger2 = Ctrl
Trigger2 = IfElse((Var(59) > 10), 1, (EnemyNear,Time > 20 + (Random % 30)))
Trigger2 = P2StateType != A && (P2MoveType = A || Enemy,NumProj > 0)
Trigger2 = (P2BodyDist X - (EnemyNear,Vel X * 13)) = [100, 195]
Trigger2 = Random < 40 * Var(59)
Trigger3 = Ctrl && Time > 0
Trigger3 = P2MoveType = H && P2StateNo != [120,155]
Trigger3 = (P2BodyDist X - (EnemyNear,Vel X * 13)) = [25, 195]
Trigger3 = (P2BodyDist Y + (EnemyNear,Vel Y * 13 + EnemyNear,Const(movement.yaccel) * 91)*(P2StateType=A && EnemyNear,Vel Y!=0)) = [-54, -24]
Trigger3 = Random < 60 * Var(59)

[State -3, 儊儕乕僋儕僗儅僗]
Type = ChangeState
Value = IfElse((PalNo % 6) != 0, 35000, 35060)
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(5) = 6	 || (PalNo % 6) = 0;儊儕僋儕
TriggerAll = Var(6)	 || (PalNo % 6) = 0	;偘乕偠戝忎晇丠
TriggerAll = StateType != A
Trigger1 = Ctrl
Trigger1 = Life < 200
Trigger1 = P2Life - Life > 300
Trigger1 = Random < 1 * Var(59)*Var(59)*Var(59)

[State -3, 儗僀僕儞僌僗僩乕儉]
Type = ChangeState
Value = IfElse((PalNo % 6) != 0, 35000, 35070)
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(5) = 7	 || (PalNo % 6) = 0;儗僀僕儞僌僗僩乕儉
TriggerAll = Var(6)	 || (PalNo % 6) = 0	;偘乕偠戝忎晇丠
TriggerAll = StateType != A
Trigger1 = (StateNo = [230,235]) || (StateNo = [250,255])	;抧忋僐儞儃嶰抜栚偐傜僉儍儞僙儖偑壜擻
Trigger1 = MoveHit
Trigger1 = Random < 100 * Var(59)
Trigger2 = Ctrl && Time > 0
Trigger2 = IfElse((Var(59) > 10), 1, (EnemyNear,Time > 20 + (Random % 30)))
Trigger2 = P2MoveType != I && P2StateNo != [120,155]
Trigger2 = (P2BodyDist X - (EnemyNear,Vel X * 8)) = [-42, 120]
Trigger2 = (P2BodyDist Y + (EnemyNear,Vel Y * 8 + EnemyNear,Const(movement.yaccel) * 36)*(P2StateType=A && EnemyNear,Vel Y!=0)) = [-210, 1]
Trigger2 = Random < 50 * Var(59)

[State -3, 梾惗栧]
Type = ChangeState
Value = IfElse((PalNo % 6) != 0, 35000, 35080)
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(5) = 8	|| (PalNo % 6) = 0	;梾惗栧
TriggerAll = Var(6)	|| (PalNo % 6) = 0	;偘乕偠戝忎晇丠
TriggerAll = StateType != A
Trigger1 = (StateNo = [230,235]) || (StateNo = [250,255])	;抧忋僐儞儃嶰抜栚偐傜僉儍儞僙儖偑壜擻
Trigger1 = MoveContact
Trigger1 = (P2BodyDist X - EnemyNear,Vel X) < 66
Trigger1 = Random < 100 * Var(59)
Trigger2 = Ctrl && Time > 0
Trigger2 = IfElse((Var(59) > 10), 1, (EnemyNear,Time > 20 + (Random % 30)))
Trigger2 = P2StateType != A && P2StateType != L && P2StateNo != 5120
Trigger2 = (P2BodyDist X - (EnemyNear,Vel X)) = [23, 66]
Trigger2 = Random < 40 * Var(59)

[State -3, 柵傃偺僶乕僗僩僗僩儕乕儉]
Type = ChangeState
Value = IfElse((PalNo % 6) != 0, 35000, 35090)
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(5) = 9	 || (PalNo % 6) = 0	;柵傃偺僶乕僗僩僗僩儕乕儉
TriggerAll = Var(6)	 || (PalNo % 6) = 0	;偘乕偠戝忎晇丠
TriggerAll = StateType != A
Trigger1 = Ctrl
Trigger1 = !InGuardDist
Trigger1 = IfElse((Var(59) > 10), 1, (EnemyNear,Time > 20 + (Random % 30)))
Trigger1 = P2MoveType = A || Enemy,NumProj > 0
Trigger1 = Random < 20 * Var(59)

[State -3, 僴僀僷乕儃僢乮徫乯]
Type = ChangeState
Value = IfElse((PalNo % 6) != 0, 35000, 35100)
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(5) = 10 || (PalNo % 6) = 0	;僴僀僷乕儃僢
TriggerAll = Var(6)	 || (PalNo % 6) = 0	;偘乕偠戝忎晇丠
TriggerAll = StateType != A
Trigger1 = (StateNo = [230,235]) || (StateNo = [250,255])	;抧忋僐儞儃嶰抜栚偐傜僉儍儞僙儖偑壜擻
Trigger1 = MoveContact
Trigger1 = (P2BodyDist X - EnemyNear,Vel X * 3) < 80
Trigger1 = Random < 100 * Var(59)
Trigger2 = Ctrl && Time > 0
Trigger2 = IfElse((Var(59) > 10), 1, (EnemyNear,Time > 20 + (Random % 30)))
Trigger2 = P2StateType != A && P2StateType != L && P2StateNo != 5120
Trigger2 = (P2BodyDist X - (EnemyNear,Vel X * 3)) = [21, 80]

[State -3, 僴僀僷乕儃儉乮娾抝乯]
Type = ChangeState
Value = IfElse((PalNo % 6) != 0, 35000, 35110)
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(5) = 11 || (PalNo % 6) = 0	;僴僀僷乕儃儉
TriggerAll = Var(6)	 || (PalNo % 6) = 0	;偘乕偠戝忎晇丠
TriggerAll = StateType != A
Trigger1 = Ctrl
Trigger1 = P2BodyDist X > 100
Trigger1 = P2BodyDist Y = [-50,0]
Trigger1 = Random < 50 * Var(59)

[State -3, Rocks]
Type = ChangeState
Value = IfElse((PalNo % 6) != 0, 35000, 35120)
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(5) = 12 || (PalNo % 6) = 0	;壧
TriggerAll = Var(6)	 || (PalNo % 6) = 0	;偘乕偠戝忎晇丠
TriggerAll = StateType != A
Trigger1 = Ctrl
Trigger1 = IfElse((Var(59) > 10), 1, (EnemyNear,Time > 20 + (Random % 30)))
Trigger1 = P2MoveType = A || Enemy,NumProj > 0
Trigger1 = Random < 20 * Var(59)

[State -3, 戝幹撱]
Type = ChangeState
Value = IfElse((PalNo % 6) != 0, 35000, 35130)
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(5) = 13 || (PalNo % 6) = 0	;戝幹撱
TriggerAll = Var(6)	 || (PalNo % 6) = 0	;偘乕偠戝忎晇丠
TriggerAll = StateType != A
Trigger1 = (StateNo = [230,235]) || (StateNo = [250,255])	;抧忋僐儞儃嶰抜栚偐傜僉儍儞僙儖偑壜擻
Trigger1 = MoveHit
Trigger1 = Random < 100 * Var(59)
Trigger2 = Ctrl && Time > 0
Trigger2 = P2MoveType = H && P2StateNo != [120,155]
Trigger2 = (P2BodyDist X - (EnemyNear,Vel X * 9)) = [8, 126]
Trigger2 = (P2BodyDist Y + (EnemyNear,Vel Y * 9 + EnemyNear,Const(movement.yaccel) * 45)*(P2StateType=A && EnemyNear,Vel Y!=0)) = [-74, -3]
Trigger2 = Random < 60 * Var(59)

[State -3, 傗傒偳偆偙偔]
Type = ChangeState
Value = IfElse((PalNo % 6) != 0, 35000, 35140)
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(5) = 14 || (PalNo % 6) = 0	;埮溤歀
TriggerAll = Var(6)	 || (PalNo % 6) = 0	;偘乕偠戝忎晇丠
TriggerAll = StateType != A
Trigger1 = (StateNo = [230,235]) || (StateNo = [250,255])	;抧忋僐儞儃嶰抜栚偐傜僉儍儞僙儖偑壜擻
Trigger1 = MoveContact
Trigger1 = (P2BodyDist X - EnemyNear,Vel X) < 66
Trigger1 = Random < 100 * Var(59)
Trigger2 = Ctrl && Time > 0
Trigger2 = IfElse((Var(59) > 10), 1, (EnemyNear,Time > 20 + (Random % 30)))
Trigger2 = P2StateType != A && P2StateType != L && P2StateNo != 5120
Trigger2 = (P2BodyDist X - (EnemyNear,Vel X)) = [23, 66]
Trigger2 = Random < 40 * Var(59)

[State -3, 僊僈儞僥僢僋僾儗僢僔儍乕]
Type = ChangeState
Value = IfElse((PalNo % 6) != 0, 35000, 35150)
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(5) = 15 || (PalNo % 6) = 0	;塣憲
TriggerAll = Var(6)	 || (PalNo % 6) = 0	;偘乕偠戝忎晇丠
TriggerAll = StateType != A
Trigger1 = (StateNo = [230,235]) || (StateNo = [250,255])	;抧忋僐儞儃嶰抜栚偐傜僉儍儞僙儖偑壜擻
Trigger1 = MoveHit
Trigger1 = Random < 100 * Var(59)

[State -3, 巹偺柤傪尵偭偰傒傠両]
Type = ChangeState
Value = IfElse((PalNo % 6) != 0, 35000, 35160)
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(5) = 16 || (PalNo % 6) = 0	;僤傽僊
TriggerAll = Var(6)	 || (PalNo % 6) = 0	;偘乕偠戝忎晇丠
TriggerAll = StateType != A
Trigger1 = (StateNo = [230,235]) || (StateNo = [250,255])	;抧忋僐儞儃嶰抜栚偐傜僉儍儞僙儖偑壜擻
Trigger1 = MoveContact
Trigger1 = (P2BodyDist X - EnemyNear,Vel X * 3) < 80
Trigger1 = Random < 100 * Var(59)
Trigger2 = Ctrl && Time > 0
Trigger2 = IfElse((Var(59) > 10), 1, (EnemyNear,Time > 20 + (Random % 30)))
Trigger2 = P2StateType != A && P2StateType != L && P2StateNo != 5120
Trigger2 = (P2BodyDist X - (EnemyNear,Vel X * 3)) = [21, 80]
Trigger2 = Random < 100 * Var(59)

[State -3, EX杒搇旘塹対]
Type = ChangeState
Value = IfElse((PalNo % 6) != 0, 35000, 35170)
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(5) = 17 || (PalNo % 6) = 0	;旘塹対
TriggerAll = Var(6)	 || (PalNo % 6) = 0	;偘乕偠戝忎晇丠
TriggerAll = StateType != A
Trigger1 = (StateNo = [230,235]) || (StateNo = [250,255])	;抧忋僐儞儃嶰抜栚偐傜僉儍儞僙儖偑壜擻
Trigger1 = MoveHit
Trigger1 = Random < 100 * Var(59)
Trigger2 = Ctrl && Time > 0
Trigger2 = P2StateType = A
Trigger2 = P2MoveType != I
Trigger2 = P2BodyDist X = [0, 200]
Trigger2 = P2BodyDist Y = [-120, 0]
Trigger2 = Random < 70 * Var(59)

[State -3, 杒搇巆夨対]
Type = ChangeState
Value = IfElse((PalNo % 6) != 0, 35000, 35180)
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(5) = 18 || (PalNo % 6) = 0	;巆夨対
TriggerAll = Var(6)	 || (PalNo % 6) = 0	;偘乕偠戝忎晇丠
TriggerAll = StateType != A
Trigger1 = Ctrl && Time > 0
Trigger1 = P2StateType = L || P2StateNo = 5120
Trigger1 = P2BodyDist X = [10, 125]
Trigger1 = Random < 91 * Var(59)

[State -3, 揤攋妶嶦]
Type = ChangeState
Value = IfElse((PalNo % 6) != 0, 35000, 35190)
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(5) = 19 || (PalNo % 6) = 0	;揤攋妶嶦
TriggerAll = Var(6)	 || (PalNo % 6) = 0	;偘乕偠戝忎晇丠
TriggerAll = StateType != A
Trigger1 = (StateNo = [230,235]) || (StateNo = [250,255])	;抧忋僐儞儃嶰抜栚偐傜僉儍儞僙儖偑壜擻
Trigger1 = MoveHit
Trigger1 = Random < 100 * Var(59)
Trigger2 = Ctrl
Trigger2 = P2MoveType = H && P2StateNo != [120, 159]
Trigger2 = P2StateType != A && P2StateType != L
Trigger2 = Random < 60 * Var(59)

;---------------------------------------------------------------------------
;傑偡偨乕偡傁乕偔Lv2
[State -3, MasterSparkLv2]
Type = ChangeState
Value = 3005
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Power >= 1000
TriggerAll = Var(5) = -1;MAX忬懺
TriggerAll = !Var(39)
Trigger1 = (Stateno = 215)
Trigger1 = moveHit
Trigger1 = Random < 40 * Var(59)

;---------------------------------------------------------------------------
;傑偡偨乕偡傁乕偔Lv1
[State -3, MasterSpark]
Type = ChangeState
Value = 3000
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Power >= 1000
TriggerAll = Var(5) != -1
TriggerAll = StateType = S && Ctrl
TriggerAll = !Var(39)
Trigger1 = P2StateType = A && P2MoveType = H
Trigger1 = P2BodyDist X > 100
Trigger1 = (P2BodyDist Y + (EnemyNear,Vel Y * 40 + EnemyNear,Const(movement.yaccel) * 820)*(P2StateType=A && EnemyNear,Vel Y!=0)) = [-74, -5]
Trigger1 = Power > 1700
Trigger1 = IfElse((Life > 300), 1 ,(Power < 2700))
Trigger1 = Random < 20 * Var(59)
Trigger2 = (P2BodyDist Y + (EnemyNear,Vel Y * 40 + EnemyNear,Const(movement.yaccel) * 820)*(P2StateType=A && EnemyNear,Vel Y!=0)) = [-74, -5]
Trigger2 = P2MoveType = A
Trigger2 = Random < 45 * Var(59)

;---------------------------------------------------------------------------
;僽儗僀僕儞僌僗僞乕
[State -3, ITEM-2]
Type = ChangeState
Value = 3045
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Power >= 1000
TriggerAll = Var(5) = -1;MAX忬懺
;MAX僎乕僕愗傟偦偆偵側偭偨傜敪摦
Trigger1 = StateType != C;棫偪忬懺偐嬻拞忬懺
Trigger1 = Ctrl
Trigger1 = Var(6) < 300
Trigger1 = Random < 100 * Var(59)
;獯偐傜敪摦
Trigger2 = (Stateno = 245) || (Stateno = 261);僷儚乕僗傿乕僾丂or丂儅僗傿僽儃僨傿
Trigger2 = movehit
Trigger2 = Var(41) < 7
Trigger2 = Random < 40 * Var(59)
;偊傝偁傞搑拞偐傜敪摦
Trigger3 = Power < 2000
Trigger3 = (Stateno = 615) || (Stateno = 630)
Trigger3 = MoveHit
Trigger3 = Random < 40 * Var(59)

;---------------------------------------------------------------------------
;僗僞乕僟僗僩儗償傽儕僄
[State -3, HOUKISP]
Type = ChangeState
Value = 3040
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Power >= 1000
TriggerAll = Var(5) != -1;MAX忬懺偠傖側偄
Trigger1 = StateType != C;棫偪忬懺偐嬻拞忬懺
Trigger1 = Ctrl
Trigger1 = Power > 1700
Trigger1 = IfElse((Life > 300), 1 ,(Power < 2700))
Trigger1 = P2BodyDist X = [0,60]
Trigger1 = P2BodyDist Y = [-40,-10]
Trigger1 = P2StateType != L
Trigger1 = Random < 3 * Var(59)
;側偤偐僸僢僾偐傜宷偑傞
Trigger2 =  (Stateno = 261)
Trigger2 = moveHit
Trigger2 = Power > 1700
Trigger2 = IfElse((Life > 300), 1 ,(Power < 2700))
Trigger2 = Random < 30 * Var(59)

;---------------------------------------------------------------------------
;俵俙倃傾僋僙儖僼僅乕儉
[State -3, AXEL]
Type = ChangeState
Value = 30410
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Power >= 1000
TriggerAll = Var(5) = -1;MAX忬懺
TriggerAll = StateType = S && Ctrl
TriggerAll = Life < 600 || P2Life > 600
TriggerAll = Random < 3 * Var(59)
Trigger1 = P2StateType = L || (P2StateType = A && P2MoveType = H)
Trigger2 = P2BodyDist X > 200

;---------------------------------------------------------------------------
;傾僋僙儖僼僅乕儉
[State -3, AXEL]
Type = ChangeState
Value = 30400
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Power >= 1000
TriggerAll = Var(5) != -1;MAX忬懺偠傖側偄
TriggerAll = StateType = S && Ctrl
Trigger1 = Power > 2000
Trigger1 = IfElse((Life > 300), 1 ,(Power < 2700))
Trigger1 = P2StateType != L && P2MoveType = H && P2StateNo != [120, 155]
Trigger1 = P2BodyDist Y = [-30, 0]
Trigger1 = EnemyNear,Vel Y = [0, 2]
Trigger1 = Random < 80 * Var(59)
Trigger2 = Var(5) = -2	;傾僋僙儖忬懺
Trigger2 = Var(6) < 500
Trigger2 = P2StateType != A
Trigger2 = Random < 100 * Var(59)

;---------------------------------------------------------------------------
;僶僞僼儔僀僗僩乕儉俵俙倃
[State -3, HOUKISP]
Type = ChangeState
Value = 3035
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Power >= 1000
TriggerAll = Var(5) = -1;MAX忬懺
Trigger1 = StateType = S && Ctrl
Trigger1 = P2BodyDist X = [0,50]
Trigger1 = P2BodyDist Y = [-40,0]
Trigger1 = Life <= 200 && P2Life - Life > 400
Trigger1 = Random < 70 * Var(59)

;---------------------------------------------------------------------------
;僶僞僼儔僀僗僩乕儉
[State -3, HOUKISP]
Type = ChangeState
Value = 3030
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Power >= 1000
TriggerAll = Var(5) != -1;MAX忬懺偠傖側偄
Trigger1 = (Stateno = 245) ;僷儚乕僗傿乕僾
Trigger1 = movehit
Trigger1 = Power > 1700
Trigger1 = IfElse((Life > 300), 1 ,(Power < 2700))
Trigger1 = Var(41) < 7
Trigger1 = P2BodyDist X = [0,120]
Trigger1 = 70 * Var(59)

;---------------------------------------------------------------------------
;儅僗僞乕僽儗乕僪
[State -3, MasterBlade]
Type = ChangeState
Value = 3090
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(30) = 0;傾儕僗僞僀儅乕偑侽
TriggerAll = Var(32) = 0;僷僠儏儕乕僞僀儅乕偑侽
TriggerAll = !NumHelper(1202)
TriggerAll = !NumHelper(3050)
TriggerAll = !NumHelper(3060)
TriggerAll = Power >= 3000
TriggerAll = Var(5) = 0;僲乕儅儖
Trigger1 = StateType = S && Ctrl
Trigger1 = P2MoveType = A
Trigger1 = Life > 500
Trigger1 = Random < 40 * Var(59)

;---------------------------------------------------------------------------
;儅儕僗朇
[State -3, MaliceCannon]
Type = ChangeState
Value = 3050
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(30) = 0;傾儕僗僞僀儅乕偑侽
TriggerAll = !NumHelper(1202)
TriggerAll = !NumHelper(3050)
TriggerAll = Power >= 2000
TriggerAll = Var(5) = 0;僲乕儅儖
Trigger1 = StateType = S && Ctrl
Trigger1 = P2StateType != A && P2StateType != L
Trigger1 = P2MoveType = H && P2StateNo != [120,155]
Trigger1 = Random < 60 * Var(59)*Var(59)

;---------------------------------------------------------------------------
;僲儞僨傿儗僋僔儑僫儖
[State -3, NonDirLazer]
Type = ChangeState
Value = 3060
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(32) = 0;僷僠儏儕乕僞僀儅乕偑侽
TriggerAll = !NumHelper(3060)
TriggerAll = Power >= 2000
TriggerAll = Var(5) = 0;僲乕儅儖
Trigger1 = StateType = S && Ctrl
Trigger1 = (P2BodyDist X > 150) || (P2BodyDist Y < -150)
Trigger1 = P2MoveType = H
Trigger1 = Random < 8 * Var(59)
Trigger2 = TeamMode = Simul
Trigger2 = (P2BodyDist X > 100) || (P2BodyDist Y < -100)
Trigger2 = Random < 20 * Var(59)

;===========================================================================
;---------------------------------------------------------------------------
;堿梲僗僩儔僀僋
[State -3, RockBAllA]
Type = ChangeState
Value = 1020
TriggerAll = Var(59) && RoundState = 2
TriggerAll = !NumHelper(1020)
TriggerAll = Enemy,NumProj = 0 
TriggerAll = NumHelper(99998)
TriggerAll = Enemy,NumHelper = Helper(99998),Var(0)
TriggerAll = P2MoveType != A
Trigger1 = StateType != A && Ctrl
Trigger1 = P2BodyDist X > 170
Trigger1 = Random < 10 * Var(59)

[State -3, RockBAllB]
Type = ChangeState
Value = 1021
TriggerAll = Var(59) && RoundState = 2
TriggerAll = !NumHelper(1020)
TriggerAll = Enemy,NumProj = 0 
TriggerAll = NumHelper(99998)
TriggerAll = Enemy,NumHelper = Helper(99998),Var(0)
TriggerAll = P2MoveType != A
Trigger1 = StateType != A && Ctrl
Trigger1 = P2BodyDist X > 220
Trigger1 = Random < 20 * Var(59)

;---------------------------------------------------------------------------
;儅僗傿僽僽儖乕儉
[State -3, 儅僗僥傿僽獯]
Type = ChangeState
Value = 240
TriggerAll = Var(59) && RoundState = 2
TriggerAll = IfElse((Var(59) > 10), 1, (EnemyNear,Time > 20 + (Random % 30)))
TriggerAll = IfElse((Var(5) = -2), (Random < 80 * Var(59)), (Random < 10 * Var(59)))
TriggerAll = StateType != A && Ctrl
TriggerAll = P2BodyDist X > 76 || P2BodyDist Y < -63
TriggerAll = NumHelper(99998)
TriggerAll = Helper(99998),Var(11) != 35400
Trigger1 = Time > 0
Trigger1 = P2StateType = A
Trigger1 = (P2BodyDist X - (EnemyNear,Vel X * 21)) = [-29, 96]
Trigger1 = (P2BodyDist Y + (EnemyNear,Vel Y * 21 + EnemyNear,Const(movement.yaccel) * 221)*(P2StateType=A && EnemyNear,Vel Y!=0)) = [-104, -48]
Trigger2 = Time > 0
Trigger2 = P2StateType != L && P2MoveType = H && P2StateNo != 5120 && P2StateNo != [120, 155]
Trigger2 = (P2BodyDist X - (EnemyNear,Vel X * 23)) = [58, 120]
Trigger2 = (P2BodyDist Y + (EnemyNear,Vel Y * 23 + EnemyNear,Const(movement.yaccel) * 276)*(P2StateType=A && EnemyNear,Vel Y!=0)) = [-83, 0]

;---------------------------------------------------------------------------
;僷儚乕僗傿乕僾
[State -3, Power獯]
Type = ChangeState
Value = 245
TriggerAll = Var(59) && RoundState = 2
TriggerAll = IfElse((Var(59) > 10), 1, (EnemyNear,Time > 20 + (Random % 30)))
TriggerAll = StateType != A && Ctrl
TriggerAll = P2StateType != A && P2StateType != L
TriggerAll = P2BodyDist X > 143
TriggerAll = (P2BodyDist X - (EnemyNear,Vel X * 24)) = [-29, 143]
TriggerAll = (P2BodyDist Y + (EnemyNear,Vel Y * 24 + EnemyNear,Const(movement.yaccel) * 300)*(P2StateType=A && EnemyNear,Vel Y!=0)) = [-48, 0]
TriggerAll = Random < 20 * Var(59)
Trigger1 = Time > 0
Trigger1 = P2StateNo != 5120

;---------------------------------------------------------------------------
;杒搇旘塹対A
[State -1, HIEIKEN_A]
type = ChangeState
value = 1050
triggerall = var(59) && RoundState = 2
triggerall = var(5) = [16,19];杒搇憰旛
trigger1 = ctrl
Trigger1 = P2MoveType != I
Trigger1 = IfElse((Var(59) > 10), 1, IfElse(P2MoveType = A, (EnemyNear,Time > 20 + (Random % 30)), 1))
Trigger1 = P2BodyDist X = [0, 80]
Trigger1 = P2BodyDist Y = [-120, -20]
Trigger1 = Random < 40 * Var(59)
;抧忋僐儞儃嶰抜栚偐傜僉儍儞僙儖偑壜擻
trigger2 =  (stateno = [230,235]) || (stateno = [250,255])
trigger2 = movehit
Trigger2 = Random < 100 * Var(59)

;---------------------------------------------------------------------------
;杒搇旘塹対B
[State -1, HIEIKEN_B]
type = ChangeState
value = 1052
triggerall = var(59) && RoundState = 2
triggerall = var(5) = [16,19];杒搇憰旛
trigger1 = ctrl
Trigger1 = P2StateType != A
Trigger1 = P2MoveType != I
Trigger1 = P2BodyDist X > 180
Trigger1 = Random < 8 * Var(59)

;---------------------------------------------------------------------------
;偟傚乕傝傘乕偗傫庛
[State -3, RockUpperA]
Type = ChangeState
Value = 1010
TriggerAll = Var(59) && RoundState = 2
TriggerAll = StateType != A && Ctrl
TriggerAll = IfElse((Var(59) > 10), 1, (EnemyNear,Time > 20 + (Random % 30)))
Trigger1 = P2BodyDist X = [0,40]
Trigger1 = P2BodyDist Y = [-80,-20]
Trigger1 = P2MoveType = A
Trigger1 = Random < 40 * Var(59)
;Trigger2 = P2BodyDist X = [0,30]
;Trigger2 = P2MoveType = A
;Trigger2 = Random < 40 * Var(59)

;---------------------------------------------------------------------------
;偟傚乕傝傘乕偗傫嫮
[State -3, RockUpperB]
Type = ChangeState
Value = 1011
TriggerAll = Var(59) && RoundState = 2
TriggerAll = StateType != A && Ctrl
TriggerAll = IfElse((Var(59) > 10), 1, (EnemyNear,Time > 20 + (Random % 30)))
Trigger1 = P2BodyDist X = [0,60]
Trigger1 = P2BodyDist Y = [-120,-20]
Trigger1 = P2MoveType = A
Trigger1 = Random < 40 * Var(59)
Trigger2 = P2MoveType = A
Trigger2 = (P2BodyDist X - (EnemyNear,Vel X * 7)) < 50
Trigger2 = Random < 40 * Var(59)

;---------------------------------------------------------------------------
;偝偄偙傒偝偄傞
[State -3, PsycoMissile]
Type = ChangeState
Value = 1000
TriggerAll = Var(59) && RoundState = 2
TriggerAll = !NumHelper(3011);儈僒僀儖偑巆偭偰偄傞偲偒偼楢幩偱偒傑偦傫
TriggerAll = !Var(39)	;x儃僞儞傪巊偆媄偩偐傜
TriggerAll = (Var(5) != -1 && Power < 3000) || (Var(5) = -1 && Power < 2000)
Trigger1 = StateType = A;嬻拞梡昁嶦媄
Trigger1 = Ctrl
Trigger1 = P2BodyDist X = [50,130]
Trigger1 = P2BodyDist Y = [60,120]
Trigger1 = P2StateType = S || P2StateType = C
Trigger1 = P2MoveType = A
Trigger1 = Random < 20 * Var(59)

;===========================================================================
;---------------------------------------------------------------------------
;僯儏乕僩儔儖僉僢僋
[State -3, Stand Kick]
Type = ChangeState
Value = 210
TriggerAll = Var(59) && RoundState = 2
TriggerAll = P2MoveType != A
Trigger1 = (StateNo = 200) && time > 5
Trigger1 = MoveContact
Trigger1 = P2BodyDist X = [0,35]
Trigger1 = Random < 50 * Var(59)
Trigger2 = StateType = S && Ctrl
Trigger2 = (P2StateType = S) || (P2StateType = C)
Trigger2 = P2MoveType != H
Trigger2 = P2BodyDist X = [0,40]
Trigger2 = Random < 50 * Var(59)
Trigger3 = (Stateno = 230) && time > 6
Trigger3 = P2BodyDist X = [0,45]
Trigger3 = Random < 80 * Var(59)

;---------------------------------------------------------------------------
;棫偪僷儞僠
;[State -3, Stand Light Punch]
[State -3, Stand Punch]
Type = ChangeState
Value = 200
TriggerAll = Var(59) && RoundState = 2
TriggerAll = StateType = S
TriggerAll = Ctrl
Trigger1 = P2BodyDist X = [0,35]
Trigger1 = (P2StateType = S) || (P2StateType = C)
Trigger1 = Random < 50 * Var(59)

;---------------------------------------------------------------------------
;210->僉僢僋
[State -3, Stand Air Kick]
Type = ChangeState
Value = 255
TriggerAll = Var(59) && RoundState = 2
Trigger1 = StateNo = 210 && MoveContact
Trigger1 = P2BodyDist X = [0,25]
Trigger1 = Random < 50 * Var(59)

;---------------------------------------------------------------------------
;210->僷儞僠
[State -3, Stand Punch 4]
Type = ChangeState
Value = 250
TriggerAll = Var(59) && RoundState = 2
Trigger1 = StateNo = 210 && MoveContact
Trigger1 = P2BodyDist X = [0,45]
Trigger1 = Random < 100 * Var(59)

;---------------------------------------------------------------------------
;墶僉僢僋//僄儕傾儖敪摦媄
[State -3, Eriak Kick]
Type = ChangeState
Value = 215
TriggerAll = Var(59) && RoundState = 2
Trigger1 = (StateNo = 250) || (StateNo = 255)
Trigger1 = MoveHit
Trigger1 = P2BodyDist X = [0,45]
Trigger1 = Random < 100 * Var(59)
Trigger2 = StateNo = 100	;慜僟僢僔儏拞偵擖傟偨傜敪摦
Trigger2 = P2BodyDist X = [0,49]
Trigger2 = (P2StateType = S) || (P2StateType = C)
Trigger2 = !NumProjID(35030)
Trigger2 = P2MoveType != H

;---------------------------------------------------------------------------
;僸僢僾
[State -3, HIP Stand]
Type = ChangeState
Value = 260
TriggerAll = Var(59) && RoundState = 2
;Trigger1 = StateType = S
;Trigger1 = Ctrl
Trigger1 = (StateNo = 250) || (StateNo = 255)
Trigger1 = MoveHit
Trigger1 = Random < 100 * Var(59)

;---------------------------------------------------------------------------
;僷儞僠擇抜栚
[State -3, Stand Punch 2]
Type = ChangeState
Value = 205
TriggerAll = Var(59) && RoundState = 2
Trigger1 = (StateNo = 200) && MoveContact
Trigger1 = Random < 50 * Var(59)

;---------------------------------------------------------------------------
;僷儞僠嶰抜栚
[State -3, Stand Punch 3]
Type = ChangeState
Value = 230
TriggerAll = Var(59) && RoundState = 2
Trigger1 = (StateNo = 205) && MoveContact
Trigger1 = P2BodyDist X = [0,42]
Trigger1 = Random < 50 * Var(59)

;---------------------------------------------------------------------------
;205->僉僢僋
[State -3, Stand Drop Kick]
Type = ChangeState
Value = 235
TriggerAll = Var(59) && RoundState = 2
Trigger1 = (StateNo = 205) && MoveContact
Trigger1 = Random < 100 * Var(59)

;---------------------------------------------------------------------------
;棫偪僶僗僞乕
[State -3, Buster]
Type = ChangeState
Value = 220
TriggerAll = Var(59) && RoundState = 2
TriggerAll = NumProjID(10053) < 3
TriggerAll = Enemy,NumProj = 0 
TriggerAll = NumHelper(99998) > 0
TriggerAll = Enemy,NumHelper = Helper(99998),Var(0)
TriggerAll = P2MoveType != A
Trigger1 = StateType = S && Ctrl && Var(1) < 250
Trigger1 = NumProjID(10053) < 1
Trigger1 = P2BodyDist X > 180 && P2BodyDist Y > -40
Trigger1 = Random < 60 * Var(59)
Trigger2 = StateType = S && Ctrl && Var(1) >= 250
Trigger2 = P2StateType = S && P2MoveType != H
Trigger2 = P2BodyDist X > 20 && P2BodyDist Y = [-20,0]
Trigger2 = Random < 60 * Var(59)
Trigger3 = (Stateno = 200) || (Stateno = 205) || (Stateno = 230) || (StateNo = 235) || (StateNo =  250) || (StateNo =  255)
Trigger3 = MoveContact
Trigger3 = P2StateType = C
Trigger3 = Random < 100 * Var(59)
Trigger4 = (Stateno = 200) || (Stateno = 205) || (Stateno = 230) || (StateNo = 235) || (StateNo =  250) || (StateNo =  255)
Trigger4 = MoveHit
Trigger4 = P2StateType = C
Trigger4 = Var(1) >= 250
Trigger4 = P2BodyDist X > 20
Trigger4 = Random < 100 * Var(59)

[State -3, Buster]
Type = ChangeState
Value = 220
TriggerAll = Var(59) && RoundState = 2
TriggerAll = NumProjID(10053) < 3
TriggerAll = StateType = S && Ctrl
Trigger1 = TeamMode = Simul && NumPartner = 1
Trigger1 = Partner,Alive
Trigger1 = P2BodyDist X > 120 && P2BodyDist Y > -40
Trigger1 = IfElse((Var(1) >= 250), (Random < 80 * Var(59)), (Random < 30 * Var(59)))

;---------------------------------------------------------------------------
;偟傖偑傒庛僷儞僠
[State -3, Crouching Light Punch]
Type = ChangeState
Value = 400
TriggerAll = Var(59) && RoundState = 2
Trigger1 = StateType = C
Trigger1 = Ctrl
Trigger1 = P2BodyDist X = [0,30]
Trigger1 = P2StateType = S
Trigger1 = Random < 50 * Var(59)

;---------------------------------------------------------------------------
;偟傖偑傒僉僢僋
[State -3, Crouching Strong Punch]
Type = ChangeState
Value = 410
TriggerAll = Var(59) && RoundState = 2
Trigger1 = StateType = C && Ctrl
Trigger1 = P2StateType = S
Trigger1 = P2BodyDist X = [0,50]
Trigger1 = Random < 20 * Var(59)
Trigger2 = StateNo = 400
Trigger2 = MoveContact && Time > 5
Trigger2 = Random < 100 * Var(59)

;---------------------------------------------------------------------------
;偟傖偑傒僶僗僞乕
[State -3, Crouching Buster]
Type = ChangeState
Value = 420
TriggerAll = Var(59) && RoundState = 2
TriggerAll = NumProjID(10053) < 3
TriggerAll = Enemy,NumProj = 0 
TriggerAll = NumHelper(99998) > 0
TriggerAll = Enemy,NumHelper = Helper(99998),Var(0)
TriggerAll = P2MoveType != A
Trigger1 = StateType = C
Trigger1 = Ctrl
Trigger1 = Var(1) < 250
Trigger1 = NumProjID(10053) < 1
Trigger1 = P2BodyDist X > 180
Trigger1 = P2BodyDist Y > -40
Trigger1 = Random < 40 * Var(59)
Trigger2 = StateType = C
Trigger2 = Ctrl
Trigger2 = Var(1) >= 250
Trigger2 = P2StateType = S
Trigger2 = P2MoveType != H
Trigger2 = P2BodyDist X > 20
Trigger2 = P2BodyDist Y = [-20,0]
Trigger2 = Random < 60 * Var(59)
Trigger3 = (Stateno = 200) || (Stateno = 210) || (Stateno = 230) || (Stateno = 400)
Trigger3 = MoveHit
Trigger3 = P2StateType = S
Trigger3 = Var(1) >= 250
Trigger3 = P2BodyDist X > 20
Trigger3 = Random < 100 * Var(59)
Trigger4 = (Stateno = 200) || (Stateno = 210) || (Stateno = 230) || (Stateno = 240) || (StateNo =  240) || (Stateno = 400)
Trigger4 = MoveContact
Trigger4 = Var(1) < 250
Trigger4 = Random < 100 * Var(59)
Trigger5 = StateNo = 410
Trigger5 = Var(5) != 15
Trigger5 = MoveContact
Trigger5 = Var(1) < 250
Trigger5 = Random < 100 * Var(59)

;===========================================================================
;---------------------------------------------------------------------------
;嬻拞庛僷儞僠
[State -3, Jump Low Punch]
Type = ChangeState
Value = 605
TriggerAll = Var(59) && RoundState = 2
TriggerAll = !Var(0)
Trigger1 = StateType = A
Trigger1 = Ctrl
Trigger1 = P2BodyDist X = [0,23]
Trigger1 = P2BodyDist Y = [-40,60]
Trigger1 = Random < 100 * Var(59)

;---------------------------------------------------------------------------
;嬻拞庛僉僢僋
[State -3, Jump Kick]
Type = ChangeState
Value = 610
TriggerAll = Var(59) && RoundState = 2
TriggerAll = !Var(0)
Trigger1 = StateNo = 605 && MoveContact
Trigger1 = Random < 100 * Var(59)
Trigger2 = StateType = A
Trigger2 = Ctrl
Trigger2 = P2StateType != A
Trigger2 = P2BodyDist X = [-20,60]
Trigger2 = P2BodyDist Y = [0,110]

;---------------------------------------------------------------------------
;嬻拞拞僷儞僠丂彾寕
[State -3, Jump Mid Punch]
Type = ChangeState
Value = 630
TriggerAll = Var(59) && RoundState = 2
Trigger1 = StateNo = 605 && MoveContact	;庛僷儞僠偐傜宷偑傞
Trigger1 = Random < 1000 - Var(59) * 80
Trigger2 = StateNo = 610 && MoveContact	;庛僉僢僋拞偱
Trigger2 = P2BodyDist Y = [-30,-10]
Trigger2 = Random < 100 * Var(59)

;---------------------------------------------------------------------------
;僪儘僢僾僉僢僋
[State -3, Jump Mid Kick]
Type = ChangeState
Value = 615
TriggerAll = Var(59) && RoundState = 2
Trigger1 = StateNo = 610 && MoveContact
Trigger1 = Random < 100 * Var(59)
Trigger2 = StateNo = 630 && MoveContact
Trigger2 = Random < 100 * Var(59)

;---------------------------------------------------------------------------
;嬻拞嫮僷儞僠丂;嬻拞嫮僷儞僠 扨敪娷傔偨偄
[State -3, Jump Pow Punch]
Type = ChangeState
Value = 600
TriggerAll = Var(59) && RoundState = 2
;TriggerAll = P2BodyDist Y = [-20,20]
Trigger1 = (StateNo = 630) && MoveContact
Trigger1 = Random < 1000 - Var(59) * 80
Trigger2 = (StateNo = 615) && MoveContact
Trigger2 = Random < 90 * Var(59)

;---------------------------------------------------------------------------
;僄儕傾儖僠儍乕僕僶僗僞乕僼傿僯僢僔儏
[State -3, ChargeFire AIRCOMBO FINISH]
Type = ChangeState
Value = 626
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(1) >= 100
TriggerAll = !Var(0) ;Var0乮僄儕傾儖傆偭偲偽偟拞乯偑棫偭偰側偄帪偱側偄偲弌偣側偄
Trigger1 = (StateNo = 615) && MoveHit
Trigger1 = P2StateType = A
Trigger1 = P2BodyDist Y = [-50,50]
Trigger1 = Random < 100 * Var(59)

;---------------------------------------------------------------------------
;嬻拞嫮僉僢僋
[State -3, Jump Strong Kick]
Type = ChangeState
Value = 640
TriggerAll = Var(59) && RoundState = 2
TriggerAll = StateType = A
Trigger1 = (StateNo = 615) && MoveContact
Trigger1 = Random  < 100 * Var(59)

;---------------------------------------------------------------------------
;嬻拞僶僗僞乕
[State -3, Jump Shot]
Type = ChangeState
Value = 620
TriggerAll = Var(59) && RoundState = 2
TriggerAll = !Var(0) ;Var0乮僄儕傾儖傆偭偲偽偟拞乯偑棫偭偰側偄帪偱側偄偲弌偣側偄
TriggerAll = StateNo != 460
TriggerAll = NumProjID(10053) < 3
Trigger1 = StateType = A
Trigger1 = Ctrl
Trigger1 = P2StateType = A
Trigger1 = P2BodyDist X > 120
Trigger1 = P2BodyDist Y = [-10,10]
Trigger1 = Random < 20 * Var(59)
Trigger2 = StateType = A
Trigger2 = Ctrl
Trigger2 = Pos Y > 70
Trigger2 = P2MoveType = H
Trigger2 = P2BodyDist X > 23
Trigger2 = P2BodyDist Y = [-20,20]
Trigger2 = Random < 50 * Var(59)

;---------------------------------------------------------------------------
;捠忢偺嬻拞僠儍乕僕
[State -3, ChargeFire sora]
Type = ChangeState
Value = 620
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Var(1) >= 30
TriggerAll = !NumProjID(10051);僠儍乕僕僶僗僞乕偑旘傫偱側偄帪
TriggerAll = StateNo != 460
TriggerAll = (StateNo != 630)
TriggerAll = (StateNo != 615)
Trigger1 = Ctrl
Trigger1 = StateType = A
Trigger1 = Var(1) >= 250
Trigger1 = P2StateType = A
Trigger1 = P2BodyDist X > 120
Trigger1 = P2BodyDist Y = [-20,0]
Trigger1 = Random < 20 * Var(59)
Trigger2 = StateType = A
Trigger2 = Ctrl
Trigger2 = Pos Y > 70
Trigger2 = P2MoveType = H
Trigger2 = P2BodyDist X > 23
Trigger2 = P2BodyDist Y = [-20,20]
Trigger2 = Random < 50 * Var(59)

;---------------------------------------------------------------------------
;墖岇峌寕
;傾儕僗墖岇
[State -1, Alice]
type = ChangeState
value = 1200
triggerall = var(59) && RoundState = 2
triggerall = var(30) = 0;傾儕僗僞僀儅乕偑侽 侽埲奜偺応崌偄偐側傞応崌傕寕偰側偄
triggerall = !NumHelper(1202)
trigger1 = statetype != A && ctrl
Trigger1 = P2StateType != A
Trigger1 = P2BodyDist X > 200
Trigger1 = Random < 10 * Var(59)

;僗僺儕僥傿傾墖岇
[State -1, Spilitia]
type = ChangeState
value = 1210
triggerall = var(59) && RoundState = 2
triggerall = var(31) = 0;僥傿傾僞僀儅乕偑侽
trigger1 = statetype != A && ctrl
Trigger1 = P2StateType != A
Trigger1 = P2BodyDist X > 200
Trigger1 = Random < 20 * Var(59)

;---------------------------------------------------------------------------
;恀嬻搳偘
;梾惗栧憰旛帪敪摦
[State -3, Kung Fu Throw]
Type = ChangeState
Value = 65080
TriggerAll = Var(59) && RoundState = 2
TriggerAll = StateType = S
TriggerAll = Ctrl
TriggerAll = Var(5) = [7,8];恀嬻搳偘憰旛
TriggerAll = Random < 40 * Var(59)
Trigger1 = StateNo != 100
Trigger1 = P2BodyDist X = [0,60]
Trigger1 = (P2StateType = S) || (P2StateType = C)
Trigger1 = P2MoveType != H

;---------------------------------------------------------------------------
;楇嫍棧僑僢僪僾儗僗
;塣憲憰旛帪敪摦
[State -3, Kung Fu Throw]
Type = ChangeState
Value = 65150
TriggerAll = Var(59) && RoundState = 2
TriggerAll = StateType = S
TriggerAll = Var(5) = 15;塣憲憰旛
TriggerAll = Stateno != 100
Trigger1 = Ctrl
Trigger1 = P2BodyDist X <= 50
Trigger1 = P2BodyDist Y = [-30,0]
Trigger1 = P2MoveType != H
Trigger1 = Random < 40 * Var(59)
Trigger2 = Ctrl
Trigger2 = Stateno != 100
Trigger2 = P2BodyDist X <= 30
Trigger2 = P2BodyDist Y = [0,-30]
Trigger2 = P2StateType = A
Trigger2 = P2MoveType = H;怘傜偄忬懺丒嬻拞棊壓偟偰傞帪
Trigger2 = Random < 60 * Var(59)

;===========================================================================
;---------------------------------------------------------------------------
;搳偘
[State -3, Nage]
Type = ChangeState
Value = 800
TriggerAll = Var(59) && RoundState = 2
TriggerAll = StateType = S
TriggerAll = Ctrl
TriggerAll = Random < 40 * Var(59)
Trigger1 = StateNo != 100
Trigger1 = P2BodyDist X = [0,10]
Trigger1 = (P2StateType = S) || (P2StateType = C)
Trigger1 = P2MoveType != H

;---------------------------------------------------------------------------
;僎僢僩搳偘
[State -3, Get Nage]
Type = ChangeState
Value = 805
TriggerAll = Var(59) && RoundState = 2
TriggerAll = StateType = S
TriggerAll = Ctrl
TriggerAll = Var(5) = 0
TriggerAll = Random < 40 * Var(59)
Trigger1 = StateNo != 100
Trigger1 = P2BodyDist X = [0,60]
Trigger1 = (P2StateType = S) || (P2StateType = C)
Trigger1 = P2MoveType != H

;---------------------------------------------------------------------------
;傁傢乕俵俙倃
[State -3, PowerMAX]
Type = ChangeState
Value = 860
TriggerAll = Var(59) && RoundState = 2
TriggerAll = Power >= 1000 ;僷儚乕偑侾侽侽侽埲忋
TriggerAll = Var(5) = 0;尰嵼丄壗傕憰旛偟偰偄側偄仌俵俙倃偱側偄
TriggerAll = !Var(39)	;x儃僞儞傪巊偆媄偩偐傜
TriggerAll = StateType = S && Ctrl
TriggerAll = Vel X = 0
TriggerAll = Enemy,NumProj = 0 
TriggerAll = NumHelper(99998)
TriggerAll = Enemy,NumHelper = Helper(99998),Var(0)
TriggerAll = P2MoveType != A
Trigger1 = Life < 300	;傄傫偪
Trigger1 = Power >= 3000
Trigger1 = P2Life > 300	;晧偗偰傞丟丟
Trigger1 = P2BodyDist X > 200
Trigger1 = Random < 80 * Var(59)
Trigger2 = Power > 2000
Trigger2 = Life >= 100
Trigger2 = P2BodyDist X > 170
Trigger2 = Random < 60 * Var(59)

;僪儘乕僇乕僪両
[State -3, BATTLECARD]
Type = ChangeState
Value = 3503
TriggerAll = Var(59) && RoundState = 2 && (PalNo % 6) != 0
TriggerAll = Power >= 1000 ;僷儚乕偑侾侽侽侽埲忋
TriggerAll = Var(5) = 0;尰嵼丄壗傕憰旛偟偰偄側偄仌俵俙倃偱側偄
TriggerAll = StateType = S
TriggerAll = Ctrl
TriggerAll = Vel X = 0
TriggerAll = Enemy,NumProj = 0 
TriggerAll = NumHelper(99998)
TriggerAll = Enemy,NumHelper = Helper(99998),Var(0)
TriggerAll = P2MoveType != A
Trigger1 = Power > 1500
Trigger1 = IfElse((Life > 300), 1 ,(Power < 2700))
Trigger1 = Life >= 100
Trigger1 = P2BodyDist X > 170
Trigger1 = Random < 50 * Var(59)

;===========================================================================
;---------------------------------------------------------------------------
;僕儍儞僾
[State -3, 僟僢僔儏僕儍儞僾]
Type = ChangeState
Value = 40
TriggerAll = Var(59) && RoundState = 2
TriggerAll = time >= 10
Trigger1 = StateNo = 100
Trigger1 = P2BodyDist X = [140,180]
Trigger1 = P2StateType != A
Trigger1 = Random < 40 * Var(59)

[State -3, 僄儕傾儖僕儍儞僾]
Type = ChangeState
Value = 40
TriggerAll = Var(59) && RoundState = 2
TriggerAll = StateType != A
Trigger1 = StateNo = 215
Trigger1 = MoveHit
Trigger1 = Random < 80 * Var(59)

;===========================================================================
;---------------------------------------------------------------------------
;僟僢僔儏
[State -3, Run Fwd]
Type = ChangeState
Value = 100
TriggerAll = Var(59) && RoundState = 2
TriggerAll = StateType = S && Ctrl
Trigger1 = NumProjID(35030)	;愮擭娽
Trigger1 = P2MoveType = H
Trigger2 = BackEdgeBodyDist < 60
Trigger2 = P2MoveType != H
Trigger2 = P2BodyDist X < 30
Trigger2 = P2BodyDist Y < -120
Trigger2 = Random < 60 * Var(59)
;Trigger3 = Power < 1000
Trigger3 = P2StateType != A && P2StateType != L
Trigger3 = P2MoveType = H && P2StateNo != [120, 155]
Trigger3 = P2BodyDist X > 90
Trigger3 = Random < 10 * Var(59)*Var(59)
;Trigger4 = Power < 1000
Trigger4 = NumProjID(10053) || NumProjID(10050) || NumProjID(10051)
Trigger4 = P2BodyDist X > 160
Trigger4 = Random < 70 * Var(59)

;---------------------------------------------------------------------------
;屻戅僟僢僔儏
[State -3, Run Back]
Type = ChangeState
Value = 105
TriggerAll = Var(59) && RoundState = 2
TriggerAll = StateType = S && Ctrl
Trigger1 = BackEdgeBodyDist > 60
Trigger1 = Var(5) = 0
Trigger1 = Power >= 3000
Trigger1 = P2BodyDist X = [0,200]
Trigger1 = Random < 80 * Var(59)
Trigger2 = BackEdgeBodyDist > 60
Trigger2 = !NumProjID(10053) && !NumProjID(10050) && !NumProjID(10051)
Trigger2 = P2StateType != A && P2MoveType != H
Trigger2 = P2BodyDist X < 200
Trigger2 = Random < 70 * Var(59)
Trigger3 = BackEdgeBodyDist > 60
Trigger3 = P2StateType = L || P2StateNo = 5120
Trigger3 = Random < 60 * Var(59)
Trigger4 = Var(5) > 0
Trigger4 = Var(6) = 0
Trigger4 = P2BodyDist X < 200
Trigger4 = BackEdgeBodyDist > 60
Trigger4 = Random < 91 * Var(59)


;===========================================================================
;---------------------------------------------------------------------------
;嬞媫夞旔
[State -3, 慜旔偗]
Type = ChangeState
Value = 2200
TriggerAll = Var(59) && RoundState = 2
TriggerAll = StateType = S && Ctrl
Trigger1 = BackEdgeBodyDist < 50
Trigger1 = P2BodyDist X = [0, 50]
Trigger1 = P2MoveType != H
Trigger1 = Random < 10 * Var(59)*Var(59)

;---------------------------------------------------------------------------
[State -3, 屻旔偗]
Type = ChangeState
Value = 2250
TriggerAll = Var(59) && RoundState = 2
TriggerAll = StateType = S && Ctrl
TriggerAll = Random < 10 * Var(59)*Var(59)
TriggerAll = BackEdgeBodyDist > 50
Trigger1 = InGuardDist || P2MoveType = A || (P2BodyDist X < 40 && StateNo = 200 && !MoveContact)
Trigger1 = IfElse((Var(59) > 10), 1, (Time > (10 + (Random = [0,40]))))

;-------------------------------
;傾僪僶儞僔儞僌僈乕僪傕偳偒丅
;晛捠偺僈乕僪偱偡偱偵僄僼僃僋僩巊偭偰傞傫偱丄僈乕僪傾僯儊傪曄偊傞偙偲偱傢偐傝傗偡偔偡傞丅
[State -3,ADVGUARD ST]
Type = ChangeState
Value = 160;guard.cns偵徻嵶丅
TriggerAll = Var(59) && RoundState = 2
TriggerAll = StateType = S
TriggerAll = StateNo = [150,153];傑偀丄捠忢偱偁傟偽侾俆侽偵側傞傫偩傠偆偗偳
Trigger1 = P2BodyDist X < 100
Trigger1 = Random < 30 * Var(59)

[State -3,ADVGUARD CR]
Type = ChangeState
Value = 161;guard.cns偵徻嵶丅
TriggerAll = Var(59) && RoundState = 2
TriggerAll = StateType = C
TriggerAll = StateNo = [151,153];
Trigger1 = P2BodyDist X < 100
Trigger1 = Random < 30 * Var(59)

[State -3,ADVGUARD AIR]
Type = ChangeState
Value = 162;guard.cns偵徻嵶丅
TriggerAll = Var(59) && RoundState = 2
TriggerAll = StateType = A
TriggerAll = Random < 30 * Var(59)
Trigger1 = StateNo = 154;
Trigger1 = P2BodyDist X < 100
Trigger2 = StateNo = 154 && PrevStateNo != 162
Trigger2 = P2BodyDist X < 50
Trigger2 = Time < 15

;===========================================================================
;---------------------------------------------------------------------------
;挧敪
;乽僼儞丄柍懯側偁偑偒傪丒丒丒乿
[State -3, Taunt]
Type = ChangeState
Value = 195
TriggerAll = Var(59) && RoundState = 2
TriggerAll = StateType != A
TriggerAll = Ctrl
TriggerAll = TeamMode = Single
Trigger1 = P2BodyDist X > 140
Trigger1 = (Life - P2Life) > 700
Trigger1 = Random < (Life - P2Life - 700)

;===========================================================================
;---------------------------------------------------------------------------
;彑棙
[State -3, Win]
Type = ChangeState
Value = 99999
TriggerAll = Var(59) < -7 && Win
;堦晹彑棙億乕僘偱抳柦揑栤戣偑敪惗偡傞梊姶丅偡傒傑偣傫偑愝掕曄峏偟偰傑偡
;償僃僲儉杺棟嵐僼傿僯僢僔儏偲偐丄僥乕儗僢僥乕偲偐
;埲壓丄摿庩彑棙億乕僘偺悢偩偗捛壛偟偰偄偔曽恓偱
TriggerAll = var(5) != 3;償僃僲儉杺棟嵐
TriggerAll = Stateno != [70001,70099];僥乕儗僢僥乕
Trigger1 = StateType != A
Trigger1 = Ctrl

;===========================================================================
;---------------------------------------------------------------------------
;斈梡僿儖僷乕
[State -3, 僿儖僷乕彚姭]
type = Helper
Trigger1 = !NumHelper(99998)
Trigger1 = Var(59) != 0
Trigger1 = RoundState = [1, 2]
stateno = 99998
ID = 99998
Name = "AI Helper"
pos = 0,0
postype = p1
ownpal = 1
keyctrl = 1
persistent = 0
ignorehitpause = 0
pausemovetime = 99999999
supermovetime = 99999999

;===========================================================================
;---------------------------------------------------------------------------
;AI梡僗僥乕僩
;彑棙億乕僘
[StateDef 99999]
Type     = S
MoveType = I
Physics  = S
Ctrl     = 0
sprpriority = 6
Anim = 99999;傂傘偆丄偪偭偪偭偪
velset = 0,0

[State 99999, Voice]
type = playsnd
triggerall = var(40);儃僀僗俷俲
trigger1 = animelemTime(1) = 0
value = 195,0;傂傘偆
channel = 0;VC

[State 99999, Voice]
type = playsnd
triggerall = var(40);儃僀僗俷俲
trigger1 = animelemTime(3) = 0
trigger2 = animelemTime(4) = 0
trigger3 = animelemTime(5) = 0
trigger4 = animelemTime(6) = 0
trigger5 = animelemTime(7) = 0
trigger6 = animelemTime(8) = 0
value = 195,1;偪偭偪偭偪
channel = 0;VC

[State 99999, End]
type = ChangeState
trigger1 = animtime = 0;Time > 90
value = 0
ctrl = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;AI梡僿儖僷乕僗僥乕僩
;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;AI梡曗彆僿儖僷乕
;============================================================================
;AI峴摦惂屼
; Var(11) : 慜夞偺峌寕僗僥乕僩
; Var(12) : 慜乆夞偺峌寕僗僥乕僩

;僈乕僪晄擻媄婰壇梡
; Var(46) : Pause敾暿梡
; Var(47) : 僈乕僪偟偰偄傞or僈乕僪峴摦庢傟側偄
; Var(48) : 妎偊偨僈乕晄峌寕傪旔偗偨偐
; Var(49) : 憡庤偺Plojectile悢
; Var(50) : 憡庤偺僿儖僷乕悢
; Var(51) : 僿儖僷乕峌寕敾抐
; Var(52) : 憡庤偺嵟怴偺捠忢峌寕
; Var(53) : 憡庤偺嵟怴偺搳偘峌寕
; Var(54) : 憡庤偺嵟怴偺旘傃摴嬶峌寕
; Var(55) : 憡庤偺嵟怴偺僿儖僷乕峌寕
; Var(56) : 憡庤偺僈乕僪晄擻媄偦偺侾
; Var(57) : 憡庤偺僈乕僪晄擻媄偦偺俀
; Var(58) : 憡庤偺僈乕僪晄擻媄偦偺俁
; Var(59) : 憡庤偺僈乕僪晄擻媄偦偺係

[StateDef 99998]
physics  = N
sprpriority = -1
movehitpersist = 1
Ctrl = 0

[State 99998, 徚偡]
type = DestroySelf
trigger1 = RoundState = [3, 4]

;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;憡庤僿儖僷乕悢傪悢偊傞
;----------------------------------------------------------------------------
;捠忢帪偺憡庤偺僿儖僷乕悢傪婰壇
[State 99998, Enemy,NumHelper]
Type = VarSet
Trigger1 = EnemyNear,StateNo != Var(2)
Trigger1 = Var(1) = 0
Trigger2 = Enemy,NumHelper < Var(0)
Trigger3 = RoundState != 2
V = 0
Value = Enemy,NumHelper

;捠忢帪岆擣杊巭僞僀儅乕
[State 99998, EnemyHelperTimer]
Type = VarSet
Trigger1 = EnemyNear,StateNo = Var(2)
V = 1
Value = 120

[State 99998, EnemyHelperTimer]
Type = VarAdd
Trigger1 = EnemyNear,StateNo != Var(2)
Trigger1 = Var(1) > 0
V = 1
Value = -1

;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;億乕僘忬懺敾暿梡
;----------------------------------------------------------------------------
;杮懱偺僗僥乕僩僞僀儉偲摨偠抣偵偡傞丅1側偺偵0側偺偼偡偖壓偺偱1憹偊傞偐傜
[State 99998, PauseNow?]
Type = VarSet
Trigger1 = Root,Time = 1
V = 46
Value = 0

;----------------------------------------------------------------------------
;偙偺僿儖僷乕偼Pause拞偱傕摦偔丅偲偄偆偙偲偼丠
[State 99998, PauseNow?]
Type = VarAdd
Trigger1 = 1
V = 46
Value = 1

;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;僈乕僪晄擻媄婰壇僔僗僥儉
;----------------------------------------------------------------------------
;弶婜壔
[State 99998, GuardCrashFlag Initialize]
type = VarRangeSet
trigger1 = 1
value = -1
first = 52
last = 59
persistent = 0

;----------------------------------------------------------------------------
;僈乕僪拞or僈乕僪峴摦偑偲傟側偄
[State 99998, GuardFlag]
Type = VarSet
TriggerAll = Var(47) = 0
TriggerAll = Root,Ctrl
Trigger1 = Root,StateNo = [120, 159]
Trigger2 = EnemyNear,MoveType = A
;Trigger2 = Root,P2Dist X = [0, EnemyNear,Const(Size.Attack.Dist))
Trigger2 = !(Root,InGuardDist)
V = 47
Value = 1

;============================================================================
;憡庤偺峌寕僗僥乕僩僫儞僶乕婰壇
;----------------------------------------------------------------------------
;憡庤偑捠忢峌寕傪孞傝弌偟偨
[State 99998, EnemyAttack Normal]
Type = VarSet
Trigger1 = EnemyNear,HitDefAttr = SCA,AA
V = 52
Value = EnemyNear,StateNo

;----------------------------------------------------------------------------
;憡庤偑搳偘峌寕傪孞傝弌偟偨
[State 99998, EnemyAttack Throw]
Type = VarSet
Trigger1 = EnemyNear,HitDefAttr = SCA,AT
V = 53
Value = EnemyNear,StateNo

;----------------------------------------------------------------------------
;憡庤偑旘傃摴嬶峌寕傪孞傝弌偟偨
[State 99998, EnemyAttack Projectile]
Type = VarSet
TriggerAll = EnemyNear,StateNo != Var(52)
TriggerAll = EnemyNear,StateNo != Var(53)
TriggerAll = EnemyNear,StateNo != Var(55)
Trigger1 = EnemyNear,MoveType = A
Trigger1 = EnemyNear,NumProj > Var(49) || EnemyNear,HitDefAttr = SCA,AP
V = 54
Value = EnemyNear,StateNo

;----------------------------------------------------------------------------
;憡庤偺旘傃摴嬶偺悢
[State 99998, Enemy NumProjectile]
Type = VarSet
Trigger1 = 1
V = 49
Value = Enemy,NumProj

;----------------------------------------------------------------------------
;偳偆傗傜僿儖僷乕庡懱偺峌寕偠傖側偄傛偆偩
[State 99998, EnemyAttack NonHelperFlag]
Type = VarSet
Trigger1 = EnemyNear,HitDefAttr = SCA,AA,AT
Trigger2 = EnemyNear,NumProj > Var(49)
Trigger3 = EnemyNear,StateNo = Var(52)
Trigger4 = EnemyNear,StateNo = Var(53)
Trigger5 = EnemyNear,StateNo = Var(54)
V = 51
Value = 1

;----------------------------------------------------------------------------
;憡庤偑僿儖僷乕峌寕傪孞傝弌偟偨
[State 99998, EnemyAttack Helper]
Type = VarSet
TriggerAll = EnemyNear,StateNo != Var(52)
TriggerAll = EnemyNear,StateNo != Var(53)
TriggerAll = EnemyNear,StateNo != Var(54)
TriggerAll = Var(51) = 0
Trigger1 = EnemyNear,MoveType = A
Trigger1 = EnemyNear,NumHelper > Var(50)
V = 55
Value = EnemyNear,StateNo

;----------------------------------------------------------------------------
;憡庤偺僿儖僷乕偺悢
[State 99998, Enemy NumHelper]
Type = VarSet
Trigger1 = 1
V = 50
Value = Enemy,NumHelper

;============================================================================
;僈乕僪晄擻媄婰壇
;----------------------------------------------------------------------------
;僈乕晄媄婰壇偦偺係
[State 99998, GuardCrash4A];捈愙峌寕
Type = VarSet
TriggerAll = Var(47) = 1
TriggerAll = Var(56) != -1 && Var(57) != -1 && Var(58) != -1 && Var(59) = -1
TriggerAll = Var(56) != Var(52) && Var(57) != Var(52) && Var(58) != Var(52)
TriggerAll = Var(52) != -1
Trigger1 = Var(52) = EnemyNear,StateNo
Trigger1 = EnemyNear,HitDefAttr = SCA,AA
Trigger1 = Root,StateNo != [120, 159]
Trigger1 = Root,MoveType = H
V = 59
Value = Var(52)

[State 99998, GuardCrash4P];旘傃摴嬶峌寕
Type = VarSet
TriggerAll = Var(47) = 1
TriggerAll = Var(56) != -1 && Var(57) != -1 && Var(58) != -1 && Var(59) = -1
TriggerAll = Var(56) != Var(54) && Var(57) != Var(54) && Var(58) != Var(54)
TriggerAll = Var(54) != -1
Trigger1 = EnemyNear,ProjHit = 1 || EnemyNear,HitDefAttr = SCA,AP
Trigger1 = Root,StateNo != [120, 159]
Trigger1 = Root,MoveType = H
V = 59
Value = Var(54)

[State 99998, GuardCrash4H];僿儖僷乕峌寕
Type = VarSet
TriggerAll = Var(47) = 1
TriggerAll = Var(56) != -1 && Var(57) != -1 && Var(58) != -1 && Var(59) = -1
TriggerAll = Var(56) != Var(55) && Var(57) != Var(55) && Var(58) != Var(55)
TriggerAll = Var(55) != -1
TriggerAll = Var(51) = 0
Trigger1 = EnemyNear,ProjHit = 0
Trigger1 = EnemyNear,NumHelper > Var(20)
Trigger1 = Root,StateNo != [120, 159]
Trigger1 = Root,MoveType = H
V = 59
Value = Var(55)

[State 99998, GuardCrash4T];搳偘峌寕
Type = null;VarSet
TriggerAll = Var(47) = 1
TriggerAll = Var(56) != -1 && Var(57) != -1 && Var(58) != -1 && Var(59) = -1
TriggerAll = Var(56) != Var(53) && Var(57) != Var(53) && Var(58) != Var(53)
TriggerAll = Var(53) != -1
Trigger1 = !(EnemyNear,MoveHit)
Trigger1 = EnemyNear,ProjHit = 0
Trigger1 = Root,StateNo != [120, 159]
Trigger1 = Root,MoveType = H
V = 59
Value = Var(53)

;----------------------------------------------------------------------------
;僈乕晄媄婰壇偦偺俁
[State 99998, GuardCrash3A]
Type = VarSet
TriggerAll = Var(47) = 1
TriggerAll = Var(56) != -1 && Var(57) != -1 && Var(58) = -1
TriggerAll = Var(56) != Var(52) && Var(57) != Var(52)
TriggerAll = Var(52) != -1
Trigger1 = Var(52) = EnemyNear,StateNo
Trigger1 = EnemyNear,HitDefAttr = SCA,AA
Trigger1 = Root,StateNo != [120, 159]
Trigger1 = Root,MoveType = H
V = 58
Value = Var(52)

[State 99998, GuardCrash3P]
Type = VarSet
TriggerAll = Var(47) = 1
TriggerAll = Var(56) != -1 && Var(57) != -1 && Var(58) = -1
TriggerAll = Var(56) != Var(54) && Var(57) != Var(54)
TriggerAll = Var(54) != -1
Trigger1 = EnemyNear,ProjHit = 1 || EnemyNear,HitDefAttr = SCA,AP
Trigger1 = Root,StateNo != [120, 159]
Trigger1 = Root,MoveType = H
V = 58
Value = Var(54)

[State 99998, GuardCrash3H]
Type = VarSet
TriggerAll = Var(47) = 1
TriggerAll = Var(56) != -1 && Var(57) != -1 && Var(58) = -1
TriggerAll = Var(56) != Var(55) && Var(57) != Var(55)
TriggerAll = Var(55) != -1
TriggerAll = Var(51) = 0
Trigger1 = EnemyNear,ProjHit = 0
Trigger1 = EnemyNear,NumHelper > Var(20)
Trigger1 = Root,StateNo != [120, 159]
Trigger1 = Root,MoveType = H
V = 58
Value = Var(55)

[State 99998, GuardCrash3T]
Type = null;VarSet
TriggerAll = Var(47) = 1
TriggerAll = Var(56) != -1 && Var(57) != -1 && Var(58) = -1
TriggerAll = Var(56) != Var(53) && Var(57) != Var(53)
TriggerAll = Var(53) != -1
Trigger1 = !(EnemyNear,MoveHit)
Trigger1 = EnemyNear,ProjHit = 0
Trigger1 = Root,StateNo != [120, 159]
Trigger1 = Root,MoveType = H
V = 58
Value = Var(53)

;----------------------------------------------------------------------------
;僈乕晄媄婰壇偦偺俀
[State 99998, GuardCrash2A]
Type = VarSet
TriggerAll = Var(47) = 1
TriggerAll = Var(56) != -1 && Var(57) = -1
TriggerAll = Var(56) != Var(52)
TriggerAll = Var(52) != -1
Trigger1 = Var(52) = EnemyNear,StateNo
Trigger1 = EnemyNear,HitDefAttr = SCA,AA
Trigger1 = Root,StateNo != [120, 159]
Trigger1 = Root,MoveType = H
V = 57
Value = Var(52)

[State 99998, GuardCrash2P]
Type = VarSet
TriggerAll = Var(47) = 1
TriggerAll = Var(56) != -1 && Var(57) = -1
TriggerAll = Var(56) != Var(54)
TriggerAll = Var(54) != -1
Trigger1 = EnemyNear,ProjHit = 1 || EnemyNear,HitDefAttr = SCA,AP
Trigger1 = Root,StateNo != [120, 159]
Trigger1 = Root,MoveType = H
V = 57
Value = Var(54)

[State 99998, GuardCrash2H]
Type = VarSet
TriggerAll = Var(47) = 1
TriggerAll = Var(56) != -1 && Var(57) = -1
TriggerAll = Var(56) != Var(55)
TriggerAll = Var(55) != -1
TriggerAll = Var(51) = 0
Trigger1 = EnemyNear,ProjHit = 0
Trigger1 = EnemyNear,NumHelper > Var(20)
Trigger1 = Root,StateNo != [120, 159]
Trigger1 = Root,MoveType = H
V = 57
Value = Var(55)

[State 99998, GuardCrash2T]
Type = null;VarSet
TriggerAll = Var(47) = 1
TriggerAll = Var(56) != -1 && Var(57) = -1
TriggerAll = Var(56) != Var(53)
TriggerAll = Var(53) != -1
Trigger1 = !(EnemyNear,MoveHit)
Trigger1 = EnemyNear,ProjHit = 0
Trigger1 = Root,StateNo != [120, 159]
Trigger1 = Root,MoveType = H
V = 57
Value = Var(53)

;----------------------------------------------------------------------------
;僈乕晄媄婰壇偦偺侾
[State 99998, GuardCrash1A]
Type = VarSet
TriggerAll = Var(47) = 1
TriggerAll = Var(56) = -1
TriggerAll = Var(52) != -1
Trigger1 = Var(52) = EnemyNear,StateNo
Trigger1 = EnemyNear,HitDefAttr = SCA,AA
Trigger1 = Root,StateNo != [120, 159]
Trigger1 = Root,MoveType = H
V = 56
Value = Var(52)

[State 99998, GuardCrash1P]
Type = VarSet
TriggerAll = Var(47) = 1
TriggerAll = Var(56) = -1
TriggerAll = Var(54) != -1
Trigger1 = EnemyNear,ProjHit = 1 || EnemyNear,HitDefAttr = SCA,AP
Trigger1 = Root,StateNo != [120, 159]
Trigger1 = Root,MoveType = H
V = 56
Value = Var(54)

[State 99998, GuardCrash1H]
Type = VarSet
TriggerAll = Var(47) = 1
TriggerAll = Var(56) = -1
TriggerAll = Var(55) != -1
TriggerAll = Var(51) = 0
Trigger1 = EnemyNear,ProjHit = 0
Trigger1 = EnemyNear,NumHelper > Var(20)
Trigger1 = Root,StateNo != [120, 159]
Trigger1 = Root,MoveType = H
V = 56
Value = Var(55)

[State 99998, GuardCrash1T]
Type = null;VarSet
TriggerAll = Var(47) = 1
TriggerAll = Var(56) = -1
TriggerAll = Var(53) != -1
Trigger1 = !(EnemyNear,MoveHit)
Trigger1 = EnemyNear,ProjHit = 0
Trigger1 = Root,StateNo != [120, 159]
Trigger1 = Root,MoveType = H
V = 56
Value = Var(53)

;============================================================================
;屻張棟
;----------------------------------------------------------------------------
;僿儖僷乕偠傖側偄僼儔僌夝彍
[State 99998, EnemyAttack NonHelper Reset]
Type = VarSet
Trigger1 = EnemyNear,StateNo != Var(52)
Trigger1 = EnemyNear,StateNo != Var(53)
Trigger1 = EnemyNear,StateNo != Var(54)
V = 51
Value = 0

;----------------------------------------------------------------------------
;僈乕僪拞偠傖側偄or僈乕僪峴摦偱偒傞or摦偗傫
[State 99998, NoGuarded or CanGuard or Can'tMove]
Type = VarSet
TriggerAll = Var(47) = 1
Trigger1 = Root,InGuardDist
Trigger1 = !Ctrl
Trigger1 = Root,StateNo != [120, 159]
Trigger2 = EnemyNear,NumHelper = Var(20)
Trigger2 = EnemyNear,MoveType != A
Trigger3 = Root,MoveType = H
Trigger3 = Root,StateNo != [120, 159]
Trigger4 = Root,Time != Var(46)
Trigger5 = Root,MoveType = A
V = 47
Value = 0

;----------------------------------------------------------------------------
;旔偗偨偧僢両
[State 99998, AvoidFlag]
Type = VarSet
TriggerAll = EnemyNear,StateNo = Var(56) || EnemyNear,StateNo = Var(57) || EnemyNear,StateNo = Var(58) || EnemyNear,StateNo = Var(59)
Trigger1 = Root,StateNo = 196
V = 48
Value = 1

[State 99998, AvoidFlag]
Type = VarSet
Trigger1 = EnemyNear,StateNo != Var(56)
Trigger1 = EnemyNear,StateNo != Var(57)
Trigger1 = EnemyNear,StateNo != Var(58)
Trigger1 = EnemyNear,StateNo != Var(59)
V = 48
Value = 0

;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;AI峌寕惂屼
;----------------------------------------------------------------------------
;慜乆夞偺峌寕傪婰壇
[State 99998, PrevAttackState Set]
Type = VarSet
Trigger1 = Root,MoveType = A
Trigger1 = Root,P2MoveType = H
Trigger1 = Root,StateNo != Var(11)
Trigger1 = Root,Var(1)
V = 12
Value = Var(11)

;----------------------------------------------------------------------------
;慜夞偺峌寕傪婰壇
[State 99998, PrevAttackState Set]
Type = VarSet
Trigger1 = Root,MoveType = A
Trigger1 = Root,P2MoveType = H
V = 11
Value = Root,StateNo

;----------------------------------------------------------------------------
;峌寕婰壇傪儕僙僢僩
[State 99998, PrevAttackState Reset]
Type = VarRangeSet
Trigger1 = Root,StateNo != Var(11)
Trigger1 = Root,P2MoveType != H
Trigger2 = Root,MoveType = H
First = 11
Last  = 12
Value = 0

;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;AI婲摦梡婰弎
;----------------------------------------------------------------------------
[State 99999, AI婲摦偟傛偆偐]
Type = null;VarSet
TriggerAll = Var(59) != 1
Trigger1  = !(Command = "a")     && Root,Command = "a"
Trigger2  = !(Command = "b")     && Root,Command = "b"
Trigger3  = !(Command = "c")     && Root,Command = "c"
Trigger4  = !(Command = "x")     && Root,Command = "x"
Trigger5  = !(Command = "y")     && Root,Command = "y"
Trigger6  = !(Command = "z")     && Root,Command = "z"
Trigger7  = !(Command = "start") && Root,Command = "start"
Trigger8  = !(Command = "up")    && Root,Command = "up"
Trigger8  = RoundState = 2 && Root,Ctrl
Trigger9  = !(Command = "down")  && Root,Command = "down"
Trigger9  = RoundState = 2 && Root,Ctrl
Trigger10 = !(Command = "back")  && Root,Command = "back"
Trigger10 = RoundState = 2 && Root,Ctrl
Trigger11 = !(Command = "fwd")   && Root,Command = "fwd"
Trigger11 = RoundState = 2 && Root,Ctrl
V = 59
Value = 1

;----------------------------------------------------------------------------
[State 99999, 僾儗僀儎乕敾掕]
Type = null;VarSet
TriggerAll = Var(59) = 0
Trigger1  = Command = "a"     && Root,Command = "a"
Trigger2  = Command = "b"     && Root,Command = "b"
Trigger3  = Command = "c"     && Root,Command = "c"
Trigger4  = Command = "x"     && Root,Command = "x"
Trigger5  = Command = "y"     && Root,Command = "y"
Trigger6  = Command = "z"     && Root,Command = "z"
Trigger7  = Command = "start" && Root,Command = "start"
Trigger8  = Command = "up"    && Root,Command = "up"
Trigger9  = Command = "down"  && Root,Command = "down"
Trigger10 = Command = "back"  && Root,Command = "back"
Trigger11 = Command = "fwd"   && Root,Command = "fwd"
V = 59
Value = -1

[State 99998, 柍揋]
type = NotHitBy
trigger1 = 1
value = SCA

[State 99998, 晄壜帇]
type = AssertSpecial
trigger1 = 1
flag = Invisible

[State 99998, 帺暘偵偮偄偰偔]
type = BindToRoot
trigger1 = 1

[State 99998, 摨偠傾僯儊]
type = ChangeAnim
trigger1 = 1
value = parent,Anim
elem = parent,AnimElemNo(0)

[State 99998, 杮懱偲摨偠曽岦]
type = Turn
trigger1 = Facing != Parent,Facing
