;-------------------------------------------------------------------------
[Statedef -2]
;==========================================================================
;ゼロ子設定、常時ではないにしたい時は「type = helper」を「type = null」に書き換えてください
;ゼロ子完成したのでここはもういらないか・・・

[State -2]
type = null;helper
trigger1 = palno = 5
trigger1 = NumHelper(30021) = 0
name = "zeroko"
id = 30021
pos = -30,0
postype = p1
stateno = 60000
helpertype = Normal
keyctrl = 1
size.xscale = 1
size.yscale = 1
sprpriority = -2
ownpal = 1
;supermovetime = 999999999999999999
;pausemovetime = 999999999999999999

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

[State -2, Sexy KO]
type = Helper
triggerall = NumHelper(6969) = 0
trigger1 = !alive
trigger1 = matchover || teammode = turns
helpertype = normal
name = "Sexy KO detect"
id = 6969
postype = p1
pos = 0,0
stateno = 169
keyctrl = 0
ownpal = 1
facep2 = 0
ignorehitpause = 1


[State -2, パワー溜めエフェ消去（フル）]
type = RemoveExplod
triggerall = NumExplod(13270)
trigger1 = stateno != 970
trigger2 = movetype = H		;フェール
id = 13270
ignorehitpause = 1




[State -2]
type = helper
triggerall = Numpartner > 0
trigger1 = partner,Name = "zeroko"
trigger1 = NumHelper(30021) = 0
name = "zeroko"
id = 30021
pos = -30,0
postype = p1
stateno = 66378
helpertype = Normal
keyctrl = 0
size.xscale = 1
size.yscale = 1
sprpriority = -2
ownpal = 1
;supermovetime = 999999999999999999

;pausemovetime = 999999999999999999

[State -1]
Type = VarSet
triggerall = Numpartner > 0
trigger1 = partner,Name = "zeroko"
fV = 26
Value = 1
;-----------


[State -1]
Type = VarSet
trigger1 = NumHelper(30021) = 0
fV = 26
Value = 0


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

[State explod]
type = removeExplod
trigger1 = stateno != 11500
id = 11501



;--------------------------
;対秋葉イントロ

[State end]
type = ChangeState
triggerall = p2name="Akiha_Tohno"&&p2stateno=9903
triggerall = enemy,stateno=9903 && enemy,var(59)=14
trigger1 = stateno != 9901
value = 9901

[State end]
type = ChangeState
triggerall = p2name="Akiha_Tohno"&&p2stateno=9903
triggerall = enemy,stateno=9903 && enemy,var(59)=11
trigger1 = stateno != 9900 
value = 9900

[State end]
type = ChangeState
triggerall = p2name="Akiha_Tohno"&&p2stateno=9903
triggerall = enemy,stateno=9903 && enemy,var(59)=12
trigger1 = stateno != 9900 
trigger1 = var(0) = 1
value = 9902

[State 100,***]
type = powerset
triggerall = p2name="Akiha_Tohno"&&p2stateno=9903
triggerall = enemy,stateno=9903 && enemy,var(59)=13
trigger1 = stateno != 9900 
value = 2500

[State end]
type = ChangeState
triggerall = p2name="Akiha_Tohno"&&p2stateno=9903
triggerall = enemy,stateno=9903 && enemy,var(59)=13
trigger1 = stateno != 9900 
value = 9900

;------------------------------------------------------------------
[State magic circuit]
type = Helper
trigger1 = numhelper(9100) = 0
trigger1 = roundstate = 2
name = "magic_circuit"
stateno = 9100
ID = 9100
ownpal = 1
supermovetime = 999999
persistent = 0
ignorehitpause = 1

[State var]
type = varset
trigger1 = numhelper(9100) = 1
var(45) = helper(9100),var(45)
ignorehitpause = 1

[State var]
type = varset
trigger1 = numhelper(9100) = 1
fvar(10) = helper(9100),fvar(10)
ignorehitpause = 1

[State power]
type = poweradd
trigger1 = teammode = single || teammode = turns 
trigger1 = stateno != [190,199]
trigger1 = var(45)= 3 && fvar(10) > 0
value = -ifelse(var(45)=2,2,4)
ignorehitpause = 1

[State power]
type = poweradd
trigger1 = teammode = single || teammode = turns 
trigger1 = stateno != [190,199]
trigger1 = var(45)!= 0 && fvar(10) > 0
value = -ifelse(var(45)=2,2,4)
ignorehitpause = 1

[State var]
type = varset
trigger1 = var(45) = 0 && power = const(data.power)
trigger1 = teammode = single || teammode = turns 
trigger2 = var(45) = 0 && power >= 3000
trigger2 = TeamMode = simul
trigger2 = alive
var(45) = 2
ignorehitpause = 1

[State var]
type = varset
trigger1 = numhelper(9110) = 1
var(46) = helper(9110),var(46)
ignorehitpause = 1

