;Config
[statedef 20000]
ctrl=0
anim = 3125


;-------------------------------------------------------------------------------------------------------
[state 20000];火力調整 Attack
type = varset
ignorehitpause = 1
trigger1 = time = 0
var(28) = 100 ;<----ここを変更 Change this


;100で普通の攻撃力。要はcnsのattackだと思ってくれて差し支えありません。
;母の詩は固定ダメージ(体力MAXの半分)なので変化はないです。呪いも変化なしです。
;Original attack parameter is 100 .


;----------------------------------------------------------------------------------------------------------
[state -3];リコイル停止時間設定 Recoil Guard Pause Time
type = parentvarset
trigger1 = 1
fvar(8) = 20  ;<--フレーム数で指定、最小2、最大22。デフォルトは20  minimum is 2 , maximum is 22.
ignorehitpause = 1


;要は画面が何フレーム止まるかです。性能自体は変化しません。
;原作では20Fぐらいです。ヒットポーズに合わせるなら10程度推奨。このぐらいなら比較的サクサク動きます。
;タッグ戦やリコイルLv10にする場合は5〜9程度でもいいかもしれません。最小の2だと早すぎる気がします。
;自分で使ってみていい感じの数値を入れてみてください。

;最大22とは書いていますが、ぶっちゃけ何フレームでもかまいません。
;ただ上限書いておかないと、とんでもない値入れる人がでてきたりして、それで「画面が動かない」とか言われても困るので念のためです。
;ちなみに下限はairの関係上の下限なのでそれより下の値は入れないでください。






;------------------------------------------------------------------------------------------------------------
[state -3];逆根性値設定 attack reduction by enemy's life
type = parentvarset
trigger1 = roundstate = 2
trigger1 = !(root,var(24))
var(0) = 1
;0 ---->逆根性値なし off
;1 ---->逆根性値あり on
ignorehitpause = 1

;注意
;RFゲージMAXなら逆根性値があっても６割弱持っていくコンボを搭載していますのでAI製作者的には逆根性値ありを推奨します。
;根性値持ちのEFZキャラにはある程度対応して逆根性値をはずしています。
;無敵医師氏のGG勢にも対応しました。

;逆根性値が紙に優しく固い子には厳しい仕様に変わりました。
;具体的には体力×防御力がカンフーマン基準で、それより多い場合はカンフーマンの体力満タン時と値が同じになったところから逆根性値オン。
;逆に最初からカンフーマンより下に設定されている場合は最初からそれに見合った逆根性値が入ります。
;例１：某ｼｯｼｮｰの場合 life*defence=1000*78 なので体力満タンでも長森の攻撃力は89%ぐらいからスタートします。
;例２：某緑の巨人の場合 life*defence = 1100*130 なので体力が769より上の時は攻撃力100%、そこから逆根性値が入って攻撃力が下がって行きます


;根性値持ち対応済みキャラ一覧(現在57キャラ)

;[EFZ]
;馬の骨    七瀬
;hanma氏   長森、観鈴、UNK
;586氏     制服名雪、佐祐理、美凪、みさき、茜、佳乃、観鈴、神奈、あゆ、舞、UNK、繭、美汐、真琴
;漆黒氏    あゆ
;ふるれ氏  名雪、香里、EFZ文、EFZ衣久
;BF氏      真琴、繭

;[東方]
;とま氏   パチェ、魔理沙
;Nachel氏 霊夢、レミ

;[GG]
;無敵医師氏 ソル、カイ、ポチョ、チップ、ジョニー、梅喧、ミリア、ジャム、メイ、スレイヤー、アクセル、ヴェノム、イノ
            ディズィー、アバ、ブリジット、エディ、ファウスト、テスタメント、クリフ、ジャスティス
            
;[アルカナハート]
;Ina氏   はぁと、冴姫、リリカ、ゼニア、ペトラ、神威、ミルドレッド

;[その他]
;ゆ〜とはる氏  初音ミク



;================================================
;コンフィグ終わり  END Config
;================================================
























;================================================
;以下いじるな危険 Don't change states under here
;================================================


[state 20000]
type = parentvarset
trigger1 = time = 1
fvar(4) = 0.01*var(28)
ignorehitpause = 1








;-------------
;ヘルパーメモ
;-------------
;helperID = ???
;        -->helper state
;__________________________
;
;以下はmisuzu.cns内
;__________________________

;id = 182 勝利演出 カットイン
;   -->state 182 観鈴ちん

;id = 183 勝利演出 セリフ
;   -->state 183 セリフ

;id = 1010 絵日記弱
;   -->state 1010 待機
;   -->state 1011 攻撃
;   -->state 1012 破壊

;id = 1020 絵日記中
;   -->state 1020 待機
;   -->state 1021 攻撃
;   -->state 1012 破壊

;id = 1030 RF絵日記
;   -->state 1030 待機
;   -->state 1031 攻撃

;id = 1210 どろり弱
;   -->state 1210 待機
;   -->state 1211 攻撃
;   -->state 1212 攻撃を受けて消滅
;   -->state 1213 相手に当たって消滅

;id = 1220 どろり中
;   -->state 1220 待機
;   -->state 1221 攻撃
;   -->state 1212 攻撃を受けて消滅
;   -->state 1213 相手に当たって消滅

;id = 1220 RFどろり
;   -->state 1230 待機
;   -->state 1231 攻撃
;   -->state 1214 相手に当たって消滅

;id = 1310 不幸の塊弱(翼人用)
;   -->state 1310 攻撃
;   -->state 1320 消滅

;id = 1311 不幸の塊中(翼人用)
;   -->state 1311 攻撃
;   -->state 1320 消滅

;id = 1312 RF不幸の塊(翼人用)
;   -->state 1312 攻撃
;   -->state 1320 消滅

;id = 1312 RF不幸の塊(翼人用)
;   -->state 1313 攻撃
;   -->state 1320 消滅

;id = 1330 呪(永続ターゲットバグ使用)
;   -->state 1330 当身取ってターゲット確保。たまに混線してる気がするけど気にしない。

;id = 1350 不幸の塊弱
;   -->state 1350 移動
;   -->state 1355 攻撃
;   -->state 1320 消滅

;id = 1351 不幸の塊中
;   -->state 1351 移動
;   -->state 1356 攻撃
;   -->state 1320 消滅

;id = 1352 RF不幸の塊
;   -->state 1352 移動
;   -->state 1357 攻撃
;   -->state 1320 消滅

;id = 1353 RF不幸の塊
;   -->state 1353 移動
;   -->state 1358 攻撃
;   -->state 1320 消滅

id = 2200 天津鷹ノ弓 弱中
;   -->state 2210 攻撃

;id = 2225 天津鷹ノ弓 強
;   -->state 2225 攻撃１
;   -->state 2226 攻撃２
;   -->state 2227 攻撃３
;   -->state 2228 攻撃４
;   -->state 2229 攻撃５

;id = 2310 天ヲ仰グ月ノ石
;   -->state 2310 攻撃

;id = 3010 がおがおファイアー弱
;   -->state 3010 ステゴサウルス
;   -->state 3015 消滅

;id = 3011 がおがおファイアー中
;   -->state 3011 プテラノドン
;   -->state 3015 消滅

;id = 3012 がおがおファイアー強
;   -->state 3012 首長
;   -->state 3013 首長ファイアー
;   -->state 3014 消滅

;id = 3120 観鈴ちんピンチ弱中
;   -->state 3120 ドロリ玉
;   -->state 3121 同じく
;   -->state 3122 同じく

;id = 3410 七ツ枝ノ宝剣
;   -->state 3410 剣
;   -->state 3411 消滅

;id = 3510 解キ放ツ白銀ノ剣
;   -->state 3510 翼剣 攻撃

;id = 3615 吹キ荒ブ天ノ此花
;   -->state 3615 羽

;id = 4000 そら
;   -->state 4000 待機
;   -->state 4100 そらアタック弱 下降
;   -->state 4101 そらアタック弱 攻撃
;   -->state 4110 そらアタック中 下降
;   -->state 4111 そらアタック中 攻撃
;   -->state 4120 そらアタック強 下降
;   -->state 4121 そらアタック強 攻撃

;id = 4200 往人
;   -->state 4200 出現
;   -->state 4201 分岐
;   -->state 4210 弱往人攻撃
;   -->state 4211 弱往人終了
;   -->state 4220 中往人攻撃
;   -->state 4230 強往人攻撃
;   -->state 4231 強往人落下
;   -->state 4232 強往人終了

;id = 4225 ポテト
;   -->state 4225 攻撃
;______________________________________________
;
;このステート中にあるのは以下のヘルパーの記述
;______________________________________________

;id = 10000 AI起動用
;   -->state 10000 起動

;id = 20000 端認識中央 その他var多数使用
;   -->state 20000 中央固定

;id = 20003 めくり用
;   -->state 20003 本体後部固定

;id = 20004 飛び道具用および学習機能用var多数使用
;   -->state 20004 本体前部固定























;_______________________________________________________________________________________
;
;めくり対策兼学習機能付きヘルパーステート
;_______________________________________________________________________________________


;parent,var(50)
;=1   右側固定
;=2   左側固定
;=3   両側固定

;本体だけだと学習用の変数が足りない・・・ってことでヘルパーの変数まで活用
;問題点はラウンドごとにリセットされること。この際仕方ないね。

;helper(20000)
;var(0) ゴールだぜ！！
;var(1) 投げ学習
;var(2) 投げ学習
;var(3) 投げ学習
;var(4) 相手は地上派？
;var(5) それとも空中派？
;var(6)
;var(7) random
;var(8) 相手のヘルパー数
;var(9) 1F投げの回数カウント
;var(10) J中または立ち中スカリ確認
;var(11) - var(27) 飛び道具学習
;var(28) 火力調整
;var(30) 相手のattackdist設定
;var(34) 投げられ学習
;var(35) 投げられ学習
;var(47) 隙付き用
;var(48) - var(56)未使用
;var(57) 相手のアニメループ見切り
;var(59) DisplayToClipBoard切り換え用

