;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------

[Statedef -2]

[State Debug Display]
type = DisplayToClipboard
text = "%f %f %f %f "
params = pos x,pos y,P2BodyDist X, P2BodyDist Y;Pos X,Helper(23040),Pos Y
trigger1 = 1

[State Append]
type = AppendToClipboard
text = "%d %d %d %f %f"
;params = prevstateno,FrontEdgeDist,BackEdgeDist,NumExplod,NumHelper;
params = prevstateno,var(0),var(1),fvar(0),fvar(1);
trigger1 = 1


;Pos Y
[State -2]
type = PosSet
trigger1 = PrevStateno = [100,107] 
trigger1 = StateType != A && Pos Y != 0
y = 0


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

; -[ コンボ補正"]-
[State -2]
type = VarSet
trigger1 = enemynear,Movetype!=H
var(40) = 0
ignorehitpause = 1

[State -2]
type = null;AttackMulSet
trigger1 = 1
value = fvar(6)
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(40) = 0
fvar(6) = 1 
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(40) > 0
trigger1 = var(40) <= 4
fvar(6) = .80 
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(40) = 4
fvar(6) = .7
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(40) = 5
fvar(6) = .6
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(40) = 6
fvar(6) = .5
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(40) = 7
fvar(6) = .35 
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(40) = 8
fvar(6) = .25
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(40) = 9
fvar(6) = .15 
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(40) = 10
fvar(6) = .1
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(40) = 11
fvar(6) = .1
ignorehitpause = 1


[State -2]
type = VarSet
trigger1 = var(40) = 12
fvar(6) = .08
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(40) = 13
fvar(6) = .07
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(40) > 13
fvar(6) = .06
ignorehitpause = 1


[State -2]
type = VarSet
trigger1 = var(40) = 14
fvar(6) = .05
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(40) = 15
fvar(6) = .04
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(40) >= 15
fvar(6) = .02
ignorehitpause = 1

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

[State -2]
type = DefenceMulSet
trigger1 = Life = [125,250]
value = 0.6

[State -2]
type = DefenceMulSet
trigger1 = Life = [0,124]
value = 0.5


;---------------------------------------------------------------------------
;リミッター

[State -2,SJ判定]
type = VarSet
trigger1  = stateno=10022
trigger2  = stateno=10023
var(41) = 1

[State -2,NJ判定]
type = VarSet
triggerall = var(41)=1
trigger1  = stateno=52
trigger2  = statetype!=A
var(41) = 0


[State -2,リミッターセット]
type = VarSet
trigger1 = enemynear,movetype != H
var(42) = 0


[State -2,リミッター発動]
type = VarSet
triggerall =var(42) >1
triggerall =var(41) =1
triggerall = enemynear,statetype = A
trigger1 = stateno = 620 && movehit
trigger2 = stateno = 650 && movehit
var(43) = 1

[State -2,リミッター発動]
type = VarSet
trigger1 = stateno = 3005 && movehit
trigger2 = (stateno = [2000,2030]) && movehit
var(43) = 1

[State -2,リミッター解除]
type = VarSet
triggerall = var(43) =1
trigger1 = enemynear,movetype != H
trigger2 = enemynear,stateno = 5120
var(43) = 0



[State -2,リミッター強制解除]
type = VarSet
triggerall = var(43) =1
triggerall = enemynear,statetype = A
trigger1 = stateno = [200,210]
trigger1 = movehit
trigger2 = stateno = 230
trigger2 = movehit
trigger3 = stateno = [600,610]
trigger3 = movehit
trigger4 = stateno = [630,640]
trigger4 = movehit
var(43) = 0

[State -2,2段ジャンプ]
type = null;VarSet
triggerall =var(44) =0
trigger1 = stateno = 40 
trigger2 = stateno = 10022 
trigger3 = stateno = 10023 
var(44) = 1

[State -2,2段ジャンプ]
type =null; VarSet
triggerall =var(44) =1
trigger1 = stateno = [10024,10026]
trigger2 = statetype !=A
trigger3 = stateno = 52 
var(44) = 0

[State -2,空中ダッシュ]
type = VarSet
trigger1  = stateno=340
var(45) = 1

[State -2,空中ダッシュ]
type = VarSet
trigger1  = statetype !=A
var(45) = 0


; ハイパーコンボフィニッシュ
[State -2, Hyper Combo Finish]
type = Helper
triggerall = WinKO
triggerall = NumHelper(536) = 0
trigger1 = var(46) > 0
ID = 536
name = "Hyper Combo Finish!"
StateNo = 7777
postype = p1
pos = 0, 0
ownpal = 1

[State -2,フィニッシュ]
type = VarSet
trigger1  = movetype != A
var(46) = 0

[State -2,エリアル大＞大リミッター]
type = VarSet
trigger1  =  enemynear,movetype != H
var(47) = 0


[State -2,エリアル大＞大リミッター]
type = VarSet
trigger1  = stateno = 210 && movehit
trigger2  = stateno = 250 && movehit
var(47) = 1

[State -2,ダウン回避フラグ]
type = VarSet
triggerall = var(57) >0
trigger1 = movetype != H
var(57) = 0

[State -2]
type = PowerAdd
trigger1 = movetype = H
trigger1 = ctrl = 0
value = GetHitVar(damage)

[State -2]
type = PowerAdd
trigger1 = movetype = H
trigger1 = statetype != L
trigger1 = (stateno != [120,155]) && (stateno != [5000,5210])
trigger1 = ctrl = 0
value = 2

;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------


[Statedef -3]




[State -3, hurt Sound 1]
type = PlaySnd
triggerall = Time = 1
triggerall = random < 200
trigger1 = Stateno = 5000 || stateno = 5010 || Stateno = 5020
trigger1 = movetype = H
trigger1 = GetHitVar(animtype) <= 2
value = 5000,GetHitVar(animtype)



[State -3, hurt Sound 2]
type = PlaySnd
triggerall = Time = 1
triggerall = random < 200
trigger1 = Stateno = 5070 || stateno = 5080
trigger1 = movetype = H
value = 5000,random%3




------------------------

[State -3, hit ground Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 5100
value = 5100,0


[State 130]
type = AssertSpecial
trigger1 = 1
trigger1 = Stateno = [120,155]
flag = NoWalk



; ガード
[State -3]
type = Helper
trigger1 = Stateno = 120 && Time = 0
trigger2 = (stateno = [130,132]) || (stateno = [150,152]) && NumHelper(6120) = 0
stateno = 6120
id = 6120
ownpal = 1



; ガード
[State -3]
type = Helper
trigger1 = (stateno = [7610,7620]) && NumHelper(6125) = 0
stateno = 6125
id = 6125
ownpal = 1


