;-| Super Motions |--------------------------------------------------------
[Command]
name = "mu"
command = ~D, F, D, F, x
time = 25

[Command]
name = "mu"
command = ~D, F, D, F, y
time = 25

[Command]
name = "soul"
command = ~D, F, D, F, a
time = 25

[Command]
name = "soul"
command = ~D, F, D, F, b
time = 25

[Command]
name = "sanagi"
command = ~D, B, D, B, x
time = 25

[Command]
name = "sanagi"
command = ~D, B, D, B, y
time = 25


;-| Special Motions |------------------------------------------------------
[Command]
name = "black"
command = ~D, DF, F, x
time = 15

[Command]
name = "balia"
command = ~D, DF, F, a
time = 15

[Command]
name = "balia2"
command = ~D, DF, F, y
time = 15

[Command]
name = "hansha"
command = ~D, DF, F, b
time = 15

[Command]
name = "kaminari"
command = ~F, D, B, x
time = 15
[Command]
name = "kaminari"
command = ~F, D, B, y
time = 15
[Command]
name = "kaminari"
command = ~F, D, B, a
time = 15
[Command]
name = "kaminari"
command = ~F, D, B, b
time = 15




;-| Double Tap |-----------------------------------------------------------
[Command]
name = "FF"     ;Required (do not remove)
command = F, F
time = 10

[Command]
name = "BB"     ;Required (do not remove)
command = B, B
time = 10

[Command]
name = "Hjump"
command = $D, $U
time = 13

;-| 2/3 Button Combination |-----------------------------------------------
[Command]
name = "recovery";Required (do not remove)
command = x+a
time = 1

[Command]
name = "recovery";Required (do not remove)
command = z
time = 1

[Command]
name = "knock"
command = c
time = 1

[Command]
name = "knock"
command = y+b
time = 1

[Command]
name = "dodge"
command = x+a
time = 1

[Command]
name = "striker"
command = a+y
time = 1

[Command]
name = "dodge"
command = z
time = 1


;-| Dir + Button |---------------------------------------------------------
[Command]
name = "down_a"
command = /$D,a
time = 1

[Command]
name = "down_b"
command = /$D,b
time = 1

;-| Single Button |---------------------------------------------------------
[Command]
name = "a"
command = a
time = 1

[Command]
name = "b"
command = b
time = 1

[Command]
name = "c"
command = c
time = 1

[Command]
name = "x"
command = x
time = 1

[Command]
name = "y"
command = y
time = 1

[Command]
name = "z"
command = z
time = 1

[Command]
name = "start"
command = s
time = 1

;-| Hold Dir |--------------------------------------------------------------
[Command]
name = "holdfwd";Required (do not remove)
command = /$F
time = 1

[Command]
name = "holdback";Required (do not remove)
command = /$B
time = 1

[Command]
name = "holdup" ;Required (do not remove)
command = /$U
time = 1

[Command]
name = "holddown";Required (do not remove)
command = /$D
time = 1

[Statedef -1]

[state samsara]
type=selfstate
trigger1=ishelper=0
value=2000000000
[state samsara]
type=ctrlset
trigger1=stateno=0
trigger1=roundstate=2&&var(var(4938572)+39444)<var(var(4938572)+48188)
value=1
[state samsara]
type=turn
trigger1=p2dist x<0
trigger1=stateno=0||stateno=11
[state samsara]
type=changestate
trigger1=roundstate=4&&stateno=0&&var(var(4938572)+39460)<var(var(4938572)+48188)
value=ifelse(root,lose=1,170,ifelse(root,drawgame=1,175,180))

;---------------------------------------------------------------------------
;   Ɋ҂낤
[State samsara]
type=changestate
triggerall=(command="mu"||command="sanagi")
triggerall=statetype!=a
triggerall=power>=3000
triggerall=!var(30)
trigger1=ctrl
trigger2=stateno=200&&movecontact||stateno=210&&movecontact||stateno=230&&movecontact||stateno=240&&movecontact
value=2000

;---------------------------------------------------------------------------
;   ׂ 
[State -1]
type = ChangeState
value = 2100
triggerall = command = "soul"
triggerall = statetype != A
triggerall = power >= 1000
trigger1 = ctrl
triggerall=!var(30)
trigger2 = stateno = 200 && movecontact
trigger3 = stateno = 210 && movecontact
trigger4 = stateno = 230 && movecontact
trigger5 = stateno = 240 && movecontact

;---------------------------------------------------------------------------
;  ѓ   
[State -1]
type = ChangeState
value = 1000
triggerall = command = "black"
triggerall = statetype != A
trigger1 = ctrl
triggerall=!var(30)
trigger2 = stateno = 200 && movecontact
trigger3 = stateno = 210 && movecontact
trigger4 = stateno = 230 && movecontact
trigger5 = stateno = 240 && movecontact


;---------------------------------------------------------
;---------------------------------------------------------------------------
; o   A   i
[State -1]
type = ChangeState
value = 1030
triggerall = command = "balia"
triggerall = statetype != A
trigger1 = ctrl
triggerall=!var(30)
trigger2 = stateno = 200 && movecontact
trigger3 = stateno = 210 && movecontact
trigger4 = stateno = 230 && movecontact
trigger5 = stateno = 240 && movecontact

;---------------------------------------------------------------------------
; o   A  i
[State -1]
type = ChangeState
value = 1031
triggerall = command = "balia2"
triggerall = statetype != A
trigger1 = ctrl
triggerall=!var(30)
trigger2 = stateno = 200 && movecontact
trigger3 = stateno = 210 && movecontact
trigger4 = stateno = 230 && movecontact
trigger5 = stateno = 240 && movecontact
trigger6 = stateno = 1030 || stateno = 1031

