;---------------------------------------------------------------------------
;AI行動用
[Statedef 7050];近距離
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air

[State 200, 7]
type = ChangeState
trigger1 = 1
value = 200
ctrl = 0
;---------------------------------------------------------------------------
;AI行動用
[Statedef 7051];近距離
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air

[State 200, 7]
type = ChangeState
trigger1 = 1
value = 201
ctrl = 0
;---------------------------------------------------------------------------
;AI行動用
[Statedef 7052];近距離
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air

[State 200, 7]
type = ChangeState
trigger1 = 1
value = 202
ctrl = 0
;---------------------------------------------------------------------------
;AI行動用
[Statedef 7053];近距離
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air

[State 200, 7]
type = ChangeState
trigger1 = 1
value = 203
ctrl = 0
;---------------------------------------------------------------------------
;AI行動用
[Statedef 7054];遠距離
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air

[State 200, 7]
type = ChangeState
trigger1 = 1
value = 210
ctrl = 0
;---------------------------------------------------------------------------
;AI行動用
[Statedef 7055];遠距離
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air

[State 200, 7]
type = ChangeState
trigger1 = 1
value = 211
ctrl = 0
;---------------------------------------------------------------------------
;AI行動用
[Statedef 7056];遠距離
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air

[State 200, 7]
type = ChangeState
trigger1 = 1
value = 212
ctrl = 0
;---------------------------------------------------------------------------
;AI行動用
[Statedef 7057];遠距離
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air

[State 200, 7]
type = ChangeState
trigger1 = 1
value = 213
ctrl = 0
;---------------------------------------------------------------------------
;AI行動用
[Statedef 7060];近距離
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air

[State 200, 7]
type = ChangeState
trigger1 = 1
value = 300
ctrl = 0
;---------------------------------------------------------------------------
;AI行動用
[Statedef 7061];近距離
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air

[State 200, 7]
type = ChangeState
trigger1 = 1
value = 310
ctrl = 0
;---------------------------------------------------------------------------
;AI行動用
[Statedef 7062];近距離
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air

[State 200, 7]
type = ChangeState
trigger1 = 1
value = 320
ctrl = 0
;---------------------------------------------------------------------------
;AI行動用
[Statedef 7063];近距離
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air

[State 200, 7]
type = ChangeState
trigger1 = 1
value = 330
ctrl = 0
;---------------------------------------------------------------------------
; ここから下は-3のステートを書いてください、ここに書いたものはゲーム中
; に条件が成立すればいつでも開始するステートです。
;---------------------------------------------------------------------------

[Statedef -3]

[State -3]
type = Varset
trigger1=!ishelper
trigger2=ishelper
sysfvar(0) = gametime+123456789
ignorehitpause = 1
;━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[State -3, AIフラグセット]
type = VarSet
triggerall = !var(59)
triggerall = RoundState = [1,2]
triggerall = !Ishelper
trigger1 = Command = "AI0"
trigger2 = Command = "AI1"
trigger3 = Command = "AI2"
trigger4 = Command = "AI3"
trigger5 = Command = "AI4"
trigger6 = Command = "AI5"
trigger7 = Command = "AI6"
trigger8 = Command = "AI7"
trigger9 = Command = "AI8"
trigger10 = Command = "AI9"
trigger11 = Command = "AI10"
trigger12 = Command = "AI11"
trigger13 = Command = "AI12"
trigger14 = Command = "AI13"
trigger15 = Command = "AI14"
trigger16 = Command = "AI15"
trigger17 = Command = "AI16"
trigger18 = Command = "AI17"
trigger19 = Command = "AI18"
trigger20 = Command = "AI19"
trigger21 = Command = "AI20"
trigger22 = Command = "AI21"
trigger23 = Command = "AI22"
trigger24 = Command = "AI23"
trigger25 = Command = "AI24"
trigger26 = Command = "AI25"
trigger27 = Command = "AI26"
trigger28 = Command = "AI27"
trigger29 = Command = "AI28"
trigger30 = Command = "AI29"
trigger31 = Command = "AI30"
trigger32 = Command = "AI31"
trigger33 = Command = "AI32"
trigger34 = Command = "AI33"
trigger35 = Command = "AI34"
trigger36 = Command = "AI35"
trigger37 = Command = "AI36"
trigger38 = Command = "AI37"
trigger39 = Command = "AI38"
trigger40 = Command = "AI39"
trigger41 = Command = "AI40"
trigger42 = Command = "AI41"
trigger43 = Command = "AI42"
trigger44 = Command = "AI43"
trigger45 = Command = "AI44"
trigger46 = Command = "AI45"
trigger47 = Command = "AI46"
trigger48 = Command = "AI47"
trigger49 = Command = "AI48"
trigger50 = Command = "AI49"
trigger51 = Command = "AI50"
trigger52 = Command = "AI51"
trigger53 = Command = "AI52"
trigger54 = Command = "AI53"
trigger55 = Command = "AI54"
trigger56 = Command = "AI55"
trigger57 = Command = "AI56"
trigger58 = Command = "AI57"
trigger59 = Command = "AI58"
trigger60 = Command = "AI59"
trigger61 = Command = "AI60"
trigger62 = var(25)
var(59) = 11;AIレベル　強い11←→1弱い　11だと超反応あり。

