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

;-------------------------------------
;追加使用変数
;var(44) : ランダムカットイン用
;var(45) : フライング対策
;var(46) : GamaTime不一致加算用
;var(47) : タッグ用アイコン位置（Ｘ座標）
;var(48) : アイコン位置（Ｘ座標）
;var(49) : アイコン位置（Ｙ座標）
;var(50) : ヒット数算出
;var(51) : シャイニングラジエーションヒット保険
;var(52) : GamaTime算出
;var(53) : 対人・対A.I.行動スイッチ
;var(54) : ゲージ行動スイッチ
;var(55) : タッグ時相手判別
;var(56) : 相手進行方向判別
;var(57) : A.I.コンボフラグ
;var(58) : A.I.連続使用制限

;fvar(1) : ヒット数補正
;fvar(2) : カウンター補正

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

[Statedef -2]

;---------------------------------------------------------------------------
; 闘い中以外は無敵
[State -2, NotHitBy]
type = NotHitBy
trigger1 = var(45) != 1
value = SCA
time = 2
ignorehitpause = 1

[State -2, NotHitBy]
type = VarSet
triggerall = roundstate = 2
trigger1 = ctrl = 1
trigger2 = movetype = A
v = 45
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, Icon]
type = Helper
triggerall = numhelper(7732) = 0
trigger1 = roundstate <= 2
helpertype = normal
name = "aoi_icon"
ID = 7732
pos = -50,-200
postype = back
stateno = 7732
keyctrl = 0
ignorehitpause = 1
persistent = 0
ontop = 1
sprpriority = 3
pausemovetime = 999999999
supermovetime = 999999999

;---------------------------------------------------------------------------
; コンボ補正
[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, Icon-Tag]
type = VarSet
triggerall = var(47) = 0
triggerall = numpartner > 0
triggerall = id > partner,id
trigger1 = partner,name = "haruka"
trigger2 = partner,name = "kurumi"
v = 47
value = 25

;--------------------------------------------------------------------------
; デバッグ確認
[State -2]
type = DisplayToClipboard
trigger1 = 1
text = "%f,%d,%d,%d,%d"
params = fvar(1),var(20),var(57),var(52),var(46);var(16)
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(EnemyNear,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]
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】の間で変更可能です。


;対人・対A.I.行動スイッチ
[State -3, AI]
type = VarSet
trigger1 = var(53) = 0
trigger1 = !ishelper
trigger1 = roundsexisted = 0
v = 53
value = 1;0		;← ０で対人、１で対A.I.用の行動になります。
ignorehitpause = 1	;変わるのは弓攻撃の連射制度で、密度や反応に差が出るようになります。


;ゲージ行動スイッチ
[State -3, AI]
type = VarSet
trigger1 = var(54) = 0
trigger1 = !ishelper
trigger1 = roundsexisted = 0
v = 54
value = 0		;← 決められた数字を選択すると、ゲージをどう使用して行動するかが変わります。
ignorehitpause = 1	;数字によっては強さがかなり違ってくる･･･かもしれない？
			;０ ･･･ おまかせ、安心！ツインエンジェル！！
			;　→　状況ごとに判断してゲージ技やストライカーを使用します。
			;１ ･･･ ど真ん中頂きます！
			;　→　ストライカーを使用せず戦います。左下？右下？それとも･･･？
			;２ ･･･ とにかく、油断は禁物ですね。
			;　→　ストライカーをメインに戦います。


;アイコン位置調整（Ｘ座標）
[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, GameTime]
type = VarSet
trigger1 = 1
var(52) = gametime
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 = 200 || stateno = 211
trigger2 = movehit
trigger2 = stateno = 201 || stateno = 214
trigger3 = movehit
trigger3 = stateno = 629 || stateno = 2144
v = 57
value = 1
ignorehitpause = 1

;===========================================================================
;連続使用制限解除
[State -3, AI]
type = VarAdd
triggerall = var(20) = [1,10]
triggerall = var(58) > 0
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = stateno != 393
trigger1 = stateno != 493
v = 58
value = -1
ignorehitpause = 1