[State var]
type = varset
trigger1 = numhelper(9110) = 1
fvar(11) = helper(9110),fvar(11)
ignorehitpause = 1

[State life]
type = lifeadd
triggerall = fvar(11) > 0 && var(46) = 0
trigger1 = gametime%2
trigger1 = movetype!= H
value = 2
ignorehitpause = 1

[State var]
type = varadd
triggerall = fvar(11) < 64 && time = [0,4]
trigger1 = stateno = 42 || stateno = 100 || stateno = 102 || prevstateno = 951
fvar(11) = -1.6

[State var]
type = varset
triggerall = fvar(11)>= 1
trigger1 = stateno = 42 || stateno = 100 || stateno = 102 || prevstateno = 951
var(46) = 0

[State -2, L.Attack]
type = VarSet
trigger1 = var(45) = 0
v = 47
value = 0

[State -2, L.Attack]
type = VarSet
trigger1 = var(45) = 1 || var(45) = 2 
v = 47
value = 2

[State -2, L.Attack]
type = VarSet
trigger1 = var(45) = 3
v = 47
value = 1

;------------------------------------------------------------------
[State explod]
type = removeExplod
trigger1 = stateno != 195
id = 16050

[State explod]
type = removeExplod
trigger1 = stateno != 195
id = 16051
;-------------------------------------------------------------------------




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

;---------------------------------------------------------------------------
; KO時声管理
[State -2,VarSet(11)]
type = VarSet
trigger1 = Alive
var(4) = 0

[State -2,VarSet(11)]
type = VarSet
trigger1 = !Alive && var(4) = 0
var(4) = 1

[State -2,AssertSpecial]
type = AssertSpecial
trigger1 = Var(0) = 2
flag = NoKOSnd
ignorehitpause = 1

[State -2,PlaySnd]
type = PlaySnd
trigger1 = Var(0) = 2
trigger1 = RoundState = 3
trigger1 = !Alive && Var(4)=1
value = 2011,0
channel = 15
lowpriority = 1
persistent = 0

[State -2,PlaySnd]
type = PlaySnd
trigger1 = Var(0) <= 1
trigger1 = RoundState = 3
trigger1 = !Alive && Var(4)=1
value = 11,1
channel = 15
lowpriority = 1
persistent = 0

[State -2,VarSet(11)]
type = VarSet
trigger1 = var(4) = 1
var(4) = -1


;------------------------------------------------------------------
;モード判定
[State 0]
type = varset
triggerall = var(41) >= 1
triggerall = var(41) <= 6
trigger1 = RoundState = 0
trigger2 = RoundState = 1
v = 0
value = 1

[State 0]
type = varset
triggerall = var(0) = 2
trigger1 = 1
v = 41
value = 7

[State 0]
type = varset
triggerall = var(41) = 7
trigger1 = RoundState = 0
trigger2 = RoundState = 1
v = 0
value = 2

[State 0]
type = varset
triggerall = PalNo >= 7
triggerall = PalNo <= 11
triggerall = roundno = 1
triggerall = var(41) != 19
trigger1 = RoundState = 0
v = 41
value = 20

[State 0]
type = varset
triggerall = RoundState = 0
trigger1 = var(41) = 20
trigger2 = var(41) = 19
v = 0
value = 1
[State 0]
type = varset
triggerall = var(41) = 5
trigger1 = RoundState = 0
trigger2 = RoundState = 1
v = 0
value = 0

[State 0]
type = changeanim
triggerall = var(0) >= 1
trigger1 = anim = 5
value = 5+var(0)*10000
persistent = 1

[State 0]
type = changeanim
triggerall = var(0) >= 1
trigger1 = anim = 6
value = 6+var(0)*10000
persistent = 1

[State 1000, 7]
type = DefenceMulSet
trigger1 = var(0) = 2
value = 0.9

[State 1000, 7]
type = DefenceMulSet
trigger1 = var(0) = 0
value = 1.07

[State -2]
Type = AfterImage
Trigger1 = Power = 3000
Time = 99999
Trans = Add
length = 12
timegap  = 1
framegap = 1
PalBright = 0 , 0 , 2
PalContrast = 33 , 33 , 225
PalAdd = 0 , 0 , 0
PalMul = 0.7 , 0.7 , 0.7
IgnoreHitPause = 1
Peresistent = 1
SuperMoveTime = 9999
PauseMoveTime = 9999

[State -2]
Type = AfterImageTime
Trigger1 = Power <= 2999
Trigger1 = Var(45) = 0
Time = 1

;---------------------------------------------------------------------
[State 0]
type = varset
triggerall = PalNo >= 7
trigger1 = teammode = turns
v = 41
value = 20

[State 0]
type = null;varset
triggerall = PalNo = 12
trigger1 = p1name = "shiki_nanaya"
trigger1 = teammode = turns
v = 41
value = 21

[State 0]
type = varset
trigger1 = var(41) = 20
trigger1 = teammode = turns
trigger1 = PalNo >= 7
v = 0
value = 1