;fvar(0) 相手の地上頻度測定
;fvar(36)〜fvar(39) スカリ確認
;_________________________________
;
;ヘルパー真ん中
;_________________________________


[State 20001,間違いで本体が来たら立ちへ移行]
type=selfstate
trigger1=!ishelper
value=0

[state 20001,一応無敵]
type = nothitby
trigger1 = 1
value = SCA
supermove = 1
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[state 40000]
type = parentvarset
trigger1 = frontedgedist + 15 > root,fvar(36)
fvar(36) = frontedgedist + 15
ignorehitpause = 1

[state 40000]
type = parentvarset
trigger1 = backedgedist + 15  > root,fvar(35)
fvar(35) = backedgedist + 15
ignorehitpause = 1

[state 20001,見えなくしとく 振り向かせない]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noautoturn


;------------------------------------------------------------------
;本体のためのvarset その1
;------------------------------------------------------------------
;ゴールフラグ
[state 20000]
type = varset
triggerall = RoundState = 2
triggerall = root,Power >= 3000
triggerall = root,var(59) > 0
triggerall = root,life <= 333 || root,palno >=7
triggerall = root,statetype != A
triggerall = enemynear,statetype != A
trigger1 = numhelper(4200)
trigger1 = (root,var(12)= 4 && helper(4200),stateno = [4200,4201]) || (helper(4200),stateno = 4210 && time < 37)
trigger1 = helper(4200),p2bodydist x<=100
var(0) = 1
ignorehitpause = 1

[state 20000]
type = varset
triggerall = roundstate = 2
triggerall = var(0) = 1
trigger1 = numhelper(4200) = 0
trigger2 = enemynear,statetype = A || (root,life>333 && root,palno < 7) 
trigger3 = numhelper(4200)
trigger3 = helper(4200),stateno = 4210 && helper(4200),time > 45
trigger3 = helper(4200),movecontact = 0
trigger4 = helper(4200),stateno !=[4200,4211] 
var(0) = 0
ignorehitpause = 1

;----------------------------------------------------------
;投げ学習
[state -2]
type = varset
triggerall = root,var(36) != 0 && var(1)=0
triggerall = enemy,stateno !=root,var(36) && enemy,stateno !=root,var(35)
triggerall = teammode = single || teammode = turns
trigger1 = p2movetype = A
trigger1 = enemynear,hitdefattr = SC,AT
trigger1 = enemynear,time > 1
var(1) = p2stateno
ignorehitpause = 1
pausemovetime = 9999
supermovetime = 9999

[state -2]
type = varset
triggerall = var(1)
trigger1 = roundstate != 2 && teammode = turns
var(1) = 0
ignorehitpause = 1
pausemovetime = 9999
supermovetime = 9999

[state -2]
type = varset
triggerall = var(1)!=0 && var(2)=0
triggerall = enemy,stateno !=var(1) && enemy,stateno!=root,var(36)&& enemy,stateno !=root,var(35)
triggerall = teammode = single || teammode = turns
trigger1 = p2movetype = A
trigger1 = enemynear,hitdefattr = SC,AT
trigger1 = enemynear,time > 1
var(2) = p2stateno
ignorehitpause = 1
pausemovetime = 9999
supermovetime = 9999

[state -2]
type = varset
triggerall = var(2)
trigger1 = roundstate != 2 && teammode = turns
var(2) = 0
ignorehitpause = 1
pausemovetime = 9999
supermovetime = 9999

[state -2]
type = varset
triggerall = var(1)!=0 && var(2)!=0 && var(3) =0
triggerall = enemy,stateno !=var(1) && enemy,stateno !=var(2)&&enemy,stateno!=root,var(36)&& enemy,stateno !=root,var(35)
triggerall = teammode = single || teammode = turns
trigger1 = p2movetype = A
trigger1 = enemynear,hitdefattr = SC,AT
trigger1 = enemynear,time > 1
var(3) = p2stateno
ignorehitpause = 1
pausemovetime = 9999
supermovetime = 9999

[state -2]
type = varset
triggerall = var(3)
trigger1 = roundstate != 2 && teammode = turns
var(3) = 0
ignorehitpause = 1
pausemovetime = 9999
supermovetime = 9999
;----------------------------------------------------------
;相手の戦闘スタイルを考える変数… って書けばかっこいい気がしない？？
[state 20000]
type = varset
trigger1 = roundstate != 2 || var(4) < 1000
trigger2 = teammode = simul
var(4) = 1000
ignorehitpause = 1

[state 20000]
type = varset
trigger1 = roundstate != 2 || var(5) < 1000
trigger2 = teammode = simul
var(5) = 1000
ignorehitpause = 1

[state 20000]
type = varadd
triggerall = roundstate = 2
triggerall = teammode = single || teammode = turns
triggerall = p2statetype != A && p2statetype != L
triggerall = var(4) >=1000
trigger1 = enemynear,movetype = I
trigger1 = root,movetype != H || root,stateno = [120,162]
trigger2 = enemynear,movetype = A
trigger2 = root,movetype != H ||gametime%10 = 0 || root,stateno = [120,162]
var(4) = 1
ignorehitpause = 1

[state 20000]
type = varadd
triggerall = roundstate = 2
triggerall = teammode = single || teammode = turns
triggerall = p2statetype = A && p2statetype != L
triggerall = var(5) >=1000
trigger1 = enemynear,movetype = I
trigger1 = root,movetype != H || root,stateno = [120,162]
trigger2 = enemynear,movetype = A
trigger2 = root,movetype != H ||gametime%10 = 0 || root,stateno = [120,162]
var(5) = 3
ignorehitpause = 1

[state 20000]
type = varset
trigger1=1
fvar(0) = 1.0*var(4)/(1.0*(var(4)+var(5)+0.000010))
ignorehitpause = 1

[state 20000]
type = varset
trigger1 = 1
var(6) = ifelse(fvar(0)<0.30, 1 , ifelse(fvar(0)<0.42, 2 , ifelse(fvar(0) < 0.60 , 3 , ifelse(fvar(0)<0.70,4,5))))

[state 20000]
type = varset
trigger1 = 1
var(7) = random
ignorehitpause = 1

;---------------------------------------
;立ち中、J中スカリ確認
;---------------------------------------
[state 20000]
type = varset
var(10) = 0
trigger1 = time = 0
ignorehitpause = 1
persistent = 0

[state 20000]
type = varadd
triggerall = p2statetype = A && p2movetype = H && enemynear,hitfall = 1
triggerall = numenemy = 1
triggerall = root,var(50) = 1 && enemynear,canrecover = 0|| root,hitdefattr = ,NA
triggerall = !root,movecontact
trigger1 = root,stateno = 210
trigger1 = root,time > 9
trigger1 = root,numtarget(200)
trigger2 = root,stateno = 610
trigger2 = root,time > 18
trigger2 = root,numtarget(1101)
var(10) = 1
ignorehitpause = 0
persistent = 20


[state 20000]
type = varset
triggerall = numenemy = 1
triggerall = p2statetype = A && p2movetype = H && enemynear,hitfall = 1
triggerall = root,var(50) = 1 && root,hitdefattr = ,NA
triggerall = !root,movecontact
;triggerall = fvar(39) < root,p2bodydist y || !fvar(39)
trigger1 = root,stateno = 610
trigger1 = root,time < 10
fvar(39) = root,p2bodydist y
;-----------------------------------------
;本体用ヘルパー数調べ
;----------------------------------------
[state -1];ヘルパー数調べの準備
type=varset
triggerall = ishelper
trigger1 = time = 0
var(8)=9999
supermove = 1
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999


[state -1];ヘルパー数を調べる
type=varset
var(8) = enemynear,numhelper
triggerall = ishelper
triggerall = numenemy = 1
triggerall = roundstate=2
trigger1 = enemynear,ctrl = 1
trigger1 = var(8) >= enemynear,numhelper
trigger2 = enemynear,movetype != A
trigger2 = parent,inguarddist = 0
trigger2 = numhelper(20000)*numhelper(20001)*numhelper(20002)*numhelper(20003)*numhelper(20004)*numhelper(4000)
trigger2 = (helper(20000),inguarddist + helper(20001),inguarddist + helper(20002),inguarddist + helper(20003),inguarddist + helper(20004),inguarddist+helper(4000),inguarddist) = 0
trigger2 = (enemynear,stateno =[5000,5999]) || enemynear,stateno = [50,200)
trigger2 = parent,stateno != [120,162]
trigger2 = parent,stateno != [5000,5300]
trigger2 = parent,movetype != H
trigger2 = parent,hitpausetime = 0 && enemynear,hitpausetime = 0
ignorehitpause = 1


[state -1];ヘルパー数を調べる
type=varset
triggerall = ishelper
triggerall = numenemy = 2
triggerall = roundstate=2
trigger1 = enemynear(0),ctrl && enemynear(1),ctrl
trigger1 = var(8) >= enemynear(0),numhelper + enemynear(1),numhelper
trigger2 = enemynear(0),movetype != A && enemynear(1),movetype != A
trigger2 = parent,inguarddist = 0
trigger2 = numhelper(20000)*numhelper(20001)*numhelper(20002)*numhelper(20003)*numhelper(20004)*numhelper(4000)
trigger2 = (helper(20000),inguarddist + helper(20001),inguarddist + helper(20002),inguarddist + helper(20003),inguarddist + helper(20004),inguarddist+helper(4000),inguarddist) = 0
trigger2 = (enemynear(0),stateno =[5000,5999]) || enemynear(0),stateno = [50,200)
trigger2 = (enemynear(1),stateno =[5000,5999]) || enemynear(1),stateno = [50,200)
trigger2 = parent,stateno != [120,162]
trigger2 = parent,stateno != [5000,5300]
trigger2 = parent,movetype != H
trigger2 = parent,hitpausetime = 0
trigger2 = enemynear(0),hitpausetime = 0 && enemynear(1),hitpausetime = 0
var(8) = enemynear(0),numhelper + enemynear(1),numhelper
ignorehitpause = 1

