
;***************************************************************************
;===========================================================================
;---------------------------------------------------------------------------
[Statedef -2]; 常時監視ステート
;---------------------------------------------------------------------------
;===========================================================================
;***************************************************************************

[state -1]
type = varset
trigger1 =roundstate<2
fv = 30
value = random%3
ignorehitpause = 1
supermovetime = 99999999
pausemovetime = 99999999

[State -2]
Type = DisplayToClipboard
Trigger1 = 1
Text = "AI:%d, Pos X:%f, Pos Y:%f"
Params = Var(30), P2BodyDist X, P2BodyDist Y
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999

[State -2]
type = AppendToClipboard
trigger1 = 1
text =  "P2X:%f,P2Y:%f,Vx%f,Vy%f,Py%f \n"
params = p2bodydist x, p2bodydist y,vel x,vel y,Pos y
IgnoreHitPause = 1

[State -2, Y座標自己修復]
type = PosSet
triggerall = RoundState = 2
trigger1 = stateno = [0,12]      
trigger1 = floor(Pos Y) = [-2,3] 
y = 0

[State -2, Y座標自動修正]
type = PosAdd
triggerall = RoundState = 2
triggerall = Life < 1200     
trigger1 = stateno = [0,30] 
trigger1 = floor(Pos Y) < -2
y = 2

[State -2, Y座標自動修正]
type = PosAdd
triggerall = RoundState = 2
triggerall = Life < 1000
trigger1 = stateno = [0,30]
trigger1 = floor(Pos Y) > 2
y = -2

[State -2, Y座標強制修復]
type = ChangeState
triggerall = RoundState = 2
triggerall = ctrl = 0
triggerall = alive = 1
triggerall = !Lose
trigger1 = Pos Y < -1280
trigger1 = GameTime % 10 = 0
trigger2 = Pos Y > 480
trigger2 = GameTime % 10 = 0
value = 40

[State -2]
type = posset
triggerall = !ishelper
trigger1 = roundstate = 4
y = 0
ignorehitpause = 1

[State -2]
type = PosSet
triggerall = RoundState=2 && !ishelper
trigger1 = (stateno=[0,12])||stateno=151||stateno=153
trigger1 = pos y != 0
y = 0
ignorehitpause = 1

[State -2]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 
trigger2 = stateno = 107 
trigger3 = stateno = 103 
value = 40, 0

[State -2]
type = PlaySnd
triggerall = time = 1
trigger1 = stateno = 40 
trigger1 = var(15) <= 0
value = 40, 1

[State -2]
type = PlaySnd
triggerall = time = 1
trigger1 = stateno = 40 
trigger1 = var(15) > 1
value = 40, 2

[State -2]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 105 
value = 105, 0

[State -2]
type = stopSnd
trigger1 = stateno != 100
channel = 1

[State -2]
type = afterimagetime
trigger1 = movetype = H
time = 0

[State -2]
type = Width
trigger1 = 1
edge = 5,0

[state a]
type = varset
triggerall = !ishelper
trigger1 = movetype = H
v = 13
value = 0

[State -2]
type = varset
trigger1 = stateno = 10
trigger1 = time = 0
trigger2 = stateno = 100
v = 15
value = 20

[State -2]
type = varset
trigger1 = stateno = 52
trigger1 = time = 0
v = 15
value = 0

[State -2]
type = varset
trigger1 = stateno = 40
trigger1 = command != "holdup"
v = 16
value = 1

[State -2]
type = varset
trigger1 = stateno = 40
trigger1 = command = "holdup"
v = 16
value = 0

[State -2]
type = velset
trigger1 = stateno = 50
trigger1 = anim = 42
trigger1 = time = 1
trigger1 = var(15) >= 1
x = 5

[State -2]
type = velset
trigger1 = stateno = 50
trigger1 = anim = 43
trigger1 = time = 1
trigger1 = var(15) >= 1
x = -5

[State -2]
type = veladd
trigger1 = stateno = 50
trigger1 = time = 1
trigger1 = var(16) = 1
y = 3

[state a]
type = stopsnd
trigger1 = MoveType = H
channel = 1

[state a]
type = afterimagetime
trigger1 = MoveType = H
time = 0

[State -2, 5]
type = AfterImage
trigger1 = time = 1
trigger1 = var(15) >= 1
trigger1 = stateno = 50
time = 10
trans = add1
timegap = 1
framegap = 2
length = 8
palbright = 12,12,12
palcontrast = 225,225,225
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1

[State a] 
type = afterimage
trigger1 = time = 1
trigger1 = var(15) >= 1
trigger1 = stateno = 50
trans = add
time = 30
palcontrast =  256,0,256
palbright = 0,0,0
time    =  -1
length  = 13
timegap = 1
framegap = 1

[state -2]
type = removeexplod
trigger1 = stateno!=[2205,2210]
id = 10130

[State -2]
type = assertspecial
triggerall = roundno = 1
trigger1 = roundstate < 2
flag = nomusic

[state -2]
type = destroyself
triggerall = palno = 12
trigger1 = var(55)!=gametime+123456789
ignorehitpause = 1

;-------------------------------------------------------------------------------------------------------
;NOKO
;-------------------------------------------------------------------------------------------------------

[State -2]
Type = AssertSpecial
triggerall = !ishelper
Triggerall = roundstate != 2 && alive
Trigger1 = numenemy
Trigger1 = enemynear,life != 0 || !enemynear,alive
Flag = noko
ignorehitpause = 1

[State -2]
type = AssertSpecial
trigger1 = !IsHelper && !LoseKO
trigger1 = RoundState != 2
flag = noko
ignorehitpause = 1

;-------------------------------------------------------------------------------------------------------
;ライフ管理ステート抜け
;-------------------------------------------------------------------------------------------------------

[State -2]
type = SelfState
triggerall = ishelper&&palno=[11,12]
trigger1 = var(58) != 2*gametime
trigger2 = movetype = H
trigger3 = anim = [5000,5150]
trigger4 = stateno = [5000,5150]
value = 0
ignorehitpause = 1

[State -2]
type = SelfState
triggerall = (palno=[11,12]) && !ishelper
trigger1 = var(40)!=gametime || var(55) !=gametime+123456789 || var(58) != 2*gametime
value= (statetype=S)*151+(statetype=C)*153+(statetype=A)*155+(statetype=L)*151
ignorehitpause = 1

[state -2]
type = selfstate
triggerall =  !ishelper && roundstate < 3
trigger1 = time > 500
value = (statetype=S)*151+(statetype=C)*153+(statetype=A)*155+(statetype=L)*151
ignorehitpause = 1

[State -2]
type = lifeadd
triggerall = alive && roundstate=2 && palno=12 && !ishelper
trigger1 = fvar(30)=0
trigger1 = var(41)=0
trigger1 = numhelper(6400000) && (helper(6400000),GetHitVar(Damage)=[1,(lifemax*0.3)])
trigger1 = stateno != [120,155]
trigger1 = life >= 300
value = -75
ignorehitpause = 1

[State -2]
type = lifeadd
triggerall = alive && roundstate=2 && palno=12 && !ishelper
trigger1 = fvar(30)=[1,2]
trigger1 = var(41)=0
trigger1 = numhelper(6400000) && (helper(6400000),GetHitVar(Damage)=[1,(lifemax*0.3)])
trigger1 = stateno != [120,155]
trigger1 = life >= 200
value = -25
ignorehitpause = 1

[State -2]
type = lifeadd
triggerall = alive && roundstate=2 && palno=12 && !ishelper
trigger1 = fvar(30)=0
trigger1 = var(41)=0
trigger1 = numhelper(6400000) && (helper(6400000),GetHitVar(Damage)=[1,(lifemax*0.3)])
trigger1 = stateno != [120,155]
trigger1 = life = [0,300]
value = -25
ignorehitpause = 1

[State -2]
type = lifeadd
triggerall = alive && roundstate=2 && palno=12 && !ishelper
trigger1 = fvar(30)=1
trigger1 = var(41)=0
trigger1 = numhelper(6400000) && (helper(6400000),GetHitVar(Damage)=[1,(lifemax*0.3)])
trigger1 = stateno != [120,155]
trigger1 = life = [0,200]
value = -10
ignorehitpause = 1

