下段をガードするための記述
;---------------------------------------------------------------------------
; STAND GUARD (guarding)
[Statedef 130]
type    = S
physics = S

[State 130, 1]
type = ChangeAnim
trigger1 = Anim != 130
value = 130

[State 130, Hi to Lo]; 
type = ChangeState
trigger1 = var(30) = 0
trigger1 = command = "holddown"
trigger2 = var(30) > 1
trigger2 = var(58) = 0
trigger2 = p2dist X < 100 && p2statetype = C
value = 131

[State 130, Stop Guarding]
type = ChangeState
triggerall = var(56) = 0
trigger1 = var(30) = 0
trigger1 = command != "holdback"
trigger2 = !inguarddist
trigger3 = var(30) >= 30
trigger3 = var(54) = 1
trigger4 = var(58) = 1
value = 140

;---------------------------------------------------------------------------
; CROUCH GUARD (guarding)
[Statedef 131]
type    = C
physics = C

[State 131, 1]
type = ChangeAnim
trigger1 = Anim != 131
value = 131

[State 131, Lo to Hi];
type = ChangeState
trigger1 = var(30) = 0
trigger1 = command != "holddown"
trigger2 = var(30) > 1
trigger2 = var(58) = 0
trigger2 = p2dist X < 100 && p2statetype = S && time = 3
value = 130

[State 131, Stop Guarding];
type = ChangeState
triggerall = var(56) = 0
trigger1 = var(30) = 0
trigger1 = command != "holdback"
trigger2 = !inguarddist
trigger3 = var(30) >= 1
trigger3 = var(54) = 1
trigger4 = var(58) = 1
value = 140

;---------------------------------------------------------------------------
; AIR GUARD (guarding)
[Statedef 132]
type    = A
physics = N

[State 132, 1]
type = ChangeAnim
trigger1 = Anim != 132
value = 132

[State 132, 2]
type = VelAdd
trigger1 = 1
y = Const(movement.yaccel)

[State 132, 3]
type = VarSet
trigger1 = 1
sysvar(0) = (pos y >= 0) && (vel y > 0)

[State 132, 4]
type = VelSet
trigger1 = sysvar(0)
y = 0

[State 132, 5]
type = PosSet
trigger1 = sysvar(0)
y = 0

[State 132, 6]
type = ChangeState
trigger1 = sysvar(0)
trigger1 = command = "holdback"
trigger1 = inguarddist
value = 130

[State 132, 7]
type = ChangeState
trigger1 = sysvar(0)
value = 52

[State 132, Stop Guarding]
type = ChangeState
trigger1 = command != "holdback"
trigger2 = !inguarddist
trigger3 = var(30) >= 1
trigger3 = enemynear,HitDefAttr = SCA, NT, ST, HT
value = 140


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

;---------------------------------------------------------------------------
; ここから下は-3のステートを書いてください、ここに書いたものはゲーム中
; に条件が成立すればいつでも開始するステートです。
;---------------------------------------------------------------------------

[Statedef -3]


[State -3]
type = Varset
trigger1 = Statetype != A
var(1) = 0

[State -3]
type = Varset
trigger1 = Statetype != A
var(2) = 0


;AI---------------------------------------------------
[State -3]
type = Varset
triggerall = var(30) != 30
trigger1 = command = "CPU1"
trigger2 = command = "CPU2"
trigger3 = command = "CPU3"
trigger4 = command = "CPU4"
trigger5 = command = "CPU5"
trigger6 = command = "CPU6"
trigger7 = command = "CPU7"
trigger8 = command = "CPU8"
trigger9 = command = "CPU9"
trigger10 = command = "CPU10"
trigger11 = command = "CPU11"
trigger12 = command = "CPU12"
trigger13 = command = "CPU13"
trigger14 = command = "CPU14"
trigger15 = command = "CPU15"
v = 59
value = 30


;立ちＡ
[State -3,1]
type = ChangeState
value = 9200
triggerall = var(59) = 30
triggerall   = statetype    = S       ; Standing
trigger1   = ctrl
trigger1   = p2statetype  = A       ; Not Lie down
trigger1   = p2statetype != L       ; Not Lie down
trigger1   = p2bodydist X < 10     ; Near P2>
trigger1   = p2bodydist X > 1      ; Near P2>
trigger1   = p2bodydist Y < -5      
trigger1   = p2bodydist Y > -30 
trigger1   = statetype    = S       ; Standing
Trigger1 = Random = [0,500]


;立ちB
[State -3,1]
type = ChangeState
value = 9210
triggerall = var(59) = 30
triggerall   = statetype    = S       ; Standing
trigger1   = ctrl
trigger1   = p2statetype  = A       ; Not Lie down
trigger1   = p2statetype != L       ; Not Lie down
trigger1   = p2bodydist X < 60     ; Near P2>
trigger1   = p2bodydist X > 20      ; Near P2>
trigger1   = p2bodydist Y < -5      
trigger1   = p2bodydist Y > -30 
Trigger1 = Random = [0,600]


;対空行動
[State -3,1]
type = ChangeState
value = 10000
triggerall = var(59) = 30
triggerall = statetype != A
triggerall = p2life > 0 
trigger1   = ctrl
trigger1   = p2statetype  = A       ; Not Lie down
trigger1   = p2statetype != L       ; Not Lie down
trigger1   = p2bodydist X < 20     ; Near P2>
trigger1   = p2bodydist X > 1      ; Near P2>
trigger1   = p2bodydist Y < -30      
trigger1   = p2bodydist Y > -70 
trigger1   = statetype    = S       ; Standing
Trigger1 = Random = [0,400]
trigger2   = stateno = 9420
trigger2   = movehit