[State 0]
type = varset
triggerall = var(41) = 21
trigger1 = teammode = turns
v = 0
value = 2

;--------------------------------------------------------------------------
;クリティカル処理
[State 0]
type = varrandom
trigger1 = 1
v = 57
range = 0,15

[State 0]
type = AttackMulSet
trigger1 = var(57) != 1
value = 1
ignorhitpause = 0

[State 0]
type = AttackMulSet
trigger1 = var(57) = 1
value = 1.4
ignorhitpause = 0

[State 0]
type = EnvColor
trigger1 = var(57) = 1
trigger1 = movehit = 1
time = 1
value = 500,0,0
under = 0
ignorhitpause = 1
parsistent = 0
;--------------------------------------------------------------------------
;魔眼による脳神経の消耗

[State 700]
type = lifeadd
triggerall = var(41) != 20
triggerall = var(41) != 19
triggerall = movetype != H
triggerall = var(0) = 1
triggerall = GameTime % 10 = 0
triggerall = RoundState = 2
trigger1 = stateno != 14100
trigger2 = stateno != [13000,13500]
value = -1
kill = 0

;--------------------------------------------------------------------------
;心逝くまで殺しあおう

[State 700]
type = AssertSpecial
trigger1 = var(0) = 2
flag = timerfreeze

;--------------------------------------------------------------------------
;切断

[State 20, 3]
type = Changestate
trigger1 = NumHelper(7778) = 1
trigger1 = movetype = H
trigger1 = stateno != 20955
trigger1 = stateno != [5000,5200]
value = 20955
;--------------------------------------------------------------------------

[State 700]
type = RemoveExplod
trigger1 = anim != 10410
id = 16030

[State 700]
type = RemoveExplod
trigger1 = anim != 11000
id = 16010

[State 700]
type = RemoveExplod
trigger1 = anim != 11010
id = 16011

;ランダムボイス

[State 210, 1]
type = PlaySnd
triggerall = var(0) <= 1
trigger1 = anim = [5000+var(0)*10000,5100+var(0)*10000]
trigger1 = time = 0
channel = 0
value = S20, random%9
ignorehitpause = 1

[State 210, 1]
type = PlaySnd
triggerall = var(0) <= 1
trigger1 = anim = 5300+var(0)*10000
trigger1 = time = 0
channel = 0
value = s200, 0

[State 210, 1]
type = PlaySnd
triggerall = var(0) = 2
trigger1 = anim = [5000+var(0)*10000,5100+var(0)*10000]
trigger1 = time = 0
channel = 0
value = S2020, random%6
ignorehitpause = 1

[State 210, 1]
type = PlaySnd
trigger1 = anim = 5300+var(0)*10000
trigger1 = time = 0
channel = 0
value = s2020, 4

残像消し
[State 1000,00]
type = Afterimagetime
triggerall = var(47) = 0
triggerall = var(45) = 0
trigger1 = stateno != [4000,4089]
trigger1 = time = 0
trigger2 = movetype = H
trigger3 = stateno  = 0
time = 0

;避け処理

[State -2, varset] 
type = varset
triggerall = var(41) != 19 
trigger1 = p2movetype = A
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
trigger1 = stateno != 700
trigger1 = stateno != 701
v = 31
value = 1

[State -2, varset] 
type = varset
triggerall = var(41) != 19 
trigger1 = p2movetype != A
v = 31
value = 0

[State -2]
type = varset
trigger1 = time >= 1
trigger1 = command = "holdback"
trigger2 = stateno = 700
var(31) = 0

[State -2]
type = null;varset
triggerall = time = 0
trigger1 = command = "holdback"
var(31) = 1

[State -2]
type = null;varset
trigger1 = command != "holdback"
var(31) = 0

空中ダッシュ、二段ジャンプリセット
[State -2, Air reset]
type = VarSet
trigger1 = Statetype != A
trigger1 = Var(11) = 1
v = 11
value = 0
IgnoreHitPause = 1

[State -2, Air reset]
type = VarSet
trigger1 = Statetype != A
trigger1 = Var(10) = 1
v = 10
value = 0
IgnoreHitPause = 1

[State -2, Air reset]
type = VarSet
trigger1 = Statetype != A
trigger1 = Var(9) = 1
v = 9
value = 0
IgnoreHitPause = 1

[State -2, dash reset]
type = VarSet
triggerall = Var(8) = 1
trigger1 = Statetype != A
trigger1 = Stateno != 40
v = 8
value = 0
IgnoreHitPause = 1

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

;メルブラチェーンコンボシステム
;（伊吹川さんのを参考にさせてもらってます）

[State -2, L.Attack]
type = VarSet
trigger1 = StateNo = 200
v = 17
value = 1
IgnoreHitPause = 1

[State -2, M.Attack]
type = VarSet
trigger1 = StateNo = 210
v = 18
value = 1
IgnoreHitPause = 1

[State -2, H.Attack]
type = VarSet
trigger1 = StateNo = 220
v = 19
value = 1
IgnoreHitPause = 1