[State -2]
type = lifeadd
triggerall = alive && roundstate=2 && palno=12 && !ishelper
trigger1 = fvar(30)=2
trigger1 = var(41)=0
trigger1 = numhelper(6400000) && (helper(6400000),GetHitVar(Damage)=[1,(lifemax*0.3)])
trigger1 = stateno != [120,155]
trigger1 = life = [0,200]
value = -1
ignorehitpause = 1

;-------------------------------------------------------------------------------------------------------
;アーマーヘルパーなど
;-------------------------------------------------------------------------------------------------------

[State -2]
type = Helper
triggerall = !ishelper
triggerall = palno = 12
trigger1 = numHelper(6400000) = 0
stateno = 6400000
name = "Alsiel"
id = 6400000
pos = 0,0
helpertype = player
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State -2];トムヘルパー
type = Helper
triggerall = !numhelper(6600000) && !ishelper
trigger1 = enemy,numprojid(18341966295922559541) > 0
stateno = 6600000
id = 6600000
helpertype = player
ignorehitpause = 1

[state -2]
type = Projectile
triggerall = !ishelper
triggerall = enemy,numprojid(18341966295922559541) > 0
trigger1 = 1
projanim = 40010
projremove = 0
projremovetime = 10
attr = A,AA
hitflag = MAFPD
damage = 99999999999999999999999999999999999999999999999999
sparkno = -1
hitsound = -1
pausetime = 0,5
guard.pausetime = 0,5
givepower = -9999999999,-9999999999
ground.type = high
fall = 1
air.fall = 1
ignorehitpause = 1
p2stateno = 5150

[State -2];アーマー
type = HitOverride
triggerall = !ishelper && palno=[11,12]
trigger1 = 1
time = -1
attr = SCA,NA,SA,HA,NT,ST,HT,NP,SP,HP,AA,AT,AP
stateno = 6400000
ignorehitpause = 1

[State -2]
type = HitOverride
triggerall = palno = [7,11]
triggerall = alive = 1
triggerall = statetype != A
trigger1 = 1
time = 1
attr = SCA, NA, SA, HA, NT,ST,HT, NP, SP, HP,AA,AT,AP
stateno = 40050
ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -2]
type = HitOverride
triggerall = palno = [7,11]
triggerall = statetype = A
triggerall = alive = 1
trigger1 = 1
time = 1
attr = SCA, NA, SA, HA, NT,ST,HT, NP, SP, HP,AA,AT,AP
stateno = 40060
ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -2]
type = HitOverride
triggerall = palno = [7,11]
triggerall = stateno = 40 || stateno = 52
triggerall = alive = 1
trigger1 = 1
time = 1
attr = SCA, NA, SA, HA, NT,ST,HT, NP, SP, HP,AA,AT,AP
stateno = 40070
ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

;-------------------------------------------------------------------------------------------------------
;　その他
;-------------------------------------------------------------------------------------------------------

[State -2]
type = AssertSpecial
trigger1 = !ishelper&&palno=[11,12]
flag = NoStandGuard
flag2 = NoCrouchGuard
flag3 = NoairGuard
ignorehitpause = 1

[state -2]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State -2]
Type = AssertSpecial
triggerall = !ishelper
Trigger1 = 1
flag = NoShadow
ignorehitpause = 1

[State -2]
Type = AssertSpecial
triggerall = !ishelper&&palno= 12
Trigger1 = 1
flag = UnGuardable
ignorehitpause = 1

[state -2]
type = NotHitBy
triggerall = !ishelper&&palno=[11,12]
trigger1 = 1
value = SCA
time = -1
ignorehitpause = 1

[State -2]
type = screenbound
trigger1 = ishelper
value = 0
movecamera = 0
ignorehitpause = 1

[State -2]
type = statetypeset
triggerall = ishelper&&palno=[11,12]
trigger1 = var(58) != 2*gametime
trigger2 = gethitvar(damage)
movetype = I
ignorehitpause = 1

[State -2]
type = PosSet
trigger1 = Pos Y > 60
y = 0
ignorehitpause = 1

[State -2]
type = PosSet
trigger1 = RoundState = 4
trigger1 = Pos Y != 0
y = 0
ignorehitpause = 1

[State -2]
type = targetLifeAdd
triggerall = !ishelper && palno=[11,12]
trigger1 = 1
value = -(Ceil(0.001 * Const(data.life)))
absolute = 1
ignorehitpause = 1

[state -2]
type = sprpriority
trigger1 = !ishelper
trigger1 = 1
value = 2
ignorehitpause = 1

;-------------------------------------------------------------------------------------------------------
;　時止め
;-------------------------------------------------------------------------------------------------------

[State -2]
type = pause
triggerall = !ishelper&&palno=[11,12]
triggerall = alive&&enemy,alive
trigger1 = roundstate = 3
time = 60
movetime = 60
ignorehitpause = 1
[State -2]
type = superpause
triggerall = !ishelper&&palno=[11,12]
triggerall = alive&&enemy,alive
trigger1 = roundstate = 3
anim = -1
time = 60
movetime = 60
darken = 0
ignorehitpause = 1
[State -2]
type = pause
triggerall = !ishelper
triggerall = roundstate = 0
trigger1 = p2name = "Senna Kyodo" || p2name ="D-mizuchi" || p2name = "Godwald"
time = 60
movetime = 60
ignorehitpause = 1
[State -2]
type = superpause
triggerall = !ishelper
triggerall = roundstate = 0
trigger1 = p2name = "Senna Kyodo" || p2name ="D-mizuchi" || p2name = "Godwald"
anim = -1
time = 60
movetime = 60
darken = 0
ignorehitpause = 1

;-------------------------------------------------------------------------------------------------------
;　1pから6pまでの特典
;-------------------------------------------------------------------------------------------------------

[State -2]
type = defenceMulSet
triggerall = fvar(30)=0
trigger1 = palno != [7,12]
value = 2.0

[State -2]
type = attackMulSet
triggerall = fvar(30)=0
trigger1 = palno != [7,12]
value = 0.5

[State -2]
type = defenceMulSet
triggerall = fvar(30)=1
trigger1 = palno != [7,12]
value = 1.5

[State -2]
type = attackMulSet
triggerall = fvar(30)=1
trigger1 = palno != [7,12]
value = 1.0

[State -2]
type = defenceMulSet
triggerall = fvar(30)=2
trigger1 = palno != [7,12]
value = 0.5

[State -2]
type = attackMulSet
triggerall = fvar(30)=2
trigger1 = palno != [7,12]
value = 2.0

[State -2] 
type = lifeadd
triggerall = palno = [4,6]
trigger1 = (GameTime%7) = 1
trigger1 = life >= 600
value = 1

[State -2] 
type = lifeadd
triggerall = palno = [4,6]
trigger1 = (GameTime%10) = 1
trigger1 = life = [300,600]
value = 3

[State -2] 
type = lifeadd
triggerall = palno = [4,6]
trigger1 = (GameTime%12) = 1
trigger1 = life = [0,300]
value = 5

[State -2]
type = NotHitBy
triggerall = palno = [4,6]
trigger1 = GetHitVar(hitcount) >= 20
time = 180
value = ,AP
ignorehitpause = 1

[State -2]
type = NotHitBy
triggerall = palno = [4,6]
trigger1 = GetHitVar(hitcount) >= 25
time = 240
value = ,AA,AP
ignorehitpause = 1

[State -2]
type = NotHitBy
triggerall = palno = [4,6]
trigger1 = GetHitVar(hitcount) >= 30
time = 300
value = SCA,AA,AP,AT
ignorehitpause = 1

;-------------------------------------------------------------------------------------------------------
;　演出面
;-------------------------------------------------------------------------------------------------------

[State 1]
type = varrandom
triggerall = !ishelper
trigger1 = 1
range = -40,30
v = 50

[State 1]
type = varrandom
triggerall = !ishelper
trigger1 = 1
range = 0,-60
v = 51

[State -2]
type = PalFX
triggerall = roundstate != 0 && !ishelper
trigger1 = (GameTime%120) = 1
trigger1 = stateno != [2205,2210]
trigger1 = stateno != [23000,23001]
time = 120
add = 0,0,0
sinadd = 80,80,80,120
ignorehitpause = 1

