[statedef -3]

;今回のAIにはレベル設定はありません。作るのがめんどくさ…  いやいやデフォでついてるAIがあるので、ある程度ランダム要素がほしい方はそちらをどうぞ。
;かわりにガードレベルを調節できるようにしました。

;======================
;  ☆調整メニュー☆
;======================
;◎クイックセット・・・・下の●の設定を簡易にできます。細かい設定が必要なければお使いください。
;◎当身設定・・・・・・・超必殺当身をするかどうかです。他の設定にもよりますがしない方が強いかも。


;●ガードレベル・・・・ガードレベルを設定できます。
;●リコイルガード・・・リコイルガードの頻度を設定できます。
;●反応時間２種類・・・コマンド式(要は必殺技)とワンボタン式(投げに反応してジャンプ逃げなど)の反応までの最速時間を調整できます。
;●受け身狩り・・・・・受け身狩りの有無を設定できます。


;____________________________________________________________________________
;
;クイックセット Quick setting
;____________________________________________________________________________

;細かく設定するのがめんどくさい人またはわからない人用です。
;これ一つでまとめて全部セットできるお手軽です。
;自分で調整したい場合はクイックセット番号を0にして下へお進みください。
;ここに書いてある反応時間はコマンド式のものです。ワンボタン式はコマンド式の半分の時間にしてあります。

;【注】クイックセット使用の場合、受け身狩りはどの番号でも使用します。


;if you wanna adjust strongness of AI in detail, set 0 and go under.

[state -3]
type = varset
trigger1 = !ishelper
trigger1 = var(44) = 0
trigger1 = var(59) !=0
var(44) = 0 ; <----クイックセット番号 quick setting number (0 to 7)

;番号
;0  手動設定、下に進んで自分で設定してください
;1  対人用中(豆腐ガード)    GuardLv1 , リコイルLv2 , 反応時間0.10～0.80秒ランダム
;2  対人用中(豆腐ガード＋)    GuardLv2 , リコイルLv3 , 反応時間0.10～0.70秒ランダム(デフォ設定と同じ)
;3  対人用強(普通ガード)    GuardLv3 , リコイルLv5 , 反応時間0.10～0.60秒ランダム
;4  対人用強(固いガード)  GuardLv4 , リコイルLv5 , 反応時間0.05～0.45秒ランダム
;5  対超反応AI用リコ自重    GuardLv4 , リコイルLv0 , 反応時間0.00
;6  対超反応AI用  GuardLv4 , リコイルLv7 , 反応時間0.00
;7  対凶キャラ用？ GuardLv4 , リコイルLv10 , 反応時間0.00(このAIの限界の強さです)

;number
;0 Manual setting ----> go to next and adjust each numbers as you like
;1 easy for MAN
;2 Normal for MAN
;3 Hard for MAN
;4 Lunatic for MAN
;5 For Watch(Don't use Recoil Guard)
;6 For Watch
;7 All MAX




;_________________________________________________________________________________________________________________________
;
;ロマン技のために（当身制限スイッチでゲージ確保するぜ）Refraining from Gauge use for Romancing skill "A song of the mother" 
;_________________________________________________________________________________________________________________________

;EFZキャラと言えば全員がほぼロマン技であるFMを持っています。
;まぁ郁未や茜のようにコンボに組み込めたり、佳乃みたいに現実的な確定状況があるものもあってロマン技じゃないものもありますけど。
;さて、観鈴ちんのFMは確定状況無し、見てからジャンプ余裕でしたのロマン技中のロマン技である「母の詩」という移動投げです。

;どれくらいロマン技かと言うと
;・ライフは３分の１以下ゲージ３本
;・のけぞり中の相手には当たらない、ガード硬直中の相手にも当たらない
;・空中の相手にも当たらない
;・ダウン中の相手に当たるわけもない
;・遠すぎても当たらない
;・近すぎても当たらない
;・発生37F
;・はずした後の隙が118F(約２秒)

;最後の３つぐらいが正直ネックです。発生遅い、投げ技なのに密着してる相手に当たらない、はずした後はほぼ100%自分がゴールしちゃう…
;でもMUGENのAIなら結構当たってくれる!! 
;なんたって発生前には投げ判定は出ない(当たり前ですけど)、しかも当たり判定発生がポーズ中だからp2name指定以外だと意図的によけれない!!
;で、その上避けるための猶予フレーム１Fしか与えない(国崎ジュース固め→発動→相手の硬直が終わった瞬間ポーズかかる→ゴール!!)

;でも当身でゲージばんばん使うから３ゲージたまらないし、反応時間遅くすると今度は弱すぎてロマンもくそもない
;そこでそんなあなたに当身制限スイッチ！！これで解決だわ！！当身なんかなくても何とかなる(かもしれない)
;************************************************
;************************************************
[state -3];観鈴ちんピンチ（ゲージ使用当身）やる？ Do you want misuzu to do "ES Misuzu Pinch(Super Combo Reversal)" ?
type = varset
trigger1 = !ishelper
ignorehitpause = 1
fvar(32) = 0 ;<---- 0 やらない no
;                   1 やる     yes      
;************************************************
;************************************************

;まぁこれでも確率かなり確率低いんですけどロマン技だから仕方ないね(長森よりはよっぽど実用的ですけど)
;それと当身なくてもそこそこ戦えるますし、当身自体性能が悪い(発生は早いけどリターンがゲージ技としては少なすぎる)ので、個人的には当身使わない方がお勧めです。














;/////////////////////////////////////////////////////////////////////////////////////////////////////////////
;
;以下はクイックセットを0にした場合のみ有効です You can adjust Ai deed under here if quick setting number is 0.
;
;/////////////////////////////////////////////////////////////////////////////////////////////////////////////

;______________________________________________________________________
;
;ガードレベル兼ＡＩスイッチ Guard Lv
;______________________________________________________________________

[State -3, AIフラグセット]
type = VarSet
triggerall = !var(59)
triggerall = RoundState = [1,2]
triggerall = !ishelper
trigger1 = Command = "AI1"|| Command = "AI2"|| Command = "AI3"|| Command = "AI4"
trigger2 = Command = "AI5"|| Command = "AI6"|| Command = "AI7"|| Command = "AI8"|| Command = "AI9"
trigger3 = Command = "AI10"|| Command = "AI11"|| Command = "AI12"|| Command = "AI13"|| Command = "AI14"
trigger4 = Command = "AI15"|| Command = "AI16"|| Command = "AI17"|| Command = "AI18"|| Command = "AI19"
trigger5 = Command = "AI20"|| Command = "AI21"
trigger6 = numhelper(10000)>0
Trigger6 = Helper(10000),var(59)= 1
trigger6 = roundno != 1 || power < powermax || enemynear(var(58)),power < enemynear(var(58)),powermax || life < lifemax || enemynear(var(58)),life < enemynear(var(58)),lifemax
;trigger7 = 1 ;watch専用即スイッチ。使う場合はこの行の先頭trigger12の前の;を消してください。
;trigger8 = command = "s"

var(59) = 2  ; <-----0から4、4がMAXです。0 to 4 , 4 is MAX
ignorehitpause = 1


;1 ガードの記述はあるものの飛び道具、めくりなどには大して機能しないかも。
;2 1よりはマシ程度。
;3 めくりをガードし始める。上下の切り替えとかは微妙に不安が残る。
;4 固い・・・と思うよ


;______________________________________________________________________

;リコイル確率設定 Recoil Guard Lv
;______________________________________________________________________

[state -3];リコイル確率制御。Recoil Guard Lv
type = varset
trigger1 = var(59)=[1,10]
trigger1 = var(57)=0
trigger1 = var(44) = 0
trigger1 = !ishelper
var(57) = 3 ; <--- 0から10、10がMAXです。0 to 10 , 10 is MAX.
ignorehitpause = 1

;0だと全くリコイルしません
;10だとリコイルできるときはほぼしますがリコイルのトリガーの関係で10/11ぐらいの確率が最高値です。
;地上では連続リコイルできないようにしてあるので確率を10にしても2hitに1回ずつになります（いわゆる偶数リコイル）

;_______________________________________________________________________
;
;反応時間設定 Reaction time
;_______________________________________________________________________

[state -3];切り返し最速反応時間(昇竜などコマンド式のもの用)
type = varset
trigger1 = gametime%60 = 0
trigger1 = var(44) = 0
trigger1 = !ishelper
fvar(37) =0.10 + 0.01*(random%61)   ;単位は秒です。Fastest Reaction time with Commanding skill.Dimension is second.
ignorehitpause = 1


[state -3];ワンボタン攻撃の最速反応時間(弱中強攻撃などワンボタン式のもの用)
type = varset
trigger1 = gametime%60 = 0
trigger1 = var(44) = 0
trigger1 = !ishelper
fvar(28) =0.5 + 0.01*(random%31)   ;単位は秒です。Fastest Reaction time with One buttun skill.Dimension is second.
ignorehitpause = 1


;例として
;0.00のように数値を直接代入すれば反応時間固定です。
;0.10 + 0.01*(random%61)  のように代入すれば0.10～0.70でランダム変化となります。
;60フレーム(1秒)毎に値が更新されます。

;だいたいの目安
;0.00(0F) 超反応、小足見てから当身余裕でした
;0.05(3F) 弱攻撃にも切り返します。
;0.10(6F) 弱だと厳しい、ほとんどの中には切り返します。
;0.15(9F) 中だと厳しい、出の早い強も厳しいです。
;0.20(12F) まだ中段を切り返せるレベル。
;0.30(18F) 一般人レベルの反応。出の遅い中段程度なら切り返せます。ワンボタン式なら反応遅い人間でもこんなもんです。
;0.50(30F) コマンド入力も考慮した場合の一般人レベルの反応時間。

;ちなみに0.50秒以上の反応速度だとほとんど切り返せません。
;切り返しにことごとく各種ゲージを使うので超反応にしたところで強さなんてたかが知れてます。

;参考までにEFZ勢の地上からの中段の発生フレーム
;長森：脳天カバン割り           19F = 0.317秒
;七瀬：ES乙女桜                 14F = 0.233秒  暗転0F、暗転後14F
;里村：D屈強                    26F = 0.433秒
;真琴：まこリープ               21F = 0.350秒
;栞  ：D強                      23F = 0.383秒
;寝雪：なゆリープ               29F = 0.483秒
;観鈴：みすずちんクラッシュ     24.33F = 0.405秒
;美凪：D強                      23F = 0.383秒
;UNK ：D屈強→空中弱            最速で24F = 0.400秒
;      飛行→空中弱             最速で16F = 0.267秒
;香  ：弱パニッシュメントクロス 21F = 0.350秒
;      中パニッシュメントクロス 30F = 0.500秒
;      RFパニッシュメントクロス 20F = 0.333秒
;郁未：D強                      21F = 0.350秒
;      弱血染めの十字架         36F = 0.600秒
;      中血染めの十字架         最速25F = 0.417秒 GゲージLvにより変動
;      RF血染めの十字架         最速26F = 0.433秒 上に同じく
;美汐：駆雷                     21F = 0.350秒
;      中炎月                   22F = 0.367秒
;起雪：D屈強                    27F = 0.450秒
;      強V字スラスト（2段目）   21F = 0.350秒
;      中なゆちゃんキック       28F = 0.467秒


;__________________________________________________________________________
;
;受け身狩り設定(attack the enemy when enemy is recovering)
;__________________________________________________________________________

[state -3];受け身狩りの有無
type = varset
trigger1 = var(59)>0
trigger1 = var(44) = 0
trigger1 = !ishelper
var(45) = 1 
;0 --->受け身狩りしない.Don't do
;1 --->受け身狩りする.Do

;EFZではおなじみですね、受け身狩りです。MUGENでもデフォルトで空中受け身時に行動不能時間が5Fぐらいついていますので受け身狩りできます。
;とはいえ今のところ受け身狩り前提のコンボルートではないので１にしてもほとんどほとんどやりません。(調整中ともいう)
ignorehitpause = 1





















;どうでもいいこと
;EFZのメインヒロインたちと言えばどいつもこいつも高性能ですよね
;半身無敵昇竜やら見えない中段(物理的な意味で)やらフォルテやら他多数の高性能技持ちの長森
;半身無敵昇竜や高性能ESやらで守りからのカウンターに定評のあるあゆ
;素早い動きでの隙付きやコマ投げと中段なんかの択が素敵な郁未
;LV3ES技にならなんと発生【直前まで】無敵がついてる観鈴ちん！！      もうゴールしてもいいよね･･･ 




;原作弱キャラがMUGENに来たからと言ってそうやすやすと強くなるわけもなく…  
;同ランクの起き名雪や秋子さんでさえノーゲージで半身ぐらいなら発生まで無敵つく技あるのに観鈴ちんときたらRFでさえあの性能…

;【強キャラ達の集い】
;おじゃる丸「このげぇむに飛び道具以外で無敵つかない技なぞあるのか！？」        --->観鈴の技で発生まで無敵なのはFM母の詩のみです、当身も０F発生なので発生まで無敵といえば無敵ですけど。
;だよもん  「昇竜ぐらいは発生まで無敵つくものだと思ってたよ」                  --->観鈴の昇竜はRF版でさえ発生まで無敵が続きません
;○しお    「その上ICかければどこからでもコンボにいけるものだと思ってました」  --->観鈴は端以外ではICかけてもほぼ拾えません、状況にもよりますけど。
;理論上最強『知ってはいるがお前の昇竜が気に入らない』                          --->むしろ観鈴の翼はいわゆる昇竜なのでしょうか？


;ちなみに上の４人は昇竜コマンドで出る技には全身または半身の無敵がほとんど付いてます(しかも発生より長いものも多い)。強キャラが強キャラたる所以ですかね？






























;____________________________________________
;
;以下は変更しないでください
;____________________________________________

;________________
;
;  AI記述順
;________________

;FM母の詩  最優先 , ロマン輝く○○○ー○
;切り返し(翼人) 優先度高 無敵長い、判定強い、言うことなし
;刺し込み       観鈴ちんのコンボ開始はここがほとんど、ゲージ使用無
;切り返し(通常) 差し込めないと判断した場合、ゲージ使用で切り返し
;後刺し         ガードした後とかの隙付き、これも意外と刺さる
;投げ           性能の悪さに泣いた
;反応逃げ
;空中コンボ繋ぎ
;地上コンボ繋ぎ
;==============
;   ガード     ここより上に書いてあるのがガードより優先してやること。下は相手攻撃中はしない。
;==============
;受け身狩り
;起き攻め
;固め
;技ふり、牽制
;移動

;-----------------------------------------------------------------------------------------------------------------
[state -3];デバッグ用スイッチオフフラグ
type=varset
triggerall = !var(59)
trigger1 = command = "y"
trigger1 = 0;1
var(59) = 4
ignorehitpause = 1

[state -3];デバッグ用スイッチオフフラグ
type=varset
triggerall = var(59)
trigger1 = command = "x"
trigger1 = 0;1
var(59) = 0
ignorehitpause = 1

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

;var(59) AIスイッチ
;var(58) 
;var(57) リコイル設定用
;var(56) 受け身不能時間測定用
;var(53)-var(55) 立ち中段学習
;var(52) タッグ用
;var(51) 端ヘルパー用

;fvar(39) 自分の重力加速度
;fvar(38) 相手の重力加速度
;fvar(37) 反応時間
;fvar(36) 端ヘルパー用
;fvar(35) 端ヘルパー用
;fvar(34) 端ヘルパー用
;fvar(33) 端ヘルパー用
;fvar(32) 当身設定
;fvar(31) 設置による固まり防止用
;fvar(30) 相手の着地までの時間
;fvar(29) 端ヘルパー用
;fvar(28) 反応時間
;fvar(27) 着地までの時間

;-------------------------------------
;_____________________________
;
;クイックセット用
;_____________________________
[state -3]
type = varset
triggerall = !ishelper
trigger1 = var(44) = [4,7]
trigger1 = var(59) != 0
var(59) = 4
ignorehitpause=1

[state -3]
type = varset
triggerall = !ishelper
trigger1 = var(44)=[1,3]
trigger1 = var(59) != 0
var(59) = var(44)
ignorehitpause=1

[state -3]
type = varset
triggerall = !ishelper
trigger1 = var(44) > 0
trigger1 = var(59) != 0
var(57) = 2*(var(44)=1) + 3*(var(44)=2) + 5*(var(44)=[3,4]) + 7*(var(44)=6) + 10*(var(44)=7)
ignorehitpause=1
supermove=1
supermovetime=99999
pausemovetime=99999

[state -3]
type = varset
triggerall = !ishelper
trigger1 = gametime%60 = 0
trigger1 = var(44) >=5
fvar(37) = 0
ignorehitpause=1
supermove=1
supermovetime=99999
pausemovetime=99999

[state -3]
type = varset
triggerall = !ishelper
trigger1 = gametime%60 = 0
trigger1 = var(44) = [1,4]
fvar(37) =0.10 - 0.05*(var(44)=4) + 0.01*(random%(81-10*var(44)))
ignorehitpause=1
supermove=1
supermovetime=99999
pausemovetime=99999

[state -3]
type = varset
triggerall = !ishelper
trigger1 = gametime%60 = 0
trigger1 = var(44) >=5
fvar(28) = 0
ignorehitpause=1
supermove=1
supermovetime=99999
pausemovetime=99999

[state -3]
type = varset
triggerall = !ishelper
trigger1 = gametime%60 = 0
trigger1 = var(44) = [2,4]
fvar(28) =(0.10 - 0.05*(var(44)=4) + 0.005*(random%(81-10*var(44))))
ignorehitpause=1
supermove=1
supermovetime=99999
pausemovetime=99999

[state -3];受け身狩りの有無
type = varset
trigger1 = var(59)>0
trigger1 = var(44) != 0
trigger1 = !ishelper
var(45) = 1 


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


[state -3,相手の重力加速度]
type =varset
triggerall = !ishelper
trigger1 = var(59)!=0
trigger1 = enemynear(var(58)),movetype!=H
fvar(38)=enemynear(var(58)),Const(movement.yaccel)
ignorehitpause = 1


[state -3,相手の重力加速度]
type =varset
triggerall = !ishelper
trigger1 = var(59)!=0
trigger1 = enemynear(var(58)),movetype=H 
trigger1 = enemynear(var(58)),stateno != 5656
trigger1 = enemynear(var(58)),stateno != [9010,9011]
fvar(38)=enemynear(var(58)),GetHitVar(yaccel)
ignorehitpause = 1


[state -3,相手の重力加速度]
type =varset
triggerall = !ishelper
trigger1 = var(59)!=0
trigger1 = enemynear(var(58)),movetype=H
trigger1 = enemynear(var(58)),stateno = 5656 || (enemynear(var(58)),time>=30 && enemynear(var(58)),stateno = [9010,9011])
fvar(38) = 0.3
ignorehitpause = 1

[state -3,相手の重力加速度]
type =varset
triggerall = !ishelper
trigger1 = var(59)!=0
trigger1 = enemynear(var(58)),movetype=H
trigger1 = (enemynear(var(58)),time<30 && enemynear(var(58)),stateno = [9010,9011])
fvar(38)= 0.00033 * (enemynear(var(58)),time)**2
ignorehitpause = 1

[state -3]
type = varset
triggerall = !ishelper
trigger1 = roundstate !=2
fvar(38)=0

[state -3,自分の重力加速度]
type =varset
triggerall = !ishelper
trigger1= 1
fvar(39)=Const(movement.yaccel) + fvar(10)
ignorehitpause = 1


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

[state -3,AI用受身不能時間カウント]
type=varset
triggerall = !ishelper
trigger1 = stateno=[0,9999999]
trigger1 = movehit=1
trigger1 = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H
trigger1 = enemynear(var(58)),stateno != [9010,9016]
var(56) = enemynear(var(58)),gethitvar(fall.recovertime) - 9
ignorehitpause = 0

[state -3,AI用受身不能時間カウント]
type=varset
triggerall = !ishelper
trigger1 = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H
trigger1 = enemynear(var(58)),stateno = [9015,9016]
var(56) = enemynear(var(58)),sysvar(0)
ignorehitpause = 0

[state -3,AI用受身不能時間カウント]
type=varset
triggerall = !ishelper
trigger1 = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H
trigger1 = enemynear(var(58)),stateno = [9010,9011]
trigger1 = enemynear(var(58)),time = 1
var(56) = enemynear(var(58)),gethitvar(fall.recovertime)
ignorehitpause = 0

[state -3,AI用受身不能時間カウント]
type=varset
triggerall = !ishelper
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H
trigger1 = numhelper(1010)
trigger1 = helper(1010),movehit = [1,2]
trigger2 = numhelper(1020)
trigger2 = helper(1020),movehit = [1,2]
var(56) = enemynear(var(58)),gethitvar(fall.recovertime)
ignorehitpause = 0


[state -3,AI用受身不能時間カウント]
type=varset
triggerall = !ishelper
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H
trigger1 = numhelper(1210)
trigger1 = helper(1210),stateno = 1211 && helper(1210),movehit = [1,2]
trigger2 = numhelper(1220)
trigger2 = helper(1220),stateno = 1221 && helper(1220),movehit = [1,2]
trigger3 = numhelper(1230)
trigger3 = helper(1230),stateno = 1231 && helper(1230),movehit = [1,2]
var(56) = enemynear(var(58)),gethitvar(fall.recovertime) - ifelse((enemynear(var(58)),gethitvar(fall.recovertime)) = ceil(40*fvar(1)/0.9 + 20),20,10)
ignorehitpause = 0

[state 4210]
type = varset
triggerall = !ishelper
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H
trigger1 = numhelper(4200)
trigger1 = helper(4200),movehit = [1,2]
var(56) = enemynear,gethitvar(fall.recovertime)
ignorehitpause = 0

[state -3,AI用受身不能時間カウント]
type=varset
triggerall = !ishelper
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H
trigger1 = enemynear(var(58)),stateno = 5656
trigger2 = numhelper(1030)
trigger2 = helper(1030),movehit
var(56) = 999
ignorehitpause = 0

[state -3]
type=varadd
triggerall = !ishelper
trigger1 = var(56)>0
trigger1 = enemynear(var(58)),canrecover=0
trigger1 = enemynear(var(58)),hitfall=1
trigger1 = stateno!=900 
trigger1 = (stateno = 3200 && time <= 13) = 0
trigger1 = enemynear(var(58)),stateno != [9015,9016]
var(56)= -1
ignorehitpause = 0

[state -3]
type = varset
triggerall = !ishelper
trigger1 = enemynear(var(58)),hitfall=0 && enemynear(var(58)),stateno != [9010,9016]
trigger1 = enemynear(var(58)),stateno != 5656
trigger2 = enemynear(var(58)),canrecover=1 && enemynear(var(58)),stateno != [9010,9016]
trigger2 = enemynear(var(58)),stateno != 5656
trigger3 = enemynear(var(58)),statetype!=A || enemynear(var(58)),movetype != H
var(56)=0
ignorehitpause = 1

;------------------------------------------------------------------------------
;タッグ用相手認識
[state -3,t]
type = varset
trigger1 = numenemy = 1
trigger2 = numenemy = 2
trigger2 = enemynear(0),alive
trigger2 = enemynear(0),life
var(58) = 0
ignorehitpause = 1

[state -3,t]
type = varset
trigger1 = numenemy = 2
trigger1 = enemynear(0),alive = 0 || enemynear(0),life <= 0
var(58) = 1
ignorehitpause = 1
;------------------------------------------------------------------------------

;着地までの時間
[state -3]
type = varset
trigger1 = statetype = A
trigger1 = movetype != H
trigger1 = (vel y**2 - 2*(pos y-10)*fvar(39))>0
fvar(27) = (((-vel y + (vel y**2 - 2*(pos y - 10)*fvar(39))**0.5)/(fvar(39)+0.0001))**2)**0.5
ignorehitpause = 0


;着地までの時間
[state -3]
type = varset
trigger1 = enemynear(var(58)),statetype = A
trigger1 = enemynear(var(58)),movetype != H
trigger1 = fvar(13)**2 - 2*enemynear(var(58)),pos y*fvar(38)>=0
fvar(30) = (((-fvar(13) + (fvar(13)**2 - 2*enemynear(var(58)),pos y*fvar(38))**0.5)/(fvar(38)+0.0001))**2)**0.5
ignorehitpause = 0


;-------------------------------------------------------------------------------------
[state -3,100];受け身可能になったら無敵
type = NotHitBy
triggerall = Vel Y > -1
triggerall = alive
triggerall = stateno = 5050
triggerall = CanRecover
triggerall = hitfall
trigger1 = roundstate =2
value = SCA
ignorehitpause = 1

[state -3,100];ついでに試合の前後無敵。
type = NotHitBy
trigger1 = roundstate != 2
trigger2 = alive = 0
value = SCA
ignorehitpause = 1

;----------------------------------------------------------------------------------
;中段立ち下段など学習（テスト中）
;----------------------------------------------------------------------------------
[state -3,middle]
type = varset
triggerall = !ishelper
triggerall = var(59)>0 && roundstate =2
triggerall = var(55)!
triggerall = statetype!=A
trigger1 = stateno = [5000,5099]
trigger1 = time = 0
trigger1 = (enemynear(var(58)),hitdefattr = SCA,AT)=0
trigger1 = var(53)=2 && prevstateno = [120,155]
var(55) = enemynear(var(58)),stateno

[state -3,middle]
type = varset
triggerall = var(55) != 0
triggerall = !ishelper
trigger1 = teammode = turns
trigger1 = roundstate !=2
trigger2 = var(54)=var(55)
trigger2 = random <500
var(55) = 0

[state -3,low]
type = varset
triggerall = var(59)>0 && roundstate =2
triggerall = var(54)!
triggerall = statetype!=A
triggerall = !ishelper
trigger1 = stateno = [5000,5099]
trigger1 = time = 0
trigger1 = (enemynear(var(58)),hitdefattr = SCA,AT)=0
trigger1 = var(53)=1&& prevstateno = [120,155]
var(54) = enemynear(var(58)),stateno

[state -3,low]
type = varset
triggerall = var(57) != 0
triggerall = !ishelper
trigger1 = teammode = turns
trigger1 = roundstate !=2
trigger2 = var(54) = var(55)
var(54) = 0


;---------------------------------------------------------------
;壁までの距離
[state -3]
type = NUll
triggerall = !ishelper
triggerall = numhelper(20000)
trigger1 = facing = 1
trigger1 = var(51) = 1 || var(51) = 3
trigger1 = fvar(34) := helper(20000),pos x + fvar(36) - pos x
trigger2 = facing = -1
trigger2 = var(51) = 2 || var(51) = 3
trigger2 = fvar(34) := -(helper(20000),pos x - fvar(35) - pos x)
trigger3 = facing = 1
trigger3 = var(51) = 0
trigger3 = fvar(34) := helper(20000),pos x + 400.000000 - pos x
trigger4 = facing = -1
trigger4 = var(51) = 0
trigger4 = fvar(34) := -(helper(20000),pos x - 400.000000 - pos x)
trigger5 = facing = 1
trigger5 = var(51) = 2
trigger5 = fvar(34) := helper(20000),pos x + fvar(35) - pos x
trigger6 = facing = -1
trigger6 = var(51) = 1
trigger6 = fvar(34) := -(helper(20000),pos x - fvar(36) - pos x)
ignorehitpause = 1

[state -3]
type = NUll
triggerall = !ishelper
triggerall = numhelper(20000)
trigger1 = facing = -1
trigger1 = var(51) = 1 || var(51) = 3
trigger1 = fvar(33) := helper(20000),pos x + fvar(36) - pos x
trigger2 = facing = 1
trigger2 = var(51) = 2 || var(51) = 3
trigger2 = fvar(33) := -(helper(20000),pos x - fvar(35) - pos x)
trigger3 = facing = -1
trigger3 = var(51) = 0
trigger3 = fvar(33) := helper(20000),pos x + 400.0000000 - pos x
trigger4 = facing = 1
trigger4 = var(51) = 0
trigger4 = fvar(33) := -(helper(20000),pos x - 400.000000 - pos x)
trigger5 = facing = -1
trigger5 = var(51) = 2
trigger5 = fvar(33) := helper(20000),pos x + fvar(35) - pos x
trigger6 = facing = 1
trigger6 = var(51) = 1
trigger6 = fvar(33) := -(helper(20000),pos x - fvar(36) - pos x)
ignorehitpause = 1

;壁までの距離
[state -3]
type = NUll
triggerall = !ishelper
triggerall = numhelper(40000)
triggerall = numenemy = 2 || numpartner
trigger1 = fvar(34) := frontedgebodydist
;壁までの距離
[state -3]
type = NUll
triggerall = !ishelper
triggerall = numhelper(40000)
triggerall = numenemy = 2 || numpartner
trigger1 = fvar(33) := backedgebodydist


;ステージサイズ確認
[state -3]
type = NULL
triggerall = numenemy = 1
triggerall = numhelper(20000)
triggerall = var(51) != 3
trigger1 = facing = 1
trigger1 = helper(20000),pos x + fvar(36) - pos x <= 70
trigger1 = helper(20000),pos x + fvar(36) - enemynear(var(31)),pos x <= 70
trigger1 = var(51) := ifelse(var(51) = 0 , 1 , ifelse(var(51) = 1 , 1 , 3))

trigger2 = facing = -1
trigger2 = helper(20000),pos x + fvar(36) - pos x <= 70
trigger2 = helper(20000),pos x + fvar(36) - enemynear(var(31)),pos x <= 70
trigger2 = var(51) := ifelse(var(51) = 0 , 1 , ifelse(var(51) = 1 , 1 , 3))

trigger3 = facing = -1
trigger3 = -(helper(20000),pos x - fvar(36) - pos x) <= 70
trigger3 = -(helper(20000),pos x - fvar(35) - enemynear(var(31)),pos x) <= 70
trigger3 = var(51) := ifelse(var(51) = 0 , 2 , ifelse(var(51) = 1 , 3 , 2))

trigger4 = facing = 1
trigger4 = -(helper(20000),pos x - fvar(36) - pos x) <= 70
trigger4 = -(helper(20000),pos x - fvar(35) - enemynear(var(31)),pos x) <= 70
trigger4 = var(51) := ifelse(var(51) = 0 , 2 , ifelse(var(51) = 1 , 3 , 2))
ignorehitpause = 1



;----------------------------------------------------------------------------------------
[state -3];タッグ用
type = varset
trigger1 = !ishelper
trigger1 = numenemy =2
trigger1 = enemynear(0),alive && enemynear(1),alive
var(52) = 1
ignorehitpause = 1

[state -3]
type = varset
triggerall = !ishelper
trigger1 = numenemy < 2 || enemy,teammode = single || enemy,teammode = turns
trigger2 = numenemy = 2
trigger2 = enemynear(0),alive = 0 ||  enemynear(1),alive = 0
var(52) = 0
ignorehitpause = 1

;-----------------------------------------------------------------------------------------
;設置によって固まり防止用
[state -3]
type = varset
triggerall = !ishelper
trigger1 = movetype = A
trigger1 = time > 5
fvar(31) = 0
ignorehitpause = 1

[state -3]
type = varadd
triggerall = !ishelper
trigger1 = fvar(31) >= 0.01
trigger1 = stateno != [120,162]
fvar(31) = -0.01
ignorehitpause = 0

[state -3]
type = varadd
triggerall = !ishelper
trigger1 = fvar(31) <= 5.0
trigger1 = inguarddist&&vel x = 0 || stateno = [120,162]
trigger1 = enemynear(var(58)),numproj > 0||enemynear(var(58)),numhelper > helper(20000),var(8)
fvar(31) = 0.01
ignorehitpause = 0
;/////////////////////////////////////////////////////////////////////
;/////////////////////////////////////////////////////////////////////
;
;                     こっからAIですよ～
;
;/////////////////////////////////////////////////////////////////////
;/////////////////////////////////////////////////////////////////////

;______________________________________________________________________

;もう…  ゴールしていいよね･･･  （と言いつつ相手をゴールさせてみる）
;______________________________________________________________________

;母の詩
[State -1,a-1]
type = ChangeState
value = 3300
triggerall = RoundState = 2
triggerall = Power >= 3000
triggerall = var(59) > 0
triggerall = life <= 333 ;|| palno >=7
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),statetype != L
trigger1 = movetype != H
trigger1 = stateno <= 420
trigger1 = numhelper(4200)
trigger1 = helper(4200),stateno = 4211 && enemynear(var(58)),ctrl = 0 && enemynear(var(58)),stateno = [120,155]
trigger1 = helper(4200),numtarget(4210)>0&&helper(4200),time = 2+ 6*(enemynear(var(58)),authorname ="muteki") + 4*(enemynear(var(58)),authorname ="⑨")
trigger1 = frontedgebodydist< 90 ||(p2dist x = [50,90]) || p2bodydist x <= 50

