; Apocalypse Parts
;---------------------------------------------------------------------------
; Body
[Statedef 10001]
type = S 
sprpriority = -5
anim = 10001
ctrl = 0

;-----Binded Objects-----
[State 10001, Shoulder]
type = Helper
trigger1 = NumHelper(10002) = 0
helpertype = normal
name = "Shoulder Engine"
id = 10002
pos = -80,-180
postype = p1
stateno = 10002
keyctrl = 0
ownpal = 1

[State 10001, Arm]
type = Helper
trigger1 = NumHelper(10003) = 0
helpertype = normal
name = "Arm"
id = 10003
pos = -80,0
postype = p1
stateno = 10003
keyctrl = 0
ownpal = 1

[State 10003, Fist]
type = Helper
trigger1 = NumHelper(10004) = 0
helpertype = normal
name = "Fist"
id = 10004
pos = 0,0
postype = p1
stateno = 10004
keyctrl = 0
ownpal = 1

[State 10001, Head]
type = Helper
trigger1 = NumHelper(10030) = 0
helpertype = normal
name = "Head"
id = 10030
pos = 40, -120
postype = p1
stateno = 10030
keyctrl = 0
ownpal = 1
;--------------------

;-----Special Moves-----
[State 10001, Electric]
type = Helper
triggerall = Root, Time < 10
triggerall = Root, StateNo = 10200
trigger1 = NumHelper(10070) = 0
helpertype = normal
name = "Electric"
id = 10070
pos = 160,0
postype = p1
stateno = 10370
keyctrl = 0
ownpal = 1

[State 10001, SCannon]
type = Helper
triggerall = Root, Time < 10
triggerall = Root, StateNo = 10210
trigger1 = NumHelper(10080) = 0
helpertype = normal
name = "Shoulder Cannon"
id = 10080
pos = -80,-140
postype = p1
stateno = 10380
keyctrl = 0
ownpal = 1

[State 10001, SCannon]
type = Helper
triggerall = Root, Time < 10
triggerall = Root, StateNo = 10210
trigger1 = NumHelper(10081) = 0
helpertype = normal
name = "Shoulder Cannon"
id = 10081
pos = 130, -120
postype = p1
stateno = 10381
keyctrl = 0
ownpal = 1
;--------------------

;-----Hit-Shake-----
[State 10001, Hit-Shake]
type = PosAdd
triggerall = TimeMod = 1,0
trigger1 = NumHelper(10030) > 0
trigger1 = Helper(10030), StateNo = 10031
;trigger1 = Helper(10030), Time <= 30
y = -2

[State 10001, Hit-Shake]
type = PosAdd
triggerall = TimeMod = 2,0
trigger1 = NumHelper(10030) > 0
trigger1 = Helper(10030), StateNo = 10031
;trigger1 = Helper(10030), Time <= 30
y = 4

[State 10001, Hit-Move]
type = PosSet
trigger1 = NumHelper(10030) > 0
trigger1 = Helper(10030), StateNo = 10031
x = Root, Pos X
;--------------------

[State 10001, 0]
type = BindToRoot
triggerall = NumHelper(10030) > 0
trigger1 = Helper(10030), StateNo != 10031
;trigger2 = Helper(10030), StateNo = 10031
;trigger2 = Helper(10030), Time > 30
pos = 0, 0

[State 10001, 1]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn
flag2 = NoShadow

[State 10001, 2]
type = ChangeAnim
trigger1 = 1
value = Anim
elem = 1

;-----Intro-----
[State 10001, 2]
type = ChangeAnim
trigger1 = Root, StateNo = 10190
trigger1 = Time < 370
value = Anim
elem = 3

[State 10001, 2]
type = ChangeAnim
trigger1 = Root, StateNo = 10190
trigger1 = Time >= 370
trigger1 = Time < 375
value = Anim
elem = 2

[State 10001, 2]
type = ChangeAnim
trigger1 = Root, StateNo = 10190
trigger1 = Time >= 375
value = Anim
elem = 1
;--------------------