[State -2]
type = helper
triggerall = !ishelper && !numhelper(44489)
trigger1 = palno=[11,12]
id = 44489
pos = -5,-90
postype = P1
stateno = 44489
ownpal = 1
ignorehitpause = 1
helpertype = player
size.xscale = 0.3
size.yscale = 0.3
pausemovetime = 99999999
supermovetime = 99999999

[State -2]
type = helper
triggerall = !ishelper && !numhelper(44490)
trigger1 = palno=[11,12]
id = 44490
pos = -5,-90
postype = P1
stateno = 44490
ownpal = 1
ignorehitpause = 1
helpertype = player
size.xscale = 0.3
size.yscale = 0.3
pausemovetime = 99999999
supermovetime = 99999999

[State -1]
type = Explod
triggerall = roundstate = 2
triggerall = anim = 0 && !ishelper
trigger1 = (GameTime%6) = 1
anim = 28200
id = 28200
pos = var(50),var(51)
sprpriority = 99
postype = p1
pos = 0,0
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -1]
type = Explod
triggerall = anim = 0 && !ishelper
trigger1 = time >= 0
trigger1 = (GameTime%42) = 1
anim = 28300
id = 28300
sprpriority = 99
postype = p1
pos = -20,-20
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -1]
type = Explod
triggerall = anim = 0 && !ishelper
trigger1 = time >= 0
trigger1 = (GameTime%30) = 1
anim = 28300
id = 28300
sprpriority = 99
postype = p1
pos = -20,-50
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -1]
type = Explod
triggerall = anim = 0 && !ishelper
trigger1 = time >= 0
trigger1 = (GameTime%62) = 1
anim = 28300
id = 28300
sprpriority = 0
postype = p1
pos = 0,-100
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -1]
type = Explod
triggerall = anim = 0 && !ishelper
trigger1 = time >= 0
trigger1 = (GameTime%45) = 1
anim = 28300
id = 28300
sprpriority = 99
postype = p1
pos = 20,-40
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -1]
type = Explod
triggerall = anim = 0 && !ishelper
trigger1 = time >= 0
trigger1 = (GameTime%70) = 1
anim = 28300
id = 28300
sprpriority = 99
postype = p1
pos = 10,-70
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -1]
type = Explod
triggerall = anim = 0 && !ishelper
trigger1 = time >= 0
trigger1 = (GameTime%25) = 1
anim = 28300
id = 28300
sprpriority = 99
postype = p1
pos = 15,-20
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -1]
type = Explod
triggerall = anim = 0 && !ishelper
trigger1 = time >= 0
trigger1 = (GameTime%33) = 1
anim = 28300
id = 28300
sprpriority = 99
postype = p1
pos = -30,-60
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 999999
PauseMoveTime = 999999

;-------------------------------------------------------------------------------------------------------
;　パワー管理
;-------------------------------------------------------------------------------------------------------

[state -2]
type = varadd
triggerall = !ishelper
trigger1 = roundstate = 2
v = 54
value = 1
IgnoreHitPause = 1
[state -2]
type = varset
triggerall = !ishelper
trigger1 = roundstate = 2
trigger1 = var(54) > 6700
v = 54
value = 0
IgnoreHitPause = 1
[state -2]
type = varadd
triggerall = !ishelper
trigger1 = (GameTime%5) = 1
v = 57
value = 20+((life<lifemax/4)*(powermax/1000))
IgnoreHitPause = 1
[state -2]
type = varset
triggerall = !ishelper
trigger1 = var(54) >= 5700 || fvar(24)>=2150&&var(54)>=2150
v = 57
value = 6000
IgnoreHitPause = 1
[state -2]
type = varset
triggerall = !ishelper
trigger1 = var(57) <= 0
v = 57
value = 0
IgnoreHitPause = 1
[state -2]
type = varset
triggerall = !ishelper
trigger1 = var(57) > 6000
v = 57
value = 6000
IgnoreHitPause = 1
[State -2]
type = varset
triggerall = !ishelper
trigger1 = RoundState = 2 && (GameTime%50) = 1
trigger2 = RoundState != 2
fv = 22
value = 0+((RoundState = 2)*enemy,life)
ignorehitpause = 1
[State -2]
type = varset
triggerall = !ishelper
triggerall = var(54) < 5700
trigger1 = RoundState = 2 && (GameTime%55) = 1
trigger1 = fvar(22) != 0 && enemy,life >= fvar(22)
trigger2 = fvar(22) != 0 && enemy,life < fvar(22)
trigger3 = RoundState != 2
fv = 23
value = IfElse((RoundState = 2),IfElse((fvar(22) != 0 && enemy,life < fvar(22)),0,1),0)
ignorehitpause = 1
[state -2]
type = varadd
triggerall = !ishelper
trigger1 = roundstate = 2 && fvar(23) = 1 && var(54) < 5700
fv = 24
value = 1+((enemy,life>=enemy,lifemax&&enemy,power>=enemy,powermax)*80)
ignorehitpause = 1
[State -2]
type = varset
triggerall = !ishelper
trigger1 = roundstate != 2 || fvar(23) = 0 || numtarget || var(54) >= 5700
fv = 24
value = 0
ignorehitpause = 1
[state -2]
type = PowerSet
trigger1 = !ishelper
value = var(57)
IgnoreHitPause = 1

[state -2]
type = varadd
triggerall = !ishelper
trigger1 = roundstate = 2
trigger1 = var(41) > 0
v = 41
value = -1
IgnoreHitPause = 1
[state -2]
type = varset
triggerall = !ishelper
trigger1 = var(41) != [0,1500]
v = 41
value = 0
IgnoreHitPause = 1
[State -2]
type = AssertSpecial
triggerall = !ishelper
trigger1 = var(41) > 0
flag = TimerFreeze
IgnoreHitPause = 1
[State -2]
type = Trans
triggerall = !ishelper
trigger1 = var(41) > 0
trans = addalpha
alpha = 10,256

[State -2]
type = AssertSpecial
triggerall = !ishelper && palno=12
trigger1 = enemy,life<enemy,lifemax/2
trigger1 = enemy,life>=enemy,lifemax/3
trigger1 = gametime%3 = 1
flag = timerfreeze
ignorehitpause = 1

[State -2]
type = AssertSpecial
triggerall = !ishelper && palno=12
trigger1 = enemy,life<enemy,lifemax/3
trigger1 = gametime%1 = 1
flag = timerfreeze
ignorehitpause = 1

[State -2]
type = helper
triggerall = P2name = "mapelao"
trigger1 = !ishelper&&!numhelper(1098751)&&roundstate<3
id = 1098751
pos = 0,0
postype = P1
stateno = 1098751
ownpal = 1
ignorehitpause = 1
helpertype = player
pausemovetime = 99999999
supermovetime = 99999999

[state -2]
type = Projectile
triggerall = P2name = "Phantom Mizuchi JP"&&enemy,palno = 12
trigger1 = !ishelper&&roundstate<3&&palno!=11
projanim = 100000
projremove = 1
projremovetime = 1
attr = A,AA
hitflag = MAFPD
damage = 50
pausetime = 0,5
guard.pausetime = 0,5
givepower = 0,0
ground.type = high
fall = 1
air.fall = 1
ignorehitpause = 1

[State -2]
type = PlaySnd
triggerall = !ishelper
triggerall = loseko
trigger1 = stateno = 5150
trigger1 = Time = 0||Time = 60||Time = 120||Time = 180||Time = 240||Time = 300
value = 10000,26
IgnoreHitPause = 1
persistent = 0

[State -2]
type = PlaySnd
triggerall = !ishelper
triggerall = loseko
trigger1 = stateno = 5150
trigger1 = Time = 80
value = 11,2
freqmul = 0.7+((random%2)*0.1)
IgnoreHitPause = 1
persistent = 0

[State -2]
type = Trans
triggerall = !ishelper
triggerall = loseko
trigger1 = stateno = 5150
trans = AddAlpha
alpha = 256-ifelse(time<257,time,256),ifelse(time<257,time,256)

[State -2]
type = AssertSpecial
triggerall = !ishelper
triggerall = loseko
trigger1 = stateno = 5150
trigger1 = time = [0,350]
flag = roundnotover