;***********************************
[State -2, Crouch L.Attack]
type = VarSet
trigger1 = StateNo = 400
v = 20
value = 1
IgnoreHitPause = 1

[State -2, Crouch M.Attack]
type = VarSet
trigger1 = StateNo = 410
v = 21
value = 1
IgnoreHitPause = 1

[State -2, Crouch H.Attack]
type = VarSet
trigger1 = StateNo = 420
v = 22
value = 1
IgnoreHitPause = 1

;***********************************
[State -2, Air L.Attack]
type = VarSet
trigger1 = StateNo = 600
v = 23
value = 1
IgnoreHitPause = 1

[State -2, Air M.Attack]
type = VarSet
trigger1 = StateNo = 610
v = 24
value = 1
IgnoreHitPause = 1

[State -2, Air H.Attack]
type = VarSet
trigger1 = StateNo = 620
trigger2 = StateNo = 621
v = 25
value = 1
IgnoreHitPause = 1
;***********************************
[State -2, Flag Reset]
type = VarRangeSet
trigger1 = MoveType != A
trigger2 = StateType = A
trigger3 = StateNo = 105
trigger4 = StateNo = 0
first = 17
last = 22
value = 0
IgnoreHitPause = 1

[State -2, Air Flag Reset-1]
type = VarRangeSet
trigger1 = MoveType != A
trigger2 = StateType != A
trigger3 = StateNo = 52
trigger4 = StateNo = 115;108
trigger5 = StateNo = 0
first = 23
last = 25
value = 0
IgnoreHitPause = 1

;---------------------------------------------------------------------------
;ブロッキング関係

[State -2, 1]
type = varset
triggerall = !var(55)
triggerall = numexplod(1057) = 1
trigger1 = time = 1
trigger1 = stateno = [4010,4020]
trigger2 = time = 1
trigger2 = stateno = 1712
trigger3 = var(56) >= 20
var(29) = 0

[State -2, 2]
type = varset
triggerall = !var(55)
triggerall = numexplod(1057) = 1
trigger1 = time = 1
trigger1 = stateno = [4010,4020]
trigger2 = time = 1
trigger2 = stateno = 1712
trigger3 = var(56) >= 20
var(56) = 0

[State -2, 3]
type = varadd
triggerall = numexplod(1057) = 1
trigger1 = var(56)
var(56) = 1
ignorehitpause = 1

[State -2, 4]
type = varset
triggerall = numexplod(1057) = 1
triggerall = !var(55)
triggerall = !var(56)
trigger1 = command = "fwd"
trigger1 = command != "holdup"
trigger1 = command != "holddown"
var(56) = 1

[State -2, 5]
type = varset
triggerall = numexplod(1057) = 1
triggerall = !var(55)
trigger1 = command != "holdfwd"
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger1 = command != "holdback"
trigger1 = var(56) = [1,4]
var(29) = 1










;立ちブロッキング
[State -2, 11] 
triggerall = numexplod(1057) = 1
triggerall = Var(0) <= 0
type = hitoverride
triggerall = !var(55)
triggerall = statetype != A
triggerall = ctrl
trigger1 = !var(55)
trigger1 = var(56) = [1,4]
trigger2 = !var(55)
trigger2 = var(56) = [5,8]
trigger2 = var(29)
slot = 0
stateno = 1712
attr = SCA, AA, AP
time = 1



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


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



;------------------------------------------------------------------------------------------
;------------------------------------------------------------------------------------------
;根性値補正(1000〜751)
[State -2] 
Type = VarSet
TriggerAll = (1000*P2Life/EnemyNear,Const(Data.Life)) >= 751
Trigger1 = FVar(14) = 23
IgnoreHitPause = 1
FV = 13
Value = 1.400

[State -2] 
Type = VarSet
TriggerAll = (1000*P2Life/EnemyNear,Const(Data.Life)) >= 751
Trigger1 = FVar(14) = 6 || FVar(14) = 18
IgnoreHitPause = 1
FV = 13
Value = 1.100

[State -2] 
Type = VarSet
TriggerAll = (1000*P2Life/EnemyNear,Const(Data.Life)) >= 751
Trigger1 = FVar(14) = 15
IgnoreHitPause = 1
FV = 13
Value = 1.080

[State -2] 
Type = VarSet
TriggerAll = (1000*P2Life/EnemyNear,Const(Data.Life)) >= 751
Trigger1 = FVar(14) = 2 || FVar(14) = 14
IgnoreHitPause = 1
FV = 13
Value = 1.020

[State -2] 
Type = VarSet
TriggerAll = (1000*P2Life/EnemyNear,Const(Data.Life)) >= 751
Trigger1 = FVar(14) = 0 || FVar(14) = 17 || FVar(14) = 19 || FVar(14) = 20 || FVar(14) = 22
IgnoreHitPause = 1
FV = 13
Value = 1.000

