[statedef -3]




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

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

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

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

;番号
;0  手動設定、下に進んで自分で設定してください
;1  対人用初級 AILv1 リコイルLv2 , 反応時間0.15〜1.00秒ランダム , 打率0.10 , 対人用スイッチON
;2  対人用中級 AILv2 リコイルLv3 , 反応時間0.10〜0.80秒ランダム , 打率0.35 , 対人用スイッチON
;3  対人用上級 AILv3 リコイルLv5 , 反応時間0.10〜0.70秒ランダム , 打率0.60 , 対人用スイッチON
;4  対人用鬼畜 AILv4 リコイルLv6 , 反応時間0.05〜0.55秒ランダム , 打率0.80 , 対人用スイッチON
;5  対超反応AI用リコ無 AILv4 リコイルLv0 , 反応時間0.00 , 打率0.00〜1.00変動 , 対人用スイッチOFF
;6  対超反応AI用       AILv4 リコイルLv7 , 反応時間0.00 , 打率0.50〜1.00変動 , 対人用スイッチOFF
;7  全開               AILv4 リコイルLv10 , 反応時間0.00 , 打率全部ホームラン , 対人用スイッチOFF


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

;注意：どのレベルでも受け身狩りします。また、番号下げても初心者〜初級者の方にとってはそこそこ強いので注意してください。
;      あと逆根性値などAIだけでなくプレイヤー操作にも関わるパラメータはconfigにて変更可能です。

ignorehitpause = 1


;__________________________________________________________________________
;
;素手オンリー(Fist mode Only)
;__________________________________________________________________________
[state -3]
type = varset
trigger1 = var(59)
trigger1 = !var(43)
var(43) = 0

;0 --->off
;1 --->on

;おまけ程度にお考えください、とんでもなく弱いです。
;寝雪のジャム0個とか郁未のGGLv0とかよりも下です。
;リコイルがなければVS神奈に0:10付いてると思います。(開幕から草薙ノ剣連発でほぼ詰み、それでも頑張って飛び込む→近中でグッバイ。リコイルすげえ)

ignorehitpause = 1
persistent = 0









;======================================================================================
;以下クイックセット0で有効
;======================================================================================

;____________________________________________________________________
;
;【AIレベル設定】AI Lv
;____________________________________________________________________

[State -3, AIフラグセット]
type = VarSet
ignorehitpause = 1
triggerall = !var(59)
triggerall = RoundState = [1,2]
triggerall = !ishelper
trigger1 = Command = "AI0"|| 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"|| Command = "AI22"|| Command = "AI23"|| Command = "AI24"
trigger6 = Command = "AI25"|| Command = "AI26"|| Command = "AI27"|| Command = "AI28"|| Command = "AI29"
trigger7 = numhelper(10000)
Trigger7 = Helper(10000),var(59)= 1
trigger7 = roundno != 1 || power < powermax || enemynear(var(31)),power < enemynear(var(31)),powermax || life < lifemax || enemynear(var(31)),life < enemynear(var(31)),lifemax
;trigger8 = 1 ;watch専用即スイッチ。使う場合はこの行の先頭trigger8の前の;を消してください。

var(59) = 2 ; <--- 1〜4でどうぞ、今回は初心者用はありません。
            ;最低レベルでも初級者(相手と自分のキャラをちゃんと理解して、ある程度の操作ができる)以上対象です。
            ;Lv1でもほぼフルコンボします。中段はないので屈ガードでほぼ安定。
            ;Lv3以上で対空に屈中を使用します。これ大事。
            ;反応時間と対人用スイッチも活用して強さを調整してください。

;______________________________________________________________________

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

[state -3];リコイル確率制御。Recoil Guard Lv
type = varset
trigger1 = var(59)=[1,10]
trigger1 = var(57)=0
trigger1 = var(40) = 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回ずつになります（いわゆる偶数リコイル）。






;_______________________________________________________________________
;
;反応時間設定(AIの性質上、ここの値で強さが大きく変わります) Reaction time
;_______________________________________________________________________

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



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



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



;______________________________________________________________________

;打率制御 Hitting Average
;______________________________________________________________________

[state -3]
type = varset
trigger1 = var(59)
trigger1 = var(40) = 0
trigger1 = var(50) = 0
trigger1 = !ishelper
var(50) = 2 ; <-----0から9

					;0  川相 追撃できる時は必ずバント スイング時の打率は0.25程度
					;1  初心者レベル 打率は0.10程度  HR率は0.02程度
					;2  初級者レベル 打率は0.35程度  HR率は0.05程度
					;3  中級者レベル 打率は0.60程度  HR率は0.25程度
					;4  上級者レベル 打率は0.80程度  HR率は0.50程度
					;5  打率変動Lv1  体力により打率は0.10〜0.50程度、HR率は0.02〜0.20で変動
					;6  打率変動Lv2  体力により打率は0.00〜1.00程度、HR率は0.00〜0.70で変動
					;7  打率変動Lv3  体力により打率は0.50〜1.00程度、HR率は0.20〜0.70で変動
					;8  ほぼイきかけました 打率1.00 HR率1.00
					;9  一か八か     HR率0.30 他は全部外れ

;注意：相手キャラによってはこの確率とかなり差が出ることが多々あります。
;      あとバントは川相と一か八か以外の場合はAIレベルにより状況に応じて使います



ignorehitpause = 1






;______________________________________________________________________

;対人用スイッチ (VS Human mode)
;______________________________________________________________________

[state -3]
type = varset
triggerall = var(59)
triggerall = !var(40)
trigger1 = !var(47)
var(47) = 1          ;0 AI用っぽい OFF
                     ;1 対人用     ON
                     
;		ONにするとどうなるの？
;		・ぶっぱとかするようになります。
;		・AIには意味ないけど人間には意味ある崩しを行います、投げと昇竜の２択とか。
;		・めくりが効くかも。ワンボタン反応時間に依存。飛び道具重ねて頭の上飛び越すめくりも有効。
;		・リープ系の中段が効くかも。ワンボタン反応時間に依存。
;		・中下段の揺さぶりも効くかも。ワンボタン反応時間に依存。

ignorehitpause = 1
persistent = 0





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

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


ignorehitpause = 1
persistent = 0




























;===============================================================================
;以下いじるな危険 Don't change under here.
;===============================================================================
;var(59) AI switch
;var(58) enemy's default numhelper
;var(57) recoil Lv
;var(56) enemy's rest of recovery time
;var(55) statetype in guard states
;var(54) unguardable by crouching guard
;var(53) unguardable by standing guard
;var(52) unguardable
;var(51) stage size 
;var(50) HomeRun
;var(49) HomeRun
;var(48) Fall time
;var(47) VS.Human
;var(46) vs.human
;var(45) vs.human random
;var(44) ukemigari
;var(43) Fist Only
;var(42) under limit of enemy's pos y in state 5050
;var(41) for understanding mistake
;var(40) Quick Setting



;fvar(39) own gravity
;fvar(38) enemy's gravity
;fvar(36) stage right edge
;fvar(35) stage left edge
;fvar(34) stagefrontedgedist
;fvar(33) stagebackedgedist
;fvar(32) reaction time
;fvar(31) reaction time

;-------------------------
;デバッグ用
;-------------------------

[state -3];AIon
type = varset
trigger1 = command = "y"
trigger1 = 0
var(59) = 4

[state -3];AIoff
type = varset
trigger1 = command = "z"
trigger1 = 0
var(59) = 0

[state -3]
type = varset
trigger1 = roundstate <= 1
var(39) = -1
[state -3]
type = varset
trigger1 = var(39) = -1
trigger1 = statetype != A && statetype != L
trigger1 = pos y < 0
var(39) = stateno
ignorehitpause = 1

;自動ホームラン
[State -1]
type = null;ChangeState
value = 1160
triggerall = roundstate = 2
triggerall = stateno = 1150
triggerall = animelemno(0) = 10
triggerall = numtarget(1100)
triggerall = target(1100),vel y > 0
triggerall = target(1100),pos y + 12*target(1100),vel y + 66*(0.25 + 0.05*target(1100),const(movement.yaccel)) = [-12,10]
trigger1 = 1

;-------------------------
;クイックセット用
;-------------------------
[state -3];AILv
type = varset
trigger1 = var(59)=[1,10]
trigger1 = var(40)
trigger1 = !ishelper
var(59) = ifelse(var(40)<=4,var(40),4)
ignorehitpause = 1

[state -3];リコイル確率制御。Recoil Guard Lv
type = varset
trigger1 = var(59)=[1,10]
trigger1 = var(40)
trigger1 = !ishelper
var(57) = 2*(var(40)=1) + 3*(var(40)=2) + 5*(var(40)=3)+6*(var(40)=4) + 7*(var(40)=6) + 10*(var(40)=7)
ignorehitpause = 1

[state -3];切り返し最速反応時間(昇竜などコマンド式のもの用)
type = varset
trigger1 = gametime%100 = 0
trigger1 = var(40) = 1
trigger1 = !ishelper
fvar(32) =0.15 + 0.01*(random%86)
ignorehitpause = 1

[state -3];ワンボタン攻撃の最速反応時間(弱中強攻撃などワンボタン式のもの用)
type = varset
trigger1 = gametime%100 = 0
trigger1 = var(40) = 1
trigger1 = !ishelper
fvar(31) =0.08 + 0.01*(random%43)
ignorehitpause = 1

[state -3];切り返し最速反応時間(昇竜などコマンド式のもの用)
type = varset
trigger1 = gametime%100 = 0
trigger1 = var(40) = 2
trigger1 = !ishelper
fvar(32) =0.10 + 0.01*(random%71)
ignorehitpause = 1

[state -3];ワンボタン攻撃の最速反応時間(弱中強攻撃などワンボタン式のもの用)
type = varset
trigger1 = gametime%100 = 0
trigger1 = var(40) = 2
trigger1 = !ishelper
fvar(31) =0.05 + 0.01*(random%36)
ignorehitpause = 1

[state -3];切り返し最速反応時間(昇竜などコマンド式のもの用)
type = varset
trigger1 = gametime%100 = 0
trigger1 = var(40) = 3
trigger1 = !ishelper
fvar(32) =0.10 + 0.01*(random%61)
ignorehitpause = 1

[state -3];ワンボタン攻撃の最速反応時間(弱中強攻撃などワンボタン式のもの用)
type = varset
trigger1 = gametime%100 = 0
trigger1 = var(40) = 3
trigger1 = !ishelper
fvar(31) =0.05 + 0.01*(random%31)
ignorehitpause = 1

[state -3];切り返し最速反応時間(昇竜などコマンド式のもの用)
type = varset
trigger1 = gametime%100 = 0
trigger1 = var(40) = 4
trigger1 = !ishelper
fvar(32) =0.05 + 0.01*(random%51)
ignorehitpause = 1

[state -3];ワンボタン攻撃の最速反応時間(弱中強攻撃などワンボタン式のもの用)
type = varset
trigger1 = gametime%100 = 0
trigger1 = var(40) = 4
trigger1 = !ishelper
fvar(31) =0.025 + 0.01*(random%26)
ignorehitpause = 1

[state -3];切り返し最速反応時間(昇竜などコマンド式のもの用)
type = varset
trigger1 = gametime%100 = 0
trigger1 = var(40) >= 5
trigger1 = !ishelper
fvar(32) =0
ignorehitpause = 1

[state -3];ワンボタン攻撃の最速反応時間(弱中強攻撃などワンボタン式のもの用)
type = varset
trigger1 = gametime%100 = 0
trigger1 = var(40) >= 5
trigger1 = !ishelper
fvar(31) =0
ignorehitpause = 1

[state -3]
type = varset
trigger1 = var(59)
trigger1 = var(40)
trigger1 = !ishelper
var(50) = var(40)*(var(40)<=4) + 6*(var(40)=5) + 7*(var(40)=6) + 8*(var(40)=7)
ignorehitpause = 1

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

[state -3];対人用スイッチ
type = varset
triggerall = var(59)
triggerall = var(40) = [1,4]
trigger1 = !var(47)
var(47) = 1
ignorehitpause = 1

[state -3];対人用スイッチ
type = varset
triggerall = var(59)
triggerall = var(40) >4
trigger1 = var(47)
var(47) = 0
ignorehitpause = 1

;------------------------------------------------------------------------
[state -3]
type = varrandom
trigger1 = var(59)
trigger1 = stateno = 1150
trigger1 = time = 1
v = 49
range = 0 , 99
ignorehitpause = 1

[state -3]
type = assertspecial
trigger1 = var(47)
flag = nostandguard
flag2 = nocrouchguard
flag3 = noairguard

[state -3]
type = varset
trigger1 = 1
var(46) = ifelse(ceil(60*fvar(31)) < 20 ,ceil(60*fvar(31)),19)
ignorehitpause = 1

[state -3]
type = varrandom
trigger1 = gametime%120 = 0
v = 45
range = 0,199
ignorehitpause = 1

;==============================================================================
;AI下準備
;==============================================================================
;----------------------------------
;相手のヘルパー数調べ
[state -1];ヘルパー数調べの準備
type=varset
triggerall = !ishelper
trigger1 = roundstate!=2
var(58)=9999
supermove = 1
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999


[state -1];ヘルパー数を調べる
type=varset
var(58)=enemynear(var(31)),numhelper
triggerall = !ishelper
trigger1 = roundstate=2
trigger1 = enemynear(var(31)),ctrl=1
trigger1 = var(58)>=enemynear(var(31)),numhelper
ignorehitpause = 1


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

;受け身不能時間
[state -3,AI用受身不能時間カウント]
type=varset
triggerall = !ishelper
triggerall = enemynear(var(31)),statetype = A && enemynear(var(31)),movetype = H
trigger1 = numhelper(1280)
trigger1 = helper(1280),stateno = [1280,1281]
trigger1 = helper(1280),movehit = 1
trigger2 = numhelper(1281)
trigger2 = helper(1281),stateno = [1280,1281]
trigger2 = helper(1281),movehit = 1
trigger3 = numhelper(1282)
trigger3 = helper(1282),stateno = [1280,1281]
trigger3 = helper(1282),movehit = 1
trigger4 = numhelper(1283)
trigger4 = helper(1283),stateno = [1280,1281]
trigger4 = helper(1283),movehit = 1
trigger5 = numhelper(1284)
trigger5 = helper(1284),stateno = [1280,1281]
trigger5 = helper(1284),movehit = 1
trigger6 = numhelper(1286)
trigger6 = helper(1286),stateno = [1280,1281]
trigger6 = helper(1286),movehit = 1
trigger7 = numhelper(1287)
trigger7 = helper(1287),stateno = [1280,1281]
trigger7 = helper(1287),movehit = 1
trigger8 = numhelper(1288)
trigger8 = helper(1288),stateno = [1280,1281]
trigger8 = helper(1288),movehit = 1
trigger9 = numhelper(1470)
trigger9 = helper(1470),movehit = 1
trigger10 = numhelper(1471)
trigger10 = helper(1471),movehit = 1
trigger11 = numhelper(1472)
trigger11 = helper(1472),movehit = 1
trigger12 = numhelper(1473)
trigger12 = helper(1473),movehit = 1
trigger13 = numhelper(1474)
trigger13 = helper(1474),movehit = 1
trigger14 = numhelper(1475)
trigger14 = helper(1475),movehit = 1
trigger15 = numprojid(8000)
trigger15 = projhittime(8000) = 1
trigger16 = numprojid(8001)
trigger16 = projhittime(8001) = 1
trigger17 = numprojid(8002)
trigger17 = projhittime(8002) = 1
trigger18 = numprojid(8003)
trigger18 = projhittime(8003) = 1
trigger19 = numprojid(8004)
trigger19 = projhittime(8004) = 1
trigger20 = numprojid(8005)
trigger20 = projhittime(8005) = 1
trigger21 = numprojid(8006)
trigger21 = projhittime(8006) = 1
trigger22 = numprojid(8007)
trigger22 = projhittime(8007) = 1
trigger23 = numprojid(8008)
trigger23 = projhittime(8008) = 1
trigger24 = numprojid(8009)
trigger24 = projhittime(8009) = 1
trigger25 = numprojid(8010)
trigger25 = projhittime(8010) = 1
trigger26 = numprojid(8011)
trigger26 = projhittime(8011) = 1
trigger27 = numprojid(8012)
trigger27 = projhittime(8012) = 1
trigger28 = numprojid(8013)
trigger28 = projhittime(8013) = 1
var(56) = enemynear(var(31)),gethitvar(fall.recovertime)
ignorehitpause = 1

;受け身不能時間
[state -3,AI用受身不能時間カウント]
type=varset
triggerall = !ishelper
triggerall = enemynear(var(31)),statetype = A && enemynear(var(31)),movetype = H
trigger1 = stateno = 3200 || stateno = 3205 || stateno = 3210 || stateno = 1000 ||(stateno = [1100,1170])|| stateno = [3000,3099]
trigger1 = movehit = 1
trigger2 = numhelper(1250)
trigger2 = (helper(1250),stateno = [1250,1270])||helper(1250),stateno = [3150,3160]
trigger2 = helper(1250),movehit
trigger3 = numhelper(3152)
trigger3 = helper(3152),stateno = [3150,3160]
trigger3 = helper(3152),movehit
trigger4 = numtarget(1000) 
trigger5 = numtarget
trigger5 = target,stateno = 5656
var(56) = 999
ignorehitpause = 1

[state -3]
type=varadd
triggerall = !ishelper
trigger1 = var(56)>0
trigger1 = enemynear(var(31)),canrecover=0
trigger1 = enemynear(var(31)),hitfall=1
trigger1 = stateno!=900
var(56)=-1
ignorehitpause=0

;---------------------
[state -3];相手Fall状態地のy軸限界リセット
type = varset
trigger1 = roundstate != 2
trigger1 = teammode = turns
var(42) = 0
ignorehitpause = 1
;----------------------------------------------------------------------------------
;中段立ち下段など学習
;----------------------------------------------------------------------------------
[state -3,middle]
type = varset
triggerall = !ishelper
triggerall = var(59)>0 && roundstate =2
triggerall = var(54)!
triggerall = p2stateno != var(52)
triggerall = statetype!=A
trigger1 = time <= 1
trigger1 = stateno = [5000,5099]
trigger1 = (enemynear(var(31)),hitdefattr = SCA,AT)=0
trigger1 = var(55)=2 && prevstateno = [120,155]
var(54) = p2stateno

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

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

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

[state -3]
type = varset
triggerall = !var(52) 
trigger1 = var(54) = var(53)
trigger1 = var(54) >= 200
var(52) = var(54)
ignorehitpasue = 1

[state -3,low]
type = varset
triggerall = !ishelper
trigger1 = teammode = turns
trigger1 = roundstate !=2
var(52) = 0
ignorehitpause = 1

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

[state -3,相手の重力加速度]
type =varset
triggerall = !ishelper
trigger1 = enemynear(var(31)),movetype=H
trigger1 = enemynear(var(31)),gethitvar(yaccel)!=0
fvar(38)=ifelse((enemynear(var(31)),stateno != 5656),enemynear(var(31)),GetHitVar(yaccel),0.3)
ignorehitpause = 0