trigger2 = movetype != H
trigger2 = stateno <= 420
trigger2 = numhelper(4200)
trigger2 = helper(4200),stateno = 4211 && enemynear(var(58)),ctrl = 0 && enemynear(var(58)),stateno = [5000,5020]
trigger2 = helper(4200),numtarget(4210)>0&&helper(4200),time = 1 + 7*(enemynear(var(58)),authorname ="muteki") + 4*(enemynear(var(58)),authorname ="⑨");
trigger2 = frontedgebodydist< 90 || (p2dist x= [50,90] )|| p2bodydist x <= 50

trigger3 = stateno =220
trigger3 = movehit = 1 || moveguarded = 1
trigger3 = numtarget(220) && !numhelper(4200)
trigger3 = enemynear(var(58)),life * enemynear(var(58)),const(data.defence) * 0.01 > 1*fvar(1)*const(data.attack) || teammode = single && roundno >= 3 || teammode = turns && roundsexisted > 0
trigger3 = frontedgebodydist < 90 || p2dist x <= 65

trigger4 = stateno = 232
trigger4 = movehit = 1 || moveguarded = 1
trigger4 = numtarget(232) && !numhelper(4200)
;trigger4 = helper(4200),numtarget(4210)=0 || helper(4000),stateno != [4210,4211]
trigger4 = frontedgebodydist < 90 || p2dist x = [20,65]
;______________________________________________________________________

;切り返し(無敵付き)
;______________________________________________________________________
;翼人モードpalno = [7,12]
;鳥ノ詠
[State -1]
type = ChangeState
value = 3700
triggerall = RoundState = 2 && var(59) > 0
triggerall = power >= 3000 && life <=333
triggerall = palno = [7,12]
triggerall = statetype != A
triggerall = alive
triggerall = movecontact || ctrl
triggerall = !(enemynear(var(58)),authorname = "Muteki" && enemynear(var(58)),stateno < 1000) || enemynear(var(58)),time >2
triggerall = enemynear(var(58)),movetype = A && enemynear(var(58)),animtime < -17
triggerall = p2bodydist x <= 75
triggerall = p2dist x >0
triggerall = enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),time >= 60*fvar(37) || (enemynear(var(58)),time <= 1 && random <= 50)
trigger1 = enemynear(var(58)),statetype != A && enemynear(var(58)),statetype != L
trigger2 = enemynear(var(58)),statetype = A
trigger2 = (fvar(13) != 0 && enemynear(var(58)),pos y + 16*fvar(13) + 0.5*256*fvar(38) = [-30,0]) || (fvar(13) = 0 && enemynear(var(58)),pos y >= -30)


;強空翔ケル二重ノ螺旋
[State -1]
type = ChangeState
value = 2101
triggerall = RoundState = 2 && var(59)
triggerall = enemynear(var(58)),statetype != L
triggerall = palno = [7,12]
triggerall = var(8) = 1 || Var(7) >= 200
triggerall = var(7) >= 0
triggerall = alive
triggerall = statetype != A
triggerall = !(enemynear(var(58)),authorname = "Muteki" && enemynear(var(58)),stateno < 1000) || enemynear(var(58)),time >2
triggerall = enemynear(var(58)),movetype=A || enemynear(var(58)),hitdefattr = SC,AT
triggerall = enemynear(var(58)),ctrl=0
triggerall = enemynear(var(58)),stateno < 2500 || (enemynear(var(58)),stateno >=2500 && enemynear(var(58)),animtime > -11)||ctrl = 0
triggerall = enemynear(var(58)),animtime<=-3 && p2bodydist x + 3*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x <= 60 && p2dist x > -10
triggerall = power >= 3000 && enemynear(var(58)),life * enemynear(var(58)),const(data.defence) * 0.01 >= 1*const(data.attack)
triggerall = enemynear(var(58)),time>=ceil(60*fvar(37)) || (enemynear(var(58)),time <= 1 && random <= 50)
triggerall = ctrl ||( ((stateno = [200, 220]) ||(stateno = [400, 420])) && movecontact) || stateno = 52
trigger1 = enemynear(var(58)),statetype != A
trigger2 = enemynear(var(58)),statetype = A
trigger2 = (fvar(13) != 0 && enemynear(var(58)),pos y + 3*fvar(13) + 0.5*9*fvar(38) = [-30,0]) || (fvar(13) = 0 && enemynear(var(58)),pos y >= -30)

;吹キ荒ブ天ノ此花
[State -1]
type = ChangeState
value = 3600 + (statetype = A)
triggerall = Power >= 3000
triggerall = RoundState = 2 && var(59) > 0
triggerall = palno = [7,12]
triggerall = alive
triggerall = !(enemynear(var(58)),authorname = "Muteki" && enemynear(var(58)),stateno < 1000) || enemynear(var(58)),time >2
triggerall = enemynear(var(58)),movetype=A || enemynear(var(58)),hitdefattr = SC,AT
triggerall = enemynear(var(58)),ctrl=0
triggerall = enemynear(var(58)),time>=ceil(60*fvar(37)) || (enemynear(var(58)),time <= 1 && random <= 50)
triggerall = ctrl ||( ((stateno = [200, 220]) ||(stateno = [400, 620])) && movecontact) || stateno = 52
triggerall = enemynear(var(58)),statetype != L
trigger1 = enemynear(var(58)),statetype != A
trigger1 = enemynear(var(58)),animtime < -25 - ifelse((facing = enemynear(var(58)),facing),(enemynear(var(58)),backedgebodydist/15),(enemynear(var(58)),frontedgebodydist/15))
trigger2 = enemynear(var(58)),statetype = A && enemynear(var(58)),vel y < -5
trigger2 = random <= 30

;七ツ枝ノ宝剣
[State -1]
type = ChangeState
value = 3400
triggerall = RoundState = 2 && var(59) > 0
triggerall = power >= 3000
triggerall = palno = [7,12]
triggerall = statetype != A
triggerall = alive
triggerall = enemynear(var(58)),statetype != L
triggerall = !(enemynear(var(58)),authorname = "Muteki" && enemynear(var(58)),stateno < 1000) || enemynear(var(58)),time >2
triggerall = ctrl ||( ((stateno = [200, 220]) ||(stateno = [400, 420])) && movecontact) || stateno = 52
triggerall = enemynear(var(58)),movetype = A && enemynear(var(58)),animtime < -9
triggerall = abs(p2bodydist x + 8*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x) <= 75
triggerall = enemynear(var(58)),time >= 60*fvar(37) || (enemynear(var(58)),time <= 1 && random <= 50)
trigger1 = enemynear(var(58)),statetype != A && enemynear(var(58)),statetype != L
trigger2 = enemynear(var(58)),statetype = A
trigger2 = (fvar(13) != 0 && enemynear(var(58)),pos y + 8*fvar(13) + 0.5*64*fvar(38) = [-70,0]) || (fvar(13) = 0 && enemynear(var(58)),pos y >= -80)

;解キ放ツ白銀ノ剣
[State -1]
type = ChangeState
value = 3500
triggerall = RoundState = 2 && var(59) > 0
triggerall = power >= 3000
triggerall = palno = [7,12]
triggerall = statetype = A
triggerall = alive
triggerall = !(enemynear(var(58)),authorname = "Muteki" && enemynear(var(58)),stateno < 1000) || enemynear(var(58)),time >2
triggerall = ctrl ||( (stateno = [600, 620]) && movecontact)
triggerall = enemynear(var(58)),movetype = A && enemynear(var(58)),animtime < -1
triggerall = abs(p2bodydist x + facing*enemynear(var(58)),facing*enemynear(var(58)),vel x) <= 75
triggerall = enemynear(var(58)),time >= 60*fvar(37) || (enemynear(var(58)),time <= 1 && random <= 50)
trigger1 = enemynear(var(58)),statetype != A && enemynear(var(58)),statetype != L
trigger1 = pos y = [-120,-30]
trigger2 = enemynear(var(58)),statetype = A
trigger2 = (fvar(13) != 0 && p2bodydist y + fvar(13) + 0.5*fvar(38) = [-100,80]) || (fvar(13) = 0 && enemynear(var(58)),pos y >= -80)

;強空翔ケル二重ノ螺旋
[State -1]
type = ChangeState
value = 2101
triggerall = RoundState = 2 && var(59)
triggerall = enemynear(var(58)),statetype != L
triggerall = palno = [7,12]
triggerall = alive
triggerall = var(8) = 1 || Var(7) >= 200
triggerall = var(7) >= 0
triggerall = numhelper(20000)
triggerall = statetype != A
triggerall = enemynear(var(58)),stateno < 2500 || (enemynear(var(58)),stateno >=2500 && enemynear(var(58)),animtime > -11)||ctrl = 0
triggerall = enemynear(var(58)),movetype != H
triggerall = !(enemynear(var(58)),authorname = "Muteki" && enemynear(var(58)),stateno < 1000) || enemynear(var(58)),time >2
trigger1 = enemynear(var(58)),movetype=A&& enemynear(var(58)),time >= 60*fvar(37)|| enemynear(var(58)),hitdefattr = SC,AT || random <= 60*helper(20000),var(9)
trigger1 = p2bodydist x + 3*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x <= 60 && p2dist x > -10
trigger1 = enemynear(var(58)),ctrl=0
trigger1 = random < 100*helper(20000),var(9)
trigger1 = fvar(33) <= 100
trigger1 = helper(20000),var(9) > 0
trigger1 = ctrl ||( ((stateno = [200, 220]) ||(stateno = [400, 420])) && movecontact) || stateno = 52
trigger2 = numenemy = 2 && var(52)
trigger2 = enemynear(0),movetype != H && enemynear(1),movetype != H
trigger2 = enemynear(0),facing != enemynear(1),facing
trigger2 = enemynear(0),pos x < pos x < enemynear(1),pos x || enemynear(0),pos x > pos x > enemynear(1),pos x
trigger2 = abs(enemynear(0),pos x -pos x) < 60 && abs(enemynear(1),pos x - pos x < 60)
trigger2 = enemynear(0),pos y > -70 && enemynear(1),pos y>-70
trigger2 = enemynear(0),ctrl = 0 || enemynear(1),ctrl = 0


;強草薙シ光ノ刃
[State -1]
type = ChangeState
value = 2001
triggerall = RoundState = 2 && var(59) > 0
triggerall = palno = [7,12]
triggerall = var(8) = 1 || Var(7) >= 200
triggerall = var(7) >= 0
triggerall = alive
triggerall = statetype != A
triggerall = !(enemynear(var(58)),authorname = "Muteki" && enemynear(var(58)),stateno < 1000) || enemynear(var(58)),time >2
triggerall = enemynear(var(58)),movetype=A || enemynear(var(58)),hitdefattr = SC,AT
triggerall = enemynear(var(58)),ctrl=0
triggerall = enemynear(var(58)),stateno < 2500 || (enemynear(var(58)),stateno >=2500 && enemynear(var(58)),animtime > -11)||ctrl = 0
triggerall = enemynear(var(58)),animtime<=-9&& p2dist x > 0
triggerall = random < 200 ||(var(8)=1&&random < 300)
triggerall = enemynear(var(58)),time>=ceil(60*fvar(37)) || (enemynear(var(58)),time <= 1 && random <= 50)
triggerall = ctrl ||( ((stateno = [200, 220]) ||(stateno = [400, 420])) && movecontact) || stateno = 52
triggerall = enemynear(var(58)),statetype != L
trigger1 = enemynear(var(58)),statetype != A
trigger2 = enemynear(var(58)),statetype = A
trigger2 = (fvar(13) != 0 && enemynear(var(58)),pos y + 9*fvar(13) + 0.5*81*fvar(38) = [-30,0]) || (fvar(13) = 0 && enemynear(var(58)),pos y >= -30)


;弱空翔ケル二重ノ螺旋
[State -1]
type = ChangeState
value = 2100
triggerall = RoundState = 2&&var(59)
triggerall = palno = [7,12]
triggerall = statetype != A
triggerall = enemynear(var(58)),movetype=A || enemynear(var(58)),hitdefattr = SC,AT
triggerall = enemynear(var(58)),ctrl=0
triggerall = alive
triggerall = !(enemynear(var(58)),authorname = "Muteki" && enemynear(var(58)),stateno < 1000) || enemynear(var(58)),time >2
triggerall = enemynear(var(58)),stateno < 2500 || (enemynear(var(58)),stateno >=2500 && enemynear(var(58)),animtime > -11)||ctrl = 0
triggerall = enemynear(var(58)),animtime<=-9 && p2bodydist x + 9*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x <= 60 && p2dist x > -10
triggerall = enemynear(var(58)),time>=ceil(60*fvar(37)) || (enemynear(var(58)),time <= 1 && random <= 50)
triggerall = ctrl ||( ((stateno = [200, 220]) ||(stateno = [400, 420])) && movecontact) || stateno = 52
triggerall = enemynear(var(58)),statetype != L
trigger1 = enemynear(var(58)),statetype != A
trigger2 = enemynear(var(58)),statetype = A
trigger2 = (fvar(13) != 0 && enemynear(var(58)),pos y + 9*fvar(13) + 0.5*81*fvar(38) = [-45,0]) || (fvar(13) = 0 && enemynear(var(58)),pos y >= -35)

;切り返し兼タッグ用ぶっぱ
;吹キ荒ブ天ノ此花
[State -1]
type = ChangeState
value = 3600
triggerall = Power >= 3000
triggerall = RoundState = 2 && var(59)
triggerall = statetype != A
triggerall = alive
triggerall = palno = [7,12]
triggerall = ctrl || (movecontact&&stateno = [200,220]) || (movecontact&&stateno = [400,420])
trigger1 = random <= 30
trigger1 = var(52) = 1 && numenemy = 2 && numpartner
trigger1 = enemynear(0),movetype = A || enemynear(1),movetype = A
trigger1 = enemynear(var(58)),movetype != H 
trigger2 = fvar(31) > 1.0
trigger2 = enemynear(var(58)),life > 200*const(data.attack)*0.01 && p2bodydist x <= 100 && fvar(37) <= 0.20|| (life < 300 && p2bodydist x > 100)
trigger2 = random <= ceil(100*fvar(31))

;______________________________________________________________________

;隙付き
;______________________________________________________________________

;しゃがみ弱攻撃4F
[State -3,c-1]
type = ChangeState
value = 400
triggerall = var(59)>0&&RoundState = 2
triggerall = stateno != 101&&statetype!=A
triggerall = enemynear(var(58)),statetype !=A && enemynear(var(58)),statetype!=L && enemynear(var(58)),pos y>=-5
triggerall = ctrl || ((stateno = 200 || stateno = 400) && movecontact) || stateno = 120 && prevstateno = [160,162]
triggerall = numhelper(20004)>0
triggerall = enemynear(var(58)),movetype = A
triggerall = p2dist x >0
triggerall = !inguarddist || (enemynear(var(58)),numproj = 0 && enemynear(var(58)),numhelper<=helper(20000),var(8))
triggerall = (enemynear(var(58)),time <= 1 && random <= 100) ||enemynear(var(58)),time>=60*fvar(28)
triggerall = p2bodydist x <= 20
triggerall = fvar(20) = [0,10]
triggerall = enemynear(var(58)),time > 2 || enemynear(var(58)),stateno >= 1000 || !enemynear(var(58)),authorname = "muteki"
trigger1 = helper(20004),var(0)>0
trigger1 = enemynear(var(58)),id = helper(20004),var(40)
trigger1 = enemynear(var(58)),stateno = helper(20004),var(0)
trigger1 = enemynear(var(58)),time = [0,(helper(20004),var(1) - 5)]

trigger2 = helper(20004),var(2)>0
trigger2 = enemynear(var(58)),id = helper(20004),var(41)
trigger2 = enemynear(var(58)),stateno = helper(20004),var(2)
trigger2 = enemynear(var(58)),time = [0,(helper(20004),var(3) - 5)]

trigger3 = helper(20004),var(4)>0
trigger3 = enemynear(var(58)),id = helper(20004),var(42)
trigger3 = enemynear(var(58)),stateno = helper(20004),var(4)
trigger3 = enemynear(var(58)),time = [0,(helper(20004),var(5) - 5)]

trigger4 = helper(20004),var(6)>0
trigger4 = enemynear(var(58)),id = helper(20004),var(43)
trigger4 = enemynear(var(58)),stateno = helper(20004),var(6)
trigger4 = enemynear(var(58)),time = [0,(helper(20004),var(7) - 5)]

trigger5 = helper(20004),var(8)>0
trigger5 = enemynear(var(58)),id = helper(20004),var(44)
trigger5 = enemynear(var(58)),stateno = helper(20004),var(8)
trigger5 = enemynear(var(58)),time = [0,(helper(20004),var(9) - 5)]

trigger6 = helper(20004),var(10)>0
trigger6 = enemynear(var(58)),id = helper(20004),var(45)
trigger6 = enemynear(var(58)),stateno = helper(20004),var(10)
trigger6 = enemynear(var(58)),time = [0,(helper(20004),var(11) - 5)]

trigger7 = helper(20004),var(12)>0
trigger7 = enemynear(var(58)),id = helper(20004),var(46)
trigger7 = enemynear(var(58)),stateno = helper(20004),var(12)
trigger7 = enemynear(var(58)),time = [0,(helper(20004),var(13) - 5)]

trigger8 = helper(20004),var(14)>0
trigger8 = enemynear(var(58)),id = helper(20004),var(47)
trigger8 = enemynear(var(58)),stateno = helper(20004),var(14)
trigger8 = enemynear(var(58)),time = [0,(helper(20004),var(14) - 5)]

trigger9 = helper(20004),var(16)>0
trigger9 = enemynear(var(58)),id = helper(20004),var(48)
trigger9 = enemynear(var(58)),stateno = helper(20004),var(16)
trigger9 = enemynear(var(58)),time = [0,(helper(20004),var(17) - 5)]

trigger10 = helper(20004),var(18)>0
trigger10 = enemynear(var(58)),id = helper(20004),var(49)
trigger10 = enemynear(var(58)),stateno = helper(20004),var(18)
trigger10 = enemynear(var(58)),time = [0,(helper(20004),var(19) - 5)]

trigger11 = helper(20004),var(20)>0
trigger11 = enemynear(var(58)),id = helper(20004),var(50)
trigger11 = enemynear(var(58)),stateno = helper(20004),var(20)
trigger11 = enemynear(var(58)),time = [0,(helper(20004),var(21) - 5)]

trigger12 = helper(20004),var(22)>0
trigger12 = enemynear(var(58)),id = helper(20004),var(51)
trigger12 = enemynear(var(58)),stateno = helper(20004),var(22)
trigger12 = enemynear(var(58)),time = [0,(helper(20004),var(23) - 5)]

trigger13 = helper(20004),var(14)>0
trigger13 = enemynear(var(58)),id = helper(20004),var(13)
trigger13 = enemynear(var(58)),stateno = helper(20004),var(14)
trigger13 = enemynear(var(58)),time = [0,(helper(20004),var(15) - 5)]

trigger14 = helper(20004),var(17)>0
trigger14 = enemynear(var(58)),id = helper(20004),var(16)
trigger14 = enemynear(var(58)),stateno = helper(20004),var(17)
trigger14 = enemynear(var(58)),time = [0,(helper(20004),var(18) - 5)]

trigger15 = helper(20004),var(20)>0
trigger15 = enemynear(var(58)),id = helper(20004),var(19)
trigger15 = enemynear(var(58)),stateno = helper(20004),var(20)
trigger15 = enemynear(var(58)),time = [0,(helper(20004),var(21) - 5)]

trigger16 = helper(20004),var(23)>0
trigger16 = enemynear(var(58)),id = helper(20004),var(22)
trigger16 = enemynear(var(58)),stateno = helper(20004),var(23)
trigger16 = enemynear(var(58)),time = [0,(helper(20004),var(24) - 5)]

trigger17 = helper(20004),var(26)>0
trigger17 = enemynear(var(58)),id = helper(20004),var(25)
trigger17 = enemynear(var(58)),stateno = helper(20004),var(26)
trigger17 = enemynear(var(58)),time = [0,(helper(20004),var(27) - 5)]

;中攻撃7F
[State -3,c-2]
type = ChangeState
value = 410
triggerall = var(59)>0&&RoundState = 2
triggerall = stateno != 101&&statetype!=A
triggerall = enemynear(var(58)),statetype !=A && enemynear(var(58)),statetype!=L
triggerall = numhelper(20004)>0
triggerall = ctrl || ((stateno = 200 || stateno = 400) && movecontact) || stateno = 120 && prevstateno = [160,162]
triggerall = p2dist x >0
triggerall = !inguarddist || (enemynear(var(58)),numproj = 0 && enemynear(var(58)),numhelper<=helper(20000),var(8))
triggerall = enemynear(var(58)),movetype = A
triggerall = (enemynear(var(58)),time <= 1 && random <= 100) ||enemynear(var(58)),time>=60*fvar(28)
triggerall = p2bodydist x <= 40
triggerall = fvar(20) = [0,10]
triggerall = enemynear(var(58)),time > 2 || enemynear(var(58)),stateno >= 1000 || !enemynear(var(58)),authorname = "muteki"
trigger1 = helper(20004),var(0)>0
trigger1 = enemynear(var(58)),id = helper(20004),var(40)
trigger1 = enemynear(var(58)),stateno = helper(20004),var(0)
trigger1 = enemynear(var(58)),time = [0,(helper(20004),var(1) - 9)]

trigger2 = helper(20004),var(2)>0
trigger2 = enemynear(var(58)),id = helper(20004),var(41)
trigger2 = enemynear(var(58)),stateno = helper(20004),var(2)
trigger2 = enemynear(var(58)),time = [0,(helper(20004),var(3) - 9)]

trigger3 = helper(20004),var(4)>0
trigger3 = enemynear(var(58)),id = helper(20004),var(42)
trigger3 = enemynear(var(58)),stateno = helper(20004),var(4)
trigger3 = enemynear(var(58)),time = [0,(helper(20004),var(5) - 9)]

trigger4 = helper(20004),var(6)>0
trigger4 = enemynear(var(58)),id = helper(20004),var(43)
trigger4 = enemynear(var(58)),stateno = helper(20004),var(6)
trigger4 = enemynear(var(58)),time = [0,(helper(20004),var(7) - 9)]

trigger5 = helper(20004),var(8)>0
trigger5 = enemynear(var(58)),id = helper(20004),var(44)
trigger5 = enemynear(var(58)),stateno = helper(20004),var(8)
trigger5 = enemynear(var(58)),time = [0,(helper(20004),var(9) - 9)]

trigger6 = helper(20004),var(10)>0
trigger6 = enemynear(var(58)),id = helper(20004),var(45)
trigger6 = enemynear(var(58)),stateno = helper(20004),var(10)
trigger6 = enemynear(var(58)),time = [0,(helper(20004),var(11) - 9)]

trigger7 = helper(20004),var(12)>0
trigger7 = enemynear(var(58)),id = helper(20004),var(46)
trigger7 = enemynear(var(58)),stateno = helper(20004),var(12)
trigger7 = enemynear(var(58)),time = [0,(helper(20004),var(13) - 9)]

trigger8 = helper(20004),var(14)>0
trigger8 = enemynear(var(58)),id = helper(20004),var(47)
trigger8 = enemynear(var(58)),stateno = helper(20004),var(14)
trigger8 = enemynear(var(58)),time = [0,(helper(20004),var(14) - 9)]

trigger9 = helper(20004),var(16)>0
trigger9 = enemynear(var(58)),id = helper(20004),var(48)
trigger9 = enemynear(var(58)),stateno = helper(20004),var(16)
trigger9 = enemynear(var(58)),time = [0,(helper(20004),var(17) - 9)]

trigger10 = helper(20004),var(18)>0
trigger10 = enemynear(var(58)),id = helper(20004),var(49)
trigger10 = enemynear(var(58)),stateno = helper(20004),var(18)
trigger10 = enemynear(var(58)),time = [0,(helper(20004),var(19) - 9)]

trigger11 = helper(20004),var(20)>0
trigger11 = enemynear(var(58)),id = helper(20004),var(50)
trigger11 = enemynear(var(58)),stateno = helper(20004),var(20)
trigger11 = enemynear(var(58)),time = [0,(helper(20004),var(21) - 9)]

trigger12 = helper(20004),var(22)>0
trigger12 = enemynear(var(58)),id = helper(20004),var(51)
trigger12 = enemynear(var(58)),stateno = helper(20004),var(22)
trigger12 = enemynear(var(58)),time = [0,(helper(20004),var(23) - 9)]

trigger13 = helper(20004),var(14)>0
trigger13 = enemynear(var(58)),id = helper(20004),var(13)
trigger13 = enemynear(var(58)),stateno = helper(20004),var(14)
trigger13 = enemynear(var(58)),time = [0,(helper(20004),var(15) - 9)]

trigger14 = helper(20004),var(17)>0
trigger14 = enemynear(var(58)),id = helper(20004),var(16)
trigger14 = enemynear(var(58)),stateno = helper(20004),var(17)
trigger14 = enemynear(var(58)),time = [0,(helper(20004),var(18) - 9)]

trigger15 = helper(20004),var(20)>0
trigger15 = enemynear(var(58)),id = helper(20004),var(19)
trigger15 = enemynear(var(58)),stateno = helper(20004),var(20)
trigger15 = enemynear(var(58)),time = [0,(helper(20004),var(21) - 9)]

trigger16 = helper(20004),var(23)>0
trigger16 = enemynear(var(58)),id = helper(20004),var(22)
trigger16 = enemynear(var(58)),stateno = helper(20004),var(23)
trigger16 = enemynear(var(58)),time = [0,(helper(20004),var(24) - 9)]

trigger17 = helper(20004),var(26)>0
trigger17 = enemynear(var(58)),id = helper(20004),var(25)
trigger17 = enemynear(var(58)),stateno = helper(20004),var(26)
trigger17 = enemynear(var(58)),time = [0,(helper(20004),var(27) - 9)]

[state -3,c-3];立ち遠中10F
type=changestate
value = 215
triggerall = var(59)>0&&RoundState = 2
triggerall = stateno != 101&&statetype!=A
triggerall = enemynear(var(58)),statetype !=A && enemynear(var(58)),statetype!=L
triggerall = numhelper(20004)>0
triggerall = ctrl || ((stateno = 200 || stateno = 400 || stateno = 210 || stateno = 410) && movecontact) || stateno = 120 && prevstateno = [160,162]
triggerall = !inguarddist || (enemynear(var(58)),numproj = 0 && enemynear(var(58)),numhelper<=helper(20000),var(8))
triggerall = enemynear(var(58)),movetype = A
triggerall = (enemynear(var(58)),time <= 1 && random <= 100) ||enemynear(var(58)),time>=60*fvar(28)
triggerall = p2bodydist x >50
triggerall = p2bodydist x <= 80
triggerall = fvar(20) = [0,10]
triggerall = enemynear(var(58)),time > 2 || enemynear(var(58)),stateno >= 1000 || !enemynear(var(58)),authorname = "muteki"
trigger1 = helper(20004),var(0)>0
trigger1 = enemynear(var(58)),id = helper(20004),var(40)
trigger1 = enemynear(var(58)),stateno = helper(20004),var(0)
trigger1 = enemynear(var(58)),time = [0,(helper(20004),var(1) - 11)]

trigger2 = helper(20004),var(2)>0
trigger2 = enemynear(var(58)),id = helper(20004),var(41)
trigger2 = enemynear(var(58)),stateno = helper(20004),var(2)
trigger2 = enemynear(var(58)),time = [0,(helper(20004),var(3) - 11)]

trigger3 = helper(20004),var(4)>0
trigger3 = enemynear(var(58)),id = helper(20004),var(42)
trigger3 = enemynear(var(58)),stateno = helper(20004),var(4)
trigger3 = enemynear(var(58)),time = [0,(helper(20004),var(5) - 11)]

trigger4 = helper(20004),var(6)>0
trigger4 = enemynear(var(58)),id = helper(20004),var(43)
trigger4 = enemynear(var(58)),stateno = helper(20004),var(6)
trigger4 = enemynear(var(58)),time = [0,(helper(20004),var(7) - 11)]

trigger5 = helper(20004),var(8)>0
trigger5 = enemynear(var(58)),id = helper(20004),var(44)
trigger5 = enemynear(var(58)),stateno = helper(20004),var(8)
trigger5 = enemynear(var(58)),time = [0,(helper(20004),var(9) - 11)]

trigger6 = helper(20004),var(10)>0
trigger6 = enemynear(var(58)),id = helper(20004),var(45)
trigger6 = enemynear(var(58)),stateno = helper(20004),var(10)
trigger6 = enemynear(var(58)),time = [0,(helper(20004),var(11) - 11)]

trigger7 = helper(20004),var(12)>0
trigger7 = enemynear(var(58)),id = helper(20004),var(46)
trigger7 = enemynear(var(58)),stateno = helper(20004),var(12)
trigger7 = enemynear(var(58)),time = [0,(helper(20004),var(13) - 11)]

trigger8 = helper(20004),var(14)>0
trigger8 = enemynear(var(58)),id = helper(20004),var(47)
trigger8 = enemynear(var(58)),stateno = helper(20004),var(14)
trigger8 = enemynear(var(58)),time = [0,(helper(20004),var(14) - 11)]

trigger9 = helper(20004),var(16)>0
trigger9 = enemynear(var(58)),id = helper(20004),var(48)
trigger9 = enemynear(var(58)),stateno = helper(20004),var(16)
trigger9 = enemynear(var(58)),time = [0,(helper(20004),var(17) - 11)]