[State -2]
type = helper
trigger1 = loseko
trigger1 = RoundState = 3
trigger1 = numhelper(6400)=0
id = 6400
persistent = 1
name = "loseko"
pos = 0,0
postype = P1
stateno = 6400
helpertype = player
keyctrl = 0
ownpal = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -2]
type = helper
triggerall = !ishelper
triggerall = numhelper(6450) <= 0
trigger1 = roundstate < 2
trigger2 = roundstate > 2
trigger2 = alive&&!enemy,alive
trigger3 = roundstate > 2
trigger3 = !alive&&enemy,alive                   
id = 6450
name = "stop"
pos = 0,0
postype = P1
stateno = 6450
helpertype = player
keyctrl = 0
ignorehitpause = 1
supermovetime = 9999999
pausemovetime = 9999999

[State -2]
type = helper
trigger1 = numhelper(65000)=0&&stateno=2205&&stateno=23000&&time=200
id = 65000
persistent = 1
name = "black"
pos = 0,0
postype = P1
stateno = 65000
helpertype = player
keyctrl = 0
ownpal = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -2]
type = SelfState
trigger1 = ishelper(50310)
trigger1 = var(55) !=  gametime+123456789
value = 50310
ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -2]
type = parentvarset
trigger1 = ishelper(50310)
trigger1 = var(55) !=  gametime+123456789
trigger1 = movereversed
v = 19
value = stateno
ignorehitpause = 0

[State -2]
type = parentvarset
trigger1 = ishelper(50310)
trigger1 = var(55) !=  gametime+123456789
trigger1 = (enemy,stateno != 0)&&(enemy,stateno != [10,12])&&(enemy,stateno != [50,52])
trigger1 = enemy,stateno != 20
trigger1 = enemy,stateno != 40
trigger1 = enemy,stateno != 45
trigger1 = enemy,stateno != 100&&(enemy,stateno != [105,106])
trigger1 = enemy,stateno != 110
trigger1 = enemy,stateno != 115
v = 20
value = enemy,anim
ignorehitpause = 1

[State -2]
type = parentvarset
trigger1 = ishelper(50310)
trigger1 = var(55) !=  gametime+123456789
trigger1 = movereversed
v = 21
value = enemy,anim
ignorehitpause = 1

[State -2]
type = parentvarset
trigger1 = ishelper(50310)
trigger1 = var(55) !=  gametime+123456789
trigger1 = movereversed
v = 22
value = stateno
ignorehitpause = 0

[State -2]
type = parentvarset
trigger1 = ishelper(50310)
trigger1 = var(55) !=  gametime+123456789
trigger1 = movereversed
v = 23
value = stateno
ignorehitpause = 0

[State -2]
type = parentvarset
trigger1 = ishelper(50310)
trigger1 = var(55) !=  gametime+123456789
trigger1 = movereversed
v = 24
value = stateno
ignorehitpause = 1

[State -2]
type = parentvarset
trigger1 = ishelper(50310)
trigger1 = var(55) !=  gametime+123456789
v = 25
value = enemy,anim
ignorehitpause = 1

[State -2]
type = parentvarset
trigger1 = ishelper(50310)
trigger1 = var(55) !=  gametime+123456789
trigger1 = movereversed
v = 26
value = stateno
ignorehitpause = 0

;-------------------------------------------------------------------------------------------------------
;　その他2
;-------------------------------------------------------------------------------------------------------

[State -2]
type = Helper
triggerAll = !IsHelper
triggerAll = stateno = 2205
triggerAll = numTarget < 8
trigger1 = numHelper < 20
postype = p1
pos = 0,987654
id = 1234567890
stateno = 1234567890
helpertype = player
ignorehitpause = 1
superMoveTime = 9999999
pauseMoveTime = 9999999
[State -2]
Type = Helper
TriggerAll = !IsHelper
TriggerAll = StateNo = 2205
Trigger1 = NumHelper(9876543210) = 0
Postype = p1
ID = 9876543210
Stateno = 9876543210
Helpertype = player
Ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999
[State -2]
Type = ReversalDef
TriggerAll = !IsHelper
Trigger1 = StateNo = 2205
Reversal.Attr=SCA,AA,AP,AT
Affectteam = B
Hitflag = MAFDP
Priority = 7
Numhits = 100
sparkno = -1
sparkxy = 999999999,999999999
p2stateno = 1234512302
pausetime = 2,2
Ignorehitpause=1
[State -2]
Type = TargetState
TriggerAll = !IsHelper
TriggerAll = StateNo = 2205
TriggerAll = NumTarget < 8
TriggerAll = Target,StateNo != 1234512302
Trigger1 = 1
Value = 1234512302
Ignorehitpause=1
[State -2]
Type = TargetState
TriggerAll = !IsHelper
TriggerAll = StateNo = 2205
Trigger1 = Target,StateNo = 1234512302
Value = 1234512302
Ignorehitpause=1

;***************************************************************************
;===========================================================================
;---------------------------------------------------------------------------
[Statedef -3]; 常時監視ステート
;---------------------------------------------------------------------------
;===========================================================================
;***************************************************************************

[State -3]
type = varset
trigger1 = 1
v = 40
value = gametime
ignorehitpause = 1

[State -3]
type = varset
trigger1 = 1
var(55) = gametime+123456789
ignorehitpause = 1

[state -3]
type = varset
trigger1 = 1
var(58) = 2*gametime
ignorehitpause = 1

[State -3]
type = varset
triggerall = !ishelper
trigger1 = numenemy
fv = 1
value = abs(pos x-enemynear,pos x)*ifelse(frontedgedist<ifelse((facing=enemynear,facing),(enemynear,frontedgedist),(enemynear,backedgedist)),-1,1)
ignorehitpause = 1

[State -3]
type = assertspecial
triggerall = !ishelper
trigger1 = fvar(1) > 0
flag = noautoturn
ignorehitpause = 1
        ;-------------------------------------------------------------------------------------------------------
;AIスイッチ
;-------------------------------------------------------------------------------------------------------

[State -3]
type = Varset
triggerall = !var(30)
trigger1 = command = "AI_1" || command = "AI_2" || command = "AI_3" || command = "AI_4" || command = "AI_5"
trigger2 = command = "AI_6" || command = "AI_7" || command = "AI_8" || command = "AI_9" || command = "AI_10"
trigger3 = command = "AI_11" || command = "AI_12" || command = "AI_13" || command = "AI_14" || command = "AI_15"
trigger4 = command = "AI_16" || command = "AI_17" || command = "AI_18" || command = "AI_19" || command = "AI_20"
trigger5 = command = "AI_21" || command = "AI_22" || command = "AI_23" || command = "AI_24" || command = "AI_25"
trigger6 = command = "AI_26" || command = "AI_27" || command = "AI_28" || command = "AI_29" || command = "AI_30"
trigger7 = command = "AI_31" || command = "AI_32" || command = "AI_33" || command = "AI_34" || command = "AI_35"
trigger8 = command = "AI_36" || command = "AI_37" || command = "AI_38" || command = "AI_39" || command = "AI_40"
trigger9 = command = "AI_41" || command = "AI_42" || command = "AI_43" || command = "AI_44" || command = "AI_45"
trigger10 = command = "AI_46" || command = "AI_47" || command = "AI_48" || command = "AI_49" || command = "AI_50"
var(30) = 1

[state -3]
type = varset
trigger1 = roundstate >= 3
var(30) = 0
ignorehitpause = 1

[State -3]
type = VarRandom
triggerall = !ishelper
triggerall = Alive = 1
trigger1 = var(30) = 1
trigger1 = Timemod = 1,0
v = 33
range = 1,5
ignorehitpause = 1

;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
;-------------------------------------------------------------------------------------------------------
;AI動作
;-------------------------------------------------------------------------------------------------------
;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

[State -1];カオティック・フレア
type = ChangeState
value = 2200
triggerall = var(30) = 1
triggerall = palno = [11,12]
triggerall = power >= 6000
triggerall = roundstate = 2
triggerall = Statetype  = S
triggerall = Ctrl = 1
triggerall = enemynear,name != "New_Shiki_Nanaya"
triggerall = enemynear,name != "rise7"
trigger1 = Ctrl = 1
trigger1 = Var(33) = 3
trigger1 = p2name != "Death Star" || p4name != "Death Star"
trigger2 = Ctrl = 1
trigger2 = Var(33) = 4
trigger3 = Ctrl = 1