[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(4)
ignorehitpause = 1

;---------------------------------------------------------------
;相手が地上に落ちるまでの時間

[state -3]
type = varset
trigger1 = enemynear(var(31)),movetype = H
trigger1 = enemynear(var(31)),statetype = A
var(48) = ceil((-fvar(11) + (abs(fvar(11)**2 - 2*fvar(38)*enemynear(var(31)),pos y))**0.5)/(fvar(38)+0.00000001))
ignorehitpause = 1

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

[state -3]
type = NUll
triggerall = !ishelper
triggerall = numhelper(40000)
triggerall = numenemy = 1 && numpartner = 0
trigger1 = facing = -1
trigger1 = var(51) = 1 || var(51) = 3
trigger1 = fvar(33) := helper(40000),pos x + fvar(36) - pos x
trigger2 = facing = 1
trigger2 = var(51) = 2 || var(51) = 3
trigger2 = fvar(33) := -(helper(40000),pos x - fvar(35) - pos x)
trigger3 = facing = -1
trigger3 = var(51) = 0
trigger3 = fvar(33) := helper(40000),pos x + 400.0000000 - pos x
trigger4 = facing = 1
trigger4 = var(51) = 0
trigger4 = fvar(33) := -(helper(40000),pos x - 400.000000 - pos x)
trigger5 = facing = -1
trigger5 = var(51) = 2
trigger5 = fvar(33) := helper(40000),pos x + fvar(35) - pos x
trigger6 = facing = 1
trigger6 = var(51) = 1
trigger6 = fvar(33) := -(helper(40000),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(40000)
triggerall = var(51) != 3
trigger1 = facing = 1
trigger1 = helper(40000),pos x + fvar(36) - pos x <= 70
trigger1 = helper(40000),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(40000),pos x + fvar(36) - pos x <= 70
trigger2 = helper(40000),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(40000),pos x - fvar(36) - pos x) <= 70
trigger3 = -(helper(40000),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(40000),pos x - fvar(36) - pos x) <= 70
trigger4 = -(helper(40000),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 -1]
type = ChangeState
value = 4000
triggerall = var(59) && roundstate = 2
triggerall = power >= 3000
triggerall = life <= 0.333*const(data.life)
triggerall = var(30) = 1
triggerall = life > 0.2*lifemax
triggerall = enemynear(var(31)),movetype = A
triggerall = enemynear(var(31)),animtime < -11 || !(teammode = turns) && roundno = 3 || (teammode = turns) && roundno = 7
triggerall = var(25) < 20
triggerall = p2bodydist x <= 40
triggerall = enemynear(var(31)),time >= 60*fvar(32) || fvar(32) < 0.01 || random <= 15
trigger1 = statetype != A 
trigger1 = ctrl || stateno = 52 || (stateno = 120 && prevstateno = [160,162])
trigger2 =(stateno = [300,315])||(stateno = [350,360])||(stateno = [500,520])||stateno = [550,560]
trigger2 = movecontact || var(28) && movereversed > 1

;弱乙女富嶽
[State -1,17]
type = ChangeState
value = 1100
triggerall = enemynear(var(31)),movetype!=H
triggerall = enemynear(var(31)),statetype != L
triggerall = P2bodyDist X <= 20
triggerall = p2dist x>0
triggerall = enemynear(var(31)),statetype != A
triggerall = var(59) = [1,10]
triggerall = statetype != A
triggerall = var(30)
triggerall = ctrl || stateno = 52|| (stateno = 120 && prevstateno = [160,162])
triggerall = enemynear(var(31)),prevstateno != 5120 || enemynear(var(31)),time>7
triggerall = p2stateno != [5000,5900]
triggerall = time >= 60*fvar(32) || fvar(32) < 0.01 || random <= 5
trigger1 = stateno = 120 && prevstateno = [160,162]
trigger1 = enemynear(var(31)),movetype = A
trigger1 = enemynear(var(31)),hitdefattr = SC,AA || enemynear(var(31)),movehit
trigger1 = enemynear(var(31)),moveguarded = 0


;中紅蓮竹刀
[State -3,切り返し中紅蓮]
type = ChangeState
value = 1203
triggerall = (var(59)=[2,10])&&roundstate=2
triggerall = statetype !=A
triggerall = p2dist x > -5
triggerall = random%16<var(59)*var(59) && !var(47) || random <= 100
triggerall = enemynear(var(31)),time > 2 || enemynear(var(31)),animtime >= -13||enemynear(var(31)),hitdefattr = S,AT
triggerall = enemynear(var(31)),movetype=A
triggerall = enemynear(var(31)),ctrl=0
triggerall = enemynear(var(31)),numhelper - var(58)<5 && enemynear(var(31)),numproj<5
triggerall = p2stateno < 3000 || (p2stateno >=3000 && enemynear(var(31)),animtime > -15)||ctrl = 0
triggerall = enemynear(var(31)),animtime<=-13
triggerall = var(30) = 1
triggerall = (p2bodydist x + 12*facing*enemynear(var(31)),facing*enemynear(var(31)),vel x=[-15,55])
triggerall = enemynear(var(31)),pos y>-75
triggerall = enemynear(var(31)),statetype!=A||(enemynear(var(31)),statetype=A&&(fvar(11)=0||(fvar(11)!=0&&enemynear(var(31)),pos y+12*fvar(11)+0.5*144*fvar(38)=[-60,-10]))) 
triggerall = var(8) = 1 || var(7) >= 200 || enemynear(var(31)),life*enemynear(var(31)),const(data.defence) < 80*100*fvar(0)
triggerall = enemynear(var(31)),time >= 60*fvar(32) || random <= 5 || random <= 5*var(59) && time <= 1 && prevstateno = [140,155]
trigger1 = ctrl || (stateno = 120 && prevstateno = [160,162])
trigger2 = (stateno = [300,315])||(stateno = [350,360])||(stateno = [500,560])
trigger2 = movecontact || var(28) && movereversed > 1
trigger3 = stateno = [100, 101]
trigger4 = stateno = 52

;強乙女富嶽
[State -1]
type = ChangeState
value = 1120
triggerall = (var(59)=[2,10])&&roundstate=2
triggerall = statetype !=A
triggerall = p2dist x > -5
triggerall = random%16<var(59)*var(59) && !var(47) || random <= 100
triggerall = enemynear(var(31)),time > 2 || !(enemynear(var(31)),authorname = "muteki")
triggerall = enemynear(var(31)),movetype=A
triggerall = enemynear(var(31)),ctrl=0
triggerall = p2stateno < 2500 || ctrl = 0 
triggerall = enemynear(var(31)),animtime<= -33 || enemynear(var(31)),time < 5 && enemynear(var(31)),stateno = [200,799]
triggerall = var(30) = 1
triggerall = p2bodydist x - 6*enemynear(var(31)),vel x <= 40 && enemynear(var(31)),vel x >= 0
triggerall = enemynear(var(31)),statetype!=A
triggerall = enemynear(var(31)),time >= 60*fvar(32) || random <= 5 || random <= 5*var(59) && time <= 1 && prevstateno = [140,155]
triggerall = random <= 150
trigger1 = ctrl || (stateno = 120 && prevstateno = [160,162])
trigger2 = (stateno = [300,315])||(stateno = [350,360])||(stateno = [500,560])
trigger2 = movecontact || var(28) && movereversed > 1
trigger3 = stateno = [100, 101]
trigger4 = stateno = 52
;_________________________________________________________
;
;切り返し(素手)
;_________________________________________________________
;乙女富嶽
[State -1,17]
type = ChangeState
value = 1000
triggerall = enemynear(var(31)),movetype!=H
triggerall = enemynear(var(31)),statetype != L
triggerall = P2bodyDist X <= 20
triggerall = p2dist x>0
triggerall = enemynear(var(31)),statetype != A
triggerall = var(59) = [1,10]
triggerall = statetype != A
triggerall = !var(30)
triggerall = ctrl || stateno = 52 || (stateno = 120 && prevstateno = [160,162])
triggerall = enemynear(var(31)),prevstateno != 5120 || enemynear(var(31)),time>7
triggerall = p2stateno != [5000,5900]
triggerall = time >= 60*fvar(32) || fvar(32) < 0.01 || random <= 15
trigger1 = stateno = 120 && prevstateno = [160,162] 
trigger1 = enemynear(var(31)),movetype = A
trigger1 = enemynear(var(31)),hitdefattr = SC,AA || enemynear(var(31)),movehit
trigger1 = enemynear(var(31)),moveguarded = 0
trigger2 = prevstateno = [150,155]
trigger2 = enemynear(var(31)),animtime = [-8,-4]
trigger3 = p2stateno <= 100
trigger3 = random <= 30

;Lv1 真・乙女の鉄拳
[State -1,otometekkenLv1]
type = ChangeState
value = 3000
triggerall = roundstate = 2
triggerall = var(59) = [1,10]
triggerall = !var(30)
triggerall = ctrl || stateno = 52 || (stateno = 120 && prevstateno = [160,162]) || ((movecontact||var(28)&&movereversed > 2) && ((stateno = [200,220]) || (stateno = [400,420])))
triggerall = power >= 1000
triggerall = statetype != A
triggerall = P2bodyDist X <= 80
triggerall = p2dist x>0
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype != A
triggerall = enemynear(var(31)),movetype = A
triggerall = (enemynear(var(31)),hitdefattr = SCA,AT)=0
triggerall = enemynear(var(31)),time > 2 || (enemynear(var(31)),stateno = [1000,2500]) || (enemynear(var(31)),authorname = "muteki") = 0
triggerall = enemynear(var(31)),animtime < -30
triggerall = enemynear(var(31)),stateno < 2500 && enemynear(var(31)),stateno != [800,899]
triggerall = enemynear(var(31)),time >= 60*fvar(32) || fvar(32) < 0.01 || random <= 10
trigger1 = prevstateno = [150,155]
trigger2 = stateno = 120 && prevstateno = [160,162]
trigger3 = enemynear(var(31)),hitdefattr = SCA,AA
trigger4 = random <= 0.1*power

;_________________________________________________________

;隙付き(竹刀)
;_________________________________________________________

;中攻撃（ダッシュ）
[State -1]
type = ChangeState
value = 360
triggerall = RoundState = 2 && var(59)
triggerall = var(30) = 1
triggerall = stateno = 100
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype != A
triggerall = enemynear(var(31)),time >= 60*fvar(31) || fvar(31) < 0.01 || random <= 15
trigger1 = p2bodydist x <= 120
trigger1 = enemynear(var(31)),movetype = A
trigger1 = enemynear(var(31)),animtime < -13 || enemynear(var(31)),hitdefattr = SCA,AA
trigger1 = random <= 350

;しゃがみ強攻撃(ダッシュ) 
[State -1]
type = ChangeState
value = 570
triggerall = RoundState = 2 && var(59)
triggerall = var(30) = 1
triggerall = stateno = 100
triggerall = enemynear(var(31)),movetype !=H
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),time >= 60*fvar(31) || fvar(31) < 0.01 || random <= 15
trigger1 = enemynear(var(31)),statetype != A || enemynear(var(31)),stateno = [40,44]
trigger1 = p2bodydist x <= 130
trigger1 = enemynear(var(31)),movetype = A
trigger1 = enemynear(var(31)),animtime < -10
trigger1 = random <= 250
trigger2 = enemynear(var(31)),statetype = A
trigger2 = p2bodydist x <= 120
trigger2 = p2bodydist y > -70
trigger2 = fvar(11) = [-2,2]
trigger2 = random <= 350

;遠距離
;Lv1 ちょこまかすんなぁ
[State -1]
type = ChangeState
value = 3200
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A
triggerall = ctrl|| (stateno = 120 && prevstateno = [160,162])
triggerall = stateno != 101
triggerall = var(30) = 1
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype!=A && enemynear(var(31)),movetype != H && enemynear(var(31)),stateno != [120,155]
triggerall = power >= 1000
triggerall = enemynear(var(31)),time > 2
triggerall = enemynear(var(31)),time >= ceil(60*fvar(32)) + 10*var(47)|| random < 5
trigger1 = p2bodydist x >= 140
trigger1 = enemynear(var(31)),movetype = A || stateno = [1000,2000]
trigger1 = enemynear(var(31)),ctrl = 0
trigger1 = enemynear(var(31)),animtime < -22


;-----------------------------------
;対空
;-----------------------------------
;しゃがみ中攻撃
[State -1]
type = ChangeState
value = 510
triggerall = var(59) && roundstate = 2
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = statetype!=A
triggerall = p2stateno != [5200,5220]
triggerall = var(59) >= 3
triggerall = var(30) = 1
triggerall = numhelper(40000)
triggerall = (ceil(enemynear(var(31)),pos y + 13*fvar(11) + 0.5*169*fvar(38))=[-60,-15])||(fvar(11) = 0 && enemynear(var(31)),pos y > - 65)
triggerall = enemynear(var(31)),statetype = A && enemynear(var(31)),movetype!=H
triggerall = fvar(34) <= 130 && facing*enemynear(var(31)),facing*enemynear(var(31)),vel x >= -1||ceil(p2bodydist x + 13*facing*enemynear(var(31)),facing*enemynear(var(31)),vel x) = [-10,60]
triggerall = enemynear(var(31)),stateno < 1000 || enemynear(var(31)),animtime >= -15 || helper(40000),var(22) = -2
triggerall = enemynear(var(31)),time >= 60*fvar(31) || fvar(31) < 0.01 || fvar(11) != 0 && fvar(11) > enemynear(var(31)),const(velocity.jump.y) + 60*fvar(31)*fvar(38)
triggerall = fvar(11) + 13*fvar(38) > 3 || p2dist x + 13*facing*enemynear(var(31)),facing*fvar(10) > -15 || fvar(34) >= 180
triggerall = fvar(11) != 0 || enemynear(var(31)),pos y < -5
triggerall = enemynear(var(31)),stateno != helper(40000),var(40) || enemynear(var(31)),numhelper + enemynear(var(31)),numproj < helper(40000),var(39) || numenemy > 1
triggerall = enemynear(var(31)),stateno != helper(40000),var(38) || enemynear(var(31)),numhelper + enemynear(var(31)),numproj < helper(40000),var(37) || numenemy > 1
trigger1 = !inguarddist || var(25)
trigger1 = fvar(11) = 0 || enemynear(var(31)),time <= 2 || stateno != [100,119]
trigger1 = var(41) := 1
trigger2 = (enemynear(var(31)),numproj <= 1 && enemynear(var(31)),numhelper <= var(58))
trigger2 = enemynear(var(31)),movetype = A
trigger2 = enemynear(var(31)),time <= 3 || enemynear(var(31)),animtime < -13 || enemynear(var(31)),animtime >= 1 || facing = enemynear(var(31)),facing
trigger2 = var(41) := 1
trigger3 = helper(40000),var(22) = -2
trigger3 = enemynear(var(31)),ctrl = 0
trigger3 = enemynear(var(31)),stateno >= 200
trigger3 = var(41) := 1

[state -3];対空失敗学習用
type = Null
trigger1 = var(41) = 1
trigger1 = stateno != 510
trigger1 = movetype != H
trigger1 = var(41) := 0
trigger2 = var(41) > 1
trigger2 = var(41) := 0
ignorehitpause = 1

;立ち弱
[state -3]
type = changestate
value = 300
triggerall = var(59) && roundstate = 2
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = statetype!=A
triggerall = p2stateno != [5200,5220]
triggerall = var(59)>=4
triggerall = var(30) = 1
triggerall = enemynear(var(31)),statetype = A && enemynear(var(31)),movetype!=H
triggerall = fvar(11) != 0
triggerall = enemynear(var(31)),time >= 60*fvar(31) || fvar(31) < 0.01 || random <= 15 || fvar(11) > enemynear(var(31)),const(velocity.jump.y) + 60*fvar(31)*fvar(38)
triggerall = p2bodydist x + 4*facing*enemynear(var(31)),facing*enemynear(var(31)),vel x<=25
triggerall = enemynear(var(31)),pos y + 4*fvar(11) + 0.5*16*fvar(38) = [-7 - 5*(enemynear(var(31)),vel x = 0),0]
triggerall = p2dist x > 0
trigger1 = enemynear(var(31)),movetype != A && !inguarddist

trigger2 = numhelper(40000)
trigger2 = helper(40000),var(22) = -2
trigger2 = enemynear(var(31)),ctrl = 0
trigger2 = enemynear(var(31)),stateno >= 200

;しゃがみ中攻撃(ダッシュ) 
[State -1]
type = ChangeState
value = 560
triggerall = var(59) && roundstate = 2
triggerall = statetype!=A
triggerall = p2stateno != [5200,5220]
triggerall = var(30) = 1
triggerall = var(59) >= 3
triggerall = (ceil(enemynear(var(31)),pos y + 13*fvar(11) + 0.5*169*fvar(38))=[-75,-15])||(fvar(11) = 0 && enemynear(var(31)),pos y > - 75)
triggerall = enemynear(var(31)),statetype = A && enemynear(var(31)),movetype!=H
triggerall = ceil(p2bodydist x - 13*(2*(facing != enemynear(var(31)),facing)-1)*enemynear(var(31)),vel x) = [-10,60]
triggerall = enemynear(var(31)),stateno < 1000 || enemynear(var(31)),animtime >= -15
triggerall = enemynear(var(31)),time >= 60*fvar(31) || fvar(31) < 0.01 || fvar(11) != 0 && fvar(11) > enemynear(var(31)),const(velocity.jump.y) + 60*fvar(31)*fvar(38)
trigger1 = stateno = [100,101]
;------------------------------------------------------------------------------
;後刺し
;------------------------------------------------------------------------------
;弱攻撃
[State -1]
type = ChangeState
value = 300
triggerall = RoundState = 2 && var(59)
triggerall = var(30) = 1
triggerall = stateno != 101
triggerall = statetype != A 
triggerall = ctrl || stateno = 52 || (stateno = 120 && prevstateno = [160,162])
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),movetype != H
triggerall = p2dist x > 0
trigger1 = enemynear(var(31)),movetype = A
trigger1 = enemynear(var(31)),animtime = [-7,-5]
trigger1 = enemynear(var(31)),time >= 10
trigger1 = enemynear(var(31)),statetype != A
trigger1 = p2bodydist x < 60
trigger1 = random <= 200

;中攻撃
[State -1]
type = ChangeState
value = 315
triggerall = RoundState = 2 && var(59)
triggerall = var(30) = 1
triggerall = stateno != 101
triggerall = statetype != A 
triggerall = ctrl || stateno = 52 || (stateno = 120 && prevstateno = [160,162])
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),movetype != H
trigger1 = enemynear(var(31)),movetype = A
trigger1 = enemynear(var(31)),animtime = [-16,-14]
trigger1 = enemynear(var(31)),time > 2
trigger1 = enemynear(var(31)),statetype != A
trigger1 = p2bodydist x = [40,100]
trigger1 = enemynear(var(31)),hitdefattr = SCA,NA,SA,HA
trigger1 = random <= 200
;_________________________________________________________

;隙付き(素手)
;_________________________________________________________
;立ち弱
[state -3]
type = changestate
value = 250
triggerall = var(59) && roundstate = 2
triggerall = stateno = [100,102]
triggerall = statetype!=A
triggerall = p2stateno != [5200,5220]
triggerall = var(59)>=4
triggerall = var(30) = 0
triggerall = enemynear(var(31)),statetype != A && enemynear(var(31)),movetype!=H
triggerall = p2dist x > 0
trigger1 = enemynear(var(31)),movetype != A && random < 200|| enemynear(var(31)),time < 2
trigger1 = p2bodydist x < 60
trigger1 = random < 200

;立ち中
[state -3]
type = changestate
value = 210
triggerall = var(59) && roundstate = 2
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = statetype!=A
triggerall = p2stateno != [5200,5220]
triggerall = var(59)>=4
triggerall = var(30) = 0
triggerall = enemynear(var(31)),statetype != A
triggerall = enemynear(var(31)),statetype != L
triggerall = p2dist x > 0
trigger1 = enemynear(var(31)),time >= 60*fvar(31) || fvar(31) < 0.01 || random <= 100
trigger1 = enemynear(var(31)),movetype = A
trigger1 = enemynear(var(31)),hitdefattr = SC,AA,AP
trigger1 = p2bodydist x <= 30
trigger1 = enemynear(var(31)),stateno < 1000
trigger1 = enemynear(var(31)),animtime < -8
trigger1 = enemynear(var(31)),stateno%100 != 0
trigger2 = p2bodydist x <= 30
trigger2 = enemynear(var(31)),stateno < 1000
trigger2 = !inguarddist || enemynear(var(31)),numhelper <= var(58) || enemynear(var(31)),numproj = 0
trigger2 = random <= 55
trigger2 = var(47)
trigger2 = numhelper(40002)
trigger2 = (helper(40002),var(10))%3 != 1 

;乙女富嶽
[State -1,17]
type = ChangeState
value = 1000
triggerall = enemynear(var(31)),movetype!=H
triggerall = enemynear(var(31)),statetype != L
triggerall = P2bodyDist X <= 20
triggerall = p2dist x>0
triggerall = enemynear(var(31)),statetype != A
triggerall = var(59) = [1,10]
triggerall = statetype != A
triggerall = !var(30)
triggerall = ctrl || stateno = 52|| (stateno = 120 && prevstateno = [160,162])
triggerall = enemynear(var(31)),prevstateno != 5120 || enemynear(var(31)),time>7
triggerall = p2stateno != [5000,5900]
triggerall = enemynear(var(31)),time >= 60*fvar(32) || fvar(32) < 0.01 || random <= 15
trigger1 = enemynear(var(31)),movetype = A
trigger1 = enemynear(var(31)),animtime = [-7,-5]
trigger1 = random <= 150*var(59)
;-----------------------------------
;対空
;-----------------------------------

;立ち弱
[state -3]
type = changestate
value = 200
triggerall = var(59) && roundstate = 2
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = statetype !=A
triggerall = p2stateno != [5200,5220]
triggerall = var(59)>=4
triggerall = var(30) = 0
triggerall = enemynear(var(31)),statetype = A && enemynear(var(31)),movetype!=H
triggerall = fvar(11) != 0 || !fvar(11) && !fvar(10)
triggerall = p2dist x > 0
triggerall = enemynear(var(31)),movetype != A && !inguarddist || enemynear(var(31)),time <= 2 || !(enemynear(var(31)),hitdefattr = SCA,AA) && random < 100 || time <= 5 && stateno = 120 && prevstateno = [160,162]
triggerall = enemynear(var(31)),time >= 60*fvar(31) || fvar(31) < 0.01 || random <= 15 || fvar(11) > enemynear(var(31)),const(velocity.jump.y) + 60*fvar(31)*fvar(38)
trigger1 = p2bodydist x + 4*facing*enemynear(var(31)),facing*enemynear(var(31)),vel x<=25
trigger1 = enemynear(var(31)),pos y + 4*fvar(11) + 0.5*16*fvar(38) = [-10 - 15*(enemynear(var(31)),vel x = 0),-1]

;ダッシュしゃがみ強攻撃
[State -1]
type = ChangeState
value = 470
triggerall = var(59) && roundstate = 2
triggerall = stateno = [100,102]
triggerall = statetype != A
triggerall = var(59) >= 4
triggerall = var(30) = 0
triggerall = enemynear(var(31)),statetype = A && enemynear(var(31)),movetype != H
triggerall = p2dist x> 0
trigger1 = p2bodydist x + 9*facing*enemynear(var(31)),facing*enemynear(var(31)),vel x = [20,80]
trigger1 = enemynear(var(31)),pos y + 8*fvar(11) + 0.5*64*fvar(38) = [-20 - 10*(enemynear(var(31)),vel x = 0),-5]
;------------------------------------------------------------------------------
;後刺し
;------------------------------------------------------------------------------
;弱攻撃
[State -1]
type = ChangeState
value = 200
triggerall = RoundState = 2 && var(59)
triggerall = var(30) = 0
triggerall = stateno != 101
triggerall = statetype != A
triggerall = p2dist x > 0 
triggerall = ctrl || stateno = 52 || (stateno = 120 && prevstateno = [160,162])
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),movetype != H
trigger1 = enemynear(var(31)),movetype = A
trigger1 = enemynear(var(31)),animtime = [-8,-5]
trigger1 = enemynear(var(31)),time >= 10
trigger1 = enemynear(var(31)),statetype != A
trigger1 = p2bodydist x < 25
trigger1 = random <= 200
;_________________________________________________________
;
;ぶっぱ,暴れ
;_________________________________________________________
;弱紅蓮竹刀
[State -1]
type = ChangeState
value = 1200
triggerall = RoundState = 2 && var(59)
triggerall = var(30) = 1
triggerall = statetype != A 
triggerall = ctrl || stateno = 52|| (stateno = 120 && prevstateno = [160,162])
trigger1 = var(43)

