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

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

[Statedef -2]
;==============================================================================

[State a]
type = helper
triggerall = anim = 0
triggerall = var(58) != 0
trigger1 = (GameTime%10) = 1
id = 2802
persistent = 1
name = "wakka"
pos = 0,-60
postype = P1
stateno = 2802
helpertype = normal
keyctrl = 0
ownpal = 1
pausemovetime = 999
supermovetime = 999

[State a]
type = helper
triggerall = anim = 0
triggerall = var(58) != 0
trigger1 = (GameTime%15) = 1
id = 2804
persistent = 1
name = "wakka"
pos = 0,-60
postype = P1
stateno = 2804
helpertype = normal
keyctrl = 0
ownpal = 1
pausemovetime = 999
supermovetime = 999

[State 2790]
type = helper
trigger1 = (GameTime%19) = 1
id = 2803
persistent = 1
name = "hikari"
pos = var(50),var(51)
postype = p1
stateno = 2803
helpertype = normal
keyctrl = 0
ownpal = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -2]
type = Helper
triggerall = numhelper(1090) = 0
triggerall = movetype = A
trigger1 = command = "striker"
helpertype = normal
name = "basara"
ID = 1090
pos = -30,-20
postype = back
facing = 1
stateno = 1090
keyctrl = 0
ownpal = 1

[State a]
type = Afterimage
triggerall = var(58) = 0
trigger1 = time = 0
trans = add
PalContrast =  250, 250, 250
PalBright = 0,0,0
time    =  -1
length  = 18
TimeGap = 1
FrameGap = 2

[state 1]
type = varadd
trigger1 = 1
v = 54
value = -1

[state 1]
type = varset
trigger1 = roundstate != 2
v = 54
value = 0

[State 1]
type = varrandom
trigger1 = 1
range = -60,60
v = 50

[State 1]
type = varrandom
trigger1 = 1
range = -15,-60
v = 51

[State 1]
type = SuperPause
triggerall = roundstate = 2
triggerall = var(54) >= 1
trigger1 = (GameTime%2) = 1
time = 1
movetime = 1
darken = 0
anim = -1

[State -2]
type = HitOverRide
triggerall = Alive = 1
triggerall = var(53) != 1
triggerall = var(58) != 0
trigger1 = statetype != A
time = 0
attr = SCA,AA,AP,AT
stateno = 20016
IgnoreHitPause = 1
PauseMoveTime = 99999

[State -2]
type = HitOverRide
triggerall = Alive = 1
triggerall = var(53) != 1
triggerall = var(58) != 0
trigger1 = statetype = A
time = 0
attr = SCA,AA,AP,AT
stateno = 20017
IgnoreHitPause = 1
PauseMoveTime = 99999

[State -2]
type = HitOverRide
triggerall = Alive = 1
triggerall = var(53) = 1
triggerall = (stateno != [120,151])
triggerall = var(58) != 0
trigger1 = statetype != A
time = 0
attr = SCA,AA,AP,AT
stateno = 20016
IgnoreHitPause = 1
PauseMoveTime = 99999

[State -2]
type = HitOverRide
triggerall = Alive = 1
triggerall = var(53) = 1
triggerall = (stateno != [120,151])
triggerall = var(58) != 0
trigger1 = statetype = A
time = 0
attr = SCA,AA,AP,AT
stateno = 20017
IgnoreHitPause = 1
PauseMoveTime = 99999

[State 1]
type = Trans
trigger1 = var(53) = 1
trans = addalpha
alpha = 250,180

[State -2]
type = NotHitBy
trigger1 = var(53) = 1
value = SCA,AT,AP

[State -2]
type = HitBy
trigger1 = var(53) = 1
value = SCA,AA

[State -2]
type = NotHitBy
triggerall = var(53) != 1
trigger1 = var(58) != 0
value = SCA,AT

[State -2]
type = HitBy
triggerall = var(53) != 1
trigger1 = var(58) != 0
value = SCA,AA,AP

