;-------------------------------------
;元使用変数
;var(1)  : Common使用(不使用？)
;var(5)  : Common使用(不使用？)
;var(16) : シャイニングラジエーション
;var(20) : A.I.起動
;var(24) : Common使用(不使用？)
;var(25) : 右向き時スイッチ

;-------------------------------------
;追加使用変数
;var(37) : ランダムカットイン用
;var(38) : 超しましまインストール発動フラグ
;var(39) : 超しましまインストール回数管理
;var(40) : ステート確認
;var(41) : カラー保存
;var(42) : MoveReversed検知
;var(43) : P2StateNo記憶
;var(44) : フライング対策
;var(45) : 簡易アーマー確認

;var(47) : タッグ用アイコン位置（Ｘ座標）
;var(48) : アイコン位置（Ｘ座標）
;var(49) : アイコン位置（Ｙ座標）
;var(50) : ヒット数算出
;var(51) : しましま副作用？
;var(52) : GamaTime算出
;var(53) : シャイニングラジエーションヒット保険
;var(54) : ゲージ行動スイッチ
;var(55) : タッグ時相手判別
;var(56) : 相手進行方向判別
;var(57) : A.I.コンボフラグ
;var(58) : A.I.juggle値計算

;fvar(1) : ヒット数補正
;fvar(2) : カウンター補正
;fvar(3) : しましま補正
;fvar(4) : カラー補正

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

[Statedef -2]

;--------------------------------------------------------------------------
; デバッグ確認
[State -2]
type = DisplayToClipboard
trigger1 = palno <= 8
text = "%f,%d,%d,%d,gt%d"
params = fvar(1),var(20),var(41),var(38),var(39);alive,life;var(57),var(58),var(52)
ignorehitpause = 1

[State -2]
type = DisplayToClipboard
trigger1 = palno > 8
trigger1 = numhelper(5755) > 0
text = "GT:%d,V40:%d,Life:%d,Dam:%d,HV1:%d"
params = var(52),var(40),sysvar(4),helper(5755),gethitvar(damage),gethitvar(damage);helper(5755),var(1)
ignorehitpause = 1

;表示を横に加える
[State -2, DisplayToClipboard2]
Type = AppendToClipboard
trigger1 = 1
text = " P2Dist X=%d,Y=%d,Front=%d,PosY=%d"
params = floor(P2BodyDist X), floor(P2Dist Y), floor(FrontEdgeDist), ceil(Enemy,Pos Y)
ignorehitpause = 1

;表示を下に加える
[State -2, DisplayToClipboard3]
type = AppendToClipboard
trigger1 = 1
text = "\nVel X=%d/10,Y=%d/10,     \tP2Vel X=%d/10,Y=%d/10";
params = ceil(Vel X*10),floor(Vel Y*10),ceil(EnemyNear,Vel X*10),floor(EnemyNear,Vel Y*10)
ignorehitpause = 1

;---------------------------------------------------------------------------
; 闘い中以外は無敵
[State -2, NotHitBy]
type = NotHitBy
trigger1 = roundstate < 2
v = 44
value = 0
ignorehitpause = 1

[State -2, NotHitBy]
type = NotHitBy
trigger1 = var(44) != 1
value = SCA
time = 2
ignorehitpause = 1

[State -2, NotHitBy]
type = VarSet
triggerall = roundstate = 2
trigger1 = ctrl = 1
trigger2 = movetype = A
v = 44
value = 1
ignorehitpause = 1

;---------------------------------------------------------------------------
; 向き確認
[State -2, Facing]
type = VarSet
trigger1 = var(25) = 0
trigger1 = roundstate < 2
trigger1 = facing = 1
v = 25
value = 1
ignorehitpause = 1

;---------------------------------------------------------------------------
; 超しましまインストール発動フラグ
[State -2, VarSet]
type = VarSet
trigger1 = var(39) = 0
v = 38
value = (power >= 3000 || palno = [7,8])
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = var(39) = 1
trigger1 = roundstate != 2
v = 39
value = 2
ignorehitpause = 1

[State -2];noko（保険）
type = AssertSpecial
triggerall = alive
triggerall = palno < 9
triggerall = var(38) = 1
triggerall = var(39) = 0 || stateno = 14848
trigger1 = numenemy = 1
trigger1 = enemy,alive && enemy,life > 0
trigger2 = numenemy = 2
trigger2 = enemy(0),alive && enemy(0),life > 0
trigger2 = enemy(1),alive && enemy(1),life > 0
flag = noko
ignorehitpause = 1

[State -2, LifeAdd]
type = LifeAdd
triggerall = alive
triggerall = palno < 9
triggerall = var(38) = 1
triggerall = var(39) = 0 || stateno = 14848
trigger1 = life < 1
trigger2 = life-(gethitvar(damage)) < 1
value = 1
ignorehitpause = 1

[State -2, LifeSet]
type = LifeSet
triggerall = alive
triggerall = palno < 9
triggerall = var(38) = 1
triggerall = var(39) = 0 || stateno = 14848
trigger1 = life <= 1
trigger2 = life-(gethitvar(damage)) < 1
value = 1
ignorehitpause = 1

;---------------------------------------------------------------------------
; ステート確認
[State -2, VarSet]
type = VarSet
trigger1 = var(40) != 0
trigger1 = var(52) != gametime
v = 40
value = 0
ignorehitpause = 1

;---------------------------------------------------------------------------
; 当身系検知
[State -2]
type = VarSet
trigger1 = 1
v = 42
value = movereversed
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(42) != 0
v = 43
value = p2stateno
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(43) != 0
trigger1 = var(43) != p2stateno
trigger1 = var(43) != enemy,prevstateno
v = 43
value = 0
ignorehitpause = 1

;---------------------------------------------------------------------------
; しましまインストール関連
[State -2];投げ以外無敵
type = NotHitBy
triggerall = numhelper(9543) = 1
trigger1 = var(52) = gametime;(1)
value = , AA, AP
ignorehitpause = 1

[State -2];ガード不能
type = AssertSpecial
trigger1 = numhelper(9543) = 1
flag  = nostandguard
flag2 = nocrouchguard
flag3 = noairguard
ignorehitpause = 1

[State -2];しましま状態の体力充実具合
type = LifeAdd
triggerall = alive
triggerall = numhelper(9543) = 1
trigger1 = movetype != H
trigger1 = gametime%15 = 0
value = 1
ignorehitpause = 1

[State -2];しましま状態の気力充実具合
type = PowerAdd
triggerall = alive
triggerall = numhelper(9543) = 1
trigger1 = movetype != H
trigger1 = gametime%10 = 0
value = 3
ignorehitpause = 1

[State -2];しましま状態での攻撃力
type = VarSet
trigger1 = (1)
fv = 3
value = ifelse(numhelper(9543) = 1, 1.200, 1.000)
ignorehitpause = 1

[State -2];超しましま状態での攻撃力
type = VarSet
trigger1 = numhelper(9543) = 1
trigger1 = helper(9543),stateno = 9544
fv = 3
value = 1.500
ignorehitpause = 1

[State -2];しましま状態での副作用？
type = VarSet
trigger1 = (1)
v = 51
value = ifelse(numhelper(9543) = 1, 0, 1)
ignorehitpause = 1

[State -2, AfterImage];残像
type = AfterImage
triggerall = numhelper(9543) = 1
trigger1 = (!time)
time = 200
length = 15
palcolor = 256
palinvertall = 0
palbright = 90,90,90
palcontrast = 220,20,20
palpostbright = 10,10,10
paladd = 10,10,25
palmul = .65,.65,.75
timegap = 2
framegap = 2
trans = add
ignorehitpause = 1
persistent = 1

[State -2];しましま状態の点滅
type = PalFX
triggerall = numhelper(9543) = 1
trigger1 = (gametime%3) = 0
time = 1
add = 95,35,35
ignorehitpause = 1

[State -2];ダメージ参照
type = LifeAdd
triggerall = palno = [1,6]
triggerall = palno = var(41)
triggerall = numhelper(5755) > 0
triggerall = numhelper(9543) > 0
triggerall = !ishelper
triggerall = roundstate = 2
trigger1 = helper(5755),gethitvar(damage)
value = -ceil(helper(5755),gethitvar(damage)*1.500)

[State -2];ダメージ参照
type = LifeAdd
triggerall = palno = 7
triggerall = palno = var(41)
triggerall = numhelper(5755) > 0
triggerall = numhelper(9543) > 0
triggerall = !ishelper
triggerall = roundstate = 2
trigger1 = helper(5755),gethitvar(damage)
value = -ceil(helper(5755),gethitvar(damage)*ifelse(helper(9543),stateno=9543,1.000,0.750))

[State -2];ダメージ参照
type = LifeAdd
triggerall = palno = 8
triggerall = palno = var(41)
triggerall = numhelper(5755) > 0
triggerall = numhelper(9543) > 0
triggerall = !ishelper
triggerall = roundstate = 2
trigger1 = helper(5755),gethitvar(damage)
value = -ceil(helper(5755),gethitvar(damage)*ifelse(helper(9543),stateno=9543,0.750,0.500))

;---------------------------------------------------------------------------
; 上位カラーしましま
[State -2];発動
type = ChangeState
value = 4848
triggerall = palno >= 9 || var(41) != [1,8]
triggerall = numhelper(9543) = 0
triggerall = stateno != 4848
trigger1 = roundstate = 2 && ctrl

[State -2];本体完全無敵
type = NotHitBy
triggerall = palno >= 11 || var(41) != [1,10]
triggerall = numhelper(9543) = 1
trigger1 = (1)
value2 = SCA
ignorehitpause = 1

[State -2];カラーを変数に保存
type = VarSet
trigger1 = roundstate < 1
v = 41
value = palno
ignorehitpause = 1

[State -2];しましま状態の体力充実具合（１１Ｐ～）
type = VarAdd
triggerall = alive
triggerall = roundstate < 4
triggerall = sysvar(4) < lifemax;1000
trigger1 = palno = 11 || var(41) = 11
trigger1 = gametime%6 = 0
trigger2 = palno >= 12 || var(41) != [1,11]
trigger2 = gametime%4 = 0
sysvar(4) = 1
ignorehitpause = 1

[State -2];しましま状態の気力充実具合（９、１０Ｐ）
type = PowerAdd
triggerall = alive
trigger1 = palno = 9 || var(41) = 9
trigger1 = numhelper(5755) > 0
trigger1 = helper(5755),var(1) > 20
trigger2 = palno = 10 || var(41) = 10
trigger2 = numhelper(5755) > 0
trigger2 = helper(5755),var(1) > 15
value = 2
ignorehitpause = 1

[State -2];しましま状態の気力充実具合（１１Ｐ～）
type = PowerAdd
triggerall = alive
trigger1 = palno = 11 || var(41) = 11
trigger1 = gametime%6 = 0
trigger2 = palno >= 12 || var(41) != [1,11]
trigger2 = gametime%2 = 0
value = ifelse((palno = 11 || var(41) = 11), 1, 2)
ignorehitpause = 1

[State -2];しましま状態の気力充実具合（１２Ｐ～）
type = PowerSet
triggerall = alive
trigger1 = palno >= 12 || var(41) != [1,11]
trigger1 = gametime%2 = 0
value = power + 2
ignorehitpause = 1

[State -2];通常時の攻撃力補正（７Ｐ～）
type = VarSet
trigger1 = 1
fv = 4
value = ifelse(palno = 7, 1.250, ifelse(palno = 8, 1.500, 1.000))
ignorehitpause = 1

[State -2];しましま状態での攻撃力（１１Ｐ～）
type = VarSet
trigger1 = palno >= 11 || var(41) != [1,10]
fv = 3
value = ifelse((palno = 11 || var(41) = 11), 2.000, 3.000)
ignorehitpause = 1

[State -2];しましま状態での副作用克服
type = VarSet
trigger1 = palno >= 7 || var(41) != [1,6]
v = 51
value = 1
ignorehitpause = 1

[State -2, AfterImage];残像１２Ｐ
type = AfterImage
triggerall = palno = 12 || var(41) != [1,11]
triggerall = numhelper(9543) = 1
trigger1 = (!Time)
time = 200
length = 15
palcolor = 256
palinvertall = 0
palbright = 90,90,90
palcontrast = 220,220,20
palpostbright = 10,10,10
paladd = 15,15,10
palmul = .75,.75,.65
timegap = 2
framegap = 2
trans = add
ignorehitpause = 1
persistent = 1

[State -2, AfterImage];残像１１Ｐ
type = AfterImage
triggerall = palno = 11 || var(41) = 11
triggerall = numhelper(9543) = 1
trigger1 = (!Time)
time = 200
length = 15
palcolor = 256
palinvertall = 0
palbright = 90,90,90
palcontrast = 20,20,220
palpostbright = 10,10,10
paladd = 10,10,20
palmul = .65,.65,.75
timegap = 2
framegap = 2
trans = add
ignorehitpause = 1
persistent = 1

[State -2, AfterImage];残像１０Ｐ
type = AfterImage
triggerall = palno = 10 || var(41) = 10
triggerall = numhelper(9543) = 1
trigger1 = (!Time)
time = 200
length = 15
palcolor = 256
palinvertall = 0
palbright = 90,90,90
palcontrast = 110,220,20
palpostbright = 10,10,10
paladd = 10,25,10
palmul = .65,.75,.65
timegap = 2
framegap = 2
trans = add
ignorehitpause = 1
persistent = 1

