;=====================<SOUL FLASH>==========================
[StateDef 1000]
type = S
physics = S
moveType = A
anim = 1000
ctrl = 0
velset = 0,0
sprPriority = 1
poweradd = 84 * !var(20)
faceP2 = 1

[State 1000, Button Detect]
type = VarSet
trigger1 = !Time
var(10) = ifElse((helper(10371), var(0)) || (helper(10371), var(7)), 0, ifElse((helper(10371), var(1)) || (helper(10371), var(8)), 1, 2))

;[State 1000, ChangeAnim]
;type = ChangeAnim
;trigger1 = !Time
;value = ifelse(var(10)=2, 1002, ifelse(var(10)=1, 1001, 1000))

[State 1000, Voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1000,0
channel = 0

[State 1000, Blast Snd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 1000, 1
channel = 2

[State 1000, Width: Edge]
type = Width
trigger1 = AnimElemTime(6) < 0
edge = 50,0

[State 1000, Width: Player]
type = Width
trigger1 = AnimElemTime(5) = 0
player = 35,0

[State 1000, Glitter FX]
type = Explod
trigger1 = !NumExplod(1004)
trigger1 = AnimElem = 5
anim = 1004
ID = 1004
pos = ceil(-1*const(size.xscale)),ceil(-9*const(size.yscale))
postype = P1
sprpriority = 3
scale = const(size.xscale),const(size.yscale)
ignorehitpause = 1
bindtime = -1
;pausemovetime = 65535
;supermovetime = 65535
ownpal = 1
removeongethit = 1

[State 1000, Projectile]
type = Helper
trigger1 = AnimElemTime(5) = 0
helperType = Normal
stateNo = 1005
ID = 1010
name = "Soul Flash"
posType = P1
pos = ceil(60*const(size.xscale)),ceil(-59*const(size.yscale))
size.xScale = 0.4
size.yScale = 0.4
keyctrl = 1
ownpal = 1
facing = 1
persistent = 0
ignorehitpause = 1

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

;=====================<EX SOUL FLASH>==========================
[StateDef 1030]
type = S
physics = S
moveType = A
anim = 1030
ctrl = 0
velset = 0,0
sprPriority = 1
poweradd = ifelse(var(20) > 0, 0, -500)
faceP2 = 1

[State 1030, MAX Timer Drain]
type = VarAdd
trigger1 = !Time
trigger1 = var(20) > 0
var(20) = -335

[State 1030, EX Sound]
type = PlaySnd
trigger1 = !Time
value = 0, ifelse(!fvar(31), 1000, 1001)

[State 1030, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 35

[State 1030, EX FX(Phantom)]
type = Explod
triggerall = !fvar(31)
trigger1 = !Time
anim = 8210
sprPriority = 3
posType = p1
pos = 3, -73
scale = 0.5, 0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1030, EX FX 1(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8220
sprpriority = 4
postype = p1
pos = 0, 0
bindtime = 1
facing = -1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1030, EX FX 2(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8221
sprpriority = -1
postype = p1
pos = 0, 0
bindtime = 1
facing = 1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1030, Voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1000,0
channel = 0

[State 1030, Blast Snd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 1000, 1
channel = 2

[State 1030, Width: Edge]
type = Width
trigger1 = AnimElemTime(6) < 0
edge = 50,0

[State 1030, Width: Player]
type = Width
trigger1 = AnimElemTime(5) = 0
player = 35,0

[State 1030, Glitter FX]
type = Explod
trigger1 = !NumExplod(1004)
trigger1 = AnimElem = 5
anim = 1004
ID = 1004
pos = ceil(-1*const(size.xscale)),ceil(-9*const(size.yscale))
postype = P1
sprpriority = 3
scale = const(size.xscale),const(size.yscale)
ignorehitpause = 1
bindtime = -1
;pausemovetime = 65535
;supermovetime = 65535
ownpal = 1
removeongethit = 1

[State 1030, Projectile]
type = Helper
trigger1 = AnimElemTime(5) = 0
helperType = Normal
stateNo = 1020
ID = 1010
name = "EX Soul Flash"
posType = P1
pos = ceil(60*const(size.xscale)),ceil(-59*const(size.yscale))
size.xScale = 0.4
size.yScale = 0.4
keyctrl = 1
ownpal = 1
facing = 1
persistent = 0
ignorehitpause = 1

[State 1030, End]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1

;=====================<AIR SOUL FLASH>==========================
[StateDef 1100]
type = A
physics = N
moveType = A
anim = 1100
ctrl = 0
velset = 0,0
sprPriority = 1
poweradd = 84 * !var(20)
;faceP2 = 1

[State 1100, Button Detect]
type = VarSet
trigger1 = !Time
var(10) = ifElse((helper(10371), var(0)) || (helper(10371), var(7)), 0, ifElse((helper(10371), var(1)) || (helper(10371), var(8)), 1, 2))

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1000,0
channel = 0

[State 1100, Blast Snd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 1000, 1
channel = 2

[State 1100, Width: Edge]
type = Width
trigger1 = 1
edge = 12,0

[State 1100, Width: Player]
type = Width
trigger1 = AnimElemTime(5) = 0
player = 30,0

[State 1100, Velocity]
type = VelSet
trigger1 = AnimElem = 4
x = -4
y = -6

[State 1100, Friction]
type = VelAdd
trigger1 = vel x < 0
trigger1 = AnimElemTime(4) > 0
x = 0.11

[State 1100, Gravity]
type = VelAdd
trigger1 = AnimElemTime(4) > 0
y = .42

[State 1100, Glitter FX]
type = Explod
trigger1 = !NumExplod(1004)
trigger1 = AnimElem = 4
anim = 1004
ID = 1004
pos = ceil(-39*const(size.xscale)),ceil(-20*const(size.yscale))
postype = P1
sprpriority = 3
scale = const(size.xscale),const(size.yscale)
ignorehitpause = 1
bindtime = -1
;pausemovetime = 65535
;supermovetime = 65535
ownpal = 1
removeongethit = 1

[State 1100, Projectile]
type = Helper
trigger1 = AnimElemTime(5) = 0
helperType = Normal
stateNo = 1105
ID = 1010
name = "Air Soul Flash"
posType = P1
pos = ceil(30*const(size.xscale)),ceil(-75*const(size.yscale))
size.xScale = 0.4
size.yScale = 0.4
keyctrl = 1
ownpal = 1
facing = 1
persistent = 0
ignorehitpause = 1

[State 1100, End]
type = ChangeState
trigger1 = AnimElemTime(6) >= 0
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1101

;Landing
[Statedef 1101]
type = S
movetype = I
physics = S
ctrl = 0
anim = 1101
velset = 0, 0

[State 1101, On Ground]
type = Posset
trigger1 = !Time
Y = 0

[State 1101, Land Snd]
type = PlaySnd
trigger1 = Time = 1
value = 52,0

[State 1101, Landing Dust Explod]
type = Explod
trigger1 = !Time
anim = 8102
sprpriority = -3
postype = P1
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1101, End]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1

;=====================<EX AIR SOUL FLASH>==========================
[StateDef 1130]
type = A
physics = N
moveType = A
anim = 1100
ctrl = 0
velset = 0,0
sprPriority = 1
poweradd = ifelse(var(20) > 0, 0, -500)
;faceP2 = 1

[State 1130, MAX Timer Drain]
type = VarAdd
trigger1 = !Time
trigger1 = var(20) > 0
var(20) = -335

[State 1130, EX Sound]
type = PlaySnd
trigger1 = !Time
value = 0, ifelse(!fvar(31), 1000, 1001)

[State 1130, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 45

[State 1130, EX FX(Phantom)]
type = Explod
triggerall = !fvar(31)
trigger1 = !Time
anim = 8210
sprPriority = 3
posType = p1
pos = 0, -73
scale = 0.5, 0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1130, EX FX 1(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8220
sprpriority = 4
postype = p1
pos = 0, 0
bindtime = 1
facing = -1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1130, EX FX 2(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8221
sprpriority = -1
postype = p1
pos = 0, 0
bindtime = 1
facing = 1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1130, Voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1000,0
channel = 0

[State 1130, Blast Snd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 1000, 1
channel = 2

[State 1130, Width: Edge]
type = Width
trigger1 = 1
edge = 12,0

[State 1130, Width: Player]
type = Width
trigger1 = AnimElemTime(5) = 0
player = 30,0

[State 1130, Velocity]
type = VelSet
trigger1 = AnimElem = 4
x = -4
y = -6

[State 1130, Friction]
type = VelAdd
trigger1 = vel x < 0
trigger1 = AnimElemTime(4) > 0
x = 0.11

[State 1130, Gravity]
type = VelAdd
trigger1 = AnimElemTime(4) > 0
y = .42

[State 1130, Glitter FX]
type = Explod
trigger1 = !NumExplod(1004)
trigger1 = AnimElem = 4
anim = 1004
ID = 1004
pos = ceil(-39*const(size.xscale)),ceil(-20*const(size.yscale))
postype = P1
sprpriority = 3
scale = const(size.xscale),const(size.yscale)
ignorehitpause = 1
bindtime = -1
;pausemovetime = 65535
;supermovetime = 65535
ownpal = 1
removeongethit = 1

[State 1130, Projectile]
type = Helper
trigger1 = AnimElemTime(5) = 0
helperType = Normal
stateNo = 1120
ID = 1010
name = "EX Air Soul Flash"
posType = P1
pos = ceil(30*const(size.xscale)),ceil(-75*const(size.yscale))
size.xScale = 0.4
size.yScale = 0.4
keyctrl = 1
ownpal = 1
facing = 1
persistent = 0
ignorehitpause = 1

[State 1130, End]
type = ChangeState
trigger1 = AnimElemTime(6) >= 0
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1101

;========================<SHINING BLADE>=======================
[Statedef 1200]
type = S
movetype = A
physics = S
anim = 1200
ctrl = 0
velset = 0,0
poweradd = 80 * !var(20)
sprpriority = 2
facep2 = 1

[State 1200, Button Detect]
type = VarSet
trigger1 = !Time
var(10) = ifElse((helper(10371), var(0)) || (helper(10371), var(7)), 0, ifElse((helper(10371), var(1)) || (helper(10371), var(8)), 1, 2))

[State 1200, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = ifelse(var(10)=2, 1220, ifelse(var(10)=1, 1210, 1200))

[State 1200, Width]
type = Width
trigger1 = 1
edge = 15,0

;[State 1200, Width]
;type = Width
;trigger1 = AnimElemTime(3) = 0
;player = 8,0

[State 1200, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1100,0
channel = 0

[State 1200, Swing Snd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1, 7
channel = 2

[State 1200, Jump Snd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 40,0
channel = 3

[State 1200, StateTypeSet: Air, No Phys]
type = StateTypeSet
trigger1 = AnimElem = 5
stateType = A
physics = N

[State 1200, Dust Helper]
type = Helper
trigger1 = AnimElem = 5
helperType = Normal
stateNo = 8100
ID = 8100
name = "Jump Dust"
posType = P1
ownPal = 1

[State 1200, Muteki]
type = Nothitby
trigger1 = AnimElemTime(4) < 0
time = 1
value = SCA

[State 1200, Rising Velocity]
type = VelSet
trigger1 = AnimElemTime(5) = 0
x = ifelse(var(10)=2,3, ifelse(var(10)=1, 2, 1))
y = ifelse(var(10)=2,-11, ifelse(var(10)=1, -9.5, -8))

[State 1200, VelStop]
type = VelSet
trigger1 = AnimElem = 9 && !var(10)
trigger2 = AnimElem = 10 && var(10)=1
trigger3 = AnimElem = 11 && var(10)=2
x = 0

[State 1200, Gravity/Friction]
type = VelAdd
trigger1 = AnimElemTime(5) > 0
x = ifElse(vel x <= 0, 0, -0.15)
y = .55

[State 1200, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 3   
attr = S, SA
damage = ceil(ifElse(fvar(11) * ifElse(var(10) = 2, 105, ifElse(var(10), 98, 91)) < 7, 7, fvar(11) * ifElse(var(10) = 2, 105, ifElse(var(10), 98, 91)))), 7
priority = 4, hit
animtype = Hard
getpower = 75 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8016)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 56), var(36) := -57
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -2, -10.5
air.velocity = -2,-10.5
guard.velocity = -10
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1200, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = !MoveContact && !MoveReversed
trigger1 = AnimElem = 4   
attr = S, SA
damage = ceil(ifElse(fvar(11) * ifElse(var(10) = 2, 70, ifElse(var(10), 63, 56)) < 7, 7, fvar(11) * ifElse(var(10) = 2, 70, ifElse(var(10), 63, 56)))), 7
priority = 4, hit
animtype = Hard
getpower = 75 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8016)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 66), var(36) := -92
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -2, -10.5
air.velocity = -2,-10.5
guard.velocity = -10
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1200, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = !MoveContact && !MoveReversed
trigger1 = AnimElem = 5 
attr = A, SA
damage = ceil(ifElse(fvar(11) * ifElse(var(10) = 2, 70, ifElse(var(10), 63, 56)) < 7, 7, fvar(11) * ifElse(var(10) = 2, 70, ifElse(var(10), 63, 56)))), 7
priority = 4, hit
animtype = Hard
getpower = 75 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8016)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 66), var(36) := -92
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -2, -10.5
air.velocity = -2,-10.5
guard.velocity = -8
airguard.velocity = -6, -1.5
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1200, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = !var(10) && AnimElemTime(7) >= 0
trigger2 = var(10)=1 && AnimElemTime(8) >= 0
trigger3 = var(10)=2 && AnimElemTime(9) >= 0
moveType = I

[State 1200, End]
type = ChangeState
trigger1 = StateType = A
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1101

;Alpha Counter Version
[Statedef 1201]
type = S
movetype = A
physics = S
anim = 1201
ctrl = 0
velset = 0,0
poweradd = 0
sprpriority = 2
facep2 = 1

[State 1201, Width]
type = Width
trigger1 = 1
edge = 15,0

[State 1201, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1100,0
channel = 0

[State 1201, Swing Snd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1, 7
channel = 2

[State 1201, Jump Snd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 40,0
channel = 3

[State 1201, StateTypeSet: Air, No Phys]
type = StateTypeSet
trigger1 = AnimElem = 5
stateType = A
physics = N

[State 1201, Dust Helper]
type = Helper
trigger1 = AnimElem = 5
helperType = Normal
stateNo = 8100
ID = 8100
name = "Jump Dust"
posType = P1
ownPal = 1

[State 1201, Muteki]
type = Nothitby
trigger1 = AnimElemTime(7) < 0
time = 1
value = SCA

[State 1201, Rising Velocity]
type = VelSet
trigger1 = AnimElemTime(5) = 0
x = 1
y = -8

[State 1201, VelStop]
type = VelSet
trigger1 = AnimElem = 9
x = 0

[State 1201, Gravity/Friction]
type = VelAdd
trigger1 = AnimElemTime(5) > 0
x = ifElse(vel x <= 0, 0, -0.12)
y = .55

[State 1201, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 3   
attr = S, SA
damage = ceil(ifElse(fvar(11) * 91 < 7, 7, fvar(11) * 91)), 7
priority = 6, hit
animtype = Diagup
getpower = 0, 0
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8016)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 56), var(36) := -57
air.animtype = Diagup
fall.animtype = Diagup
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -6, -8
air.velocity = -6,-8
guard.velocity = -10
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1201, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = !MoveContact && !MoveReversed
trigger1 = AnimElem = 4   
attr = S, SA
damage = ceil(ifElse(fvar(11) * 56 < 7, 7, fvar(11) * 56)), 7
priority = 6, hit
animtype = Diagup
getpower = 0, 0
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8016)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 66), var(36) := -92
air.animtype = Diagup
fall.animtype = Diagup
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -6, -8
air.velocity = -6,-8
guard.velocity = -10
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1201, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = !MoveContact && !MoveReversed
trigger1 = AnimElem = 4 
attr = A, SA
damage = ceil(ifElse(fvar(11) * 56 < 7, 7, fvar(11) * 56)), 7
priority = 6, hit
animtype = Diagup
getpower = 0, 0
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8016)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 66), var(36) := -92
air.animtype = Diagup
fall.animtype = Diagup
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -6, -7.5
air.velocity = -6,-7.5
guard.velocity = -8
airguard.velocity = -6, -1.5
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1201, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(7) >= 0
moveType = I

[State 1201, End]
type = ChangeState
trigger1 = StateType = A
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1101

;========================<EX SHINING BLADE>=======================
[Statedef 1230]
type = S
movetype = A
physics = S
anim = 1230
ctrl = 0
velset = 0,0
poweradd = ifelse(var(20) > 0, 0, -500)
sprpriority = 2
facep2 = 1

[State 1230, MAX Timer Drain]
type = VarAdd
trigger1 = !Time
trigger1 = var(20) > 0
var(20) = -335

[State 1230, EX Sound]
type = PlaySnd
trigger1 = !Time
value = 0, ifelse(!fvar(31), 1000, 1001)

[State 1230, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 35

[State 1230, EX FX(Phantom)]
type = Explod
triggerall = !fvar(31)
trigger1 = !Time
anim = 8210
sprPriority = 3
posType = p1
pos = -5, -43
scale = 0.5, 0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1230, EX FX 1(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8220
sprpriority = 4
postype = p1
pos = 0, 0
bindtime = 1
facing = -1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1230, EX FX 2(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8221
sprpriority = -1
postype = p1
pos = 0, 0
bindtime = 1
facing = 1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1230, Width]
type = Width
trigger1 = 1
edge = 15,0

[State 1230, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0,2
channel = 0

[State 1230, Swing Snd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1, 7
channel = 2

[State 1230, Jump Snd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 40,0
channel = 3

[State 1230, StateTypeSet: Air, No Phys]
type = StateTypeSet
trigger1 = AnimElem = 5
stateType = A
physics = N

[State 1230, Dust Helper]
type = Helper
trigger1 = AnimElem = 5
helperType = Normal
stateNo = 8100
ID = 8100
name = "Jump Dust"
posType = P1
ownPal = 1

[State 1230, Muteki]
type = Nothitby
trigger1 = AnimElemTime(5) < 0
time = 1
value = SCA

[State 1230, Rising Velocity]
type = VelSet
trigger1 = AnimElemTime(5) = 0
x = 2.5
y = -8

[State 1230, VelStop]
type = VelSet
trigger1 = AnimElem = 9
x = 0

[State 1230, Gravity/Friction]
type = VelAdd
trigger1 = AnimElemTime(5) > 0
x = ifElse(vel x <= 0, 0, -0.10)
y = .55

[State 1230, Fade]
type = Trans
trigger1 = AnimElemTime(5)>0
trans = addalpha
alpha = ceil(256 -8.5 * time), ceil(8.5 * time)

[State 1230, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 2
trigger1 = AnimElem = 3   
attr = S, SA
damage = ceil(ifElse(fvar(11) * 77 < 7, 7, fvar(11) * 77)), 7
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8016)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 56), var(36) := -57
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -1.15, -9.5
air.velocity = -1.15,-9.5
guard.velocity = -8
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .49
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1230, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 2
trigger1 = !MoveContact && !MoveReversed
trigger1 = AnimElem = 4   
attr = S, SA
damage = ceil(ifElse(fvar(11) * 56 < 7, 7, fvar(11) * 56)), 7
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8016)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 66), var(36) := -92
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -1.15, -9.5
air.velocity = -1.15, -9.5
guard.velocity = -8
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .49
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1230, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 2
trigger1 = !MoveContact && !MoveReversed
trigger1 = AnimElem = 4 
attr = A, SA
damage = ceil(ifElse(fvar(11) * 56 < 7, 7, fvar(11) * 56)), 7
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8016)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 66), var(36) := -92
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -1.15, -9.5
air.velocity = -1.15, -9.5
guard.velocity = -8
airguard.velocity = -6, -1.5
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .49
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1230, End]
type = ChangeState
trigger1 = !AnimTime
value = 1231

;2nd Attack
[Statedef 1231]
type = S
movetype = A
physics = S
anim = 1231
ctrl = 0
velset = 0,0
poweradd = 0
sprpriority = 2
;facep2 = 1

[State 1231, Posset]
type = PosSet
trigger1 = !Time
y = 0
ignorehitpause = 1

[State 1231, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 40

[State 1231, Width]
type = Width
trigger1 = 1
edge = 15,0

[State 1231, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1100,0
channel = 0

[State 1231, Swing Snd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1, 7
channel = 2

[State 1231, Jump Snd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 40,0
channel = 3

[State 1231, StateTypeSet: Air, No Phys]
type = StateTypeSet
trigger1 = AnimElem = 5
stateType = A
physics = N

[State 1231, Dust Helper]
type = Helper
trigger1 = AnimElem = 5
helperType = Normal
stateNo = 8100
ID = 8100
name = "Jump Dust"
posType = P1
ownPal = 1

[State 1231, Muteki]
type = Nothitby
trigger1 = AnimElemTime(5) < 0
time = 1
value = SCA

[State 1231, Rising Velocity]
type = VelSet
trigger1 = AnimElemTime(5) = 0
x = 5
y = -11

[State 1231, VelStop]
type = VelSet
trigger1 = AnimElem = 11
x = 0

[State 1231, Gravity/Friction]
type = VelAdd
trigger1 = AnimElemTime(5) > 0
x = ifElse(vel x <= 0, 0, -0.10)
y = .55

[State 1231, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 3
trigger1 = AnimElem = 3   
attr = S, SA
damage = ceil(ifElse(fvar(11) * 56 < 7, 7, fvar(11) * 56)), 7
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8016)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 56), var(36) := -57
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -2, -10.5
air.velocity = -2,-10.5
guard.velocity = -10
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1231, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 3
trigger1 = !MoveContact && !MoveReversed
trigger1 = AnimElem = 4   
attr = S, SA
damage = ceil(ifElse(fvar(11) * 49 < 7, 7, fvar(11) * 49)), 7
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8016)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 66), var(36) := -92
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -2, -10.5
air.velocity = -2,-10.5
guard.velocity = -10
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1231, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 3
trigger1 = !MoveContact && !MoveReversed
trigger1 = AnimElem = 4 
attr = A, SA
damage = ceil(ifElse(fvar(11) * 49 < 7, 7, fvar(11) * 49)), 7
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8016)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 66), var(36) := -92
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -2, -10.5
air.velocity = -2,-10.5
guard.velocity = -10
airguard.velocity = -6, -1.5
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1231, End]
type = ChangeState
trigger1 = StateType = A
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1101

;========================<MERRY SPIN>=======================
[Statedef 1300]
type = S
movetype = A
physics = S
anim = 1300
ctrl = 0
velset = 0,0
poweradd = 80 * !var(20)
sprpriority = 2
facep2 = 1

[State 1300, Button Detect]
type = VarSet
trigger1 = !Time
var(10) = ifElse((helper(10371), var(3)) || (helper(10371), var(10)), 0, ifElse((helper(10371), var(4)) || (helper(10371), var(11)), 1, 2))

[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = ifelse(var(10)=2, 1320, ifelse(var(10)=1, 1310, 1300))

[State 1300, Width]
type = Width
trigger1 = 1
edge = 20,0

[State 1300, Width]
type = Width
trigger1 = AnimElemTime(3) = 0
player = 10,0

[State 1300, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1200,0
channel = 0

[State 1300, Swing Snd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1, 7
channel = 2

[State 1300, Jump Snd]
type = PlaySnd
trigger1 = AnimElem = 4
value = 40,0
channel = 3

[State 1300, StateTypeSet: Air, No Phys]
type = StateTypeSet
trigger1 = AnimElem = 4
stateType = A
physics = N

[State 1300, Dust Helper]
type = Helper
trigger1 = AnimElem = 4
helperType = Normal
stateNo = 8100
ID = 8100
name = "Jump Dust"
posType = P1
ownPal = 1

[State 1300, Rising Velocity 1st]
type = VelSet
trigger1 = AnimElemTime(4) = 0
x = 5.8
y = -0.5*(var(10)+1)

[State 1300, Rising Velocity 2nd]
type = VelSet
trigger1 = AnimElem = 9 && !var(10)
trigger2 = AnimElem = 10 && var(10)=1
trigger3 = AnimElem = 11 && var(10)=2
y = -3

[State 1300, Gravity]
type = VelAdd
trigger1 = AnimElemTime(9) > 0 && !var(10)
trigger2 = AnimElemTime(10) > 0 && var(10)=1
trigger3 = AnimElemTime(11) > 0 && var(10)=2
y = .48

[State 1300, Friction]
type = VelAdd
triggerall = vel x > 0
trigger1 = AnimElemTime(9) >= 0 && !var(10)
trigger2 = AnimElemTime(10) >= 0 && var(10)=1
trigger3 = AnimElemTime(11) >= 0 && var(10)=2
x = -0.18

[State 1300, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 3   
attr = S, SA
damage = ceil(ifElse(fvar(11) * ifElse(var(10) = 2, 84, ifElse(var(10), 77, 70)) < 7, 7, fvar(11) * ifElse(var(10) = 2, 84, ifElse(var(10), 77, 70)))), 7
priority = 4, hit
animtype = Hard
getpower = 75 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8016)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 48), var(36) := -55
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -6, -6.25
air.velocity = -6, -6.25
guard.velocity = -8
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1300, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = !MoveContact && !MoveReversed
trigger1 = AnimElem = 4   
attr = A, SA
damage = ceil(ifElse(fvar(11) * ifElse(var(10) = 2, 91, ifElse(var(10), 84, 77)) < 7, 7, fvar(11) * ifElse(var(10) = 2, 91, ifElse(var(10), 84, 77)))), 7
priority = 4, hit
animtype = Hard
getpower = 75 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8016)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 50), var(36) := -71
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -6, -6.25
air.velocity = -6, -6.25
guard.velocity = -8
airguard.velocity = -6, -1.5
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1300, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = !var(10) && AnimElemTime(9) >= 0
trigger2 = var(10)=1 && AnimElemTime(10) >= 0
trigger3 = var(10)=2 && AnimElemTime(11) >= 0
moveType = I

[State 1300, End]
type = ChangeState
trigger1 = StateType = A
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1101

;========================<EX MERRY SPIN>=======================
[Statedef 1330]
type = S
movetype = A
physics = S
anim = 1330
ctrl = 0
velset = 0,0
poweradd = ifelse(var(20) > 0, 0, -500)
sprpriority = 2
facep2 = 1

[State 1330, MAX Timer Drain]
type = VarAdd
trigger1 = !Time
trigger1 = var(20) > 0
var(20) = -335

[State 1330, EX Sound]
type = PlaySnd
trigger1 = !Time
value = 0, ifelse(!fvar(31), 1000, 1001)

[State 1330, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 45

[State 1330, EX FX(Phantom)]
type = Explod
triggerall = !fvar(31)
trigger1 = !Time
anim = 8210
sprPriority = 3
posType = p1
pos = -10, -65
scale = 0.5, 0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1330, EX FX 1(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8220
sprpriority = 4
postype = p1
pos = 0, 0
bindtime = 1
facing = -1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1330, EX FX 2(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8221
sprpriority = -1
postype = p1
pos = 0, 0
bindtime = 1
facing = 1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1330, Width]
type = Width
trigger1 = 1
edge = 20,0

[State 1330, Width]
type = Width
trigger1 = AnimElemTime(3) = 0
player = 10,0

[State 1330, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 200,1
channel = 0

[State 1330, Swing Snd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1, 7
channel = 2

[State 1330, Jump Snd]
type = PlaySnd
trigger1 = AnimElem = 4
value = 40,0
channel = 3

[State 1330, StateTypeSet: Air, No Phys]
type = StateTypeSet
trigger1 = AnimElem = 4
stateType = A
physics = N

[State 1330, Dust Helper]
type = Helper
trigger1 = AnimElem = 4
helperType = Normal
stateNo = 8100
ID = 8100
name = "Jump Dust"
posType = P1
ownPal = 1

[State 1330, Rising Velocity 1st]
type = VelSet
trigger1 = AnimElemTime(4) = 0
x = 6.3
y = -1.5

[State 1330, Rising Velocity 2nd]
type = VelSet
trigger1 = AnimElem = 11
y = -3

[State 1330, Gravity]
type = VelAdd
trigger1 = AnimElemTime(11) > 0 
y = .48

[State 1330, Friction]
type = VelAdd
trigger1 = vel x > 0 
trigger1 = AnimElemTime(11) >= 0 
x = -0.18

[State 1330, MoveHitReset]
type = MoveHitReset
trigger1 = MoveContact
trigger1 = AnimElem = 3 <= 0
trigger2 = AnimElemTime(5) > 0 && AnimElemTime(7) <= 0

[State 1330, Hit 1]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 3   
attr = S, SA
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 4
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 15, 15
guardflag = M
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 10,10
guard.pausetime = 8,8
sparkNo = -1 + 0 * (var(33) := 8016)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 48), var(36) := -55
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -5
air.velocity = -6, -4
guard.velocity = -8
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 0
air.fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1330, Hit 2]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = !MoveContact && !MoveReversed
trigger1 = AnimElem = 4  || AnimElem = 5 
attr = A, SA
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 4
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 15, 15
guardflag = MA
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 8,8
guard.pausetime = 8,8
sparkNo = -1 + 0 * (var(33) := 8016)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 50), var(36) := -71
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -5
air.velocity = -6, -4
guard.velocity = -8
airguard.velocity = -6, -1.5
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 0
air.fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1330, Hit 3]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = !MoveContact && !MoveReversed
trigger1 = AnimElem = 6  || AnimElem = 7 
attr = A, SA
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 4
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 15, 15
guardflag = MA
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 8,8
guard.pausetime = 8,8
sparkNo = -1 + 0 * (var(33) := 8016)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 50), var(36) := -71
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -5
air.velocity = -6, -4
guard.velocity = -8
airguard.velocity = -6, -1.5
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 0
air.fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1330, Hit 4]
type = HitDef
trigger1 = !var(16) && var(15) < 2
trigger1 = AnimElem = 8 
attr = A, SA
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 4
priority = 4, hit
animtype = Diagup
getpower = 0, 0
givepower = 15, 15
guardflag = MA
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 8,8
guard.pausetime = 8,8
sparkNo = -1 + 0 * (var(33) := 8016)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 50), var(36) := -71
air.animtype = Diagup
fall.animtype = Diagup
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -6, -6.25
air.velocity = -6, -6.25
guard.velocity = -8
airguard.velocity = -6, -1.5
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
air.fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1330, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(11) >= 0
moveType = I

[State 1330, End]
type = ChangeState
trigger1 = StateType = A
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1101

;==================<MYSTIC ARROW>==================
[Statedef 1400]
type    = S
physics = S
movetype= I;A
juggle  = 0
velset = 0,0
ctrl = 0
poweradd = 70 * !var(20)
anim = 1400
facep2 = 1

[State 1400, Button Detect]
type = VarSet
trigger1 = !Time
var(10) = ifElse((helper(10371), var(0)) || (helper(10371), var(7)), 0, ifElse((helper(10371), var(1)) || (helper(10371), var(8)), 1, 2))

[State 1400, Width]
type = Width
trigger1 = 1
edge = 15,0

[State 1400, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0,1
channel = 0

[State 1400, Velocity]
type = VelSet
trigger1 = AnimElem = 3
x = 3+(var(10)*2)
y = -6

[State 1400, Gravity]
type = Veladd
trigger1 = AnimElemTime(3) > 0
y = .55

[State 1400, Jump Snd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 40,0
channel = 3

[State 1400, StateTypeSet: Air, No Phys]
type = StateTypeSet
trigger1 = AnimElem = 3
stateType = A
physics = N

[State 1400, Dust Helper]
type = Helper
trigger1 = AnimElem = 3
helperType = Normal
stateNo = 8100
ID = 8100
name = "Jump Dust"
posType = P1
ownPal = 1

[State 1400, End]
type = ChangeState
trigger1 = StateType = A
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1401

;Landing
[Statedef 1401]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
poweradd = 0
anim = 1401
;facep2 = 1

[State 1401, PosSet]
type = PosSet
trigger1 = !Time
y = 0

[State 1401, Land Snd]
type = PlaySnd
trigger1 = Time = 1
value = 52,0

[State 1401, Landing Dust Explod]
type = Explod
trigger1 = !Time
anim = 8102
sprpriority = -3
postype = P1
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1401, AttackDist]
type = AttackDist
trigger1 = 1
value = 0

[State 1401, Width]
type = Width
trigger1 = 1
edge = 15,0

[State 1401, Throw]
type = Hitdef
trigger1 = AnimElem = 1
trigger1 = !var(38)
trigger1 = p2dist x >= 0 && p2bodydist x <= 38-(2*var(10))
ID = 1405
attr = S, ST
priority = 7,Miss
getpower = 55 * !var(20)
givepower = 0
hitflag = M-
numhits = 0
sparkno = -1
p1stateno = 1402
hitsound = s800, 0
fall = 1
fall.recover = 0

[State 1401, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 5000,0
channel = 0

[State 1401, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(2) >= 0
moveType = I

[State 1401, End]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1

;Mystic Arrow Success
[Statedef 1402]
type    = S
movetype = A
physics = N
velset = 0,0
anim = 1402
sprpriority = 1

[State 1402, Safety]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1402, Turn]
type = Turn
trigger1 = !Time

[State 1402, TargetState]
type = TargetState
trigger1 = !Time && NumTarget
value = 1405

[State 1402, Target Facing]
type = TargetFacing
trigger1 = Time <= 1
value = 1

[State 1402, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1402, Width]
type = Width
trigger1 = !Time
edge = 40,40

[State 1402, Laugh]
type = PlaySnd
trigger1 = AnimElem = 6
value = 200, 0
channel = 0

[State 1402, Bye Bye!]
type = PlaySnd
trigger1 = AnimElem = 18
value = 1300, 0
channel = 0

[State 1402, Bow Fire Snd]
type = PlaySnd
trigger1 = AnimElem = 18
value = 1300, 1
channel = 2

[State 1402, Bow]
type = Explod
trigger1 = !NumExplod(1450)
trigger1 = AnimElem = 7
anim = 1450
ID = 1450
pos = ceil(0*const(size.xscale)),ceil(0*const(size.yscale))
postype = P1
sprpriority = -1
scale = const(size.xscale),const(size.yscale)
ignorehitpause = 1
bindtime = -1
;pausemovetime = 65535
;supermovetime = 65535
ownpal = 1
removeongethit = 1

[State 1402, Bind 1-2]
type = TargetBind
trigger1 = AnimElemTime(3) < 0
trigger1 = NumTarget
pos = ceil(-50*const(size.xscale)),0

[State 1402, Bind 3]
type = TargetBind
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) < 0
trigger1 = NumTarget
pos = ceil(-81*const(size.xscale)),ceil(-75*const(size.yscale))

[State 1402, Bind 4]
type = TargetBind
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(5) < 0
trigger1 = NumTarget
pos = ceil(-55*const(size.xscale)),ceil(-168*const(size.yscale))

[State 1402, Bind 5]
type = TargetBind
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) < 0
trigger1 = NumTarget
pos = ceil(-86*const(size.xscale)),ceil(-145*const(size.yscale))

[State 1402, Bind 6]
type = TargetBind
trigger1 = AnimElemTime(6) >= 0 && AnimElemTime(7) < 0
trigger1 = NumTarget
pos = ceil(-76*const(size.xscale)),ceil(-157*const(size.yscale))

[State 1402, Bind 7]
type = TargetBind
trigger1 = AnimElemTime(7) >= 0 && AnimElemTime(8) < 0
trigger1 = NumTarget
pos = ceil(-28*const(size.xscale)),ceil(-145*const(size.yscale))

[State 1402, Bind 8]
type = TargetBind
trigger1 = AnimElemTime(8) >= 0 && AnimElemTime(9) < 0
trigger1 = NumTarget
pos = ceil(20*const(size.xscale)),ceil(-107*const(size.yscale))

[State 1402, Bind 9]
type = TargetBind
trigger1 = AnimElemTime(9) >= 0 && AnimElemTime(10) < 0
trigger1 = NumTarget
pos = ceil(18*const(size.xscale)),ceil(-107*const(size.yscale))

[State 1402, Bind 10]
type = TargetBind
trigger1 = AnimElemTime(10) >= 0 && AnimElemTime(11) < 0
trigger1 = NumTarget
pos = ceil(32*const(size.xscale)),ceil(-109*const(size.yscale))

[State 1402, Bind 11]
type = TargetBind
trigger1 = AnimElemTime(11) >= 0 && AnimElemTime(12) < 0
trigger1 = NumTarget
pos = ceil(12*const(size.xscale)),ceil(-104*const(size.yscale))

[State 1402, Bind 12]
type = TargetBind
trigger1 = AnimElemTime(12) >= 0 && AnimElemTime(13) < 0
trigger1 = NumTarget
pos = ceil(7*const(size.xscale)),ceil(-104*const(size.yscale))

[State 1402, Bind 13-17]
type = TargetBind
trigger1 = AnimElemTime(13) >= 0 && AnimElemTime(18) < 0
trigger1 = NumTarget
pos = ceil(6*const(size.xscale)),ceil(-104*const(size.yscale))

[State 1402, Bind 18]
type = TargetBind
trigger1 = AnimElem = 18
trigger1 = NumTarget
pos = ceil(30*const(size.xscale)),ceil(-101*const(size.yscale))
time = 1

[State 1402, Damage 18]
type = TargetLifeAdd
trigger1 = NumTarget && AnimElem = 18
value = floor(ifElse(70 * fvar(11) < 7, -7, -70 * fvar(11)))

[State 1402, Throw 18]
type = TargetState
trigger1 = NumTarget && AnimElem = 18
value = 1406

[State 1402, TargetPowerAdd]
type = TargetPowerAdd
trigger1 = NumTarget && AnimElem = 18
value = 35

[State 1402, PowerAdd]
type = PowerAdd
trigger1 = NumTarget && AnimElem = 18 && !var(20)
value = 70

[State 1402, HitAdd]
type = HitAdd
trigger1 = NumTarget && AnimElem = 18
value = 1

[State 1402, VarAdd]
type = VarAdd
trigger1 = NumTarget && AnimElem = 18
var(13) = 1

[State 1402, Juggle]
type = VarAdd
trigger1 = NumTarget && AnimElem = 18
var(15) = 0
ignoreHitPause = 1

[State 1402, Juggle]
type = VarSet
trigger1 = NumTarget && AnimElem = 18
var(16) = 0
ignoreHitPause = 1

[State 1402, End]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1


;Mystic Arrow(TARGET)
[Statedef 1405]
type = A
movetype = H
physics = N
ctrl = 0
sprpriority = 0

[State 1405, Safety]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1405, On Ground]
type = PosSet
trigger1 = !Time
y = 0