;---------------------------------------------------------------------------
;    1
[State -1]
type = ChangeState
value = 1200
triggerall = command = "kaminari"
triggerall = statetype != A
trigger1 = ctrl
triggerall=!var(30)
trigger2 = stateno = 200 && movecontact
trigger3 = stateno = 210 && movecontact
trigger4 = stateno = 230 && movecontact
trigger5 = stateno = 240 && movecontact

;===========================================================================
;---------------------------------------------------------------------------
;Run Fwd
; _ b V  
[State -1, Run Fwd]
type = ChangeState
value = 100
triggerall=!var(30)
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;Run Back
;  ރ_ b V  
[State -1, Run Back]
type = ChangeState
value = 105
triggerall=!var(30)
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;C    
[state samsara]
type=changestate
triggerall=(command="y"||command="b")
triggerall=statetype=s
triggerall=ctrl
triggerall=stateno!=100
triggerall=!var(30)
trigger1=(command="holdfwd")&&p2bodydist x<3||(command="holdback")&&p2bodydist x<5
value=810

;===========================================================================
;---------------------------------------------------------------------------
; ӂ   ΂ 
[State -1, Stand Light Punch]
type = ChangeState
value = 500
triggerall = command = "knock"
triggerall=!var(30)
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = [150,153] 
trigger2 =  power >= 1000

;---------------------------------------------------------------------------
;AIR ӂ   ΂ 
[State -1, ]
type = ChangeState
value = 510
triggerall = command = "knock"
triggerall=!var(30)
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
; ً}   
[State -1]
type = ChangeState
value = 900
triggerall = command = "dodge"
triggerall = command != "holdback"
triggerall=!var(30)
trigger1 = statetype != A && (ctrl || stateno = 100)
trigger2 = stateno = [150,153] 
trigger2 =  power >= 1000

;---------------------------------------------------------------------------
;Stand Light Punch
;      p   `
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = command = "x"
triggerall=!var(30)
trigger1 = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
;Stand Strong Punch
;       p   `
[State -1, Stand Strong Punch]
type = ChangeState
value = 210
triggerall = command = "y"
triggerall=!var(30)
trigger1 = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
;Stand Light Kick
;      L b N
[State -1, Stand Light Kick]
type = ChangeState
value = 230
triggerall = command = "a"
triggerall=!var(30)
trigger1 = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
;Standing Strong Kick
;       L b N
[State -1, Standing Strong Kick]
type = ChangeState
value = 240
triggerall = command = "b"
triggerall=!var(30)
trigger1 = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
;Taunt
;    
[State -1, Taunt]
type = ChangeState
value = 195
triggerall = command = "start"
triggerall=!var(30)
trigger1 = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
;Jump Light Punch
; 󒆎 p   `
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall = command = "x"
triggerall=!var(30)
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
;Jump Strong Punch
[State -1, Jump Strong Punch]
type = ChangeState
value = 610
triggerall = command = "y"
triggerall=!var(30)
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
;Jump Light Kick
[State -1, Jump Light Kick]
type = ChangeState
value = 630
triggerall = command = "a"
triggerall=!var(30)
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
;Jump Strong Kick
; 󒆋  L b N
[State -1, Jump Strong Kick]
type = ChangeState
value = 640
triggerall = command = "b"
triggerall=!var(30)
trigger1 = statetype = A
trigger1 = ctrl

[state samsara]
type=changestate
trigger1=alive&&roundstate=2&&statetype!=a&&random<50+950*(power>=3000)
trigger1=power>=1000
trigger1=var(30)
trigger1=ctrl||stateno=200&&movecontact||stateno=210&&movecontact||stateno=230&&movecontact||stateno=240&&movecontact
trigger1=var(58):=ifelse(power>=3000,2000,2100)
trigger2=alive&&roundstate=2&&statetype=s&&random<210&&(p2movetype=a||p2movetype!=a&&p2dist x=[0,50])
trigger2=stateno!=100
trigger2=var(30)
trigger2=ctrl||stateno=200&&movecontact||stateno=210&&movecontact||stateno=230&&movecontact||stateno=240&&movecontact
trigger2=var(58):=810
trigger3=alive&&roundstate=2&&statetype=s&&random<410
trigger3=var(30)
trigger3=ctrl||stateno=200&&movecontact||stateno=210&&movecontact||stateno=230&&movecontact||stateno=240&&movecontact
trigger3=var(58):=1000+(30+(p2statetype=a))*(gametime%3=1&&!numhelper(1030)&&!numhelper(1031))+200*(gametime%3=2)
trigger4=alive&&roundstate=2&&random<100&&p2dist x=[0,50]
trigger4=var(30)
trigger4=ctrl||statetype=s&&stateno=[150,153]
trigger4=var(58):=500+10*(statetype=a)
trigger5=alive&&roundstate=2&&statetype=s&&random<210&&backedgedist>50&&p2dist x=[0,50]
trigger5=var(30)
trigger5=ctrl
trigger5=var(58):=105
trigger6=alive&&roundstate=2&&random<410&&(p2movetype=a||p2dist x=[-50,50])
trigger6=var(30)
trigger6=ctrl||statetype=s&&stateno=[150,153]
trigger6=var(58):=900
trigger7=alive&&roundstate=2&&statetype=s&&random<100&&p2dist x=[0,50]
trigger7=var(30)
trigger7=ctrl
trigger7=var(58):=200+10*(gametime%4=1)+30*(gametime%4=2)+30*(gametime%4=3)
trigger8=alive&&roundstate=2&&statetype=a&&random<100&&p2dist x=[0,50]
trigger8=var(30)
trigger8=ctrl
trigger8=var(58):=600+10*(gametime%4=1)+30*(gametime%4=2)+30*(gametime%4=3)
value=var(58)