;連続使用制限開始（対人）
[State -3, AI]
type = VarRandom
triggerall = var(20) = [1,10]
triggerall = var(53) = 0
triggerall = var(58) = 0
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = stateno = 393 && animtime = 0
trigger2 = stateno = 394 && animtime = 0
v = 58
range = 5,35
ignorehitpause = 1

;連続使用制限開始（対人）
[State -3, AI]
type = VarRandom
triggerall = var(20) = [1,10]
triggerall = var(53) = 0
triggerall = var(58) = 0
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = stateno = 493 && animtime = 0
v = 58
range = 15,35
ignorehitpause = 1

;連続使用制限開始（対A.I.）
[State -3, AI]
type = VarRandom
triggerall = var(20) = [1,10]
triggerall = var(53) = 0
triggerall = var(58) = 0
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = p2bodydist x > 175
triggerall = enemynear(var(55)),movetype != A
trigger1 = stateno = 393 && animtime = 0
trigger2 = stateno = 394 && animtime = 0
v = 58
range = 0,30
ignorehitpause = 1

;連続使用制限開始（対A.I.）
[State -3, AI]
type = VarRandom
triggerall = var(20) = [1,10]
triggerall = var(53) = 1
triggerall = var(58) = 0
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = p2bodydist x > 175
triggerall = enemynear(var(55)),movetype != A
trigger1 = stateno = 493 && animtime = 0
v = 58
range = 15,30
ignorehitpause = 1

;連続使用制限開始
[State -3, AI]
type = VarSet
triggerall = var(20) = [1,10]
triggerall = var(58) = 1
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = p2bodydist x < 75
trigger1 = stateno = 5120 && animtime = 0
v = 58
value = 5
ignorehitpause = 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 && (((100*life)/lifemax) <= 25 || palno >= 11)
trigger1 = (stateno = 1041 || stateno = 2144) && movehit
trigger1 = random <= var(20) * var(20) * 9
trigger2 = ctrl
trigger2 = enemynear(var(55)),movetype = H
trigger2 = enemynear(var(55)),stateno != [120,199]
trigger2 = random <= var(20) * var(20) * 5

; 回避・前
[State -3, AI]
type = ChangeState
value = 723
triggerall = var(20) = [1,10]
triggerall = statetype != A
triggerall = enemynear(var(55)),movetype = A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = prevstateno != [723,724]
trigger1 = ctrl
trigger1 = prevstateno = [5000,5270]
trigger1 = facing*enemynear(var(55)),facing = -1
trigger1 = p2bodydist x + ((enemynear(var(55)),vel x * 5) * var(56)) = [-75,75]
trigger1 = enemynear(var(55)),statetime = [8,16]
trigger1 = random <= var(20) * var(20) * ifelse(backedgedist < 20, 3, 1)

; 天ノ遣式・蒼山崩
[State -3, AI]
type = ChangeState
value = 8184
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = var(54) != 2
triggerall = statetype != A
triggerall = enemynear(var(55)),movetype = A
triggerall = enemynear(var(55)),statetype != L
triggerall = enemynear(var(55)),movecontact = 0
triggerall = !(enemynear(var(55)),hitdefattr = SCA, AP)
triggerall = stateno != [150,159]
triggerall = stateno != 8184
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = power >= 2000
triggerall = ctrl
triggerall = p2bodydist x - (enemynear(var(55)),vel x * 3) = [ifelse(backedgedist < 5,-50,-25),50]
triggerall = enemynear(var(55)),pos y + (enemynear(var(55)),vel y * 5) >= -80
triggerall = enemynear(var(55)),time >= floor(60 * (0.5 - (var(20) * 0.04))) + (random%10)
trigger1 = random <= var(20) * 25
trigger2 = (prevstateno = [5000,5270]) || (prevstateno = [140,159])
trigger2 = random <= var(20) * 25