[State -2] 
Type = VarSet
TriggerAll = (1000*P2Life/EnemyNear,Const(Data.Life)) >= 751
Trigger1 = FVar(14) = 13
IgnoreHitPause = 1
FV = 13
Value = 0.980

[State -2] 
Type = VarSet
TriggerAll = (1000*P2Life/EnemyNear,Const(Data.Life)) >= 751
Trigger1 = FVar(14) = 21
IgnoreHitPause = 1
FV = 13
Value = 0.940

[State -2] 
Type = VarSet
TriggerAll = (1000*P2Life/EnemyNear,Const(Data.Life)) >= 751
Trigger1 = FVar(14) = 5
IgnoreHitPause = 1
FV = 13
Value = 0.920

[State -2] 
Type = VarSet
TriggerAll = (1000*P2Life/EnemyNear,Const(Data.Life)) >= 751
Trigger1 = FVar(14) = 1 || FVar(14) = 4 || FVar(14) = 7 || FVar(14) = 10
IgnoreHitPause = 1
FV = 13
Value = 0.900

[State -2] 
Type = VarSet
TriggerAll = (1000*P2Life/EnemyNear,Const(Data.Life)) >= 751
Trigger1 = FVar(14) = 3 || FVar(14) = 12 || FVar(14) = 16
IgnoreHitPause = 1
FV = 13
Value = 0.880

[State -2] 
Type = VarSet
TriggerAll = (1000*P2Life/EnemyNear,Const(Data.Life)) >= 751
Trigger1 = FVar(14) = 9
IgnoreHitPause = 1
FV = 13
Value = 0.870

[State -2] 
Type = VarSet
TriggerAll = (1000*P2Life/EnemyNear,Const(Data.Life)) >= 751
Trigger1 = FVar(14) = 8 || FVar(14) = 11
IgnoreHitPause = 1
FV = 13
Value = 0.850

[State -2] 
Type = VarSet
TriggerAll = (1000*P2Life/EnemyNear,Const(Data.Life)) >= 751
Trigger1 = FVar(14) = 24
IgnoreHitPause = 1
FV = 13
Value = 0.700

;------------------------------------------------------------------------------------------
;根性値補正(750〜501)
[State -2] 
Type = VarSet
Trigger1 = (1000*P2Life/EnemyNear,Const(Data.Life)) = [501,750]
Trigger1 = FVar(14) = 24
IgnoreHitPause = 1
FV = 13
Value = 1.356

[State -2] 
Type = VarSet
Trigger1 = (1000*P2Life/EnemyNear,Const(Data.Life)) = [501,750]
Trigger1 = FVar(14) = 6
IgnoreHitPause = 1
FV = 13
Value = 1.065

[State -2] 
Type = VarSet
Trigger1 = (1000*P2Life/EnemyNear,Const(Data.Life)) = [501,750]
Trigger1 = FVar(14) = 4 || FVar(14) = 15 || FVar(14) = 18 || FVar(14) = 20
IgnoreHitPause = 1
FV = 13
Value = 0.969

[State -2] 
Type = VarSet
Trigger1 = (1000*P2Life/EnemyNear,Const(Data.Life)) = [501,750]
Trigger1 = FVar(14) = 2 || FVar(14) = 8 || FVar(14) = 13
IgnoreHitPause = 1
FV = 13
Value = 0.920

[State -2] 
Type = VarSet
Trigger1 = (1000*P2Life/EnemyNear,Const(Data.Life)) = [501,750]
Trigger1 = FVar(14) = 12
IgnoreHitPause = 1
FV = 13
Value = 0.890

[State -2] 
Type = VarSet
TriggerAll = (1000*P2Life/EnemyNear,Const(Data.Life)) = [501,750]
Trigger1 = FVar(14) = 0 || FVar(14) = 1 || FVar(14) = 3 || FVar(14) = 7 || FVar(14) = 9 || FVar(14) = 10
Trigger2 = FVar(14) = 14 || FVar(14) = 17 || FVar(14) = 19 || FVar(14) = 21 || FVar(14) = 22
IgnoreHitPause = 1
FV = 13
Value = 0.871

[State -2] 
Type = VarSet
Trigger1 = (1000*P2Life/EnemyNear,Const(Data.Life)) = [501,750]
Trigger1 = FVar(14) = 5 || FVar(14) = 16
IgnoreHitPause = 1
FV = 13
Value = 0.823

[State -2] 
Type = VarSet
Trigger1 = (1000*P2Life/EnemyNear,Const(Data.Life)) = [501,750]
Trigger1 = FVar(14) = 23
IgnoreHitPause = 1
FV = 13
Value = 0.677

;------------------------------------------------------------------------------------------
;根性値補正(500〜251)
[State -2] 
Type = VarSet
Trigger1 = (1000*P2Life/EnemyNear,Const(Data.Life)) = [251,500]
Trigger1 = FVar(14) = 6 || FVar(14) = 23 || FVar(14) = 24
IgnoreHitPause = 1
FV = 13
Value = 1.029

