;------------------------------------------------------------------------------------------
;Catch
[StateDef 10600]
type = S
physics = S
movetype = A
ctrl = 0

[State 10600]
type = PosSet
trigger1 = Pos Y != 0
ignorehitpause = 1
y = 0

[State 10600]
type = Helper
trigger1 = Time = 0
trigger1 = Var(0) != 10600
trigger1 = NumHelper(10600) = 0
ignorehitpause = 1
name = "arm1"
stateno = 10601
keyctrl = 0
id = 10600

[State 10600]
type = ChangeState
trigger1 = NumHelper(10600) = 0
ignorehitpause = 1
value = 10000
ctrl = 0

;------------------------------------------------------------------------------------------
;Catch-Arm1
[StateDef 10601]
type = S
physics = N
movetype = A
anim = 10600
ctrl = 0

[State 10600]
type = Explod
trigger1 = Time = 1
ignorehitpause = 1
removetime = 48
anim = 10606+IfElse(Facing = -1,1,0)
pos = 100,-50
facing = Facing
sprpriority = -90
ownpal = 1

[State 10601]
type = Turn
trigger1 = Facing != Parent, Facing

[State 10601]
type = Helper
trigger1 = NumHelper(10401) = 0
name = "arm2"
stateno = 10602
keyctrl = 0
id = 10401

[State 10601]
type = Sprpriority
trigger1 = 1
value = -106

[State 10601]
type = VarSet
trigger1 = Time = 0
var(0) = -90

[State 10601]
type = AngleSet
trigger1 = 1
value = Var(0)

[State 10601]
type = AngleDraw
trigger1 = 1

;Motion
[State 10601]
type = BindToParent
trigger1 = Time <= 30
pos = -100,-2*Time

[State 10601]
type = BindToParent
trigger1 = Time = [31,60]
pos = -100+(Time-30),-60

[State 10601]
type = BindToParent
trigger1 = Time = [61,90]
pos = -70,-60

[State 10601]
type = VarAdd
trigger1 = Time = [0,30]
var(0) = -3

[State 10601]
type = VarAdd
trigger1 = Time = [31,60]
persistent = 3
var(0) = 17

;Motion End
[State 10601]
type = VarAdd
trigger1 = Time = [61,90]
var(0) = 1

[State 10602]
type = ChangeState
trigger1 = Time >= 90
trigger1 = Helper(10401), StateNo = 10605
value = 10604
ctrl = 0

[State 10601]
type = VarAdd
trigger1 = Time = [91,120]
var(0) = -2

[State 10601]
type = BindToParent
trigger1 = Time >= 91
pos = -70,-60+(Time-91)*1.5

[State 10601]
type = DestroySelf
trigger1 = Time = 120

;------------------------------------------------------------------------------------------------
;Arm2
[StateDef 10602]
type = S
physics = N
movetype = A
anim = 10601
velset = 0,0
ctrl = 0

[State 10602]
type = Turn
trigger1 = Facing != Parent, Facing

[State 10602]
type = Helper
trigger1 = NumHelper(10402) = 0
name = "hand"
stateno = 10603
keyctrl = 0
id = 10402

[State 10602]
type = Sprpriority
trigger1 = Time = 0
value = -105

[State 10602]
type = VarSet
trigger1 = Time = 0
var(0) = -45

[State 10602]
type = AngleSet
trigger1 = 1
value = Var(0)

[State 10602]
type = AngleDraw
trigger1 = 1

;Motion
[State 10603]
type = Sprpriority
trigger1 = Time = 30
value = -90

[State 10602]
type = BindToParent
trigger1 = Time <= 30
trigger2 = Time >= 61
pos = 100*cos((Parent,Var(0)+10)*Pi/180.0),-100*sin((Parent,Var(0)+10)*Pi/180.0)

[State 10602]
type = BindToParent
trigger1 = Time = [30,60]
pos = (Time-30)*6-100,0

;Motion End
[State 10602]
type = Sprpriority
trigger1 = Time = 90
value = -105

[State 10602]
type = ChangeState
trigger1 = Helper(10402), StateNo = 10606
value = 10605
ctrl = 0

[State 10602]
type = DestroySelf
trigger1 = Time = 120

;------------------------------------------------------------------------------------------------
;Hand
[StateDef 10603]
type = S
physics = N
movetype = A
anim = 10602
velset = 0,0
ctrl = 0

[State 10603]
type = Turn
trigger1 = Facing != Parent, Facing

[State 10603]
type = Sprpriority
trigger1 = Time = 0
value = -104

[State 10603]
type = BindToParent
trigger1 = Parent, Anim = 10601
pos = 80*cos((Parent,Var(0)+50)*Pi/180.0),-80*sin((Parent,Var(0)+50)*Pi/180.0)

[State 10603]
type = VarSet
trigger1 = Time = 0
var(0) = 0

[State 10603]
type = AngleSet
trigger1 = 1
value = Var(0)

[State 10603]
type = AngleDraw
trigger1 = 1

;Motion
[State 10603]
type = Sprpriority
trigger1 = Time = 30
value = 10

[State 10603]
type = ChangeAnim
trigger1 = Time = 40
value = 10603

[State 10603]
type = ChangeAnim
trigger1 = Time = 60
value = 10604

[State 10603]
type = HitDef
trigger1 = 1
attr = S, ST
damage = 0,0
hitflag = MAF
guardflag = L
animtype = Light
sparkno = -1
guard.sparkno = -1
hitsound = S 4100,1
p1stateno = 10606
p2stateno = 10610

;Motion End
[State 10603]
type = Sprpriority
trigger1 = Time = 90
value = -104