; 天ノ遣式・蒼山崩
[State -3, AI]
type = ChangeState
value = 8184
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = var(54) != 2
triggerall = statetype != A
triggerall = enemynear(var(55)),movetype = A
triggerall = enemynear(var(55)),statetype != L
triggerall = stateno != [150,159]
triggerall = stateno != 8184
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = power >= 2500
trigger1 = ctrl
trigger1 = prevstateno = [5110,5120]
trigger1 = p2bodydist x - (enemynear(var(55)),vel x * 3) = [ifelse(backedgedist < 5,-50,-25),60]
trigger1 = enemynear(var(55)),pos y + (enemynear(var(55)),vel y * 5) >= -80
trigger1 = enemynear(var(55)),animtime <= -5
trigger1 = random <= var(20) * 30

; ストライカー「ナイン」
[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 = prevstateno = 5120 || backedgedist < 15
trigger1 = p2bodydist x = [-5,75]
trigger1 = random <= var(20) * 5

; ストライカー「じいや」
[State -3, AI]
type = ChangeState
value = 9736
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = var(54) = 2
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != A
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = ctrl
triggerall = power >= 500
triggerall = numhelper(9735) = 0
trigger1 = prevstateno = 5120 || backedgedist < 15
trigger1 = p2bodydist x = [-5,75]
trigger1 = random >= 1000 - (var(20) * 5)

;投げ
[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 = 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 = 211
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = var(58) = 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 = p2bodydist x = [-5,10]
trigger1 = enemynear(var(55)),movetype != H
trigger1 = random >= 1000 - var(20) * 15
trigger2 = ctrl
trigger2 = p2bodydist x = [-5,10]
trigger2 = enemynear(var(55)),movetype = H
trigger2 = random >= 1000 - var(20) * 50

; 弱パンチ
[State -3, AI]
type = ChangeState
value = 200
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = var(58) = 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 = p2bodydist x = [-5,15]
trigger1 = random <= var(20) * 15

; アローアタック
[State -3, AI]
type = ChangeState
value = 2144
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = var(58) = 0
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = enemynear(var(55)),prevstateno != [120,159]
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = ctrl
trigger1 = p2bodydist x = [20,40]
trigger1 = enemynear(var(55)),pos y + (enemynear(var(55)),vel y * 5) >= -65
trigger1 = random <= var(20) * 10

; ジャンプ弱キック
[State -3, AI]
type = ChangeState
value = 402
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 * 5) - (enemynear(var(55)),vel x * 5) = [-50,45]
trigger1 = p2bodydist y - (vel y * 5) + (enemynear(var(55)),vel y * 5) = [-35,80]
trigger1 = random >= 1000 - var(20) * 40

; ジャンプ強キック
[State -3, AI]
type = ChangeState
value = 403
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 = p2bodydist x - (vel x * 5) - (enemynear(var(55)),vel x * 5) = [-50,50]
trigger1 = p2bodydist y - (vel y * 5) + (enemynear(var(55)),vel y * 5) = [-40,80]
trigger1 = random <= 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) = [-40,80]
trigger2 = random <= Var(20) * 35
trigger3 = (stateno = 400 || stateno = 401 || stateno = 402) && movecontact
trigger3 = 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 = 400 || stateno = 402 || stateno = 403) && movecontact
trigger1 = random <= var(20) * 90

; ストライカー「サロメ」
[State -3, AI]
type = ChangeState
value = 3690
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = var(54) != 1
triggerall = statetype != A
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = ctrl
triggerall = power >= 2000
triggerall = numhelper(3856) = 0
trigger1 = enemynear(var(55)),statetype = L
trigger1 = enemynear(var(55)),stateno = 5120
trigger1 = random <= var(20) * 2
trigger2 = enemynear(var(55)),statetype != L
trigger2 = p2bodydist x >= 150
trigger2 = random >= 1000 - (var(20) * 5)
trigger3 = prevstateno = 5120
trigger3 = random >= 1000 - (var(20) * 5)

