;---------------------------------------------------------------------------
; Aru/Ibun - Standing kicks #1
[Statedef 235]
type    = S
movetype = A
physics = S
anim = ifelse(facing = 1,232,1232)
sprpriority = 3

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
time = 999
facing = 0
pos = 0,0

[State 235, PlaySnd]
type = PlaySnd
triggerall = random>400
trigger1 = animelem = 1
value = 235,0




[State 235, ChangeState]
type = ChangeState
trigger1 = Parent, anim = 231
value = 236
ctrl = 0


[State 235, DestroySelf]
type = DestroySelf
trigger1 = parent, movetype = H || parent, anim != 230

;---------------------------------------------------------------------------
; Aru/Ibun - Return
[Statedef 236]
type    = S
movetype = A
physics = S
anim = ifelse(facing = 1,233 ,1233)
sprpriority = 3


[State 0, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0 || parent, movetype = H || parent, ctrl = 1



;---------------------------------------------------------------------------
; Aru/Ibun - Standing kicks #2
[Statedef 245]
type    = S
movetype = A
physics = S
anim = ifelse(facing = 1,241,1241)
sprpriority = 3

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
time = 999
facing = 0
pos = 0,0



[State 235, PlaySnd]
type = PlaySnd
triggerall = random>400
trigger1 = animelem = 2
value = 235,1


[State 0, ChangeState]
type = ChangeState
trigger1 = parent, anim = 231
value = 236
ctrl = 0



[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent, movetype = H || parent, anim != 240
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Aru/Ibun - Rolling
[Statedef 435]
type    = C
movetype= A
physics = S
juggle  = 2
velset = 0,0
ctrl = 0
anim = ifelse(facing = 1,435,1435)
sprpriority = 3


[State 235, PlaySnd]
type = PlaySnd
triggerall = random>400
trigger1 = animelem = 1
value = 235,0

[State 0, VelSet]
type = VelSet
Triggerall = parent, stateno = 430
trigger1 = Time > 0
x = 15

[State 0, VelSet]
type = VelSet
Triggerall = parent, stateno = 430
trigger1 = parentdist x <= -80
x = 0

[State 0, VelSet]
type = VelSet
Triggerall = parent, stateno = 430
trigger1 = time >= 12
y = -15


[State 0, VelSet]
type = VelSet
Triggerall = parent, stateno = 460 || parent, stateno = 470
trigger1 = time > 0
y = -16;ifelse((parent,stateno = 460),-16,-15)


[State 0, VelSet]
type = VelSet
Triggerall = parent, stateno = 460
trigger1 = pos y <= -80
y = 0

[State 0, VelSet]
type = VelSet
Triggerall = parent, stateno = 470
trigger1 = pos y <= -88
y = 0

[State 0, VelSet]
type = VelSet
Triggerall = parent, stateno = 460
trigger1 = time >= 12
y = 16


[State 0, VelSet]
type = VelSet
Triggerall = parent, stateno = 470
trigger1 = time >= 17
y = 16

[State 430, 5]
type = DestroySelf
trigger1 = parent, anim = 431 || Parent, movetype = H || parent, stateno = [1000,9000]



;---------------------------------------------------------------------------
; Aru/Ibun - Return
[Statedef 436]
type    = C
movetype= A
physics = C
juggle  = 2
ctrl = 0
anim = ifelse(facing = 1,436,1436)
sprpriority = 3


[State 430, 5]
type = DestroySelf
trigger1 = AnimTime = 0 || Parent, movetype = H || parent, ctrl = 1


;---------------------------------------------------------------------------
; Aru/Ibun - Roll & Kick
[Statedef 445]
type    = C
movetype= A
physics = C
juggle  = 2
ctrl = 0
anim = ifelse(facing = 1,445,1445)
sprpriority = 3


[State 235, PlaySnd]
type = PlaySnd
triggerall = random>400
trigger1 = animelem = 2
value = 235,1


[State 0, VelSet]
type = VelSet
trigger1 = Time > 0
x = 15

[State 0, VelSet]
type = VelSet
trigger1 = parentdist x <= -100
x = 0

[State 0, VelSet]
type = VelSet
trigger1 = time >= 22
x = -15




[State 430, 5]
type = DestroySelf
trigger1 = parent, anim = 431 || Parent, movetype = H || parent, anim != 440


;---------------------------------------------------------------------------
; Aru/Ibun - Spinning
[Statedef 635]
type    = S
movetype= A
physics = S
juggle  = 2
ctrl = 0
anim = ifelse(facing = 1,635,1635)
sprpriority = 3


[State 635, PlaySnd]
type = PlaySnd
triggerall = random>400
trigger1 = animelem = 1
value = 235,0


[State 0, BindToParent]
type = BindToParent
Triggerall = parent, anim = 630
trigger1 = 1
time = 30
facing = 1
pos = 0,0

[State 0, BindToParent]
type = BindToParent
Triggerall = parent, stateno = 681
trigger1 = 1
time = 999
facing = 1
pos = -40, 50

[State 635, 5]
type = DestroySelf
trigger1 = Parent, anim = 631 || Parent, movetype = H || Parent, pos y = 0 && parent, statetype != A ||  parent, stateno = [1000,9000]

;---------------------------------------------------------------------------
; Aru/Ibun - Return
[Statedef 636]
type    = S
movetype= A
physics = S
ctrl = 0
anim = ifelse(facing = 1,636,1636)
sprpriority = 3

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
time = 10
facing = 1
pos = 0,0

[State 635, 5]
type = DestroySelf
trigger1 = Parent, anim = 660 || Parent, movetype = H || Parent, pos y = 0 && parent, statetype != A



;---------------------------------------------------------------------------
; Aru/Ibun - Air Kicks
[Statedef 645]
type    = S
movetype= A
physics = S
juggle  = 2
ctrl = 0
anim = ifelse(facing = 1,645,1645)
sprpriority = 3


[State 645, PlaySnd]
type = PlaySnd
triggerall = random>400
trigger1 = time = 4
value = 235,1


[State 0, BindToParent]
type = BindToParent
trigger1 = 1
time = 60
facing = 1
pos = 0,0

[State 645, 5]
type = DestroySelf
trigger1 = parent, anim = 631 || Parent, movetype = H || Parent, pos y = 0 && parent, statetype != A || parent, anim != 640