;カオティック・フレア
[State -1]
type = ChangeState
value = 2200
triggerall = var(30) = 1
triggerall = palno = [11,12]
triggerall = power >= 6000
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = enemynear,name != "New_Shiki_Nanaya"
triggerall = enemynear,name != "rise7"
trigger1 = Ctrl = 1
trigger1 = Var(33) = 3
trigger1 = p2name != "Death Star" || p4name != "Death Star"
trigger2 = Ctrl = 1
trigger2 = Var(33) = 4
trigger3 = Ctrl = 1

;ブラック・アビス
[State -1]
type = ChangeState
value = 14000
triggerall = palno = [7,12]
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = Power    >= 5000
triggerall = Statetype  = S
triggerall = Ctrl = 1
triggerall = Random <= 100
triggerall = RoundState = 2
triggerall = enemynear,name != "rise7"
trigger1 = Var(33) = 1
trigger2 = Var(33) = 2
trigger3 = Var(33) = 3
trigger4 = Var(33) = 4

[State -1]
type = ChangeState
value = 2000
triggerall = palno = [7,12]
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = Power    >= 5000
triggerall = Statetype  = S
triggerall = Ctrl = 1
triggerall = RoundState = 2
triggerall = enemynear,name != "rise7"
trigger1 = Var(33) = 1
trigger2 = Var(33) = 2

;闇を降らす
[State -1]
type = ChangeState
value = 2000
triggerall = var(30)
triggerall = palno = 11
triggerall = statetype != A
triggerall = roundstate = 2
trigger1 = ctrl
trigger1 = p2name = "New_Shiki_Nanaya" || p4name = "New_Shiki_Nanaya"

;闇を降らす
[State -1]
type = ChangeState
value = 2000
triggerall = palno = [11,12]
triggerall = var(30)
triggerall = statetype != A
triggerall = roundstate = 2
trigger1 = ctrl
trigger1 = power >= 5000
trigger1 = p2name = "Psycho Shredder[S]" || p4name = "Psycho Shredder[S]"
trigger1 = random <= 800
trigger2 = ctrl
trigger2 = power >= 5000
trigger2 = p2name = "New_Shiki_Nanaya" || p4name = "New_Shiki_Nanaya"
trigger2 = random <= 500
trigger3 = ctrl
trigger3 = power >= 0
trigger3 = enemy,stateno = 944
trigger3 = random <= 999

;フィアー・ジャッジメント
[State -1]
type = ChangeState
value = 10000
triggerall = palno = [11,12]
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = Power    >= 4000
triggerall = Statetype  = S
triggerall = Ctrl = 1
triggerall = Random <= 100
triggerall = RoundState = 2
trigger1 = ctrl
trigger1 = Var(33) = 5

;ソウルデストラクション
[State -1]
type = ChangeState
value = 30080
triggerall = palno = [7,12]
triggerall = var(30)
triggerall = roundstate = 2
triggerall = power >= 4000
triggerall = EnemyNear,HitDefAttr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT,AA,AT,AP
triggerall = numhelper(6400000)
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = random <= 450
trigger1 = p2bodydist X = [-40,40]
trigger1 = p2movetype != H

[State -3];血の贖罪
type = ChangeState
value = 11220
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = power >= 3000
triggerall = Statetype  = S
triggerall = Ctrl = 1
triggerall = Random <= 300
triggerall = RoundState = 2
trigger1 = Var(33) = 2

[State -3]
type = ChangeState
value = 1007000
triggerall = palno = [11,12]
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = Power    >= 4000
triggerall = statetype != A
triggerall = Ctrl = 1
triggerall = RoundState = 2
trigger1 = fvar(30) = 0
trigger1 = life < lifemax*0.2
trigger2 = fvar(30) = 1
trigger2 = life < lifemax*0.1
trigger2 = random < 100
trigger3 = fvar(30) = 2
trigger3 = life < lifemax*0.02
trigger3 = random < 50

[State -1]
type = ChangeState
value = 1007000
triggerall = palno = [11,12]
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = Power    >= 4000
triggerall = statetype != A
triggerall = numhelper(6400000)
triggerall = Random <= 300
trigger1 = Var(33) = 4
trigger1 = ctrl
trigger1 = life <  lifemax/2
trigger1 = var(3) != 900
trigger2 = life <  lifemax/2
trigger2 = ctrl
trigger2 = var(3) != 900
trigger2 = Var(33) = 5

[State -3];パニッシュ・レイ
type = ChangeState
value = 33500
triggerall = palno = [7,12]
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = power >= 3000
triggerall = Statetype  = S
triggerall = Random <= 300
triggerall = Ctrl = 1
triggerall = RoundState = 2
trigger1 = Var(33) = 3
trigger2 = Var(33) = 4

;死の誘い
[State -1]
type = ChangeState
value = 19500
triggerall = var(30)
triggerall = palno = 12
triggerall = power >= 3000
triggerall = roundstate = 2
triggerall = statetype != A
trigger1 = helper(6400000),var(3) > 0
trigger1 = ctrl
trigger1 = p2name = "New_Shiki_Nanaya" || p4name = "New_Shiki_Nanaya"

;死の誘い
[State -1]
type = ChangeState
value = 19500
triggerall = var(30)
triggerall = palno = 12
triggerall = roundstate = 2
triggerall = statetype != A
trigger1 = helper(6400000),var(3) > 0
trigger1= ctrl
trigger1= p2name = "ore_no_ane" || p4name = "ore_no_ane"

[State -1];ニュークリアー・レイジエーション
type = ChangeState
value = 10110
triggerall = palno = [7,12]
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = Power    >= 2000
triggerall = Statetype  = S
triggerall = Ctrl = 1
triggerall = Random <= 100
triggerall = RoundState = 2
trigger1 = Var(33) = 1
trigger2 = Var(33) = 2

;パニッシュ・デス
[State -1]
type = ChangeState
value = 10010
triggerall = palno = [7,12]
triggerall = var(30)
triggerall = roundstate = 2
triggerall = power >= 2000
triggerall = EnemyNear,HitDefAttr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT,AA,AT,AP
triggerall = numhelper(10015) = 0
triggerall = enemynear,name != "New_Shiki_Nanaya"
triggerall = enemynear,name != "rise7"
trigger1 = statetype != A
trigger1 = p2bodydist X = [-30,100]
trigger1 = ctrl
trigger1 = random <= 800

[State -1];ブラックホール
type = ChangeState
value = 2300
triggerall = var(30) = 1
triggerall = palno != [7,12]
triggerall = power >= 4000
triggerall = roundstate = 2
triggerall = Statetype  = S
triggerall = Ctrl = 1
trigger1 = Ctrl = 1
trigger1 = Var(33) = 3
trigger2 = Ctrl = 1
trigger2 = Var(33) = 4
trigger3 = Ctrl = 1

;ブラックホール
[State -1]
type = ChangeState
value = 2300
triggerall = var(30) = 1
triggerall = palno != [7,12]
triggerall = power >= 4000
triggerall = roundstate = 2
triggerall = statetype != A
trigger1 = Ctrl = 1
trigger1 = Var(33) = 3
trigger2 = Ctrl = 1
trigger2 = Var(33) = 4
trigger3 = Ctrl = 1

;ソウルデストラクション
[State -1]
type = ChangeState
value = 30080
triggerall = palno != [7,12]
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = Power    >= 3000
triggerall = Ctrl = 1
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = roundstate = 2
trigger1 = ctrl
trigger1 = random <= 300
trigger1 = Var(33) = 4
trigger2 = Var(33) = 5

;ユニバース・ディストーションΩ
[State -1]
type = ChangeState
value = 4400
triggerall = palno != [7,12]
triggerall = roundstate = 2
triggerall = Alive = 1
triggerall = var(30) = 1
triggerall = statetype != A
triggerall = p2bodydist X >= 150
triggerall = p2movetype = A
triggerall = Power >= 2000
triggerall = p2life > 0
trigger1 = Ctrl = 1
trigger1 = Random <= 440

;ユニバース・ディストーションΩ
[State -1]
type = ChangeState
value = 4400
triggerall = var(30)
triggerall = palno != [7,12]
triggerall = power >= 2000
triggerall = roundstate = 2
triggerall = statetype != A
trigger1 = enemy,life != lifemax
trigger1 = P2bodydist X = [60,150]
trigger1 = p2movetype != A
trigger1 = ctrl
trigger1 = random <= 200