[State -2] 
Type = VarSet
Trigger1 = (1000*P2Life/EnemyNear,Const(Data.Life)) = [251,500]
Trigger1 = FVar(14) = 10
IgnoreHitPause = 1
FV = 13
Value = 0.982

[State -2] 
Type = VarSet
Trigger1 = (1000*P2Life/EnemyNear,Const(Data.Life)) = [251,500]
Trigger1 = FVar(14) = 20
IgnoreHitPause = 1
FV = 13
Value = 0.937

[State -2] 
Type = VarSet
Trigger1 = (1000*P2Life/EnemyNear,Const(Data.Life)) = [251,500]
Trigger1 = FVar(14) = 4 || FVar(14) = 9 || FVar(14) = 18
IgnoreHitPause = 1
FV = 13
Value = 0.936

[State -2] 
Type = VarSet
Trigger1 = (1000*P2Life/EnemyNear,Const(Data.Life)) = [251,500]
Trigger1 = FVar(14) = 8 || FVar(14) = 11 || FVar(14) = 12
IgnoreHitPause = 1
FV = 13
Value = 0.861

[State -2] 
Type = VarSet
TriggerAll = (1000*P2Life/EnemyNear,Const(Data.Life)) = [251,500]
Trigger1 = FVar(14) = 0 || FVar(14) = 1 || FVar(14) = 2 || FVar(14) = 7 || FVar(14) = 14
Trigger2 = FVar(14) = 15 || FVar(14) = 17 || FVar(14) = 22
IgnoreHitPause = 1
FV = 13
Value = 0.843

[State -2] 
Type = VarSet
Trigger1 = (1000*P2Life/EnemyNear,Const(Data.Life)) = [251,500]
Trigger1 = FVar(14) = 13
IgnoreHitPause = 1
FV = 13
Value = 0.842

[State -2] 
Type = VarSet
Trigger1 = (1000*P2Life/EnemyNear,Const(Data.Life)) = [251,500]
Trigger1 = FVar(14) = 16 || FVar(14) = 21
IgnoreHitPause = 1
FV = 13
Value = 0.800

[State -2] 
Type = VarSet
Trigger1 = (1000*P2Life/EnemyNear,Const(Data.Life)) = [251,500]
Trigger1 = FVar(14) = 3
IgnoreHitPause = 1
FV = 13
Value = 0.796

[State -2] 
Type = VarSet
Trigger1 = (1000*P2Life/EnemyNear,Const(Data.Life)) = [251,500]
Trigger1 = FVar(14) = 5 || FVar(14) = 19
IgnoreHitPause = 1
FV = 13
Value = 0.750

;------------------------------------------------------------------------------------------
;根性値補正(250〜0)
[State -2] 
Type = VarSet
Trigger1 = (1000*P2Life/EnemyNear,Const(Data.Life)) <= 250
Trigger1 = FVar(14) = 10
IgnoreHitPause = 1
FV = 13
Value = 0.948

[State -2] 
Type = VarSet
Trigger1 = (1000*P2Life/EnemyNear,Const(Data.Life)) <= 250
Trigger1 = FVar(14) = 20
IgnoreHitPause = 1
FV = 13
Value = 0.906

[State -2] 
Type = VarSet
Trigger1 = (1000*P2Life/EnemyNear,Const(Data.Life)) <= 250
Trigger1 = FVar(14) = 6 || FVar(14) = 7 || FVar(14) = 9
IgnoreHitPause = 1
FV = 13
Value = 0.905

[State -2] 
Type = VarSet
TriggerAll = (1000*P2Life/EnemyNear,Const(Data.Life)) <= 250
Trigger1 = FVar(14) = 1 || FVar(14) = 2 || FVar(14) = 4 || FVar(14) = 8 || FVar(14) = 11 || FVar(14) = 12
Trigger2 = FVar(14) = 13 || FVar(14) = 14 || FVar(14) = 18 || FVar(14) = 23 || FVar(14) = 24
IgnoreHitPause = 1
FV = 13
Value = 0.815

[State -2] 
Type = VarSet
Trigger1 = (1000*P2Life/EnemyNear,Const(Data.Life)) <= 250
Trigger1 = FVar(14) = 22
IgnoreHitPause = 1
FV = 13
Value = 0.769

[State -2] 
Type = VarSet
Trigger1 = (1000*P2Life/EnemyNear,Const(Data.Life)) <= 250
Trigger1 = FVar(14) = 3
IgnoreHitPause = 1
FV = 13
Value = 0.725

[State -2] 
Type = VarSet
Trigger1 = (1000*P2Life/EnemyNear,Const(Data.Life)) <= 250
Trigger1 = FVar(14) = 0 || FVar(14) = 5 || FVar(14) = 15 || FVar(14) = 16 || FVar(14) = 17 || FVar(14) = 21
IgnoreHitPause = 1
FV = 13
Value = 0.724