[State -2, AfterImage];残像９Ｐ
type = AfterImage
triggerall = palno = 9 || var(41) = 9
triggerall = numhelper(9543) = 1
trigger1 = (!Time)
time = 200
length = 15
palcolor = 256
palinvertall = 0
palbright = 90,90,90
palcontrast = 110,110,110
palpostbright = 10,10,10
paladd = 10,10,10
palmul = .65,.65,.65
timegap = 2
framegap = 2
trans = add
ignorehitpause = 1
persistent = 1

[State -2];体力を変数管理
type = VarSet
trigger1 = roundstate < 2
sysvar(4) = lifemax;1000
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = sysvar(4) > lifemax;1000
sysvar(4) = lifemax;1000
ignorehitpause = 1

[State -2];しましま根性値１２Ｐ
type = VarSet
triggerall = palno = 12 || var(41) != [1,11]
triggerall = !ishelper
triggerall = roundstate = 2
triggerall = numhelper(5755) > 0
triggerall = numhelper(9543) > 0
triggerall = var(52) = gametime && (var(40) = 331)
triggerall = helper(5755),var(1) > 5 && helper(5755),gethitvar(damage) = [0,1000]
triggerall = !(helper(5755),var(1) >= 1 && helper(5755),gethitvar(damage) >= 100)
trigger1 = helper(5755),gethitvar(damage)
sysvar(4) = sysvar(4) - floor(helper(5755),gethitvar(damage)*0.001)
ignorehitpause = 1

[State -2];しましま根性値１２Ｐ
type = VarSet
triggerall = palno = 12 || var(41) != [1,11]
triggerall = !ishelper
triggerall = roundstate = 2
triggerall = numhelper(5755) > 0
triggerall = numhelper(9543) > 0
triggerall = var(52) = gametime && (var(40) = 331)
triggerall = helper(5755),var(1) <= 5 && helper(5755),gethitvar(damage) = [0,1000]
triggerall = !(helper(5755),var(1) >= 1 && helper(5755),gethitvar(damage) >= 100)
trigger1 = helper(5755),gethitvar(damage) >= 600
sysvar(4) = sysvar(4) - floor(helper(5755),gethitvar(damage)*0.025)
ignorehitpause = 1

[State -2];しましま根性値１２Ｐ
type = VarSet
triggerall = palno = 12 || var(41) != [1,11]
triggerall = !ishelper
triggerall = roundstate = 2
triggerall = numhelper(5755) > 0
triggerall = numhelper(9543) > 0
triggerall = var(52) = gametime && (var(40) = 331)
triggerall = helper(5755),var(1) <= 5 && helper(5755),gethitvar(damage) = [0,1000]
triggerall = !(helper(5755),var(1) >= 1 && helper(5755),gethitvar(damage) >= 100)
trigger1 = helper(5755),gethitvar(damage) = [301,599]
sysvar(4) = sysvar(4) - floor(helper(5755),gethitvar(damage)*0.075)
ignorehitpause = 1

[State -2];しましま根性値１２Ｐ
type = VarSet
triggerall = palno = 12 || var(41) != [1,11]
triggerall = !ishelper
triggerall = roundstate = 2
triggerall = numhelper(5755) > 0
triggerall = numhelper(9543) > 0
triggerall = var(52) = gametime && (var(40) = 331)
triggerall = helper(5755),var(1) <= 5 && helper(5755),gethitvar(damage) = [0,1000]
triggerall = !(helper(5755),var(1) >= 1 && helper(5755),gethitvar(damage) >= 100)
trigger1 = helper(5755),gethitvar(damage) <= 300
sysvar(4) = sysvar(4) - floor(helper(5755),gethitvar(damage)*0.200)
ignorehitpause = 1

[State -2];しましま根性値１１Ｐ
type = null;VarSet
triggerall = palno = 11 || var(41) = 11
triggerall = !ishelper
triggerall = roundstate = 2
triggerall = numhelper(5755) > 0
triggerall = numhelper(9543) > 0
triggerall = var(52) = gametime && (var(40) = 331)
triggerall = helper(5755),var(1) > 10 && helper(5755),gethitvar(damage) = [0,1000]
triggerall = !(helper(5755),var(1) >= 1 && helper(5755),gethitvar(damage) >= 150)
trigger1 = helper(5755),gethitvar(damage)
sysvar(4) = sysvar(4) - floor(helper(5755),gethitvar(damage)*0.01)
ignorehitpause = 1

[State -2];しましま根性値１１Ｐ
type = VarSet
triggerall = palno = 11 || var(41) = 11
triggerall = !ishelper
triggerall = roundstate = 2
triggerall = numhelper(5755) > 0
triggerall = numhelper(9543) > 0
triggerall = var(52) = gametime && (var(40) = 331)
triggerall = helper(5755),var(1) <= 10 && helper(5755),gethitvar(damage) = [0,1000]
triggerall = !(helper(5755),var(1) >= 1 && helper(5755),gethitvar(damage) >= 150)
trigger1 = helper(5755),gethitvar(damage) >= 600
sysvar(4) = sysvar(4) - floor(helper(5755),gethitvar(damage)*0.30)
ignorehitpause = 1

[State -2];しましま根性値１１Ｐ
type = VarSet
triggerall = palno = 11 || var(41) = 11
triggerall = !ishelper
triggerall = roundstate = 2
triggerall = numhelper(5755) > 0
triggerall = numhelper(9543) > 0
triggerall = var(52) = gametime && (var(40) = 331)
triggerall = helper(5755),var(1) <= 10 && helper(5755),gethitvar(damage) = [0,1000]
triggerall = !(helper(5755),var(1) >= 1 && helper(5755),gethitvar(damage) >= 150)
trigger1 = helper(5755),gethitvar(damage) = [301,599]
sysvar(4) = sysvar(4) - floor(helper(5755),gethitvar(damage)*0.40)
ignorehitpause = 1

[State -2];しましま根性値１１Ｐ
type = VarSet
triggerall = palno = 11 || var(41) = 11
triggerall = !ishelper
triggerall = roundstate = 2
triggerall = numhelper(5755) > 0
triggerall = numhelper(9543) > 0
triggerall = var(52) = gametime && (var(40) = 331)
triggerall = helper(5755),var(1) <= 10 && helper(5755),gethitvar(damage) = [0,1000]
triggerall = !(helper(5755),var(1) >= 1 && helper(5755),gethitvar(damage) >= 150)
trigger1 = helper(5755),gethitvar(damage) <= 300
sysvar(4) = sysvar(4) - floor(helper(5755),gethitvar(damage)*0.50)
ignorehitpause = 1

[State -2];しましま根性値１０Ｐ
type = VarSet
triggerall = palno = 10 || var(41) = 10
triggerall = !ishelper
triggerall = roundstate = 2
triggerall = numhelper(5755) > 0
triggerall = numhelper(9543) > 0
triggerall = helper(5755),var(1) <= 15 && helper(5755),gethitvar(damage) = [0,1000]
triggerall = !(helper(5755),var(1) >= 1 && helper(5755),gethitvar(damage) >= 200)
trigger1 = helper(5755),gethitvar(damage) = [0,1000]
sysvar(4) = sysvar(4) - ceil(helper(5755),gethitvar(damage)*(sysvar(4)*0.001))
ignorehitpause = 1

[State -2];しましま根性値９Ｐ
type = VarSet
triggerall = palno = 9 || var(41) = 9
triggerall = !ishelper
triggerall = roundstate = 2
triggerall = numhelper(5755) > 0
triggerall = numhelper(9543) > 0
triggerall = helper(5755),var(1) <= 20 && helper(5755),gethitvar(damage) = [0,1000]
triggerall = !(helper(5755),var(1) >= 1 && helper(5755),gethitvar(damage) >= 300)
trigger1 = helper(5755),gethitvar(damage) = [0,1000]
sysvar(4) = sysvar(4) - ceil(helper(5755),gethitvar(damage)*0.5)
ignorehitpause = 1

[State -2];しましま根性値９Ｐ
type = VarSet
triggerall = palno = 9 || var(41) = 9
triggerall = !ishelper
triggerall = roundstate = 2
triggerall = numhelper(5755) > 0
triggerall = numhelper(9543) > 0
triggerall = var(52) != gametime
trigger1 = sysvar(4) - ceil((sysvar(4) - life) * 0.75) > 0
sysvar(4) = life + ceil((sysvar(4) - life) * 0.75)
ignorehitpause = 1

[State -2];しましま根性値１０Ｐ
type = VarSet
triggerall = palno = 10 || var(41) = 10
triggerall = !ishelper
triggerall = roundstate = 2
triggerall = numhelper(5755) > 0
triggerall = numhelper(9543) > 0
triggerall = var(52) != gametime
trigger1 = sysvar(4) - ceil((sysvar(4) - life) * 0.5) > 0
sysvar(4) = life + ceil((sysvar(4) - life) * 0.5)
ignorehitpause = 1

[State -2];しましま根性値９、１０Ｐ
type = VarSet
triggerall = palno = 9 || palno = 10 || var(41) = [9,10]
triggerall = !ishelper
triggerall = roundstate = 2
triggerall = numhelper(5755) > 0
triggerall = numhelper(9543) > 0
trigger1 = helper(5755),var(2) = 0
trigger1 = helper(5755),gethitvar(damage) > 1000
sysvar(4) = sysvar(4) - ifelse(palno = 9, 250, 100)
ignorehitpause = 1

[State -2];noko（９、１０Ｐ）
type = AssertSpecial
triggerall = alive
triggerall = palno = 9 || palno = 10 || var(41) = [9,10]
triggerall = sysvar(4) > 0
trigger1 = numhelper(5755) > 0
trigger1 = helper(5755),gethitvar(damage) != [0,1000]
trigger2 = var(52) != gametime
flag = noko
ignorehitpause = 1

[State -2];noko（１１Ｐ～）
type = AssertSpecial
triggerall = alive
triggerall = palno >= 11 || var(41) != [1,10]
trigger1 = numhelper(5755) > 0
trigger1 = helper(5755),gethitvar(damage) != [0,1000]
trigger2 = var(52) != gametime
trigger2 = life <= 0 || life > 1000
trigger3 = roundstate = 2 && var(40) != 331
trigger4 = numhelper(5755) = 0 && numhelper(9543) = 0
flag = noko
ignorehitpause = 1

[State -2];ステ抜け（１１Ｐ～）
type = SelfState
triggerall = alive
triggerall = palno >= 11 || var(41) != [1,10]
trigger1 = var(52) != gametime
trigger2 = roundstate = 2 && var(40) != 331
trigger3 = numhelper(5755) > 0
trigger3 = helper(5755),gethitvar(damage) != [0,1000]
value = ifelse(stateno = 7776 || prevstateno = 7776, 854, 120)
ctrl = 1
ignorehitpause = 1

[State -2];ステ抜け（１２Ｐ～）
type = SelfState
triggerall = alive
triggerall = palno >= 12 || var(41) != [1,11]
triggerall = stateno != 7776 && prevstateno != 7776
trigger1 = roundstate = 3 && (!movecontact && !movereversed)
value = 150
ignorehitpause = 1

[State -2];ライフ管理（９Ｐ～）
type = LifeSet
triggerall = alive
triggerall = sysvar(4) > 0
trigger1 = palno >= 9 || var(41) != [1,8]
value = sysvar(4)
ignorehitpause = 1

[State -2];☆
type = LifeAdd
triggerall = alive
triggerall = palno >= 9 || var(41) != [1,8]
triggerall = sysvar(4) > 0
trigger1 = life <= 1
trigger2 = life-(gethitvar(damage)) < 1
value = sysvar(4)
ignorehitpause = 1

[State -2];ラジエーション背景消去
type = RemoveExplod
trigger1 = stateno != 7776
id = 7777
ignorehitpause = 1

[State -2];本体ダメージ軽減（７Ｐ、８Ｐ）
type = DefenceMulSet
trigger1 = palno = 7
trigger1 = numhelper(9543) = 1
trigger1 = helper(9543),stateno = 9544
trigger2 = palno = 8
trigger2 = numhelper(9543) = 0
value = 0.750
ignorehitpause = 1

[State -2];本体ダメージ軽減（８Ｐ）
type = DefenceMulSet
trigger1 = palno = 8
trigger1 = numhelper(9543) = 1
trigger1 = helper(9543),stateno = 9544
value = 0.500
ignorehitpause = 1

[State -2];本体ダメージ軽減（１１Ｐ～）
type = DefenceMulSet
trigger1 = palno >= 11 || var(41) != [1,10]
value = 0.0000000331
ignorehitpause = 1

[State -2]
type = PosSet
triggerall = alive
triggerall = palno >= 12 || var(41) != [1,11]
triggerall = stateno != 7776 && prevstateno != 7776
trigger1 = roundstate = 3 && (!movecontact && !movereversed)
trigger2 = roundstate = 4
y = 0
ignorehitpause = 1

[State -2]
type = PosFreeze
triggerall = alive
triggerall = palno >= 12 || var(41) != [1,11]
triggerall = stateno != 7776 && prevstateno != 7776
trigger1 = roundstate = 3 && (!movecontact && !movereversed)
trigger2 = roundstate = 4
ignorehitpause = 1