;-----Clamp-----
[State 10003, 0]
type = ChangeAnim
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), StateNo = 10362
trigger1 = Helper(10004), Time <= 10
trigger2 = Helper(10004), Time > 65
value = Anim
elem = 1

[State 10003, 0]
type = ChangeAnim
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), StateNo = 10362
trigger1 = Helper(10004), Time > 10
trigger1 = Helper(10004), Time <= 20
trigger2 = Helper(10004), Time > 60
trigger2 = Helper(10004), Time <= 65
value = Anim
elem = 2

[State 10003, 0]
type = ChangeAnim
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), StateNo = 10362
trigger1 = Helper(10004), Time > 20
trigger1 = Helper(10004), Time <= 60
value = Anim
elem = 3
;--------------------

;-----Shock Wave Fist-----
[State 10001, 2]
type = ChangeAnim
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10320
trigger1 = Helper(10004), AnimElem = 1, >= 0
trigger1 = Helper(10004), AnimElem = 2, < 0
trigger2 = Helper(10004), AnimElem = 4, >= 0
value = Anim
elem = 1

[State 10001, 2]
type = ChangeAnim
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10320
trigger1 = Helper(10004), AnimElem = 2, >= 0
trigger1 = Helper(10004), AnimElem = 3, < 0
trigger2 = Helper(10004), AnimElem = 4, >= 0
trigger2 = Helper(10004), AnimElem = 5, < 0
value = Anim
elem = 2

[State 10001, 2]
type = ChangeAnim
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10320
trigger1 = Helper(10004), AnimElem = 3, >= 0
trigger1 = Helper(10004), AnimElem = 4, < 0
value = Anim
elem = 3
;--------------------

;-----Spike Ball-----
[State 10001, 2]
type = ChangeAnim
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10340
trigger1 = Helper(10004), AnimElem = 3, < 5
trigger2 = Helper(10004), AnimElem = 3, >= 70
value = Anim
elem = 1

[State 10001, 2]
type = ChangeAnim
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10340
trigger1 = Helper(10004), AnimElem = 3, >= 5
trigger1 = Helper(10004), AnimElem = 3, < 15
trigger2 = Helper(10004), AnimElem = 3, >= 65
trigger2 = Helper(10004), AnimElem = 3, < 70
value = Anim
elem = 2

[State 10001, 2]
type = ChangeAnim
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10340
trigger1 = Helper(10004), AnimElem = 3, >= 15
trigger1 = Helper(10004), AnimElem = 3, < 25
trigger2 = Helper(10004), AnimElem = 3, >= 60
trigger2 = Helper(10004), AnimElem = 3, < 65
value = Anim
elem = 3

[State 10001, 2]
type = ChangeAnim
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10340
trigger1 = Helper(10004), AnimElem = 3, >= 25
trigger1 = Helper(10004), AnimElem = 3, < 60
value = Anim
elem = 4
;--------------------

;-----Drill-----
[State 10001, 2]
type = ChangeAnim
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10350
trigger1 = Helper(10004), AnimElem = 3, >= 0
trigger1 = Helper(10004), AnimElem = 4, < 0
value = Anim
elem = 5

[State 10001, 2]
type = ChangeAnim
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10350
trigger1 = Helper(10004), Time <= 280
trigger1 = Helper(10004), AnimElem = 4, >= 0
value = Anim
elem = 6
;--------------------

;-----Electric-----
[State 10001, 2]
type = ChangeAnim
triggerall = NumHelper(10070) > 0
triggerall = Helper(1070), Anim = 10370
trigger1 = Helper(1070), AnimElem = 2, >= 0
trigger1 = Helper(1070), AnimElem = 5, < 0
value = Anim
elem = 7
;--------------------

[State 10001, 5]
type = DestroySelf
trigger1 = Root, StateNo = 15150
trigger1 = Root, Time >= 30

;---------------------------------------------------------------------------
; Shoulder Engine
[Statedef 10002]
type = S
sprpriority = -4
anim = 10002

[State 10002, 0]
type = BindToParent
trigger1 = Root, StateNo = 10190
trigger2 = RoundState >= 2
trigger3 = RoundState >= 2
trigger3 = RoundNo > 1
pos = -80, -180