trigger10 = helper(20004),var(18)>0
trigger10 = enemynear(var(58)),id = helper(20004),var(49)
trigger10 = enemynear(var(58)),stateno = helper(20004),var(18)
trigger10 = enemynear(var(58)),time = [0,(helper(20004),var(19) - 11)]

trigger11 = helper(20004),var(20)>0
trigger11 = enemynear(var(58)),id = helper(20004),var(50)
trigger11 = enemynear(var(58)),stateno = helper(20004),var(20)
trigger11 = enemynear(var(58)),time = [0,(helper(20004),var(21) - 11)]

trigger12 = helper(20004),var(22)>0
trigger12 = enemynear(var(58)),id = helper(20004),var(51)
trigger12 = enemynear(var(58)),stateno = helper(20004),var(22)
trigger12 = enemynear(var(58)),time = [0,(helper(20004),var(23) - 11)]

trigger13 = helper(20004),var(14)>0
trigger13 = enemynear(var(58)),id = helper(20004),var(13)
trigger13 = enemynear(var(58)),stateno = helper(20004),var(14)
trigger13 = enemynear(var(58)),time = [0,(helper(20004),var(15) - 11)]

trigger14 = helper(20004),var(17)>0
trigger14 = enemynear(var(58)),id = helper(20004),var(16)
trigger14 = enemynear(var(58)),stateno = helper(20004),var(17)
trigger14 = enemynear(var(58)),time = [0,(helper(20004),var(18) - 11)]

trigger15 = helper(20004),var(20)>0
trigger15 = enemynear(var(58)),id = helper(20004),var(19)
trigger15 = enemynear(var(58)),stateno = helper(20004),var(20)
trigger15 = enemynear(var(58)),time = [0,(helper(20004),var(21) - 11)]

trigger16 = helper(20004),var(23)>0
trigger16 = enemynear(var(58)),id = helper(20004),var(22)
trigger16 = enemynear(var(58)),stateno = helper(20004),var(23)
trigger16 = enemynear(var(58)),time = [0,(helper(20004),var(24) - 11)]

trigger17 = helper(20004),var(26)>0
trigger17 = enemynear(var(58)),id = helper(20004),var(25)
trigger17 = enemynear(var(58)),stateno = helper(20004),var(26)
trigger17 = enemynear(var(58)),time = [0,(helper(20004),var(27) - 11)]

;強攻撃12F
[State -1,c-4]
type = ChangeState
value = 220
triggerall = var(59)>0&&RoundState = 2
triggerall = stateno != 101&&statetype!=A
triggerall = ctrl|| ((stateno = 200 || stateno = 400 || stateno = 210 || stateno = 410 || stateno = 215) && movecontact) || stateno = 120 && prevstateno = [160,162]
triggerall = !inguarddist || (enemynear(var(58)),numproj = 0 && enemynear(var(58)),numhelper<=helper(20000),var(8))
triggerall = enemynear(var(58)),statetype !=A && enemynear(var(58)),statetype!=L
triggerall = numhelper(20004)>0
triggerall = enemynear(var(58)),movetype = A
triggerall = p2dist x >0
triggerall = (enemynear(var(58)),time <= 1 && random <= 100) ||enemynear(var(58)),time>=60*fvar(28)
triggerall = p2bodydist x <= 80
triggerall = fvar(20) = [0,10]
triggerall = enemynear(var(58)),time > 2 || enemynear(var(58)),stateno >= 1000 || !enemynear(var(58)),authorname = "muteki"
trigger1 = helper(20004),var(0)>0
trigger1 = enemynear(var(58)),id = helper(20004),var(40)
trigger1 = enemynear(var(58)),stateno = helper(20004),var(0)
trigger1 = enemynear(var(58)),time = [0,(helper(20004),var(1) - 13)]

trigger2 = helper(20004),var(2)>0
trigger2 = enemynear(var(58)),id = helper(20004),var(41)
trigger2 = enemynear(var(58)),stateno = helper(20004),var(2)
trigger2 = enemynear(var(58)),time = [0,(helper(20004),var(3) - 13)]

trigger3 = helper(20004),var(4)>0
trigger3 = enemynear(var(58)),id = helper(20004),var(42)
trigger3 = enemynear(var(58)),stateno = helper(20004),var(4)
trigger3 = enemynear(var(58)),time = [0,(helper(20004),var(5) - 13)]

trigger4 = helper(20004),var(6)>0
trigger4 = enemynear(var(58)),id = helper(20004),var(43)
trigger4 = enemynear(var(58)),stateno = helper(20004),var(6)
trigger4 = enemynear(var(58)),time = [0,(helper(20004),var(7) - 13)]

trigger5 = helper(20004),var(8)>0
trigger5 = enemynear(var(58)),id = helper(20004),var(44)
trigger5 = enemynear(var(58)),stateno = helper(20004),var(8)
trigger5 = enemynear(var(58)),time = [0,(helper(20004),var(9) - 13)]

trigger6 = helper(20004),var(10)>0
trigger6 = enemynear(var(58)),id = helper(20004),var(45)
trigger6 = enemynear(var(58)),stateno = helper(20004),var(10)
trigger6 = enemynear(var(58)),time = [0,(helper(20004),var(11) - 13)]

trigger7 = helper(20004),var(12)>0
trigger7 = enemynear(var(58)),id = helper(20004),var(46)
trigger7 = enemynear(var(58)),stateno = helper(20004),var(12)
trigger7 = enemynear(var(58)),time = [0,(helper(20004),var(13) - 13)]

trigger8 = helper(20004),var(14)>0
trigger8 = enemynear(var(58)),id = helper(20004),var(47)
trigger8 = enemynear(var(58)),stateno = helper(20004),var(14)
trigger8 = enemynear(var(58)),time = [0,(helper(20004),var(14) - 13)]

trigger9 = helper(20004),var(16)>0
trigger9 = enemynear(var(58)),id = helper(20004),var(48)
trigger9 = enemynear(var(58)),stateno = helper(20004),var(16)
trigger9 = enemynear(var(58)),time = [0,(helper(20004),var(17) - 13)]

trigger10 = helper(20004),var(18)>0
trigger10 = enemynear(var(58)),id = helper(20004),var(49)
trigger10 = enemynear(var(58)),stateno = helper(20004),var(18)
trigger10 = enemynear(var(58)),time = [0,(helper(20004),var(19) - 13)]

trigger11 = helper(20004),var(20)>0
trigger11 = enemynear(var(58)),id = helper(20004),var(50)
trigger11 = enemynear(var(58)),stateno = helper(20004),var(20)
trigger11 = enemynear(var(58)),time = [0,(helper(20004),var(21) - 13)]

trigger12 = helper(20004),var(22)>0
trigger12 = enemynear(var(58)),id = helper(20004),var(51)
trigger12 = enemynear(var(58)),stateno = helper(20004),var(22)
trigger12 = enemynear(var(58)),time = [0,(helper(20004),var(23) - 13)]

trigger13 = helper(20004),var(14)>0
trigger13 = enemynear(var(58)),id = helper(20004),var(13)
trigger13 = enemynear(var(58)),stateno = helper(20004),var(14)
trigger13 = enemynear(var(58)),time = [0,(helper(20004),var(15) - 13)]

trigger14 = helper(20004),var(17)>0
trigger14 = enemynear(var(58)),id = helper(20004),var(16)
trigger14 = enemynear(var(58)),stateno = helper(20004),var(17)
trigger14 = enemynear(var(58)),time = [0,(helper(20004),var(18) - 13)]

trigger15 = helper(20004),var(20)>0
trigger15 = enemynear(var(58)),id = helper(20004),var(19)
trigger15 = enemynear(var(58)),stateno = helper(20004),var(20)
trigger15 = enemynear(var(58)),time = [0,(helper(20004),var(21) - 13)]

trigger16 = helper(20004),var(23)>0
trigger16 = enemynear(var(58)),id = helper(20004),var(22)
trigger16 = enemynear(var(58)),stateno = helper(20004),var(23)
trigger16 = enemynear(var(58)),time = [0,(helper(20004),var(24) - 13)]

trigger17 = helper(20004),var(26)>0
trigger17 = enemynear(var(58)),id = helper(20004),var(25)
trigger17 = enemynear(var(58)),stateno = helper(20004),var(26)
trigger17 = enemynear(var(58)),time = [0,(helper(20004),var(27) - 13)]

;弱草薙シ光ノ刃
[State -1]
type = ChangeState
value = 2000
triggerall = var(59)>0&&RoundState = 2
triggerall = stateno != 101&&statetype!=A
triggerall = ctrl || stateno = 120 && prevstateno = [160,162]
triggerall = !inguarddist || (enemynear(var(58)),numproj = 0 && enemynear(var(58)),numhelper<=helper(20000),var(8))
triggerall = enemynear(var(58)),statetype !=A && enemynear(var(58)),statetype!=L
triggerall = numhelper(20004)>0
triggerall = palno = [7,12]
triggerall = enemynear(var(58)),movetype = A
triggerall = p2dist x >-50
triggerall = (enemynear(var(58)),time <= 1 && random <= 100) ||enemynear(var(58)),time>=60*fvar(28)
triggerall = p2bodydist x <= 200
triggerall = fvar(20) = [0,10]
triggerall = enemynear(var(58)),time > 2 || enemynear(var(58)),stateno >= 1000 || !enemynear(var(58)),authorname = "muteki"
trigger1 = helper(20004),var(0)>0
trigger1 = enemynear(var(58)),id = helper(20004),var(40)
trigger1 = enemynear(var(58)),stateno = helper(20004),var(0)
trigger1 = enemynear(var(58)),time = [0,(helper(20004),var(1) - 10)]

trigger2 = helper(20004),var(2)>0
trigger2 = enemynear(var(58)),id = helper(20004),var(41)
trigger2 = enemynear(var(58)),stateno = helper(20004),var(2)
trigger2 = enemynear(var(58)),time = [0,(helper(20004),var(3) - 10)]

trigger3 = helper(20004),var(4)>0
trigger3 = enemynear(var(58)),id = helper(20004),var(42)
trigger3 = enemynear(var(58)),stateno = helper(20004),var(4)
trigger3 = enemynear(var(58)),time = [0,(helper(20004),var(5) - 10)]

trigger4 = helper(20004),var(6)>0
trigger4 = enemynear(var(58)),id = helper(20004),var(43)
trigger4 = enemynear(var(58)),stateno = helper(20004),var(6)
trigger4 = enemynear(var(58)),time = [0,(helper(20004),var(7) - 10)]

trigger5 = helper(20004),var(8)>0
trigger5 = enemynear(var(58)),id = helper(20004),var(44)
trigger5 = enemynear(var(58)),stateno = helper(20004),var(8)
trigger5 = enemynear(var(58)),time = [0,(helper(20004),var(9) - 10)]

trigger6 = helper(20004),var(10)>0
trigger6 = enemynear(var(58)),id = helper(20004),var(45)
trigger6 = enemynear(var(58)),stateno = helper(20004),var(10)
trigger6 = enemynear(var(58)),time = [0,(helper(20004),var(11) - 10)]

trigger7 = helper(20004),var(12)>0
trigger7 = enemynear(var(58)),id = helper(20004),var(46)
trigger7 = enemynear(var(58)),stateno = helper(20004),var(12)
trigger7 = enemynear(var(58)),time = [0,(helper(20004),var(13) - 10)]

trigger8 = helper(20004),var(14)>0
trigger8 = enemynear(var(58)),id = helper(20004),var(47)
trigger8 = enemynear(var(58)),stateno = helper(20004),var(14)
trigger8 = enemynear(var(58)),time = [0,(helper(20004),var(14) - 10)]

trigger9 = helper(20004),var(16)>0
trigger9 = enemynear(var(58)),id = helper(20004),var(48)
trigger9 = enemynear(var(58)),stateno = helper(20004),var(16)
trigger9 = enemynear(var(58)),time = [0,(helper(20004),var(17) - 10)]

trigger10 = helper(20004),var(18)>0
trigger10 = enemynear(var(58)),id = helper(20004),var(49)
trigger10 = enemynear(var(58)),stateno = helper(20004),var(18)
trigger10 = enemynear(var(58)),time = [0,(helper(20004),var(19) - 10)]

trigger11 = helper(20004),var(20)>0
trigger11 = enemynear(var(58)),id = helper(20004),var(50)
trigger11 = enemynear(var(58)),stateno = helper(20004),var(20)
trigger11 = enemynear(var(58)),time = [0,(helper(20004),var(21) - 10)]

trigger12 = helper(20004),var(22)>0
trigger12 = enemynear(var(58)),id = helper(20004),var(51)
trigger12 = enemynear(var(58)),stateno = helper(20004),var(22)
trigger12 = enemynear(var(58)),time = [0,(helper(20004),var(23) - 10)]


trigger13 = helper(20004),var(14)>0
trigger13 = enemynear(var(58)),id = helper(20004),var(13)
trigger13 = enemynear(var(58)),stateno = helper(20004),var(14)
trigger13 = enemynear(var(58)),time = [0,(helper(20004),var(15) - 10)]

trigger14 = helper(20004),var(17)>0
trigger14 = enemynear(var(58)),id = helper(20004),var(16)
trigger14 = enemynear(var(58)),stateno = helper(20004),var(17)
trigger14 = enemynear(var(58)),time = [0,(helper(20004),var(18) - 10)]

;弱草薙シ光ノ刃
[State -1]
type = ChangeState
value = 2000
triggerall = var(59)>0&&RoundState = 2
triggerall = stateno != 101&&statetype!=A
triggerall = ctrl || stateno = 120 && prevstateno = [160,162]
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype != H
triggerall = palno = [7,12]
triggerall = p2dist x > -50
trigger1 = p2bodydist x = [100,200]
trigger1 = random <= 100 - 15*enemynear(var(58)),time
trigger2 = numenemy = 2
trigger2 = enemynear(var(58)),facing = facing
trigger2 = p2dist x > 0
trigger2 = p2bodydist x <= 200
trigger3 = !inguarddist
trigger3 = enemynear(var(58)),ctrl = 0
trigger3 = enemynear(var(58)),animtime < -9
trigger3 = p2bodydist x + 9*facing*enemynear(var(58)),facing= [140,200]
trigger3 = random < -50*(enemynear(var(58)),animtime + 9 )
trigger3 = enemynear(var(58)),stateno != [5000,5999]


;--| タッグ用  |--------------------------------------

;中そらアタック
[State -1]
type = ChangeState
value = 1401
triggerall = var(1) = 1
triggerall = var(36) = 0
triggerall = RoundState = 2&&var(59) > 0
triggerall = statetype != A 
triggerall = ctrl || stateno = 120 && prevstateno = [160,162]
triggerall = enemynear(var(58)),movetype != H&& fvar(28) > 140
triggerall = palno = [1,6]
triggerall = numpartner && numenemy = 2
trigger1 = facing = enemynear(var(58)),facing || enemynear(var(58)),numtarget
trigger1 = p2bodydist x > 120
trigger1 = partner,movetype = H && partner,alive
trigger1 = enemynear(0),pos y >= -80 && enemynear(1),pos y >= -80

;______________________________________________________________________

;切り返し(相撃ち覚悟)
;______________________________________________________________________
;弱往人
[State -1]
type = ChangeState
value = 3230
triggerall = RoundState = 2 && var(59)>0
triggerall = var(1) = 1
triggerall = var(36) > 0
triggerall = palno = [1,6]
triggerall = statetype !=A
triggerall = numhelper(4000) && numhelper(20000)
triggerall = helper(4000),facing*(enemynear(var(58)),pos x - helper(4000),pos x) = [30,105]
triggerall = enemynear(var(58)),movetype=A
triggerall = enemynear(var(58)),ctrl=0
triggerall = enemynear(var(58)),numhelper<=helper(20000),var(8)+1 && enemynear(var(58)),numproj<=1
triggerall = enemynear(var(58)),stateno < 3000 || (enemynear(var(58)),stateno >=3000 && enemynear(var(58)),animtime > -18)
triggerall = enemynear(var(58)),animtime< -16 
triggerall = enemynear(var(58)),statetype != A
triggerall = life > 150
trigger1 = time>=ceil(60*fvar(37)) || (enemynear(var(58)),time <= 1 && random <= 50) || (time <= 1 && random <=50)
trigger1 = ctrl
trigger1 = !(enemynear(var(58)),hitdefattr = SC,AT)
trigger1 = prevstateno = [140,155]
trigger2 = time > ceil(30 - 60*fvar(37)) || random <= 10
trigger2 = stateno = 120 && prevstateno = [160,162]
trigger2 = !(enemynear(var(58)),hitdefattr = SC,AT)

;弱観鈴ちんピンチ0F
[State -1,b-1];神を超えた0F当身
type = ChangeState
value = 3100
triggerall = RoundState = 2 && var(59) > 0
triggerall = Power >= 1000
triggerall = ceil(fvar(32) - 0.1) = 1
triggerall = statetype!=A
triggerall = !(enemynear(var(58)),authorname = "Muteki" && enemynear(var(58)),stateno < 1000) || enemynear(var(58)),time >2
triggerall = ctrl || ((movecontact||movereversed>1&&var(28)) && ((stateno = [200, 220])||(stateno = [400, 420])))
triggerall = numhelper(20000)>0
triggerall = enemynear(var(58)),movetype = A
triggerall = palno = [1,6]
triggerall = p2dist x >0 || p2dist x < 0 && enemynear(var(58)),facing = facing
triggerall = !inguarddist || (enemynear(var(58)),numproj = 0 && enemynear(var(58)),numhelper<=helper(20000),var(8))
triggerall = p2bodydist x + 3*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x <= 65
triggerall = fvar(20) = [0,10]
triggerall = enemynear(var(58)),stateno != [800,805]
triggerall = (fvar(13) = 0 && enemynear(var(58)),pos y >= -35) || (fvar(13)>0 && enemynear(var(58)),pos y + 2*fvar(13) + 0.5*4*fvar(38) > -35) || enemynear(var(58)),statetype !=A
trigger1 = enemynear(var(58)),hitdefattr = SCA,AA
trigger1 = !var(25)
trigger1 = (random <= 20) ||enemynear(var(58)),time>=60*fvar(37)

trigger2 = helper(20000),var(47) = 0
trigger2 = enemynear(var(58)),stateno < 1000
trigger2 = !var(25)
trigger2 = !(enemynear(var(58)),hitdefattr = SCA,AA,AT,AP)||stateno != 120 || prevstateno != [160,162]
trigger2 = ((enemynear(var(58)),time <=1 ||time <=1 )&& random <= 10) ||enemynear(var(58)),time>=60*fvar(37)

;国崎アッパー
[State -1,15]
type = ChangeState
value = 3232
triggerall = var(1) = 1
triggerall = var(36) > 0
triggerall = var(59)>0&&roundstate=2
triggerall = statetype !=A
triggerall = numhelper(4000)&& numhelper(20000)
triggerall = palno = [1,6]
triggerall = helper(4000),facing*(enemynear(var(58)),pos x - helper(4000),pos x) = [30,105]
triggerall = enemynear(var(58)),movetype=A
triggerall = enemynear(var(58)),ctrl=0
triggerall = !(enemynear(var(58)),authorname = "Muteki" && enemynear(var(58)),stateno < 1000) || enemynear(var(58)),time >2
triggerall = enemynear(var(58)),numhelper<=helper(20000),var(8) && enemynear(var(58)),numproj<=0
triggerall = enemynear(var(58)),stateno < 3000 || (enemynear(var(58)),stateno >=3000 && enemynear(var(58)),animtime > -12)||ctrl = 0
triggerall = enemynear(var(58)),animtime<=-7&&enemynear(var(58)),pos y>-30 
triggerall = enemynear(var(58)),statetype = S||enemynear(var(58)),statetype=A&&(fvar(13)=0||(fvar(13)!=0&&enemynear(var(58)),pos y + 8*fvar(13) + 0.5*64*fvar(38)=[-30,-1]))
triggerall = enemynear(var(58)),time>=(60*fvar(37)) || (enemynear(var(58)),time <= 1 && random <=50) || (time <= 1 && random <=50)
triggerall = !(enemynear(var(58)),hitdefattr = SCA,AT) 
trigger1 = ctrl&&prevstateno=[120,155]
trigger2 = ctrl&&prevstateno=[5000,5270]
trigger3 = ctrl&&stateno=[120,155]
trigger4 = (stateno=[200,220])||(stateno=[400,420])
trigger4 = movecontact
trigger5 = time > ceil(30 - 60*fvar(37)) || random <= 10
trigger5 = stateno = 120 && prevstateno = [160,161]

;強翼
[State -1]
type = ChangeState
value = 1120
triggerall = RoundState = 2 && var(59) > 0
triggerall = var(8) = 1 || Var(7) < 200
triggerall = var(7) >= 0
triggerall = statetype != A&& numhelper(20000)
triggerall = palno = [1,6]
triggerall = !(enemynear(var(58)),authorname = "Muteki" && enemynear(var(58)),stateno < 1000) || enemynear(var(58)),time >2
triggerall = numhelper(20004)
triggerall = enemynear(var(58)),numproj = 0 && enemynear(var(58)),numhelper<= helper(20000),var(8) || !helper(20004),inguarddist
triggerall = enemynear(var(58)),movetype=A || enemynear(var(58)),hitdefattr = SC,AT
triggerall = enemynear(var(58)),ctrl=0
triggerall = enemynear(var(58)),statetype!=A
triggerall = enemynear(var(58)),stateno < 2500 || (enemynear(var(58)),stateno >=2500 && enemynear(var(58)),animtime > -13)||ctrl = 0
triggerall = enemynear(var(58)),animtime<=-15&&p2bodydist x<65&&p2dist x > 0
triggerall = enemynear(var(58)),movecontact = 0 || enemynear(var(58)),movecontact > 3
triggerall = random < 600 ||var(8) = 1
triggerall = enemynear(var(58)),animtime > -18 && enemynear(var(58)),time - enemynear(var(58)),animtime > 40 || random < 333
triggerall = enemynear(var(58)),time>=ceil(60*fvar(37))
triggerall = ctrl ||( ((stateno = [200, 220]) ||(stateno = [400, 420])) && movecontact) || stateno = 52 || stateno = 120 && prevstateno = [160,162]
triggerall = numhelper(20000)

trigger1 = helper(20004),var(0)>0
trigger1 = enemynear(var(58)),id = helper(20004),var(40)
trigger1 = enemynear(var(58)),stateno = helper(20004),var(0)
trigger1 = enemynear(var(58)),time = [0,(helper(20004),var(1) - 15)]

trigger2 = helper(20004),var(2)>0
trigger2 = enemynear(var(58)),id = helper(20004),var(41)
trigger2 = enemynear(var(58)),stateno = helper(20004),var(2)
trigger2 = enemynear(var(58)),time = [0,(helper(20004),var(3) - 15)]

trigger3 = helper(20004),var(4)>0
trigger3 = enemynear(var(58)),id = helper(20004),var(42)
trigger3 = enemynear(var(58)),stateno = helper(20004),var(4)
trigger3 = enemynear(var(58)),time = [0,(helper(20004),var(5) - 15)]

trigger4 = helper(20004),var(6)>0
trigger4 = enemynear(var(58)),id = helper(20004),var(43)
trigger4 = enemynear(var(58)),stateno = helper(20004),var(6)
trigger4 = enemynear(var(58)),time = [0,(helper(20004),var(7) - 15)]

trigger5 = helper(20004),var(8)>0
trigger5 = enemynear(var(58)),id = helper(20004),var(44)
trigger5 = enemynear(var(58)),stateno = helper(20004),var(8)
trigger5 = enemynear(var(58)),time = [0,(helper(20004),var(9) - 15)]

trigger6 = helper(20004),var(10)>0
trigger6 = enemynear(var(58)),id = helper(20004),var(45)
trigger6 = enemynear(var(58)),stateno = helper(20004),var(10)
trigger6 = enemynear(var(58)),time = [0,(helper(20004),var(11) - 15)]

trigger7 = helper(20004),var(12)>0
trigger7 = enemynear(var(58)),id = helper(20004),var(46)
trigger7 = enemynear(var(58)),stateno = helper(20004),var(12)
trigger7 = enemynear(var(58)),time = [0,(helper(20004),var(13) - 15)]

trigger8 = helper(20004),var(14)>0
trigger8 = enemynear(var(58)),id = helper(20004),var(47)
trigger8 = enemynear(var(58)),stateno = helper(20004),var(14)
trigger8 = enemynear(var(58)),time = [0,(helper(20004),var(14) - 15)]

trigger9 = helper(20004),var(16)>0
trigger9 = enemynear(var(58)),id = helper(20004),var(48)
trigger9 = enemynear(var(58)),stateno = helper(20004),var(16)
trigger9 = enemynear(var(58)),time = [0,(helper(20004),var(17) - 15)]

trigger10 = helper(20004),var(18)>0
trigger10 = enemynear(var(58)),id = helper(20004),var(49)
trigger10 = enemynear(var(58)),stateno = helper(20004),var(18)
trigger10 = enemynear(var(58)),time = [0,(helper(20004),var(19) - 15)]

trigger11 = helper(20004),var(20)>0
trigger11 = enemynear(var(58)),id = helper(20004),var(50)
trigger11 = enemynear(var(58)),stateno = helper(20004),var(20)
trigger11 = enemynear(var(58)),time = [0,(helper(20004),var(21) - 15)]

trigger12 = helper(20004),var(22)>0
trigger12 = enemynear(var(58)),id = helper(20004),var(51)
trigger12 = enemynear(var(58)),stateno = helper(20004),var(22)
trigger12 = enemynear(var(58)),time = [0,(helper(20004),var(23) - 15)]

trigger13 = enemynear(var(58)),animtime = [-20,-15]
trigger13 = !(enemynear(var(58)),movecontact) || enemynear(var(58)),hitdefattr = SCA,SA,AT,NP,SP

;--------------------
;空中
;空中強翼
[State -1]
type = ChangeState
value = 1125
triggerall = RoundState = 2
triggerall = var(59)
triggerall = var(8) = 1 || Var(7) >= 200
triggerall = var(7) >= 0
triggerall = stateno = [600, 620]
triggerall = movecontact || var(28) && movereversed > 1
triggerall = p2dist x > 0
triggerall = p2bodydist y > 0
triggerall = enemynear(var(58)),time > 60*fvar(37) || fvar(37) < 0.01 || random <= 20
trigger1 = enemynear(var(58)),movetype = A
trigger1 = enemynear(var(58)),animtime < -15
trigger1 = enemynear(var(58)),hitdefattr = SCA,AA,AT,AP || enemynear(var(58)),animtime = [-18,-16]

;______________________________________________________________________

;後刺し
;______________________________________________________________________

;弱攻撃
[State -3,d-1]
type = ChangeState
value = 400
triggerall = var(59)>0&&RoundState = 2
triggerall = stateno != 101&&statetype!=A
triggerall = enemynear(var(58)),statetype !=A && enemynear(var(58)),statetype!=L
triggerall = !enemynear(var(58)),hitdefattr = SCA,AA,AT,AP
triggerall = numhelper(20000)>0
triggerall = !inguarddist || (enemynear(var(58)),numproj = 0 && enemynear(var(58)),numhelper<=helper(20000),var(8))
triggerall = enemynear(var(58)),movetype = A
triggerall = p2dist x >0
triggerall = p2bodydist x <= 20
triggerall = fvar(20) = [0,10]
trigger1 = ctrl
trigger1 = (time <= 1 && random <= 100) ||time>=60*fvar(28)
trigger1 = helper(20000),var(47) = 1
trigger1 = enemynear(var(58)),movecontact = 0 || enemynear(var(58)),movecontact > 1
trigger1 = enemynear(var(58)),animtime =[-7,-5]

trigger2 = time > ceil(30 - 60*fvar(37)) || random <= 10
trigger2 = stateno = 120 && prevstateno = [160,161]
trigger2 = enemynear(var(58)),movecontact > 1||(stateno < 1000 && enemynear(var(58)),time <= 1) || (enemynear(var(58)),movecontact>=1&&enemynear(var(58)),stateno =[1000,2000])
trigger2 = enemynear(var(58)),animtime <= -5

;中攻撃
[State -3,d-2]
type = ChangeState
value = 410
triggerall = var(59)>0&&RoundState = 2
triggerall = stateno != 101&&statetype!=A
triggerall = enemynear(var(58)),statetype !=A && enemynear(var(58)),statetype!=L
triggerall = !enemynear(var(58)),hitdefattr = SCA,AA,AT,AP
triggerall = numhelper(20000)>0
triggerall = !inguarddist || (enemynear(var(58)),numproj = 0 && enemynear(var(58)),numhelper<=helper(20000),var(8))
triggerall = enemynear(var(58)),movetype = A
triggerall = p2dist x >0
triggerall = p2bodydist x <= 30
triggerall = fvar(20) = [0,10]
trigger1 = ctrl
trigger1 = (time <= 1 && random <= 100) ||time>=60*fvar(28)
trigger1 = helper(20000),var(47) = 1
trigger1 = enemynear(var(58)),movecontact = 0 || enemynear(var(58)),movecontact > 1
trigger1 = enemynear(var(58)),animtime = [-10,-7]

trigger2 = time > ceil(30 - 60*fvar(37)) || random <= 10
trigger2 = stateno = 120 && prevstateno = [160,161]
trigger2 = enemynear(var(58)),movecontact > 1|| (enemynear(var(58)),movecontact>=1&&enemynear(var(58)),stateno =[1000,2000])
trigger2 = enemynear(var(58)),animtime <= -7

;しゃがみ中攻撃
[State -1,d-3]
type = ChangeState
value = 410
triggerall = var(59)>0&&RoundState = 2
triggerall = stateno != 101&&statetype!=A
triggerall = enemynear(var(58)),statetype !=A && enemynear(var(58)),statetype!=L
triggerall = numhelper(20000)>0
triggerall = !inguarddist || (enemynear(var(58)),numproj = 0 && enemynear(var(58)),numhelper<=helper(20000),var(8))
triggerall = enemynear(var(58)),movetype = A
triggerall = p2dist x >0
triggerall = (p2bodydist x <= 40 || enemynear(var(58)),statetype = C && p2bodydist x <= 45) 
triggerall = fvar(20) = [0,10]
trigger1 = ctrl
trigger1 = (time <= 1 && random <= 100) ||time>=60*fvar(28)
trigger1 = helper(20000),var(47) = 1
trigger1 = enemynear(var(58)),movecontact = 0 || enemynear(var(58)),movecontact > 1
trigger1 = enemynear(var(58)),animtime = [-10,-8]

trigger2 = time > ceil(30 - 60*fvar(37)) || random <= 10
trigger2 = stateno = 120 && prevstateno = [160,161]
trigger2 = enemynear(var(58)),movecontact > 1 || (enemynear(var(58)),movecontact>=1&&enemynear(var(58)),stateno =[1000,2000])
trigger2 = enemynear(var(58)),animtime <= -8

trigger3 = ctrl
trigger3 = facing = enemynear(var(58)),facing
trigger3 = enemynear(var(58)),animtime < -8

