
;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
[Statedef 2024]
type    = S
movetype= I
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
velset = 0,0
anim = 6543
sprpriority = -5
p2face = 1

[state 2000,nothitby]
type = NOThitBY
trigger1 = 1
value = SCA

[state 2024,pp]
type = playerpush
trigger1 = 1
value = 1

[state 2024,vs]
type = velset
trigger1 = time = 0
x = 4


[state 2024,ds]
type = destroyself
trigger1 = ParentDist X = [-5,5]
trigger2 = root,stateno = 0;---------------------------------------------------------------------------
 [Statedef 8100]
physics=N
anim=8100
sprpriority=-2

[State 8100, remove]
type=removeexplod
trigger1=anim=8100&&!animtime
[State 8100, end]
type=destroyself
trigger1=anim=8100&&!animtime

[Statedef 8100]
physics=N
anim=8100
sprpriority=-2

[State 8100, remove]
type=removeexplod
trigger1=anim=8100&&!animtime
[State 8100, end]
type=destroyself
trigger1=anim=8100&&!animtime


[Statedef -2]
[State 10000, sombras]
type = Afterimage
trigger1 = time =0
trans = add
PalContrast = 0, 0, 0
PalBright = 0,0,0
time = 7
length = 40
TimeGap = 1
FrameGap = 1

[State a]
type = Afterimage
trigger1 =time = 0
trans = add
PalContrast = 250, 250, 250
PalBright = 0,0,0
time = 7
length = 13
TimeGap = 1
FrameGap = 1


[State 1300, 0]
type = HitBy
trigger1 = 1
value = S, NA




[State 1]
type = HitOverride
triggerall = statetype != A
trigger1 = 1
time = 1
attr = SCA, NA, SA, HA, NT,ST,HT, NP, SP, HP,AA,AT,AP
stateno = 10051
ignorehitpause = 1

[State 1]
type = HitOverride
triggerall = statetype = A
trigger1 = 1
time = 1
attr = SCA, NA, SA, HA, NT,ST,HT, NP, SP, HP,AA,AT,AP
stateno = 38853
ignorehitpause = 1

[State 1]
type = HitOverride
triggerall = stateno = 40 || stateno = 52
trigger1 = 1
time = 1
attr = SCA, NA, SA, HA, NT,ST,HT, NP, SP, HP,AA,AT,AP
stateno = 38852
ignorehitpause = 1








[State -1]
type = Explod
triggerall = alive = 1
triggerall = statetype != C
triggerall = MoveType != H
triggerall = stateno != [190,192]
triggerall = stateno != 22050
triggerall = stateno != [170,171]
trigger1 = (GameTime%30) = 1
anim = 1997
id = 1997
sprpriority = 1
postype = p1
pos = 0,-50
bindtime = -1
supermove = 1
under = 1
ownpal = 1




[State -2, 0] 
type = poweradd 
trigger1 = 1 
value = 9999 
[State 191, 1]
type = stopsnd
trigger1 = stateno != [191,192]
channel = 2

[State -3, 3];
type = null;PlaySnd
trigger1 = stateno = 150
trigger2 = stateno = 152
;trigger2 = anim = 150
;trigger3 = anim = 152
;trigger4 = anim = 154
triggerall = time = 0
value = S0,19
persistent = 0
ignorehitpause = 1

[State -3, 3];
type = PlaySnd
trigger1 = stateno = 150
trigger2 = stateno = 152
;trigger2 = anim = 150
;trigger3 = anim = 152
;trigger4 = anim = 154
triggerall = time = 0
value = S0,19
persistent = 0
ignorehitpause = 1

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

[Statedef -3]