[State 10002, 1]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn
flag2 = NoShadow

[State 10002, 2]
type = ChangeAnim
trigger1 = 1
value = Anim
elem = Parent, AnimElemNo(0)

[State 10002, 5]
type = DestroySelf
trigger1 = Root, StateNo = 15150
trigger1 = Root, Time >= 30

;---------------------------------------------------------------------------
; Arm
[Statedef 10003]
type = S
sprpriority = -2
anim = 10003

[State 10003, 0]
type = PosSet
triggerall = Facing = 1
trigger1 = 1
x = Root, Pos X - 80

[State 10003, 0]
type = PosSet
triggerall = Facing = -1
trigger1 = 1
x = Root, Pos X + 80

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

;-----Intro-----
[State 10003, 0]
type = BindToParent
trigger1 = Root, StateNo = 10190
trigger1 = Parent, AnimElem = 3
pos = -80, -60

[State 10003, 0]
type = BindToParent
trigger1 = Root, StateNo = 10190
trigger1 = Parent, AnimElem = 2
pos = -80, -30

[State 10003, 0]
type = BindToParent
trigger1 = Root, StateNo = 10190
trigger1 = Parent, AnimElem = 1
pos = -80, 0
;--------------------

[State 10003, 0]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn
flag2 = NoShadow

[State 10003, 1]
type = PalFX
trigger1 = NumHelper(10004) > 0
time = 1
add = Helper(10004),Var(0),Helper(10004),Var(0),Helper(10004),Var(0)

[State 10003, 1]
type = SprPriority
triggerall = NumHelper(10004) > 0
trigger1 = Helper(10004), Anim != 10350
value = -2

[State 10003, 1]
type = SprPriority
triggerall = NumHelper(10004) > 0
trigger1 = Helper(10004), Anim = 10350
trigger1 = Helper(10004), AnimElem = 2, >= 0
value = 10002

[State 10003, 2]
type = ChangeAnim
trigger1 = 1
value = Anim
elem = 1

;-----Clamp Anim-----
[State 10003, 2]
type = ChangeAnim
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), StateNo = 10362
trigger1 = Helper(10004), Time <= 10
trigger2 = Helper(10004), Time > 65
value = Anim
elem = 1

[State 10003, 2]
type = ChangeAnim
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), StateNo = 10362
trigger1 = Helper(10004), Time > 10
trigger1 = Helper(10004), Time <= 20
trigger2 = Helper(10004), Time > 60
trigger2 = Helper(10004), Time <= 65
value = Anim
elem = 2

[State 10003, 2]
type = ChangeAnim
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), StateNo = 10362
trigger1 = Helper(10004), Time > 20
trigger1 = Helper(10004), Time <= 60
value = Anim
elem = 3
;--------------------

;-----Clamp Position-----
[State 10003, 0]
type = PosSet
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), StateNo = 10362
trigger1 = Helper(10004), Time <= 10
trigger2 = Helper(10004), Time > 65
y = 0

[State 10003, 0]
type = PosSet
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), StateNo = 10362
trigger1 = Helper(10004), Time > 10
trigger1 = Helper(10004), Time <= 20
trigger2 = Helper(10004), Time > 60
trigger2 = Helper(10004), Time <= 65
y = -50

[State 10003, 0]
type = PosSet
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), StateNo = 10362
trigger1 = Helper(10004), Time > 20
trigger1 = Helper(10004), Time <= 60
y = -90
;--------------------

;-----Shock Wave Fist Anim-----
[State 10003, 2]
type = ChangeAnim
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10320
trigger1 = Helper(10004), AnimElem = 1, >= 0
trigger1 = Helper(10004), AnimElem = 2, < 0
trigger2 = Helper(10004), AnimElem = 4, >= 0
value = Anim
elem = 1

[State 10003, 2]
type = ChangeAnim
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10320
trigger1 = Helper(10004), AnimElem = 2, >= 0
trigger1 = Helper(10004), AnimElem = 3, < 0
trigger2 = Helper(10004), AnimElem = 4, >= 0
trigger2 = Helper(10004), AnimElem = 5, < 0
value = Anim
elem = 2