[state -3,d-4];立ち遠中
type=changestate
value = 215
triggerall = var(59)>0&&RoundState = 2
triggerall = stateno != 101&&statetype!=A
triggerall = enemynear(var(58)),statetype !=A && enemynear(var(58)),statetype!=L
triggerall = numhelper(20000)>0
triggerall = !inguarddist || (enemynear(var(58)),numproj = 0 && enemynear(var(58)),numhelper<=helper(20000),var(8))
triggerall = enemynear(var(58)),movetype = A
triggerall = p2dist x >0 && p2bodydist x > 50
triggerall = p2bodydist x <= 70
triggerall = fvar(20) = [0,10]
trigger1 = (time <= 1 && random <= 100) ||time>=60*fvar(28)
trigger1 = ctrl
trigger1 = helper(20000),var(47) = 1
trigger1 = enemynear(var(58)),movecontact = 0 || enemynear(var(58)),movecontact > 1
trigger1 = enemynear(var(58)),animtime = [-12,-10]

trigger2 = time > ceil(30 - 60*fvar(37)) || random <= 10
trigger2 = stateno = 120 && prevstateno = [160,161]
trigger2 = enemynear(var(58)),movecontact > 1|| (stateno <= 1000 && enemynear(var(58)),time <= 1) || (enemynear(var(58)),movecontact>=1&&enemynear(var(58)),stateno =[1000,2000])
trigger2 = enemynear(var(58)),animtime <= -11

;弱草薙シ光ノ刃
[State -1]
type = ChangeState
value = 2000
triggerall = var(59)>0&&RoundState = 2
triggerall = stateno != 101&&statetype!=A
triggerall = enemynear(var(58)),statetype !=A && enemynear(var(58)),statetype!=L
triggerall = numhelper(20000)>0
triggerall = !inguarddist || (enemynear(var(58)),numproj = 0 && enemynear(var(58)),numhelper<=helper(20000),var(8)) || stateno = 120 && prevstateno = [160,161]
triggerall = enemynear(var(58)),movetype = A
triggerall = p2dist x >-50
triggerall = p2bodydist x <= 250
triggerall = palno = [7,12]
trigger1 = ctrl
trigger1 = (time <= 1 && random <= 100) ||time>=60*fvar(28)
trigger1 = helper(20000),var(47) = 1
trigger1 = enemynear(var(58)),movecontact = 0 || enemynear(var(58)),movecontact > 1
trigger1 = enemynear(var(58)),animtime = [-12,-11]

trigger2 = time > ceil(30 - 60*fvar(37)) || random <= 10
trigger2 = stateno = 120 && prevstateno = [160,161]
trigger2 = enemynear(var(58)),movecontact>1||(enemynear(var(58)),movecontact>=1&&enemynear(var(58)),stateno =[1000,2000])||enemynear(var(58)),projhit=1||enemynear(var(58)),movecontact=0&&enemynear(var(58)),numhelper
trigger2 = enemynear(var(58)),animtime <= -9

;対空
;弱攻撃
[State -3,d-5]
type = ChangeState
value = 200
triggerall = var(59)>0&&RoundState = 2
triggerall = stateno != 101&&statetype!=A
triggerall = enemynear(var(58)),movetype = A && enemynear(var(58)),statetype = A
triggerall = numhelper(20000)>0 && numhelper(20003)>0
triggerall = (enemynear(var(58)),numproj = 0 && enemynear(var(58)),numhelper <= helper(20000),var(8))
triggerall = fvar(20) = [0,10]
triggerall = var(45) = 0 || enemynear(var(58)),stateno != [5210,5211]
triggerall = p2bodydist x + 4*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x<=20
triggerall = enemynear(var(58)),pos y + 4*fvar(13) + 0.5*16*fvar(38) = [-25,-10]
trigger1 = ctrl
trigger1 = helper(20000),var(57) = -2
trigger1 = enemynear(var(58)),ctrl = 0
trigger1 = !enemynear(var(58)),hitdefattr = SCA,AA,AT,AP
trigger1 = enemynear(var(58)),time > 10
trigger2 = time > ceil(30 - 60*fvar(37)) || random <= 10
trigger2 = stateno = 120 && prevstateno = [160,161]



;空中
;空中強攻撃
[State -1]
type = ChangeState
value = 620
triggerall = RoundState = 2 && var(59)
triggerall = statetype = A
triggerall = enemynear(var(58)),movetype != H && enemynear(var(58)),statetype != L
triggerall = ctrl
triggerall = enemynear(var(58)),stateno < 3000 || var(45) = 0
triggerall = enemynear(var(58)),animtime < -12 && enemynear(var(58)),ctrl = 0
trigger1 = p2dist x = [-80,50]
trigger1 = pos y + 12*vel y + 0.5*144*fvar(39) = [-50,0]
trigger1 = random <= 400 + 600*(vel x = 0) + 300*(enemynear(var(58)),hitdefattr = SC,NT,ST)
trigger1 = enemynear(var(58)),statetype = S || enemynear(var(58)),statetype = C


;______________________________________________________________________
;
;飛び道具後の反撃
;______________________________________________________________________
;弱攻撃
[State -3,d-1]
type = ChangeState
value = 400
triggerall = var(59)>0&&RoundState = 2
triggerall = stateno != 101&&statetype!=A
triggerall = enemynear(var(58)),statetype !=A && enemynear(var(58)),statetype!=L
triggerall = ctrl
triggerall = !enemynear(var(58)),hitdefattr = SCA,AA,AT,AP
triggerall = numhelper(20000)>0
triggerall = p2dist x > 0
triggerall = p2bodydist x < 30
triggerall = enemynear(var(58)),time > 2 || enemynear(var(58)),stateno >= 1000 || !enemynear(var(58)),authorname = "muteki"
triggerall = enemynear(var(58)),animtime < -5
triggerall = enemynear(var(58)),numhelper = helper(20000),var(11) && enemynear(var(58)),numproj = helper(20000),var(12)|| enemynear(var(58)),animtime > -7
triggerall = enemynear(var(58)),name != "Mizuka Nagamori" || enemynear(var(58)),numhelper(1010) = 0
trigger1 = enemynear(var(58)),id = helper(20000),var(13)
trigger1 = enemynear(var(58)),stateno = helper(20000),var(14)
trigger1 = enemynear(var(58)),time > helper(20000),var(15)

trigger2 = enemynear(var(58)),id = helper(20000),var(16)
trigger2 = enemynear(var(58)),stateno = helper(20000),var(17)
trigger2 = enemynear(var(58)),time > helper(20000),var(18)

trigger3 = enemynear(var(58)),id = helper(20000),var(19)
trigger3 = enemynear(var(58)),stateno = helper(20000),var(20)
trigger3 = enemynear(var(58)),time > helper(20000),var(21)

trigger4 = enemynear(var(58)),id = helper(20000),var(22)
trigger4 = enemynear(var(58)),stateno = helper(20000),var(23)
trigger4 = enemynear(var(58)),time > helper(20000),var(24)

trigger5 = enemynear(var(58)),id = helper(20000),var(25)
trigger5 = enemynear(var(58)),stateno = helper(20000),var(26)
trigger5 = enemynear(var(58)),time > helper(20000),var(27)

;しゃがみ中攻撃
[State -1,d-3]
type = ChangeState
value = 410
triggerall = var(59)>0&&RoundState = 2
triggerall = stateno != 101&&statetype!=A
triggerall = enemynear(var(58)),statetype !=A && enemynear(var(58)),statetype!=L
triggerall = ctrl
triggerall = !enemynear(var(58)),hitdefattr = SCA,AA,AT,AP
triggerall = numhelper(20000)>0
triggerall = p2dist x > 0
triggerall = p2bodydist x < 45
triggerall = enemynear(var(58)),time > 2 || enemynear(var(58)),stateno >= 1000 || !enemynear(var(58)),authorname = "muteki"
triggerall = enemynear(var(58)),animtime < -9
triggerall = enemynear(var(58)),numhelper = helper(20000),var(11) && enemynear(var(58)),numproj = helper(20000),var(12)|| enemynear(var(58)),animtime > -11
triggerall = enemynear(var(58)),name != "Mizuka Nagamori" || enemynear(var(58)),numhelper(1010) = 0
trigger1 = enemynear(var(58)),id = helper(20000),var(13)
trigger1 = enemynear(var(58)),stateno = helper(20000),var(14)
trigger1 = enemynear(var(58)),time > helper(20000),var(15)

trigger2 = enemynear(var(58)),id = helper(20000),var(16)
trigger2 = enemynear(var(58)),stateno = helper(20000),var(17)
trigger2 = enemynear(var(58)),time > helper(20000),var(18)

trigger3 = enemynear(var(58)),id = helper(20000),var(19)
trigger3 = enemynear(var(58)),stateno = helper(20000),var(20)
trigger3 = enemynear(var(58)),time > helper(20000),var(21)

trigger4 = enemynear(var(58)),id = helper(20000),var(22)
trigger4 = enemynear(var(58)),stateno = helper(20000),var(23)
trigger4 = enemynear(var(58)),time > helper(20000),var(24)

trigger5 = enemynear(var(58)),id = helper(20000),var(25)
trigger5 = enemynear(var(58)),stateno = helper(20000),var(26)
trigger5 = enemynear(var(58)),time > helper(20000),var(27)

[state -3,d-4];立ち遠中
type=changestate
value = 215
triggerall = var(59)>0&&RoundState = 2
triggerall = stateno != 101&&statetype!=A
triggerall = enemynear(var(58)),statetype !=A && enemynear(var(58)),statetype!=L
triggerall = ctrl
triggerall = !enemynear(var(58)),hitdefattr = SCA,AA,AT,AP
triggerall = numhelper(20000)>0
triggerall = p2dist x > 0
triggerall = p2bodydist x = [50,80]
triggerall = enemynear(var(58)),time > 2 || enemynear(var(58)),stateno >= 1000 || !enemynear(var(58)),authorname = "muteki"
triggerall = enemynear(var(58)),animtime <= -11
triggerall = enemynear(var(58)),numhelper = helper(20000),var(11) && enemynear(var(58)),numproj = helper(20000),var(12) || enemynear(var(58)),animtime > -12 && p2bodydist x > 60
triggerall = enemynear(var(58)),name != "Mizuka Nagamori" || enemynear(var(58)),numhelper(1010) = 0
trigger1 = enemynear(var(58)),id = helper(20000),var(13)
trigger1 = enemynear(var(58)),stateno = helper(20000),var(14)
trigger1 = enemynear(var(58)),time > helper(20000),var(15)

trigger2 = enemynear(var(58)),id = helper(20000),var(16)
trigger2 = enemynear(var(58)),stateno = helper(20000),var(17)
trigger2 = enemynear(var(58)),time > helper(20000),var(18)

trigger3 = enemynear(var(58)),id = helper(20000),var(19)
trigger3 = enemynear(var(58)),stateno = helper(20000),var(20)
trigger3 = enemynear(var(58)),time > helper(20000),var(21)

trigger4 = enemynear(var(58)),id = helper(20000),var(22)
trigger4 = enemynear(var(58)),stateno = helper(20000),var(23)
trigger4 = enemynear(var(58)),time > helper(20000),var(24)

trigger5 = enemynear(var(58)),id = helper(20000),var(25)
trigger5 = enemynear(var(58)),stateno = helper(20000),var(26)
trigger5 = enemynear(var(58)),time > helper(20000),var(27)

;______________________________________________________________________
;
;投げ
;______________________________________________________________________

;投げ
[State -1]
type = ChangeState
value = 800
triggerall = roundstate = 2 && var(59)>0
triggerall = enemynear(var(58)),movetype != H
triggerall = enemynear(var(58)),statetype != L
triggerall = P2bodyDist X <= 10
triggerall = enemynear(var(58)),prevstateno != 5120 || enemynear(var(58)),time>12
triggerall = enemynear(var(58)),stateno != [5000,5900]
triggerall = ctrl && statetype !=A
triggerall = p2dist x > -5
triggerall = prevstateno != 800
trigger1 = random < 100
trigger1 = enemynear(var(58)),statetype!=A
trigger1 = inguarddist || !(enemynear(var(58)),hitdefattr = SC,AA,AT,AP)
trigger1 = enemynear(var(58)),time <= 2
trigger2 = ceil(enemynear(var(58)),pos y + 4*fvar(13) + 0.5*16*fvar(38))=[0,(fvar(13)))
trigger2 = fvar(13) >0
trigger2 = enemynear(var(58)),statetype =A
trigger2 = ceil(p2bodydist x - 4*enemynear(var(58)),vel x) =[-15,7]
trigger3 = inguarddist || !(enemynear(var(58)),hitdefattr = SC,AA,AT,AP)
trigger3 = enemynear(var(58)),statetype != A
trigger3 = prevstateno != [140,155]
trigger3 = random < 100
trigger3 = enemynear(var(58)),stateno < 1000
trigger3 = enemynear(var(58)),time <= 2
trigger4 = prevstateno = 5120
trigger4 = enemynear(var(58)),statetype != A
trigger4 = enemynear(var(58)),movetype = I
trigger4 = !inguarddist


;空中投げ
[State -1]
type = ChangeState
value = 850
triggerall = roundstate = 2 && var(59)>0
triggerall = enemynear(var(58)),statetype  = A
triggerall = enemynear(var(58)),movetype != H 
triggerall = P2bodyDist X <= 10 && p2dist x > 0
triggerall = P2Dist Y = [-20,30]
triggerall = enemynear(var(58)),stateno < 5000; || var(45) = 0
triggerall = pos Y < -30
trigger1 = statetype = A
trigger1 = ctrl


;______________________________________________________________________

;空中コンボ enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
;______________________________________________________________________
;----------------------------
;端、どろり濃厚ピーチ味コンボ
;----------------------------
;ctrl 

;弱往人
[State -1]
type = ChangeState
value = 3230
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = var(1) = 1
triggerall = statetype != A && ctrl
triggerall = var(36) > 0
triggerall = numhelper(4000)
triggerall = helper(4000),facing*(enemynear(var(58)),pos x - helper(4000),pos x) = [20,105]
triggerall = fvar(34) <= 100
trigger1 = numtarget(210)
trigger1 = var(56) > 10
trigger1 = p2bodydist y > -70

;縁
[State -1]
type = ChangeState
value = 3200
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = power >= 1000
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = statetype != A && ctrl
trigger1 = fvar(34) <= 100
trigger1 = var(36) = 0
trigger1 = numhelper(4200)
trigger1 = helper(4200),stateno = 4210 && helper(4200),time < 67 
trigger1 = helper(4200),numtarget || enemynear(var(58)),canrecover = 0 && helper(4200),facing*(enemynear(var(58)),pos x - helper(4200),pos x) = [-20,90]
trigger1 = fvar(1) > 0.55
trigger1 = power < 2880

;強絵日記
[State -1]
type = ChangeState
value = 1002
triggerall = RoundState = 2 && var(59)
triggerall = var(8) = 1 || Var(7) >= 200
triggerall = var(7) >= 0
triggerall = NumHelper(1030)!
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = statetype != A &&ctrl
trigger1 = fvar(34) <= 100
trigger1 = var(36)
trigger1 = numhelper(4200)
trigger1 = helper(4200),stateno = 4210 && helper(4200),time = [110,116]
trigger1 = helper(4200),numtarget

;弱攻撃4F
[State -1,立ち弱]
type = ChangeState
value = 200
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = statetype != A 
triggerall = ctrl || stateno = 52
triggerall = enemynear(var(58)),canrecover = 0 ;var(56) >= 4
triggerall = p2dist x > -5
triggerall = fvar(34) <= 100
trigger1 = enemynear(var(58)),pos y + 4*fvar(13) + 0.5*16*fvar(38) = [-10,20]
trigger1 = var(36)
trigger1 = enemynear(var(58)),vel y > 5 && enemynear(var(58)),vel x = 0 && var(56) > 100

trigger2 = numhelper(4200)
trigger2 = helper(4200),stateno = 4210 && helper(4200),time >= 125 ||helper(4200),stateno = 4211
trigger2 = var(56) <= 5 || enemynear(var(58)),pos y + 4*fvar(13) + 0.5*20*fvar(38) = [-15,20]
trigger2 = !numhelper(1030)

trigger3 = numhelper(4200)
trigger3 = helper(4200),stateno = 4210 && helper(4200),time >= 125 ||helper(4200),stateno = 4211
trigger3 = var(56) <= 5 || enemynear(var(58)),pos y + 4*fvar(13) + 0.5*16*fvar(38) = [-20,20]
trigger3 = !numhelper(1030)
trigger3 = !var(36)

trigger4 = numhelper(4200)
trigger4 = helper(4200),stateno = 4210 || helper(4200),stateno = 4211
trigger4 = fvar(1) < 0.55 && !var(36)

;中攻撃6F
[State -1,立ち中]
type = ChangeState
value = 210
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = p2bodydist X < 50
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,20]
triggerall = statetype != A && ctrl
triggerall = var(56) >= 6
trigger1 = fvar(34) <= 100
trigger1 = var(36)
trigger1 = fvar(1) > 0.50
trigger1 = numhelper(4200)
trigger1 = helper(4200),stateno = 4210 && helper(4200),time = [50,60]
trigger1 = helper(4200),numtarget
trigger1 = var(8) || var(7) >= 200

trigger2 = enemynear(var(58)),pos y + 6*fvar(13) + 0.5*36*fvar(38) = [-30,10]
trigger2 = fvar(34) <= 100
trigger2 = var(36)
trigger2 = numtarget(220) || vel y > 0 && enemynear(var(58)),vel x = 0 && var(56) > 100

trigger3 = numhelper(4200)
trigger3 = helper(4200),stateno = 4210 
trigger3 = helper(4200),time = [70,100]
trigger3 = helper(4200),numtarget
trigger3 = !var(36)
trigger3 = power > 2880

;強攻撃12F
[State -1]
type = ChangeState
value = 220
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = p2bodydist X < 50
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,20]
triggerall = statetype != A && ctrl
triggerall = fvar(34) <= 100
trigger1 = numhelper(4200)
trigger1 = helper(4200),stateno = 4210 
trigger1 = helper(4200),time < 60 || helper(4200),time > 100
trigger1 = helper(4200),numtarget
trigger1 = !var(36)
trigger1 = power > 2880

trigger2 = numhelper(4200)
trigger2 = helper(4200),stateno = 4210 
trigger2 = helper(4200),time < 60
trigger2 = helper(4200),numtarget
trigger2 = !var(8) && var(7) < 200
trigger2 = !var(36) || power < 1000

;---------
;ctrl = 0

;インスタントチャージ
[State -1,地IC]
type = ChangeState
value = 900
triggerall = RoundState = 2
triggerall = var(8) || var(7) > 200
triggerall = var(7) >= 0
triggerall = var(59) > 0
triggerall = statetype != A 
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = var(8) && var(7) > 200
triggerall = fvar(34) < 100
trigger1 = var(36)
trigger1 = stateno = 220 || stateno = 210 && fvar(1) = [0.50,0.64]
trigger1 = movehit
trigger1 = !numhelper(4200)
trigger2 = var(36)
trigger2 = stateno = 220 && movehit
trigger2 = numhelper(4200)
trigger2 = helper(4200),stateno = 4211 && helper(4200),animtime > -10 && helper(4200),numtarget

trigger3 = !var(36)
trigger3 = stateno = 220 && movehit
trigger3 = numhelper(4200)
trigger3 = helper(4200),stateno = 4210 && helper(4200),time < 75 && helper(4200),numtarget
trigger3 = power > 2880

;強がおがおファイアー
[State -1]
type = ChangeState
value = 3002
triggerall = Power >= 3000
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = statetype != A
triggerall = palno = [1,6]
triggerall = numhelper(4000)
trigger1 = stateno = 220 && movehit = 1
trigger1 = numhelper(4200)
trigger1 = helper(4200),stateno = 4211 || helper(4200),stateno = 4210 && helper(4200),animtime > -11 
trigger1 = helper(4200),numtarget

;強攻撃12F
[State -1]
type = ChangeState
value = 220
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = p2bodydist X < 50
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,20]
triggerall = statetype != A
triggerall = var(56) >= 12
triggerall = stateno = 210 && movehit
triggerall = fvar(34) <= 130
triggerall = var(36)
trigger1 = fvar(1) > 0.60
trigger1 = numhelper(4200)
trigger1 = helper(4200),stateno = 4210 && helper(4200),time < 100 && helper(4200),numtarget
trigger1 = var(8) || var(7) >= 200
trigger2 = numhelper(4200)
trigger2 = helper(4200),stateno = 4211 && helper(4200),animtime > -21 && helper(4200),numtarget
trigger2 = p2bodydist y + 12*fvar(13) + 0.5*144*fvar(38) > -15 || var(56) <= 13 || helper(4200),animtime = 0
trigger3 = !numhelper(4200)
trigger3 = p2bodydist y + 12*fvar(13) + 0.5*144*fvar(38) > -33 || var(56) <= 13
trigger3 = fvar(1) > 0.64
trigger4 = fvar(1) > 0.80
;強攻撃12F
[State -1]
type = ChangeState
value = 220
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = statetype != A
triggerall = var(56) >= 12
triggerall = stateno = 210 && movehit
triggerall = fvar(34) <= 130
trigger1 = numhelper(4200)
trigger1 = helper(4200),stateno = 4210 
trigger1 = helper(4200),time > 80
trigger1 = helper(4200),numtarget
trigger1 = !var(36)
trigger1 = power > 2880

;弱往人
[State -1]
type = ChangeState
value = 3230
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = var(1) = 1
triggerall = var(36) > 0
triggerall = numhelper(4000)
triggerall = helper(4000),facing*(enemynear(var(58)),pos x - helper(4000),pos x) = [20,105]
triggerall = fvar(34) <= 130
trigger1 = stateno = 420 && movehit
trigger1 = var(36) >= 2 || var(8) || var(7) >= 200
trigger2 = stateno = 210 || stateno = 220
trigger2 = movehit
trigger2 = fvar(1) > 0.40

;強往人
[State -1]
type = ChangeState
value = 3232
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = var(1) = 1
triggerall = var(36) > 0
triggerall = numhelper(4000)
triggerall = helper(4000),facing*(enemynear(var(58)),pos x - helper(4000),pos x) = [20,105]
triggerall = fvar(34) <= 100
trigger1 = stateno = 210 || stateno = 220
trigger1 = movehit
trigger1 = fvar(1) <= 0.40

;強絵日記
[State -1]
type = ChangeState
value = 1002
triggerall = RoundState = 2 && var(59)
triggerall = var(8) = 1 || Var(7) >= 200
triggerall = var(7) >= 0
triggerall = NumHelper(1030)!
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = statetype != A &&ctrl
trigger1 = fvar(34) <= 100
trigger1 = var(36)
trigger1 = numhelper(4200)
trigger1 = helper(4200),stateno = 4210 && helper(4200),time = [90,116]
trigger1 = helper(4200),numtarget

;中攻撃6F
[State -1,立ち中]
type = ChangeState
value = 210
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = p2bodydist X < 50
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = stateno = 200 && movehit
triggerall = var(56) >= 6
triggerall = fvar(34) < 100
triggerall = var(36)
trigger1 = numhelper(4200)
trigger1 = helper(4200),stateno = 4211 &&  helper(4200),animtime > -32
trigger2 = !numhelper(4200)

;弱攻撃4F
[State -1,立ち弱]
type = ChangeState
value = 200
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,20]
triggerall = statetype != A 
triggerall = var(56) >= 4
triggerall = p2dist x > -5
triggerall = stateno = 200 && movehit
trigger1 = var(36)
trigger1 = fvar(34) <= 100
trigger1 = var(56) <= 5 || p2bodydist y + 4*fvar(13) + 0.5*16*fvar(38) > -5 && fvar(13) + 4*fvar(38) > 2

trigger2 = numhelper(4200)
trigger2 = helper(4200),stateno = 4210 || helper(4200),stateno = 4211
trigger2 = fvar(1) < 0.55
trigger2 = !var(36)

;---------------------------------------------------------------------
;statetype != A
;---------------------------------------------------------------------
;目押しctrl
;鳥ノ詠
[State -1]
type = ChangeState
value = 3700
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = statetype != A && ctrl
triggerall = Power >= 3000
triggerall = life <= 333
triggerall = palno = [7,12]
trigger1 = !var(8)
trigger1 = fvar(34) <= 140
trigger1 = numtarget(2000)
;trigger1 = p2bodydist y + 6*fvar(13) + 18*fvar(38) = [-40,0]

;弱天津鷹ノ弓
[State -1]
type = ChangeState
value = 2200
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = statetype != A && ctrl
triggerall = palno >= 7
trigger1 = fvar(34) <= 140
trigger1 = enemynear(var(58)),stateno = 9010 && enemynear(var(58)),time = 30
trigger1 = fvar(1) >= 0.75
trigger1 = p2bodydist y > -60

[State -1]
type = ChangeState
value = 3600
triggerall = Power >= 3000
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = statetype != A && ctrl
triggerall = palno >= 7
trigger1 = fvar(34) > 140
trigger1 = enemynear(var(58)),stateno = 9010
trigger1 = numhelper(2210)
trigger1 = helper(2210),stateno = 2210
trigger1 = var(56) > 35
trigger2 = numhelper(2225) + numhelper(2226) + numhelper(2227) + numhelper(2228) + numhelper(2229)
trigger2 = enemynear(var(58)),stateno = 9010

;ジャンプ
[State -1,ジャンプ]
type = ChangeState
value = 41
triggerall = statetype != A
triggerall = var(59) > 0 && roundstate = 2
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = ctrl
trigger1 = enemynear(var(58)),stateno != 5656
trigger1 = numtarget || enemynear(var(58)),stateno = [9010,9016]
trigger1 = enemynear(var(58)),stateno != 9010 && enemynear(var(58)),prevstateno != 9010 || palno <= 6 || var(56) <= 15 || fvar(1) < 0.75 && var(56) <= 23
trigger1 = fvar(34) <= 140
trigger1 = var(56) >= 12
trigger1 = enemynear(var(58)),pos y + 12*fvar(13) + 0.5*144*fvar(38) < -45
trigger1 = !numtarget(220) && !numtarget(420)
trigger1 = !(fvar(12) = [-0.01,0.01])
trigger2 = numhelper(1010)
trigger2 = helper(1010),numtarget(1000)
trigger2 = p2bodydist x = [30,80]
trigger2 = fvar(13) + 15*fvar(38) > 0
trigger3 = numhelper(1020)
trigger3 = helper(1020),movehit && helper(1020),numtarget(1000)
trigger3 = p2bodydist x = [30,80]
trigger3 = fvar(13) + 15*fvar(38) > 0
trigger4 = enemynear(var(58)),stateno = 9011
trigger4 = enemynear(var(58)),time >= 15
trigger4 = p2bodydist x = [10,60 + 15*(fvar(34) <= 100)]
trigger5 = fvar(34) > 100
trigger5 = var(56) >= 11
trigger5 = enemynear(var(58)),pos y + 11*fvar(13) + 0.5*121*fvar(38) = [-70,-45]
trigger5 = p2bodydist x + 8*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x <= 40
trigger5 = enemynear(var(58)),stateno != 5656
trigger5 = !numtarget(420)
trigger6 = numhelper(4200)
trigger6 = helper(4200),stateno = 4230
trigger6 = helper(4200),numtarget
trigger6 = enemynear(var(58)),pos y > -90
trigger6 = p2bodydist x <= 80

;ジャンプ
[state -1,jumpneu]
type = changestate
value = 42
triggerall = statetype != A
triggerall = var(59) > 0 && roundstate = 2
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = ctrl
trigger1 = numhelper(1010)
trigger1 = helper(1010),numtarget(1000)
trigger1 = p2bodydist x <= 30
trigger1 = fvar(13) + 10*fvar(38) > 0
trigger2 = numhelper(1020)
trigger2 = helper(1020),movehit>=1 && helper(1020),numtarget(1000)
trigger2 = p2bodydist x <= 30
trigger2 = fvar(13) + 10*fvar(38) > 0
trigger3 = enemynear(var(58)),stateno = 9011
trigger3 = enemynear(var(58)),time >= 15
trigger3 = p2bodydist x = [0,10]

;ダッシュ
[State -1]
type = ChangeState
value = 100
triggerall = RoundState = 2 
triggerall = ctrl && statetype != A
triggerall = var(59) > 0
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(34) > 100 || p2bodydist x > 30
triggerall = var(52) = 0
trigger1 = enemynear(var(58)),stateno = 9011 
trigger1 = p2bodydist x - 6*(20 - enemynear(var(58)),time) < 30 && p2bodydist y >-30

;弱攻撃4F
[State -1,立ち弱]
type = ChangeState
value = 200
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,20]
triggerall = statetype != A 
triggerall = ctrl || stateno = 52
triggerall = var(56) >= 4 || var(56) <= 5 && enemynear(var(58)),canrecover = 0
triggerall = p2dist x > -5
triggerall = !numtarget(220) || power < 3000 || var(8)
triggerall = numhelper(4000)
triggerall = helper(4000),stateno != [4120,4121]
trigger1 = !numhelper(4200) || fvar(1) < 0.32
trigger1 = fvar(34) <= 90
trigger1 = var(56) < 6 || (enemynear(var(58)),pos y + 4*fvar(13) + 0.5*16*fvar(38) > -28 && fvar(13) + 4*fvar(38)>=0)
trigger1 = fvar(1) < 0.75 || enemynear(var(58)),pos y + 4*fvar(13) + 0.5*16*fvar(38) > -18 || var(56) <= 5 && enemynear(var(58)),canrecover = 0
trigger2 = fvar(34) >90
trigger2 = !numhelper(4200)
trigger2 = var(56) < 6 || (enemynear(var(58)),pos y + 4*fvar(13) + 0.5*16*fvar(38) > -28 && fvar(13) + 4*fvar(38)>=0)
trigger2 = p2bodydist x + enemynear(var(58)),facing*facing*enemynear(var(58)),vel x <= 35 || frontedgebodydist <= 90

;弱攻撃4F(タッグ用)
[State -1,立ち弱]
type = ChangeState
value = 200
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,20]
triggerall = statetype != A && ctrl
triggerall = numpartner
triggerall = p2dist x > -5
triggerall = !numtarget(220) || power < 3000 || var(8)
trigger1 = fvar(34) <= 90
trigger1 = (var(56) =[4,6]) || (enemynear(var(58)),pos y + 4*fvar(13) + 0.5*16*fvar(38) > -28 && fvar(13) + 4*fvar(38)>=0)
trigger1 = fvar(1) < 0.75 || enemynear(var(58)),pos y + 4*fvar(13) + 0.5*16*fvar(38) > -15
trigger2 = fvar(34) > 90
trigger2 = (var(56) =[4,6]) || (enemynear(var(58)),pos y + 4*fvar(13) + 0.5*16*fvar(38) > -28 && fvar(13) + 4*fvar(38)>=0)
trigger2 = p2bodydist x + enemynear(var(58)),facing*facing*enemynear(var(58)),vel x <= 28 || frontedgebodydist <= 90

;中攻撃6F
[State -1,立ち中]
type = null;ChangeState
value = 210
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = p2bodydist X < 50
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,20]
triggerall = statetype != A && ctrl
triggerall = var(56) >= 6
triggerall = !numtarget(220) || power < 3000 || var(8)
trigger1 = fvar(34) <= 100
trigger1 = fvar(13) + 4*fvar(38)>=0&&enemynear(var(58)),pos y + 6*fvar(13) + 0.5*36*fvar(38) = [-28,-15]
trigger1 = fvar(13) + 6*fvar(38)>0 || var(56) <= 8
trigger1 = !numhelper(4200) || fvar(1) < 0.32 || !var(36)