; ストライカー「にゃん」
[State -3, AI]
type = ChangeState
value = 9595
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = var(54) != 1
triggerall = statetype != A
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = ctrl
triggerall = power >= 500
triggerall = numhelper(9696) = 0
triggerall = (facing = 1 && pos x > 0) || (facing = -1 && pos x < 0)
trigger1 = power >= ifelse(var(54) = 2, 1000, ifelse(var(54) = 1, 2000, 1500))
trigger1 = enemynear(var(55)),statetype = L
trigger1 = enemynear(var(55)),stateno = [5100,5110]
trigger1 = random >= 1000 - (var(20) * var(20) * 1)

; ストライカー「ナイン」
[State -3, AI]
type = ChangeState
value = 3600
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = var(54) != 1
triggerall = statetype != A
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = ctrl
triggerall = power >= 1000
triggerall = numhelper(999) = 0
trigger1 = power >= ifelse(var(54) = 2, 1000, 1500)
trigger1 = enemynear(var(55)),statetype = L
trigger1 = enemynear(var(55)),stateno = 5110
trigger1 = random <= 1000 - (var(20) * var(20) * 1)
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 = prevstateno = 5120 || backedgedist < 15
trigger4 = p2bodydist x = [-5,75]
trigger4 = random <= var(20) * 2

; ストライカー「じいや」
[State -3, AI]
type = ChangeState
value = 9736
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = var(54) != 1
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != A
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = ctrl
triggerall = power >= 500
triggerall = numhelper(9735) = 0
trigger1 = power >= ifelse(var(54) = 2, 1000, ifelse(var(54) = 1, 2000, 1500))
trigger1 = enemynear(var(55)),statetype = L
trigger1 = enemynear(var(55)),stateno = 5120
trigger1 = enemynear(var(55)),animtime >= -15
trigger1 = random >= 1000 - (var(20) * 3)
trigger2 = !enemynear(var(55)),ctrl
trigger2 = enemynear(var(55)),movetype != H
trigger2 = enemynear(var(55)),time >= 25 - (random%var(20))
trigger2 = p2bodydist x >= 200
trigger2 = random >= 1000 - (var(20) * 5)
trigger3 = power >= 2000
trigger3 = enemynear(var(55)),movetype = I
trigger3 = enemynear(var(55)),statetype != L
trigger3 = p2bodydist x >= 150
trigger3 = random >= 1000 - (var(20) * 1)
trigger4 = prevstateno = 5120 || backedgedist < 15
trigger4 = p2bodydist x = [-5,75]
trigger4 = random >= 1000 - (var(20) * 2)

; ガーキャン「じいや」
[State -3, AI]
type = ChangeState
value = 9939
triggerall = var(20) = [1,10]
triggerall = var(54) != 1
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != A
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = power >= 1500
triggerall = numhelper(9735) = 0
triggerall = numhelper(1735) = 0
triggerall = stateno = [150,155]
triggerall = time >= 11 - var(20)
trigger1 = var(54) = 2 || Var(54) = 0 && (((100*life)/lifemax) < ((100*enemynear(var(55)),life)/enemynear(var(55)),lifemax))
trigger1 = enemynear(var(55)),movetype = A
trigger1 = enemynear(var(55)),hitdefattr = SCA, NA, SA, HA
trigger1 = p2bodydist x = [-5,100]
trigger1 = random <= var(20) * 3
trigger2 = !enemynear(var(55)),ctrl
trigger2 = p2bodydist x >= 150
trigger2 = random <= var(20) * 5

; エンジェルアロー（弱）
[State -3, AI]
type = ChangeState
value = 393
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = var(58) = 0
triggerall = statetype != A
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = !inguarddist
triggerall = ctrl
triggerall = p2bodydist x - (enemynear(var(55)),vel x * 10) >= ifelse(var(53) = 0, 150, 75)
trigger1 = enemynear(var(55)),stateno != [5000,5099]
trigger1 = enemynear(var(55)),statetype != A || var(53) = 0 && enemynear(var(55)),stateno = 40
trigger1 = enemynear(var(55)),statetype != L
trigger1 = random >= ifelse(enemynear(var(55)),movetype != H, 750, 850) + (var(20) * 5)
trigger2 = enemynear(var(55)),statetype = L
trigger2 = enemynear(var(55)),stateno = [5110,5120]
trigger2 = random >= 850 + (var(20) * 5)