[State 10003, 2]
type = ChangeAnim
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10320
trigger1 = Helper(10004), AnimElem = 3, >= 0
trigger1 = Helper(10004), AnimElem = 4, < 0
value = Anim
elem = 3
;--------------------

;-----Shock Wave Fist Position-----
[State 10003, 3]
type = PosSet
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10320
trigger1 = Helper(10004), AnimElem = 1, >= 0
trigger1 = Helper(10004), AnimElem = 2, < 0
trigger2 = Helper(10004), AnimElem = 4, >= 0
y = 0

[State 10003, 3]
type = PosSet
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10320
trigger1 = Helper(10004), AnimElem = 2, >= 0
trigger1 = Helper(10004), AnimElem = 3, < 0
trigger2 = Helper(10004), AnimElem = 4, >= 0
trigger2 = Helper(10004), AnimElem = 5, < 0
y = -50

[State 10003, 3]
type = PosSet
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10320
trigger1 = Helper(10004), AnimElem = 3, >= 0
trigger1 = Helper(10004), AnimElem = 4, < 0
y = -90
;--------------------

;-----Spike Ball Anim-----
[State 10003, 2]
type = ChangeAnim
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10340
trigger1 = Helper(10004), AnimElem = 3, < 5
trigger2 = Helper(10004), AnimElem = 3, >= 70
value = Anim
elem = 1

[State 10003, 2]
type = ChangeAnim
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10340
trigger1 = Helper(10004), AnimElem = 3, >= 5
trigger1 = Helper(10004), AnimElem = 3, < 15
trigger2 = Helper(10004), AnimElem = 3, >= 65
trigger2 = Helper(10004), AnimElem = 3, < 70
value = Anim
elem = 2

[State 10003, 2]
type = ChangeAnim
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10340
trigger1 = Helper(10004), AnimElem = 3, >= 15
trigger1 = Helper(10004), AnimElem = 3, < 25
trigger2 = Helper(10004), AnimElem = 3, >= 60
trigger2 = Helper(10004), AnimElem = 3, < 65
value = Anim
elem = 3

[State 10003, 2]
type = ChangeAnim
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10340
trigger1 = Helper(10004), AnimElem = 3, >= 25
trigger1 = Helper(10004), AnimElem = 3, < 60
value = Anim
elem = 4
;--------------------

;-----Spike Ball Position-----
[State 10003, 3]
type = PosSet
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10340
trigger1 = Helper(10004), AnimElem = 3, < 5
trigger2 = Helper(10004), AnimElem = 3, >= 70
y = 0

[State 10003, 3]
type = PosSet
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10340
trigger1 = Helper(10004), AnimElem = 3, >= 5
trigger1 = Helper(10004), AnimElem = 3, < 15
trigger2 = Helper(10004), AnimElem = 3, >= 65
trigger2 = Helper(10004), AnimElem = 3, < 70
y = -50

[State 10003, 3]
type = PosSet
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10340
trigger1 = Helper(10004), AnimElem = 3, >= 15
trigger1 = Helper(10004), AnimElem = 3, < 25
trigger2 = Helper(10004), AnimElem = 3, >= 60
trigger2 = Helper(10004), AnimElem = 3, < 65
y = -90

[State 10003, 3]
type = PosSet
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10340
trigger1 = Helper(10004), AnimElem = 3, >= 25
trigger1 = Helper(10004), AnimElem = 3, < 60
y = -110
;--------------------

;-----Drill Anim-----
[State 10003, 2]
type = ChangeAnim
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10350
trigger1 = Helper(10004), AnimElem = 2, < 0
value = Anim
elem = 1

[State 10003, 2]
type = ChangeAnim
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10350
trigger1 = Helper(10004), AnimElem = 2, >= 0
value = Anim
elem = 5
;--------------------

;-----Drill Position-----
[State 10003, 3]
type = BindToParent
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10350
trigger1 = Helper(10004), AnimElem = 2, >= 0
trigger1 = Helper(10004), AnimElem = 3, < 0
trigger2 = Helper(10004), Time > 280
trigger2 = Helper(10004), Time <= 300
pos = -100, -10