[State 1405, Screenbound]
type = ScreenBound
Trigger1 = 1
value = 1
movecamera = 0,0

[State 1405, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 1405

;In case attacker loses binding on player for any reason, this controller
;guarantees that the player will never get stuck in this thrown state.
[State 1405, Safety]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050

;Mystic Arrow(TARGET 2nd)
[Statedef 1406]
type = A
movetype = H
physics = N
ctrl = 0
sprpriority = 2

[State 1406, Safety]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1406, Screenbound]
type = ScreenBound
Trigger1 = 1
value = 1
movecamera = 0,0

[State 1406, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 1406

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

[State 1406, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 1406, Bounce Off Wall]
type = ChangeState
trigger1 = BackEdgeBodyDist <= 10 || FrontEdgeBodyDist <= 10
value = 1407

;Impacting Wall
[StateDef 1407]
type = A
moveType = H
physics = N

[State 1406, Turn]
type = Turn
trigger1 = !Time
trigger1 = FrontEdgeDist < BackEdgeDist

[State 1406, PosAdd]
type = PosAdd
trigger1 = !Time
y = -const(size.mid.pos.y)

[State 1406, PosSet]
type = PosSet
trigger1 = 1
x = -160 * Facing

[State 1406, PosFreeze]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

[State 1406, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
moveCamera = 0,1

[State 1406, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1

[State 1406, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = 5010

[State 1406, Impact Sound]
type = PlaySnd
trigger1 = !Time
value = F7,0

[State 1406, End]
type = ChangeState
trigger1 = Time >= 4
value = 1408

;Bouncing Off Wall
[Statedef 1408]
type = A
moveType = H
physics = N

[State 1407, Turn]
type = Turn
trigger1 = !Time

[State 1407, Gravity]
type = VelAdd
trigger1 = 1
y = 0.42

[State 1407, VelSet]
type = VelSet
trigger1 = !Time
x = -2.85
y = -5.5

[State 1407, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = ifElse(SelfAnimExist(5051), 5051, 5030)

[State 1407, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = 5030 && !AnimTime
value = 5050

[State 1407, ChangeAnim]
type = ChangeAnim
trigger1 = vel y > -3 && Anim = 5051 && SelfAnimExist(5061)
value = 5061

[State 1407, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
moveCamera = 0,0

[State 1407, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 1407, End]
type = SelfState
trigger1 = vel y > 0 && pos y >= 0
value = 5100

;=====================<EX MYSTIC ARROW>==========================
[StateDef 1430]
type = S
physics = S
moveType = I;A
anim = 1430
ctrl = 0
velset = 0,0
sprPriority = 1
poweradd = ifelse(var(20) > 0, 0, -500)
faceP2 = 1

[State 1430, MAX Timer Drain]
type = VarAdd
trigger1 = !Time
trigger1 = var(20) > 0
var(20) = -335

[State 1430, EX Sound]
type = PlaySnd
trigger1 = !Time
value = 0, ifelse(!fvar(31), 1000, 1001)

[State 1430, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 40

[State 1430, EX FX(Phantom)]
type = Explod
triggerall = !fvar(31)
trigger1 = !Time
anim = 8210
sprPriority = 3
posType = p1
pos = 1, -48
scale = 0.5, 0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1430, EX FX 1(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8220
sprpriority = 4
postype = p1
pos = 0, 0
bindtime = 1
facing = -1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1430, EX FX 2(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8221
sprpriority = -1
postype = p1
pos = 0, 0
bindtime = 1
facing = 1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1430, Resist Projectiles]
type = NotHitBy
trigger1 = 1
value = ,NP,SP

[State 1430, Width]
type = Width
trigger1 = 1
edge = 15,0

[State 1430, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0,1
channel = 0

[State 1430, Velocity]
type = VelSet
trigger1 = AnimElem = 3
x = 8
y = -6

[State 1430, Gravity]
type = Veladd
trigger1 = AnimElemTime(3) > 0
y = .55

[State 1430, Jump Snd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 40,0
channel = 3

[State 1430, StateTypeSet: Air, No Phys]
type = StateTypeSet
trigger1 = AnimElem = 3
stateType = A
physics = N

[State 1430, Dust Helper]
type = Helper
trigger1 = AnimElem = 3
helperType = Normal
stateNo = 8100
ID = 8100
name = "Jump Dust"
posType = P1
ownPal = 1

[State 1430, End]
type = ChangeState
trigger1 = StateType = A
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1431

;EX Landing
[Statedef 1431]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
poweradd = 0
anim = 1401
;facep2 = 1

[State 1431, PosSet]
type = PosSet
trigger1 = !Time
y = 0

[State 1431, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 20

[State 1431, Land Snd]
type = PlaySnd
trigger1 = Time = 1
value = 52,0

[State 1431, Landing Dust Explod]
type = Explod
trigger1 = !Time
anim = 8102
sprpriority = -3
postype = P1
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1431, AttackDist]
type = AttackDist
trigger1 = 1
value = 0

[State 1431, Width]
type = Width
trigger1 = 1
edge = 15,0

[State 1431, Throw]
type = Hitdef
trigger1 = AnimElem = 1
trigger1 = !var(38)
trigger1 = p2dist x >= 0 && p2bodydist x <= 38
ID = 1405
attr = S, ST
priority = 7,Miss
getpower = 0
givepower = 0
hitflag = M-
numhits = 0
sparkno = -1
p1stateno = 1432
hitsound = s800, 0
fall = 1
fall.recover = 0

[State 1431, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 5000,0
channel = 0

[State 1431, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(2) >= 0
moveType = I

[State 1431, End]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1

;EX Mystic Arrow Success
[Statedef 1432]
type    = S
movetype = A
physics = N
velset = 0,0
poweradd = 0
anim = 1432
sprpriority = 1

[State 1432, Safety]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1432, Turn]
type = Turn
trigger1 = !Time

[State 1432, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 95

[State 1432, TargetState]
type = TargetState
trigger1 = !Time && NumTarget
value = 1405

[State 1432, Target Facing]
type = TargetFacing
trigger1 = Time <= 1
value = 1

[State 1432, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1432, Width]
type = Width
trigger1 = !Time
edge = 40,40

[State 1432, Laugh]
type = PlaySnd
trigger1 = AnimElem = 6
value = 200, 0
channel = 0

[State 1432, Bye Bye!]
type = PlaySnd
trigger1 = AnimElem = 18
value = 1300, 0
channel = 0

[State 1432, Bow Fire Snd]
type = PlaySnd
trigger1 = AnimElem = 18
value = 1300, 1
channel = 2

[State 1432, Bow]
type = Explod
trigger1 = !NumExplod(1450)
trigger1 = AnimElem = 7
anim = 1450
ID = 1450
pos = ceil(0*const(size.xscale)),ceil(0*const(size.yscale))
postype = P1
sprpriority = -1
scale = const(size.xscale),const(size.yscale)
ignorehitpause = 1
bindtime = -1
;pausemovetime = 65535
;supermovetime = 65535
ownpal = 0
removeongethit = 1

[State 1432, Bind 1-2]
type = TargetBind
trigger1 = AnimElemTime(3) < 0
trigger1 = NumTarget
pos = ceil(-50*const(size.xscale)),0

[State 1432, Bind 3]
type = TargetBind
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) < 0
trigger1 = NumTarget
pos = ceil(-81*const(size.xscale)),ceil(-75*const(size.yscale))

[State 1432, Bind 4]
type = TargetBind
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(5) < 0
trigger1 = NumTarget
pos = ceil(-55*const(size.xscale)),ceil(-168*const(size.yscale))

[State 1432, Bind 5]
type = TargetBind
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) < 0
trigger1 = NumTarget
pos = ceil(-86*const(size.xscale)),ceil(-145*const(size.yscale))

[State 1432, Bind 6]
type = TargetBind
trigger1 = AnimElemTime(6) >= 0 && AnimElemTime(7) < 0
trigger1 = NumTarget
pos = ceil(-76*const(size.xscale)),ceil(-157*const(size.yscale))

[State 1432, Bind 7]
type = TargetBind
trigger1 = AnimElemTime(7) >= 0 && AnimElemTime(8) < 0
trigger1 = NumTarget
pos = ceil(-28*const(size.xscale)),ceil(-145*const(size.yscale))

[State 1432, Bind 8]
type = TargetBind
trigger1 = AnimElemTime(8) >= 0 && AnimElemTime(9) < 0
trigger1 = NumTarget
pos = ceil(20*const(size.xscale)),ceil(-107*const(size.yscale))

[State 1432, Bind 9]
type = TargetBind
trigger1 = AnimElemTime(9) >= 0 && AnimElemTime(10) < 0
trigger1 = NumTarget
pos = ceil(18*const(size.xscale)),ceil(-107*const(size.yscale))

[State 1432, Bind 10]
type = TargetBind
trigger1 = AnimElemTime(10) >= 0 && AnimElemTime(11) < 0
trigger1 = NumTarget
pos = ceil(32*const(size.xscale)),ceil(-109*const(size.yscale))

[State 1432, Bind 11]
type = TargetBind
trigger1 = AnimElemTime(11) >= 0 && AnimElemTime(12) < 0
trigger1 = NumTarget
pos = ceil(12*const(size.xscale)),ceil(-104*const(size.yscale))

[State 1432, Bind 12]
type = TargetBind
trigger1 = AnimElemTime(12) >= 0 && AnimElemTime(13) < 0
trigger1 = NumTarget
pos = ceil(7*const(size.xscale)),ceil(-104*const(size.yscale))

[State 1432, Bind 13-17]
type = TargetBind
trigger1 = AnimElemTime(13) >= 0 && AnimElemTime(18) < 0
trigger1 = NumTarget
pos = ceil(6*const(size.xscale)),ceil(-104*const(size.yscale))

[State 1432, Bind 18]
type = TargetBind
trigger1 = AnimElem = 18
trigger1 = NumTarget
pos = ceil(30*const(size.xscale)),ceil(-101*const(size.yscale))
time = 1

[State 1432, Damage 18]
type = TargetLifeAdd
trigger1 = NumTarget && AnimElem = 18
value = floor(ifElse(91 * fvar(11) < 7, -7, -91 * fvar(11)))

[State 1432, Throw 18]
type = TargetState
trigger1 = NumTarget && AnimElem = 18
value = 1406

[State 1432, TargetPowerAdd]
type = TargetPowerAdd
trigger1 = NumTarget && AnimElem = 18
value = 35

[State 1432, HitAdd]
type = HitAdd
trigger1 = NumTarget && AnimElem = 18
value = 1

[State 1432, VarAdd]
type = VarAdd
trigger1 = NumTarget && AnimElem = 18
var(13) = 1

[State 1432, Juggle]
type = VarAdd
trigger1 = NumTarget && AnimElem = 18
var(15) = 0
ignoreHitPause = 1

[State 1432, Juggle]
type = VarSet
trigger1 = NumTarget && AnimElem = 18
var(16) = 0
ignoreHitPause = 1

[State 1432, End]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1

;=====================<AIR MERRY SPIN>==========================
[StateDef 1500]
type = A
physics = N
moveType = A
anim = 1500
ctrl = 0
sprPriority = 1
poweradd = 80 * !var(20)
;faceP2 = 1

[State 1500, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1200,0
channel = 0

[State 1500, Swing Snd]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1, 7
channel = 2

[State 1500, Width: Edge]
type = Width
trigger1 = 1
edge = 20,0

[State 1500, Gravity]
type = VelAdd
trigger1 = AnimElemTime(1) > 0
y = .63

[State 1500, Hit Forward]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = !MoveContact && !MoveReversed
trigger1 = AnimElem = 2 || AnimElem = 3 || AnimElem = 8 || AnimElem = 9    
attr = A, SA
damage = ceil(ifElse(fvar(11) * 56 < 7, 7, fvar(11) * 56)), 7
priority = 4, hit
animtype = Hard
getpower = 75 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8016)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 50), var(36) := -71
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -6, -6.25
air.velocity = -6, -6.25
guard.velocity = -8
airguard.velocity = -6, -1.5
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120
p2facing = 1

[State 1500, Hit Back]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = !MoveContact && !MoveReversed
trigger1 = AnimElem = 5 || AnimElem = 6   
attr = A, SA
damage = ceil(ifElse(fvar(11) * 56 < 7, 7, fvar(11) * 56)), 7
priority = 4, hit
animtype = Hard
getpower = 75 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8016)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := -60), var(36) := -71
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = ifElse(P2Dist x < 0,6,-6), 6.25
air.velocity = ifElse(P2Dist x < 0,6,-6), 6.25
guard.velocity = ifElse(P2Dist x < 0,8,-8)
airguard.velocity = -6, -1.5
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120
p2facing = -1

[State 1500, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(10) >= 0
moveType = I

[State 1500, End]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1501

;Landing
[Statedef 1501]
type = S
movetype = I
physics = S
ctrl = 0
anim = 1501
velset = 0, 0

[State 1501, On Ground]
type = Posset
trigger1 = !Time
Y = 0

[State 1501, Turn]
type = Turn
trigger1 = !Time
trigger1 = PrevStateNo = 1600 || PrevStateNo = 1630

[State 1501, Land Snd]
type = PlaySnd
trigger1 = Time = 1
value = 52,0

[State 1501, Landing Dust Explod]
type = Explod
trigger1 = !Time
anim = 8102
sprpriority = -3
postype = P1
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1501, End]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1

;=====================<EX AIR MERRY SPIN>==========================
[StateDef 1530]
type = A
physics = N
moveType = A
anim = 1530
ctrl = 0
sprPriority = 1
poweradd = ifelse(var(20) > 0, 0, -500)
;faceP2 = 1

[State 1530, MAX Timer Drain]
type = VarAdd
trigger1 = !Time
trigger1 = var(20) > 0
var(20) = -335

[State 1530, EX Sound]
type = PlaySnd
trigger1 = !Time
value = 0, ifelse(!fvar(31), 1000, 1001)

[State 1530, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 25

[State 1530, EX FX(Phantom)]
type = Explod
triggerall = !fvar(31)
trigger1 = !Time
anim = 8210
sprPriority = 3
posType = p1
pos = -2, -81
scale = 0.5, 0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1530, EX FX 1(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8220
sprpriority = 4
postype = p1
pos = 0, 0
bindtime = 1
facing = -1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1530, EX FX 2(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8221
sprpriority = -1
postype = p1
pos = 0, 0
bindtime = 1
facing = 1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1530, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 200,1
channel = 0

[State 1530, Swing Snd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1, 7
channel = 2
persistent = 1

[State 1530, Width: Edge]
type = Width
trigger1 = 1
edge = 20,0

[State 1530, VelSet]
type = VelSet
trigger1 = !Time
trigger1 = vel x = 0
y = -4

[State 1530, Gravity]
type = VelAdd
trigger1 = AnimElemTime(1) > 0
y = .68

[State 1530, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 3
trigger1 = !(movecontact%3)    
attr = A, SA
damage = ceil(ifElse(fvar(11) * 21 < 7, 7, fvar(11) * 21)), 7
priority = 4, hit
animtype = Hard
getpower = 0,0
givepower = 15, 15
guardflag = MA
hitflag = MAF
hitsound = S2,10
guardsound = S130,0
pausetime = 8,8
guard.pausetime = 8,8
sparkNo = -1 + 0 * (var(33) := 8016)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 50), var(36) := -71
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -2
air.velocity = -6, -4
guard.velocity = -4
airguard.velocity = -6, -1.5
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 0
air.fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120
p2facing = 1

[State 1530, End]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1501

;========================<STOMP EM!>=======================
[Statedef 1600]
type = S
movetype = A
physics = S
anim = 1600
ctrl = 0
velset = 0,0
poweradd = 80 * !var(20)
sprpriority = 2
facep2 = 1

[State 1600, Width]
type = Width
trigger1 = 1
edge = 10,10

[State 1600, Voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0,0
channel = 0

[State 1600, Jump Snd]
type = PlaySnd
trigger1 = AnimElem = 4
value = 41,0
channel = 3

[State 1600, StateTypeSet: Air, No Phys]
type = StateTypeSet
trigger1 = AnimElem = 4
stateType = A
physics = N

[State 1600, Dust Helper]
type = Helper
trigger1 = AnimElem = 4
helperType = Normal
stateNo = 8100
ID = 8100
name = "Jump Dust"
posType = P1
ownPal = 1

[State 1600, No Push]
type = PlayerPush
trigger1 = AnimElemTime(4) >= 0
value = 0

[State 1600, Velocity]
type = VelSet
trigger1 = AnimElem = 4
x = (P2dist x / 27)
y = -9.15

[State 1600, Gravity]
type = VelAdd
trigger1 = AnimElemTime(4) > 1
y = .7

[State 1600, Hit]
type = HitDef
trigger1 = AnimElem = 10   
attr = A, SA
damage = ceil(ifElse(fvar(11) * 49 < 7, 7, fvar(11) * 49)), 0
priority = 4, hit
animtype = Hard
getpower = 75 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = L
hitflag = FD
hitsound = S2,5
guardsound = S130,0
pausetime = 4,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 0), var(36) := -5
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
down.hittime = 20
down.velocity = 0,0
down.bounce = 0
ground.velocity = 0, 0
air.velocity = 0,-7.5
guard.velocity = 0
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .58
fall = 1
fall.recover = 0
;forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1600, Success]
type = ChangeState
trigger1 = MoveHit = 1
value = 1601
ignorehitpause = 1

[State 1600, End]
type = ChangeState
trigger1 = StateType = A
trigger1 = pos y > -vel y
value = 1501

;Success
[Statedef 1601]
type = A
movetype = A
physics = N
anim = 1601
ctrl = 0
velset = 0,0
poweradd = 0
sprpriority = 2
facep2 = 1

[State 1601, Width]
type = Width
trigger1 = 1
edge = 10,10

[State 1601, PosSet]
type = PosSet
trigger1 = !Time
y = -12

[State 1601, Jump Snd]
type = PlaySnd
trigger1 = AnimElem = 4
value = 40,0
channel = 3

[State 1601, No Push]
type = PlayerPush
trigger1 = 1
value = 0

[State 1601, Velocity]
type = VelSet
trigger1 = AnimElem = 4
x = -6
y = -5.5

[State 1601, Gravity]
type = VelAdd
trigger1 = AnimElemTime(4) > 0
y = .58

[State 1601, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(2) >= 0
moveType = I

[State 1601, End]
type = ChangeState
trigger1 = AnimElemTime(4) > 0
trigger1 = pos y > -vel y
value = 1501

;========================<EX STOMP EM!>=======================
[Statedef 1630]
type = S
movetype = A
physics = S
anim = 1600
ctrl = 0
velset = 0,0
poweradd = ifelse(var(20) > 0, 0, -500)
sprpriority = 2
facep2 = 1

[State 1630, MAX Timer Drain]
type = VarAdd
trigger1 = !Time
trigger1 = var(20) > 0
var(20) = -335

[State 1630, EX Sound]
type = PlaySnd
trigger1 = !Time
value = 0, ifelse(!fvar(31), 1000, 1001)

[State 1630, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 30

[State 1630, EX FX(Phantom)]
type = Explod
triggerall = !fvar(31)
trigger1 = !Time
anim = 8210
sprPriority = 3
posType = p1
pos = 0, -75
scale = 0.5, 0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1630, EX FX 1(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8220
sprpriority = 4
postype = p1
pos = 0, 0
bindtime = 1
facing = -1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1630, EX FX 2(Divine)]
type = Explod
triggerall = fvar(31)
trigger1 = !Time
anim = 8221
sprpriority = -1
postype = p1
pos = 0, 0
bindtime = 1
facing = 1
scale = 0.5, 0.5;based on char size
pauseMoveTime = -1
superMoveTime = -1
ownpal = 1

[State 1630, Width]
type = Width
trigger1 = 1
edge = 10,10

[State 1630, Voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0,3
channel = 0

[State 1630, Jump Snd]
type = PlaySnd
trigger1 = AnimElem = 4
value = 41,0
channel = 3

[State 1630, StateTypeSet: Air, No Phys]
type = StateTypeSet
trigger1 = AnimElem = 4
stateType = A
physics = N

[State 1630, Dust Helper]
type = Helper
trigger1 = AnimElem = 4
helperType = Normal
stateNo = 8100
ID = 8100
name = "Jump Dust"
posType = P1
ownPal = 1

[State 1630, No Push]
type = PlayerPush
trigger1 = AnimElemTime(4) >= 0
value = 0

[State 1630, Velocity]
type = VelSet
trigger1 = AnimElem = 4
x = (P2dist x / 27)
y = -9.5

[State 1630, Gravity]
type = VelAdd
trigger1 = AnimElemTime(4) > 1
y = .72

[State 1630, Hit]
type = HitDef
trigger1 = AnimElem = 10   
attr = A, SA
damage = ceil(ifElse(fvar(11) * 49 < 7, 7, fvar(11) * 49)), 0
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 35, 35
guardflag = L
hitflag = FD
hitsound = S2,5
guardsound = S130,0
pausetime = 4,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 0), var(36) := -5
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
down.hittime = 30
down.velocity = 0,0
down.bounce = 0
ground.velocity = 0, 0
air.velocity = 0,-7.5
guard.velocity = 0
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .58
fall = 1
fall.recover = 0
;forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1630, Success]
type = ChangeState
trigger1 = MoveHit = 1
value = 1631
ignorehitpause = 1

[State 1630, End]
type = ChangeState
trigger1 = StateType = A
trigger1 = pos y > -vel y
value = 1501

;EX Success
[Statedef 1631]
type = A
movetype = A
physics = N
anim = 1630
ctrl = 0
velset = 0,0
poweradd = 0
sprpriority = 2
facep2 = 1

[State 1631, Width]
type = Width
trigger1 = 1
edge = 10,10

[State 1631, PosSet]
type = PosSet
trigger1 = !Time
y = -12

[State 1631, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 30

[State 1631, Jump Snd]
type = PlaySnd
trigger1 = AnimElem = 9
value = 40,0
channel = 3

[State 1631, Swing Snd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 1,5
channel = 1

[State 1631, No Push]
type = PlayerPush
trigger1 = 1
value = 0

[State 1631, Velocity]
type = VelSet
trigger1 = AnimElem = 9
x = -6
y = -5.5

[State 1631, Gravity]
type = VelAdd
trigger1 = AnimElemTime(9) > 0
y = .58

[State 1630, Hit]
type = HitDef
trigger1 = AnimElem = 6   
attr = A, SA
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 0
priority = 4, hit
animtype = Hard
getpower = 0, 0
givepower = 35, 35
guardflag = L
hitflag = FD
hitsound = S2,5
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 0), var(36) := -5
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
down.hittime = 22
down.velocity = 0,0
down.bounce = 0
ground.velocity = 0, 0
air.velocity = 0,-7.5
guard.velocity = 0
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .58
fall = 1
fall.recover = 0
;forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1631, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(7) >= 0
moveType = I

[State 1631, End]
type = ChangeState
trigger1 = AnimElemTime(9) > 0
trigger1 = pos y > -vel y
value = 1501