; エンジェルアロー（強）
[State -3, AI]
type = ChangeState
value = 394
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
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 = !inguarddist
triggerall = ctrl
triggerall = prevstateno != [493,494]
triggerall = random <= var(20) * var(20) * 5
trigger1 = numhelper(999) > 0
trigger1 = helper(999),time < 120
trigger2 = numhelper(3856) > 0
trigger2 = helper(3856),stateno = 3856
trigger2 = helper(3856),time < 550

; エンジェルアロー（強）
[State -3, AI]
type = ChangeState
value = 394
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = var(58) = 0
triggerall = statetype != A
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = !inguarddist
triggerall = ctrl
triggerall = prevstateno != [493,494]
triggerall = p2bodydist x - (enemynear(var(55)),vel x * 10) >= 200
trigger1 = enemynear(var(55)),stateno != [5000,5099]
trigger1 = enemynear(var(55)),statetype != A || var(53) = 0 && enemynear(var(55)),stateno = 40
trigger1 = enemynear(var(55)),statetype != L
trigger1 = random <= ifelse(!enemynear(var(55)),ctrl, 50, 25) + (var(20) * 5)
trigger2 = enemynear(var(55)),statetype = L
trigger2 = enemynear(var(55)),stateno = [5110,5120]
trigger2 = random <= 150 + (var(20) * 5)

; サンダーアロー（弱）
[State -3, AI]
type = ChangeState
value = 3711
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = var(58) = 0
triggerall = statetype != A
triggerall = enemynear(var(55)),stateno != [5000,5099]
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = !inguarddist
triggerall = ctrl
triggerall = prevstateno != [493,494]
triggerall = p2bodydist x - (enemynear(var(55)),vel x * 15) >= 180
trigger1 = enemynear(var(55)),statetype != A || var(53) = 0 && enemynear(var(55)),stateno = 40
trigger1 = enemynear(var(55)),statetype != L
trigger1 = random = [300,350+(var(20)*5)]
trigger2 = enemynear(var(55)),statetype = L
trigger2 = enemynear(var(55)),stateno = [5110,5120]
trigger2 = random = [400,450+(var(20)*5)]
trigger3 = stateno = 2144 && movecontact
trigger3 = random = [400,500+(var(20)*10)]

; サンダーアロー（強）
[State -3, AI]
type = ChangeState
value = 3718
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = statetype != A
triggerall = enemynear(var(55)),stateno != [5000,5099]
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = !inguarddist
triggerall = ctrl
triggerall = prevstateno != [493,494]
triggerall = p2bodydist x - (enemynear(var(55)),vel x * 15) >= 220
trigger1 = enemynear(var(55)),statetype = L
trigger1 = enemynear(var(55)),stateno = [5110,5120]
trigger1 = random = [600,750-(var(20)*5)]

; 対空エンジェルアロー（弱）
[State -3, AI]
type = ChangeState
value = 493
triggerall = var(20) = [1,10]
triggerall = var(53) = 0
triggerall = var(57) = 0
triggerall = var(58) = 0
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = enemynear(var(55)),stateno != [5000,5099]
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = !inguarddist
triggerall = !(numhelper(999) > 0 && enemynear(var(55)),statetype != A)
triggerall = !(numhelper(3856) > 0 && enemynear(var(55)),statetype != A)
triggerall = ctrl
triggerall = p2bodydist x - (enemynear(var(55)),vel x * 10) >= 75
triggerall = enemynear(var(55)),pos y + (enemynear(var(55)),vel y * 10) <= 0
trigger1 = enemynear(var(55)),statetype = A
trigger1 = random >= 800 + (var(20) * 5)
trigger2 = enemynear(var(55)),statetype != A
trigger2 = random = [500,600+(var(20)*5)]