;中紅蓮竹刀
[State -3,切り返し中紅蓮]
type = ChangeState
value = 1203
triggerall = (var(59)=[1,10])&&roundstate=2
triggerall = statetype !=A
triggerall = p2dist x > -5
triggerall = random%16<var(59)*var(59)
triggerall = var(8) || var(7) >= 200
triggerall = var(47)
triggerall = p2bodydist x <= 50
triggerall = p2bodydist y > -50
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),movetype != H
trigger1 = ctrl|| (stateno = 120 && prevstateno = [160,162])
trigger1 = prevstateno = [140,155]
trigger1 = random <= 80 && time <= 1
trigger1 = backedgebodydist <= 20 || enemynear(var(31)),prevstateno = [200,799]
trigger2 = ctrl || (stateno = 120 && prevstateno = [160,162])||stateno = [100,101]
trigger2 = enemynear(var(31)),vel x >= -0.5
trigger2 = random <= 35 + 90*(prevstateno = 5120)

;強攻撃
[State -1]
type = ChangeState
value = 320
triggerall = RoundState = 2 && var(59)
triggerall = var(30) = 1
triggerall = stateno != 101
triggerall = statetype != A 
triggerall = ctrl || stateno = 52 || (stateno = 120 && prevstateno = [160,162])
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),movetype != H
trigger1 = enemynear(var(31)),statetype != A || enemynear(var(31)),pos y >= -50 && fvar(11) > 0
trigger1 = p2bodydist x =[70,130]
trigger1 = enemynear(var(31)),ctrl = 0 && enemynear(var(31)),stateno >= 200
trigger1 = (enemynear(var(31)),stateno)%100 >= 10 && enemynear(var(31)),animtime <= -27 && enemynear(var(31)),time >= 3
trigger1 = enemynear(var(31)),time - enemynear(var(31)),animtime > 40 || random <= 250
trigger1 = random <= 60


;RF爆砕鉄拳
[State -1]
type = ChangeState
value = 1402
triggerall = RoundState = 2 && var(59)
triggerall = var(8) = 1 || var(7) >= 200
triggerall = var(7) > 0
triggerall = var(30) = 1
triggerall = statetype != A 
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall= p2movetype != H || p2statetype != A
trigger1 = p2dist x > 160
trigger1 = random <= 5 + 20*(numenemy = 2)
trigger1 = numhelper(40001)
trigger1 = helper(40001),inguarddist = 0
trigger1 = !inguarddist || random <= 100

;立ち弱
[state -3]
type = changestate
value = 300
triggerall = var(59) > 0 && roundstate = 2
triggerall = statetype!= A 
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = var(30)
triggerall = enemynear(var(31)),stateno != [120,155]
trigger1 = inguarddist
trigger1 = numhelper(40001)
trigger1 = helper(40001),inguarddist = 0
trigger1 = enemynear(var(31)),ctrl || enemynear(var(31)),stateno = [20,119]
trigger1 = p2bodydist x + 5*facing*enemynear(var(31)),facing < 80 && p2dist x > 0
trigger1 = p2bodydist y > -40
trigger1 = random <= 120
trigger2 = var(47)
trigger2 = prevstateno = [140,155]
trigger2 = random <= 250
trigger2 = time <= 1
trigger2 = numhelper(40002)
trigger2 = helper(40002),var(10) <= 5
trigger2 = p2bodydist x <= 80 && p2dist x > 0
trigger3 = var(47)
trigger3 = numhelper(40002)
trigger3 = helper(40002),var(10) <= 5
trigger3 = stateno = 120 && prevstateno = [160,162]
trigger3 = time = 1 
trigger3 = random <= 200
trigger3 = p2bodydist x <= 80 && p2dist x > 0

;屈弱
[state -3]
type = changestate
value = 500
triggerall = var(59) > 0 && roundstate = 2
triggerall = statetype!= A 
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = var(30)
triggerall = enemynear(var(31)),stateno != [120,155]
trigger1 = var(47)
trigger1 = prevstateno = [140,155]
trigger1 = random <= 250
trigger1 = time <= 1
trigger1 = numhelper(40002)
trigger1 = helper(40002),var(10) <= 5
trigger1 = p2bodydist x = [50,90]
trigger2 = var(47)
trigger2 = numhelper(40002)
trigger2 = helper(40002),var(10) <= 5
trigger2 = stateno = 120 && prevstateno = [160,162]
trigger2 = time = 1
trigger2 = random <= 200
trigger2 = p2bodydist x = [50,90]

;-----------------
;タッグ用
;-----------------
;遠距離
;Lv1 ちょこまかすんなぁ
[State -1]
type = ChangeState
value = 3200
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = stateno != 101
triggerall = var(30) = 1
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype!=A && enemynear(var(31)),movetype != H && enemynear(var(31)),stateno != [120,155]
triggerall = power >= 1000
triggerall = enemynear(var(31)),time > 2
triggerall = numenemy = 2
trigger1 = p2bodydist x >= 140
trigger1 = enemynear(var(31)),movetype = A || stateno = [1000,2000]
trigger1 = enemynear(var(31)),ctrl = 0
trigger1 = enemynear(var(31)),animtime < -22
trigger2 = numpartner
trigger2 = enemynear(0),statetype != A && enemynear(1),statetype != A
trigger2 = enemynear(0),statetype != L && enemynear(1),statetype != L
trigger2 = random <= 50 || partner,movetype = H && partner,alive && random <= 250
;--------------------------------------------------------------------------------------
;弱乙女富嶽
[State -1,17]
type = ChangeState
value = 1100
triggerall = enemynear(var(31)),movetype!=H
triggerall = enemynear(var(31)),statetype != L
triggerall = P2bodyDist X <= 15
triggerall = p2dist x>0
triggerall = P2Dist Y = [-40,10]
triggerall = var(25) = 0
triggerall = var(59) = [1,10]
triggerall = statetype != A
triggerall = var(30)
triggerall = ctrl || stateno = 52 || stateno = 510 && movecontact || (stateno = 120 && prevstateno = [160,162])
triggerall = enemynear(var(31)),prevstateno != 5120 || enemynear(var(31)),time>12
triggerall = p2stateno != [5000,5900]
trigger1 = ceil(enemynear(var(31)),pos y + 4*fvar(11) + 0.5*16*fvar(38))=[15 - 10*var(47),15+(fvar(11)) + 10*var(47))
trigger1 = fvar(11) >0
trigger1 = enemynear(var(31)),statetype =A
trigger1 = ceil(p2bodydist x - 4*enemynear(var(31)),vel x) =[-15,10]
trigger1 = var(59)>=2
trigger1 = random < 16*var(59)**3
trigger1 = !var(47) || random <= 200
trigger2 = p2bodydist x <= 10
trigger2 = !inguarddist || p2movetype = A || random <= 250
trigger2 = p2statetype != A
trigger2 = random <= 50 && !var(47) || random <= 15



;_________________________________________________________
;
;竹刀空コン
;_________________________________________________________

;==============================================
;自分地上
;==============================================

;----------------------------------------------
;目押し
;----------------------------------------------
;ダッシュ
[State -1]
type = ChangeState
value = 100
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A
triggerall = stateno != 101
triggerall = var(30) = 1
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype =A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno != [120,155]
triggerall = ctrl 
trigger1 = numtarget(1400)
trigger1 = p2bodydist x >= 10 && fvar(11) <= 0 
trigger2 = numtarget(3200)
trigger2 = p2bodydist x >= 100 

;ジャンプ
[State -1]
type = ChangeState
value = 41
triggerall = var(59) > 0 && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = statetype != A
triggerall = var(30)
triggerall = ctrl || stateno = 52
triggerall = p2dist x > -5
trigger1 = numtarget(710)
trigger1 = var(56) > 11
trigger1 = fvar(34) >= 90 || var(56) >= 23
trigger2 = numtarget(570)
trigger2 = fvar(1) >= 0.90
trigger2 = fvar(34) <= 170
trigger2 = p2bodydist y + var(56)*fvar(11) + 0.5*var(56)**2*fvar(38) < -95 + fvar(30)
trigger3 = numtarget(700)
trigger3 = var(56) > 12
trigger3 = fvar(1) >= 0.95
trigger3 = fvar(34) >= 90 || var(56) >= 23
trigger4 = numtarget(1170)
trigger4 = fvar(1) > 0.95
trigger4 = target(1170),vel y > 0
trigger5 = numtarget(560) || numtarget(561)
trigger5 = fvar(1) >= 0.90
trigger5 = fvar(34) <= 170
trigger5 = var(56) > 22
trigger6 = numtarget(3200)
trigger6 = target(3200),pos y + 12*fvar(11) + 0.5*144*fvar(38) < 0
trigger6 = p2bodydist x < 80 && fvar(1) > 0.90 && fvar(34) >= 120

;しゃがみ中攻撃
[State -1]
type = ChangeState
value = 510
triggerall = var(59) > 0 && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = statetype != A
triggerall = var(56) >= 13 || numenemy = 2 && enemynear(var(31)),canrecover = 0
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = statetype != A
trigger1 = fvar(34) <= 130
trigger1 = numtarget(720) || numtarget(570)
trigger1 = (var(56) <= 14 && enemynear(var(31)),pos y + 14*fvar(11) + 0.5*196*fvar(38) =[-70 + fvar(30),-23])||enemynear(var(31)),pos y + 14*fvar(11) + 0.5*196*fvar(38) =[-55 + fvar(30),-23]
trigger1 = fvar(1) >= 0.95
trigger2 = fvar(34) <= 130
trigger2 = numtarget(320) || numtarget(315) || numtarget(3200)
trigger2 = fvar(1) >= 0.95
trigger2 = enemynear(var(31)),pos y + 14*fvar(11) + 0.5*196*fvar(38) =[-70 + fvar(30),-35]

;近中攻撃
[State -1]
type = ChangeState
value = 310
triggerall = var(59) > 0 && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = ctrl || stateno = 52 || (stateno = 120 && prevstateno = [160,162])
triggerall = statetype != A
triggerall = var(56) >= 8 || numenemy = 2 && enemynear(var(31)),canrecover = 0 || numtarget(1170)
triggerall = var(30) = 1
triggerall = prevstateno != 300 || time >= 2
trigger1 = fvar(34) < 90
trigger1 = p2bodydist x < 37
trigger1 = enemynear(var(31)),pos y + 8*fvar(11) + 0.5*64*fvar(38) =[-30 + fvar(30),13 - 5*var(42)]
trigger1 = fvar(1) >= 0.60
trigger1 = var(8) && var(7) >= 150 || power >= 1950
trigger2 = fvar(34) < 90
trigger2 = p2bodydist x < 37
trigger2 = enemynear(var(31)),pos y + 8*fvar(11) + 0.5*64*fvar(38) =[-22-5*(fvar(1)>0.96) + fvar(30),-5]
trigger2 = fvar(1) >= 0.60

;立ち弱
[state -3]
type = changestate
value = 300
triggerall = var(59) > 0 && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = statetype != A
triggerall = var(56) >= 4 || numenemy = 2 && enemynear(var(31)),canrecover = 0 || numtarget(1204) || numtarget(1165) || numtarget(1170) && fvar(11) > 0
triggerall = var(30) = 1
triggerall = prevstateno != 300 || time >= 2
triggerall = random <= 300*var(59)
trigger1 = fvar(34) >= 80
trigger1 = p2bodydist x < 50
trigger1 = enemynear(var(31)),pos y + 4*fvar(11) + 0.5*16*fvar(38) > -22 + fvar(30) || var(56) <= 4 && numtarget(1204)+numtarget(1170) = 0
trigger2 = fvar(34) < 80
trigger2 = p2bodydist x < 50
trigger2 = enemynear(var(31)),pos y + 4*fvar(11) + 0.5*16*fvar(38) > -7-20*(fvar(1)>0.96) + fvar(30) || var(56) <= 4 && numtarget(1204)+numtarget(1170) = 0

;D屈強
[state -3]
type = changestate
value = 570
triggerall = var(59) > 0 && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = stateno = [100,101]
triggerall = statetype != A
triggerall = var(30) = 1
trigger1 = numtarget(3200)
trigger1 = enemynear(var(31)),pos y + 10*fvar(11) + 0.5*100*fvar(38) = [-70,-20]
trigger1 = fvar(34) <= 130 && fvar(1) > 1.10 || enemynear(var(31)),life*enemynear(var(31)),const(data.defence)/(fvar(0) + 0.00001) < 100*100



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

;強攻撃
[State -1]
type = ChangeState
value = 320
triggerall = var(59) > 0 && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && p2statetype != L
triggerall = var(30) = 1
triggerall = stateno != 101
triggerall = statetype != A 
triggerall = ctrl || stateno = 52 || (stateno = 120 && prevstateno = [160,162])
triggerall = numpartner
triggerall = p2bodydist x <= 160
triggerall = p2bodydist y >= -90
trigger1 = numenemy = 2
trigger1 = enemynear(var(31)),facing = facing
trigger1 = enemynear(0),numtarget && enemynear(1),numtarget || enemynear(0),numtarget && enemynear(1),alive = 0 ||enemynear(1),numtarget && enemynear(0),alive = 0
trigger2 = partner,numtarget
trigger2 = random <= 50



;----------------------------------------------
;キャンセルコンボ
;----------------------------------------------
;インスタントチャージ
[State -1]
type = ChangeState
value = 900
triggerall = var(8) = 1 || var(7) >= 200
triggerall = var(7) >= 0
triggerall = var(30) = 1
triggerall = var(59)>0 && roundstate = 2
triggerall = var(43) = 0
trigger1 = stateno = 1400
trigger1 = movehit = 1
trigger2 = stateno = 570 || stateno = 560
trigger2 = movehit = 1
trigger2 = fvar(34) <= 170
trigger3 = fvar(34) <= 80
trigger3 = stateno = 320 || stateno = 315 && fvar(1) > 0.55 && var(8)
trigger3 = movehit
trigger3 = p2movetype = H && p2statetype = A
trigger4 = stateno = 1180
trigger4 = numtarget(1170)
trigger4 = p2movetype = H && p2statetype = A
trigger5 = stateno = 3200 && movehit
trigger5 = fvar(34) <= 130 || enemynear(var(31)),life*enemynear(var(31)),const(data.defence)/(fvar(0) + 0.00001) < 100*100*(1 + var(8)*var(7)/400) && p2bodydist x <= 150
trigger5 = p2movetype = H && p2statetype = A

;Lv3 乙女桜
[State -1]
type = ChangeState
value = 3104
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A
triggerall = stateno != 101
triggerall = var(30) = 1
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype =A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno != [120,155]
triggerall = power >= 3000
trigger1 = stateno = 520 
trigger1 = movehit
trigger1 = fvar(34) <= 90
trigger2 = stateno = 315 && fvar(1) > 0.50 
trigger2 = movehit
trigger2 = var(56) <= 15 || enemynear(var(31)),pos y + 14*fvar(11) + 0.5*196*fvar(38) > 15 - 7*var(42) || animtime = 0
trigger2 = fvar(34) <= 90


;耐える乙女の美学
[State -1]
type = ChangeState
value = 4000
triggerall = var(59) && roundstate = 2
triggerall = power >= 3000
triggerall = life <= 0.333*const(data.life)
triggerall = var(30) = 1
triggerall = var(25) < 20
triggerall = statetype != A
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
trigger1 = life > 0.2*lifemax
trigger1 = enemynear(var(31)),life*enemynear(var(31)),const(data.defence) > 300*100
trigger1 = stateno = 310 && movehit
trigger1 = fvar(34) <= 85
trigger1 = fvar(1) < 0.38

;しゃがみ強攻撃
[State -1]
type = ChangeState
value = 520
triggerall = var(59) > 0 && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = statetype != A
triggerall = var(56) >= 13
trigger1 = stateno = 310 && movehit
trigger1 = fvar(34) <= 90
trigger1 = fvar(1) = [0.64,0.94]
trigger1 = power >= 2960
trigger1 = var(8) = 0
trigger1 = enemynear(var(31)),pos y + 19*fvar(11) + 0.5*361*fvar(38) = [15 - (fvar(11) + 19*fvar(38)) - 10*var(42),25 - 12*var(42)]
trigger1 = var(42) < 2
trigger1 = fvar(30) <= 5
trigger1 = enemynear(var(31)),life * enemynear(var(31)),const(data.defence) >= 150*100*fvar(0)

;しゃがみ中攻撃
[State -1]
type = ChangeState
value = 510
triggerall = var(59) > 0 && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = statetype != A
triggerall = var(56) >= 13
trigger1 = stateno = 310 || stateno = 300 && p2bodydist y < -15
trigger1 = movehit
trigger1 = fvar(34) <= 90
trigger1 = fvar(1) > 0.94

;遠中攻撃
[State -1]
type = ChangeState
value = 315
triggerall = var(59) > 0 && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = statetype != A
triggerall = var(56) >= 13
triggerall = var(30)
trigger1 = stateno = 310 && movehit
trigger1 = fvar(34) <= 90
trigger1 = fvar(1) < 0.38 + 0.04*(4-var(59))

trigger2 = fvar(34) > 90
trigger2 = stateno = 310 
trigger2 = movehit
trigger2 = fvar(1) < 0.90
trigger2 = var(56) <= 26 || enemynear(var(31)),pos y - 23*3 + 0.5*22*23*fvar(38) >= 20 - 10*var(42)|| fvar(1) >= 0.65
trigger2 = p2bodydist x <= 45
trigger2 = enemynear(var(31)),pos y + 13*fvar(11) + 0.5*169*fvar(38) > -30 + 1.5*fvar(30)
trigger2 = var(59) = 4 || var(42) >= 2

trigger3 = fvar(34) > 90
trigger3 = stateno = 300 
trigger3 = movehit
trigger3 = fvar(1) > 0.60
trigger3 = p2bodydist x > 40

trigger4 = stateno = 310 && movehit
trigger4 = fvar(34) <= 90
trigger4 = var(42) || fvar(1) < 0.64
trigger4 = fvar(1) = [0.57,0.94]
trigger4 = power >= 2960
trigger4 = var(8) = 0
trigger4 = enemynear(var(31)),pos y + 13*fvar(11) + 0.5*169*fvar(38) = [12 - (fvar(11) + 13*fvar(38)) - 10*var(42),25 - 10*var(42)]
trigger4 = !(teammode = turns) && roundno = 3 || teammode = turns && roundno = 7 || enemynear(var(31)),life*enemynear(var(31)),const(data.defence) >= 90*100

trigger5 = fvar(34) <= 90
trigger5 = stateno = 310 && movehit
trigger5 = var(8) = 1 && var(7) >= 100
trigger5 = fvar(1) >= 0.60
trigger5 = var(42)
trigger5 = enemynear(var(31)),pos y + 26*fvar(11) + 0.5*661*fvar(38) >= 20 - 10*var(42)
trigger5 = enemynear(var(31)),pos y + 13*fvar(11) + 0.5*169*fvar(38) > -15

;強攻撃
[State -1]
type = ChangeState
value = 320
triggerall = var(59) > 0 && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = statetype != A
triggerall = var(56) >= 25
triggerall = var(30)
trigger1 = fvar(34) > 90
trigger1 = stateno = 310 || stateno = 315 
trigger1 = movehit
trigger1 = fvar(1) < 0.90

trigger2 = fvar(34) <= 90
trigger2 = stateno = 310 && movehit
trigger2 = (var(8) = 1 && var(7) >= 100) || (var(7) >= 200 && enemynear(var(31)),life*enemynear(var(31)),const(data.defence) < 200*100)
trigger2 = fvar(1) >= 0.60
trigger2 = !var(42) || enemynear(var(31)),pos y + 26*fvar(11) + 0.5*661*fvar(38) < 20 - 10*var(42)

trigger3 = fvar(38) <= 90
trigger3 = var(8) && var(7) >= 150
trigger3 = stateno = 300 && movehit
trigger3 = var(42) < 2


;近中攻撃
[State -1]
type = ChangeState
value = 310
triggerall = var(59) > 0 && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = statetype != A
triggerall = var(56) >= 8
triggerall = p2bodydist x <= 40
triggerall = stateno = 300 && movehit
triggerall = var(30)
trigger1 = fvar(34) > 80
trigger1 = p2bodydist y >= -36
trigger2 = fvar(34) <= 80
trigger2 = fvar(1) > 0.5
trigger2 = enemynear(var(31)),pos y + 8*fvar(11) + 0.5*64*fvar(38) > -18 - 10*(fvar(1) > 0.90) - 7*var(8)*(var(7)>100) - 6*var(42) + fvar(30)
trigger3 = fvar(34) <= 80
trigger3 = fvar(1) < 0.38 + 0.04*(4-var(59))

;ジャンプ
[State -1]
type = ChangeState
value = 41
triggerall = var(59) > 0 && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = statetype != A
triggerall = var(30)
trigger1 = stateno = 510 && movehit
trigger2 = stateno = 100
trigger2 = numtarget(1400)
trigger2 = fvar(1) > 0.95
trigger2 = time > 3
trigger3 = stateno = 315 && movehit
trigger3 = fvar(1) < 0.45 + 0.04*(4-var(59))
trigger3 = fvar(34) <= 90
trigger4 = stateno = 300 && movehit
trigger4 = fvar(1) > 0.9
trigger4 = fvar(34) >= 100
trigger4 = p2bodydist y < -40






;==============================================
;自分空中
;==============================================
;----------------------------------------------
;目押し
;----------------------------------------------

;空中ジャンプ
[State -1]
type = ChangeState
value = 46
triggerall = statetype = A && ctrl
triggerall = var(59)>0 && roundstate = 2
triggerall = var(30) = 1
triggerall = var(1) = 0
triggerall = var(2) = 0
triggerall = Var(10) = 0
triggerall = pos y < -20
trigger1 = numtarget(570)
;trigger1 = facing = 1 && var(51) = 1 || facing = -1 && var(51) = 2 || var(51) = 3
trigger1 = fvar(34) <= 170
trigger1 = var(56) >= 20
trigger1 = vel y >= -3.2