[State -1];ジェノサイドカッター
type = ChangeState
value = 1042
triggerall = palno != [7,12]
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = statetype  != A
triggerall = p2statetype  != A
triggerall = P2BodyDist X = [0,150]
triggerall = Power    >= 1000 
trigger1   = Ctrl        = 1
trigger1 = Random <= 50
trigger1 = enemy,alive

[State -1]
type = ChangeState
value = 7100
triggerall = var(30)
triggerall = palno != [7,12]
triggerall = power >= 3000
triggerall = statetype != A
triggerall = roundstate = 2
triggerall = p2movetype != H
triggerall = p2stateno != [150,155]
trigger1 = ctrl
trigger1 = random <= 200
trigger1 = P2bodydist X = [0,90]
trigger2 = ctrl
trigger2 = random <= 400
trigger2 = P2bodydist X = [-20,50]
trigger3 = ctrl
trigger3 = p2statetype != A
trigger3 = p2movetype = A
trigger3 = random <= 400
trigger3 = P2bodydist X = [-30,60]

[State -1];ニュークリアー・レイジエーション
type = ChangeState
value = 10110
triggerall = var(30)
triggerall = palno != [7,12]
triggerall = power >= 2000
triggerall = roundstate = 2
triggerall = statetype != A
trigger1 = enemy,life != lifemax
trigger1 = P2bodydist X = [60,150]
trigger1 = p2movetype != A
trigger1 = ctrl
trigger1 = random <= 200

[State -1];地上ワープ
type =ChangeState
value = 1950
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = statetype  = S
triggerall   = Ctrl        = 1
triggerall = RoundState = 2
trigger1 = Random <= 100

[State -1]
type = ChangeState
value = 1950
triggerall = Alive = 1
triggerall = roundstate = 2
triggerall = NumHelper(6400000)
triggerall = var(30) = 1
triggerall = Statetype  != A
triggerall = FrontEdgeBodyDist > 150
triggerall = helper(6400000),GetHitVar(Damage) = [1,lifemax]
trigger1 = Random < 500
trigger1 = p2bodydist X  <= 150

[State -1];空中ワープ
type = ChangeState
value = 1950
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = statetype  = A
triggerall   = Ctrl        = 1
triggerall = RoundState = 2
trigger1 = Random <= 50

[State -3]
type = ChangeState
value = 22115
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = statetype  != A
triggerall = enemy,alive
triggerall = p2movetype = H
triggerall = P2BodyDist Y = [-90,0]
trigger1 = Ctrl        = 1
trigger1 = Random <= 100

[State -3]
type = ChangeState
value = 22115
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = statetype  != A
triggerall = enemy,alive
triggerall = p2bodydist X >=20
triggerall = Ctrl = 1
trigger1 = Random <= (50+(p2bodydist X >= 180)*120)
trigger2 = Random <= 1+((var(29)>=1)*50)

[State -3]
type = ChangeState
value = 22115
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = statetype  != A
triggerall = enemy,alive
triggerall = p2bodydist X = [0,120]
triggerall = p2statetype = C && p2movetype = A && EnemyNear,time >= 12
trigger1 = Ctrl        = 1
trigger1 = Random <= 50

[State -1];オロチ飛び道具
type = ChangeState
value = 1050
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = p2bodydist X   >= 30
triggerall = statetype  != A
triggerall = enemy,alive
triggerall = numhelper(1050) = 0
trigger1 = Ctrl        = 1
trigger1 = Random <= 150

[State -1];オロチ飛び道具2
type = ChangeState
value = 11610
triggerall = palno = [7,12]
triggerall = var(30)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = ctrl
trigger1 = P2bodydist X = [-20,150]
trigger1 = random <= 300

[State -1];オロチ飛び道具3
type = ChangeState
value = 3001
triggerall = Alive   = 1
triggerall = var(30)
triggerall = numhelper(3002) = 0
triggerall = p2bodydist X   >= 30
triggerall = statetype  != A
triggerall = enemy,alive
trigger1 = Ctrl        = 1
trigger1 = Random <= 50

[State -1];オロチ飛び道具3
Type = ChangeState
Value = 3001
triggerall = Alive   = 1
triggerall = var(30)
triggerall = numhelper(3002) = 0
triggerAll = StateType != A
triggerAll = Ctrl = 1
triggerAll = P2StateType != C
trigger1 = Enemy,NumHelper > 0 || Enemy,NumProj > 0
trigger1 = EnemyNear,MoveType = A
trigger1 = InGuardDist
trigger1 = EnemyNear,HitDefAttr = SCA,NP,SP,HP,NA,SA,HA
trigger1 = P2MoveType = A
trigger1 = Random <= 640

[State -1];オロチ飛び道具4
type = ChangeState
value = 1150
triggerall = palno = [7,12]
triggerall = numhelper(1110) = 0
triggerall = numhelper(1111) = 0
triggerall = numhelper(1112) = 0
triggerall = var(30)
triggerall = roundstate = 2
triggerall = statetype != A
trigger1 = ctrl
trigger1 = p2bodydist X > 30
trigger1 = random <= 150

[State -1];エクスプロージョンスフィアΩ
type = ChangeState
value = 1700
triggerall = numHelper(1720) <= 0
triggerall = var(30)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = p2bodydist X   >= 50
trigger1 = ctrl
trigger1 = random <= 150

[State -1];鏡
type = ChangeState
value = 11600
triggerall = numHelper(1720) <= 0
triggerall = var(30)
triggerall = random <= 200
triggerall = statetype != A
triggerall = P2BodyDist X > 100
triggerall = P2BodyDist Y > -150
trigger1 = ctrl
trigger2 = movecontact
trigger2 = stateno < 1080

[State -1]
type = ChangeState
value = 1100
triggerall = var(30)
triggerall = random <= 200
triggerall = statetype != A
triggerall = P2BodyDist X > 50
triggerall = P2BodyDist X <= 120
trigger1 = ctrl
trigger2 = movecontact
trigger2 = stateno < 1080

[State -1];グラビティースフィア
type = ChangeState
value = 1800
triggerall = palno != [7,12]
triggerall = var(30)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = p2bodydist X   >= 80
trigger1 = ctrl
trigger1 = random <= 150

[State -1];3wayオロチ
type = ChangeState
value = 1210
triggerall = var(30)
triggerall = numhelper(1201) = 0
triggerall = numhelper(1202) = 0
triggerall = numhelper(1203) = 0
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = p2bodydist X   >= 80
trigger1 = ctrl
trigger1 = random <= 150

[State -1];フォトンスフィア
type = ChangeState
value = 11101
triggerall = var(30)
triggerall = numhelper(11100) = 0
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = ctrl
trigger1 = P2bodydist X = [-20,150]
trigger1 = random <= 300
trigger2 = stateno = 220 && animelemtime(4) > 0
trigger3 = stateno = 240 && animelemtime(10) > 0
trigger4 = stateno = 410 && animelemtime(7) > 0

[State -1];フォトンスフィア2
type = ChangeState
value = 11500
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = statetype  != A
triggerall = numhelper(11500) = 0
triggerall = enemy,alive
trigger1 = Ctrl        = 1
trigger1 = Random <= 60

;マグネティックスフィア
[State -3]
type = ChangeState
value = 12300
triggerall = numhelper(12310) = 0
triggerall = numhelper(12320) = 0
triggerall = numhelper(12330) = 0
triggerall = numhelper(12340) = 0
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = Power    >= 0
triggerall = Random<=990-((enemynear,statetype=C)*950)
trigger1 = statetype  = S
trigger1   = Ctrl = 1
trigger1 = Random <= 300
trigger1 = RoundState = 2

;マグネティックスフィア
[State -3]
type = ChangeState
value = 12300
triggerall = numhelper(12310) = 0
triggerall = numhelper(12320) = 0
triggerall = numhelper(12330) = 0
triggerall = numhelper(12340) = 0
triggerall = roundstate = 2
triggerall = Alive = 1
triggerall = var(30) = 1
triggerall = p2bodydist X >= 50
triggerall = statetype != A
triggerall = enemy,alive
triggerall = Ctrl = 1
triggerall = Random<=990-((enemynear,statetype=C)*950)
trigger1 = Random<= 100