[State 10003, 3]
type = BindToParent
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10350
trigger1 = Helper(10004), AnimElem = 3, >= 0
trigger1 = Helper(10004), AnimElem = 4, < 0
pos = -140, 0

[State 10003, 3]
type = BindToParent
triggerall = NumHelper(10004) > 0
triggerall = Helper(10004), Anim = 10350
trigger1 = Helper(10004), Time <= 280
trigger1 = Helper(10004), AnimElem = 4, >= 0
pos = -30, 0
;--------------------

[State 10003, 5]
type = DestroySelf
trigger1 = Root, StateNo = 15150
trigger1 = Root, Time >= 30

;---------------------------------------------------------------------------
; Fist
[Statedef 10004]
type = S
movetype = I
sprpriority = -1
anim = 10004

[State 10004, Push]
type = Helper
trigger1 = NumHelper(10006) = 0
helpertype = normal
name = "Push Check"
id = 10006
pos = 0,0
postype = p1
stateno = 10006
keyctrl = 0
ownpal = 1

[State 10004, 0]
type = VarSet
trigger1 = 1
v = 0
value = 10000

[State 10004, 0]
type = PosSet
trigger1 = 1
x = Root, Pos X

[State 10004, 0]
type = PosSet
trigger1 = Pos Y <= 0
y = 0

[State 10004, 0]
type = BindToParent
triggerall = Root, StateNo = 10190
trigger1 = Parent, AnimElem = 1
pos = 0, 0

[State 10004, 0]
type = BindToParent
triggerall = Root, StateNo = 10190
trigger1 = Parent, AnimElem = 2
pos = 0, -30

[State 10004, 0]
type = BindToParent
triggerall = Root, StateNo = 10190
trigger1 = Parent, AnimElem = 3
pos = 0, -60

[State 10004, 1]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn
flag2 = NoShadow

[State 10004, Hit]
type = HitOverride
trigger1 = 1
slot = 0
stateno = 10005
attr = SCA, AA, AP, AT
time = 1

[State 10004, 3]
type = PlaySnd
trigger1 = Root, StateNo = 10190
trigger1 = Time = 375
value = 0, 1

[State 10004, 3]
type = EnvShake
trigger1 = Root, StateNo = 10190
trigger1 = Time = 375
time = 50
freq = 100
ampl = -5
phase = 10

[State 10004, 4]
type = ChangeState
trigger1 = Root, Time < 10
trigger1 = Root, StateNo = 10225
value = 10320

[State 10004, 4]
type = ChangeState
trigger1 = Root, Time < 10
trigger1 = Root, StateNo = 10215
value = 10340

[State 10004, 4]
type = ChangeState
trigger1 = Root, Time < 10
trigger1 = Root, StateNo = 10230
value = 10350

[State 10004, 4]
type = ChangeState
trigger1 = Root, Time < 10
trigger1 = Root, StateNo = 10205
value = 10360

[State 10004, 5]
type = DestroySelf
trigger1 = Root, StateNo = 15150
trigger1 = Root, Time >= 30

;---------------------------------------------------------------------------
; Fist Hit-Shake
[Statedef 10005]
type = S
movetype = H
sprpriority = -1
anim = 10004

[State 10005, Damage]
type = Helper
trigger1 = Time = 0
helpertype = normal
name = "Damage Check"
id = 10700
pos = 0,0
postype = p1
stateno = 10007
keyctrl = 0
ownpal = 1

[State 10005, 0]
type = BindToParent
trigger1 = Time <= 0
pos = 0,0
facing = 1

[State 10005, 0]
type = PosSet
trigger1 = 1
x = Root, Pos X

[State 10005, 0]
type = PosSet
trigger1 = Pos Y <= 0
y = 0

[State 10005, 1]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn
flag2 = NoShadow

[State 10005, Hit]
type = HitOverride
trigger1 = 1
slot = 0
stateno = 10005
attr = SCA, AA, AP, AT
time = 1