;--------------------------------------------------
[state 20000]
type = varadd
trigger1 = roundstate = 2
trigger1 = enemynear,hitdefattr = SC,NT,ST
trigger1 = enemynear,time <= 1
trigger1 = enemynear,hitpausetime = 0
var(9) = 1
ignorehitpause = 1
persistent = 1

[state 20000]
type = varset
trigger1 = roundstate != 2
var(9) = 0


;___________________________________________________________
;
;飛び道具学習
;___________________________________________________________
;相手の初期ヘルパー数とプロジェクタイル数を定義
[state 20000]
type = varset
triggerall = roundstate = 2
trigger1 = enemynear,time = 1
var(11) = enemynear,numhelper
ignorehitpause = 1

[state 20000]
type = varset
triggerall = roundstate = 2
trigger1 = enemynear,time = 1
var(12) = enemynear,numproj
ignorehitpause = 1


;---------------------
;ID取得(タッグ用)
[state 20000]
type = varset
trigger1 = var(14) = 0
var(13) = enemynear,id
ignorehitpause = 1

;ヘルパーもしくはプロジェクタイルが出たらステートナンバーゲット
[state 20000]
type = varset
triggerall = roundstate = 2
triggerall = var(14) = 0
triggerall = enemynear,movetype != H
triggerall = !(enemynear,hitdefattr = SCA,AA,AT,AP)
triggerall = enemynear,stateno != [0,800]
triggerall = enemynear,stateno != [5000,5999]
triggerall = enemynear,vel x = [-1,1]
triggerall = enemynear,vel y = 0
trigger1 = enemynear,numhelper > var(11) || enemynear,numproj > var(12)
var(14) = enemynear,stateno
ignorehitpause = 1

;その時の時間も記憶
[state 20000]
type = varset
trigger1 = var(14) = 0
var(15) = enemynear,time
ignorehitpause = 1

;---------------------
[state 20000]
type = varset
trigger1 = var(17) = 0
var(16) = enemynear,id
ignorehitpause = 1

[state 20000]
type = varset
triggerall = roundstate = 2
triggerall = var(14) != 0 && var(17) = 0
triggerall = enemynear,stateno != var(14)
triggerall = enemynear,movetype != H
triggerall = !(enemynear,hitdefattr = SCA,AA,AT,AP)
triggerall = enemynear,stateno != [0,800]
triggerall = enemynear,stateno != [5000,5999]
triggerall = enemynear,vel x = [-1,1]
triggerall = enemynear,vel y = 0
trigger1 = enemynear,numhelper > var(11) || enemynear,numproj > var(12)
var(17) = enemynear,stateno
ignorehitpause = 1

[state 20000]
type = varset
trigger1 = var(17) = 0
var(18) = enemynear,time
ignorehitpause = 1


;---------------------
[state 20000]
type = varset
trigger1 = var(20) = 0
var(19) = enemynear,id
ignorehitpause = 1

[state 20000]
type = varset
triggerall = roundstate = 2
triggerall = var(14) != 0 && var(17) != 0 && var(20) = 0
triggerall = enemynear,stateno != var(14)
triggerall = enemynear,stateno != var(17)
triggerall = enemynear,movetype != H
triggerall = !(enemynear,hitdefattr = SCA,AA,AT,AP)
triggerall = enemynear,stateno != [0,800]
triggerall = enemynear,stateno != [5000,5999]
triggerall = enemynear,vel x = [-1,1]
triggerall = enemynear,vel y = 0
trigger1 = enemynear,numhelper > var(11) || enemynear,numproj > var(12)
var(20) = enemynear,stateno
ignorehitpause = 1

[state 20000]
type = varset
trigger1 = var(20) = 0
var(21) = enemynear,time
ignorehitpause = 1


;---------------------
[state 20000]
type = varset
trigger1 = var(23) = 0
var(22) = enemynear,id
ignorehitpause = 1

[state 20000]
type = varset
triggerall = roundstate = 2
triggerall = var(14) != 0 && var(17) != 0 && var(20) != 0 && var(23) = 0
triggerall = enemynear,stateno != var(14)
triggerall = enemynear,stateno != var(17)
triggerall = enemynear,stateno != var(20)
triggerall = enemynear,movetype != H
triggerall = !(enemynear,hitdefattr = SCA,AA,AT,AP)
triggerall = enemynear,stateno != [0,800]
triggerall = enemynear,stateno != [5000,5999]
triggerall = enemynear,vel x = [-1,1]
triggerall = enemynear,vel y = 0
trigger1 = enemynear,numhelper > var(11) || enemynear,numproj > var(12)
var(23) = enemynear,stateno
ignorehitpause = 1

[state 20000]
type = varset
trigger1 = var(23) = 0
var(24) = enemynear,time
ignorehitpause = 1


;---------------------
[state 20000]
type = varset
trigger1 = var(26) = 0
var(25) = enemynear,id
ignorehitpause = 1

[state 20000]
type = varset
triggerall = roundstate = 2
triggerall = var(14) != 0 && var(17) != 0 && var(20) != 0 && var(23) != 0 && var(26) = 0
triggerall = enemynear,stateno != var(14)
triggerall = enemynear,stateno != var(17)
triggerall = enemynear,stateno != var(20)
triggerall = enemynear,stateno != var(23)
triggerall = enemynear,movetype != H
triggerall = !(enemynear,hitdefattr = SCA,AA,AT,AP)
triggerall = enemynear,stateno != [0,800]
triggerall = enemynear,stateno != [5000,5999]
triggerall = enemynear,vel x = [-1,1]
triggerall = enemynear,vel y = 0
trigger1 = enemynear,numhelper > var(11) || enemynear,numproj > var(12)
var(26) = enemynear,stateno
ignorehitpause = 1

[state 20000]
type = varset
trigger1 = var(26) = 0
var(27) = enemynear,time
ignorehitpause = 1


;-----------------------------------------
[state -3]
type = varset
var(30) = 0
trigger1 = enemynear,time <= 1 || enemynear,animtime >= 0
trigger2 = gametime%25 = 0

[state -3]
type = varset
var(30) = 1
triggerall = !var(30)
trigger1 = enemynear,authorname = "muteki"&&  p2name = "sol"
trigger1 = (p2stateno = [235,236]) ;10立6HS
trigger2 = enemynear,authorname = "muteki"&& p2name = "justice"
trigger2 = (p2stateno = [225,236])|| p2stateno = 450 || p2stateno = 610  ;20立S,20立HS,50立6HS,15屈D,20空K
trigger3 = enemynear,authorname = "muteki"&& p2name = "justice"
trigger3 = (p2stateno = [1000,1012]) || p2stateno = 3100 || p2stateno = 3200 ;40ミカエルソード,160インペリアルレイ,160ミカエルブレード
trigger4 = enemynear,authorname = "muteki"&& p2name = "testament"
trigger4 = p2stateno = 225 || p2stateno = 235 ||p2stateno = 3100 ;40立遠S,50立6HS,30マスターオブなんとか
trigger5 = enemynear,authorname = "muteki"&& p2name = "eddie"
trigger5 = (p2stateno = [225,228]) || p2stateno = 420 ;15立遠S,20屈S
trigger6 = enemynear,authorname = "muteki"&& p2name = "axl"
trigger6 = p2stateno = 400 || p2stateno = 430 || p2stateno = 1500;
trigger7 = enemynear,authorname = "muteki"&& p2name = "Faust"
trigger7 = p2stateno = 225 || p2stateno = 430 ;

trigger8 = enemynear,authorname = "Sander71113"&& p2name = "Goro Daimon"
trigger8 = p2stateno = [1000,1005]

[state -3]
type = varset
var(30) = 1
triggerall = !var(30)
trigger1 = enemynear,authorname = "MGMURROW" && p2name = "Hulk"
trigger1 = p2stateno = 200 || p2stateno = 3500 ;弱P,160ガンマアースシェイク
trigger2 = enemynear,authorname = "Hulk" && p2name = "Hulk"|| enemynear,authorname = "One Winged Angel" && p2name = "hulk"
trigger2 = p2stateno = 210 || p2stateno = 220;20中P,100強P
trigger3 = enemynear,authorname = "Magneto" && p2name = "Magneto"
trigger3 = p2stateno = [1260,1270];160E-Mディスラプター
trigger4 = enemynear,authorname = "Ironman" && p2name = "Ironman"
trigger4 = p2stateno = [1240,1260];160Uniビーム
trigger5 = enemynear,authorname = "Iceman" && p2name = "Iceman"
trigger5 = p2stateno = [1240,1260];140アイスビーム
trigger6 = enemynear,authorname = "BlackHeart" && p2name = "BlackHeart"
trigger6 = p2stateno = 300 || p2stateno = 500;立弱K、屈弱K
trigger7 = enemynear,authorname = "Cable" && p2name = "Cable"
trigger7 = p2stateno = 220 || (p2stateno = [1450,1470])||p2stateno = [3000,3001];立強P,バイパー,ハイパーバイパー
trigger8 = enemynear,authorname = "Cloudius" && p2name = "Marvel vs Capcom 2 Cable"
trigger8 =  (p2stateno = [1000,1021])||p2stateno = [3000,3001];バイパー,ハイパーバイパー
trigger9 = enemynear,authorname = "Cyclops" && p2name = "Cyclops"
trigger9 = (p2stateno = [1450,1470])||p2stateno = [3000,3001];オプティックブラストとか
trigger10 = enemynear,authorname = "Reza" && p2name = "Scott Summers MVC2 + MSHVSF + MUA + XML2"
trigger10 = (p2stateno = [1000,1010])|| p2stateno = 1044 || p2stateno = 3000;オプティックブラストとか
;-----------------------------------------