[state -3, R]
type = changestate
triggerall = Alive = 1
triggerall = var(58) != 0
triggerall = var(53) != 1
triggerall = movetype = H
trigger1 = gethitvar(damage) >= life
value = 5394


[State -2]
type = null;VarSet
trigger1 = stateno = 1050 && ((animelem=8,>0 && animelem=10,<0) && movehit = 1)
trigger2 = stateno = 1060 && ((animelem=8,>0 && animelem=10,<0) && movehit = 1)
trigger3 = stateno = 1030 && ((animelem=7,>0 && animelem=13,<0) && movehit = 1)
trigger4 = stateno = 1031 && ((animelem=7,>0 && animelem=13,<0) && movehit = 1)
var(41) = 1

[State -2, 1]
type = VarSet
trigger1    = p2movetype != H
var(41)     = 0

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

[Statedef -3]


[State -3, N]
type = varset
trigger1 = palno = [1,6]
var(58) = 0

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


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

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

[state -3, No power!]
type = Powerset
trigger1 = 1
triggerall = Var(59) = 2
value = 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 191, 1]
type = stopsnd
trigger1 = stateno != [191,192]
channel = 2

[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

[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


;-------------------------------------------------------
;AI
;立ちガード(相手立ち)
[State -3]
type = ChangeState
value = 130
triggerall = Alive = 1
triggerall = p2life > 0
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 = 131
triggerall = Alive = 1
triggerall = p2life > 0
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, SGuard]
type = ChangeState
Value = 130
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2movetype = A && MoveType = I && InGuardDist
Triggerall = ctrl
Trigger1 = StateNo = 151 || StateNo = 153
Trigger1 = StateType = S && p2statetype = S && p2bodydist X < 50 && BackEdgeBodyDist > 30 && random = [281,999]
trigger2 = StateType = S && p2statetype = A
trigger2 = p2bodydist X < 50 && random = [601,999]
trigger3 = StateType = S && p2statetype = S && p2bodydist X < 50 && BackEdgeBodyDist <= 30 && random = [261,999]
trigger4 = enemynear,statetype = S && enemynear,movetype = A && (Prevstateno = 5120 || Prevstateno = 5200)
trigger4 = p2bodydist X < 50 && random = [350,999]
trigger4 = EnemyNear,HitDefAttr != SC,AT

;---------------------------------------------------------------------------
;しゃがみガード
[State -1, CGuard]
type = ChangeState
Value = 131
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2statetype != A
triggerall = p2movetype = A && MoveType = I && InGuardDist
Triggerall = ctrl
Trigger1 = StateNo = 151 || StateNo = 153
Trigger1 = StateType = C && p2statetype = C && abs(enemynear,Pos X - Pos X)<= 70;&& BackEdgeBodyDist > 30
;Trigger2 = StateType = C && p2statetype = C && P2bodydist X < 70 && BackEdgeBodyDist <= 30
trigger2 = enemynear,statetype = C && enemynear,movetype = A && (Prevstateno = 5120 || Prevstateno = 5200)
trigger2 = p2bodydist X < 50 && random = [350,999]
trigger2 = EnemyNear,HitDefAttr != SC,AT


;---------------------------------------------------------------------------
;空中ガード
[State -1, AGuard]
type = ChangeState
Value = 132
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = statetype = A
triggerall = p2statetype != L
triggerall = p2movetype = A && MoveType = I && InGuardDist
Triggerall = ctrl
trigger1 = P2bodydist X < 80;(abs(enemynear,Pos X - Pos X)<= 80
trigger2 = ctrl && enemynear,NumProj ;&& (enemynear,NumProj,Pos X - Pos X) >= 0


;攻撃を避ける
[State -3]
type = ChangeState
value = 900
triggerall = Alive = 1
triggerall = p2life > 0
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 = Alive = 1
triggerall = p2life > 0
;triggerall = p2movetype = A
triggerall = statetype != A
triggerall = var(59) = 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 AI]
type = ChangeState
value = 1790
triggerall = var(59) != 0
triggerall = var(58)
triggerall = random <= 999
triggerall = power >= 2000
;triggerall = roundstate = 2
triggerall = p2statetype != A
triggerall = p2statetype != L
triggerall = ctrl && statetype != A
triggerall = p2bodydist x = [50,300]
triggerall = p2movetype = A
triggerall = statetype = S
trigger1 = ctrl
trigger1 = p2movetype != H

[State AI]
type = ChangeState
value = 1790
triggerall = var(59) != 0
triggerall = var(58)
triggerall = power >= 2000
triggerall = random <= 550
;triggerall = roundstate = 2
triggerall = p2statetype != A
triggerall = p2statetype != L
triggerall = ctrl && statetype != A
triggerall = p2bodydist x = [100,300]
triggerall = p2movetype = A
triggerall = statetype = S
trigger1 = ctrl
trigger1 = p2movetype != H


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

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

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


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

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

;ディバインアロー　エア2
[State -1]
type = ChangeState
value = 1000
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = numprojID(1000) = 0
triggerall = numprojID(1020) = 0
triggerall = random <= 120
triggerall = p2statetype != L
trigger1 = P2BodyDist X > 80
;trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger2 = P2BodyDist X > 80
;trigger2 = P2movetype = A
trigger2 = ctrl && statetype != A
trigger2 = Enemy, Numproj = 1 && P2MoveType = A
;trigger2 = p2movetype != H
trigger3 = ctrl && statetype != A
trigger3 = p2stateno = 1022;ワイヤー中



[State -1]
type = ChangeState
value = 1001
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = numprojID(1020) = 0
triggerall = numhelper(1001) = 0
triggerall = random <= 120
triggerall = p2statetype != L
trigger1 = P2BodyDist X > 80
;trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger2 = P2BodyDist X > 80
;trigger2 = P2movetype = A
trigger2 = ctrl && statetype != A
trigger2 = Enemy, Numproj = 1 && P2MoveType = A
;trigger2 = p2movetype != H
trigger3 = ctrl && statetype != A
trigger3 = p2stateno = 1022;ワイヤー中



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

;ディバインアロー　グランド2
[State -1]
type = ChangeState
value = 1010
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = random <= 150
triggerall = p2statetype != L
trigger1 = P2BodyDist X = [30,150]
;trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger1 = var(58) = 0
trigger2 = P2BodyDist X > 30
;trigger2 = P2movetype = A
trigger2 = ctrl && statetype != A
trigger2 = var(58) = 1
trigger3 = MoveGuarded
trigger3 = stateno = 1030
trigger3 = animelem = 11, >= 0
trigger3 = animelem = 13, <= 0
trigger4 = MoveGuarded
trigger4 = stateno = 1031
trigger4 = animelem = 11, >= 0
trigger4 = animelem = 12, <= 0

[State -1]
type = ChangeState
value = 1015
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = numprojID(1015) = 0
triggerall = p2statetype != L
trigger1 = P2BodyDist X = [50,150]
;trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger1 = random <= 100
trigger2 = p2stateno = 5120
trigger2 = P2BodyDist X <= 70
trigger2 = random <= 600


[State -1]
type = ChangeState
value = 1200
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = statetype != A
trigger1 = ctrl
trigger1 = p2bodydist X > 70
trigger1 = random <= 300

[State -1]
type = ChangeState
value = 1210
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = statetype != A
triggerall = power >= 500
trigger1 = ctrl
trigger1 = p2bodydist X = [30,100]
trigger1 = random <= 30

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

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

[State 215, 5]
type = ChangeState
value = 1040
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = statetype != A
triggerall = p2bodydist X <= 80
triggerall = p2statetype = A
triggerall = p2movetype = A
triggerall   = (enemy, p2bodydist X <= 80) && enemy, hitdefattr = SCA, NA, SA
trigger1 = random <= 600
trigger1 = ctrl

[State -1]
type = ChangeState
value = 1030
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = p2statetype != L
trigger1 = random <= 20
trigger1 = P2BodyDist X < 80
;trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger1 = p2movetype != H
trigger2 = stateno = 1031
trigger2 = animelem = 10, >= 0
trigger2 = animelem = 12, <= 0
trigger2 = movecontact
trigger2 = power < 1000



;チェーンブレイド　トランスアキシャル　スライス2
[State -1]
type = ChangeState
value = 1031
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = p2statetype != L
trigger1 = P2BodyDist X < 80
;trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger1 = p2movetype != H
trigger1 = random <= 200
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 = MoveGuarded
trigger7 = stateno = 1020
trigger7 = animelem = 12, >= 0
trigger7 = animelem = 13, <= 0


[State -1]
type = ChangeState
value = 1050
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = p2statetype != L
trigger1 = random <= 100
trigger1 = p2bodydist X <= 50
trigger1 = ctrl
trigger1 = P2movetype = A


;チェーンブレイド　サジタルエッジ　スライス強2
[State -1]
type = ChangeState
value = 1060
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = p2statetype != L
trigger1 = random <= 440
trigger1 = p2bodydist X <= 50
trigger1 = ctrl
trigger1 = P2movetype = A
trigger2 = statetype != A
trigger2 = ctrl
trigger2 = P2BodyDist X = [0,60]
trigger2 = P2BodyDist Y = [-80,0]
;trigger2 = P2MoveType = A


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

;ケイオス・タイド2
[State -1]
type = ChangeState
value = 1070
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = power >= 1000
triggerall = p2statetype != L
trigger1 = P2BodyDist X > 50
trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger1 = p2movetype != H
trigger1 = random <= 100
trigger2 = MoveGuarded
trigger2 = stateno = 1020
trigger2 = animelem = 12, >= 0
trigger2 = animelem = 13, <= 0
trigger3 = stateno = 1030
trigger3 = animelem = 11, >= 0
trigger3 = animelem = 13, <= 0
trigger3 = movecontact
trigger3 = power < 2000

[State -1]
type = ChangeState
value = 1075
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = power >= 2000
triggerall = p2statetype != L
triggerall = statetype != A
trigger1 = P2BodyDist X > 30
trigger1 = ctrl && statetype != A
trigger1 = random = 500
trigger1 = p2movetype = A
trigger1 = power < 3000
;trigger1 = random = ifelse(p2movetype = A,800,30)
trigger2 = stateno = 1071 && MoveHit
trigger2 = random = [0,499]

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

;イーディアンブレイド
[State -1]
type = ChangeState
value = 1080
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = power >= 1000
triggerall = p2statetype != L
triggerall = numhelper(1080) = 0
trigger1 = P2BodyDist X > 50
trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger1 = p2movetype != H
trigger1 = random <= 60
trigger2 = ctrl && statetype != A
trigger2 = p2stateno = 1022;ワイヤー中
;trigger3 = MoveGuarded
;trigger3 = stateno = 1020
;trigger3 = animelem = 12, >= 0
;trigger3 = animelem = 15, <= 0
;trigger4 = movecontact
;trigger4 = stateno = 1030 || stateno = 1031


;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 1085
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = numprojID(1085) = 0
triggerall = random <= 50
triggerall = power >= 1000
triggerall = FrontEdgeDist > 100
triggerall = p2statetype != L
trigger1 = P2BodyDist X > 80
;trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger1 = p2movetype != H
trigger2 = P2BodyDist X > 80
trigger2 = P2movetype = A
trigger2 = ctrl && statetype != A
trigger2 = Enemy, Numproj = 1 && P2MoveType = A
trigger2 = p2movetype != H


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

;白羅滅精
[State -1]
type = ChangeState
value = 2100
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = power >= 1000
triggerall = p2statetype != L
triggerall = numhelper(1080) = 0
triggerall = p2life > 0
trigger1 = P2BodyDist X > 30
trigger1 = ctrl && statetype != A
trigger1 = random <= 80
trigger2 = p2movetype = A
trigger2 = ctrl && statetype != A
trigger2 = random <= 300
trigger2 = power < 2000

;白羅滅精
[State -1]
type = ChangeState
value = 2700
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = power >= 3000
trigger1 = P2BodyDist X > 30
trigger1 = ctrl && statetype != A
trigger1 = random <= 20
trigger2 = ctrl && statetype != A
trigger2 = p2stateno = 1022;ワイヤー中
trigger3 = p2movetype = A
trigger3 = ctrl && statetype != A
trigger3 = random <= 300
trigger4 = stateno = 1071 && MoveHit
trigger4 = random = [500,999]
;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 = 2550
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = Var(53) =1
triggerall = power >= 3000
triggerall = p2statetype != L
trigger1 = ctrl && statetype != A
trigger1 = random <= 100

[State -1]
type = ChangeState
value = 2600
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = power >= 3000
triggerall = p2statetype != L
triggerall = numhelper(2620) = 0
trigger1 = ctrl && statetype != A
trigger1 = random <= 50

[State -1]
type = ChangeState
value = 2300
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = power >= 2000
triggerall = p2statetype != L
triggerall = numhelper(1080) = 0
trigger1 = ctrl && statetype != A
trigger1 = random <= 10

[State -1]
type = ChangeState
value = 2400
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = random <= 500
triggerall = power >= 2000
triggerall = P2statetype != A
triggerall = P2BodyDist X < 40
triggerall = p2statetype != L
trigger1 = ctrl && statetype != A

;ブルータル･ゴッド･プロジェクト2
[State -1]
type = ChangeState
value = 2000
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = power >= 2000
triggerall = p2statetype != L
trigger1 = P2BodyDist X < 70
;trigger1 = P2BodyDist Y < 30
;trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger1 = p2movetype != H
trigger2 = ctrl && statetype != A
trigger2 = p2stateno = 1022;ワイヤー中
trigger3 = MoveGuarded
trigger3 = stateno = 1020
trigger3 = animelem = 12, >= 0
trigger3 = animelem = 13, <= 0
trigger4 = stateno = 1030
trigger4 = animelem = 11, >= 0
trigger4 = animelem = 13, <= 0
trigger4 = MoveHit
trigger4 = power < 3000
trigger5 = P2BodyDist X < 70
trigger5 = ctrl && statetype != A
trigger5 = p2statetype = A
trigger5 = p2movetype != H
trigger6 = stateno = 1071 && MoveHit
trigger6 = random = [0,499]

[State -1]
type = ChangeState
value = 2500;ifelse(Var(53) =1,2550,2500)
triggerall = Alive = 1
triggerall = p2life > 0
triggerall = var(59) = 1
triggerall = power >= 3000
triggerall = p2statetype != L
trigger1 = P2BodyDist X < 70
;trigger1 = P2BodyDist Y < 30
;trigger1 = P2movetype = A
trigger1 = ctrl && statetype != A
trigger1 = p2movetype != H
trigger2 = ctrl && statetype != A
trigger2 = p2stateno = 1022;ワイヤー中
trigger3 = MoveGuarded
trigger3 = stateno = 1020
trigger3 = animelem = 12, >= 0
trigger3 = animelem = 13, <= 0
trigger4 = stateno = 1030
trigger4 = animelem = 11, >= 0
trigger4 = animelem = 13, <= 0
trigger4 = MoveHit
trigger5 = P2BodyDist X < 70
trigger5 = ctrl && statetype != A
trigger5 = p2statetype = A
trigger5 = p2movetype != H
trigger6 = stateno = 1071 && MoveHit
trigger6 = random = [0,499]



