;---------------------------------------------------------------------------
[Statedef 4444]
Type = A
Physics = N
Velset = 0,0
SprPriority = 5
Anim = 0

;--------------------------------------------------------------------------------------------------------------
;ここからAI設定

[State 4444]
Type = VarSet
Trigger1 = Parent,Var(59)>0
;**************************************************************************************************************
;AIレベル設定
;ここを数値を変えるとAIレベルが変化
;1〜10まで設定可
var(59)=10
;**************************************************************************************************************

[State 4444,バカキャンフラグ]
Type = VarSet
TriggerAll = Var(59)>0
Trigger1 = 1
;**************************************************************************************************************
;ここの値を変化させるとバカキャンをしたりしなかったりする。
;1でバカキャンする、0でしない
;ちなみに、ここの値を変える以前にAIレベルが9以上でないとバカキャンはしません
var(58)=1 
;**************************************************************************************************************
IgnoreHitPause=1

;以上
;--------------------------------------------------------------------------------------------------------------

[State 4444,Aスワンスカりフラグ]
Type = VarSet
TriggerAll = Parent,Var(59)>0
Trigger1 = Parent,StateNo=13300
Trigger1 = Parent,time=1
Trigger1 = EnemyNear(Parent,Var(57)),MoveType=H
Trigger1 = EnemyNear(Parent,Var(57)),StateNo!=[120,159]
var(37)=-1

[State 4444,Aスワンスカりフラグ解除]
Type = VarSet
TriggerAll = Parent,Var(59)>0
Trigger1 = Var(37)=-1
Trigger1 = Parent,StateNo=13300
Trigger1 = Parent,Ctrl
var(37)=0

[State 4444,5Cディレイ判定]
Type = VarAdd
TriggerAll = Parent,Var(59)>0
Trigger1 = Parent,StateNo=13300
Trigger1 = Parent,Ctrl
var(38)=1

[State 4444,5Cディレイ判定解除]
Type = VarSet
TriggerAll = Parent,Var(59)>0
Trigger1 = Parent,StateNo!=13300
var(38)=0

[State 4444,エリアルフラグ]
Type = VarSet
TriggerAll = Parent,Var(59)>0
Trigger1 = Parent,StateNo=39
Trigger1 = Parent,PrevStateNo=210 || Parent,PrevStateNo=220
Trigger2 = Parent,Var(2)/1000%10=1
Trigger2 = Parent,StateNo=[600,620]
Trigger3 = Parent,StateNo=6355
var(39)=1

[State 4444,エリアルフラグ解除]
Type = VarSet
TriggerAll = Parent,Var(59)>0
Trigger1 = EnemyNear(Parent,Var(57)),MoveType!=H
var(39)=0

[State 4444,行動記憶]
Type = VarSet
TriggerAll = Parent,Var(59)>0
Trigger1 = Parent,StateNo=2100
Trigger2 = Parent,StateNo=930
var(40)=Parent,StateNo

[State 4444,行動記憶(カウンター)]
Type = VarSet
TriggerAll = Parent,Var(59)>0
Trigger1 = NumExplod(20000)!=0
Trigger2 = NumExplod(20001)!=0
var(40)=Parent,StateNo

[State 4444,行動記憶]
Type = VarSet
TriggerAll = Parent,Var(59)>0
Trigger1 = Parent,StateNo!=400
Trigger1 = Parent,PrevStateNo=400
Trigger2 = Parent,StateNo!=600
Trigger2 = Parent,PrevStateNo=600
var(40)=Parent,PrevStateNo

[State 4444,行動記憶解除]
Type = VarSet
TriggerAll = Parent,Var(59)>0
Trigger1 = EnemyNear(Parent,Var(57)),MoveType!=H
var(40)=0


















[State 4444,置き攻めフラグ]
Type = VarSet
TriggerAll = Parent,Var(59)>0
Trigger1 = EnemyNear(Parent,Var(57)),StateType=L
Trigger1 = EnemyNear(Parent,Var(57)),StateNo=5120
Trigger1 = EnemyNear(Parent,Var(57)),time=1
var(46)=Random%3
IgnoreHitPause=1

[State 4444,相手の攻撃判定発生経過時間]
Type = VarAdd
TriggerAll = Parent,Var(59)>0
Trigger1 = EnemyNear(Parent,Var(57)),MoveType=A
Trigger1 = EnemyNear(Parent,Var(57)),HitDefAttr = SCA,NA,SA,HA
var(47)=1
IgnoreHitPause=1

[State 4444,Var(47)解除]
Type = VarSet
TriggerAll = Parent,Var(59)>0
Trigger1 = EnemyNear(Parent,Var(57)),time=1
var(47)=0
IgnoreHitPause=1

[State 4444,LA,ADDフラグ]
Type = VarSet
Trigger1 = Parent,Var(59)>0
Trigger1 = Parent,Var(13)=-1
Trigger1 = Var(48)=0
var(48)=IfElse(Random%2=0,1,2)