[State lin's lifeadd ]
type = lifeadd
triggerall = life >50 && time%5 =0 
trigger1 = enemy,name = "lin"
trigger1 = enemy,var(18) = 1
value = -1

[state -3, nolifebar]
type = assertspecial
trigger1 = roundstate != 2
flag = NoBarDisplay

[State -3, Turns Mode Intro]
type = ChangeState
triggerall = teammode = turns
triggerall = roundno > 1
triggerall = time = 0
triggerall = roundstate = 0
triggerall = roundsexisted >= 0
trigger1 = p2name = "k9999"
trigger2 = p4name = "k9999"
trigger3 = p2name = "k'"
trigger4 = p4name = "k'"
trigger5 = p2name = "kula"
trigger6 = p4name = "kula"
trigger7 = p2name = "maxima"
trigger8 = p4name = "maxima"
trigger9 = p2name = "Kung Fu Man"
trigger10 = p4name = "Kung Fu Man"
value = 192

[State 191, 3]
type = stopsnd
trigger1 = movetype = H
channel = 0

[State -3]
type = varset
trigger1 = 1
trigger1 = P2statetype != C
var(11) = -150 - (-150 - floor(p2bodydist y))

[State -3]
type = varset
trigger1 = 1
trigger1 = P2statetype = S
var(11) = 0

[State -3, 3]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 || stateno = 1011 || stateno = 1016
value = S0,16

[State -3, 5]
type = PlaySnd
trigger1 = stateno = 50
trigger1 = Time = 2
value = S0,15

[State -2]
type = AssertSpecial
trigger1 = 1
flag = NoAirGuard
ignorehitpause = 1

[State -3, 5]
type = varrandom
trigger1 = 1
v = 3
range = 1,4

[State -3, 5]
type = PlaySnd
triggerall = alive = 1
trigger1 = Time = 1 && stateno = 5000 && (anim = 5000 || anim = 5010)
triggerall = var(3) = 1
value = S0,33

[State -3, 5]
type = PlaySnd
triggerall = alive = 1
trigger1 = Time = 1 && stateno = 5000 && (anim = 5001 || anim = 5011)
triggerall = var(3) = 1
value = S0,34

[State -3, ai]
type = varset
triggerall = var(59) = 0
trigger1 = command = "cpu"
trigger2 = command = "cpu2"
trigger3 = command = "cpu3"
trigger4 = command = "cpu4"
trigger5 = command = "cpu5"
trigger6 = command = "cpu6"
trigger7 = command = "cpu7"
trigger8 = command = "cpu8"
trigger9 = command = "cpu9"
trigger10 = command = "cpu10"
trigger11 = command = "cpu11"
trigger12 = command = "cpu12"
trigger13 = command = "cpu13"
trigger14 = command = "cpu14"
trigger15 = command = "cpu15"
trigger16 = command = "cpu16"
trigger17 = command = "cpu17"
trigger18 = command = "cpu18"
trigger19 = command = "cpu19"
trigger20 = command = "cpu20"
trigger21 = command = "cpu21"
trigger22 = command = "cpu22"
trigger23 = command = "cpu23"
trigger24 = command = "cpu24"
trigger25 = command = "cpu25"
trigger26 = command = "cpu26"
trigger27 = command = "cpu27"
trigger28 = command = "cpu28"
trigger29 = command = "cpu29"
trigger30 = command = "cpu30"
trigger31 = command = "cpu31"
trigger32 = command = "cpu32"
trigger33 = command = "cpu33"
trigger33 = command = "cpu34"
var(59) = 1

[State -3, BOSS]
type = varset
trigger1 = palno = [7,12]
var(58) = 1

;[State -3, BOSS]
;type = powerset
;trigger1 = var(58) = 1
;trigger1 = 1
;value = 3000

[State -3, BOSS]
type = lifeadd
;trigger1 = timemod = 5,0
trigger1 = time >= 1
value = 5




;[State 1000, 2]
;type = HitOverRide
;trigger1 = statetype != A
;time = 1
;attr = SCA,AA,AP,AT
;stateno = 20004
;IgnoreHitPause = 1
;PauseMoveTime = 99999

[State -3, BOSS]
type = poweradd
trigger1 = timemod = 1,0
value = 1

[State -2]
type = AssertSpecial
trigger1 = 1
trigger1 = var(58) = 1
flag = Nojugglecheck
ignorehitpause = 1







;-------------------------------------------------------
;AI
;立ちガード(相手立ち)
[State -3]
type = ChangeState
value = 130
triggerall = p2movetype = A
triggerall = P2Life > 0
triggerall = statetype != A
triggerall = var(59) = 1
triggerall = ctrl
triggerall = stateno != 191
triggerall = statetype != A
trigger1 = p2statetype = S
trigger1 = random <= 900
trigger1 = Enemy, Numproj = 1 && P2MoveType = A

;攻撃を避ける
[State -3]
type = ChangeState
value = 900
triggerall = p2movetype = A
;triggerall = P2bodydist X <= 90
;triggerall = P2Life > 0
triggerall = statetype != A
triggerall = var(59) = 1
triggerall = ctrl
triggerall = stateno != [150,153]
;triggerall = stateno != 191
;trigger1 = p2statetype = S
triggerall = random <= 17
trigger1   = p2dist X < 30 && p2movetype = A && ctrl
trigger2   = p2dist X < 100 && p2movetype = A && ctrl
trigger3   = p2dist Y > -40 && p2bodydist X < 10 && p2movetype = A && ctrl
trigger4   = P2dist X > 70 && p2movetype != H && ctrl
trigger5   = enemy, numproj >= 1 && enemy, backedgedist <= 30 && ctrl
trigger6   = p2movetype = A && ctrl && enemy, ishelper
trigger7   = (enemy, p2bodydist X = [-10, 40]) && enemy, hitdefattr = SCA, AA, AT, AP
trigger8 = Enemy, Numproj = 1 && P2MoveType = A
trigger9   = enemy, numproj >= 1 && enemy, backedgedist <= 30 && ctrl
trigger10   = p2movetype = A && ctrl && enemy, ishelper
trigger10   = (enemy, p2bodydist X = [-10, 40]) && enemy, hitdefattr = SCA, AA, AT, AP

[State -3]
type = ChangeState
value = 900
;triggerall = p2movetype = A
triggerall = statetype != A
triggerall = var(59) = 1
triggerall = var(58) = 1
triggerall = ctrl
triggerall = stateno != [150,153]
triggerall = random <= 70
trigger1   = p2dist X < 30 && p2movetype = A && ctrl
trigger2   = p2dist X < 100 && p2movetype = A && ctrl
trigger3   = p2dist Y > -40 && p2bodydist X < 10 && p2movetype = A && ctrl
trigger4   = P2dist X > 70 && p2movetype != H && ctrl
trigger5   = enemy, numproj >= 1 && enemy, backedgedist <= 30 && ctrl
trigger6   = p2movetype = A && ctrl && enemy, ishelper
trigger7   = (enemy, p2bodydist X = [-10, 40]) && enemy, hitdefattr = SCA, AA, AT, AP
trigger8 = Enemy, Numproj = 1 && P2MoveType = A
trigger9   = p2movetype = A && ctrl && enemy, ishelper
trigger9   = (enemy, p2bodydist X = [-10, 40]) && enemy, hitdefattr = SCA, AA, AT, AP
trigger10 = Enemy, Numhelper = 1 && P2MoveType = A
trigger11 = backedgedist <= 20 && P2MoveType = A

;--------------------------
;しゃがみガード
[State -3]
type = ChangeState
value = 131
triggerall = p2movetype = A
triggerall = P2bodydist X <= 60
triggerall = P2Life > 0
triggerall = statetype != A
triggerall = var(59) = 1
triggerall = ctrl
triggerall = statetype != A
triggerall = stateno != 191
trigger1 = p2statetype = C
trigger1 = random <= 800
trigger1 = Enemy, Numproj = 1 && P2MoveType = A

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

;チェーンブレイド　サジタルエッジ　スライス強
[State -1]
type = ChangeState
value = 1060
triggerall = var(59) = 1
triggerall = var(58) = 0
triggerall = random <= 25
triggerall = p2statetype != L
triggerall = p2life > 0
trigger1 = P2BodyDist X < 60
trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger1 = p2movetype != H
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 230
trigger4 = movecontact
trigger5 = stateno = 240
trigger5 = movecontact
trigger6 = ctrl && statetype != A
trigger6 = p2stateno = 1022;ワイヤー中

;チェーンブレイド　サジタルエッジ　スライス強2
[State -1]
type = ChangeState
value = 1060
triggerall = var(59) = 1
triggerall = var(58) = 1
triggerall = random <= 100
triggerall = p2statetype != L
trigger1 = P2BodyDist X < 60
;trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger1 = p2movetype != H
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 230
trigger4 = movecontact
trigger5 = stateno = 240
trigger5 = movecontact
trigger6 = ctrl && statetype != A
trigger6 = p2stateno = 1022;ワイヤー中
trigger7 = P2BodyDist X < 40
trigger7 = P2movetype = A
trigger7 = ctrl && statetype != A
trigger7 = p2movetype != H

trigger8 = movecontact
trigger8 = stateno = 1020
trigger8 = animelem = 12, >= 0
trigger8 = animelem = 14, <= 0
trigger9 = movecontact
trigger9 = stateno = 1030 || stateno = 1031
triggerall = p2life > 0

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

;チェーンブレイド　トランスアキシャル　スライス
[State -1]
type = ChangeState
value = 1031
triggerall = var(59) = 1
triggerall = var(58) = 0
triggerall = random <= 60
triggerall = p2statetype != L
trigger1 = P2BodyDist X < 80
trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger1 = p2movetype != H
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 230
trigger4 = movecontact
trigger5 = stateno = 240
trigger5 = movecontact
trigger6 = ctrl && statetype != A
trigger6 = p2stateno = 1022;ワイヤー中
triggerall = p2life > 0
trigger6 = ctrl && statetype != A

;チェーンブレイド　トランスアキシャル　スライス2
[State -1]
type = ChangeState
value = 1031
triggerall = var(59) = 1
triggerall = var(58) = 1
triggerall = random <= 160
triggerall = p2statetype != L
trigger1 = P2BodyDist X < 80
;trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger1 = p2movetype != H
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 230
trigger4 = movecontact
trigger5 = stateno = 240
trigger5 = movecontact
trigger6 = ctrl && statetype != A
trigger6 = p2stateno = 1022;ワイヤー中
trigger6 = ctrl && statetype != A

trigger7 = movecontact
trigger7 = stateno = 1020
trigger7 = animelem = 12, >= 0
trigger7 = animelem = 14, <= 0
trigger8 = var(58) = 1
trigger8 = movecontact
trigger8 = stateno = 1030
triggerall = p2life > 0
triggerall = prevstateno != [1030,1031]
triggerall = stateno != [1030,1031]

;---------------------------------------------------------------------------
;レッドノア
[State -1]
type = ChangeState
value = 800
triggerall = var(59) = 1
triggerall = var(58) = 0
triggerall = random <= 30
triggerall = P2statetype != A
triggerall = p2stateno != [150,153]
trigger1 = enemynear,movetype != H
trigger1 = P2BodyDist X < 15
trigger1 = statetype != A && ctrl

;レッドノア2
[State -1]
type = ChangeState
value = 800
triggerall = var(59) = 1
triggerall = var(58) = 1
triggerall = random <= 150
triggerall = P2statetype != A
triggerall = p2stateno != [150,153]
trigger1 = enemynear,movetype != H
trigger1 = P2BodyDist X < 15
trigger1 = statetype != A && ctrl
;---------------------------------------------------------------------------
;ブルーノア
[State -1]
type = ChangeState
value = 810
triggerall = var(59) = 1
triggerall = var(58) = 0
triggerall = random <= 30
triggerall = P2statetype != A
triggerall = p2stateno != [150,153]
trigger1 = enemynear,movetype != H
trigger1 = P2BodyDist X < 15
trigger1 = statetype != A && ctrl

;ブルーノア2
[State -1]
type = ChangeState
value = 810
triggerall = var(59) = 1
triggerall = var(58) = 1
triggerall = random <= 145
triggerall = P2statetype != A
triggerall = p2stateno != [150,153]
trigger1 = enemynear,movetype != H
trigger1 = P2BodyDist X < 15
trigger1 = statetype != A && ctrl

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

;ディバインアロー　エア
[State -1]
type = ChangeState
value = 1000
triggerall = var(59) = 1
triggerall = var(58) = 0
triggerall = random <= 30
triggerall = p2statetype != L
triggerall = numprojID(1000) = 0
triggerall = numprojID(1025) = 0
trigger1 = P2BodyDist X > 20
trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger1 = p2movetype != H
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 230
trigger4 = movecontact
trigger5 = stateno = 240
trigger5 = movecontact
trigger6 = P2BodyDist X > 20
trigger6 = P2movetype = A
trigger6 = ctrl && statetype != A
trigger6 = Enemy, Numproj = 1 && P2MoveType = A
trigger6 = p2movetype != H
trigger7 = ctrl && statetype != A
trigger7 = p2stateno = 1022;ワイヤー中
triggerall = p2life > 0
trigger7 = ctrl && statetype != A

;ディバインアロー　エア2
[State -1]
type = ChangeState
value = 1000
triggerall = var(59) = 1
triggerall = var(58) = 1
triggerall = numprojID(1000) = 0
triggerall = numprojID(1025) = 0
triggerall = random <= 100
triggerall = p2statetype != L
trigger1 = P2BodyDist X > 20
;trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger1 = p2movetype != H
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 230
trigger4 = movecontact
trigger5 = stateno = 240
trigger5 = movecontact
trigger6 = P2BodyDist X > 20
trigger6 = P2movetype = A
trigger6 = ctrl && statetype != A
trigger6 = Enemy, Numproj = 1 && P2MoveType = A
trigger6 = p2movetype != H
trigger7 = ctrl && statetype != A
trigger7 = p2stateno = 1022;ワイヤー中
trigger7 = ctrl && statetype != A

trigger8 = movecontact
trigger8 = stateno = 1050 || stateno = 1060
trigger9 = movecontact
trigger9 = stateno = 1020
trigger9 = animelem = 12, >= 0
trigger9 = animelem = 14, <= 0
trigger10 = movecontact
trigger10 = stateno = 1030 || stateno = 1031
triggerall = p2life > 0
trigger8 = power >= 1500
trigger9 = power >= 1500
trigger10 = power >= 1500

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

;ディバインアロー　グランド
[State -1]
type = ChangeState
value = 1010
triggerall = var(59) = 1
triggerall = var(58) = 0
triggerall = random <= 20
triggerall = p2statetype != L
triggerall = numprojID(1000) = 0
triggerall = numprojID(1025) = 0
trigger1 = P2BodyDist X > 30
trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger1 = p2movetype != H
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 230
trigger4 = movecontact
trigger5 = stateno = 240
trigger5 = movecontact
trigger6 = ctrl && statetype != A
trigger6 = p2stateno = 1022;ワイヤー中
triggerall = p2life > 0
trigger6 = ctrl && statetype != A


;ディバインアロー　グランド2
[State -1]
type = ChangeState
value = 1010
triggerall = var(59) = 1
triggerall = var(58) = 1
triggerall = random <= 90
triggerall = p2statetype != L
trigger1 = P2BodyDist X > 30
trigger1 = P2BodyDist X < 150
;trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger1 = p2movetype != H
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 230
trigger4 = movecontact
trigger5 = stateno = 240
trigger5 = movecontact
trigger6 = ctrl && statetype != A
trigger6 = p2stateno = 1022;ワイヤー中
trigger6 = ctrl && statetype != A

trigger7 = movecontact
trigger7 = stateno = 1050 || stateno = 1060
trigger8 = movecontact
trigger8 = stateno = 1020
trigger8 = animelem = 12, >= 0
trigger8 = animelem = 14, <= 0
trigger9 = movecontact
trigger9 = stateno = 1030 || stateno = 1031
triggerall = p2life > 0
trigger7 = power >= 1500
trigger8 = power >= 1500
trigger9 = power >= 1500

;---------------------------------------------------------------------------
;ブルータル･ゴッド･プロジェクト
[State -1]
type = ChangeState
value = 2000
triggerall = var(59) = 1
triggerall = var(58) = 0
triggerall = random <= 60
triggerall = power >= 2000
triggerall = p2statetype != L
triggerall = p2life > 0
trigger1 = P2BodyDist X < 30
;trigger1 = P2BodyDist Y < 30
trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger1 = p2movetype != H
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 230
trigger4 = movecontact
trigger5 = stateno = 240
trigger5 = movecontact
trigger6 = ctrl && statetype != A
trigger6 = p2stateno = 1022;ワイヤー中
triggerall = p2life > 0
trigger6 = ctrl && statetype != A

;ブルータル･ゴッド･プロジェクト2
[State -1]
type = ChangeState
value = 2000
triggerall = var(59) = 1
triggerall = var(58) = 1

triggerall = random <= 50
triggerall = power >= 2000
triggerall = p2statetype != L
triggerall = p2life > 0
trigger1 = P2BodyDist X > 30
;trigger1 = P2BodyDist Y < 30
;trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger1 = p2movetype != H
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 230
trigger4 = movecontact
trigger5 = stateno = 240
trigger5 = movecontact
trigger6 = ctrl && statetype != A
trigger6 = p2stateno = 1022;ワイヤー中

trigger7 = movecontact
trigger7 = stateno = 1050 || stateno = 1060
trigger8 = movecontact
trigger8 = stateno = 1020
trigger8 = animelem = 12, >= 0
trigger8 = animelem = 15, <= 0
trigger9 = movecontact
trigger9 = stateno = 1030 || stateno = 1031
triggerall = p2life > 0
trigger10 = P2BodyDist X > 30
trigger10 = ctrl && statetype != A
trigger10 = p2statetype = A
trigger10 = p2movetype != H

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

;ケイオス・タイド
[State -1]
type = ChangeState
value = 1070
triggerall = var(59) = 1
triggerall = var(58) = 0
triggerall = random <= 16
triggerall = power >= 1000
triggerall = p2statetype != L
trigger1 = P2BodyDist X > 30
trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger1 = p2movetype != H
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 230
trigger4 = movecontact
trigger5 = stateno = 240
trigger5 = movecontact
trigger6 = ctrl && statetype != A
trigger6 = p2stateno = 1022;ワイヤー中
triggerall = p2life > 0

;ケイオス・タイド2
[State -1]
type = ChangeState
value = 1070
triggerall = var(59) = 1
triggerall = var(58) = 1
triggerall = random <= 50
triggerall = power >= 1000
triggerall = p2statetype != L
trigger1 = P2BodyDist X > 30
trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger1 = p2movetype != H
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 230
trigger4 = movecontact
trigger5 = stateno = 240
trigger5 = movecontact
trigger9 = ctrl && statetype != A
trigger9 = p2stateno = 1022;ワイヤー中

trigger6 = movecontact
trigger6 = stateno = 1050 || stateno = 1060
trigger7 = movecontact
trigger7 = stateno = 1020
trigger7 = animelem = 12, >= 0
trigger7 = animelem = 15, <= 0
trigger8 = movecontact
trigger8 = stateno = 1030 || stateno = 1031
triggerall = p2life > 0

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

;イーディアンブレイド
[State -1]
type = ChangeState
value = 1080
triggerall = var(59) = 1
triggerall = var(58) = 0
triggerall = random <= 16
triggerall = power >= 1000
triggerall = p2statetype != L
triggerall = numhelper(1080) = 0
trigger1 = P2BodyDist X > 30
trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger1 = p2movetype != H
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 230
trigger4 = movecontact
trigger5 = stateno = 240
trigger5 = movecontact
trigger6 = ctrl && statetype != A
trigger6 = p2stateno = 1022;ワイヤー中
triggerall = p2life > 0

;イーディアンブレイド
[State -1]
type = ChangeState
value = 1080
triggerall = var(59) = 1
triggerall = var(58) = 1
triggerall = random <= 50
triggerall = power >= 1000
triggerall = p2statetype != L
triggerall = numhelper(1080) = 0
trigger1 = P2BodyDist X > 30
trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger1 = p2movetype != H
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 230
trigger4 = movecontact
trigger5 = stateno = 240
trigger5 = movecontact
trigger9 = ctrl && statetype != A
trigger9 = p2stateno = 1022;ワイヤー中

trigger6 = movecontact
trigger6 = stateno = 1050 || stateno = 1060
trigger7 = movecontact
trigger7 = stateno = 1020
trigger7 = animelem = 12, >= 0
trigger7 = animelem = 15, <= 0
trigger8 = movecontact
trigger8 = stateno = 1030 || stateno = 1031
triggerall = p2life > 0

;---------------------------------------------------------------------------
;ヴォイド・ジェノサイド
[State -1]
type = ChangeState
value = 1040
triggerall = var(59) = 1
triggerall = var(58) = 0
triggerall = random <= 17
triggerall = statetype != A
trigger1   = (enemy, p2bodydist X = [10, 40]) && enemy, hitdefattr = SCA, NA, SA
trigger1 = ctrl
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 230
trigger4 = movecontact
trigger5 = stateno = 240
trigger5 = movecontact
triggerall = p2life > 0

;ヴォイド・ジェノサイド2
[State -1]
type = ChangeState
value = 1040
triggerall = var(59) = 1
triggerall = var(58) = 1
triggerall = random <= 350
triggerall = statetype != A
trigger1   = (enemy, p2bodydist X = [10, 40]) && enemy, hitdefattr = SCA, NA, SA
trigger1 = ctrl
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 230
trigger4 = movecontact
trigger5 = stateno = 240
trigger5 = movecontact
triggerall = p2life > 0

;---------------------------------------------------------------------------
;ネガ･ジェネシス
[State -1]
type = ChangeState
value = 1020
triggerall = var(59) = 1
triggerall = var(58) = 0
triggerall = random <= 20
triggerall = statetype != A
trigger1   = p2bodydist X <= 20
trigger1 = ctrl
trigger1 = p2movetype != H
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 230
trigger4 = movecontact
trigger5 = stateno = 240
trigger5 = movecontact
trigger6   = p2bodydist X >= 30
trigger6 = Enemy, Numproj = 1 && P2MoveType = A || enemy, hitdefattr = SCA, SP
trigger6 = ctrl
triggerall = p2life > 0

;---------------------------------------------------------------------------
;ネガ･ジェネシス
[State -1]
type = ChangeState
value = 1020
triggerall = var(59) = 1
triggerall = var(58) = 0
triggerall = random <= 100
triggerall = statetype != A
trigger1   = p2bodydist X >= 30
trigger1 = Enemy, Numproj = 1 && P2MoveType = A || enemy, hitdefattr = SCA, SP
trigger1 = ctrl
triggerall = p2life > 0

;ネガ･ジェネシス2
[State -1]
type = ChangeState
value = 1020
triggerall = var(59) = 1
triggerall = var(58) = 1
triggerall = random <= 850
triggerall = statetype != A
trigger1   = p2bodydist X >= 30
trigger1 = Enemy, Numproj = 1 && P2MoveType = A || enemy, hitdefattr = SCA, SP
trigger1 = ctrl
triggerall = p2life > 0

;---------------------------------------------------------------------------
;ストライカー
[State -1]
type = null;ChangeState
value = 1089
triggerall = var(59) = 1
triggerall = random <= 1
triggerall = statetype != A
trigger1   = p2bodydist X >= 30
trigger1 = ctrl
triggerall = numhelper(1090) = 0

;---------------------------------------------------------------------------
;ジャンプふっ飛ばし
[State -1]
type = ChangeState
value = 510
triggerall = var(59) = 1
triggerall = random <= 40
triggerall = statetype = A
trigger1   = p2bodydist X <= 60
trigger1 = ctrl

;---------------------------------------------------------------------------
;受身
[State -1]
type = ChangeState
value = 5201
triggerall = var(59) = 1
triggerall = random <= 300
triggerall = Vel Y > 0
triggerall = Pos Y >= 0
trigger1 = alive
trigger1 = CanRecover
trigger1 = stateno = 5050

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

;白羅滅精
[State -1]
type = ChangeState
value = 2100
triggerall = var(59) = 1
triggerall = var(58) = 1
triggerall = random <= 37
triggerall = power >= 1000
triggerall = p2statetype != L
triggerall = numhelper(1080) = 0
triggerall = p2life > 0
trigger1 = P2BodyDist X > 30
trigger1 = ctrl && statetype != A
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 230
trigger4 = movecontact
trigger5 = stateno = 240
trigger5 = movecontact
trigger9 = ctrl && statetype != A
trigger9 = p2stateno = 1022;ワイヤー中

trigger6 = movecontact
trigger6 = stateno = 1050 || stateno = 1060
trigger7 = movecontact
trigger7 = stateno = 1020
trigger7 = animelem = 12, >= 0
trigger7 = animelem = 15, <= 0
trigger8 = movecontact
trigger8 = stateno = 1030 || stateno = 1031
trigger9 = p2movetype = A
trigger9= P2BodyDist X > 80
trigger9 = ctrl && statetype != A
trigger10 = Enemy, Numproj = 1 && P2MoveType = A
trigger10 = ctrl && statetype != A
trigger11 = Enemy, Numhelper = 1 && P2MoveType = A
trigger11 = ctrl && statetype != A
trigger12 = backedgedist <= 20 && P2MoveType = A
trigger12 = ctrl && statetype != A

;スリープラトン
[State -1]
type = ChangeState
value = 2400
triggerall = var(59) = 1
triggerall = random <= 50
triggerall = power >= 3000 && life <= 500
triggerall = P2statetype != A
triggerall = P2BodyDist X < 30
trigger1 = ctrl && statetype != A
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 230
trigger4 = movecontact
trigger5 = stateno = 240
trigger5 = movecontact

trigger6 = movecontact
trigger6 = stateno = 1050 || stateno = 1060
trigger7 = movecontact
trigger7 = stateno = 1020
trigger7 = animelem = 12, >= 0
trigger7 = animelem = 15, <= 0
trigger8 = movecontact
trigger8 = stateno = 1030 || stateno = 1031

;---------------------------------------------------------
;エンド･オブ・ガイア
[State -1]
type = ChangeState
value = 2300
triggerall = var(59) = 1
triggerall = var(58) = 1
triggerall = random <= 40
triggerall = power >= 2000
triggerall = p2statetype != L
triggerall = numhelper(1080) = 0
triggerall = p2life > 0
trigger1 = P2BodyDist X > 30
trigger1 = ctrl && statetype != A
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 230
trigger4 = movecontact
trigger5 = stateno = 240
trigger5 = movecontact
trigger6 = movecontact
trigger6 = stateno = 1050 || stateno = 1060
trigger7 = movecontact
trigger7 = stateno = 1020
trigger7 = animelem = 12, >= 0
trigger7 = animelem = 15, <= 0
trigger8 = movecontact
trigger8 = stateno = 1030 || stateno = 1031
trigger9 = p2movetype = A
trigger9= P2BodyDist X > 80
trigger9 = ctrl && statetype != A


[Statedef 38853]
type    = A
movetype= I
physics = N

[State 1]
type = NotHitBy
trigger1 = time = 0
value = SCA,AA,AT,AP
time = 60

[State -1]
type = lifeadd
trigger1 = life >= (Ceil(0.2 * Const(data.life)))
trigger1 = time = 0
value = -(Ceil(0.065 * Const(data.life)))
absolute = 1

[State -1]
type = lifeadd
trigger1 = life <= (Ceil(0.2 * Const(data.life)))
trigger1 = time = 0
value = -(Ceil(0.008 * Const(data.life)))
absolute = 1

[State -1]
type = poweradd
trigger1 = life >= (Ceil(0.2 * Const(data.life)))
trigger1 = time = 0
value = 50

[State -1]
type = poweradd
trigger1 = life <= (Ceil(0.2 * Const(data.life)))
trigger1 = time = 0
value =  100


;[State 5040, 2]
;type = ChangeAnim
;trigger1 = AnimTime = 0
;trigger1 = Anim != 5040
;trigger2 = Time = 0
;trigger2 = Anim != 5035
;value = 5040

[State 5040, 3]
type = CtrlSet
trigger1 = HitOver
value = 1

[State 5040, 5]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5040, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;JUMPLAND

[Statedef 10051]
type    = S
movetype= I
physics = S
anim = 1

[State 1]
type = NotHitBy
trigger1 = time = 0
value = SCA,AA,AT,AP
time = 60

[State -1]
type = lifeadd
trigger1 = life >= (Ceil(0.2 * Const(data.life)))
trigger1 = time = 0
value = -(Ceil(0.065 * Const(data.life)))
absolute = 1

[State -1]
type = lifeadd
trigger1 = life <= (Ceil(0.2 * Const(data.life)))
trigger1 = time = 0
value = -(Ceil(0.008 * Const(data.life)))
absolute = 1

[State -1]
type = poweradd
trigger1 = life >= (Ceil(0.2 * Const(data.life)))
trigger1 = time = 0
value = 50

[State -1]
type = poweradd
trigger1 = life <= (Ceil(0.2 * Const(data.life)))
trigger1 = time = 0
value =  100


[State 10051, 1]
type = HitVelSet
trigger1 = Time = 0
x = 0

[State 10051, 2]
type = VelSet
trigger1 = Time = GetHitVar(slidetime)
trigger2 = Time >= GetHitVar(hittime)
x = 0

[State 10051, 4]
type = ChangeState
trigger1 = Time >= 1
value = 0
ctrl = 1