[State 10005, 4]
type = ChangeState
trigger1 = Root, Time < 10
trigger1 = Root, StateNo = 10225
value = 10320

[State 10005, 4]
type = ChangeState
trigger1 = Root, Time < 10
trigger1 = Root, StateNo = 10215
value = 10340

[State 10005, 4]
type = ChangeState
trigger1 = Root, Time < 10
trigger1 = Root, StateNo = 10230
value = 10350

[State 10005, 4]
type = ChangeState
trigger1 = Root, Time < 10
trigger1 = Root, StateNo = 10205
value = 10360

[State 10005, 5]
type = ChangeState
trigger1 = Time >= 20
value = 10004

[State 10005, 5]
type = DestroySelf
trigger1 = Root, StateNo = 15150
trigger1 = Root, Time >= 30

;---------------------------------------------------------------------------
; Push Check
[Statedef 10006]
type = S
anim = 10006
ctrl = 0

[State 10006, 0]
type = BindToParent
trigger1 = 1
pos = 0, 0

[State 10006, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 10006, 2]
type = PlayerPush
trigger1 = 1
value = 10001

;-----Fist Check-----
[State 10006, 2]
type = ChangeAnim
trigger1 = 1
value = Anim
elem = 1

[State 10006, 3]
type = Width
trigger1 = 1
value = 10020,10
;--------------------

;-----Clamp Check-----
[State 10006, 2]
type = ChangeAnim
trigger1 = Parent, Anim = 10360
trigger1 = Parent, AnimElem = 2, >= 0
trigger1 = Parent, AnimElem = 25, < 0
value = Anim
elem = 2

[State 10006, 3]
type = Width
trigger1 = Parent, Anim = 10360
trigger1 = Parent, AnimElem = 2, >= 0
trigger1 = Parent, AnimElem = 25, < 0
value = 10000,20
;--------------------

;-----Drill Check-----
[State 10006, 2]
type = ChangeAnim
trigger1 = Parent, Anim = 10350
trigger1 = Parent, AnimElem = 2, >= 0
value = Anim
elem = 3

[State 10006, 3]
type = Width
trigger1 = Parent, Anim = 10350
trigger1 = Parent, AnimElem = 2, >= 0
value = 10050,90
;--------------------

[State 10006, 4]
type = DestroySelf
trigger1 = Root, StateNo = 15150
trigger1 = Root, Time >= 30

;---------------------------------------------------------------------------
; Damage Check
[Statedef 10007]
type = S
anim = 10000
ctrl = 0

[State 10007, 0]
type = DestroySelf
trigger1 = Time > 0

;---------------------------------------------------------------------------
; Head
[Statedef 10030]
type = S
movetype = I
ctrl = 0 ;kell?
sprpriority = -3
anim = 10030

[State 10030, EyeBeams]
type = Helper
triggerall = Root, Time < 10
triggerall = Root, StateNo = 10220
trigger1 = NumHelper(10090) = 0
helpertype = normal
name = "Eye Beams"
id = 10090
pos = 15, -40
postype = p1
stateno = 10390
keyctrl = 0
ownpal = 1

[State 10030, 0]
type = SprPriority
trigger1 = Root, StateNo = 10190
value = -2

[State 10030, 0]
type = BindToParent
trigger1 = 1
pos = 40, -120

[State 10030, 1]
type = ChangeAnim
triggerall = Root, StateNo != 10180
trigger1 = P2Dist X = [0,150]
trigger1 = P2Dist Y = [50,1000]
trigger2 = Root, StateNo = 190
trigger3 = NumHelper(10090) > 0
value = Anim
elem = 1

[State 10030, 1]
type = ChangeAnim
triggerall = NumHelper(10090) = 0
triggerall = Root, StateNo != 10180
triggerall = Root, StateNo != 10190
trigger1 = P2Dist X >= 150
trigger1 = P2Dist Y = [50,1000]
trigger2 = Win
value = Anim
elem = 2

[State 10030, 1]
type = ChangeAnim
triggerall = NumHelper(10090) = 0
triggerall = Root, StateNo != 10180
triggerall = Root, StateNo != 10190
trigger1 = P2Dist X >= 150
trigger1 = P2Dist Y < 50
value = Anim
elem = 3