[State 10603]
type = DestroySelf
trigger1 = Time = 120

;------------------------------------------------------------------------------------------
;Catch-Arm1 MoveHit
[StateDef 10604]
type = S
physics = N
movetype = A
anim = 10600
ctrl = 0

[State 10601]
type = Turn
trigger1 = Facing != Parent, Facing

[State 10601]
type = Sprpriority
trigger1 = 1
value = -106

[State 10601]
type = AngleSet
trigger1 = 1
value = Var(0)

[State 10601]
type = AngleDraw
trigger1 = 1

;Motion
[State 10601]
type = BindToParent
trigger1 = Time <= 150
pos = -70,-60

[State 10601]
type = BindToParent
trigger1 = Time > 150
pos = -70,-60+(Time-150)*3

[State 10604]
type = VarAdd
trigger1 = Time = [60,90]
var(0) = 2

[State 10604]
type = VarAdd
trigger1 = Time = [91,100]
var(0) = -11

[State 10604]
type = VarAdd
trigger1 = Time = [101,130]
var(0) = 2

[State 10604]
type = VarAdd
trigger1 = Time = [131,140]
var(0) = -6

[State 10604]
type = VarAdd
trigger1 = Time = [141,150]
var(0) = 2

[State 10604]
type = VarAdd
trigger1 = Time = [151,170]
var(0) = -2

[State 10604]
type = DestroySelf
trigger1 = NumHelper(10401) = 0

;------------------------------------------------------------------------------------------------
;Arm2 MoveHit
[StateDef 10605]
type = S
physics = N
movetype = A
anim = 10601
velset = 0,0
ctrl = 0

[State 10602]
type = VarSet
trigger1 = 1
var(1) = Parent, Time

[State 10602]
type = Turn
trigger1 = Facing != Parent, Facing

[State 10602]
type = BindToParent
trigger1 = 1
pos = 100*cos((Parent,Var(0)+10)*Pi/180.0),-100*sin((Parent,Var(0)+10)*Pi/180.0)

[State 10602]
type = AngleSet
trigger1 = 1
value = Var(0)

[State 10602]
type = AngleDraw
trigger1 = 1

;Motion
[State 10605]
type = SprPriority
trigger1 = Var(1) = 150
value = -105

[State 10604]
type = DestroySelf
trigger1 = NumHelper(10402) = 0

;------------------------------------------------------------------------------------------------
;Hand MoveHit
[StateDef 10606]
type = S
physics = N
movetype = A
anim = 10604
velset = 0,0
ctrl = 0

[State 10603]
type = Turn
trigger1 = Facing != Parent, Facing

[State 10603]
type = Sprpriority
trigger1 = Time = 0
value = -1

[State 10603]
type = BindToParent
trigger1 = Parent, Anim = 10601
pos = 80*cos((Parent,Var(0)+50)*Pi/180.0),-80*sin((Parent,Var(0)+50)*Pi/180.0)

[State 10603]
type = VarSet
trigger1 = Time = 0
var(0) = 0

[State 10603]
type = AngleSet
trigger1 = 1
value = Var(0)

[State 10603]
type = AngleDraw
trigger1 = 1

;Motion
[State 10603]
type = Explod
trigger1 = Time = 0
removetime = -1
bindtime = -1
anim = 10605
pos = 0,0
sprpriority = 10
id = 10604

[State 10606]
type = TargetBind
trigger1 = Parent, Var(1) <= 140
trigger1 = Target, StateNo = 10610
pos = 25,-40

[State 10606]
type = TargetLifeAdd
trigger1 = Parent, Var(1) = 100
value = -100

[State 10606]
type = TargetLifeAdd
trigger1 = Parent, Var(1) = 140
value = -150

[State 10606]
type = PlaySnd
trigger1 = Parent, Var(1) = 100
trigger2 = Parent, Var(1) = 140
value = F 5,4
channel = 2

[State 10606]
type = EnvShake
trigger1 = Parent, Var(1) = 100
trigger2 = Parent, Var(1) = 140
time = 12
ampl = 18
freq = 60

[State 10606]
type = TargetState
trigger1 = Parent, Var(1) = 141
value = 10611

[State 10605]
type = SprPriority
trigger1 = Parent, Var(1) = 150
value = -104

[State 10604]
type = RemoveExplod
trigger1 = Parent, Var(1) = 141
value = 10604

[State 10604]
type = DestroySelf
trigger1 = Parent, Var(1) >= 170

;------------------------------------------------------------------------------------------------
[StateDef 10610]
type = A
physics = N
movetype = H
ctrl = 0

[State 10610]
type = ChangeAnim2
trigger1 = Anim != 10610
value = 10610

;------------------------------------------------------------------------------------------------
[StateDef 10611]
type = S
physics = N
movetype = H
ctrl = 0

[State 10611]
type = ChangeAnim2
trigger1 = Time = 0
value = 10611

[State 10611]
type = PosSet
trigger1 = Pos Y != 0
y = 0

[State 10611]
type = Explod
trigger1 = Time <= 1
trigger1 = NumExplod(10611) = 0
removetime = -1
bindtime = -1
anim = 5110
pos = 0,0
scale = 1.5,0.1
id = 10611
sprpriority = 1

[State 10611]
type = ModifyExplod
trigger1 = Time = [60,90]
id = 10611
scale = 1.5-(Time-60)/60.0,0.1+(Time-60)/33.3333333333333333333333333333333
sprpriority = 1

[State 10611]
type = RemoveExplod
trigger1 = Time = 91
value = 10611

[State 10611]
type = SelfState
trigger1 = Time >= 91
value = 5110