[State 4444,Var(48)解除]
Type = VarSet
Trigger1 = Parent,Var(59)>0
Trigger1 = Parent,Var(13)!=-1
Trigger1 = Var(48)!=0
var(48)=0

[State 4444,Var解除]
Type = VarSet
TriggerAll = Parent,Var(59)>0
Trigger1 = EnemyNear(Parent,Var(57)),Ctrl
Trigger2 = 0;EnemyNear(Parent,Var(57)),StateNo=6201 || EnemyNear(Parent,Var(57)),StateNo=6211 || EnemyNear(Parent,Var(57)),StateNo=6221
Trigger2 = EnemyNear(Parent,Var(57)),Name="UNKNOWN"
Trigger2 = EnemyNear(Parent,Var(57)),AutHorName="586"
var(49)=0
IgnoreHitPause=1

[State 4444,AI殺し判定]
Type = VarSet
TriggerAll = Parent,Var(59)>0
Trigger1 = EnemyNear(Parent,Var(57)),StateNo=3000
Trigger1 = EnemyNear(Parent,Var(57)),Name="Nrvnqsr_Chaos"
var(49)=1
IgnoreHitPause=1

[State 4444,AI殺し判定]
Type = VarSet
TriggerAll = Parent,Var(59)>0
TriggerAll = EnemyNear(Parent,Var(57)),Name="UNKNOWN"
TriggerAll = EnemyNear(Parent,Var(57)),AutHorName="hanma"
Trigger1 = EnemyNear(Parent,Var(57)),StateNo=3100
Trigger2 = EnemyNear(Parent,Var(57)),StateNo=3120
Trigger3 = EnemyNear(Parent,Var(57)),StateNo=3140
var(49)=2
IgnoreHitPause=1

[State 4444,AI殺し判定]
Type = VarSet
TriggerAll = Parent,Var(59)>0
TriggerAll = EnemyNear(Parent,Var(57)),Name="UNKNOWN"
TriggerAll = EnemyNear(Parent,Var(57)),AutHorName="586"
Trigger1 = EnemyNear(Parent,Var(57)),StateNo=6200
Trigger2 = EnemyNear(Parent,Var(57)),StateNo=6210
Trigger3 = EnemyNear(Parent,Var(57)),StateNo=6220
var(49)=3
IgnoreHitPause=1

[State 4444,AI殺し判定]
Type = VarSet
TriggerAll = Parent,Var(59)>0
TriggerAll = EnemyNear(Parent,Var(57)),Name="Tohno_Shiki"
Trigger1 = EnemyNear(Parent,Var(57)),StateNo=3000
Trigger2 = EnemyNear(Parent,Var(57)),StateNo=3050
var(49)=4
IgnoreHitPause=1

[State 4444,AI殺し判定]
Type = VarSet
TriggerAll = Parent,Var(59)>0
Trigger1 = EnemyNear(Parent,Var(57)),StateNo=3002
Trigger1 = EnemyNear(Parent,Var(57)),Name="Nrvnqsr_Chaos"
var(49)=0
IgnoreHitPause=1

[State 4444,相手のVelAddを計算(X軸)]
Type = VarSet
Trigger1 = 1
fvar(4)=EnemyNear(Parent,Var(57)),Vel X-fvar(5)

[State 4444,相手のVelAddを計算の補助]
Type = VarSet
Trigger1 = 1
fvar(5)=EnemyNear(Parent,Var(57)),Vel X

[State 4444,相手のVelAddを計算(Y軸)]
Type = VarSet
Trigger1 = 1
fvar(14)=EnemyNear(Parent,Var(57)),Vel Y-fvar(15)

[State 4444,相手のVelAddを計算の補助]
Type = VarSet
Trigger1 = 1
fvar(15)=EnemyNear(Parent,Var(57)),Vel Y

[State 4444,Facing]
Type = VarSet
Trigger1 = 1
var(44) = -(Parent,Facing)*(EnemyNear(Parent,Var(57)),Facing)
IgnoreHitPause=1

[State 4444,相手摩擦係数]
Type = VarSet
Trigger1 = 1
fvar(9) = IfElse(P2StateType=C,(EnemyNear(Parent,Var(57)),Const(movement.crouch.friction)),(EnemyNear(Parent,Var(57)),Const(movement.stand.friction)))
IgnoreHitPause=1











;めくりガード対応ヘルパー
[State 4444,防御用ヘルパー位置設定]
Type = PosSet
Trigger1 = 1
X = Ceil(EnemyNear(Parent,Var(57)),Pos X)-10*Facing
Y = Ceil(EnemyNear(Parent,Var(57)),Pos Y)
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 4444,防御用ヘルパー向き設定]
Type = Turn
Trigger1 = Facing = EnemyNear(Parent,Var(57)),Facing
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 4444]
Type = NotHitBy
Trigger1 = 1
Value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time = 1
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 4444]
Type = AssertSpecial
Trigger1 = 1
Flag = Invisible
Flag2 = Noshadow
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999