[State 10030, 1]
type = ChangeAnim
triggerall = NumHelper(10090) = 0
triggerall = Root, StateNo != 10180
triggerall = Root, StateNo != 10190
trigger1 = P2Dist X = [0,150]
trigger1 = P2Dist Y < 50
value = Anim
elem = 4

[State 10030, 1]
type = ChangeAnim
triggerall = !Win
triggerall = NumHelper(10090) = 0
triggerall = Root, StateNo != 10180
triggerall = Root, StateNo != 10190
trigger1 = P2Dist X <= 0
trigger1 = P2Dist Y < 50
value = Anim
elem = 5

[State 10030, 1]
type = ChangeAnim
triggerall = NumHelper(10090) = 0
triggerall = Root, StateNo != 10180
triggerall = Root, StateNo != 10190
trigger1 = P2Dist X <= 0
trigger1 = P2Dist Y = [50,1000]
value = Anim
elem = 6

[State 10030, 1]
type = ChangeAnim
trigger1 = Root, StateNo = 10180
value = Anim
elem = 7

[State 10030, 2]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn
flag2 = NoShadow

[State 10030, Hit]
type = HitOverride
trigger1 = 1
slot = 0
stateno = 10035
attr = SCA, NA, SA, NP, SP, AT
time = 1

[State 10030, Hit]
type = HitOverride
trigger1 = 1
slot = 1
stateno = 10031
attr = SCA, HA, HP
time = 1

[State 10030, 5]
type = ChangeState
trigger1 = Root, Life = 0
trigger2 = Helper(10004),StateNo = 10005
trigger2 = Helper(10004),GetHitVar(HitCount) >= 3
value = 10031

[State 10030, 6]
type = DestroySelf
trigger1 = Root, StateNo = 15150
trigger1 = Root, Time >= 30

;---------------------------------------------------------------------------
; Head Hit
[Statedef 10031]
type = S
movetype = H
sprpriority = -3

[State 10031, 0]
type = ChangeAnim
trigger1 = Anim != 10031
value = 10031

[State 10031, Damage]
type = Helper
triggerall = Time = 0
trigger1 = Helper(10004), StateNo != 10005
trigger1 = GetHitVar(HitCount) >= 3
trigger2 = Helper(10004), StateNo = 10005
trigger2 = Helper(10004), GetHitVar(HitCount) >= 3
helpertype = normal
name = "Damage Check"
id = 10701
pos = 0,0
postype = p1
stateno = 10007
keyctrl = 0
ownpal = 1

[State 10031, Damage]
type = Helper
triggerall = Time = 0
trigger1 = Helper(10004), StateNo != 10005
trigger1 = GetHitVar(HitCount) < 3
trigger2 = Helper(10004), StateNo = 10005
trigger2 = Helper(10004), GetHitVar(HitCount) < 3
helpertype = normal
name = "Damage Check"
id = 10702
pos = 0,0
postype = p1
stateno = 10007
keyctrl = 0
ownpal = 1

[State 10031, 0]
type = BindToParent
trigger1 = 1
pos = 40, -120
facing = 1

[State 10031, 0]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn
flag2 = NoShadow

[State 10031, 1]
type = VarRandom
trigger1 = Time = 0
v = 10
range = 1,3

[State 10031, 2]
type = PlaySnd
trigger1 = Root, Alive
trigger1 = var(10010) = 1
trigger1 = AnimElem = 1
value = 2, 1

[State 10031, 2]
type = PlaySnd
trigger1 = Root, Alive
trigger1 = var(10010) = 2
trigger1 = AnimElem = 1
value = 2, 2

[State 10031, 2]
type = PlaySnd
trigger1 = Root, Alive
trigger1 = var(10010) = 3
trigger1 = AnimElem = 1
value = 2, 3

[State 10031, Hit]
type = HitOverride
trigger1 = 1
slot = 0
stateno = 10031
attr = SCA, AA, AP, AT
time = 1