;投げられ学習用
[state -2]
type = varset
triggerall = ishelper
triggerall = roundstate = 2
trigger1 = root,var(43) != gametime
trigger1 = root,life != var(35)
trigger1 = root,name = "Mizuka Nagamori"
var(34) = ceil(0.1*(var(35) - root,life)/(0.5 + 0.5*(var(35)*1000/root,lifemax)/1000)) - 5
ignorehitpause = 1

;投げられ学習用
[state -2]
type = varset
triggerall = ishelper
triggerall = roundstate = 2
trigger1 = root,name = "Mizuka Nagamori"
trigger1 = root,var(43) = gametime
var(34) = 0
ignorehitpause = 1
pausemovetime = 9999
supermovetime = 9999

;投げられ学習用
[state -2]
type = varset
triggerall = ishelper(20000)
trigger1 = root,name = "Mizuka Nagamori"
trigger1 = gametime = root,var(43)
trigger1 = enemy,ctrl = 0
trigger1 = enemy,hitdefattr = SCA,AT
trigger1 = root,alive = 1
var(35) = root,life
ignorehitpause = 1
pausemovetime = 9999
supermovetime = 9999

;投げられ学習用
[state -2]
type = varset
triggerall = ishelper(20000)
triggerall = root,name = "Mizuka Nagamori"
triggerall = gametime = root,var(43)
trigger1 = (root,alive = 0 && root,stateno !=5150) || (root,stateno = 5150 && time > 0)
trigger2 = !(enemy,hitdefattr = SCA,AT) && root,movetype != H
var(35) = 0
ignorehitpause = 1
pausemovetime = 9999
supermovetime = 9999

;投げられ学習用
[state -2]
type = varset
triggerall = ishelper(20000)
trigger1 = root,name = "Mizuka Nagamori"
var(36) = ifelse((root,var(34)>55),55,(root,var(34)))
ignorehitpause = 1
pausemovetime = 9999
supermovetime = 9999


;-----------------------------------------------------------------------------
;あと刺し込用
[state -3]
type = varset
triggerall = root,var(59) >0
triggerall = var(47) = 0
triggerall = teammode = single ||teammode = turns
trigger1 = enemy,hitdefattr = SCA,AA,AT,AP
trigger1 = enemy,time > 4
var(47) = 1
ignorehitpause = 1
pausemovetime = 9999
supermovetime = 9999

[state -3]
type = varset
triggerall = root,var(59) >0
triggerall = var(47) = 1
triggerall = teammode = single ||teammode = turns
trigger1 = enemy,animtime = 0
trigger2 = enemy,time <=4 && !enemy,hitdefattr = SCA,AA,AT,AP
var(47) = 0
ignorehitpause = 1
pausemovetime = 9999
supermovetime = 9999

;----------------------------------------------------------
;落下してくるやつ測定
[state 20000]
type = varset
triggerall = root,var(59)>0
triggerall = var(57) >=0
trigger1 = enemy,movetype = A || enemy,ctrl = 0
trigger1 = !enemy,hitdefattr = SCA,AA,AT,AP
trigger1 = enemy,animelemno(0)<var(57)
var(57) = -2

[state 20000]
type = varset
triggerall = root,var(59)>0
triggerall = var(57)>=0
trigger1 = enemy,movetype = A || enemy,ctrl = 0
trigger1 = !enemy,hitdefattr = SCA,AA,AT,AP
trigger1 = enemy,animelemno(0)>var(57)
var(57) = enemy,animelemno(0)

[state 20000]
type = varset
triggerall = root,var(59)>0
triggerall = var(57) = 1
trigger1 = enemy,hitdefattr = SCA,AA,AT,AP
trigger2 = enemy,time = 0
var(57) = 0
;----------------------------------------------------------

;////////////////
;ヘルパー用デバグ
;////////////////
;表示切り換え用
[state 20000]
type = varadd
trigger1 = gametime%300 = 0
var(59) = 1
ignorehitpause = 1

[State -2, デバック]
Type = null;DisplayToClipBoard
Trigger1 = var(59)%2=0
Text = "v11= %d , v12= %d ,v13= %d , v14= %d , v15=%d \n"
Params = var(11),var(12),var(13),var(14),var(15)
IgnoreHitPause = 1

;ヘルパー用デバグ
[State -2, デバック]
Type = null;AppendToClipBoard
Trigger1 = var(59)%2=0
Text = "v16= %d , v17= %d ,v18= %d , v19= %d , v20= %d\n"
Params = var(16),var(17),var(18),var(19),var(20)
IgnoreHitPause = 1


[State -2, デバック]
Type = null;DisplayToClipBoard
Trigger1 = var(59)%2=1
Text = "v21= %d , v22= %d ,v23= %d , v24= %d , v25=%d \n"
Params = var(21),var(22),var(23),var(24),var(25)
IgnoreHitPause = 1

;ヘルパー用デバグ
[State -2, デバック]
Type = null;AppendToClipBoard
Trigger1 = var(59)%2=1
Text = "v26= %d , v27= %d"
Params = var(26),var(27)
IgnoreHitPause = 1

;----------

[State -2, デバック]
Type = DisplayToClipBoard
Trigger1 =0
Text = "v8= %d , nh1= %d ,nh2= %d , nh3= %d , nh4=%d \n"
Params = var(8),numhelper(20001),numhelper(20002),numhelper(20003),numhelper(20004)
IgnoreHitPause = 1

[State -2, デバック]
Type = DisplayToClipBoard
Trigger1 = 1
Text = "v0= %d\n"
Params = var(0)
IgnoreHitPause = 1













;-------------------------------------------------------------------------------
;ヘルパーめくり
[statedef 20003]
ctrl=0
anim=3125

[state 20000]
type = assertspecial
trigger1 = ishelper
flag = invisible
flag2 = noautoturn

[state 20000]
type = nothitby
trigger1 = 1
value = SCA

[State 20000,間違いで本体が来たら立ちへ移行]
type=selfstate
trigger1=!ishelper
value=0

[state 20000]
type = turn
trigger1 = facing = enemynear,facing

[state 20000]
type = posset
trigger1 = root,alive
x = root,pos x + (enemynear,facing)*80
y = root,pos y - 60

[state 20000]
type = destroyself
trigger1 = root,alive = 0

;______________________________________
;
;ヘルパー飛び道具
;______________________________________

[statedef 20004]
ctrl=0
anim=3125

[state 20000]
type = assertspecial
trigger1 = ishelper
flag = invisible

[state 20000]
type = nothitby
trigger1 = 1
value = SCA

[State 20000,間違いで本体が来たら立ちへ移行]
type=selfstate
trigger1=!ishelper
value=0

[state 20000]
type = turn
trigger1 = facing != root,facing

[state 20000]
type = posset
trigger1 = root,alive
x = root,pos x + root,facing*80
y = root,pos y - 60

[state 20000]
type = destroyself
trigger1 = root,alive = 0



;____________________
;
;New学習機能!!
;____________________

;打撃学習
;var(0) - var(23)
;var(2n) n = 0,1,2 ... 11 は相手のステート番号記憶
;var(2n+1) n = 0,1,2.... 11 は相手のstateno = var(2n)における技の発生時間
;今のところvar(23)まで使用中

;投げ学習
;var(30) - var(37)
;var(2n) n = 15,16,17,18 
;var(2n+1) n = 15,16,17,18
;今のところvar(37)まで使用中

;var(40) - var(51) id管理
;var(59) ループアニメ見切り用

[state 20000]
type = varadd
trigger1 = gametime%300 = 0
var(58) = 1
ignorehitpause = 1
;-------------------
;以下記録
[state 20000]
type = varset
triggerall = var(0) = 0
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno =[200,1999]
triggerall = enemynear,hitdefattr = SCA,AA
triggerall = enemynear,time >= 3
trigger1 = root,var(25)
var(0) = enemynear,stateno 
ignorehitpause = 1

[state 20000]
type = varset
triggerall = var(0)
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno =[200,1999]
triggerall = enemynear,hitdefattr = SCA,AA
triggerall = var(1) = 0 || var(1) > enemynear,time
triggerall = enemynear,stateno = var(0)
trigger1 = root,var(25)
var(1) = enemynear,time
ignorehitpause = 1

[state 20000]
type = varset
trigger1 = !var(0)
var(40) = enemynear,id
ignorehitpause = 1
;-----------------------------
[state 20000]
type = varset
triggerall = var(0) && var(2) = 0
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno =[200,1999]
triggerall = enemynear,hitdefattr = SCA,AA
triggerall = enemynear,time >= 3
triggerall = enemynear,stateno != var(0)
trigger1 = root,var(25)
var(2) = enemynear,stateno
ignorehitpause = 1

[state 20000]
type = varset
triggerall = var(2)
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno =[200,1999]
triggerall = enemynear,hitdefattr = SCA,AA
triggerall = var(3) = 0 || var(3) > enemynear,time
trigger1 = enemynear,stateno = var(2)
trigger1 = root,var(25)
var(3) = enemynear,time
ignorehitpause = 1

[state 20000]
type = varset
trigger1 = !var(2)
var(41) = enemynear,id
ignorehitpause = 1
;---------------------------
[state 20000]
type = varset
triggerall = var(0) && var(2) && var(4) = 0
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno =[200,1999]
triggerall = enemynear,hitdefattr = SCA,AA
triggerall = enemynear,time >= 3
triggerall = enemynear,stateno != var(0)
triggerall = enemynear,stateno != var(2)
trigger1 = root,var(25)
var(4) = enemynear,stateno
ignorehitpause = 1

