;The Green Ranger's Special Move States
;---------------------------------------------------------------------------
; Weak Electroball
; CNS difficulty: medium
[Statedef 1000]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 110
velset = 0,0
anim = 1000
ctrl = 0
sprpriority = 2

[State 1000, 1]
type = PlaySnd
trigger1 = Time = 8
value = 0, 5

[State 1000, 5] ;Opponent near
type = HitDef
trigger1 = AnimElem = 2
trigger1 = p2bodydist X < 40
attr = S, SA
animtype  = Hard
damage    = 85, 4
priority  = 6
guardflag = MA
pausetime = 15,15
sparkno = s8002
sparkxy = 5,-65
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -4,-3.5
air.velocity = -4,-3
fall = 1

[State 1000, 6] ;Opponent not near
type = HitDef
trigger1 = AnimElem = 2
trigger1 = p2bodydist X >= 40
attr = S, SA
animtype  = Hard
damage    = 80, 4
priority  = 5
guardflag = MA
pausetime = 15,15
sparkno = s8002
sparkxy = 5,-65
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -7
air.velocity = -4,-2.5

[State 1000, 2.5]
type = MakeDust
trigger1 = Time = 0
trigger2 = Time = 1
trigger3 = Time = 2
trigger4 = Time = 3
trigger5 = Time = 4
trigger6 = Time = 5
trigger7 = Time = 6
trigger8 = Time = 7
trigger9 = Time = 8
trigger10 = Time = 9
trigger11 = Time = 10
trigger12 = Time = 11
trigger13 = Time = 12
trigger14 = Time = 13
trigger15 = Time = 14
trigger16 = Time = 15
trigger17 = Time = 16
postype  = p1
pos = -45
scale = 2

[State 1000, tgetr]
type = changestate
trigger1= Animtime = 0
value = 105

[State 1000, electroball]
type = Projectile
trigger1 = AnimElem = 3
projid = 1001
projanim = 1001
projremove = 0
projremovetime = 16
projshadow = -1
projsprpriority = 5
projhits = 1
;projscale = .75,.75
offset = 50, -70
velocity = 0, 0
remvelocity = 0, 0
accel = 0, 0
attr = S, SP
damage    = 50,5
getpower  = 40
givepower = 30
hitflag = MAF
guardflag = MA
pausetime = 12,12
guard.pausetime = 6,12
sparkno = -1
sparkxy = 0, 0
hitsound   = s0,4
guardsound = 6,0
ground.type = High
ground.slidetime = 22
ground.hittime  = 22
ground.velocity = -6,-2   
fall = 0
airguard.velocity = 0   
guard.velocity = 0   
air.type = High
air.velocity = -5,-6
palfx.time = 20
palfx.add = 20,150,20
palfx.sinadd = 200,100,150,7