[State -2] 
Type = VarSet
Trigger1 = (1000*P2Life/EnemyNear,Const(Data.Life)) <= 250
Trigger1 = FVar(14) = 19
IgnoreHitPause = 1
FV = 13
Value = 0.678

;------------------------------------------------------------------------------------------
;ヒット数補正
[State -2] 
Type = VarSet
Trigger1 = P2MoveType != H
Trigger2 = P2StateNo   = [120,155]
Trigger3 = P2StateNo   = [5200,5201]
IgnoreHitPause = 1
V = 2
Value = 0

[State -2]
Type = VarSet
Trigger1 = Var(2) = 0
IgnoreHitPause = 1
FV = 2
Value = 1.00

[State -2]
Type = VarSet
Trigger1 = Var(2) = [1,31]
IgnoreHitPause = 1
FV = 2
Value = 1.00 - 0.03125 * (Var(2))
 
[State -2] 
Type = VarSet
Trigger1 = Var(2) >= 32
IgnoreHitPause = 1
FV = 2
Value = 0.03125

;------------------------------------------------------------------------------------------
;クリティカルヒット補正
[State -2]
Type = VarSet
Trigger1 = Var(57)   = 31
IgnoreHitPause = 1
FV = 3
Value = 1.15

[State -2]
Type = BGPalFx
Trigger1 = EnemyNear,MoveType = H
Trigger1 = Var(57)   = 31
Trigger1 = MoveHit = 1
Time = 1
Add = 256,-120,-120
InvertAll = 0
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999

[State -2]
Type = EnvShake
Trigger1 = EnemyNear,MoveType = H
Trigger1 = Var(57)   = 31
Trigger1 = MoveHit
Time  = 9
Ampl  = 3
Freq  = 80
IgnoreHitPause = 1

[State -2]
Type = VarSet
Trigger1 = Var(57)   != 31
Trigger1 = MoveType = A
Trigger2 = RoundState = 0
IgnoreHitPause = 1
FV = 3
Value = 1.00

;------------------------------------------------------------------------------------------
;状態ダメージ補正
[State -2]
Type = VarSet
Trigger1 = Var(59) = 1
IgnoreHitPause = 1
FV = 4
Value = IfElse(P2StateType=S,0,IfElse(P2StateType=C,-1,IfElse(P2StateType=A,1.5,7.25)))

[State -2]
Type = VarSet
Trigger1 = Var(59) = 2
IgnoreHitPause = 1
FV = 4
Value = 7.25

[State -2]
Type = VarSet
TriggerAll = FVar(5)  != 1.00
Trigger1   = P2MoveType != H
Trigger1   = P2StateNo  != [5000,5999]
Trigger2   = P2StateNo   = [120,155]
Trigger3   = P2StateNo   = [5200,5210]
Trigger4   = P2StateNo   = 5120
IgnoreHitPause = 1
FV = 5
Value = 1.00

[State -2]
Type = VarSet
Trigger1 = P2StateType = L
Trigger2 = P2StateNo = 5070
IgnoreHitPause = 1
FV = 5
Value = 1.00/Enemy,Const(Data.Fall.Defence_Mul)

;------------------------------------------------------------------------------------------
;コンボ補正
[State -2]
Type = VarSet
Trigger1 = 1
IgnoreHitPause = 1
FV = 0
Value = Floor(Floor(FVar(2)*100)*0.01*Floor(FVar(3)*100)*0.01*Floor((1.00-(0.08*FVar(4)))*100)*0.01*100)*0.01
SuperMoveTime = 9999
PauseMoveTime = 9999

[State -2]
Type = VarSet
Trigger1 = 1
IgnoreHitPause = 1
FV = 0
Value = Floor(FVar(0)*Floor(FVar(5)*100)*0.01*Floor(FVar(12)*100)*0.01*100)*0.01*FVar(13)
SuperMoveTime = 9999
PauseMoveTime = 9999

[State -2]
Type = VarSet
Trigger1 = FVar(0) < 0.01
IgnoreHitPause = 1
FV = 0
Value = 0.01
SuperMoveTime = 9999
PauseMoveTime = 9999


;---------------------------------------------------------------------------
;------------------------------------------------------------------------------------------
;ＥＸキャンセル補正
[State -2] 
Type = VarSet
Trigger1 = P2MoveType != H
Trigger2 = P2StateNo   = [120,155]
Trigger3 = P2StateNo   = [5200,5201]
IgnoreHitPause = 1
FV = 12
Value = 1.00

[State -2]
Type = VarSet
TriggerAll = StateNo = [32000,33099]
TriggerAll = Time = 1
Trigger1 = PrevStateNo = 1000
Trigger2 = PrevStateNo = 1200
Trigger3 = PrevStateNo = 1250
IgnoreHitPause = 1
FV = 12
Value = FVar(12)*0.65
SuperMoveTime = 9999
PauseMoveTime = 9999