;空中強攻撃
[State -1]
type = ChangeState
value = 720
triggerall = var(59)>0 && roundstate = 2
triggerall = var(30) = 1
triggerall = statetype = A 
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = enemynear(var(31)),statetype = A && enemynear(var(31)),movetype = H && enemynear(var(31)),hitfall = 1
triggerall = pos y+18*vel y+0.5*324*fvar(39) < 20
trigger1 = numtarget(1204)
trigger1 = var(10)
trigger1 = p2bodydist y+18*fvar(11)+162*fvar(38)-18*vel y-162*fvar(39)>-25 + fvar(30)||enemynear(var(31)),pos y+18*fvar(11)+0.5*324*fvar(38)>-1||pos y+18*vel y+0.5*324*fvar(39)>10
trigger1 = fvar(34) <= 140
trigger1 = var(42) <= 1

trigger2 = numtarget(1204)
trigger2 = !var(10)
trigger2 = fvar(1) >= 1.09
trigger2 = (p2bodydist y+18*fvar(11)+162*fvar(38)-18*vel y-162*fvar(39) != [-40,70])||enemynear(var(31)),pos y+18*fvar(11)+0.5*324*fvar(38)>5||pos y+18*vel y+0.5*324*fvar(39)>10 || fvar(11) + 18*fvar(38) > 4
trigger2 = fvar(34) <= 160

trigger3 = var(56) >= 17
trigger3 = numtarget(510) || numtarget(511) || numtarget(560) || numtarget(561)
trigger3 = fvar(34) <= 190
trigger3 = var(56) <= 18 || p2bodydist y+18*fvar(11)+162*fvar(38)-18*vel y-162*fvar(39) > 45

trigger4 = var(56) >= 18
trigger4 = numtarget(570)
trigger4 = var(1) || var(2)
trigger4 = fvar(34) <= 140
trigger4 = var(56) = 18 || p2bodydist y+18*fvar(11)+162*fvar(38)-18*vel y-162*fvar(39) > 55

trigger5 = var(56) >= 17
trigger5 = !numtarget(1204) && !numtarget(510) && !numtarget(511) && !numtarget(570) && !numtarget(310)
trigger5 = !numtarget(720) || var(10) != 0
trigger5 = !numtarget(700) || var(1) || var(2)
trigger5 = fvar(34) <= 190
trigger5 = var(56) <= 18||enemynear(var(31)),pos y+18*fvar(11)+0.5*324*fvar(38)>-10||fvar(1)>0.95&&p2bodydist y+18*(fvar(11)- vel y)+0.5*324*(fvar(38)-fvar(39)) = [-10 + fvar(30),50]

trigger6 = var(56) >= 17
trigger6 = numtarget(720) && var(10) != 0
trigger6 = fvar(34) <= 190
trigger6 = pos y + 18*vel y + 0.5*324*fvar(39) > 0

;空中中攻撃
[State -1]
type = ChangeState
value = 710
triggerall = var(59)>0 && roundstate = 2
triggerall = var(30) = 1
triggerall = statetype = A 
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = enemynear(var(31)),statetype = A && enemynear(var(31)),movetype = H && enemynear(var(31)),hitfall = 1
triggerall = pos y+10*vel y+0.5*100*fvar(39) < 15
trigger1 = numtarget(510) || numtarget(511) || numtarget(710) && (var(1) || var(2)) || numtarget(1170) || numtarget(1400)
trigger1 = fvar(34) > 140
trigger1 = var(56)<=11||p2bodydist y+10*fvar(11)+0.5*100*fvar(38)-10*vel y-0.5*100*fvar(39) = [40 - 100*var(1),80]
trigger1 = p2bodydist x + 10*facing*enemynear(var(31)),facing*enemynear(var(31)),vel x - 10*vel x = [-80 + fvar(30),90]
trigger1 = var(10) = 0
trigger2 = numtarget(315) || numtarget(316)
trigger2 = p2bodydist y > 0
trigger2 = fvar(1) < 0.50
trigger3 = numtarget(700)|| numtarget(3200)
trigger3 = fvar(1) > 0.84
trigger3 = fvar(34)<=200 || p2bodydist y+8*(fvar(11)-vel y)+32*(fvar(38)-fvar(39)) >=10
trigger3 = !var(10)
trigger4 = numtarget(1204) || numtarget(1400) || numtarget(1170) || numtarget(3200)
trigger4 = fvar(34) <= 200
trigger4 = fvar(1) > 0.95 + 0.06*(numtarget(1204))
trigger4 = enemynear(var(31)),pos y+10*fvar(11)+50*fvar(38)>= 0 || var(56) <= 10 && !numtarget(1204)

;空中弱攻撃
[State -1]
type = ChangeState
value = 700
triggerall = var(59)>0 && roundstate = 2
triggerall = var(30) = 1
triggerall = statetype = A 
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = enemynear(var(31)),statetype = A && enemynear(var(31)),movetype = H && enemynear(var(31)),hitfall = 1
trigger1 = numtarget(1204)
trigger1 = enemynear(var(31)),pos y - pos y + 8*fvar(11) + 0.5*64*fvar(38) > 45 ||enemynear(var(31)),pos y + 8*fvar(11) + 0.5*64*fvar(38) > -5 || pos y + 8*vel y + 0.5*64*fvar(39) > 5
trigger1 = p2bodydist x - 8*vel x + 8*facing*enemynear(var(31)),facing*enemynear(var(31)),vel x < 65
trigger1 = var(10)

trigger2 = numtarget(710) || numtarget(300)
trigger2 = var(56) >= 8
trigger2 = p2bodydist y + 8*fvar(11) + 0.5*64*fvar(38) > 45 ||enemynear(var(31)),pos y + 8*fvar(11) + 0.5*64*fvar(38) > 0 || var(56) <= 9
trigger2 = p2bodydist x - 8*vel x + 8*facing*enemynear(var(31)),facing*enemynear(var(31)),vel x < 65

trigger3 = numtarget(700)
trigger3 = enemynear(var(31)),pos y - pos y + 8*fvar(11) + 0.5*64*fvar(38) > 45 ||enemynear(var(31)),pos y + 8*fvar(11) + 0.5*64*fvar(38) > 0 || pos y + 8*vel y + 0.5*64*fvar(39) > 10
trigger3 = p2bodydist x - 8*vel x + 8*facing*enemynear(var(31)),facing*enemynear(var(31)),vel x < 65
trigger3 = var(10)
trigger3 = fvar(1) <= 0.96

trigger4 = numtarget(310) || numtarget(720)
trigger4 = p2bodydist y = [-30,100]
trigger4 = !var(10)
trigger4 = fvar(1) > 0.60
trigger4 = var(56) <= 10 || pos y + 26*vel y + 0.5*26*26*fvar(39) > -28 || p2bodydist y + 8*(fvar(11) - vel y) + 32*(fvar(38) -fvar(39)) > 50

;空中バックダッシュ
[State -1]
type = ChangeState
value = 115
triggerall = Var(10) = 0
triggerall = var(59)>0 && roundstate = 2
triggerall = var(30) = 1
triggerall = statetype = A && ctrl
triggerall = Pos Y < -22
triggerall = p2dist x < 0
triggerall = enemynear(var(31)),statetype = A && enemynear(var(31)),movetype = H && enemynear(var(31)),hitfall = 1
trigger1 = numtarget(1204)
trigger1 = fvar(33) > 200
trigger1 = pos y < -32 + 10*(fvar(34) <= 60) - 10*(enemynear(var(31)),pos y <= -70)*(fvar(34)>60)&& fvar(1) <= 0.90 || pos y < -65

trigger2 = numtarget(1204)
trigger2 = fvar(33) <= 200 || backedgebodydist < 80
trigger2 = p2bodydist y > -55 - 7*var(42) && fvar(11) > -4 
trigger2 = fvar(1) <= 1.15 || fvar(33) >= 120 || fvar(30) >= 12 || p2dist x < 0

;空中ダッシュ
[State -1]
type = ChangeState
value = 110
triggerall = Var(10) = 0
triggerall = var(59)>0 && roundstate = 2
triggerall = var(30) = 1
triggerall = statetype = A && ctrl
triggerall = Pos Y < -22
triggerall = enemynear(var(31)),statetype = A && enemynear(var(31)),movetype = H && enemynear(var(31)),hitfall = 1
trigger1 = numtarget(1204)
trigger1 = fvar(34) > 200
trigger1 = pos y < -32 + 10*(fvar(33) <= 60) - 10*(enemynear(var(31)),pos y <= -70)*(fvar(33)>60)&& fvar(1) <= 0.90 || pos y < -65

trigger2 = numtarget(1204)
trigger2 = fvar(34) <= 200 
trigger2 = p2bodydist y > -55 - 7*var(42) && fvar(11) > -4 
trigger2 = fvar(1) <= 1.15 || fvar(34) >= 120 || fvar(30) >= 12
trigger3 = numtarget(1204)
trigger3 = frontedgebodydist <= 80
trigger3 = p2bodydist y > -55 && fvar(11) > -4 
trigger3 = fvar(1) <= 1.15 || fvar(34) >= 120

;----------------------------------------------
;キャンセルコンボ
;----------------------------------------------
;インスタントチャージ
[State -1]
type = ChangeState
value = 900
triggerall = var(8) = 1 || var(7) >= 200
triggerall = var(7) >= 0
triggerall = var(30) = 1
triggerall = var(59)>0 && roundstate = 2
trigger1 = stateno = 1201 && !var(43) || stateno = 1204 || stateno = 1207
trigger1 = movehit || var(28) && movereversed > 1 || moveguarded

;空中強攻撃
[State -1]
type = ChangeState
value = 720
triggerall = var(59)>0 && roundstate = 2
triggerall = var(30) = 1
triggerall = statetype = A
triggerall = enemynear(var(31)),statetype = A && enemynear(var(31)),movetype = H && enemynear(var(31)),hitfall = 1
triggerall = pos y+18*vel y+0.5*324*fvar(39) < 15
trigger1 = stateno = 710 && movehit
trigger1 = var(1) || var(2)
trigger2 = stateno = 700 || stateno = 710
trigger2 = movehit
trigger2 = fvar(34) <= 165
trigger2 = fvar(1) >= 0.854
trigger3 = stateno = 700 && movehit
trigger3 = var(56) <= 19 || pos y + 18*vel y + 0.5*324*fvar(39) > -22 + fvar(30)
trigger3 = fvar(34) <= 80
trigger3 = var(56) >= 18

;空中ダッシュ
[State -1]
type = ChangeState
value = 110
triggerall = Var(10) = 0
triggerall = var(59)>0 && roundstate = 2
triggerall = var(30) = 1
triggerall = statetype = A
triggerall = Pos Y < -22
triggerall = enemynear(var(31)),statetype = A && enemynear(var(31)),movetype = H && enemynear(var(31)),hitfall = 1
triggerall = p2dist x > 0
trigger1 = fvar(34) <= 220
trigger1 = stateno = 720 && movehit
trigger1 = var(56) >= 33
trigger1 = fvar(1) <= 0.99 || fvar(34) >= 170 || var(1) || var(2)

trigger2 = stateno = 700 && movehit
trigger2 = var(56) >= 23
trigger2 = fvar(34) >= 90

trigger3 = stateno = 710 && movehit = 1
trigger3 = var(56) >= 28
trigger3 = p2bodydist y > 10


;空中バックダッシュ
[State -1]
type = ChangeState
value = 115
triggerall = Var(10) = 0
triggerall = var(59)>0 && roundstate = 2
triggerall = var(30) = 1
triggerall = statetype = A
triggerall = Pos Y < -22
triggerall = enemynear(var(31)),statetype = A && enemynear(var(31)),movetype = H && enemynear(var(31)),hitfall = 1
triggerall = p2dist x < 0
trigger1 = fvar(33) <= 220
trigger1 = stateno = 720 && movehit
trigger1 = var(56) >= 33
trigger1 = fvar(1) <= 0.99 || fvar(33) >= 170 || var(1) || var(2)

trigger2 = stateno = 700 && movehit
trigger2 = var(56) >= 23

trigger3 = stateno = 710 && movehit = 1
trigger3 = var(56) >= 28
trigger3 = p2bodydist y > 10


;空中ジャンプ
[State -1]
type = ChangeState
value = 47
triggerall = statetype = A
triggerall = var(59)>0 && roundstate = 2
triggerall = var(30) = 1
triggerall = var(1) = 0
triggerall = var(2) = 0
triggerall = Var(10) = 0
triggerall = pos y < -20
triggerall = enemynear(var(31)),statetype = A && enemynear(var(31)),movetype = H && enemynear(var(31)),hitfall = 1
trigger1 = stateno = 710
trigger1 = movehit
trigger1 = fvar(34) <= 90
trigger1 = fvar(1) <=0.33
trigger1 = p2bodydist x <= 30

;空中ジャンプ
[State -1]
type = ChangeState
value = 46
triggerall = statetype = A
triggerall = var(59)>0 && roundstate = 2
triggerall = var(30) = 1
triggerall = var(1) = 0
triggerall = var(2) = 0
triggerall = Var(10) = 0
triggerall = pos y < -20
triggerall = enemynear(var(31)),statetype = A && enemynear(var(31)),movetype = H && enemynear(var(31)),hitfall = 1
trigger1 = stateno = 710
trigger1 = movehit
trigger2 = stateno = 720
trigger2 = movehit
trigger2 = pos y > -60
trigger2 = fvar(34) <= 80
trigger2 = pos y >= -30 || var(56) <= 12
trigger2 = fvar(1) = [0.60 ,0.80]










;_________________________________________________________
;
;竹刀地コン
;_________________________________________________________

;==============================================
;自分地上
;==============================================

;----------------------------------------------
;目押し
;----------------------------------------------

;Lv1 ちょこまかすんなぁ
[State -1]
type = ChangeState
value = 3200
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A
triggerall = stateno != 101
triggerall = var(30) = 1
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype!=A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno != [120,155]
triggerall = power >= 1000
trigger1 = ctrl 
trigger1 = numtarget(320)
trigger1 = p2bodydist x > 100

;ダッシュ
[State -1]
type = ChangeState
value = 100
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A
triggerall = stateno != 101
triggerall = var(30) = 1
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype!=A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno != [120,155]
trigger1 = ctrl 
trigger1 = numtarget(315) || numtarget(316) || numtarget(320) || numtarget(360) || numtarget(361) || (numtarget(1302)&&power<2940&&fvar(1)>=1.15&&fvar(34)<150)
trigger1 = var(8) = 0 && var(7) <= 60

;しゃがみ強攻撃（ダッシュ）
[State -1]
type = ChangeState
value = 570
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A
triggerall = stateno != 101
triggerall = var(30) = 1
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype!=A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno != [120,155]
triggerall = stateno = [100,101]
trigger1 = numtarget(320) || numtarget(360) || numtarget(361) || enemynear,gethitvar(hittime) > 10
trigger1 = fvar(34) <= 140
trigger1 = fvar(1) > 1.20
trigger2 = numtarget(1302)
trigger2 = fvar(34) <= 140


;中攻撃（ダッシュ）
[State -1]
type = ChangeState
value = 360
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A
triggerall = stateno != 101
triggerall = var(30) = 1
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype!=A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno != [120,155]
triggerall = stateno = [100,101]
trigger1 = numtarget(315) || numtarget(316) || numtarget(320) || numtarget(360) || numtarget(361)

;しゃがみ強攻撃
[State -1]
type = ChangeState
value = 520
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A 
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = stateno != 101
triggerall = var(30) = 1
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype!=A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno != [120,155]
trigger1 = numtarget(1302) || numtarget(1306)

;立ち弱
[State -1]
type = ChangeState
value = 300
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A 
triggerall = ctrl || stateno = 52 || (stateno = 120 && prevstateno = [160,162])
triggerall = var(30) = 1
triggerall = p2dist x > 0
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype!=A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno = [5000,5100]
triggerall = !numtarget(300) || time >= 2
trigger1 = p2bodydist x <= 60

;----------------------------------------------
;キャンセルコンボ
;----------------------------------------------
;インスタントチャージ
[State -1]
type = ChangeState
value = 900
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A 
triggerall = var(8) = 1 || var(7) >= 200
triggerall = var(7) >= 0
triggerall = var(30) = 1
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype!=A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno != [120,155]
trigger1 = stateno = 315 && frontedgebodydist > 80 || stateno = 320
trigger1 = movehit = 1
trigger1 = power >= 1000 || enemynear(var(31)),life*enemynear(var(31)),const(data.defence) < 100*100 && stateno = 320 && p2bodydist x <= 100
trigger2 = stateno = 1302 && movehit
trigger2 = animelemno(0) = 2 && numtarget(1302)
trigger2 = power >= 3000 && var(8) = 1 && var(7) >= 200
trigger3 = var(47)
trigger3 = stateno = 360
trigger3 = movecontact
trigger3 = power >= 950
trigger4 = stateno = 320 && movehit
trigger4 = fvar(34) <= 140
trigger4 = var(8) = 1 && var(7) >= 300
trigger5 = stateno = 1302 && movehit
trigger5 = animelemno(0) = 2 && numtarget(1302)
trigger5 = var(7) >= 200 && target(1302),life*target(1302),const(data.defence)/(fvar(0) + 0.00001) < 250*100
trigger6 = stateno = 1302 && movehit
trigger6 = animelemno(0) = 2 && numtarget(1302)
trigger6 = power < 3000 && fvar(1) + 0.5*var(8)*var(7)/400 > 1.15
trigger6 = fvar(34) <= 140
;止め用
trigger7 = stateno = 315 || stateno = 320 && p2bodydist x <= 100 || stateno = 360 && power < 1000
trigger7 = movehit = 1
trigger7 = enemynear(var(31)),life*enemynear(var(31)),const(data.defence) < 100*100

;弱乙女牙突
[State -1]
type = ChangeState
value = 1300
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A
triggerall = stateno != 101
triggerall = var(30) = 1
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype!=A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno != [120,155]
trigger1 = power >= 3000
trigger1 = stateno = 360
trigger1 = movehit = 1
trigger1 = fvar(34) <= 140 || fvar(1) > 0.90
trigger2 = stateno = 520
trigger2 = movehit

;Lv3 乙女桜
[State -1]
type = ChangeState
value = 3104
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A
triggerall = stateno != 101
triggerall = var(30) = 1
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype!=A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno != [120,155]
trigger1 = power >= 3000
trigger1 = stateno = 1302
trigger1 = movehit && animelemno(0) = 2 && numtarget(1302)
trigger1 = fvar(34) <= 140 || fvar(1) > 0.75
trigger1 = target(1302),life*target(1302),const(data.defence)/(fvar(0) + 0.00001) >= 180*100 || teammode = single && roundno = 3 || teammode = turns && roundno = 7

;Lv2 乙女桜
[State -1]
type = ChangeState
value = 3102
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A
triggerall = stateno != 101
triggerall = var(30) = 1
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype!=A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno != [120,155]
trigger1 = power >= 2000
trigger1 = stateno = 1302 && movehit
trigger1 = animelemno(0) = 2 && numtarget(1302)
trigger1 = target(1302),life*target(1302),const(data.defence)/(fvar(0) + 0.00001) < 180*100

;Lv1 乙女桜
[State -1]
type = ChangeState
value = 3100
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A
triggerall = stateno != 101
triggerall = var(30) = 1
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype!=A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno != [120,155]
trigger1 = power >= 1000
trigger1 = stateno = 1302 && movehit
trigger1 = animelemno(0) = 2 && numtarget(1302)
trigger1 = target(1302),life*target(1302),const(data.defence)/(fvar(0) + 0.00001) < 100*100

;Lv2 ちょこまかすんなぁ
[State -1]
type = ChangeState
value = 3205
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A
triggerall = stateno != 101
triggerall = var(30) = 1
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype!=A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno != [120,155]
triggerall = power >= 2000
trigger1 = stateno = 360
trigger1 = movehit = 1
trigger1 = p2bodydist x <= 20
trigger1 = !var(47) || enemynear(var(31)),gethitvar(hitcount) >= 2

;Lv1 ちょこまかすんなぁ
[State -1]
type = ChangeState
value = 3200
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A
triggerall = stateno != 101
triggerall = var(30) = 1
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype!=A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno != [120,155]
triggerall = power >= 1000
trigger1 = stateno = 360
trigger1 = movehit = 1
trigger1 = !var(47) || enemynear(var(31)),gethitvar(hitcount) >= 2

;弱爆砕鉄拳
[State -1]
type = ChangeState
value = 1400
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A
triggerall = stateno != 101
triggerall = var(30) = 1
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype!=A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno != [120,155]
trigger1 = stateno = 315 || stateno = 360 || stateno = 510
trigger1 = p2bodydist x <= 55
trigger1 = movehit

;近中攻撃
[State -1]
type = ChangeState
value = 310
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A
triggerall = stateno != 101
triggerall = p2bodydist X < 40
triggerall = var(30) = 1
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype!=A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno != [120,155]
trigger1 = stateno = 300 || stateno = 500
trigger1 = movehit

;遠中攻撃
[State -1]
type = ChangeState
value = 315
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A
triggerall = stateno != 101
triggerall = var(30) = 1
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype!=A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno != [120,155]
trigger1 = stateno = 310
trigger1 = movehit

;屈弱攻撃
[State -1]
type = ChangeState
value = 500
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A
triggerall = stateno != 101
triggerall = var(30) = 1
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype!=A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno != [120,155]
trigger1 = stateno = 500
trigger1 = movehit
trigger1 = p2bodydist x < 90

;==============================================
;自分空中
;==============================================

;----------------------------------------------
;目押し
;----------------------------------------------

;----------------------------------------------
;キャンセルコンボ
;----------------------------------------------

;空中中攻撃
[State -1]
type = ChangeState
value = 710
triggerall = var(59)>0 && roundstate = 2
triggerall = var(30) = 1
triggerall = statetype = A
triggerall = enemynear(var(31)),statetype!=A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno != [120,155]
trigger1 = stateno = 700
trigger1 = movehit