[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Strong Electroball
[Statedef 1010]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 110
velset = 0,0
anim = 1000
ctrl = 0
sprpriority = 2

[State 1010, 1]
type = PlaySnd
trigger1 = Time = 8
value = 0, 5

[State 1010, 5] ;Opponent near
type = HitDef
trigger1 = AnimElem = 2
trigger1 = p2bodydist X < 40
attr = S, SA
animtype  = Hard
damage    = 85, 4
priority  = 6
guardflag = MA
pausetime = 15,15
sparkno = s8002
sparkxy = 5,-65
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -4,-3.5
air.velocity = -4,-3
fall = 1

[State 1010, 6] ;Opponent not near
type = HitDef
trigger1 = AnimElem = 2
trigger1 = p2bodydist X >= 40
attr = S, SA
animtype  = Hard
damage    = 80, 4
priority  = 5
guardflag = MA
pausetime = 15,15
sparkno = s8002
sparkxy = 5,-65
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -7
air.velocity = -4,-2.5

[State 1010, 2.5]
type = MakeDust
trigger1 = Time = 0
trigger2 = Time = 1
trigger3 = Time = 2
trigger4 = Time = 3
trigger5 = Time = 4
trigger6 = Time = 5
trigger7 = Time = 6
trigger8 = Time = 7
trigger9 = Time = 8
trigger10 = Time = 9
trigger11 = Time = 10
trigger12 = Time = 11
trigger13 = Time = 12
trigger14 = Time = 13
trigger15 = Time = 14
trigger16 = Time = 15
trigger17 = Time = 16
postype  = p1
pos = -45
scale = 2

[State 1010, tgetr]
type = changestate
trigger1= Animtime = 0
value = 105

[State 1010, electroball]
type = Projectile
trigger1 = AnimElem = 3
projid = 1001
projanim = 1001
projremove = 0
projremovetime = 16
projshadow = -1
projsprpriority = 5
projhits = 2
offset = 50, -70
velocity = 0, 0
remvelocity = 0, 0
accel = 0, 0
attr = S, SP
damage    = 60,5
getpower  = 60
givepower = 30
hitflag = MAF
guardflag = MA
pausetime = 12,12
guard.pausetime = 6,12
sparkno = -1
sparkxy = 0, 0
hitsound   = s0,4
guardsound = 6,0
ground.type = High
ground.slidetime = 22
ground.hittime  = 22
ground.velocity = -6,-2   
fall = 1
airguard.velocity = 0   
guard.velocity = 0   
air.type = High
air.velocity = -5,-6
palfx.time = 50
palfx.add = 20,150,20
palfx.sinadd = 200,100,150,7

[State 1010, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Air Weak Electroball
[Statedef 1020]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 110
velset = 0,0
anim = 1003
ctrl = 0
sprpriority = 2

[State 1020, 1]
type = PlaySnd
trigger1 = Time = 8
value = 0, 5

[State 1020, electroball]
type = Projectile
trigger1 = AnimElem = 2
trigger1 = numproj = 0
projid = 1001
projanim = 1001
projremove = 0
projremovetime = 16
projshadow = -1
projsprpriority = 5
projhits = 1
offset = 50, -70
velocity = 0, 0
remvelocity = 0, 0
accel = 0, 0
attr = S, SP
damage    = 40,10
getpower  = 60
givepower = 30
hitflag = MAF
guardflag = MA
pausetime = 12,12
guard.pausetime = 6,12
sparkno = -1
sparkxy = 0, 0
hitsound   = s0,4
guardsound = 6,0
ground.type = High
ground.slidetime = 22
ground.hittime  = 22
ground.velocity = -6,-2   
fall = 1
airguard.velocity = 0   
guard.velocity = 0   
air.type = High
air.velocity = -5,-4
palfx.time = 50
palfx.add = 20,150,20
palfx.sinadd = 200,100,150,7

[State 1020, tgetr]
type = changeanim
trigger1= animtime = 0
value = 1023

[State 1020, VelSet]
type = VelSet
trigger1 = animelem = 1
x = -6
y = -1.5

[State 1020, 7]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0 
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Air Strong Electroball
[Statedef 1030]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 110
velset = 0,0
anim = 1003
ctrl = 0
sprpriority = 2

[State 1030, 1]
type = PlaySnd
trigger1 = Time = 8
value = 0, 5

[State 1030, electroball]
type = Projectile
trigger1 = AnimElem = 2
trigger1 = numproj = 0
projid = 1001
projanim = 1001
projremove = 0
projremovetime = 16
projshadow = -1
projsprpriority = 5
projhits = 2
offset = 50, -70
velocity = 0, 0
remvelocity = 0, 0
accel = 0, 0
attr = S, SP
damage    = 60,10
getpower  = 60
givepower = 30
hitflag = MAF
guardflag = MA
pausetime = 12,12
guard.pausetime = 6,12
sparkno = -1
sparkxy = 0, 0
hitsound   = s0,4
guardsound = 6,0
ground.type = High
ground.slidetime = 22
ground.hittime  = 22
ground.velocity = -6,-2   
fall = 1
airguard.velocity = 0   
guard.velocity = 0   
air.type = High
air.velocity = -5,-4
palfx.time = 50
palfx.add = 20,150,20
palfx.sinadd = 200,100,150,7
numhts = 2

[State 1030, tgetr]
type = changeanim
trigger1= animtime = 0
value = 1023

[State 1030, VelSet]
type = VelSet
trigger1 = animelem = 1
x = -6
y = -1.5

[State 1030, 7]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0 
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Weak Dragon Knee
[Statedef 1050]
type    = S
movetype= A
physics = S
juggle  = 2
poweradd= 110
velset = 0,0
anim = 1050
ctrl = 0
sprpriority = 2

[State 1050, 1]
type = PlaySnd
trigger1 = Time = 1
value = s14,3

[State 1050, 2]
type = PosAdd
trigger1 = AnimElem = 2
x = 15

[State 1050, 3]
type = PosAdd
trigger1 = AnimElem = 4
x = 25

[State 1050, 4]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype  = Medium
damage    = 50, 10
priority  = 5
guardflag = MA
pausetime = 12,12
sparkno = s8001
sparkxy = -5,-60
hitsound   = s16,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3.5,-7
guard.velocity = -7
air.velocity = -3.5,-7
fall = 1

[State 1050, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 1051

;------------------
; Light Dragon Knee - jump
[Statedef 1051]
type    = A
movetype= A
physics = N
velset = 3,-6.5
anim = 1051
hitdefpersist = 1 ;Keep the HitDef from previous state active

[State 1051, 1] ;Gravity
type = VelAdd
trigger1 = 1
y = .45

[State 1051, 4]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype  = Medium
damage    = 50, 10
priority  = 5
guardflag = MA
pausetime = 12,12
sparkno = s8001
sparkxy = -5,-60
hitsound   = s16,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3.5,-7
guard.velocity = -7
air.velocity = -3.5,-7
fall = 1

[State 1051, 2]
type = ChangeState
trigger1 = Command = "a" || Command = "b"
trigger1 = Vel y < -1
value = 1055

[State 1051, 3] ;Change state when KFM is close to ground
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 1052

;------------------
; Light Dragon Knee - land
[Statedef 1052]
type    = S
movetype= I
physics = S
anim = 1052
sprpriority = 1
velset = 0,0

[State 1052, 1] ;Reset y-position to ground level
type = PosSet
trigger1 = Time = 0
y = 0

[State 1052, 2] ;Play a sound for landing
type = PlaySnd
trigger1 = Time = 0
value = 40, 0

[State 1052, 3] ;Give KFM back control early
type = CtrlSet
trigger1 = AnimElem = 2, -1
value = 1

[State 1052, 4] ;Move KFM back a little
type = PosAdd
trigger1 = AnimElem = 4
x = -15

[State 1052, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;------------------
; Light Dragon Knee - kick
[Statedef 1055]
type    = A
movetype= A
physics = N
anim = 1055

[State 1055, 1]
type = PlaySnd
trigger1 = Time = 0
value = 100,0
channel = 0

[State 1055, 2]
type = PlaySnd
trigger1 = Time = 0
value = s14, 3

[State 1055, 3]
type = PosAdd
trigger1 = Time = 0
x = 10
y = -10

[State 1055, 4] ;Gravity
type = VelAdd
trigger1 = 1
y = .45

[State 1055, 5]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype  = Med
damage    = 35, 10
priority  = 4
guardflag = MA
pausetime = 12,12
sparkno = s8001
sparkxy = 0,-50
hitsound   = s16,5
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 18
ground.velocity = -6
guard.velocity = -6
air.velocity = -8,8
airguard.velocity = -4,-4.5
air.fall = 1
fall = 1

[State 1055, 6] ;Change state when KFM is close to ground
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -5
value = 1056

;------------------
; Light Dragon Knee - land from kick
[Statedef 1056]
type    = S
movetype= I
physics = S
anim = 1056
sprpriority = 1
velset = 0,0

[State 1056, 1] ;Reset y-position to ground level
type = PosSet
trigger1 = Time = 0
y = 0

[State 1056, 2] ;Play a sound for landing
type = PlaySnd
trigger1 = Time = 0
value = 40, 0

[State 1056, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Strong Dragon Knee
[Statedef 1060]
type    = S
movetype= A
physics = S
juggle  = 2
poweradd= 120
velset = 0,0
anim = 1060
ctrl = 0
sprpriority = 2

[State 1060, 1]
type = PlaySnd
trigger1 = Time = 1
value = s14,3

[State 1060, 2]
type = PosAdd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
x = 14

[State 1060, 3]
type = PosAdd
trigger1 = AnimElem = 4
x = 25

[State 1060, 4]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype  = Medium
damage    = 65, 20
priority  = 5
guardflag = MA
pausetime = 12,12
sparkno = s8001
sparkxy = -5,-70
hitsound   = s16,5
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3.5,-7.5
guard.velocity = -7
air.velocity = -3.5,-7.5
fall = 1

[State 1060, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 1061

;------------------
; Strong Dragon Knee - jump
[Statedef 1061]
type    = A
movetype= A
physics = N
velset = 4,-9
anim = 1061
;hitdefpersist = 1 ;Keep the HitDef from previous state active

[State 1061, 4]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype  = Medium
damage    = 65, 20
priority  = 5
guardflag = MA
pausetime = 12,12
sparkno = s8001
sparkxy = -5,-70
hitsound   = s16,5
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3.5,-7.5
guard.velocity = -7
air.velocity = -3.5,-7.5
fall = 1

[State 1061, 1]
type = VelAdd
trigger1 = 1
y = .45

[State 1061, 2]
type = ChangeState
trigger1 = Command = "a" || Command = "b"
trigger1 = Vel y < -1
value = 1055

[State 1061, 3]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 1052

;---------------------------------------------------------------------------
; Light Darkness Sword Uppercut
[Statedef 1100]
type    = A
movetype= A
physics = S
juggle  = 4
poweradd= 110
velset = 0,0
anim = 1100
ctrl = 0
sprpriority = 2

[State 1100, Width]
type = Width
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(13) < 0
value = 5,0

[State 1100, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 2, 3

[State 1100, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 18, 0

[State 1100, 9]
type = StateTypeSet
trigger1 = animelem = 6
physics = A

[State 1100, 8]
type = VelSet
trigger1 = animelem = 6
x = 2
y = -7

[State 1100, 9]
type = PosAdd
trigger1 = animelem = 4
x = 3

[State 1100, 10]
type = Null;VelMul
trigger1 = Time >= 10
x = .73

[State 1100, 11] ;Gravity
type = null;VelAdd
trigger1 = Time >= 10
y = .60

[State 1100, 12] ;Change to coming down animation
type = ChangeAnim
trigger1 = Vel Y > -1
trigger1 = Time >= 30
value = 1101
persistent = 0

[State 1100, 13] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= -5
type = ChangeState
value = 52

[State 1100, 2]
type = HitDef
trigger1 = animelem = 2
trigger2 = animelem = 3
trigger3 = animelem = 4
attr = S, SA
animtype  = Med
damage    = 52, 4
priority  = 5
guardflag = MA
pausetime = 4,8
sparkno = s8000
sparkxy = 0,-48
hitsound   = 5,2
guardsound = 6,0
ground.type = Normal
ground.slidetime = 15
ground.hittime  = 18
ground.velocity = -3
guard.velocity = -6
air.velocity = -2,-2
airguard.velocity = -4,-4.5
p2facing = 1

[State 1100, 3]
type = HitDef
trigger1 = animelem = 5
trigger2 = AnimElem = 6
attr = A, SA
animtype  = Up
damage    = 55, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkno = s8000
sparkxy = 0,-70
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 18
ground.velocity = -2,-9.5
guard.velocity = -6
air.velocity = -2,-7.5
airguard.velocity = -4,-4.5
p2facing = 1
fall = 1                   ;Make p2 fall down
fall.recovertime = 40      ;40 ticks before p2 can recover from fall
yaccel = .4                ;p2 will accelerate down at .4 pixels/sec^2 when falling

[State 1100, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1



;---------------------------------------------------------------------------
; Strong Darkness Sword Uppercut
[Statedef 1110]
type    = A
movetype= A
physics = S
juggle  = 4
poweradd= 110
velset = 0,0
anim = 1100
ctrl = 0
sprpriority = 2

[State 1110, Width]
type = Width
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(13) < 0
value = 5,0

[State 1110, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 2, 3

[State 1110, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 18, 0

[State 1110, 8]
type = VelSet
trigger1 = animelem = 6
x = 3
y = -9

[State 1100, 9]
type = StateTypeSet
trigger1 = animelem = 6
type = A
movetype = A
physics = A

[State 1110, 9]
type = PosAdd
trigger1 = animelem = 4
x = 3

[State 1110, 10]
type = null;VelMul
trigger1 = Time >= 10
x = .85

[State 1110, 11] ;Gravity
type = null;VelAdd
trigger1 = Time >= 10
y = .44

[State 1110, 12] ;Change to coming down animation
type = ChangeAnim
trigger1 = Vel Y > -1
trigger1 = Time >= 30
value = 1101
persistent = 0

[State 1110, 13] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= -5
type = ChangeState
value = 52

[State 1110, 2]
type = HitDef
trigger1 = animelem = 2
trigger2 = animelem = 3
trigger3 = animelem = 4
attr = S, SA
animtype  = Med
damage    = 72, 4
priority  = 5
guardflag = MA
pausetime = 4,8
sparkno = s8001
sparkxy = 0,-48
hitsound   = 5,2
guardsound = 6,0
ground.type = Normal
ground.slidetime = 15
ground.hittime  = 18
ground.velocity = -2,-6
guard.velocity = -6
air.velocity = -2,-6
airguard.velocity = -4,-4.5
p2facing = 1

[State 1110, 3]
type = HitDef
trigger1 = animelem = 5
trigger2 = AnimElem = 6
attr = A, SA
animtype  = Up
damage    = 85, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkno = s8001
sparkxy = 0,-70
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 18
ground.velocity = -3,-13
guard.velocity = -6
air.velocity = -3,-13
airguard.velocity = -4,-4.5
p2facing = 1
fall = 1                   ;Make p2 fall down
fall.recovertime = 40      ;40 ticks before p2 can recover from fall
yaccel = .4                ;p2 will accelerate down at .4 pixels/sec^2 when falling

[State 1110, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;WEAK FLUTE RAY ATTACK
[Statedef 1080]
type    = S
movetype= A
physics = S
juggle  = 7
poweradd= 120
velset = 0,0
anim = 3311
ctrl = 0
sprpriority = 2

[State 1080, HitDef]
type = HitDef
trigger1 = Animelem = 4
trigger2 = Animelem = 5
attr = S, SA
hitflag = MAF
guardflag = MA
animtype = Hard
air.animtype = Hard
priority = 4,Hit
damage = 10,0
pausetime = 10,12
sparkno = -1
guard.sparkno = 0
sparkxy = 0,-72
hitsound = s2,2
guardsound = 6,0
ground.type = High
air.type = High
ground.slidetime = 5
guard.slidetime = 5
ground.hittime = 12
guard.hittime = 7
air.hittime = 10
ground.velocity = -1,0
air.velocity = -3,-1
sprpriority = 2
getpower = 50,20
givepower = 20,0
palfx.time = 20
palfx.sinadd = 25,25,25,4
numhits = 1

[State 1080, ChangeAnim]
type = ChangeState
trigger1 = Animtime = 0
value = 1081

[Statedef 1081, ChangeState]
type = S
movetype = I
physics = S
juggle = 0
anim = 3312

[State 1080, Changestate]
type = ChangeState
trigger1 = AnimElemTime(3) = 3
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;STRONG FLUTE RAY ATTACK
[Statedef 1090]
type    = S
movetype= A
physics = S
juggle  = 7
poweradd= 120
velset = 0,0
anim = 3315
ctrl = 0
sprpriority = 2

[State 1090, HitDef]
type = HitDef
trigger1 = Animelem = 4
trigger2 = Animelem = 5
trigger3 = Animelem = 6
trigger4 = Animelem = 7
trigger5 = Animelem = 8
trigger6 = Animelem = 9
trigger7 = Animelem = 10
trigger8 = Animelem = 11
attr = S, SA
hitflag = MAF
guardflag = MA
animtype = Hard
air.animtype = Hard
priority = 6,Hit
damage = 10,5
pausetime = 10,12
sparkno = -1
guard.sparkno = 0
sparkxy = 0,-72
hitsound = s2,2
guardsound = 6,0
ground.type = High
air.type = High
ground.slidetime = 5
guard.slidetime = 5
ground.hittime = 12
guard.hittime = 7
air.hittime = 10
ground.velocity = -4,-3
air.velocity = -3,-3
sprpriority = 2
getpower = 40,20
givepower = 20,0
palfx.time = 20
palfx.add = 0,80,0
palfx.sinadd = 25,25,25,4
numhits = 1
Fall =1

[State 1090, ChangeAnim]
type = ChangeState
trigger1 = Animtime = 0
value = 1081

[Statedef 1081, ChangeState]
type = S
movetype = I
physics = S
juggle = 0
anim = 3312

[State 1080, Changestate]
type = ChangeState
trigger1 = AnimElemTime(3) = 3
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;FLUTE RAY ENERGY TRANSFER
[Statedef 1095]
type    = S
movetype= A
physics = S
juggle  = 7
poweradd= 120
velset = 0,0
anim = 3315
ctrl = 0
sprpriority = 2

[State 1095, PalFX]
type = PalFX
trigger1 = movehit = 1
trigger1 = anim = 3315
time = 100
sinadd = 100,150,45,8
invertall = 0
ignorehitpause = 1

[State 1095, PalFX]
type = PalFX
trigger1 = animelem = 2
time = 30
sinadd = 100,150,45,8
invertall = 0
ignorehitpause = 1

[State 1095, Pause]
type = Pause
trigger1 = animelem = 2
time = 15

[State 1095, HitDef]
type = HitDef
trigger1 = Animelem = 4
trigger2 = Animelem = 5
trigger3 = Animelem = 6
trigger4 = Animelem = 7
trigger5 = Animelem = 8
trigger6 = Animelem = 9
trigger7 = Animelem = 10
trigger8 = Animelem = 11
attr = S, SA
hitflag = MAF
guardflag = MA
animtype = Hard
air.animtype = Hard
priority = 6,Hit
damage = 0,0
pausetime = 10,12
sparkno = -1
guard.sparkno = 0
sparkxy = 0,-72
hitsound = s15,0
guardsound = 6,0
ground.type = High
air.type = High
ground.slidetime = 5
guard.slidetime = 5
ground.hittime = 12
guard.hittime = 7
air.hittime = 10
ground.velocity = -1
air.velocity = -3
sprpriority = 2
getpower = 50,10
givepower = -50,-10
palfx.time = 20
palfx.sinadd = 100,200,30,4
palfx.invertall = 1
numhits = 1
Fall = 0

[State 1095, ChangeAnim]
type = ChangeState
trigger1 = Animtime = 0
value = 1081

[Statedef 1081, ChangeState]
type = S
movetype = I
physics = S
juggle = 0
anim = 3312

[State 1080, Changestate]
type = ChangeState
trigger1 = AnimElemTime(3) = 3
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;FLUTE RAY LIFE TRANSFER
[Statedef 1096]
type    = S
movetype= A
physics = S
juggle  = 7
poweradd= 120
velset = 0,0
anim = 3315
ctrl = 0
sprpriority = 2

[State 1096, PalFX]
type = PalFX
trigger1 = movehit = 1
trigger1 = anim = 3315
time = 100
sinadd = 100,150,45,8
invertall = 0
ignorehitpause = 1

[State 1096, PalFX]
type = PalFX
trigger1 = animelem = 2
time = 30
sinadd = 80,80,10,4
invertall = 0
ignorehitpause = 1

[State 1096, Pause]
type = Pause
trigger1 = animelem = 2
time = 15

[State 1096, HitDef]
type = HitDef
trigger1 = Animelem = 4
trigger2 = Animelem = 5
trigger3 = Animelem = 6
trigger4 = Animelem = 7
trigger5 = Animelem = 8
trigger6 = Animelem = 9
trigger7 = Animelem = 10
trigger8 = Animelem = 11
attr = S, SA
hitflag = MAF
guardflag = MA
animtype = Hard
air.animtype = Hard
priority = 6,Hit
damage = 30,0
pausetime = 10,12
sparkno = -1
guard.sparkno = 0
sparkxy = 0,-72
hitsound = s15,0
guardsound = 6,0
ground.type = High
air.type = High
ground.slidetime = 5
guard.slidetime = 5
ground.hittime = 12
guard.hittime = 7
air.hittime = 10
ground.velocity = -1
air.velocity = -3
sprpriority = 2
getpower = 0,0
givepower = 100,0
palfx.time = 20
palfx.sinadd = 100,200,30,4
palfx.invertall = 1
numhits = 1
Fall = 1

[State 1096, LifeAdd]
type = LifeAdd
trigger1 = hitcount = 1
trigger2 = hitcount = 2
trigger3 = hitcount = 3
trigger4 = hitcount = 4
trigger5 = hitcount = 5
trigger6 = hitcount = 6
trigger7 = hitcount = 7
trigger8 = hitcount = 8
value = 1
absolute = 1
ignorehitpause = 1

[State 1096, ChangeAnim]
type = ChangeState
trigger1 = Animtime = 0
value = 1081

[Statedef 1081, ChangeState]
type = S
movetype = I
physics = S
juggle = 0
anim = 3312

[State 1080, Changestate]
type = ChangeState
trigger1 = AnimElemTime(3) = 3
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;Weak Gunshot
[Statedef 1200]
type    = S
movetype= A
physics = S
juggle  = 7
poweradd= 120
velset = 0,0
anim = 1200
ctrl = 0
sprpriority = 2

[State 1200, Helper]
type = Helper
trigger1 = animelem = 4
helpertype = normal
name = "Laser"
ID = 916
pos = 10,-71
postype = p1
stateno = 1201
keyctrl = 0
ownpal = 1

[State 1200, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

[State 1200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 18,1
volume = 80
channel = 1
persistent = 0

;------------
;Light Amplification through Simulated Emmitted Radition Beam
;------------
[Statedef 1201]
type = A
movetype = A
velset = 7, 0
anim = 1080
sprpriority = 2

[State 1201, Var]
type = VarRandom
trigger1 = movecontact
v = 30
value = 1

[State 1201,1]
type = HitDef
trigger1 = time = 0
attr = S, SA
animtype = Hard
damage = 70,15
guardflag = MA
pausetime = 5,11
sparkno = s8003
guard.sparkno = s8003 
sparkxy = 0,0
hitsound = s2,2
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -1,-1    
air.velocity = -2.2,-3.2
palfx.time = 7
palfx.add = 220,0,0
palfx.sinadd = 40,0,10,4

[State 1201,2]
type = DestroySelf
trigger1 = time = 50

;---------------------------------------------------------------------------
;Strong Gunshot
[Statedef 1202]
type    = S
movetype= A
physics = S
juggle  = 7
poweradd= 120
velset = 0,0
anim = 1200
ctrl = 0
sprpriority = 2

[State 1202, Helper]
type = Helper
trigger1 = animelem = 4
helpertype = normal
name = "Laser"
ID = 916
pos = 10,-71
postype = p1
stateno = 1203
keyctrl = 0
ownpal = 1

[State 1200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 18,2
volume = 80
channel = 1

[State 1202, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;------------
;Strong Amplification through Simulated Emmitted Radition Beam
;------------
[Statedef 1203]
type = A
movetype = A
velset = 10, 0
anim = 1080
sprpriority = 2

[State 1203, Var]
type = VarRandom
trigger1 = movecontact
v = 30
value = 1

[State 1203,1]
type = HitDef
trigger1 = AnimElem = 1
trigger2 = AnimElem = 2
trigger3 = AnimElem = 3
trigger4 = AnimElem = 4
trigger5 = AnimElem = 5
attr = S, SA
animtype = Hard
damage = 27,10
guardflag = MA
pausetime = 0,0
sparkno = s8003
guard.sparkno = s8003
sparkxy = 0,0
hitsound = s2,2;s1,3
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -1,-2    
air.velocity = -2.2,-3.2
palfx.time = 7
palfx.add = 180,0,0
palfx.sinadd = 400,-20,10,7
fall = 1
fall.recover = 1
airfall = 1

[State 1203,2]
type = DestroySelf
trigger1 = time = 50

;---------------------------------------------------------------------------
;Air Weak Gunshot
[Statedef 1204]
type    = A
movetype= A
physics = A
juggle  = 7
poweradd= 120
anim = 1204
ctrl = 0
sprpriority = 2

[State 1202, Helper]
type = Helper
trigger1 = animelem = 4
helpertype = normal
name = "Laser"
ID = 916
pos = 10,-71
postype = p1
stateno = 1205
keyctrl = 0
ownpal = 1

[State 1200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 18,2
volume = 80
channel = 1

[State 1202, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 43
ctrl = 1

;------------
;Light Amplification through Simulated Emmitted Radition Beam
;------------
[Statedef 1205]
type = A
movetype = A
velset = 7, 0
anim = 1080
sprpriority = 2

[State 1205, Var]
type = VarRandom
trigger1 = movecontact
v = 30
value = 1

[State 1201,1]
type = HitDef
trigger1 = time = 0
attr = S, SA
animtype = Hard
damage = 70,15
guardflag = MA
pausetime = 5,11
sparkno = s8003
guard.sparkno = s8003 
sparkxy = 0,0
hitsound = s2,2
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -4,-1    
air.velocity = -6,-3.2
palfx.time = 20
palfx.add = 220,0,0
palfx.sinadd = 40,0,10,4

[State 1201,2]
type = DestroySelf
trigger1 = time = 50

;---------------------------------------------------------------------------
;Air Strong Gunshot
[Statedef 1206]
type    = A
movetype= A
physics = A
juggle  = 7
poweradd= 120
anim = 1204
ctrl = 0
sprpriority = 2

[State 1202, Helper]
type = Helper
trigger1 = animelem = 4
helpertype = normal
name = "Laser"
ID = 916
pos = 10,-71
postype = p1
stateno = 1207
keyctrl = 0
ownpal = 1

[State 1200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 18,2
volume = 80
channel = 1

[State 1202, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 43
ctrl = 1

;------------
;Strong Amplification through Simulated Emmitted Radition Beam
;------------
[Statedef 1207]
type = A
movetype = A
velset = 10, 0
anim = 1080
sprpriority = 2

[State 1203, Var]
type = VarRandom
trigger1 = movecontact
v = 30
value = 1

[State 1203,1]
type = HitDef
trigger1 = AnimElem = 1
trigger2 = AnimElem = 2
trigger3 = AnimElem = 3
trigger4 = AnimElem = 4
trigger5 = AnimElem = 5
attr = S, SA
animtype = Hard
damage = 27,10
guardflag = MA
pausetime = 0,0
sparkno = s8003
guard.sparkno = s8003
sparkxy = 0,0
hitsound = s2,2;s1,3
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -7,-2    
air.velocity = -6,-3.2
palfx.time = 7
palfx.add = 180,0,0
palfx.sinadd = 400,-20,10,7
fall = 1
fall.recover = 1
airfall = 1

[State 1203,2]
type = DestroySelf
trigger1 = time = 50
;-------------------------------------------------------------------------------------
;Power Charge
[Statedef 1300]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 1300
ctrl = 0
sprpriority = 1

[State 1300, PowerAdd]
type = PowerAdd 
triggerall = time > 0
trigger1 = command = "hold_y" 
trigger1 = command = "hold_b" 
value = 5

[State 1300, lower energy]
type = explod
triggerall = numexplod(4) = 0
trigger1 = animelem = 4
anim = 198
postype = p1
pos = 0,0
sprpriority = 2
removetime = -1
ownpal = 1
ontop = 1
removeongethit=1
ID = 4

[State 1300, remove lower energy]
type = RemoveExplod
trigger1 = command != "hold_y" 
trigger2 = command != "hold_b"
trigger3 = ctrl = 1 
ID = 4

[State 1300, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(4) = 0
trigger2 = animelemtime(4) = 210
trigger3 = animelemtime(4) = 420
value = 89,1
channel = 0
loop = 0

[State 1300, StopSnd]
type = StopSnd
trigger1 = command != "hold_y" 
trigger2 = command != "hold_b" 
channel = 0

[State 1300, Blink] 
type = PalFX 
trigger1 = power = 3000
time = 24
add = 10,30,10
sinadd = -155,-155,-155,50

[State 1300, push]
type = PlayerPush
trigger1 = time > 0
value = 0
;ignorehitpause = 0
;persistent = 1

[State 1300, PlaySnd]
type = PlaySnd
triggerall = power = 3000
trigger1 = command != "hold_y" 
trigger2 = command != "hold_b" 
value = 89,2
volume = 100

[State 1300, End] 
type = ChangeState 
;triggerall = time > 50
trigger1 = command != "hold_y" 
trigger2 = command != "hold_b" 
value = 0
ctrl = 1
;--------------------------------------------------------
;Super Jump
;Super jump start
; Jump Start
[Statedef 1301]
type    = A
physics = N
anim = 40
ctrl = 0
sprpriority = 1

[State 441, 2]
type = PlaySnd
trigger1 = Time = 0
value = s7, 1

[State 1301, Shadow]
type = AfterImage
trigger1 = Time = 0
time = 15
TimeGap = 2
FrameGap = 1
length = 30
PalBright   = 0,0,0
PalContrast = 0,150,0
Trans = add

[State 40, 4]
type = VelSet
trigger1 = Time = 0
y = -19

[State 40, 4]
type = veladd
trigger1 = Time >= 0
y = 2.4

[State 40, 4]
type = VelSet
trigger1 = command = "holdfwd2"
x = 6

[State 40, 4]
type = VelSet
trigger1 = command = "holdback2" 
x = -5.5

[State 40, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1
