;------------------------------------------------------------------------------------------
;---------------------------------------------------------------------------
;ダウン追い打ち判定
[State -2]
Type = VarSet
TriggerAll = Var(50) != 1
Trigger1 = RoundState != 2
Trigger2 = P2MoveType != H
Trigger2 = P2StateType != L
Trigger3 = P2StateNo = 5120
IgnoreHitPause = 1
V = 59
Value = 1

[State -2]
Type = VarSet
Trigger1 = P2MoveType = H
Trigger1 = P2StateType = L
IgnoreHitPause = 1
V = 59
Value = 2

[State -2]
Type = VarSet
Trigger1 = Var(59) = 2
Trigger1 = StateNo = 200 || StateNo = 400 || StateNo = 600
IgnoreHitPause = 1
FV = 25
Value = -1.9375 + 0.03125 * (Var(2))

[State -2]
Type = VarSet
Trigger1 = Var(59) = 2
Trigger1 = StateNo = 210 || StateNo = 215 || StateNo = 217 || StateNo = 410 || StateNo = 610
IgnoreHitPause = 1
FV = 25
Value = -2.25 + 0.03125 * (Var(2))

[State -2]
Type = VarSet
TriggerAll = Var(59) = 2
Trigger1 = StateNo = [220,230]
Trigger2 = StateNo = [420,439]
Trigger3 = StateNo = [620,639]
IgnoreHitPause = 1
FV = 25
Value = -2.5625 + 0.03125 * (Var(2))

[State -2]
Type = VarSet
Trigger1 = Var(59) = 2
Trigger1 = StateNo != [200,639]
Trigger1 = MoveType = A
IgnoreHitPause = 1
FV = 25
Value = -2.875 + 0.03125 * (Var(2))

[State -2]
Type = VarSet
Trigger1 = Var(59) = 1
IgnoreHitPause = 1
FV = 25
Value = 0
;------------------------------------------------------------------

[state -2,0]
type = null;explod
triggerall = facing = 1 && roundstate = 2
trigger1 = numexplod(4646)= 0
trigger1 = fvar(29)=0
trigger2 = fvar(29)<10
trigger2 = numexplod(4646)= 0
anim = 4646
id = 4646
postype = left
bindtime = -1
pos = 0,170
sprpriority = 97
ownpal = 1
scale = 0.1,0.1
supermove = 1
supermovetime = 999999999999999999
pausemovetime = 999999999999999999
removetime = 489786185489123153156165




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


;------------------------------------------------------------------------------------------
[State -1]
Type = Helper
Triggerall = NumHelper(11402) = 0
Trigger1 = projhit(1250)=1 
StateNo = 11402
ID = 11402
PosType = P2
Pos = 0,-50
Ownpal = 1
SprPriority = -1
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

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

[state a];七星ゲージ
type = Helper
trigger1 = Numpartner > 0
trigger1 = partner,Name = "zeroko"
trigger2 = fvar(17) = 1
triggerALL = palno = [1,6]
triggerall = numhelper(64000) = 0
id = 64000
name = "sichisei"
sprpriority = 10
pos = -50,-160
postype = front
stateno = 64000
helpertype = normal
pausemovetime = 0
bindtime = -1
keyctrl = 0 
ownpal = 1



[state a]
type = varset
trigger1 = var(49) <= 0
trigger2 = var(49) >= 7
trigger2 = fvar(27) = 1 
trigger2 = roundno >= 2
trigger2 = roundstate=0
v = 49
value = 0

[state a]
type = varset
trigger1 = var(49) <= 0
trigger1 = fvar(27) = 1 
fv = 27
value = 0

[state a]
type = varset
trigger1 = var(49) >= 7
v = 49
value = 7
;------------------------------------------------------------------

;味方が負ける
[State -1]
type = varset
triggerall = TeamMode = simul
trigger1 = partner,life = 0
trigger1 = var(0) <= 1
trigger1 = var(14) = 0
var(14) = 1
parsistent = 0

[State -1]
type = powerset
triggerall = roundstate = 2
trigger1 = statetype!= A
trigger1 = var(14) = 1
trigger1 = var(0) <= 1
value = 10000
parsistent = 0

[State -1]
type = ChangeState
value = 990
triggerall = var(14) = 1
trigger1 = power >= 3000
trigger1 = var(0) <= 1
trigger1 = roundstate = 2
trigger1 = statetype!= A 
trigger1 = movetype = I
;------------------------------------------------------------------

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

[State end]
type = ChangeState
trigger1 = anim = 6+var(0)*10000
trigger1 = animtime = 0
value = 11

[State var]
type = varset
trigger1 = teammode = turns
trigger2 = enemy,teammode = turns
var(52) = -1

[State var]
type = varset
trigger1 = var(52)>= 0
trigger1 = roundsexisted = 0
var(52) = 0



;==========================================

;---------------Special KO detect
[Statedef 169]
type = S
physics = S
anim = 999
poweradd = 0
sprpriority = -1
velset = 0,0
ctrl = 0
facep2 = 1

[State 169, 9]
type = ChangeState
trigger1 = AnimTime = 0
value = 169