;_________________________________________________________
;
;素手空コン
;_________________________________________________________


;==============================================
;自分地上
;==============================================

;----------------------------------------------
;目押し
;----------------------------------------------
;ダッシュ
[State -1]
type = ChangeState
value = 100
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A
triggerall = stateno != 101
triggerall = var(30) = 0
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype = A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno != [120,155]
triggerall = ctrl || stateno = 52
trigger1 = numtarget(1000) || numtarget(210) && var(56) >= 10
trigger1 = p2bodydist x >= 30
trigger2 = numtarget(470)
trigger2 = fvar(1) > 0.90
trigger2 = target(470),pos y + 12*fvar(11) + 0.5*144*fvar(38) > -25 + 0.8*fvar(30)
trigger3 = numtarget(270)
trigger3 = fvar(33) <= 80
trigger3 = facing*enemynear,facing*enemynear,vel x > 0
trigger3 = target(270),stateno = 5656
trigger3 = target(270),pos y + 28*fvar(11) + 0.5*28*28*0.3 > -60 + fvar(30)
trigger3 = fvar(1) > 0.85
trigger4 = enemynear(var(31)),stateno = 5656
trigger4 = fvar(1) <= 0.80
trigger4 = var(48) <= (p2dist x + 15)/(4.8 - 2*facing*enemynear(var(31)),facing) + 2
trigger4 = p2dist x > 46 + 0.5*fvar(30)

;ジャンプ
[State -1]
type = ChangeState
value = 41
triggerall = roundstate = 2&&var(59)
triggerall = statetype != A
triggerall = var(30) = 0
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype = A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno != [120,155]
triggerall = stateno = 52 || ctrl
trigger1 = numtarget(610)
trigger1 = fvar(1) <= 0.90
trigger1 = p2bodydist x <= 55
trigger1 = p2bodydist y = [-60 + fvar(30),-10]

;近中攻撃
[State -1]
type = ChangeState
value = 210
triggerall = var(59) > 0 && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162]) 
triggerall = statetype != A
triggerall = var(56) >= 7 || numenemy = 2 && enemynear(var(31)),canrecover = 0
triggerall = var(30) = 0
triggerall = prevstateno != 210 || time >= 2
triggerall = !numtarget(260)
trigger1 = fvar(34) < 80
trigger1 = p2bodydist x < 37
trigger1 = enemynear(var(31)),pos y + 7*fvar(11) + 0.5*49*fvar(38) =[-20 + fvar(30),0 - 5*var(42)]
trigger1 = fvar(1) > 0.52
trigger1 = fvar(11) + 6*fvar(38) < 4

;屈み弱
[state -3]
type = null;changestate
value = 400
triggerall = var(59) > 0 && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = ctrl || stateno = 52 || (stateno = 120 && prevstateno = [160,162])
triggerall = statetype != A
triggerall = var(56) >= 4 || numenemy = 2 && enemynear(var(31)),canrecover = 0
triggerall = var(30) = 0
triggerall = time >= 2 || prevstateno != [200,210]
trigger1 = numtarget(620)
trigger1 = p2bodydist x < 40
trigger1 = enemynear(var(31)),pos y + 4*fvar(11) + 0.5*16*fvar(38) > -5 

;立ち弱
[state -3]
type = changestate
value = 200
triggerall = var(59) > 0 && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = ctrl || stateno = 52 || (stateno = 120 && prevstateno = [160,162])
triggerall = statetype != A
triggerall = var(56) >= 4 || numenemy = 2 && enemynear(var(31)),canrecover = 0
triggerall = var(30) = 0
triggerall = time >= 2 || prevstateno != [200,210]
trigger1 = fvar(34) < 80
trigger1 = p2bodydist x < 50
trigger1 = enemynear(var(31)),pos y + 4*fvar(11) + 0.5*16*fvar(38) > -5 - 3*(var(42)>=2) || var(56) <= 4
trigger2 = numtarget(620)||numtarget(1000) || enemynear(var(31)),stateno = 5656
trigger2 = p2bodydist x < 40
trigger2 = enemynear(var(31)),pos y + 4*fvar(11) + 0.5*16*fvar(38) > -20 + fvar(30)*(1 - 0.7*(p2stateno = 5656))

;中攻撃（ダッシュ）
[State -1]
type = ChangeState
value = 260
triggerall = var(59) > 0 && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = var(30) = 0
triggerall = stateno = [100,101]
trigger1 = numtarget(470)
trigger1 = fvar(34) >= 90
trigger2 = numtarget(210)
trigger2 = fvar(34) <= 90

;強攻撃（ダッシュ）
[State -1]
type = ChangeState
value = 270
triggerall = var(59) > 0 && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = var(30) = 0
triggerall = stateno = [100,101]
trigger1 = numtarget(470)
trigger1 = fvar(34) < 90
trigger2 = numtarget(270)
trigger2 = facing*enemynear,facing*enemynear,vel x > 0
trigger2 = target(270),stateno = 5656
trigger2 = target(270),pos y + 13*target(270),vel y + 0.5*169*0.3 > -50 + fvar(30)
trigger2 = fvar(1) >= 0.80

;ダッシュしゃがみ強攻撃
[State -1]
type = ChangeState
value = 470
triggerall = var(59) && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),stateno != [120,155]
triggerall = stateno = [100,101]
trigger1 = enemynear(var(31)),stateno = 5656
trigger1 =  var(48) <= 12
trigger1 = fvar(1) < 0.80

;----------------------------------------------
;キャンセルコンボ
;----------------------------------------------

;インスタントチャージ
[State -1]
type = ChangeState
value = 900
triggerall = var(59) && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = var(8) || var(7) >= 200
trigger1 = stateno = 3041 && movehit >= 2
trigger1 = numtarget(3041)
trigger1 = target(3041),stateno = 3042 || target(3041),stateno = 5656
trigger1 = var(8) && var(7) >= 200
trigger2 = stateno = 3001 && movehit = 2
trigger2 = fvar(34) <= 80
trigger2 = var(8) || var(7) <= 390 || enemynear(var(31)),hitshakeover
trigger3 = var(8) && var(7) >= 200
trigger3 = fvar(1) < 0.70
trigger3 = stateno = 210
trigger3 = movehit

;Lv3 真・乙女の鉄拳
[State -1]
type = ChangeState
value = 3040
triggerall = var(59) > 0 && roundstate = 2
triggerall = statetype != A
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = power >= 3000
triggerall = var(30) = 0
trigger1 = stateno = 260 && movehit
trigger1 = var(56) >= 26
trigger2 = stateno = 210 && movehit = 1
trigger2 = var(56) >= 26
trigger2 = fvar(1) < 0.85 && fvar(34) >= 90|| fvar(34) >= 130
trigger2 = enemynear,pos y < 0

;Lv2 真・乙女の鉄拳
[State -1]
type = ChangeState
value = 3020
triggerall = var(59) > 0 && roundstate = 2
triggerall = statetype != A
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = power >= 2000
triggerall = var(30) = 0
trigger1 = stateno = 260 && movehit
trigger1 = var(56) >= 26
trigger1 = fvar(34) >= 80
trigger1 = 0

;Lv1 真・乙女の鉄拳
[State -1]
type = ChangeState
value = 3000
triggerall = var(59) > 0 && roundstate = 2
triggerall = statetype != A
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = power >= 1000
triggerall = var(30) = 0
trigger1 = stateno = 260 && movehit
trigger1 = var(56) >= 26
trigger1 = fvar(34) >= 80
trigger2 = stateno = 210 && movehit = 1
trigger2 = var(56) >= 26
trigger2 = fvar(1) < 0.85 && fvar(34) >= 90|| fvar(34) >= 130 || var(8) && var(7) > 200
trigger2 = enemynear,pos y < 0

;乙女富嶽
[State -1]
type = ChangeState
value = 1000
triggerall = roundstate = 2&&var(59)
triggerall = statetype != A
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = statetype != A
triggerall = var(30) = 0
trigger1 = stateno = 470 && movehit
trigger1 = fvar(1) >= 0.90
trigger1 = power >= 2950 || fvar(34) <= 120

;立ち弱
[state -3]
type = changestate
value = 200
triggerall = var(59) > 0 && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = statetype != A
triggerall = var(56) >= 4 || numenemy = 2 && enemynear(var(31)),canrecover = 0
triggerall = var(30) = 0
triggerall = time >= 2 || prevstateno != [200,210]
trigger1 = stateno = 200 && movehit
trigger1 = fvar(34) < 80
trigger1 = p2bodydist y + 8*fvar(11) + 0.5*64*fvar(38)>= -26 + fvar(30)
trigger1 = fvar(1) <= 0.50
trigger1 = fvar(11) + 4*fvar(38) >= -1 || var(56) <= 5

;近中攻撃
[State -1]
type = ChangeState
value = 210
triggerall = var(59) > 0 && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = statetype != A
triggerall = var(56) >= 7 || numenemy = 2 && enemynear(var(31)),canrecover = 0
triggerall = var(30) = 0
triggerall = stateno = 200 || stateno = 400
triggerall = movehit
triggerall = p2bodydist x < 40
trigger1 = fvar(34) < 80
trigger1 = fvar(1) > 0.50 && (fvar(11)+7*fvar(38)>1.5||var(56)<=8||p2bodydist y > -15+ fvar(30))|| fvar(1)<0.50 &&p2bodydist y + 8*fvar(11) + 0.5*64*fvar(38) < -28 + fvar(30) && movehit = 1 || p2bodydist y < -10 + fvar(30)
trigger2 = fvar(34) >= 80

;ジャンプ
[State -1]
type = ChangeState
value = 41
triggerall = roundstate = 2&&var(59)
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = statetype != A
triggerall = var(30) = 0
trigger1 = stateno = 210 && movehit
trigger1 = var(56) >= 27
trigger1 = fvar(34) > 80
trigger2 = stateno = 210 && movehit
trigger2 = fvar(1) < 0.47
trigger2 = fvar(34) <= 80
trigger3 = stateno = 470 
trigger3 = movehit
;中攻撃
[State -1]
type = ChangeState
value = 215
triggerall = var(59) > 0 && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = statetype != A
triggerall = var(56) >= 9 || numenemy = 2 && enemynear(var(31)),canrecover = 0
triggerall = var(30) = 0
triggerall = stateno = 210 && movehit
trigger1 = fvar(1) < 0.60
trigger1 = fvar(34) >= 100
trigger2 = fvar(34) >= 100
trigger2 = power < 1000 || var(56) < 26
trigger2 = fvar(1) < 0.70
;==============================================
;自分空中
;==============================================
;----------------------------------------------
;目押し
;----------------------------------------------
;空中ダッシュ
[State -1]
type = ChangeState
value = 110
triggerall = Var(10) = 0
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype = A
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = Pos Y < -25
triggerall = ctrl
trigger1 = numtarget(210)
trigger1 = var(56) >= 21

;空中中攻撃
[State -1]
type = ChangeState
value = 610
triggerall = roundstate = 2 && var(59)
triggerall = var(30) = 0
triggerall = statetype = A 
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
trigger1 = numtarget(610)
trigger1 = p2bodydist x - 8*vel x + 8*facing*enemynear(var(31)),facing*enemynear(var(31)),vel x < 35
trigger1 = p2bodydist y = [-40,30]
trigger1 = var(1) || var(2)
trigger1 = p2bodydist y < -20 || fvar(1) < 0.80
trigger2 = numtarget(470)
trigger2 = p2bodydist x - 8*vel x + 8*facing*enemynear(var(31)),facing*enemynear(var(31)),vel x < 35
trigger2 = p2bodydist y = [-30,30]
trigger2 = fvar(1) <= 0.80 || var(56) <= 10
trigger3 = fvar(1) > 0.80
trigger3 = numtarget(470)
trigger3 = p2bodydist x - 8*vel x + 8*facing*enemynear(var(31)),facing*enemynear(var(31)),vel x < 35
trigger3 = p2bodydist y = [-5,30]

;空中弱攻撃
[State -1]
type = ChangeState
value = 600
triggerall = roundstate = 2 && var(59)
triggerall = var(30) = 0
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = statetype = A 
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = var(56) >= 5
trigger1 = numtarget(210) || numtarget(470)
trigger1 = var(10)
trigger1 = p2bodydist x - 6*vel x + 6*facing*enemynear(var(31)),facing*enemynear(var(31)),vel x < 30
trigger1 = p2bodydist y = [-15,50]
trigger2 = numtarget(610) || numtarget(210) && fvar(1) < 0.50 && fvar(34) <= 80 
trigger2 = p2bodydist x - 6*vel x + 6*facing*enemynear(var(31)),facing*enemynear(var(31)),vel x < 30
trigger2 = p2bodydist y = [-30,50]
trigger2 = !var(1) && !var(2) && !var(10)
trigger3 = numtarget(610)
trigger3 = fvar(1) >= 0.80
trigger3 = var(56) <= 7 || vel y > 2 || p2bodydist y > 55
trigger3 = var(1) || var(2) 
trigger3 = !var(10)
trigger4 = numtarget(470)
trigger4 = p2bodydist x - 6*vel x + 6*facing*enemynear(var(31)),facing*enemynear(var(31)),vel x < 30
trigger4 = p2bodydist y = [-30,50]
trigger4 = var(56) <= 8

;----------------------------------------------
;キャンセルコンボ
;----------------------------------------------

;空中強攻撃
[State -1]
type = ChangeState
value = 620
triggerall = roundstate = 2 && var(59)
triggerall = var(30) = 0
triggerall = statetype = A 
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
trigger1 = stateno = 610 
trigger1 = movehit
trigger1 = var(1) || var(2) || fvar(1) <= 0.44 && enemynear(var(31)),life*enemynear(var(31)),const(data.defence) >= 50*100
trigger2 = stateno = 600
trigger2 = movehit
trigger2 = vel y > 3.2|| p2bodydist y < -5
trigger2 = var(1) || var(2)
trigger2 = !var(10)

;空中中攻撃
[State -1]
type = ChangeState
value = 610
triggerall = roundstate = 2 && var(59)
triggerall = var(30) = 0
triggerall = statetype = A 
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
trigger1 = stateno = 600 
trigger1 = movehit
trigger1 = var(10) = 0 || fvar(34) >= 95
trigger1 = !var(1) && !var(2)
 
;空中ジャンプ
[State -1]
type = ChangeState
value = 46
triggerall = var(59) && roundstate = 2
triggerall = statetype = A
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = var(1) = 0
triggerall = var(2) = 0
triggerall = Var(10) = 0
triggerall = pos y < -20
triggerall = var(30) = 0
trigger1 = stateno = 610 && movehit
trigger1 = fvar(1) > 0.80 && movehit > 2 || fvar(1) <= 0.80

;空中ダッシュ
[State -1]
type = ChangeState
value = 110
triggerall = Var(10) = 0
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype = A
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = Pos Y < -25
triggerall = numhelper(1250)
trigger1 = stateno = 620 && movehit
trigger1 = fvar(1) <= 0.65
trigger1 = abs(helper(1250),pos x - enemynear,pos x)<= 320
trigger1 = facing*(helper(1250),pos x - pos x) > 90
trigger1 = !var(43)

;空中ダッシュ
[State -1]
type = ChangeState
value = 115
triggerall = Var(10) = 0
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype = A
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype = A && enemynear(var(31)),hitfall = 1
triggerall = Pos Y < -25
triggerall = numhelper(1250)
trigger1 = stateno = 620 && movehit
trigger1 = fvar(1) <= 0.65
trigger1 = abs(helper(1250),pos x - enemynear,pos x)<= 320
trigger1 = facing*(helper(1250),pos x - pos x) < -90
trigger1 = !var(43)
;_________________________________________________________
;
;素手地コン
;_________________________________________________________


;==============================================
;自分地上
;==============================================

;----------------------------------------------
;目押し
;----------------------------------------------

;ダッシュ
[State -1]
type = ChangeState
value = 100
triggerall = var(59) && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype != A
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),stateno != [120,155]
triggerall = ctrl || stateno = 52
triggerall = !var(30)
trigger1 = numtarget(220)

;ダッシュしゃがみ強攻撃
[State -1]
type = ChangeState
value = 470
triggerall = var(59) && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype != A
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),stateno != [120,155]
triggerall = stateno = [100,101]
triggerall = !var(30)
trigger1 = numtarget(220)
trigger1 = p2bodydist x <= 65
trigger1 = p2bodydist x <= 0 || enemynear(var(31)),gethitvar(hittime) < 15

;弱攻撃
[State -1]
type = ChangeState
value = 200
triggerall = var(59) && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype != A
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),stateno != [120,155]
triggerall = ctrl || stateno = 52 || (stateno = 120 && prevstateno = [160,162])
triggerall = !var(30)
trigger1 = p2bodydist x <= 25
trigger1 = p2dist x > 0

;----------------------------------------------
;キャンセルコンボ
;----------------------------------------------

;インスタントチャージ
[State -1]
type = ChangeState
value = 900
triggerall = var(59) && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype != A
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),stateno != [120,155] 
triggerall = var(8) = 1 || var(7) >= 200
triggerall = var(7) >= 0
triggerall = var(30) = 0
trigger1 = stateno = 220 && movehit = 1

;中攻撃
[State -1]
type = ChangeState
value = 210
triggerall = var(59) && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype != A
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),stateno != [120,155]
triggerall = p2bodydist x <= 35
triggerall = !var(30)
trigger1 = stateno = 200 || stateno = 400 
trigger1 = movehit

;中攻撃
[State -1]
type = ChangeState
value = 215
triggerall = var(59) && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype != A
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),stateno != [120,155]
triggerall = !var(30)
trigger1 = stateno = 210 
trigger1 = movehit
trigger1 = (var(8) || var(7) >= 198) = 0

;強攻撃
[State -1]
type = ChangeState
value = 220
triggerall = var(59) && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype != A
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),stateno != [120,155]
triggerall = !var(30)
trigger1 = stateno = 210 || stateno = 215 || stateno = 410
trigger1 = movehit = [1,6]
trigger1 = var(8) || var(7) >= 198 || enemynear(var(31)),life*enemynear(var(31)),const(data.defence) < 6000*fvar(0)

;乙女富嶽
[State -1,17]
type = ChangeState
value = 1000
triggerall = var(59) && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype != A
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),stateno != [120,155]
triggerall = !var(30)
trigger1 = !(enemynear(var(31)),authorname = "Muteki")
trigger1 = random <= 250*var(59)
trigger1 = p2bodydist x <= 20
trigger1 = stateno = 220 || stateno = 250
trigger1 = movehit
trigger1 = enemynear(var(31)),gethitvar(hittime) < 4

;==============================================
;自分空中
;==============================================

;----------------------------------------------
;目押し
;----------------------------------------------
;空中強攻撃
[State -1]
type = ChangeState
value = 620
triggerall = var(59) && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype != A
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),stateno != [120,155]
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162]) 
triggerall = statetype = A
trigger1 = numtarget(620)
trigger1 = p2dist x > -10
trigger1 = p2bodydist x <= 60
;----------------------------------------------
;キャンセルコンボ
;----------------------------------------------
;インスタントチャージ
[State -1]
type = null;ChangeState
value = 900
triggerall = var(59) && roundstate = 2
triggerall = enemynear(var(31)),movetype = H && enemynear(var(31)),statetype != A
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),stateno != [120,155] 
triggerall = var(8) = 1 || var(7) >= 200
triggerall = var(7) >= 0
triggerall = var(30) = 0
trigger1 = stateno = 620 && movehit = 1
trigger1 = pos y + 16*vel y + 0.5*256*fvar(39) < 0
;_________________________________________________________
;
;反応避け
;_________________________________________________________

[state -3,jump]
type=changestate
value=42
triggerall = (var(59)=[2,10])&&roundstate=2
triggerall = statetype!=A
triggerall = ctrl || stateno = [100,101]
triggerall = random <= 16*var(59)**3
triggerall = enemynear(var(31)),time >= 60*fvar(31) || fvar(31) < 0.01 || random <= 15
trigger1 = enemynear(var(31)),hitdefattr=SC,NT,ST,HT 
trigger1 = enemynear(var(31)),time < -enemynear(var(31)),animtime || enemynear(var(31)),animtime >= 0 || enemynear(var(31)),time <= 5
trigger1 = p2bodydist X < 80
trigger2 = enemynear(var(31)),time <= 10 && enemynear(var(31)),stateno = [800,899]
trigger2 = p2bodydist X < 80
trigger3 = stateno = [100,101]
trigger3 = inguarddist && var(25) = 0
trigger3 = random <= 100
trigger3 = enemynear(var(31)),movetype != H || enemynear(var(31)),statetype = L || enemynear(var(31)),stateno = [120,155]

[state -3,jump]
type=changestate
value = 41 + ifelse((enemynear(var(31)),vel x > 4.0) , 1 , 0)
triggerall = (var(59)=[2,10])&&roundstate=2
triggerall = statetype!=A
triggerall = ctrl || stateno = [100,101]
triggerall = random <= 16*var(59)**3
triggerall = enemynear(var(31)),time >= 60*fvar(31) || fvar(31) < 0.01 || random <= 15
triggerall = enemynear(var(31)),p2bodydist x <= 80 && enemynear(var(31)),p2dist x > 0
trigger1 = numhelper(40001)
trigger1 = helper(40001),var(0) 
trigger1 = enemynear(var(31)),stateno = helper(40001),var(0)
trigger2 = numhelper(40001)
trigger2 = helper(40001),var(1) 
trigger2 = enemynear(var(31)),stateno = helper(40001),var(1)
trigger3 = numhelper(40001)
trigger3 = helper(40001),var(2) 
trigger3 = enemynear(var(31)),stateno = helper(40001),var(2)
trigger4 = numhelper(40001)
trigger4 = helper(40001),var(3) 
trigger4 = enemynear(var(31)),stateno = helper(40001),var(3)
trigger5 = numhelper(40001)
trigger5 = helper(40001),var(4) 
trigger5 = enemynear(var(31)),stateno = helper(40001),var(4)