[state 20000]
type = varset
triggerall = var(4)
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno =[200,1999]
triggerall = enemynear,hitdefattr = SCA,AA
triggerall = var(5) = 0 || var(5) > enemynear,time
trigger1 = enemynear,stateno = var(4)
trigger1 = root,var(25)
var(5) = enemynear,time
ignorehitpause = 1

[state 20000]
type = varset
trigger1 = !var(4)
var(42) = enemynear,id
ignorehitpause = 1
;---------------------------
[state 20000]
type = varset
triggerall = var(0) && var(2) && var(4) && var(6) = 0
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno =[200,1999]
triggerall = enemynear,hitdefattr = SCA,AA
triggerall = enemynear,time >= 3
triggerall = enemynear,stateno != var(0)
triggerall = enemynear,stateno != var(2)
triggerall = enemynear,stateno != var(4)
trigger1 = root,var(25)
var(6) = enemynear,stateno
ignorehitpause = 1

[state 20000]
type = varset
triggerall = var(6)
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno =[200,1999]
triggerall = enemynear,hitdefattr = SCA,AA
triggerall = var(7) = 0 || var(7) > enemynear,time
trigger1 = enemynear,stateno = var(6)
trigger1 = root,var(25)
var(7) = enemynear,time
ignorehitpause = 1

[state 20000]
type = varset
trigger1 = !var(6)
var(43) = enemynear,id
ignorehitpause = 1
;---------------------------
[state 20000]
type = varset
triggerall = var(0) && var(2) && var(4) && var(6) && var(8) = 0
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno =[200,1999]
triggerall = enemynear,hitdefattr = SCA,AA
triggerall = enemynear,time >= 3
triggerall = enemynear,stateno != var(0)
triggerall = enemynear,stateno != var(2)
triggerall = enemynear,stateno != var(4)
triggerall = enemynear,stateno != var(6)
trigger1 = root,var(25)
var(8) = enemynear,stateno
ignorehitpause = 1

[state 20000]
type = varset
triggerall = var(8)
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno =[200,1999]
triggerall = enemynear,hitdefattr = SCA,AA
triggerall = var(9) = 0 || var(9) > enemynear,time
trigger1 = enemynear,stateno = var(8)
trigger1 = root,var(25)
var(9) = enemynear,time
ignorehitpause = 1

[state 20000]
type = varset
trigger1 = !var(8)
var(44) = enemynear,id
ignorehitpause = 1
;---------------------------
[state 20000]
type = varset
triggerall = var(0) && var(2) && var(4) && var(6) && var(8)
triggerall = var(10) = 0
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno =[200,1999]
triggerall = enemynear,hitdefattr = SCA,AA
triggerall = enemynear,time >= 3
triggerall = enemynear,stateno != var(0)
triggerall = enemynear,stateno != var(2)
triggerall = enemynear,stateno != var(4)
triggerall = enemynear,stateno != var(6)
triggerall = enemynear,stateno != var(8)
trigger1 = root,var(25)
var(10) = enemynear,stateno
ignorehitpause = 1

[state 20000]
type = varset
triggerall = var(10)
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno =[200,1999]
triggerall = enemynear,hitdefattr = SCA,AA
triggerall = var(11) = 0 || var(11) > enemynear,time
trigger1 = enemynear,stateno = var(10)
trigger1 = root,var(25)
var(11) = enemynear,time
ignorehitpause = 1

[state 20000]
type = varset
trigger1 = !var(10)
var(45) = enemynear,id
ignorehitpause = 1
;---------------------------
[state 20000]
type = varset
triggerall = var(0) && var(2) && var(4) && var(6) && var(8)
triggerall = var(10) && var(12) = 0
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno =[200,1999]
triggerall = enemynear,hitdefattr = SCA,AA
triggerall = enemynear,time >= 3
triggerall = enemynear,stateno != var(0)
triggerall = enemynear,stateno != var(2)
triggerall = enemynear,stateno != var(4)
triggerall = enemynear,stateno != var(6)
triggerall = enemynear,stateno != var(8)
triggerall = enemynear,stateno != var(10)
trigger1 = root,var(25)
var(12) = enemynear,stateno
ignorehitpause = 1

[state 20000]
type = varset
triggerall = var(12)
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno =[200,1999]
triggerall = enemynear,hitdefattr = SCA,AA
triggerall = var(13) = 0 || var(13) > enemynear,time
trigger1 = enemynear,stateno = var(12)
trigger1 = root,var(25)
var(13) = enemynear,time
ignorehitpause = 1

[state 20000]
type = varset
trigger1 = !var(12)
var(46) = enemynear,id
ignorehitpause = 1
;---------------------------
[state 20000]
type = varset
triggerall = var(0) && var(2) && var(4) && var(6) && var(8)
triggerall = var(10) && var(12) && var(14) = 0
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno =[200,1999]
triggerall = enemynear,hitdefattr = SCA,AA
triggerall = enemynear,time >= 3
triggerall = enemynear,stateno != var(0)
triggerall = enemynear,stateno != var(2)
triggerall = enemynear,stateno != var(4)
triggerall = enemynear,stateno != var(6)
triggerall = enemynear,stateno != var(8)
triggerall = enemynear,stateno != var(10)
triggerall = enemynear,stateno != var(12)
trigger1 = root,var(25)
var(14) = enemynear,stateno
ignorehitpause = 1

[state 20000]
type = varset
triggerall = var(14)
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno =[200,1999]
triggerall = enemynear,hitdefattr = SCA,AA
triggerall = var(15) = 0 || var(15) > enemynear,time
trigger1 = enemynear,stateno = var(14)
trigger1 = root,var(25) 
var(15) = enemynear,time
ignorehitpause = 1

[state 20000]
type = varset
trigger1 = !var(14)
var(47) = enemynear,id
ignorehitpause = 1
;---------------------------
[state 20000]
type = varset
triggerall = var(0) && var(2) && var(4) && var(6) && var(8)
triggerall = var(10) && var(12) && var(14) && var(16) = 0
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno =[200,1999]
triggerall = enemynear,hitdefattr = SCA,AA
triggerall = enemynear,time >= 3
triggerall = enemynear,stateno != var(0)
triggerall = enemynear,stateno != var(2)
triggerall = enemynear,stateno != var(4)
triggerall = enemynear,stateno != var(6)
triggerall = enemynear,stateno != var(8)
triggerall = enemynear,stateno != var(10)
triggerall = enemynear,stateno != var(12)
triggerall = enemynear,stateno != var(14)
trigger1 = root,var(25)
var(16) = enemynear,stateno
ignorehitpause = 1

[state 20000]
type = varset
triggerall = var(16)
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno =[200,1999]
triggerall = enemynear,hitdefattr = SCA,AA
triggerall = var(17) = 0 || var(17) > enemynear,time
trigger1 = enemynear,stateno = var(16)
trigger1 = root,var(25) 
var(17) = enemynear,time
ignorehitpause = 1

[state 20000]
type = varset
trigger1 = !var(16)
var(48) = enemynear,id
ignorehitpause = 1
;---------------------------
[state 20000]
type = varset
triggerall = var(0) && var(2) && var(4) && var(6) && var(8)
triggerall = var(10) && var(12) && var(14) && var(16) && var(18) = 0
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno =[200,1999]
triggerall = enemynear,hitdefattr = SCA,AA
triggerall = enemynear,time >= 3
triggerall = enemynear,stateno != var(0)
triggerall = enemynear,stateno != var(2)
triggerall = enemynear,stateno != var(4)
triggerall = enemynear,stateno != var(6)
triggerall = enemynear,stateno != var(8)
triggerall = enemynear,stateno != var(10)
triggerall = enemynear,stateno != var(12)
triggerall = enemynear,stateno != var(14)
triggerall = enemynear,stateno != var(16)
trigger1 = root,var(25)
var(18) = enemynear,stateno
ignorehitpause = 1

[state 20000]
type = varset
triggerall = var(18)
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno =[200,1999]
triggerall = enemynear,hitdefattr = SCA,AA
triggerall = var(19) = 0 || var(19) > enemynear,time
trigger1 = enemynear,stateno = var(18)
trigger1 = root,var(25) 
var(19) = enemynear,time
ignorehitpause = 1

[state 20000]
type = varset
trigger1 = !var(18)
var(49) = enemynear,id
ignorehitpause = 1
;---------------------------
[state 20000]
type = varset
triggerall = var(0) && var(2) && var(4) && var(6) && var(8)
triggerall = var(10) && var(12) && var(14) && var(16) && var(18)
triggerall = var(20) = 0
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno =[200,1999]
triggerall = enemynear,hitdefattr = SCA,AA
triggerall = enemynear,time >= 3
triggerall = enemynear,stateno != var(0)
triggerall = enemynear,stateno != var(2)
triggerall = enemynear,stateno != var(4)
triggerall = enemynear,stateno != var(6)
triggerall = enemynear,stateno != var(8)
triggerall = enemynear,stateno != var(10)
triggerall = enemynear,stateno != var(12)
triggerall = enemynear,stateno != var(14)
triggerall = enemynear,stateno != var(16)
triggerall = enemynear,stateno != var(18)
trigger1 = root,var(25)
var(20) = enemynear,stateno
ignorehitpause = 1

[state 20000]
type = varset
triggerall = var(20)
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno =[200,1999]
triggerall = enemynear,hitdefattr = SCA,AA
triggerall = var(21) = 0 || var(21) > enemynear,time
trigger1 = enemynear,stateno = var(20)
trigger1 = root,var(25) 
var(21) = enemynear,time
ignorehitpause = 1