;紋章
[State -1]
type = ChangeState
value = 18100
triggerall = palno = [7,12]
triggerall = numhelper(18102) = 0
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = Power    >= 0
trigger1 = statetype  = S
trigger1   = Ctrl = 1
trigger1 = Random <= 300
trigger1 = RoundState = 2

[State -3]
type = ChangeState
value = 1500
triggerall = palno != [7,12]
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = statetype  != A
triggerall = enemy,alive
triggerall = p2movetype = H
triggerall = P2BodyDist Y = [-90,0]
trigger1 = Ctrl        = 1
trigger1 = Random <= 100

[State -3]
type = ChangeState
value = 1500
triggerall = palno != [7,12]
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = statetype  != A
triggerall = enemy,alive
triggerall = p2bodydist X >=20
triggerall = Ctrl = 1
trigger1 = Random <= (50+(p2bodydist X >= 180)*120)
trigger2 = Random <= 50

[State -3]
type = ChangeState
value = 1500
triggerall = palno != [7,12]
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = statetype  != A
triggerall = enemy,alive
triggerall = p2bodydist X = [0,120]
triggerall = p2statetype = C && p2movetype = A && EnemyNear,time >= 12
trigger1 = Ctrl        = 1
trigger1 = Random <= 50

[State -3]
type = ChangeState
value = 230
triggerall = palno != [7,12]
triggerall = roundstate = 2
triggerall = Alive = 1
triggerall = var(30) = 1
triggerall = p2life > 0
triggerall = P2statetype = A
triggerall = P2BodyDist X = [0,50]
triggerall = P2BodyDist Y = [-140,-40]
triggerall = statetype != A
trigger1 = ctrl = 1
trigger1 = Random <= 290

[State -1]
type = ChangeState
value = 1080
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = enemy,alive
triggerall = statetype  != A
triggerall = p2bodydist X   >= 50
trigger1 = Ctrl        = 1
trigger1 = Random <= 60

[State -1];髑髏柱
type = ChangeState
value = 1450
triggerall = var(30) = 1
triggerall = palno != 12
triggerall = roundstate = 2
triggerall = statetype != A
trigger1 = ctrl
trigger1 = p2bodydist X > 60
trigger1 = random <= 220

[State -1]
type = ChangeState
value = 1450
triggerall = palno = 12
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = Power    >= 0
trigger1 = statetype  = S
trigger1 = ctrl
trigger1 = p2bodydist X > 100
trigger1 = Random <= 300
trigger1 = RoundState = 2
trigger2 = ctrl
trigger2 = p2bodydist X > 100
trigger2 = random <= 250
trigger2 = Time = 60 || Time = 120 || Time = 180 || Time = 240 || Time = 300 || Time = 360 || Time = 400 || Time = 440  || Time = 480 || Time = 520  || Time = 540 || Time = 560  || Time = 580 || Time = 600

[State -1]
type = ChangeState
value = 1450
triggerall = var(30) = 1
triggerall = palno = 12
triggerall = roundstate = 2
triggerall = Alive   = 1
triggerall = enemy,alive
triggerall = statetype != A
trigger1 = ctrl
trigger1 = p2bodydist X > 100
trigger1 = random <= 220
trigger2 = ctrl
trigger2 = p2movetype = A
trigger2 = p2bodydist X = [-30,30]
trigger2 = random <= 220
trigger3 = ctrl
trigger3 = p2movetype = A
trigger3 = p2bodydist X = [0,30]
trigger3 = random <= 220
trigger4 = ctrl
trigger4 = p2bodydist X > 100
trigger4 = random <= 250
trigger2 = Time = 60 || Time = 120 || Time = 180 || Time = 240 || Time = 300 || Time = 360 || Time = 400 || Time = 440  || Time = 480 || Time = 520  || Time = 540 || Time = 560  || Time = 580 || Time = 600

;エクスプローディングスフィア
[State -3]
type = ChangeState
value = 1250
triggerall = Alive = 1
triggerall = var(30) = 1
triggerall = statetype != A
triggerall = enemy,alive
triggerall = P2BodyDist X = [0,240]
triggerall = Ctrl = 1
trigger1 = Random <= 100

;エクスプローディングスフィア
[State -3]
type = ChangeState
value = 1250
triggerall = Alive = 1
triggerall = var(30) = 1
triggerall = statetype != A
triggerall = enemy,alive
triggerall = P2BodyDist X = [0,240]
triggerall = Ctrl = 1
trigger1 = Random <= 50

[State -3]
type = ChangeState
value = 200
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = enemy,alive
triggerall = statetype  != A
triggerall = P2BodyDist X = [0,50]
trigger1 = Ctrl        = 1
trigger1 = Random <= 50

[State -3]
type = ChangeState
value = 210
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = enemy,alive
triggerall = statetype  != A
triggerall = P2BodyDist X = [0,50]
trigger1 = Ctrl        = 1
trigger1 = Random <= 60

[State -3]
type = ChangeState
value = 240
triggerall = var(30)
triggerall = palno != [7,12]
triggerall = roundstate = 2
triggerall = statetype != A
trigger1 = ctrl
trigger1 = P2bodydist X = [-5,55]
trigger1 = p2movetype != A
trigger1 = random <= 90
trigger2 = P2bodydist X = [40,80]
trigger2 = p2movetype = H
trigger2 = random < 999
trigger2 = stateno = 430

;しゃがみ弱攻撃
[State -3]
type = ChangeState
value = 400
triggerall = palno != [7,12]
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = statetype != A
triggerall = roundstate = 2
triggerall = stateno != 101
trigger1 = statetype = C
trigger1   = Ctrl = 1
trigger1 = Random <= 300
trigger1 = p2bodydist X < 20
trigger2 = stateno = 200
trigger2 = p2bodydist X = [-5,21]
trigger2 = Random = [480,630]
trigger3 = stateno = 400
trigger3 = p2bodydist X = [-5,21]
trigger3 = Random = [150,350]
trigger4 = stateno = 52

;しゃがみ弱キック
[State -3]
type = ChangeState
value = 430
triggerall = palno != [7,12]
triggerall = var(30)
triggerall = roundstate = 2
triggerall = statetype != A
trigger1 = ctrl
trigger1 = P2statetype != A && p2statetype != L
trigger1 = P2bodydist X = [-40,40]
trigger1 = P2bodydist Y = 0
trigger1 = p2stateno != [152,153]
trigger1 = Random < 600
trigger2 = P2statetype != A && p2statetype != L
trigger2 = P2bodydist X = [-40,40]
trigger2 = stateno = 430&&movecontact >= 1
trigger2 = p2movetype = H
trigger2 = P2bodydist Y = 0
trigger2 = p2stateno != [152,153]
trigger2 = Random < 600

;しゃがみ強キック
[State -3]
type = ChangeState
value = 440
triggerall = palno != [7,12]
triggerall = var(30)
triggerall = roundstate = 2
triggerall = statetype != A
trigger1 = ctrl
trigger1 = P2statetype != A && p2statetype != L
trigger1 = P2bodydist X = [-5,70]
trigger1 = p2stateno != [150,153]
trigger1 = Random < 120

;空中強パンチ
[State -1,]
type = ChangeState
value = 610
triggerall = var(30)
triggerall = roundstate = 2
trigger1 = statetype = A
trigger1 = stateno != 106
trigger1 = ctrl
trigger1 = p2statetype != L
trigger1 = vel Y > 0
trigger1 = P2bodydist X = [-5,70]
trigger1 = P2bodydist Y = [-80,0]

;空中強キック
[State -1,]
type = ChangeState
value = 640
triggerall = var(30)
triggerall = roundstate = 2
trigger1 = statetype = A
trigger1 = stateno != 106
trigger1 = ctrl
trigger1 = p2statetype != L
trigger1 = vel Y > 0
trigger1 = P2bodydist X < 70
trigger1 = P2bodydist Y = [0,70]

;空中ふっ飛ばし攻撃
[State -1]
type = ChangeState
value = 690
triggerall = var(30)
triggerall = roundstate = 2
trigger1 = statetype = A
trigger1 = ctrl
trigger1 = vel Y > 0
trigger1 = P2bodydist X < 70
trigger1 = P2bodydist Y = [0,70]
trigger1 = p2statetype = A
trigger1 = p2movetype = H
trigger1 = random < 50