[state -3,jump]
type=changestate
value=41
triggerall = (var(59)=[2,10])&&roundstate=2
triggerall = statetype!=A
triggerall = ctrl || stateno = [100,101]
triggerall = random <= 100*var(59)
trigger1 = numhelper(40002)
trigger1 = !inguarddist && helper(40002),inguarddist
trigger1 = !(enemynear(var(31)),hitdefattr = SCA,AA,AT)

[state -3,jump]
type=changestate
value=41
triggerall = (var(59)=[2,10])&&roundstate=2
triggerall = statetype!=A
triggerall = random <= 50*var(59)*var(59)
trigger1 = stateno = 510
trigger1 = movehit || var(28) && movereversed > 1
trigger1 = enemynear(var(31)),statetype = A && enemynear(var(31)),movetype != H
;_________________________________________________________
;
;ガード1
;_________________________________________________________

[State -1, e-2]
Type = ChangeState
Value = 120
triggerall = var(59) > 0
triggerall = random < 16*var(59)**3
triggerall = roundstate = 2
triggerall = stateno != 120 || time >= 1 && anim != 21 + 2*var(30)
triggerall = ctrl&&statetype !=A
triggerall = (enemynear(var(31)),hitdefattr =,NT,ST,HT)=0
triggerall = stateno != [100,101]
triggerall = var(25) = 0
triggerall = !var(47)
trigger1 = iNguarddist
trigger2 = numenemy = 1
trigger2 = numhelper(40001)
trigger2 = helper(40001),inguarddist
trigger3 = numenemy = 1
trigger3 = numhelper(40002)
trigger3 = helper(40002),inguarddist || helper(40002),var(0) = 1

[State -1, e-2]
Type = ChangeState
Value = 120
triggerall = var(59) > 0
triggerall = roundstate = 2
triggerall = stateno != 120 || time >= 1 && anim != 21 + 2*var(30)
triggerall = ctrl&&statetype !=A
triggerall = (enemynear(var(31)),hitdefattr =,NT,ST,HT)=0
triggerall = var(25) = 0
triggerall = stateno != [100,101]
triggerall = var(47)
triggerall = numhelper(40001)
triggerall = (enemynear(var(31)),pos x - pos x)*helper(40001),var(var(46) + 40) > 0
triggerall = abs(p2dist x) > 10 || var(45) < 100 || backedgebodydist < 15 && p2dist x > 0
triggerall = random <= 880 + 30*var(59) || statetype = C
trigger1 = inguarddist
trigger1 = helper(40002),var(13) = 1|| enemynear(var(31)),numhelper > var(58) || enemynear(var(31)),numproj > 0 || random <= 500
trigger2 = numenemy = 1
trigger2 = helper(40001),inguarddist
trigger3 = numenemy = 1
trigger3 = numhelper(40002)
trigger3 = helper(40002),inguarddist || helper(40002),var(0) = 1

[State -1, e-3]
Type = ChangeState
Value = 120
triggerall = var(59) = [1,10]
triggerall = ctrl && statetype = A&&var(25)=0
triggerall = var(30)
triggerall = inguarddist
trigger1 = stateno != 120 || animtime = 0

;_________________________________________________________
;
;受け身狩り
;_________________________________________________________

;空中強攻撃(投げ)
[State -1,40]
type = ChangeState
value = 720
triggerall = (var(59)=[2,10])&&roundstate=2
triggerall = statetype=A && ctrl
triggerall = var(59)>=4 || random <= 30 * var(59) * var(59)
triggerall = enemynear(var(31)),statetype =A 
triggerall = var(44)
triggerall = !var(47) || enemynear(var(31)),time >= 60*fvar(31)
triggerall = p2bodydist x <= 15 && p2dist x > 0
triggerall = p2bodydist y = [-25,40]
triggerall = p2stateno = [5210,5219]
triggerall = var(30)
trigger1 = enemynear(var(31)),time = [15,20]

;空中強攻撃
[State -1,40]
type = ChangeState
value = 720
triggerall = (var(59)=[2,10])&&roundstate=2
triggerall = statetype=A 
triggerall = ctrl || (stateno = 710 || stateno = 700) && movecontact || (stateno = 120 && prevstateno = [160,162])
triggerall = var(44)
triggerall = !var(47) || enemynear(var(31)),time >= 60*fvar(31)
triggerall = var(59)>=4 || random <= 30 * var(59) * var(59)
triggerall = enemynear(var(31)),statetype =A 
triggerall = pos y + 18*vel y + 0.5*324*fvar(39) < 20
triggerall = enemynear(var(31)),pos y + 18*fvar(11)  + 162*fvar(38) <= 0
triggerall = p2bodydist x <= 100 && p2dist x > 0
triggerall = p2bodydist y + 18*(fvar(11) - vel y) + 162*(fvar(38) - fvar(39))= [-45,70]
triggerall = p2stateno = [5210,5219]
triggerall = var(30)
trigger1 = enemynear(var(31)),time = [1,2]

;空中中攻撃
[State -1,40]
type = ChangeState
value = 710
triggerall = (var(59)=[2,10])&&roundstate=2
triggerall = statetype=A
triggerall = ctrl || stateno = 700 && movecontact || (stateno = 120 && prevstateno = [160,162])
triggerall = var(44)
triggerall = !var(47) || enemynear(var(31)),time >= 60*fvar(31)
triggerall = var(59)>=4 || random <= 30 * var(59) * var(59)
triggerall = enemynear(var(31)),statetype =A 
triggerall = pos y + 8*vel y + 0.5*64*fvar(39) < 0
triggerall = enemynear(var(31)),pos y + 8*fvar(11)  + 64*fvar(38) <= 20
triggerall = p2bodydist x <= 100 && p2dist x > -60
triggerall = p2bodydist y + 8*(fvar(11) - vel y) + 64*(fvar(38) - fvar(39))= [-80,110]
triggerall = p2stateno = [5210,5219]
triggerall = var(30)
trigger1 = enemynear(var(31)),time = [10,12]

;しゃがみ中攻撃
[State -1]
type = ChangeState
value = 510
triggerall = (var(59)=[2,10])&&roundstate=2
triggerall = statetype!=A 
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = var(44)
triggerall = !var(47)|| enemynear(var(31)),time >= 60*fvar(31) || p2stateno != [5210,5219]
triggerall = var(59)>=4 || random <= 30 * var(59) * var(59)
triggerall = enemynear(var(31)),statetype =A 
triggerall = enemynear(var(31)),pos y + 13*fvar(11)  + 169*fvar(38) = [-65,10]
triggerall = p2bodydist x = [-50,70]
triggerall = (enemynear(var(31)),prevstateno = [5210,5219]) || p2stateno = [5210,5219]
triggerall = var(30)
triggerall = random <= 64*var(59)**2
trigger1 = enemynear(var(31)),time > 5
trigger2 = enemynear(var(31)),prevstateno = [5210,5219]
trigger2 = enemynear(var(31)),ctrl = 0 || enemynear(var(31)),stateno != [50,55]

;弱攻撃
[State -1]
type = ChangeState
value = 300
triggerall = (var(59)=[2,10])&&roundstate=2
triggerall = statetype!=A 
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = var(44)
triggerall = !var(47) || enemynear(var(31)),time >= 60*fvar(31) || p2stateno != [5210,5219]
triggerall = var(59)>=4 || random <= 30 * var(59) * var(59)
triggerall = enemynear(var(31)),statetype =A 
triggerall = enemynear(var(31)),pos y + 4*fvar(11)  + 16*fvar(38) = [-15,10]
triggerall = p2bodydist x = [-50,70]
triggerall = (enemynear(var(31)),prevstateno = [5210,5219]) || p2stateno = [5210,5219]
triggerall = var(30)
trigger1 = enemynear(var(31)),time > 12
trigger2 = enemynear(var(31)),prevstateno = [5210,5219]
trigger2 = enemynear(var(31)),ctrl = 0 || enemynear(var(31)),stateno != [50,55]
;_________________________________________________________
;
;起き攻め(竹刀)
;_________________________________________________________
[state -3]
type = changestate
value = 100
triggerall = var(59) && roundstate = 2
triggerall = ctrl || stateno = 52
triggerall = statetype != A
triggerall = enemynear(var(31)),statetype = L
triggerall = var(30)
trigger1 = !var(47)
trigger1 = enemynear(var(31)),stateno = [5100,5110]
trigger1 = enemynear(var(31)),frontedgebodydist > 20 && facing = enemynear(var(31)),facing || enemynear(var(31)),backedgebodydist > 20 && facing != enemynear(var(31)),facing
trigger1 = p2bodydist x <= 90
trigger2 = var(47)
trigger2 = enemynear(var(31)),stateno = [5100,5110]
trigger2 = p2bodydist x >= 80 || p2bodydist x <= 30 && random <= 25

[state -3]
type = changestate
value = 42
triggerall = var(59) && roundstate = 2
triggerall = statetype != A
triggerall = enemynear(var(31)),statetype = L
triggerall = var(30)
triggerall = random <= 60
trigger1 = stateno = 100 && time >= 12 || stateno = 101
trigger1 = enemynear(var(31)),stateno = 5110 && enemynear(var(31)),time >= 0.3*enemynear(var(31)),const(data.liedown.time) || enemynear(var(31)),stateno = 5120 
trigger1 = p2dist x <= 55
trigger2 = stateno = 100 && time >= 12 || stateno = 101
trigger2 = enemynear(var(31)),const(data.liedown.time) <= 45
trigger2 = p2dist x <= 55
trigger2 = enemynear(var(31)),stateno = [5100,5110]

;立ち近中
[state -3]
type = ChangeState
value = 311
triggerall = var(59) && roundstate = 2
triggerall = statetype != A 
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = enemynear(var(31)),statetype = L
triggerall = var(30)
triggerall = var(47)
trigger1 = p2stateno = 5120 && enemynear(var(31)),animtime = [-7,-4]
trigger1 = p2bodydist x < 10
trigger1 = random <= 200

;強乙女富嶽
[State -1]
type = ChangeState
value = 1120
triggerall = roundstate = 2&& var(59)
triggerall = statetype !=A 
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = enemynear(var(31)),statetype != A
triggerall = var(30)
triggerall = var(47)
triggerall = p2dist x > 0
triggerall = var(7) >= 200 && var(8) = 0 || var(8) = 1 && var(7) <= 150
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])|| stateno = 52 || stateno = [100,101]
trigger1 = p2bodydist x <= 35
trigger1 = enemynear(var(31)),stateno = 5120 && enemynear(var(31)),animtime = [-11,-9]
trigger1 = random <= 150

;中紅蓮竹刀
[State -3,中紅蓮]
type = ChangeState
value = 1203
triggerall = var(59) && roundstate = 2
triggerall = statetype != A
triggerall = enemynear(var(31)),statetype = L
triggerall = var(30)
triggerall = var(47)
triggerall = var(7) >= 200 && var(8) = 0 || var(8) = 1 && var(7) <= 150
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])|| stateno = 52 || stateno = [100,101]
triggerall = p2dist x > 0
trigger1 = p2bodydist x <= 80
trigger1 = enemynear(var(31)),stateno = 5120 && enemynear(var(31)),animtime = [-3,-1]
trigger1 = random <= 250

[state -3]
type = changestate
value = 710
triggerall = var(59) && roundstate = 2
triggerall = statetype = A 
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = enemynear(var(31)),statetype = L || enemynear(var(31)),stateno = 0
triggerall = var(30)
trigger1 = (enemynear(var(31)),stateno = [5120,5125]) && enemynear(var(31)),animtime >= -4 || enemynear(var(31)),prevstateno = 5120
trigger1 = p2dist x = [-80,80]
trigger1 = vel y > 0 || p2dist x < 0 && random <= 250

;_________________________________________________________
;
;起き攻め(素手)
;_________________________________________________________

;_________________________________________________________
;
;固め&&リコイル取られた時(竹刀)
;_________________________________________________________
;=================
;ctrl
;=================
;強乙女富嶽
[State -1]
type = ChangeState
value = 1120
triggerall = roundstate = 2&& var(59)
triggerall = statetype !=A 
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = enemynear(var(31)),statetype != A
triggerall = var(30)
triggerall = var(47)
triggerall = p2dist x > 0
triggerall = p2stateno = [150,155]
trigger1 = enemynear(var(31)),gethitvar(hittime) = [13,15]
trigger1 = p2bodydist x <= 40
trigger1 = random <= 200

;=================
;ctrl = 0
;=================
;インスタントチャージ
[State -1]
type = ChangeState
value = 900
triggerall = roundstate = 2 && var(59)
triggerall = var(8) = 1 || var(7) >= 200
triggerall = var(7) >= 0
triggerall = var(30) = 1
trigger1 = stateno = 570 
trigger1 = moveguarded || var(28) && movereversed > 4
trigger2 = stateno = 1201 || stateno = 1204
trigger2 = moveguarded || var(28) && movereversed > 4
trigger2 = !var(43)

;中乙女富嶽
[State -1]
type = ChangeState
value = 1110
triggerall = roundstate = 2&& var(59)
triggerall = statetype !=A 
triggerall = enemynear(var(31)),statetype != A
triggerall = var(30)
triggerall = var(47) || palno =[11,12]
triggerall = p2dist x > 0
triggerall = var(7) >= 200 && var(8) = 0 || var(8) = 1 && var(7) <= 150
trigger1 = stateno = 300 && movecontact = 1
trigger1 = p2bodydist x <= 35
trigger1 = numtarget(300)
trigger1 = random <= 250

;強乙女富嶽
[State -1]
type = ChangeState
value = 1120
triggerall = roundstate = 2&& var(59)
triggerall = statetype !=A
triggerall = enemynear(var(31)),statetype != A
triggerall = var(30)
triggerall = var(47)
triggerall = p2dist x > 0
triggerall = random <= 400
trigger1 = (stateno = [310,315]) || stateno = 510 || stateno = 560
trigger1 = moveguarded = 3
trigger1 = p2bodydist x <= 40
trigger2 = stateno = 360 || stateno = 520 
trigger2 = moveguarded = 7
trigger2 = p2bodydist x <= 40

;中紅蓮竹刀
[State -3,中紅蓮]
type = ChangeState
value = 1203
triggerall = roundstate = 2&& var(59)
triggerall = statetype !=A
triggerall = enemynear(var(31)),statetype != A
triggerall = var(30)
triggerall = var(47)
triggerall = p2dist x > 0
triggerall = var(7) >= 200 || var(8) && var(7) <= 150
triggerall = random <= 350
trigger1 = (stateno = [310,315]) || stateno = 510 || stateno = 560
trigger1 = moveguarded = 10
trigger1 = p2bodydist x <= 45
trigger2 = stateno = 360 || stateno = 520 
trigger2 = moveguarded = 12
trigger2 = p2bodydist x <= 45

[state -3]
type = changestate
value = 1100
triggerall =roundstate = 2&& var(59)
triggerall = statetype !=A
triggerall = enemynear(var(31)),statetype != A
triggerall = var(30)
triggerall = p2dist x > 0
trigger1 = (stateno = [300,315]) || (stateno = [350,360]) || stateno = [500,560]
trigger1 = moveguarded
trigger1 = enemynear(var(31)),gethitvar(hittime) = 3
trigger1 = p2bodydist x <= 10
trigger2 = (stateno = [300,315]) || (stateno = [350,360])|| stateno = [500,560]
trigger2 = movehit || var(28) && movereversed > 4
trigger2 = enemynear(var(31)),movetype != H
trigger2 = p2bodydist x <= 15

;弱乙女牙突
[State -1]
type = ChangeState
value = 1300
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A
triggerall = stateno != 101
triggerall = var(30) = 1
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype!=A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno = [120,155]
trigger1 = stateno = 520
trigger1 = moveguarded
trigger1 = !var(47) || random <= 50

;近中攻撃
[State -1]
type = ChangeState
value = 310
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A
triggerall = stateno != 101
triggerall = var(30) = 1
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype!=A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno = [120,155]
trigger1 = stateno = 300 || stateno = 500
trigger1 = moveguarded && var(47)
trigger1 = p2bodydist x <= 35

;屈弱攻撃
[State -1]
type = ChangeState
value = 500
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A
triggerall = stateno != 101
triggerall = var(30) = 1
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype!=A && enemynear(var(31)),movetype = H && enemynear(var(31)),stateno = [120,155]
trigger1 = stateno = 500
trigger1 = moveguarded
trigger1 = p2bodydist x < 90
trigger2 = ctrl || (stateno = 120 && prevstateno = [160,162])
trigger2 = p2stateno = [150,155]
trigger2 = random <= 100*numenemy
trigger2 = p2bodydist x < 90

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

;空中中攻撃
[State -1]
type = ChangeState
value = 710
triggerall = var(59)>0 && roundstate = 2
triggerall = var(30) = 1
triggerall = statetype = A
trigger1 = stateno = 700
trigger1 = moveguarded

;空中ジャンプ
[State -1]
type = ChangeState
value = 46
triggerall = var(59)>0 && roundstate = 2
triggerall = var(30) = 1
triggerall = statetype = A
triggerall = var(1) = 0
triggerall = var(2) = 0
triggerall = Var(10) = 0
trigger1 = stateno = 710
trigger1 = moveguarded || movehit && p2movetype != H || movereversed > 1 && var(28) || movehit && vel y < -2
trigger1 = p2statetype = A && p2bodydist y < 0 && vel y < 0 || vel y = [-2,0]

;空中ダッシュ
[State -1]
type = ChangeState
value = 110
triggerall = var(59)>0 && roundstate = 2
triggerall = var(30) = 1
triggerall = statetype = A
triggerall = Var(10) = 0
triggerall = pos y < -20
triggerall = !inguarddist
trigger1 = stateno = 710
trigger1 = movecontact 
trigger1 = fvar(34) <= 120 && vel y < -2

;空中バックダッシュ
[State -1]
type = ChangeState
value = 115
triggerall = var(59)>0 && roundstate = 2
triggerall = var(30) = 1
triggerall = statetype = A
triggerall = Var(10) = 0
triggerall = pos y < -20
triggerall = !inguarddist
trigger1 = stateno = 710
trigger1 = moveguarded = 1 || (movehit = [1,3])&& p2movetype != H || movereversed > 1 && var(28)
trigger1 = random <= 250

;_________________________________________________________
;
;固め(素手)
;_________________________________________________________
;乙女富嶽
[State -1,17]
type = ChangeState
value = 1000
triggerall = enemynear(var(31)),movetype!=H
triggerall = enemynear(var(31)),statetype != L
triggerall = P2bodyDist X <= 15
triggerall = p2dist x>0
triggerall = enemynear(var(31)),statetype != A
triggerall = var(59) = [1,10]
triggerall = statetype != A
triggerall = !var(30)
triggerall = ctrl || stateno = 52|| (stateno = 120 && prevstateno = [160,162])
triggerall = random <= 16*var(59)*var(59)
trigger1 = stateno = 200 || stateno = 400 || stateno = 210
trigger1 = movecontact || var(28) && movereversed > 1


[state -1]
type = changestate
value = 200
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A
triggerall = stateno != 101
triggerall = var(30) = 0
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),statetype != C
trigger1 = stateno = 200 || stateno = 400
trigger1 = moveguarded || var(28) && movereversed > 1
trigger1 = p2bodydist x < 35
trigger2 = ctrl
trigger2 = enemynear(var(31)),movetype = H && enemynear(var(31)),stateno = [120,155]
trigger2 = enemynear(var(31)),gethitvar(hittime) > 4 - 2*(enemynear(var(31)),statetype = A)
trigger2 = enemynear(var(31)),statetype != A || enemynear(var(31)),pos y > -30
trigger2 = p2bodydist x < 20

[state -1]
type = changestate
value = 400
triggerall = var(59)>0 && roundstate = 2
triggerall = statetype != A
triggerall = stateno != 101
triggerall = var(30) = 0
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype!=A
trigger1 = stateno = 400
trigger1 = moveguarded || var(28) && movereversed > 1
trigger1 = p2bodydist x < 35

;_________________________________________________________
;
;技ふり(竹刀)
;_________________________________________________________
;耐える乙女の美学
[State -1]
type = ChangeState
value = 4000
triggerall = var(59) && roundstate = 2
triggerall = power >= 3000
triggerall = life <= 0.333*const(data.life)
triggerall = var(30) = 1
triggerall = var(25) < 20
triggerall = statetype != A 
triggerall = ctrl || stateno = 52 || (stateno = 120 && prevstateno = [160,162])
triggerall = enemynear(var(31)),movetype != H || enemynear(var(31)),statetype = L
trigger1 = life > 0.2*lifemax
trigger1 = roundno >= 2 && (teammode =single || teammode = simul) || teammode = turns && (roundsexisted >= 1 || roundno >= 6)

;弱攻撃
[State -1]
type = ChangeState
value = 300
triggerall = RoundState = 2 && var(59)
triggerall = var(30) = 1
triggerall = stateno != 101
triggerall = statetype != A 
triggerall = ctrl || stateno = 52 || (stateno = 120 && prevstateno = [160,162])
triggerall = numhelper(40002)
triggerall = !inguarddist && !var(47) || var(47) && ((helper(40002),var(10))%3 != 1 || (enemynear,numproj > 0) + (enemynear,numhelper>var(58)) && inguarddist)|| var(25)
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),movetype != H && enemynear(var(31)),stateno != [120,155]
trigger1 = enemynear(var(31)),statetype != A
trigger1 = p2bodydist x < 90
trigger1 = random <= 25 + 100*(var(25) != 0) + 60*(p2bodydist x < 25)