[state 20000]
type = varset
trigger1 = !var(20)
var(50) = enemynear,id
ignorehitpause = 1
;---------------------------
[state 20000]
type = varset
triggerall = var(0) && var(2) && var(4) && var(6) && var(8)
triggerall = var(10) && var(12) && var(14) && var(16) && var(18)
triggerall = var(20) && var(22) = 0
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno =[200,1999]
triggerall = enemynear,hitdefattr = SCA,AA
triggerall = enemynear,time >= 3
triggerall = enemynear,stateno != var(0)
triggerall = enemynear,stateno != var(2)
triggerall = enemynear,stateno != var(4)
triggerall = enemynear,stateno != var(6)
triggerall = enemynear,stateno != var(8)
triggerall = enemynear,stateno != var(10)
triggerall = enemynear,stateno != var(12)
triggerall = enemynear,stateno != var(14)
triggerall = enemynear,stateno != var(16)
triggerall = enemynear,stateno != var(18)
triggerall = enemynear,stateno != var(20)
trigger1 = root,var(25)
var(22) = enemynear,stateno
ignorehitpause = 1

[state 20000]
type = varset
triggerall = var(22)
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno =[200,1999]
triggerall = enemynear,hitdefattr = SCA,AA
triggerall = var(23) = 0 || var(23) > enemynear,time
trigger1 = enemynear,stateno = var(22)
trigger1 = root,var(25) 
var(23) = enemynear,time
ignorehitpause = 1

[state 20000]
type = varset
trigger1 = !var(22)
var(51) = enemynear,id
ignorehitpause = 1
;------学習リセット--------------
[state 20000];same number reset
type = null
trigger1 = var(2)
trigger1 = var(2) = var(0)
trigger1 = var(2) := 0
trigger2 = var(4)
trigger2 = var(4) = var(0) || var(4) = var(2)
trigger2 = var(4) := 0
trigger3 = var(6)
trigger3 = var(6) = var(0) || var(6) = var(2) || var(6) = var(4)
trigger3 = var(6) := 0
trigger4 = var(8)
trigger4 = var(8) = var(0) || var(8) = var(2) || var(8) = var(4) || var(8) = var(6)
trigger4 = var(8) := 0
trigger5 = var(10)
trigger5 = var(10) = var(0) || var(10) = var(2) || var(10) = var(4) || var(10) = var(6) || var(10) = var(8)
trigger5 = var(10) := 0
trigger6 = var(12)
trigger6 = var(12) = var(0) || var(12) = var(2) || var(12) = var(4) || var(12) = var(6) || var(12) = var(8)
trigger6 = var(12) := 0
trigger7 = var(12)
trigger7 = var(12) = var(10)
trigger7 = var(12) := 0
trigger8 = var(14)
trigger8 = var(14) = var(0) || var(14) = var(2) || var(14) = var(4) || var(14) = var(6) || var(14) = var(8)
trigger8 = var(14) := 0
trigger9 = var(14)
trigger9 = var(14) = var(10) || var(14) = var(12)
trigger9 = var(14) := 0
trigger10 = var(16)
trigger10 = var(16) = var(0) || var(16) = var(2) || var(16) = var(4) || var(16) = var(6) || var(16) = var(8)
trigger10 = var(16) := 0
trigger11 = var(16)
trigger11 = var(16) = var(10) || var(16) = var(12) || var(16) = var(14)
trigger11 = var(16) := 0
trigger12 = var(18)
trigger12 = var(18) = var(0) || var(18) = var(2) || var(18) = var(4) || var(18) = var(6) || var(18) = var(8)
trigger12 = var(18) := 0
trigger13 = var(18)
trigger13 = var(18) = var(10) || var(18) = var(12) || var(18) = var(14) || var(18) = var(16)
trigger13 = var(18) := 0
trigger14 = var(20)
trigger14 = var(20) = var(0) || var(20) = var(2) || var(20) = var(4) || var(20) = var(6) || var(20) = var(8)
trigger14 = var(20) := 0
trigger15 = var(20)
trigger15 = var(20) = var(10) || var(20) = var(12) || var(20) = var(14) || var(20) = var(16) || var(20) = var(18)
trigger15 = var(20) := 0
trigger16 = var(22)
trigger16 = var(22) = var(0) || var(22) = var(2) || var(22) = var(4) || var(22) = var(6) || var(22) = var(8)
trigger16 = var(22) := 0
trigger17 = var(22)
trigger17 = var(22) = var(10) || var(22) = var(12) || var(22) = var(14) || var(22) = var(16) || var(22) = var(18) || var(22) = var(20)
trigger17 = var(22) := 0
ignorehitpause = 1

[state 20000];time reset
type = null
trigger1 = !var(0) && var(1)
trigger1 = var(1) := 0
trigger2 = !var(2) && var(3)
trigger2 = var(3) := 0
trigger3 = !var(4) && var(5)
trigger3 = var(5) := 0
trigger4 = !var(6) && var(7)
trigger4 = var(7) := 0
trigger5 = !var(8) && var(9)
trigger5 = var(9) := 0
trigger6 = !var(10) && var(11)
trigger6 = var(11) := 0
trigger7 = !var(12) && var(13)
trigger7 = var(13) := 0
trigger8 = !var(14) && var(15)
trigger8 = var(15) := 0
trigger9 = !var(16) && var(17)
trigger9 = var(17) := 0
trigger10 = !var(18) && var(19)
trigger10 = var(19) := 0
trigger11 = !var(20) && var(21)
trigger11 = var(21) := 0
trigger12 = !var(22) && var(23)
trigger12 = var(23) := 0
ignorehitpause = 1






;///////////////////////////////////
;投げ学習
;///////////////////////////////////

[state 20000]
type = varset
triggerall = var(30) = 0
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
trigger1 = enemynear,hitdefattr = SCA,AT
var(30) = enemynear,stateno 
ignorehitpause = 1

[state 20000]
type = varset
triggerall = var(30)
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
trigger1 = enemynear,hitdefattr = SCA,AT
trigger1 = var(31) = 0 || var(31) > enemynear,time
trigger1 = enemynear,stateno = var(30)
var(31) = enemynear,time
ignorehitpause = 1

;--------------------------------
[state 20000]
type = varset
triggerall = var(30) && var(32) = 0
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno != var(30)
trigger1 = enemynear,hitdefattr = SCA,AT
var(32) = enemynear,stateno 
ignorehitpause = 1

[state 20000]
type = varset
triggerall = var(32)
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,hitdefattr = SCA,AT
triggerall = var(33) = 0 || var(33) > enemynear,time
trigger1 = enemynear,stateno = var(32)
var(33) = enemynear,time
ignorehitpause = 1


;--------------------------------
[state 20000]
type = varset
triggerall = var(30) && var(32) && var(34) = 0
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno != var(30)
triggerall = enemynear,stateno != var(32)
triggerall = enemynear,stateno != root,var(51) || enemynear,time <= 1
trigger1 = enemynear,hitdefattr = SCA,AT
var(34) = enemynear,stateno 
ignorehitpause = 1

[state 20000]
type = varset
triggerall = var(34)
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,hitdefattr = SCA,AT
triggerall = var(35) = 0 || var(35) > enemynear,time
trigger1 = enemynear,stateno = var(34)
var(35) = enemynear,time
ignorehitpause = 1

;----------------------------------------
[state 20000]
type = varset
triggerall = var(30) && var(32) && var(34) &&var(36) = 0
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,stateno != var(30)
triggerall = enemynear,stateno != var(32)
triggerall = enemynear,stateno != var(34)
triggerall = enemynear,stateno != root,var(51) || enemynear,time <= 1
trigger1 = enemynear,hitdefattr = SCA,AT
var(36) = enemynear,stateno 
ignorehitpause = 1

[state 20000]
type = varset
triggerall = var(36)
triggerall = !enemynear,ishelper
triggerall = enemynear,movetype = A
triggerall = enemynear,hitdefattr = SCA,AT
triggerall = var(37) = 0 || var(37) > enemynear,time
trigger1 = enemynear,stateno = var(36)
var(37) = enemynear,time
ignorehitpause = 1

;_____________
;
;ループ見切り
;_____________

;落下してくるやつ測定
[state 20000]
type = varset
triggerall = root,var(59)>0
triggerall = var(59) >=0
trigger1 = enemy,movetype = A || enemy,ctrl = 0
trigger1 = !enemy,hitdefattr = SCA,AA,AT,AP
trigger1 = enemy,animelemno(0)<var(59)
var(59) = -2

[state 20000]
type = varset
triggerall = root,var(59)>0
triggerall = var(59)>=0
trigger1 = enemy,movetype = A || enemy,ctrl = 0
trigger1 = !enemy,hitdefattr = SCA,AA,AT,AP
trigger1 = enemy,animelemno(0)>var(59)
var(59) = enemy,animelemno(0)

[state 20000]
type = varset
triggerall = root,var(59)>0
triggerall = var(50) = 1
trigger1 = enemy,hitdefattr = SCA,AA,AT,AP
trigger2 = enemy,time = 0
var(59) = 0

;////////////////
;ヘルパー用デバグ
;////////////////
[State -2, デバック]
Type = DisplayToClipBoard
Trigger1 = var(58)%5=0
Text = "v0= %d , v1= %d ,v2= %d , v3= %d \n"
Params = var(0),var(1),var(2),var(3)
IgnoreHitPause = 1

;ヘルパー用デバグ
[State -2, デバック]
Type = AppendToClipBoard
Trigger1 = var(58)%5=0
Text = "v4= %d , v5= %d ,v6= %d , v7= %d \n"
Params = var(4),var(5),var(6),var(7)
IgnoreHitPause = 1

[State -2, デバック]
Type = DisplayToClipBoard
Trigger1 = var(58)%5=1
Text = "v8= %d , v9= %d ,v10= %d , v11= %d \n"
Params = var(8),var(9),var(10),var(11)
IgnoreHitPause = 1

;ヘルパー用デバグ
[State -2, デバック]
Type = AppendToClipBoard
Trigger1 = var(58)%5=1
Text = "v12= %d , v13= %d ,v14= %d , v15= %d \n"
Params = var(12),var(13),var(14),var(15)
IgnoreHitPause = 1