[State -3];変数設定
Type=varset
triggerall=!ishelper
Trigger1=RoundState>=3
trigger2=!alive
var(59)=0
;━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

[State -3, 敵のＩＤ調べ]
type = VarSet
triggerall = !IsHelper && var(59) != -1
trigger1 = NumEnemy = 1
var(2) = EnemyNear,ID
ignorehitpause = 1
pausemovetime = 2147483647
supermovetime = 2147483647

[State -3, 敵のＩＤ調べ]
type = VarSet
triggerall = !IsHelper && var(59) != -1
trigger1 = NumEnemy = 2
var(2) = IfElse(EnemyNear(0),Alive,EnemyNear(0),ID,EnemyNear(1),ID)
ignorehitpause = 1
pausemovetime = 2147483647
supermovetime = 2147483647

[State -3, 敵のＩＤ調べ]
type = VarSet
triggerall = !IsHelper && var(59) != -1
trigger1 = NumEnemy = 1
var(2) = EnemyNear,ID
ignorehitpause = 1

[State -3, 敵のＩＤ調べ]
type = VarSet
triggerall = !IsHelper && var(59) != -1
trigger1 = NumEnemy = 2
var(2) = IfElse(EnemyNear(0),Alive,EnemyNear(0),ID,EnemyNear(1),ID)
ignorehitpause = 1

[State ,varbodydist1]
Type = null
triggerall = !IsHelper && var(59) != -1
TriggerAll = PlayerIDEXist(var(2))
Trigger1=1||fvar(26):=Ifelse((PlayerID(var(2)),StateType!=A),Ifelse((Pos X<=PlayerID(var(2)),Pos X^^PlayerID(var(2)),Facing=1),(PlayerID(var(2)),Const(Size.Ground.Front)),(PlayerID(var(2)),Const(Size.Ground.back))),0);地上
Trigger1=1||fvar(26):=Ifelse((PlayerID(var(2)),StateType=A),Ifelse((Pos X<=PlayerID(var(2)),Pos X^^PlayerID(var(2)),Facing=1),(PlayerID(var(2)),Const(Size.Air.Front)),(PlayerID(var(2)),Const(Size.Air.back))),fvar(26));空中
Trigger1=1||fvar(15):=((Pos X-PlayerID(var(2)),Pos X)*Facing*-1);相手までの距離
Trigger1=1||fvar(15):=fvar(15)-fvar(26)*Ifelse(fvar(15)>0,1,-1);キャラ幅加算
Trigger1=1||fvar(15):=fvar(15)-Ifelse((StateType!=A),Const(Size.Ground.Front),Const(Size.Air.Front))
Trigger1=1||fvar(16):=(PlayerID(var(2)),Pos Y-Pos Y);P2BodyDist Y、もしくはP2Dist Yの代わり
ignorehitpause = 1
;━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
;super skill
[State -3]
type = ChangeState
value = 7060+random%4
triggerall = Var(59)
triggerall = statetype != A
triggerall = var(56) >= 1000
triggerall = ctrl = 1
trigger1 = Random <= 800
value = 1000
;━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[State -3]
type = ChangeState
value = 7050+random%5
triggerall = Var(59)
triggerall = statetype != A
triggerall = var(56) <= 999
triggerall = ctrl = 1
triggerall = fvar(15) <= Floor(66 * const(size.xscale))
trigger1 = Random <= 800
value = 1000
;━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[State -3]
type = ChangeState
value = 7054+random%4
triggerall = Var(59)
triggerall = statetype != A
triggerall = var(56) <= 999
triggerall = ctrl = 1
triggerall = fvar(15) >= Floor(66 * const(size.xscale))
trigger1 = Random <= 800
value = 1000