[State 10031, 5]
type = ChangeState
triggerall = Root, Alive
trigger1 = Helper(10004), StateNo != 10005
trigger1 = Time >= 40
value = 10032

[State 10031, 6]
type = DestroySelf
trigger1 = Root, StateNo = 15150
trigger1 = Root, Time >= 30

;---------------------------------------------------------------------------
; Head Recover
[Statedef 10032]
type = S
movetype = I
sprpriority = -3
anim = 10032

[State 10032, 0]
type = BindToParent
trigger1 = 1
pos = 40, -120

[State 10032, 1]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn
flag2 = NoShadow

[State 10032, Hit]
type = HitOverride
trigger1 = 1
slot = 0
stateno = 10035
attr = SCA, NA, SA, NP, SP, AT
time = 1

[State 10032, Hit]
type = HitOverride
trigger1 = 1
slot = 1
stateno = 10031
attr = SCA, HA, HP
time = 1

[State 10032, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 10030

;---------------------------------------------------------------------------
; Head Hit-Shake
[Statedef 10035]
type = S
movetype = H
sprpriority = -3
anim = 10030

[State 10035, EyeBeams]
type = Helper
triggerall = Root, Time < 10
triggerall = Root, StateNo = 10220
trigger1 = NumHelper(10090) = 0
helpertype = normal
name = "Eye Beams"
id = 10090
pos = 15, -40
postype = p1
stateno = 10390
keyctrl = 0
ownpal = 1

[State 10035, Damage]
type = Helper
trigger1 = Time = 0
helpertype = normal
name = "Damage Check"
id = 10705
pos = 0,0
postype = p1
stateno = 10007
keyctrl = 0
ownpal = 1

[State 10035, 0]
type = BindToParent
trigger1 = 1
pos = 40, -120
facing = 1

[State 10035, 1]
type = ChangeAnim
trigger1 = P2Dist X = [0,150]
trigger1 = P2Dist Y = [50,200]
trigger2 = NumHelper(10090) > 0
value = Anim
elem = 1

[State 10035, 1]
type = ChangeAnim
triggerall = NumHelper(10090) = 0
trigger1 = P2Dist X >= 150
trigger1 = P2Dist Y = [50,200]
value = Anim
elem = 2

[State 10035, 1]
type = ChangeAnim
triggerall = NumHelper(10090) = 0
trigger1 = P2Dist X >= 150
trigger1 = P2Dist Y < 50
value = Anim
elem = 3

[State 10035, 1]
type = ChangeAnim
triggerall = NumHelper(10090) = 0
trigger1 = P2Dist X = [0,150]
trigger1 = P2Dist Y < 50
value = Anim
elem = 4

[State 10035, 1]
type = ChangeAnim
triggerall = NumHelper(10090) = 0
trigger1 = P2Dist X <= 0
trigger1 = P2Dist Y < 50
value = Anim
elem = 5

[State 10035, 1]
type = ChangeAnim
triggerall = NumHelper(10090) = 0
trigger1 = P2Dist X <= 0
trigger1 = P2Dist Y = [50,200]
value = Anim
elem = 6

[State 10035, 2]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn
flag2 = NoShadow

[State 10035, Hit]
type = HitOverride
trigger1 = 1
slot = 0
stateno = 10035
attr = SCA, NA, SA, NP, SP, AT
time = 1

[State 10035, Hit]
type = HitOverride
trigger1 = 1
slot = 1
stateno = 10031
attr = SCA, HA, HP
time = 1

[State 10035, 4]
type = ChangeState
trigger1 = Root, Lose
trigger2 = Root, Life = 0
trigger3 = GetHitVar(HitCount) >= 3
value = 10031

[State 10035, 5]
type = ChangeState
trigger1 = Time >= 20
value = 10030

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




















; Head Hit Death
[Statedef 15151]
type = S
movetype = H
sprpriority = -3
anim = 10040

[State 15151, Damage]
type = Helper
trigger1 = Time = 0
helpertype = normal
name = "Damage Check"
id = 10705
pos = 0,0
postype = p1
stateno = 10007
keyctrl = 0
ownpal = 1


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