;中攻撃9F
[State -1,立ち中]
type = ChangeState
value = 215
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = p2bodydist X > 50
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,20]
triggerall = statetype != A && ctrl
triggerall = var(56) >= 9
trigger1 = fvar(34) > 100
trigger1 = var(56) < 11 || enemynear(var(58)),pos y + 9*fvar(13) + 0.5*81*fvar(38) > -28
trigger1 = p2bodydist x + 9*enemynear(var(58)),facing*facing*enemynear(var(58)),vel x = [25,80]
trigger2 = numtarget(220)
trigger2 = !var(36)
trigger2 = numhelper(4000)
trigger2 = helper(4000),stateno = [4120,4121]
trigger2 = var(56) < 12

;強攻撃12F
[State -1,強]
type = ChangeState
value = 220
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = statetype != A && ctrl
triggerall = var(56) >= 12
trigger1 = fvar(34) > 100
trigger1 = var(56) < 13 || enemynear(var(58)),pos y + 12*fvar(13) + 0.5*144*fvar(38) > -23
trigger1 = p2bodydist x + 12*enemynear(var(58)),facing*facing*enemynear(var(58)),vel x = [25,110]
trigger1 = p2bodydist x + 7*(enemynear(var(58)),facing*facing*enemynear(var(58)),vel x - 2.4) > 20
trigger1 = enemynear(var(58)),stateno != 5656 || palno <=6
trigger1 = enemynear(var(58)),hitpausetime < 5
trigger1 = (enemynear(var(58)),stateno = 9011 && p2bodydist x - 6*(20 - enemynear(var(58)),time) < 20 && p2bodydist y >-30) = 0
trigger2 = numtarget(220)
trigger2 = !var(36)
trigger2 = numhelper(4000)
trigger2 = helper(4000),stateno = [4120,4121]


;弱天津鷹ノ弓
[State -1]
type = ChangeState
value = 2200
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,1]
triggerall = statetype != A
triggerall = palno = [7,12]
triggerall = ctrl
trigger1 = p2bodydist x + 21*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x*(enemynear(var(58)),backedgebodydist>0)> 80
trigger1 = var(56)>21 && enemynear(var(58)),pos y + 21*fvar(13) + 0.5*441*fvar(38) = [-100,-5]
trigger2 = enemynear(var(58)),stateno = 5656 || enemynear(var(58)),stateno = [9010,9011]
trigger2 = enemynear(var(58)),pos y + 23*fvar(13) = [-60,-20]
trigger2 = p2bodydist x + 21*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x*(enemynear(var(58)),backedgebodydist>0)> 80
trigger3 = p2bodydist x > 40 
trigger3 = enemynear(var(58)),pos y + var(56)*fvar(13) + 0.5*var(56)*var(56)*fvar(38) < -30
trigger3 = numtarget = 0
trigger3 = random<150

;-------------------
;目押しじゃない

;インスタントチャージ
[State -1,地IC]
type = ChangeState
value = 900
triggerall = RoundState = 2
triggerall = var(8) || var(7) > 200
triggerall = var(7) >= 0
triggerall = var(59) > 0
triggerall = statetype != A 
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
trigger1 = stateno = 420
trigger1 = movehit = 1 
trigger1 = fvar(34) > 100
trigger1 = p2bodydist x < 42
trigger1 = fvar(1) > 0.78
trigger1 = random < 500
trigger1 = var(7) < 300 || enemynear(var(58)),life*enemynear(var(58)),const(data.defence)*0.01 < 150*const(data.attack)*0.01
trigger1 = var(8) = 0 && Var(7) >= 200 || var(8) && var(7) < 100
trigger2 = stateno = 1402
trigger2 = animelemtime(7) >= 0 && animelemtime(9)<0 
trigger2 = numtarget(220)
trigger2 = power >= 3000
trigger3 = stateno = 2000 && movehit = 1
trigger3 = var(8)
trigger3 = fvar(34) <= 140

;強がおがおファイアー
[State -1]
type = ChangeState
value = 3002
triggerall = Power >= 3000
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = statetype != A
triggerall = palno = [1,6]
triggerall = p2bodydist x <= 80 || fvar(34) <= 100
triggerall = stateno = 420 && movehit = 1
trigger1 = random <= 450 || enemynear(var(58)),life*enemynear(var(58)),const(data.defence)*0.01/((fvar(0) + 0.00000001)*const(data.attack)*0.01) = [200,500]
trigger1 = fvar(1) > 0.70 && enemynear(var(58)),life*enemynear(var(58)),const(data.defence)*0.01/((fvar(5) + 0.00000001)*const(data.attack)*0.01) > 150 
trigger2 = teammode = single
trigger2 = roundno = 3
trigger3 = teammode = turns
trigger3 = roundsexisted >= 1

;強がおがおファイアー
[State -1]
type = ChangeState
value = 3002
triggerall = Power >= 3000
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = statetype != A
triggerall = palno = [1,6]
triggerall = numhelper(4000)
trigger1 = helper(4000),stateno = 4121
trigger1 = stateno = 220 && movehit = 1

;弱天津鷹ノ弓
[State -1]
type = ChangeState
value = 2200
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = statetype != A
triggerall = palno >= 7
trigger1 = var(56)>21 && enemynear(var(58)),pos y + 21*fvar(13) + 0.5*441*fvar(38) = [-50,-5]
trigger1 = (stateno = [200,220]) && fvar(34) <= 140 || stateno = 420
trigger1 = movehit = 1

;(青コン用)弱草薙シ光ノ刃
[State -1]
type = ChangeState
value = 2000
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,1]
triggerall = statetype != A
triggerall = palno = [7,12]
triggerall = var(56) > 11 && enemynear(var(58)),pos y + 11*fvar(13) + 0.5*121*fvar(38) < 0
trigger1 = stateno = 200
trigger1 = movehit
trigger1 = fvar(34) <= 140
trigger1 = var(8) && var(7) > 100

;ジャンプ
[State -1,ジャンプ]
type = ChangeState
value = 41
triggerall = statetype != A
triggerall = var(59) > 0 && roundstate = 2
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = !numhelper(4200) || !var(36) || fvar(34) > 100 || fvar(1) < 0.35
trigger1 = stateno = 200
trigger1 = movehit
trigger1 = fvar(34) > 100
trigger1 = enemynear(var(58)),backedgebodydist< 5 || fvar(1) > 0.717
trigger1 = p2bodydist y + 12*fvar(13) + 0.5*144*fvar(38) <= -40 || fvar(13) < -3.0 && enemynear(var(58)),pos y < -25

trigger2 = stateno = 200
trigger2 = movehit = 1
trigger2 = fvar(34) > 100
trigger2 = fvar(1) = [0.60,0.717]
trigger2 = fvar(13) < -3 || p2bodydist y < -30

trigger3 = stateno = 210
trigger3 = movehit
trigger3 = fvar(34) <= 100
trigger3 = !numhelper(4200) || power < 2880

;弱攻撃4F
[State -1,立ち弱]
type = ChangeState
value = 200
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = p2bodydist X < 30 || (fvar(34) <= 100 && frontedgebodydist < 70)
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,20]
triggerall = statetype != A
triggerall = var(56) >= 4
triggerall = stateno = 200 || stateno = 400 
triggerall = movehit > 1
triggerall = !numhelper(4200) || !var(36) || fvar(34) > 100 || fvar(1) < 0.35
trigger1 = fvar(34) <= 100
trigger1 = var(56) <= 5 || ceil(enemynear(var(58)),pos y + 6*fvar(13) + 0.5*36*fvar(38)) > -18 &&!(enemynear(var(58)),pos y + 6*fvar(13) + 0.5*36*fvar(38)<-18&&fvar(13)+6*fvar(38)<0)
trigger1 = fvar(13) + 4 * fvar(38) > -1.5
trigger2 = fvar(34) > 100
trigger2 = (enemynear(var(58)),backedgebodydist > 5 && fvar(1) > 0.75) || p2bodydist y <= -17 || fvar(13) >= -3
trigger2 = p2bodydist x + 4*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x<= 28

;中攻撃6F
[State -1,立ち中]
type = ChangeState
value = 210
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = p2bodydist X < 50
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = statetype != A
triggerall = var(56) >= 6
triggerall = stateno = 200
triggerall = movehit > 1 || movehit && p2bodydist y <= -20 || fvar(1) < 0.50
triggerall = !numhelper(4200) || !var(36) || fvar(34) > 100 || fvar(1) < 0.35
trigger1 = fvar(34) <= 100
trigger1 = var(56) <= 7 || ceil(enemynear(var(58)),pos y + 6*fvar(13) + 0.5*36*fvar(38)) < -18 && fvar(13) + 6 * fvar(38) < 0|| var(36)
trigger2 = fvar(34) > 100
trigger2 = fvar(1) < 0.73
trigger2 = p2bodydist x + 7*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x <= 20

;中攻撃9F
[State -1,立ち遠中]
type = ChangeState
value = 215
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = p2bodydist X >= 50
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,20]
triggerall = statetype != A
triggerall = var(56) >= 10
trigger1 = stateno = 200 && movehit
trigger1 = fvar(34) > 100
trigger1 = (enemynear(var(58)),backedgebodydist > 5 && fvar(1) > 0.75) || p2bodydist y <= -20 || fvar(1) < 0.60 && p2bodydist x >= 50 

;強攻撃12F
[State -1]
type = ChangeState
value = 220
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,20]
triggerall = statetype != A
triggerall = var(56) >= 10
trigger1 = stateno = 210 && fvar(34) > 100 || stateno = 215
trigger1 = movehit = 1 
trigger2 = stateno = 200 && movehit>1
trigger2 = fvar(34) > 100
trigger2 = (enemynear(var(58)),backedgebodydist > 5 && fvar(1) > 0.75) || p2bodydist y = [-20,-10]

;強攻撃12F
[State -1]
type = ChangeState
value = 420
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = p2bodydist X < 50
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,20]
triggerall = statetype != A
triggerall = var(56) >= 10
trigger1 = stateno = 410 && movehit

;弱天津鷹ノ弓
[State -1]
type = ChangeState
value = 2200
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = statetype != A
triggerall = palno = [7,12]
trigger1 = var(56)>21
trigger1 = stateno = 420
trigger1 = movehit = 1
trigger2 = stateno = 220 && movehit
trigger2 = var(56) < 9 || enemynear(var(58)),pos y > -20 && fvar(34) > 100

;弱草薙シ光ノ刃
[State -1]
type = ChangeState
value = 2000
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,1]
triggerall = statetype != A
triggerall = palno = [7,12]
triggerall = var(56)>11 && enemynear(var(58)),pos y + 11*fvar(13) + 0.5*121*fvar(38)< 0
trigger1 = stateno = 420 || stateno = 220
trigger1 = movehit

;強草薙シ光ノ刃
[State -1]
type = ChangeState
value = 2001
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = var(8) = 1 || Var(7) >= 200
triggerall = var(7) >= 0
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,1]
triggerall = statetype != A
triggerall = palno = [7,12]
triggerall = var(56)>9 && enemynear(var(58)),pos y + 9*fvar(13) + 0.5*81*fvar(38)< 0
trigger1 = stateno = 420 || stateno = 220
trigger1 = movehit

;弱翼13F
[State -1,弱翼]
type = ChangeState
value = 1100
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,1]
triggerall = statetype != A
triggerall = palno <= 6 || random <= 50
triggerall = enemynear(var(58)),statetype != L
trigger1 = stateno = 420
trigger1 = movehit = 1
trigger1 = enemynear(var(58)),life*enemynear(var(58)),const(data.defence)*0.01 < 65 * fvar(0)*const(data.attack)*0.01

;強そらアタック
[State -1]
type = ChangeState
value = 1402
triggerall = RoundState = 2 && var(59)
triggerall = var(1) = 1
triggerall = var(8) = 1 || Var(7) >= 200
triggerall = var(7) >= 0
triggerall = var(36) = 0
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = statetype != A
triggerall = palno <= 6 
triggerall = enemynear(var(58)),statetype != L
trigger1 = enemynear(var(58)),backedgebodydist < 5 ||  fvar(34) < 150
trigger1 = var(8) = 1 && var(7) > 100
trigger1 = power >= 3000
trigger1 = stateno = 220 && movehit = 1
trigger1 = var(56) >= 24

;縁
[State -1]
type = ChangeState
value = 3200
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = power >= 1000
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = random < 100*(3-var(36))
triggerall = palno <= 6 || random <= 50
trigger1 = stateno= 220 || stateno = 420
trigger1 = movehit = 1
trigger1 = (var(8) = 0 && var(7) < 200) || (fvar(34) > 100 && frontedgebodydist >70) 
trigger1 = var(36) < 3
trigger1 = (var(36) > 0 && life <= 333) = 0
trigger1 = teammode = single || teammode = turns && life > 250 || teammode = simul


;弱絵日記
[State -1]
type = ChangeState
value = 1000
triggerall = NumHelper(1010)!
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = numhelper(20000)
triggerall = helper(20000),var(7) <= 30*(helper(20000),var(6))**2 || (numhelper(1210) && numhelper(1220))
triggerall = random < 250
triggerall = palno <= 6 || random <= 50
trigger1 = stateno= 220 || stateno = 420 
trigger1 =  movehit = 1
trigger1 = (var(8) = 0 && var(7) < 200) || (fvar(34) > 100 && frontedgebodydist >70) 

;中絵日記
[State -1]
type = ChangeState
value = 1001
triggerall = NumHelper(1020)!
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = numhelper(20000)
triggerall = helper(20000),var(7) <= 30*(helper(20000),var(6))**2 || (numhelper(1210) && numhelper(1220))
triggerall = random < 250
triggerall = palno <= 6 || random <= 50
trigger1 = stateno= 220 || (stateno = 420 && enemynear(var(58)),life*enemynear(var(58)),const(data.defence)>7000*const(data.attack)*0.01) 
trigger1 =  movehit = 1
trigger1 = (var(8) = 0 && var(7) < 200) || (fvar(34) > 100 && frontedgebodydist >70)


;弱どろり濃厚
[State -1]
type = ChangeState
value = 1200
triggerall = NumHelper(1210)!
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = numhelper(20000)
triggerall = helper(20000),var(7) > 30*(helper(20000),var(6))**2 || (numhelper(1020) && numhelper(1010))
triggerall = random < 250
triggerall = palno <= 6 || random <= 50
trigger1 = stateno= 220 || (stateno = 420 && enemynear(var(58)),life*enemynear(var(58)),const(data.defence)>7000*const(data.attack)*0.01)
trigger1 =  movehit = 1
trigger1 = (var(8) = 0 && var(7) < 200) || (fvar(34) > 100 && frontedgebodydist >70)

;中どろり濃厚
[State -1]
type = ChangeState
value = 1201
triggerall = NumHelper(1220)!
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = numhelper(20000)
triggerall = helper(20000),var(7) > 30*(helper(20000),var(6))**2 || (numhelper(1020) && numhelper(1010))
triggerall = random < 250
triggerall = palno <= 6 || random <= 50
trigger1 = stateno= 220 || (stateno = 420 && enemynear(var(58)),life*enemynear(var(58)),const(data.defence)>7000*const(data.attack)*0.01)
trigger1 =  movehit = 1
trigger1 = (var(8) = 0 && var(7) < 200) || (fvar(34) > 100 && frontedgebodydist >70)


;中不幸の塊
[State -1]
type = ChangeState
value = 1305
triggerall = RoundState = 2 && var(59)
triggerall = numhelper(1352) = 0&& numhelper(1353) = 0
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = palno <= 6 || random <= 50 || var(56) <= 17
trigger1 = stateno= 220 
trigger1 =  movehit = 1
trigger1 = (var(8) = 0 && var(7) < 200) || (fvar(34) > 100 && frontedgebodydist >70)


;弱翼13F
[State -1,弱翼]
type = ChangeState
value = 1100
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,1]
triggerall = statetype != A
triggerall = palno <= 6 || random <= 50
triggerall = enemynear(var(58)),statetype != L
trigger1 = stateno = 420
trigger1 = movehit = [3,4]



;-----------------------------------------------------------------------
;statetype = A
;-----------------------------------------------------------------------
;目押し

;palno >= 7

;吹キ荒ブ天ノ此花
[State -1]
type = ChangeState
value = 3601
triggerall = RoundState = 2
triggerall = Power >= 3000
triggerall = palno = [7,12]
triggerall = var(59) > 0
triggerall = statetype = A && ctrl
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
trigger1 = numtarget(2107)
trigger1 = target(2107),alive
trigger1 = pos y < -180 && target(2107),pos y < -180
trigger1 = target(2107),vel y > -6.5


;共通

;空中弱攻撃5F
[State -1,空弱];画面端
type = ChangeState
value = 600
triggerall = RoundState = 2
triggerall = statetype = A
triggerall = var(59) > 0
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = p2dist x > -10
triggerall = ctrl = 1
triggerall = pos y + 5*vel y + 0.5*25*fvar(39) < 10
triggerall = fvar(34) <= 100
triggerall = p2bodydist x - 5*vel x*(frontedgebodydist > 70) < 25
triggerall = var(56)>0
triggerall = (fvar(1) < 0.55 && var(45) && var(2)) = 0
trigger1 = var(56) = [1,6]

trigger2 = pos y + 24*vel y + 0.5*576*fvar(39) > -10 || vel y < 0 && vel y + fvar(39) >= -0.6
trigger2 = var(46)!=0||var(47)!=0
trigger2 = !numtarget(1101)

trigger3 = ceil(enemynear(var(58)),pos y + 5*fvar(13) + 0.5*25*fvar(38) - (pos y + 5*vel y + 0.5*25*fvar(39))) = [30,45]
trigger3 = fvar(1) < 0.685 || var(46) != 0 || var(47) != 0 || vel y > -1||ceil(enemynear(var(58)),pos y + 9*fvar(13) + 0.5*81*fvar(38)) > -12

trigger4 = stateno = 111 || stateno = 116
trigger4 = pos y + 20*vel y + 0.5*400*fvar(39) >= 10


;空中中攻撃9F
[State -1,空中];画面端
type = ChangeState
value = 610
triggerall = RoundState = 2
triggerall = statetype = A
triggerall = var(59) > 0
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = ctrl = 1
triggerall = var(56) >= 9
triggerall = pos y + 9*vel y + 0.5*81*fvar(39) < 10
triggerall = fvar(34) <= 100
triggerall = p2dist x > -25
triggerall = numhelper(20000)
triggerall = !numhelper(4200)
trigger1 = p2bodydist y = [-10,45]
trigger1 = fvar(1) >= 0.65
trigger1 = vel y > -3.7 || numtarget(1101)
trigger1 = numtarget>0 || enemynear(var(58)),stateno = [9010,9016]
trigger2 = stateno = 111
trigger2 = pos y + 20*vel y + 0.5*400*fvar(39) < 20
trigger2 = enemynear(var(58)),pos y + 9*fvar(13) + 0.5*81*fvar(38) < -20
trigger3 = numtarget(210)
trigger3 = ceil(p2bodydist y + 9*fvar(13) + 0.5*81*fvar(38) - (9*vel y + 0.5*81*fvar(39))) = [30,60]
trigger3 = fvar(1) > 0.73 && enemynear(var(58)),pos y + 9*fvar(13) + 0.5*81*fvar(38) < -35

;絵日記
trigger4 = numtarget = 0
trigger4 = enemynear(var(58)),stateno != [9010,9016]
trigger4 = stateno != 111
trigger4 = enemynear(var(58)),vel x = [-0.01,0.01]
trigger4 = enemynear(var(58)),pos y + 9*fvar(13) + 0.5*81*fvar(38) - (pos y + 9*vel y + 0.5*81*fvar(39)) = [20,60]
;弓
trigger5 = enemynear(var(58)),prevstateno = [9010,9011]
trigger5 = stateno != 111
trigger5 = enemynear(var(58)),pos y + 9*fvar(13) + 0.5*81*fvar(38) - (pos y + 9*vel y + 0.5*81*fvar(39)) = [20,60]
;
trigger6 = fvar(1) >= 0.685
trigger6 = !numtarget(1101)
trigger6 = var(46) = 0 && var(47) = 0
trigger6 = ceil(p2bodydist y + 9*fvar(13) + 0.5*81*fvar(38) - (9*vel y + 0.5*81*fvar(39))) = [-15,45]

;空中強攻撃10F
[State -1,空強];画面端
type = ChangeState
value = 620
triggerall = RoundState = 2
triggerall = statetype = A
triggerall = var(59) > 0
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = ctrl = 1
triggerall = var(56) >= 10
triggerall = pos y + 10*vel y + 0.5*100*fvar(39) <10
triggerall = fvar(34) <= 100
triggerall = p2dist x > -50 || enemynear(var(58)),p2bodydist x < 70 && enemynear(var(58)),p2dist x > -50
trigger1 = p2bodydist y = [-30,50]
trigger1 = fvar(1) >= 0.65
trigger1 = numtarget(1101) && vel y + 10*fvar(39) >= 2.5
trigger2 = fvar(1) >= 0.685
trigger2 = !numtarget(1101)
trigger2 = !(enemynear(var(58)),vel x = [-0.5,0.5])
trigger2 = var(46) = 0 && var(47) = 0
trigger2 = enemynear(var(58)),pos y + 10*fvar(13) + 0.5*100*fvar(38) - (pos y + 10*vel y + 0.5*100*fvar(39)) = [-35,55]
trigger2 = enemynear(var(58)),prevstateno != 9010 && enemynear(var(58)),stateno != 9010 || p2bodydist y + var(56)*(fvar(13) -vel y) + 0.5*var(56)*var(56)*(fvar(38) -fvar(39)) < 20
trigger3 = numhelper(4200)
trigger3 = helper(4200),stateno = 4230
trigger3 = helper(4200),numtarget
trigger3 = p2bodydist x < 70
trigger3 = p2bodydist y = [-60,50]

;空中弱攻撃5F
[State -1,空弱];画面端以外
type = ChangeState
value = 600
triggerall = RoundState = 2
triggerall = statetype = A
triggerall = var(59) > 0
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = p2dist x > -10
triggerall = ctrl = 1
triggerall = pos y + 5*vel y + 0.5*25*fvar(39) < 10
triggerall = fvar(34) > 100
triggerall = var(56) >= 5
triggerall = stateno != 111 || var(46) = 0 && var(47) = 0 || var(56) < 9 || p2bodydist y + 9*(fvar(13)- vel y) + 0.5*81*(fvar(38)-fvar(39))<-10
trigger1 = stateno = 111 || stateno = 116
trigger1 = ceil(enemynear(var(58)),pos y + 5*fvar(13) + 0.5*25*fvar(38) - (pos y + 5*vel y + 0.5*25*fvar(39))) = [-20,70]
trigger1 = p2bodydist x - 5*vel x*(frontedgebodydist > 70) + 5*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x*(enemynear(var(58)),backedgebodydist > 5) < 30 && facing != enemynear(var(58)),facing
trigger2 = stateno = 111 || stateno = 116
trigger2 = ceil(enemynear(var(58)),pos y + 5*fvar(13) + 0.5*25*fvar(38) - (pos y + 5*vel y + 0.5*25*fvar(39))) = [-20,70]
trigger2 = p2bodydist x - 5*vel x*(frontedgebodydist > 70) + 5*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x*(enemynear(var(58)),frontedgebodydist > 5) < 30 && facing = enemynear(var(58)),facing
trigger3 = abs(p2bodydist y - 20) < 25 ||  ceil(enemynear(var(58)),pos y + 5*fvar(13) + 0.5*25*fvar(38) - (pos y + 5*vel y + 0.5*25*fvar(39))) = [0,65]
trigger3 = fvar(1) <= 0.717
trigger3 = var(56) <= 10 ||ceil(enemynear(var(58)),pos y + 5*fvar(13) + 0.5*25*fvar(38) - (pos y + 5*vel y + 0.5*25*fvar(39))) > 30
trigger3 = p2bodydist x - 5*vel x + 5*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x < 40

;空中中攻撃9F
[State -1,空中];画面端以外
type = ChangeState
value = 610
triggerall = RoundState = 2
triggerall = statetype = A
triggerall = var(59) > 0
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = p2dist x > -10
triggerall = ctrl = 1
triggerall = var(56) >= 9
triggerall = pos y + 9*vel y + 0.5*81*fvar(39) < 10
triggerall = fvar(34) > 100
triggerall = stateno != 111 && stateno != 116|| !(!var(46) && !var(47))
triggerall = !numhelper(4200)
triggerall = fvar(1) > 0.717
trigger1 = ceil(enemynear(var(58)),pos y + 9*fvar(13) + 0.5*81*fvar(38) - (pos y + 9*vel y + 0.5*81*fvar(39))) = [12,60]
trigger1 = p2bodydist x - 9*vel x*(frontedgebodydist > 70) + 9*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x*(enemynear(var(58)),backedgebodydist > 5) < 70 && facing != enemynear(var(58)),facing
trigger2 = ceil(enemynear(var(58)),pos y + 9*fvar(13) + 0.5*81*fvar(38) - (pos y + 9*vel y + 0.5*81*fvar(39))) = [12,60]
trigger2 = p2bodydist x - 9*vel x*(frontedgebodydist > 70) + 9*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x*(enemynear(var(58)),frontedgebodydist > 5) < 70 && facing = enemynear(var(58)),facing

;空中強攻撃10F
[State -1,空強];画面端以外
type = ChangeState
value = 620
triggerall = RoundState = 2
triggerall = statetype = A
triggerall = var(59) > 0
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = p2dist x > -50 || enemynear(var(58)),p2bodydist x < 70 + 15*(p2stateno = 9011) && enemynear(var(58)),p2dist x > -50
triggerall = p2bodydist x - 10*vel x + 10*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x < 80 + 25*(p2stateno = 9011)
triggerall = ctrl = 1
triggerall = var(56) >= 10
triggerall = pos y + 10*vel y + 0.5*100*fvar(39) < 10
triggerall = fvar(34) > 100
trigger1 = ceil(enemynear(var(58)),pos y + var(56)*fvar(13) + 0.5*var(56)*var(56)*fvar(38) - (pos y + var(56)*vel y + 0.5*var(56)*var(56)*fvar(39))) < 10
trigger1 = ceil(enemynear(var(58)),pos y + 10*fvar(13) + 0.5*100*fvar(38) - (pos y + 10*vel y + 0.5*100*fvar(39))) = [-35,5]
trigger2 = numhelper(4200)
trigger2 = helper(4200),stateno = 4230
trigger2 = helper(4200),numtarget
trigger2 = p2bodydist x < 70
trigger2 = p2bodydist y = [-60,50]
trigger3 = enemynear(var(58)),vel x = [-0.5,0.5]
trigger3 = p2bodydist y + 10*(fvar(13)-vel y) + 0.5*100*(fvar(38)-fvar(39)) = [-35,80]


;---------------------
;目押しじゃない

;空中弱翼
[State -1]
type = ChangeState
value = 1105
triggerall = statetype = A
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = var(59) > 0 && roundstate = 2
triggerall = fvar(1) < 0.50
triggerall = enemynear(var(58)),pos y + 13*fvar(13) + 0.5*169*fvar(38) < 20
triggerall = var(56) > 13
trigger1 = stateno = 620
trigger1 = movehit
trigger1 = p2bodydist y + 13*fvar(13) + 0.5*169*fvar(38) = [-60,110]
trigger1 = enemynear(var(58)),life*enemynear(var(58)),const(data.defence) < 40*100*const(data.attack)*0.01*fvar(0)

;インスタントチャージ
[State -1]
type = ChangeState
value = 900
triggerall = RoundState = 2
triggerall = var(8) = 1 || Var(7) >= 200
triggerall = var(7) >= 0
triggerall = var(59) > 0
trigger1 = stateno = 1101 && movecontact
trigger1 = (fvar(34) <= 100 && movehit && vel y + 9*fvar(39)>=0 && pos y + 9*vel y < -5) || moveguarded = [1,3]
trigger2 = stateno = 610 && pos y + 11*vel y + 0.5*121*fvar(39) > 10 || stateno = 620
trigger2 = movehit 
trigger2 = pos y + (var(56) - 4)*vel y + 0.5*(var(56)-4)*(var(56)-4)*fvar(39) > 10
trigger2 = enemynear(var(58)),pos y + var(56)*fvar(13) + 0.5*var(56)*var(56)*fvar(38) > -30
;trigger2 = fvar(27) + 4 < var(56)
;trigger2 = (enemynear(var(58)),pos y + ceil(fvar(27)+4)*fvar(13) + 0.5*fvar(38)*ceil(fvar(27)+4)*ceil(fvar(27)+5)) > -30
trigger2 = fvar(34) <= 100
trigger2 = var(8) = 1 && var(7) >= 150
trigger2 = enemynear(var(58)),life*enemynear(var(58)),const(data.defence) >= 10000*const(data.attack)*0.01 || teammode = single && roundno = 3 || teammode = turns && random < (1000 - life)*roundno
trigger2 = fvar(1) = [0.50,0.78]

;空中弱攻撃5F
[State -1]
type = ChangeState
value = 600
triggerall = statetype = A
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = var(59) > 0 && roundstate = 2
triggerall = stateno = 600 && movehit
triggerall = pos y + 5*vel y + 0.5*25*fvar(39) < 10
trigger1 = fvar(34) <= 100
trigger1 = pos y + 24*vel y + 0.5*576*fvar(39) < 10 
trigger1 =  (enemynear(var(58)),pos y + 26*fvar(13) + 0.5*676*fvar(38))-(pos y + 26*vel y + 0.5*676*fvar(39)) > 75
trigger1 = (fvar(1) = [0.420,0.55]) ||(fvar(1) < 0.40)
trigger1 = var(56)<=6 || fvar(13) + 5*fvar(38)>=0
trigger1 = var(45) = 0 || palno > 6

trigger2 = fvar(34) > 100
trigger2 = pos y + 9*vel y + 0.5*81*fvar(39) > 10 

trigger3 = fvar(34) > 100
trigger3 = fvar(1) < 0.70 && vel y < -2 && prevstateno != 600
trigger3 = animtime = 0 || p2bodydist x + 6*(facing*enemynear(var(58)),facing*fvar(12) - vel x) > 25 || p2bodydist y + 6*(fvar(13) - vel y) + 0.5*36*(fvar(38) - fvar(39)) > 40

trigger4 = fvar(34) <= 100
trigger4 = p2bodydist y + 9*(fvar(13)-vel y) + 0.5*81*(fvar(38)-fvar(39)) > 70 ;enemynear(var(58)),pos y > -20
trigger4 = var(46)=0&&var(47)=0
trigger4 = vel y + 5*fvar(39) <= 0
trigger4 = prevstateno != 600 || movehit > 2