;屈弱攻撃
[State -1]
type = ChangeState
value = 500
triggerall = RoundState = 2 && var(59)
triggerall = var(30) = 1
triggerall = stateno != 101
triggerall = statetype != A 
triggerall = ctrl || stateno = 52 || (stateno = 120 && prevstateno = [160,162])
triggerall = numhelper(40002)
triggerall = !inguarddist && !var(47) || var(47) && ((helper(40002),var(10))%3 != 1 || (enemynear,numproj > 0) + (enemynear,numhelper>var(58)) && inguarddist)|| var(25)
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),movetype != H && enemynear(var(31)),stateno != [120,155]
trigger1 = enemynear(var(31)),statetype != A
trigger1 = p2bodydist x =[70,95]
trigger1 = random <= 40 + 100*(var(25) != 0)

;中攻撃
[State -1]
type = ChangeState
value = 315
triggerall = RoundState = 2 && var(59)
triggerall = var(30) = 1
triggerall = stateno != 101
triggerall = statetype != A 
triggerall = ctrl || stateno = 52 || (stateno = 120 && prevstateno = [160,162])
triggerall = numhelper(40002)
triggerall = !inguarddist && !var(47) || var(47) && ((helper(40002),var(10))%3 != 1 || (enemynear,numproj > 0) + (enemynear,numhelper>var(58)) && inguarddist)|| var(25)
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),movetype != H
trigger1 = enemynear(var(31)),statetype != A || enemynear(var(31)),pos y >= -30 && fvar(11) > 0
trigger1 = p2bodydist x =[60,100]
trigger1 = random <= 20 + 120*(var(25) != 0)

;しゃがみ強攻撃
[State -1]
type = ChangeState
value = 520
triggerall = RoundState = 2 && var(59)
triggerall = var(30) = 1
triggerall = stateno != 101
triggerall = statetype != A 
triggerall = ctrl || stateno = 52 || (stateno = 120 && prevstateno = [160,162])
triggerall = numhelper(40002)
triggerall = !inguarddist && !var(47) || var(47) && ((helper(40002),var(10))%3 != 1 || (enemynear,numproj > 0) + (enemynear,numhelper>var(58)) && inguarddist)|| var(25)
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),movetype != H
trigger1 = enemynear(var(31)),statetype != A
trigger1 = p2bodydist x =[40,80]
trigger1 = random <= 10 + 60*(var(25) != 0)

;強攻撃
[State -1]
type = ChangeState
value = 320
triggerall = RoundState = 2 && var(59)
triggerall = var(30) = 1
triggerall = stateno != 101
triggerall = statetype != A 
triggerall = ctrl || stateno = 52 || (stateno = 120 && prevstateno = [160,162])
triggerall = numhelper(40002)
triggerall = !inguarddist && !var(47) || var(47) && ((helper(40002),var(10))%3 != 1 || (enemynear,numproj > 0) + (enemynear,numhelper>var(58)) && inguarddist)|| var(25)
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),movetype != H
trigger1 = enemynear(var(31)),statetype != A || enemynear(var(31)),pos y >= -50 && fvar(11) > 0
trigger1 = p2bodydist x =[90,140]
trigger1 = random <= 10 + 40*(var(25) != 0)

;弱乙女富嶽
[State -1]
type = ChangeState
value = 1100
triggerall = RoundState = 2 && var(59)
triggerall = var(30) = 1
triggerall = statetype != A 
triggerall = ctrl || stateno = 52 || (stateno = 120 && prevstateno = [160,162]) || stateno = [100,101]
triggerall = numhelper(40002)
triggerall = !inguarddist && !var(47) || var(47) && ((helper(40002),var(10))%3 != 1 || (enemynear,numproj > 0) + (enemynear,numhelper>var(58)) && inguarddist)|| var(25)
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),movetype != H
triggerall = enemynear(var(31)),statetype != A || var(47) && helper(40002),var(10) <=5
triggerall = p2dist x > 0
trigger1 = stateno = [100,101]
trigger1 = p2bodydist x <= 15
trigger1 = p2movetype = I
trigger1 = random <= 80

;強乙女富嶽
[State -1]
type = ChangeState
value = 1120
triggerall = roundstate = 2&& var(59)
triggerall = statetype !=A
triggerall = enemynear(var(31)),statetype != A
triggerall = var(30)
;triggerall = var(47) 
triggerall = ctrl || stateno = 52 || (stateno = 120 && prevstateno = [160,162]) || stateno = [100,101]
triggerall = numhelper(40002)
triggerall = !inguarddist && !var(47) || var(47) && ((helper(40002),var(10))%3 != 1 || (enemynear,numproj > 0) + (enemynear,numhelper>var(58)) && inguarddist)|| var(25)
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),movetype != H
triggerall = enemynear(var(31)),statetype != A || var(47) && helper(40002),var(10) <= 5
triggerall = p2dist x > 0
trigger1 = stateno = 101
trigger1 = p2bodydist x <= 35
trigger1 = random <= 30

;中攻撃（ダッシュ）
[State -1]
type = ChangeState
value = 360
triggerall = RoundState = 2 && var(59)
triggerall = var(30) = 1
triggerall = stateno = 100
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype != A || enemynear(var(31)),stateno = [40,44]
trigger1 = p2bodydist x <= 80
trigger1 = random <= 60 + 120*(var(25) != 0)

;しゃがみ強攻撃(ダッシュ) 
[State -1]
type = ChangeState
value = 570
triggerall = RoundState = 2 && var(59)
triggerall = var(30) = 1
triggerall = stateno = 100
triggerall = enemynear(var(31)),statetype != L
triggerall = enemynear(var(31)),statetype != A || enemynear(var(31)),stateno = [40,44]
triggerall = var(7) >= 200 || var(8) = 1 && var(7) <= 150
trigger1 = p2bodydist x <= 80
trigger1 = random <= 10 + 120*(var(25) != 0)


;--------------------
;statetype = A
;--------------------
;空中弱攻撃
[State -1]
type = ChangeState
value = 700
triggerall = RoundState = 2 && var(59)
triggerall = var(30) = 1
triggerall = statetype = A 
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = enemynear(var(31)),movetype != H
triggerall = enemynear(var(31)),statetype != L
triggerall = var(47)&&var(44)||p2stateno != [5210,5219]
trigger1 = p2bodydist x - 7*vel x <= 90
trigger1 = p2bodydist y +7*(fvar(11) - vel y) + 0.5*49*(fvar(38) - fvar(39))= [-10,90]
trigger1 = p2dist x > 10
trigger1 = random <= 120 + 150*(stateno = 120)*(prevstateno = 162)*var(14)

;空中中攻撃
[State -1]
type = ChangeState
value = 710
triggerall = RoundState = 2 && var(59)
triggerall = var(30) = 1
triggerall = statetype = A 
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = enemynear(var(31)),movetype != H
triggerall = enemynear(var(31)),statetype != L
triggerall = var(47)&&var(44)||p2stateno != [5210,5219]
trigger1 = p2bodydist x - 9*vel x <= 80
trigger1 = p2bodydist y + 9*(fvar(11) - vel y) + 0.5*81*(fvar(38) - fvar(39))= [-65,90]
trigger1 = p2dist x > -60
trigger1 = random <= 100 + 30*(p2bodydist x <30) + 150*(stateno = 120)*(prevstateno = 162)*var(14)
trigger1 = vel y > 0 || p2bodydist x < 30

;空中強攻撃
[State -1]
type = ChangeState
value = 720
triggerall = RoundState = 2 && var(59)
triggerall = var(30) = 1
triggerall = statetype = A 
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = enemynear(var(31)),movetype != H
triggerall = enemynear(var(31)),statetype != L
triggerall = var(47)&&var(44)||p2stateno != [5210,5219]
trigger1 = p2bodydist x - 18*vel x = [90,130]
trigger1 = p2bodydist y + 18*(fvar(11) - vel y) + 0.5*18*18*(fvar(38)*(p2statetype = A) - fvar(39))= [-20,85]
trigger1 = p2dist x > -10
trigger1 = random <= 40
trigger2 = p2dist x > 0
trigger2 = p2bodydist x <= 10
trigger2 = p2bodydist y = [-5,40]
trigger2 = random <= 150
;_________________________________________________________
;
;技ふり(素手)
;_________________________________________________________
;しゃがみ弱攻撃
[State -1]
type = ChangeState
value = 400
triggerall = RoundState = 2 && var(59)
triggerall = var(30) = 0
triggerall = statetype != A 
triggerall = ctrl || stateno = 52 || (stateno = 120 && prevstateno = [160,162])
triggerall = numhelper(40002)
triggerall = p2dist x > 0
triggerall = !inguarddist && !var(47) || var(47) && ((helper(40002),var(10))%3 != 1 || (enemynear,numproj > 0) + (enemynear,numhelper>var(58)) && inguarddist)|| var(25)
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),movetype != H
trigger1 = enemynear(var(31)),statetype != A
trigger1 = p2bodydist x < 30
trigger1 = random <= 90 + 150*(var(25) != 0)

;しゃがみ中攻撃
[State -1]
type = ChangeState
value = 410
triggerall = RoundState = 2 && var(59)
triggerall = var(30) = 0
triggerall = statetype != A 
triggerall = ctrl || stateno = 52 || (stateno = 120 && prevstateno = [160,162])
triggerall = numhelper(40002)
triggerall = p2dist x > 0
triggerall = !inguarddist && !var(47) || var(47) && ((helper(40002),var(10))%3 != 1 || (enemynear,numproj > 0) + (enemynear,numhelper>var(58)) && inguarddist)|| var(25)
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),movetype != H
trigger1 = enemynear(var(31)),statetype != A
trigger1 = p2bodydist x = [30,90]
trigger1 = random <= 20 + 90*(var(25) != 0)

;乙女富嶽
[State -1]
type = ChangeState
value = 1000
triggerall = RoundState = 2 && var(59)
triggerall = var(30) = 0
triggerall = statetype != A 
triggerall = ctrl || stateno = 52 || (stateno = 120 && prevstateno = [160,162]) || stateno = [100,101]
triggerall = numhelper(40002)
triggerall = !inguarddist && !var(47) || var(47) && ((helper(40002),var(10))%3 != 1 || (enemynear,numproj > 0) + (enemynear,numhelper>var(58)) && inguarddist)|| var(25)
triggerall = enemynear(var(31)),statetype != L && enemynear(var(31)),movetype != H
triggerall = enemynear(var(31)),statetype != A
triggerall = p2dist x > 0
trigger1 = stateno = 101 || ctrl || stateno = 120
trigger1 = p2bodydist x <= 15
trigger1 = p2movetype = I
trigger1 = random <= 50 + 120*(var(25) != 0) + 200*(stateno = 101)


;--------------------
;statetype = A
;--------------------
;空中弱攻撃
[State -1]
type = ChangeState
value = 600
triggerall = RoundState = 2 && var(59)
triggerall = var(30) = 0
triggerall = statetype = A 
triggerall = ctrl
triggerall = enemynear(var(31)),movetype != H
triggerall = enemynear(var(31)),statetype != L
triggerall = p2stateno != [5210,5219]
trigger1 = p2bodydist x - 7*vel x <= 40
trigger1 = p2bodydist y = [-10,55]
trigger1 = p2dist x > 10
trigger1 = random <= 80

;空中中攻撃
[State -1]
type = ChangeState
value = 610
triggerall = RoundState = 2 && var(59)
triggerall = var(30) = 0
triggerall = statetype = A 
triggerall = ctrl|| (stateno = 120 && prevstateno = [160,162])
triggerall = enemynear(var(31)),movetype != H
triggerall = enemynear(var(31)),statetype != L
triggerall = p2stateno != [5210,5219]
trigger1 = p2bodydist x - 9*vel x <= 35
trigger1 = p2bodydist y = [-45,10]
trigger1 = p2dist x > 10
trigger1 = random <= 80

;空中強攻撃
[State -1]
type = ChangeState
value = 620
triggerall = RoundState = 2 && var(59)
triggerall = var(30) = 0
triggerall = statetype = A 
triggerall = ctrl || (stateno = 120 && prevstateno = [160,162])
triggerall = enemynear(var(31)),movetype != H
triggerall = enemynear(var(31)),statetype != L
triggerall = p2stateno != [5210,5219]
trigger1 = p2bodydist x - 11*vel x <= 30
trigger1 = p2bodydist y = [0,125]
trigger1 = p2dist x > -10
trigger1 = random <= 80
trigger2 = p2dist x > 0
trigger2 = p2bodydist x <= 10
trigger2 = p2bodydist y = [-5,40]
trigger2 = random <= 150
;_________________________________________________________
;
;ガード2
;_________________________________________________________

[State -1, e-3]
Type = ChangeState
Value = 120
triggerall = var(59) = [1,10]
triggerall = ctrl && statetype = A&&var(25)=0
trigger1 = !var(30)
trigger1 = inguarddist

;_________________________________________________________
;
;移動(竹刀)
;_________________________________________________________

[state -3,walk]
type= changestate
value=21
triggerall = var(59)>0&&roundstate=2
triggerall = ctrl&&statetype!=A
triggerall = stateno!=[21,22]
triggerall = stateno!=[101,103]
triggerall = p2bodydist x >0
triggerall = stateno != 10 || (stateno = 11 && time > 5 && random < 40) || !var(47)
triggerall = !inguarddist && (stateno !=120 || anim != 23)||var(25)>0||(enemynear(var(31)),movetype!=A&&var(53)=1)
triggerall = var(30)
triggerall = !numtarget(1170)
trigger1 = enemynear(var(31)),statetype != L
trigger1 = p2bodydist x > 55 && random < 120||enemynear(var(31)),movetype = H && frontedgebodydist > 40
trigger2 = enemynear(var(31)),statetype = L
trigger2 = backedgebodydist <40 && p2bodydist x >= 40 || var(47)

[state -3];walk back
type = changestate
value = 22
triggerall = var(59) && roundstate = 2
triggerall = statetype != A && ctrl
triggerall = stateno != [21,22]
triggerall = stateno != [100,101]
triggerall = var(30)
triggerall = stateno != 10 || (stateno = 11 && time > 5 && random < 40) || !var(47)
trigger1 = p2movetype != H || p2statetype = A && enemynear,canrecover
trigger1 = random <= 40 - 30*(var(25) != 0)

;ジャンプ
[State -1]
type = ChangeState
value = 41
triggerall = var(59) && roundstate = 2
triggerall = statetype != A
triggerall = ctrl || stateno = 52 || stateno = 100
triggerall = var(30)
triggerall = enemynear(var(31)),movetype != H
triggerall = enemynear(var(31)),statetype != L
triggerall = stateno != 10 || (stateno = 11 && time > 5 && random < 40) || !var(47)
trigger1 = random <= 5
trigger1 = !inguarddist

;ダッシュ
[State -1]
type = ChangeState
value = 100
triggerall = var(59) && roundstate = 2
triggerall = statetype != A
triggerall = ctrl || stateno = 52 || stateno = 101
triggerall = enemynear(var(31)),statetype != L
triggerall = numhelper(40002)
triggerall = !inguarddist && !var(47) || var(47) && ((helper(40002),var(10))%3 != 1 || (enemynear,numproj > 0) + (enemynear,numhelper>var(58)) && inguarddist)|| var(25)
triggerall = var(30)
triggerall = stateno != 10 || (stateno = 11 && time > 5 && random < 40) || !var(47)
trigger1 = p2movetype != H
trigger1 = p2bodydist x >= 60
trigger1 = random <= 30 + 60*(var(25) != 0) + 60*numhelper(1460)


;_________________________________________________________
;
;移動(素手)
;_________________________________________________________
;竹刀回収
[state -1]
type = changestate
value = 950
triggerall = roundstate = 2 && var(59)
triggerall = var(30) = 0
triggerall = numhelper(1250)
triggerall = helper(1250),stateno = 1270 || helper(1250),stateno = 25001
triggerall = abs(helper(1250),pos x - pos x) < 30
triggerall = ctrl && statetype != A
triggerall = !var(43)
trigger1 = !numtarget(1000)
trigger1 = !inguarddist && !var(47) || var(47) && ((helper(40002),var(10))%3 != 1 || (enemynear,numproj > 0) + (enemynear,numhelper>var(58)) && inguarddist)|| var(25)
trigger1 = p2bodydist x >= 80 ||p2bodydist y <= -100|| p2statetype = L || facing = enemynear,facing || var(25)
trigger2 = inguarddist && enemynear,ctrl = 0 && enemynear,animtime > -15 || enemynear,ctrl
trigger2 = p2bodydist x > 50
trigger2 = random <= 100

[state -3,walk]
type= changestate
value=21
triggerall = var(59)>0&&roundstate=2
triggerall = ctrl&&statetype!=A
triggerall = stateno!=21&&stateno !=22&&stateno!=[101,103]
triggerall = p2bodydist x >0
triggerall = !inguarddist && (stateno !=120 || anim != 21)||var(25)>0
triggerall = !var(30)
triggerall = stateno != 10 || (stateno = 11 && time > 5 && random < 40) || !var(47)
trigger1 = enemynear(var(31)),statetype != L
trigger1 = p2bodydist x > 70||enemynear(var(31)),movetype = H
trigger1 = enemynear,stateno != 5656
trigger1 = random <= 120
trigger2 = enemynear(var(31)),statetype = L
trigger2 = backedgebodydist <40 && p2bodydist x >= 40
trigger3 = numtarget
trigger3 = target,stateno = 5656
trigger3 = target,facing*facing*target,vel x > 0 && fvar(1) < 0.80 || target,facing != facing && p2bodydist x + var(48)*facing*target,facing*target,vel x >= 5 + 20*(fvar(1)<=0.80)
trigger4 = numhelper(1250)
trigger4 = facing*(helper(1250),pos x - pos x) > 20
trigger4 = p2bodydist x > 130 && enemynear(var(31)),hitfall = 0|| p2statetype = L
trigger4 = !var(43)

[state -3];walk back
type = changestate
value = 22
triggerall = var(59) && roundstate = 2
triggerall = statetype != A && ctrl
triggerall = stateno != [21,22]
triggerall = stateno != [100,101]
triggerall = !var(30)
triggerall = stateno != 10 || (stateno = 11 && time > 5 && random < 40) || !var(47)
trigger1 = p2movetype != H || p2statetype = A && enemynear,canrecover
trigger1 = random <= 40 - 30*(var(25) != 0)
trigger2 = numtarget
trigger2 = target,stateno = 5656
trigger2 = p2bodydist x + var(48)*facing*target,facing*target,vel x < 0 + 20*(fvar(1) <= 0.80)
trigger3 = numhelper(1250)
trigger3 = facing*(helper(1250),pos x - pos x) < -20
trigger3 = p2bodydist x > 130 && enemynear(var(31)),hitfall = 0|| p2statetype = L
trigger3 = !var(43)

;ジャンプ
[State -1]
type = ChangeState
value = 41
triggerall = var(59) && roundstate = 2
triggerall = statetype != A
triggerall = ctrl || stateno = 52 || stateno = 100
triggerall = !var(30)
triggerall = enemynear(var(31)),movetype != H
triggerall = enemynear(var(31)),statetype != L
triggerall = stateno != 10 || (stateno = 11 && time > 5 && random < 40) || !var(47)
trigger1 = random <= 25
trigger1 = !inguarddist
trigger1 = p2bodydist x > 80

;ダッシュ
[State -1]
type = ChangeState
value = 100
triggerall = var(59) && roundstate = 2
triggerall = statetype != A
triggerall = ctrl || stateno = 52 || stateno = 101
triggerall = enemynear(var(31)),statetype != L
triggerall = !inguarddist && !var(47) || var(47) && ((helper(40002),var(10))%3 != 1 || (enemynear,numproj > 0) + (enemynear,numhelper>var(58)) && inguarddist)|| var(25)
triggerall = !var(30)
triggerall = stateno != 10 || (stateno = 11 && time > 5 && random < 40) || !var(47)
trigger1 = p2movetype != H
trigger1 = p2bodydist x >= 60
trigger1 = random <= 25 + 60*(var(25) != 0)

;空中ダッシュ
[State -1]
type = ChangeState
value = 110
triggerall = var(59) && roundstate = 2
triggerall = statetype = A
triggerall = !var(10)
triggerall = ctrl 
triggerall = !var(30)
triggerall = pos y < -22
triggerall = enemynear(var(31)),movetype != H
triggerall = enemynear(var(31)),statetype != L
trigger1 = p2bodydist x > 85
trigger1 = !inguarddist
trigger1 = random <= 50

;空中バックダッシュ
[State -1]
type = ChangeState
value = 115
triggerall = var(59) && roundstate = 2
triggerall = statetype != A
triggerall = !var(10)
triggerall = ctrl 
triggerall = !var(30)
triggerall = enemynear(var(31)),movetype != H
triggerall = enemynear(var(31)),statetype != L
trigger1 = 0

;-------------------------------
;共通
;------------------------------
[state -3 , crouch]
type = changestate
value = 10
triggerall = roundstate = 2 && var(59)
triggerall = var(47)
triggerall = statetype = S && ctrl
triggerall = stateno != 10
trigger1 = stateno = 0
trigger1 = var(47) && helper(40002),var(var(46)) != [6,8]