;---------------------------------------------------------------------------
; フェイスアイコン
[State -2]
type = Helper
triggerall = numhelper(7732) = 0
trigger1 = roundstate <= 2
helpertype = normal
name = "haruka_icon"
ID = 7732
pos = -50,-200
postype = back
stateno = 7732
keyctrl = 0
ignorehitpause = 1
persistent = 0
ontop = 1
sprpriority = 3

;---------------------------------------------------------------------------
; コンボ補正
[State -2, HitCount]
type = VarSet
trigger1 = p2movetype != H || p2statetype = L || p2stateno = [5120,5199]
v = 50
value = 0
ignorehitpause = 1

[State -2, HitCount]
type = VarSet
trigger1 = p2movetype = H
v = 50
value = enemy,gethitvar(hitcount)
ignorehitpause = 1

[State -2, Combo]
type = VarSet
trigger1 = var(50) < 30
fv = 1
value = 1.000-(var(50)*0.03)
ignorehitpause = 1

[State -2, Combo]
type = VarSet
trigger1 = var(50) >= 30
fv = 1
value = 0.1
ignorehitpause = 1

;---------------------------------------------------------------------------
; カウンター補正
[State -2, Counter]
type = VarSet
trigger1 = p2movetype != A
fv = 2
value = 1.000
ignorehitpause = 1

[State -2, Counter]
type = VarSet
trigger1 = p2movetype = A
fv = 2
value = 1.300
ignorehitpause = 1

[State -2, Attack];攻撃補正
type = AttackMulSet
trigger1 = 1
value = fvar(1)*fvar(2)*fvar(3)*fvar(4)

;--------------------------------------------------------------------------
; タッグ用アイコン位置変更

[State -2, Icon-Tag]
type = VarSet
triggerall = var(47) = 0
triggerall = numpartner > 0
triggerall = id > partner,id
trigger1 = partner,name = "aoi"
trigger2 = partner,name = "kurumi"
v = 47
value = 25