;空中中攻撃9F
[State -1]
type = ChangeState
value = 610
triggerall = RoundState = 2
triggerall = statetype = A
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = var(59) >0
triggerall = pos y + 9*vel y + 0.5*81*fvar(39) < 10
triggerall = var(56)>=9
triggerall = stateno = 600
triggerall = movehit
trigger1 = fvar(34) <= 100
trigger1 = movehit > 1 || vel y + 9*fvar(39) > 0
trigger1 = var(56)<= 9 || (pos y + 20*vel y + 0.5*400*fvar(39)) > 10 || p2bodydist y + 9*(fvar(13)-vel y) + 0.5*81*(fvar(38)-fvar(39)) > 70 - 6*(fvar(1) > 0.85)
trigger1 = var(2) = 0

trigger2 = fvar(34) <= 100 && !animtime

trigger3 = fvar(34) > 100
trigger3 = var(2) != 0 && pos y + 10*vel y + 0.5*100*fvar(39) > 10

trigger4 = fvar(34) <= 100
trigger4 = fvar(1) < 0.54 
trigger4 = var(46) = 0 && var(47) = 0
trigger4 = var(45)
trigger4 = palno <=6

trigger5 = fvar(34) > 100
trigger5 = var(46) || var(47)
trigger5 = var(2) != 0
trigger5 = pos y + 20*vel y + 0.5*400*fvar(39) < 15
trigger5 = (enemynear(var(58)),pos y + 9*fvar(13) + 0.5*81*fvar(38))-(pos y + 9*vel y + 0.5*81*fvar(39)) > -20

trigger6 = fvar(34) > 100
trigger6 = !var(2) && !var(46) && !var(47)
trigger6 = fvar(1) < 0.70
trigger6 = animtime = 0 || p2bodydist y + 9*(fvar(13) - vel y) + 0.5*81*(fvar(38) - fvar(39)) > 70 || var(56) <= 10

trigger7 = var(46) || var(47)
trigger7 = fvar(1) > 0.40
trigger7 = var(56) <= 9



;空中強攻撃10F
[State -1]
type = ChangeState
value = 620
triggerall = RoundState = 2 && var(59) > 0
triggerall = statetype = A
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = pos y + 10*vel y + 0.5*100*fvar(39) < 10 + vel y
trigger1 = fvar(34) <= 100
trigger1 = stateno = 610 && movehit
trigger1 = p2bodydist y+10*(fvar(13)-vel y)+0.5*121*(fvar(38)-fvar(39))< -30||pos y+11*vel y+0.5*121*fvar(39)>10||!animtime||enemynear(var(58)),pos y + 10*fvar(13) + 0.5*121*fvar(38) > 15|| var(56) <= 11

trigger2 = fvar(34) > 100
trigger2 = stateno = 610 && movehit
trigger2 = fvar(1) <= 0.60
trigger2 = pos y + 10*vel y + 50*fvar(39) > 10 || var(56) < 12 || animtime = 0 || p2bodydist y + 10*(fvar(13)-vel y) + 50*(fvar(38)-fvar(39)) < -20

trigger3 = stateno = 600 && movehit
trigger3 = var(2) != 0
trigger3 = pos y + 11*vel y + 0.5*121*fvar(39) > 10 - 10*(fvar(34) > 100) || time >=16 || var(56) <=11 ;||  pos y + 10*vel y + 0.5*100*fvar(39) < -15 

trigger4 = stateno = 610 && movehit
trigger4 = fvar(34) <= 100
trigger4 = fvar(1) < 0.50 && var(46) = 0 && var(47) = 0
trigger4 = var(45)
trigger4 = pos y + 11*vel y + 0.5*121*fvar(39) < -28 
trigger4 = palno <=6

trigger5 = stateno = 600 && movehit
trigger5 = fvar(34) <= 100
trigger5 = pos y + 11*vel y + 0.5*121*fvar(39) > 10

trigger6 = fvar(1) > 0.666
trigger6 = stateno = 610 || stateno = 600
trigger6 = movehit
trigger6 = pos y + 11*vel y + 0.5*121*fvar(39) < -46
trigger6 = p2bodydist y + 11*(fvar(13) - vel y) + 0.5*121*(fvar(38) - fvar(39)) < 20
trigger6 = !var(2)

;空中ジャンプ
[State -1]
type = ChangeState
value = 45
triggerall = statetype = A
triggerall = var(59)>0 && roundstate = 2
triggerall = var(46) = 0
triggerall = var(47) = 0
triggerall = Var(2) = 0
triggerall = stateno = 620 && movehit
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
trigger1 = numhelper(4200)
trigger1 = helper(4200),stateno = 4230
trigger1 = helper(4200),numtarget

;空中バックダッシュ
[State -1]
type = ChangeState
value = 115
triggerall = statetype = A
triggerall = Var(2) = 0
triggerall = Pos Y <= -30
triggerall = var(59) > 0 && roundstate = 2
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = p2dist x < 0
trigger1 = stateno = 610 || stateno = 620
trigger1 = movehit
trigger1 = pos y < -40
trigger1 = var(56) >= 20
trigger2 = var(45)
trigger2 = stateno = 620 && movehit
trigger2 = fvar(1) <= 0.53 
trigger2 = palno <=6

;空中ダッシュ端
[State -1]
type = ChangeState
value = 110
triggerall = statetype = A
triggerall = Var(2) = 0
triggerall = Pos Y <= -25
triggerall = var(59) > 0 && roundstate = 2
triggerall = fvar(34) <= 140
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
trigger1 = var(45)
trigger1 = fvar(34) <= 100
trigger1 = stateno = 620 && movehit
trigger1 = fvar(1) <= 0.53
trigger1 = pos y + var(56)*vel y + 0.5*var(56)*var(56)*fvar(39) < 10 ||enemynear(var(58)),pos y + var(56)*fvar(13) + 0.5*var(56)*var(56)*fvar(38)<-30; || fvar(1) < 0.40
trigger1 = palno <=6
trigger1 = pos y < -35
trigger2 = stateno = 610 || stateno = 620
trigger2 = movehit
trigger2 = p2bodydist y + 19*fvar(13) + 0.5*400*fvar(38) < 80
trigger2 = enemynear(var(58)),pos y + 19*fvar(13) + 0.5*400*fvar(38) < 20
;trigger2 = p2bodydist y < 40||stateno = 620
trigger2 = var(56) >= 20
trigger2 = var(46) = 0 && var(47) = 0
;trigger2 = vel y < 1
trigger2 = pos y < -46

;空中ダッシュ端以外
[State -1]
type = ChangeState
value = 110
triggerall = statetype = A
triggerall = Var(2) = 0
triggerall = Pos Y <= -30
triggerall = var(59) > 0 && roundstate = 2
triggerall = fvar(34) > 140
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
trigger1 = stateno = 610 || stateno = 620
trigger1 = movehit
trigger1 = pos y < -40
trigger1 = var(56) >= 20
trigger2 = var(45)
trigger2 = stateno = 620 && movehit
trigger2 = fvar(1) <= 0.53
trigger2 = palno <=6
trigger2 = p2bodydist y > 0
trigger3 = p2stateno = 9011
trigger3 = p2bodydist x > 100
trigger3 = ctrl

;空中ジャンプ
[State -1]
type = null;ChangeState
value = 45
triggerall = statetype = A
triggerall = var(59)>0 && roundstate = 2
triggerall = var(46) = 0
triggerall = var(47) = 0
triggerall = Var(2) = 0
triggerall = stateno = 620 && movehit
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
trigger1 = fvar(34) <= 100
trigger1 = enemynear(var(58)),pos y + var(56)*fvar(13) + 0.5*fvar(38)*(var(56)**2) - (pos y + var(56)*vel y + 0.5*fvar(39)*(var(56)**2)) < 0
trigger1 = enemynear(var(58)),pos y + var(56)*fvar(13) + 0.5*fvar(38)*(var(56)**2) < -30
trigger1 = movehit = 1 || pos y < -20 && vel y < 7
trigger1 = p2bodydist y + 10*(fvar(13) - vel y) < 0
trigger2 = fvar(34) <= 100
trigger2 = fvar(1) < 0.39
trigger2 = movehit = 1
trigger2 = p2bodydist y < 0
trigger3 = fvar(34) <= 100
trigger3 = enemynear(var(58)),pos y + 10*fvar(13) + 0.5*fvar(38)*100 - (pos y + 10*vel y + 0.5*fvar(39)*100) < 10
trigger3 = enemynear(var(58)),pos y + 10*fvar(13) + 0.5*100*fvar(38) < -30
trigger3 = p2bodydist y < 10


;空中ジャンプ
[State -1]
type = ChangeState
value = 45
triggerall = statetype = A
triggerall = var(59)>0 && roundstate = 2
triggerall = var(46) = 0
triggerall = var(47) = 0
triggerall = Var(2) = 0
triggerall = stateno = 620 && movehit = 1
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
trigger1 = fvar(34) <= 100
trigger1 = p2bodydist y < -22
trigger2 = fvar(34) > 100
trigger2 = fvar(1) < 0.55
trigger2 = p2bodydist y < -10




;_____________________________________________________________________________________________

;地上コンボ enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
;_____________________________________________________________________________________________
;---------------------------
;statetype != A
;---------------------------
;目押し
;しゃがみ弱攻撃
[State -1]
type = ChangeState
value = 400
triggerall = RoundState = 2&&var(59) > 0
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = statetype != A && ctrl
triggerall = enemynear(var(58)),statetype != L
triggerall = numhelper(4000) && numhelper(20000)
triggerall = helper(20000),var(0) = 0
triggerall = p2dist x > 0
trigger1 = fvar(34) <= 100
trigger1 = numtarget(610) || numtarget(620) || fvar(1) < 0.7
trigger1 = p2bodydist x <= 18
trigger2 = fvar(34) <= 100
trigger2 = numhelper(4225)
trigger2 = helper(4225),numtarget(4225)
trigger2 = p2bodydist x <= 18
trigger3 = numtarget(232)
trigger3 = p2bodydist x <= 24
trigger3 = enemynear(var(58)),gethitvar(hittime) > 4
trigger4 = numhelper(4225) = 0 && numhelper(4200)
trigger4 = helper(4200),stateno != 4220 && helper(4200),stateno != [4200,4210]
trigger4 = p2bodydist x <= 20
trigger5 = numhelper(4225) = 0 && !numhelper(4200)
trigger5 = p2bodydist x <= 20

;しゃがみ中攻撃
[State -1,68-1]
type = ChangeState
value = 410
triggerall = RoundState = 2&&var(59) > 0
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = statetype != A && ctrl
triggerall = enemynear(var(58)),statetype != L
triggerall = numhelper(4000) && numhelper(20000)
triggerall = helper(20000),var(0) = 0
triggerall = p2dist x > 0
triggerall = p2bodydist x <= 45
trigger1 = fvar(34) <= 100
trigger1 = numtarget(610) || numtarget(620) || fvar(1) < 0.7
trigger2 = fvar(34) <= 100
trigger2 = numhelper(4225)
trigger2 = helper(4225),numtarget(4225)
trigger3 = numhelper(4225) = 0
trigger3 = !numhelper(4200);helper(4000),stateno != 4220 && helper(4000),stateno != [4200,4210]
trigger4 = numtarget(232)
trigger4 = prevstateno != 232
trigger5 = numhelper(4200)
trigger5 = helper(4200),stateno = 4220
trigger5 = numtarget(220)

;遠中攻撃
[State -1,60]
type = changestate
value = 215
triggerall = RoundState = 2 
triggerall = ctrl && statetype != A
triggerall = var(59) > 0
triggerall = p2bodydist x = [45,100]
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
trigger1 = numtarget(232)
trigger1 = prevstateno != 232
trigger2 = numhelper(4200)
trigger2 = helper(4200),stateno = 4220
trigger2 = numtarget(220)

;強攻撃
[State -1,60]
type = changestate
value = 220
triggerall = RoundState = 2 
triggerall = ctrl && statetype != A
triggerall = var(59) > 0
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = numhelper(4000) && numhelper(20000)
triggerall = helper(20000),var(0) = 0
trigger1 = numhelper(4200)
trigger1 = helper(4200),stateno = 4210
trigger1 = helper(4200),time <= 90 || helper(4200),time >=120
trigger1 = p2bodydist x <= 80

;ダッシュ
[State -1]
type = ChangeState
value = 100
triggerall = RoundState = 2 
triggerall = ctrl && statetype != A
triggerall = var(59) > 0
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = (fvar(34) > 100 && enemynear(var(58)),statetype != C) || p2bodydist x > 20
triggerall = var(52) = 0
trigger1 = numtarget(220) || numtarget(215)
trigger1 = numhelper(4225)
trigger1 = facing = helper(4225),facing
trigger1 = (pos x < helper(4225),pos x - 15 <= enemynear(var(58)),pos x )|| (pos x > helper(4225),pos x + 15 >= enemynear(var(58)),pos x )

trigger2 = numhelper(4225)
trigger2 = helper(4225),numtarget(4225)
trigger2 = facing = helper(4225),facing
trigger2 = (pos x < helper(4225),pos x - 15 <= enemynear(var(58)),pos x )|| (pos x > helper(4225),pos x + 15 >= enemynear(var(58)),pos x )

;------------------------
;タッグ用目押し
;------------------------
;強がおがおファイアー
[State -1]
type = ChangeState
value = 3002
triggerall = Power >= 3000
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = var(52) &&  ctrl 
trigger1 = numhelper(4225)
trigger1 = helper(4225),movehit

;中がおがおファイアー
[State -1]
type = ChangeState
value = 3001
triggerall = Power >= 2000
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = var(52) &&  ctrl 
trigger1 = numhelper(4225)
trigger1 = helper(4225),movehit

;弱がおがおファイアー
[State -1]
type = ChangeState
value = 3000
triggerall = Power >= 1000
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = var(52) &&  ctrl 
trigger1 = numhelper(4225)
trigger1 = helper(4225),movehit


;---------------------
;目押しじゃない

;鳥ノ詠
[State -1]
type = ChangeState
value = 3700
triggerall = life <= 333
triggerall = palno = [7,12]
triggerall = Power >= 3000
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,1]
triggerall = palno = [7,12]
triggerall = p2bodydist x <= 55
triggerall = stateno = 220 || stateno = 420
triggerall = movehit = [1,3]
triggerall = fvar(1) > 0.80 ||enemynear(var(58)),life*enemynear(var(58)),const(data.defence)*0.01/(fvar(0)+0.00001) = [200,600]
trigger1 = !numhelper(4200)
trigger2 = numhelper(4200)
trigger2 =helper(4200),stateno != 4210

;インスタントチャージ
[State -1]
type = ChangeState
value = 900
triggerall = RoundState = 2 
triggerall = var(8) = 1 || Var(7) >= 200
triggerall = var(7) >= 0
triggerall = var(59) > 0
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
trigger1 = stateno = 3231 && time >= 10
trigger1 = numtarget(220)
trigger2 = stateno  = 232
trigger2 = movehit = 1
trigger2 = p2bodydist x = [15,70]
trigger2 = numhelper(4200)
trigger2 = helper(4200),numtarget(4210) = 0
trigger2 = var(8) = 0 || var(7) <= 200
trigger3 = stateno = [1400,1402]
trigger3 = animelemtime(7) >= 0 && animelemtime(9)<0 
trigger3 = inguarddist

;ポテトシュート!!
[State -1]
type = ChangeState
value = 3231
triggerall = RoundState = 2 && var(59)>0
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = var(1) = 1
triggerall = var(36) > 0
triggerall = statetype != A
triggerall = fvar(1) > 0.70
triggerall = stateno = 220 && movehit
triggerall = p2bodydist x < 70
triggerall = var(8) = 1 || var(7) > 200
triggerall = fvar(34) > 300
trigger1 = var(52) = 0 && (enemynear(var(58)),statetype = S || random<50)
trigger2 = var(52) = 1 && numenemy = 2
trigger2 = (facing*(pos x - enemynear(0),pos x) < 0 && facing*(pos x - enemynear(1),pos x) && power > 1000 )

;弱往人
[State -1]
type = ChangeState
value = 3230
triggerall = RoundState = 2 && var(59)>0
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = var(1) = 1
triggerall = var(36) > 0
triggerall = statetype != A
trigger1 = numhelper(4000)
trigger1 = abs(helper(4000),pos x - enemynear(var(58)),pos x) =[20,105]
trigger1 = stateno = 220 || stateno = 215 || stateno = 410
trigger1 = movehit
trigger1 = (power>=3000 && (life<= 333|| palno >=7)) || fvar(1) <= 0.60

;強がおがおファイアー
[State -1]
type = ChangeState
value = 3002
triggerall = Power >= 3000
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = statetype != A
triggerall = palno = [1,6]
triggerall = p2bodydist x <= 50 || fvar(34) <= 100
triggerall = stateno = 220 && movehit = 1
triggerall = numhelper(4200) = 0
triggerall = fvar(1) > 0.70
trigger1 = random <= 200 || enemynear(var(58)),life*enemynear(var(58)),const(data.defence)*0.01/(fvar(0) + 0.00000001) = [200,500]
trigger1 =  enemynear(var(58)),life*enemynear(var(58)),const(data.defence)*0.01/(fvar(5) + 0.00000001) > 150 
trigger2 = teammode = single
trigger2 = roundno = 3
trigger3 = teammode = turns
trigger3 = roundsexisted >= 1

;中がおがおファイアー
[State -1]
type = ChangeState
value = 3001
triggerall = Power >= 2000
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,1]
triggerall = enemynear(var(58)),life*enemynear(var(58)),const(data.defence)*0.01/(fvar(0)+0.00001) = [150,280]
triggerall = stateno = 220
triggerall = movehit = [1,3]
triggerall = p2bodydist x > 30
trigger1 = !numhelper(4200)
trigger2 = numhelper(4200)
trigger2 = helper(4200),stateno = 4211

;弱がおがおファイアー
[State -1]
type = ChangeState
value = 3000
triggerall = Power >= 1000
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,1]
triggerall = stateno = 220
triggerall = movehit = [1,3]
triggerall = p2bodydist x > 30
triggerall = random < ceil(0.28*power) || p2bodydist x > 70 || enemynear(var(58)),life*enemynear(var(58)),const(data.defence)*0.01/(fvar(0)+0.00001) = [50,150]
triggerall = palno <= 6 || p2bodydist x > 80 || fvar(34) > 140
trigger1 = !numhelper(4200)
trigger2 = numhelper(4200)
trigger2 = helper(4200),stateno = 4211

;弱天津鷹ノ弓
[State -1]
type = ChangeState
value = 2200
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,1]
triggerall = !numhelper(4200)
triggerall = palno = [7,12]
trigger1 = stateno = 220
trigger1 = movehit
trigger1 = p2bodydist x <= 80 || fvar(34) <= 140

;弱草薙シ光ノ刃
[State -1]
type = ChangeState
value = 2000
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,1]
triggerall = numhelper(4200) = 0
triggerall = palno = [7,12]
trigger1 = stateno = 220 || stateno = 420
trigger1 = movecontact
trigger1 = p2bodydist x > 80 || moveguarded

;弱翼
[State -1]
type = ChangeState
value = 1100
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,1]
triggerall = numhelper(4200) = 0
triggerall = enemynear(var(58)),statetype != L
trigger1 = stateno = 210
trigger1 = movehit
trigger1 = p2bodydist x >= 50
trigger1 = palno<7
trigger2 = stateno = 220
trigger2 = movehit
trigger2 = p2bodydist x <= 70

;弱翼
[State -1]
type = ChangeState
value = 1100
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,1]
triggerall = numhelper(4200)
triggerall = helper(4200),stateno = 4211
triggerall = enemynear(var(58)),statetype != L
trigger1 = stateno = 210
trigger1 = movehit
trigger1 = p2bodydist x >= 50
trigger1 = palno<7
trigger2 = stateno = 220
trigger2 = movehit
trigger2 = p2bodydist x <= 70

;屈中攻撃
[State -1]
type = ChangeState
value = 410
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,11] 
trigger1 = stateno = 200
trigger1 = movehit
trigger2 = stateno = 400
trigger2 = movehit

;中攻撃
[State -1]
type = ChangeState
value = 210
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = p2bodydist X < 50
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,11] 
trigger1 = stateno = 200
trigger1 = movehit
trigger2 = stateno = 400
trigger2 = movehit

;中攻撃
[State -1]
type = ChangeState
value = 215
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,11]
triggerall = stateno =210 || stateno = 410
triggerall = movehit
triggerall = numhelper(4225) = 0
triggerall = ((life<=333 || palno = [7,12]) && power >= 2970 ) = 0 || p2dist x > 60
triggerall = fvar(1) >= 0.80
trigger1 = p2bodydist x > 45
trigger1 = numhelper(4200) = 0
trigger2 = p2bodydist x > 45
trigger2 = numhelper(4200)
trigger2 = helper(4200),stateno != 4220
trigger3 = var(8) = 0 && var(7) < 200 && fvar(34) > 100
trigger3 = numhelper(4200) = 0
trigger4 = var(8) = 0 && var(7) < 200 && fvar(34) > 100
trigger4 = numhelper(4200)
trigger4 = helper(4200),stateno != 4220
trigger5 = fvar(34) > 100 && power > 1000
trigger5 = numhelper(4200) = 0
trigger5 = power < 3000 || p2bodydist x > 45
trigger6 = fvar(34) > 100 && power > 1000
trigger6 = numhelper(4200)
trigger6 = helper(4200),stateno != 4220
trigger6 = power < 3000 || p2bodydist x > 45

;しゃがみ強攻撃
[State -1]
type = ChangeState
value = 420
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = fvar(20) = [0,11]
triggerall = fvar(1) > 0.50
triggerall = var(12) != 5
trigger1 = numhelper(4225) = 0 && numhelper(4200)=0
trigger1 = p2bodydist x <= 45
trigger1 = stateno = 210 || stateno = 215 || stateno = 410
trigger1 = movehit
trigger1 = fvar(34) > 100 || helper(20000),var(10) = 0
trigger1 = fvar(34) <= 100|| (power < 1000 && fvar(34) > 100) || random >= 0.20*power || fvar(20) = 3
trigger1 = fvar(34) <= 300 || var(36) = 0 || var(1)!=1
trigger1 = (fvar(34) > 100&&fvar(33) > 100 && power > 1000 && p2life*enemynear(var(58)),const(data.defence)*0.01/(fvar(1)+0.00001) = [50,150])=0
trigger1 = (fvar(34) > 100&&fvar(33) > 100 && power > 2000 && p2life*enemynear(var(58)),const(data.defence)*0.01/(fvar(1)+0.00001) = [150,250])=0
trigger1 = palno <= 6 || fvar(34) > 120 || fvar(1) <= 0.80

trigger2 = numhelper(4225) = 1
trigger2 = fvar(34) <= 100 || facing != helper(4225),facing
trigger2 = p2bodydist x <= 45
trigger2 = stateno = 210 || stateno = 215 || stateno = 410
trigger2 = movehit >= 1 + 3*numhelper(4200)
trigger2 = fvar(34) <= 110|| (power < 1000 && fvar(34) > 100) || random >= 0.20*power || fvar(20) = 3
trigger2 = ((life<=333 || palno = [7,12]) && power >= 3000 && (p2dist x <= 60 || frontedgebodydist <80) ) = 0 

;強攻撃
[State -1]
type = ChangeState
value = 220
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = var(12) != 5
trigger1 = numhelper(4225) = 0 && numhelper(4200) = 0
trigger1 = stateno = 210 || stateno = 215 || stateno = 410
trigger1 = movehit

trigger2 = numhelper(4225) = 1
trigger2 = fvar(34) <= 100
trigger2 = stateno = 210 || stateno = 215 || stateno = 410
trigger2 = movehit

;----------------------------------------------------------------------
;statetype = A


;空中弱翼
[State -1]
type = ChangeState
value = 1105
triggerall = RoundState = 2 && var(59)
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = statetype = A
triggerall = p2dist x > 0
trigger1 = stateno = 620 && movehit = 1
trigger1 = pos y + 12*vel y + 0.5*144*fvar(39) < 20 || p2bodydist x - 10*vel x > 60
trigger1 = !numhelper(4225) 

;空中中攻撃
[State -1]
type = ChangeState
value = 610
triggerall = RoundState = 2 && var(59)
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = statetype = A
trigger1 = fvar(34) <= 100
trigger1 = stateno = 102 || stateno = 111
trigger1 = p2bodydist x <= 10
trigger1 = p2dist x > 0
trigger1 = numhelper(4225)
trigger1 = helper(4225),numtarget(4225)
trigger1 = pos y + 19*vel y + 0.5*361*fvar(39) < -5
trigger2 = numhelper(4225) = 0
trigger2 = stateno = 600
trigger2 = movehit

;空中強攻撃
[State -1]
type = ChangeState
value = 620
triggerall = RoundState = 2 && var(59)
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = statetype = A
trigger1 = fvar(34) <= 100
trigger1 = stateno = 102 || stateno = 111
trigger1 = numhelper(4225)
trigger1 = p2bodydist x <= 10
trigger1 = helper(4225),numtarget(4225)
trigger1 = pos y + 19*vel y + 0.5*361*fvar(39) >= -5 && pos y + 10*vel y + 0.5*100*fvar(39) < -5 || p2dist x < 0
trigger2 = fvar(34) <= 100
trigger2 = stateno = 610 && movehit
trigger2 = prevstateno = 102 || prevstateno = 111
trigger3 = !numhelper(4225)
trigger3 = stateno = 610
trigger3 = movehit > 4 || movehit && pos y + 21*vel y + 0.5*441*fvar(39) > 20


;空中ダッシュ
[State -1]
type = ChangeState
value = 110
triggerall = RoundState = 2 && var(59)
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = statetype = A
triggerall = Var(2) = 0
triggerall = Pos Y <= -30
triggerall = ctrl
trigger1 = stateno = 102
trigger1 = fvar(34) > 100
trigger1 = p2dist x > 0
trigger1 = numhelper(4225)
trigger1 = helper(4225),numtarget(4225)
trigger1 = enemynear(var(58)),statetype != C || p2bodydist x > 60
trigger2 = enemynear(var(58)),statetype = A && enemynear(var(58)),stateno = [9010,9011]
trigger2 = enemynear(var(58)),time < 5
trigger2 = p2bodydist x > 100
trigger2 = random < 200
;______________________________________________________________________

;ガードその他
;______________________________________________________________________
[state -1];投げに対して固まらないように
type = assertspecial
trigger1 = var(59)
trigger1 = enemynear(var(58)),stateno = [800,805]
flag = NoStandGuard
flag2 = NoCrouchGuard
ignorehitpause = 1

;インスタントチャージ
[State -1]
type = ChangeState
value = 900
triggerall = RoundState = 2 
triggerall = var(8) = 1 || Var(7) >= 200
triggerall = var(7) >= 0
triggerall = var(59) > 0
trigger1 = stateno = [1400,1402]
trigger1 = animelemtime(7) >= 0 && animelemtime(9)<0 
trigger1 = inguarddist || !var(8) && var(7) <= 250 && random <= 250
trigger2 = stateno = 220 || stateno = 232
trigger2 = movecontact || movereversed && var(28)
trigger2 = p2movetype != H
trigger2 = inguarddist
trigger2 = animtime < -3
trigger2 = !var(8) || var(7) < 150 || life < 0.4*lifemax
trigger2 = enemynear(var(58)),time >= 60*fvar(28)

[state -3,e-1]
type=changestate
value=41 + random%3
triggerall = var(59)>0&&roundstate=2
triggerall = statetype!=A
triggerall = ctrl || stateno = 52
triggerall = enemynear(var(58)),time>=60*fvar(28) ||  random <= 50 || fvar(31) > 2.00
triggerall = enemynear(var(58)),p2dist x > 0

trigger1 = enemynear(var(58)),hitdefattr=SC,NT,ST,HT
trigger1 = p2bodydist X < 80

trigger2 = enemynear(var(58)),stateno = [800,805]

trigger3 = numhelper(20000)>0
trigger3 = helper(20000),var(1)!=0
trigger3 = enemynear(var(58)),stateno = helper(20000),var(1)
trigger3 = enemynear(var(58)),hitdefattr = SC,AT || enemynear(var(58)),time < 0.7*(enemynear(var(58)),time - enemynear(var(58)),animtime)

trigger4 = numhelper(20000)>0
trigger4 = helper(20000),var(2)!=0
trigger4 = enemynear(var(58)),stateno = helper(20000),var(2)
trigger4 = enemynear(var(58)),hitdefattr = SC,AT || enemynear(var(58)),time < 0.7*(enemynear(var(58)),time - enemynear(var(58)),animtime)

trigger5 = numhelper(20000)>0
trigger5 = helper(20000),var(3)!=0
trigger5 = enemynear(var(58)),stateno = helper(20000),var(3)
trigger5 = enemynear(var(58)),hitdefattr = SC,AT || enemynear(var(58)),time < 0.7*(enemynear(var(58)),time - enemynear(var(58)),animtime)

trigger6 = 0;numhelper(20000) > 0
trigger6 = random < 50*helper(20000),var(9)
trigger6 = p2bodydist x - enemynear(var(58)),vel x< 50
trigger6 = enemynear(var(58)),ctrl
trigger6 = enemynear(var(58)),statetype !=A


[state -3,e-1]
type=changestate
value=41 + 2*(p2bodydist x <= 150)*(backedgebodydist > 40)
triggerall = var(59)>0&&roundstate=2
triggerall = statetype!=A
triggerall = ctrl
triggerall = p2dist x > 0
triggerall = inguarddist
trigger1 = fvar(31) > 2.2
trigger1 = enemynear(var(58)),movetype != A || enemynear(var(58)),statetype = A || p2bodydist x > 150 || (enemynear(var(58)),ctrl = 0 && random <=100)
trigger1 = !(enemynear(var(58)),hitdefattr = SC,AA,HP) && !(enemynear(var(58)),hitdefattr = A,AA,HP)
trigger1 = enemynear(var(58)),numhelper>helper(20000),var(8)|| enemynear(var(58)),numproj > 0
trigger1 = random <=100
trigger2 = random < 10
trigger2 = numhelper(20000)*numhelper(20004)
trigger2 = helper(20004),inguarddist
trigger2 = enemynear(var(58)),numproj > 0 || enemynear(var(58)),numhelper>helper(20000),var(8)
trigger2 = p2bodydist x > 120
trigger2 = enemynear(var(58)),movetype != H && enemynear(var(58)),statetype != L
trigger3 = p2bodydist x <= 80
trigger3 = prevstateno = [150,155]
trigger3 = p2statetype != A
trigger3 = fvar(33) < 25
trigger3 = enemynear(var(58)),time <= 1
trigger3 = enemynear(var(58)),stateno < 2000
trigger3 = random <= 150

;ダッシュ
[State -1]
type = ChangeState
value = 100
triggerall =roundstate = 2 && var(59)
triggerall = statetype != A
trigger1 = ctrl 
trigger1 = enemynear(var(58)),animtime=[-55,-40]
trigger1 = enemynear(var(58)),ctrl=0
trigger1 = enemynear(var(58)),name = "UNKNOWN" && enemynear(var(58)),authorname = "hanma"
trigger1 = enemynear(var(58)),stateno = [3100,3160]

;空中ダッシュ
[State -1]
type = ChangeState
value = 110
triggerall = statetype = A && var(59) && roundstate = 2
triggerall = Var(2) = 0
triggerall = Pos Y <= -30
triggerall = ctrl
trigger1 = enemynear(var(58)),hitdefattr = SC,AT
trigger1 = pos y > -120 && vel y >= 0
trigger1 = fvar(33) <= 100