[State -3]
type = ChangeState
value = 800
triggerall = Alive   = 1
triggerall = var(30) = 1
triggerall = statetype  != A
triggerall = enemy,alive
triggerall = P2statetype = S
triggerall = P2BodyDist X = [0,20]
trigger1 = Ctrl        = 1
trigger1 = Random <= 200

[State -3]
type = ChangeState
value = 800
triggerall = var(30)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = p2statetype != A
triggerall = p2bodydist X < 8
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = p2movetype != H
triggerall = p2movetype != A
trigger1 = ctrl&&random < 150
trigger1 = p2stateno != [150,153]
trigger2 = p2stateno != [150,153]
trigger2 = stateno = 700 && animelem = 3,>=0

;立ちガード
[State -3]
type = ChangeState
value = 130
triggerall = palno = [1,6]
triggerall = var(30)
triggerall = roundstate = 2
triggerall = P2statetype != C
triggerall = inguarddist
trigger1 = Ctrl && statetype != A
trigger2 = stateno = [100,101]

;屈みガード
[State -3]
type = ChangeState
value = 131
triggerall = palno = [1,6]
triggerall = var(30)
triggerall = roundstate = 2
triggerall = P2statetype = C
triggerall = inguarddist
trigger1 = Ctrl && statetype != A
trigger2 = stateno = [100,101]

;空中ガード
[State -3]
type = ChangeState
value = 132
triggerall = palno = [1,6]
triggerall = var(30)
triggerall = roundstate = 2
triggerall = inguarddist
trigger1 = Ctrl && statetype = A

[State -3, 11] 
type = hitoverride
triggerall = palno = [1,6]
triggerall = var(30)
triggerall = ctrl || stateno = 19 || stateno = 99 || stateno = 21 || stateno = 120 || stateno = [130,131]
triggerall = statetype != A
trigger1 = random <= 100
slot = 0
stateno = 4040
attr = SA, AA, AP
time = 1

[State -3, 12]
type = hitoverride
triggerall = palno = [1,6]
triggerall = var(30)
triggerall = ctrl || stateno = 19 || stateno = 99 || stateno = 21 || stateno = 120 || stateno = [130,131]
triggerall = statetype != A
trigger1 = random <= 100
slot = 1
stateno = 4010
attr = C, AA, AP
time = 1

[State -3, 13]
type = hitoverride
triggerall = palno = [1,6]
triggerall = var(30)
triggerall = statetype = A
triggerall = ctrl || stateno = 120 || stateno = 132
trigger1 = random <= 100
slot = 2
stateno = 4020
attr = SCA, AA, AP
time = 1

[State -3,ガード]
Type = ChangeState
Value = 120
triggerall = palno = [1,6]
triggerall = Var(30)
triggerall = ctrl || stateno = 19 || stateno = 21
triggerall = RoundState = 2
triggerall = Inguarddist
trigger1 = Random <= 100*(Var(30))

[State -3, AI_JD2]
type = hitoverride
triggerall = var(30)
triggerall = palno = [1,6]
triggerall = ctrl || stateno = 19 || stateno = 99 || stateno = 21 || stateno = 120 || stateno = [130,131]
triggerall = statetype != A
trigger1 = random <= 100
slot = 3
stateno = 125
attr = SA, AA, AP
time = 1

[State -3, AI_JD1]
type = hitoverride
triggerall = var(30)
triggerall = palno = [1,6]
triggerall = ctrl || stateno = 19 || stateno = 99 || stateno = 21 || stateno = 120 || stateno = [130,131]
triggerall = statetype != A
trigger1 = random <= 100
slot = 4
stateno = 126
attr = C, AA, AP
time = 1

[State -3, AI_JD3]
type = hitoverride
triggerall = var(30)
triggerall = palno = [1,6]
triggerall = statetype = A
triggerall = ctrl || stateno = 120 || stateno = 132
trigger1 = random <= 100
slot = 5
stateno = 127
attr = SCA, AA, AP
time = 1

[State -3]
Type = ChangeState
Value = 701
triggerall = roundstate = 2
triggerall = Alive = 1
triggerall = var(30) = 1
triggerall = StateType != A
trigger1 = Ctrl = 1
trigger1 = EnemyNear,MoveType = A
trigger1 = EnemyNear,HitDefAttr = SCA,NT,ST,HT
trigger1 = p2BodyDist X = [0,60]
trigger1 = p2BodyDist Y = [-40,0]
trigger1 = Random <= 820

[State -3]
type = ChangeState
value = 700
triggerall = roundstate = 2
triggerall = Alive = 1
triggerall = var(30) = 1
triggerall = enemy,alive
triggerall = statetype != A
triggerall = p2statetype != A && p2StateNo = 5120
triggerall = p2BodyDist X = [-80,80]
trigger1 = Ctrl = 1
trigger1 = Random <= 100

[State -3]
type = ChangeState
value = 700
triggerall = roundstate = 2
triggerall = Alive = 1
triggerall = var(30) = 1
triggerall = enemy,alive
triggerall = statetype != A
triggerall = p2movetype = A
triggerall = p2statetype != A
triggerall = (P2BodyDist X = [0,100])||backEdgeDist <= 60&&(P2BodyDist X = [0,80])
trigger1 = Ctrl = 1
trigger1 = Random <= 150

[State -3]
Type = ChangeState
Value = 700
triggerall = roundstate = 2
triggerall = Alive = 1
triggerall = var(30) = 1
Triggerall = StateType != A
Trigger1 = Ctrl = 1
Trigger1 = Inguarddist && enemy,numproj
trigger1 = Random <= 200

[State -3]
type = ChangeState
value = 702
triggerall = var(30)
triggerall = palno != [7,12]
triggerall = roundstate = 2
triggerall = random < 200
trigger1 = stateno = 5050
trigger1 = pos y >=-40

;ジャンプ
[State -3]
Type     = ChangeState
Value    = 40
triggerall = palno != [7,12]
triggerall = roundstate = 2
triggerall = var(59)
triggerall = StateType != A
triggerall = Ctrl
trigger1 = random < 300
trigger1 = p2bodydist X = [-40,40]
trigger1 = p2bodydist Y < -80
trigger1 = movetype = I
trigger2 = stateno = [100,101]
trigger2 = random < 300
trigger2 = p2bodydist X = [80,120]
trigger2 = p2bodydist Y = 0
trigger2 = movetype = I

;ダッシュ
[State -3]
type = ChangeState
value = 100
triggerall = roundstate = 2
triggerall = Alive = 1
triggerall = var(30) = 1
triggerall = enemy,alive
triggerall = statetype != A
triggerall = p2statetype != A && p2movetype != A
triggerall = p2BodyDist X >= 80
trigger1 = Ctrl = 1
trigger1 = Random <= 30

;ダッシュ
[State -3]
Type     = ChangeState
Value    = 100
triggerall = var(30)
triggerall = palno != [7,12]
triggerall = EnemyNear,StateType != L
triggerall = EnemyNear,MoveType = I
triggerall = StateType != A
triggerall = roundstate = 2
triggerall = ctrl
trigger1 = p2bodydist X < 200
trigger1 = random < 80

;バックステップ
[State -3]
type = ChangeState
value = 105
triggerall = roundstate = 2
triggerall = Alive = 1
triggerall = var(30) = 1
triggerall = enemy,alive
triggerall = statetype != A && stateno != 105
triggerall = p2statetype=L||p2statetype!=A&&p2StateNo=5120||EnemyNear,statetype!=A&&EnemyNear,HitDefAttr=SC,NT,ST,HT||(EnemyNear,statetype=S||EnemyNear,statetype=C)
triggerall = p2BodyDist X = [-90,90]
triggerall = Ctrl = 1
trigger1 = Random <= (IfElse((EnemyNear,HitDefAttr = SC,NT,ST,HT),900,300)) + 30
trigger2 = p2statetype = L && Random <= 100
trigger3 = (prevstateno=1250||prevstateno=21000||prevstateno=12300||prevstateno=1950||prevstateno=18100)
trigger3 = Random <= 100-((EnemyNear,movetype=H)*90)