; 対空エンジェルアロー（強）
[State -3, AI]
type = ChangeState
value = 494
triggerall = var(20) = [1,10]
triggerall = var(53) = 0
triggerall = var(57) = 0
triggerall = var(58) = 0
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = enemynear(var(55)),stateno != [5000,5099]
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = !inguarddist
triggerall = prevstateno != 494
trigger1 = ctrl
trigger1 = enemynear(var(55)),statetype = A
trigger1 = enemynear(var(55)),pos y + (enemynear(var(55)),vel y * 10) <= 0
trigger1 = p2bodydist x - (enemynear(var(55)),vel x * 10) >= 100
trigger1 = random <= 200 + (var(20) * 5)

; 対空エンジェルアロー（弱）
[State -3, AI]
type = ChangeState
value = 493
triggerall = var(20) = [1,10]
triggerall = var(53) = 1
triggerall = var(57) = 0
triggerall = var(58) = 0
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = enemynear(var(55)),stateno != [105,109]
triggerall = enemynear(var(55)),stateno != [5000,5099]
triggerall = enemynear(var(55)),prevstateno != [5110,5120]
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = !inguarddist
triggerall = !(numhelper(999) > 0 && enemynear(var(55)),statetype != A)
triggerall = !(numhelper(3856) > 0 && enemynear(var(55)),statetype != A)
triggerall = ctrl
triggerall = enemynear(var(55)),pos y + (enemynear(var(55)),vel y * 10) <= 0
trigger1 = enemynear(var(55)),statetype = A
trigger1 = p2bodydist x - (enemynear(var(55)),vel x * 10) >= 0
trigger1 = random >= 800 + (var(20) * 5)
trigger2 = enemynear(var(55)),statetype != A
trigger2 = p2bodydist x - (enemynear(var(55)),vel x * 10) >= 75
trigger2 = random = [500,600+(var(20)*5)]

; 対空エンジェルアロー（強）
[State -3, AI]
type = ChangeState
value = 494
triggerall = var(20) = [1,10]
triggerall = var(53) = 1
triggerall = var(57) = 0
triggerall = var(58) = 0
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = enemynear(var(55)),stateno != [105,109]
triggerall = enemynear(var(55)),stateno != [5000,5099]
triggerall = enemynear(var(55)),prevstateno != [5110,5120]
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = !inguarddist
triggerall = prevstateno != 494
trigger1 = ctrl
trigger1 = enemynear(var(55)),statetype = A
trigger1 = enemynear(var(55)),pos y + (enemynear(var(55)),vel y * 10) <= 0
trigger1 = p2bodydist x - (enemynear(var(55)),vel x * 10) >= 100
trigger1 = random <= 200 + (var(20) * 5)

; エンジェルアロー（弱）
[State -3, AI]
type = ChangeState
value = 393
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 = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = !inguarddist
trigger1 = ctrl
trigger1 = enemynear(var(55)),stateno != [120,199]
trigger1 = enemynear(var(55)),pos y + (enemynear(var(55)),vel y * 15) > -60
trigger1 = p2bodydist x - (enemynear(var(55)),vel x * 10) >= 120
trigger1 = random >= 1000 - (var(20) * var(20) * 4)
trigger2 = stateno = 2144 && movecontact
trigger2 = random >= var(20) * var(20) * ifelse(enemynear(var(55)),backedgedist < 20, 9, 3)

; エンジェルアロー（強）
[State -3, AI]
type = ChangeState
value = 394
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 = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = !inguarddist
trigger1 = ctrl
trigger1 = enemynear(var(55)),stateno != [120,199]
trigger1 = enemynear(var(55)),pos y + (enemynear(var(55)),vel y * 15) > -80 || enemynear(var(55)),vel y > 0
trigger1 = p2bodydist x - (enemynear(var(55)),vel x * 10) >= 180
trigger1 = random <= var(20) * var(20) * 4
trigger2 = stateno = 2144 && movecontact
trigger2 = enemynear(var(55)),backedgedist > 45
trigger2 = random <= var(20) * var(20) * 3
trigger3 = ctrl
trigger3 = numhelper(3856) > 0
trigger3 = enemynear(var(55)),stateno = [5000,5099]
trigger3 = enemynear(var(55)),pos y + (enemynear(var(55)),vel y * 15) > -70
trigger3 = random >= 1000 - (var(20) * var(20) * 6)