;--------------------------------------------------------------------------
;獣を焦がす(黒秋葉)　相手ステータス変化
[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = enemy,authorname = "tukemon&HAL" && Enemy,Name = "Akiha"
trigger1 = enemy,var(56) = 1
value = -8
absolute = 1
kill = 0

[State -2]
type = PowerAdd
triggerall = numenemy
triggerall = enemy,authorname = "tukemon&HAL" && Enemy,Name = "Akiha"
trigger1 = enemy,var(51)%10 = 2
trigger1 = enemy,var(56) = 1
value = -33

;--------------------------------------------------------------------------
;略奪/獣を焦がす/獣を窮める　相手用
[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = enemy,authorname = "⑨" && enemy,name = "Akiha_Vermilion"
trigger1 = enemy,var(47) = 1
value = -8
absolute = 1
kill = 0

[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = enemy,authorname = "⑨" && enemy,name = "Akiha_Vermilion"
trigger1 = enemy,var(48) = 1 && enemy,numexplod(4005)
value = -8
absolute = 1
kill = 0

[State -2]
type = PowerAdd
triggerall = numenemy
triggerall = enemy,authorname = "⑨" && enemy,name = "Akiha_Vermilion"
trigger1 = enemy,var(47) = 1
value = -26

;--------------------------------------------------------------------------
;パウダースノウ　相手用
[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = enemy,authorname = "⑨" && enemy,name = "Len"
trigger1 = enemy,var(47) = 1 || enemy,var(48) = 1
value = -enemy,var(47)*4-enemy,var(48)*4
absolute = 1
kill = 0

;--------------------------------------------------------------------------
;じょうろ　相手用
[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = enemy,authorname = "⑨" && enemy,name = "Hisui"
trigger1 = enemy,var(47) = 1
value = -10
absolute = 1
kill = 0

[State -2]
type = PowerAdd
triggerall = numenemy
triggerall = enemy,authorname = "⑨" && enemy,name = "Hisui"
trigger1 = enemy,var(47) = 1
value = -150

;---------------------------------------------------------------------------
;がんばりました。EX　相手用
[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = enemy,authorname = "⑨" && enemy,name = "Hisui"
trigger1 = enemy,var(48) = 1
value = ifelse(gametime%2 = 0, -3, -4)
absolute = 1
kill = 0

;--------------------------------------------------------------------------
;ブラック・クラック　相手用
[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = enemy,authorname = "⑨" && enemy,name = "Warachia"
trigger1 = enemy,var(47) = 1
value = -10
absolute = 1
kill = 0

[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = enemy,authorname = "⑨" && enemy,name = "Warachia"
trigger1 = enemy,var(47) = 2 || enemy,var(47) = 4
value = -15
absolute = 1
kill = 0

[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = enemy,authorname = "⑨" && enemy,name = "Warachia"
trigger1 = enemy,var(47) = 3
value = -30
absolute = 1
kill = 0

[State -2]
type = PowerAdd
triggerall = numenemy
triggerall = enemy,authorname = "⑨" && enemy,name = "Warachia"
trigger1 = enemy,var(47) = 1
value = 6

[State -2]
type = PowerAdd
triggerall = numenemy
triggerall = enemy,authorname = "⑨" && enemy,name = "Warachia"
trigger1 = enemy,var(47) = 2 || enemy,var(47) = 3 || enemy,var(47) = 4
value = 15

;--------------------------------------------------------------------------
;現代医学の犠牲者です。　相手用
[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = enemy,authorname = "⑨" && enemy,name = "Kohaku"
trigger1 = enemy,var(47) = 1
value = ifelse(gametime%2 = 0, -3, -4)
absolute = 1
kill = 0

;--------------------------------------------------------------------------
;毒効果（ドロウィンアルカナ)
[State -2]
type = PowerAdd
triggerall = numenemy
triggerall = enemy,authorname = "Drowin arcana"
triggerall = enemy,fvar(20) > 0
trigger1 = power > 0
value = -1

[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = enemy,authorname = "Drowin arcana"
triggerall = enemy,fvar(20) > 0
trigger1 = gametime % 7 = 0
value = -1
kill = 0

[State -2]
type = Palfx
triggerall = numenemy
triggerall = enemy,authorname = "Drowin arcana"
trigger1 = enemy,fvar(20) > 0
add = 100,0,110
mul = 220,220,220
time = 5
ignorehitpause = 1

;--------------------------------------------------------------------------
;■西行寺幽々子　霊符及び寿命相手ステート
[State -2]
type       = LifeAdd
triggerall = numenemy
triggerall = enemy,authorname = "Souki" && enemy,name = "Yuyuko Saigyouji"
trigger1   = enemy,var(3) = 1 || enemy,var(3) = 2
trigger1   = gametime%6 = 0
value      = ifelse(enemy,var(3) = 1, -2, -3)
kill       = 0

;--------------------------------------------------------------------------
;うどんげ　毒煙幕用（シロトさん）
[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = enemynear,authorname = "Shiroto"
triggerall = enemynear,name = "Reisen Udongein Inaba"
trigger1 = enemynear,var(40) != 0
trigger1 = pos y = [-30,10]
trigger1 = gametime%3 = 0
value = -enemynear,var(40)
kill = 0

;--------------------------------------------------------------------------
;■脱魂の儀 制御（authorname = "mikage_th105"）
[State pos moving]
type = AssertSpecial
triggerall = (enemynear,name = "Komachi Onoduka")*(enemynear,authorname = "mikage_th105")*(teammode = single)
trigger1 = (enemynear,stateno = 820)*(enemynear,anim = 823)*(enemynear,animelem = 6,13)
trigger2 = (enemynear,stateno = 821)*(enemynear,anim = 823)*(enemynear,animelem = 6,43)
flag = noautoturn

;移動
[State pos moving]
type = PosAdd
triggerall = (enemynear,name = "Komachi Onoduka")*(enemynear,authorname = "mikage_th105")*(teammode = single)
trigger1 = (enemynear,stateno = 820)*(enemynear,anim = 823)*(enemynear,animelem = 6,13)
trigger2 = (enemynear,stateno = 821)*(enemynear,anim = 823)*(enemynear,animelem = 6,43)
x = -ceil(enemynear,fvar(24))*facing*enemynear,facing
y = -ceil(enemynear,fvar(25))*(statetype != L)

;Statetype != A + Statetype != L の場合強制落下Stateへ
[State pos moving]
type = ChangeState
triggerall = (enemynear,name = "Komachi Onoduka")*(enemynear,authorname = "mikage_th105")*(teammode = single)
triggerall = (statetype != A)*(pos y != 0)*(statetype != L)
trigger1 = (enemynear,stateno = 820)*(enemynear,anim = 823)*(enemynear,animelem = 6,13)
trigger2 = (enemynear,stateno = 821)*(enemynear,anim = 823)*(enemynear,animelem = 6,43)
value = 50

;--------------------------------------------------------------------------
;■脱魂の儀 制御（authorname = "mikage_th"）

;振り向き抑制
[State pos moving]
type = AssertSpecial
triggerall = (enemynear,name = "Komachi Onoduka")*(enemynear,authorname = "mikage_th")*(teammode = single)
trigger1 = (enemynear,stateno = 820)*(enemynear,anim = 823)*(enemynear,animelem = 6,13)
trigger2 = (enemynear,stateno = 821)*(enemynear,anim = 823)*(enemynear,animelem = 6,43)
flag = noautoturn

;移動
[State pos moving]
type = PosAdd
triggerall = (enemynear,name = "Komachi Onoduka")*(enemynear,authorname = "mikage_th")*(teammode = single)
trigger1 = (enemynear,stateno = 820)*(enemynear,anim = 823)*(enemynear,animelem = 6,13)
trigger2 = (enemynear,stateno = 821)*(enemynear,anim = 823)*(enemynear,animelem = 6,43)
x = -ceil(enemynear,fvar(36))*facing*enemynear,facing
y = -ceil(enemynear,fvar(37))*(statetype != L)

;Statetype != A + Statetype != L の場合強制落下Stateへ
[State pos moving]
type = ChangeState
triggerall = (enemynear,name = "Komachi Onoduka")*(enemynear,authorname = "mikage_th")*(teammode = single)
triggerall = (statetype != A)*(pos y != 0)*(statetype != L)
trigger1 = (enemynear,stateno = 820)*(enemynear,anim = 823)*(enemynear,animelem = 6,13)
trigger2 = (enemynear,stateno = 821)*(enemynear,anim = 823)*(enemynear,animelem = 6,43)
value = 50

;--------------------------------------------------------------------------
;■毒煙幕「瓦斯織物の玉」 制御（authorname = "mikage_th105"）
[State LifeAdd]
type = LifeAdd
trigger1 = numenemy = 1
trigger1 = pos y > -240
trigger1 = (enemy(0),name = "Reisen Udongein Inaba")*(enemy(0),authorname = "mikage_th105")*(enemy(0),fvar(21))
value = -floor(enemy(0),fvar(21))*2
ignorehitpause = 1
absolute = 1
kill = 0

[State LifeAdd]
type = LifeAdd
triggerall = numenemy = 2
triggerall = pos y > -240
trigger1 = (enemy(0),name = "Reisen Udongein Inaba")*(enemy(0),authorname = "mikage_th105")*(enemy(0),fvar(21))
trigger2 = (enemy(1),name = "Reisen Udongein Inaba")*(enemy(1),authorname = "mikage_th105")*(enemy(1),fvar(21))
value = -floor(enemy(0),fvar(21))*2-floor(enemy(1),fvar(21))*2
ignorehitpause = 1
absolute = 1
kill = 0

;--------------------------------------------------------------------------
;■毒煙幕「瓦斯織物の玉」 制御（authorname = "mikage_th"）
[State LifeAdd]
type = LifeAdd
trigger1 = numenemy = 1
trigger1 = pos y > -240
trigger1 = (enemy(0),name = "Reisen Udongein Inaba")*(enemy(0),authorname = "mikage_th")*(enemy(0),fvar(35))
value = -floor(enemy(0),fvar(35))*2
ignorehitpause = 1
absolute = 1
kill = 0

[State LifeAdd]
type = LifeAdd
triggerall = numenemy = 2
triggerall = pos y > -240
trigger1 = (enemy(0),name = "Reisen Udongein Inaba")*(enemy(0),authorname = "mikage_th")*(enemy(0),fvar(35))
trigger2 = (enemy(1),name = "Reisen Udongein Inaba")*(enemy(1),authorname = "mikage_th")*(enemy(1),fvar(35))
value = -floor(enemy(0),fvar(35))*2-floor(enemy(1),fvar(35))*2
ignorehitpause = 1
absolute = 1
kill = 0

;--------------------------------------------------------------------------
;■土着神の祟り＆ミシャグジさまの祟り 制御

;土着神の祟り
[State LifeAdd]
type = LifeAdd
trigger1 = numenemy
trigger1 = (enemynear,name = "Suwako Moriya")*(enemynear,authorname = "mikage_th")*(teammode = single)
trigger1 = floor((enemynear,var(42)%100)*0.1) = [0,1]
trigger1 = (floor(enemynear,fvar(38)))%1000 > 0
trigger1 = floor(enemynear,fvar(38)*0.001) = 2
value = floor(enemynear,fvar(36)*(lifemax/10000.000000))
ignorehitpause = 1
absolute = 1
kill = 0

;ミシャグジさまの祟り
[State LifeAdd]
type = LifeAdd
triggerall = numenemy
triggerall = (enemynear,name = "Suwako Moriya")*(enemynear,authorname = "mikage_th")*(teammode = single)
trigger1 = floor(enemynear,fvar(35)) = 1
trigger1 = movetype = H
trigger1 = stateno != [150,155]
trigger2 = floor(enemynear,fvar(35)) = 2
trigger2 = movetype = H
trigger2 = stateno = [150,155]
value = floor(enemynear,fvar(33))
ignorehitpause = 1
absolute = 1
kill = 0

;--------------------------------------------------------------------------
;神尾観鈴　呪い効果付加
[State -2, LifeAdd]
type = LifeAdd
triggerall = (enemy,teammode = simul) = 0
triggerall = (teammode = simul) = 0
triggerall = numenemy
triggerall = enemy,authorname = "586"
triggerall = enemy,name = "Misuzu Kamio"
triggerall = enemy,fvar(11) > 0
trigger1 = enemy,var(13) = 1
trigger1 = gametime % 13 = 0
trigger2 = enemy,var(13) = 2
trigger2 = gametime % 11 = 0
trigger3 = enemy,var(13) = 3
trigger3 = gametime % 8  = 0
trigger4 = enemy,var(13) = 4
trigger4 = gametime % 6  = 0
trigger5 = enemy,var(13) = 5
trigger5 = gametime % 3  = 0
value = -1
kill = 0
ignorehitpause = 1

[State -2, PalFX]
type = PalFX
triggerall = (enemy,teammode = simul) = 0
triggerall = (teammode = simul) = 0
triggerall = numenemy
triggerall = enemy,authorname = "586"
triggerall = enemy,name = "Misuzu Kamio"
trigger1 = enemy,fvar(11) > 0
add = -50,150,150
time = 1
ignorehitpause = 1

;--------------------------------------------------------------------------
;イチコロ毒（SAIKEIユダ）
[State -2]
type = LifeAdd
triggerall = numenemy
trigger1 = enemy,name = "JUDA"
trigger1 = enemy,authorname = "SAIKEI"
trigger1 = enemy,fvar(23) > 0
trigger1 = floor(enemy,fvar(23))%4 = 0
trigger1 = enemy,var(0) <= 0
trigger1 = enemy,movetype != h || enemy,movetype = h && enemy,hitshakeover
value = -1
kill = 0

[State -2]
type = PalFX
triggerall = numenemy
triggerall = gametime%20 = 0
trigger1 = enemy,name = "JUDA"
trigger1 = enemy,authorname = "SAIKEI"
trigger1 = enemy,fvar(23) > 0
time = 8
add = 255,0,0

;-----------------------------------------------------------------------
;アグリアスモーグリ恩恵
[State -2]
type = PalFX
triggerall = numenemy
triggerall = !ishelper
trigger1 = roundstate = 2
trigger1 = alive = 1
trigger1 = numpartner = 1
trigger1 = partner,authorname = "ouchi" && partner,name = "Agrias_Oaks"
trigger1 = partner,var(25)%100 = 7
trigger1 = partner,var(10) = 100
time = 50
add = 0,0,54
mul = 256,256,256
sinadd = 0,0,108,100

[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = !ishelper
trigger1 = roundstate = 2
trigger1 = alive = 1
trigger1 = numpartner = 1
trigger1 = partner,authorname = "ouchi" && partner,name = "Agrias_Oaks"
trigger1 = partner,var(25)%100 = 7
trigger1 = partner,var(10) > 0
value = 1
ignorehitpause = 1

;--------------------------------------------------------------------------
;愛原奈都美「挑発」対応ステート
[State -2]
type = PowerAdd
triggerall = numenemy
triggerall = enemynear,name = "AIHARA NATSUMI" && enemynear,authorname = "YU-TOHARU"
trigger1 = enemynear,stateno = 197 && enemynear,statetime = 70
value = -45

;--------------------------------------------------------------------------
;アル･アジフ「挑発」対応ステート
[State -2]
type = PowerAdd
triggerall = numenemy
triggerall = enemynear,name = "AL AZIF" && enemynear,authorname = "YU-TOHARU"
trigger1 = enemynear,stateno = 195 && enemynear,statetime = 30
value = -45

;--------------------------------------------------------------------------
;マミヤ「挑発」対応ステート
[State -2]
type = PowerAdd
triggerall = numenemy
triggerall = enemynear,name = "MAMIYA" && enemynear,authorname = "YU-TOHARU"
trigger1 = enemynear,stateno = 195 && enemynear,statetime = 30
value = 1000

;---------------------------------------------------------------------------
;A.I.起動用

[State -2, AI_Helper]
type = Helper
triggerall = !numhelper(10000)
triggerall = var(20) = 0
triggerall = roundstate = 2
triggerall = alive
triggerall = ctrl && stateno = 0
trigger1 = prevstateno = [191,194]
trigger2 = prevstateno = 6471
trigger3 = prevstateno = 2166
trigger4 = prevstateno = 5900
helpertype = normal
name = "AI"
stateno = 10000
id = 10000
pos = 9999,9999
keyctrl = 1
pausemovetime = 2147483647
supermovetime = 2147483647
persistent = 0

[State -2, 関係無いステートに行かないように]
type = ChangeState
trigger1 = ishelper(10000)
trigger1 = stateno != 10000
value = 10000

[State -2, AI_Learning]
type = Null;Helper
trigger1 = !numhelper(25000)
;trigger1 = roundstate = 2
trigger1 = alive
helpertype = normal
name = "Learning"
stateno = 25000
id = 25000
pos = 9999,9999
keyctrl = 0
pausemovetime = 2147483647
supermovetime = 2147483647
persistent = 0

[State -2, 関係無いステートに行かないように]
type = ChangeState
trigger1 = ishelper(25000)
trigger1 = stateno != 25000
value = 25000

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

[Statedef -3]

;---------------------------------------------------------------------------
; A.I.調整項目
;---------------------------------------------------------------------------
;A.I.起動＆レベル調整
[State -3, AI_Start]
Type = VarSet
triggerall = var(20) < 1
triggerall = roundstate = [1,2]
trigger1  = command = "AI00" || command = "AI01" || command = "AI02"
trigger2  = command = "AI03" || command = "AI04" || command = "AI05"
trigger3  = command = "AI06" || command = "AI07" || command = "AI08"
trigger4  = command = "AI09" || command = "AI10" || command = "AI11"
trigger5  = command = "AI12" || command = "AI13" || command = "AI14"
trigger6  = command = "AI15" || command = "AI16" || command = "AI17"
trigger7  = command = "AI18" || command = "AI19" || command = "AI20"
trigger8  = command = "AI21" || command = "AI22" || command = "AI23"
trigger9  = command = "AI24" || command = "AI25" || command = "AI26"
trigger10 = command = "AI27" || command = "AI28" || command = "AI29"
trigger11 = command = "AI30" || command = "AI31" || command = "AI32"
trigger12 = command = "AI33" || command = "AI34" || command = "AI35"
trigger13 = command = "AI36" || command = "AI37" || command = "AI38"
trigger14 = command = "AI39" || command = "AI40" || command = "AI41"
trigger15 = command = "AI42" || command = "AI43" || command = "AI44"
trigger16 = command = "AI45" || command = "AI46" || command = "AI47"
trigger17 = command = "AI48" || command = "AI49" || command = "AI50"
trigger18 = numhelper(10000) > 0
trigger18 = helper(10000),var(20)
;trigger19 = 1	;常時AIスイッチ。左端にある｢;｣を消すと、起動が早い変わりにプレイヤー操作は出来ません。
v = 20
value = 10		;← AIレベルを【1～10】の間で変更可能です。


;ゲージ行動スイッチ
[State -3, AI]
type = VarSet
trigger1 = var(54) = 0
trigger1 = !ishelper
trigger1 = roundsexisted = 0
v = 54
value = 4;0		;← 決められた数字を選択すると、ゲージをどう使用して行動するかが変わります。
ignorehitpause = 1	;数字によっては強さがかなり違ってくる･･･かもしれない？
			;ただし、１１Ｐ及び１２Ｐの場合は設定しても行動が変わらないのでご了承をー
			;０ ･･･ ツインエンジェルにおまかせだよ！
			;　→　状況ごとに判断してゲージ技を使用します。
			;１ ･･･ ダントツ、いっちばーん☆
			;　→　１ゲージ乱舞技を使う確率が非常に高くなります。故に、燃費が悪くなる？
			;２ ･･･ 私が負けるわけ、ないじゃないですか♪
			;　→　テスラのストライカーを使う頻度が高くなります。
			;３ ･･･ 趣味はしましまぱんつ収集だっ！
			;　→　主に「しましまインストール」にゲージを消費します。でも、思い込みでパワーＵＰだ！（きゅんきゅん劇場 第47話）
			;４ ･･･ レッツゴーフィーバータイム！！
			;　→　ゲージを残してエンジェルシャイニングラジエーションを狙いにいきます。事故って負けることが多いですが･･･。


;アイコン位置調整（Ｘ座標）
[State -3, AI]
type = VarSet
trigger1 = var(48) = 0
trigger1 = !ishelper
trigger1 = roundsexisted = 0
v = 48
value = 0		;← 数字をマイナスにすると左に、プラスにすると右にアイコンが動かせます。（１Ｐ側での場合）
ignorehitpause = 1	;なお、０での位置はデフォルトライフバーに合わせてあります。


;アイコン位置調整（Ｙ座標）
[State -3, AI]
type = VarSet
trigger1 = var(49) = 0
trigger1 = !ishelper
trigger1 = roundsexisted = 0
v = 49
value = 0		;← 数字をマイナスにすると下に、プラスにすると上にアイコンが動かせます。
ignorehitpause = 1	;なお、０での位置はデフォルトライフバーに合わせてあります。


;===========================================================================
;タッグ時相手判別
[State -3, AI]
type = VarSet
trigger1 = numenemy = 1
trigger2 = numenemy = 2
trigger2 = enemynear,alive
v = 55
value = 0
ignorehitpause = 1

[State -3, AI]
type = VarSet
trigger1 = numenemy > 1
trigger1 = !enemynear,alive
v = 55
value = 1
ignorehitpause = 1

;===========================================================================
;相手進行方向判別
[State -3, AI]
type = VarSet
trigger1 = 1
v = 56
value = (facing * enemynear(var(55)),facing) * ifelse(p2dist x > 0, 1, -1)
ignorehitpause = 1

;===========================================================================
;コンボフラグ解除
[State -3, AI]
type = VarSet
triggerall = var(20) = [1,10]
triggerall = alive
triggerall = !ishelper
trigger1 = movetype = H || roundstate != 2
trigger2 = enemynear(var(55)),movetype != H || enemynear(var(55)),statetype = L
v = 57
value = 0
ignorehitpause = 1

;コンボ開始
[State -3, AI]
type = VarSet
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = enemynear(var(55)),movetype = H
;triggerall = enemynear(var(55)),statetype != A
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = movehit
trigger1 = stateno = 442 || stateno = 200 || stateno = 211 || stateno = 629
trigger2 = movehit
trigger2 = stateno = 402 || stateno = 403
trigger3 = movehit
trigger3 = stateno = 2843 || stateno = 2844
v = 57
value = 1
ignorehitpause = 1

;===========================================================================
;juggle値算出

[State -3, AI]
type = Null
trigger1 = p2statetype != A || p2movetype != H
trigger1 = var(58) := -2
trigger2 = var(58) < 0
trigger2 = p2statetype = A
trigger2 = var(58) := var(58) + 1

[State -3, AI]
type = Null
triggerall = var(58) >= 0
triggerall = p2statetype = A
triggerall = movehit = 1
trigger1 = stateno = 200 || stateno = 201 || stateno = 211 || stateno = 214
trigger1 = var(58) := var(58) + 4
trigger2 = stateno = 400 || stateno = 401 || stateno = 402 || stateno = 403
trigger2 = var(58) := var(58) + 1
trigger3 = stateno = 431 || stateno = 432 || stateno = 442 || stateno = 448
trigger3 = var(58) := var(58) + 4
trigger4 = stateno = 2144
trigger4 = var(58) := var(58) + 1
trigger5 = stateno = 612 || stateno = 1006
trigger5 = var(58) := var(58) + 4
trigger6 = stateno = 1005
trigger6 = var(58) := var(58) + 2

;===========================================================================
[State -3, GameTime]
type = VarSet
trigger1 = 1
var(52) = gametime
ignorehitpause = 1

;===========================================================================
; ステート確認
[State -3, StateNo]
type = VarSet
triggerall = time > 0
trigger1  = stateno = 0 && (anim != 0 && anim != 5)
trigger2  = stateno = 10 && anim != 10
trigger3  = stateno = 11 && anim != 11
trigger4  = stateno = 12 && anim != 12
trigger5  = stateno = 20 && anim != [20,21]
trigger6  = stateno = 40 && anim != 40
trigger7  = stateno = 50 && anim != [41,46]
trigger8  = stateno = 52 && anim != 47
trigger9  = stateno = 100 && anim != 100
trigger10 = stateno = 102 && anim != 102
trigger11 = stateno = 105 && anim != 105
trigger12 = stateno = 106 && anim != 47
trigger13 = stateno = 120 && anim != [120,122]
trigger14 = stateno = 130 && anim != 130
trigger15 = stateno = 131 && anim != 131
trigger16 = stateno = 132 && anim != 132
trigger17 = stateno = 140 && anim != [140,142]
trigger18 = (stateno = [150,151]) && anim != 150
trigger19 = (stateno = [152,153]) && anim != 151
trigger20 = (stateno = [154,155]) && anim != 152
trigger21 = stateno = 200 && anim != 200
trigger22 = stateno = 201 && anim != 201
trigger23 = stateno = 211 && anim != 211
trigger24 = stateno = 214 && anim != 214
trigger25 = stateno = 393 && anim != 393
trigger26 = stateno = 394 && anim != 394
trigger27 = stateno = 400 && anim != 400
trigger28 = stateno = 401 && anim != 401
trigger29 = stateno = 402 && anim != 402
trigger30 = stateno = 403 && anim != 403
trigger31 = stateno = 431 && anim != 431
trigger32 = stateno = 432 && anim != 432
trigger33 = stateno = 442 && anim != 442
trigger34 = stateno = 448 && anim != 448
trigger35 = stateno = 612 && anim != 612
trigger36 = stateno = 615 && anim != 615
trigger37 = stateno = 616 && anim != 616
trigger38 = stateno = 627 && anim != 627
trigger39 = stateno = 629 && anim != 629
trigger40 = stateno = 723 && anim != 723
trigger41 = stateno = 724 && anim != 724
trigger42 = stateno = 833 && anim != 833
trigger43 = stateno = 854 && anim != 854
trigger44 = stateno = 1005 && anim != 1005
trigger45 = stateno = 1006 && anim != 1006
trigger46 = stateno = 1041 && anim != 1041
trigger47 = stateno = 2144 && anim != 2144
trigger48 = stateno = 2843 && anim != 2843
trigger49 = stateno = 2844 && anim != 2844
trigger50 = stateno = 3600 && anim != 3600
trigger51 = stateno = 4848 && anim != 4848
trigger52 = stateno = 5468 && anim != 5468
trigger53 = stateno = 7655 && anim != 7655
trigger54 = stateno = 7667 && anim != 7667
trigger55 = stateno = 7668 && anim != 7668
trigger56 = stateno = 7669 && anim != 7669
trigger57 = stateno = 7671 && anim != 7697
trigger58 = stateno = 7677 && anim != 7677
trigger59 = stateno = 7729 && anim != 7729
trigger60 = stateno = 7776 && anim != 7776
trigger61 = stateno = 7959 && anim != 7959
trigger62 = stateno = 9283 && anim != 9283
trigger63 = !(stateno = 0 && (anim = 0 || anim = 5))
trigger63 = !(stateno = 10 && anim = 10)
trigger63 = !(stateno = 11 && anim = 11)
trigger63 = !(stateno = 12 && anim = 12)
trigger63 = !(stateno = 20 && anim = [20,21])
trigger63 = !(stateno = 40 && anim = 40)
trigger63 = !(stateno = 50 && anim = [41,46])
trigger63 = !(stateno = 52 && anim = 47)
trigger63 = !(stateno = 100 && anim = 100)
trigger63 = !(stateno = 102 && anim = 102)
trigger63 = !(stateno = 105 && anim = 105)
trigger63 = !(stateno = 120 && anim = [120,122])
trigger63 = !(stateno = 130 && anim = 130)
trigger63 = !(stateno = 131 && anim = 131)
trigger63 = !(stateno = 132 && anim = 132)
trigger63 = !(stateno = 140 && anim = [140,142])
trigger63 = !((stateno = [150,151]) && anim = 150)
trigger63 = !((stateno = [152,153]) && anim = 151)
trigger63 = !((stateno = [154,155]) && anim = 152)
trigger63 = !(stateno = 200 && anim = 200)
trigger63 = !(stateno = 201 && anim = 201)
trigger63 = !(stateno = 211 && anim = 211)
trigger63 = !(stateno = 214 && anim = 214)
trigger63 = !(stateno = 393 && anim = 393)
trigger63 = !(stateno = 394 && anim = 394)
trigger63 = !(stateno = 400 && anim = 400)
trigger63 = !(stateno = 401 && anim = 401)
trigger63 = !(stateno = 402 && anim = 402)
trigger63 = !(stateno = 403 && anim = 403)
trigger63 = !(stateno = 431 && anim = 431)
trigger63 = !(stateno = 432 && anim = 432)
trigger63 = !(stateno = 442 && anim = 442)
trigger63 = !(stateno = 448 && anim = 448)
trigger63 = !(stateno = 612 && anim = 612)
trigger63 = !(stateno = 615 && anim = 615)
trigger63 = !(stateno = 616 && anim = 616)
trigger63 = !(stateno = 627 && anim = 627)
trigger63 = !(stateno = 629 && anim = 629)
trigger63 = !(stateno = 723 && anim = 723)
trigger63 = !(stateno = 724 && anim = 724)
trigger63 = !(stateno = 833 && anim = 833)
trigger63 = !(stateno = 854 && anim = 854)
trigger63 = !(stateno = 1005 && anim = 1005)
trigger63 = !(stateno = 1006 && anim = 1006)
trigger63 = !(stateno = 1041 && anim = 1041)
trigger63 = !(stateno = 2144 && anim = 2144)
trigger63 = !(stateno = 2843 && anim = 2843)
trigger63 = !(stateno = 2844 && anim = 2844)
trigger63 = !(stateno = 3600 && anim = 3600)
trigger63 = !(stateno = 4848 && anim = 4848)
trigger63 = !(stateno = 5468 && anim = 5468)
trigger63 = !(stateno = 7655 && anim = 7655)
trigger63 = !(stateno = 7667 && anim = 7667)
trigger63 = !(stateno = 7668 && anim = 7668)
trigger63 = !(stateno = 7669 && anim = 7669)
trigger63 = !(stateno = 7671 && anim = 7697)
trigger63 = !(stateno = 7677 && anim = 7677)
trigger63 = !(stateno = 7729 && anim = 7729)
trigger63 = !(stateno = 7776 && anim = 7776)
trigger63 = !(stateno = 7959 && anim = 7959)
trigger63 = !(stateno = 9283 && anim = 9283)
var(40) = 0
ignorehitpause = 1

[State -3, StateNo]
type = VarSet
trigger1  = stateno = 0 && (anim = 0 || anim = 5)
trigger2  = stateno = 10 && anim = 10
trigger3  = stateno = 11 && anim = 11
trigger4  = stateno = 12 && anim = 12
trigger5  = stateno = 20 && anim = [20,21]
trigger6  = stateno = 40 && anim = 40
trigger7  = stateno = 50 && anim = [41,46]
trigger8  = stateno = 52 && anim = 47
trigger9  = stateno = 100 && anim = 100
trigger10 = stateno = 102 && anim = 102
trigger11 = stateno = 105 && anim = 105
trigger12 = stateno = 106 && anim = 47
trigger13 = stateno = 120 && anim = [120,122]
trigger14 = stateno = 130 && anim = 130
trigger15 = stateno = 131 && anim = 131
trigger16 = stateno = 132 && anim = 132
trigger17 = stateno = 140 && anim = [140,142]
trigger18 = (stateno = [150,151]) && anim = 150
trigger19 = (stateno = [152,153]) && anim = 151
trigger20 = (stateno = [154,155]) && anim = 152
trigger21 = stateno = 200 && anim = 200
trigger22 = stateno = 201 && anim = 201
trigger23 = stateno = 211 && anim = 211
trigger24 = stateno = 214 && anim = 214
trigger25 = stateno = 393 && anim = 393
trigger26 = stateno = 394 && anim = 394
trigger27 = stateno = 400 && anim = 400
trigger28 = stateno = 401 && anim = 401
trigger29 = stateno = 402 && anim = 402
trigger30 = stateno = 403 && anim = 403
trigger31 = stateno = 431 && anim = 431
trigger32 = stateno = 432 && anim = 432
trigger33 = stateno = 442 && anim = 442
trigger34 = stateno = 448 && anim = 448
trigger35 = stateno = 612 && anim = 612
trigger36 = stateno = 615 && anim = 615
trigger37 = stateno = 616 && anim = 616
trigger38 = stateno = 627 && anim = 627
trigger39 = stateno = 629 && anim = 629
trigger40 = stateno = 723 && anim = 723
trigger41 = stateno = 724 && anim = 724
trigger42 = stateno = 833 && anim = 833
trigger43 = stateno = 854 && anim = 854
trigger44 = stateno = 1005 && anim = 1005
trigger45 = stateno = 1006 && anim = 1006
trigger46 = stateno = 1041 && anim = 1041
trigger47 = stateno = 2144 && anim = 2144
trigger48 = stateno = 2843 && anim = 2843
trigger49 = stateno = 2844 && anim = 2844
trigger50 = stateno = 3600 && anim = 3600
trigger51 = stateno = 4848 && anim = 4848
trigger52 = stateno = 5468 && anim = 5468
trigger53 = stateno = 7655 && anim = 7655
trigger54 = stateno = 7667 && anim = 7667
trigger55 = stateno = 7668 && anim = 7668
trigger56 = stateno = 7669 && anim = 7669
trigger57 = stateno = 7671 && anim = 7697
trigger58 = stateno = 7677 && anim = 7677
trigger59 = stateno = 7729 && anim = 7729
trigger60 = stateno = 7776 && anim = 7776
trigger61 = stateno = 7959 && anim = 7959
trigger62 = stateno = 9283 && anim = 9283
var(40) = 331
ignorehitpause = 1

;===========================================================================
[State -3, AI]
type = Null
trigger1 = palno = 12 || var(41) != [1,11]
trigger1 = var(54) := 0 || 1
trigger2 = palno = 11 || var(41) = 11
trigger2 = var(54) := 0 || 1

;===========================================================================
[State -3, Armor_1]
type = VarAdd
triggerall = !(enemy,ishelper)
triggerall = var(45) >= 0
trigger1 = movehit = 1
trigger1 = p2stateno != [5000,5099]
v = 45
value = 1

[State -3, Armor_2]
type = VarSet
triggerall = !(enemy,ishelper)
triggerall = var(45) >= 0
trigger1 = movehit = 1
trigger1 = p2stateno = [5000,5099]
v = 45
value = -1

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

; 挑発
[State -3, AI]
Type = ChangeState
Value = 5468
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = statetype != A
triggerall = enemynear(var(55)),movetype = H
triggerall = enemynear(var(55)),statetype != L
triggerall = enemynear(var(55)),stateno = [120,199]
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = ctrl
trigger1 = power < 1500
trigger1 = numhelper(999) > 0
trigger1 = helper(999),time > 110
trigger1 = helper(999),time < 190 - var(20) * 4
trigger1 = random >= 1000 - (var(20) * var(20) * 2)

; 投げ
[State -3, AI]
type = ChangeState
value = 627
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = statetype != A
triggerall = enemynear(var(55)),moveType != H
triggerall = enemynear(var(55)),statetype != A || (enemynear(var(55)),pos y >= 0 && enemynear(var(55)),vel y > 0)
triggerall = enemynear(var(55)),statetype != L
triggerall = enemynear(var(55)),stateno != [120,139]
triggerall = enemynear(var(55)),stateno != [150,159]
triggerall = roundstate = 2
triggerall = alive
triggerall = !ishelper
triggerall = ctrl
triggerall = p2dist x >= 0
triggerall = p2bodydist x = [-5,20]
triggerall = random <= var(20) * var(20) * 1
trigger1 = backedgedist < 60 || prevstateno = [5000,5270]
trigger2 = enemy,numhelper = 0 || enemy,numproj = 0
trigger3 = enemynear(var(55)),animtime >= -3
trigger3 = enemynear(var(55)),hitdefattr = SC, NA, SA
trigger4 = enemynear(var(55)),time <= 1
trigger4 = !enemynear(var(55)),ctrl
trigger4 = !enemynear(var(55)),hitdefattr = SCA, NT, ST, HT, NA, SA, HA, NP, SP, HP

; しゃがみ弱キック
[State -3, AI]
type = ChangeState
value = 442
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = ctrl
trigger1 = enemynear(var(55)),movetype != H
trigger1 = p2bodydist x = [-5,10]
trigger1 = random >= 1000 - var(20) * 20
trigger2 = ctrl
trigger2 = enemynear(var(55)),movetype = H
trigger2 = p2bodydist x = [-5,15]
trigger2 = random >= 1000 - var(20) * 50
trigger3 = stateno = 448 && movecontact

; しゃがみ弱キック
[State -3, AI]
type = ChangeState
value = 442
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = statetype != A
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = ctrl
trigger1 = enemynear(var(55)),statetype = L
trigger1 = enemynear(var(55)),stateno = 5120
trigger1 = enemynear(var(55)),animtime >= -3
trigger1 = p2bodydist x = [-5,15]
trigger1 = random >= 1000 - var(20) * 30

; 弱キック
[State -3, AI]
type = ChangeState
value = 211
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = ctrl
triggerall = p2bodydist x = [-5,25]
triggerall = !(numhelper(999) > 0 && prevstateno = 52)
trigger1 = enemynear(var(55)),movetype != H
trigger1 = random <= var(20) * 20
trigger2 = enemynear(var(55)),movetype = H
trigger2 = random <= var(20) * 30
;trigger2 = (stateno = 200)|| (stateno = 302) || (stateno = 301)|| (stateno = 300)|| (stateno = 303)|| (stateno = 442) ||(stateno = 448)
;trigger2 = (movecontact)

; 弱パンチ
[State -3, AI]
type = ChangeState
value = 200
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = ctrl
triggerall = p2bodydist x = [-5,25]
trigger1 = enemynear(var(55)),movetype != H
trigger1 = random >= 1000 - var(20) * 15
trigger2 = enemynear(var(55)),movetype = H
trigger2 = random >= 1000 - var(20) * 25

; ジャンプ弱パンチ
[State -3, AI]
type = ChangeState
value = 400
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = statetype = A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = ctrl
trigger1 = p2bodydist x - (vel x * 3) - (enemynear(var(55)),vel x * 3) = [-50,45]
trigger1 = p2bodydist y - (vel y * 3) + (enemynear(var(55)),vel y * 3) = [-50,70]
trigger1 = random >= 1000 - var(20) * 30

; ジャンプ弱キック
[State -3, AI]
type = ChangeState
value = 402
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = statetype = A
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = ctrl
trigger1 = enemynear(var(55)),statetype != L
trigger1 = vel y >= -2.0
trigger1 = p2bodydist x - (vel x * 5) - (enemynear(var(55)),vel x * 5) = [-50,45]
trigger1 = p2bodydist y - (vel y * 5) + (enemynear(var(55)),vel y * 5) = [-25,80]
trigger1 = random >= 1000 - var(20) * 40
trigger2 = ctrl
trigger2 = enemynear(var(55)),statetype = L
trigger2 = enemynear(var(55)),stateno = 5120
trigger2 = enemynear(var(55)),animtime >= -10
trigger2 = p2bodydist x - (vel x * 5) = [-50,50]
trigger2 = p2bodydist y - (vel y * 5) = [-20,80]
trigger2 = random <= var(20) * 25
trigger3 = stateno = 400 && movecontact > 3
trigger3 = random <= var(20) * 90

; ジャンプ強キック
[State -3, AI]
type = ChangeState
value = 403
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = statetype = A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = (stateno = 401 || stateno = 402) && movecontact > 3
trigger1 = random <= var(20) * 90

; ジャンプ強パンチ
[State -3, AI]
type = ChangeState
value = 401
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = statetype = A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = (stateno = 402 || stateno = 403) && movecontact > 3
trigger1 = random <= var(20) * 90

; エンジェルインパクト（弱）
[State -3, AI]
type = ChangeState
value = ifelse(random%2 = 0, 615, 616)
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = statetype = A
triggerall = enemynear(var(55)),statetype != A
triggerall = enemynear(var(55)),stateno = [120,199]
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = p2dist x <= 0
trigger1 = p2bodydist x = [-50,80]
trigger1 = pos y = [-(enemynear(var(55)),const(size.height)),-(enemynear(var(55)),const(size.height))-20]
trigger1 = (stateno = 400 || stateno = 401 || stateno = 402 || stateno = 403) && movecontact
trigger1 = random <= var(20) * 10

; エンジェルインパクト（弱）
[State -3, AI]
type = ChangeState
value = ifelse(random%2 = 0, 615, 616)
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = statetype = A
triggerall = enemynear(var(55)),statetype != A
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = ctrl
trigger1 = enemynear(var(55)),stateno != [5000,5110]
trigger1 = pos y < -(enemynear(var(55)),const(size.height)) || p2dist x < 0
trigger1 = p2dist x < enemynear(var(55)),const(size.ground.front)
trigger1 = p2bodydist x = [-50,80]
trigger1 = random <= var(20) * ifelse(p2dist x <= 0, abs(p2dist x * 2), 10)

; エンジェルインパクト（強）
[State -3, AI]
type = ChangeState
value = 616
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = statetype = A
triggerall = enemynear(var(55)),statetype != A
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = enemynear(var(55)),statetype != L
trigger1 = pos y >= -60 - abs(p2bodydist x * 0.25)
trigger1 = p2bodydist x = [-50,80]
trigger1 = p2bodydist y = [-50,90]
trigger1 = (stateno = 400 || stateno = 401 || stateno = 402 || stateno = 403) && movecontact
trigger1 = random >= 1000 - (var(20) * 10)

; エンジェルしょーりゅー（弱）
[State -3, AI]
type = ChangeState
value = 2843
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype = A
triggerall = enemynear(var(55)),statetype != L
triggerall = enemynear(var(55)),stateno != 40
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = ctrl
trigger1 = enemynear(var(55)),vel y >= 0 || numhelper(999) > 0
trigger1 = p2bodydist x + ((enemynear(var(55)),vel x * 7) * var(56)) = [-5,40]
trigger1 = enemynear(var(55)),pos y + (enemynear(var(55)),vel y * 7) = [-95,-50]
trigger1 = random <= var(20) * var(20) * 2
trigger2 = enemynear(var(55)),movetype != A
trigger2 = !enemynear(var(55)),ctrl
trigger2 = p2bodydist x + ((enemynear(var(55)),vel x * 7) * var(56)) = [-5,45]
trigger2 = enemynear(var(55)),pos y + (enemynear(var(55)),vel y * 7) > -80
trigger2 = enemynear(var(55)),time >= 40 - (random%(var(20)*2))
trigger2 = random <= (enemynear(var(55)),time) * var(20)
trigger3 = numhelper(999) > 0
trigger3 = helper(999),time > 110
trigger3 = helper(999),time < 215
trigger3 = p2bodydist x + ((enemynear(var(55)),vel x * 7) * var(56)) = [-5,30]
trigger3 = enemynear(var(55)),pos y + (enemynear(var(55)),vel y * 7) > -80
trigger3 = random <= var(20) * var(20) * 4

; エンジェルしょーりゅー（強）
[State -3, AI]
type = ChangeState
value = 2844
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype = A
triggerall = enemynear(var(55)),statetype != L
triggerall = enemynear(var(55)),stateno != 40
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = ctrl
trigger1 = enemynear(var(55)),vel y >= 0 || numhelper(999) > 0
trigger1 = p2bodydist x + ((enemynear(var(55)),vel x * 7) * var(56)) = [35,70]
trigger1 = enemynear(var(55)),pos y + (enemynear(var(55)),vel y * 7) = [-100,-70]
trigger1 = random >= 1000 - (var(20) * var(20) * 2)
trigger2 = enemynear(var(55)),movetype != A
trigger2 = !enemynear(var(55)),ctrl
trigger2 = p2bodydist x + ((enemynear(var(55)),vel x * 7) * var(56)) = [30,80]
trigger2 = enemynear(var(55)),pos y + (enemynear(var(55)),vel y * 7) > -100
trigger2 = enemynear(var(55)),time >= 40 - (random%var(20))
trigger2 = random >= 1000 - ((enemynear(var(55)),time) * var(20))
trigger3 = numhelper(999) > 0
trigger3 = helper(999),time > 110
trigger3 = helper(999),time < 215
trigger3 = p2bodydist x + ((enemynear(var(55)),vel x * 7) * var(56)) = [30,55]
trigger3 = enemynear(var(55)),pos y + (enemynear(var(55)),vel y * 7) > -100
trigger3 = random >= 1000 - (var(20) * var(20) * 4)

; エンジェルパンチ（弱）
[State -3, AI]
type = ChangeState
value = 393
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = stateno = 2144 && animelemtime(11) > 0 && moveguarded
trigger1 = random <= var(20) * var(20) * 9

; エンジェルキック（強）
[State -3, AI]
type = ChangeState
value = 1006
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = ctrl
trigger1 = enemynear(var(55)),backedgedist < 5
trigger1 = p2bodydist x = [50,100]
trigger1 = random <= var(20) * 1
trigger2 = ctrl || (stateno = 200 || stateno = 211) && movecontact
trigger2 = numhelper(999) > 0
trigger2 = helper(999),time > 110
trigger2 = helper(999),time < 200 - var(20) * 4
trigger2 = enemynear(var(55)),stateno = [120,169]
trigger2 = p2bodydist x = [0,110]
trigger2 = random >= 1000 - (var(20) * var(20) * 2)
trigger3 = enemynear(var(55)),backedgedist < 5
trigger3 = (stateno = 200 || stateno = 211) && movecontact = 1
trigger3 = random <= var(20) * var(20) * 1

; エンジェルシャイニングラジエーション
[State -3, AI]
type = ChangeState
value = 7729
triggerall = var(20) = [1,10]
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = power >= 3000
triggerall = ctrl
trigger1 = ((100*sysvar(4))/lifemax) <= 80
trigger1 = palno >= 12 || var(41) != [1,11]
trigger1 = random <= var(20) * floor(500/(ceil((sysvar(4)*100)/lifemax)))
trigger2 = ((100*sysvar(4))/lifemax) <= 50
trigger2 = palno = 11 || var(41) = 11
trigger2 = random <= var(20) * floor(50/(ceil((sysvar(4)*100)/lifemax)))
trigger3 = var(45) >= 5
trigger3 = ((100*life)/lifemax) <= 25
trigger3 = palno <= 10 || var(41) = [1,10]
trigger3 = random <= var(20) * var(20) * 5
trigger4 = var(54) = 4
trigger4 = ((100*life)/lifemax) <= 25
trigger4 = palno = 9 || palno = 10 || var(41) = [9,10]
trigger4 = random <= var(20) * var(20) * 1

;===========================================================================
;立ち回り

; ジャンプ回避
[State -3, AI]
type = ChangeState
value = 40
triggerall = var(20) = [1,10]
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = enemynear(var(55)),hitdefattr = SCA, NT, ST, HT
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = ctrl
trigger1 = enemynear(var(55)),time >= 10 - (random%var(20))
trigger1 = random >= 1000 - var(20) * 10
trigger2 = enemynear(var(55)),time >= 25 - (random%var(20))
trigger2 = random <= var(20) * ifelse(enemynear(var(55)),vel x != 0, 80, 40)
trigger3 = enemynear(var(55)),movetype = A
trigger3 = facing*enemynear(var(55)),facing = -1
trigger3 = enemynear(var(55)),time >= 15 - (random%var(20))
trigger3 = random >= 1000 - (enemynear(var(55)),statetime * var(20))

; 回避・前
[State -3, AI]
type = ChangeState
value = 723
triggerall = var(20) = [1,10]
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = ctrl
triggerall = numhelper(9543) = 0
triggerall = prevstateno != [723,724]
trigger1 = inguarddist
trigger1 = !(enemynear(var(55)),hitdefattr = SCA, NT, ST, HT)
trigger1 = enemynear(var(55)),stateno >= 200
trigger1 = enemynear(var(55)),statetime >= 25 - var(20)
trigger1 = enemynear(var(55)),movetype = A && !(enemynear(var(55)),ctrl)
trigger1 = enemynear(var(55)),movecontact = 0
trigger1 = enemynear(var(55)),vel y >= 0
trigger1 = enemynear(var(55)),animtime < -15
trigger1 = p2bodydist x + ((enemynear(var(55)),vel x * 5) * var(56)) = [-50,110]
trigger1 = p2bodydist y + (enemynear(var(55)),vel y * 6) = [-70,70]
trigger1 = random <= var(20) * var(20) * 2
trigger2 = enemynear(var(55)),movetype = A
trigger2 = prevstateno = [5000,5270]
trigger2 = facing*enemynear(var(55)),facing = -1
trigger2 = p2bodydist x + ((enemynear(var(55)),vel x * 5) * var(56)) = [-90,90]
trigger2 = random <= var(20) * var(20) * 1
trigger3 = enemynear(var(55)),ctrl || enemynear(var(55)),prevstateno = 5120
trigger3 = p2bodydist x + ((enemynear(var(55)),vel x * 5) * var(56)) != [-75,75]
trigger3 = random <= var(20) * var(20) * 1

; 回避・後ろ
[State -3, AI]
type = ChangeState
value = 724
triggerall = var(20) = [1,10]
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = ctrl
triggerall = numhelper(9543) = 0
triggerall = backedgedist > 60
triggerall = prevstateno != [723,724]
trigger1 = inguarddist
trigger1 = !(enemynear(var(55)),hitdefattr = SCA, NT, ST, HT)
trigger1 = enemynear(var(55)),stateno >= 200
trigger1 = enemynear(var(55)),statetime >= 25 - var(20)
trigger1 = enemynear(var(55)),movetype = A && !(enemynear(var(55)),ctrl)
trigger1 = enemynear(var(55)),movecontact = 0
trigger1 = enemynear(var(55)),vel y >= 0
trigger1 = enemynear(var(55)),animtime < -15
trigger1 = p2bodydist x + ((enemynear(var(55)),vel x * 5) * var(56)) = [-70,70]
trigger1 = p2bodydist y + (enemynear(var(55)),vel y * 6) = [-70,70]
trigger1 = random >= 1000 - (var(20) * var(20) * 2)
trigger2 = enemynear(var(55)),movetype = A
trigger2 = prevstateno = [5000,5270]
trigger2 = facing*enemynear(var(55)),facing = -1
trigger2 = p2bodydist x + ((enemynear(var(55)),vel x * 5) * var(56)) = [-90,90]
trigger2 = random >= 1000 - (var(20) * var(20) * 1)
trigger3 = enemynear(var(55)),ctrl || enemynear(var(55)),prevstateno = 5120
trigger3 = p2bodydist x + ((enemynear(var(55)),vel x * 5) * var(56)) = [-50,50]
trigger3 = random >= 1000 - (var(20) * var(20) * 1)

; 回避・前
[State -3, AI]
type = ChangeState
value = 723
triggerall = var(20) = [1,10]
triggerall = statetype != A
triggerall = enemynear(var(55)),movetype != H
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = prevstateno != [723,724]
trigger1 = ctrl
trigger1 = backedgedist < 25
trigger1 = enemynear(var(55)),pos y <= -100
trigger1 = p2bodydist x = [-50,50]
trigger1 = random >= 1000 - (var(20) * var(20) * 2)

; 回避・後ろ
[State -3, AI]
type = ChangeState
value = 724
triggerall = var(20) = [1,10]
triggerall = statetype != A
triggerall = enemynear(var(55)),movetype != H
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = prevstateno != [723,724]
trigger1 = ctrl
trigger1 = frontedgedist < 25
trigger1 = enemynear(var(55)),pos y <= -100
trigger1 = p2bodydist x = [-50,50]
trigger1 = random >= 1000 - (var(20) * var(20) * 2)

; 空中受身
[State -3 ,AI]
type = ChangeState
value = 5210
triggerall = var(20) = [1,10]
triggerall = movetype = H
triggerall = canrecover
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = vel y > -1
triggerall = stateno = 5050 && stateno != [5200,5210]
trigger1 = enemynear(var(55)),movetype != A
trigger1 = p2bodydist x = [-85,85]
trigger1 = p2bodydist y + (enemynear(var(55)),vel y * 5) != [-50,50]
trigger1 = random <= var(20) * 50
trigger2 = inguarddist
trigger2 = enemynear(var(55)),movetype = A
trigger2 = p2bodydist x = [-60,60]
trigger2 = p2bodydist y + (enemynear(var(55)),vel y * 5) != [-95,95]
trigger2 = random <= var(20) * 40
trigger3 = p2bodydist x - (enemynear(var(55)),vel x * 5) != [-75,75]
trigger3 = random >= 1000 - (var(20) * 45)

; 地上受身
[State -3 ,AI]
type = ChangeState
value = 5200
triggerall = var(20) = [1,10]
triggerall = movetype = H
triggerall = canrecover
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = vel y > 0 && pos y >= 0
trigger1 = stateno = 5050
trigger1 = enemynear(var(55)),movetype != A
trigger1 = random < var(20) * ifelse((p2bodydist x = [-75,75]), 25, 50)

; ジャンプ
[State -3, Jump]
type = ChangeState
value = 40
triggerAll = var(20) = [1,10]
triggerAll = var(57) = 0
triggerAll = statetype != A
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerAll = ctrl
trigger1 = enemynear(var(55)),movetype != H
trigger1 = enemynear(var(55)),hitdefattr = SCA, AT
trigger1 = enemynear(var(55)),time >= 30 || (!time && var(20) >= 7) || var(20) >= 9
trigger1 = enemynear(var(55)),time >= 50 || (prevstateno = [5000,5270]) || (prevstateno = [120,159]) || var(20) >= 10
trigger1 = random <= var(20) * var(20) * 3
trigger2 = enemynear(var(55)),backedgedist > 5 || p2bodydist x >= 65
trigger2 = p2bodydist x <= 120
trigger2 = enemynear(var(55)),stateno = 5110
trigger2 = enemynear(var(55)),time = [20,30]
trigger2 = random <= var(20) * var(20) * 2
trigger3 = p2bodydist x = [-5,70]
trigger3 = enemynear(var(55)),stateno = 5120
trigger3 = enemynear(var(55)),animtime = [-20,-10]
trigger3 = random <= var(20) * ifelse(enemynear(var(55)),backedgedist > 5, 20, 5)
trigger4 = !inguarddist
trigger4 = enemynear(var(55)),statetype != L
trigger4 = enemynear(var(55)),stateno != [120,159]
trigger4 = p2bodydist x = [-5,100]
trigger4 = random <= 75 - var(20) * 5
trigger5 = !inguarddist
trigger5 = enemynear(var(55)),statetype != L
trigger5 = enemynear(var(55)),prevstateno = [120,159]
trigger5 = p2bodydist x < 80
trigger5 = random <= var(20) * var(20) * 1
trigger6 = numhelper(999) > 0
trigger6 = enemynear(var(55)),movetype = H
trigger6 = enemynear(var(55)),statetype != A
trigger6 = enemynear(var(55)),stateno = [120,199]
trigger6 = p2bodydist x = [-5,80]
trigger6 = random <= var(20) * var(20) * 3

; ダッシュ
[State -3, AI]
type = ChangeState
value = 100
triggerall = var(20) = [1,10]
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = !inguarddist || numhelper(9543) > 0
triggerall = stateno != 100
triggerall = ctrl
trigger1 = enemynear(var(55)),movetype = I
trigger1 = p2bodydist x >= 180
trigger1 = random <= var(20) * var(20) * 1
trigger2 = enemynear(var(55)),movetype = I
trigger2 = !enemynear(var(55)),ctrl
trigger2 = p2bodydist x >= 130
trigger2 = random <= var(20) * var(20) * 2
trigger3 = enemynear(var(55)),statetype != A
trigger3 = (enemynear(var(55)),stateno = [120,159]) || (enemynear(var(55)),prevstateno = [120,159])
trigger3 = p2bodydist x = [50,120]
trigger3 = random <= var(20) * 5
trigger4 = numhelper(999) > 0
trigger4 = enemynear(var(55)),movetype = H
trigger4 = p2bodydist x >= 30
trigger4 = random >= 1000 - (var(20) * var(20) * 5)
trigger5 = numhelper(9543) > 0
trigger5 = var(57) = 0
trigger5 = p2bodydist x >= 15
trigger5 = random <= var(20) * var(20) * 1

; ダッシュ
[State -3, AI]
type = ChangeState
value = 100
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = statetype != A
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = !inguarddist || numhelper(999) > 0 || numhelper(9543) > 0
triggerall = stateno != 100
trigger1 = ctrl
trigger1 = enemynear(var(55)),statetype = L
trigger1 = p2bodydist x >= 120
trigger1 = enemynear(var(55)),stateno = 5110
trigger1 = enemynear(var(55)),time <= 10
trigger1 = random <= var(20) * var(20) * 3

; ガード
[State -3, AI]
type = ChangeState
value = 120
triggerall = var(20) = [1,10]
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = ctrl
triggerall = inguarddist
triggerall = stateno != [120,155]
triggerall = numhelper(9543) = 0
triggerall = random < var(20) * var(20) * 9
trigger1 = statetype = A
trigger1 = p2bodydist x >= 0
trigger1 = enemynear(var(55)),hitdefattr = A, NA, SA, HA, NP, SP, HP
trigger1 = statetype != A
trigger1 = p2bodydist x >= 0
trigger2 = enemynear(var(55)),hitdefattr = SCA, NA, SA, HA, NP, SP, HP
trigger3 = enemy,numproj > 0 || p2bodydist x = [-25,120]
trigger4 = !(enemynear(var(55)),hitdefattr = ,NT, ST, HT)
trigger5 = p2statetype = A && p2dist x < 0 || p2bodydist x < 0
trigger5 = !(enemynear(var(55)),hitdefattr = SCA, NT, ST, HT)

; しましまインストール
[State -3, AI]
type = ChangeState
value = 4848
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = var(54) = 3
triggerall = statetype != A
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = power >= 2000
triggerall = numhelper(9543) = 0
trigger1 = enemynear(var(55)),statetype = L
trigger1 = enemynear(var(55)),stateno = [5100,5110]
trigger1 = random <= var(20) * var(20) * 4
trigger2 = ctrl
trigger2 = var(54) = 3
trigger2 = enemynear(var(55)),statetype != L
trigger2 = p2bodydist x >= 100
trigger2 = random >= 1000 - (var(20) * 5)
trigger3 = (stateno = 200 || stateno = 211) && movecontact
trigger3 = random >= 1000 - (var(20) * 3)

; ストライカー「テスラ」
[State -3, AI]
type = ChangeState
value = 3600
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = var(54) = 2
triggerall = statetype != A
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = ctrl
triggerall = power >= 1000
triggerall = numhelper(999) = 0
trigger1 = enemynear(var(55)),statetype = L
trigger1 = enemynear(var(55)),stateno = [5100,5110]
trigger1 = random >= 1000 - (var(20) * var(20) * 4)
trigger2 = !enemynear(var(55)),ctrl
trigger2 = enemynear(var(55)),movetype != H
trigger2 = enemynear(var(55)),statetype != A
trigger2 = enemynear(var(55)),time >= 25 - (random%var(20))
trigger2 = p2bodydist x >= 150
trigger2 = random <= var(20) * var(20) * 3
trigger3 = enemynear(var(55)),movetype != H
trigger3 = enemynear(var(55)),statetype != L
trigger3 = p2bodydist x >= 120
trigger3 = random <= var(20) * var(20) * 2
trigger4 = enemynear(var(55)),movetype = H
trigger4 = enemynear(var(55)),stateno = [5050,5099]
trigger4 = enemynear(var(55)),vel y > 0
trigger4 = enemynear(var(55)),vel y > -50
trigger4 = random <= var(20) * var(20) * 2

; しましまインストール
[State -3, AI]
type = ChangeState
value = 4848
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = var(54) != 3
triggerall = var(54) != 4
triggerall = statetype != A
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = power >= 2000
triggerall = numhelper(9543) = 0
triggerall = ((100*life)/lifemax) - ((100*enemynear(var(55)),life)/enemynear(var(55)),lifemax) = [-50,50]
trigger1 = ctrl
trigger1 = enemynear(var(55)),statetype = L
trigger1 = enemynear(var(55)),stateno = 5110
trigger1 = random <= var(20) * var(20) * 2
trigger2 = ctrl
trigger2 = enemynear(var(55)),movetype = I
trigger2 = enemynear(var(55)),statetype != L
trigger2 = p2bodydist x >= 120
trigger2 = random >= 1000 - (var(20) * 1)
trigger3 = (stateno = 200 || stateno = 211) && movecontact
trigger3 = random >= 1000 - (var(20) * 1)

; ストライカー「テスラ」
[State -3, AI]
type = ChangeState
value = 3600
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = var(54) != 2
triggerall = var(54) != 4
triggerall = statetype != A
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = ctrl
triggerall = power >= 1000
triggerall = numhelper(999) = 0
trigger1 = power >= ifelse(var(54) = 3, 1500, 1000)
trigger1 = enemynear(var(55)),statetype = L
trigger1 = enemynear(var(55)),stateno = 5110
trigger1 = random >= 1000 - (var(20) * var(20) * 2)
trigger2 = !enemynear(var(55)),ctrl
trigger2 = enemynear(var(55)),movetype != H
trigger2 = enemynear(var(55)),time >= 25 - (random%var(20))
trigger2 = p2bodydist x >= 150
trigger2 = random <= var(20) * var(20) * 2
trigger3 = power >= 2000
trigger3 = enemynear(var(55)),movetype = I
trigger3 = enemynear(var(55)),statetype != L
trigger3 = p2bodydist x >= 120
trigger3 = random <= var(20) * 5
trigger4 = palno = 11 || var(41) = 11
trigger4 = life >= 200 && power >= 2000
trigger4 = enemynear(var(55)),statetype != A
trigger4 = enemynear(var(55)),statetype != L
trigger4 = random <= var(20) * 2

; ストライカー「テスラ」
[State -3, AI]
type = ChangeState
value = 3600
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = var(54) = 4
triggerall = statetype != A
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = ctrl
triggerall = power >= 3000 && life >= 150
triggerall = numhelper(999) = 0
triggerall = random <= var(20) * 5
trigger1 = enemynear(var(55)),statetype = L
trigger1 = enemynear(var(55)),stateno = [5100,5110]
trigger2 = !enemynear(var(55)),ctrl
trigger2 = enemynear(var(55)),movetype != H
trigger2 = enemynear(var(55)),statetype != A
trigger2 = enemynear(var(55)),time >= 25 - (random%var(20))
trigger2 = p2bodydist x >= 150
trigger3 = enemynear(var(55)),movetype != H
trigger3 = enemynear(var(55)),statetype != L
trigger3 = p2bodydist x >= 120
trigger4 = enemynear(var(55)),movetype = H
trigger4 = enemynear(var(55)),stateno = [5050,5099]
trigger4 = enemynear(var(55)),vel y > 0
trigger4 = enemynear(var(55)),vel y > -50

;===========================================================================
;コンボ開始

; ダッシュ
[State -3, AI]
type = ChangeState
value = 100
triggerall = var(20) = [1,10]
triggerall = var(57) = 1
triggerall = statetype != A
triggerall = enemynear(var(55)),movetype = H
triggerall = enemynear(var(55)),statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = stateno != 100
trigger1 = ctrl
trigger1 = numhelper(999) > 0
trigger1 = helper(999),time >= 220 - (var(20) * 2)
trigger1 = p2bodydist x >= 20
trigger1 = random <= var(20) * var(20) * 9

; 弱キック
[State -3, AI]
type = ChangeState
value = 211
triggerall = var(20) = [1,10]
triggerall = var(57) = 1
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = ctrl
trigger1 = p2bodydist x = [-5,25]
trigger1 = random <= var(20) * var(20) * 8

; しゃがみ弱キック
[State -3, AI]
type = ChangeState
value = 442
triggerall = var(20) = [1,10]
triggerall = var(57) = 1
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = ctrl
trigger1 = p2bodydist x = [-5,15]
trigger1 = random <= var(20) * var(20) * 8

; 弱パンチ
[State -3, AI]
type = ChangeState
value = 200
triggerall = var(20) = [1,10]
triggerall = var(57) = 1
triggerall = statetype != A
;triggerall = enemynear(var(55)),statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = stateno = 442 && movecontact
triggerall = p2bodydist x = [10,25]
trigger1 = numhelper(999) = 0
trigger1 = random <= var(20) * var(20) * 9
trigger2 = numhelper(999) > 0
trigger2 = helper(999),p2dist x >= 0
trigger2 = helper(999),time >= 220 - (var(20) * 2)
trigger2 = random <= var(20) * var(20) * 8

; 強パンチ
[State -3, AI]
type = ChangeState
value = 201
triggerall = var(20) = [1,10]
triggerall = var(57) = 1
triggerall = statetype != A
;triggerall = enemynear(var(55)),statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = (stateno = 200 || stateno = 211) && movecontact
triggerall = p2bodydist x = [-5,30]
trigger1 = numhelper(999) = 0
trigger1 = random <= var(20) * var(20) * 9
trigger2 = numhelper(999) > 0
trigger2 = helper(999),p2dist x >= 0
trigger2 = helper(999),time >= 220 - (var(20) * 2)
trigger2 = random <= var(20) * var(20) * 8

; 強キック
[State -3, AI]
type = ChangeState
value = 214
triggerall = var(20) = [1,10]
triggerall = var(57) = 1
triggerall = statetype != A
;triggerall = enemynear(var(55)),statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = stateno = 201 && movecontact
trigger1 = p2bodydist x = [-5,30]
trigger1 = random <= var(20) * var(20) * 9

; エンジェルシャイニングラジエーション
[State -3, AI]
type = ChangeState
value = 7729
triggerall = var(20) = [1,10]
triggerall = var(57) = 1
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = power >= 3000 && (((100*life)/lifemax) <= 25 || palno >= 11)
trigger1 = var(58) >= 4 || palno >= 9
trigger1 = stateno = 2144 && animelemtime(11) > 0 && movehit
trigger1 = random <= var(20) * var(20) * 9
trigger2 = ctrl
trigger2 = var(58) >= 4
trigger2 = enemynear(var(55)),statetype = A
trigger2 = enemynear(var(55)),vel y > 0
trigger2 = enemynear(var(55)),pos y = [-75,0]
trigger2 = random <= var(20) * var(20) * 9

; キュンキュンエリアル
[State -3, AI]
type = ChangeState
value = 612
triggerall = var(20) = [1,10]
triggerall = var(57) = 1
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = stateno = 214 && movecontact
trigger1 = p2bodydist x = [-5,55]
trigger1 = random <= var(20) * var(20) * 9
trigger2 = var(58) <= 5
trigger2 = ctrl || prevstateno = 52 && ctrl
trigger2 = enemynear(var(55)),statetype = A
trigger2 = enemynear(var(55)),pos y >= -40
trigger2 = enemynear(var(55)),pos y + (enemynear(var(55)),vel y * 8) < 0
trigger2 = p2bodydist x = [-15,55]
trigger2 = random <= var(20) * var(20) * 9
trigger3 = ctrl && prevstateno = 52
trigger3 = enemynear(var(55)),statetype != A
trigger3 = p2bodydist x = [20,55]
trigger3 = random <= var(20) * var(20) * 9

; エンジェルキック（弱）
[State -3, AI]
type = ChangeState
value = 1005
triggerall = var(20) = [1,10]
triggerall = var(57) = 1
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = ctrl
trigger1 = var(58) < 6
trigger1 = enemynear(var(55)),statetype = A
trigger1 = p2bodydist x = [60,85]
trigger1 = enemynear(var(55)),vel y > 0
trigger1 = enemynear(var(55)),pos y >= -50
trigger1 = random <= var(20) * var(20) * 9

; エンジェルキック（強）
[State -3, AI]
type = ChangeState
value = 1006
triggerall = var(20) = [1,10]
triggerall = var(57) = 1
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = ctrl
trigger1 = var(58) >= 2
trigger1 = enemynear(var(55)),statetype = A
trigger1 = p2bodydist x = [ifelse(var(58) < 8,60,80),110]
trigger1 = enemynear(var(55)),vel y > 0
trigger1 = enemynear(var(55)),pos y = [-50,0]
trigger1 = random <= var(20) * var(20) * 9

; エンジェルキック（弱）
[State -3, AI]
type = Null;ChangeState
value = 1005
triggerall = var(20) = [1,10]
triggerall = var(57) = 1
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = ctrl
trigger1 = var(58) = [7,10]
trigger1 = enemynear(var(55)),statetype = A
trigger1 = enemynear(var(55)),vel y > 0
trigger1 = enemynear(var(55)),pos y >= -10
trigger1 = random <= var(20) * var(20) * 9

; チェリーヌキック
[State -3, AI]
type = ChangeState
value = 2144
triggerall = var(20) = [1,10]
triggerall = var(57) = 1
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = ctrl
trigger1 = var(58) = [7,10]
trigger1 = enemynear(var(55)),statetype = A
trigger1 = enemynear(var(55)),vel y > 0
trigger1 = enemynear(var(55)),pos y >= -40
trigger1 = p2bodydist x = [-35,80]
trigger1 = random <= var(20) * var(20) * 9
trigger2 = var(58) <= 5
trigger2 = ctrl
trigger2 = enemynear(var(55)),statetype = A
trigger2 = enemynear(var(55)),pos y >= -40
trigger2 = enemynear(var(55)),pos y + (enemynear(var(55)),vel y * 8) >= 0
trigger2 = p2bodydist x = [-35,80]
trigger2 = random <= var(20) * var(20) * 9

; エンジェルトルネード
[State -3, AI]
type = ChangeState
value = 7655
triggerall = var(20) = [1,10]
triggerall = var(50) < 20
triggerall = var(57) = 1
triggerall = var(54) != 4
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = power >= 3000
triggerall = enemynear(var(55)),life >= 200
triggerall = ((100*life)/lifemax) >= 40 || ((100*life)/lifemax) - ((100*enemynear(var(55)),life)/enemynear(var(55)),lifemax) >= -30
trigger1 = enemynear(var(55)),backedgedist < 20
trigger1 = stateno = 394 && animelemtime(18) > 0 && movehit
trigger1 = random <= var(20) * var(20) * 9
trigger2 = var(58) >= 12
trigger2 = stateno = 2144 && animelemtime(11) > 0 && movehit
trigger2 = random <= var(20) * var(20) * 9
trigger3 = ctrl
trigger3 = var(58) >= 4
trigger3 = enemynear(var(55)),statetype = A
trigger3 = enemynear(var(55)),vel y > 0
trigger3 = enemynear(var(55)),pos y = [-60,0]
trigger3 = random <= var(20) * var(20) * 9

; エンジェルラッシュ
[State -3, AI]
type = ChangeState
value = 7959
triggerall = var(20) = [1,10]
triggerall = var(57) = 1
triggerall = var(54) != 4
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = power >= ifelse(var(54) = 0, 1500, ifelse(var(54) = 1, 1000, ifelse(var(54) = 2, 2000, 3000)))
triggerall = var(54) = 1 || enemynear(var(55)),life >= 150
triggerall = var(54) = 1 || ((100*life)/lifemax) - ((100*enemynear(var(55)),life)/enemynear(var(55)),lifemax) = [-20,35]
trigger1 = stateno = 394 && animelemtime(18) > 0 && movehit
trigger1 = random <= var(20) * var(20) * 9
trigger2 = var(58) >= 12 || palno >= 9
trigger2 = stateno = 2144 && animelemtime(11) > 0 && movehit
trigger2 = random <= var(20) * var(20) * 9
trigger3 = ctrl
trigger3 = var(58) >= 8
trigger3 = enemynear(var(55)),statetype = A
trigger3 = enemynear(var(55)),vel y > 0
trigger3 = enemynear(var(55)),pos y = [-40,0]
trigger3 = random <= var(20) * var(20) * 9

; エンジェルしょーりゅー（強）
[State -3, AI]
type = ChangeState
value = 2844
triggerall = var(20) = [1,10]
triggerall = var(57) = 1
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = var(58) >= 10
trigger1 = power < 1000 || var(58) >= 12
trigger1 = p2bodydist y <= -10
trigger1 = enemynear(var(55)),backedgedist < 20 || enemynear(var(55)),frontedgedist < 20
trigger1 = stateno = 2144 && animelemtime(11) > 0 && movehit
trigger1 = random >= 1000 - var(20) * var(20) * 9
trigger2 = ctrl
trigger2 = var(58) >= 10
trigger2 = p2bodydist x = [-5,50]
trigger2 = enemynear(var(55)),statetype = A
trigger2 = enemynear(var(55)),backedgedist < 20 || enemynear(var(55)),frontedgedist < 20
trigger2 = enemynear(var(55)),vel y > 0
trigger2 = enemynear(var(55)),pos y + (enemynear(var(55)),vel y * 3) = [-40,0]
trigger2 = random <= var(20) * var(20) * 9

; エンジェルパンチ（強）
[State -3, AI]
type = ChangeState
value = 394
triggerall = var(20) = [1,10]
triggerall = var(57) = 1
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = var(58) >= 1
trigger1 = stateno = 2144 && animelemtime(11) > 0 && movehit
trigger1 = random <= var(20) * var(20) * 9


; ジャンプ
[State -3, AI]
type = ChangeState
value = 40
triggerall = var(20) = [1,10]
triggerall = var(57) = 1
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype = A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = var(58) <= 8
trigger1 = ctrl || prevstateno = 612 && ctrl
trigger1 = enemynear(var(55)),pos y <= -40;ifelse(enemynear(var(55)),backedgedist < 20, -40, -50) || enemynear(var(55)),vel y <= -1.5
trigger1 = p2bodydist x = [-5,80]
trigger1 = random <= var(20) * var(20) * 9

; エンジェルインパクト（弱）
[State -3, AI]
type = ChangeState
value = 615
triggerall = var(20) = [1,10]
triggerall = var(57) = 1
triggerall = statetype = A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = random <= var(20) * var(20) * 10
trigger1 = var(58) > 9
trigger1 = enemynear(var(55)),backedgedist >= 20
trigger1 = enemynear(var(55)),frontedgedist >= 20
trigger1 = p2bodydist x = [-35,85]
trigger1 = p2bodydist y = [-70,65]
trigger1 = (stateno = 400 || stateno = 401 || stateno = 402 || stateno = 403) && movecontact
trigger2 = var(58) > 9
trigger2 = enemynear(var(55)),backedgedist < 20 || enemynear(var(55)),frontedgedist < 20
trigger2 = p2bodydist x = [-35,85]
trigger2 = p2bodydist y >= 45
trigger2 = (stateno = 400 || stateno = 401 || stateno = 402 || stateno = 403) && movecontact

; エンジェルインパクト（強）
[State -3, AI]
type = ChangeState
value = 616
triggerall = var(20) = [1,10]
triggerall = var(57) = 1
triggerall = statetype = A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = random <= var(20) * var(20) * 10
trigger1 = vel y > 0 && pos y = [-75,-60]
trigger1 = enemynear(var(55)),backedgedist < 20 || enemynear(var(55)),frontedgedist < 20
trigger1 = p2bodydist x = [-50,85]
trigger1 = p2bodydist y = [-70,35]
trigger1 = (stateno = 400 || stateno = 401 || stateno = 402 || stateno = 403) && movecontact

; ジャンプ強パンチ
[State -3, AI]
type = ChangeState
value = 401
triggerall = var(20) = [1,10]
triggerall = var(57) = 1
triggerall = statetype = A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = random <= var(20) * 100
trigger1 = ctrl
trigger1 = p2bodydist x = [-35,70]
trigger1 = p2bodydist y = [-65,60]
trigger2 = (stateno = 400 || stateno = 402 || stateno = 403) && movecontact > 3

; ジャンプ強キック
[State -3, AI]
type = ChangeState
value = 403
triggerall = var(20) = [1,10]
triggerall = var(57) = 1
triggerall = var(58) < 11
triggerall = statetype = A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = random <= var(20) * 100
trigger1 = ctrl
trigger1 = p2bodydist x = [-35,70]
trigger1 = p2bodydist y = [-50,70]
trigger2 = (stateno = 400 || stateno = 401 || stateno = 402) && movecontact > 3
trigger3 = enemynear(var(55)),backedgedist > 20 && enemynear(var(55)),frontedgedist > 20
trigger3 = (stateno = 400 || stateno = 401 || stateno = 402) && movecontact && (vel y > 0 && pos y >= -75)
trigger4 = enemynear(var(55)),backedgedist < 20 || enemynear(var(55)),frontedgedist < 20
trigger4 = vel y > 0 && pos y >= -75 && p2bodydist y >= 40
trigger4 = (stateno = 400 || stateno = 401 || stateno = 402) && movecontact

;A.I.Debug
[State -3]
Type = null;VarSet
trigger1 = stateno = 442 && movehit
trigger2 = stateno = 612 && movehit
trigger3 = stateno = 629 && movehit
v = 20
value = 10