trigger2 = ctrl 
trigger2 = enemynear(var(58)),animtime=[-50,-45]
trigger2 = enemynear(var(58)),ctrl=0
trigger2 = enemynear(var(58)),name = "UNKNOWN" && enemynear(var(58)),authorname = "hanma"
trigger2 = enemynear(var(58)),stateno = [3100,3160]

trigger3 = enemynear(var(58)),hitdefattr = A,AT
trigger3 = frontedgebodydist > 30
trigger3 = enemynear(var(58)),p2dist x*enemynear(var(58)),vel x > 0
trigger3 = p2dist x < 0

trigger4 = enemynear(var(58)),numproj > 0 || enemynear(var(58)),numhelper > helper(20000),var(8)
trigger4 = pos y < -160
trigger4 = p2bodydist x > 130 || enemynear(var(58)),ctrl = 0 && p2bodydist x > 100
trigger4 = enemynear(var(58)),movetype != H && enemynear(var(58)),statetype != L

;空中ジャンプ
[State -1]
type = ChangeState
value = 45
triggerall = statetype = A
triggerall = var(59)>0 && roundstate = 2
triggerall = var(46) = 0
triggerall = var(47) = 0
triggerall = Var(2) = 0
triggerall = ctrl
triggerall = enemynear(var(58)),movetype != H && enemynear(var(58)),statetype != L
trigger1 = numhelper(20000) * numhelper(20003) * numhelper(20004)
trigger1 = enemynear(var(58)),numproj > 0 || enemynear(var(58)),numhelper > helper(20000),var(8)
trigger1 = helper(20004),inguarddist && helper(20003),inguarddist = 0
trigger1 = pos y < -70
trigger1 = random < 200
trigger1 = enemynear(var(58)),vel x = [-0.5,0.5]

trigger2 = enemynear(var(58)),statetype != A
trigger2 = enemynear(var(58)),movetype = A
trigger2 = enemynear(var(58)),p2dist x > 0 && p2bodydist x < 140
trigger2 = enemynear(var(58)),time < -enemynear(var(58)),animtime
trigger2 = pos y + 6*vel y + 18*fvar(39) < -5
trigger2 = random <= 60 || enemynear(var(58)),time <= 1 && 60*fvar(28) <= 1 
trigger2 = vel y > -1

;空中バックダッシュ
[State -1]
type = ChangeState
value = 115
triggerall = statetype = A && var(59) && roundstate = 2
triggerall = Var(2) = 0
triggerall = Pos Y <= -30
triggerall = ctrl
trigger1 = enemynear(var(58)),hitdefattr = SC,AT
trigger1 = pos y > -120 && vel y >= 0
trigger2 = enemynear(var(58)),hitdefattr = A,AT
trigger2 = backedgebodydist > 30
trigger2 = enemynear(var(58)),p2dist x*enemynear(var(58)),vel x > 0
trigger2 = p2dist x >= 0

[State -1, e-2]
Type = ChangeState
Value = 120
triggerall = var(59) > 0
triggerall = random < 16*var(59)**3
triggerall = var(59) >= 3
triggerall = roundstate = 2
triggerall = stateno != 120 || statetype != S && time >= 1
triggerall = ctrl&&statetype !=A
triggerall = (enemynear(var(58)),hitdefattr =,NT,ST,HT)=0
triggerall = p2stateno != [800,805]
trigger1 = numhelper(20004)&&numhelper(20003)
trigger1 = iNguarddist||(helper(20004),iNguarddist && enemy,name!="saya")||(helper(20003),inguarddist)
trigger2 = numhelper(20000)
trigger2 = helper(20000),var(30)


[State -1, e-3]
Type = ChangeState
Value = 132
triggerall = var(59) = [1,10]
triggerall = ctrl && statetype = A&&var(25)=0
triggerall = InGuardDist
triggerall = var(59)>=3
trigger1 = (enemynear(var(58)),hitdefattr=A,AA)||(enemynear(var(58)),hitdefattr=S,AA)
trigger2 = enemynear(var(58)),numhelper > helper(20000),var(8) || enemynear(var(58)),numproj > 0



;______________________________________________________________________

;起き攻め enemynear(var(58)),statetype = L &&  enemynear(var(58)),stateno = [5100,5120]
;______________________________________________________________________
;ジャンプ
[State -1,f-1]
type = ChangeState
value = 41
triggerall = RoundState = 2&&var(59) > 0
triggerall = statetype != A
triggerall = p2dist x > 0
triggerall = enemynear(var(58)),statetype = L && enemynear(var(58)),vel x =[-3,3]
triggerall = ctrl
triggerall = palno = [1,6]
triggerall = (enemynear(var(58)),backedgebodydist > 20 && facing != enemynear(var(58)),facing)||(enemynear(var(58)),frontedgebodydist > 20 && facing = enemynear(var(58)),facing)

trigger1 = p2bodydist x <= 30
trigger1 = enemynear(var(58)),stateno = [5100,5101]

;ダッシュ
[State -1,f-2]
type = ChangeState
value = 100
triggerall = RoundState = 2&&var(59) > 0
triggerall = statetype != A
triggerall = p2dist x > 0
triggerall = palno = [1,6]
triggerall = enemynear(var(58)),statetype = L  && enemynear(var(58)),vel x = [-3,3]
triggerall = (enemynear(var(58)),backedgebodydist > 20 && facing != enemynear(var(58)),facing)||(enemynear(var(58)),frontedgebodydist > 20 && facing = enemynear(var(58)),facing)

trigger1 = p2bodydist x = [31,65]
trigger1 = enemynear(var(58)),stateno = [5100,5101]
trigger1 = ctrl
trigger1 = random <= 1000 - 200*helper(20000),var(9)**1.5


;弱往人
[State -1,f-3]
type = ChangeState
value = 3230
triggerall = RoundState = 2 && var(59) > 0
triggerall = var(1) = 1
triggerall = var(36) > 0
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype = L
trigger1 = ctrl
trigger1 = numhelper(4000)
trigger1 = abs(helper(4000),pos x - enemynear(var(58)),pos x) < 105
trigger1 = enemynear(var(58)),stateno = 5120 && enemynear(var(58)),animtime = [-30,-27]

;しゃがみ弱攻撃
[State -1]
type = ChangeState
value = 400
triggerall = RoundState = 2 && var(59) > 0
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype = L
triggerall = ctrl
trigger1 = enemynear(var(58)),stateno = 5120 && enemynear(var(58)),vel x = 0
trigger1 = p2bodydist x < 20
trigger1 = enemynear(var(58)),animtime >= -1
trigger2 = enemynear(var(58)),stateno  = 5110 && enemynear(var(58)),vel x = 0
trigger2 = p2bodydist x <= 50
trigger2 = enemynear(var(58)),time = [3,8]
trigger2 = random <= 100

;しゃがみ中攻撃
[State -1]
type = ChangeState
value = 410
triggerall = RoundState = 2 && var(59) > 0
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype = L
triggerall = ctrl
triggerall = random <= 120
trigger1 = enemynear(var(58)),stateno = 5120 && enemynear(var(58)),vel x = 0
trigger1 = p2bodydist x < 45
trigger1 = enemynear(var(58)),animtime = [-12,-5]


;クラッシュ
[State -1]
type = ChangeState
value = 230
triggerall = RoundState = 2 && var(59) > 0
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype = L
triggerall = random <= 200
trigger1 = ctrl
trigger1 = enemynear(var(58)),stateno = 5120 && enemynear(var(58)),vel x = 0
trigger1 = p2bodydist x = [40,80]
trigger1 = enemynear(var(58)),animtime = [-22,-21]
trigger2 = stateno = 410 && animtime = 0
trigger2 = enemynear(var(58)),stateno = 5120
trigger2 = enemynear(var(58)),vel x = 0
trigger2 = enemynear(var(58)),animtime = [-22,-16]
trigger2 = p2bodydist x <= 50

;以下遠距離
;縁
[State -1,f-4]
type = ChangeState
value = 3200
triggerall = RoundState = 2&&var(59) > 0
triggerall = Power >= 1000
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype = L && enemynear(var(58)),stateno <= 5110
triggerall = p2bodydist x > 90
triggerall = palno = [1,6]
triggerall = random >= 400+550*var(36) || power>=3000 && life > 650
triggerall = !inguarddist
trigger1 = ctrl
trigger1 = var(36) < 2
trigger1 = (var(36) > 0 && life <= 333) = 0
trigger1 = teammode = single || teammode = turns && life > 250 || teammode = simul

;中不幸の塊
[State -1,f-5]
type = ChangeState
value = 1305
triggerall = RoundState = 2&&var(59) > 0
triggerall = numhelper(1352) = 0&& numhelper(1353) = 0
triggerall = statetype != A
triggerall = enemynear(var(58)),statetype = L && enemynear(var(58)),stateno <= 5110
triggerall = palno = [1,6]
triggerall = !inguarddist
trigger1 = ctrl
trigger1 = p2bodydist x >=100
trigger1 = numhelper(1351) = 0

;-------------------------------------------------------
;空中

;空中ジャンプ
[State -1,f-6]
type = ChangeState
value = 45
triggerall = RoundState = 2&&var(59) > 0
triggerall = statetype = A
triggerall = (p2dist x - 2*vel x= [-20,-6]) || (random<=200 && p2dist x - 2*vel x= [-5,5])
triggerall = enemynear(var(58)),statetype = L &&  enemynear(var(58)),stateno = [5100,5120]
triggerall = var(46) = 0
triggerall = var(47) = 0
triggerall = Var(2) = 0
triggerall = ctrl

trigger1 = enemynear(var(58)),alive = 1

;空中強攻撃
[State -1,f-7]
type = ChangeState
value = 620
triggerall = RoundState = 2&&var(59) > 0
triggerall = statetype = A
triggerall = enemynear(var(58)),statetype = L && enemynear(var(58)),vel x = 0 && enemynear(var(58)),stateno = 5120
triggerall = p2dist x = [-70,70]
triggerall = ctrl
triggerall = vel y > 1 || pos y > -50
trigger1 = enemynear(var(58)),animtime >= -7
trigger2 = pos y + 10*vel y + 0.5*100*fvar(38) > 0

;______________________________________________________________________
;
;受け身狩り
;______________________________________________________________________
;空中バックダッシュ
[State -1];受け身狩り拒否（翼人モードは受け身狩りしない方が多分強い）
type = ChangeState
value = 115
triggerall = statetype = A && var(59) && roundstate = 2
triggerall = Var(2) = 0
triggerall = Pos Y <= -30
triggerall = palno = [7,12]
triggerall = enemynear(var(58)),movetype = H 
triggerall = enemynear(var(58)),statetype = A || enemynear(var(58)),statetype = L
trigger1 = stateno = 600 && movehit = 1
trigger1 = fvar(34) <= 100
trigger1 = var(56) < 6
trigger2 = stateno = 620 && movehit = 1
trigger2 = fvar(34) <= 100
trigger2 = fvar(1) < 0.4
trigger2 = fvar(1) < 0.3 || vel y > -1

;弱攻撃4F
[State -1,立ち弱]
type = ChangeState
value = 200
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = p2bodydist X < 30 || (fvar(34) <= 100 && frontedgebodydist < 70)
triggerall = enemynear(var(58)),statetype = A
triggerall = statetype != A
triggerall = ctrl
triggerall = p2bodydist x + 5*facing*enemynear(var(58)),facing*(enemynear(var(58)),vel x)*(enemynear(var(58)),backedgebodydist >10)*(enemynear(var(58)),frontedgebodydist>10)<30
triggerall = enemynear(var(58)),pos y > - 40
triggerall = var(45)
trigger1 = (enemynear(var(58)),animtime =[-4,0])||enemynear(var(58)),time >= 11
trigger1 = enemynear(var(58)),stateno = 5210
trigger2 = (enemynear(var(58)),animtime =[-4,0])||enemynear(var(58)),time >= 11
trigger2 = enemynear(var(58)),stateno = [5211,5219]

;弱天津鷹ノ弓
[State -1]
type = ChangeState
value = 2200
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = palno >= 7
triggerall = enemynear(var(58)),statetype = A
triggerall = statetype != A
triggerall = ctrl
triggerall = p2bodydist x > 60 || fvar(34) > 100
triggerall = p2bodydist y = [-50,70]
triggerall = enemynear(var(58)),pos y > - 80
triggerall = var(45)
trigger1 = enemynear(var(58)),stateno = [5210,5219]
trigger2 = numhelper(2310)
trigger2 = helper(2310),movehit
trigger2 = enemynear(var(58)),movetype = H

;空中投げ
[State -1]
type = ChangeState
value = 850
triggerall = roundstate = 2 && var(59)>0
triggerall = enemynear(var(58)),statetype  = A
triggerall = statetype = A && ctrl
triggerall = enemynear(var(58)),movetype != H 
triggerall = P2bodyDist X <= 10 && p2dist x > 0
triggerall = P2Dist Y = [-20,30]
triggerall = var(45) = 1
triggerall = pos Y < -30
trigger1 = (enemynear(var(58)),animtime =[-1,0])||enemynear(var(58)),time >=14
trigger1 = enemynear(var(58)),stateno = 5210
trigger2 = (enemynear(var(58)),animtime =[-1,0])||enemynear(var(58)),time >= 10
trigger2 = enemynear(var(58)),stateno = [5211,5219]
trigger3 = enemynear(var(58)),ctrl = 1


;空中強攻撃
[State -1,f-7]
type = ChangeState
value = 620
triggerall = RoundState = 2&&var(59) > 0
triggerall = statetype = A 
triggerall = ctrl ||(stateno = 610&&movecontact)||(stateno = 600&&movecontact)
triggerall = enemynear(var(58)),statetype =A 
triggerall = var(45) = 1
triggerall = pos y + 10*vel y + 0.5*100*fvar(39) < 0
triggerall = p2bodydist x- 10*(vel x)*(frontedgebodydist >70) + 10*facing*enemynear(var(58)),facing*(enemynear(var(58)),vel x)*(enemynear(var(58)),backedgebodydist >10)*(enemynear(var(58)),frontedgebodydist>10)<80
triggerall = p2bodydist y = [-50,100]
triggerall = enemynear(var(58)),pos y < -20
trigger1 = (enemynear(var(58)),animtime =[-9,0])||enemynear(var(58)),time = [6,9]
trigger1 = enemynear(var(58)),stateno = 5210
trigger2 = (enemynear(var(58)),animtime =[-9,0])||enemynear(var(58)),time >= 5
trigger2 = enemynear(var(58)),stateno = [5211,5219]



























;______________________________________________________________________

;地上固め enemynear(var(58)),statetype != A && moveguarded && enemynear(var(58)),stateno = [120,155]
;______________________________________________________________________
;鳥の詩条件を満たした上でジュース固め中の行動

;弱どろり濃厚
[State -1]
type = ChangeState
value = 1200
triggerall = NumHelper(1210)!
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = statetype != A && ctrl
triggerall = numhelper(20000)
triggerall = helper(20000),var(0) = 1
triggerall = frontedgebodydist <= 80 || p2dist x= [45,65]
trigger1 = numhelper(4200)
trigger1 = helper(4200),stateno = 4210
trigger1 = helper(4200),time <= 95
trigger1 = random <= 150

;中どろり濃厚
[State -1]
type = ChangeState
value = 1201
triggerall = NumHelper(1220)!
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = statetype != A && ctrl
triggerall = numhelper(20000)
triggerall = helper(20000),var(0) = 1
triggerall = frontedgebodydist <= 80 || p2dist x= [45,65]
trigger1 = numhelper(4200)
trigger1 = helper(4200),stateno = 4210
trigger1 = helper(4200),time <= 95
trigger1 = random <= 150

;弱不幸の塊
[State -1]
type = ChangeState
value = 1305
triggerall = numhelper(1352) = 0&& numhelper(1353) = 0
triggerall = RoundState = 2&&var(59) > 0
triggerall = statetype != A && ctrl
triggerall = numhelper(20000)
triggerall = helper(20000),var(0) = 1
triggerall = frontedgebodydist <= 80 || p2dist x= [45,65]
triggerall = numhelper(4200)
triggerall = helper(4200),stateno = 4210
triggerall = helper(4200),time <= 90
triggerall = enemynear(var(58)),backedgebodydist > 130
trigger1 = random <= 200 
trigger1 = helper(4200),time >= 85
trigger2 = numhelper(1351)
trigger2 = abs(helper(1351),pos x - enemynear(var(58)),pos x) <= 50

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

;弱往人
[State -1]
type = ChangeState
value = 3230
triggerall = RoundState = 2 && var(59)>0
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno = [120,155]
triggerall = var(1) = 1
triggerall = var(36) > 0
triggerall = statetype != A
trigger1 = numhelper(4000)
trigger1 = abs(helper(4000),pos x - enemynear(var(58)),pos x) =[20,105]
trigger1 = stateno = 220 || stateno = 215 || stateno = 410 || stateno = 400
trigger1 = moveguarded = 1
trigger1 = (power>=3000 &&( life<= 333|| palno >=7) )|| random <= 100

;強翼
[State -1]
type = ChangeState
value = 1120
triggerall = RoundState = 2 && var(59) > 0
triggerall = var(8) = 1
triggerall = statetype != A
triggerall = palno = [1,6]
triggerall = stateno = 200 || stateno = 210 || stateno = 215 || stateno = 410 || stateno = 400
triggerall = moveguarded
trigger1 = var(7) >=0&&random <= 100 || var(7) <= 50
trigger1 = enemynear(var(58)),movetype = A
trigger1 = inguarddist
trigger1 = enemynear(var(58)),time >= ceil(60*fvar(28)) || random <= 100

;強そらアタック
[State -1]
type = ChangeState
value = 1402
triggerall = RoundState = 2&&var(59)
triggerall = var(1) = 1
triggerall = var(8) = 1 || Var(7) >= 200
triggerall = var(7) >= 0
triggerall = var(36) = 0
triggerall = statetype != A
trigger1 = stateno = 220 || stateno = 215
trigger1 = movecontact = [1,2]
trigger1 = p2movetype != H || p2stateno = [120,155]
trigger1 = var(7) <= 100
trigger1 = random < 200

;ジャンプ
[State -1]
type = ChangeState
value = 41
triggerall = statetype != A
triggerall = var(59)>0&&roundstate = 2
triggerall = palno <= 6
trigger1 = stateno = 410 
trigger1 = moveguarded|| movereversed > 1 && var(28) || movehit && enemynear(var(58)),movetype!= H
trigger1 = fvar(34) <= 100 || fvar(33) <= 100 || (p2bodydist x <= 40 && moveguarded = [2,3])
trigger1 = random <= 250
trigger2 = stateno = 200 || stateno = 210 || stateno = 215 || stateno = 410
trigger2 = moveguarded || movereversed > 1 && var(28)|| movehit && enemynear(var(58)),movetype!= H
trigger2 = enemynear(var(58)),movetype = A
trigger2 = inguarddist
trigger2 = enemynear(var(58)),time >= ceil(60*fvar(28)) || random <= 100

;しゃがみ弱攻撃
[State -1]
type = ChangeState
value = 400
triggerall = RoundState = 2&&var(59) > 0
triggerall = enemynear(var(58)),statetype != A &&  enemynear(var(58)),stateno = [120,155]
triggerall = statetype != A
triggerall = numhelper(20000)
triggerall = helper(20000),var(0) = 0
triggerall = p2dist x> 0
trigger1 = numhelper(4200)
trigger1 = random <= 50
trigger1 = helper(4200),stateno = 4210 && helper(4200),numtarget(4210)>0
trigger1 = ctrl
trigger1 = helper(4200),time <= 104
trigger1 = p2bodydist x <= 30 
trigger2 = stateno = 200 || stateno = 400
trigger2 = moveguarded%2 = 1 || movereversed%2 = 1 && var(28)
trigger2 = p2bodydist x <= 18
trigger2 = random <= 400

;しゃがみ中攻撃
[State -1]
type = ChangeState
value = 410
triggerall = RoundState = 2&&var(59) > 0
triggerall = enemynear(var(58)),statetype != A &&  enemynear(var(58)),stateno = [120,155]
triggerall = statetype != A
triggerall = numhelper(20000)
triggerall = helper(20000),var(0) = 0
triggerall = p2dist x> 0
trigger1 = numhelper(4200)
trigger1 = random <= 100
trigger1 = helper(4200),stateno = 4210 && helper(4200),numtarget(4210)>0
trigger1 = ctrl
trigger1 = helper(4200),time <= 104
trigger1 = p2bodydist x <= 30 
trigger2 = stateno = 200 || stateno = 400
trigger2 = moveguarded = 1
trigger2 = p2bodydist x <= 25
trigger2 = random <= 400


;クラッシュ
[State -1]
type = ChangeState
value = 230
triggerall = RoundState = 2&&var(59) > 0
triggerall = enemynear(var(58)),statetype != A &&  enemynear(var(58)),stateno = [120,155]
triggerall = statetype != A
triggerall = numhelper(20000)
triggerall = helper(20000),var(0) = 0
trigger1 = numhelper(4200)
trigger1 = random <= 120
trigger1 = helper(4200),stateno = 4210 && helper(4200),numtarget(4210)>0
trigger1 = ctrl
trigger1 = helper(4200),time <= 100
trigger1 = p2bodydist x <= 70 && enemynear(var(58)),statetype = C
trigger2 = (stateno = [200,215]) || stateno = [400,410]
trigger2 = moveguarded = 1
trigger2 = enemynear(var(58)),statetype = C
trigger2 = random <= 300


;中攻撃
[State -1]
type = ChangeState
value = 215
triggerall = RoundState = 2&&var(59) > 0
triggerall = enemynear(var(58)),statetype != A &&  enemynear(var(58)),stateno = [120,155]
triggerall = statetype != A
triggerall = p2bodydist x > 50
triggerall = numhelper(20000)
triggerall = helper(20000),var(0) = 0
trigger1 = numhelper(4200)
trigger1 = random <= 120
trigger1 = helper(4200),stateno = 4210 && helper(4200),numtarget(4210)>0
trigger1 = ctrl
trigger1 = helper(4200),time <= 100
trigger1 = p2bodydist x = [50,70]
trigger2 = stateno = 410
trigger2 = moveguarded = 1
trigger2 = random <= 300

;-----------------
;statetype = A

;空中ダッシュ
[State -1]
type = ChangeState
value = 110
triggerall = statetype = A && var(59) && roundstate = 2
triggerall = Var(2) = 0
triggerall = Pos Y <= -20
triggerall = enemynear(var(58)),statetype != A
trigger1 = p2dist x > 0
trigger1 = stateno = 610 && movecontact
trigger1 = vel y <= 0 

;空中弱攻撃
[State -1]
type = ChangeState
value = 600
triggerall = RoundState = 2 && var(59)
triggerall = statetype = A
triggerall = enemynear(var(58)),statetype != A || p2bodydist y = [-10,90]
triggerall = enemynear(var(58)),movetype != H || enemynear(var(58)),stateno = [120,155]
triggerall = pos y + 9*vel y + 0.5*81*fvar(39)<0
trigger1 = ctrl && var(2) != 0
trigger1 = pos y + 14*vel y + 0.5*196*fvar(39) < 0
trigger1 = pos y + 21*vel y + 0.5*441*fvar(39) > 0
trigger1 = p2bodydist x - 5*vel x <= 35
trigger1 = enemynear(var(58)),stateno = [120,155]
trigger2 = stateno = 600 
trigger2 = moveguarded || var(28) && movereversed > 1
trigger2 = pos y + 9*vel y + 0.5*81*fvar(39) > 0
 
;空中中攻撃
[State -1]
type = ChangeState
value = 610
triggerall = RoundState = 2 && var(59)
triggerall = statetype = A
triggerall = enemynear(var(58)),statetype != A || p2bodydist y = [-10,90]
triggerall = pos y + 9*vel y + 0.5*81*fvar(39)<0
triggerall = enemynear(var(58)),movetype != H || enemynear(var(58)),stateno = [120,155]
trigger1 = ctrl && enemynear(var(58)),ctrl = 0
trigger1 = p2bodydist x - 9*vel x<= 45
trigger1 = enemynear(var(58)),stateno = [120,155]
trigger2 = stateno = 600
trigger2 = movecontact || var(28) && movereversed > 1
trigger2 = pos y + 12*vel y + 0.5*144*fvar(39) >= -5

;空中強攻撃
[State -1]
type = ChangeState
value = 620
triggerall = RoundState = 2 && var(59)
triggerall = statetype = A
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),movetype != H || enemynear(var(58)),stateno = [120,155]
trigger1 = pos y + 12*vel y + 0.5*144*fvar(39) < -5
trigger1 = stateno = 600
trigger1 = movecontact || var(28) && movereversed > 1
trigger1 = vel y > 0 
trigger2 = stateno = 610
trigger2 = movecontact || var(28) && movereversed > 1
trigger2 = vel y > 0



;______________________________________________________________________
;
;空中ブロ,リコイル潰し
;______________________________________________________________________
[state -3]
type = changestate
value = 200
triggerall = roundstate = 2 && var(59) > 0
triggerall = statetype != A && statetype != L
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype != H
trigger1 = stateno = 200 
trigger1 = movecontact || var(28) && movereversed > 1






;______________________________________________________________________

;技ふり
;______________________________________________________________________


;屈弱攻撃
[State -1,60]
type = changestate
value = 400
triggerall = RoundState = 2
triggerall = stateno != 101
triggerall = var(59)>0
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = enemynear(var(58)),stateno != [5200,5205]
triggerall = !inguarddist
triggerall = enemynear(var(58)),movetype != H ||enemynear(var(58)),ctrl = 1 || enemynear(var(58)),stateno = [120,155]
triggerall = enemynear(var(58)),statetype != L
triggerall = fvar(20) = [0,11]
triggerall = p2dist x > 0
triggerall = numhelper(20000)
triggerall = helper(20000),var(0) = 0
triggerall = random <= 200
triggerall = prevstateno != 400 || time > 5
trigger1 = prevstateno != 5120
trigger1 = p2bodydist x<= 15
trigger1 = enemynear(var(58)),statetype != A && !(enemynear(var(58)),hitdefattr = SCA,AA,AT,AP)
trigger1 = enemynear(var(58)),movetype != A || enemynear(var(58)),time <= 2

;しゃがみ中攻撃
[State -1,68-1]
type = ChangeState
value = 410
triggerall = (var(59)>0)&&roundstate=2
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = p2statetype != L
TriggerAll = !InGuardDist
triggerall = prevstateno != 5120
triggerall = stateno !=101
triggerall = enemynear(var(58)),stateno != [5200,5205]
triggerall = p2dist x > 0
trigger1 = ceil(p2bodydist x + 7*(enemynear(var(58)),facing)*(facing)*enemynear(var(58)),vel x)=[17,50]
trigger1 = enemynear(var(58)),statetype!=A
trigger1 = enemynear(var(58)),movetype != A || prevstateno = [160,162]
trigger1 = enemynear(var(58)),ctrl = 1 || enemynear(var(58)),stateno!=[120,155]
trigger1 = enemynear(var(58)),movetype!=H
trigger1 = random<55


;弱草薙シ光ノ刃
[State -1]
type = ChangeState
value = 2000
triggerall = RoundState = 2
triggerall = stateno != 101
triggerall = var(59)=[1,10]
triggerall = palno = [7,12]
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = enemynear(var(58)),stateno != [5200,5205]
triggerall = !inguarddist
triggerall = enemynear(var(58)),movetype != H || enemynear(var(58)),ctrl = 1 ||enemynear(var(58)),stateno = [120,155]
triggerall = enemynear(var(58)),statetype != L
triggerall = fvar(20) = [0,11]
triggerall = p2dist x > 0
triggerall = numhelper(20000)
triggerall = helper(20000),var(0) = 0
trigger1 = ceil(p2bodydist x + 17*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x) = [80,230]
trigger1 = enemynear(var(58)),movetype != A
trigger1 = random <= 50
trigger1 = enemynear(var(58)),statetype != A && enemynear(var(58)),stateno != [35,50]
trigger2 = numenemy = 2
trigger2 = p2bodydist x = [80,230]
trigger2 = enemynear(var(58)),facing = facing
trigger2 = enemynear(var(58)),pos y >= -70
trigger2 = random <= 50

;遠中攻撃
[State -1,60]
type = changestate
value = 215
triggerall = RoundState = 2
triggerall = stateno != 101
triggerall = var(59)>0
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = enemynear(var(58)),stateno != [5200,5205]
triggerall = !inguarddist
triggerall = p2bodydist x > 50
triggerall = enemynear(var(58)),movetype != H || enemynear(var(58)),ctrl = 1 ||enemynear(var(58)),stateno = [120,155]
triggerall = enemynear(var(58)),statetype != L
triggerall = fvar(20) = [0,11]
triggerall = p2dist x > 0
triggerall = numhelper(20000)
triggerall = helper(20000),var(0) = 0
trigger1 = ceil(p2bodydist x + 9*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x) <= 80
trigger1 = random <= 65
trigger1 = enemynear(var(58)),statetype != A

trigger2 = ceil(p2bodydist x + 9*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x) <= 80
trigger2 = random <= 65
trigger2 = enemynear(var(58)),statetype = A
trigger2 = enemynear(var(58)),ctrl = 0 && enemynear(var(58)),stateno = [120,155]
trigger2 = enemynear(var(58)),pos y = [-50,-20]

;強攻撃
[State -1,60]
type = changestate
value = 220
triggerall = RoundState = 2
triggerall = stateno != 101
triggerall = var(59)=[1,10]
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = enemynear(var(58)),stateno != [5200,5205]
triggerall = !inguarddist
triggerall = enemynear(var(58)),movetype != H || enemynear(var(58)),ctrl = 1 ||enemynear(var(58)),stateno = [120,155]
triggerall = enemynear(var(58)),statetype != L
triggerall = fvar(20) = [0,11]
triggerall = p2dist x > 0
triggerall = numhelper(20000)
triggerall = helper(20000),var(0) = 0
trigger1 = ceil(p2bodydist x + 10*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x) = [80,100]
trigger1 = enemynear(var(58)),movetype != A
trigger1 = random <= 20
trigger1 = enemynear(var(58)),statetype != A && enemynear(var(58)),stateno != [35,50]

;弱天ヲ仰グ月ノ石
[State -1]
type = ChangeState
value = 2300
triggerall = RoundState = 2
triggerall = stateno != 101
triggerall = var(59)=[1,10]
triggerall = palno = [7,12]
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = enemynear(var(58)),stateno != [5200,5205]
triggerall = !inguarddist
triggerall = enemynear(var(58)),movetype != H || enemynear(var(58)),ctrl = 1 ||enemynear(var(58)),stateno = [120,155]
triggerall = enemynear(var(58)),statetype != L
triggerall = fvar(20) = [0,11]
triggerall = p2dist x > 0
triggerall = numhelper(20000)
triggerall = helper(20000),var(0) = 0
trigger1 = ceil(p2bodydist x + 17*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x) = [70,120]
trigger1 = random <= 50
trigger1 = enemynear(var(58)),pos y >= -90