; 対空エンジェルアロー（弱）
[State -3, AI]
type = ChangeState
value = 493
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
triggerall = !inguarddist
trigger1 = ctrl
trigger1 = !(p2bodydist x > 200 && enemynear(var(55)),vel y > 0)
trigger1 = enemynear(var(55)),pos y + (enemynear(var(55)),vel y * 10) < -(p2bodydist x * 0.5)
trigger1 = random >= 1000 - (var(20) * var(20) * 4)

; 対空エンジェルアロー（強）
[State -3, AI]
type = ChangeState
value = 494
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
triggerall = !inguarddist
trigger1 = ctrl
trigger1 = !(p2bodydist x > 200 && enemynear(var(55)),vel y > 0)
trigger1 = enemynear(var(55)),pos y + (enemynear(var(55)),vel y * 10) < -(p2bodydist x * 0.5)
trigger1 = random <= var(20) * var(20) * 4
trigger2 = ctrl
trigger2 = numhelper(3856) > 0
trigger2 = enemynear(var(55)),stateno = [5000,5099]
trigger2 = enemynear(var(55)),pos y + (enemynear(var(55)),vel y * 10) < -(p2bodydist x * 0.5)
trigger2 = random <= var(20) * var(20) * 6

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

; ジャンプ回避
[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 = 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 = 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)) = [-100,100]
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)) = [-120,120]
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)) = [-60,60]
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)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = ctrl
triggerall = p2bodydist x <= 150
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)) = [-80,80]
trigger1 = p2bodydist y + (enemynear(var(55)),vel y * 6) = [-70,70]
trigger1 = random <= var(20) * 5
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) * 4
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) * 3
trigger4 = enemynear(var(55)),statetype = A
trigger4 = enemynear(var(55)),stateno != [120,159]
trigger4 = backedgedist <= 20
trigger4 = p2bodydist x = [-5,50]
trigger4 = random <= var(20) * 5
trigger5 = enemynear(var(55)),statetype = L
trigger5 = enemynear(var(55)),stateno = [5110,5199]
trigger5 = backedgedist <= 20
trigger5 = p2bodydist x = [-5,50]
trigger5 = random <= var(20) * 5

; 空中受身
[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 = facing*enemynear(var(55)),facing = -1
trigger2 = p2bodydist x <= 80
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)

; 飛び退き
[State -3, AI]
type = ChangeState
value = 105
triggerall = var(20) = [1,10]
triggerall = var(57) = 0
triggerall = statetype != A
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = !inguarddist
triggerall = ctrl
triggerall = stateno != [105,106]
triggerall = backedgedist > 60
trigger1 = enemynear(var(55)),statetype = L
trigger1 = p2bodydist x <= 180
trigger1 = enemynear(var(55)),stateno = [5100,5120]
trigger1 = random <= var(20) * var(20) * 3
trigger2 = !inguarddist
trigger2 = enemynear(var(55)),statetype != L
trigger2 = enemynear(var(55)),stateno != [120,159]
trigger2 = p2bodydist x = [-5,150]
trigger2 = random <= 75 - var(20) * 5
trigger3 = !inguarddist
trigger3 = enemynear(var(55)),statetype != L
trigger3 = enemynear(var(55)),prevstateno = [120,159]
trigger3 = p2bodydist x < 120
trigger3 = random <= var(20) * 5
trigger4 = numhelper(999) > 0
trigger4 = enemynear(var(55)),movetype = H
trigger4 = enemynear(var(55)),statetype != A
trigger4 = enemynear(var(55)),stateno = [120,199]
trigger4 = p2bodydist x = [-5,100]
trigger4 = 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 = 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 = 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 = stateno = 200 && movecontact
trigger1 = p2bodydist x = [-5,15]
trigger1 = random <= var(20) * var(20) * 9