[State -3,1]
type = ChangeState
value = 10001
triggerall = var(59) = 30
trigger1   = stateno = 10000
trigger1   = movehit  

[State -3,1]
type = ChangeState
value = 10002
triggerall = var(30) = 30
trigger1   = stateno = 10001
trigger1   = movehit 
Trigger1 = Random = [0,200]

[State -3,1]
type = ChangeState
value = 10003
triggerall = var(59) = 30
trigger1   = stateno = 10001
trigger1   = movehit 
Trigger1 = Random = [200,400]

[State -3,1]
type = ChangeState
value = 10005
triggerall = var(59) = 30
trigger1   = stateno = 10001
trigger1   = movehit 

[State -3,1]
type = ChangeState
value = 10020
triggerall = var(59) = 30
triggerall = power >= 1000
trigger1   = stateno = 10005
trigger1   = movehit 


;連携---------------------------------------------------

[State -3,1]
type = ChangeState
value = 9400
triggerall = var(59) = 30
triggerall = statetype != A
trigger1   = ctrl
trigger1   = p2statetype != A       ; Not Lie down
trigger1   = p2statetype != L       ; Not Lie down
trigger1   = P2movetype  != A       ; Not in Attack
trigger1   = p2bodydist X < 15     ; Near P2>
trigger1   = p2bodydist X > 0     ; Near P2>


[State -3,1]
type = ChangeState
value = 9410
triggerall = var(59) = 30
triggerall = statetype != A
trigger1   = ctrl
trigger1   = p2statetype != A       ; Not Lie down
trigger1   = p2statetype != L       ; Not Lie down
trigger1   = P2movetype  != A       ; Not in Attack
trigger1   = p2bodydist X < 60     ; Near P2>
trigger1   = p2bodydist X > 14     ; Near P2>
trigger2   = stateno = 9400
trigger2   = movecontact


;しゃがみＣ
[State -3,1]
type = ChangeState
value = 9420
triggerall = var(59) = 30
trigger1   = stateno = 9410
trigger1   = movehit

;立ちＣ
[State -3,1]
type = ChangeState
value = 9211
triggerall = var(59) = 30
trigger1   = stateno = 9410
trigger1   = moveguarded

;立ちＣ
[State -3,1]
type = ChangeState
value = 10013
triggerall = var(59) = 30
trigger1   = stateno = 9211
trigger1   = movehit


;立ちＣ
[State -3,1]
type = ChangeState
value = 10014
triggerall = var(59) = 30
trigger1   = stateno = 9211
trigger1   = moveguarded


;カカト
[State -3,1]
type = ChangeState
value = 10011
triggerall = var(59) = 30
trigger1   = stateno = 10014
trigger1   = time = 15
trigger2   = stateno = 10013
trigger2   = movecontact


;ハイプレッシャー
[State -3,1]
type = ChangeState
value = 10015
triggerall = var(59) = 30
trigger1   = stateno = 10012
trigger1   = time = 1


[State -3,1]
type = ChangeState
value = 9600
triggerall = var(59) = 30
triggerall = statetype = A
trigger1   = ctrl
trigger1   = p2statetype = A       ; Not Lie down
trigger1   = p2statetype != L       ; Not Lie down
trigger1   = P2movetype  != A       ; Not in Attack
trigger1   = p2bodydist X < 13     ; Near P2>
trigger1   = p2bodydist X > 0     ; Near P2>



[State -3,1]
type = ChangeState
value = 9610
triggerall = var(59) = 30
triggerall = statetype = A
trigger1   = ctrl
trigger1   = p2statetype = A       ; Not Lie down
trigger1   = p2statetype != L       ; Not Lie down
trigger1   = P2movetype  != A       ; Not in Attack
trigger1   = p2bodydist X < 55     ; Near P2>
trigger1   = p2bodydist X > 0     ; Near P2>


;空ダ
[State -3]
type = ChangeState
value = 234
triggerall = var(59) = 30
triggerall   = p2bodydist Y < 65      
triggerall   = p2bodydist Y > 50    
trigger1 = statetype = A
trigger1 = p2statetype = S


[State -3,1]
type = ChangeState
value = 9620
triggerall = var(30) = 30
triggerall = statetype = A
trigger1   = stateno = 234
trigger1   = time = 16


[State -3,立ちガード]
Type = ChangeState
Value = 130
TriggerAll = var(59) = 30
TriggerAll = StateType != A
Triggerall = inguarddist
Trigger1 = Ctrl 
Trigger1 = p2Statetype != C
trigger2 = stateno = 10000
Trigger1 = Random = [0,900]


     
[State -3,しゃがみガード]
Type = ChangeState
value = 131
Triggerall = var(59) = 30
TriggerAll = StateType != A
TriggerAll = Ctrl
trigger1 = p2StateType = C
Trigger1 = inguarddist
Trigger1 = Random = [0,600]


[State -3,空中ガード]
Type = ChangeState
value = 132
Triggerall = var(59) = 30
TriggerAll = StateType = A
TriggerAll = Ctrl
Trigger1 = inguarddist