[State -2, デバック]
Type = DisplayToClipBoard
Trigger1 = var(58)%5=2
Text = "v16= %d , v17= %d ,v18= %d , v19= %d \n"
Params = var(16),var(17),var(18),var(19)
IgnoreHitPause = 1

;ヘルパー用デバグ
[State -2, デバック]
Type = AppendToClipBoard
Trigger1 = var(58)%5=2
Text = "v20= %d , v21= %d ,v22 = %d , v23 = %d \n"
Params = var(20),var(21),var(22),var(23)
IgnoreHitPause = 1

[State -2, デバック]
Type = DisplayToClipBoard
Trigger1 = var(58)%5=3
Text = "v30= %d , v31= %d ,v32= %d , v33= %d \n"
Params = var(30),var(31),var(32),var(33)
IgnoreHitPause = 1

;ヘルパー用デバグ
[State -2, デバック]
Type = AppendToClipBoard
Trigger1 = var(58)%5=3
Text = "v34= %d , v35= %d ,v36 = %d , v37 = %d \n"
Params = var(34),var(35),var(36),var(37)
IgnoreHitPause = 1

[State -2, デバック]
Type = DisplayToClipBoard
Trigger1 = var(58)%5=4
Text = "v40= %d , v41= %d ,v42= %d , v43= %d , v44 = %d\n"
Params = var(40),var(41),var(42),var(43),var(44)
IgnoreHitPause = 1

;ヘルパー用デバグ
[State -2, デバック]
Type = AppendToClipBoard
Trigger1 = var(58)%5=4
Text = "v45= %d ,v46 = %d , v47 = %d ,v48 = %d, v49 = %d\n"
Params = var(45),var(46),var(47),var(48),var(49)
IgnoreHitPause = 1


























;__________________________
;
;使用していないよ
;__________________________

[statedef 20001]
ctrl=0
anim = 3125

[State 20001,間違いで本体が来たら立ちへ移行]
type=selfstate
trigger1=!ishelper
value=0

[state 20001,一応無敵]
type = nothitby
trigger1 = 1
value = SCA
supermove = 1
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[state 20001,見えなくしとく 振り向かせない]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noautoturn

[state 20000,場所セット]
type = posset
trigger1 = root,roundsexisted>0
trigger1 = time = 0 || roundstate = [0,1]
trigger1 = numhelper(20002)
y = -50
x = helper(20002),pos x + root,fvar(35)
supermove = 1
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[state 20001,場所セット]
type = posset
trigger1 = 1
y = -50
x = ifelse((pos x>-160),-160,pos x)
supermove = 1
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[state 20001,固定]
type = parentvarset
trigger1 = roundstate = 2
trigger1 = ceil(root,fvar(29) -0.1) <=1
trigger1 = abs(rootdist x)<50
trigger1 = abs(p2dist x)<50
trigger1 = pos x = -160
fvar(29) = 2 + (ceil(root,fvar(29) -0.1)=1)

;まだ作りかけ。実用化まで遠いお。
;==========================
;プレイヤー管理
;==========================
[state 20001,varset01]
type = null
trigger1 = numhelper(20000)
trigger1 = helper(20000),id > var(0)
trigger1 = var(0) := helper(20000),id

trigger2 = numhelper(20001)
trigger2 = helper(20001),id > var(0)
trigger2 = var(0) := helper(20001),id

trigger3 = numhelper(20002)
trigger3 = helper(20002),id > var(0)
trigger3 = var(0) := helper(20002),id

trigger4 = numhelper(20003)
trigger4 = helper(20003),id > var(0)
trigger4 = var(0) := helper(20003),id

trigger5 = numhelper(20004)
trigger5 = helper(20004),id > var(0)
trigger5 = var(0) := helper(20004),id

trigger6 = numhelper(1010)
trigger6 = helper(1010),id > var(0)
trigger6 = var(0) := helper(1010),id

trigger7 = numhelper(1020)
trigger7 = helper(1020),id > var(0)
trigger7 = var(0) := helper(1020),id

trigger8 = numhelper(1030)
trigger8 = helper(1030),id > var(0)
trigger8 = var(0) := helper(1030),id

trigger9 = numhelper(1210)
trigger9 = helper(1210),id > var(0)
trigger9 = var(0) := helper(1210),id

trigger10 = numhelper(1220)
trigger10 = helper(1220),id > var(0)
trigger10 = var(0) := helper(1220),id

trigger11 = numhelper(1310)
trigger11 = helper(1310),id > var(0)
trigger11 = var(0) := helper(1310),id

trigger12 = numhelper(1311)
trigger12 = helper(1311),id > var(0)
trigger12 = var(0) := helper(1311),id

trigger13 = numhelper(1312)
trigger13 = helper(1312),id > var(0)
trigger13 = var(0) := helper(1312),id

trigger14 = numhelper(1330)
trigger14 = helper(1330),id > var(0)
trigger14 = var(0) := helper(1330),id

trigger15 = numhelper(1350)
trigger15 = helper(1350),id > var(0)
trigger15 = var(0) := helper(1350),id

trigger16 = numhelper(1351)
trigger16 = helper(1351),id > var(0)
trigger16 = var(0) := helper(1351),id

trigger17 = numhelper(1352)
trigger17 = helper(1352),id > var(0)
trigger17 = var(0) := helper(1352),id

trigger18 = numhelper(1353)
trigger18 = helper(1353),id > var(0)
trigger18 = var(0) := helper(1353),id

trigger19 = numhelper(2200)
trigger19 = helper(2200),id > var(0)
trigger19 = var(0) := helper(2200),id

trigger20 = numhelper(2225)
trigger20 = helper(2225),id > var(0)
trigger20 = var(0) := helper(2225),id

trigger21 = numhelper(2310)
trigger21 = helper(2310),id > var(0)
trigger21 = var(0) := helper(2310),id

trigger22 = numhelper(3010)
trigger22 = helper(3010),id > var(0)
trigger22 = var(0) := helper(3010),id

trigger23 = numhelper(3011)
trigger23 = helper(3011),id > var(0)
trigger23 = var(0) := helper(3011),id

trigger24 = numhelper(3012)
trigger24 = helper(3012),id > var(0)
trigger24 = var(0) := helper(3012),id

trigger25 = numhelper(3120)
trigger25 = helper(3120),id > var(0)
trigger25 = var(0) := helper(3120),id

trigger26 = numhelper(3410)
trigger26 = helper(3410),id > var(0)
trigger26 = var(0) := helper(3410),id

trigger27 = numhelper(3510)
trigger27 = helper(3510),id > var(0)
trigger27 = var(0) := helper(3510),id

trigger28 = numhelper(3615)
trigger28 = helper(3615),id > var(0)
trigger28 = var(0) := helper(3615),id

trigger29 = numhelper(4000)
trigger29 = helper(4000),id > var(0)
trigger29 = var(0) := helper(4000),id

trigger30 = numhelper(4200)
trigger30 = helper(4200),id > var(0)
trigger30 = var(0) := helper(4200),id

trigger31 = numhelper(4225)
trigger31 = helper(4225),id > var(0)
trigger31 = var(0) := helper(4225),id
ignorehitpause = 1


[state -2];IDセット
type = Null
trigger1 = var(1) = 0
trigger1 = var(1) != var(0) - 2 && var(3) != var(0) - 2 && var(4) != var(0) - 2 && var(5) != var(0) - 2 && var(6) != var(0) - 2 
trigger1 = var(7) != var(0) - 2 && var(8) != var(0) - 2 && var(9) != var(0) - 2 && var(10) != var(0) - 2
trigger1 = PlayerIDExist(var(0) - 2)
trigger1 = PlayerID(var(0) - 2),teamside != root,teamside
trigger1 = PlayerID(var(0) - 2),ishelper
trigger1 = var(1) := var(0) - 2

trigger2 = var(2) = 0
trigger2 = var(1) != var(0) - 1 && var(3) != var(0) - 1 && var(4) != var(0) - 1 && var(5) != var(0) - 1 && var(6) != var(0) - 1 
trigger2 = var(7) != var(0) - 1 && var(8) != var(0) - 1 && var(9) != var(0) - 1 && var(10) != var(0) - 1
trigger2 = PlayerIDExist(var(0) - 1)
trigger2 = PlayerID(var(0) - 1),teamside != root,teamside
trigger2 = PlayerID(var(0) - 1),ishelper
trigger2 = var(2) := var(0) - 1

trigger3 = var(3) = 0
trigger3 = var(1) != var(0)  && var(2) != var(0)  && var(4) != var(0)  && var(5) != var(0)  && var(6) != var(0)  
trigger3 = var(7) != var(0)  && var(8) != var(0)  && var(9) != var(0)  && var(10) != var(0) 
trigger3 = PlayerIDExist(var(0))
trigger3 = PlayerID(var(0)),teamside != root,teamside
trigger3 = PlayerID(var(0)),ishelper
trigger3 = var(3) := var(0)

trigger4 = var(4) = 0
trigger4 = var(1) != var(0) + 1 && var(2) != var(0) + 1 && var(3) != var(0) + 1 && var(5) != var(0) + 1 && var(6) != var(0) + 1 
trigger4 = var(7) != var(0) + 1 && var(8) != var(0) + 1 && var(9) != var(0) + 1 && var(10) != var(0) + 1
trigger4 = PlayerIDExist(var(0) + 1)
trigger4 = PlayerID(var(0) + 1),teamside != root,teamside
trigger4 = PlayerID(var(0) + 1),ishelper
trigger4 = var(4) := var(0) + 1

trigger5 = var(5) = 0
trigger5 = var(1) != var(0) + 2 && var(2) != var(0) + 2 && var(3) != var(0) + 2 && var(4) != var(0) + 2 && var(6) != var(0) + 2 
trigger5 = var(7) != var(0) + 2 && var(8) != var(0) + 2 && var(9) != var(0) + 2 && var(10) != var(0) + 2
trigger5 = PlayerIDExist(var(0) + 2)
trigger5 = PlayerID(var(0) + 2),teamside != root,teamside
trigger5 = PlayerID(var(0) + 2),ishelper
trigger5 = var(2) := var(0) + 2