; 強パンチ
[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
trigger1 = enemynear(var(55)),backedgedist <= 20
trigger1 = stateno = 211 && movecontact
trigger1 = p2bodydist x = [-5,30]
trigger1 = random <= var(20) * var(20) * 9

; 強キック
[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 || stateno = 211) && movecontact
trigger1 = p2bodydist x = [-5,30]
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 = stateno = 214 && movecontact
trigger1 = p2bodydist x = [-5,40]
trigger1 = random <= var(20) * var(20) * 9

; サンダーアロー（弱）
[State -3, AI]
type = ChangeState
value = 3711
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 = 1041 && movecontact
trigger1 = random <= var(20) * var(20) * 9

; ダッシュ
[State -3, AI]
type = ChangeState
value = 100
triggerall = var(20) = [1,10]
triggerall = var(57) = 1
triggerall = statetype != A
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = stateno != 100
triggerall = ctrl
triggerall = random <= var(20) * var(20) * 9
trigger1 = enemynear(var(55)),backedgedist <= 20
trigger1 = enemynear(var(55)),vel y > 4.0
trigger1 = enemynear(var(55)),pos y + (enemynear(var(55)),vel y * 15) < -30
trigger2 = enemynear(var(55)),frontedgedist <= 20
trigger2 = enemynear(var(55)),vel y > 5.0
trigger2 = enemynear(var(55)),pos y + (enemynear(var(55)),vel y * 10) < 0

; ダッシュアタック
[State -3, AI]
type = ChangeState
value = 1041
triggerall = var(20) = [1,10]
triggerall = var(57) = 1
triggerall = statetype != A
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
trigger1 = stateno = 100
trigger1 = p2bodydist x = [-35,30]
trigger1 = random <= var(20) * var(20) * 9

; 対空エンジェルアロー（強）
[State -3, AI]
type = ChangeState
value = 494
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) * 9
trigger1 = enemynear(var(55)),backedgedist <= 20
trigger1 = stateno = 2144 && movecontact
trigger2 = enemynear(var(55)),frontedgedist <= 20
trigger2 = stateno = 629 && time > 18

; エンジェルアロー（強）
[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
triggerall = random <= var(20) * var(20) * 9
trigger1 = enemynear(var(55)),backedgedist > 20
trigger1 = stateno = 2144 && movecontact
trigger2 = enemynear(var(55)),frontedgedist > 20
trigger2 = stateno = 629 && time > 18
trigger3 = ctrl
trigger3 = numhelper(3722) > 0
trigger3 = enemynear(var(55)),gethitvar(hitshaketime) > 5

; エンジェルサウザンドアロー
[State -3, AI]
type = ChangeState
value = 7945
triggerall = var(20) = [1,10]
triggerall = var(57) = 1
triggerall = var(54) = 1
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = power >= 3000
trigger1 = ((100*life)/lifemax) >= 50 || ((100*enemynear(var(55)),life)/enemynear(var(55)),lifemax) >= 25
trigger1 = stateno = 394 && animelemtime(20) > 0
trigger1 = numhelper(459) > 0
trigger1 = helper(459),movehit
trigger1 = (facing = 1 && pos x < 0) || (facing = -1 && pos x > 0)
trigger1 = random <= var(20) * var(20) * 9

; 超必殺エンジェルアロー
[State -3, AI]
type = ChangeState
value = 7745
triggerall = var(20) = [1,10]
triggerall = var(57) = 1
triggerall = var(54) != 2
triggerall = statetype != A
triggerall = enemynear(var(55)),statetype != L
triggerall = alive
triggerall = roundstate = 2
triggerall = !ishelper
triggerall = power >= 1000
trigger1 = power >= ifelse(var(54) = 1, 1000, 2000)
trigger1 = stateno = 394 && animelemtime(20) > 0
trigger1 = numhelper(459) > 0
trigger1 = helper(459),movehit
trigger1 = (facing = 1 && pos x < 0) || (facing = -1 && pos x > 0)
trigger1 = random <= var(20) * var(20) * 9