;中天ヲ仰グ月ノ石
[State -1]
type = ChangeState
value = 2301
triggerall = RoundState = 2
triggerall = stateno != 101
triggerall = var(59)=[1,10]
triggerall = palno = [7,12]
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = enemynear(var(58)),stateno != [5200,5205]
triggerall = !inguarddist
triggerall = enemynear(var(58)),movetype != H || enemynear(var(58)),ctrl = 1 ||enemynear(var(58)),stateno = [120,155]
triggerall = enemynear(var(58)),statetype != L
triggerall = fvar(20) = [0,11]
triggerall = p2dist x > 0
triggerall = numhelper(20000)
triggerall = helper(20000),var(0) = 0
trigger1 = ceil(p2bodydist x + 17*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x) = [140,200]
trigger1 = random <= 30
trigger1 = enemynear(var(58)),pos y >= -90
trigger1 = frontedgebodydist > 100

;強天ヲ仰グ月ノ石
[State -1]
type = ChangeState
value = 2302
triggerall = RoundState = 2
triggerall = stateno != 101
triggerall = var(59)=[1,10]
triggerall = palno = [7,12]
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = enemynear(var(58)),stateno != [5200,5205]
triggerall = !inguarddist
triggerall = enemynear(var(58)),movetype != H || enemynear(var(58)),ctrl = 1 ||enemynear(var(58)),stateno = [120,155]
triggerall = enemynear(var(58)),statetype != L
triggerall = fvar(20) = [0,11]
triggerall = p2dist x > 0
triggerall = numhelper(20000) && numhelper(20004)
triggerall = helper(20000),var(0) = 0
trigger1 = ceil(p2bodydist x + 17*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x) = [220,300]
trigger1 = random <= 50 || (enemynear(var(58)),animtime = [-25,-17]) && enemynear(var(58)),ctrl = 0 && random < 200
trigger1 = enemynear(var(58)),pos y >= -90
trigger1 = frontedgebodydist > 160

;対空？
;立ち弱攻撃
[State -1,60]
type = changestate
value = 200
triggerall = RoundState = 2
triggerall = stateno != 101
triggerall = var(59)=[1,10]
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = enemynear(var(58)),stateno != [5200,5205]
triggerall = enemynear(var(58)),statetype != L
triggerall = !inguarddist
triggerall = var(45) = 0 || enemynear(var(58)),stateno != [5210,5219]
trigger1 = numhelper(20003)>0
trigger1 = helper(20003),inguarddist=0 && palno <= 6||enemynear(var(58)),movetype!=A
trigger1 = enemynear(var(58)),statetype=A&&(enemynear(var(58)),movetype!=H|| enemynear(var(58)),stateno = [120,155])
trigger1 = (enemynear(var(58)),pos y + 5*fvar(13) + 0.5*25*fvar(38)=[-25,-5])||(fvar(13) = 0 && enemynear(var(58)),pos y > - 25)
trigger1 = ceil(p2bodydist x + 5*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x) < 18 || fvar(34) <= 90


;---------------------------
;遠距離

;-------------------
;タッグ用ぶっぱ
;-------------------

;ポテトシュート!!
[State -1]
type = ChangeState
value = 3231
triggerall = RoundState = 2 && var(59)>0
triggerall = var(1) = 1
triggerall = var(36) > 0
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = var(52) = 1 && numenemy = 2
triggerall = (facing*(pos x - enemynear(0),pos x) < 0 && facing*(pos x - enemynear(1),pos x) < 0&& power > 1000 )
triggerall = random <= 30
trigger1 = abs(pos x - enemynear(0),pos x) > 100 
trigger1 = abs(pos x - enemynear(0),pos x) > 100
trigger1 = enemynear(0),statetype != L || enemynear(1),statetype != L



;強がおがおファイアー
[State -1]
type = ChangeState
value = 3002
triggerall = Power >= 3000
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = palno = [1,6]
triggerall = var(52) = 1 && numenemy = 2
triggerall =  (facing*(pos x - enemynear(0),pos x) < 0 && facing*(pos x - enemynear(1),pos x)<0)
triggerall = random <= 30
trigger1 = (abs(pos x - enemynear(1),pos x) > 100) && abs(pos x - enemynear(0),pos x) > 100
trigger1 = enemynear(0),statetype != L || enemynear(1),statetype != L

;中がおがおファイアー
[State -1]
type = ChangeState
value = 3001
triggerall = Power >= 2000
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = var(52) = 1 && numenemy = 2
triggerall =  (facing*(pos x - enemynear(0),pos x) < 0 && facing*(pos x - enemynear(1),pos x)<0)
triggerall = random <= 20
trigger1 = (enemynear(1),pos y > -70 && abs(pos x - enemynear(1),pos x) = [100,200]) && enemynear(0),pos y> -70&&abs(pos x - enemynear(0),pos x) = [100,200]
trigger1 = enemynear(0),statetype != L || enemynear(1),statetype != L

;弱がおがおファイアー
[State -1]
type = ChangeState
value = 3000
triggerall = Power >= 1000
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = var(52) = 1 && numenemy = 2
triggerall =  (facing*(pos x - enemynear(0),pos x) < 0 && facing*(pos x - enemynear(1),pos x)<0)
triggerall = random <= 20
trigger1 = (enemynear(1),pos y > -70 && abs(pos x - enemynear(1),pos x) = [100,200]) && enemynear(0),pos y> -70&&abs(pos x - enemynear(0),pos x) = [100,200]
trigger1 = enemynear(0),statetype != L || enemynear(1),statetype != L

;------------------
;翼人モード用遠距離
;------------------
;弱天津鷹ノ弓
[State -1]
type = ChangeState
value = 2200
triggerall = RoundState = 2 && var(59)
triggerall = palno = [7,12]
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = enemynear(var(58)),movetype != H || enemynear(var(58)),stateno = [120,155]
triggerall = fvar(34) > 100
triggerall = random <= 100
triggerall = enemynear(var(58)),pos y + 10*fvar(13) >= -100
trigger1 = p2bodydist x + 10*enemynear(var(58)),facing*facing*enemynear(var(58)),vel x > 170
trigger1 = enemynear(var(58)),facing*facing*enemynear(var(58)),vel x > 0
trigger1 = numhelper(20003) && numhelper(20004)
trigger1 = !inguarddist && helper(20003),inguarddist = 0&& helper(20004),inguarddist = 0

trigger2 = p2bodydist x > 150
trigger2 = numhelper(20003) && numhelper(20004)
trigger2 = !inguarddist && helper(20003),inguarddist = 0&& helper(20004),inguarddist = 0
trigger2 = helper(20000),var(7) > 60*(helper(20000),var(6))**2

trigger3 = p2bodydist x > 120
trigger3 = fvar(31) > 1.5

;強天津鷹ノ弓
[State -1]
type = ChangeState
value = 2201
triggerall = RoundState = 2 && var(59)
triggerall = palno = [7,12]
triggerall = var(8) = 1 || Var(7) >= 200
triggerall = var(7) >= 0
triggerall = random <= ceil(0.1*var(7)*(1+var(8)))
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = enemynear(var(58)),movetype != H || enemynear(var(58)),stateno = [120,155]
triggerall = fvar(34) > 100
trigger1 = p2bodydist x + 10*enemynear(var(58)),facing*facing*enemynear(var(58)),vel x> 150
trigger1 = enemynear(var(58)),facing*facing*enemynear(var(58)),vel x > 0
trigger1 = numhelper(20003) && numhelper(20004)
trigger1 = !inguarddist && helper(20003),inguarddist = 0&& helper(20004),inguarddist = 0

trigger2 = p2bodydist x > 150
trigger2 = numhelper(20003) && numhelper(20004)
trigger2 = !inguarddist && helper(20003),inguarddist = 0&& helper(20004),inguarddist = 0
trigger2 = helper(20000),var(7) > 60*(helper(20000),var(6))**2

trigger3 = p2bodydist x > 120
trigger3 = fvar(31) > 0.5

;-----------------------------------------------------------------------------------------------
;縁
[State -1]
type = ChangeState
value = 3200
triggerall = RoundState = 2&&var(59) > 0
triggerall = Power >= 1000
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = var(36)<3
triggerall = palno <= 6 || random <= 50
trigger1 = enemynear(var(58)),statetype = A && fvar(34) > 100 && numtarget(1101)
trigger1 = enemynear(var(58)),movetype = H && p2bodydist x > 70
trigger1 = random < 0.2*life/(var(36) + 2)
trigger1 = (var(36) > 0 && life <= 333) = 0
trigger1 = teammode = single || teammode = turns && life > 250 || teammode = simul

;強不幸の塊
[State -1]
type = ChangeState
value = 1306
triggerall = var(8) = 1 || Var(7) >= 200
triggerall = var(7) >= 0
triggerall = numhelper(1352) = 0&& numhelper(1353) = 0
triggerall = RoundState = 2&&var(59) > 0
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = enemynear(var(58)),statetype = A && fvar(34) > 100
triggerall = p2bodydist x > 120
triggerall = numhelper(1350) = 0
triggerall = numhelper(20000)
triggerall = helper(20000),var(6) <= 2 && random <= 800 - 300*helper(20000),var(6)
trigger1 = numhelper(1351) = 0
trigger1 = enemynear(var(58)),vel x = 0 && fvar(13) < 0
trigger1 = enemynear(var(58)),movetype != H 
trigger2 = numtarget(1101)
trigger2 = numhelper(1351)
trigger2 = abs(helper(1351),pos x - pos x) > abs(helper(1351),pos x- pos x)
trigger3 = numhelper(4000)
trigger3 = helper(4000),stateno = [4100,4111]
trigger3 = facing*enemynear(var(58)),facing*enemynear(var(58)),vel x>=-3

;弱絵日記
[State -1]
type = ChangeState
value = 1000
triggerall = NumHelper(1010)!
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = numhelper(20000)
triggerall = helper(20000),var(7) <= 50*(helper(20000),var(6))**2 || (numhelper(1210) && numhelper(1220))
triggerall = random < 30 - 29*(palno>=7)
triggerall = numhelper(20003) && numhelper(20004)
triggerall = !inguarddist && helper(20003),inguarddist = 0&& helper(20004),inguarddist = 0
trigger1 = p2bodydist x  + 15*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x > 120
trigger1 = enemynear(var(58)),stateno != 5656

;中絵日記
[State -1]
type = ChangeState
value = 1001
triggerall = NumHelper(1020)!
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = numhelper(20000)
triggerall = helper(20000),var(7) <= 50*(helper(20000),var(6))**2 || (numhelper(1210) && numhelper(1220))
triggerall = random < 30 - 29*(palno>=7)
triggerall = numhelper(20003) && numhelper(20004)
triggerall = !inguarddist && helper(20003),inguarddist = 0&& helper(20004),inguarddist = 0
trigger1 = p2bodydist x  + 15*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x > 120
trigger1 = enemynear(var(58)),stateno != 5656


;弱どろり濃厚
[State -1]
type = ChangeState
value = 1200
triggerall = NumHelper(1210)!
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = enemynear(var(58)),statetype = A && enemynear(var(58)),movetype = H && enemynear(var(58)),stateno != [120,155]
triggerall = numhelper(20000)
triggerall = helper(20000),var(7) > 50*(helper(20000),var(6))**2 || (numhelper(1020) && numhelper(1010))
triggerall = random < 30 - 29*(palno>=7)
triggerall = numhelper(20003) && numhelper(20004)
triggerall = !inguarddist && helper(20003),inguarddist = 0&& helper(20004),inguarddist = 0
trigger1 = p2bodydist x  + 15*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x > 120
trigger1 = enemynear(var(58)),stateno != 5656

;中どろり濃厚
[State -1]
type = ChangeState
value = 1201
triggerall = NumHelper(1220)!
triggerall = RoundState = 2 && var(59)
triggerall = stateno != 101
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = enemynear(var(58)),statetype != A && enemynear(var(58)),movetype != H
triggerall = numhelper(20000)
triggerall = helper(20000),var(7) > 50*(helper(20000),var(6))**2 || (numhelper(1020) && numhelper(1010))
triggerall = random < 30 - 29*(palno>=7)
triggerall = numhelper(20003) && numhelper(20004)
triggerall = !inguarddist && helper(20003),inguarddist = 0&& helper(20004),inguarddist = 0
trigger1 = p2bodydist x  + 15*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x > 120
trigger1 = enemynear(var(58)),stateno != 5656

;弱不幸の塊
[State -1]
type = ChangeState
value = 1304
triggerall = numhelper(1352) = 0&& numhelper(1353) = 0
triggerall = RoundState = 2&&var(59) > 0
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = enemynear(var(58)),statetype = A && fvar(34) > 100
triggerall = enemynear(var(58)),movetype != H && p2bodydist x > 120
triggerall = enemynear(var(58)),vel x = 0 && fvar(13) <-4
triggerall = numhelper(1350) = 0
trigger1 = numhelper(1351) = 0
trigger2 = numhelper(1351)
trigger2 = abs(helper(1351),pos x - pos x) > abs(helper(1351),pos x- pos x)

;中不幸の塊
[State -1]
type = ChangeState
value = 1305
triggerall = numhelper(1352) = 0&& numhelper(1353) = 0
triggerall = RoundState = 2&&var(59) > 0
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = enemynear(var(58)),statetype = A && fvar(34) > 100 && numtarget(1101)
triggerall = enemynear(var(58)),movetype = H && p2bodydist x > 70
triggerall = enemynear(var(58)),stateno != 5656 || palno<=6
trigger1 = numhelper(1351) = 0
trigger2 = numhelper(1351)
trigger2 = abs(helper(1351),pos x - pos x) > abs(helper(1351),pos x- pos x)

;中不幸の塊
[State -1]
type = ChangeState
value = 1305
triggerall = numhelper(1352) = 0&& numhelper(1353) = 0
triggerall = RoundState = 2&&var(59) > 0
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = enemynear(var(58)),statetype != A &&enemynear(var(58)),movetype != H&& fvar(34) > 100
triggerall = p2bodydist x > 150 && numhelper(1351) = 0
triggerall = numhelper(20003) && numhelper(20004)
triggerall = !inguarddist && helper(20003),inguarddist = 0&& helper(20004),inguarddist = 0
trigger1 = random <= 100 - 90*(palno>=7)
trigger2 = numhelper(4000)
trigger2 = helper(4000),stateno = [4100,4111]
trigger2 = facing*enemynear(var(58)),facing*enemynear(var(58)),vel x>= -1
trigger2 = palno <= 6

;弱そらアタック
[State -1]
type = ChangeState
value = 1400
triggerall = var(1) = 1
triggerall = var(36) = 0
triggerall = RoundState = 2&&var(59) > 0
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = enemynear(var(58)),statetype != A &&enemynear(var(58)),movetype != H&& fvar(34) > 100
triggerall = numhelper(20000)
triggerall = palno = [1,6]
trigger1 = p2bodydist x > 150
trigger1 = numhelper(20003) && numhelper(20004)
trigger1 = !inguarddist && helper(20003),inguarddist = 0&& helper(20004),inguarddist = 0
trigger1 = helper(20000),var(7) < 60*(helper(20000),var(6))**2
trigger2 = p2bodydist x > 120
trigger2 = p2name = "saya"
trigger2 = var(52) != 1

;中そらアタック
[State -1]
type = ChangeState
value = 1401
triggerall = var(1) = 1
triggerall = var(36) = 0
triggerall = RoundState = 2&&var(59) > 0
triggerall = statetype != A
triggerall = ctrl || stateno = 120 && prevstateno = [160,161]
triggerall = enemynear(var(58)),statetype = A &&enemynear(var(58)),movetype != H&& fvar(34) > 100
triggerall = palno = [1,6]
trigger1 = p2bodydist x + 10*enemynear(var(58)),facing*facing*enemynear(var(58)),vel x> 150
trigger1 = enemynear(var(58)),facing*facing*enemynear(var(58)),vel x > 0
trigger1 = numhelper(20003) && numhelper(20004)
trigger1 = !inguarddist && helper(20003),inguarddist = 0&& helper(20004),inguarddist = 0
trigger1 = random <= p2bodydist x

trigger2 = p2bodydist x > 150
trigger2 = numhelper(20003) && numhelper(20004)
trigger2 = !inguarddist && helper(20003),inguarddist = 0&& helper(20004),inguarddist = 0
trigger2 = helper(20000),var(7) > 60*(helper(20000),var(6))**2
;----------------------------------------------------------------------
;statetype = A


;空中弱攻撃
[State -1]
type = ChangeState
value = 600
triggerall = RoundState = 2 && var(59)
triggerall = statetype = A
triggerall = ctrl || stateno = 120 && prevstateno = [160,162]
triggerall = enemynear(var(58)),movetype != H && enemynear(var(58)),statetype != L
triggerall = p2dist x > 0
triggerall = enemynear(var(58)),stateno < 5000 || var(45) = 0
trigger1 = enemynear(var(58)),statetype = A
trigger1 =  (enemynear(var(58)),pos y + 5*fvar(13) + 0.5*25*fvar(38))-(pos y + 5*vel y + 0.5*25*fvar(39)) = [-10,40]
trigger1 = p2bodydist x -5*vel x + 5*facing*enemynear(var(58)),facing*enemynear(var(58)),vel x<= 20
trigger1 = random <= 50
trigger1 = !inguarddist

;空中中攻撃
[State -1]
type = ChangeState
value = 610
triggerall = RoundState = 2 && var(59)
triggerall = statetype = A
triggerall = ctrl || stateno = 120 && prevstateno = [160,162]
triggerall = p2dist x > 20
triggerall = enemynear(var(58)),stateno < 5000 || var(45) = 0
triggerall = enemynear(var(58)),movetype != H && enemynear(var(58)),statetype != L
trigger1 = stateno = 111
trigger1 = enemynear(var(58)),statetype = C || enemynear(var(58)),statetype = S
trigger1 = p2bodydist x - 10*vel x < 55
trigger1 = pos y + 9*vel y + 0.5*81*fvar(39) = [-40,0]
trigger1 = random <= 500 || enemynear(var(58)),stateno = [120,155]
trigger1 = !(enemynear(var(58)),hitdefattr = SA,SA,HA,SP,HP) || !inguarddist

;空中強攻撃
[State -1]
type = ChangeState
value = 620
triggerall = RoundState = 2 && var(59)
triggerall = statetype = A
triggerall = ctrl || stateno = 120 && prevstateno = [160,162]
triggerall = enemynear(var(58)),movetype != H && enemynear(var(58)),statetype != L
triggerall = enemynear(var(58)),stateno < 5000 || var(45) = 0
trigger1 = p2bodydist x - 12*vel x <= 40 || p2dist x = [-80,60]
trigger1 = pos y + 12*vel y + 0.5*144*fvar(39) = [-30,0]
trigger1 = random <= 200 + 500*(vel x = 0) + 150*(p2bodydist x < 0) || enemynear(var(58)),stateno = [120,155]
trigger1 = enemynear(var(58)),statetype = S || enemynear(var(58)),statetype = C
trigger2 = p2dist x = [-70,70]
trigger2 = enemynear(var(58)),statetype = A
trigger2 = (enemynear(var(58)),pos y + 12*fvar(13) + 0.5*144*fvar(38))-(pos y + 12*vel y + 0.5*144*fvar(39)) = [-40,60]
trigger2 = random <= 100
trigger2 = !inguarddist

;______________________________________________________________________

;立ち回り
;______________________________________________________________________

[state -3,walk]
type= changestate
value=18
triggerall = var(59)>0&&roundstate=2
triggerall = ctrl&&statetype!=A
triggerall = stateno!=18&&stateno !=19&&stateno!=[101,103]
triggerall = !inguarddist
triggerall = enemynear(var(58)),movetype != H || palno <= 6 || enemynear(var(58)),stateno != 9010 || fvar(34) > 100 || fvar(1) <0.75
trigger1 = enemynear(var(58)),statetype != L
trigger1 = numhelper(20000)
trigger1 = p2bodydist x >=40
trigger1 = random <= 100 || helper(20000),var(0) = 1
trigger1 = helper(20000),var(0) = 0 || (p2dist x  > 65 && frontedgebodydist>86)
trigger1 = numhelper(4225) = 0
trigger1 = numtarget || enemynear(var(58)),movetype != H || palno <= 6
trigger2 = enemynear(var(58)),statetype = L && p2bodydist x > 80
trigger3 = p2bodydist x < 30 && enemynear(var(58)),statetype = C
trigger3 = p2dist x > -5
trigger3 = var(52) = 0
trigger3 = numhelper(4225)
trigger3 = helper(4225),numtarget(4225)
trigger3 = helper(4225),facing = facing
trigger4 = enemynear(var(58)),movetype = H && enemynear(var(58)),statetype = A && enemynear(var(58)),stateno = 5656
trigger4 = p2dist x + fvar(30)*enemynear(var(58)),facing*facing*enemynear(var(58)),vel x > 25 || enemynear(var(58)),facing*facing > 0
trigger4 = enemynear(var(58)),pos y + 5*fvar(13) + 0.5*25*fvar(38) < - 30
trigger5 = enemynear(var(58)),hitfall = 1
trigger5 = enemynear(var(58)),stateno != 5656 && enemynear(var(58)),statetype = A
trigger5 = p2dist x > 10
trigger5 = var(56) > 6 || enemynear(var(58)),stateno = 9011 || enemynear(var(58)),hitshakeover = 0

[state -3,walk]
type= changestate
value=19
triggerall = var(59)>0&&roundstate=2
triggerall = ctrl&&statetype!=A
triggerall = stateno!=18&&stateno !=19&&stateno!=[101,103]
triggerall = !inguarddist
triggerall = backedgebodydist > 10
trigger1 = enemynear(var(58)),statetype = L && p2bodydist x < 30
trigger2 = numhelper(20000)
trigger2 = helper(20000),var(0) = 1 && p2dist x  < 45
trigger3 = numhelper(20000)
trigger3 = helper(20000),var(0) = 0 && random <= 50 + 100*var(52)
trigger3 = enemynear(var(58)),movetype != H || enemynear(var(58)),statetype = L
trigger3 = fvar(34) > 90 || p2statetype != A
trigger3 = (p2statetype = A && p2bodydist x < 50 && enemynear(var(58)),vel x = [-1,1]) = 0
trigger4 = enemynear(var(58)),movetype = H && enemynear(var(58)),statetype = A && enemynear(var(58)),stateno = 5656
trigger4 = p2dist x + fvar(30)*enemynear(var(58)),facing*facing*enemynear(var(58)),vel x < 10 
trigger4 = enemynear(var(58)),pos y + 5*fvar(13) + 0.5*25*fvar(38) < - 30

;ダッシュ
[State -1]
type = ChangeState
value = 100
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A && ctrl
triggerall = !inguarddist
triggerall = numhelper(20003)&&numhelper(20004)&&numhelper(20000)
triggerall = helper(20003),inguarddist = 0 && helper(20004),inguarddist = 0
triggerall = palno = [1,6]
triggerall = helper(20000),var(0)=0
trigger1 = enemynear(var(58)),stateno = 5110 && p2bodydist x > 150
trigger1 = random <= 35
trigger2 = p2bodydist x >= 150
trigger2 = numhelper(1351)
trigger2 = abs(helper(1351),pos x - enemynear(var(58)),pos x)
trigger2 = random <= 35

trigger3 = p2bodydist x >= 110
trigger3 = numhelper(1351)
trigger3 = helper(1351),movehit = 1
trigger3 = enemynear(var(58)),pos y > -50

trigger4 = enemynear(var(58)),movetype = H && p2bodydist x > 100
trigger4 = !Inguarddist
trigger4 = numhelper(20003) && numhelper(20004)
trigger4 = helper(20003),inguarddist = 0 && helper(20004),inguarddist = 0
trigger4 = random <= 25 + 200*(p2stateno = [9010,9011])

trigger5 = enemynear(var(58)),stateno = [120,155]
trigger5 = !inguarddist
trigger5 = numhelper(20003) && numhelper(20004)
trigger5 = helper(20003),inguarddist = 0 && helper(20004),inguarddist = 0
trigger5 = numhelper(1351) || numhelper(1352) || numhelper(1353)
trigger5 = random <= 55

trigger6 = enemynear(var(58)),movetype = I
trigger6 = p2bodydist x >= 120
trigger6 = enemynear(var(58)),numhelper <= helper(20000),var(8) || enemynear(var(58)),numproj = 0
trigger6 = !inguarddist
trigger6 = numhelper(20003) && numhelper(20004)
trigger6 = helper(20003),inguarddist = 0 && helper(20004),inguarddist = 0
trigger6 = random <= 20

trigger7 = var(52) = 1
trigger7 = enemynear(var(58)),facing = facing
trigger7 = enemynear(var(58)),movetype = A
trigger7 = p2bodydist x >= 120 
trigger7 = random <= 150

trigger8 = numhelper(4200)
trigger8 = helper(4200),stateno = 4210
trigger8 = helper(4200),numtarget
trigger8 = p2bodydist x > 100

;後退ダッシュ
[State -1]
type = ChangeState
value = 105
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A && ctrl
triggerall = backedgebodydist > 50
triggerall = palno = [1,6]
triggerall = numhelper(20000)
trigger1 = enemynear(var(58)),stateno = 5110 || enemynear(var(58)),stateno = [5196,5204]
trigger1 = p2bodydist x < 80
trigger1 = random <= 30 + 100*helper(20000),var(9)
trigger2 = enemynear(var(58)),movetype != H && enemynear(var(58)),statetype != A
trigger2 = !Inguarddist
trigger2 = numhelper(20003) && numhelper(20004)
trigger2 = helper(20003),inguarddist = 0 && helper(20004),inguarddist = 0
trigger2 = random <= 10
trigger2 = enemynear(var(58)),p2dist x > 0

;ジャンプ
[State -1]
type = ChangeState
value = 41
triggerall = statetype != A && var(59) > 0 && ctrl && roundstate = 2
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),movetype != H
trigger1 = random <= ceil(0.5*(6*(enemynear(var(58)),movetype != A) + 10*(inguarddist=0) + (0.02*p2bodydist x))*(var(57))**0.5)


;ジャンプ
[State -1]
type = ChangeState
value = 43
triggerall = statetype != A && var(59) > 0 && ctrl && roundstate = 2
triggerall = enemynear(var(58)),statetype != A
triggerall = enemynear(var(58)),movetype != H
trigger1 = random <= ceil(0.5*(2*(enemynear(var(58)),movetype != A) + 4*(inguarddist=0) )*(4-var(57)**0.5))

;-----------------------------------------------------
;空中
;-----------------------------------------------------

;空中ダッシュ
[State -1]
type = ChangeState
value = 110
triggerall = statetype = A && var(59) && roundstate = 2
triggerall = Var(2) = 0
triggerall = Pos Y <= -30
triggerall = !inguarddist
triggerall = numhelper(20003)&&numhelper(20004)
triggerall = helper(20003),inguarddist = 0 && helper(20004),inguarddist = 0
triggerall = enemynear(var(58)),movetype != H || enemynear(var(58)),stateno = [120,199]
triggerall = enemynear(var(58)),statetype != L
triggerall = ctrl
trigger1 = p2bodydist x + enemynear(var(58)),facing*facing*enemynear(var(58)),vel x > 100
trigger1 = random <= 10 - 8*(palno>=7)
trigger2 = vel y < -2
trigger2 = p2bodydist x = [100,150]
trigger2 = random <= 30 && palno <= 6 || enemynear(var(58)),stateno = [120,155]
trigger3 = prevstateno = 2107 || pos y <= -320
trigger3 = enemynear(var(58)),movetype != H
trigger3 = fvar(33) <= 100

;空中バックダッシュ
[State -1]
type = ChangeState
value = 115
triggerall = statetype = A && var(59) && roundstate = 2
triggerall = Var(2) = 0
triggerall = Pos Y <= -30
triggerall = !inguarddist
triggerall = numhelper(20003)&&numhelper(20004)
triggerall = helper(20003),inguarddist = 0 && helper(20004),inguarddist = 0
triggerall = enemynear(var(58)),movetype != H && enemynear(var(58)),statetype != L
triggerall = ctrl
trigger1 = backedgebodydist > 30
trigger1 = random <= 15 - ceil(0.07*p2dist x) + 50*var(52)
trigger1 = p2dist x > 50
trigger1 = enemynear(var(58)),stateno != [120,155]
trigger1 = enemynear(var(58)),movetype != A


;----------------------------------------------------------------------------------------------------------
[State 5050, 5]; Recover in mid air
type = ChangeState
triggerall = Vel Y > -1
triggerall = alive
triggerall = stateno = 5050
triggerall = CanRecover
triggerall = numhelper(20004)
triggerall = !inguarddist && helper(20004),inguarddist = 0
triggerall = var(59)=[1,10]
trigger1 = abs(p2bodydist x) > 100 || p2bodydist y < -150
value = 5210 ;HITFALL_AIRREC


;--------------------------------------------------------------------------------------------------------------
;ヘルパーたち
;--------------------------------------------------------------------------------------------------------------

[State -3, 端認識へルパー]
type=helper
trigger1 = !NumHelper(20000)
trigger1 = alive
helpertype=normal
name="center"
stateno=20000
ID=20000
pos=160,160
postype = left
facing = 1
keyctrl=0
pausemovetime=2147483647
supermovetime=2147483647
persistent = 0

;念のため↓も付けておく
[State -3, 関係無いステートに行かないように]
type=changestate
trigger1 = roundstate = 2
trigger1= ishelper(20000)
trigger1= stateno!=20000
value = 20000

;-------------------------------------------------------------------------------
;めくり対策用ヘルパー
[state -3];めくり用
type = helper
trigger1 = var(59)=[1,10]
trigger1 = numhelper(20003)=0
trigger1 = alive
helpertype = normal
name = "mekuri"
ID = 20003
pos = 0, 0
postype = p1
facing = 1
stateno = 20003
keyctrl = 0
ownpal = 1
supermovetime = 99999
pausemovetime = 99999
persistent=0
ignorehitpause=1

[state -3]
type = changestate
trigger1 = ishelper(20003)
trigger1 = stateno != 20003
value = 20003
;-------------------------------------------------------------------------------
;飛び道具策用ヘルパー
[state -3];
type = helper
trigger1 = var(59)=[1,10]
trigger1 = numhelper(20004)=0
trigger1 = alive
helpertype = normal
name = "tobidougu"
ID = 20004
pos = 0, 0
postype = p1
facing = 1
stateno = 20004
keyctrl = 0
ownpal = 1
supermovetime = 99999
pausemovetime = 99999
persistent=0
ignorehitpause=1

[state -3]
type = changestate
trigger1 = ishelper(20004)
trigger1 = stateno != 20004
value = 20004
;-------------------------------------------------------------------------------------------------------

[State -3, AI起動用ヘルパー]
type=helper
trigger1=!NumHelper(10000)
trigger1=roundstate=2
trigger1=alive
trigger1=var(59)=0
Trigger1=(PrevStateNo=[190,197])||PrevStateNo=5900
Trigger1=ctrl&&stateno=0
helpertype=normal
name="AI"
stateno=10000
ID=10000
pos=9999,9999
keyctrl=1
pausemovetime=2147483647
supermovetime=2147483647
persistent = 0

;念のため↓も付けておく
[State -3, 関係無いステートに行かないように]
type=changestate
trigger1= ishelper(10000)
trigger1= stateno!=10000
value=10000