trigger6 = var(6) = 0
trigger6 = var(1) != var(0) + 3 && var(2) != var(0) + 3 && var(3) != var(0) + 3 && var(4) != var(0) + 3 && var(5) != var(0) + 3 
trigger6 = var(7) != var(0) + 3 && var(8) != var(0) + 3 && var(9) != var(0) + 3 && var(10) != var(0) + 3
trigger6 = PlayerIDExist(var(0)+3)
trigger6 = PlayerID(var(0) + 3),teamside != root,teamside
trigger6 = PlayerID(var(0) + 3),ishelper
trigger6 = var(6) := var(0) + 3

trigger7 = var(7) = 0
trigger7 = var(1) != var(0) + 4 && var(2) != var(0) + 4 && var(3) != var(0) + 4 && var(4) != var(0) + 4 && var(5) != var(0) + 4 
trigger7 = var(6) != var(0) + 4 && var(8) != var(0) + 4 && var(9) != var(0) + 4 && var(10) != var(0) + 4
trigger7 = PlayerIDExist(var(0)+4)
trigger7 = PlayerID(var(0)+4),teamside != root,teamside
trigger7 = PlayerID(var(0)+4),ishelper
trigger7 = var(7) := var(0)+4

trigger8 = var(8) = 0
trigger8 = var(1) != var(0) + 5 && var(2) != var(0) + 5 && var(3) != var(0) + 5 && var(4) != var(0) + 5 && var(5) != var(0) + 5 
trigger8 = var(6) != var(0) + 5 && var(7) != var(0) + 5 && var(9) != var(0) + 5 && var(10) != var(0) + 5
trigger8 = PlayerIDExist(var(0) + 5)
trigger8 = PlayerID(var(0) + 5),teamside != root,teamside
trigger8 = PlayerID(var(0) + 5),ishelper
trigger8 = var(8) := var(0) + 5

trigger9 = var(9) = 0
trigger9 = var(1) != var(0) + 6 && var(2) != var(0) + 6 && var(3) != var(0) + 6 && var(4) != var(0) + 6 && var(5) != var(0) + 6 
trigger9 = var(6) != var(0) + 6 && var(7) != var(0) + 6 && var(8) != var(0) + 6 && var(10) != var(0) + 6
trigger9 = PlayerIDExist(var(0) + 6)
trigger9 = PlayerID(var(0) + 6),teamside != root,teamside
trigger9 = PlayerID(var(0) + 6),ishelper
trigger9 = var(9) := var(0) +6

trigger10 = var(10) = 0
trigger10 = var(1) != var(0) + 7 && var(2) != var(0) + 7 && var(3) != var(0) + 7 && var(4) != var(0) + 7 && var(5) != var(0) + 7 
trigger10 = var(6) != var(0) + 7 && var(7) != var(0) + 7 && var(8) != var(0) + 7 && var(9) != var(0) + 7 
trigger10 = PlayerIDExist(var(0)+7)
trigger10 = PlayerID(var(0) + 7),teamside != root,teamside
trigger10 = PlayerID(var(0) + 7),ishelper
trigger10 = var(10) := var(0) + 7

ignorehitpause = 1


[state -2];IDリセット
type = Null
trigger1 = var(1)
trigger1 = !PlayerIDExist(var(1))
trigger1 = var(1) := 0

trigger2 = var(2)
trigger2 = !PlayerIDExist(var(2))
trigger2 = var(2) := 0

trigger3 = var(3)
trigger3 = !PlayerIDExist(var(3))
trigger3 = var(3) := 0

trigger4 = var(4)
trigger4 = !PlayerIDExist(var(4))
trigger4 = var(4) := 0

trigger5 = var(5)
trigger5 = !PlayerIDExist(var(5))
trigger5 = var(5) := 0

trigger6 = var(6)
trigger6 = !PlayerIDExist(var(6))
trigger6 = var(6) := 0

trigger7 = var(7)
trigger7 = !PlayerIDExist(var(7))
trigger7 = var(7) := 0

trigger8 = var(8)
trigger8 = !PlayerIDExist(var(8))
trigger8 = var(8) := 0

trigger9 = var(9)
trigger9 = !PlayerIDExist(var(9))
trigger9 = var(9) := 0

trigger10 = var(10)
trigger10 = !PlayerIDExist(var(10))
trigger10 = var(10) := 0


trigger11 = var(1)
trigger11 = PlayerIDExist(var(1))
trigger11 = playerid(var(1)),time > 250
trigger11 = var(1) := 0

trigger12 = var(2)
trigger12 = PlayerIDExist(var(2))
trigger12 = playerid(var(2)),time > 250
trigger12 = var(2) := 0

trigger13 = var(3)
trigger13 = !PlayerIDExist(var(3))
trigger13 = playerid(var(3)),time > 250
trigger13 = var(3) := 0

trigger14 = var(4)
trigger14 = !PlayerIDExist(var(4))
trigger14 = playerid(var(4)),time > 250
trigger14 = var(4) := 0

trigger15 = var(5)
trigger15 = !PlayerIDExist(var(5))
trigger15 = playerid(var(5)),time > 250
trigger15 = var(5) := 0

trigger16 = var(6)
trigger16 = !PlayerIDExist(var(6))
trigger16 = playerid(var(6)),time > 250
trigger16 = var(6) := 0

trigger17 = var(7)
trigger17 = !PlayerIDExist(var(7))
trigger17 = playerid(var(7)),time > 250
trigger17 = var(7) := 0

trigger18 = var(8)
trigger18 = !PlayerIDExist(var(8))
trigger18 = playerid(var(8)),time > 250
trigger18 = var(8) := 0

trigger19 = var(9)
trigger19 = !PlayerIDExist(var(9))
trigger19 = playerid(var(9)),time > 250
trigger19 = var(9) := 0

trigger20 = var(10)
trigger20 = !PlayerIDExist(var(10))
trigger20 = playerid(var(10)),time > 250
trigger20 = var(10) := 0
ignorehitpause = 1

[State -2, デバック]
Type = DisplayToClipBoard
Trigger1 = 1
Text = "v0= %d , v1= %d , v2= %d , v3=%d ,v4=%d \n"
Params = var(0),var(1),var(2),var(3),var(4)
IgnoreHitPause = 1


;ヘルパー用デバグ
[State -2, デバック]
Type = AppendToClipBoard
Trigger1 = 1
Text = "v6= %d , v7= %d ,v8 = %d , v9 = %d ,v10=%d\n"
Params = var(6),var(7),var(8),var(9),var(10)
IgnoreHitPause = 1





;________________

;AI起動用ヘルパー
;________________

[Statedef 10000]
ctrl=0

[State 10000,間違いで本体が来たら立ちへ移行]
type=selfstate
trigger1=!ishelper
value=0

[State 10000,プレイヤー判定]
type=varset
trigger1=command="up"&&root,command="up"
trigger2=command="down"&&root,command="down"
trigger3=command="back"&&root,command="back"
trigger4=command="fwd"&&root,command="fwd"
trigger5=command="a"&&root,command="a"
trigger6=command="b"&&root,command="b"
trigger7=command="c"&&root,command="c"
trigger8=command="x"&&root,command="x"
trigger9=command="y"&&root,command="y"
trigger10=command="z"&&root,command="z"

var(59)=-1

[State 10000,立ったら消失]
Type = DestroySelf
triggerAll = isHelper
trigger1=command="up"&&root,command="up"
trigger2=command="down"&&root,command="down"
trigger3=command="back"&&root,command="back"
trigger4=command="fwd"&&root,command="fwd"
trigger5=command="a"&&root,command="a"
trigger6=command="b"&&root,command="b"
trigger7=command="c"&&root,command="c"
trigger8=command="x"&&root,command="x"
trigger9=command="y"&&root,command="y"
trigger10=command="z"&&root,command="z"
Trigger11 = root,var(59)||var(59)=-1

[State 10000,ﾌﾗｸﾞON]
type=varset
triggerall=var(59)!=-1
trigger1=root,command="up"||root,command="down"||root,command="back"||root,command="fwd"||root,command="a"
trigger2=root,command="b"||root,command="c"||root,command="x"||root,command="y"||root,command="z"
trigger3=root,command="haha"||root,command="tori"||root,command="gao_a"||root,command="gao_b"||root,command="gao_c"
trigger4=root,command="pinch_a"||root,command="pinch_b"||root,command="pinch_c"||root,command="enishi"||root,command="super_x"
trigger5=root,command="super_y"||root,command="sora_a"||root,command="sora_b"||root,command="sora_c"||root,command="tsubasa_a"
trigger6=root,command="tsubasa_b"||root,command="tsubasa_c"||root,command="x"||root,command="enikki_a"||root,command="enikki_b"
trigger7=root,command="enikki_c"||root,command="hukou_a"||root,command="hukou_b"||root,command="hukou_c"||root,command="dorori_a"
trigger8=root,command="dorori_b"||root,command="dorori_c"||root,command="yumi_x"||root,command="yumi_y"||root,command="yumi_z"
trigger9=root,command="rasen_x"||root,command="rasen_y"||root,command="rasen_z"||root,command="yaiba_x"||root,command="yaiba_y"
trigger10=root,command="yaiba_z"||root,command="hukou_x"||root,command="hukou_y"||root,command="hukou_z"||root,command="ishi_x"
trigger11=root,command="ishi_y"||root,command="ishi_z"||root,command="IC_c"||root,command="IC_z"||root,command="FF"
trigger12=root,command="BB"||root,command="dd"||root,command="recovery"||root,command="fwd_x"||root,command="fwd_y"
trigger13=root,command="fwd_z"||root,command="fwd_a"||root,command="fwd_b"||root,command="fwd_c"
var(59)=1