[state -3 , crouch]
type = changestate
value = 11
triggerall = roundstate = 2 && var(59)
triggerall = var(47)
triggerall = ctrl
triggerall = stateno != 10
trigger1 = stateno = 12 && time <= 1
trigger1 = var(47) && helper(40002),var(var(46)) != [6,8]
trigger1 = random <= 990
;--------------------------------
;受け身
;--------------------------------
[State 5050, 5]; Recover in mid air
type = ChangeState
triggerall = Vel Y > -1
triggerall = alive
triggerall = stateno = 5050
triggerall = CanRecover
triggerall = numhelper(40002)
triggerall = !inguarddist && helper(40002),inguarddist = 0 || roundstate != 2
triggerall = var(59)=[1,10]
trigger1 = p2bodydist x > 100 || p2bodydist y < -150
trigger1 = enemynear(var(31)),numhelper <= var(58) && enemynear(var(31)),numproj = 0
trigger1 = var(59) >= 3
trigger2 = enemynear(var(31)),statetype = L || enemynear(var(31)),movetype = H
trigger2 = var(59) >= 2
trigger3 = random <=50 && var(59)=[1,3]
trigger4 = var(59) = 1 && random < 200
trigger5 = roundstate != 2
value = 5210 ;HITFALL_AIRREC
;==========================================================
;爆裂フルスイング
;==========================================================
;乙女バント
[State -1]
type = ChangeState
value = 1170
triggerall = var(59) && roundstate = 2
triggerall = var(30) = 1
triggerall = numtarget(1100)
triggerall = target(1100),vel y > 3 || target(1100),statetype != A
triggerall = stateno = 1150 && animelemno(0) = 10 || stateno = 1151
triggerall = var(50) < 8
trigger1 = var(50) = 0
trigger1 = var(8) = 1 || var(7) >= 200
trigger1 = var(7) > 0
trigger2 = target(1100),life*target(1100),const(data.defence) <= 15*100
trigger3 = var(8) = 1 || var(7) >= 200
trigger3 = var(7) > 0
trigger3 = target(1100),life*target(1100),const(data.defence) <= 150*100*(1 + 1.5*var(8)*var(7)/400)
trigger4 = target(1100),statetype != A
trigger4 = p2bodydist x = [-15,80]

;--------------------------------------------------------------------------------------
;爆裂フルスイング(ホームラン)
[State -1]
type = ChangeState
value = 4100
triggerall = life <= 0.333*const(data.life)
triggerall = power >= 3000
triggerall = enemynear(var(31)),life*enemynear(var(31)),const(data.defence) >= 250 * 100 || var(50) = 9
triggerall = roundstate = 2 && var(59)
triggerall = var(30) = 1
triggerall = stateno = 1150
triggerall = animelemno(0) = 10
triggerall = numtarget(1100)
triggerall = target(1100),vel y > 0
triggerall = target(1100),pos y + 12*target(1100),vel y + 66*(0.25 + 0.05*target(1100),const(movement.yaccel)) = [-12,10]
trigger1 = var(50) = 0 && var(49) <= 4
trigger2 = var(50) = 1 && var(49) <= 1
trigger3 = var(50) = 2 && var(49) <= 4
trigger4 = var(50) = 3 && var(49) <= 14
trigger5 = var(50) = 4 && var(49) <= 49
trigger6 = var(50) = 5 && var(49) <= 1 + ceil(18*(1000*lifemax - 1000*life)/(1000*lifemax))
trigger7 = var(50) = 6 && var(49) <= ceil(69*(1000*lifemax - 1000*life)/(1000*lifemax))
trigger8 = var(50) = 7 && var(49) <= 19 + ceil(50*(1000*lifemax - 1000*life)/(1000*lifemax))
trigger9 = var(50) = 8
trigger10 = var(50) = 9 && var(49) <= 29
trigger11 = 0

;爆裂フルスイング(３塁打ぐらい)
[State -1]
type = ChangeState
value = 4100
triggerall = life <= 0.333*const(data.life)
triggerall = power >= 3000
triggerall = enemynear(var(31)),life*enemynear(var(31)),const(data.defence) >= 250 * 100 || var(50) = 9
triggerall = roundstate = 2 && var(59)
triggerall = var(30) = 1
triggerall = stateno = 1150
triggerall = animelemno(0) = 10
triggerall = numtarget(1100)
triggerall = target(1100),vel y > 0
triggerall = target(1100),pos y + 12*target(1100),vel y + 66*(0.25 + 0.05*target(1100),const(movement.yaccel)) = [-26,-10)
trigger1 = var(50) = 0 && var(49) = [5,9]
trigger2 = var(50) = 1 && var(49) = [2,3]
trigger3 = var(50) = 2 && var(49) = [5,9]
trigger4 = var(50) = 3 && var(49) = [15,24]
trigger5 = var(50) = 4 && var(49) = [50,59]
trigger6 = var(50) = 5 && var(49) = [20,20 + ceil(9*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger7 = var(50) = 6 && var(49) = [70,70 + ceil(9*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger8 = var(50) = 7 && var(49) = [20 + ceil(50*(1000*lifemax - 1000*life)/(1000*lifemax)),39 + ceil(40*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger9 = 0

;爆裂フルスイング(２塁打ぐらい)
[State -1]
type = ChangeState
value = 4100
triggerall = life <= 0.333*const(data.life)
triggerall = power >= 3000
triggerall = enemynear(var(31)),life*enemynear(var(31)),const(data.defence) >= 250 * 100 || var(50) = 9
triggerall = roundstate = 2 && var(59)
triggerall = var(30) = 1
triggerall = stateno = 1150
triggerall = animelemno(0) = 10
triggerall = numtarget(1100)
triggerall = target(1100),vel y > 0
triggerall = target(1100),pos y + 12*target(1100),vel y + 66*(0.25 + 0.05*target(1100),const(movement.yaccel)) = [-40,24)
trigger1 = var(50) = 0 && var(49) = [10,14]
trigger2 = var(50) = 1 && var(49) = [4,5]
trigger3 = var(50) = 2 && var(49) = [10,14]
trigger4 = var(50) = 3 && var(49) = [25,32]
trigger5 = var(50) = 4 && var(49) = [60,67]
trigger6 = var(50) = 5 && var(49) = [30,30 + ceil(9*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger7 = var(50) = 6 && var(49) = [80,80 + ceil(9*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger8 = var(50) = 7 && var(49) = [40 + ceil(40*(1000*lifemax - 1000*life)/(1000*lifemax)),49 + ceil(50*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger9 = 0

;爆裂フルスイング(１塁打ぐらい)
[State -1]
type = ChangeState
value = 4100
triggerall = life <= 0.333*const(data.life)
triggerall = power >= 3000
triggerall = enemynear(var(31)),life*enemynear(var(31)),const(data.defence) >= 250 * 100 || var(50) = 9
triggerall = roundstate = 2 && var(59)
triggerall = var(30) = 1
triggerall = stateno = 1150
triggerall = animelemno(0) = 10
triggerall = numtarget(1100)
triggerall = target(1100),vel y > 0
triggerall = target(1100),pos y + 12*target(1100),vel y + 66*(0.25 + 0.05*target(1100),const(movement.yaccel)) = [-55,-40]
trigger1 = var(50) = 0 && var(49) = [15,19]
trigger2 = var(50) = 1 && var(49) = [6,7]
trigger3 = var(50) = 2 && var(49) = [15,19]
trigger4 = var(50) = 3 && var(49) = [33,36]
trigger5 = var(50) = 4 && var(49) = 68
trigger6 = var(50) = 5 && var(49) = [40,40 + ceil(7*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger7 = var(50) = 6 && var(49) = [90,90 + ceil(8*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger8 = 0

;爆裂フルスイング(カス当たり)
[State -1]
type = ChangeState
value = 4100
triggerall = life <= 0.333*const(data.life)
triggerall = power >= 3000
triggerall = enemynear(var(31)),life*enemynear(var(31)),const(data.defence) >= 250 * 100 || var(50) = 9
triggerall = roundstate = 2 && var(59)
triggerall = var(30) = 1
triggerall = stateno = 1150
triggerall = animelemno(0) = 10
triggerall = numtarget(1100)
triggerall = target(1100),vel y > 0
triggerall = target(1100),pos y + 12*target(1100),vel y + 66*(0.25 + 0.05*target(1100),const(movement.yaccel)) = [-85,-55]
trigger1 = var(50) = 0 && var(49) = [20,24]
trigger2 = var(50) = 1 && var(49) = [6,7]
trigger3 = var(50) = 2 && var(49) = [20,24]
trigger4 = var(50) = 3 && var(49) = [37,39]
trigger5 = var(50) = 4 && var(49) = 69
trigger6 = var(50) = 5 && var(49) = [48,48 + ceil((1000*lifemax - 1000*life)/(1000*lifemax))]
trigger7 = var(50) = 6 && var(49) = 99
trigger8 = 0

;爆裂フルスイング(スカポンターン)
[State -1]
type = ChangeState
value = 4100
triggerall = life <= 0.333*const(data.life)
triggerall = power >= 3000
triggerall = enemynear(var(31)),life*enemynear(var(31)),const(data.defence) >= 250 * 100 || var(50) = 9
triggerall = roundstate = 2 && var(59)
triggerall = var(30) = 1
triggerall = stateno = 1150
triggerall = animelemno(0) = 10
triggerall = numtarget(1100)
triggerall = target(1100),vel y > 9
triggerall = target(1100),pos y + 12*target(1100),vel y + 66*(0.25 + 0.05*target(1100),const(movement.yaccel)) != [-100,20]
triggerall = random <= 85
trigger1 = var(50) = 0 && var(49) >=25
trigger2 = var(50) = 1 && var(49) >=10
trigger3 = var(50) = 2 && var(49) >=25
trigger4 = var(50) = 3 && var(49) >=40
trigger5 = var(50) = 4 && var(49) >=70
trigger6 = var(50) = 5
trigger6 = var(49) > 1 + ceil(18*(1000*lifemax - 1000*life)/(1000*lifemax))
trigger6 = var(49) != [20,20 + ceil(9*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger6 = var(49) != [30,30 + ceil(9*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger6 = var(49) != [40,40 + ceil(9*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger7 = var(50) = 6
trigger7 = var(49) > ceil(69*(1000*lifemax - 1000*life)/(1000*lifemax))
trigger7 = var(49) != [70,70 + ceil(9*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger7 = var(49) != [80,80 + ceil(9*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger7 = var(49) != [90,90 + ceil(9*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger8 = var(50) = 7 
trigger8 = var(49) > 19 + ceil(50*(1000*lifemax - 1000*life)/(1000*lifemax))
trigger8 = var(49) != [20 + ceil(50*(1000*lifemax - 1000*life)/(1000*lifemax)),39 + ceil(40*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger8 = var(49) != [40 + ceil(40*(1000*lifemax - 1000*life)/(1000*lifemax)),49 + ceil(50*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger9 = var(50) = 9 && var(49) > 29
;--------------------------------------------------------------------------------------
;爆裂フルスイング(ホームラン)
[State -1]
type = ChangeState
value = 1160
triggerall = roundstate = 2 && var(59)
triggerall = var(30) = 1
triggerall = stateno = 1150
triggerall = animelemno(0) = 10
triggerall = numtarget(1100)
triggerall = target(1100),vel y > 0
triggerall = target(1100),pos y + 12*target(1100),vel y + 66*(0.25 + 0.05*target(1100),const(movement.yaccel)) = [-12,10]
trigger1 = var(50) = 0 && var(49) <= 4
trigger2 = var(50) = 1 && var(49) <= 1
trigger3 = var(50) = 2 && var(49) <= 4
trigger4 = var(50) = 3 && var(49) <= 24
trigger5 = var(50) = 4 && var(49) <= 49
trigger6 = var(50) = 5 && var(49) <= 1 + ceil(18*(1000*lifemax - 1000*life)/(1000*lifemax))
trigger7 = var(50) = 6 && var(49) <= ceil(69*(1000*lifemax - 1000*life)/(1000*lifemax))
trigger8 = var(50) = 7 && var(49) <= 19 + ceil(50*(1000*lifemax - 1000*life)/(1000*lifemax))
trigger9 = var(50) = 8
trigger10 = var(50) = 9 && var(49) <= 29
trigger11 = 0

;爆裂フルスイング(３塁打ぐらい)
[State -1]
type = ChangeState
value = 1160
triggerall = roundstate = 2 && var(59)
triggerall = var(30) = 1
triggerall = stateno = 1150
triggerall = animelemno(0) = 10
triggerall = numtarget(1100)
triggerall = target(1100),vel y > 0
triggerall = target(1100),pos y + 12*target(1100),vel y + 66*(0.25 + 0.05*target(1100),const(movement.yaccel)) = [-26,-10)
trigger1 = var(50) = 0 && var(49) = [5,9]
trigger2 = var(50) = 1 && var(49) = [2,3]
trigger3 = var(50) = 2 && var(49) = [5,9]
trigger4 = var(50) = 3 && var(49) = [25,39]
trigger5 = var(50) = 4 && var(49) = [50,69]
trigger6 = var(50) = 5 && var(49) = [20,20 + ceil(9*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger7 = var(50) = 6 && var(49) = [70,70 + ceil(9*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger8 = var(50) = 7 && var(49) = [20 + ceil(50*(1000*lifemax - 1000*life)/(1000*lifemax)),39 + ceil(40*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger9 = 0

;爆裂フルスイング(２塁打ぐらい)
[State -1]
type = ChangeState
value = 1160
triggerall = roundstate = 2 && var(59)
triggerall = var(30) = 1
triggerall = stateno = 1150
triggerall = animelemno(0) = 10
triggerall = numtarget(1100)
triggerall = target(1100),vel y > 0
triggerall = target(1100),pos y + 12*target(1100),vel y + 66*(0.25 + 0.05*target(1100),const(movement.yaccel)) = [-40,24)
trigger1 = var(50) = 0 && var(49) = [10,14]
trigger2 = var(50) = 1 && var(49) = [4,5]
trigger3 = var(50) = 2 && var(49) = [10,14]
trigger4 = var(50) = 3 && var(49) = [40,52]
trigger5 = var(50) = 4 && var(49) = [60,77]
trigger6 = var(50) = 5 && var(49) = [30,30 + ceil(9*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger7 = var(50) = 6 && var(49) = [80,80 + ceil(9*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger8 = var(50) = 7 && var(49) = [40 + ceil(40*(1000*lifemax - 1000*life)/(1000*lifemax)),49 + ceil(50*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger9 = 0

;爆裂フルスイング(１塁打ぐらい)
[State -1]
type = ChangeState
value = 1160
triggerall = roundstate = 2 && var(59)
triggerall = var(30) = 1
triggerall = stateno = 1150
triggerall = animelemno(0) = 10
triggerall = numtarget(1100)
triggerall = target(1100),vel y > 0
triggerall = target(1100),pos y + 12*target(1100),vel y + 66*(0.25 + 0.05*target(1100),const(movement.yaccel)) = [-55,-40]
trigger1 = var(50) = 0 && var(49) = [15,19]
trigger2 = var(50) = 1 && var(49) = [6,7]
trigger3 = var(50) = 2 && var(49) = [15,24]
trigger4 = var(50) = 3 && var(49) = [53,56]
trigger5 = var(50) = 4 && var(49) = 78
trigger6 = var(50) = 5 && var(49) = [40,40 + ceil(7*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger7 = var(50) = 6 && var(49) = [90,90 + ceil(8*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger8 = 0

;爆裂フルスイング(カス当たり)
[State -1]
type = ChangeState
value = 1160
triggerall = roundstate = 2 && var(59)
triggerall = var(30) = 1
triggerall = stateno = 1150
triggerall = animelemno(0) = 10
triggerall = numtarget(1100)
triggerall = target(1100),vel y > 0
triggerall = target(1100),pos y + 12*target(1100),vel y + 66*(0.25 + 0.05*target(1100),const(movement.yaccel)) = [-85,-55]
trigger1 = var(50) = 0 && var(49) = [20,24]
trigger2 = var(50) = 1 && var(49) = [6,7]
trigger3 = var(50) = 2 && var(49) = [25,34]
trigger4 = var(50) = 3 && var(49) = [57,59]
trigger5 = var(50) = 4 && var(49) = 79
trigger6 = var(50) = 5 && var(49) = [48,48 + ceil((1000*lifemax - 1000*life)/(1000*lifemax))]
trigger7 = var(50) = 6 && var(49) = 99
trigger8 = 0

;爆裂フルスイング(スカポンターン)
[State -1]
type = ChangeState
value = 1160
triggerall = roundstate = 2 && var(59)
triggerall = var(30) = 1
triggerall = stateno = 1150
triggerall = animelemno(0) = 10
triggerall = numtarget(1100)
triggerall = target(1100),vel y > 9
triggerall = target(1100),pos y + 12*target(1100),vel y + 66*(0.25 + 0.05*target(1100),const(movement.yaccel)) != [-100,20]
triggerall = random <= 85
trigger1 = var(50) = 0 && var(49) >=25
trigger2 = var(50) = 1 && var(49) >=10
trigger3 = var(50) = 2 && var(49) >=35
trigger4 = var(50) = 3 && var(49) >=60
trigger5 = var(50) = 4 && var(49) >=80
trigger6 = var(50) = 5
trigger6 = var(49) > 1 + ceil(18*(1000*lifemax - 1000*life)/(1000*lifemax))
trigger6 = var(49) != [20,20 + ceil(9*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger6 = var(49) != [30,30 + ceil(9*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger6 = var(49) != [40,40 + ceil(9*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger7 = var(50) = 6
trigger7 = var(49) > ceil(69*(1000*lifemax - 1000*life)/(1000*lifemax))
trigger7 = var(49) != [70,70 + ceil(9*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger7 = var(49) != [80,80 + ceil(9*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger7 = var(49) != [90,90 + ceil(9*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger8 = var(50) = 7 
trigger8 = var(49) > 19 + ceil(50*(1000*lifemax - 1000*life)/(1000*lifemax))
trigger8 = var(49) != [20 + ceil(50*(1000*lifemax - 1000*life)/(1000*lifemax)),39 + ceil(40*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger8 = var(49) != [40 + ceil(40*(1000*lifemax - 1000*life)/(1000*lifemax)),49 + ceil(50*(1000*lifemax - 1000*life)/(1000*lifemax))]
trigger9 = var(50) = 9 && var(49) > 29


;__________________________________________________________
;
;ヘルパー召喚
;__________________________________________________________

[State -3,真ん中]
type=helper
trigger1 = roundstate = 2
trigger1 = !NumHelper(40000)
trigger1 = alive
helpertype=normal
name="center"
stateno=40000
ID=40000
pos=160,400
postype = left
facing = 1
keyctrl=0
pausemovetime=2147483647
supermovetime=2147483647
persistent = 0

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


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

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

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

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


;--------------------------------------------------------------------------------------
[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=9999
supermovetime=9999
ignorehitpause = 1
persistent = 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
value = SCA
ignorehitpause = 1


;========================================================
;キャラ限コンボ用高さ調整
;========================================================
[state -3]
type = Null
trigger1 = enemynear(var(31)),authorname = "Warusaki3"
trigger1 = fvar(30) := 15
trigger2 = enemynear(var(31)),authorname = "GM"
trigger2 = enemynear(var(31)),name = "Alex" || enemynear(var(31)),name = "hugo"
trigger2 = fvar(30) := 15
trigger3 = enemynear(var(31)),authorname = "edogawa inpo"
trigger3 = enemynear(var(31)),name = "KIWAMI"
trigger3 = fvar(30) := 13
trigger4 = enemynear(var(31)),authorname = "S.Y.D"
trigger4 = enemynear(var(31)),name = "Athena Asamiya"
trigger4 = fvar(30) := 9
trigger5 = enemynear(var(31)),name = "Kung Fu Man"
trigger5 = fvar(30) := 15
trigger6 = enemynear(var(31)),authorname = "fxm508"
trigger6 = enemynear(var(31)),name = "Goenitz96"
trigger6 = fvar(30) := 17
trigger7 = enemynear(var(31)),authorname = "The Necromancer"
trigger7 = enemynear(var(31)),name = "[Necromancer's] Broli"
trigger7 = fvar(30) := 15

ignorehitpause = 1






;==========================================================
;☆消しちゃだめ、移動してもだめ、-3ステートに置いといて下さい
;==========================================================
[state -1]
type = varset
trigger1 = 1
var(26) = gametime
ignorehitpause = 1
;==========================================================













;AI用特殊ステート
;起き攻め近中攻撃２択
[statedef 311]
type    = S                      
movetype= A                      
physics = S                      
;juggle  = 1                      
;velset = 0,0 
ctrl = 0
sprpriority = 2

[state 300]
type = changestate
trigger1 = var(30) = 0
trigger1 = time = 0
value = stateno - 101

[state 310]
type = changeanim
trigger1 = anim != 310
value = 310

[state 200]
type = poweradd
trigger1 = animelem = 1
value = 15
ignoerhitpause = 1
persistent = 0

[state 3000]
type = varset
trigger1 = animelemno(0)<=3
var(20) = 310
ignorehitpause = 1

[state 3000]
type = varset
trigger1 = animelemno(0)>3
var(20) = 0
ignorehitpause = 1

ignorehitpause = 1
[State 200]
type = PlaySnd
trigger1 = Time = 1
value = 210,0

[State 300]
type = HitDef
trigger1 = animelemno(0) = [7,8]
trigger1 = !movecontact && !movereversed
trigger1 = var(0) = 1
trigger1 = var(21) = 0
attr = S, NA
id = 310 
damage = ceil(56 * fvar(0))
animtype = Medium
guardflag = M
getpower = 60,20
givepower = 30,10
priority = 3, Hit
pausetime = 9,12
sparkno = S7001
guard.sparkno = S7007
sparkxy = -15, -60
hitsound = S210, 1
guardsound = S120, 0
ground.type = High
ground.slidetime = 14
guard.ctrltime = 12
ground.hittime  = 14
ground.velocity = -4
air.type = High
air.velocity = -3.5,-3
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(50 * fvar(1) * 0.75) + 12
air.cornerpush.veloff    = 0
airguard.cornerpush.veloff= 0

[state 3000]
type = varset
trigger1 = !var(21)
var(21) = ifelse(movecontact>0,1,0)
ignorehitpause = 1

[state 200]
type = varset
triggerall = P2MoveType = H
trigger1 = movehit
fvar(1) = fvar(1) * 0.92 * (1 - 0.08*(0.92*fvar(1)>1.00000))
ignorehitpause = 1
persistent = 0


[State 200]
type = ChangeState
trigger1 = movecontact
trigger1 = random < 300
value = 1110
ctrl = 0

[State 200]
type = ChangeState
trigger1 = movecontact
value = 315
ctrl = 0

[State 200]
type = ChangeState
trigger1 = AnimTime = 0
value = 1100
ctrl = 0
